/* style/promotions.css */

/* Base styles and variables */
:root {
    --primary-color: #017439;
    --secondary-color: #FFFFFF;
    --text-dark: #333333;
    --text-light: #ffffff;
    --button-register-bg: #C30808;
    --button-login-bg: #C30808;
    --button-register-text: #FFFF00;
    --button-login-text: #FFFF00;
    --background-light: #ffffff;
    --border-light: #e0e0e0;
}

.page-promotions {
    font-family: Arial, sans-serif;
    line-height: 1.6;
    color: var(--text-dark); /* Default text color for light background */
    background-color: var(--background-light); /* Ensure consistency with body 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;
    background-color: var(--primary-color); /* Dark background for hero */
    color: var(--text-light); /* Light text for dark background */
    padding-top: var(--header-offset, 120px); /* Fixed header offset */
    overflow: hidden; /* Prevent content overflow */
}

.page-promotions__hero-content {
    max-width: 900px;
    margin-bottom: 40px;
    z-index: 10;
}

.page-promotions__hero-title {
    font-size: 3.5em;
    margin-bottom: 20px;
    color: var(--text-light);
    font-weight: bold;
}

.page-promotions__hero-description {
    font-size: 1.2em;
    margin-bottom: 30px;
    color: var(--text-light);
}

.page-promotions__hero-buttons {
    display: flex;
    gap: 20px;
    justify-content: center;
    flex-wrap: wrap;
}

.page-promotions__hero-media {
    position: relative;
    width: 100%;
    max-width: 1200px;
    margin-top: 40px;
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.3);
    border-radius: 10px;
    overflow: hidden;
    z-index: 5;
}

.page-promotions__hero-video {
    width: 100%;
    height: auto;
    display: block;
    cursor: pointer; /* Indicate clickable */
}

/* General Section Styles */
.page-promotions__section {
    padding: 60px 20px;
    text-align: center;
}

.page-promotions__section-title {
    font-size: 2.5em;
    margin-bottom: 40px;
    color: var(--primary-color); /* Brand color for titles */
    font-weight: bold;
}

.page-promotions__container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 15px; /* Add padding for container on all devices */
    box-sizing: border-box;
}

.page-promotions__text-block {
    font-size: 1.1em;
    margin-bottom: 20px;
    line-height: 1.8;
    color: var(--text-dark);
}

.page-promotions__text-block--small {
    font-size: 0.9em;
    margin-top: 30px;
    color: #666;
}

.page-promotions__text-block--center {
    text-align: center;
}

.page-promotions__subsection-title {
    font-size: 1.8em;
    margin-top: 40px;
    margin-bottom: 25px;
    color: var(--primary-color);
    font-weight: bold;
}

/* Card Grid Styles */
.page-promotions__card-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
    margin-top: 40px;
    text-align: left;
}

.page-promotions__card {
    background-color: var(--secondary-color);
    border-radius: 10px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    padding: 30px;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    color: var(--text-dark);
    height: 100%; /* Ensure cards have equal height */
    box-sizing: border-box;
}

.page-promotions__card-image {
    width: 100%;
    height: 200px; /* Fixed height for consistency */
    object-fit: cover;
    border-radius: 8px;
    margin-bottom: 20px;
    display: block; /* Ensure no extra space below image */
}

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

.page-promotions__card-text {
    font-size: 1em;
    margin-bottom: 20px;
    flex-grow: 1; /* Allow text to grow and push button to bottom */
}

.page-promotions__btn-link {
    display: inline-block;
    background-color: transparent;
    color: var(--primary-color);
    border: 2px solid var(--primary-color);
    padding: 10px 20px;
    border-radius: 5px;
    text-decoration: none;
    font-weight: bold;
    transition: all 0.3s ease;
    margin-top: auto; /* Push button to the bottom */
}

.page-promotions__btn-link:hover {
    background-color: var(--primary-color);
    color: var(--secondary-color);
}

/* Buttons */
.page-promotions__btn-primary,
.page-promotions__btn-secondary {
    display: inline-block;
    padding: 15px 30px;
    border-radius: 8px;
    text-decoration: none;
    font-weight: bold;
    font-size: 1.1em;
    transition: all 0.3s ease;
    text-align: center;
    box-sizing: border-box; /* Crucial for responsive buttons */
    white-space: normal; /* Allow text to wrap */
    word-wrap: break-word; /* Break long words */
}

