.page-faq {
  font-family: 'Arial', sans-serif;
  line-height: 1.6;
  color: var(--text-main); /* Default text color, adjusted for body background */
  background-color: transparent; /* Rely on shared.css for body background */
}

/* Hero Section */
.page-faq__hero-section {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 60px 20px;
  padding-top: 10px; /* Small top padding, body handles --header-offset */
  background: linear-gradient(180deg, #113B7A 0%, #08162B 100%);
  color: var(--text-main);
  overflow: hidden;
}

.page-faq__hero-container {
  position: relative;
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  width: 100%; /* Ensure width is 100% for flex item */
}

.page-faq__hero-image {
  width: 100%;
  margin-bottom: 30px;
  max-width: 100%;
}

.page-faq__hero-image img {
  width: 100%;
  height: auto;
  max-width: 100%;
  display: block;
  border-radius: 8px;
  object-fit: cover;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.3);
  filter: none !important;
}

.page-faq__hero-content {
  position: relative;
  z-index: 2;
  text-align: center;
  width: 100%;
  max-width: 800px;
}

.page-faq__main-title {
  font-size: clamp(2.5rem, 5vw, 3.5rem); /* Use clamp for H1 size */
  font-weight: 700;
  line-height: 1.2;
  margin-bottom: 20px;
  color: var(--text-main);
  letter-spacing: -0.5px;
}

.page-faq__hero-description {
  font-size: 1.15rem;
  margin-bottom: 30px;
  color: var(--text-secondary);
  max-width: 700px;
  margin-left: auto;
  margin-right: auto;
}

.page-faq__cta-button {
  display: inline-block;
  padding: 15px 40px;
  background: linear-gradient(180deg, #2B73F6 0%, #1144A6 100%); /* Custom button color */
  color: #ffffff;
  text-decoration: none;
  border-radius: 5px;
  font-size: 18px;
  font-weight: bold;
  margin-top: 30px;
  transition: all 0.3s ease;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
  max-width: 100%; /* Button responsive */
  box-sizing: border-box;
  white-space: normal;
  word-wrap: break-word;
}

.page-faq__cta-button:hover {
  opacity: 0.9;
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.3);
}

/* General Section Styles */
.page-faq__section {
  padding: 60px 20px;
  max-width: 1200px;
  margin: 0 auto;
  color: var(--text-main);
}

.page-faq__content-area {
  background-color: var(--card-bg); /* Use card background for main content area */
  border-radius: 10px;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
  margin-top: -50px; /* Overlap with hero for visual flow */
  position: relative;
  z-index: 3;
  padding-top: 80px; /* Adjust padding for overlap */
}

.page-faq__section-title {
  font-size: 2.2rem;
  font-weight: 700;
  color: var(--text-main);
  text-align: center;
  margin-bottom: 25px;
  position: relative;
  padding-bottom: 15px;
}

.page-faq__section-title::after {
  content: '';
  position: absolute;
  left: 50%;
  bottom: 0;
  transform: translateX(-50%);
  width: 80px;
  height: 4px;
  background-color: var(--gold);
  border-radius: 2px;
}

.page-faq__section-text {
  font-size: 1.05rem;
  text-align: center;
  max-width: 800px;
  margin: 0 auto 40px auto;
  color: var(--text-secondary);
}

