/* style/promotions.css */

/* Variables from shared.css are assumed to be available */
:root {
    --primary-color: #26A9E0;
    --secondary-color: #FFFFFF;
    --login-color: #EA7C07;
    --text-dark: #333333;
    --text-light: #ffffff;
    --border-light: #e0e0e0;
    --bg-light: #f9f9f9;
    --bg-white: #ffffff;
    --header-offset: 120px; /* Default value, overridden by shared.css */
}

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

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

/* Hero Section */
.page-promotions__hero-section {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding-bottom: 60px;
    background: linear-gradient(135deg, var(--primary-color) 0%, #a2dcf2 100%); /* Lighter gradient for hero */
    padding-top: var(--header-offset, 120px); /* Ensure header offset */
}

.page-promotions__hero-container {
    position: relative;
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    width: 100%;
}

.page-promotions__hero-image {
    width: 100%;
    margin-bottom: 30px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
    border-radius: 12px;
    overflow: hidden;
}

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

.page-promotions__hero-content {
    position: relative;
    z-index: 2;
    text-align: center;
    width: 100%;
    padding: 0 20px;
}

.page-promotions__hero-title {
    font-size: 48px;
    color: var(--text-light);
    margin-bottom: 20px;
    font-weight: bold;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
}

.page-promotions__hero-description {
    font-size: 20px;
    color: var(--text-light);
    margin-bottom: 40px;
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
    text-shadow: 1px 1px 3px rgba(0, 0, 0, 0.2);
}

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

.page-promotions__cta-button {
    display: inline-block;
    padding: 15px 40px;
    background: var(--login-color); /* Use login color for primary CTA */
    color: var(--text-light);
    text-decoration: none;
    border-radius: 8px;
    font-size: 18px;
    font-weight: bold;
    transition: all 0.3s ease;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
    border: none;
    cursor: pointer;
    text-align: center;
}

.page-promotions__cta-button:hover {
    background: #e66a00; /* Slightly darker orange */
    transform: translateY(-3px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.3);
}

.page-promotions__cta-button--secondary {
    background: var(--secondary-color);
    color: var(--primary-color);
    border: 2px solid var(--primary-color);
}

.page-promotions__cta-button--secondary:hover {
    background: var(--primary-color);
    color: var(--text-light);
    border-color: var(--primary-color);
}

/* General Section Styling */
.page-promotions__section-title {
    font-size: 36px;
    font-weight: bold;
    text-align: center;
    margin-bottom: 20px;
    color: var(--primary-color);
}

.page-promotions__section-description {
    font-size: 18px;
    text-align: center;
    max-width: 900px;
    margin: 0 auto 50px auto;
    color: var(--text-dark);
}

/* Introduction Section */
.page-promotions__introduction-section {
    padding: 80px 0;
    background: var(--bg-white);
}

.page-promotions__features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 30px;
    margin-top: 50px;
    text-align: center;
}

.page-promotions__feature-item {
    background: var(--bg-white);
    padding: 30px;
    border-radius: 12px;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.08);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.page-promotions__feature-item:hover {
    transform: translateY(-10px);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.15);
}

.page-promotions__feature-item img {
    
    
    object-fit: contain;
    margin-bottom: 20px;
    display: block;
    margin-left: auto;
    margin-right: auto;
}

.page-promotions__feature-title {
    font-size: 24px;
    font-weight: bold;
    margin-bottom: 15px;
    color: var(--primary-color);
}

.page-promotions__feature-item p {
    font-size: 16px;
    color: var(--text-dark);
}

/* Categories Section (Dark Background) */
.page-promotions__categories-section {
    padding: 80px 0;
    background: var(--primary-color); /* Darker background for contrast */
    color: var(--text-light); /* Light text for dark background */
}

.page-promotions__categories-section .page-promotions__section-title,
.page-promotions__categories-section .page-promotions__section-description {
    color: var(--text-light);
}

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

.page-promotions__promo-card {
    background: var(--bg-white);
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    display: flex;
    flex-direction: column;
    color: var(--text-dark); /* Ensure dark text on white card */
}

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

.page-promotions__promo-card img {
    width: 100%;
    height: 250px; /* Fixed height for promo images */
    object-fit: cover;
    display: block;
}

.page-promotions__card-title {
    font-size: 22px;
    font-weight: bold;
    margin: 20px 20px 10px 20px;
    color: var(--primary-color);
}

