/* style/download.css */
:root {
  --primary-color: #FFD700; /* Gold */
  --secondary-color: #DC143C; /* Crimson */
  --text-light: #ffffff;
  --text-dark: #333333;
  --bg-dark: #333; /* From shared.css body background */
  --border-color: #e0e0e0;
}

.page-download {
  color: var(--text-light); /* Body background is dark, so text is light */
  background-color: var(--bg-dark);
}

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

/* 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); /* Ensure space for fixed header */
  background: linear-gradient(135deg, rgba(255, 215, 0, 0.1), rgba(220, 20, 60, 0.1));
  color: var(--text-light);
  overflow: hidden; /* Prevent image overflow */
}

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

.page-download__hero-image {
  width: 100%;
  height: auto; /* HTML width/height set, CSS height:auto for aspect ratio */
  max-width: 100%;
  display: block;
  border-radius: 12px;
  object-fit: cover;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.3);
  margin-bottom: 40px;
  filter: brightness(0.8); /* Slightly dim the image for text readability */
}

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

.page-download__hero-title {
  font-size: 3.2em;
  font-weight: 700;
  margin-bottom: 20px;
  color: var(--primary-color);
  text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
  line-height: 1.2;
}

.page-download__hero-description {
  font-size: 1.3em;
  margin-bottom: 40px;
  color: var(--text-light);
  max-width: 700px;
  margin-left: auto;
  margin-right: auto;
  line-height: 1.6;
}

.page-download__cta-buttons {
  display: flex;
  gap: 20px;
  justify-content: center;
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
  overflow: hidden;
}

.page-download__cta-button {
  display: inline-block;
  padding: 18px 45px;
  background: var(--primary-color);
  color: var(--text-dark); /* Ensure contrast on gold background */
  text-decoration: none;
  border-radius: 8px;
  font-size: 1.2em;
  font-weight: bold;
  transition: all 0.3s ease;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
  border: none;
  max-width: 100%;
  box-sizing: border-box;
  white-space: normal;
  word-wrap: break-word;
}

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

.page-download__cta-button--ios {
  background: #ffffff;
  color: var(--text-dark);
}

.page-download__cta-button--ios:hover {
  background: var(--primary-color);
  color: var(--text-dark);
}


/* General Section Styling */
.page-download__section {
  padding: 80px 0;
  text-align: center;
  color: var(--text-light);
}

.page-download__section:nth-of-type(even) {
  background-color: rgba(255, 255, 255, 0.05); /* Slightly lighter dark background */
}

.page-download__section-title {
  font-size: 2.8em;
  font-weight: 700;
  margin-bottom: 25px;
  color: var(--primary-color);
  text-shadow: 1px 1px 3px rgba(0, 0, 0, 0.4);
}

.page-download__section-intro {
  font-size: 1.1em;
  line-height: 1.7;
  max-width: 900px;
  margin: 0 auto 50px auto;
  color: rgba(255, 255, 255, 0.85);
}

/* Why App Section */
.page-download__features-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 30px;
  margin-top: 50px;
}

.page-download__feature-item {
  background: rgba(255, 255, 255, 0.08);
  padding: 30px;
  border-radius: 10px;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  text-align: left;
  display: flex;
  flex-direction: column;
}

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

.page-download__feature-item img {
  width: 100%;
  height: auto;
  max-width: 100%;
  min-width: 200px; /* Enforce minimum size */
  min-height: 200px; /* Enforce minimum size */
  border-radius: 8px;
  margin-bottom: 20px;
  object-fit: cover;
}

.page-download__feature-title {
  font-size: 1.8em;
  color: var(--primary-color);
  margin-bottom: 15px;
  line-height: 1.3;
}

.page-download__feature-item p {
  font-size: 1em;
  line-height: 1.6;
  color: rgba(255, 255, 255, 0.7);
  flex-grow: 1; /* Ensure consistent height for cards */
}

/* How To Download Section */
.page-download__download-steps {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 60px;
  margin-top: 50px;
  text-align: left;
}

.page-download__platform-guide {
  background: rgba(255, 255, 255, 0.08);
  padding: 40px;
  border-radius: 12px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2);
}