/* FAQ Item Styles */
details.page-faq__faq-item {
  margin-bottom: 15px;
  border-radius: 10px;
  border: 1px solid var(--border-color); /* Use border color */
  overflow: hidden;
  background: var(--card-bg); /* Use card background */
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

details.page-faq__faq-item summary.page-faq__faq-question {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 18px 25px;
  cursor: pointer;
  user-select: none;
  list-style: none;
  transition: background-color 0.3s ease;
  background-color: var(--deep-navy); /* Darker background for question */
  color: var(--text-main);
}
details.page-faq__faq-item summary.page-faq__faq-question::-webkit-details-marker {
  display: none;
}
details.page-faq__faq-item summary.page-faq__faq-question:hover {
  background: var(--primary-color); /* Hover effect using primary color */
}

.page-faq__faq-qtext {
  flex: 1;
  font-size: 1.1rem;
  font-weight: 600;
  line-height: 1.5;
  text-align: left;
  color: var(--text-main);
}

.page-faq__faq-toggle {
  font-size: 28px;
  font-weight: bold;
  color: var(--gold); /* Gold color for toggle icon */
  flex-shrink: 0;
  margin-left: 15px;
  width: 30px;
  text-align: center;
  transition: transform 0.3s ease;
}

details.page-faq__faq-item[open] .page-faq__faq-toggle {
  transform: rotate(45deg); /* Rotate for 'x' effect */
}

details.page-faq__faq-item .page-faq__faq-answer {
  padding: 20px 25px 25px;
  background: var(--card-bg); /* Answer background */
  border-top: 1px solid var(--divider); /* Divider line */
  border-radius: 0 0 10px 10px;
  color: var(--text-secondary);
}

.page-faq__faq-answer p {
  margin-bottom: 15px;
  font-size: 1rem;
}

.page-faq__faq-answer a {
  color: var(--gold); /* Links in answers */
  text-decoration: underline;
}

/* Buttons within FAQ answers */
.page-faq__btn-primary {
  display: inline-block;
  padding: 10px 25px;
  background: linear-gradient(180deg, #2B73F6 0%, #1144A6 100%);
  color: #ffffff;
  text-decoration: none;
  border-radius: 5px;
  font-size: 1rem;
  font-weight: bold;
  margin-top: 15px;
  transition: all 0.3s ease;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
  max-width: 100%;
  box-sizing: border-box;
  white-space: normal;
  word-wrap: break-word;
}

.page-faq__btn-primary:hover {
  opacity: 0.9;
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.page-faq__btn-secondary {
  display: inline-block;
  padding: 10px 25px;
  background: transparent;
  color: var(--gold);
  border: 2px solid var(--gold);
  text-decoration: none;
  border-radius: 5px;
  font-size: 1rem;
  font-weight: bold;
  margin-top: 15px;
  transition: all 0.3s ease;
  max-width: 100%;
  box-sizing: border-box;
  white-space: normal;
  word-wrap: break-word;
}

.page-faq__btn-secondary:hover {
  background: var(--gold);
  color: var(--deep-navy);
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

/* Blog Cards Section */
.page-faq__latest-news {
  background-color: var(--deep-navy); /* Dark background for blog section */
  padding: 80px 20px;
  text-align: center;
}

.page-faq__latest-news .page-faq__section-title {
  color: var(--text-main);
}

.page-faq__latest-news .page-faq__section-text {
  color: var(--text-secondary);
}

.page-faq__blog-cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 30px;
  margin-top: 50px;
  max-width: 1200px;
  margin-left: auto;
  margin-right: auto;
}

.page-faq__blog-card {
  background: var(--card-bg);
  border-radius: 10px;
  overflow: hidden;
  box-shadow: 0 5px 20px rgba(0, 0, 0, 0.2);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  text-align: left;
}

.page-faq__blog-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.3);
}

.page-faq__blog-card img {
  width: 100%;
  height: 200px;
  object-fit: cover;
  display: block;
  filter: none !important;
}

.page-faq__blog-card .page-faq__card-title {
  font-size: 1.3rem;
  font-weight: 600;
  margin: 20px 20px 10px;
  line-height: 1.4;
}

.page-faq__blog-card .page-faq__card-title a {
  color: var(--text-main);
  text-decoration: none;
  transition: color 0.3s ease;
}

.page-faq__blog-card .page-faq__card-title a:hover {
  color: var(--gold);
}

.page-faq__blog-card .page-faq__card-meta {
  font-size: 0.9rem;
  color: var(--text-secondary);
  margin: 0 20px 15px;
}

.page-faq__blog-card .page-faq__card-excerpt {
  font-size: 1rem;
  color: var(--text-secondary);
  margin: 0 20px 20px;
}

.page-faq__button-group {
  margin-top: 50px;
  text-align: center;
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
  overflow: hidden;
}

/* Responsive Styles */
@media (max-width: 1024px) {
  .page-faq__hero-description {
    font-size: 1rem;
  }
  .page-faq__section {
    padding: 50px 20px;
  }
  .page-faq__section-title {
    font-size: 2rem;
  }
  .page-faq__faq-qtext {
    font-size: 1rem;
  }
  .page-faq__blog-cards {
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  }
}

@media (max-width: 768px) {
  .page-faq__hero-section {
    padding-top: 10px !important; /* body handles header offset */
    padding-bottom: 40px;
    padding-left: 15px;
    padding-right: 15px;
  }

  .page-faq__hero-image img {
    border-radius: 4px;
  }

  .page-faq__main-title {
    font-size: clamp(2rem, 8vw, 2.8rem);
  }

  .page-faq__hero-description {
    font-size: 0.95rem;
    padding: 0 10px;
  }

  .page-faq__cta-button {
    padding: 12px 30px;
    font-size: 16px;
    max-width: 100% !important;
    width: 100% !important;
    box-sizing: border-box !important;
    white-space: normal !important;
    word-wrap: break-word !important;
    margin-left: auto;
    margin-right: auto;
  }

  .page-faq__section {
    padding: 40px 15px;
  }

  .page-faq__section-title {
    font-size: 1.8rem;
    margin-bottom: 20px;
  }

  .page-faq__section-text {
    font-size: 0.95rem;
    margin-bottom: 30px;
  }

  details.page-faq__faq-item summary.page-faq__faq-question {
    padding: 15px 18px;
  }

  .page-faq__faq-qtext {
    font-size: 0.95rem;
  }

  .page-faq__faq-toggle {
    font-size: 24px;
    width: 25px;
  }

  details.page-faq__faq-item .page-faq__faq-answer {
    padding: 15px 18px 18px;
  }

  .page-faq__faq-answer p {
    font-size: 0.9rem;
  }

  .page-faq__btn-primary,
  .page-faq__btn-secondary,
  .page-faq a[class*="button"],
  .page-faq a[class*="btn"] {
    max-width: 100% !important;
    width: 100% !important;
    box-sizing: border-box !important;
    white-space: normal !important;
    word-wrap: break-word !important;
    margin-left: auto;
    margin-right: auto;
    padding-left: 15px; /* Add padding for mobile buttons */
    padding-right: 15px; /* Add padding for mobile buttons */
  }

  .page-faq__button-group {
    max-width: 100% !important;
    width: 100% !important;
    box-sizing: border-box !important;
    padding-left: 15px;
    padding-right: 15px;
    display: flex;
    flex-direction: column;
    gap: 15px;
  }

  .page-faq__blog-cards {
    grid-template-columns: 1fr;
    gap: 20px;
    padding: 0 15px;
  }

  .page-faq__blog-card img {
    
  }

  .page-faq__blog-card .page-faq__card-title {
    font-size: 1.1rem;
    margin: 15px 15px 8px;
  }

  .page-faq__blog-card .page-faq__card-meta,
  .page-faq__blog-card .page-faq__card-excerpt {
    font-size: 0.85rem;
    margin: 0 15px 15px;
  }

  /* All images responsive */
  .page-faq img {
    max-width: 100% !important;
    width: 100% !important;
    height: auto !important;
    display: block;
  }
  
  .page-faq__section,
  .page-faq__card,
  .page-faq__container,
  .page-faq__registration-deposit,
  .page-faq__payment-withdrawal,
  .page-faq__game-rules,
  .page-faq__promotions-bonuses,
  .page-faq__security-support,
  .page-faq__responsible-gaming,
  .page-faq__latest-news {
    max-width: 100% !important;
    width: 100% !important;
    box-sizing: border-box !important;
    padding-left: 15px;
    padding-right: 15px;
  }
}

/* Color Contrast Enforcement */
/* Assuming var(--card-bg) is dark enough for --text-main to be light */
.page-faq {
  color: var(--text-main); /* #F3F8FF */
}

.page-faq__content-area,
details.page-faq__faq-item .page-faq__faq-answer,
.page-faq__blog-card {
  background: var(--card-bg); /* #10233F */
  color: var(--text-main); /* #F3F8FF */
}

details.page-faq__faq-item summary.page-faq__faq-question {
  background-color: var(--deep-navy); /* #08162B */
  color: var(--text-main); /* #F3F8FF */
}

.page-faq__section-title {
  color: var(--text-main); /* Ensure titles are visible on card-bg */
}

.page-faq__hero-section {
  background: linear-gradient(180deg, #113B7A 0%, #08162B 100%);
  color: var(--text-main);
}

.page-faq__latest-news {
  background-color: var(--deep-navy);
  color: var(--text-main);
}

.page-faq p,
.page-faq li {
  color: var(--text-secondary); /* #AFC4E8 */
}

.page-faq__cta-button,
.page-faq__btn-primary {
  color: #ffffff; /* Explicitly white for buttons */
}

.page-faq__btn-secondary {
  color: var(--gold); /* Gold text on transparent/dark background */
}
.page-faq__btn-secondary:hover {
  background: var(--gold);
  color: var(--deep-navy); /* Dark text on gold hover */
}

/* Ensure images have no filters */
.page-faq img {
  filter: none !important;
}