.page-promotions__card-title a {
    color: var(--primary-color);
    text-decoration: none;
    transition: color 0.3s ease;
}

.page-promotions__card-title a:hover {
    color: #007bb5; /* Slightly darker primary color */
}

.page-promotions__promo-card p {
    font-size: 16px;
    margin: 0 20px 20px 20px;
    flex-grow: 1; /* Make paragraph take available space */
}

.page-promotions__btn-primary {
    display: inline-block;
    padding: 12px 25px;
    background: var(--primary-color);
    color: var(--text-light);
    text-decoration: none;
    border-radius: 6px;
    font-size: 16px;
    font-weight: bold;
    margin: 0 20px 20px 20px;
    transition: all 0.3s ease;
    border: none;
    cursor: pointer;
    text-align: center;
}

.page-promotions__btn-primary:hover {
    background: #007bb5; /* Darker primary */
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

/* How-To-Claim Section */
.page-promotions__how-to-claim-section {
    padding: 80px 0;
    background: var(--bg-light);
}

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

.page-promotions__step-item {
    background: var(--bg-white);
    padding: 30px;
    border-radius: 12px;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.08);
    display: flex;
    flex-direction: column;
    align-items: center;
}

.page-promotions__step-number {
    font-size: 48px;
    font-weight: bold;
    color: var(--primary-color);
    margin-bottom: 20px;
    line-height: 1;
}

.page-promotions__step-title {
    font-size: 24px;
    font-weight: bold;
    margin-bottom: 15px;
    color: var(--text-dark);
}

.page-promotions__step-item p {
    font-size: 16px;
    color: var(--text-dark);
}

.page-promotions__step-item p a {
    color: var(--primary-color);
    text-decoration: none;
    font-weight: bold;
}

.page-promotions__step-item p a:hover {
    text-decoration: underline;
}

.page-promotions__center-cta {
    text-align: center;
    margin-top: 60px;
}

/* Why Choose Section */
.page-promotions__why-choose-section {
    padding: 80px 0;
    background: var(--secondary-color); /* White background */
    color: var(--text-dark);
}

.page-promotions__advantages-list {
    list-style: none;
    padding: 0;
    margin-top: 50px;
    max-width: 900px;
    margin-left: auto;
    margin-right: auto;
}

.page-promotions__advantages-list li {
    background: var(--bg-white);
    padding: 20px 30px;
    margin-bottom: 15px;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
    font-size: 18px;
    color: var(--text-dark);
    border-left: 5px solid var(--primary-color);
    transition: transform 0.2s ease;
}

.page-promotions__advantages-list li:hover {
    transform: translateX(5px);
}

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

/* FAQ Section */
.page-promotions__faq-section {
    padding: 80px 0;
    background: var(--bg-light);
}

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

/* FAQ容器样式 */
.page-promotions__faq-item {
  margin-bottom: 15px;
  border-radius: 5px;
  overflow: hidden;
  box-shadow: 0 2px 10px rgba(0,0,0,0.05);
}

/* 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;
}

/* FAQ展开状态 - 🚨 使用!important和足够大的max-height确保一定能展开 */
.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 15px !important;
  opacity: 1;
  background: var(--bg-white);
  border-radius: 0 0 5px 5px;
  border-top: 1px solid var(--border-light);
}

/* Vấn đề kiểu dáng */
.page-promotions__faq-question {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 18px 20px;
  background: var(--bg-white);
  border: 1px solid var(--border-light);
  border-radius: 5px;
  cursor: pointer;
  user-select: none;
  transition: background-color 0.3s ease, border-color 0.3s ease;
  position: relative;
}

.page-promotions__faq-item.active .page-promotions__faq-question {
    border-bottom-left-radius: 0;
    border-bottom-right-radius: 0;
    border-color: var(--primary-color);
}

.page-promotions__faq-question:hover {
  background: var(--bg-light);
  border-color: #d0d0d0;
}

.page-promotions__faq-question:active {
  background: #eeeeee;
}

/* Tiêu đề câu hỏi */
.page-promotions__faq-question h3 {
  margin: 0;
  padding: 0;
  flex: 1;
  font-size: 18px;
  font-weight: 600;
  line-height: 1.5;
  pointer-events: none; /* Ngăn thẻ h3 chặn sự kiện click */
  color: var(--text-dark);
}

