/* style/promotions.css */
:root {
    --primary-color: #26A9E0;
    --secondary-color: #EA7C07; /* For login button */
    --text-dark: #333333;
    --text-light: #ffffff;
    --bg-light: #f9f9f9;
    --border-color: #e0e0e0;
}

.page-promotions {
    font-family: 'Arial', sans-serif;
    line-height: 1.6;
    color: var(--text-dark);
    background-color: var(--bg-light);
    padding-bottom: 60px; /* General padding for main content */
}

/* Hero Section */
.page-promotions__hero-section {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 60px 20px;
    padding-top: var(--header-offset, 120px); /* Fixed header spacing */
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-color) 60%, var(--bg-light) 100%);
    color: var(--text-light);
    overflow: hidden; /* Prevent image overflow */
}

.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;
    position: relative;
    z-index: 1;
}

.page-promotions__hero-image img {
    width: 100%;
    height: auto;
    max-width: 100%;
    display: block;
    border-radius: 12px;
    object-fit: cover;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
}

.page-promotions__hero-content {
    position: relative;
    z-index: 2;
    text-align: center;
    width: 100%;
    max-width: 800px;
    margin-top: -80px; /* Overlap with image slightly for visual appeal */
    background: rgba(255, 255, 255, 0.95);
    padding: 40px;
    border-radius: 12px;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
    color: var(--text-dark);
}

.page-promotions__main-title {
    font-size: 3.2em;
    margin-bottom: 20px;
    color: var(--primary-color);
    line-height: 1.2;
    font-weight: 700;
}

.page-promotions__intro-text {
    font-size: 1.1em;
    margin-bottom: 30px;
    line-height: 1.8;
    color: var(--text-dark);
}

.page-promotions__cta-buttons {
    display: flex;
    justify-content: center;
    gap: 20px;
    flex-wrap: wrap; /* For mobile responsiveness */
}

.page-promotions__cta-button {
    display: inline-block;
    padding: 15px 40px;
    text-decoration: none;
    border-radius: 8px;
    font-size: 1.1em;
    font-weight: bold;
    transition: all 0.3s ease;
    min-width: 180px;
    text-align: center;
    box-sizing: border-box;
    white-space: normal;
    word-wrap: break-word;
}

.page-promotions__btn-primary {
    background: var(--primary-color);
    color: var(--text-light);
    border: 2px solid var(--primary-color);
}

.page-promotions__btn-primary:hover {
    background: #1e87b7; /* Darker primary */
    transform: translateY(-3px);
    box-shadow: 0 6px 15px rgba(0, 0, 0, 0.25);
}

.page-promotions__btn-secondary {
    background: var(--secondary-color); /* Login color */
    color: var(--text-light);
    border: 2px solid var(--secondary-color);
}

.page-promotions__btn-secondary:hover {
    background: #c36706; /* Darker secondary */
    transform: translateY(-3px);
    box-shadow: 0 6px 15px rgba(0, 0, 0, 0.25);
}

/* General Section Styling */
.page-promotions__section {
    padding: 80px 0;
    background-color: var(--bg-light);
}

.page-promotions__section:nth-of-type(even) {
    background-color: #f0f0f0;
}

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

.page-promotions__section-title {
    font-size: 2.5em;
    color: var(--primary-color);
    text-align: center;
    margin-bottom: 25px;
    font-weight: 700;
}

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

/* Promotions Grid */
.page-promotions__promotions-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
}

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

.page-promotions__card:hover {
    transform: translateY(-8px);
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.15);
}

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

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

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

.page-promotions__card-title a:hover {
    color: #1e87b7; /* Darker primary */
}

.page-promotions__card-text {
    font-size: 0.95em;
    margin: 0 20px 20px 20px;
    flex-grow: 1;
    line-height: 1.7;
}

