/* style/terms-conditions.css */

/* Base Styles & Page-specific Reset */
.page-terms-conditions {
  font-family: Arial, sans-serif;
  line-height: 1.6;
  color: #ffffff; /* Default text color for dark body background */
  background-color: #121212; /* Inherited from body or set explicitly for consistency */
}

.page-terms-conditions a {
  color: #017439; /* Brand color for links */
  text-decoration: none;
}

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

/* Hero Section */
.page-terms-conditions__hero-section {
  position: relative;
  padding: 80px 20px; /* Base padding */
  background-color: #017439; /* Main brand color */
  color: #ffffff;
  text-align: center;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 300px;
  padding-top: var(--header-offset, 120px); /* Ensure content is not hidden by fixed header */
}

.page-terms-conditions__main-title {
  font-size: 2.8em;
  margin-bottom: 20px;
  color: #FFFF00; /* Custom font color for titles */
  text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
}

.page-terms-conditions__intro-text {
  font-size: 1.1em;
  max-width: 800px;
  margin: 0 auto;
}

/* Content Area */
.page-terms-conditions__content-area {
  max-width: 1200px;
  margin: 0 auto;
  padding: 40px 20px;
  background-color: #ffffff; /* Light background for main content */
  color: #333333; /* Dark text for light background */
  border-radius: 8px;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
  display: flex;
  gap: 30px;
}

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

.page-terms-conditions__article {
  flex-grow: 1;
}

.page-terms-conditions__section-title {
  font-size: 2em;
  color: #017439; /* Brand color for main section titles */
  margin-top: 40px;
  margin-bottom: 20px;
  padding-bottom: 10px;
  border-bottom: 2px solid #e0e0e0;
}

.page-terms-conditions__sub-title {
  font-size: 1.5em;
  color: #333333; /* Dark text for sub-titles */
  margin-top: 30px;
  margin-bottom: 15px;
}

.page-terms-conditions p {
  margin-bottom: 15px;
  line-height: 1.7;
}

.page-terms-conditions__inline-link {
  color: #017439;
  font-weight: bold;
}

.page-terms-conditions__image {
  max-width: 100%;
  height: auto;
  display: block;
  margin: 25px auto;
  border-radius: 8px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

/* 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;
  margin-top: 20px;
  cursor: pointer;
  max-width: 100%;
  box-sizing: border-box;
  white-space: normal;
  word-wrap: break-word;
}

.page-terms-conditions__btn-primary {
  background-color: #C30808; /* Custom color for Register/Login */
  color: #FFFF00; /* Custom font color for Register/Login */
  border: 2px solid #C30808;
}

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

.page-terms-conditions__btn-secondary {
  background-color: #ffffff;
  color: #017439;
  border: 2px solid #017439;
}

.page-terms-conditions__btn-secondary:hover {
  background-color: #f0f0f0;
  color: #005a2b;
  border-color: #005a2b;
}

/* Terms Navigation (Table of Contents) */
.page-terms-conditions__terms-navigation {
  flex-shrink: 0;
  width: 250px;
  padding-right: 20px;
  border-right: 1px solid #e0e0e0;
  position: sticky;
  top: calc(var(--header-offset, 120px) + 20px); /* Stick below header */
  max-height: calc(100vh - var(--header-offset, 120px) - 40px);
  overflow-y: auto;
}

.page-terms-conditions__nav-title {
  font-size: 1.4em;
  color: #017439;
  margin-bottom: 15px;
}

.page-terms-conditions__nav-list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.page-terms-conditions__nav-list li a {
  display: block;
  padding: 8px 0;
  color: #333333;
  font-size: 0.95em;
  transition: color 0.2s ease;
}

.page-terms-conditions__nav-list li a:hover {
  color: #017439;
  text-decoration: none;
}

/* FAQ Section */
.page-terms-conditions__faq-section {
  margin-top: 50px;
  border-top: 1px solid #e0e0e0;
  padding-top: 30px;
}

