/* style/download.css */
/* 
  Colors:
  Primary: #017439
  Secondary: #FFFFFF
  Register/Login buttons: #C30808
  Register/Login font: #FFFF00
  Background: #FFFFFF (for general sections, body is also white from shared)
*/

.page-download {
  font-family: Arial, sans-serif;
  line-height: 1.6;
  color: #333333; /* Dark text for light body background */
  background-color: var(--secondary-color); /* Matches body background */
  overflow-x: hidden; /* Prevent horizontal scroll on main content */
}

/* --- 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); /* Fixed header offset */
  background: linear-gradient(135deg, #017439, #028e46); /* Green gradient for hero */
  color: #ffffff; /* White text for dark background */
}

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

.page-download__hero-content {
  position: relative;
  z-index: 2;
  text-align: center;
  width: 100%;
}

.page-download__main-title {
  font-size: 3.2em;
  margin-bottom: 20px;
  font-weight: bold;
  line-height: 1.2;
  color: #FFFF00; /* Yellow for main title as per 'Register and Login font' for emphasis */
}

.page-download__hero-description {
  font-size: 1.2em;
  margin-bottom: 30px;
  max-width: 800px;
  margin-left: auto;
  margin-right: auto;
}

.page-download__download-buttons {
  display: flex;
  gap: 20px;
  justify-content: center;
  flex-wrap: wrap; /* Allow buttons to wrap on smaller screens */
}

.page-download__btn-download {
  display: inline-block;
  padding: 15px 40px;
  background: #C30808; /* Red for download/register/login as per custom color */
  color: #FFFF00; /* Yellow for button font */
  text-decoration: none;
  border-radius: 8px;
  font-size: 1.1em;
  font-weight: bold;
  transition: all 0.3s ease;
  border: 2px solid transparent;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

.page-download__btn-download:hover {
  background: #e02020;
  transform: translateY(-3px);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.3);
}

.page-download__hero-image-wrapper {
  width: 100%;
  max-width: 900px; /* Adjust max-width for the image */
  margin-top: 40px;
}

.page-download__hero-image {
  width: 100%;
  height: auto;
  max-width: 100%;
  display: block;
  border-radius: 12px;
  object-fit: contain;
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.3);
}

/* --- General Section Styles --- */
.page-download__section {
  padding: 60px 20px;
  text-align: center;
}

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

.page-download__section-title {
  font-size: 2.5em;
  margin-bottom: 20px;
  font-weight: bold;
  color: #017439; /* Primary color for section titles */
}

.page-download__section-description {
  font-size: 1.1em;
  max-width: 800px;
  margin: 0 auto 40px auto;
  color: #555555;
}

/* Dark background section */
.page-download__dark-bg {
  background-color: #017439;
  color: #ffffff;
}
.page-download__dark-bg .page-download__section-title {
  color: #FFFF00; /* Yellow for title on dark background */
}
.page-download__dark-bg .page-download__section-description {
  color: #f0f0f0;
}

/* Light background section */
.page-download__light-bg {
  background-color: #f9f9f9;
  color: #333333;
}
.page-download__light-bg .page-download__section-title {
  color: #017439;
}
.page-download__light-bg .page-download__section-description {
  color: #555555;
}


/* --- 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;
}

.page-download__feature-item {
  background: #f9f9f9;
  padding: 30px;
  border-radius: 10px;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.08);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  text-align: center;
}

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

.page-download__feature-icon {
  width: 200px; /* Enforce minimum size */
  height: 200px; /* Enforce minimum size */
  object-fit: contain;
  margin: 0 auto 20px auto;
  border-radius: 8px;
  display: block;
}

.page-download__feature-title {
  font-size: 1.5em;
  color: #017439;
  margin-bottom: 15px;
}

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

/* --- How to Download Section --- */
.page-download__how-to-download {
  background-color: #017439;
}

.page-download__download-steps-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 40px;
  margin-top: 40px;
}

.page-download__step-block {
  background: rgba(255, 255, 255, 0.1);
  padding: 30px;
  border-radius: 10px;
  text-align: left;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
  display: flex;
  flex-direction: column;
  align-items: center; /* Center content horizontally */
}

.page-download__step-title {
  font-size: 2em;
  color: #FFFF00;
  margin-bottom: 25px;
  text-align: center;
}

.page-download__step-list {
  list-style-type: decimal;
  padding-left: 20px;
  margin-bottom: 30px;
  color: #ffffff;
  font-size: 1.1em;
  max-width: 400px; /* Constrain list width for readability */
  width: 100%;
}

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

.page-download__step-highlight {
  color: #FFFF00;
}

