/* style/download.css */

/* Base Styles & Color Contrast */
.page-download {
  color: #ffffff; /* Default light text for dark body background */
  font-family: Arial, sans-serif;
  line-height: 1.6;
  background-color: transparent; /* Body background is handled by shared.css (#0a0a0a) */
}

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

.page-download__dark-bg {
  background-color: #017439; /* Brand primary color for dark sections */
  color: #ffffff;
}

.page-download__light-bg {
  background-color: #ffffff; /* Auxiliary color for light sections */
  color: #333333;
}

.page-download__section-title {
  font-size: 2.5em;
  text-align: center;
  margin-bottom: 40px;
  color: #ffffff; /* Ensure contrast on dark backgrounds */
  font-weight: bold;
}

.page-download__section-description {
  font-size: 1.1em;
  text-align: center;
  max-width: 800px;
  margin: 0 auto 60px;
  line-height: 1.8;
  color: #f0f0f0; /* Slightly off-white for better readability */
}

.page-download__card {
  background: rgba(255, 255, 255, 0.1); /* Semi-transparent white on dark body background */
  color: #ffffff;
  border-radius: 8px;
  padding: 30px;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
  border: 1px solid rgba(255, 255, 255, 0.15);
}

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

.page-download__btn-primary {
  background-color: #C30808; /* Custom color for register/login/download */
  color: #FFFF00; /* Custom font color for register/login/download */
  border: 2px solid #C30808;
}

.page-download__btn-primary:hover {
  background-color: #e02020;
  border-color: #e02020;
}

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

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

/* Hero Section */
.page-download__hero-section {
  position: relative;
  padding: 80px 0;
  padding-top: var(--header-offset, 120px); /* Fixed header offset */
  display: flex;
  align-items: center;
  overflow: hidden;
}

.page-download__hero-section .page-download__container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 40px;
}

.page-download__hero-content {
  flex: 1;
  min-width: 300px;
  max-width: 50%;
}

.page-download__hero-title {
  font-size: 3.5em;
  margin-bottom: 20px;
  line-height: 1.2;
  color: #ffffff;
  font-weight: bold;
}

.page-download__hero-description {
  font-size: 1.2em;
  margin-bottom: 30px;
  color: #f0f0f0;
  line-height: 1.7;
}

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

.page-download__hero-image-wrapper {
  flex: 1;
  min-width: 300px;
  max-width: 45%;
  display: flex;
  justify-content: center;
  align-items: center;
}

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

/* Benefits Section */
.page-download__benefits-section {
  padding: 80px 0;
  background-color: rgba(255, 255, 255, 0.05); /* Lighter background for contrast */
  color: #ffffff;
}

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

.page-download__benefit-item {
  text-align: center;
}

.page-download__benefit-icon {
  width: 100%;
  height: auto;
  max-width: 250px;
  border-radius: 8px;
  margin-bottom: 20px;
  display: block;
  margin-left: auto;
  margin-right: auto;
}

.page-download__benefit-title {
  font-size: 1.5em;
  margin-bottom: 15px;
  color: #FFFF00; /* Highlighted title */
}

.page-download__benefit-description {
  font-size: 1em;
  color: #f0f0f0;
}

/* Guide Section */
.page-download__guide-section {
  padding: 80px 0;
}

.page-download__guide-steps {
  display: flex;
  gap: 60px;
  flex-wrap: wrap;
  justify-content: center;
}

