/* style/download.css */
:root {
  --primary-color: #1A2E4E;
  --secondary-color: #FFD700;
  --text-light: #ffffff;
  --text-dark: #333333;
  --bg-dark-1: #0d0d0d; /* Assuming this is from shared.css */
  --bg-dark-2: #1a1a1a;
  --bg-light-1: #f8f8f8;
  --bg-light-2: #ffffff;
}

.page-download {
  color: var(--text-light); /* Default text color for dark body background */
  background-color: var(--bg-dark-1); /* Assuming body background is dark */
  padding-top: 120px; /* Account for fixed header on desktop */
}

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

.page-download__hero-section {
  text-align: center;
  padding: 80px 0;
  background: linear-gradient(135deg, var(--primary-color) 0%, #0c1a2e 100%);
  color: var(--text-light);
}

.page-download__main-title {
  font-size: 48px;
  font-weight: bold;
  margin-bottom: 20px;
  line-height: 1.2;
  color: var(--secondary-color);
}

.page-download__hero-description {
  font-size: 18px;
  line-height: 1.6;
  margin-bottom: 40px;
  max-width: 800px;
  margin-left: auto;
  margin-right: auto;
}

.page-download__cta-buttons {
  display: flex;
  justify-content: center;
  gap: 20px;
  flex-wrap: wrap;
}

.page-download__cta-button {
  display: inline-block;
  padding: 15px 30px;
  border-radius: 8px;
  font-size: 18px;
  font-weight: bold;
  text-decoration: none;
  transition: all 0.3s ease;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
  text-align: center;
  white-space: normal;
  word-wrap: break-word;
}

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

.page-download__btn-primary:hover {
  background: darken(var(--secondary-color), 10%);
  transform: translateY(-3px);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.3);
}

.page-download__btn-secondary {
  background: transparent;
  color: var(--secondary-color);
  border: 2px solid var(--secondary-color);
}

.page-download__btn-secondary:hover {
  background: var(--secondary-color);
  color: var(--primary-color);
  transform: translateY(-3px);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.3);
}

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

.page-download__btn-tertiary:hover {
  background: darken(var(--primary-color), 10%);
  transform: translateY(-3px);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.3);
}

.page-download__section-title {
  font-size: 38px;
  font-weight: bold;
  text-align: center;
  margin-bottom: 20px;
  color: var(--secondary-color);
}

.page-download__section-description {
  font-size: 18px;
  text-align: center;
  max-width: 900px;
  margin: 0 auto 50px auto;
  line-height: 1.6;
  color: var(--text-light);
}

.page-download__guide-section {
  padding: 80px 0;
  background-color: var(--bg-dark-2);
  color: var(--text-light);
}

.page-download__guide-item {
  margin-bottom: 60px;
  background-color: rgba(255, 255, 255, 0.05);
  padding: 30px;
  border-radius: 10px;
  box-shadow: 0 5px 20px rgba(0, 0, 0, 0.1);
}

.page-download__guide-title {
  font-size: 28px;
  font-weight: bold;
  color: var(--secondary-color);
  margin-bottom: 25px;
  text-align: center;
}

.page-download__guide-content {
  display: flex;
  align-items: center;
  gap: 40px;
}

.page-download__guide-list {
  flex: 1;
  list-style: decimal;
  padding-left: 25px;
  font-size: 17px;
  line-height: 1.8;
}

.page-download__guide-list li {
  margin-bottom: 15px;
}

.page-download__guide-list strong {
  color: var(--secondary-color);
}

