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

/* Section common styles */
.page-download__section-title {
  font-size: 2.5em;
  margin-bottom: 20px;
  text-align: center;
  color: #ffffff;
  font-weight: bold;
}

.page-download__section-description {
  font-size: 1.1em;
  text-align: center;
  max-width: 900px;
  margin: 0 auto 40px auto;
  color: #f0f0f0;
}

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

.page-download__dark-section {
  background-color: #017439; /* Brand primary color */
  color: #ffffff;
}

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

/* Hero Section */
.page-download__hero-section {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 80px 20px;
  padding-top: var(--header-offset, 120px); /* Ensures content is not hidden by fixed header */
  min-height: 70vh;
  position: relative;
  overflow: hidden;
}

.page-download__hero-section::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.4); /* Overlay for readability */
  z-index: 1;
}

.page-download__hero-image-wrapper {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
}

.page-download__hero-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: brightness(0.7); /* Slightly darken background image for text contrast */
}

.page-download__hero-content {
  position: relative;
  z-index: 2;
  max-width: 900px;
}

.page-download__hero-title {
  font-size: 3.5em;
  color: #ffffff;
  margin-bottom: 20px;
  font-weight: bold;
}

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

.page-download__cta-buttons {
  display: flex;
  gap: 20px;
  justify-content: center;
  flex-wrap: wrap;
}

.page-download__btn-primary,
.page-download__btn-secondary {
  display: inline-block;
  padding: 15px 30px;
  border-radius: 8px;
  text-decoration: none;
  font-weight: bold;
  font-size: 1.1em;
  transition: background-color 0.3s ease, color 0.3s ease, border-color 0.3s ease;
  box-sizing: border-box;
  white-space: normal;
  word-wrap: break-word;
  text-align: center;
}

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

.page-download__btn-primary:hover {
  background-color: #005f2e;
  border-color: #005f2e;
}

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

.page-download__btn-secondary:hover {
  background-color: #f0f0f0;
  color: #005f2e;
  border-color: #005f2e;
}

/* Advantages Section */
.page-download__advantages-section .page-download__section-title,
.page-download__advantages-section .page-download__section-description {
  color: #333333;
}

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

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

.page-download__advantage-card:hover {
  transform: translateY(-10px);
}

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

.page-download__advantage-card .page-download__card-text {
  font-size: 1em;
  color: #555555;
}

.page-download__app-showcase {
  text-align: center;
  margin-top: 60px;
}

.page-download__app-image {
  max-width: 100%;
  height: auto;
  border-radius: 15px;
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.2);
}

/* How-to-Download Section */
.page-download__how-to-download-section .page-download__section-title,
.page-download__how-to-download-section .page-download__section-description {
  color: #ffffff;
}

.page-download__platform-tabs {
  display: flex;
  justify-content: center;
  margin-bottom: 40px;
  gap: 15px;
  flex-wrap: wrap;
}

.page-download__tab-button {
  background-color: rgba(255, 255, 255, 0.1);
  color: #ffffff;
  border: 1px solid rgba(255, 255, 255, 0.3);
  padding: 12px 25px;
  border-radius: 25px;
  cursor: pointer;
  font-size: 1.1em;
  transition: background-color 0.3s ease, border-color 0.3s ease;
}

.page-download__tab-button:hover {
  background-color: rgba(255, 255, 255, 0.2);
}

.page-download__tab-button--active {
  background-color: #ffffff;
  color: #017439;
  border-color: #ffffff;
}

.page-download__tab-content {
  display: none;
  background-color: rgba(255, 255, 255, 0.1);
  border-radius: 10px;
  padding: 30px;
  margin-bottom: 40px;
  color: #ffffff;
}

.page-download__tab-content--active {
  display: block;
}

.page-download__tab-subtitle {
  font-size: 2em;
  color: #ffffff;
  margin-bottom: 25px;
  text-align: center;
}

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

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

.page-download__download-steps li strong {
  color: #FFFF00;
}

