/* style/promotions.css */

/* Root variables for colors */
:root {
    --primary-color: #017439; /* Main green */
    --secondary-color: #FFFFFF; /* White */
    --register-color: #C30808; /* Red for register */
    --login-color: #C30808; /* Red for login */
    --register-login-font-color: #FFFF00; /* Yellow for register/login font */
    --background-color: #FFFFFF; /* Page background */
    --text-color-dark: #333333; /* Dark text for light backgrounds */
    --text-color-light: #ffffff; /* Light text for dark backgrounds */
    --border-color: #e0e0e0;
    --card-bg: #ffffff;
}

/* Base styles for the page content */
.page-promotions {
    font-family: 'Arial', sans-serif;
    color: var(--text-color-dark); /* Default text color for light body background */
    background-color: var(--background-color);
    line-height: 1.6;
}

/* Section common styles */
.page-promotions__section {
    padding: 60px 20px;
    margin-bottom: 0; /* Ensure no extra margin */
}

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

.page-promotions__section-title {
    font-size: 32px;
    font-weight: bold;
    color: var(--primary-color);
    text-align: center;
    margin-bottom: 40px;
    position: relative;
    padding-bottom: 15px;
}

.page-promotions__section-title::after {
    content: '';
    position: absolute;
    left: 50%;
    bottom: 0;
    transform: translateX(-50%);
    width: 80px;
    height: 4px;
    background-color: var(--primary-color);
    border-radius: 2px;
}

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

.page-promotions__section-title--light::after {
    background-color: var(--text-color-light);
}

.page-promotions__text-block {
    font-size: 16px;
    line-height: 1.7;
    margin-bottom: 30px;
    text-align: justify;
}

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

/* 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); /* Fixed header offset */
    background: linear-gradient(135deg, var(--primary-color), #3498db); /* Example gradient, can be adjusted */
    overflow: hidden; /* Ensure content doesn't overflow */
}

.page-promotions__hero-container {
    position: relative;
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    z-index: 1; /* Ensure content is above image if image is background-like */
}

.page-promotions__hero-image {
    width: 100%;
    margin-bottom: 30px;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
}

.page-promotions__hero-image img {
    width: 100%;
    height: auto;
    max-width: 100%;
    display: block;
    object-fit: cover;
    border-radius: 8px;
    /* No filter to change color */
}

.page-promotions__hero-content {
    position: relative;
    z-index: 2;
    text-align: center;
    width: 100%;
    color: var(--text-color-light); /* Light text on dark/gradient hero background */
}

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

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

.page-promotions__cta-button {
    display: inline-block;
    padding: 15px 40px;
    background: var(--register-color); /* Register color for CTA */
    color: var(--register-login-font-color); /* Register font color */
    text-decoration: none;
    border-radius: 5px;
    font-size: 18px;
    font-weight: bold;
    margin-top: 30px;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
    border: none;
}

.page-promotions__cta-button:hover {
    background: #a80707; /* Slightly darker red on hover */
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.3);
}

/* Featured Promotions Grid */
.page-promotions__featured-promos {
    background-color: var(--primary-color); /* Dark background for this section */
    color: var(--text-color-light);
}

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

.page-promotions__card {
    background: var(--card-bg);
    border-radius: 10px;
    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;
    color: var(--text-color-dark); /* Dark text on card background */
}

.page-promotions__card:hover {
    transform: translateY(-8px);
    box-shadow: 0 12px 25px rgba(0, 0, 0, 0.15);
}

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

.page-promotions__card-content {
    padding: 25px;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
}

.page-promotions__card-title {
    font-size: 22px;
    font-weight: bold;
    margin-bottom: 15px;
    color: var(--primary-color);
}

.page-promotions__card-description {
    font-size: 15px;
    line-height: 1.6;
    margin-bottom: 20px;
    flex-grow: 1;
}

.page-promotions__btn-primary {
    display: inline-block;
    padding: 12px 25px;
    background: var(--primary-color);
    color: var(--text-color-light);
    text-decoration: none;
    border-radius: 5px;
    font-size: 16px;
    font-weight: 600;
    transition: background-color 0.3s ease, transform 0.3s ease;
    border: none;
    text-align: center;
}

.page-promotions__btn-primary:hover {
    background: #005f2e; /* Darker shade of primary */
    transform: translateY(-2px);
}

.page-promotions__btn-secondary {
    display: inline-block;
    padding: 12px 25px;
    background: transparent;
    color: var(--primary-color);
    border: 2px solid var(--primary-color);
    text-decoration: none;
    border-radius: 5px;
    font-size: 16px;
    font-weight: 600;
    transition: all 0.3s ease;
    text-align: center;
}

