/* style/terms-conditions.css */

/* Base styles for the page content, ensuring light text on dark body background */
.page-terms-conditions {
    font-family: Arial, sans-serif;
    line-height: 1.6;
    color: #ffffff; /* Light text for dark body background */
    background-color: transparent; /* Body background from shared.css */
}

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

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

.page-terms-conditions__main-title {
    font-size: 2.8em;
    margin-bottom: 20px;
    color: #FFFF00; /* Register/Login font color for emphasis */
    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 30px auto;
    color: #f0f0f0;
}

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

/* General Button Styles */
.page-terms-conditions__btn-primary,
.page-terms-conditions__btn-secondary {
    display: inline-block;
    padding: 15px 30px;
    border-radius: 8px;
    text-decoration: none;
    font-weight: bold;
    transition: background-color 0.3s ease, color 0.3s ease, border-color 0.3s ease;
    box-sizing: border-box;
    max-width: 100%; /* Ensure buttons are responsive */
    white-space: normal; /* Allow text to wrap */
    word-wrap: break-word; /* Break long words */
    text-align: center;
}

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

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

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

.page-terms-conditions__btn-secondary:hover {
    background-color: rgba(255, 255, 255, 0.2);
}

/* Content Section */
.page-terms-conditions__content-section {
    padding: 60px 20px;
    background-color: #FFFFFF; /* White background for content, contrasting with dark body */
    color: #333333; /* Dark text for white background */
}

.page-terms-conditions__section-title {
    font-size: 2em;
    color: #017439; /* Brand green for section titles */
    margin-bottom: 30px;
    text-align: center;
}

.page-terms-conditions__paragraph {
    margin-bottom: 20px;
    font-size: 1.05em;
    line-height: 1.7;
    color: #333333;
}

.page-terms-conditions__image-wrapper {
    margin: 30px auto;
    text-align: center;
    max-width: 100%;
    overflow: hidden;
    box-sizing: border-box;
}

.page-terms-conditions__content-image {
    max-width: 100%;
    height: auto;
    display: block;
    border-radius: 8px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    margin: 0 auto;
    /* Ensure image original color is preserved */
    filter: none;
    min-width: 200px;
    min-height: 200px;
    object-fit: cover;
}

/* FAQ Section */
.page-terms-conditions__faq-section {
    padding: 60px 20px;
    background-color: #1a1a2e; /* Dark background matching body */
    color: #ffffff; /* Light text */
}

.page-terms-conditions__faq-list {
    max-width: 900px;
    margin: 40px auto 0 auto;
}

.page-terms-conditions__faq-item {
    background-color: rgba(255, 255, 255, 0.08); /* Slightly lighter background for items */
    margin-bottom: 15px;
    border-radius: 8px;
    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: 20px 25px;
    cursor: pointer;
    font-size: 1.15em;
    font-weight: bold;
    color: #ffffff;
    transition: background-color 0.3s ease;
}

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

.page-terms-conditions__faq-question h3 {
    margin: 0;
    color: #ffffff;
}

.page-terms-conditions__faq-toggle {
    font-size: 1.5em;
    line-height: 1;
    width: 24px;
    height: 24px;
    display: flex;
    justify-content: center;
    align-items: center;
    transition: transform 0.3s ease;
    color: #FFFF00; /* Emphasize toggle icon */
}

.page-terms-conditions__faq-item.active .page-terms-conditions__faq-toggle {
    transform: rotate(45deg); /* For '-' effect, '+' rotates 45 degrees */
}

.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;
}

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

.page-terms-conditions__faq-answer p {
    margin: 0;
    color: #f0f0f0;
}

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

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

@media (max-width: 768px) {
    .page-terms-conditions__hero-section {
        padding: 60px 15px;
        min-height: 300px;
    }

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

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

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

    .page-terms-conditions__btn-primary,
    .page-terms-conditions__btn-secondary {
        width: 100% !important;
        padding: 12px 20px;
    }

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

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

    .page-terms-conditions__paragraph {
        font-size: 0.95em;
    }

    .page-terms-conditions img {
        max-width: 100% !important;
        width: 100% !important;
        height: auto !important;
    }
    
    .page-terms-conditions__image-wrapper,
    .page-terms-conditions__content-section,
    .page-terms-conditions__faq-section,
    .page-terms-conditions__container,
    .page-terms-conditions__faq-item,
    .page-terms-conditions__cta-buttons {
        max-width: 100% !important;
        width: 100% !important;
        box-sizing: border-box !important;
        padding-left: 15px;
        padding-right: 15px;
        overflow: hidden !important;
    }

    .page-terms-conditions__hero-section {
        padding-top: var(--header-offset, 120px) !important;
    }

    .page-terms-conditions__faq-question {
        font-size: 1em;
        padding: 15px 20px;
    }

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

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

/* Contrast Fixes - although my chosen colors already have good contrast */
.page-terms-conditions__dark-bg {
  color: #ffffff;
  background: #017439; /* Brand green */
}

.page-terms-conditions__light-bg {
  color: #333333;
  background: #ffffff;
}

.page-terms-conditions__btn-primary {
  background: #C30808;
  color: #FFFF00;
  border: 2px solid #C30808;
}

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