/* style/promotions.css */

:root {
    --primary-color: #017439;
    --secondary-color: #FFFFFF;
    --text-color-dark: #333333;
    --text-color-light: #ffffff;
    --button-register-bg: #C30808;
    --button-login-bg: #C30808;
    --button-text-yellow: #FFFF00;
    --background-color: #FFFFFF;
    --border-color: #e0e0e0;
    --shadow-color: rgba(0, 0, 0, 0.1);
}

.page-promotions {
    font-family: Arial, sans-serif;
    line-height: 1.6;
    color: var(--text-color-dark); /* Default text color for light background */
    background-color: var(--background-color); /* Ensures white background */
}

/* Hero Section */
.page-promotions__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, var(--primary-color), var(--secondary-color)); /* Green to white gradient */
    color: var(--text-color-dark); /* Default text color for light background */
}

.page-promotions__hero-container {
    position: relative;
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    width: 100%;
}

.page-promotions__hero-image {
    width: 100%;
    margin-bottom: 30px;
}

.page-promotions__hero-image img {
    width: 100%;
    height: auto;
    max-width: 100%;
    display: block;
    border-radius: 8px;
    object-fit: cover;
}

.page-promotions__hero-content {
    position: relative;
    z-index: 2;
    text-align: center;
    width: 100%;
}

.page-promotions__hero-title {
    font-size: 3.2em;
    color: var(--text-color-dark); /* Ensure contrast on gradient background */
    margin-bottom: 20px;
    font-weight: bold;
}

.page-promotions__hero-description {
    font-size: 1.2em;
    color: var(--text-color-dark); /* Ensure contrast on gradient background */
    margin-bottom: 30px;
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
}

/* General CTA Button Style */
.page-promotions__cta-button {
    display: inline-block;
    padding: 15px 40px;
    background: var(--button-register-bg); /* Use specified register button color */
    color: var(--button-text-yellow); /* Use specified font color for register/login */
    text-decoration: none;
    border-radius: 5px;
    font-size: 18px;
    font-weight: bold;
    margin-top: 30px;
    transition: all 0.3s ease;
    border: none;
    cursor: pointer;
    box-sizing: border-box; /* Crucial for mobile responsiveness */
    white-space: normal; /* Allow text wrap */
    word-wrap: break-word; /* Allow text wrap */
}

.page-promotions__cta-button:hover {
    background: #a30606; /* Darken on hover */
    transform: translateY(-2px);
    box-shadow: 0 4px 12px var(--shadow-color);
}

/* Section Styling */
.page-promotions__section {
    padding: 60px 20px;
    margin-bottom: 20px;
    background-color: var(--background-color);
}

.page-promotions__section:nth-of-type(even) {
    background-color: #f9f9f9; /* Slightly different background for alternating sections */
}

.page-promotions__container {
    max-width: 1200px;
    margin: 0 auto;
    width: 100%; /* Ensure container takes full width on smaller screens */
    box-sizing: border-box; /* Crucial for mobile responsiveness */
}

.page-promotions__section-title {
    font-size: 2.5em;
    color: var(--primary-color);
    text-align: center;
    margin-bottom: 40px;
    font-weight: bold;
}

.page-promotions__paragraph {
    font-size: 1.1em;
    margin-bottom: 20px;
    text-align: justify;
    color: var(--text-color-dark);
}

/* Promo Cards Grid */
.page-promotions__promo-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
    margin-top: 40px;
}

.page-promotions__promo-card {
    background: var(--secondary-color);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 25px;
    text-align: center;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.05);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    display: flex;
    flex-direction: column;
    align-items: center;
    color: var(--text-color-dark);
}

.page-promotions__promo-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.1);
}

.page-promotions__promo-image {
    width: 100%;
    height: 250px; /* Fixed height for consistency */
    object-fit: cover;
    border-radius: 6px;
    margin-bottom: 20px;
    max-width: 100%; /* Ensure image responsiveness */
    display: block;
}

.page-promotions__promo-card-title {
    font-size: 1.5em;
    color: var(--primary-color);
    margin-bottom: 15px;
    font-weight: 600;
}

.page-promotions__promo-card-text {
    font-size: 1em;
    margin-bottom: 15px;
    flex-grow: 1; /* Allows text to take up available space */
}

.page-promotions__promo-list {
    list-style: none;
    padding: 0;
    margin-bottom: 20px;
    text-align: left;
    width: 100%;
    color: var(--text-color-dark);
}

.page-promotions__promo-list li {
    background: #e6ffe6; /* Light green background for list items */
    padding: 8px 15px;
    margin-bottom: 8px;
    border-radius: 4px;
    display: flex;
    align-items: center;
    font-size: 0.95em;
}

.page-promotions__promo-list li::before {
    content: '✅';
    margin-right: 10px;
    font-size: 1.1em;
}

/* Terms and Conditions Section */
.page-promotions__terms-conditions .page-promotions__paragraph {
    text-align: center;
    max-width: 900px;
    margin-left: auto;
    margin-right: auto;
}

.page-promotions__terms-list-wrapper {
    background: #f0fdf0; /* Very light green background */
    padding: 30px;
    border-radius: 8px;
    margin-top: 30px;
    box-shadow: inset 0 0 10px rgba(0, 116, 57, 0.05);
}

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

.page-promotions__terms-item {
    font-size: 1.1em;
    margin-bottom: 15px;
    padding-left: 30px;
    position: relative;
    color: var(--text-color-dark);
}

.page-promotions__terms-item strong {
    color: var(--primary-color);
}

.page-promotions__terms-item::before {
    content: '👉';
    position: absolute;
    left: 0;
    top: 0;
    font-size: 1.2em;
    color: var(--primary-color);
}

