/* style/promotions.css */
/* Base styles for the promotions page */
.page-promotions {
    font-family: Arial, sans-serif;
    line-height: 1.6;
    color: #ffffff; /* Default text color for dark body background */
    background-color: transparent; /* Body background is handled by shared.css */
}

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

/* Hero Section */
.page-promotions__hero-section {
    position: relative;
    padding: 80px 0;
    padding-top: var(--header-offset, 120px); /* Ensure content is not hidden by fixed header */
    background-color: #017439; /* Brand primary color for hero background */
    color: #ffffff;
    text-align: center;
    overflow: hidden; /* For image responsiveness */
}

.page-promotions__hero-content {
    max-width: 800px;
    margin: 0 auto;
    position: relative;
    z-index: 2;
}

.page-promotions__hero-title {
    font-size: 3.2em;
    margin-bottom: 20px;
    font-weight: bold;
    color: #FFFF00; /* Custom color for prominent title */
}

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

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

.page-promotions__hero-image-wrapper {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
    opacity: 0.3; /* Make background image subtle */
    display: flex;
    justify-content: center;
    align-items: center;
    overflow: hidden;
}

.page-promotions__hero-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    filter: brightness(0.7); /* Darken image slightly for text contrast */
}

/* Buttons */
.page-promotions__btn-primary,
.page-promotions__btn-secondary,
.page-promotions__btn-login,
.page-promotions__btn-register {
    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;
    box-sizing: border-box;
    max-width: 100%; /* For mobile responsiveness */
    white-space: normal; /* Allow text wrapping */
    word-wrap: break-word; /* Allow text breaking */
}

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

.page-promotions__btn-primary:hover {
    background-color: #005a2e; /* Darker green on hover */
    border-color: #005a2e;
}

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

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

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

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

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

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

/* General Section Styles */
.page-promotions__section-title {
    font-size: 2.5em;
    text-align: center;
    margin-bottom: 20px;
    font-weight: bold;
    color: #FFFF00; /* Highlight important titles */
}

.page-promotions__section-description {
    font-size: 1.1em;
    text-align: center;
    max-width: 800px;
    margin: 0 auto 40px auto;
    color: #f0f0f0;
}

/* Light background section */
.page-promotions__light-bg {
    background-color: #ffffff; /* Custom background color */
    color: #333333; /* Dark text for light background */
    padding: 60px 0;
}

.page-promotions__light-bg .page-promotions__section-title {
    color: #017439; /* Brand primary for titles on light background */
}

.page-promotions__light-bg .page-promotions__section-description,
.page-promotions__light-bg .page-promotions__feature-text,
.page-promotions__light-bg .page-promotions__step-text,
.page-promotions__light-bg .page-promotions__faq-answer,
.page-promotions__light-bg .page-promotions__terms-item {
    color: #333333;
}

/* Dark background section */
.page-promotions__dark-bg {
    background-color: #1a1a1a; /* Slightly lighter than body bg for distinction */
    color: #ffffff;
    padding: 60px 0;
}

.page-promotions__dark-bg .page-promotions__section-title {
    color: #FFFF00; /* Yellow for titles on dark background */
}

.page-promotions__dark-bg .page-promotions__section-description {
    color: #f0f0f0;
}

/* Why Choose Us Section */
.page-promotions__why-choose-us {
    padding: 60px 0;
}

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

.page-promotions__feature-item {
    background-color: #f9f9f9;
    padding: 30px;
    border-radius: 10px;
    text-align: center;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
}

.page-promotions__feature-title {
    font-size: 1.5em;
    color: #017439;
    margin-bottom: 15px;
}

.page-promotions__feature-text {
    font-size: 1em;
    color: #555555;
}

/* Types of Promotions Section */
.page-promotions__types-of-promotions {
    padding: 60px 0;
}

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

.page-promotions__card {
    background-color: #ffffff;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
    display: flex;
    flex-direction: column;
    height: 100%;
}

.page-promotions__card-image {
    width: 100%;
    height: 250px; /* Fixed height for consistency */
    object-fit: cover;
    display: block;
}

