/* style/promotions.css */

/* Base Styles for page-promotions */
.page-promotions {
    font-family: Arial, sans-serif;
    line-height: 1.6;
    color: #333333; /* Dark text on light body background */
    background-color: #f0f2f5; /* Matches shared.css body background */
}

/* Container for consistent padding and max-width */
.page-promotions__container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
    box-sizing: border-box;
}

/* Section titles */
.page-promotions__section-title {
    font-size: 2.5em;
    color: #017439; /* Brand primary color */
    text-align: center;
    margin-bottom: 40px;
    font-weight: bold;
}

/* Text blocks */
.page-promotions__text-block {
    font-size: 1.1em;
    margin-bottom: 20px;
    text-align: justify;
}

/* Buttons */
.page-promotions__btn-primary,
.page-promotions__btn-secondary {
    display: inline-block;
    padding: 12px 25px;
    border-radius: 8px;
    text-decoration: none;
    font-weight: bold;
    transition: background-color 0.3s ease, color 0.3s ease, border-color 0.3s ease;
    text-align: center;
    box-sizing: border-box; /* Crucial for responsiveness */
    white-space: normal; /* Allow text wrapping */
    word-wrap: break-word; /* Allow text wrapping */
}

.page-promotions__btn-primary {
    background-color: #017439; /* Brand primary color */
    color: #ffffff;
    border: 2px solid #017439;
}

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

.page-promotions__btn-secondary {
    background-color: #ffffff;
    color: #017439; /* Brand primary color for text */
    border: 2px solid #017439;
}

.page-promotions__btn-secondary:hover {
    background-color: #f0f2f5; /* Lighter background */
    color: #005a2e; /* Slightly darker primary */
    border-color: #005a2e;
}

/* Custom button colors for Register/Login, ensuring contrast */
.page-promotions__btn-register,
.page-promotions__btn-login {
    background-color: #C30808; /* Custom red */
    color: #FFFFFF; /* White text for contrast, overriding #FFFF00 due to low contrast */
    border-color: #C30808;
}

.page-promotions__btn-register:hover,
.page-promotions__btn-login:hover {
    background-color: #a00606; /* Darker red */
    border-color: #a00606;
}

/* Hero Section */
.page-promotions__hero-section {
    position: relative;
    padding: 60px 20px;
    padding-top: var(--header-offset, 120px); /* Fixed header offset */
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 600px;
    overflow: hidden; /* Ensure hero image doesn't overflow */
}

.page-promotions__hero-section .page-promotions__container {
    position: relative;
    z-index: 2;
    text-align: center;
    color: #ffffff;
    max-width: 900px;
}

.page-promotions__hero-title {
    font-size: 3.5em;
    margin-bottom: 20px;
    font-weight: bold;
    line-height: 1.2;
}

.page-promotions__hero-description {
    font-size: 1.3em;
    margin-bottom: 30px;
    line-height: 1.5;
}

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

.page-promotions__hero-image {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    z-index: 1;
    opacity: 0.7; /* Slightly dim the image for text readability */
}

/* Introduction Section */
.page-promotions__introduction-section {
    padding: 60px 0;
    text-align: center;
}

.page-promotions__content-image {
    max-width: 100%;
    height: auto;
    display: block;
    margin: 40px auto;
    border-radius: 10px;
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.1);
    min-width: 200px;
    min-height: 200px;
}

/* Types Section - Card Grid */
.page-promotions__types-section {
    padding: 60px 0;
    background-color: #f8f8f8; /* Slightly different light background */
}

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

.page-promotions__card {
    background-color: #ffffff;
    border-radius: 10px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
    padding: 25px;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    transition: transform 0.3s ease;
    min-height: 500px; /* Ensure cards have enough space for content and image */
}

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

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

.page-promotions__card-title {
    font-size: 1.5em;
    color: #017439;
    margin-bottom: 15px;
    font-weight: bold;
}

.page-promotions__card-description {
    font-size: 1em;
    color: #555555;
    margin-bottom: 20px;
    flex-grow: 1; /* Allows description to take available space */
}

/* How to Claim Section */
.page-promotions__how-to-claim-section {
    padding: 60px 0;
    background-color: #017439; /* Brand primary dark background */
    color: #ffffff;
    text-align: center;
}

