/* style/download.css */

/* Base styles for the download page */
.page-download {
  font-family: 'Arial', sans-serif;
  line-height: 1.6;
  color: #ffffff; /* Default text color for dark body background */
  background-color: transparent; /* Body background is handled by shared.css */
}

/* Ensure sections and containers adapt to body's dark background or define their own */
.page-download__dark-bg {
  background-color: #26A9E0; /* Primary brand color for dark sections */
  color: #ffffff;
}

.page-download__light-bg {
  background-color: #ffffff;
  color: #333333;
}

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

.page-download__center-content {
  text-align: center;
}

.page-download__section {
  padding: 80px 0;
  overflow: hidden; /* Prevent content overflow */
}

.page-download__section-title {
  font-size: 2.8em;
  font-weight: bold;
  margin-bottom: 20px;
  text-align: center;
  color: inherit; /* Inherit color from parent section (dark-bg or light-bg) */
}

.page-download__section-description {
  font-size: 1.1em;
  text-align: center;
  max-width: 800px;
  margin: 0 auto 50px;
  color: inherit;
}

/* Hero Section */
.page-download__hero-section {
  position: relative;
  padding: 120px 0 80px; /* Default desktop padding */
  padding-top: var(--header-offset, 120px); /* Ensure space for fixed header */
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, #26A9E0 0%, #007bff 100%); /* Example gradient with brand color */
  overflow: hidden;
}

.page-download__hero-content {
  text-align: center;
  z-index: 1;
  max-width: 700px;
  margin: 0 auto;
}

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

.page-download__tagline {
  font-size: 1.3em;
  color: #f0f0f0;
  margin-bottom: 40px;
}

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

.page-download__btn-primary,
.page-download__btn-secondary,
.page-download__btn-tertiary,
.page-download__btn-login {
  display: inline-flex;
  align-items: center;
  padding: 15px 30px;
  border-radius: 8px;
  font-size: 1.1em;
  font-weight: bold;
  text-decoration: none;
  transition: background-color 0.3s ease, transform 0.2s ease;
  box-sizing: border-box;
  max-width: 100%; /* Ensure buttons don't overflow */
  white-space: normal; /* Allow text to wrap */
  word-wrap: break-word; /* Allow text to break words */
  text-align: center;
  justify-content: center;
}

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

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

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

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

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

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

.page-download__btn-login {
  background-color: #EA7C07; /* Custom login color */
  color: #ffffff;
  border: 2px solid #EA7C07;
}

.page-download__btn-login:hover {
  background-color: #c96a06;
  border-color: #c96a06;
  transform: translateY(-2px);
}

.page-download__btn-icon {
  margin-right: 10px;
  width: 20px;
  height: 20px;
  background-size: contain;
  background-repeat: no-repeat;
}
.page-download__btn-primary .page-download__btn-icon {
  background-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" fill="%23ffffff" viewBox="0 0 24 24"><path d="M19 9h-4V3H9v6H5l7 7 7-7zM5 18v2h14v-2H5z"/></svg>'); /* Download icon white */
}
.page-download__btn-secondary .page-download__btn-icon {
  background-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" fill="%2326A9E0" viewBox="0 0 24 24"><path d="M19 9h-4V3H9v6H5l7 7 7-7zM5 18v2h14v-2H5z"/></svg>'); /* Download icon blue */
}


.page-download__qr-code-area {
  margin-top: 40px;
}

.page-download__qr-image {
  max-width: 250px;
  height: auto;
  margin-bottom: 15px;
  border-radius: 8px;
  display: block;
  margin-left: auto;
  margin-right: auto;
  min-width: 200px; /* Minimum size requirement */
  min-height: 200px;
}

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

.page-download__hero-image-wrapper {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  overflow: hidden;
  display: flex;
  justify-content: flex-end; /* Align to right */
  align-items: center;
  opacity: 0.3; /* Subtle background image */
  z-index: 0;
}

.page-download__hero-app-mockup {
  width: 70%; /* Adjust size */
  height: auto;
  object-fit: contain;
  transform: translateX(20%) translateY(10%); /* Position slightly off-screen */
  max-width: 1000px; /* Example max width */
  min-width: 200px; /* Minimum size requirement */
  min-height: 200px;
}

/* Why Download Section */
.page-download__why-download {
  background-color: #f8f9fa; /* Light background for contrast */
  color: #333333;
}

.page-download__why-download .page-download__section-title,
.page-download__why-download .page-download__section-description {
  color: #333333;
}

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