.page-download__platform-title {
  font-size: 2.2em;
  color: var(--secondary-color);
  margin-bottom: 30px;
  text-align: center;
}

.page-download__step-list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.page-download__step-item {
  display: flex;
  align-items: flex-start;
  margin-bottom: 25px;
  gap: 15px;
}

.page-download__step-number {
  background: var(--primary-color);
  color: var(--text-dark);
  border-radius: 50%;
  width: 35px;
  height: 35px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: bold;
  font-size: 1.1em;
  flex-shrink: 0;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

.page-download__step-item p {
  font-size: 1.05em;
  line-height: 1.6;
  color: rgba(255, 255, 255, 0.8);
  margin: 0;
}

.page-download__platform-guide img {
  width: 250px;
  height: 250px;
  max-width: 100%;
  height: auto;
  display: block;
  margin: 20px auto 30px auto;
  border-radius: 8px;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
  min-width: 200px;
  min-height: 200px;
}

.page-download__cta-button--platform {
  margin-top: 30px;
  display: block;
  width: fit-content;
  margin-left: auto;
  margin-right: auto;
  text-align: center;
  background: var(--secondary-color);
  color: var(--text-light);
}

.page-download__cta-button--platform:hover {
  background: var(--primary-color);
  color: var(--text-dark);
}

/* App Features Section */
.page-download__features-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 30px;
  margin-top: 50px;
}

.page-download__feature-card {
  background: rgba(255, 255, 255, 0.08);
  padding: 30px;
  border-radius: 10px;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  text-align: left;
  display: flex;
  flex-direction: column;
}

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

.page-download__feature-card img {
  width: 100%;
  height: auto;
  max-width: 100%;
  min-width: 200px; /* Enforce minimum size */
  min-height: 200px; /* Enforce minimum size */
  border-radius: 8px;
  margin-bottom: 20px;
  object-fit: cover;
}

.page-download__feature-card-title {
  font-size: 1.8em;
  color: var(--primary-color);
  margin-bottom: 15px;
  line-height: 1.3;
}

.page-download__feature-card p {
  font-size: 1em;
  line-height: 1.6;
  color: rgba(255, 255, 255, 0.7);
  flex-grow: 1;
}

/* FAQ Section */
.page-download__faq-section {
  padding-bottom: 80px;
}

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

.page-download__faq-item {
  margin-bottom: 15px;
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.15);
  background: rgba(255, 255, 255, 0.05); /* Slightly lighter dark background */
}

.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: rgba(255, 255, 255, 0.8);
  text-align: left;
}

.page-download__faq-item.active .page-download__faq-answer {
  max-height: 2000px !important; /* Sufficiently large */
  padding: 20px !important;
  opacity: 1;
  background: rgba(255, 255, 255, 0.1); /* Slightly different background for expanded answer */
  border-radius: 0 0 8px 8px;
}

.page-download__faq-question {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px;
  background: rgba(255, 215, 0, 0.1); /* Light gold background for question */
  border: 1px solid rgba(255, 215, 0, 0.2);
  border-radius: 8px;
  cursor: pointer;
  user-select: none;
  transition: background-color 0.3s ease, border-color 0.3s ease;
  position: relative;
}

.page-download__faq-question:hover {
  background: rgba(255, 215, 0, 0.2);
  border-color: var(--primary-color);
}

.page-download__faq-question:active {
  background: rgba(255, 215, 0, 0.3);
}

.page-download__faq-question h3 {
  margin: 0;
  padding: 0;
  flex: 1;
  font-size: 1.2em;
  font-weight: 600;
  line-height: 1.5;
  color: var(--primary-color);
  pointer-events: none;
}

.page-download__faq-toggle {
  font-size: 28px;
  font-weight: bold;
  line-height: 1;
  color: var(--primary-color);
  transition: transform 0.3s ease, color 0.3s ease;
  flex-shrink: 0;
  margin-left: 15px;
  pointer-events: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
}

.page-download__faq-item.active .page-download__faq-toggle {
  color: var(--secondary-color);
  transform: rotate(45deg); /* Rotate for minus sign effect */
}