.page-download__guide-platform {
  flex: 1;
  min-width: 450px;
  background: rgba(255, 255, 255, 0.08);
  padding: 40px;
  border-radius: 10px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.page-download__platform-title {
  font-size: 2em;
  text-align: center;
  margin-bottom: 30px;
  color: #FFFF00;
  font-weight: bold;
}

.page-download__step-list {
  list-style: none;
  padding: 0;
  counter-reset: step-counter;
}

.page-download__step-list li {
  margin-bottom: 40px;
  position: relative;
  padding-left: 50px;
}

.page-download__step-list li::before {
  counter-increment: step-counter;
  content: "Bước " counter(step-counter) ":";
  position: absolute;
  left: 0;
  top: 0;
  font-weight: bold;
  color: #FFFF00;
  font-size: 1.1em;
}

.page-download__step-text {
  margin-bottom: 15px;
  color: #f0f0f0;
}

.page-download__step-image {
  max-width: 100%;
  height: auto;
  border-radius: 8px;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.3);
  display: block;
  margin-top: 20px;
}

/* Features Section */
.page-download__features-section {
  padding: 80px 0;
  background-color: #ffffff;
  color: #333333;
}

.page-download__features-section .page-download__section-title,
.page-download__features-section .page-download__section-description {
  color: #333333;
}

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

.page-download__feature-card {
  background: #f8f8f8;
  color: #333333;
  padding: 0;
  border-radius: 8px;
  overflow: hidden;
  text-align: left;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
  border: none;
}

.page-download__feature-image {
  width: 100%;
  height: 200px; /* Fixed height for consistency */
  object-fit: cover;
  display: block;
}

.page-download__feature-card h3 {
  padding: 20px 25px 0;
  font-size: 1.4em;
  margin-bottom: 10px;
}

.page-download__feature-card h3 a {
  color: #017439; /* Brand primary color for links */
  text-decoration: none;
  font-weight: bold;
}

.page-download__feature-card h3 a:hover {
  text-decoration: underline;
}

.page-download__feature-text {
  padding: 0 25px 25px;
  font-size: 0.95em;
  color: #555555;
}

/* Compatibility Section */
.page-download__compatibility-section {
  padding: 80px 0;
}

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

.page-download__compatibility-text {
  flex: 1;
  min-width: 300px;
  max-width: 550px;
}

.page-download__compatibility-subtitle {
  font-size: 1.8em;
  margin-top: 30px;
  margin-bottom: 15px;
  color: #FFFF00;
}

.page-download__compatibility-list {
  list-style: disc;
  margin-left: 20px;
  margin-bottom: 20px;
  color: #f0f0f0;
}

.page-download__compatibility-list li {
  margin-bottom: 10px;
}

.page-download__compatibility-note {
  font-style: italic;
  color: #cccccc;
}

.page-download__compatibility-note a {
  color: #FFFF00; /* Link color for support */
  text-decoration: none;
}

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

.page-download__compatibility-image-wrapper {
  flex: 1;
  min-width: 300px;
  max-width: 450px;
  display: flex;
  justify-content: center;
  align-items: center;
}

.page-download__compatibility-image {
  max-width: 100%;
  height: auto;
  border-radius: 10px;
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.4);
}

/* FAQ Section */
.page-download__faq-section {
  padding: 80px 0;
  background-color: rgba(255, 255, 255, 0.05);
  color: #ffffff;
}

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