.page-download__guide-image {
  flex: 0 0 400px;
  max-width: 400px;
  height: auto;
  border-radius: 8px;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

.page-download__guide-notes {
  list-style: disc;
  padding-left: 25px;
  font-size: 17px;
  line-height: 1.8;
  margin-top: 30px;
}

.page-download__guide-notes li {
  margin-bottom: 10px;
  color: #cccccc;
}

.page-download__benefits-section {
  padding: 80px 0;
  background-color: var(--bg-light-1);
  color: var(--text-dark); /* Light background, dark text */
}

.page-download__benefits-section .page-download__section-title {
  color: var(--primary-color);
}

.page-download__benefits-section .page-download__section-description {
  color: var(--text-dark);
}

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

.page-download__benefit-card {
  background-color: var(--bg-light-2);
  padding: 30px;
  border-radius: 10px;
  box-shadow: 0 5px 20px rgba(0, 0, 0, 0.1);
  text-align: center;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  color: var(--text-dark);
}

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

.page-download__benefit-icon {
  width: 100px;
  height: 100px;
  margin-bottom: 20px;
  object-fit: contain;
}

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

.page-download__benefit-text {
  font-size: 16px;
  line-height: 1.7;
  color: var(--text-dark);
}

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

.page-download__first-login-section {
  padding: 80px 0;
  background-color: var(--primary-color);
  color: var(--text-light);
}

.page-download__first-login-section .page-download__section-title {
  color: var(--secondary-color);
}

.page-download__first-login-section .page-download__section-description {
  color: #cccccc;
}

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

.page-download__login-step-item {
  background-color: rgba(255, 255, 255, 0.08);
  padding: 30px;
  border-radius: 10px;
  text-align: center;
  box-shadow: 0 5px 20px rgba(0, 0, 0, 0.15);
}

.page-download__step-number {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 60px;
  height: 60px;
  border-radius: 50%;
  background-color: var(--secondary-color);
  color: var(--primary-color);
  font-size: 32px;
  font-weight: bold;
  margin-bottom: 20px;
}

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

.page-download__step-text {
  font-size: 16px;
  line-height: 1.7;
  color: #cccccc;
}

.page-download__faq-section {
  padding: 80px 0;
  background-color: var(--bg-dark-1);
  color: var(--text-light);
}

.page-download__faq-section .page-download__section-title {
  color: var(--secondary-color);
}

.page-download__faq-section .page-download__section-description {
  color: #cccccc;
}

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

/* FAQ容器样式 */
.page-download__faq-item {
  margin-bottom: 15px;
  border-radius: 8px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background-color: rgba(255, 255, 255, 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, opacity 0.4s ease;
  padding: 0 20px;
  opacity: 0;
  color: #cccccc;
  font-size: 16px;
  line-height: 1.7;
}

/* 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 !important;
  opacity: 1;
  background: rgba(255, 255, 255, 0.08);
  border-radius: 0 0 8px 8px;
}

/* Vấn đề style */
.page-download__faq-question {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 18px 20px;
  background: var(--primary-color);
  border-radius: 8px;
  cursor: pointer;
  user-select: none;
  transition: background-color 0.3s ease, border-color 0.3s ease;
  position: relative;
  color: var(--text-light);
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.page-download__faq-item.active .page-download__faq-question {
  border-bottom: none;
  border-radius: 8px 8px 0 0;
}

.page-download__faq-question:hover {
  background: darken(var(--primary-color), 5%);
}

.page-download__faq-question:active {
  background: darken(var(--primary-color), 8%);
}

/* Vấn đề tiêu đề style */
.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 h3 tag chặn sự kiện click */
  color: var(--secondary-color);
}

/* Toggle icon */
.page-download__faq-toggle {
  font-size: 28px;
  font-weight: bold;
  line-height: 1;
  color: var(--secondary-color);
  transition: transform 0.3s ease, color 0.3s ease;
  flex-shrink: 0;
  margin-left: 15px;
  pointer-events: none; /* Ngăn icon chặn sự kiện click */
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 30px;
  height: 30px;
}

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

.page-download__why-choose-section {
  padding: 80px 0;
  background-color: var(--bg-dark-2);
  color: var(--text-light);
}

.page-download__why-choose-section .page-download__section-title {
  color: var(--secondary-color);
}

.page-download__why-choose-section .page-download__section-description {
  color: #cccccc;
}

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

.page-download__why-choose-list li {
  background-color: rgba(255, 255, 255, 0.05);
  padding: 20px 30px;
  margin-bottom: 15px;
  border-radius: 8px;
  font-size: 17px;
  line-height: 1.7;
  border-left: 5px solid var(--secondary-color);
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.page-download__why-choose-list li strong {
  color: var(--secondary-color);
}

/* Responsive Design */
@media (max-width: 1024px) {
  .page-download__main-title {
    font-size: 42px;
  }
  .page-download__section-title {
    font-size: 34px;
  }
  .page-download__guide-content {
    flex-direction: column;
    gap: 30px;
  }
  .page-download__guide-image {
    max-width: 100%;
    flex: none;
  }
  .page-download__guide-list {
    padding-left: 20px;
  }
  .page-download__guide-notes {
    padding-left: 20px;
  }
}

@media (max-width: 768px) {
  .page-download {
    padding-top: 100px !important; /* Account for fixed header on mobile */
    font-size: 16px;
    line-height: 1.6;
  }

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

  .page-download__hero-section,
  .page-download__guide-section,
  .page-download__benefits-section,
  .page-download__first-login-section,
  .page-download__faq-section,
  .page-download__why-choose-section {
    padding: 40px 0;
    max-width: 100% !important;
    width: 100% !important;
    box-sizing: border-box !important;
    overflow: hidden !important;
  }

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

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

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

  .page-download__cta-button {
    max-width: 100% !important;
    width: 100% !important;
    box-sizing: border-box !important;
    padding: 12px 20px !important;
    font-size: 16px !important;
  }

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

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

  .page-download__guide-item {
    margin-bottom: 40px;
    padding: 20px;
  }

  .page-download__guide-title {
    font-size: 22px;
    margin-bottom: 20px;
  }

  .page-download__guide-list,
  .page-download__guide-notes {
    font-size: 15px;
    padding-left: 15px;
  }

  .page-download__guide-image {
    max-width: 100% !important;
    width: 100% !important;
    height: auto !important;
    object-fit: contain; /* Ensure image fits within container */
  }

  .page-download__benefits-grid,
  .page-download__login-steps {
    grid-template-columns: 1fr;
    gap: 20px;
    margin-top: 30px;
  }

  .page-download__benefit-card,
  .page-download__login-step-item {
    padding: 25px;
  }

  .page-download__benefit-icon {
    width: 80px;
    height: 80px;
  }

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

  .page-download__step-number {
    width: 50px;
    height: 50px;
    font-size: 28px;
  }

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

  .page-download__faq-list {
    margin-top: 30px;
  }

  .page-download__faq-item {
    margin-bottom: 10px;
  }

  .page-download__faq-question {
    padding: 15px 18px;
  }

  .page-download__faq-question h3 {
    font-size: 16px;
  }

  .page-download__faq-toggle {
    font-size: 24px;
    width: 26px;
    height: 26px;
  }

  .page-download__faq-item.active .page-download__faq-answer {
    padding: 15px !important;
  }

  .page-download__why-choose-list {
    margin-top: 30px;
  }

  .page-download__why-choose-list li {
    padding: 15px 20px;
    font-size: 15px;
  }
}