/* style/promotions.css */

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

.page-promotions {
    font-family: Arial, sans-serif;
    line-height: 1.6;
    color: var(--page-promotions-text-main); /* Light text for dark body background */
    background-color: var(--page-promotions-deep-navy); /* Ensure consistency if body bg changes */
}

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

.page-promotions__section-title {
    font-size: clamp(28px, 4vw, 42px);
    font-weight: 700;
    color: var(--page-promotions-text-main);
    text-align: center;
    margin-bottom: 40px;
    margin-top: 60px;
    line-height: 1.2;
}

.page-promotions__text-block {
    font-size: 17px;
    line-height: 1.7;
    margin-bottom: 20px;
    color: var(--page-promotions-text-secondary);
}

.page-promotions__text-center {
    text-align: center;
}

/* Hero Section */
.page-promotions__hero-section {
    position: relative;
    padding-top: 10px; /* Small top padding, relying on body for header offset */
    padding-bottom: 60px;
    background-color: var(--page-promotions-deep-navy);
    overflow: hidden;
}

.page-promotions__hero-image {
    width: 100%;
    height: 600px; /* Fixed height for desktop */
    overflow: hidden;
    position: relative;
    margin-bottom: 40px;
    border-radius: 10px;
}

.page-promotions__hero-image img {
    width: 100%;
    height: 100%;
    object-fit: cover; /* Desktop: cover to fill space */
    display: block;
}

.page-promotions__hero-content {
    max-width: 900px;
    margin: 0 auto;
    text-align: center;
    position: relative;
    z-index: 1;
}

.page-promotions__main-title {
    font-size: clamp(36px, 5vw, 56px); /* Use clamp for H1 */
    font-weight: 800;
    color: var(--page-promotions-gold-color);
    margin-bottom: 20px;
    line-height: 1.1;
    text-shadow: 0 0 15px rgba(242, 193, 78, 0.5);
}

.page-promotions__hero-description {
    font-size: clamp(18px, 2.5vw, 22px);
    color: var(--page-promotions-text-main);
    margin-bottom: 30px;
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
}

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

.page-promotions__btn-primary,
.page-promotions__btn-secondary {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 15px 30px;
    border-radius: 8px;
    font-size: 18px;
    font-weight: 700;
    text-decoration: none;
    transition: all 0.3s ease;
    cursor: pointer;
    border: none;
    max-width: 100%; /* Important for mobile responsiveness */
    box-sizing: border-box;
    white-space: normal; /* Allow text to wrap */
    word-wrap: break-word; /* Allow text to break words */
}

.page-promotions__btn-primary {
    background: var(--page-promotions-button-gradient);
    color: #ffffff;
    box-shadow: 0 5px 15px rgba(43, 115, 246, 0.4);
}

.page-promotions__btn-primary:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 20px rgba(43, 115, 246, 0.6);
}

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

.page-promotions__btn-secondary:hover {
    background: rgba(242, 193, 78, 0.1);
    transform: translateY(-3px);
}

.page-promotions__cta-buttons--center {
    margin-top: 40px;
}

/* Intro Section */
.page-promotions__intro-section {
    padding: 80px 0;
    background-color: var(--page-promotions-deep-navy);
}

.page-promotions__intro-section .page-promotions__text-block {
    max-width: 900px;
    margin-left: auto;
    margin-right: auto;
    text-align: center;
}

/* Types Section */
.page-promotions__types-section {
    padding: 80px 0;
    background-color: var(--page-promotions-deep-navy); /* Inherit body dark bg */
}

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

.page-promotions__promo-card,
.page-promotions__game-promo-card,
.page-promotions__step-card,
.page-promotions__benefit-card {
    background-color: var(--page-promotions-card-bg); /* Dark card background */
    border-radius: 10px;
    padding: 30px;
    text-align: center;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.3);
    border: 1px solid var(--page-promotions-border-color);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    color: var(--page-promotions-text-main); /* Light text on dark card */
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.page-promotions__promo-card:hover,
.page-promotions__game-promo-card:hover,
.page-promotions__step-card:hover,
.page-promotions__benefit-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.4);
}

.page-promotions__promo-card img,
.page-promotions__game-promo-card img {
    max-width: 100%;
    height: auto;
    border-radius: 8px;
    margin-bottom: 20px;
    display: block;
    margin-left: auto;
    margin-right: auto;
    min-width: 200px; /* Enforce min image size */
    min-height: 200px; /* Enforce min image size */
    object-fit: cover;
}

.page-promotions__card-title {
    font-size: 24px;
    font-weight: 700;
    color: var(--page-promotions-gold-color);
    margin-bottom: 15px;
    line-height: 1.3;
}

.page-promotions__card-description {
    font-size: 16px;
    color: var(--page-promotions-text-secondary);
    margin-bottom: 25px;
    flex-grow: 1; /* Make description grow to push button to bottom */
}

/* Game Specific Section */
.page-promotions__game-specific-section {
    padding: 80px 0;
    background-color: var(--page-promotions-deep-navy);
}

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