.page-download__qr-code-wrapper {
  margin-bottom: 30px;
  background-color: #ffffff;
  padding: 10px;
  border-radius: 8px;
  box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.page-download__qr-code {
  width: 250px;
  height: 250px;
  object-fit: contain;
  display: block;
}

.page-download__btn-android-inline,
.page-download__btn-ios-inline {
  display: inline-block;
  padding: 12px 30px;
  background: #C30808;
  color: #FFFF00;
  text-decoration: none;
  border-radius: 8px;
  font-size: 1em;
  font-weight: bold;
  transition: all 0.3s ease;
  border: 2px solid transparent;
  margin-top: 10px; /* Space from QR code */
}

.page-download__btn-android-inline:hover,
.page-download__btn-ios-inline:hover {
  background: #e02020;
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

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

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

.page-download__feature-card {
  background: #f9f9f9;
  padding: 25px;
  border-radius: 10px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
  text-align: left;
  transition: transform 0.2s ease;
}

.page-download__feature-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.page-download__card-title {
  font-size: 1.4em;
  color: #017439;
  margin-bottom: 10px;
}

.page-download__feature-card p {
  color: #666666;
  font-size: 0.95em;
}

.page-download__app-overview-image {
  width: 100%;
  height: auto;
  max-width: 1000px;
  margin-top: 50px;
  border-radius: 12px;
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.1);
  object-fit: cover;
}


/* --- System Requirements Section --- */
.page-download__requirements {
  background-color: #f9f9f9;
}

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

.page-download__requirement-item {
  background: #ffffff;
  padding: 30px;
  border-radius: 10px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
  text-align: left;
}

.page-download__requirement-title {
  font-size: 1.5em;
  color: #017439;
  margin-bottom: 15px;
}

.page-download__requirement-list {
  list-style-type: disc;
  padding-left: 20px;
  color: #666666;
  font-size: 1em;
}

.page-download__requirement-list li {
  margin-bottom: 8px;
}

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

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

/* FAQ container style */
.page-download__faq-item {
  margin-bottom: 15px;
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
  background: #ffffff;
}

/* FAQ default state - answer hidden */
.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: #555555;
  text-align: left;
}

/* FAQ expanded state - 🚨 Use!important and sufficiently large max-height */
.page-download__faq-item.active .page-download__faq-answer {
  max-height: 2000px !important; /* 🚨 Use!important to ensure priority, value large enough to contain any content */
  padding: 20px !important;
  opacity: 1;
  background: #f9f9f9;
  border-radius: 0 0 8px 8px;
}

/* Question style */
.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-color: #017439;
  background-color: #f0f0f0;
}


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

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

/* Question title style */
.page-download__faq-question h3 {
  margin: 0;
  padding: 0;
  flex: 1;
  font-size: 1.2em;
  font-weight: 600;
  line-height: 1.5;
  color: #017439;
  pointer-events: none; /* Prevent h3 tag from blocking click event */
}

/* Toggle icon */
.page-download__faq-toggle {
  font-size: 28px;
  font-weight: bold;
  line-height: 1;
  color: #017439;
  transition: transform 0.3s ease, color 0.3s ease;
  flex-shrink: 0;
  margin-left: 15px;
  pointer-events: none; /* Prevent icon from blocking click event */
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
}

.page-download__faq-item.active .page-download__faq-toggle {
  color: #C30808; /* Red when active */
  transform: rotate(180deg); /* Rotate for minus sign */
}

/* --- Final CTA Section --- */
.page-download__final-cta {
  background-color: #017439;
  color: #ffffff;
  padding: 80px 20px;
}

.page-download__final-cta .page-download__section-title {
  color: #FFFF00; /* Yellow for title on dark background */
}

.page-download__final-cta .page-download__section-description {
  color: #f0f0f0;
  margin-bottom: 50px;
}

.page-download__final-cta-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 20px;
}

.page-download__btn-large {
  padding: 18px 50px;
  font-size: 1.3em;
  background: #C30808;
  color: #FFFF00;
  border-color: #C30808;
}

.page-download__btn-register {
  padding: 15px 40px;
  font-size: 1.1em;
  background: #C30808; /* Red for register button */
  color: #FFFF00; /* Yellow for register button font */
  border-radius: 8px;
  text-decoration: none;
  font-weight: bold;
  transition: all 0.3s ease;
  border: 2px solid transparent;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

.page-download__btn-register:hover {
  background: #e02020;
  transform: translateY(-3px);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.3);
}

/* --- Responsive Design --- */
@media (max-width: 1024px) {
  .page-download__main-title {
    font-size: 2.8em;
  }
  .page-download__section-title {
    font-size: 2.2em;
  }
  .page-download__hero-image-wrapper {
    max-width: 700px;
  }
}

@media (max-width: 768px) {
  .page-download__hero-section {
    padding-top: var(--header-offset, 120px) !important; /* Ensure mobile header offset */
    padding-bottom: 40px;
    padding-left: 15px;
    padding-right: 15px;
  }
  
  .page-download__main-title {
    font-size: 2.2em;
    margin-bottom: 15px;
  }
  .page-download__hero-description {
    font-size: 1em;
    margin-bottom: 25px;
  }
  .page-download__download-buttons {
    flex-direction: column;
    gap: 15px;
    width: 100%;
  }
}