.page-promotions__btn-primary {
    background-color: var(--button-register-bg); /* Custom color for Register/Login */
    color: var(--button-register-text); /* Custom font color */
    border: 2px solid var(--button-register-bg);
}

.page-promotions__btn-primary:hover {
    background-color: #A30606; /* Explicit darken color for #C30808 */
    border-color: #A30606;
}

.page-promotions__btn-secondary {
    background-color: var(--secondary-color);
    color: var(--primary-color);
    border: 2px solid var(--primary-color);
}

.page-promotions__btn-secondary:hover {
    background-color: var(--primary-color);
    color: var(--secondary-color);
}

.page-promotions__btn-center {
    display: block;
    margin: 40px auto 20px auto;
    max-width: 300px;
}

/* Dark Sections */
.page-promotions__dark-section {
    background-color: var(--primary-color);
    color: var(--text-light);
}

.page-promotions__dark-section .page-promotions__section-title,
.page-promotions__dark-section .page-promotions__subsection-title {
    color: var(--secondary-color); /* Light color for titles in dark sections */
}

.page-promotions__dark-section .page-promotions__text-block,
.page-promotions__dark-section .page-promotions__info-text {
    color: rgba(255, 255, 255, 0.9);
}

.page-promotions__dark-section a {
    color: var(--button-register-text); /* Yellow for links in dark section */
}

.page-promotions__dark-section a:hover {
    text-decoration: underline;
}

/* Content Images */
.page-promotions__content-image {
    width: 100%;
    max-width: 800px;
    height: auto;
    display: block;
    margin: 30px auto;
    border-radius: 8px;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
}

/* Steps Section */
.page-promotions__steps-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 30px;
    margin-top: 40px;
    text-align: left;
}

.page-promotions__step-card {
    background-color: var(--secondary-color);
    border-radius: 10px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    padding: 30px;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    height: 100%;
    box-sizing: border-box;
}

.page-promotions__step-number {
    font-size: 2.5em;
    font-weight: bold;
    color: var(--primary-color);
    margin-bottom: 15px;
}

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

.page-promotions__step-text {
    font-size: 1em;
    color: var(--text-dark);
}

/* Info Grid (Terms Section) */
.page-promotions__info-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
    margin-top: 40px;
    text-align: left;
}

.page-promotions__info-card {
    background-color: rgba(255, 255, 255, 0.1); /* Slightly transparent white on dark bg */
    border-radius: 10px;
    padding: 30px;
    height: 100%;
    box-sizing: border-box;
}

.page-promotions__info-title {
    font-size: 1.5em;
    color: var(--secondary-color);
    margin-bottom: 15px;
    font-weight: bold;
}

.page-promotions__info-text {
    font-size: 1em;
    color: rgba(255, 255, 255, 0.9);
}

/* FAQ Section */
.page-promotions__faq-list {
    margin-top: 40px;
    text-align: left;
}

.page-promotions__faq-item {
    background-color: var(--secondary-color);
    border: 1px solid var(--border-light);
    border-radius: 8px;
    margin-bottom: 15px;
    overflow: hidden;
    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: 20px 30px;
    cursor: pointer;
    background-color: var(--secondary-color);
    color: var(--primary-color);
    font-size: 1.2em;
    font-weight: bold;
    transition: background-color 0.3s ease;
}

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

.page-promotions__faq-toggle {
    font-size: 1.5em;
    font-weight: bold;
    color: var(--primary-color);
    transition: transform 0.3s ease;
}

.page-promotions__faq-item.active .page-promotions__faq-toggle {
    transform: rotate(45deg); /* Or change to '−' with JS */
}

.page-promotions__faq-answer {
    max-height: 0;
    overflow: hidden;
    padding: 0 30px;
    transition: max-height 0.3s ease, padding 0.3s ease;
    color: var(--text-dark);
}

.page-promotions__faq-item.active .page-promotions__faq-answer {
    max-height: 1000px !important; /* Sufficiently large to show all content */
    padding: 15px 30px;
}

.page-promotions__faq-answer p {
    margin: 0;
    padding-bottom: 10px;
}

/* CTA Section */
.page-promotions__cta-section {
    background-color: var(--primary-color);
    color: var(--text-light);
    padding: 80px 20px;
}

