/* style/download.css */

/* Variables and Base Styles (BEM Naming) */
:root {
  --primary-color: #0A2342;
  --secondary-color: #FFD700;
  --text-dark: #333333;
  --text-light: #ffffff;
  --background-light: #f8f8f8;
  --background-dark: #0A2342; /* Using primary color for dark sections */
  --border-color: #e0e0e0;
}

.page-download {
  font-family: 'Arial', sans-serif;
  line-height: 1.6;
  color: var(--text-dark); /* Default text color for light background */
  background-color: #ffffff; /* Default body background */
  padding-top: var(--header-offset, 120px); /* Fixed header offset */
}

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

.page-download__section-title {
  font-size: 2.5em;
  color: var(--primary-color);
  text-align: center;
  margin-bottom: 20px;
  font-weight: bold;
}

.page-download__section-description {
  font-size: 1.1em;
  color: var(--text-dark);
  text-align: center;
  max-width: 800px;
  margin: 0 auto 50px auto;
  line-height: 1.8;
}

/* Color Contrast Utility Classes */
.page-download__dark-bg {
  background-color: var(--background-dark);
  color: var(--text-light);
}

.page-download__light-bg {
  background-color: var(--background-light);
  color: var(--text-dark);
}

.page-download__text-contrast-fix {
  color: var(--text-light) !important; /* For text on dark backgrounds */
}

/* Image Responsive Styles (Global) */
.page-download img {
  max-width: 100%;
  height: auto;
  display: block;
}

/* Button Styles */
.page-download__cta-button,
.page-download__btn-primary,
.page-download__btn-secondary {
  display: inline-block;
  padding: 15px 40px;
  font-size: 18px;
  font-weight: bold;
  text-decoration: none;
  border-radius: 8px;
  transition: all 0.3s ease;
  cursor: pointer;
  text-align: center;
  box-sizing: border-box; /* Ensure padding doesn't make it overflow */
}

.page-download__cta-button,
.page-download__btn-primary {
  background-color: var(--secondary-color);
  color: var(--primary-color); /* Gold background with dark blue text */
  border: 2px solid var(--secondary-color);
}

.page-download__cta-button:hover,
.page-download__btn-primary:hover {
  background-color: #ffc200; /* Slightly darker gold */
  border-color: #ffc200;
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.page-download__btn-secondary {
  background-color: transparent;
  color: var(--secondary-color);
  border: 2px solid var(--secondary-color);
}

.page-download__btn-secondary:hover {
  background-color: var(--secondary-color);
  color: var(--primary-color);
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}


/* 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;
  min-height: 500px; /* Ensure sufficient height */
}

.page-download__hero-container {
  display: flex;
  flex-direction: row; /* Desktop: row layout */
  align-items: center;
  justify-content: center;
  max-width: 1200px;
  margin: 0 auto;
  gap: 40px;
  width: 100%;
}

.page-download__hero-content {
  flex: 1;
  text-align: left;
  padding-right: 20px;
}

.page-download__hero-title {
  font-size: 3.5em;
  margin-bottom: 20px;
  color: var(--text-light); /* White text on dark background */
  line-height: 1.2;
}

.page-download__hero-description {
  font-size: 1.3em;
  margin-bottom: 40px;
  color: rgba(255, 255, 255, 0.8); /* Slightly transparent white */
  line-height: 1.6;
  text-align: left;
}

.page-download__hero-image {
  flex: 1;
  display: flex;
  justify-content: center;
  align-items: center;
}

.page-download__hero-image img {
  border-radius: 12px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
  object-fit: cover;
  width: 100%;
  height: auto;
}

/* Why Download Section */
.page-download__why-download-section {
  padding: 80px 0;
}

.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-color: #ffffff;
  padding: 30px;
  border-radius: 10px;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08);
  text-align: center;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  border: 1px solid var(--border-color);
}

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

.page-download__feature-title {
  font-size: 1.5em;
  color: var(--primary-color);
  margin-bottom: 15px;
  font-weight: 700;
}

.page-download__feature-text {
  font-size: 1em;
  color: var(--text-dark);
}

/* How to Download Section */
.page-download__how-to-download-section {
  padding: 80px 0;
}

.page-download__download-platforms {
  display: flex;
  gap: 40px;
  margin-top: 50px;
  justify-content: center;
  flex-wrap: wrap; /* Allow wrapping on smaller screens */
}