.page-promotions__game-promo-card .page-promotions__btn-secondary {
    border-color: var(--page-promotions-primary-color);
    color: var(--page-promotions-primary-color);
    background: var(--page-promotions-text-main); /* Light background for secondary button on dark card */
}
.page-promotions__game-promo-card .page-promotions__btn-secondary:hover {
    background: var(--page-promotions-primary-color);
    color: var(--page-promotions-text-main);
}


.page-promotions__additional-info {
    text-align: center;
    margin-top: 50px;
    font-style: italic;
    color: var(--page-promotions-text-secondary);
}

/* Guide Section */
.page-promotions__guide-section {
    padding: 80px 0;
    background-color: var(--page-promotions-deep-navy);
}

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

.page-promotions__step-card {
    position: relative;
    padding-top: 50px; /* Space for step number */
}

.page-promotions__step-number {
    position: absolute;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    background: var(--page-promotions-button-gradient);
    color: #ffffff;
    width: 45px;
    height: 45px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    font-weight: bold;
    box-shadow: 0 3px 10px rgba(43, 115, 246, 0.5);
    border: 3px solid var(--page-promotions-deep-navy);
}

/* Terms Section */
.page-promotions__terms-section {
    padding: 80px 0;
    background-color: var(--page-promotions-deep-navy);
}

.page-promotions__article-body {
    max-width: 900px;
    margin: 0 auto;
    padding: 30px;
    background-color: var(--page-promotions-card-bg);
    border-radius: 10px;
    border: 1px solid var(--page-promotions-border-color);
    color: var(--page-promotions-text-secondary);
}

.page-promotions__article-body h3 {
    font-size: 22px;
    font-weight: 700;
    color: var(--page-promotions-gold-color);
    margin-top: 30px;
    margin-bottom: 15px;
}

.page-promotions__article-body p {
    margin-bottom: 15px;
    font-size: 16px;
    line-height: 1.7;
    color: var(--page-promotions-text-secondary);
}

/* Why Choose Section */
.page-promotions__why-choose-section {
    padding: 80px 0;
    background-color: var(--page-promotions-deep-navy);
}

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

.page-promotions__benefit-card {
    text-align: left;
}
.page-promotions__benefit-card .page-promotions__card-title {
    color: var(--page-promotions-gold-color);
    text-align: left;
}
.page-promotions__benefit-card .page-promotions__card-description {
    color: var(--page-promotions-text-secondary);
    text-align: left;
}


/* FAQ Section */
.page-promotions__faq-section {
    padding: 80px 0;
    background-color: var(--page-promotions-deep-navy);
}

details.page-promotions__faq-item {
  margin-bottom: 15px;
  border-radius: 10px;
  border: 1px solid var(--page-promotions-border-color);
  overflow: hidden;
  background: var(--page-promotions-card-bg);
  color: var(--page-promotions-text-main);
  max-width: 900px;
  margin-left: auto;
  margin-right: auto;
}
details.page-promotions__faq-item summary.page-promotions__faq-question {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 18px 25px;
  cursor: pointer;
  user-select: none;
  list-style: none;
  transition: background-color 0.3s ease;
  color: var(--page-promotions-text-main);
  font-weight: 600;
  line-height: 1.5;
}
details.page-promotions__faq-item summary.page-promotions__faq-question::-webkit-details-marker {
  display: none;
}
details.page-promotions__faq-item summary.page-promotions__faq-question:hover {
  background: rgba(29, 95, 209, 0.1); /* Slightly lighter hover for dark bg */
}
.page-promotions__faq-qtext {
  flex: 1;
  font-size: 18px;
  font-weight: 600;
  line-height: 1.5;
  text-align: left;
  color: var(--page-promotions-gold-color);
}
.page-promotions__faq-toggle {
  font-size: 28px;
  font-weight: bold;
  color: var(--page-promotions-gold-color);
  flex-shrink: 0;
  margin-left: 15px;
  width: 30px;
  text-align: center;
}
details.page-promotions__faq-item .page-promotions__faq-answer {
  padding: 0 25px 20px;
  background: var(--page-promotions-deep-navy); /* Slightly darker for answer content */
  border-radius: 0 0 10px 10px;
  font-size: 16px;
  line-height: 1.7;
  color: var(--page-promotions-text-secondary);
}
.page-promotions__faq-answer p {
    margin-bottom: 0;
}


/* Final CTA Section */
.page-promotions__final-cta-section {
    padding: 80px 0;
    background-color: var(--page-promotions-deep-navy);
}
.page-promotions__final-cta-section .page-promotions__text-block {
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
}