.page-promotions__btn-small {
    display: inline-block;
    padding: 10px 20px;
    background: var(--primary-color);
    color: var(--text-light);
    text-decoration: none;
    border-radius: 6px;
    font-size: 0.9em;
    font-weight: bold;
    margin: 0 20px 20px 20px;
    transition: all 0.3s ease;
    align-self: flex-start;
    box-sizing: border-box;
    white-space: normal;
    word-wrap: break-word;
}

.page-promotions__btn-small:hover {
    background: #1e87b7; /* Darker primary */
    transform: translateY(-2px);
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.2);
}

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

.page-promotions__step-item {
    background: var(--text-light);
    border-radius: 12px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.08);
    padding: 30px;
    text-align: center;
    transition: transform 0.3s ease;
    color: var(--text-dark);
}

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

.page-promotions__step-icon {
    width: 60px;
    height: 60px;
    background: var(--primary-color);
    color: var(--text-light);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2em;
    font-weight: bold;
    margin: 0 auto 20px auto;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.15);
}

.page-promotions__step-title {
    font-size: 1.5em;
    color: var(--primary-color);
    margin-bottom: 15px;
    font-weight: 600;
}

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

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

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

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

/* Terms and Conditions Section */
.page-promotions__terms-list {
    list-style: none;
    padding: 0;
    margin: 0 auto;
    max-width: 900px;
    background: var(--text-light);
    border-radius: 12px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.08);
    padding: 30px;
    color: var(--text-dark);
}

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

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

.page-promotions__link-more {
    display: block;
    text-align: center;
    margin-top: 40px;
    font-size: 1.1em;
    color: var(--primary-color);
    text-decoration: none;
    font-weight: bold;
    transition: color 0.3s ease;
}

.page-promotions__link-more:hover {
    color: #1e87b7; /* Darker primary */
    text-decoration: underline;
}

/* FAQ Section */
.page-promotions__faq-area {
    background-color: var(--bg-light);
}

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

/* FAQ容器样式 */
.page-promotions__faq-item {
  margin-bottom: 15px;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 4px 15px 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 25px;
  opacity: 0;
  color: var(--text-dark);
}

/* 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 25px !important;
  opacity: 1;
  background: var(--text-light); /* Nền sáng cho câu trả lời */
  border-radius: 0 0 12px 12px;
}

/* Vấn đề phong cách */
.page-promotions__faq-question {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px 25px;
  background: var(--text-light);
  border: 1px solid var(--border-color);
  border-radius: 12px;
  cursor: pointer;
  user-select: none;
  transition: background-color 0.3s ease, border-color 0.3s ease;
  position: relative;
  color: var(--primary-color); /* Văn bản câu hỏi có màu thương hiệu */
}

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

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

/* Vấn đề tiêu đề phong cách */
.page-promotions__faq-question h3 {
  margin: 0;
  padding: 0;
  flex: 1;
  font-size: 1.2em;
  font-weight: 600;
  line-height: 1.5;
  pointer-events: none; /* Ngăn thẻ h3 chặn sự kiện nhấp */
  color: var(--primary-color);
}

/* Biểu tượng chuyển đổi */
.page-promotions__faq-toggle {
  font-size: 28px;
  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 nhấp */
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
}

.page-promotions__faq-item.active .page-promotions__faq-toggle {
  color: #1a719a; /* Darker primary */
  transform: rotate(45deg); /* Thay đổi thành X hoặc xoay */
}

/* Responsive Design */
@media (max-width: 1024px) {
    .page-promotions__main-title {
        font-size: 2.8em;
    }
    .page-promotions__section-title {
        font-size: 2.2em;
    }
}

