/* style/download.css */

/* Base styles for the download page */
.page-download {
  font-family: Arial, sans-serif;
  line-height: 1.6;
  color: #333333; /* Default text color for light backgrounds */
  background-color: #f8f8f8; /* Light background for the page */
}

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

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

.page-download__dark-section {
  background-color: #26A9E0; /* Primary brand color */
  color: #ffffff; /* White text for dark background */
}

.page-download__section-title {
  font-size: 36px;
  margin-bottom: 20px;
  font-weight: bold;
  color: inherit; /* Inherit color from parent section */
}

.page-download__section-intro {
  font-size: 18px;
  margin-bottom: 40px;
  max-width: 800px;
  margin-left: auto;
  margin-right: auto;
  color: inherit; /* Inherit color from parent section */
}

/* 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); /* Ensure space for fixed header */
  background: linear-gradient(135deg, #26A9E0, #FFFFFF); /* Blend brand colors */
  overflow: hidden; /* Prevent content overflow */
}

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

.page-download__hero-section img {
  width: 100%;
  height: auto;
  max-width: 100%;
  display: block;
  border-radius: 12px;
  object-fit: cover;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.2);
  margin-bottom: 30px;
  min-width: 200px; /* Enforce min image size */
  min-height: 200px; /* Enforce min image size */
}

.page-download__hero-content {
  position: relative;
  z-index: 2;
  text-align: center;
  width: 100%;
  color: #ffffff;
  text-shadow: 1px 1px 3px rgba(0, 0, 0, 0.4);
}

.page-download__hero-title {
  font-size: 48px;
  margin-bottom: 15px;
  font-weight: 700;
  line-height: 1.2;
  color: #ffffff;
}

.page-download__hero-description {
  font-size: 22px;
  margin-bottom: 30px;
  max-width: 900px;
  margin-left: auto;
  margin-right: auto;
  color: #ffffff;
}

.page-download__hero-cta-group {
  display: flex;
  gap: 20px;
  justify-content: center;
  flex-wrap: wrap; /* Allow buttons to wrap on smaller screens */
  width: 100%;
  max-width: 600px;
  margin: 0 auto;
}

.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;
  min-width: 200px;
  box-sizing: border-box; /* Ensure padding/border included in width */
}

.page-download__cta-button--primary {
  background: #EA7C07; /* Login color for primary action */
  color: #ffffff;
  border: 2px solid #EA7C07;
}

.page-download__cta-button--primary:hover {
  background: #d46d06;
  border-color: #d46d06;
  transform: translateY(-3px);
  box-shadow: 0 6px 15px rgba(0, 0, 0, 0.3);
}

.page-download__cta-button--secondary {
  background: #ffffff;
  color: #26A9E0; /* Primary brand color for text */
  border: 2px solid #26A9E0;
}

.page-download__cta-button--secondary:hover {
  background: #e0f2ff;
  border-color: #1e8dc7;
  transform: translateY(-3px);
  box-shadow: 0 6px 15px rgba(0, 0, 0, 0.2);
}

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

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

.page-download__feature-card {
  background: #f9f9f9;
  border-radius: 12px;
  padding: 25px;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  color: #333333;
}

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

.page-download__feature-card img {
  width: 100%;
  max-width: 400px; /* Max width for feature card images */
  height: auto;
  border-radius: 8px;
  margin-bottom: 20px;
  min-width: 200px; /* Enforce min image size */
  min-height: 200px; /* Enforce min image size */
}

.page-download__feature-title {
  font-size: 24px;
  font-weight: bold;
  margin-bottom: 10px;
  color: #26A9E0;
}

.page-download__feature-description {
  font-size: 16px;
  color: #555555;
}

/* Download Guide Section */
.page-download__download-guide .page-download__section-title,
.page-download__download-guide .page-download__section-intro {
  color: #ffffff;
}

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

.page-download__platform-card {
  background: #ffffff;
  border-radius: 12px;
  padding: 30px;
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.1);
  text-align: center;
  color: #333333;
}

.page-download__platform-title {
  font-size: 28px;
  font-weight: bold;
  margin-bottom: 25px;
  color: #26A9E0;
}

