/* style/promotions.css */

/* Color variables from custom palette */
:root {
    --primary-color: #113B7A;
    --secondary-color: #1D5FD1;
    --button-gradient: linear-gradient(180deg, #2B73F6 0%, #1144A6 100%);
    --card-bg: #10233F;
    --text-main: #F3F8FF;
    --text-secondary: #AFC4E8;
    --border-color: #244D84;
    --glow: #4FA8FF;
    --gold: #F2C14E;
    --divider: #1B3357;
    --deep-navy: #08162B;
}

/* Base styles for the page content */
.page-promotions {
    font-family: Arial, sans-serif;
    line-height: 1.6;
    color: var(--text-main); /* Light text for dark body background */
    background-color: transparent; /* Body background is handled by shared.css var(--deep-navy) */
}

/* Hero Section */
.page-promotions__hero-section {
    position: relative;
    padding-top: 10px; /* Small top padding, body handles header offset */
    padding-bottom: 60px;
    background-color: var(--deep-navy); /* Ensure section background is dark */
    color: var(--text-main);
    display: flex;
    flex-direction: column; /* Ensure image is above content */
    align-items: center;
    text-align: center;
    overflow: hidden; /* Prevent content overflow */
    box-sizing: border-box;
}

.page-promotions__hero-image-wrapper {
    width: 100%;
    max-height: 500px; /* Limit height for aesthetic */
    overflow: hidden;
    margin-bottom: 20px; /* Space between image and content */
    box-sizing: border-box;
}

.page-promotions__hero-image {
    width: 100%;
    height: auto;
    display: block;
    object-fit: cover;
}

.page-promotions__hero-content {
    max-width: 900px;
    padding: 0 20px;
    z-index: 1; /* Ensure content is above any potential background effects */
    box-sizing: border-box;
}

.page-promotions__main-title {
    font-size: clamp(2.5rem, 5vw, 3.5rem); /* Responsive font size for H1 */
    font-weight: 700;
    line-height: 1.2;
    margin-bottom: 20px;
    color: var(--text-main);
    max-width: 100%; /* Ensure H1 does not overflow */
    box-sizing: border-box;
}

.page-promotions__description {
    font-size: 1.1rem;
    margin-bottom: 30px;
    color: var(--text-secondary);
}

.page-promotions__cta-buttons {
    display: flex;
    justify-content: center;
    gap: 20px;
    flex-wrap: wrap; /* Allow buttons to wrap on smaller screens */
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
    overflow: hidden;
}

/* General button styles */
.page-promotions__btn-primary,
.page-promotions__btn-secondary,
.page-promotions a[class*="button"],
.page-promotions a[class*="btn"] {
    padding: 15px 30px;
    border-radius: 8px;
    text-decoration: none;
    font-weight: 700;
    font-size: 1rem;
    transition: all 0.3s ease;
    cursor: pointer;
    box-sizing: border-box;
    max-width: 100%; /* Ensure button does not overflow */
    white-space: normal; /* Allow text to wrap */
    word-wrap: break-word; /* Break long words */
    text-align: center;
}

.page-promotions__btn-primary {
    background: var(--button-gradient); /* Custom button gradient */
    color: var(--text-main); /* Light text on dark button */
    border: none;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
}

.page-promotions__btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.4);
    opacity: 0.9;
}

.page-promotions__btn-secondary {
    background: transparent;
    color: var(--glow); /* Gold text on transparent button */
    border: 2px solid var(--glow);
}

.page-promotions__btn-secondary:hover {
    background: var(--glow);
    color: var(--deep-navy);
    transform: translateY(-2px);
}

/* Container for main content sections */
.page-promotions__container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 40px 20px;
    box-sizing: border-box;
    width: 100%; /* Ensure container takes full width up to max-width */
}

.page-promotions__section-title {
    font-size: clamp(2rem, 4vw, 2.8rem);
    font-weight: 700;
    color: var(--text-main);
    text-align: center;
    margin-bottom: 20px;
    position: relative;
    padding-bottom: 10px;
}

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

.page-promotions__section-description {
    font-size: 1.1rem;
    color: var(--text-secondary);
    text-align: center;
    max-width: 800px;
    margin: 0 auto 50px auto;
}

/* Why Section */
.page-promotions__why-section {
    background-color: var(--deep-navy);
    padding: 60px 0;
    box-sizing: border-box;
}

.page-promotions__features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr)); /* Adjusted grid to fit larger icons */
    gap: 30px;
    margin-top: 40px;
}

