/* style/promotions.css */

/* Cấu hình biến màu */
:root {
    --primary-color: #26A9E0;
    --secondary-color: #FFFFFF;
    --text-dark: #333333;
    --text-light: #ffffff;
    --bg-dark: #1a1a1a;
    --bg-light: #f8f9fa;
    --login-button-color: #EA7C07;
}

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

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

/* Hero Section */
.page-promotions__hero-section {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 600px;
    padding: 100px 0;
    background-color: var(--primary-color);
    color: var(--text-light);
    text-align: center;
    overflow: hidden;
    padding-top: var(--header-offset, 120px); /* Adjust for fixed header */
}

.page-promotions__hero-content {
    position: relative;
    z-index: 2;
    max-width: 800px;
    padding: 20px;
    background-color: rgba(0, 0, 0, 0.4); /* Semi-transparent overlay for text readability */
    border-radius: 10px;
}

.page-promotions__main-title {
    font-size: 3.5em;
    margin-bottom: 20px;
    font-weight: bold;
    line-height: 1.2;
    color: var(--secondary-color);
}

.page-promotions__hero-description {
    font-size: 1.2em;
    margin-bottom: 30px;
    color: var(--secondary-color);
}

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

.page-promotions__btn-primary,
.page-promotions__btn-secondary {
    display: inline-block;
    padding: 15px 30px;
    border-radius: 5px;
    text-decoration: none;
    font-weight: bold;
    transition: all 0.3s ease;
    box-sizing: border-box;
    max-width: 100%;
    white-space: normal;
    word-wrap: break-word;
}

.page-promotions__btn-primary {
    background-color: var(--login-button-color);
    color: var(--text-light);
    border: 2px solid var(--login-button-color);
}

.page-promotions__btn-primary:hover {
    background-color: darken(var(--login-button-color), 10%);
    border-color: darken(var(--login-button-color), 10%);
}

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

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

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

.page-promotions__hero-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0.6;
}

/* General Section Styles */
.page-promotions__section {
    padding: 60px 0;
}

.page-promotions__section-title {
    font-size: 2.5em;
    text-align: center;
    margin-bottom: 40px;
    color: var(--primary-color);
    font-weight: bold;
}

.page-promotions__sub-title {
    font-size: 1.8em;
    margin-top: 30px;
    margin-bottom: 20px;
    color: var(--primary-color);
}

.page-promotions__text-block {
    font-size: 1.1em;
    margin-bottom: 20px;
    color: var(--text-light);
}

.page-promotions__text-block a {
    color: var(--primary-color);
    text-decoration: underline;
}

.page-promotions__list {
    list-style: disc inside;
    margin-bottom: 20px;
    padding-left: 20px;
}

.page-promotions__list-item {
    margin-bottom: 10px;
    color: var(--text-light);
}

/* Image Card */
.page-promotions__image-card {
    margin: 40px auto;
    max-width: 800px;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

.page-promotions__image {
    width: 100%;
    height: auto;
    display: block;
    min-width: 200px;
    min-height: 200px;
    object-fit: cover;
}

/* Grid for Promotion Types */
.page-promotions__grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
    margin-top: 40px;
}

