/* style/download.css */

/* --- General Styles --- */
.page-download {
  font-family: Arial, sans-serif;
  line-height: 1.6;
  background-color: var(--background-color, #08160F); /* Fallback to custom color if var not set */
  color: var(--text-main-color, #F2FFF6); /* Fallback to custom color */
}

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

.page-download__section-title {
  font-size: clamp(28px, 4vw, 42px); /* Use clamp for H1/H2 as per instruction */
  font-weight: bold;
  text-align: center;
  margin-bottom: 20px;
  color: var(--text-main-color, #F2FFF6);
  line-height: 1.2;
}

.page-download__section-description {
  font-size: 18px;
  text-align: center;
  max-width: 800px;
  margin: 0 auto 40px auto;
  color: var(--text-secondary-color, #A7D9B8);
}

.page-download__card {
  background-color: var(--card-bg-color, #11271B); /* Custom card background */
  border: 1px solid var(--border-color, #2E7A4E); /* Custom border color */
  border-radius: 12px;
  padding: 30px;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  transition: transform 0.3s ease;
  color: var(--text-main-color, #F2FFF6);
}

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

.page-download__card-title {
  font-size: 24px;
  font-weight: bold;
  margin-top: 15px;
  margin-bottom: 10px;
  color: var(--text-main-color, #F2FFF6);
}

.page-download__card-title a {
  color: inherit;
  text-decoration: none;
}

.page-download__card-title a:hover {
  text-decoration: underline;
  color: var(--gold-color, #F2C14E); /* Custom gold color for hover */
}

.page-download__card-text {
  font-size: 16px;
  color: var(--text-secondary-color, #A7D9B8);
}

.page-download__btn-primary,
.page-download__btn-secondary {
  display: inline-block;
  padding: 14px 30px;
  border-radius: 8px;
  text-decoration: none;
  font-weight: bold;
  font-size: 18px;
  transition: all 0.3s ease;
  text-align: center;
  box-sizing: border-box;
  max-width: 100%; /* Ensure responsiveness */
  white-space: normal; /* Allow text wrapping */
  word-wrap: break-word; /* Allow text wrapping */
}

.page-download__btn-primary {
  background: linear-gradient(180deg, #2AD16F 0%, #13994A 100%); /* Custom button gradient */
  color: #F2FFF6; /* Custom text main color */
  border: none;
}

.page-download__btn-primary:hover {
  background: linear-gradient(180deg, #13994A 0%, #2AD16F 100%);
  box-shadow: 0 0 15px var(--glow-color, #57E38D);
}

.page-download__btn-secondary {
  background-color: transparent;
  color: var(--glow-color, #57E38D); /* Custom glow color for text */
  border: 2px solid var(--glow-color, #57E38D); /* Custom glow color for border */
}

.page-download__btn-secondary:hover {
  background-color: var(--glow-color, #57E38D);
  color: #08160F; /* Dark background color for hover text */
}

.page-download__dark-section {
  background-color: var(--deep-green-color, #0A4B2C); /* Custom deep green background */
  color: #F2FFF6; /* Custom text main color */
}

/* --- Hero Section --- */
.page-download__hero-section {
  position: relative;
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding-top: 10px; /* Small top padding */
  padding-bottom: 60px;
  overflow: hidden; /* Prevent content overflow */
}

.page-download__hero-image {
  width: 100%;
  height: auto;
  object-fit: cover;
  display: block;
  margin-bottom: 30px;
  border-radius: 12px;
  max-width: 1200px; /* Constrain image width */
}

.page-download__hero-content {
  text-align: center;
  max-width: 900px;
  padding: 0 20px;
}

.page-download__hero-title {
  font-size: clamp(32px, 5vw, 56px); /* Use clamp for H1 */
  font-weight: 800;
  color: var(--gold-color, #F2C14E); /* Custom gold color for H1 */
  margin-bottom: 20px;
  line-height: 1.2;
}

.page-download__hero-description {
  font-size: 20px;
  color: var(--text-secondary-color, #A7D9B8);
  margin-bottom: 40px;
  max-width: 700px;
  margin-left: auto;
  margin-right: auto;
}

.page-download__hero-cta-buttons {
  display: flex;
  justify-content: center;
  gap: 20px;
  flex-wrap: wrap;
  width: 100%; /* Ensure container takes full width */
  max-width: 600px; /* Limit button group width */
  margin: 0 auto;
}

/* --- Benefits Section --- */
.page-download__benefits-section {
  padding: 80px 0;
}

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

.page-download__benefit-card .page-download__card-image {
  width: 100px;
  height: 100px;
  object-fit: contain;
  margin-bottom: 15px;
}

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

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

.page-download__step-list {
  text-align: left;
  list-style: decimal;
  padding-left: 20px;
  margin-bottom: 20px;
  color: var(--text-secondary-color, #A7D9B8);
}

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

.page-download__step-list strong {
  color: var(--text-main-color, #F2FFF6);
}

.page-download__qr-code {
  width: 180px;
  height: 180px;
  object-fit: contain;
  margin: 20px auto;
  border: 5px solid #fff;
  border-radius: 8px;
}

.page-download__download-button {
  margin-top: 20px;
  width: calc(100% - 30px); /* Adjust for card padding */
}

.page-download__troubleshooting-section {
  padding: 30px;
  text-align: center;
}

/* --- Security Section --- */
.page-download__security-section {
  padding: 80px 0;
}

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

.page-download__feature-item .page-download__card-image {
  width: 100px;
  height: 100px;
  object-fit: contain;
  margin-bottom: 15px;
}

/* --- Games Section --- */
.page-download__games-section {
  padding: 80px 0;
}

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

.page-download__game-card .page-download__card-image {
  width: 100%;
  height: 200px;
  object-fit: cover;
  border-radius: 8px;
  margin-bottom: 15px;
}

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

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

.page-download__faq-item {
  margin-bottom: 20px;
  text-align: left;
  cursor: pointer;
  background-color: var(--card-bg-color, #11271B);
  border: 1px solid var(--divider-color, #1E3A2A); /* Custom divider color */
  border-radius: 12px;
  padding: 20px 30px;
  box-shadow: none; /* Override default card shadow */
}

.page-download__faq-item summary {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 20px;
  font-weight: bold;
  color: var(--text-main-color, #F2FFF6);
  padding: 0;
  list-style: none; /* Remove default marker */
  outline: none;
}

.page-download__faq-item summary::-webkit-details-marker {
  display: none; /* Hide default marker for webkit browsers */
}

.page-download__faq-question {
  display: flex;
  justify-content: space-between;
  align-items: center;
  width: 100%;
}

.page-download__faq-qtext {
  flex-grow: 1;
  margin-right: 15px;
}

.page-download__faq-toggle {
  font-size: 28px;
  line-height: 1;
  color: var(--glow-color, #57E38D);
  transition: transform 0.3s ease;
}

.page-download__faq-item[open] .page-download__faq-toggle {
  transform: rotate(45deg); /* Rotate for 'x' effect */
}

.page-download__faq-answer {
  font-size: 16px;
  color: var(--text-secondary-color, #A7D9B8);
  padding-top: 15px;
  line-height: 1.8;
}

/* --- CTA Bottom Section --- */
.page-download__cta-bottom-section {
  padding: 80px 0;
  text-align: center;
}

.page-download__cta-buttons {
  display: flex;
  justify-content: center;
  gap: 20px;
  flex-wrap: wrap;
  width: 100%; /* Ensure container takes full width */
  max-width: 600px; /* Limit button group width */
  margin: 0 auto;
}

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

.page-download video,
.page-download__video {
  max-width: 100%;
  width: 100%;
  height: auto;
  display: block;
}

/* --- Responsive Design --- */
@media (max-width: 1024px) {
  .page-download__hero-title {
    font-size: clamp(30px, 4.5vw, 48px);
  }
  .page-download__hero-description {
    font-size: 18px;
  }
  .page-download__section-title {
    font-size: clamp(26px, 3.5vw, 38px);
  }
}

@media (max-width: 768px) {
  .page-download__container {
    padding: 0 15px;
  }

  .page-download {
    font-size: 16px;
    line-height: 1.6;
  }

  /* Images responsive */
  .page-download img {
    max-width: 100% !important;
    width: 100% !important;
    height: auto !important;
    display: block !important;
  }

  /* Videos responsive (if any) */
  .page-download video,
  .page-download__video {
    max-width: 100% !important;
    width: 100% !important;
    height: auto !important;
    display: block !important;
  }

  /* Containers for images/videos/buttons */
  .page-download__section,
  .page-download__card,
  .page-download__container,
  .page-download__hero-section,
  .page-download__benefits-section,
  .page-download__how-to-section,
  .page-download__security-section,
  .page-download__games-section,
  .page-download__faq-section,
  .page-download__cta-bottom-section,
  .page-download__video-section,
  .page-download__video-container,
  .page-download__video-wrapper,
  .page-download__hero-cta-buttons,
  .page-download__cta-buttons,
  .page-download__button-group,
  .page-download__btn-container {
    max-width: 100% !important;
    width: 100% !important;
    box-sizing: border-box !important;
    padding-left: 15px;
    padding-right: 15px;
    overflow: hidden !important; /* Prevent overflow */
  }

  /* Buttons responsive */
  .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;
    padding-left: 15px; /* Add padding for text inside button */
    padding-right: 15px; /* Add padding for text inside button */
  }

  .page-download__hero-cta-buttons,
  .page-download__cta-buttons {
    flex-direction: column; /* Stack buttons vertically on mobile */
    gap: 15px; /* Adjust gap for stacked buttons */
  }

  .page-download__hero-title {
    font-size: clamp(28px, 8vw, 40px);
  }
  .page-download__hero-description {
    font-size: 16px;
  }
  .page-download__section-title {
    font-size: clamp(24px, 7vw, 36px);
  }
  .page-download__card-title {
    font-size: 20px;
  }
  .page-download__faq-item summary {
    font-size: 18px;
  }
  .page-download__faq-answer {
    font-size: 15px;
  }
  .page-download__hero-section {
    padding-bottom: 40px;
  }
  .page-download__benefits-section,
  .page-download__how-to-section,
  .page-download__security-section,
  .page-download__games-section,
  .page-download__faq-section,
  .page-download__cta-bottom-section {
    padding: 40px 0;
  }
  .page-download__hero-image {
    margin-bottom: 20px;
  }
  .page-download__section-description {
    margin-bottom: 30px;
  }

  /* Fixed header spacing: rely on body padding, this section only needs small top padding */
  .page-download__hero-section {
    padding-top: 10px !important;
  }
}

/* Color Contrast Enforcement */
/* Assuming --background-color is dark #08160F */
.page-download {
  color: #F2FFF6; /* Light text on dark background */
}

.page-download__card {
  background-color: var(--card-bg-color, #11271B); /* Darker green */
  color: #F2FFF6; /* Light text */
}

.page-download__dark-section {
  background-color: var(--deep-green-color, #0A4B2C); /* Even darker green */
  color: #F2FFF6; /* Light text */
}

/* Button contrast is explicitly defined with custom colors, ensuring light text on gradient */
/* Link hover in cards also uses #F2C14E which should be visible on #11271B */

/* Ensure all images are not affected by filters */
.page-download img {
  filter: none !important;
}