/* style/resources.css */

/* Biến CSS cho màu sắc */
:root {
  --sv888-primary-color: #003366;
  --sv888-secondary-color: #FFCC00;
  --sv888-text-light: #ffffff;
  --sv888-text-dark: #333333;
  --sv888-background-dark: #1a1a2e;
}

.page-resources {
  font-family: 'Arial', sans-serif;
  color: var(--sv888-text-light); /* Default text color for dark body background */
  background-color: var(--sv888-background-dark); /* Ensure consistency if body background is overridden */
  line-height: 1.6;
}

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

.page-resources__section {
  padding: 60px 0;
  text-align: center;
}

.page-resources__section-title {
  font-size: 2.5em;
  color: var(--sv888-secondary-color);
  margin-bottom: 30px;
  font-weight: bold;
}

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

.page-resources__text-block {
  font-size: 1.1em;
  color: var(--sv888-text-light);
  margin-bottom: 20px;
  max-width: 800px;
  margin-left: auto;
  margin-right: auto;
}

.page-resources__text-block--light {
  color: var(--sv888-text-light);
}

/* Hero Section */
.page-resources__hero-section {
  position: relative;
  width: 100%;
  height: 100vh; /* Full viewport height */
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding-top: var(--header-offset, 120px); /* Ensure space for fixed header */
  overflow: hidden;
  box-sizing: border-box;
}

.page-resources__hero-image {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  z-index: 1;
}

.page-resources__hero-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.7); /* Dark overlay for text readability */
  z-index: 2;
}

.page-resources__hero-content {
  position: relative;
  z-index: 3;
  max-width: 900px;
  padding: 20px;
}

.page-resources__hero-title {
  font-size: 3.5em;
  color: var(--sv888-secondary-color);
  margin-bottom: 20px;
  font-weight: bold;
  text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
}

.page-resources__hero-description {
  font-size: 1.3em;
  color: var(--sv888-text-light);
  margin-bottom: 40px;
  text-shadow: 1px 1px 3px rgba(0, 0, 0, 0.5);
}

.page-resources__cta-button {
  display: inline-block;
  background-color: var(--sv888-secondary-color);
  color: var(--sv888-primary-color);
  padding: 15px 30px;
  border-radius: 8px;
  text-decoration: none;
  font-weight: bold;
  font-size: 1.1em;
  transition: background-color 0.3s ease, transform 0.3s ease;
  border: none;
  cursor: pointer;
}

.page-resources__cta-button:hover {
  background-color: #FFD700;
  transform: translateY(-3px);
}

.page-resources__cta-button--secondary {
  background-color: var(--sv888-primary-color);
  color: var(--sv888-secondary-color);
  border: 2px solid var(--sv888-secondary-color);
}

.page-resources__cta-button--secondary:hover {
  background-color: var(--sv888-secondary-color);
  color: var(--sv888-primary-color);
}

.page-resources__cta-button--small {
  padding: 10px 20px;
  font-size: 1em;
}

/* Intro Section */
.page-resources__intro-section {
  background-color: var(--sv888-background-dark);
  color: var(--sv888-text-light);
}

/* Video Section */
.page-resources__video-section {
  background-color: var(--sv888-primary-color);
  color: var(--sv888-text-light);
  padding: 80px 0;
}

.page-resources__video-wrapper {
  position: relative;
  padding-bottom: 56.25%; /* 16:9 Aspect Ratio */
  height: 0;
  overflow: hidden;
  max-width: 900px;
  margin: 0 auto 30px;
  background-color: #000;
}

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

/* Card Grid */
.page-resources__card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 30px;
  max-width: 1200px;
  margin: 40px auto 0;
}

.page-resources__guide-card {
  background-color: rgba(255, 255, 255, 0.05);
  border-radius: 10px;
  overflow: hidden;
  text-align: left;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
  transition: transform 0.3s ease;
  display: flex;
  flex-direction: column;
  height: 100%;
}

.page-resources__guide-card:hover {
  transform: translateY(-10px);
}

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

.page-resources__card-title {
  font-size: 1.5em;
  color: var(--sv888-secondary-color);
  margin: 20px 20px 10px;
  min-height: 60px; /* Ensure consistent height for titles */
}

.page-resources__card-title a {
  color: var(--sv888-secondary-color);
  text-decoration: none;
}

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

.page-resources__card-text {
  font-size: 1em;
  color: var(--sv888-text-light);
  padding: 0 20px;
  margin-bottom: 20px;
  flex-grow: 1;
}

.page-resources__card-link {
  display: inline-block;
  background-color: var(--sv888-primary-color);
  color: var(--sv888-secondary-color);
  padding: 10px 20px;
  border-radius: 5px;
  text-decoration: none;
  font-weight: bold;
  font-size: 0.9em;
  margin: 0 20px 20px;
  align-self: flex-start;
  transition: background-color 0.3s ease;
}

.page-resources__card-link:hover {
  background-color: #004488;
}

/* FAQ Section */
.page-resources__faq-section {
  background-color: var(--sv888-background-dark);
  color: var(--sv888-text-light);
  padding: 80px 0;
}

.page-resources__faq-list {
  max-width: 900px;
  margin: 40px auto 0;
  text-align: left;
}

