/* style/resources.css */

:root {
  --primary-color: #FFD700; /* Gold */
  --secondary-color: #8B0000; /* Dark Red */
  --text-light: #ffffff;
  --text-dark: #333333;
  --bg-dark: #000;
  --bg-card-dark: rgba(255, 255, 255, 0.08);
  --bg-card-light: #ffffff;
  --border-color: rgba(255, 255, 255, 0.1);
}

.page-resources {
  color: var(--text-light); /* Body background is dark, so text is light */
  background-color: transparent;
  /* Fixed header padding */
  padding-top: 120px; /* Desktop: Adjust based on actual header height */
}

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

.page-resources__section-title {
  font-size: 38px;
  font-weight: 700;
  color: var(--primary-color);
  text-align: center;
  margin-bottom: 25px;
  line-height: 1.3;
}

.page-resources__section-description {
  font-size: 18px;
  color: var(--text-light);
  text-align: center;
  margin-bottom: 40px;
  line-height: 1.6;
  max-width: 800px;
  margin-left: auto;
  margin-right: auto;
}

/* Hero Section */
.page-resources__hero-section {
  padding: 60px 0;
  background: linear-gradient(135deg, rgba(139, 0, 0, 0.8) 0%, rgba(255, 215, 0, 0.2) 100%), url('[GALLERY:bg:33win,hero,resources,abstract pattern]') no-repeat center center/cover;
  text-align: center;
  margin-bottom: 40px;
}

.page-resources__hero-container {
  max-width: 900px;
  margin: 0 auto;
  padding: 0 20px;
}

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

.page-resources__hero-description {
  font-size: 20px;
  color: var(--text-light);
  margin-bottom: 40px;
  line-height: 1.7;
}

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

.page-resources__cta-button {
  display: inline-block;
  padding: 15px 35px;
  background-color: var(--primary-color);
  color: var(--text-dark);
  text-decoration: none;
  border-radius: 8px;
  font-size: 18px;
  font-weight: bold;
  transition: all 0.3s ease;
  box-shadow: 0 4px 15px rgba(255, 215, 0, 0.4);
  border: none;
  cursor: pointer;
  text-align: center;
  white-space: normal;
  word-wrap: break-word;
}

.page-resources__cta-button:hover {
  background-color: #e6c200;
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(255, 215, 0, 0.6);
}

.page-resources__cta-button--secondary {
  background-color: var(--secondary-color);
  color: var(--text-light);
  box-shadow: 0 4px 15px rgba(139, 0, 0, 0.4);
}

.page-resources__cta-button--secondary:hover {
  background-color: #a30000;
  box-shadow: 0 6px 20px rgba(139, 0, 0, 0.6);
}

/* Guides Section */
.page-resources__guides-section {
  padding: 60px 0;
  margin-bottom: 40px;
}

.page-resources__guide-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 30px;
}

.page-resources__guide-item {
  background-color: var(--bg-card-dark);
  border-radius: 10px;
  padding: 25px;
  text-align: center;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.page-resources__guide-item:hover {
  transform: translateY(-5px);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.3);
}

.page-resources__guide-image {
  max-width: 100%;
  height: 200px; /* Fixed height for consistent look */
  object-fit: cover;
  border-radius: 8px;
  margin-bottom: 20px;
}

.page-resources__guide-item-title {
  font-size: 22px;
  font-weight: 600;
  color: var(--primary-color);
  margin-bottom: 15px;
  line-height: 1.4;
}

.page-resources__guide-item-text {
  font-size: 16px;
  color: var(--text-light);
  margin-bottom: 20px;
  line-height: 1.6;
  flex-grow: 1;
}

.page-resources__guide-item-link {
  display: inline-block;
  padding: 10px 25px;
  background-color: var(--secondary-color);
  color: var(--text-light);
  text-decoration: none;
  border-radius: 5px;
  font-size: 16px;
  font-weight: 500;
  transition: background-color 0.3s ease;
}

.page-resources__guide-item-link:hover {
  background-color: #a30000;
}

/* Games Section */
.page-resources__games-section {
  padding: 80px 0;
  margin-bottom: 40px;
}

.page-resources__dark-section {
  background-color: rgba(139, 0, 0, 0.15); /* Slightly darker background for contrast */
  border-top: 1px solid var(--border-color);
  border-bottom: 1px solid var(--border-color);
}

.page-resources__game-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 30px;
}

.page-resources__game-item {
  background-color: var(--bg-card-dark);
  border-radius: 10px;
  padding: 25px;
  text-align: center;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.page-resources__game-item:hover {
  transform: translateY(-5px);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.3);
}