.page-promotions__card {
    background-color: rgba(255, 255, 255, 0.1);
    border-radius: 10px;
    padding: 25px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
    text-align: center;
    transition: transform 0.3s ease;
    color: var(--text-light);
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.page-promotions__card:hover {
    transform: translateY(-10px);
}

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

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

.page-promotions__card-title a {
    color: var(--primary-color);
    text-decoration: none;
}

.page-promotions__card-title a:hover {
    text-decoration: underline;
}

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

.page-promotions__btn-text {
    display: inline-block;
    margin-top: auto; /* Push to bottom */
    color: var(--login-button-color);
    text-decoration: none;
    font-weight: bold;
    transition: color 0.3s ease;
}

.page-promotions__btn-text:hover {
    color: darken(var(--login-button-color), 10%);
}

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

.page-promotions__faq .page-promotions__section-title {
    color: var(--primary-color);
}

.page-promotions__faq-list {
    max-width: 800px;
    margin: 0 auto;
}

.page-promotions__faq-item {
    background-color: var(--secondary-color);
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    margin-bottom: 15px;
    overflow: hidden;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

.page-promotions__faq-question {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px;
    font-size: 1.2em;
    font-weight: bold;
    color: var(--text-dark);
    cursor: pointer;
    background-color: var(--secondary-color);
    transition: background-color 0.3s ease;
}

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

.page-promotions__faq-toggle {
    font-size: 1.5em;
    font-weight: normal;
    color: var(--primary-color);
    transition: transform 0.3s ease;
}

.page-promotions__faq-item.active .page-promotions__faq-toggle {
    transform: rotate(45deg);
}

.page-promotions__faq-answer {
    max-height: 0;
    overflow: hidden;
    padding: 0 20px;
    transition: max-height 0.3s ease, padding 0.3s ease;
    color: var(--text-dark);
}

.page-promotions__faq-item.active .page-promotions__faq-answer {
    max-height: 1000px !important; /* Sufficient height for content */
    padding: 15px 20px;
}

.page-promotions__faq-answer p {
    margin-bottom: 15px;
    color: var(--text-dark);
}

.page-promotions__faq-answer a {
    color: var(--primary-color);
    text-decoration: underline;
}

/* Conclusion Section */
.page-promotions__conclusion {
    background-color: var(--primary-color);
    color: var(--text-light);
    text-align: center;
    padding: 80px 0;
}

.page-promotions__conclusion .page-promotions__section-title {
    color: var(--secondary-color);
}

.page-promotions__conclusion .page-promotions__text-block {
    max-width: 900px;
    margin: 0 auto 40px auto;
    color: var(--secondary-color);
}

.page-promotions__conclusion .page-promotions__btn-primary {
    background-color: var(--login-button-color);
    border-color: var(--login-button-color);
}

.page-promotions__conclusion .page-promotions__btn-primary:hover {
    background-color: darken(var(--login-button-color), 10%);
    border-color: darken(var(--login-button-color), 10%);
}

.page-promotions__conclusion .page-promotions__btn-secondary {
    background-color: transparent;
    color: var(--secondary-color);
    border-color: var(--secondary-color);
}

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

/* Responsive Design */
@media (max-width: 1024px) {
    .page-promotions__main-title {
        font-size: 2.8em;
    }
    .page-promotions__section-title {
        font-size: 2em;
    }
}

@media (max-width: 768px) {
    .page-promotions {
        font-size: 16px;
        line-height: 1.6;
    }
    .page-promotions__hero-section {
        min-height: 500px;
        padding: 80px 0;
        padding-top: var(--header-offset, 120px) !important; /* Ensure mobile header offset */
    }
    .page-promotions__hero-content {
        padding: 15px;
    }
    .page-promotions__main-title {
        font-size: 2.2em;
    }
    .page-promotions__hero-description {
        font-size: 1em;
    }
    .page-promotions__section-title {
        font-size: 1.8em;
    }
    .page-promotions__sub-title {
        font-size: 1.5em;
    }
    .page-promotions__cta-buttons {
        flex-direction: column;
        gap: 15px;
        padding: 0 15px;
    }
    .page-promotions__btn-primary,
    .page-promotions__btn-secondary {
        width: 100%;
        max-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__container {
        padding: 0 15px;
        max-width: 100% !important;
        width: 100% !important;
        box-sizing: border-box !important;
        overflow: hidden !important;
    }
    .page-promotions__grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    .page-promotions__card {
        padding: 20px;
    }
    .page-promotions__image-card,
    .page-promotions__card-image,
    .page-promotions__image {
        max-width: 100% !important;
        width: 100% !important;
        height: auto !important;
        display: block !important;
        min-width: 200px !important;
        min-height: 200px !important;
        box-sizing: border-box !important;
    }
    .page-promotions__faq-question {
        font-size: 1.1em;
        padding: 15px;
    }
    .page-promotions__faq-answer {
        padding: 0 15px;
    }
    .page-promotions__faq-item.active .page-promotions__faq-answer {
        padding: 15px !important;
    }
}

@media (max-width: 480px) {
    .page-promotions__main-title {
        font-size: 1.8em;
    }
    .page-promotions__hero-description {
        font-size: 0.9em;
    }
    .page-promotions__section-title {
        font-size: 1.5em;
    }
    .page-promotions__sub-title {
        font-size: 1.3em;
    }
}

/* Ensure content area images are not displayed smaller than 200px */
.page-promotions__section img {
    min-width: 200px;
    min-height: 200px;
}

/* No CSS filter on images */
.page-promotions img {
    filter: none;
}

/* Body background is dark, so text should be light by default */
.page-promotions {
    color: var(--text-light);
}

.page-promotions__overview .page-promotions__text-block,
.page-promotions__guide .page-promotions__text-block,
.page-promotions__guide .page-promotions__list-item,
.page-promotions__terms .page-promotions__text-block,
.page-promotions__terms .page-promotions__list-item {
    color: var(--text-light);
}

.page-promotions__faq {
    background-color: var(--bg-light);
    color: var(--text-dark);
}
.page-promotions__faq .page-promotions__faq-question,
.page-promotions__faq .page-promotions__faq-answer p {
    color: var(--text-dark);
}

.page-promotions__card {
    background-color: rgba(255, 255, 255, 0.05); /* Slightly visible on dark background */
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: var(--text-light);
}

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