/* style/resources.css */

/* Variables for colors */
:root {
  --primary-color: #FF4500;
  --secondary-color: #1E90FF;
  --text-dark: #333333;
  --text-light: #ffffff;
  --background-light: #f8f8f8;
  --card-background: #ffffff;
  --border-color: #e0e0e0;
  --shadow-color: rgba(0, 0, 0, 0.1);
}

.page-resources {
  color: var(--text-dark);
  background: var(--background-light); /* Light background for main content area */
}

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

/* Fixed navigation bar spacing */
.page-resources__intro-section,
.page-resources__game-service-section,
.page-resources__promotions-section,
.page-resources__blog-section,
.page-resources__faq-section {
  padding-top: 80px; /* Default padding for sections */
  padding-bottom: 60px;
}

/* Adjust padding-top for the very first section to avoid overlap with fixed header */
.page-resources__intro-section {
  padding-top: 120px; /* Desktop: Adjust based on actual header height */
}

.page-resources__main-title {
  font-size: 38px;
  font-weight: bold;
  color: var(--primary-color);
  text-align: center;
  margin-bottom: 30px;
  line-height: 1.2;
}

.page-resources__intro-text,
.page-resources__section-description {
  font-size: 17px;
  line-height: 1.7;
  text-align: center;
  margin-bottom: 40px;
  color: var(--text-dark);
}

.page-resources__section-heading {
  font-size: 32px;
  font-weight: bold;
  color: var(--text-dark);
  text-align: center;
  margin-top: 60px;
  margin-bottom: 40px;
}

.page-resources__cta-button {
  display: inline-block;
  padding: 14px 30px;
  background: var(--primary-color);
  color: var(--text-light);
  text-decoration: none;
  border-radius: 8px;
  font-size: 17px;
  font-weight: bold;
  transition: all 0.3s ease;
  text-align: center;
  border: none;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.page-resources__cta-button:hover {
  background: var(--secondary-color);
  transform: translateY(-2px);
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.2);
}

/* Intro Card */
.page-resources__intro-card {
  display: flex;
  align-items: center;
  background: var(--card-background);
  border-radius: 12px;
  box-shadow: 0 5px 20px var(--shadow-color);
  margin-bottom: 60px;
  overflow: hidden;
}

.page-resources__intro-image {
  width: 50%;
  height: auto;
  object-fit: cover;
  display: block;
}

.page-resources__intro-content {
  width: 50%;
  padding: 40px;
}

.page-resources__intro-subtitle {
  font-size: 26px;
  font-weight: bold;
  color: var(--primary-color);
  margin-bottom: 20px;
}

.page-resources__intro-content p {
  font-size: 16px;
  line-height: 1.7;
  margin-bottom: 20px;
  color: var(--text-dark);
  text-align: left;
}

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

.page-resources__criteria-item {
  background: var(--card-background);
  border-radius: 10px;
  box-shadow: 0 3px 10px rgba(0, 0, 0, 0.08);
  padding: 30px;
  text-align: center;
  transition: transform 0.3s ease;
}

.page-resources__criteria-item:hover {
  transform: translateY(-5px);
}

.page-resources__criteria-item h3 {
  font-size: 22px;
  font-weight: bold;
  color: var(--primary-color);
  margin-bottom: 15px;
}

.page-resources__criteria-item p {
  font-size: 15px;
  line-height: 1.6;
  color: var(--text-dark);
  text-align: center;
}

/* Game Type Cards */
.page-resources__game-type-card {
  display: flex;
  align-items: center;
  background: var(--card-background);
  border-radius: 12px;
  box-shadow: 0 5px 20px var(--shadow-color);
  margin-bottom: 40px;
  overflow: hidden;
}

.page-resources__game-type-card--reversed {
  flex-direction: row-reverse;
}

.page-resources__game-type-image {
  width: 50%;
  height: auto;
  object-fit: cover;
  display: block;
}

.page-resources__game-type-content {
  width: 50%;
  padding: 40px;
}

.page-resources__game-type-content h3 {
  font-size: 28px;
  font-weight: bold;
  color: var(--primary-color);
  margin-bottom: 20px;
}

.page-resources__game-type-content p {
  font-size: 16px;
  line-height: 1.7;
  margin-bottom: 25px;
  color: var(--text-dark);
  text-align: left;
}

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