.page-promotions__card-content {
    padding: 25px;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    color: #333333; /* Dark text for white card background */
}

.page-promotions__card-title {
    font-size: 1.4em;
    color: #017439;
    margin-bottom: 15px;
    font-weight: bold;
}

.page-promotions__card-text {
    font-size: 0.95em;
    line-height: 1.5;
    margin-bottom: 20px;
    flex-grow: 1;
}

.page-promotions__card-content .page-promotions__btn-primary,
.page-promotions__card-content .page-promotions__btn-register {
    width: 100%;
    text-align: center;
    margin-top: auto; /* Push button to the bottom */
}


/* How to Claim Section */
.page-promotions__how-to-claim {
    padding: 60px 0;
}

.page-promotions__steps-list {
    list-style: none;
    padding: 0;
    margin-top: 40px;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 30px;
}

.page-promotions__step-item {
    background-color: #f9f9f9;
    padding: 30px;
    border-radius: 10px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
    text-align: center;
}

.page-promotions__step-title {
    font-size: 1.5em;
    color: #017439;
    margin-bottom: 15px;
    position: relative;
    padding-left: 40px;
    text-align: left;
}

.page-promotions__step-title::before {
    content: counter(step-counter);
    counter-increment: step-counter;
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 30px;
    height: 30px;
    background-color: #017439;
    color: #ffffff;
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 0.8em;
    font-weight: bold;
}

.page-promotions__step-item:first-child { counter-reset: step-counter; } /* Reset counter for first item */

.page-promotions__step-text {
    font-size: 1em;
    color: #555555;
    text-align: left;
}

.page-promotions__cta-bottom {
    text-align: center;
    margin-top: 60px;
}

/* Terms and Conditions Section */
.page-promotions__terms-conditions {
    padding: 60px 0;
}

.page-promotions__terms-list {
    list-style: disc;
    padding-left: 25px;
    max-width: 800px;
    margin: 40px auto;
    color: #f0f0f0;
    text-align: left;
}

.page-promotions__terms-item {
    margin-bottom: 15px;
    font-size: 1.1em;
}

/* FAQ Section */
.page-promotions__faq-section {
    padding: 60px 0;
}

.page-promotions__faq-grid {
    display: grid;
    grid-template-columns: 1fr 1.5fr;
    gap: 50px;
    align-items: center;
    margin-top: 40px;
}

.page-promotions__faq-image-wrapper {
    text-align: center;
}

.page-promotions__faq-image {
    max-width: 100%;
    height: auto;
    border-radius: 10px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
    display: block; /* Ensure it behaves as a block element */
}

