/* style/resources.css */

/* Biến CSS */
:root {
  --page-resources-primary-color: #017439;
  --page-resources-secondary-color: #FFFFFF;
  --page-resources-text-dark: #333333;
  --page-resources-text-light: #FFFFFF;
  --page-resources-bg-dark: #121212; /* Lấy từ body background */
  --page-resources-bg-light: #f8f9fa;
  --page-resources-btn-register: #C30808;
  --page-resources-btn-login: #C30808;
  --page-resources-btn-text-yellow: #FFFF00;
}

.page-resources {
  font-family: Arial, sans-serif;
  line-height: 1.6;
  color: var(--page-resources-text-light); /* Mặc định chữ sáng trên nền tối của body */
  background-color: var(--page-resources-bg-dark);
}

.page-resources__container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
  box-sizing: border-box;
}

/* Hero Section */
.page-resources__hero-section {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: 80px 20px;
  background-color: var(--page-resources-primary-color); /* Nền xanh lá cây */
  color: var(--page-resources-text-light);
  position: relative;
  overflow: hidden;
}

.page-resources__hero-content {
  max-width: 800px;
  z-index: 1;
}

.page-resources__hero-title {
  font-size: 3.2em;
  margin-bottom: 20px;
  color: var(--page-resources-text-light);
  font-weight: bold;
}

.page-resources__hero-description {
  font-size: 1.2em;
  margin-bottom: 30px;
  color: var(--page-resources-text-light);
}

.page-resources__cta-buttons {
  display: flex;
  gap: 20px;
  justify-content: center;
  flex-wrap: wrap;
}

.page-resources__hero-image-wrapper {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  opacity: 0.2;
  overflow: hidden;
}

.page-resources__hero-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

/* General Buttons */
.page-resources__btn-primary,
.page-resources__btn-secondary {
  display: inline-block;
  padding: 15px 30px;
  border-radius: 8px;
  text-decoration: none;
  font-weight: bold;
  transition: background-color 0.3s ease, color 0.3s ease, border-color 0.3s ease;
  white-space: normal;
  word-wrap: break-word;
  box-sizing: border-box;
  max-width: 100%;
}

.page-resources__btn-primary {
  background-color: var(--page-resources-btn-register);
  color: var(--page-resources-btn-text-yellow);
  border: 2px solid var(--page-resources-btn-register);
}

.page-resources__btn-primary:hover {
  background-color: #a30606;
  border-color: #a30606;
}

.page-resources__btn-secondary {
  background-color: transparent;
  color: var(--page-resources-text-light);
  border: 2px solid var(--page-resources-text-light);
}

.page-resources__btn-secondary:hover {
  background-color: var(--page-resources-text-light);
  color: var(--page-resources-primary-color);
  border-color: var(--page-resources-text-light);
}

/* Sections */
.page-resources__articles-section,
.page-resources__faq-section,
.page-resources__cta-bottom {
  padding: 60px 0;
  background-color: var(--page-resources-bg-light);
  color: var(--page-resources-text-dark);
}

.page-resources__video-section,
.page-resources__responsible-gaming-section {
  padding: 60px 0;
  background-color: var(--page-resources-bg-dark);
  color: var(--page-resources-text-light);
}

.page-resources__section-title {
  font-size: 2.5em;
  text-align: center;
  margin-bottom: 20px;
  color: var(--page-resources-text-dark);
}

.page-resources__section-title--white {
  color: var(--page-resources-text-light);
}

.page-resources__section-description {
  font-size: 1.1em;
  text-align: center;
  max-width: 800px;
  margin: 0 auto 40px;
  color: var(--page-resources-text-dark);
}

.page-resources__section-description--white {
  color: var(--page-resources-text-light);
}

/* Articles Grid */
.page-resources__articles-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 30px;
  margin-top: 40px;
}

.page-resources__article-card {
  background-color: var(--page-resources-secondary-color);
  border-radius: 10px;
  overflow: hidden;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  display: flex;
  flex-direction: column;
  color: var(--page-resources-text-dark);
}

.page-resources__article-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.15);
}

.page-resources__article-image {
  width: 100%;
  height: 200px;
  object-fit: cover;
  display: block;
}

.page-resources__article-content {
  padding: 25px;
  flex-grow: 1;
  display: flex;
  flex-direction: column;
}

.page-resources__article-title {
  font-size: 1.4em;
  margin-bottom: 15px;
  font-weight: bold;
  line-height: 1.3;
}

.page-resources__article-title a {
  color: var(--page-resources-primary-color);
  text-decoration: none;
}

.page-resources__article-title a:hover {
  text-decoration: underline;
}

.page-resources__article-excerpt {
  font-size: 0.95em;
  color: #555;
  margin-bottom: 20px;
  flex-grow: 1;
}

.page-resources__read-more {
  display: inline-block;
  color: var(--page-resources-primary-color);
  text-decoration: none;
  font-weight: bold;
  align-self: flex-start;
}

.page-resources__read-more:hover {
  text-decoration: underline;
}

.page-resources__view-all-cta {
  text-align: center;
  margin-top: 50px;
}

/* Video Section */
.page-resources__video-wrapper {
  position: relative;
  width: 100%;
  padding-bottom: 56.25%; /* 16:9 Aspect Ratio */
  height: 0;
  overflow: hidden;
  border-radius: 10px;
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.3);
  max-width: 100%;
  box-sizing: border-box;
}