.page-download__faq-item {
  background: rgba(255, 255, 255, 0.08);
  border-radius: 8px;
  margin-bottom: 15px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.page-download__faq-question {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px 25px;
  cursor: pointer;
  font-size: 1.2em;
  font-weight: bold;
  color: #ffffff;
  transition: background-color 0.3s ease;
}

.page-download__faq-question:hover {
  background-color: rgba(255, 255, 255, 0.15);
}

.page-download__faq-toggle {
  font-size: 1.5em;
  line-height: 1;
  transition: transform 0.3s ease;
  color: #FFFF00;
}

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

.page-download__faq-answer {
  max-height: 0;
  overflow: hidden;
  padding: 0 25px;
  transition: max-height 0.3s ease, padding 0.3s ease;
  color: #f0f0f0;
}

.page-download__faq-item.active .page-download__faq-answer {
  max-height: 1000px !important; /* Ensure it expands sufficiently */
  padding: 15px 25px;
}

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

.page-download__faq-answer a {
  color: #FFFF00;
  text-decoration: none;
}

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

/* Final CTA Section */
.page-download__cta-final-section {
  padding: 80px 0;
  text-align: center;
}

.page-download__cta-final-section .page-download__cta-buttons {
  justify-content: center;
  margin-top: 40px;
  margin-bottom: 40px;
}

.page-download__cta-image {
  max-width: 100%;
  height: auto;
  border-radius: 15px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
  margin-top: 40px;
  display: block;
  margin-left: auto;
  margin-right: auto;
}

/* Responsive Design */
@media (max-width: 1024px) {
  .page-download__hero-title {
    font-size: 3em;
  }
  .page-download__hero-content,
  .page-download__hero-image-wrapper {
    max-width: 100%;
  }
  .page-download__hero-section .page-download__container {
    flex-direction: column;
  }
  .page-download__hero-image-wrapper {
    order: -1; /* Image above text on smaller screens */
  }
  .page-download__guide-platform {
    min-width: unset;
    width: 100%;
  }
  .page-download__compatibility-content {
    flex-direction: column;
  }
  .page-download__compatibility-image-wrapper {
    order: -1;
  }
}

@media (max-width: 768px) {
  .page-download__hero-section {
    padding: 60px 0;
    padding-top: var(--header-offset, 120px) !important; /* Ensure mobile padding-top is correct */
  }
  .page-download__hero-title {
    font-size: 2.2em;
    text-align: center;
  }
  .page-download__hero-description {
    font-size: 1em;
    text-align: center;
  }
  .page-download__cta-buttons {
    flex-direction: column;
    gap: 15px;
    width: 100%;
  }
  .page-download__btn-primary,
  .page-download__btn-secondary {
    width: 100% !important;
    max-width: 100% !important;
    padding: 12px 20px;
  }
  .page-download__section-title {
    font-size: 2em;
  }
  .page-download__section-description {
    font-size: 0.95em;
  }
  .page-download__benefits-grid,
  .page-download__features-grid {
    grid-template-columns: 1fr;
  }
  .page-download__guide-platform {
    padding: 25px;
  }
  .page-download__platform-title {
    font-size: 1.6em;
  }
  .page-download__step-list li {
    padding-left: 0;
  }
  .page-download__step-list li::before {
    position: static;
    display: block;
    margin-bottom: 10px;
  }
  .page-download__feature-card h3 {
    font-size: 1.2em;
  }
  .page-download__faq-question {
    font-size: 1.1em;
    padding: 15px 20px;
  }
  .page-download__faq-answer {
    padding: 0 20px;
  }
  .page-download__faq-item.active .page-download__faq-answer {
    padding: 10px 20px;
  }

  /* Mobile image responsiveness */
  .page-download img {
    max-width: 100% !important;
    height: auto !important;
    display: block !important;
  }
  .page-download__section,
  .page-download__card,
  .page-download__container,
  .page-download__hero-section,
  .page-download__benefits-section,
  .page-download__guide-section,
  .page-download__features-section,
  .page-download__compatibility-section,
  .page-download__faq-section,
  .page-download__cta-final-section,
  .page-download__hero-image-wrapper,
  .page-download__benefits-grid,
  .page-download__guide-steps,
  .page-download__features-grid,
  .page-download__compatibility-content,
  .page-download__faq-list {
    max-width: 100% !important;
    width: 100% !important;
    box-sizing: border-box !important;
    padding-left: 15px;
    padding-right: 15px;
    overflow-x: hidden !important; /* Prevent horizontal scroll */
  }
  /* Specific adjustments for elements that might still cause overflow */
  .page-download__hero-image,
  .page-download__benefit-icon,
  .page-download__step-image,
  .page-download__feature-image,
  .page-download__compatibility-image,
  .page-download__cta-image {
    width: 100% !important;
    height: auto !important;
    max-width: 100% !important;
    object-fit: contain; /* Adjust object-fit for smaller screens if needed */
  }
}