/* style/promotions.css */

/* Variables and general styling for the page */
:root {
    --q99-primary-color: #26A9E0;
    --q99-secondary-color: #FFFFFF;
    --q99-dark-text: #333333;
    --q99-light-text: #FFFFFF;
    --q99-login-color: #EA7C07;
    --q99-background-light: #FFFFFF;
    --q99-background-dark: #000000; /* Assuming --black-color from shared.css is dark */
}

.page-promotions {
    font-family: Arial, sans-serif;
    line-height: 1.6;
    color: var(--q99-light-text); /* Default text color for the page, assuming dark body background */
    background-color: transparent; /* Body background handled by shared.css */
}

/* Section specific styling */
.page-promotions__section {
    padding: 60px 20px;
    margin-bottom: 20px;
    box-sizing: border-box;
}

.page-promotions__hero-section {
    padding-top: 10px; /* Small top padding, body handles --header-offset */
    display: flex;
    flex-direction: column; /* Image above text */
    align-items: center;
    text-align: center;
    background: linear-gradient(135deg, var(--q99-primary-color), #1a7bb0); /* Use brand color with gradient */
    position: relative;
    overflow: hidden;
}

.page-promotions__hero-image-wrapper {
    width: 100%;
    max-width: 1920px; /* Max width for hero image */
    margin-bottom: 20px; /* Space between image and content */
}

.page-promotions__hero-image {
    width: 100%;
    height: auto;
    display: block;
    object-fit: cover;
}

.page-promotions__hero-content {
    max-width: 900px;
    margin: 0 auto;
    z-index: 1; /* Ensure text is above any background effects */
    padding: 0 20px 40px;
}

.page-promotions__main-title {
    font-size: clamp(2.2rem, 4vw, 3.2rem); /* Responsive font size */
    font-weight: 700;
    line-height: 1.2;
    margin-bottom: 20px;
    color: var(--q99-light-text);
}

.page-promotions__description {
    font-size: 1.1rem;
    margin-bottom: 30px;
    color: var(--q99-light-text);
}

.page-promotions__section-title {
    font-size: clamp(1.8rem, 3.5vw, 2.8rem);
    font-weight: 700;
    margin-bottom: 30px;
    text-align: center;
}

.page-promotions__sub-title {
    font-size: clamp(1.4rem, 2.5vw, 2rem);
    font-weight: 600;
    margin-top: 30px;
    margin-bottom: 15px;
}

.page-promotions__text-block {
    margin-bottom: 15px;
}

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

/* Backgrounds and text colors based on contrast rules */
.page-promotions__dark-bg {
    background-color: var(--q99-primary-color); /* Using brand color as dark background */
    color: var(--q99-light-text);
}

.page-promotions__light-bg {
    background-color: var(--q99-background-light);
    color: var(--q99-dark-text);
}

/* Buttons */
.page-promotions__btn-primary,
.page-promotions__btn-secondary {
    display: inline-block;
    padding: 12px 25px;
    border-radius: 8px;
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s ease;
    cursor: pointer;
    text-align: center;
    box-sizing: border-box; /* Ensures padding doesn't push width */
}

.page-promotions__btn-primary {
    background-color: var(--q99-login-color); /* Using login color for primary CTA */
    color: var(--q99-light-text);
    border: 2px solid var(--q99-login-color);
}

.page-promotions__btn-primary:hover {
    background-color: #d16b00; /* Slightly darker orange */
    border-color: #d16b00;
}

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

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

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

/* Images in content */
.page-promotions__image-content {
    width: 100%;
    height: auto;
    display: block;
    margin: 30px auto;
    border-radius: 8px;
    max-width: 800px; /* Example max-width */
    object-fit: cover;
}

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

.page-promotions__promo-card {
    background-color: rgba(255, 255, 255, 0.1); /* Semi-transparent white on dark background */
    border-radius: 12px;
    padding: 25px;
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    color: var(--q99-light-text);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

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

.page-promotions__card-title {
    font-size: 1.5rem;
    font-weight: 600;
    margin-bottom: 15px;
    color: var(--q99-light-text);
}

.page-promotions__card-list {
    list-style: none;
    padding: 0;
    margin-bottom: 20px;
    text-align: left;
    width: 100%;
}

.page-promotions__card-list li {
    margin-bottom: 8px;
    padding-left: 20px;
    position: relative;
}

.page-promotions__card-list li::before {
    content: '✓';
    color: var(--q99-login-color); /* Checkmark color */
    position: absolute;
    left: 0;
}

.page-promotions__promo-card .page-promotions__btn-secondary {
    margin-top: auto; /* Push button to bottom */
    width: calc(100% - 20px); /* Adjust width for padding */
    max-width: 200px; /* Max width for card buttons */
    color: var(--q99-light-text); /* Ensure light text on dark card background */
    border-color: var(--q99-light-text);
}

.page-promotions__promo-card .page-promotions__btn-secondary:hover {
    background-color: var(--q99-light-text);
    color: var(--q99-primary-color);
}

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

.page-promotions__step-card {
    background-color: var(--q99-background-light);
    color: var(--q99-dark-text);
    border-radius: 12px;
    padding: 25px;
    text-align: center;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    display: flex;
    flex-direction: column;
    align-items: center;
}

.page-promotions__step-title {
    font-size: 1.6rem;
    font-weight: 600;
    margin-bottom: 15px;
    color: var(--q99-primary-color);
}

.page-promotions__step-card p {
    margin-bottom: 20px;
}

.page-promotions__step-card .page-promotions__btn-primary {
    margin-top: auto;
    width: calc(100% - 20px);
    max-width: 200px;
}

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

.page-promotions__faq-item {
    background-color: rgba(255, 255, 255, 0.9); /* Slightly off-white for contrast */
    border-radius: 8px;
    margin-bottom: 15px;
    overflow: hidden;
    color: var(--q99-dark-text);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
}

.page-promotions__faq-question {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 18px 25px;
    cursor: pointer;
    font-weight: 600;
    font-size: 1.1rem;
    color: var(--q99-primary-color);
    background-color: #f0f8ff; /* Light blue background for summary */
}

/* Hide default details marker */
.page-promotions__faq-item summary {
    list-style: none;
}
.page-promotions__faq-item summary::-webkit-details-marker {
    display: none;
}

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

.page-promotions__faq-item[open] .page-promotions__faq-toggle {
    transform: rotate(45deg); /* Rotate plus to form an X or minus */
}

.page-promotions__faq-answer {
    padding: 0 25px 20px;
    font-size: 1rem;
    color: var(--q99-dark-text);
}

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

.page-promotions__faq-answer .page-promotions__btn-secondary {
    margin-top: 15px;
    color: var(--q99-primary-color);
    border-color: var(--q99-primary-color);
}
.page-promotions__faq-answer .page-promotions__btn-secondary:hover {
    background-color: var(--q99-primary-color);
    color: var(--q99-light-text);
}


/* Responsive styles */
@media (max-width: 1024px) {
    .page-promotions__main-title {
        font-size: clamp(2rem, 5vw, 2.8rem);
    }
    .page-promotions__description {
        font-size: 1rem;
    }
    .page-promotions__section-title {
        font-size: clamp(1.6rem, 4vw, 2.4rem);
    }
    .page-promotions__promo-card {
        padding: 20px;
    }
}

@media (max-width: 768px) {
    .page-promotions__section {
        padding: 40px 15px;
    }
    .page-promotions__hero-section {
        padding-top: 10px !important; /* Ensure small top padding */
        padding-bottom: 40px;
    }
    .page-promotions__hero-content {
        padding: 0 15px 30px;
    }
    .page-promotions__main-title {
        font-size: clamp(1.8rem, 6vw, 2.5rem);
    }
    .page-promotions__section-title {
        font-size: clamp(1.5rem, 5vw, 2.2rem);
    }
    .page-promotions__sub-title {
        font-size: clamp(1.2rem, 4vw, 1.8rem);
    }

    /* Images responsiveness */
    .page-promotions img {
        max-width: 100% !important;
        width: 100% !important;
        height: auto !important;
        display: block !important;
    }
    .page-promotions__hero-image-wrapper,
    .page-promotions__image-content,
    .page-promotions__card-image {
        max-width: 100% !important;
        width: 100% !important;
        box-sizing: border-box !important;
        height: auto !important; /* Override fixed height for card image on mobile if needed */
    }
    .page-promotions__card-image {
        height: 180px; /* Adjust height for mobile cards */
    }

    /* Containers and sections responsiveness */
    .page-promotions__section,
    .page-promotions__container,
    .page-promotions__promo-card,
    .page-promotions__step-card,
    .page-promotions__faq-item {
        max-width: 100% !important;
        width: 100% !important;
        box-sizing: border-box !important;
        padding-left: 15px;
        padding-right: 15px;
        overflow: hidden !important; /* Prevent horizontal scroll */
    }

    /* 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;
        margin-left: 0 !important; /* Remove horizontal margins */
        margin-right: 0 !important;
        padding-left: 15px; /* Add padding to button content */
        padding-right: 15px;
    }

    .page-promotions__cta-buttons {
        flex-direction: column !important; /* Stack buttons vertically */
        gap: 15px !important;
        padding-left: 15px;
        padding-right: 15px;
        max-width: 100% !important;
        width: 100% !important;
        box-sizing: border-box !important;
    }

    .page-promotions__promo-card .page-promotions__btn-secondary,
    .page-promotions__step-card .page-promotions__btn-primary {
        max-width: 100% !important;
        width: 100% !important;
        margin-top: 20px !important;
    }

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