.page-resources__game-image {
  max-width: 100%;
  height: 180px; /* Fixed height for consistent look */
  object-fit: cover;
  border-radius: 8px;
  margin-bottom: 20px;
}

.page-resources__game-item-title {
  font-size: 20px;
  font-weight: 600;
  color: var(--primary-color);
  margin-bottom: 10px;
  line-height: 1.3;
}

.page-resources__game-item-text {
  font-size: 15px;
  color: var(--text-light);
  margin-bottom: 15px;
  line-height: 1.6;
  flex-grow: 1;
}

.page-resources__game-item-link {
  display: inline-block;
  padding: 8px 20px;
  background-color: var(--primary-color);
  color: var(--text-dark);
  text-decoration: none;
  border-radius: 5px;
  font-size: 15px;
  font-weight: 500;
  transition: background-color 0.3s ease;
}

.page-resources__game-item-link:hover {
  background-color: #e6c200;
}

/* Promotions Section */
.page-resources__promotions-section {
  padding: 60px 0;
  margin-bottom: 40px;
}

.page-resources__promo-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 30px;
}

.page-resources__promo-item {
  background-color: var(--bg-card-dark);
  border-radius: 10px;
  padding: 25px;
  text-align: center;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.page-resources__promo-item:hover {
  transform: translateY(-5px);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.3);
}

.page-resources__promo-image {
  max-width: 100%;
  height: 200px; /* Fixed height for consistent look */
  object-fit: cover;
  border-radius: 8px;
  margin-bottom: 20px;
}

.page-resources__promo-item-title {
  font-size: 22px;
  font-weight: 600;
  color: var(--primary-color);
  margin-bottom: 15px;
  line-height: 1.4;
}

.page-resources__promo-item-text {
  font-size: 16px;
  color: var(--text-light);
  margin-bottom: 20px;
  line-height: 1.6;
  flex-grow: 1;
}

.page-resources__promo-item-link {
  display: inline-block;
  padding: 10px 25px;
  background-color: var(--secondary-color);
  color: var(--text-light);
  text-decoration: none;
  border-radius: 5px;
  font-size: 16px;
  font-weight: 500;
  transition: background-color 0.3s ease;
}

.page-resources__promo-item-link:hover {
  background-color: #a30000;
}

/* Responsible Gaming Section */
.page-resources__responsible-gaming-section {
  padding: 80px 0;
  margin-bottom: 40px;
}

.page-resources__responsible-gaming-content {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 30px;
}

.page-resources__info-block {
  background-color: var(--bg-card-dark);
  border-radius: 10px;
  padding: 30px;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
}

.page-resources__info-block-title {
  font-size: 24px;
  font-weight: 600;
  color: var(--primary-color);
  margin-bottom: 15px;
  line-height: 1.3;
}

.page-resources__info-block-text {
  font-size: 16px;
  color: var(--text-light);
  line-height: 1.7;
}

/* FAQ Section */
.page-resources__faq-section {
  padding: 60px 0;
  margin-bottom: 40px;
}

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

/* FAQ item styles */
.page-resources__faq-item {
  margin-bottom: 15px;
  border-radius: 5px;
  overflow: hidden;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

/* FAQ default state - answer hidden */
.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;
  padding: 0 15px;
  opacity: 0;
  background-color: rgba(255, 255, 255, 0.05); /* Lighter dark background for answer */
  color: var(--text-light);
}

/* FAQ expanded state - use !important and sufficiently large max-height */
.page-resources__faq-item.active .page-resources__faq-answer {
  max-height: 2000px !important; /* Use !important to ensure priority, value large enough to accommodate any content */
  padding: 20px 15px !important;
  opacity: 1;
  background-color: rgba(255, 255, 255, 0.05); /* Lighter dark background for answer */
}

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

.page-resources__faq-question:hover {
  background-color: rgba(255, 255, 255, 0.12);
  border-color: rgba(255, 255, 255, 0.2);
}

.page-resources__faq-question:active {
  background-color: rgba(255, 255, 255, 0.15);
}

/* Question title style */
.page-resources__faq-question h3 {
  margin: 0;
  padding: 0;
  flex: 1;
  font-size: 18px;
  font-weight: 600;
  line-height: 1.5;
  color: var(--primary-color);
  pointer-events: none; /* Prevent h3 tag from blocking click events */
}

/* Toggle icon */
.page-resources__faq-toggle {
  font-size: 24px;
  font-weight: bold;
  line-height: 1;
  color: var(--text-light);
  transition: transform 0.3s ease, color 0.3s ease;
  flex-shrink: 0;
  margin-left: 15px;
  pointer-events: none; /* Prevent icon from blocking click events */
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
}