.page-resources__video {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  border: none;
  display: block;
  cursor: pointer;
}

.page-resources__video-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.5);
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  color: var(--page-resources-text-light);
  cursor: pointer;
  transition: background-color 0.3s ease;
  z-index: 2;
}

.page-resources__video-overlay:hover {
  background: rgba(0, 0, 0, 0.7);
}

.page-resources__play-button {
  font-size: 4em;
  border: 3px solid var(--page-resources-text-light);
  border-radius: 50%;
  padding: 10px 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 15px;
}

.page-resources__overlay-text {
  font-size: 1.3em;
  font-weight: bold;
}

/* FAQ Section */
.page-resources__faq-list {
  margin-top: 40px;
}

.page-resources__faq-item {
  background-color: var(--page-resources-secondary-color);
  margin-bottom: 15px;
  border-radius: 8px;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
  color: var(--page-resources-text-dark);
}

.page-resources__faq-question {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px 25px;
  font-size: 1.2em;
  font-weight: bold;
  cursor: pointer;
  color: var(--page-resources-primary-color);
  list-style: none;
  user-select: none;
}

.page-resources__faq-question::-webkit-details-marker {
  display: none;
}

.page-resources__faq-toggle {
  font-size: 1.5em;
  line-height: 1;
  margin-left: 15px;
  transition: transform 0.3s ease;
}

.page-resources__faq-item[open] .page-resources__faq-toggle {
  transform: rotate(45deg);
}

.page-resources__faq-answer {
  padding: 0 25px 20px;
  font-size: 1.05em;
  color: #555;
}

.page-resources__faq-answer p {
  margin: 0;
}

/* Responsible Gaming Section */
.page-resources__responsible-gaming-section {
  text-align: center;
  padding-bottom: 80px;
}

.page-resources__responsible-gaming-section .page-resources__btn-primary {
  background-color: var(--page-resources-secondary-color);
  color: var(--page-resources-primary-color);
  border-color: var(--page-resources-secondary-color);
}

.page-resources__responsible-gaming-section .page-resources__btn-primary:hover {
  background-color: #e0e0e0;
  border-color: #e0e0e0;
}

/* CTA Bottom Section */
.page-resources__cta-bottom {
  text-align: center;
  padding-top: 80px;
}

.page-resources__cta-bottom .page-resources__cta-buttons {
  margin-top: 30px;
}

/* Responsive Design */
@media (max-width: 1024px) {
  .page-resources__hero-title {
    font-size: 2.8em;
  }

  .page-resources__section-title {
    font-size: 2em;
  }
}

@media (max-width: 768px) {
  .page-resources__hero-section {
    padding: 60px 15px;
  }

  .page-resources__hero-title {
    font-size: 2.2em;
  }

  .page-resources__hero-description {
    font-size: 1em;
  }

  .page-resources__cta-buttons {
    flex-direction: column;
    gap: 15px;
  }

  .page-resources__btn-primary,
  .page-resources__btn-secondary {
    width: 100%;
    max-width: 100% !important;
    padding: 12px 20px;
  }

  .page-resources__articles-section,
  .page-resources__video-section,
  .page-resources__faq-section,
  .page-resources__responsible-gaming-section,
  .page-resources__cta-bottom {
    padding: 40px 0;
  }

  .page-resources__container {
    padding: 0 15px;
  }

  .page-resources__section-title {
    font-size: 1.8em;
  }

  .page-resources__section-description {
    font-size: 0.95em;
    margin-bottom: 30px;
  }

  .page-resources__articles-grid {
    grid-template-columns: 1fr;
    gap: 25px;
  }

  .page-resources__article-image {
    height: 180px;
  }

  .page-resources__article-title {
    font-size: 1.2em;
  }

  .page-resources__faq-question {
    font-size: 1.1em;
    padding: 15px 20px;
  }

  .page-resources__faq-answer {
    font-size: 0.95em;
    padding: 0 20px 15px;
  }

  /* Mobile specific image and video responsiveness */
  .page-resources img {
    max-width: 100% !important;
    height: auto !important;
    display: block !important;
  }
  
  .page-resources video,
  .page-resources__video {
    max-width: 100% !important;
    width: 100% !important;
    height: auto !important;
    display: block !important;
  }
  
  .page-resources__hero-image-wrapper,
  .page-resources__articles-section,
  .page-resources__card,
  .page-resources__container,
  .page-resources__video-section,
  .page-resources__video-container,
  .page-resources__video-wrapper,
  .page-resources__cta-buttons,
  .page-resources__button-group,
  .page-resources__btn-container {
    max-width: 100% !important;
    width: 100% !important;
    box-sizing: border-box !important;
    overflow: hidden !important;
  }

  .page-resources__hero-section {
    padding-top: var(--header-offset, 120px) !important;
  }

  .page-resources__video-overlay .page-resources__play-button {
    font-size: 3em;
  }

  .page-resources__video-overlay .page-resources__overlay-text {
    font-size: 1.1em;
  }
}

@media (max-width: 480px) {
  .page-resources__hero-title {
    font-size: 1.8em;
  }

  .page-resources__section-title {
    font-size: 1.5em;
  }

  .page-resources__btn-primary,
  .page-resources__btn-secondary {
    font-size: 0.9em;
  }

  .page-resources__play-button {
    font-size: 2.5em;
  }

  .page-resources__overlay-text {
    font-size: 1em;
  }
}