.page-download__guide-image {
  max-width: 100%;
  height: auto;
  display: block;
  margin: 30px auto;
  border-radius: 10px;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

.page-download__btn-block {
  display: block;
  width: fit-content;
  margin: 20px auto 0 auto;
}

.page-download__video-section {
  margin-top: 60px;
  text-align: center;
  background-color: rgba(0, 0, 0, 0.3);
  padding: 40px 20px;
  border-radius: 10px;
}

.page-download__video-title {
  font-size: 2em;
  color: #ffffff;
  margin-bottom: 25px;
}

.page-download__video-wrapper {
  position: relative;
  width: 100%;
  padding-bottom: 56.25%; /* 16:9 Aspect Ratio */
  height: 0;
  overflow: hidden;
  margin: 0 auto 20px auto;
  max-width: 900px;
  border-radius: 10px;
}

.page-download__video {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  border: none;
  cursor: pointer;
}

.page-download__video-caption {
  font-style: italic;
  color: #f0f0f0;
  margin-top: 15px;
}

/* Registration Section */
.page-download__registration-section .page-download__section-title,
.page-download__registration-section .page-download__section-description {
  color: #333333;
}

.page-download__registration-steps {
  list-style-type: decimal;
  padding-left: 20px;
  margin: 30px auto 40px auto;
  max-width: 800px;
  color: #555555;
}

.page-download__registration-steps li {
  margin-bottom: 15px;
  font-size: 1.1em;
}

.page-download__registration-steps li strong {
  color: #017439;
}

.page-download__btn-register,
.page-download__btn-login {
  display: inline-block;
  padding: 15px 30px;
  border-radius: 8px;
  text-decoration: none;
  font-weight: bold;
  font-size: 1.1em;
  transition: background-color 0.3s ease, color 0.3s ease;
  margin: 0 10px;
  background-color: #C30808; /* Custom red for register/login */
  color: #FFFF00; /* Custom yellow for register/login font */
  border: 2px solid #C30808;
  box-sizing: border-box;
  white-space: normal;
  word-wrap: break-word;
  text-align: center;
}

.page-download__btn-register:hover,
.page-download__btn-login:hover {
  background-color: #a30606;
  border-color: #a30606;
}

/* Game Section */
.page-download__game-section .page-download__section-title,
.page-download__game-section .page-download__section-description {
  color: #ffffff;
}

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

.page-download__game-card {
  background-color: rgba(255, 255, 255, 0.1);
  border-radius: 10px;
  padding: 25px;
  text-align: center;
  transition: transform 0.3s ease, background-color 0.3s ease;
  color: #ffffff;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  height: 100%;
}

.page-download__game-card:hover {
  transform: translateY(-10px);
  background-color: rgba(255, 255, 255, 0.2);
}

.page-download__game-image {
  max-width: 100%;
  height: auto;
  border-radius: 8px;
  margin-bottom: 15px;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
}

.page-download__game-card .page-download__card-title {
  font-size: 1.4em;
  color: #FFFF00; /* Yellow for game titles */
  margin-bottom: 10px;
}

.page-download__game-card .page-download__card-text {
  font-size: 0.95em;
  color: #f0f0f0;
}

/* Promotions Section */
.page-download__promotions-section .page-download__section-title,
.page-download__promotions-section .page-download__section-description {
  color: #333333;
}

.page-download__promo-list {
  list-style-type: disc;
  padding-left: 25px;
  margin: 30px auto 40px auto;
  max-width: 800px;
  color: #555555;
}

.page-download__promo-list li {
  margin-bottom: 10px;
  font-size: 1.1em;
}

.page-download__promo-list li strong {
  color: #017439;
}

/* Security Section */
.page-download__security-section .page-download__section-title,
.page-download__security-section .page-download__section-description {
  color: #ffffff;
}

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

.page-download__feature-item {
  background-color: rgba(255, 255, 255, 0.1);
  border-radius: 10px;
  padding: 25px;
  text-align: center;
  color: #ffffff;
  display: flex;
  flex-direction: column;
  align-items: center;
  transition: background-color 0.3s ease;
}

.page-download__feature-item:hover {
  background-color: rgba(255, 255, 255, 0.2);
}

.page-download__feature-icon {
  max-width: 100px; /* Ensure icons are not too small, but also not huge */
  height: auto;
  margin-bottom: 15px;
  filter: invert(1) brightness(1.5) hue-rotate(100deg); /* Adjust icon color to fit theme, if original is dark */
}

.page-download__feature-title {
  font-size: 1.3em;
  color: #FFFF00; /* Yellow for feature titles */
  margin-bottom: 10px;
}

.page-download__feature-text {
  font-size: 0.95em;
  color: #f0f0f0;
}

/* FAQ Section */
.page-download__faq-section .page-download__section-title,
.page-download__faq-section .page-download__section-description {
  color: #333333;
}

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

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

.page-download__faq-question {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 18px 25px;
  font-size: 1.15em;
  font-weight: bold;
  cursor: pointer;
  background-color: #f0f0f0;
  border-bottom: 1px solid #e0e0e0;
  transition: background-color 0.3s ease;
}

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

.page-download__faq-toggle {
  font-size: 1.5em;
  line-height: 1;
  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;
  background-color: #ffffff;
  color: #555555;
}

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

.page-download__faq-answer p {
  margin: 0;
  padding-bottom: 10px;
}

/* Final CTA Section */
.page-download__cta-final-section {
  padding: 60px 20px;
  text-align: center;
}

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

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

  .page-download__hero-description {
    font-size: 1.1em;
  }
}