.page-terms-conditions__faq-item {
  border: 1px solid #e0e0e0;
  border-radius: 8px;
  margin-bottom: 15px;
  overflow: hidden;
}

.page-terms-conditions__faq-question {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 15px 20px;
  background-color: #f9f9f9;
  cursor: pointer;
  transition: background-color 0.3s ease;
}

.page-terms-conditions__faq-question:hover {
  background-color: #f0f0f0;
}

.page-terms-conditions__faq-title {
  font-size: 1.1em;
  color: #333333;
  margin: 0;
  flex-grow: 1;
}

.page-terms-conditions__faq-toggle {
  font-size: 1.5em;
  font-weight: bold;
  color: #017439;
  margin-left: 15px;
  transition: transform 0.3s ease;
}

.page-terms-conditions__faq-item.active .page-terms-conditions__faq-toggle {
  transform: rotate(45deg);
  content: '−'; /* This will be handled by JS */
}

.page-terms-conditions__faq-answer {
  max-height: 0;
  overflow: hidden;
  padding: 0 20px;
  transition: max-height 0.3s ease, padding 0.3s ease;
  background-color: #ffffff;
  color: #333333;
}

.page-terms-conditions__faq-item.active .page-terms-conditions__faq-answer {
  max-height: 1000px !important; /* Sufficiently large to contain content */
  padding: 15px 20px;
}

/* Responsive Design */
@media (max-width: 992px) {
  .page-terms-conditions__content-area {
    flex-direction: column;
  }

  .page-terms-conditions__terms-navigation {
    width: 100%;
    border-right: none;
    border-bottom: 1px solid #e0e0e0;
    padding-bottom: 20px;
    margin-bottom: 30px;
    position: static;
    max-height: none;
    overflow-y: visible;
  }

  .page-terms-conditions__nav-list {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
  }

  .page-terms-conditions__nav-list li a {
    padding: 5px 10px;
    border: 1px solid #e0e0e0;
    border-radius: 5px;
  }
}

@media (max-width: 768px) {
  .page-terms-conditions__hero-section {
    padding: 60px 15px;
    padding-top: var(--header-offset, 120px) !important; /* Important for mobile */
  }

  .page-terms-conditions__main-title {
    font-size: 2em;
  }

  .page-terms-conditions__intro-text {
    font-size: 1em;
  }

  .page-terms-conditions__content-area {
    padding: 20px 15px;
  }

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

  .page-terms-conditions__sub-title {
    font-size: 1.3em;
  }

  /* Mobile image responsiveness */
  .page-terms-conditions img {
    max-width: 100% !important;
    width: 100% !important;
    height: auto !important;
    display: block !important;
  }
  
  .page-terms-conditions__section,
  .page-terms-conditions__card,
  .page-terms-conditions__container {
    max-width: 100% !important;
    width: 100% !important;
    box-sizing: border-box !important;
    padding-left: 15px;
    padding-right: 15px;
  }

  /* Mobile button responsiveness */
  .page-terms-conditions__btn-primary,
  .page-terms-conditions__btn-secondary,
  .page-terms-conditions a[class*="button"],
  .page-terms-conditions a[class*="btn"] {
    max-width: 100% !important;
    width: 100% !important;
    box-sizing: border-box !important;
    white-space: normal !important;
    word-wrap: break-word !important;
    padding-left: 15px;
    padding-right: 15px;
  }
  
  .page-terms-conditions__cta-buttons,
  .page-terms-conditions__button-group,
  .page-terms-conditions__btn-container {
    max-width: 100% !important;
    width: 100% !important;
    box-sizing: border-box !important;
    padding-left: 15px;
    padding-right: 15px;
    flex-wrap: wrap !important;
    gap: 10px;
  }

  .page-terms-conditions__cta-buttons {
    display: flex;
    flex-direction: column;
  }

  .page-terms-conditions__faq-question {
    padding: 12px 15px;
  }

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

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