.page-promotions__btn-secondary:hover {
    background: var(--primary-color);
    color: var(--text-color-light);
    transform: translateY(-2px);
}

.page-promotions__btn-secondary--light {
    color: var(--text-color-light);
    border-color: var(--text-color-light);
}

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


/* Game Specific Promotions Tabs */
.page-promotions__game-specific-promos {
    background-color: var(--background-color); /* Light background */
}

.page-promotions__game-promo-tabs {
    margin-top: 40px;
}

.page-promotions__tab-buttons {
    display: flex;
    justify-content: center;
    gap: 15px;
    margin-bottom: 30px;
    flex-wrap: wrap; /* Allow wrapping on small screens */
}

.page-promotions__tab-button {
    background: #f0f0f0;
    color: var(--primary-color);
    border: 1px solid var(--primary-color);
    padding: 12px 25px;
    border-radius: 25px;
    cursor: pointer;
    font-size: 16px;
    font-weight: 600;
    transition: all 0.3s ease;
    white-space: nowrap; /* Prevent text wrapping within button */
}

.page-promotions__tab-button:hover {
    background: var(--primary-color);
    color: var(--text-color-light);
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
}

.page-promotions__tab-button.active {
    background: var(--primary-color);
    color: var(--text-color-light);
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
}

.page-promotions__tab-content {
    background: var(--card-bg);
    border-radius: 10px;
    padding: 30px;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.08);
    min-height: 200px; /* Ensure some height for content */
}

.page-promotions__tab-pane {
    display: none;
    animation: fadeIn 0.5s ease-in-out forwards;
}

.page-promotions__tab-pane.active {
    display: block;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

.page-promotions__tab-pane-title {
    font-size: 24px;
    color: var(--primary-color);
    margin-bottom: 15px;
}

.page-promotions__tab-pane p {
    margin-bottom: 20px;
}


/* How-to-Claim Section */
.page-promotions__how-to-claim {
    background-color: #f8f8f8;
}

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

.page-promotions__step-item {
    background: var(--card-bg);
    border-radius: 10px;
    padding: 30px;
    box-shadow: 0 3px 15px rgba(0, 0, 0, 0.05);
    text-align: center;
    transition: transform 0.3s ease;
}

.page-promotions__step-item:hover {
    transform: translateY(-5px);
}

.page-promotions__step-icon {
    font-size: 36px;
    font-weight: bold;
    color: var(--primary-color);
    background: #e6ffe6; /* Light green background */
    border-radius: 50%;
    width: 70px;
    height: 70px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 20px;
    border: 2px solid var(--primary-color);
}

.page-promotions__step-title {
    font-size: 20px;
    font-weight: bold;
    color: var(--primary-color);
    margin-bottom: 15px;
}

.page-promotions__step-item p a {
    color: var(--primary-color);
    text-decoration: none;
    font-weight: bold;
}

.page-promotions__step-item p a:hover {
    text-decoration: underline;
}

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

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

.page-promotions__faq-list {
    margin-top: 40px;
}

/* FAQ item styles */
.page-promotions__faq-item {
    margin-bottom: 15px;
    border-radius: 5px;
    overflow: hidden;
    background-color: var(--card-bg);
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
}

/* FAQ default state - answer hidden */
.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 15px;
    opacity: 0;
}

/* FAQ expanded state - \u26A0\uFE0F Use!important and sufficiently large max-height */
.page-promotions__faq-item.active .page-promotions__faq-answer {
    max-height: 2000px !important; /* \u26A0\uFE0F Use!important to ensure priority, value large enough to accommodate any content */
    padding: 20px 15px !important;
    opacity: 1;
    background: #f9f9f9;
    border-radius: 0 0 5px 5px;
    border-top: 1px solid var(--border-color);
}

/* Question styles */
.page-promotions__faq-question {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 18px 20px;
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 5px;
    cursor: pointer;
    user-select: none;
    transition: background-color 0.3s ease, border-color 0.3s ease;
    position: relative;
}

.page-promotions__faq-item.active .page-promotions__faq-question {
    border-bottom-left-radius: 0;
    border-bottom-right-radius: 0;
    border-bottom-color: transparent;
}


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

.page-promotions__faq-question:active {
    background: #eeeeee;
}

/* Question title styles */
.page-promotions__faq-question h3 {
    margin: 0;
    padding: 0;
    flex: 1;
    font-size: 16px;
    font-weight: 600;
    line-height: 1.5;
    pointer-events: none; /* Prevent h3 tag from blocking click events */
    color: var(--primary-color);
}

/* Toggle icon */
.page-promotions__faq-toggle {
    font-size: 24px;
    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; /* Prevent icon from blocking click events */
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background-color: #e6ffe6;
}