.page-promotions__cta-content {
    max-width: 900px;
}

.page-promotions__cta-title {
    font-size: 2.8em;
    margin-bottom: 25px;
    color: var(--secondary-color);
    font-weight: bold;
}

.page-promotions__cta-description {
    font-size: 1.2em;
    margin-bottom: 40px;
    color: rgba(255, 255, 255, 0.9);
}

.page-promotions__cta-description a {
    color: var(--button-register-text); /* Yellow for links */
    text-decoration: underline;
}

.page-promotions__cta-description a:hover {
    color: #FFD700;
}

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


/* Responsive Design */
@media (max-width: 1024px) {
    .page-promotions__hero-title {
        font-size: 3em;
    }
    .page-promotions__section-title {
        font-size: 2em;
    }
    .page-promotions__subsection-title {
        font-size: 1.5em;
    }
    .page-promotions__cta-title {
        font-size: 2.2em;
    }
}

@media (max-width: 768px) {
    .page-promotions__hero-section {
        padding: 40px 15px;
        padding-top: var(--header-offset, 120px) !important; /* Ensure header offset on mobile */
    }

    .page-promotions__hero-title {
        font-size: 2.2em;
        margin-bottom: 15px;
    }
    .page-promotions__hero-description {
        font-size: 1em;
        margin-bottom: 25px;
    }
    .page-promotions__hero-buttons {
        flex-direction: column;
        gap: 15px;
        width: 100%;
    }
    .page-promotions__btn-primary,
    .page-promotions__btn-secondary {
        width: 100% !important;
        max-width: 100% !important;
        padding: 12px 20px;
        font-size: 1em;
        box-sizing: border-box !important;
        white-space: normal !important;
        word-wrap: break-word !important;
    }

    .page-promotions__section {
        padding: 40px 15px;
    }
    .page-promotions__section-title {
        font-size: 1.8em;
        margin-bottom: 30px;
    }
    .page-promotions__subsection-title {
        font-size: 1.3em;
        margin-top: 30px;
        margin-bottom: 20px;
    }
    .page-promotions__text-block {
        font-size: 0.95em;
    }

    .page-promotions__card-grid,
    .page-promotions__steps-grid,
    .page-promotions__info-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }

    /* Images responsiveness for content area */
    .page-promotions img {
        max-width: 100% !important;
        width: 100% !important;
        height: auto !important;
        display: block !important;
        box-sizing: border-box !important;
    }

    .page-promotions__hero-media,
    .page-promotions__content-image,
    .page-promotions__card-image {
        max-width: 100% !important;
        width: 100% !important;
        height: auto !important; /* Auto height for content images on mobile */
        box-sizing: border-box !important;
        margin-left: auto !important;
        margin-right: auto !important;
    }

    /* Video responsiveness */
    .page-promotions video,
    .page-promotions__video {
        max-width: 100% !important;
        width: 100% !important;
        height: auto !important;
        display: block !important;
        box-sizing: border-box !important;
    }

    .page-promotions__hero-media {
        max-width: 100% !important;
        width: 100% !important;
        box-sizing: border-box !important;
        overflow: hidden !important;
        padding: 0 15px; /* Add padding to prevent overflow */
    }
    
    .page-promotions__faq-question {
        padding: 15px 20px;
        font-size: 1.1em;
    }
    .page-promotions__faq-answer {
        padding: 0 20px;
    }
    .page-promotions__faq-item.active .page-promotions__faq-answer {
        padding: 10px 20px;
    }

    .page-promotions__cta-section {
        padding: 60px 15px;
    }
    .page-promotions__cta-title {
        font-size: 2em;
    }
    .page-promotions__cta-description {
        font-size: 1em;
    }
    .page-promotions__cta-buttons {
        flex-direction: column;
        gap: 15px;
        width: 100%;
    }
}

/* Ensure no image filters are used */
.page-promotions img {
    filter: none !important;
}

/* Specific color for links in main content */
.page-promotions__overview-section a,
.page-promotions__guide-section a,
.page-promotions__faq-section a {
    color: var(--primary-color);
    text-decoration: underline;
}

.page-promotions__overview-section a:hover,
.page-promotions__guide-section a:hover,
.page-promotions__faq-section a:hover {
    color: #005f2e; /* Explicit darken color for #017439 */
}