/* Final CTA Section */
.page-download__final-cta-section {
  background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
  padding: 100px 20px;
  color: var(--text-light);
  border-top: 5px solid rgba(255, 255, 255, 0.2);
}

.page-download__final-cta-section .page-download__section-title {
  color: var(--text-light);
  text-shadow: 2px 2px 5px rgba(0, 0, 0, 0.4);
}

.page-download__final-cta-section .page-download__section-intro {
  color: rgba(255, 255, 255, 0.9);
  margin-bottom: 60px;
}

.page-download__cta-button--final {
  background: #ffffff;
  color: var(--secondary-color);
  border: 2px solid #ffffff;
}

.page-download__cta-button--final:hover {
  background: var(--text-dark);
  color: #ffffff;
  border-color: var(--text-dark);
}

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

.page-download__cta-button--secondary:hover {
  background: #ffffff;
  color: var(--secondary-color);
}

/* Responsive Design */
@media (max-width: 1024px) {
  .page-download__hero-title {
    font-size: 2.8em;
  }
  .page-download__section-title {
    font-size: 2.2em;
  }
  .page-download__hero-description {
    font-size: 1.2em;
  }
  .page-download__cta-button {
    padding: 15px 35px;
    font-size: 1.1em;
  }
}

@media (max-width: 768px) {
  /* Mobile general */
  .page-download {
    font-size: 16px;
    line-height: 1.6;
  }
  .page-download__container {
    padding: 0 15px;
  }

  /* Fixed header offset for mobile */
  .page-download__hero-section {
    padding-top: var(--header-offset, 120px) !important;
    padding-bottom: 40px;
  }

  /* Images responsive */
  .page-download img {
    max-width: 100% !important;
    width: 100% !important;
    height: auto !important;
  }
  .page-download__section,
  .page-download__card,
  .page-download__container,
  .page-download__download-steps,
  .page-download__features-grid,
  .page-download__features-list,
  .page-download__faq-list {
    max-width: 100% !important;
    width: 100% !important;
    box-sizing: border-box !important;
    padding-left: 15px;
    padding-right: 15px;
  }

  /* Buttons responsive */
  .page-download__cta-buttons {
    flex-direction: column;
    gap: 15px;
    padding-left: 15px;
    padding-right: 15px;
  }
  .page-download__cta-button,
  .page-download__cta-button--platform,
  .page-download__cta-button--final,
  .page-download__cta-button--secondary {
    max-width: 100% !important;
    width: 100% !important;
    box-sizing: border-box !important;
    white-space: normal !important;
    word-wrap: break-word !important;
    padding: 15px 20px;
    font-size: 1em;
  }

  /* Section specific */
  .page-download__hero-title {
    font-size: 2.2em;
  }
  .page-download__hero-description {
    font-size: 1em;
  }
  .page-download__section-title {
    font-size: 1.8em;
  }
  .page-download__section-intro {
    font-size: 0.95em;
    margin-bottom: 30px;
  }

  .page-download__download-steps {
    grid-template-columns: 1fr;
    gap: 40px;
  }
  .page-download__platform-guide {
    padding: 30px;
  }
  .page-download__platform-title {
    font-size: 1.8em;
  }
  .page-download__step-item {
    margin-bottom: 20px;
  }
  .page-download__step-item p {
    font-size: 0.95em;
  }

  .page-download__feature-item,
  .page-download__feature-card {
    padding: 25px;
  }
  .page-download__feature-title,
  .page-download__feature-card-title {
    font-size: 1.5em;
  }
  .page-download__feature-item p,
  .page-download__feature-card p {
    font-size: 0.95em;
  }

  /* FAQ responsive */
  .page-download__faq-question {
    padding: 15px;
  }
  .page-download__faq-question h3 {
    font-size: 1.05em;
  }
  .page-download__faq-toggle {
    font-size: 24px;
    width: 28px;
    height: 28px;
  }
  .page-download__faq-answer {
    padding: 0 15px;
  }
  .page-download__faq-item.active .page-download__faq-answer {
    padding: 15px !important;
  }

  .page-download__final-cta-section {
    padding: 60px 15px;
  }
  .page-download__final-cta-section .page-download__section-intro {
    margin-bottom: 40px;
  }
}