/* style/promotions.css */
:root {
    --primary-color: #26A9E0;
    --secondary-color: #FFFFFF;
    --text-dark: #333333;
    --text-light: #FFFFFF;
    --button-login: #EA7C07;
    --background-color: #FFFFFF;
    --black-color: #000000;
}

.page-promotions {
    font-family: Arial, sans-serif;
    line-height: 1.6;
    color: var(--text-dark);
    background-color: var(--background-color);
    padding-top: var(--header-offset, 120px); /* Ensure content is below fixed header */
}

.page-promotions__section {
    padding: 60px 0;
    text-align: center;
}

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

.page-promotions__section-title {
    font-size: 36px;
    margin-bottom: 40px;
    color: var(--primary-color);
    font-weight: bold;
}

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

.page-promotions__inline-link {
    color: var(--primary-color);
    text-decoration: none;
    font-weight: bold;
    transition: color 0.3s ease;
}

.page-promotions__inline-link:hover {
    color: var(--button-login);
    text-decoration: underline;
}

/* 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: linear-gradient(135deg, var(--primary-color), rgba(38, 169, 224, 0.7));
    color: var(--text-light);
}

.page-promotions__hero-container {
    position: relative;
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.page-promotions__hero-image {
    width: 100%;
    margin-bottom: 30px;
    position: relative;
    z-index: 1;
}

.page-promotions__hero-image img {
    width: 100%;
    height: auto;
    max-width: 100%;
    display: block;
    border-radius: 8px;
    object-fit: cover;
}

.page-promotions__hero-content {
    position: relative;
    z-index: 2;
    text-align: center;
    width: 100%;
    margin-top: -80px; /* Overlap with image slightly for visual effect */
    background: rgba(0, 0, 0, 0.4);
    padding: 30px 20px;
    border-radius: 8px;
}

.page-promotions__main-title {
    font-size: 48px;
    margin-bottom: 20px;
    color: var(--text-light);
    font-weight: 900;
    line-height: 1.2;
}

.page-promotions__hero-description {
    font-size: 20px;
    margin-bottom: 30px;
    color: var(--text-light);
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
}

.page-promotions__cta-button {
    display: inline-block;
    padding: 15px 40px;
    background: var(--button-login);
    color: var(--text-light);
    text-decoration: none;
    border-radius: 50px;
    font-size: 20px;
    font-weight: bold;
    margin-top: 20px;
    transition: all 0.3s ease;
    box-shadow: 0 6px 15px rgba(0, 0, 0, 0.3);
    border: none;
    cursor: pointer;
}

.page-promotions__cta-button:hover {
    background: #FF8C00;
    transform: translateY(-3px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.4);
}

/* Promotion Intro */
.page-promotions__promotion-intro {
    background-color: var(--secondary-color);
    color: var(--text-dark);
}

/* Featured Promotions */
.page-promotions__featured-promotions {
    background-color: var(--primary-color);
    color: var(--text-light);
}

.page-promotions__featured-promotions .page-promotions__section-title {
    color: var(--text-light);
}

.page-promotions__grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
    text-align: left;
}

.page-promotions__card {
    background: var(--secondary-color);
    color: var(--text-dark);
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    display: flex;
    flex-direction: column;
    height: 100%;
}

