/* style/promotions.css */

/* Variables from shared.css or global context */
:root {
    --primary-color: #E53935;
    --secondary-color: #FF5A4F;
    --text-main-color: #333333;
    --card-bg-color: #FFFFFF;
    --page-bg-color: #F5F7FA;
    --border-color: #E0E0E0;
    --header-offset: 120px; /* Default, will be overridden by shared if present */
}

.page-promotions {
    font-family: Arial, sans-serif;
    line-height: 1.6;
    color: var(--text-main-color); /* Default text color for the page */
    background-color: var(--page-bg-color);
}

/* Hero Section */
.page-promotions__hero-section {
    position: relative;
    padding-top: 10px; /* Small top padding, assuming body has --header-offset */
    margin-bottom: 40px;
    text-align: center;
    overflow: hidden;
    background-color: var(--primary-color); /* Fallback background */
    display: flex; /* For image-then-text layout */
    flex-direction: column; /* Image on top, content below */
    align-items: center;
}

.page-promotions__hero-image {
    max-width: 100%;
    height: auto;
    display: block;
    object-fit: cover; /* Desktop: cover to fill space */
    width: 100%; /* Ensure it takes full width of its container */
}

.page-promotions__hero-content {
    max-width: 900px;
    margin: 20px auto 40px;
    padding: 0 20px;
    color: #ffffff; /* White text on brand color background */
}

.page-promotions__main-title {
    font-size: clamp(2em, 4vw, 3.5em); /* Responsive font size for H1 */
    font-weight: 700;
    line-height: 1.2;
    margin-bottom: 15px;
    color: #ffffff;
}

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

/* CTA Buttons */
.page-promotions__cta-buttons {
    display: flex;
    justify-content: center;
    gap: 20px;
    margin-top: 30px;
}

.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;
    max-width: 100%;
    box-sizing: border-box;
    white-space: normal;
    word-wrap: break-word;
}

.page-promotions__btn-primary {
    background: linear-gradient(180deg, var(--secondary-color) 0%, var(--primary-color) 100%);
    color: #ffffff;
    border: 2px solid transparent;
}

.page-promotions__btn-primary:hover {
    opacity: 0.9;
    transform: translateY(-2px);
}

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

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

/* General Section Styling */
.page-promotions__container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 40px 20px;
}

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

.page-promotions__introduction-section,
.page-promotions__terms-section,
.page-promotions__why-choose-section {
    background-color: var(--page-bg-color);
    color: var(--text-main-color);
}

.page-promotions__dark-bg {
    background-color: var(--primary-color);
    color: #ffffff;
}

.page-promotions__dark-bg .page-promotions__section-title {
    color: #ffffff;
}

.page-promotions__text-block {
    font-size: 1.05em;
    margin-bottom: 20px;
    text-align: justify;
}

.page-promotions__content-image {
    max-width: 100%;
    height: auto;
    display: block;
    margin: 30px auto;
    border-radius: 10px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

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

.page-promotions__card {
    background-color: var(--card-bg-color);
    border-radius: 10px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08);
    padding: 25px;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    border: 1px solid var(--border-color);
    color: var(--text-main-color);
    transition: transform 0.3s ease;
}

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

.page-promotions__card-image {
    max-width: 100%;
    height: auto;
    border-radius: 8px;
    margin-bottom: 20px;
    min-width: 200px; /* Minimum size requirement */
    min-height: 200px; /* Minimum size requirement */
    object-fit: cover;
}

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

.page-promotions__card-description {
    font-size: 1em;
    margin-bottom: 25px;
    flex-grow: 1; /* Ensures cards with less text still align buttons */
}

.page-promotions__card .page-promotions__btn-primary {
    margin-top: auto; /* Push button to the bottom */
}


/* Terms & Conditions Section */
.page-promotions__terms-list {
    margin-top: 30px;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 25px;
}

.page-promotions__term-item {
    background-color: var(--card-bg-color);
    padding: 25px;
    border-radius: 10px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
    border: 1px solid var(--border-color);
    color: var(--text-main-color);
}

.page-promotions__term-title {
    font-size: 1.4em;
    font-weight: 600;
    margin-bottom: 10px;
    color: var(--primary-color);
}

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

/* Guide Section */
.page-promotions__guide-list {
    list-style: none;
    padding: 0;
    margin-top: 30px;
}

.page-promotions__guide-item {
    background-color: rgba(255, 255, 255, 0.1); /* Light transparent white on dark background */
    border-radius: 10px;
    padding: 25px;
    margin-bottom: 20px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    color: #ffffff;
}

.page-promotions__guide-title {
    font-size: 1.5em;
    font-weight: 600;
    margin-bottom: 10px;
    color: var(--secondary-color);
}

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

/* Advantages Section */
.page-promotions__advantages-list {
    list-style: none;
    padding: 0;
    margin-top: 30px;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 25px;
}

.page-promotions__advantage-item {
    background-color: var(--card-bg-color);
    padding: 25px;
    border-radius: 10px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
    border: 1px solid var(--border-color);
    text-align: center;
    color: var(--text-main-color);
}

.page-promotions__advantage-title {
    font-size: 1.4em;
    font-weight: 600;
    margin-bottom: 10px;
    color: var(--primary-color);
}

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

/* FAQ Section */
.page-promotions__faq-section {
    padding-bottom: 60px; /* Add some padding at the bottom */
}