.page-download__feature-card {
  background-color: #ffffff;
  padding: 30px;
  border-radius: 12px;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08);
  text-align: center;
  transition: transform 0.3s ease;
  color: #333333;
}

.page-download__feature-card:hover {
  transform: translateY(-5px);
}

.page-download__feature-icon {
  width: 100px; /* Increased size for content image */
  height: 100px;
  margin-bottom: 20px;
  object-fit: contain;
  min-width: 200px; /* Minimum size requirement */
  min-height: 200px;
}

.page-download__card-title {
  font-size: 1.5em;
  font-weight: bold;
  margin-bottom: 15px;
  color: #26A9E0;
}

.page-download__feature-card p {
  font-size: 1em;
  color: #555555;
}

/* How to Download Section */
.page-download__how-to-download {
  background-color: #26A9E0; /* Primary brand color */
  color: #ffffff;
}

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

.page-download__step-card {
  background-color: #ffffff;
  padding: 30px;
  border-radius: 12px;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08);
  color: #333333;
}

.page-download__step-title {
  font-size: 1.4em;
  font-weight: bold;
  margin-bottom: 15px;
  color: #26A9E0;
}

.page-download__step-card p {
  font-size: 1em;
  color: #555555;
  margin-bottom: 20px;
}

.page-download__cta-buttons--small {
  display: flex;
  justify-content: flex-start;
  gap: 10px;
  margin-top: 20px;
  flex-wrap: wrap;
}

.page-download__cta-buttons--small .page-download__btn-primary,
.page-download__cta-buttons--small .page-download__btn-secondary,
.page-download__cta-buttons--small .page-download__btn-login {
  padding: 10px 20px;
  font-size: 0.9em;
}

/* Security Section */
.page-download__security-info {
  background-color: #f8f9fa; /* Light background for contrast */
  color: #333333;
}

.page-download__security-info .page-download__section-title,
.page-download__security-info .page-download__section-description {
  color: #333333;
}

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

.page-download__security-item {
  background-color: #ffffff;
  padding: 30px;
  border-radius: 12px;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08);
  text-align: center;
  color: #333333;
}

.page-download__security-icon {
  width: 100px; /* Increased size for content image */
  height: 100px;
  margin-bottom: 20px;
  object-fit: contain;
  min-width: 200px; /* Minimum size requirement */
  min-height: 200px;
}

/* Video Promo Section */
.page-download__video-promo {
  background-color: #0a0a0a; /* Dark background for video section */
  color: #ffffff;
}

.page-download__video-wrapper {
  position: relative;
  width: 100%;
  max-width: 800px; /* Max width for the video container */
  margin: 50px auto 30px;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.3);
  box-sizing: border-box; /* Ensure padding/border included in width */
}

.page-download__video {
  width: 100%;
  height: auto;
  display: block;
  min-width: 200px; /* Minimum size requirement */
  min-height: 200px;
}

.page-download__video-overlay-link {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 1; /* Overlay on top of video controls if needed, but video controls are generally fine */
  cursor: pointer;
}


.page-download__video-cta-text {
  font-size: 1.1em;
  text-align: center;
  margin-bottom: 30px;
  color: #f0f0f0;
}

.page-download__cta-buttons--center {
  justify-content: center;
}

/* FAQ Section */
.page-download__faq {
  background-color: #f8f9fa; /* Light background for contrast */
  color: #333333;
}

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

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

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

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

.page-download__faq-question:hover {
  background-color: #f0f8ff;
}

.page-download__faq-title {
  margin: 0;
  flex-grow: 1;
  color: inherit;
}

.page-download__faq-toggle {
  font-size: 1.5em;
  font-weight: bold;
  color: #26A9E0;
  margin-left: 15px;
  transition: transform 0.3s ease;
}

.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-out, padding 0.3s ease-out;
  color: #555555;
  font-size: 1em;
}

.page-download__faq-item.active .page-download__faq-answer {
  max-height: 1000px !important; /* Sufficiently large to show all content */
  padding: 15px 25px 20px;
}

.page-download__faq-answer p {
  margin: 0;
  color: #555555;
}

/* Call to Action Section */
.page-download__cta {
  background-color: #0a0a0a; /* Dark background */
  color: #ffffff;
  text-align: center;
}

.page-download__cta .page-download__section-title,
.page-download__cta .page-download__section-description {
  color: #ffffff;
}


/* Responsive Design */
@media (max-width: 1024px) {
  .page-download__main-title {
    font-size: 3em;
  }
  .page-download__tagline {
    font-size: 1.2em;
  }
  .page-download__hero-app-mockup {
    transform: translateX(10%) translateY(10%);
  }
}

