/* style/promotions.css */

/* Base styles for the promotions page */
.page-promotions {
    font-family: Arial, sans-serif;
    line-height: 1.6;
    color: #333333; /* Default text color for light backgrounds */
    background-color: var(--background-color, #ffffff); /* Inherit from shared or default to white */
}

/* 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); /* Ensure content is below fixed header */
    background-color: #017439; /* Brand primary color */
    color: #ffffff;
    overflow: hidden; /* For image positioning */
}

.page-promotions__hero-image-wrapper {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
}

.page-promotions__hero-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0.2; /* Subtle background image */
}

.page-promotions__hero-content {
    position: relative;
    z-index: 1;
    max-width: 800px;
}

.page-promotions__hero-title {
    font-size: 3em;
    margin-bottom: 20px;
    color: #ffffff;
}

.page-promotions__hero-description {
    font-size: 1.2em;
    margin-bottom: 30px;
    color: #f0f0f0;
}

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

/* Section Common Styles */
.page-promotions__container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

.page-promotions__section-title {
    font-size: 2.5em;
    text-align: center;
    margin-bottom: 40px;
}

.page-promotions__text-block {
    font-size: 1.1em;
    margin-bottom: 20px;
    text-align: justify;
}

/* Specific Section Styles */
.page-promotions__overview-section,
.page-promotions__how-to-claim-section,
.page-promotions__benefits-section,
.page-promotions__faq-section {
    padding: 80px 0;
    background-color: #ffffff;
    color: #333333;
}

.page-promotions__categories-section,
.page-promotions__terms-section,
.page-promotions__video-section,
.page-promotions__cta-bottom-section {
    padding: 80px 0;
    background-color: #017439; /* Brand primary color */
    color: #ffffff;
}

.page-promotions__categories-section .page-promotions__section-title,
.page-promotions__categories-section .page-promotions__text-block,
.page-promotions__terms-section .page-promotions__section-title,
.page-promotions__terms-section .page-promotions__text-block,
.page-promotions__video-section .page-promotions__section-title,
.page-promotions__video-section .page-promotions__text-block,
.page-promotions__cta-bottom-section .page-promotions__section-title,
.page-promotions__cta-bottom-section .page-promotions__text-block {
    color: #ffffff;
}

/* Promo 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-color: #ffffff;
    border-radius: 10px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    padding: 30px;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    color: #333333;
}

.page-promotions__card-image {
    width: 100%;
    max-width: 300px;
    height: auto;
    border-radius: 8px;
    margin-bottom: 20px;
}

.page-promotions__card-title {
    font-size: 1.5em;
    margin-bottom: 15px;
    color: #017439; /* Brand primary color */
}

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

/* How-To-Claim Steps */
.page-promotions__steps-list {
    list-style: none;
    padding: 0;
    margin-top: 40px;
}

.page-promotions__step-item {
    background-color: #f9f9f9;
    border-left: 5px solid #017439;
    padding: 25px;
    margin-bottom: 20px;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
}

.page-promotions__step-title {
    font-size: 1.6em;
    color: #017439;
    margin-bottom: 10px;
}

.page-promotions__step-item p {
    margin-bottom: 15px;
}

/* Terms & Conditions */
.page-promotions__terms-list {
    list-style: none;
    padding: 0;
    margin-top: 40px;
}

.page-promotions__term-item {
    background-color: rgba(255, 255, 255, 0.1);
    padding: 20px;
    margin-bottom: 15px;
    border-radius: 8px;
    color: #ffffff;
}

.page-promotions__term-item strong {
    color: #FFFF00; /* Highlight important terms */
}

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

.page-promotions__benefit-card {
    background-color: #ffffff;
    border-radius: 10px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.08);
    padding: 25px;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    color: #333333;
}

.page-promotions__benefit-card .page-promotions__card-image {
    max-width: 150px; /* Smaller images for benefits */
    height: auto;
    margin-bottom: 15px;
}

/* Video Section */
.page-promotions__video-wrapper {
    position: relative;
    padding-bottom: 56.25%; /* 16:9 Aspect Ratio */
    height: 0;
    overflow: hidden;
    max-width: 100%;
    background: #000;
    margin-top: 30px;
    margin-bottom: 30px;
    border-radius: 10px;
}

.page-promotions__video {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: 0;
    border-radius: 10px;
    cursor: pointer; /* Indicates it's clickable */
}

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

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

.page-promotions__faq-question {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 25px;
    cursor: pointer;
    background-color: #ffffff;
    border-bottom: 1px solid #eee;
    color: #017439;
    font-size: 1.2em;
    font-weight: bold;
}

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

.page-promotions__faq-toggle {
    font-size: 1.5em;
    line-height: 1;
    transition: transform 0.3s ease;
}

