/* style/promotions.css */

:root {
    --primary-color: #FFD700;
    --secondary-color: #8B0000;
    --text-light: #f0f0f0;
    --text-dark: #333333;
    --background-dark: var(--dark-bg, #0d0d0d);
    --card-background-dark: rgba(255, 255, 255, 0.1);
    --border-color-light: #e0e0e0;
}

/* Ensure content is visible on dark background */
.page-promotions {
    color: var(--text-light);
    background-color: var(--background-dark);
    /* padding-top is handled by shared.css for body, or hero-banner will handle it */
}

/* HERO Banner Section */
.page-promotions__hero-banner {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 500px;
    padding: 60px 20px;
    text-align: center;
    overflow: hidden;
    background: linear-gradient(135deg, var(--secondary-color), #5a0000);
    color: var(--text-light);
    padding-top: 0; /* shared handles body padding-top, avoid double padding */
}

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

.page-promotions__main-title {
    font-size: 3.5em;
    color: var(--primary-color);
    margin-bottom: 20px;
    line-height: 1.2;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
}

.page-promotions__hero-description {
    font-size: 1.2em;
    margin-bottom: 30px;
    line-height: 1.6;
    color: var(--text-light);
}

.page-promotions__btn-primary {
    display: inline-block;
    background-color: var(--primary-color);
    color: var(--text-dark);
    padding: 15px 35px;
    border-radius: 50px;
    text-decoration: none;
    font-weight: bold;
    font-size: 1.1em;
    transition: background-color 0.3s ease, transform 0.3s ease, box-shadow 0.3s ease;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
    border: none;
    cursor: pointer;
}

.page-promotions__btn-primary:hover {
    background-color: #ffd700cc; /* Slightly darker gold */
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.3);
}

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

.page-promotions__hero-image-wrapper img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0.3; /* Blend with background */
    display: block;
}

/* General Section Styles */
.page-promotions__section {
    padding: 80px 20px;
    text-align: center;
}

.page-promotions__introduction-section {
    background-color: var(--background-dark);
}

.page-promotions__promo-types-section {
    background-color: var(--secondary-color);
    color: var(--text-light);
}

.page-promotions__how-to-claim-section {
    background-color: var(--background-dark);
}

.page-promotions__terms-section {
    background-color: var(--secondary-color);
    color: var(--text-light);
}

.page-promotions__faq-section {
    background-color: var(--background-dark);
}

.page-promotions__why-choose-section {
    background-color: var(--secondary-color);
    color: var(--text-light);
}

.page-promotions__cta-section {
    background-color: var(--background-dark);
}

.page-promotions__container {
    max-width: 1200px;
    margin: 0 auto;
}

.page-promotions__section-title {
    font-size: 2.5em;
    margin-bottom: 40px;
    color: var(--primary-color);
    text-shadow: 1px 1px 3px rgba(0, 0, 0, 0.4);
}

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

.page-promotions__text-block {
    font-size: 1.1em;
    line-height: 1.8;
    text-align: left;
    color: var(--text-light);
}

.page-promotions__text-block p {
    margin-bottom: 15px;
}

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

.page-promotions__text-block a:hover {
    color: #fff;
}

.page-promotions__content-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 40px;
    align-items: center;
    text-align: left;
}

.page-promotions__image-block img {
    max-width: 100%;
    height: auto;
    display: block;
    border-radius: 8px;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.3);
}

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

.page-promotions__promo-card {
    background-color: var(--card-background-dark);
    border-radius: 12px;
    padding: 30px;
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.2);
    text-align: center;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    color: var(--text-light);
    border: 1px solid rgba(255, 255, 255, 0.15);
}

.page-promotions__promo-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 12px 25px rgba(0, 0, 0, 0.4);
}

.page-promotions__promo-card-image {
    margin-bottom: 20px;
    border-radius: 8px;
    overflow: hidden;
    line-height: 0; /* Remove extra space below image */
}

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

.page-promotions__promo-card-title {
    font-size: 1.5em;
    color: var(--primary-color);
    margin-bottom: 15px;
    line-height: 1.4;
}

.page-promotions__promo-card-description {
    font-size: 1em;
    line-height: 1.7;
    margin-bottom: 25px;
    flex-grow: 1;
    color: var(--text-light);
}

.page-promotions__btn-secondary {
    display: inline-block;
    background-color: var(--primary-color);
    color: var(--text-dark);
    padding: 12px 25px;
    border-radius: 50px;
    text-decoration: none;
    font-weight: bold;
    font-size: 0.95em;
    transition: background-color 0.3s ease, transform 0.3s ease;
    border: none;
    cursor: pointer;
}

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

/* How-To-Claim Steps */
.page-promotions__steps-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 30px;
    margin-top: 40px;
}