/* FAQ Section */
.page-promotions__faq-list {
    margin-top: 40px;
    max-width: 900px;
    margin-left: auto;
    margin-right: auto;
}

.page-promotions__faq-item {
    margin-bottom: 15px;
    border-radius: 5px;
    overflow: hidden;
    background-color: var(--secondary-color);
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.05);
}

.page-promotions__faq-question {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 18px 20px;
    background: var(--secondary-color);
    border: 1px solid var(--border-color);
    border-radius: 5px;
    cursor: pointer;
    user-select: none;
    transition: background-color 0.3s ease, border-color 0.3s ease;
    position: relative;
}

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

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

.page-promotions__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 from blocking click event */
    color: var(--primary-color);
}

.page-promotions__faq-toggle {
    font-size: 24px;
    font-weight: bold;
    line-height: 1;
    color: var(--primary-color);
    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-promotions__faq-item.active .page-promotions__faq-toggle {
    color: var(--text-color-dark);
    transform: rotate(45deg); /* Rotate for minus sign effect */
}

.page-promotions__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.4s ease;
    padding: 0 15px;
    opacity: 0;
}

.page-promotions__faq-item.active .page-promotions__faq-answer {
    max-height: 2000px !important; /* Ensure it expands sufficiently */
    padding: 20px 15px !important;
    opacity: 1;
    background: #f9f9f9;
    border-radius: 0 0 5px 5px;
    color: var(--text-color-dark);
}

.page-promotions__faq-answer p {
    margin-bottom: 10px;
    font-size: 1em;
}

.page-promotions__link-support {
    color: var(--primary-color);
    text-decoration: underline;
    font-weight: bold;
}

.page-promotions__link-support:hover {
    color: #005a2e;
}

.page-promotions__faq-image-wrapper {
    margin-top: 40px;
    text-align: center;
}

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

/* Why Choose Section */
.page-promotions__why-choose {
    background-color: var(--primary-color);
    color: var(--text-color-light);
}

.page-promotions__why-choose .page-promotions__section-title {
    color: var(--secondary-color);
}

.page-promotions__why-choose-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 30px;
    margin-top: 40px;
}

.page-promotions__why-choose-item {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    padding: 25px;
    text-align: center;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.05);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    color: var(--text-color-light);
}

.page-promotions__why-choose-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.15);
}

.page-promotions__why-choose-title {
    font-size: 1.4em;
    color: var(--secondary-color);
    margin-bottom: 15px;
    font-weight: 600;
}

.page-promotions__why-choose-text {
    font-size: 1em;
    line-height: 1.6;
}

.page-promotions__cta-button--join {
    background: var(--button-register-bg); /* Use specified register button color */
    color: var(--button-text-yellow); /* Use specified font color for register/login */
    margin-top: 50px;
    border: none;
}

.page-promotions__cta-button--join:hover {
    background: #a30606;
}

/* Responsive Design for Mobile */
@media (max-width: 768px) {
    .page-promotions__hero-section {
        padding-top: var(--header-offset, 120px) !important;
        padding-bottom: 40px;
        padding-left: 15px;
        padding-right: 15px;
    }

    .page-promotions__hero-title {
        font-size: 2.2em;
        line-height: 1.2;
    }

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

    .page-promotions__cta-button {
        padding: 12px 25px;
        font-size: 16px;
        max-width: 100% !important;
        width: 100% !important;
        box-sizing: border-box !important;
        white-space: normal !important;
        word-wrap: break-word !important;
        margin-left: 0 !important;
        margin-right: 0 !important;
    }
    
    .page-promotions__cta-button--register,
    .page-promotions__cta-button--view-all,
    .page-promotions__cta-button--read-more,
    .page-promotions__cta-button--join {
        width: 100%;
        margin-top: 20px;
    }

    .page-promotions__section {
        padding: 40px 15px;
    }

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

    .page-promotions__paragraph {
        font-size: 0.95em;
        text-align: left;
    }

    .page-promotions__promo-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }

    .page-promotions__promo-card {
        padding: 20px;
    }

    .page-promotions__promo-image {
        height: 200px;
    }

    .page-promotions__promo-card-title {
        font-size: 1.3em;
    }

    .page-promotions__terms-item {
        font-size: 1em;
        padding-left: 25px;
    }

    .page-promotions__faq-question {
        padding: 15px;
        flex-wrap: wrap;
    }
    
    .page-promotions__faq-question h3 {
        font-size: 1em;
        margin-bottom: 0;
        width: calc(100% - 40px);
    }
    
    .page-promotions__faq-toggle {
        margin-left: 10px;
        width: 24px;
        height: 24px;
        font-size: 20px;
    }
    
    .page-promotions__faq-answer {
        padding: 0 15px;
    }
    
    .page-promotions__faq-item.active .page-promotions__faq-answer {
        padding: 15px !important;
    }

    .page-promotions__faq-image {
        width: 100%;
        height: auto;
    }

    .page-promotions__why-choose-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }

    .page-promotions__why-choose-item {
        padding: 20px;
    }

    .page-promotions__why-choose-title {
        font-size: 1.2em;
    }

    /* Global image responsive rules for content area */
    .page-promotions img {
        max-width: 100% !important;
        width: 100% !important;
        height: auto !important;
    }
    
    .page-promotions__section,
    .page-promotions__card,
    .page-promotions__container,
    .page-promotions__promo-card,
    .page-promotions__why-choose-item {
        max-width: 100% !important;
        width: 100% !important;
        box-sizing: border-box !important;
        padding-left: 15px !important;
        padding-right: 15px !important;
    }
}