/* style/download.css */

:root {
  --primary-color: #017439;
  --secondary-color: #FFFFFF;
  --text-dark: #333333;
  --text-light: #ffffff;
  --background-dark: #1a1a1a;
  --background-light: #f8f9fa;
  --button-register: #C30808;
  --button-login: #C30808;
  --font-register-login: #FFFF00;
}

.page-download {
  font-family: Arial, sans-serif;
  line-height: 1.6;
  color: var(--text-light); /* Default text color for dark body background */
  background-color: var(--background-dark); /* Inherited from shared.css body */
}

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

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

.page-download__section-description {
  font-size: 1.1em;
  text-align: center;
  max-width: 800px;
  margin: 0 auto 40px auto;
  color: var(--text-light);
}

/* Hero Section */
.page-download__hero-section {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 60px 20px;
  padding-top: var(--header-offset, 120px); /* Ensure space below fixed header */
  text-align: center;
  position: relative;
  overflow: hidden;
  background-color: var(--primary-color);
  color: var(--text-light);
}

.page-download__hero-content {
  z-index: 1;
  max-width: 900px;
}

.page-download__hero-title {
  font-size: 3.2em;
  margin-bottom: 20px;
  color: var(--text-light);
}

.page-download__hero-description {
  font-size: 1.3em;
  margin-bottom: 40px;
  color: var(--text-light);
}

.page-download__hero-image-wrapper {
  margin-top: 40px;
  max-width: 100%;
  overflow: hidden;
}

.page-download__hero-image {
  width: 100%;
  height: auto;
  display: block;
  border-radius: 10px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
}

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

.page-download__cta-buttons--center {
  margin-top: 40px;
}

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

.page-download__btn-primary {
  background-color: var(--button-register);
  color: var(--font-register-login);
  border: 2px solid var(--button-register);
}

.page-download__btn-primary:hover {
  background-color: darken(var(--button-register), 10%);
  border-color: darken(var(--button-register), 10%);
}

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

.page-download__btn-secondary:hover {
  background-color: var(--text-light);
  color: var(--primary-color);
}

/* Why Download Section */
.page-download__why-download,
.page-download__game-variety,
.page-download__security,
.page-download__final-cta {
  padding: 80px 0;
}

.page-download__light-bg .page-download__section-title,
.page-download__light-bg .page-download__section-description,
.page-download__light-bg .page-download__feature-title,
.page-download__light-bg .page-download__feature-text,
.page-download__light-bg .page-download__game-title,
.page-download__light-bg .page-download__game-text,
.page-download__light-bg .page-download__security-subtitle,
.page-download__light-bg .page-download__security-text {
  color: var(--text-dark);
}

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

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

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

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

.page-download__feature-icon {
  width: 100%;
  max-width: 150px;
  height: auto;
  margin-bottom: 20px;
  display: block;
  margin-left: auto;
  margin-right: auto;
}

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

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

/* How to Install Section */
.page-download__how-to-install,
.page-download__promotions,
.page-download__faq-section {
  padding: 80px 0;
  background-color: var(--primary-color);
  color: var(--text-light);
}

.page-download__dark-section .page-download__section-title,
.page-download__dark-section .page-download__section-description {
  color: var(--text-light);
}

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

.page-download__step-item {
  background-color: rgba(255, 255, 255, 0.1);
  padding: 30px;
  border-radius: 10px;
  text-align: center;
  color: var(--text-light);
}

.page-download__step-number {
  display: inline-block;
  width: 50px;
  height: 50px;
  line-height: 50px;
  border-radius: 50%;
  background-color: var(--secondary-color);
  color: var(--primary-color);
  font-size: 1.8em;
  font-weight: bold;
  margin-bottom: 20px;
}

.page-download__step-title {
  font-size: 1.4em;
  margin-bottom: 10px;
  color: var(--text-light);
}

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

/* Game Variety Section */
.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: var(--secondary-color);
  border-radius: 10px;
  overflow: hidden;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
  color: var(--text-dark);
  transition: transform 0.3s ease;
}

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

.page-download__game-image {
  width: 100%;
  height: 200px; /* Fixed height for consistency */
  object-fit: cover;
  display: block;
}

.page-download__game-title {
  font-size: 1.4em;
  padding: 15px;
  margin: 0;
}

.page-download__game-title a {
  color: var(--primary-color);
  text-decoration: none;
}

.page-download__game-title a:hover {
  text-decoration: underline;
}

.page-download__game-text {
  font-size: 0.95em;
  padding: 0 15px 15px;
  color: var(--text-dark);
}

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

.page-download__promotion-card {
  background-color: rgba(255, 255, 255, 0.1);
  border-radius: 10px;
  overflow: hidden;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
  color: var(--text-light);
  transition: transform 0.3s ease;
}

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

.page-download__promotion-image {
  width: 100%;
  height: 200px; /* Fixed height for consistency */
  object-fit: cover;
  display: block;
}