.page-promotions__step-item {
    background-color: var(--card-background-dark);
    border-radius: 12px;
    padding: 30px;
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.2);
    text-align: center;
    color: var(--text-light);
    border: 1px solid rgba(255, 255, 255, 0.15);
}

.page-promotions__step-icon {
    font-size: 2.5em;
    color: var(--primary-color);
    font-weight: bold;
    margin-bottom: 15px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 70px;
    height: 70px;
    border-radius: 50%;
    background: var(--secondary-color);
    box-shadow: inset 0 0 10px rgba(0, 0, 0, 0.3);
}

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

.page-promotions__step-description {
    font-size: 1em;
    line-height: 1.7;
    color: var(--text-light);
}

.page-promotions__cta-bottom {
    margin-top: 60px;
}

/* Terms and Conditions */
.page-promotions__terms-list {
    list-style: none;
    padding: 0;
    margin: 30px 0 0;
    text-align: left;
    color: var(--text-light);
}

.page-promotions__terms-list li {
    margin-bottom: 15px;
    padding-left: 25px;
    position: relative;
    font-size: 1.05em;
    line-height: 1.7;
}

.page-promotions__terms-list li::before {
    content: '•';
    color: var(--primary-color);
    position: absolute;
    left: 0;
    font-size: 1.5em;
    line-height: 1;
    top: 0;
}

.page-promotions__terms-list strong {
    color: var(--primary-color);
}

/* FAQ Section */
.page-promotions__faq-list {
    margin-top: 40px;
    text-align: left;
}

/* FAQ容器样式 */
.page-promotions__faq-item {
  margin-bottom: 15px;
  border-radius: 5px;
  overflow: hidden;
  background-color: var(--card-background-dark);
  border: 1px solid rgba(255, 255, 255, 0.15);
}

/* FAQ默认状态 - 答案隐藏 */
.page-promotions__faq-answer {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.4s cubic-bezier(0.4, 0, 0.2, 1), padding 0.4s ease, opacity 0.4s ease;
  padding: 0 15px;
  opacity: 0;
  color: var(--text-light);
}

/* FAQ展开状态 - 🚨 使用!important và đủ lớn max-height để đảm bảo mở rộng */
.page-promotions__faq-item.active .page-promotions__faq-answer {
  max-height: 2000px !important; /* 🚨 Sử dụng !important để đảm bảo ưu tiên, giá trị đủ lớn để chứa mọi nội dung */
  padding: 20px 30px !important; /* Đã điều chỉnh padding để trông đẹp hơn */
  opacity: 1;
  background: rgba(255, 255, 255, 0.05); /* Nền sáng hơn cho câu trả lời */
  border-radius: 0 0 5px 5px;
}

/* Kiểu dáng câu hỏi */
.page-promotions__faq-question {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 18px 30px;
  background: rgba(255, 255, 255, 0.1);
  border: none;
  border-radius: 5px;
  cursor: pointer;
  user-select: none;
  transition: background-color 0.3s ease;
  position: relative;
  color: var(--primary-color);
}

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

.page-promotions__faq-question:active {
  background: rgba(255, 255, 255, 0.2);
}

/* Kiểu dáng tiêu đề câu hỏi */
.page-promotions__faq-question h3 {
  margin: 0;
  padding: 0;
  flex: 1;
  font-size: 1.1em;
  font-weight: 600;
  line-height: 1.5;
  pointer-events: none; /* Ngăn thẻ h3 chặn sự kiện click */
  color: var(--primary-color);
}

/* Biểu tượng chuyển đổi */
.page-promotions__faq-toggle {
  font-size: 24px;
  font-weight: bold;
  line-height: 1;
  color: var(--primary-color);
  transition: transform 0.3s ease, color 0.3s ease;
  flex-shrink: 0;
  margin-left: 15px;
  pointer-events: none; /* Ngăn biểu tượng chặn sự kiện click */
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--secondary-color);
}

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

/* Why Choose Section */
.page-promotions__why-choose-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 30px;
    margin-top: 40px;
}

.page-promotions__why-choose-item {
    background-color: var(--card-background-dark);
    border-radius: 12px;
    padding: 30px;
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.2);
    text-align: center;
    color: var(--text-light);
    border: 1px solid rgba(255, 255, 255, 0.15);
}

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

.page-promotions__why-choose-description {
    font-size: 1em;
    line-height: 1.7;
    color: var(--text-light);
}

/* CTA Section */
.page-promotions__cta-section .page-promotions__section-title {
    color: var(--primary-color);
}

.page-promotions__cta-description {
    font-size: 1.2em;
    line-height: 1.6;
    margin-bottom: 40px;
    color: var(--text-light);
}