.page-download__qr-code-wrapper {
  margin-bottom: 25px;
  display: flex;
  justify-content: center;
}

.page-download__qr-code-wrapper img {
  width: 250px;
  height: 250px;
  border: 4px solid #26A9E0;
  border-radius: 8px;
  object-fit: contain;
  min-width: 200px; /* Enforce min image size */
  min-height: 200px; /* Enforce min image size */
}

.page-download__guide-steps {
  list-style: none;
  padding: 0;
  margin-bottom: 30px;
  text-align: left;
}

.page-download__guide-steps li {
  margin-bottom: 15px;
  font-size: 17px;
  line-height: 1.5;
  color: #555555;
}

.page-download__guide-steps li strong {
  color: #26A9E0;
}

.page-download__btn-primary {
  display: inline-block;
  padding: 12px 30px;
  background: #26A9E0; /* Primary brand color */
  color: #ffffff;
  text-decoration: none;
  border-radius: 6px;
  font-size: 17px;
  font-weight: bold;
  transition: background-color 0.3s ease, transform 0.3s ease;
  box-sizing: border-box; /* Ensure padding/border included in width */
  max-width: 100%;
}

.page-download__btn-primary:hover {
  background: #1e8dc7;
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.page-download__note {
  margin-top: 40px;
  font-style: italic;
  font-size: 15px;
  color: #f0f0f0;
}

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

.page-download__feature-list {
  margin-top: 40px;
}

.page-download__feature-item {
  display: flex;
  align-items: center;
  gap: 40px;
  margin-bottom: 60px;
  text-align: left;
}

.page-download__feature-item:last-child {
  margin-bottom: 0;
}

.page-download__feature-item--reverse {
  flex-direction: row-reverse;
}

.page-download__feature-item img {
  flex: 1;
  max-width: 50%;
  height: auto;
  border-radius: 12px;
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.1);
  object-fit: cover;
  min-width: 200px; /* Enforce min image size */
  min-height: 200px; /* Enforce min image size */
}

.page-download__feature-content {
  flex: 1;
  max-width: 50%;
  padding: 20px;
  color: #333333;
}

.page-download__feature-content h3 {
  font-size: 32px;
  font-weight: bold;
  margin-bottom: 15px;
  color: #26A9E0;
}

.page-download__feature-content p {
  font-size: 17px;
  line-height: 1.7;
  color: #555555;
}

/* Security Section */
.page-download__security .page-download__section-title,
.page-download__security .page-download__section-intro {
  color: #ffffff;
}

.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: rgba(255, 255, 255, 0.15);
  border-radius: 12px;
  padding: 25px;
  color: #ffffff;
  text-align: center;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

.page-download__security-item img {
  width: 100%;
  max-width: 600px; /* Max width for security item images */
  height: auto;
  border-radius: 8px;
  margin-bottom: 20px;
  object-fit: cover;
  min-width: 200px; /* Enforce min image size */
  min-height: 200px; /* Enforce min image size */
}

.page-download__security-item h3 {
  font-size: 24px;
  font-weight: bold;
  margin-bottom: 10px;
  color: #ffffff;
}

.page-download__security-item p {
  font-size: 16px;
  color: #f0f0f0;
}

.page-download__security-cta {
  margin-top: 40px;
  font-size: 16px;
  color: #f0f0f0;
}

.page-download__security-cta a {
  color: #ffffff;
  text-decoration: underline;
  font-weight: bold;
}

.page-download__security-cta a:hover {
  color: #e0f2ff;
}

/* Troubleshooting Section */
.page-download__troubleshooting {
  background-color: #ffffff;
}

.page-download__troubleshooting-list {
  list-style: none;
  padding: 0;
  margin-top: 40px;
  text-align: left;
}

.page-download__troubleshooting-list li {
  background: #f9f9f9;
  border-left: 5px solid #26A9E0;
  border-radius: 8px;
  padding: 20px 25px;
  margin-bottom: 20px;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
  color: #333333;
}

.page-download__troubleshooting-list li h3 {
  font-size: 22px;
  font-weight: bold;
  margin-bottom: 10px;
  color: #26A9E0;
}

.page-download__troubleshooting-list li p {
  font-size: 16px;
  color: #555555;
}