.page-promotions__faq-item.active .page-promotions__faq-toggle {
    transform: rotate(45deg);
}

.page-promotions__faq-answer {
    max-height: 0;
    overflow: hidden;
    padding: 0 25px;
    transition: max-height 0.3s ease, padding 0.3s ease;
    background-color: #ffffff;
    color: #333333;
}

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

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

/* CTA Buttons */
.page-promotions__btn-primary,
.page-promotions__btn-secondary {
    display: inline-block;
    padding: 15px 30px;
    border-radius: 5px;
    text-decoration: none;
    font-weight: bold;
    transition: background-color 0.3s ease, color 0.3s ease, border-color 0.3s ease;
    text-align: center;
    box-sizing: border-box; /* Crucial for responsiveness */
    white-space: normal; /* Allow text wrapping */
    word-wrap: break-word; /* Break long words */
}

.page-promotions__btn-primary {
    background-color: #C30808; /* Custom color for register/login */
    color: #FFFF00; /* Custom font color for register/login */
    border: 2px solid #C30808;
}

.page-promotions__btn-primary:hover {
    background-color: #a30606;
    border-color: #a30606;
}

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

.page-promotions__hero-section .page-promotions__btn-secondary {
    color: #ffffff;
    border-color: #ffffff;
}

.page-promotions__btn-secondary:hover {
    background-color: #ffffff;
    color: #017439;
}

/* Specific styling for secondary buttons in light sections */
.page-promotions__overview-section .page-promotions__btn-secondary,
.page-promotions__how-to-claim-section .page-promotions__btn-secondary,
.page-promotions__benefits-section .page-promotions__btn-secondary,
.page-promotions__faq-section .page-promotions__btn-secondary {
    background-color: transparent;
    color: #017439;
    border: 2px solid #017439;
}

.page-promotions__overview-section .page-promotions__btn-secondary:hover,
.page-promotions__how-to-claim-section .page-promotions__btn-secondary:hover,
.page-promotions__benefits-section .page-promotions__btn-secondary:hover,
.page-promotions__faq-section .page-promotions__btn-secondary:hover {
    background-color: #017439;
    color: #ffffff;
}

.page-promotions__cta-buttons--centered {
    text-align: center;
    margin-top: 40px;
    display: flex;
    justify-content: center;
    gap: 20px;
}

/* Mobile Responsiveness */
@media (max-width: 768px) {
    .page-promotions {
        font-size: 16px;
        line-height: 1.6;
    }

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

    .page-promotions__hero-title {
        font-size: 2em;
    }

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

    .page-promotions__hero-cta-buttons {
        flex-direction: column;
        gap: 15px;
        width: 100%;
        max-width: 300px; /* Constrain buttons */
    }

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

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

    .page-promotions__container {
        padding: 0 15px;
    }

    .page-promotions__overview-section,
    .page-promotions__categories-section,
    .page-promotions__how-to-claim-section,
    .page-promotions__terms-section,
    .page-promotions__benefits-section,
    .page-promotions__video-section,
    .page-promotions__faq-section,
    .page-promotions__cta-bottom-section {
        padding: 50px 0;
    }

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

    .page-promotions__card-image,
    .page-promotions__benefit-card .page-promotions__card-image {
        max-width: 100% !important;
        width: 100% !important;
        height: auto !important;
    }

    /* Image and Video responsiveness */
    .page-promotions img {
        max-width: 100% !important;
        height: auto !important;
        display: block !important;
    }
    
    .page-promotions__section,
    .page-promotions__card,
    .page-promotions__container,
    .page-promotions__video-section,
    .page-promotions__video-container,
    .page-promotions__video-wrapper,
    .page-promotions__cta-buttons,
    .page-promotions__button-group,
    .page-promotions__btn-container {
        max-width: 100% !important;
        width: 100% !important;
        box-sizing: border-box !important;
        padding-left: 15px;
        padding-right: 15px;
        overflow: hidden !important; /* Prevent horizontal scroll */
    }

    .page-promotions video,
    .page-promotions__video {
        max-width: 100% !important;
        width: 100% !important;
        height: auto !important;
        display: block !important;
    }

    .page-promotions__video-wrapper {
        padding-bottom: 56.25% !important; /* Maintain aspect ratio */
        height: auto !important;
    }

    /* FAQ */
    .page-promotions__faq-question {
        font-size: 1.1em;
        padding: 15px 20px;
    }
    .page-promotions__faq-answer {
        padding: 0 20px;
    }
    .page-promotions__faq-item.active .page-promotions__faq-answer {
        padding: 15px 20px 20px 20px;
    }

    .page-promotions__cta-buttons--centered {
        flex-direction: column;
        gap: 15px;
    }
}