.page-promotions__copyright-info {
    text-align: center;
    padding: 30px 20px;
    font-size: 0.9em;
    color: rgba(255, 255, 255, 0.6);
    background-color: var(--background-dark);
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.page-promotions__copyright-info p {
    margin: 0;
}

/* Responsive Design */
@media (max-width: 1200px) {
    .page-promotions__main-title {
        font-size: 3em;
    }
    .page-promotions__hero-description {
        font-size: 1.1em;
    }
    .page-promotions__section-title {
        font-size: 2.2em;
    }
    .page-promotions__container {
        padding: 0 15px;
    }
}

@media (max-width: 992px) {
    .page-promotions__hero-banner {
        min-height: 450px;
        padding: 40px 15px;
    }
    .page-promotions__main-title {
        font-size: 2.5em;
    }
    .page-promotions__section {
        padding: 60px 15px;
    }
    .page-promotions__content-grid {
        grid-template-columns: 1fr;
    }
    .page-promotions__image-block {
        order: -1; /* Image first on mobile */
        margin-bottom: 30px;
    }
    .page-promotions__text-block {
        text-align: center;
    }
}

@media (max-width: 768px) {
    .page-promotions {
        font-size: 16px;
        line-height: 1.6;
        padding-top: var(--header-offset, 120px) !important; /* Ensure header offset is applied */
    }
    .page-promotions__hero-banner {
        min-height: 350px;
        padding: 30px 15px;
        padding-top: 0 !important; /* shared handles body padding-top, avoid double padding */
    }
    .page-promotions__main-title {
        font-size: 2em;
    }
    .page-promotions__hero-description {
        font-size: 1em;
    }
    .page-promotions__btn-primary {
        padding: 12px 25px;
        font-size: 1em;
        max-width: 100% !important;
        width: 100% !important;
        box-sizing: border-box !important;
        white-space: normal !important;
        word-wrap: break-word !important;
    }
    .page-promotions__section {
        padding: 40px 15px;
    }
    .page-promotions__section-title {
        font-size: 1.8em;
        margin-bottom: 30px;
    }
    .page-promotions__promo-card {
        padding: 20px;
    }
    .page-promotions__promo-card-title {
        font-size: 1.3em;
    }
    .page-promotions__step-item {
        padding: 20px;
    }
    .page-promotions__step-icon {
        width: 60px;
        height: 60px;
        font-size: 2em;
    }
    .page-promotions__step-title {
        font-size: 1.2em;
    }
    .page-promotions__terms-list li {
        font-size: 0.95em;
        padding-left: 20px;
    }
    .page-promotions__faq-question {
        padding: 15px;
        flex-wrap: wrap;
    }
    .page-promotions__faq-question h3 {
        font-size: 1em;
        margin-bottom: 0;
        width: calc(100% - 40px);
    }
    .page-promotions__faq-toggle {
        margin-left: 10px;
        width: 24px;
        height: 24px;
        font-size: 20px;
    }
    .page-promotions__faq-answer {
        padding: 0 15px;
    }
    .page-promotions__faq-item.active .page-promotions__faq-answer {
        padding: 15px !important;
    }
    .page-promotions__why-choose-item {
        padding: 20px;
    }
    .page-promotions__why-choose-title {
        font-size: 1.2em;
    }
    .page-promotions__cta-description {
        font-size: 1em;
    }

    /* Mobile image adaptation */
    .page-promotions img {
        max-width: 100% !important;
        width: 100% !important;
        height: auto !important;
    }
    .page-promotions__section,
    .page-promotions__container,
    .page-promotions__hero-banner,
    .page-promotions__hero-content,
    .page-promotions__hero-image-wrapper,
    .page-promotions__content-grid,
    .page-promotions__promo-cards-grid,
    .page-promotions__promo-card,
    .page-promotions__steps-grid,
    .page-promotions__step-item,
    .page-promotions__terms-section,
    .page-promotions__faq-list,
    .page-promotions__faq-item,
    .page-promotions__why-choose-grid,
    .page-promotions__why-choose-item,
    .page-promotions__cta-section {
        max-width: 100% !important;
        width: 100% !important;
        box-sizing: border-box !important;
        padding-left: 15px;
        padding-right: 15px;
    }
    .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;
    }
    .page-promotions__cta-bottom {
        padding-left: 15px;
        padding-right: 15px;
        box-sizing: border-box;
    }
}

@media (max-width: 480px) {
    .page-promotions__main-title {
        font-size: 1.8em;
    }
    .page-promotions__section-title {
        font-size: 1.6em;
    }
    .page-promotions__promo-cards-grid,
    .page-promotions__steps-grid,
    .page-promotions__why-choose-grid {
        grid-template-columns: 1fr;
    }
    .page-promotions__hero-banner {
        min-height: 300px;
    }
}