/* style/resources.css */

/* Root variables (if not defined in shared.css, define here for page-specific use) */
:root {
  --primary-color: #FFD700; /* Gold */
  --secondary-color: #DC143C; /* Crimson */
  --dark-bg-1: #1a1a1a; /* Dark background from shared.css */
  --dark-bg-2: #2a2a2a;
  --text-light: #ffffff;
  --text-dark: #333333;
  --card-bg-dark: rgba(255, 255, 255, 0.1);
  --card-bg-light: #ffffff;
  --border-color: #e0e0e0;
}

.page-resources {
  font-family: 'Arial', sans-serif;
  line-height: 1.6;
  color: var(--text-light); /* Default text color for dark body background */
  background-color: var(--dark-bg-1); /* Ensure page content background matches body if needed */
  padding-top: 120px; /* Adjust for fixed header on desktop */
}

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

/* Sections */
.page-resources__section {
  padding: 60px 0;
  margin-bottom: 20px;
}

.page-resources__dark-bg {
  background-color: var(--dark-bg-1);
  color: var(--text-light);
}

.page-resources__light-bg {
  background-color: var(--card-bg-light);
  color: var(--text-dark);
}

/* Hero Section */
.page-resources__hero-section {
  padding-top: 80px; /* Additional padding for hero if needed, on top of main padding */
  padding-bottom: 80px;
  text-align: center;
  background-image: url('[GALLERY:bg:sunwin20, Vietnam betting, online betting, resources hero background]');
  background-size: cover;
  background-position: center;
  position: relative;
  z-index: 1;
}

.page-resources__hero-section::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.6);
  z-index: -1;
}

.page-resources__main-title {
  font-size: 3.2em;
  color: var(--primary-color);
  margin-bottom: 20px;
  text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.7);
  line-height: 1.2;
}

.page-resources__description {
  font-size: 1.2em;
  margin-bottom: 40px;
  max-width: 800px;
  margin-left: auto;
  margin-right: auto;
  color: var(--text-light);
}

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

.page-resources__cta-button {
  display: inline-block;
  padding: 15px 35px;
  border-radius: 8px;
  font-size: 1.1em;
  font-weight: bold;
  text-decoration: none;
  transition: all 0.3s ease;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
  text-align: center;
  max-width: 100%; /* Ensure responsiveness */
  box-sizing: border-box;
  white-space: normal;
  word-wrap: break-word;
}

.page-resources__btn-primary {
  background-color: var(--primary-color);
  color: var(--text-dark); /* Gold background, dark text for contrast */
  border: 2px solid var(--primary-color);
}

.page-resources__btn-primary:hover {
  background-color: #e6c200; /* Manual darken */
  transform: translateY(-2px);
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.3);
}

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

.page-resources__btn-secondary:hover {
  background-color: var(--primary-color);
  color: var(--text-dark);
  transform: translateY(-2px);
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.3);
}

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

.page-resources__btn-secondary--light:hover {
  background-color: var(--text-light);
  color: var(--dark-bg-1);
}

.page-resources__btn-link {
  display: inline-block;
  margin-top: 15px;
  color: var(--secondary-color);
  text-decoration: none;
  font-weight: bold;
  transition: color 0.3s ease;
}

.page-resources__btn-link:hover {
  color: #a71131; /* Manual darken */
}

.page-resources__btn-link--light {
  color: var(--primary-color);
}

.page-resources__btn-link--light:hover {
  color: var(--text-light);
}

/* Section Titles */
.page-resources__section-title {
  font-size: 2.5em;
  text-align: center;
  margin-bottom: 20px;
  color: var(--secondary-color);
}

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

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

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

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

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

.page-resources__card:hover, .page-resources__article-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.2);
}

.page-resources__card--dark {
  background-color: var(--card-bg-dark);
  color: var(--text-light);
  border: 1px solid rgba(255, 255, 255, 0.2);
}

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

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

.page-resources__card-title, .page-resources__article-title {
  font-size: 1.4em;
  margin-bottom: 15px;
  line-height: 1.4;
}

.page-resources__card-title a, .page-resources__article-title a {
  color: var(--secondary-color);
  text-decoration: none;
  transition: color 0.3s ease;
}

.page-resources__card--dark .page-resources__card-title a, .page-resources__card--dark .page-resources__article-title a {
  color: var(--primary-color);
}

.page-resources__card-title a:hover, .page-resources__article-title a:hover {
  color: var(--primary-color);
}

.page-resources__card--dark .page-resources__card-title a:hover, .page-resources__card--dark .page-resources__article-title a:hover {
  color: var(--text-light);
}

.page-resources__card-text, .page-resources__article-excerpt {
  font-size: 0.95em;
  color: var(--text-dark);
  margin-bottom: 20px;
  flex-grow: 1;
}

.page-resources__card--dark .page-resources__card-text, .page-resources__card--dark .page-resources__article-excerpt {
  color: #cccccc;
}

.page-resources__article-date {
  font-size: 0.85em;
  color: #888;
  margin-top: auto;
}

/* Promotion Content */
.page-resources__promo-content {
  display: flex;
  gap: 40px;
  align-items: center;
}

.page-resources__promo-text {
  flex: 2;
}

.page-resources__promo-image-wrapper {
  flex: 1;
  min-width: 300px;
}

