/* style/download.css */
/* body background is #0a0a0a (dark), so main text color should be light. */
/* body đã padding-top: var(--header-offset) từ shared.css; trang này không cần lặp lại. */

.page-download {
  font-family: 'Arial', sans-serif;
  line-height: 1.6;
  color: #ffffff; /* Default text color for dark body background */
  background-color: transparent; /* Main content background is transparent, relying on body background */
}

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

.page-download__section-title {
  font-size: 2.5em;
  color: #26A9E0;
  text-align: center;
  margin-bottom: 20px;
  font-weight: bold;
}

.page-download__section-description {
  font-size: 1.1em;
  color: #f0f0f0;
  text-align: center;
  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;
  padding: 60px 20px;
  padding-top: 10px; /* Small top padding, body handles header offset */
  min-height: 600px;
  overflow: hidden;
}

.page-download__hero-container {
  width: 100%;
  max-width: 1200px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 30px;
  text-align: center;
}

.page-download__hero-image {
  width: 100%;
  max-width: 800px; /* Adjust based on desired visual hierarchy */
  height: auto;
  border-radius: 15px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
  order: 1; /* Image appears first in DOM */
}

.page-download__hero-content {
  order: 2; /* Content appears second in DOM */
  max-width: 800px;
  color: #ffffff;
}

.page-download__main-title {
  font-size: clamp(2em, 4vw, 3.2em); /* Responsive font size */
  color: #FFFFFF;
  margin-bottom: 15px;
  font-weight: 800;
  line-height: 1.2;
}

.page-download__intro-text {
  font-size: 1.2em;
  margin-bottom: 30px;
  color: #f0f0f0;
}

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

/* Buttons */
.page-download__btn-primary,
.page-download__btn-secondary {
  display: inline-block;
  padding: 15px 30px;
  border-radius: 50px;
  text-decoration: none;
  font-weight: bold;
  transition: all 0.3s ease;
  box-sizing: border-box;
  max-width: 100%; /* Ensure buttons are responsive */
  white-space: normal;
  word-wrap: break-word;
  text-align: center;
}

.page-download__btn-primary {
  background-color: #26A9E0;
  color: #ffffff;
  border: 2px solid #26A9E0;
}

.page-download__btn-primary:hover {
  background-color: #1a8cc4;
  border-color: #1a8cc4;
  transform: translateY(-2px);
}

.page-download__btn-secondary {
  background-color: transparent;
  color: #26A9E0;
  border: 2px solid #26A9E0;
}

.page-download__btn-secondary:hover {
  background-color: #26A9E0;
  color: #ffffff;
  transform: translateY(-2px);
}

/* Why Download Section */
.page-download__why-download-section {
  padding: 80px 0;
  background-color: #0a0a0a; /* Explicit dark background for this section */
  color: #ffffff;
}

.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: rgba(255, 255, 255, 0.05); /* Slightly transparent white for dark background */
  border-radius: 15px;
  padding: 30px;
  text-align: center;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
  display: flex;
  flex-direction: column;
  align-items: center;
  color: #ffffff;
}

.page-download__feature-icon {
  width: 100%;
  max-width: 200px;
  height: auto;
  margin-bottom: 20px;
  border-radius: 10px;
}

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

.page-download__feature-text {
  font-size: 1em;
  color: #f0f0f0;
}

/* How to Download Section */
.page-download__how-to-download-section {
  padding: 80px 0;
  background-color: #1a1a1a; /* Darker background for contrast */
  color: #ffffff;
}

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

.page-download__platform-card {
  background: rgba(255, 255, 255, 0.08);
  border-radius: 15px;
  padding: 30px;
  text-align: center;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
  display: flex;
  flex-direction: column;
  align-items: center;
  color: #ffffff;
}

.page-download__platform-title {
  font-size: 1.8em;
  color: #26A9E0;
  margin-bottom: 20px;
  font-weight: 700;
}

.page-download__qr-code {
  width: 100%;
  max-width: 250px;
  height: auto;
  margin-bottom: 25px;
  border: 5px solid #ffffff;
  border-radius: 5px;
}

.page-download__steps-list {
  list-style: none;
  padding: 0;
  margin-bottom: 30px;
  text-align: left;
  width: 100%;
  max-width: 300px;
}

.page-download__steps-list li {
  background: rgba(255, 255, 255, 0.05);
  padding: 10px 15px;
  margin-bottom: 10px;
  border-radius: 8px;
  color: #f0f0f0;
  position: relative;
  padding-left: 35px;
}

