/* style/terms-conditions.css */

/* Base styles for the terms and conditions page */
.page-terms-conditions {
    font-family: 'Arial', sans-serif;
    line-height: 1.6;
    color: #333333; /* Default dark text for light body background */
    background-color: #ffffff; /* Explicitly set for clarity, though shared.css might handle body */
}

/* Hero Section */
.page-terms-conditions__hero-section {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 60px 20px;
    padding-top: var(--header-offset, 120px); /* Ensures content is not hidden by fixed header */
    background: linear-gradient(135deg, #26A9E0, #FFFFFF); /* Brand colors */
    color: #ffffff; /* White text for gradient background */
    overflow: hidden; /* Prevent image overflow */
}

.page-terms-conditions__hero-container {
    position: relative;
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    z-index: 1; /* Ensure content is above any potential background layers */
}

.page-terms-conditions__hero-image {
    width: 100%;
    margin-bottom: 30px;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.2); /* Subtle shadow for depth */
    border-radius: 12px; /* Rounded corners */
    overflow: hidden; /* Ensures shadow and border-radius apply correctly */
}

.page-terms-conditions__hero-image img {
    width: 100%;
    height: auto;
    max-width: 100%;
    display: block;
    object-fit: cover;
    transition: transform 0.3s ease; /* Smooth hover effect */
}

.page-terms-conditions__hero-image img:hover {
    transform: scale(1.02); /* Slightly zoom on hover */
}

.page-terms-conditions__hero-content {
    position: relative;
    z-index: 2;
    text-align: center;
    width: 100%;
    padding: 0 20px; /* Inner padding */
}

.page-terms-conditions__hero-title {
    font-size: 2.8em;
    margin-bottom: 20px;
    color: #ffffff; /* White text for hero title */
    text-shadow: 1px 1px 4px rgba(0, 0, 0, 0.3); /* Subtle text shadow for readability */
    font-weight: 700;
}

.page-terms-conditions__hero-description {
    font-size: 1.2em;
    max-width: 800px;
    margin: 0 auto 30px auto;
    color: #f0f8ff; /* Slightly off-white for description */
}

.page-terms-conditions__hero-description a {
    color: #f0f8ff; /* Link color in hero description */
    text-decoration: underline;
    font-weight: bold;
}

.page-terms-conditions__hero-description a:hover {
    color: #FFFFFF;
}

.page-terms-conditions__cta-button {
    display: inline-block;
    padding: 15px 40px;
    background: #EA7C07; /* Login color for CTA */
    color: #ffffff;
    text-decoration: none;
    border-radius: 8px;
    font-size: 1.1em;
    font-weight: bold;
    margin-top: 20px;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
    border: none;
    cursor: pointer;
}

.page-terms-conditions__cta-button:hover {
    background: #ff8c1a; /* Lighter shade on hover */
    transform: translateY(-3px) scale(1.02);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.3);
}

/* Content Area */
.page-terms-conditions__content-area {
    max-width: 1200px;
    margin: 0 auto;
    padding: 60px 20px;
    background-color: #ffffff; /* Light background for content */
    border-radius: 12px;
    box-shadow: 0 0 20px rgba(0, 0, 0, 0.05);
    margin-top: -60px; /* Overlap with hero for visual flow */
    position: relative;
    z-index: 10;
}

.page-terms-conditions__container {
    max-width: 1000px;
    margin: 0 auto;
}

.page-terms-conditions__section-title {
    font-size: 2.2em;
    color: #26A9E0; /* Primary color for main titles */
    margin-bottom: 40px;
    text-align: center;
    font-weight: 700;
    border-bottom: 2px solid #e0e0e0;
    padding-bottom: 15px;
}

.page-terms-conditions__table-of-contents {
    list-style: none;
    padding: 0;
    margin-bottom: 50px;
    background-color: #f8f8f8;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    padding: 25px;
    line-height: 1.8;
}

.page-terms-conditions__table-of-contents li {
    margin-bottom: 10px;
    font-size: 1.1em;
}

.page-terms-conditions__table-of-contents li a {
    color: #26A9E0;
    text-decoration: none;
    transition: color 0.3s ease, text-decoration 0.3s ease;
    font-weight: 500;
}

.page-terms-conditions__table-of-contents li a:hover {
    color: #1a7bb7; /* Darker shade on hover */
    text-decoration: underline;
}

.page-terms-conditions__article {
    margin-top: 40px;
}

.page-terms-conditions__article-heading {
    font-size: 1.8em;
    color: #26A9E0;
    margin-top: 40px;
    margin-bottom: 20px;
    border-left: 5px solid #26A9E0;
    padding-left: 15px;
    font-weight: 600;
}

.page-terms-conditions__sub-heading {
    font-size: 1.4em;
    color: #333333;
    margin-top: 30px;
    margin-bottom: 15px;
    font-weight: 600;
}