.page-resources__promo-image {
  width: 100%;
  height: auto;
  border-radius: 10px;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

.page-resources__promo-subtitle {
  font-size: 1.8em;
  color: var(--secondary-color);
  margin-top: 30px;
  margin-bottom: 15px;
}

.page-resources__promo-description {
  font-size: 1em;
  color: var(--text-dark);
  margin-bottom: 20px;
}

/* Content Block */
.page-resources__content-block {
  max-width: 900px;
  margin: 0 auto;
}

.page-resources__content-subtitle {
  font-size: 1.8em;
  color: var(--secondary-color);
  margin-top: 30px;
  margin-bottom: 15px;
}

.page-resources__content-subtitle--light {
  color: var(--primary-color);
}

.page-resources__content-text {
  font-size: 1em;
  color: var(--text-dark);
  margin-bottom: 20px;
}

.page-resources__content-text--light {
  color: var(--text-light);
}

/* FAQ Section */
.page-resources__faq-list {
  max-width: 900px;
  margin: 0 auto;
}

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

.page-resources__faq-question {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 18px 25px;
  background: var(--card-bg-light);
  border: 1px solid var(--border-color);
  border-radius: 8px;
  cursor: pointer;
  user-select: none;
  transition: background-color 0.3s ease, border-color 0.3s ease;
  position: relative;
  color: var(--text-dark);
}

.page-resources__faq-question:hover {
  background: #f5f5f5;
  border-color: #d0d0d0;
}

.page-resources__faq-question h3 {
  margin: 0;
  padding: 0;
  flex: 1;
  font-size: 1.1em;
  font-weight: 600;
  line-height: 1.5;
  pointer-events: none;
  color: var(--secondary-color);
}

.page-resources__faq-toggle {
  font-size: 24px;
  font-weight: bold;
  line-height: 1;
  color: #666;
  transition: transform 0.3s ease, color 0.3s ease;
  flex-shrink: 0;
  margin-left: 15px;
  pointer-events: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
}

.page-resources__faq-item.active .page-resources__faq-toggle {
  transform: rotate(45deg); /* Change to X or rotate */
  color: var(--primary-color);
}

.page-resources__faq-answer {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.4s cubic-bezier(0.4, 0, 0.2, 1), padding 0.4s ease, opacity 0.4s ease;
  padding: 0 25px;
  opacity: 0;
  background: #f9f9f9;
  color: var(--text-dark);
  border-top: none;
  border-left: 1px solid var(--border-color);
  border-right: 1px solid var(--border-color);
  border-bottom: 1px solid var(--border-color);
  border-radius: 0 0 8px 8px;
}

.page-resources__faq-answer p {
  margin: 0;
  padding: 0;
  font-size: 0.95em;
}

.page-resources__faq-item.active .page-resources__faq-answer {
  max-height: 2000px !important; /* Sufficiently large to contain content */
  padding: 20px 25px !important;
  opacity: 1;
}

/* Contact Section */
.page-resources__contact-section {
  text-align: center;
  padding-bottom: 80px;
}

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

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

  .page-resources__promo-content {
    flex-direction: column;
    gap: 30px;
  }

  .page-resources__promo-text, .page-resources__promo-image-wrapper {
    flex: none;
    width: 100%;
  }
}

@media (max-width: 768px) {
  .page-resources {
    padding-top: 100px !important; /* Adjust for fixed header on mobile */
    font-size: 15px;
  }

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

  .page-resources__hero-section {
    padding-top: 60px;
    padding-bottom: 60px;
  }

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

  .page-resources__description {
    font-size: 1em;
  }

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

  .page-resources__cta-button {
    width: 100% !important;
    max-width: 100% !important;
    padding: 12px 20px;
    font-size: 1em;
  }

  .page-resources__section {
    padding: 40px 0;
  }

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

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

  .page-resources__card-grid, .page-resources__article-grid {
    grid-template-columns: 1fr;
    gap: 25px;
  }

  .page-resources__card, .page-resources__article-card {
    max-width: 100% !important;
    width: 100% !important;
    box-sizing: border-box !important;
  }

  .page-resources__card-image, .page-resources__article-image {
    height: 180px;
    max-width: 100% !important;
    width: 100% !important;
    box-sizing: border-box !important;
  }

  .page-resources__card-content, .page-resources__article-content {
    padding: 20px;
  }

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

  .page-resources__promo-subtitle, .page-resources__content-subtitle {
    font-size: 1.5em;
  }

  .page-resources__faq-question {
    padding: 15px 20px;
  }

  .page-resources__faq-question h3 {
    font-size: 1em;
  }

  .page-resources__faq-toggle {
    font-size: 20px;
    width: 24px;
    height: 24px;
  }

  .page-resources__faq-answer {
    padding: 0 20px;
  }

  .page-resources__faq-item.active .page-resources__faq-answer {
    padding: 15px 20px !important;
  }

  /* Image and Video responsive rules, ensuring no overflow */
  .page-resources img, .page-resources video {
    max-width: 100% !important;
    height: auto !important;
    width: 100% !important;
    display: block !important;
    box-sizing: border-box !important;
  }

  .page-resources__section,
  .page-resources__card,
  .page-resources__container,
  .page-resources__hero-section,
  .page-resources__promo-content,
  .page-resources__promo-image-wrapper,
  .page-resources__content-block,
  .page-resources__faq-list,
  .page-resources__faq-item {
    max-width: 100% !important;
    width: 100% !important;
    box-sizing: border-box !important;
    padding-left: 0;
    padding-right: 0;
    overflow: hidden !important;
  }
  
  .page-resources__hero-section .page-resources__container,
  .page-resources__section .page-resources__container,
  .page-resources__contact-section .page-resources__container {
    padding-left: 15px;
    padding-right: 15px;
  }

  .page-resources__card-grid, .page-resources__article-grid {
    padding-left: 15px;
    padding-right: 15px;
  }
}