.page-download__steps-list li::before {
  content: counter(step-counter);
  counter-increment: step-counter;
  position: absolute;
  left: 10px;
  top: 50%;
  transform: translateY(-50%);
  background-color: #26A9E0;
  color: #ffffff;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.8em;
  font-weight: bold;
}

.page-download__platform-card .page-download__btn-primary {
  margin-top: auto; /* Push button to bottom */
}

/* Video Section */
.page-download__video-section {
  padding: 60px 0;
  text-align: center;
}

.page-download__video-title {
  font-size: 1.8em;
  color: #26A9E0;
  margin-bottom: 25px;
  font-weight: 700;
}

.page-download__video-container {
  width: 100%;
  max-width: 900px;
  margin: 0 auto;
  background-color: #000;
  border-radius: 15px;
  overflow: hidden;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
}

.page-download__video-wrapper {
  position: relative;
  width: 100%;
  padding-bottom: 56.25%; /* 16:9 Aspect Ratio */
  height: 0;
  background-color: #000;
}

.page-download__video {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  display: block;
  cursor: pointer;
}

.page-download__video-cta {
  margin-top: 30px;
}

/* App Features Section */
.page-download__app-features-section {
  padding: 80px 0;
  background-color: #0a0a0a;
  color: #ffffff;
}

/* Security Section */
.page-download__security-section {
  padding: 80px 0;
  background-color: #1a1a1a;
  color: #ffffff;
  text-align: center;
}

.page-download__security-image {
  width: 100%;
  max-width: 800px;
  height: auto;
  margin: 40px auto;
  border-radius: 15px;
  box-shadow: 0 5px 20px rgba(0, 0, 0, 0.4);
}

.page-download__security-list {
  list-style: none;
  padding: 0;
  margin-top: 30px;
  margin-bottom: 40px;
  max-width: 800px;
  margin-left: auto;
  margin-right: auto;
  text-align: left;
}

.page-download__security-list li {
  background: rgba(255, 255, 255, 0.05);
  padding: 15px 20px;
  margin-bottom: 10px;
  border-radius: 8px;
  position: relative;
  padding-left: 45px;
  color: #f0f0f0;
}

.page-download__security-list li::before {
  content: '✔';
  color: #26A9E0;
  font-size: 1.2em;
  position: absolute;
  left: 15px;
  top: 50%;
  transform: translateY(-50%);
}

/* FAQ Section */
.page-download__faq-section {
  padding: 80px 0;
  background-color: #0a0a0a;
  color: #ffffff;
}

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

.page-download__faq-item {
  background: rgba(255, 255, 255, 0.08);
  border-radius: 10px;
  margin-bottom: 15px;
  overflow: hidden;
  color: #ffffff;
}

.page-download__faq-item summary {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px;
  cursor: pointer;
  font-weight: bold;
  font-size: 1.1em;
  color: #ffffff;
  list-style: none; /* Remove default marker */
}

.page-download__faq-item summary::-webkit-details-marker {
  display: none; /* Remove default marker for Webkit browsers */
}

.page-download__faq-question {
  display: flex;
  justify-content: space-between;
  width: 100%;
}

.page-download__faq-qtext {
  flex-grow: 1;
  text-align: left;
  color: #f0f0f0;
}

.page-download__faq-toggle {
  font-size: 1.5em;
  line-height: 1;
  margin-left: 10px;
  color: #26A9E0;
}

.page-download__faq-answer {
  padding: 0 20px 20px 20px;
  font-size: 0.95em;
  color: #cccccc;
  line-height: 1.5;
}

/* Fallback for non-details elements (if used) */
.page-download__faq-item.active .page-download__faq-answer {
  max-height: 2000px !important; /* Large enough to show content */
  transition: max-height 0.5s ease-in-out;
}

.page-download__faq-item:not(.active) .page-download__faq-answer {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.5s ease-in-out;
}

.page-download__faq-item.active .page-download__faq-toggle {
  content: '−';
}

/* Final CTA Section */
.page-download__cta-final-section {
  padding: 80px 0;
  background-color: #26A9E0; /* Brand color background for strong CTA */
  color: #ffffff;
  text-align: center;
}

.page-download__cta-final-section .page-download__section-title {
  color: #ffffff;
}

.page-download__cta-final-section .page-download__section-description {
  color: #e0e0e0;
}