.page-download__platform-item {
  background-color: var(--primary-color);
  color: var(--text-light);
  padding: 40px;
  border-radius: 12px;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.2);
  flex: 1;
  min-width: 300px;
  max-width: 500px;
  border: 1px solid var(--secondary-color);
}

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

.page-download__platform-text {
  font-size: 1.1em;
  margin-bottom: 25px;
  line-height: 1.7;
}

.page-download__download-steps {
  list-style-type: decimal;
  padding-left: 25px;
  margin-bottom: 30px;
}

.page-download__download-steps li {
  margin-bottom: 10px;
  font-size: 1em;
}

.page-download__qr-code-wrapper {
  text-align: center;
  margin-top: 30px;
}

.page-download__qr-code-wrapper img {
  width: 200px;
  height: 200px;
  border: 5px solid var(--secondary-color);
  border-radius: 10px;
  margin-bottom: 25px;
  display: inline-block; /* To center it */
  object-fit: cover;
}

/* App Features Section */
.page-download__app-features-section {
  padding: 80px 0;
}

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

.page-download__feature-card {
  background-color: #ffffff;
  border-radius: 10px;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08);
  overflow: hidden;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  border: 1px solid var(--border-color);
}

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

.page-download__feature-card img {
  width: 100%;
  height: 250px; /* Fixed height for consistency */
  object-fit: cover;
  border-bottom: 1px solid var(--border-color);
}

.page-download__feature-card-title {
  font-size: 1.6em;
  color: var(--primary-color);
  padding: 20px 20px 10px 20px;
  font-weight: 700;
}

.page-download__feature-card-text {
  font-size: 1em;
  color: var(--text-dark);
  padding: 0 20px 25px 20px;
  line-height: 1.7;
}

/* Safety & Security Section */
.page-download__safety-security-section {
  padding: 80px 0;
}

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

.page-download__security-item {
  background-color: var(--primary-color);
  padding: 30px;
  border-radius: 10px;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
  text-align: center;
  border: 1px solid var(--secondary-color);
}

.page-download__security-title {
  font-size: 1.5em;
  color: var(--secondary-color);
  margin-bottom: 15px;
  font-weight: 700;
}

.page-download__security-text {
  font-size: 1em;
  color: rgba(255, 255, 255, 0.8);
  line-height: 1.7;
}

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

.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.05);
}

.page-download__faq-question {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 18px 25px;
  background: #ffffff;
  border: 1px solid var(--border-color);
  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: var(--primary-color);
  background-color: #f0f8ff; /* Light blue tint when active */
}

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

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

.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; /* Prevent h3 from blocking click event */
}

.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; /* Prevent icon from blocking click event */
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 30px;
  height: 30px;
}

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

.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 25px;
  opacity: 0;
  background: #fdfdfd;
  border: 1px solid var(--border-color);
  border-top: none;
  border-bottom-left-radius: 8px;
  border-bottom-right-radius: 8px;
}

.page-download__faq-item.active .page-download__faq-answer {
  max-height: 2000px !important; /* Sufficiently large to ensure content is visible */
  padding: 20px 25px !important;
  opacity: 1;
  border-color: var(--primary-color);
}

.page-download__faq-answer p {
  margin: 0;
  font-size: 1em;
  color: var(--text-dark);
  line-height: 1.7;
}

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

.page-download__final-cta-section .page-download__section-title {
  color: var(--text-light);
}

.page-download__final-cta-section .page-download__section-description {
  color: rgba(255, 255, 255, 0.8);
  margin-bottom: 40px;
}

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

