/* style/download.css */

/* Base Styles */
.page-download {
    font-family: 'Arial', sans-serif;
    line-height: 1.6;
    color: #333333; /* Dark text for light body background #f4f4f4 */
    background-color: #f4f4f4;
}

.page-download__container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

.page-download__section {
    padding: 60px 0;
    text-align: center;
}

.page-download__section:nth-of-type(even) {
    background-color: #fcfcfc; /* Slightly different background for alternating sections */
}

.page-download__section-title {
    font-size: 38px;
    color: #8B0000; /* Dark red for titles */
    margin-bottom: 20px;
    font-weight: bold;
    line-height: 1.2;
}

.page-download__section-description {
    font-size: 18px;
    color: #555555;
    margin-bottom: 40px;
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
}

/* Hero Section */
.page-download__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, #FFD700, #8B0000); /* Gold to Dark Red gradient */
    color: #ffffff; /* White text for dark background */
    overflow: hidden; /* Ensure no overflow from hero image */
}

.page-download__hero-container {
    position: relative;
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    flex-direction: row; /* Desktop: row layout */
    align-items: center;
    justify-content: space-between;
    gap: 40px;
    width: 100%;
}

.page-download__hero-content {
    flex: 1;
    text-align: left;
    max-width: 60%;
}

.page-download__main-title {
    font-size: 52px;
    margin-bottom: 20px;
    line-height: 1.1;
    font-weight: 900;
    color: #ffffff;
}

.page-download__hero-description {
    font-size: 20px;
    margin-bottom: 40px;
    line-height: 1.5;
    color: #f0f0f0;
}

.page-download__cta-group {
    display: flex;
    gap: 20px;
    margin-top: 30px;
    flex-wrap: wrap; /* Allow buttons to wrap on smaller screens */
    justify-content: flex-start; /* Align buttons to the left on desktop */
}

.page-download__cta-button {
    display: inline-block;
    padding: 15px 40px;
    text-decoration: none;
    border-radius: 8px;
    font-size: 18px;
    font-weight: bold;
    transition: all 0.3s ease;
    box-sizing: border-box;
    white-space: normal; /* Allow text to wrap */
    word-wrap: break-word; /* Ensure long words break */
    max-width: 100%;
}

.page-download__btn-primary {
    background: #FFD700; /* Gold */
    color: #8B0000; /* Dark Red text for contrast */
    border: 2px solid #FFD700;
}

.page-download__btn-primary:hover {
    background: #e6c200; /* Slightly darker gold */
    border-color: #e6c200;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.page-download__btn-secondary {
    background: #8B0000; /* Dark Red */
    color: #FFD700; /* Gold text for contrast */
    border: 2px solid #8B0000;
}

.page-download__btn-secondary:hover {
    background: #6f0000; /* Slightly darker red */
    border-color: #6f0000;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.page-download__hero-image-wrapper {
    flex: 1;
    display: flex;
    justify-content: flex-end;
    align-items: center;
    max-width: 40%;
}

.page-download__hero-image {
    width: 100%;
    height: auto;
    max-width: 100%;
    display: block;
    border-radius: 15px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
    object-fit: contain;
}

/* Why Download Section */
.page-download__why-download {
    background-color: #f4f4f4;
}

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

.page-download__feature-card {
    background: #ffffff;
    border-radius: 10px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.08);
    padding: 30px;
    text-align: center;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

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

.page-download__feature-card img {
    width: 100%;
    max-width: 250px;
    height: auto;
    margin-bottom: 20px;
    border-radius: 8px;
    object-fit: cover;
    display: block;
    margin-left: auto;
    margin-right: auto;
}

.page-download__feature-title {
    font-size: 24px;
    color: #8B0000;
    margin-bottom: 15px;
    font-weight: 700;
}

.page-download__feature-text {
    font-size: 16px;
    color: #666666;
}

/* How to Download Section */
.page-download__how-to-download {
    background-color: #fcfcfc;
}

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

.page-download__step-card {
    background: #ffffff;
    border-radius: 10px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.08);
    padding: 30px;
    text-align: left;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
}

.page-download__step-card img {
    width: 100%;
    height: auto;
    max-width: 100%;
    margin-top: 20px;
    margin-bottom: 15px;
    border-radius: 8px;
    object-fit: cover;
    display: block;
}

.page-download__step-title {
    font-size: 22px;
    color: #FFD700; /* Gold for step titles */
    margin-bottom: 10px;
    font-weight: 700;
}

.page-download__step-text {
    font-size: 16px;
    color: #666666;
}

.page-download__text-link {
    color: #8B0000;
    text-decoration: none;
    font-weight: bold;
    transition: color 0.3s ease;
}

.page-download__text-link:hover {
    color: #FFD700;
    text-decoration: underline;
}

/* App Features Section */
.page-download__app-features {
    background-color: #f4f4f4;
}

.page-download__feature-list {
    list-style: none;
    padding: 0;
    margin-top: 40px;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 30px;
    text-align: left;
}

.page-download__list-item {
    background: #ffffff;
    border-radius: 10px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.08);
    padding: 30px;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.page-download__list-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.12);
}

.page-download__list-title {
    font-size: 22px;
    color: #8B0000;
    margin-bottom: 10px;
    font-weight: 700;
}

.page-download__list-item p {
    font-size: 16px;
    color: #666666;
}

/* App Security Section */
.page-download__app-security {
    background-color: #fcfcfc;
}

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

.page-download__security-item {
    background: #ffffff;
    border-radius: 10px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.08);
    padding: 30px;
    text-align: center;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

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