/* Responsive Design */
@media (max-width: 1024px) {
  .page-download__hero-image {
    max-width: 600px;
  }
}

@media (max-width: 768px) {
  .page-download__hero-section {
    padding: 40px 15px;
  }

  .page-download__main-title {
    font-size: clamp(1.8em, 7vw, 2.5em);
  }

  .page-download__intro-text {
    font-size: 1em;
  }

  .page-download__cta-buttons {
    flex-direction: column;
    gap: 15px;
  }

  .page-download__btn-primary,
  .page-download__btn-secondary {
    max-width: 100% !important;
    width: 100% !important;
    padding: 12px 20px;
    font-size: 0.9em;
  }

  .page-download__section-title {
    font-size: 2em;
  }

  .page-download__section-description {
    font-size: 0.95em;
  }

  .page-download__why-download-section,
  .page-download__how-to-download-section,
  .page-download__app-features-section,
  .page-download__security-section,
  .page-download__faq-section,
  .page-download__cta-final-section {
    padding: 50px 0;
  }

  .page-download__container {
    padding: 0 15px;
  }

  .page-download__features-grid,
  .page-download__download-platforms {
    grid-template-columns: 1fr;
    gap: 25px;
  }

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

  .page-download__qr-code {
    max-width: 200px;
  }

  .page-download__steps-list,
  .page-download__security-list {
    max-width: 100%;
    padding: 0 15px;
  }

  /* Mobile image responsiveness */
  .page-download img {
    max-width: 100% !important;
    height: auto !important;
    display: block !important;
  }
  
  .page-download__hero-image,
  .page-download__feature-icon,
  .page-download__qr-code,
  .page-download__security-image {
    max-width: 100% !important;
    width: 100% !important;
    height: auto !important;
  }

  /* Mobile video responsiveness */
  .page-download video,
  .page-download__video {
    max-width: 100% !important;
    width: 100% !important;
    height: auto !important;
    display: block !important;
  }
  
  .page-download__video-section,
  .page-download__video-container,
  .page-download__video-wrapper {
    max-width: 100% !important;
    width: 100% !important;
    box-sizing: border-box !important;
    padding-left: 15px;
    padding-right: 15px;
    overflow: hidden !important;
  }
  
  .page-download__video-section {
    padding-top: 10px !important;
  }

  /* Mobile containers padding */
  .page-download__hero-section .page-download__hero-container,
  .page-download__why-download-section .page-download__container,
  .page-download__how-to-download-section .page-download__container,
  .page-download__app-features-section .page-download__container,
  .page-download__security-section .page-download__container,
  .page-download__faq-section .page-download__container,
  .page-download__cta-final-section .page-download__container {
    padding-left: 15px;
    padding-right: 15px;
    box-sizing: border-box !important;
    width: 100% !important;
    max-width: 100% !important;
  }

  .page-download__faq-item summary {
    font-size: 1em;
    padding: 15px;
  }
  .page-download__faq-answer {
    padding: 0 15px 15px 15px;
  }
}

@media (max-width: 480px) {
  .page-download__main-title {
    font-size: clamp(1.5em, 8vw, 2.2em);
  }
  .page-download__section-title {
    font-size: 1.8em;
  }
  .page-download__intro-text {
    font-size: 0.9em;
  }
  .page-download__feature-title {
    font-size: 1.3em;
  }
  .page-download__platform-title {
    font-size: 1.5em;
  }
  .page-download__video-title {
    font-size: 1.5em;
  }
}

/* Color Contrast Fixes (as per instructions) */
.page-download__dark-bg {
  background: #0a0a0a; /* Body background */
  color: #ffffff;
}

.page-download__light-bg {
  background: #0a0a0a; /* All sections are dark */
  color: #ffffff;
}

/* Ensure all text within .page-download has sufficient contrast */
.page-download p,
.page-download li,
.page-download__feature-text,
.page-download__steps-list li,
.page-download__security-list li,
.page-download__faq-answer p {
  color: #f0f0f0; /* Light text on dark backgrounds */
}

.page-download__faq-qtext {
  color: #ffffff; /* Light text for FAQ questions */
}

.page-download__btn-primary {
  background: #26A9E0;
  color: #ffffff;
}

.page-download__btn-secondary {
  background: transparent;
  color: #26A9E0;
  border-color: #26A9E0;
}

.page-download__btn-secondary:hover {
  background: #26A9E0;
  color: #ffffff;
}