.page-terms-conditions__article-paragraph {
    margin-bottom: 20px;
    font-size: 1.05em;
    color: #333333;
}

.page-terms-conditions__article-paragraph a {
    color: #26A9E0;
    text-decoration: none;
    font-weight: bold;
}

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

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

.page-terms-conditions__list {
    list-style: disc;
    margin-left: 25px;
    margin-bottom: 20px;
    color: #333333;
    font-size: 1.05em;
}

.page-terms-conditions__list li {
    margin-bottom: 10px;
}

.page-terms-conditions__list li strong {
    color: #000000;
}

.page-terms-conditions__list li a {
    color: #26A9E0;
    text-decoration: none;
    font-weight: bold;
}

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

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

/* FAQ container styles */
.page-terms-conditions__faq-item {
  margin-bottom: 15px;
  border-radius: 5px;
  overflow: hidden;
}

/* FAQ default state - answer hidden */
.page-terms-conditions__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.3s ease;
  padding: 0 15px;
  opacity: 0;
}

/* FAQ expanded state - 🚨 Use !important and sufficiently large max-height */
.page-terms-conditions__faq-item.active .page-terms-conditions__faq-answer {
  max-height: 2000px !important; /* 🚨 Use !important to ensure priority, value large enough to contain any content */
  padding: 20px 15px !important;
  opacity: 1;
  background: #f9f9f9;
  border-radius: 0 0 5px 5px;
  color: #333333; /* Ensure contrast */
}

/* Question styles */
.page-terms-conditions__faq-question {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 18px 20px;
  background: #fff;
  border: 1px solid #e0e0e0;
  border-radius: 5px;
  cursor: pointer;
  user-select: none;
  transition: background-color 0.3s ease, border-color 0.3s ease;
  position: relative;
}

.page-terms-conditions__faq-question:hover {
  background: #f5f5f5;
  border-color: #d0d0d0;
}

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

/* Question title styles */
.page-terms-conditions__faq-question h3 {
  margin: 0;
  padding: 0;
  flex: 1;
  font-size: 1.1em;
  font-weight: 600;
  line-height: 1.5;
  pointer-events: none; /* Prevent h3 tag from blocking click event */
  color: #333333; /* Ensure contrast */
}

.page-terms-conditions__faq-question h3 a {
    color: #26A9E0; /* Link color in FAQ question */
    text-decoration: none;
    font-weight: bold;
    pointer-events: auto; /* Allow link clicks */
}

.page-terms-conditions__faq-question h3 a:hover {
    text-decoration: underline;
}

/* Toggle icon */
.page-terms-conditions__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; /* Prevent icon from blocking click event */
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
}

.page-terms-conditions__faq-item.active .page-terms-conditions__faq-toggle {
  color: #333;
  transform: rotate(45deg); /* Rotate for 'x' effect */
}


/* CTA Section at the bottom */
.page-terms-conditions__cta-section {
    background: #26A9E0; /* Primary brand color for dark background */
    color: #ffffff; /* White text for contrast */
    padding: 60px 20px;
    text-align: center;
    border-radius: 12px;
    margin-top: 60px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
}

.page-terms-conditions__cta-title {
    font-size: 2.5em;
    margin-bottom: 20px;
    color: #ffffff;
    font-weight: 700;
}

.page-terms-conditions__cta-description {
    font-size: 1.2em;
    max-width: 800px;
    margin: 0 auto 40px auto;
    color: #f0f8ff;
}

.page-terms-conditions__cta-description a {
    color: #f0f8ff;
    text-decoration: underline;
    font-weight: bold;
}

.page-terms-conditions__cta-description a:hover {
    color: #FFFFFF;
}

.page-terms-conditions__cta-buttons {
    display: flex;
    justify-content: center;
    gap: 20px;
    flex-wrap: wrap; /* Allow wrapping on smaller screens */
}

.page-terms-conditions__btn-primary,
.page-terms-conditions__btn-secondary {
    display: inline-block;
    padding: 15px 35px;
    text-decoration: none;
    border-radius: 8px;
    font-size: 1.1em;
    font-weight: bold;
    transition: all 0.3s ease;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
    border: 2px solid transparent;
    cursor: pointer;
    max-width: 100%; /* Ensure responsiveness */
    box-sizing: border-box; /* Include padding/border in width */
    white-space: normal; /* Allow text wrapping */
    word-wrap: break-word; /* Allow text breaking */
}

.page-terms-conditions__btn-primary {
    background: #EA7C07; /* Login color */
    color: #ffffff;
    border-color: #EA7C07;
}

.page-terms-conditions__btn-primary:hover {
    background: #ff8c1a;
    border-color: #ff8c1a;
    transform: translateY(-3px) scale(1.02);
    box-shadow: 0 6px 15px rgba(0, 0, 0, 0.3);
}

.page-terms-conditions__btn-secondary {
    background: #ffffff;
    color: #26A9E0; /* Primary color for text */
    border-color: #ffffff;
}

