/* style/faq.css */
:root {
  --ld789-primary: #11A84E;
  --ld789-secondary: #22C768;
  --ld789-button-gradient: linear-gradient(180deg, #2AD16F 0%, #13994A 100%);
  --ld789-card-bg: #11271B;
  --ld789-bg: #08160F;
  --ld789-text-main: #F2FFF6;
  --ld789-text-secondary: #A7D9B8;
  --ld789-border: #2E7A4E;
  --ld789-glow: #57E38D;
  --ld789-gold: #F2C14E;
  --ld789-divider: #1E3A2A;
  --ld789-deep-green: #0A4B2C;
}

.page-faq {
  font-family: 'Arial', sans-serif;
  color: var(--ld789-text-main);
  background-color: var(--ld789-bg);
  line-height: 1.6;
}

.page-faq__hero-section {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 10px 0 60px 0;
  overflow: hidden;
}

.page-faq__hero-image-wrapper {
  width: 100%;
  max-height: 700px;
  overflow: hidden;
  display: flex;
  justify-content: center;
  align-items: center;
}

.page-faq__hero-image {
  width: 100%;
  height: auto;
  display: block;
  object-fit: cover;
  min-height: 200px; /* Ensure minimum size */
}

.page-faq__hero-content {
  max-width: 900px;
  margin: 40px auto 0 auto;
  text-align: center;
  padding: 0 20px;
  z-index: 1;
}

.page-faq__main-title {
  font-size: clamp(2.5rem, 4vw, 3.5rem);
  color: var(--ld789-gold);
  font-weight: 700;
  margin-bottom: 20px;
  line-height: 1.2;
  text-shadow: 0 0 10px rgba(87, 227, 141, 0.5);
}

.page-faq__intro-text {
  font-size: 1.1rem;
  color: var(--ld789-text-secondary);
  margin-bottom: 30px;
}

.page-faq__section {
  padding: 60px 0;
  border-bottom: 1px solid var(--ld789-divider);
}

.page-faq__section:last-of-type {
  border-bottom: none;
}

.page-faq__container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
  display: flex;
  flex-direction: column;
  gap: 40px;
}

.page-faq__section-title {
  font-size: 2.5rem;
  color: var(--ld789-primary);
  text-align: center;
  margin-bottom: 40px;
  font-weight: 700;
  text-shadow: 0 0 8px rgba(34, 199, 104, 0.4);
}

.page-faq__faq-list {
  display: flex;
  flex-direction: column;
  gap: 15px;
  flex-grow: 1;
}

.page-faq__faq-item {
  background-color: var(--ld789-card-bg);
  border-radius: 10px;
  border: 1px solid var(--ld789-border);
  overflow: hidden;
  color: var(--ld789-text-main);
}

.page-faq__faq-item summary {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px 25px;
  cursor: pointer;
  font-weight: 600;
  font-size: 1.1rem;
  color: var(--ld789-text-main);
  list-style: none; /* Hide default marker */
}

.page-faq__faq-item summary::-webkit-details-marker {
  display: none;
}

.page-faq__faq-question {
  display: flex;
  justify-content: space-between;
  align-items: center;
  width: 100%;
}

.page-faq__faq-qtext {
  flex-grow: 1;
  margin-right: 15px;
}

.page-faq__faq-toggle {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--ld789-secondary);
  transition: transform 0.3s ease;
}

.page-faq__faq-item[open] .page-faq__faq-toggle {
  transform: rotate(45deg); /* Change + to X or - */
}

.page-faq__faq-answer {
  padding: 0 25px 20px 25px;
  font-size: 1rem;
  color: var(--ld789-text-secondary);
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.5s ease-out;
}

.page-faq__faq-item[open] .page-faq__faq-answer {
  max-height: 2000px; /* Sufficiently large for content */
  transition: max-height 0.5s ease-in;
}

.page-faq__faq-answer p {
  margin-bottom: 15px;
}

.page-faq__faq-answer p:last-child {
  margin-bottom: 0;
}

