/* style/promotions.css */

/* Base styles for the promotions page */
.page-promotions {
    font-family: Arial, sans-serif;
    line-height: 1.6;
    color: #333333; /* Default dark text for light background */
    background-color: #FFFFFF; /* Explicitly set for clarity */
}

/* Fixed header offset - apply to the first main content section if body padding is not set by shared.css */
.page-promotions__hero-section {
    position: relative;
    padding-top: var(--header-offset, 120px); /* Ensures content is not hidden by fixed header */
    padding-bottom: 60px;
    background-color: #017439; /* Brand primary color */
    color: #FFFFFF; /* White text for dark background */
    text-align: center;
    overflow: hidden; /* For image */
}

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

.page-promotions__hero-content {
    position: relative;
    z-index: 2;
    padding: 40px 0;
}

.page-promotions__hero-title {
    font-size: 3.5em;
    margin-bottom: 20px;
    color: #FFFF00; /* Register/Login font color for emphasis */
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
}

.page-promotions__hero-description {
    font-size: 1.2em;
    margin-bottom: 40px;
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
    color: #FFFFFF;
}

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

.page-promotions__hero-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0.3; /* Subtle background image */
    filter: none; /* Ensure no color filter is applied */
}

/* General section styles */
.page-promotions__overview-section,
.page-promotions__how-to-claim-section,
.page-promotions__faq-section {
    padding: 60px 0;
    background-color: #FFFFFF; /* Light background */
    color: #333333; /* Dark text */
}

.page-promotions__featured-promos-section,
.page-promotions__terms-section,
.page-promotions__cta-section {
    padding: 60px 0;
    background-color: #017439; /* Dark background */
    color: #FFFFFF; /* White text */
}

.page-promotions__section-title {
    font-size: 2.5em;
    text-align: center;
    margin-bottom: 40px;
    color: #017439; /* Brand primary for light sections */
}

.page-promotions__featured-promos-section .page-promotions__section-title,
.page-promotions__terms-section .page-promotions__section-title,
.page-promotions__cta-section .page-promotions__section-title {
    color: #FFFFFF; /* White for dark sections */
}

.page-promotions__text-block p {
    margin-bottom: 1em;
    font-size: 1.1em;
}

.page-promotions__text-block ol,
.page-promotions__text-block ul {
    margin-bottom: 1em;
    padding-left: 25px;
}

.page-promotions__text-block li {
    margin-bottom: 0.5em;
    font-size: 1.1em;
}

/* Buttons */
.page-promotions__btn-primary,
.page-promotions__btn-secondary,
.page-promotions a[class*="button"],
.page-promotions a[class*="btn"] {
    display: inline-block;
    padding: 15px 30px;
    border-radius: 8px;
    text-decoration: none;
    font-weight: bold;
    font-size: 1.1em;
    transition: background-color 0.3s ease, color 0.3s ease, border-color 0.3s ease;
    cursor: pointer;
    box-sizing: border-box; /* Crucial for responsive buttons */
    white-space: normal; /* Allow text to wrap */
    word-wrap: break-word; /* Break long words */
    max-width: 100%; /* Ensure button doesn't exceed container */
}

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

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

.page-promotions__btn-secondary {
    background-color: #FFFFFF;
    color: #017439; /* Brand primary color */
    border: 2px solid #017439;
    margin: 10px;
}

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

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

/* 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: 12px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    padding: 30px;
    text-align: center;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    color: #333333; /* Dark text for light card background */
}

.page-promotions__card-image {
    max-width: 100%;
    height: auto;
    border-radius: 8px;
    margin-bottom: 20px;
    filter: none; /* Ensure no color filter is applied */
    min-width: 200px; /* Enforce min size */
    min-height: 200px; /* Enforce min size */
    object-fit: cover;
}

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

.page-promotions__card-description {
    font-size: 1em;
    margin-bottom: 20px;
    flex-grow: 1; /* Allows description to take available space */
}

/* FAQ Section */
.page-promotions__faq-list {
    max-width: 800px;
    margin: 40px auto 0;
}

.page-promotions__faq-item {
    background-color: #F8F8F8;
    border-radius: 8px;
    margin-bottom: 15px;
    overflow: hidden;
    color: #333333; /* Dark text for light background */
}

.page-promotions__faq-question {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 25px;
    font-size: 1.2em;
    font-weight: bold;
    cursor: pointer;
    background-color: #E0E0E0;
    color: #017439; /* Brand primary color */
    border-bottom: 1px solid #CCCCCC;
    transition: background-color 0.3s ease;
    list-style: none; /* For <details> summary */
}