@media (max-width: 768px) {
  .page-download {
    font-size: 16px;
    line-height: 1.6;
  }

  .page-download__hero-section {
    padding: 60px 15px;
    padding-top: var(--header-offset, 120px) !important; /* Ensure mobile header offset */
  }

  .page-download__hero-title {
    font-size: 2.5em;
  }

  .page-download__hero-description {
    font-size: 1em;
  }

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

  .page-download__btn-primary,
  .page-download__btn-secondary,
  .page-download__btn-register,
  .page-download__btn-login {
    width: 100% !important;
    max-width: 100% !important;
    margin: 0;
    padding-left: 15px;
    padding-right: 15px;
  }

  .page-download__section-title {
    font-size: 2em;
  }

  .page-download__section-description {
    font-size: 0.95em;
    margin-bottom: 30px;
  }

  .page-download__container,
  .page-download__video-section,
  .page-download__video-wrapper,
  .page-download__advantages-grid,
  .page-download__game-grid,
  .page-download__security-features,
  .page-download__platform-tabs,
  .page-download__tab-content,
  .page-download__faq-list,
  .page-download__promo-list,
  .page-download__registration-steps {
    padding-left: 15px !important;
    padding-right: 15px !important;
    max-width: 100% !important;
    width: 100% !important;
    box-sizing: border-box !important;
  }

  .page-download__app-image,
  .page-download__guide-image,
  .page-download__game-image,
  .page-download__feature-icon,
  .page-download img,
  .page-download video,
  .page-download__video {
    max-width: 100% !important;
    width: 100% !important;
    height: auto !important;
    display: block !important;
  }

  .page-download__platform-tabs {
    flex-direction: column;
  }

  .page-download__tab-button {
    width: 100%;
  }

  .page-download__video-wrapper {
    padding-bottom: 56.25% !important; /* Maintain aspect ratio */
    height: 0 !important;
  }

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

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

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

  .page-download__feature-item {
    padding: 20px;
  }
  .page-download__game-card {
    padding: 20px;
  }
  .page-download__advantage-card {
    padding: 25px;
  }

  .page-download__feature-icon {
    max-width: 80px;
  }
}

@media (max-width: 480px) {
  .page-download__hero-title {
    font-size: 2em;
  }

  .page-download__hero-description {
    font-size: 0.9em;
  }

  .page-download__section-title {
    font-size: 1.8em;
  }

  .page-download__tab-subtitle {
    font-size: 1.5em;
  }
}