.page-promotions__how-to-claim-section .page-promotions__section-title {
    color: #ffffff;
}

.page-promotions__steps-list {
    list-style: none;
    padding: 0;
    margin: 40px auto;
    max-width: 800px;
}

.page-promotions__steps-list li {
    background-color: rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    margin-bottom: 20px;
    padding: 20px;
    text-align: left;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

.page-promotions__step-title {
    font-size: 1.3em;
    color: #ffffff;
    margin-bottom: 10px;
}

.page-promotions__steps-list p {
    font-size: 1em;
    color: #e0e0e0;
}

.page-promotions__steps-list a {
    color: #FFFF00; /* Yellow for links on dark background */
    text-decoration: underline;
}

.page-promotions__steps-list a:hover {
    color: #ffd700;
}

/* Video Section */
.page-promotions__video-wrapper {
    position: relative;
    padding-bottom: 56.25%; /* 16:9 Aspect Ratio */
    height: 0;
    overflow: hidden;
    max-width: 100%;
    background: #000;
    margin-top: 40px;
    border-radius: 10px;
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.3);
}

.page-promotions__video {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: 0;
    display: block; /* Ensure it behaves as a block element */
    cursor: pointer; /* Indicate it's clickable */
}

.page-promotions__video-caption {
    margin-top: 20px;
    font-style: italic;
    font-size: 0.9em;
    color: #e0e0e0;
}

/* Terms and Conditions Section */
.page-promotions__terms-section {
    padding: 60px 0;
    text-align: center;
}

.page-promotions__terms-list {
    list-style: disc;
    padding-left: 20px;
    margin: 40px auto;
    max-width: 800px;
    text-align: left;
    color: #555555;
}

.page-promotions__terms-list li {
    margin-bottom: 10px;
    font-size: 1.05em;
}

.page-promotions__terms-section a {
    color: #017439; /* Brand primary color for links */
    text-decoration: underline;
}

.page-promotions__terms-section a:hover {
    color: #005a2e;
}

/* FAQ Section */
.page-promotions__faq-section {
    padding: 60px 0;
    background-color: #f8f8f8;
}

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

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

.page-promotions__faq-question {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 25px;
    cursor: pointer;
    background-color: #ffffff;
    border-bottom: 1px solid #e0e0e0;
    transition: background-color 0.3s ease;
}

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

.page-promotions__faq-title {
    font-size: 1.2em;
    color: #017439;
    margin: 0;
    font-weight: bold;
}

.page-promotions__faq-toggle {
    font-size: 1.5em;
    font-weight: bold;
    color: #017439;
    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 25px;
    transition: max-height 0.3s ease, padding 0.3s ease;
    background-color: #fcfcfc;
}

.page-promotions__faq-item.active .page-promotions__faq-answer {
    max-height: 1000px !important; /* Sufficiently large value */
    padding: 15px 25px 20px;
}

.page-promotions__faq-answer p {
    margin: 0;
    color: #555555;
    font-size: 1em;
}

.page-promotions__faq-answer a {
    color: #017439;
    text-decoration: underline;
}

.page-promotions__faq-answer a:hover {
    color: #005a2e;
}

/* Why Choose Section */
.page-promotions__why-choose-section {
    padding: 60px 0;
    background-color: #017439;
    color: #ffffff;
    text-align: center;
}

.page-promotions__why-choose-section .page-promotions__section-title {
    color: #ffffff;
}

.page-promotions__why-list {
    list-style: none;
    padding: 0;
    margin: 40px auto;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 30px;
    max-width: 1000px;
}

.page-promotions__why-list li {
    background-color: rgba(255, 255, 255, 0.1);
    border-radius: 10px;
    padding: 25px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
    text-align: left;
}

.page-promotions__why-item-title {
    font-size: 1.4em;
    color: #ffffff;
    margin-bottom: 10px;
    font-weight: bold;
}

.page-promotions__why-list p {
    font-size: 1em;
    color: #e0e0e0;
}

.page-promotions__btn-join-now {
    margin-top: 40px;
    font-size: 1.2em;
    padding: 15px 35px;
    background-color: #C30808; /* Red for strong CTA */
    color: #FFFFFF; /* White text for contrast */
    border-color: #C30808;
}