/* Responsive Styles */
/* Desktop to Tablet breakpoint */
@media (max-width: 1024px) {
    .page-promotions__container {
        padding: 0 15px;
    }

    .page-promotions__hero-image {
        height: 500px;
    }

    .page-promotions__main-title {
        font-size: clamp(32px, 4.5vw, 48px);
    }

    .page-promotions__hero-description {
        font-size: clamp(16px, 2.2vw, 20px);
    }

    .page-promotions__section-title {
        font-size: clamp(26px, 3.5vw, 38px);
        margin-top: 50px;
        margin-bottom: 30px;
    }

    .page-promotions__text-block {
        font-size: 16px;
    }

    .page-promotions__promo-card,
    .page-promotions__game-promo-card,
    .page-promotions__step-card,
    .page-promotions__benefit-card {
        padding: 25px;
    }

    .page-promotions__card-title {
        font-size: 22px;
    }

    .page-promotions__card-description {
        font-size: 15px;
    }

    details.page-promotions__faq-item summary.page-promotions__faq-question {
        padding: 16px 20px;
    }
    .page-promotions__faq-qtext {
        font-size: 17px;
    }
    .page-promotions__faq-toggle {
        font-size: 26px;
        width: 28px;
    }
    details.page-promotions__faq-item .page-promotions__faq-answer {
        padding: 0 20px 18px;
    }
}


/* Mobile Styles (max-width: 768px) - MUST include all specified rules */
@media (max-width: 768px) {
    /* General container and section padding */
    .page-promotions__container {
        padding: 0 15px !important;
        max-width: 100% !important;
        width: 100% !important;
        box-sizing: border-box !important;
    }

    .page-promotions__section { /* Generic section rule for padding */
        padding: 40px 0 !important;
    }
    .page-promotions__intro-section,
    .page-promotions__types-section,
    .page-promotions__game-specific-section,
    .page-promotions__guide-section,
    .page-promotions__terms-section,
    .page-promotions__why-choose-section,
    .page-promotions__faq-section,
    .page-promotions__final-cta-section {
        padding: 40px 0 !important;
    }


    /* HERO 主图区域 - MUST have object-fit: contain */
    .page-promotions__hero-section {
        padding-top: 10px !important; /* Small top padding, rely on body */
        padding-bottom: 40px !important;
    }
    .page-promotions__hero-image {
        height: 250px !important; /* Adjust height for mobile */
        margin-bottom: 30px !important;
    }
    .page-promotions__hero-image img {
        object-fit: contain !important; /* MUST be contain for mobile */
        aspect-ratio: unset !important; /* Prevent cropping */
        width: 100% !important;
        height: 100% !important;
    }

    .page-promotions__main-title {
        font-size: clamp(28px, 8vw, 36px) !important; /* Ensure H1 is not too large */
        margin-bottom: 15px !important;
    }
    .page-promotions__hero-description {
        font-size: 16px !important;
        margin-bottom: 25px !important;
    }

    /* 按钮与按钮容器 - MUST have max-width: 100% and wrap */
    .page-promotions__cta-buttons {
        flex-direction: column !important; /* Stack buttons vertically */
        gap: 15px !important;
        max-width: 100% !important;
        width: 100% !important;
        box-sizing: border-box !important;
        padding-left: 15px;
        padding-right: 15px;
    }
    .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: 12px 20px !important;
        font-size: 16px !important;
    }

    /* 通用图片与容器 - MUST have max-width: 100% */
    .page-promotions img {
        max-width: 100% !important;
        width: 100% !important;
        height: auto !important;
        display: block !important;
    }
    .page-promotions__promo-card img,
    .page-promotions__game-promo-card img {
        min-width: 200px !important;
        min-height: 200px !important;
    }

    /* Section titles and text blocks */
    .page-promotions__section-title {
        font-size: clamp(24px, 7vw, 32px) !important;
        margin-top: 30px !important;
        margin-bottom: 25px !important;
        text-align: center !important;
    }
    .page-promotions__text-block {
        font-size: 15px !important;
        line-height: 1.6 !important;
        padding: 0 5px;
    }

    /* Card layouts */
    .page-promotions__promo-grid,
    .page-promotions__game-promo-cards,
    .page-promotions__guide-steps,
    .page-promotions__benefits-grid {
        grid-template-columns: 1fr !important;
        gap: 20px !important;
        margin-top: 30px !important;
    }

    .page-promotions__promo-card,
    .page-promotions__game-promo-card,
    .page-promotions__step-card,
    .page-promotions__benefit-card {
        padding: 20px !important;
        text-align: left !important;
    }
    .page-promotions__promo-card img,
    .page-promotions__game-promo-card img {
        margin-bottom: 15px !important;
    }
    .page-promotions__card-title {
        font-size: 20px !important;
        margin-bottom: 10px !important;
        text-align: left !important;
    }
    .page-promotions__card-description {
        font-size: 14px !important;
        margin-bottom: 20px !important;
        text-align: left !important;
    }

    .page-promotions__step-card {
        padding-top: 40px !important;
    }
    .page-promotions__step-number {
        width: 40px !important;
        height: 40px !important;
        font-size: 20px !important;
        border-width: 2px !important;
    }

    /* 装饰主标题 + 长文 SEO 区 */
    .page-promotions__article-body {
        padding: 20px !important;
        margin-top: 20px !important;
        max-width: 100% !important;
        box-sizing: border-box !important;
    }
    .page-promotions__article-body h3 {
        font-size: 20px !important;
        margin-top: 20px !important;
        margin-bottom: 10px !important;
    }
    .page-promotions__article-body p {
        font-size: 15px !important;
    }
}