.page-download__troubleshooting-contact {
  margin-top: 40px;
  font-size: 17px;
  color: #555555;
}

.page-download__troubleshooting-contact a {
  color: #26A9E0;
  text-decoration: underline;
  font-weight: bold;
}

.page-download__troubleshooting-contact a:hover {
  color: #1e8dc7;
}

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

.page-download__faq-list {
  margin-top: 40px;
  text-align: left;
}

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

/* 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;
  padding: 0 20px;
  opacity: 0;
  color: #555555;
}

/* FAQ展开状态 - ⚠️ Sử dụng!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 !important;
  opacity: 1;
  background: #ffffff;
  border-radius: 0 0 8px 8px;
  border-top: 1px solid #e0e0e0;
}

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

.page-download__faq-item.active .page-download__faq-question {
  border-bottom-left-radius: 0;
  border-bottom-right-radius: 0;
  border-bottom-color: transparent;
}

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

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

/* Vấn đề tiêu đề kiểu dáng */
.page-download__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 nhấp */
  color: #26A9E0;
}

/* Chuyển đổi biểu tượng */
.page-download__faq-toggle {
  font-size: 28px;
  font-weight: bold;
  line-height: 1;
  color: #666;
  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: 30px;
  height: 30px;
}

.page-download__faq-item.active .page-download__faq-toggle {
  color: #26A9E0;
  transform: rotate(45deg); /* Xoay để tạo hiệu ứng 'x', hoặc chỉ thay đổi văn bản thành '-' */
}

/* Final CTA Section */
.page-download__final-cta {
  background-color: #26A9E0;
  color: #ffffff;
}

.page-download__final-cta .page-download__section-title,
.page-download__final-cta .page-download__section-intro {
  color: #ffffff;
}

/* Responsive Design */
@media (max-width: 1024px) {
  .page-download__container {
    padding: 15px;
  }

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

  .page-download__section-intro {
    font-size: 16px;
  }

  .page-download__hero-title {
    font-size: 40px;
  }

  .page-download__hero-description {
    font-size: 20px;
  }

  .page-download__feature-item {
    flex-direction: column;
    text-align: center;
  }

  .page-download__feature-item--reverse {
    flex-direction: column;
  }

  .page-download__feature-item img,
  .page-download__feature-content {
    max-width: 100%;
    width: 100%;
  }

  .page-download__feature-content {
    padding: 0;
  }
}

@media (max-width: 768px) {
  .page-download {
    font-size: 16px;
    line-height: 1.6;
  }

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

  .page-download__hero-title {
    font-size: 32px;
  }

  .page-download__hero-description {
    font-size: 18px;
  }

  .page-download__cta-button {
    padding: 12px 30px;
    font-size: 16px;
    max-width: 100% !important;
    width: 100% !important;
    box-sizing: border-box !important;
    white-space: normal !important;
    word-wrap: break-word !important;
  }

  .page-download__hero-cta-group {
    flex-direction: column; /* Stack buttons vertically on mobile */
    gap: 15px;
  }

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

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

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

  .page-download__feature-card {
    padding: 20px;
  }

  .page-download__feature-title {
    font-size: 20px;
  }

  .page-download__feature-description {
    font-size: 16px;
  }

  .page-download__platform-guide {
    grid-template-columns: 1fr; /* Stack platform guides */
    gap: 30px;
  }

  .page-download__platform-card {
    padding: 25px;
  }

  .page-download__platform-title {
    font-size: 24px;
  }

  .page-download__guide-steps li {
    font-size: 15px;
  }

  .page-download__btn-primary {
    padding: 10px 25px;
    font-size: 16px;
    max-width: 100% !important;
    width: 100% !important;
    box-sizing: border-box !important;
    white-space: normal !important;
    word-wrap: break-word !important;
  }

  .page-download__feature-item {
    margin-bottom: 40px;
  }

  .page-download__feature-content h3 {
    font-size: 26px;
  }

  .page-download__feature-content p {
    font-size: 16px;
  }

  .page-download__security-points {
    grid-template-columns: 1fr; /* Stack security points */
    gap: 25px;
  }

  .page-download__security-item h3 {
    font-size: 20px;
  }
}