.page-promotions__btn-join-now:hover {
    background-color: #a00606;
    border-color: #a00606;
}

/* Call to Action Section */
.page-promotions__cta-section {
    padding: 60px 0;
    text-align: center;
}

.page-promotions__cta-section .page-promotions__section-title {
    color: #017439;
}

.page-promotions__cta-section .page-promotions__text-block {
    max-width: 800px;
    margin: 0 auto 30px;
    font-size: 1.1em;
}

.page-promotions__cta-section .page-promotions__text-block a {
    color: #017439;
    text-decoration: underline;
}

.page-promotions__cta-section .page-promotions__text-block a:hover {
    color: #005a2e;
}

/* Images Global */
.page-promotions img {
    max-width: 100%;
    height: auto;
    display: block; /* Prevent extra space below images */
    min-width: 200px; /* Global minimum size for all content images */
    min-height: 200px; /* Global minimum size for all content images */
}

/* Responsive adjustments */
@media (max-width: 1024px) {
    .page-promotions__hero-title {
        font-size: 3em;
    }
    .page-promotions__hero-description {
        font-size: 1.1em;
    }
    .page-promotions__section-title {
        font-size: 2em;
    }
    .page-promotions__card-grid {
        grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    }
}

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

    /* Fixed header offset for mobile, applied to first content section */
    .page-promotions__hero-section {
        padding-top: var(--header-offset, 120px) !important;
        min-height: 400px;
    }

    .page-promotions__hero-title {
        font-size: 2.2em;
    }
    .page-promotions__hero-description {
        font-size: 1em;
    }
    .page-promotions__section-title {
        font-size: 1.8em;
    }

    .page-promotions__cta-group {
        flex-direction: column; /* Stack buttons vertically */
        gap: 15px;
    }

    .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__cta-group,
    .page-promotions__button-group,
    .page-promotions__btn-container {
        max-width: 100% !important;
        width: 100% !important;
        box-sizing: border-box !important;
        padding-left: 15px;
        padding-right: 15px;
        flex-wrap: wrap !important; /* Ensure buttons wrap */
        gap: 10px;
    }

    .page-promotions__container {
        padding: 15px;
    }

    .page-promotions__card-grid {
        grid-template-columns: 1fr; /* Single column for cards */
    }

    .page-promotions__card {
        min-height: auto; /* Allow height to adjust */
    }

    /* Images responsiveness */
    .page-promotions img {
        max-width: 100% !important;
        height: auto !important;
        display: block !important;
    }
    .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;
    }

    /* Video responsiveness */
    .page-promotions video,
    .page-promotions__video {
        max-width: 100% !important;
        width: 100% !important;
        height: auto !important;
        display: block !important;
    }
    .page-promotions__video-section,
    .page-promotions__video-container,
    .page-promotions__video-wrapper {
        max-width: 100% !important;
        width: 100% !important;
        box-sizing: border-box !important;
        padding-left: 15px;
        padding-right: 15px;
        overflow: hidden !important;
    }
    .page-promotions__video-wrapper {
        padding-bottom: 56.25% !important; /* Maintain aspect ratio */
        height: 0 !important;
    }

    .page-promotions__faq-question,
    .page-promotions__faq-answer {
        padding-left: 15px;
        padding-right: 15px;
    }
    .page-promotions__faq-item.active .page-promotions__faq-answer {
        padding: 15px 15px 20px !important;
    }
    .page-promotions__why-list {
        grid-template-columns: 1fr;
    }
}

/* Color contrast enforcement for dark/light backgrounds */
.page-promotions__dark-bg {
    background-color: #017439;
    color: #ffffff;
}
.page-promotions__dark-bg .page-promotions__section-title {
    color: #ffffff;
}
.page-promotions__dark-bg .page-promotions__text-block,
.page-promotions__dark-bg .page-promotions__steps-list p,
.page-promotions__dark-bg .page-promotions__why-list p {
    color: #e0e0e0;
}
.page-promotions__dark-bg .page-promotions__steps-list a {
    color: #FFFF00; /* Yellow for links on dark background */
    text-decoration: underline;
}