/* style/terms-conditions.css */

/* Base styles for the page content, inherits from shared.css body background */
.page-terms-conditions {
    color: var(--text-main-color, #F2FFF6); /* Main text color for dark background */
    background-color: var(--background-color, #08160F); /* Ensure consistency with body background */
    font-family: Arial, sans-serif;
    line-height: 1.6;
    padding-bottom: 40px; /* Add some padding at the bottom */
}

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

/* Hero Section */
.page-terms-conditions__hero-section {
    position: relative;
    width: 100%;
    display: flex;
    flex-direction: column; /* Ensure image is above content */
    align-items: center;
    justify-content: center;
    padding-top: 10px; /* Small top padding, body handles --header-offset */
    padding-bottom: 60px;
    overflow: hidden; /* Prevent image overflow */
}

.page-terms-conditions__hero-image-wrapper {
    width: 100%;
    max-height: 500px; /* Limit hero image height */
    overflow: hidden;
    display: flex;
    justify-content: center;
    align-items: center;
}

.page-terms-conditions__hero-image {
    width: 100%;
    height: auto;
    display: block;
    object-fit: cover;
    min-height: 250px; /* Minimum height for hero image */
}

.page-terms-conditions__hero-content {
    text-align: center;
    padding: 40px 20px 0;
    max-width: 900px;
    margin-top: -80px; /* Pull content up slightly over the image if needed, but not overlay text on image */
    position: relative; /* Ensure it's in normal flow */
    z-index: 2; /* Ensure content is above any subtle image elements */
    background-color: var(--background-color, #08160F); /* Match background for seamless transition */
    padding-top: 20px;
    padding-bottom: 20px;
}

.page-terms-conditions__main-title {
    font-size: clamp(2.5rem, 5vw, 3.5rem); /* Responsive H1 font size */
    color: var(--text-main-color, #F2FFF6);
    margin-bottom: 20px;
    font-weight: bold;
    line-height: 1.2;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5); /* Enhance readability on varying backgrounds */
}

.page-terms-conditions__lead-paragraph {
    font-size: 1.15rem;
    color: var(--text-secondary-color, #A7D9B8);
    margin-bottom: 30px;
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
}

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

.page-terms-conditions__btn-primary,
.page-terms-conditions__btn-secondary {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 15px 30px;
    border-radius: 8px;
    text-decoration: none;
    font-weight: bold;
    font-size: 1.1rem;
    transition: all 0.3s ease;
    min-width: 180px;
    box-sizing: border-box;
    white-space: normal; /* Allow text to wrap */
    word-wrap: break-word; /* Break long words */
    text-align: center;
}

.page-terms-conditions__btn-primary {
    background: linear-gradient(180deg, #2AD16F 0%, #13994A 100%);
    color: #ffffff;
    border: 2px solid transparent;
}

.page-terms-conditions__btn-primary:hover {
    background: linear-gradient(180deg, #13994A 0%, #2AD16F 100%);
    box-shadow: 0 0 15px var(--glow-color, #57E38D);
}

.page-terms-conditions__btn-secondary {
    background: transparent;
    color: var(--text-main-color, #F2FFF6);
    border: 2px solid var(--border-color, #2E7A4E);
}

.page-terms-conditions__btn-secondary:hover {
    background: rgba(var(--border-color-rgb, 46, 122, 78), 0.2);
    box-shadow: 0 0 15px var(--glow-color, #57E38D);
}

/* Content Area */
.page-terms-conditions__content-area {
    background-color: var(--background-color, #08160F); /* Match body background */
    padding: 60px 0;
}

.page-terms-conditions__section-title {
    font-size: clamp(1.8rem, 3.5vw, 2.5rem);
    color: var(--gold-color, #F2C14E); /* Using gold for section titles for emphasis */
    margin-top: 50px;
    margin-bottom: 25px;
    text-align: left;
    border-bottom: 2px solid var(--divider-color, #1E3A2A);
    padding-bottom: 15px;
}

.page-terms-conditions h3 {
    font-size: clamp(1.4rem, 2.5vw, 2rem);
    color: var(--text-main-color, #F2FFF6);
    margin-top: 40px;
    margin-bottom: 20px;
}

.page-terms-conditions p {
    font-size: 1rem;
    color: var(--text-secondary-color, #A7D9B8);
    margin-bottom: 15px;
    text-align: justify;
}

.page-terms-conditions ul {
    list-style: disc;
    margin-left: 25px;
    margin-bottom: 15px;
    color: var(--text-secondary-color, #A7D9B8);
}

.page-terms-conditions ul li {
    margin-bottom: 8px;
}

.page-terms-conditions a {
    color: var(--glow-color, #57E38D); /* Links use glow color */
    text-decoration: underline;
}

.page-terms-conditions a:hover {
    color: var(--gold-color, #F2C14E);
}

.page-terms-conditions__image-full {
    width: 100%;
    height: auto;
    display: block;
    margin: 30px 0;
    border-radius: 8px;
    object-fit: cover;
}

/* FAQ Section (not in current outline, but styling for potential future use or if JS is applied) */
.page-terms-conditions__faq-item {
    background-color: var(--card-bg-color, #11271B); /* Darker green background for FAQ items */
    border-radius: 8px;
    margin-bottom: 15px;
    overflow: hidden;
    color: var(--text-main-color, #F2FFF6);
}

.page-terms-conditions__faq-item summary {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px;
    cursor: pointer;
    font-weight: bold;
    font-size: 1.1rem;
    color: var(--gold-color, #F2C14E); /* FAQ question text in gold */
    list-style: none; /* Hide default marker */
}

.page-terms-conditions__faq-item summary::-webkit-details-marker {
    display: none; /* Hide default marker for webkit browsers */
}

.page-terms-conditions__faq-question {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px;
    cursor: pointer;
    font-weight: bold;
    font-size: 1.1rem;
    color: var(--gold-color, #F2C14E);
}

.page-terms-conditions__faq-toggle {
    font-size: 1.5rem;
    line-height: 1;
    margin-left: 15px;
    color: var(--glow-color, #57E38D);
}

.page-terms-conditions__faq-answer {
    padding: 0 20px 20px;
    font-size: 1rem;
    color: var(--text-secondary-color, #A7D9B8);
    text-align: justify;
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease-out;
}

.page-terms-conditions__faq-item.active .page-terms-conditions__faq-answer {
    max-height: 2000px; /* Sufficiently large to show content */
    transition: max-height 0.5s ease-in;
}

.page-terms-conditions__faq-item[open] .page-terms-conditions__faq-answer {
    max-height: 2000px; /* For details tag */
    transition: max-height 0.5s ease-in;
}

/* Bottom CTA buttons */
.page-terms-conditions__cta-buttons--bottom {
    margin-top: 60px;
    padding-top: 30px;
    border-top: 1px solid var(--divider-color, #1E3A2A);
}

/* Responsive Styles */
@media (max-width: 1024px) {
    .page-terms-conditions__hero-content {
        margin-top: -60px; /* Adjust for smaller screens */
    }
}

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

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

    .page-terms-conditions__hero-content {
        margin-top: -40px; /* Further adjust for mobile */
        padding: 30px 15px 0;
    }

    .page-terms-conditions__main-title {
        font-size: clamp(2rem, 8vw, 2.5rem);
        margin-bottom: 15px;
    }

    .page-terms-conditions__lead-paragraph {
        font-size: 1rem;
        margin-bottom: 25px;
    }

    .page-terms-conditions__cta-buttons {
        flex-direction: column; /* Stack buttons vertically */
        gap: 15px;
        padding: 0 15px;
    }

    .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-left: 15px;
        padding-right: 15px;
    }
    
    .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;
    }

    .page-terms-conditions__content-area {
        padding: 40px 0;
    }

    .page-terms-conditions__section-title {
        font-size: clamp(1.5rem, 6vw, 2rem);
        margin-top: 40px;
        margin-bottom: 20px;
    }

    .page-terms-conditions p {
        font-size: 0.95rem;
    }

    .page-terms-conditions__image-full {
        max-width: 100% !important;
        width: 100% !important;
        height: auto !important;
        display: block !important;
    }

    /* Ensure content images are not smaller than 200px */
    .page-terms-conditions__content-area img {
        min-width: 200px;
        min-height: 200px;
    }
    /* Override if any other rule tries to make it smaller */
    .page-terms-conditions__content-area img[width][height] {
        width: auto !important; /* Let max-width 100% control it */
        height: auto !important;
    }
}

/* Color variable definitions for consistency */
:root {
    --primary-color: #11A84E;
    --secondary-color: #22C768;
    --button-gradient-start: #2AD16F;
    --button-gradient-end: #13994A;
    --card-bg-color: #11271B;
    --background-color: #08160F;
    --text-main-color: #F2FFF6;
    --text-secondary-color: #A7D9B8;
    --border-color: #2E7A4E;
    --glow-color: #57E38D;
    --gold-color: #F2C14E;
    --divider-color: #1E3A2A;
    --deep-green-color: #0A4B2C;
}

/* Contrast fix classes (emergency fallback) */
.page-terms-conditions__contrast-fix {
  background: #ffffff !important;
  color: #333333 !important;
  border: 1px solid #e0e0e0 !important;
}

.page-terms-conditions__text-contrast-fix {
  color: #333333 !important;
  text-shadow: none !important;
}