.page-promotions__card:hover {
    transform: translateY(-8px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
}

.page-promotions__card-image {
    width: 100%;
    height: 200px;
    object-fit: cover;
    display: block;
}

.page-promotions__card-title {
    font-size: 24px;
    margin: 20px 20px 10px;
    color: var(--primary-color);
    font-weight: bold;
}

.page-promotions__card-description {
    font-size: 16px;
    margin: 0 20px 20px;
    flex-grow: 1;
}

.page-promotions__card .page-promotions__cta-button {
    margin: 0 20px 20px;
    width: calc(100% - 40px);
    padding: 12px 20px;
    font-size: 16px;
    border-radius: 8px;
    box-shadow: none;
}

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

.page-promotions__card .page-promotions__btn-primary:hover {
    background: #1e87c0;
}

/* How to Join */
.page-promotions__how-to-join {
    background-color: var(--secondary-color);
    color: var(--text-dark);
}

.page-promotions__numbered-list {
    list-style: none;
    padding: 0;
    margin: 0 auto;
    max-width: 800px;
    text-align: left;
}

.page-promotions__numbered-list li {
    margin-bottom: 25px;
    position: relative;
    padding-left: 50px;
    font-size: 18px;
    line-height: 1.6;
}

.page-promotions__numbered-list li::before {
    content: counter(list-item);
    counter-increment: list-item;
    position: absolute;
    left: 0;
    top: 0;
    background-color: var(--primary-color);
    color: var(--text-light);
    width: 35px;
    height: 35px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    font-size: 20px;
}

.page-promotions__list-item-title {
    font-size: 20px;
    color: var(--primary-color);
    margin: 0 0 5px 0;
}

/* Terms & Conditions */
.page-promotions__terms-conditions {
    background-color: var(--primary-color);
    color: var(--text-light);
}

.page-promotions__terms-conditions .page-promotions__section-title {
    color: var(--text-light);
}

.page-promotions__terms-conditions .page-promotions__text-block {
    color: var(--text-light);
}

.page-promotions__terms-conditions .page-promotions__inline-link {
    color: var(--button-login);
}

.page-promotions__terms-conditions .page-promotions__inline-link:hover {
    color: var(--text-light);
}

.page-promotions__bullet-list {
    list-style: disc;
    padding-left: 40px;
    margin: 0 auto;
    max-width: 800px;
    text-align: left;
    color: var(--text-light);
}

.page-promotions__bullet-list li {
    margin-bottom: 10px;
    font-size: 17px;
}

/* FAQ Section */
.page-promotions__faq-section {
    background-color: var(--secondary-color);
    color: var(--text-dark);
}

.page-promotions__faq-list {
    max-width: 900px;
    margin: 0 auto;
    text-align: left;
}

.page-promotions__faq-item {
    margin-bottom: 15px;
    border-radius: 8px;
    overflow: hidden;
    border: 1px solid #e0e0e0;
}

.page-promotions__faq-question {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 18px 25px;
    background: var(--secondary-color);
    cursor: pointer;
    user-select: none;
    transition: background-color 0.3s ease, border-color 0.3s ease;
}

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

.page-promotions__faq-question h3 {
    margin: 0;
    padding: 0;
    flex: 1;
    font-size: 18px;
    font-weight: 600;
    line-height: 1.5;
    color: var(--text-dark);
    pointer-events: none;
}

.page-promotions__faq-toggle {
    font-size: 28px;
    font-weight: bold;
    line-height: 1;
    color: var(--primary-color);
    transition: transform 0.3s ease, color 0.3s ease;
    flex-shrink: 0;
    margin-left: 15px;
    pointer-events: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 30px;
    height: 30px;
}

.page-promotions__faq-answer {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.4s cubic-bezier(0.4, 0, 0.2, 1), padding 0.4s ease, opacity 0.4s ease;
    padding: 0 25px;
    opacity: 0;
    background: #f9f9f9;
    color: var(--text-dark);
}

.page-promotions__faq-item.active .page-promotions__faq-answer {
    max-height: 2000px !important;
    padding: 20px 25px !important;
    opacity: 1;
    border-top: 1px solid #e0e0e0;
}

.page-promotions__faq-item.active .page-promotions__faq-toggle {
    transform: rotate(0deg);
    color: var(--button-login);
}

/* Final CTA */
.page-promotions__final-cta {
    background-color: var(--primary-color);
    color: var(--text-light);
    padding: 80px 0;
}

.page-promotions__final-cta .page-promotions__section-title {
    color: var(--text-light);
    margin-bottom: 30px;
}

.page-promotions__final-cta .page-promotions__text-block {
    color: var(--text-light);
    max-width: 900px;
    margin-left: auto;
    margin-right: auto;
    font-size: 18px;
    margin-bottom: 40px;
}

.page-promotions__final-cta .page-promotions__inline-link {
    color: var(--button-login);
}

.page-promotions__final-cta .page-promotions__inline-link:hover {
    color: var(--text-light);
}

.page-promotions__button-group {
    display: flex;
    justify-content: center;
    gap: 20px;
    margin-top: 30px;
    flex-wrap: wrap;
}

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

.page-promotions__btn-secondary:hover {
    background: #f0f0f0;
    color: #1e87c0;
    border-color: #1e87c0;
}

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

.page-promotions__dark-section .page-promotions__text-block {
    color: var(--text-light);
}

/* Color Contrast Safeguard - Light Background */
.page-promotions__light-bg {
    background: var(--secondary-color);
    color: var(--text-dark);
}

.page-promotions__light-bg .page-promotions__text-block {
    color: var(--text-dark);
}

/* Responsive Design */
@media (max-width: 1024px) {
    .page-promotions__main-title {
        font-size: 40px;
    }
    .page-promotions__section-title {
        font-size: 30px;
    }
    .page-promotions__hero-content {
        margin-top: -60px;
    }
}

@media (max-width: 768px) {
    .page-promotions {
        padding-top: var(--header-offset, 120px) !important;
        font-size: 16px;
        line-height: 1.6;
    }

    .page-promotions__section {
        padding: 40px 0;
    }

    .page-promotions__container {
        padding: 0 15px;
        max-width: 100% !important;
        width: 100% !important;
        box-sizing: border-box !important;
    }

    .page-promotions__main-title {
        font-size: 32px;
        margin-bottom: 15px;
    }

    .page-promotions__hero-description {
        font-size: 16px;
        margin-bottom: 20px;
    }

    .page-promotions__cta-button {
        padding: 12px 25px;
        font-size: 16px;
        max-width: 100% !important;
        width: 100% !important;
        box-sizing: border-box !important;
        white-space: normal !important;
        word-wrap: break-word !important;
    }

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

    .page-promotions__text-block {
        font-size: 15px;
        text-align: justify;
    }

    .page-promotions__hero-content {
        margin-top: -40px;
        padding: 20px 15px;
    }

    .page-promotions__grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }

    .page-promotions__card {
        margin-left: auto;
        margin-right: auto;
        width: 100%;
        max-width: 450px; /* Constrain card width on smaller mobiles */
    }

    .page-promotions__card-title {
        font-size: 20px;
        margin: 15px 15px 8px;
    }

    .page-promotions__card-description {
        font-size: 14px;
        margin: 0 15px 15px;
    }

    .page-promotions__card .page-promotions__cta-button {
        margin: 0 15px 15px;
        width: calc(100% - 30px);
    }

    .page-promotions__numbered-list {
        max-width: 100%;
        padding-left: 0;
    }

    .page-promotions__numbered-list li {
        padding-left: 45px;
        font-size: 16px;
    }

    .page-promotions__list-item-title {
        font-size: 18px;
    }

    .page-promotions__numbered-list li::before {
        width: 30px;
        height: 30px;
        font-size: 18px;
    }

    .page-promotions__bullet-list {
        max-width: 100%;
        padding-left: 20px;
    }

    .page-promotions__bullet-list li {
        font-size: 15px;
    }

    .page-promotions__faq-question {
        padding: 15px 20px;
    }

    .page-promotions__faq-question h3 {
        font-size: 16px;
    }

    .page-promotions__faq-toggle {
        font-size: 24px;
        width: 25px;
        height: 25px;
    }

    .page-promotions__faq-answer {
        padding: 0 20px;
    }

    .page-promotions__faq-item.active .page-promotions__faq-answer {
        padding: 15px 20px !important;
    }

    .page-promotions__final-cta {
        padding: 50px 0;
    }

    .page-promotions__final-cta .page-promotions__text-block {
        font-size: 16px;
    }

    .page-promotions__button-group {
        flex-direction: column;
        gap: 15px;
        padding: 0 15px;
    }

    .page-promotions__button-group .page-promotions__cta-button {
        width: 100%;
    }

    /* Ensure all images are responsive and prevent overflow */
    .page-promotions img {
        max-width: 100% !important;
        height: auto !important;
        display: block !important;
    }

    .page-promotions__hero-image img,
    .page-promotions__card-image {
        min-width: 200px !important;
        min-height: 200px !important;
    }

    .page-promotions__hero-section {
        padding-left: 0 !important;
        padding-right: 0 !important;
    }

    .page-promotions__hero-image {
        padding: 0 15px;
        box-sizing: border-box;
    }
}

@media (max-width: 480px) {
    .page-promotions__main-title {
        font-size: 28px;
    }
    .page-promotions__section-title {
        font-size: 22px;
    }
    .page-promotions__hero-description {
        font-size: 15px;
    }
    .page-promotions__cta-button {
        font-size: 15px;
    }
    .page-promotions__card-title {
        font-size: 18px;
    }
    .page-promotions__numbered-list li,
    .page-promotions__bullet-list li,
    .page-promotions__text-block {
        font-size: 14px;
    }
    .page-promotions__faq-question h3 {
        font-size: 15px;
    }
}