.page-resources__faq-item {
  background-color: rgba(255, 255, 255, 0.08);
  margin-bottom: 15px;
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.page-resources__faq-question {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px;
  cursor: pointer;
  background-color: var(--sv888-primary-color);
  color: var(--sv888-text-light);
  font-size: 1.2em;
  font-weight: bold;
  transition: background-color 0.3s ease;
}

.page-resources__faq-question:hover {
  background-color: #004488;
}

.page-resources__faq-question h3 {
  margin: 0;
  color: inherit;
  font-size: 1em; /* Adjust to fit parent font size */
}

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

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

.page-resources__faq-answer {
  max-height: 0;
  overflow: hidden;
  padding: 0 20px;
  transition: max-height 0.3s ease, padding 0.3s ease;
  background-color: rgba(255, 255, 255, 0.03);
  color: var(--sv888-text-light);
}

.page-resources__faq-item.active .page-resources__faq-answer {
  max-height: 1000px !important; /* Sufficiently large value */
  padding: 20px !important;
}

.page-resources__faq-answer p {
  margin: 0;
  font-size: 1em;
  color: var(--sv888-text-light);
}

/* Responsible Gambling & Contact Sections */
.page-resources__responsible-gambling-section, 
.page-resources__contact-section {
  background-color: var(--sv888-background-dark);
  color: var(--sv888-text-light);
}

.page-resources__content-block {
  display: flex;
  align-items: center;
  gap: 40px;
  text-align: left;
  margin-top: 40px;
}

.page-resources__two-column {
  display: flex;
  flex-direction: row;
  justify-content: center;
}

.page-resources__two-column--reversed {
  flex-direction: row-reverse;
}

.page-resources__text-content {
  flex: 1;
}

.page-resources__image-content {
  flex: 1;
  display: flex;
  justify-content: center;
  align-items: center;
}

.page-resources__image {
  max-width: 100%;
  height: auto;
  border-radius: 10px;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
}

/* Join CTA Section */
.page-resources__join-cta-section .page-resources__container {
  background-color: var(--sv888-primary-color);
  border-radius: 15px;
  padding: 60px 40px;
  margin-top: 60px;
}

/* Responsive Design */
@media (max-width: 1024px) {
  .page-resources__hero-title {
    font-size: 2.8em;
  }
  .page-resources__hero-description {
    font-size: 1.1em;
  }
  .page-resources__section-title {
    font-size: 2em;
  }
  .page-resources__card-grid {
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  }
  .page-resources__two-column {
    flex-direction: column;
  }
  .page-resources__two-column--reversed {
    flex-direction: column;
  }
  .page-resources__text-content, .page-resources__image-content {
    width: 100%;
  }
  .page-resources__image {
    margin-top: 30px;
  }
}

@media (max-width: 768px) {
  .page-resources {
    font-size: 16px;
    line-height: 1.6;
  }
  .page-resources__hero-section {
    height: auto;
    min-height: 500px;
    padding: 80px 0 40px;
  }
  .page-resources__hero-title {
    font-size: 2em;
  }
  .page-resources__hero-description {
    font-size: 1em;
  }
  .page-resources__section {
    padding: 40px 0;
  }
  .page-resources__section-title {
    font-size: 1.8em;
  }
  .page-resources__text-block {
    font-size: 0.95em;
  }

  /* Images responsiveness */
  .page-resources img {
    max-width: 100% !important;
    width: 100% !important;
    height: auto !important;
    display: block !important;
  }
  .page-resources__card-image {
    height: 200px;
  }
  .page-resources__image-content,
  .page-resources__card-grid {
    max-width: 100% !important;
    width: 100% !important;
    box-sizing: border-box !important;
    padding-left: 15px;
    padding-right: 15px;
  }

  /* Videos responsiveness */
  .page-resources video,
  .page-resources__video {
    max-width: 100% !important;
    width: 100% !important;
    height: auto !important;
    display: block !important;
  }
  .page-resources__video-section,
  .page-resources__video-container,
  .page-resources__video-wrapper {
    max-width: 100% !important;
    width: 100% !important;
    box-sizing: border-box !important;
    padding-left: 15px;
    padding-right: 15px;
    overflow: hidden !important;
  }
  .page-resources__video-section {
    padding-top: var(--header-offset, 120px) !important;
  }

  /* Buttons responsiveness */
  .page-resources__cta-button,
  .page-resources__btn-primary,
  .page-resources__btn-secondary,
  .page-resources a[class*="button"],
  .page-resources a[class*="btn"] {
    max-width: 100% !important;
    width: 100% !important;
    box-sizing: border-box !important;
    white-space: normal !important;
    word-wrap: break-word !important;
    padding-left: 15px;
    padding-right: 15px;
    margin-left: 0;
    margin-right: 0;
  }
  .page-resources__cta-buttons,
  .page-resources__button-group,
  .page-resources__btn-container {
    max-width: 100% !important;
    width: 100% !important;
    box-sizing: border-box !important;
    padding-left: 15px;
    padding-right: 15px;
    flex-wrap: wrap !important;
    gap: 10px;
    display: flex;
    flex-direction: column;
  }

  .page-resources__container {
    padding: 0 15px;
  }
  .page-resources__faq-question,
  .page-resources__faq-answer {
    padding-left: 15px;
    padding-right: 15px;
  }
  .page-resources__content-block {
    flex-direction: column;
    gap: 20px;
  }
  .page-resources__two-column--reversed {
    flex-direction: column;
  }
  .page-resources__join-cta-section .page-resources__container {
    padding: 40px 20px;
  }
}

@media (max-width: 480px) {
  .page-resources__hero-title {
    font-size: 1.8em;
  }
  .page-resources__hero-description {
    font-size: 0.9em;
  }
  .page-resources__section-title {
    font-size: 1.5em;
  }
  .page-resources__cta-button {
    padding: 12px 20px;
    font-size: 1em;
  }
}