.page-resources__promotion-card {
  background: var(--card-background);
  border-radius: 10px;
  box-shadow: 0 3px 10px rgba(0, 0, 0, 0.08);
  padding: 30px;
  text-align: center;
  transition: transform 0.3s ease;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.page-resources__promotion-card:hover {
  transform: translateY(-5px);
}

.page-resources__promotion-card h3 {
  font-size: 22px;
  font-weight: bold;
  color: var(--primary-color);
  margin-bottom: 15px;
}

.page-resources__promotion-card p {
  font-size: 15px;
  line-height: 1.6;
  color: var(--text-dark);
  margin-bottom: 20px;
  flex-grow: 1;
  text-align: center;
}

.page-resources__promotion-card p a {
  color: var(--secondary-color);
  font-weight: bold;
  text-decoration: none;
}

.page-resources__promotion-card p a:hover {
  text-decoration: underline;
}

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

.page-resources__blog-card {
  background: var(--card-background);
  border-radius: 10px;
  box-shadow: 0 3px 10px rgba(0, 0, 0, 0.08);
  overflow: hidden;
  transition: transform 0.3s ease;
  display: flex;
  flex-direction: column;
}

.page-resources__blog-card:hover {
  transform: translateY(-5px);
}

.page-resources__blog-image {
  width: 100%;
  height: 200px; /* Fixed height for consistency */
  object-fit: cover;
  display: block;
}

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

.page-resources__blog-content h3 {
  font-size: 20px;
  font-weight: bold;
  margin-bottom: 10px;
}

.page-resources__blog-content h3 a {
  color: var(--text-dark);
  text-decoration: none;
  transition: color 0.3s ease;
}

.page-resources__blog-content h3 a:hover {
  color: var(--primary-color);
}

.page-resources__blog-content p {
  font-size: 15px;
  line-height: 1.6;
  color: #666;
  margin-bottom: 15px;
  flex-grow: 1;
  text-align: left;
}

.page-resources__blog-date {
  font-size: 14px;
  color: #999;
  display: block;
  text-align: right;
}

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

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

.page-resources__faq-item {
  margin-bottom: 15px;
  border-radius: 5px;
  overflow: 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, opacity 0.4s ease;
  padding: 0 15px;
  opacity: 0;
}

.page-resources__faq-item.active .page-resources__faq-answer {
  max-height: 2000px !important;
  padding: 20px 15px !important;
  opacity: 1;
  background: #f9f9f9;
  border-radius: 0 0 5px 5px;
}

.page-resources__faq-question {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 18px 20px;
  background: var(--card-background);
  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: #f5f5f5;
  border-color: #d0d0d0;
}

.page-resources__faq-question:active {
  background: #eeeeee;
}

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

.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 {
  color: var(--primary-color);
  transform: rotate(45deg); /* Change '+' to 'x' or similar effect */
}

/* Responsive Design */
@media (max-width: 992px) {
  .page-resources__intro-card {
    flex-direction: column;
  }
  
  .page-resources__intro-image,
  .page-resources__intro-content {
    width: 100%;
  }

  .page-resources__game-type-card,
  .page-resources__game-type-card--reversed {
    flex-direction: column;
  }

  .page-resources__game-type-image,
  .page-resources__game-type-content {
    width: 100%;
  }
}

@media (max-width: 768px) {
  .page-resources__intro-section {
    padding-top: 100px !important; /* Mobile: Adjust for fixed header */
    padding-bottom: 40px;
  }

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

  .page-resources__intro-text,
  .page-resources__section-description {
    font-size: 15px;
    margin-bottom: 30px;
  }

  .page-resources__section-heading {
    font-size: 24px;
    margin-top: 40px;
    margin-bottom: 30px;
  }

  .page-resources__cta-button {
    padding: 12px 25px;
    font-size: 15px;
  }

  .page-resources__intro-content,
  .page-resources__game-type-content {
    padding: 30px 20px;
  }

  .page-resources__intro-subtitle {
    font-size: 22px;
  }

  .page-resources__intro-content p,
  .page-resources__game-type-content p {
    font-size: 15px;
  }

  .page-resources__criteria-grid,
  .page-resources__promotion-grid,
  .page-resources__blog-grid {
    gap: 20px;
  }

  .page-resources__criteria-item,
  .page-resources__promotion-card,
  .page-resources__blog-card {
    padding: 20px;
  }

  .page-resources__criteria-item h3,
  .page-resources__promotion-card h3 {
    font-size: 18px;
  }

  .page-resources__criteria-item p,
  .page-resources__promotion-card p,
  .page-resources__blog-content p {
    font-size: 14px;
  }

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

  .page-resources__blog-content h3 {
    font-size: 17px;
  }

  .page-resources__faq-question {
    padding: 15px;
    flex-wrap: wrap;
  }
  
  .page-resources__faq-question h3 {
    font-size: 15px;
    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;
  }

  /* Mobile image adaptation - IMPORTANT */
  .page-resources img {
    max-width: 100% !important;
    width: 100% !important;
    height: auto !important;
  }
  
  .page-resources__section,
  .page-resources__card,
  .page-resources__container,
  .page-resources__intro-card,
  .page-resources__game-type-card,
  .page-resources__promotion-card,
  .page-resources__blog-card,
  .page-resources__criteria-item {
    max-width: 100% !important;
    width: 100% !important;
    box-sizing: border-box !important;
    padding-left: 15px;
    padding-right: 15px;
  }
  .page-resources__intro-card, .page-resources__game-type-card {
    padding: 0;
  }
  .page-resources__intro-image, .page-resources__game-type-image {
    border-radius: 12px 12px 0 0;
  }
  .page-resources__intro-content, .page-resources__game-type-content {
    border-radius: 0 0 12px 12px;
  }
}