.page-download__promotion-title {
  font-size: 1.4em;
  padding: 15px;
  margin: 0;
}

.page-download__promotion-title a {
  color: var(--text-light);
  text-decoration: none;
}

.page-download__promotion-title a:hover {
  text-decoration: underline;
}

.page-download__promotion-text {
  font-size: 0.95em;
  padding: 0 15px 15px;
  color: var(--text-light);
}

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

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

.page-download__security-icon {
  width: 100%;
  max-width: 100px;
  height: auto;
  margin-bottom: 20px;
  display: block;
  margin-left: auto;
  margin-right: auto;
}

.page-download__security-subtitle {
  font-size: 1.5em;
  margin-bottom: 10px;
  color: var(--primary-color);
}

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

/* FAQ Section */
.page-download__faq-list {
  margin-top: 40px;
}

.page-download__faq-item {
  background-color: rgba(255, 255, 255, 0.1);
  border-radius: 8px;
  margin-bottom: 15px;
  overflow: hidden;
  color: var(--text-light);
}

.page-download__faq-question {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px;
  cursor: pointer;
  font-size: 1.2em;
  font-weight: bold;
  color: var(--text-light);
  transition: background-color 0.3s ease;
}

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

.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 20px;
  transition: max-height 0.3s ease, padding 0.3s ease;
  color: var(--text-light);
}

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

.page-download__faq-answer p {
  margin-bottom: 0;
  font-size: 1em;
  color: var(--text-light);
}

/* Final CTA Section */
.page-download__final-cta {
  padding-bottom: 80px;
}

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

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

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

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

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

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

  .page-download__btn-primary,
  .page-download__btn-secondary {
    width: 100% !important;
    max-width: 100% !important;
    padding: 12px 20px;
    font-size: 1em;
    white-space: normal !important;
    word-wrap: break-word !important;
  }

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

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

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

  .page-download__why-download,
  .page-download__how-to-install,
  .page-download__game-variety,
  .page-download__promotions,
  .page-download__security,
  .page-download__faq-section,
  .page-download__final-cta {
    padding: 60px 0;
  }

  .page-download__feature-grid,
  .page-download__steps-grid,
  .page-download__game-grid,
  .page-download__promotion-grid,
  .page-download__security-features {
    grid-template-columns: 1fr;
    gap: 20px;
  }

  /* Mobile image responsiveness */
  .page-download img {
    max-width: 100% !important;
    width: 100% !important;
    height: auto !important;
    display: block !important;
  }
  
  .page-download__hero-image-wrapper,
  .page-download__feature-card,
  .page-download__step-item,
  .page-download__game-card,
  .page-download__promotion-card,
  .page-download__security-item,
  .page-download__faq-item,
  .page-download__container,
  .page-download__hero-section,
  .page-download__why-download,
  .page-download__how-to-install,
  .page-download__game-variety,
  .page-download__promotions,
  .page-download__security,
  .page-download__faq-section,
  .page-download__final-cta {
    max-width: 100% !important;
    width: 100% !important;
    box-sizing: border-box !important;
    overflow: hidden !important; /* Ensure no horizontal scroll */
  }

  /* Specific adjustments for smaller elements */
  .page-download__feature-icon,
  .page-download__security-icon {
    max-width: 100px !important;
    width: 100px !important;
    height: auto !important;
  }

  .page-download__game-image,
  .page-download__promotion-image {
    height: 180px; /* Adjust fixed height for smaller screens */
  }

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

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

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

/* Color Contrast Adjustments for dark background body */
.page-download__dark-section {
  background-color: var(--primary-color);
  color: var(--text-light);
}

.page-download__dark-section .page-download__section-title,
.page-download__dark-section .page-download__section-description,
.page-download__dark-section .page-download__step-title,
.page-download__dark-section .page-download__step-text,
.page-download__dark-section .page-download__promotion-title a,
.page-download__dark-section .page-download__promotion-text,
.page-download__dark-section .page-download__faq-title,
.page-download__dark-section .page-download__faq-answer p {
  color: var(--text-light);
}

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

.page-download__light-bg .page-download__section-title,
.page-download__light-bg .page-download__section-description,
.page-download__light-bg .page-download__feature-title,
.page-download__light-bg .page-download__feature-text,
.page-download__light-bg .page-download__game-title a,
.page-download__light-bg .page-download__game-text,
.page-download__light-bg .page-download__security-subtitle,
.page-download__light-bg .page-download__security-text {
  color: var(--text-dark);
}

.page-download__feature-card,
.page-download__security-item {
  background-color: var(--secondary-color);
}

.page-download__step-number {
  background-color: var(--secondary-color);
  color: var(--primary-color);
}

.page-download__game-card {
  background-color: var(--secondary-color);
}

.page-download__btn-secondary {
  color: var(--text-light);
  border-color: var(--text-light);
}

.page-download__btn-secondary:hover {
  background-color: var(--text-light);
  color: var(--primary-color);
}