@media (max-width: 768px) {
    .page-promotions__hero-section {
        padding-top: var(--header-offset, 120px) !important;
        padding-bottom: 40px;
        padding-left: 15px;
        padding-right: 15px;
    }

    .page-promotions__hero-image img {
        border-radius: 8px;
        max-width: 100% !important;
        width: 100% !important;
        height: auto !important;
    }

    .page-promotions__hero-content {
        margin-top: -50px;
        padding: 30px 20px;
        border-radius: 8px;
    }

    .page-promotions__main-title {
        font-size: 2.2em;
        margin-bottom: 15px;
    }

    .page-promotions__intro-text {
        font-size: 1em;
        margin-bottom: 25px;
    }

    .page-promotions__cta-buttons {
        flex-direction: column;
        gap: 15px;
        width: 100%;
        max-width: 100% !important;
        box-sizing: border-box !important;
        padding-left: 15px;
        padding-right: 15px;
    }

    .page-promotions__cta-button {
        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 0;
    }

    .page-promotions__container {
        padding: 0 15px;
        max-width: 100% !important;
        width: 100% !important;
        box-sizing: border-box !important;
    }

    .page-promotions__section-title {
        font-size: 1.8em;
        margin-bottom: 20px;
    }

    .page-promotions__section-description {
        font-size: 0.95em;
        margin-bottom: 30px;
    }

    .page-promotions__promotions-grid {
        grid-template-columns: 1fr;
        gap: 25px;
    }

    .page-promotions__card {
        border-radius: 8px;
    }

    .page-promotions__card img {
        
        max-width: 100% !important;
        width: 100% !important;
        height: auto !important;
    }

    .page-promotions__card-title {
        font-size: 1.2em;
        margin: 15px;
    }

    .page-promotions__card-text {
        margin: 0 15px 15px 15px;
    }

    .page-promotions__btn-small {
        margin: 0 15px 15px 15px;
        padding: 8px 15px;
        font-size: 0.85em;
        max-width: 100% !important;
        width: 100% !important;
        box-sizing: border-box !important;
        white-space: normal !important;
        word-wrap: break-word !important;
    }

    .page-promotions__steps-grid {
        grid-template-columns: 1fr;
        gap: 25px;
        margin-top: 30px;
    }

    .page-promotions__step-item {
        padding: 25px;
        border-radius: 8px;
    }

    .page-promotions__step-icon {
        width: 50px;
        height: 50px;
        font-size: 1.8em;
        margin-bottom: 15px;
    }

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

    .page-promotions__step-text {
        font-size: 0.95em;
    }

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

    .page-promotions__terms-list {
        padding: 20px;
        border-radius: 8px;
    }

    .page-promotions__terms-list li {
        font-size: 0.95em;
        margin-bottom: 10px;
        padding-left: 20px;
    }

    .page-promotions__link-more {
        margin-top: 30px;
        font-size: 1em;
    }

    /* FAQ Mobile */
    .page-promotions__faq-question {
        padding: 15px 20px;
        border-radius: 8px;
    }
    
    .page-promotions__faq-question h3 {
        font-size: 1.1em;
    }
    
    .page-promotions__faq-toggle {
        font-size: 24px;
        width: 28px;
        height: 28px;
    }
    
    .page-promotions__faq-item.active .page-promotions__faq-answer {
        padding: 15px 20px !important;
        border-radius: 0 0 8px 8px;
    }
    
    /* General image and container responsive rules */
    .page-promotions img {
      max-width: 100% !important;
      width: 100% !important;
      height: auto !important;
    }
    
    .page-promotions__section,
    .page-promotions__card,
    .page-promotions__container,
    .page-promotions__promotion-item,
    .page-promotions__step-item,
    .page-promotions__terms-list,
    .page-promotions__faq-item {
      max-width: 100% !important;
      width: 100% !important;
      box-sizing: border-box !important;
      padding-left: 15px;
      padding-right: 15px;
    }
    .page-promotions__hero-section .page-promotions__container {
        padding-left: 0;
        padding-right: 0;
    }
    .page-promotions__hero-content {
        padding-left: 20px;
        padding-right: 20px;
    }
    .page-promotions__cta-buttons {
        flex-direction: column;
        gap: 10px;
    }
    .page-promotions__btn-small {
        margin-left: 0;
        margin-right: 0;
    }
    .page-promotions__faq-list {
        padding-left: 15px;
        padding-right: 15px;
    }
}