/* 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;
}

.page-promotions__faq-item.active .page-promotions__faq-toggle {
  color: var(--primary-color);
  transform: rotate(45deg); /* Thay đổi thành 'x' hoặc xoay để thành '−' */
}

/* Final CTA Section (Dark Background) */
.page-promotions__final-cta-section {
    padding: 80px 0;
    background: var(--primary-color);
    color: var(--text-light);
    text-align: center;
}

.page-promotions__final-cta-section .page-promotions__section-title,
.page-promotions__final-cta-section .page-promotions__section-description {
    color: var(--text-light);
}

.page-promotions__final-cta-buttons {
    display: flex;
    gap: 20px;
    justify-content: center;
    margin-top: 40px;
    flex-wrap: wrap;
}

/* Responsive Design */
@media (max-width: 1024px) {
    .page-promotions__hero-title {
        font-size: 40px;
    }
    .page-promotions__hero-description {
        font-size: 18px;
    }
    .page-promotions__section-title {
        font-size: 32px;
    }
    .page-promotions__section-description {
        font-size: 16px;
    }
}

@media (max-width: 768px) {
    .page-promotions__hero-section {
        padding-top: var(--header-offset, 120px) !important; /* Mobile specific header offset */
        padding-bottom: 40px;
    }
    .page-promotions__hero-title {
        font-size: 32px;
    }
    .page-promotions__hero-description {
        font-size: 16px;
    }
    .page-promotions__hero-buttons {
        flex-direction: column;
        gap: 15px;
        width: 100%;
        padding: 0 15px;
        box-sizing: border-box;
    }
    .page-promotions__cta-button,
    .page-promotions__btn-primary {
        width: 100% !important;
        max-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__container {
        padding: 30px 15px;
    }
    .page-promotions__section-title {
        font-size: 28px;
    }
    .page-promotions__section-description {
        font-size: 15px;
        margin-bottom: 30px;
    }

    .page-promotions__features-grid,
    .page-promotions__promo-grid,
    .page-promotions__steps-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    
    .page-promotions__promo-card img {
        height: 200px; /* Adjust height for mobile */
    }

    .page-promotions__advantages-list li {
        font-size: 16px;
        padding: 15px 20px;
    }

    .page-promotions__faq-question {
      padding: 15px;
      flex-wrap: wrap;
    }
    
    .page-promotions__faq-question h3 {
      font-size: 16px;
      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__final-cta-buttons {
        flex-direction: column;
        gap: 15px;
        width: 100%;
        padding: 0 15px;
        box-sizing: border-box;
    }
    
    /* Ensure all images are responsive and do not overflow */
    .page-promotions img {
        max-width: 100% !important;
        width: 100% !important;
        height: auto !important;
    }
    
    .page-promotions__container,
    .page-promotions__hero-container,
    .page-promotions__promo-card,
    .page-promotions__feature-item,
    .page-promotions__step-item,
    .page-promotions__faq-item,
    .page-promotions__final-cta-section,
    .page-promotions__introduction-section,
    .page-promotions__categories-section,
    .page-promotions__how-to-claim-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;
    }
}

@media (max-width: 480px) {
    .page-promotions__hero-title {
        font-size: 28px;
    }
    .page-promotions__hero-description {
        font-size: 15px;
    }
    .page-promotions__cta-button {
        padding: 12px 25px;
        font-size: 16px;
    }
    .page-promotions__section-title {
        font-size: 24px;
    }
    .page-promotions__feature-title,
    .page-promotions__step-title,
    .page-promotions__card-title {
        font-size: 20px;
    }
    .page-promotions__step-number {
        font-size: 40px;
    }
}

/* Color Contrast Safeguards */
.page-promotions {
  color: var(--text-dark); /* Default for light background */
}

.page-promotions__dark-bg {
  color: var(--text-light); /* Light text on dark background */
}

/* Button contrast */
.page-promotions__cta-button,
.page-promotions__btn-primary {
  color: var(--text-light); /* White text on orange/blue buttons */
}

.page-promotions__cta-button--secondary {
  color: var(--primary-color); /* Blue text on white button */
}

/* Specific text elements */
.page-promotions p,
.page-promotions li,
.page-promotions__faq-answer p {
  color: var(--text-dark);
}

.page-promotions__categories-section p,
.page-promotions__categories-section li {
  color: var(--text-light); /* Override for dark background sections */
}