.page-promotions__feature-card {
    background-color: var(--card-bg);
    border-radius: 12px;
    padding: 30px;
    text-align: center;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.2);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    color: var(--text-main);
    border: 1px solid var(--border-color);
    box-sizing: border-box;
}

.page-promotions__feature-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.3);
}

.page-promotions__feature-icon {
    width: 200px; /* Enforce minimum display size */
    height: 200px; /* Enforce minimum display size */
    margin-bottom: 20px;
    object-fit: contain;
    display: block; /* Ensure it respects width/height */
    margin-left: auto;
    margin-right: auto;
}

.page-promotions__feature-title {
    font-size: 1.5rem;
    font-weight: 600;
    margin-bottom: 15px;
    color: var(--text-main);
}

.page-promotions__feature-text {
    font-size: 1rem;
    color: var(--text-secondary);
}

/* Types Section */
.page-promotions__types-section {
    background-color: var(--deep-navy);
    padding: 60px 0;
    box-sizing: border-box;
}

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

.page-promotions__promotion-card {
    background-color: var(--card-bg);
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.2);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    color: var(--text-main);
    border: 1px solid var(--border-color);
    display: flex;
    flex-direction: column;
    box-sizing: border-box;
}

.page-promotions__promotion-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.3);
}

.page-promotions__promotion-image {
    width: 100%;
    height: 220px; /* Fixed height for consistency */
    object-fit: cover;
    display: block;
}

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

.page-promotions__promotion-title {
    font-size: 1.6rem;
    font-weight: 600;
    margin-bottom: 15px;
    color: var(--text-main);
}

.page-promotions__promotion-text {
    font-size: 1rem;
    color: var(--text-secondary);
    margin-bottom: 25px;
    flex-grow: 1; /* Push button to bottom */
}

.page-promotions__promotion-card .page-promotions__btn-primary {
    align-self: flex-start; /* Align button to start of card content */
    margin-top: auto; /* Push button to bottom if content varies */
}

/* Claim Guide Section */
.page-promotions__claim-guide-section {
    background-color: var(--deep-navy);
    padding: 60px 0;
    box-sizing: border-box;
}

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

.page-promotions__step-card {
    background-color: var(--card-bg);
    border-radius: 12px;
    padding: 30px;
    text-align: center;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.2);
    color: var(--text-main);
    border: 1px solid var(--border-color);
    box-sizing: border-box;
}

.page-promotions__step-number {
    width: 60px;
    height: 60px;
    background: var(--button-gradient);
    color: var(--text-main);
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 2rem;
    font-weight: 700;
    margin: 0 auto 20px auto;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
}

.page-promotions__step-title {
    font-size: 1.4rem;
    font-weight: 600;
    margin-bottom: 15px;
    color: var(--text-main);
}

.page-promotions__step-text {
    font-size: 1rem;
    color: var(--text-secondary);
}

.page-promotions__step-text a {
    color: var(--glow); /* Link color */
    text-decoration: underline;
    transition: color 0.3s ease;
}

.page-promotions__step-text a:hover {
    color: var(--gold);
}

/* FAQ Section */
.page-promotions__faq-section {
    background-color: var(--deep-navy);
    padding: 60px 0;
    box-sizing: border-box;
}

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

.page-promotions__faq-item {
    background-color: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    margin-bottom: 15px;
    overflow: hidden;
    color: var(--text-main);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    box-sizing: border-box;
}

.page-promotions__faq-question {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 25px;
    font-size: 1.2rem;
    font-weight: 600;
    color: var(--text-main);
    cursor: pointer;
    background-color: var(--card-bg);
    border-bottom: 1px solid var(--divider);
    list-style: none; /* For details/summary */
}

.page-promotions__faq-question::-webkit-details-marker {
    display: none; /* Hide default marker for details/summary */
}

.page-promotions__faq-item[open] .page-promotions__faq-question {
    border-bottom: 1px solid var(--glow);
}

.page-promotions__faq-qtext {
    flex-grow: 1;
    text-align: left;
}

.page-promotions__faq-toggle {
    font-size: 1.8rem;
    line-height: 1;
    margin-left: 15px;
    color: var(--gold);
    transition: transform 0.3s ease;
}

.page-promotions__faq-item[open] .page-promotions__faq-toggle {
    transform: rotate(45deg); /* Rotate plus to form an X */
}