.page-terms-conditions__btn-secondary:hover {
    background: #e0f2f7; /* Lighter blue on hover */
    color: #1a7bb7;
    border-color: #e0f2f7;
    transform: translateY(-3px) scale(1.02);
    box-shadow: 0 6px 15px rgba(0, 0, 0, 0.3);
}

/* Responsive Design */
@media (max-width: 1024px) {
    .page-terms-conditions__hero-title {
        font-size: 2.2em;
    }
    .page-terms-conditions__hero-description {
        font-size: 1.1em;
    }
    .page-terms-conditions__section-title {
        font-size: 1.8em;
    }
    .page-terms-conditions__article-heading {
        font-size: 1.6em;
    }
    .page-terms-conditions__sub-heading {
        font-size: 1.2em;
    }
    .page-terms-conditions__cta-title {
        font-size: 2em;
    }
    .page-terms-conditions__cta-description {
        font-size: 1.1em;
    }
}

@media (max-width: 768px) {
    /* Mobile Hero Section */
    .page-terms-conditions__hero-section {
        padding-top: var(--header-offset, 120px) !important; /* Mobile specific offset */
        padding-bottom: 40px;
        padding-left: 15px;
        padding-right: 15px;
    }
    .page-terms-conditions__hero-image {
        margin-bottom: 20px;
        border-radius: 8px;
    }
    .page-terms-conditions__hero-title {
        font-size: 1.8em;
        margin-bottom: 15px;
    }
    .page-terms-conditions__hero-description {
        font-size: 1em;
        margin-bottom: 25px;
    }
    .page-terms-conditions__cta-button {
        padding: 12px 30px;
        font-size: 1em;
        width: 100%; /* Full width button on mobile */
    }

    /* Content Area */
    .page-terms-conditions__content-area {
        padding: 40px 15px;
        margin-top: -40px; /* Adjust overlap for mobile */
        border-radius: 8px;
    }
    .page-terms-conditions__section-title {
        font-size: 1.6em;
        margin-bottom: 30px;
    }
    .page-terms-conditions__table-of-contents {
        padding: 20px;
        font-size: 0.95em;
    }
    .page-terms-conditions__article-heading {
        font-size: 1.5em;
        margin-top: 30px;
        margin-bottom: 15px;
        padding-left: 10px;
    }
    .page-terms-conditions__sub-heading {
        font-size: 1.1em;
        margin-top: 25px;
        margin-bottom: 10px;
    }
    .page-terms-conditions__article-paragraph,
    .page-terms-conditions__list {
        font-size: 0.95em;
    }
    .page-terms-conditions__article-image {
        margin: 20px auto;
        border-radius: 6px;
    }

    /* FAQ Section */
    .page-terms-conditions__faq-section {
        margin-top: 40px;
        padding-top: 30px;
    }
    .page-terms-conditions__faq-question {
        padding: 15px;
        flex-wrap: wrap;
    }
    .page-terms-conditions__faq-question h3 {
        font-size: 1em;
        margin-bottom: 0;
        width: calc(100% - 40px);
    }
    .page-terms-conditions__faq-toggle {
        margin-left: 10px;
        width: 24px;
        height: 24px;
        font-size: 20px;
    }
    .page-terms-conditions__faq-answer {
        padding: 0 15px;
    }
    .page-terms-conditions__faq-item.active .page-terms-conditions__faq-answer {
        padding: 15px !important;
    }

    /* CTA Section */
    .page-terms-conditions__cta-section {
        padding: 40px 15px;
        margin-top: 40px;
        border-radius: 8px;
    }
    .page-terms-conditions__cta-title {
        font-size: 1.8em;
        margin-bottom: 15px;
    }
    .page-terms-conditions__cta-description {
        font-size: 1em;
        margin-bottom: 30px;
    }
    .page-terms-conditions__cta-buttons {
        flex-direction: column; /* Stack buttons vertically */
        gap: 15px;
    }
    .page-terms-conditions__btn-primary,
    .page-terms-conditions__btn-secondary {
        width: 100% !important; /* Force full width */
        max-width: 100% !important;
        padding: 12px 25px;
        font-size: 1em;
    }

    /* Image responsive overrides */
    .page-terms-conditions img {
        max-width: 100% !important;
        width: 100% !important;
        height: auto !important;
    }
    .page-terms-conditions__section,
    .page-terms-conditions__card,
    .page-terms-conditions__container,
    .page-terms-conditions__hero-section,
    .page-terms-conditions__content-area,
    .page-terms-conditions__faq-section,
    .page-terms-conditions__cta-section {
        max-width: 100% !important;
        width: 100% !important;
        box-sizing: border-box !important;
        padding-left: 15px;
        padding-right: 15px;
    }
    .page-terms-conditions__hero-content {
        padding-left: 0;
        padding-right: 0;
    }
}