.page-resources__faq-item.active .page-resources__faq-toggle {
  color: var(--primary-color);
  transform: rotate(45deg); /* Optional: rotate for 'x' effect */
}

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

.page-resources__contact-cta-content {
  max-width: 800px;
  margin: 0 auto;
}

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

@media (max-width: 768px) {
  .page-resources {
    padding-top: 100px !important; /* Mobile: Adjust based on actual mobile header height */
    font-size: 16px;
    line-height: 1.6;
  }

  .page-resources__container {
    padding: 0 15px;
    max-width: 100% !important;
    width: 100% !important;
    box-sizing: border-box !important;
    overflow: hidden !important;
  }

  .page-resources__hero-section {
    padding: 40px 0;
    margin-bottom: 30px;
  }

  .page-resources__main-title {
    font-size: 36px;
    margin-bottom: 15px;
  }

  .page-resources__hero-description {
    font-size: 17px;
    margin-bottom: 30px;
  }

  .page-resources__cta-buttons {
    flex-direction: column;
    gap: 15px;
    padding: 0 15px;
    max-width: 100% !important;
    width: 100% !important;
    box-sizing: border-box !important;
  }

  .page-resources__cta-button {
    font-size: 16px;
    padding: 12px 25px;
    max-width: 100% !important;
    width: 100% !important;
    box-sizing: border-box !important;
  }

  .page-resources__section-title {
    font-size: 28px;
    margin-bottom: 20px;
  }

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

  .page-resources__guides-section,
  .page-resources__games-section,
  .page-resources__promotions-section,
  .page-resources__responsible-gaming-section,
  .page-resources__faq-section,
  .page-resources__contact-cta-section {
    padding: 40px 0;
    margin-bottom: 30px;
  }

  .page-resources__guide-list,
  .page-resources__game-list,
  .page-resources__promo-list,
  .page-resources__responsible-gaming-content {
    grid-template-columns: 1fr;
    gap: 20px;
  }

  .page-resources__guide-item,
  .page-resources__game-item,
  .page-resources__promo-item,
  .page-resources__info-block {
    padding: 20px;
  }

  .page-resources__guide-image,
  .page-resources__game-image,
  .page-resources__promo-image {
    height: auto;
    max-height: 180px;
    object-fit: contain; /* Ensure full image visibility */
  }

  .page-resources__guide-item-title,
  .page-resources__promo-item-title {
    font-size: 20px;
  }

  .page-resources__game-item-title {
    font-size: 18px;
  }

  .page-resources__guide-item-text,
  .page-resources__game-item-text,
  .page-resources__promo-item-text,
  .page-resources__info-block-text {
    font-size: 15px;
  }

  .page-resources__guide-item-link,
  .page-resources__game-item-link,
  .page-resources__promo-item-link {
    font-size: 15px;
    padding: 10px 20px;
  }

  .page-resources__info-block-title {
    font-size: 20px;
  }

  .page-resources__faq-question {
    padding: 15px;
    flex-wrap: wrap;
  }
  
  .page-resources__faq-question h3 {
    font-size: 16px;
    margin-bottom: 0;
    width: calc(100% - 40px);
  }
  
  .page-resources__faq-toggle {
    margin-left: 10px;
    width: 24px;
    height: 24px;
    font-size: 20px;
  }
  
  .page-resources__faq-answer {
    padding: 0 15px;
  }
  
  .page-resources__faq-item.active .page-resources__faq-answer {
    padding: 15px !important;
  }

  .page-resources__faq-list {
    padding: 0 15px;
  }

  .page-resources__contact-cta-content {
    padding: 0 15px;
  }
}

/* Ensure all images are responsive */
.page-resources img {
  max-width: 100%;
  height: auto;
  display: block;
}

@media (max-width: 768px) {
  .page-resources img {
    max-width: 100% !important;
    width: 100% !important;
    height: auto !important;
  }
  
  .page-resources__section,
  .page-resources__card,
  .page-resources__container,
  .page-resources__hero-section,
  .page-resources__guides-section,
  .page-resources__games-section,
  .page-resources__promotions-section,
  .page-resources__responsible-gaming-section,
  .page-resources__faq-section,
  .page-resources__contact-cta-section,
  .page-resources__guide-item,
  .page-resources__game-item,
  .page-resources__promo-item,
  .page-resources__info-block {
    max-width: 100% !important;
    width: 100% !important;
    box-sizing: border-box !important;
    overflow: hidden !important;
  }
}