/* style/download.css */
.page-download {
  color: #ffffff; /* Light text for dark body background */
  background-color: #000000; /* Ensure content background is also dark */
  padding-top: var(--header-offset, 120px); /* Fixed header offset for desktop and mobile */
  overflow-x: hidden; /* Prevent horizontal scroll on mobile */
}

.page-download__section-title {
  font-size: 2.5em;
  color: #FCBC45; /* Accent color for titles */
  text-align: center;
  margin-bottom: 40px;
  position: relative;
  padding-bottom: 15px;
}

.page-download__section-title::after {
  content: '';
  position: absolute;
  left: 50%;
  bottom: 0;
  transform: translateX(-50%);
  width: 80px;
  height: 4px;
  background-color: #FCBC45;
  border-radius: 2px;
}

.page-download__item-title {
  font-size: 1.5em;
  color: #FCBC45;
  margin-top: 20px;
  margin-bottom: 10px;
}

.page-download__item-description,
.page-download__card-description,
.page-download__hero-description {
  font-size: 1.1em;
  line-height: 1.6;
  color: rgba(255, 255, 255, 0.8);
}

/* --- Buttons --- */
.page-download__button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 15px 30px;
  border-radius: 8px;
  font-size: 1.2em;
  font-weight: bold;
  text-decoration: none;
  transition: background-color 0.3s ease, transform 0.3s ease;
  cursor: pointer;
  border: none;
  gap: 10px;
}

.page-download__button--ios {
  background-color: #FFFFFF; /* Register color */
  color: #000000;
}

.page-download__button--android {
  background-color: #FCBC45; /* Login color */
  color: #000000;
}

.page-download__button--primary {
  background-color: #FCBC45;
  color: #000000;
}

.page-download__button--download-now {
  background-color: #FCBC45;
  color: #000000;
  padding: 18px 40px;
  font-size: 1.3em;
}

.page-download__button:hover {
  transform: translateY(-3px);
  opacity: 0.9;
}

/* --- Hero Section --- */
.page-download__hero-section {
  position: relative;
  overflow: hidden;
  padding: 80px 20px 60px; /* Adjust padding, offset is handled by main */
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 600px;
  text-align: center;
}

.page-download__hero-content {
  max-width: 800px;
  z-index: 2;
}

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

.page-download__hero-description {
  margin-bottom: 40px;
}

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

.page-download__hero-image {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 1;
  opacity: 0.3; /* Subtle background */
}

.page-download__hero-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

/* --- Why App Section --- */
.page-download__why-app-section {
  max-width: 1200px;
  margin: 60px auto;
  padding: 40px 20px;
  text-align: center;
}

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

.page-download__why-app-item {
  background-color: rgba(255, 255, 255, 0.05); /* Slightly lighter background for cards */
  padding: 30px;
  border-radius: 12px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2);
  display: flex;
  flex-direction: column;
  align-items: center;
}

.page-download__why-app-item img {
  width: 100%; /* Ensure images are responsive within card */
  height: auto;
  max-width: 400px; /* Max width for content images */
  min-width: 200px; /* Min width for content images */
  min-height: 200px; /* Min height for content images */
  border-radius: 8px;
  object-fit: cover;
}

/* --- Download Methods Section --- */
.page-download__download-methods-section {
  max-width: 1200px;
  margin: 60px auto;
  padding: 40px 20px;
  text-align: center;
}

.page-download__method-cards {
  display: flex;
  justify-content: center;
  gap: 40px;
  flex-wrap: wrap;
  margin-top: 40px;
}

.page-download__method-card {
  background-color: rgba(255, 255, 255, 0.08);
  padding: 40px;
  border-radius: 12px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
  width: 100%;
  max-width: 450px;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.page-download__card-title {
  font-size: 1.8em;
  color: #FCBC45;
  margin-bottom: 15px;
}

.page-download__qr-code {
  width: 250px;
  height: 250px;
  object-fit: contain; /* Use contain for QR codes */
  margin: 25px 0;
  border: 5px solid #FFFFFF;
  border-radius: 8px;
  min-width: 200px; /* Ensure min size */
  min-height: 200px; /* Ensure min size */
}

/* --- Installation Notes Section --- */
.page-download__installation-notes-section {
  max-width: 1200px;
  margin: 60px auto;
  padding: 40px 20px;
  text-align: center;
}

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

.page-download__note-item {
  background-color: rgba(255, 255, 255, 0.05);
  padding: 30px;
  border-radius: 12px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2);
  display: flex;
  flex-direction: column;
  align-items: center;
}

.page-download__note-item img {
  width: 100%;
  height: auto;
  max-width: 400px;
  min-width: 200px;
  min-height: 200px;
  border-radius: 8px;
  object-fit: cover;
}

/* --- FAQ Section --- */
.page-download__faq-section {
  max-width: 900px;
  margin: 60px auto;
  padding: 40px 20px;
}

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

.page-download__faq-item {
  background-color: rgba(255, 255, 255, 0.05);
  border-radius: 8px;
  margin-bottom: 15px;
  overflow: hidden;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.page-download__faq-question {
  display: block;
  padding: 20px 25px;
  font-size: 1.2em;
  font-weight: bold;
  color: #FCBC45;
  cursor: pointer;
  position: relative;
  user-select: none;
  background-color: rgba(255, 255, 255, 0.08);
  transition: background-color 0.3s ease;
}

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

.page-download__faq-toggle {
  position: absolute;
  right: 25px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 1.5em;
  line-height: 1;
  transition: transform 0.3s ease;
}

.page-download__faq-item[open] .page-download__faq-toggle {
  transform: translateY(-50%) rotate(45deg); /* Visually turns '+' into 'X' */
}

.page-download__faq-answer {
  padding: 0 25px 20px;
  font-size: 1.05em;
  color: rgba(255, 255, 255, 0.7);
}

/* --- CTA Section --- */
.page-download__cta-section {
  max-width: 1200px;
  margin: 60px auto;
  padding: 60px 20px;
  text-align: center;
  background: linear-gradient(135deg, rgba(252, 188, 69, 0.1), rgba(0, 0, 0, 0.8));
  border-radius: 15px;
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.4);
}

.page-download__cta-description {
  font-size: 1.3em;
  margin-bottom: 40px;
  color: rgba(255, 255, 255, 0.9);
}

/* --- Responsive Design --- */
@media (max-width: 1024px) {
  .page-download__hero-title {
    font-size: 3em;
  }
}

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

  .page-download__hero-title {
    font-size: 2.5em;
  }

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

  .page-download__button {
    width: 100%;
    max-width: 300px;
  }

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

  .page-download__why-app-grid,
  .page-download__notes-grid {
    grid-template-columns: 1fr;
  }

  .page-download__method-cards {
    flex-direction: column;
    gap: 30px;
  }

  .page-download__method-card {
    max-width: 100%;
  }

  .page-download__faq-question {
    font-size: 1.1em;
    padding: 18px 20px;
  }

  .page-download__faq-toggle {
    right: 20px;
  }

  .page-download__cta-section {
    padding: 40px 15px;
  }

  .page-download__cta-description {
    font-size: 1.1em;
  }

  /* Mobile content image constraint */
  .page-download img {
    max-width: 100%;
    height: auto;
  }
}

@media (max-width: 480px) {
  .page-download__hero-title {
    font-size: 2em;
  }

  .page-download__hero-description {
    font-size: 1em;
  }

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

  .page-download__item-title,
  .page-download__card-title {
    font-size: 1.3em;
  }

  .page-download__button {
    font-size: 1em;
    padding: 12px 20px;
  }
}