/* style/terms-conditions.css */

/* --- General Styles --- */
.page-terms-conditions {
  font-family: Arial, sans-serif;
  line-height: 1.6;
  color: #ffffff; /* Default text color for dark body background */
  background-color: transparent; /* Body background is handled by shared.css */
  padding-top: var(--header-offset, 120px); /* Ensure content is below fixed header */
}

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

.page-terms-conditions__section-title {
  font-size: 2.5em;
  color: #E0B75F; /* Auxiliary color for main titles */
  text-align: center;
  margin-bottom: 40px;
  padding-top: 20px;
}

.page-terms-conditions__article-heading {
  font-size: 1.8em;
  color: #E0B75F; /* Auxiliary color for sub-headings */
  margin-top: 30px;
  margin-bottom: 15px;
}

.page-terms-conditions__paragraph {
  margin-bottom: 15px;
  color: #f0f0f0; /* Slightly off-white for readability on dark background */
}

.page-terms-conditions a {
  color: #E0B75F; /* Link color */
  text-decoration: none;
  transition: color 0.3s ease;
}

.page-terms-conditions a:hover {
  color: #ffffff;
  text-decoration: underline;
}

/* --- Buttons --- */
.page-terms-conditions__btn-primary,
.page-terms-conditions__btn-secondary {
  display: inline-block;
  padding: 12px 25px;
  border-radius: 5px;
  font-weight: bold;
  text-align: center;
  text-decoration: none;
  transition: background-color 0.3s ease, color 0.3s ease, border-color 0.3s ease;
  cursor: pointer;
  max-width: 100%; /* Ensure button responsiveness */
  box-sizing: border-box; /* Include padding and border in element's total width and height */
  white-space: normal; /* Allow text to wrap */
  word-wrap: break-word; /* Break long words */
}

.page-terms-conditions__btn-primary {
  background-color: #E0B75F; /* Auxiliary color for primary action */
  color: #0A1931; /* Dark text for light background */
  border: 2px solid #E0B75F;
}

.page-terms-conditions__btn-primary:hover {
  background-color: #f5c76e;
  border-color: #f5c76e;
}

.page-terms-conditions__btn-secondary {
  background-color: transparent;
  color: #E0B75F; /* Auxiliary color for secondary action */
  border: 2px solid #E0B75F;
}

.page-terms-conditions__btn-secondary:hover {
  background-color: #E0B75F;
  color: #0A1931;
}

.page-terms-conditions__button-group {
  display: flex;
  gap: 20px;
  justify-content: center;
  margin-top: 30px;
  width: 100%; /* Ensure button group responsiveness */
  max-width: 100%;
  box-sizing: border-box;
  overflow: hidden;
}

/* --- Hero Section --- */
.page-terms-conditions__hero-section {
  background: linear-gradient(rgba(0, 0, 0, 0.7), rgba(0, 0, 0, 0.7)), url('[GALLERY:hero_main:1920x1080:terms,conditions,legal,trust,security,online_gambling,ku_casino_nha_cai]') no-repeat center center/cover;
  padding: 100px 20px;
  text-align: center;
  color: #ffffff;
}

.page-terms-conditions__hero-title {
  font-size: 3.5em;
  margin-bottom: 20px;
  color: #E0B75F;
}

.page-terms-conditions__hero-description {
  font-size: 1.2em;
  margin-bottom: 30px;
  max-width: 800px;
  margin-left: auto;
  margin-right: auto;
}

/* --- Content Area --- */
.page-terms-conditions__content-area {
  padding: 60px 20px;
  background-color: #0A1931; /* Main brand color as background for content */
  color: #ffffff;
}

.page-terms-conditions__dark-bg {
  color: #ffffff;
  background-color: #0A1931;
}

.page-terms-conditions__image {
  max-width: 100%;
  height: auto;
  display: block;
  margin: 30px auto;
  border-radius: 8px;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
  filter: none; /* Prohibit any filter effects */
}

/* --- Call to Action Section --- */
.page-terms-conditions__cta-section {
  background-color: #0A1931; /* Main brand color */
  padding: 80px 20px;
  text-align: center;
  color: #ffffff;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.page-terms-conditions__cta-title {
  font-size: 2.8em;
  color: #E0B75F;
  margin-bottom: 20px;
}

.page-terms-conditions__cta-description {
  font-size: 1.1em;
  max-width: 700px;
  margin: 0 auto 40px auto;
}