@media (max-width: 768px) {
  .page-download__hero-section {
    padding-top: var(--header-offset, 120px) !important; /* Ensure space for fixed header on mobile */
    padding-bottom: 60px;
  }
  .page-download__hero-content {
    padding: 0 15px; /* Add horizontal padding for mobile */
  }
  .page-download__hero-app-mockup {
    position: relative;
    transform: none;
    width: 90%;
    margin: 40px auto 0;
    opacity: 1;
    max-width: 400px;
    min-width: 200px;
    min-height: 200px;
  }
  .page-download__hero-image-wrapper {
    position: relative; /* Change to relative on mobile */
    justify-content: center;
    height: auto;
    padding: 0 15px;
  }

  .page-download__section {
    padding: 60px 0;
  }

  .page-download__section-title {
    font-size: 2em;
    padding: 0 15px;
  }

  .page-download__section-description {
    font-size: 1em;
    margin-bottom: 30px;
    padding: 0 15px;
  }

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

  .page-download__btn-primary,
  .page-download__btn-secondary,
  .page-download__btn-tertiary,
  .page-download__btn-login {
    width: 100%;
    max-width: 100% !important;
    box-sizing: border-box !important;
    white-space: normal !important;
    word-wrap: break-word !important;
    padding: 15px 20px !important;
  }
  
  .page-download__qr-image {
    max-width: 200px;
    min-width: 200px;
    min-height: 200px;
  }

  .page-download__feature-grid,
  .page-download__download-steps,
  .page-download__security-details {
    grid-template-columns: 1fr;
    padding: 0 15px;
  }

  .page-download__feature-card,
  .page-download__step-card,
  .page-download__security-item {
    padding: 25px;
  }

  .page-download__feature-icon,
  .page-download__security-icon {
    width: 150px; /* Adjust for mobile content image */
    height: 150px;
    min-width: 200px; /* Minimum size requirement */
    min-height: 200px;
  }

  .page-download__cta-buttons--small {
    flex-direction: column;
    padding: 0;
  }

  /* Images responsive */
  .page-download img {
    max-width: 100% !important;
    height: auto !important;
    display: block !important;
  }
  
  .page-download__section,
  .page-download__card,
  .page-download__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; /* Crucial for preventing horizontal scroll */
  }

  /* Video responsive */
  .page-download video,
  .page-download__video {
    max-width: 100% !important;
    width: 100% !important;
    height: auto !important;
    display: block !important;
  }
  
  .page-download__video-wrapper {
    max-width: 100% !important;
    width: 100% !important;
    box-sizing: border-box !important;
    padding-left: 0;
    padding-right: 0;
    margin-left: auto;
    margin-right: auto;
  }

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

  .page-download__faq-answer {
    padding: 0 20px;
  }

  .page-download__faq-item.active .page-download__faq-answer {
    padding: 10px 20px 15px;
  }
}

/* Ensure no filter is used on images */
.page-download img {
  filter: none !important;
}

/* Content area images minimum size check for mobile */
@media (max-width: 768px) {
  .page-download__feature-icon,
  .page-download__security-icon,
  .page-download__qr-image,
  .page-download__hero-app-mockup,
  .page-download__video {
    min-width: 200px !important;
    min-height: 200px !important;
    width: 100% !important; /* Override explicit width to ensure max-width: 100% applies */
    height: auto !important;
  }
}

/* Contrast fix for elements that might have issues with dark body background */
/* For elements that are supposed to be light-bg on a dark body, they define their own background and text color */
/* For elements that don't define their own, they inherit #ffffff from .page-download */
.page-download p,
.page-download li,
.page-download h1,
.page-download h2,
.page-download h3,
.page-download h4,
.page-download h5,
.page-download h6 {
  /* Ensure these inherit or explicitly set light color if their parent is dark */
  /* This is generally handled by the section's background and color properties */
}

/* Specific contrast for elements that might be on the main dark background */
.page-download__hero-section .page-download__main-title,
.page-download__hero-section .page-download__tagline,
.page-download__hero-section .page-download__qr-text {
  color: #ffffff;
}
.page-download__video-promo .page-download__section-title,
.page-download__video-promo .page-download__section-description,
.page-download__video-promo .page-download__video-cta-text {
  color: #ffffff;
}
.page-download__cta .page-download__section-title,
.page-download__cta .page-download__section-description {
  color: #ffffff;
}