.page-promotions__faq-item[open] > .page-promotions__faq-question {
    background-color: #D0D0D0;
}

.page-promotions__faq-question::-webkit-details-marker {
    display: none; /* Hide default marker for <details> */
}
.page-promotions__faq-question::marker {
    display: none; /* Hide default marker for <details> */
}

.page-promotions__faq-toggle {
    font-size: 1.5em;
    line-height: 1;
    margin-left: 15px;
    color: #017439;
}

.page-promotions__faq-answer {
    padding: 20px 25px;
    font-size: 1.1em;
    background-color: #F8F8F8;
    border-top: 1px solid #E0E0E0;
    color: #333333;
}

/* Ensure links within text blocks are styled appropriately */
.page-promotions__text-block a,
.page-promotions__faq-answer a {
    color: #017439;
    text-decoration: underline;
}

.page-promotions__text-block a:hover,
.page-promotions__faq-answer a:hover {
    color: #005f2e;
}

/* Responsive styles */
@media (max-width: 1024px) {
    .page-promotions__hero-title {
        font-size: 3em;
    }
    .page-promotions__section-title {
        font-size: 2em;
    }
    .page-promotions__promo-grid {
        grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    }
}

@media (max-width: 768px) {
    .page-promotions__hero-section {
        padding-top: var(--header-offset, 120px) !important; /* Re-apply for mobile */
        padding-bottom: 40px;
    }
    .page-promotions__hero-title {
        font-size: 2.2em;
    }
    .page-promotions__hero-description {
        font-size: 1em;
    }
    .page-promotions__section-title {
        font-size: 1.8em;
    }
    .page-promotions__overview-section,
    .page-promotions__how-to-claim-section,
    .page-promotions__faq-section,
    .page-promotions__featured-promos-section,
    .page-promotions__terms-section,
    .page-promotions__cta-section {
        padding: 40px 0;
    }
    .page-promotions__container {
        padding: 0 15px !important; /* Add padding to prevent content touching edges */
    }

    /* Images responsiveness */
    .page-promotions img {
        max-width: 100% !important;
        width: 100% !important;
        height: auto !important;
        display: block !important;
        min-width: 200px !important; /* Enforce min size even on mobile */
        min-height: 200px !important; /* Enforce min size even on mobile */
    }
    .page-promotions__hero-image {
        opacity: 0.2 !important; /* Adjust opacity for mobile background */
    }
    
    /* Ensure image containers also adapt */
    .page-promotions__promo-card,
    .page-promotions__hero-image-wrapper {
        max-width: 100% !important;
        width: 100% !important;
        box-sizing: border-box !important;
        overflow: hidden !important;
    }

    /* Buttons responsiveness */
    .page-promotions__btn-primary,
    .page-promotions__btn-secondary,
    .page-promotions a[class*="button"],
    .page-promotions a[class*="btn"] {
        max-width: 100% !important;
        width: 100% !important;
        box-sizing: border-box !important;
        white-space: normal !important;
        word-wrap: break-word !important;
        padding: 12px 20px !important; /* Adjust padding for smaller buttons */
        font-size: 1em !important;
        margin: 5px 0 !important; /* Adjust margins for stacked buttons */
    }
    .page-promotions__cta-buttons {
        flex-direction: column !important; /* Stack buttons vertically */
        gap: 10px !important;
        padding: 0 15px !important; /* Add padding to button container */
        max-width: 100% !important;
        width: 100% !important;
        box-sizing: border-box !important;
        overflow: hidden !important;
    }

    .page-promotions__promo-grid {
        grid-template-columns: 1fr; /* Single column layout for cards */
    }

    .page-promotions__faq-question {
        font-size: 1.1em;
        padding: 15px 20px;
    }
    .page-promotions__faq-answer {
        font-size: 1em;
        padding: 15px 20px;
    }
}

/* Color contrast enforcement (examples) */
.page-promotions__dark-bg {
    color: #ffffff; /* Deep background, white text */
    background: #017439;
}

.page-promotions__light-bg {
    color: #333333; /* Light background, dark text */
    background: #ffffff;
}

/* Specific text colors */
.page-promotions__hero-title {
    color: #FFFF00; /* Custom color for hero title */
}

/* Ensure all images maintain their original color */
.page-promotions img {
    filter: none;
}