/* --- FAQ Section --- */
.page-terms-conditions__faq-list {
  margin-top: 40px;
}

.page-terms-conditions__faq-item {
  background-color: rgba(255, 255, 255, 0.05); /* Slightly lighter background for FAQ items */
  border-radius: 8px;
  margin-bottom: 15px;
  overflow: hidden;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
}

.page-terms-conditions__faq-question {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 18px 25px;
  font-size: 1.2em;
  font-weight: bold;
  color: #E0B75F;
  cursor: pointer;
  background-color: rgba(255, 255, 255, 0.08);
  transition: background-color 0.3s ease;
}

.page-terms-conditions__faq-question:hover {
  background-color: rgba(255, 255, 255, 0.12);
}

.page-terms-conditions__faq-question-text {
  flex-grow: 1;
  color: #E0B75F; /* Ensure question text is visible */
}

.page-terms-conditions__faq-toggle {
  font-size: 1.5em;
  line-height: 1;
  margin-left: 15px;
  color: #E0B75F;
  transition: transform 0.3s ease;
}

.page-terms-conditions__faq-item.active .page-terms-conditions__faq-toggle {
  transform: rotate(45deg); /* Change to X or rotate for active state */
}

.page-terms-conditions__faq-answer {
  max-height: 0;
  overflow: hidden;
  padding: 0 25px;
  transition: max-height 0.3s ease, padding 0.3s ease;
  color: #f0f0f0; /* Answer text color */
}

.page-terms-conditions__faq-item.active .page-terms-conditions__faq-answer {
  max-height: 1000px !important; /* Sufficient height for content, !important for override */
  padding: 15px 25px;
}

/* --- Responsive Design --- */
@media (max-width: 1024px) {
  .page-terms-conditions__hero-title {
    font-size: 3em;
  }
  .page-terms-conditions__section-title {
    font-size: 2em;
  }
  .page-terms-conditions__cta-title {
    font-size: 2.2em;
  }
}

@media (max-width: 768px) {
  .page-terms-conditions {
    font-size: 16px;
    line-height: 1.6;
    padding-top: var(--header-offset, 120px) !important; /* Ensure mobile header offset */
  }

  .page-terms-conditions__hero-section {
    padding: 80px 15px;
  }

  .page-terms-conditions__hero-title {
    font-size: 2.5em;
  }

  .page-terms-conditions__hero-description {
    font-size: 1em;
  }

  .page-terms-conditions__content-area,
  .page-terms-conditions__cta-section {
    padding: 40px 15px;
  }

  .page-terms-conditions__section-title {
    font-size: 1.8em;
    margin-bottom: 30px;
  }

  .page-terms-conditions__article-heading {
    font-size: 1.5em;
    margin-top: 25px;
  }

  /* Ensure all images are responsive and do not overflow */
  .page-terms-conditions img {
    max-width: 100% !important;
    width: 100% !important;
    height: auto !important;
    display: block !important;
  }

  /* Button responsiveness */
  .page-terms-conditions__btn-primary,
  .page-terms-conditions__btn-secondary {
    max-width: 100% !important;
    width: 100% !important;
    box-sizing: border-box !important;
    white-space: normal !important;
    word-wrap: break-word !important;
    padding: 12px 20px;
  }

  .page-terms-conditions__button-group {
    flex-direction: column;
    gap: 15px;
    padding: 0 15px; /* Add padding to button group container */
    max-width: 100% !important;
    width: 100% !important;
    box-sizing: border-box !important;
    overflow: hidden !important; /* Prevent overflow */
  }

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

  .page-terms-conditions__cta-description {
    font-size: 1em;
  }

  /* FAQ responsiveness */
  .page-terms-conditions__faq-question {
    padding: 15px 20px;
    font-size: 1.1em;
  }

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

  .page-terms-conditions__faq-item.active .page-terms-conditions__faq-answer {
    padding: 15px 20px;
  }

  /* Ensure all content containers are responsive */
  .page-terms-conditions__container,
  .page-terms-conditions__section,
  .page-terms-conditions__article,
  .page-terms-conditions__faq-list,
  .page-terms-conditions__faq-item {
    max-width: 100% !important;
    width: 100% !important;
    box-sizing: border-box !important;
    /* Inner elements should not have horizontal padding to avoid double padding */
    padding-left: 0;
    padding-right: 0;
  }
  
  .page-terms-conditions__content-area .page-terms-conditions__container {
    padding-left: 15px;
    padding-right: 15px;
  }
}