.page-promotions__faq-list {
    margin-top: 30px;
    max-width: 900px;
    margin-left: auto;
    margin-right: auto;
}

.page-promotions__faq-item {
    background-color: rgba(255, 255, 255, 0.1); /* Light transparent white on dark background */
    border-radius: 10px;
    margin-bottom: 15px;
    overflow: hidden;
    color: #ffffff;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.page-promotions__faq-question {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 18px 25px;
    font-size: 1.15em;
    font-weight: 600;
    cursor: pointer;
    background-color: rgba(255, 255, 255, 0.05);
    transition: background-color 0.3s ease;
    list-style: none; /* For details/summary */
    color: #ffffff;
}

.page-promotions__faq-question::-webkit-details-marker,
.page-promotions__faq-question::marker {
    display: none;
}

.page-promotions__faq-question:hover {
    background-color: rgba(255, 255, 255, 0.15);
}

.page-promotions__faq-toggle {
    font-size: 1.5em;
    line-height: 1;
    margin-left: 15px;
    color: var(--secondary-color);
}

.page-promotions__faq-answer {
    padding: 0 25px 20px;
    font-size: 1em;
    color: #f0f0f0;
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease-out, padding 0.3s ease-out;
}

.page-promotions__faq-item[open] .page-promotions__faq-answer {
    max-height: 500px; /* Arbitrary large value for smooth transition */
    padding-top: 15px;
}

.page-promotions__faq-item[open] .page-promotions__faq-toggle {
    content: "−";
}


/* --- Responsive Styles --- */

/* Tablet and smaller desktops */
@media (max-width: 1024px) {
    .page-promotions__main-title {
        font-size: clamp(1.8em, 5vw, 3em);
    }

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

    .page-promotions__container {
        padding: 30px 20px;
    }

    .page-promotions__promotion-cards,
    .page-promotions__terms-list,
    .page-promotions__advantages-list {
        grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
        gap: 25px;
    }
}

/* Mobile Devices */
@media (max-width: 768px) {
    .page-promotions {
        font-size: 16px;
        line-height: 1.6;
    }

    .page-promotions__hero-section {
        padding-top: 10px !important; /* Small top padding, assuming body has --header-offset */
        margin-bottom: 30px;
    }

    .page-promotions__hero-image {
        max-width: 100% !important;
        width: 100% !important;
        height: auto !important;
        object-fit: contain; /* Mobile: contain to show full image without cropping */
        aspect-ratio: unset; /* Remove aspect ratio constraint if present */
        max-height: none; /* Remove max-height constraint if present */
    }

    .page-promotions__hero-content {
        margin: 15px auto 30px;
        padding: 0 15px;
    }

    .page-promotions__main-title {
        font-size: clamp(1.5em, 8vw, 2.5em);
        margin-bottom: 10px;
    }

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

    .page-promotions__cta-buttons {
        flex-direction: column;
        gap: 15px;
        width: 100%;
        max-width: 100%;
        box-sizing: border-box;
        padding: 0 15px; /* Add padding to container */
        overflow: hidden;
    }

    .page-promotions__btn-primary,
    .page-promotions__btn-secondary {
        max-width: 100% !important;
        width: 100% !important;
        box-sizing: border-box !important;
        white-space: normal !important;
        word-wrap: break-word !important;
        padding-left: 15px; /* Ensure padding for text inside buttons */
        padding-right: 15px;
    }

    .page-promotions__container {
        padding: 25px 15px; /* Adjust container padding for mobile */
        max-width: 100% !important;
        width: 100% !important;
        box-sizing: border-box !important;
    }

    .page-promotions__section-title {
        font-size: 1.8em;
        margin-bottom: 20px;
    }

    .page-promotions__promotion-cards,
    .page-promotions__terms-list,
    .page-promotions__advantages-list {
        grid-template-columns: 1fr; /* Single column for cards/items */
        gap: 20px;
    }

    .page-promotions__card,
    .page-promotions__term-item,
    .page-promotions__guide-item,
    .page-promotions__advantage-item {
        padding: 20px;
        max-width: 100% !important;
        width: 100% !important;
        box-sizing: border-box !important;
    }

    .page-promotions__card-image,
    .page-promotions__content-image {
        max-width: 100% !important;
        width: 100% !important;
        height: auto !important;
        min-width: 200px !important;
        min-height: 200px !important;
        object-fit: cover; /* Still cover for content images */
    }

    .page-promotions__card-title,
    .page-promotions__term-title,
    .page-promotions__guide-title,
    .page-promotions__advantage-title {
        font-size: 1.3em;
    }

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

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

/* Ensure all images are responsive by default */
.page-promotions img {
    max-width: 100%;
    height: auto;
    display: block;
}

/* Specific mobile image rules for all images and containers */
@media (max-width: 768px) {
    .page-promotions img {
        max-width: 100% !important;
        width: 100% !important;
        height: auto !important;
    }

    .page-promotions__section,
    .page-promotions__card,
    .page-promotions__container,
    .page-promotions__hero-section,
    .page-promotions__introduction-section,
    .page-promotions__types-section,
    .page-promotions__terms-section,
    .page-promotions__guide-section,
    .page-promotions__why-choose-section,
    .page-promotions__faq-section {
        max-width: 100% !important;
        width: 100% !important;
        box-sizing: border-box !important;
        padding-left: 15px;
        padding-right: 15px;
    }
}