.page-download__security-item img {
    width: 100%;
    max-width: 250px;
    height: auto;
    margin-bottom: 20px;
    border-radius: 8px;
    object-fit: cover;
    display: block;
    margin-left: auto;
    margin-right: auto;
}

.page-download__security-title {
    font-size: 24px;
    color: #FFD700;
    margin-bottom: 15px;
    font-weight: 700;
}

/* Exclusive Offers Section */
.page-download__exclusive-offers {
    background-color: #f4f4f4;
}

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

.page-download__offer-card {
    background: #ffffff;
    border-radius: 10px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.08);
    padding: 30px;
    text-align: left;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

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

.page-download__offer-card img {
    width: 100%;
    height: auto;
    max-width: 100%;
    margin-bottom: 20px;
    border-radius: 8px;
    object-fit: cover;
    display: block;
}

.page-download__offer-title {
    font-size: 22px;
    color: #8B0000;
    margin-bottom: 10px;
    font-weight: 700;
}

.page-download__offer-card p {
    font-size: 16px;
    color: #666666;
    margin-bottom: 20px;
    flex-grow: 1; /* Make paragraph grow to push button to bottom */
}

.page-download__btn-link {
    display: inline-block;
    padding: 10px 25px;
    background: #FFD700;
    color: #8B0000;
    text-decoration: none;
    border-radius: 5px;
    font-size: 16px;
    font-weight: bold;
    transition: all 0.3s ease;
    border: 2px solid #FFD700;
    max-width: 100%;
    box-sizing: border-box;
    white-space: normal;
    word-wrap: break-word;
}

.page-download__btn-link:hover {
    background: #e6c200;
    border-color: #e6c200;
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

/* FAQ Section */
.page-download__faq {
    background-color: #fcfcfc;
}

.page-download__faq-list {
    margin-top: 40px;
    max-width: 900px;
    margin-left: auto;
    margin-right: auto;
}

/* FAQ容器样式 */
.page-download__faq-item {
  margin-bottom: 15px;
  border-radius: 5px;
  overflow: hidden;
}

/* FAQ默认状态 - 答案隐藏 */
.page-download__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 và đủ lớn max-height để đảm bảo có thể mở rộng */
.page-download__faq-item.active .page-download__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: #f9f9f9;
  border-radius: 0 0 5px 5px;
}

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

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

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

/* Kiểu dáng tiêu đề câu hỏi */
.page-download__faq-question h3 {
  margin: 0;
  padding: 0;
  flex: 1;
  font-size: 18px; /* Hơi lớn hơn để dễ đọc */
  font-weight: 600;
  line-height: 1.5;
  color: #333333;
  pointer-events: none; /* Ngăn thẻ h3 chặn sự kiện nhấp */
}

/* Chuyển đổi biểu tượng */
.page-download__faq-toggle {
  font-size: 28px; /* Hơi lớn hơn để dễ nhìn */
  font-weight: bold;
  line-height: 1;
  color: #8B0000; /* Sử dụng màu thương hiệu cho nút chuyển đổi */
  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; /* Kích thước tăng */
  height: 32px; /* Kích thước tăng */
}

.page-download__faq-item.active .page-download__faq-toggle {
  color: #FFD700; /* Vàng khi hoạt động */
  transform: rotate(45deg); /* Xoay để tạo hiệu ứng 'x' */
}


/* Call to Action Section */
.page-download__call-to-action {
    background: linear-gradient(135deg, #8B0000, #FFD700); /* Dark Red to Gold gradient */
    color: #ffffff;
    padding: 80px 20px;
    border-radius: 10px;
    margin: 40px auto;
    max-width: 1200px;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.2);
}

.page-download__call-to-action .page-download__section-title {
    color: #ffffff;
}

.page-download__call-to-action .page-download__section-description {
    color: #f0f0f0;
}

.page-download__center-buttons {
    justify-content: center; /* Center buttons in CTA */
}


/* Responsive Design */
@media (max-width: 1024px) {
    .page-download__main-title {
        font-size: 44px;
    }
    .page-download__hero-description {
        font-size: 18px;
    }
    .page-download__section-title {
        font-size: 32px;
    }
    .page-download__section-description {
        font-size: 16px;
    }
}

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

    .page-download__hero-container {
        flex-direction: column-reverse; /* Image on top, content below */
        gap: 30px;
    }

    .page-download__hero-content {
        max-width: 100%;
        text-align: center; /* Center content on mobile */
    }

    .page-download__main-title {
        font-size: 36px;
        margin-bottom: 15px;
    }

    .page-download__hero-description {
        font-size: 16px;
        margin-bottom: 30px;
    }

    .page-download__cta-group {
        flex-direction: column; /* Stack buttons vertically */
        gap: 15px;
        width: 100%;
        max-width: 100%;
        justify-content: center; /* Center stacked buttons */
        align-items: center; /* Center stacked buttons */
        padding: 0 15px; /* Add padding to button group */
        box-sizing: border-box;
    }

    .page-download__cta-button {
        width: 100% !important; /* Full width buttons */
        max-width: 100% !important;
        padding: 12px 25px;
        font-size: 16px;
    }

    .page-download__hero-image-wrapper {
        max-width: 80%; /* Smaller image on mobile */
        justify-content: center;
        margin-bottom: 20px;
    }

    .page-download__section {
        padding: 40px 0;
    }

    .page-download__section-title {
        font-size: 28px;
    }

    .page-download__section-description {
        font-size: 15px;
        margin-bottom: 30px;
    }
}