@media (max-width: 768px) {
  .page-download {
    padding-top: var(--header-offset, 120px) !important; /* Mobile fixed header offset */
  }

  .page-download__container {
    padding: 30px 15px;
  }

  .page-download__section-title {
    font-size: 2em;
    margin-bottom: 15px;
  }

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

  /* Hero Section Mobile */
  .page-download__hero-section {
    padding: 40px 15px;
    min-height: auto;
  }

  .page-download__hero-container {
    flex-direction: column;
    gap: 30px;
  }

  .page-download__hero-content {
    text-align: center;
    padding-right: 0;
  }

  .page-download__hero-title {
    font-size: 2.2em;
    margin-bottom: 15px;
  }

  .page-download__hero-description {
    font-size: 1.1em;
    margin-bottom: 30px;
    text-align: center;
  }

  .page-download__hero-image img {
    border-radius: 8px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
  }

  .page-download__cta-button,
  .page-download__btn-primary,
  .page-download__btn-secondary {
    padding: 12px 25px;
    font-size: 16px;
    max-width: 100% !important;
    width: 100% !important;
    white-space: normal !important;
    word-wrap: break-word !important;
    margin-left: auto;
    margin-right: auto;
  }

  /* Why Download Section Mobile */
  .page-download__why-download-section {
    padding: 50px 0;
  }

  .page-download__features-grid {
    grid-template-columns: 1fr;
    gap: 20px;
  }

  .page-download__feature-item {
    padding: 25px;
  }

  .page-download__feature-title {
    font-size: 1.3em;
  }

  /* How to Download Section Mobile */
  .page-download__how-to-download-section {
    padding: 50px 0;
  }

  .page-download__download-platforms {
    flex-direction: column;
    gap: 30px;
  }

  .page-download__platform-item {
    padding: 30px;
    max-width: 100%;
  }

  .page-download__platform-title {
    font-size: 1.6em;
  }

  .page-download__download-steps {
    padding-left: 20px;
  }

  .page-download__qr-code-wrapper img {
    
    
  }

  /* App Features Section Mobile */
  .page-download__app-features-section {
    padding: 50px 0;
  }

  .page-download__features-display-grid {
    grid-template-columns: 1fr;
    gap: 20px;
  }

  .page-download__feature-card img {
    height: 200px; /* Adjust height for mobile */
  }

  .page-download__feature-card-title {
    font-size: 1.4em;
  }

  /* Safety & Security Section Mobile */
  .page-download__safety-security-section {
    padding: 50px 0;
  }

  .page-download__security-points {
    grid-template-columns: 1fr;
    gap: 20px;
  }

  .page-download__security-title {
    font-size: 1.3em;
  }

  /* FAQ Section Mobile */
  .page-download__faq-section {
    padding: 50px 0;
  }

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

  .page-download__faq-question {
    padding: 15px 20px;
  }

  .page-download__faq-question h3 {
    font-size: 1em;
  }

  .page-download__faq-toggle {
    font-size: 24px;
    width: 24px;
    height: 24px;
  }

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

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

  /* Final CTA Section Mobile */
  .page-download__final-cta-section {
    padding: 50px 15px;
  }
}

/* Ensure all images and their containers are responsive on mobile */
@media (max-width: 768px) {
  .page-download img {
    max-width: 100% !important;
    width: 100% !important;
    height: auto !important;
  }
  
  .page-download__hero-section,
  .page-download__why-download-section,
  .page-download__how-to-download-section,
  .page-download__app-features-section,
  .page-download__safety-security-section,
  .page-download__faq-section,
  .page-download__final-cta-section,
  .page-download__container,
  .page-download__platform-item,
  .page-download__feature-card,
  .page-download__security-item,
  .page-download__faq-item {
    max-width: 100% !important;
    width: 100% !important;
    box-sizing: border-box !important;
    padding-left: 15px; /* Add padding to prevent content touching edges */
    padding-right: 15px; /* Add padding to prevent content touching edges */
  }
  /* Override specific paddings if needed, but ensure general padding is applied */
  .page-download__hero-section,
  .page-download__final-cta-section {
    padding-left: 15px;
    padding-right: 15px;
  }
  .page-download__why-download-section,
  .page-download__how-to-download-section,
  .page-download__app-features-section,
  .page-download__safety-security-section,
  .page-download__faq-section {
    padding-left: 0; /* Container handles padding */
    padding-right: 0; /* Container handles padding */
  }
  .page-download__container {
    padding-left: 15px;
    padding-right: 15px;
  }

  /* Ensure buttons are full width and text wraps */
  .page-download__cta-button,
  .page-download__btn-primary,
  .page-download__btn-secondary,
  .page-download a[class*="button"],
  .page-download a[class*="btn"] {
    max-width: 100% !important;
    width: 100% !important;
    box-sizing: border-box !important;
    white-space: normal !important;
    word-wrap: break-word !important;
    /* No horizontal padding here, let parent container handle it */
  }
  
  .page-download__qr-code-wrapper {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 15px;
  }
}