.page-promotions__faq-items {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

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

.page-promotions__faq-item summary::-webkit-details-marker {
    display: none; /* Hide default marker for Webkit browsers */
}

.page-promotions__faq-item summary {
    list-style: none; /* Hide default marker for other browsers */
}

.page-promotions__faq-question {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 18px 25px;
    font-size: 1.1em;
    font-weight: bold;
    cursor: pointer;
    background-color: #f0f0f0;
    border-bottom: 1px solid #e0e0e0;
    list-style: none; /* For details/summary */
}

.page-promotions__faq-qtext {
    flex-grow: 1;
    color: #017439;
}

.page-promotions__faq-toggle {
    font-size: 1.5em;
    line-height: 1;
    width: 20px;
    text-align: center;
    color: #017439;
}

.page-promotions__faq-answer {
    padding: 15px 25px 20px;
    font-size: 1em;
    line-height: 1.6;
    color: #555555;
}

/* Final CTA Section */
.page-promotions__cta-final {
    padding: 80px 0;
    text-align: center;
}

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

/* Responsive Design */
@media (max-width: 1024px) {
    .page-promotions__hero-title {
        font-size: 2.8em;
    }
    .page-promotions__section-title {
        font-size: 2em;
    }
    .page-promotions__faq-grid {
        grid-template-columns: 1fr;
    }
    .page-promotions__faq-image-wrapper {
        order: -1; /* Move image above FAQ items on smaller screens */
        margin-bottom: 30px;
    }
}

@media (max-width: 768px) {
    .page-promotions__container {
        padding: 0 15px;
    }

    .page-promotions__hero-section {
        padding: 60px 0;
        padding-top: var(--header-offset, 120px) !important; /* Re-apply for mobile */
    }

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

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

    .page-promotions__hero-cta {
        flex-direction: column;
        gap: 15px;
    }
    .page-promotions__btn-primary,
    .page-promotions__btn-secondary,
    .page-promotions__btn-login,
    .page-promotions__btn-register {
        max-width: 100% !important;
        width: 100% !important;
        padding: 12px 20px;
        font-size: 0.9em;
    }

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

    .page-promotions__section-description {
        font-size: 0.95em;
    }

    .page-promotions__features-grid,
    .page-promotions__promotion-grid,
    .page-promotions__steps-list {
        grid-template-columns: 1fr;
    }

    .page-promotions__card-image {
        height: 200px; /* Adjust card image height for mobile */
    }

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

    /* Mobile image responsiveness */
    .page-promotions img {
        max-width: 100% !important;
        width: 100% !important;
        height: auto !important;
        display: block !important;
    }

    /* All containers that might hold images/buttons */
    .page-promotions__hero-section,
    .page-promotions__why-choose-us,
    .page-promotions__types-of-promotions,
    .page-promotions__how-to-claim,
    .page-promotions__terms-conditions,
    .page-promotions__faq-section,
    .page-promotions__cta-final,
    .page-promotions__feature-item,
    .page-promotions__step-item,
    .page-promotions__faq-item {
        max-width: 100% !important;
        width: 100% !important;
        box-sizing: border-box !important;
        padding-left: 15px;
        padding-right: 15px;
    }
    .page-promotions__hero-section {
        padding-left: 0 !important;
        padding-right: 0 !important;
    }
    .page-promotions__faq-section .page-promotions__container {
        padding-left: 0 !important;
        padding-right: 0 !important;
    }
    .page-promotions__faq-grid {
        padding-left: 15px !important;
        padding-right: 15px !important;
    }
    .page-promotions__hero-image-wrapper {
        padding: 0 !important; /* Remove padding for hero image wrapper */
    }
    .page-promotions__hero-image {
        filter: brightness(0.5) !important; /* Make hero image darker for better text contrast on mobile */
    }

    /* Ensure containers for buttons are also responsive */
    .page-promotions__hero-cta,
    .page-promotions__cta-buttons {
        max-width: 100% !important;
        width: 100% !important;
        box-sizing: border-box !important;
        padding-left: 15px;
        padding-right: 15px;
        flex-wrap: wrap !important; /* Allow buttons to wrap */
        gap: 10px;
    }
}

/* Ensure images maintain original color and no color-changing filters */
.page-promotions img {
    filter: none; /* Reset any unwanted filters globally */
}
.page-promotions__hero-image {
    filter: brightness(0.7); /* Specific brightness for hero image for contrast */
}
@media (max-width: 768px) {
    .page-promotions__hero-image {
        filter: brightness(0.5) !important; /* Darker for mobile contrast */
    }
}

/* Specific color contrast fixes if needed based on the intelligent system */
/* For example, if a section unexpectedly has low contrast */
.page-promotions__contrast-fix {
    background: #ffffff !important;
    color: #333333 !important;
    border: 1px solid #e0e0e0 !important;
}

.page-promotions__text-contrast-fix {
    color: #333333 !important;
    text-shadow: none !important;
}

/* Ensure all links have appropriate colors for contrast */
.page-promotions a {
    color: #017439; /* Brand color for links on light background */
    text-decoration: underline;
}

.page-promotions__dark-bg a {
    color: #FFFF00; /* Yellow for links on dark background */
}

.page-promotions__dark-bg a:hover,
.page-promotions__light-bg a:hover {
    opacity: 0.8;
}

.page-promotions__faq-qtext a {
    color: #017439;
}

.page-promotions__faq-answer a {
    color: #017439;
}

.page-promotions__terms-list a {
    color: #FFFF00;
}