.page-promotions__faq-item.active .page-promotions__faq-toggle {
    color: var(--primary-color);
    transform: rotate(45deg); /* Rotate for 'x' or '-' effect */
}


/* Bottom CTA Section */
.page-promotions__cta-bottom {
    background-color: var(--primary-color);
    color: var(--text-color-light);
    text-align: center;
    padding: 80px 20px;
}

.page-promotions__cta-container {
    max-width: 900px;
}

.page-promotions__button-group {
    display: flex;
    justify-content: center;
    gap: 20px;
    margin-top: 40px;
    flex-wrap: wrap; /* Allow wrapping for multiple buttons */
}

.page-promotions__btn-lg {
    padding: 15px 40px;
    font-size: 18px;
    font-weight: bold;
    min-width: 220px;
}

/* Specific colors for login/register buttons */
.page-promotions__cta-bottom .page-promotions__btn-primary {
    background-color: var(--register-color);
    color: var(--register-login-font-color);
}

.page-promotions__cta-bottom .page-promotions__btn-primary:hover {
    background-color: #a80707;
}

.page-promotions__cta-bottom .page-promotions__btn-secondary {
    background-color: var(--secondary-color);
    color: var(--login-color);
    border-color: var(--login-color);
}

.page-promotions__cta-bottom .page-promotions__btn-secondary:hover {
    background-color: var(--login-color);
    color: var(--register-login-font-color);
}


/* Responsive Design */
@media (max-width: 1024px) {
    .page-promotions__hero-title {
        font-size: 42px;
    }
    .page-promotions__section-title {
        font-size: 28px;
    }
    .page-promotions__promo-grid {
        grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    }
    .page-promotions__card-image {
        height: 220px;
    }
}

@media (max-width: 768px) {
    .page-promotions__hero-section {
        padding-top: var(--header-offset, 120px) !important; /* Mobile fixed header offset */
        padding-bottom: 40px;
    }
    .page-promotions__hero-image {
        margin-bottom: 20px;
    }
    .page-promotions__hero-image img {
        border-radius: 4px;
    }
    .page-promotions__hero-title {
        font-size: 32px;
        margin-bottom: 15px;
    }
    .page-promotions__hero-description {
        font-size: 16px;
        margin-bottom: 30px;
    }
    .page-promotions__cta-button {
        padding: 12px 30px;
        font-size: 16px;
        margin-top: 20px;
    }

    .page-promotions__section {
        padding: 40px 15px;
    }
    .page-promotions__container {
        padding: 0; /* Remove inner padding as section has it */
    }
    .page-promotions__section-title {
        font-size: 24px;
        margin-bottom: 30px;
    }
    .page-promotions__text-block {
        font-size: 15px;
    }

    .page-promotions__promo-grid {
        grid-template-columns: 1fr; /* Stack cards on mobile */
        gap: 20px;
    }
    .page-promotions__card-image {
        height: 200px;
    }
    .page-promotions__card-title {
        font-size: 20px;
    }
    .page-promotions__card-content {
        padding: 20px;
    }
    .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-left: 15px;
        padding-right: 15px;
    }
    .page-promotions__button-group {
        flex-direction: column; /* Stack buttons vertically */
        gap: 15px;
    }
    .page-promotions__btn-lg {
        min-width: unset;
        width: 100%;
    }

    /* Images responsiveness */
    .page-promotions img {
        max-width: 100% !important;
        width: 100% !important;
        height: auto !important;
        object-fit: cover;
    }
    .page-promotions__section,
    .page-promotions__card,
    .page-promotions__container {
        max-width: 100% !important;
        width: 100% !important;
        box-sizing: border-box !important;
        padding-left: 15px;
        padding-right: 15px;
        overflow-x: hidden; /* Prevent horizontal scroll */
    }

    .page-promotions__tab-buttons {
        flex-direction: column; /* Stack tab buttons */
        gap: 10px;
    }
    .page-promotions__tab-button {
        width: 100%;
        border-radius: 5px;
    }
    .page-promotions__tab-content {
        padding: 20px;
    }
    .page-promotions__tab-pane-title {
        font-size: 20px;
    }

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

    /* FAQ Mobile */
    .page-promotions__faq-question {
        padding: 15px;
        flex-wrap: wrap;
    }
    .page-promotions__faq-question h3 {
        font-size: 15px;
        margin-bottom: 0;
        width: calc(100% - 40px);
    }
    .page-promotions__faq-toggle {
        margin-left: 10px;
        width: 24px;
        height: 24px;
        font-size: 20px;
    }
    .page-promotions__faq-answer {
        padding: 0 15px;
    }
    .page-promotions__faq-item.active .page-promotions__faq-answer {
        padding: 15px !important;
    }
}