.page-faq__section-image {
  width: 100%;
  height: auto;
  border-radius: 10px;
  object-fit: cover;
  min-height: 200px; /* Ensure minimum size */
}

.page-faq__cta-section {
  background-color: var(--ld789-deep-green);
  padding: 80px 0;
  text-align: center;
}

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

.page-faq__cta-title {
  font-size: 2.2rem;
  color: var(--ld789-gold);
  margin-bottom: 20px;
  font-weight: 700;
}

.page-faq__cta-description {
  font-size: 1.1rem;
  color: var(--ld789-text-secondary);
  margin-bottom: 40px;
}

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

.page-faq__btn-primary,
.page-faq__btn-secondary {
  padding: 15px 30px;
  border-radius: 8px;
  text-decoration: none;
  font-weight: 600;
  font-size: 1rem;
  transition: all 0.3s ease;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  max-width: 100%;
  box-sizing: border-box;
  white-space: normal;
  word-wrap: break-word;
  text-align: center;
}

.page-faq__btn-primary {
  background: var(--ld789-button-gradient);
  color: #ffffff;
  border: 2px solid transparent;
  box-shadow: 0 4px 15px rgba(34, 199, 104, 0.4);
}

.page-faq__btn-primary:hover {
  background: linear-gradient(180deg, #13994A 0%, #2AD16F 100%);
  box-shadow: 0 6px 20px rgba(34, 199, 104, 0.6);
}

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

.page-faq__btn-secondary:hover {
  background-color: var(--ld789-secondary);
  color: #ffffff;
}

/* Responsive Styles */
@media (min-width: 769px) {
  .page-faq__container {
    flex-direction: row;
    align-items: flex-start;
  }

  .page-faq__general-questions .page-faq__faq-list,
  .page-faq__account-transactions .page-faq__faq-list,
  .page-faq__games-betting .page-faq__faq-list,
  .page-faq__technical-support .page-faq__faq-list {
    flex: 2;
  }

  .page-faq__general-questions .page-faq__section-image,
  .page-faq__account-transactions .page-faq__section-image,
  .page-faq__games-betting .page-faq__section-image,
  .page-faq__technical-support .page-faq__section-image {
    flex: 1;
    max-width: 400px;
    margin-left: 40px;
    align-self: flex-start;
    position: sticky;
    top: calc(var(--header-offset, 0px) + 20px); /* Adjust based on header height */
  }

  .page-faq__account-transactions .page-faq__container {
    flex-direction: row-reverse; /* Image on left */
  }
  .page-faq__account-transactions .page-faq__section-image {
    margin-left: 0;
    margin-right: 40px;
  }
}

@media (max-width: 768px) {
  .page-faq {
    font-size: 16px;
    line-height: 1.6;
  }

  .page-faq__hero-section {
    padding-bottom: 40px;
  }

  .page-faq__main-title {
    font-size: 2rem;
  }

  .page-faq__intro-text {
    font-size: 1rem;
  }

  .page-faq__section-title {
    font-size: 2rem;
    margin-bottom: 30px;
  }

  .page-faq__faq-item summary {
    padding: 15px 20px;
    font-size: 1rem;
  }

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

  .page-faq__section-image,
  .page-faq__hero-image {
    max-width: 100% !important;
    width: 100% !important;
    height: auto !important;
    display: block !important;
    min-width: 200px;
    min-height: 200px;
  }

  .page-faq__section,
  .page-faq__hero-section,
  .page-faq__cta-section,
  .page-faq__container {
    max-width: 100% !important;
    width: 100% !important;
    box-sizing: border-box !important;
    padding-left: 15px;
    padding-right: 15px;
    overflow-x: hidden;
  }

  .page-faq__hero-section {
    padding-top: 10px !important; /* body handles header offset */
  }

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

  .page-faq__btn-primary,
  .page-faq__btn-secondary {
    width: 100% !important;
    max-width: 100% !important;
    box-sizing: border-box !important;
    white-space: normal !important;
    word-wrap: break-word !important;
    padding-left: 15px;
    padding-right: 15px;
  }
}