.page-promotions__faq-answer {
    padding: 0 25px 20px 25px;
    font-size: 1rem;
    color: var(--text-secondary);
    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-answer p {
    margin-bottom: 0;
}

/* CTA Section */
.page-promotions__cta-section {
    background-color: var(--deep-navy);
    padding: 80px 0;
    text-align: center;
    box-sizing: border-box;
}

/* Ensure all links within main content are visible */
.page-promotions a {
    color: var(--glow);
    text-decoration: none;
}

.page-promotions a:hover {
    color: var(--gold);
    text-decoration: underline;
}

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

/* Tablet and Mobile adjustments */
@media (max-width: 1024px) {
    .page-promotions__container {
        padding: 30px 15px;
    }

    .page-promotions__main-title {
        font-size: clamp(2rem, 4vw, 3rem);
    }

    .page-promotions__section-title {
        font-size: clamp(1.8rem, 3.5vw, 2.5rem);
    }

    .page-promotions__description,
    .page-promotions__section-description,
    .page-promotions__feature-text,
    .page-promotions__promotion-text,
    .page-promotions__step-text,
    .page-promotions__faq-answer p {
        font-size: 1rem;
    }

    .page-promotions__hero-image-wrapper {
        max-height: 400px;
    }

    .page-promotions__cta-buttons {
        flex-direction: column;
        gap: 15px;
    }

    .page-promotions__btn-primary,
    .page-promotions__btn-secondary,
    .page-promotions a[class*="button"],
    .page-promotions a[class*="btn"] {
        width: 100%;
        max-width: 300px; /* Limit max width for buttons */
        margin: 0 auto;
    }

    .page-promotions__features-grid,
    .page-promotions__promotions-grid,
    .page-promotions__steps-grid {
        grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    }
}

/* Mobile specific styles */
@media (max-width: 768px) {
    /* HERO 主图区域 */
    .page-promotions__hero-section {
        padding-top: 10px !important; /* Small top padding for mobile */
        padding-bottom: 40px !important;
    }

    .page-promotions__hero-image-wrapper {
        max-height: 300px !important;
    }

    .page-promotions__hero-content {
        padding: 0 15px !important;
    }

    .page-promotions__main-title {
        font-size: clamp(1.8rem, 6vw, 2.5rem) !important;
        margin-bottom: 15px !important;
    }

    .page-promotions__description {
        font-size: 0.95rem !important;
        margin-bottom: 25px !important;
    }

    /* 通用图片与容器 */
    .page-promotions img {
        max-width: 100% !important;
        width: 100% !important;
        height: auto !important;
        display: block;
    }
    
    .page-promotions__section,
    .page-promotions__card,
    .page-promotions__container,
    .page-promotions__hero-section,
    .page-promotions__why-section,
    .page-promotions__types-section,
    .page-promotions__claim-guide-section,
    .page-promotions__faq-section,
    .page-promotions__cta-section {
        max-width: 100% !important;
        width: 100% !important;
        box-sizing: border-box !important;
        padding-left: 15px !important; /* Add padding to prevent content touching edges */
        padding-right: 15px !important; /* Add padding to prevent content touching edges */
    }

    /* 按钮与按钮容器 */
    .page-promotions__cta-button,
    .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 !important;
        padding-right: 15px !important;
        margin: 0 auto 10px auto !important; /* Center and add vertical space */
    }
    
    .page-promotions__cta-buttons,
    .page-promotions__button-group,
    .page-promotions__btn-container {
        max-width: 100% !important;
        width: 100% !important;
        box-sizing: border-box !important;
        padding-left: 0 !important; /* Container handles its own padding */
        padding-right: 0 !important;
        flex-direction: column !important; /* Stack buttons vertically */
        gap: 10px !important;
    }

    /* Other content modules */
    .page-promotions__section-title {
        font-size: clamp(1.5rem, 5vw, 2.2rem) !important;
    }

    .page-promotions__section-description {
        font-size: 0.9rem !important;
        margin-bottom: 30px !important;
    }

    .page-promotions__features-grid,
    .page-promotions__promotions-grid,
    .page-promotions__steps-grid {
        grid-template-columns: 1fr !important; /* Single column layout */
    }

    .page-promotions__feature-card,
    .page-promotions__promotion-card,
    .page-promotions__step-card {
        padding: 20px !important;
    }

    .page-promotions__feature-icon {
        min-width: 200px !important;
        min-height: 200px !important;
        width: 100% !important;
        height: auto !important;
        object-fit: contain;
        margin: 0 auto 15px auto !important;
    }

    .page-promotions__promotion-image {
        height: 180px !important;
    }

    .page-promotions__promotion-title {
        font-size: 1.4rem !important;
    }

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

    .page-promotions__faq-toggle {
        font-size: 1.5rem !important;
    }

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