/* style/download.css */

/* General styles for the download page */
.page-download {
  font-family: Arial, sans-serif;
  line-height: 1.6;
  color: #333333; /* Default text color for light backgrounds */
  background-color: var(--background-color, #FFFFFF);
}

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

/* Section common styles */
.page-download__section-title {
  font-size: 2.5em;
  font-weight: bold;
  text-align: center;
  margin-bottom: 30px;
  line-height: 1.2;
  color: #017439; /* Brand color for titles */
}

.page-download__text-block {
  text-align: center;
  margin-bottom: 40px;
  font-size: 1.1em;
  max-width: 800px;
  margin-left: auto;
  margin-right: auto;
}

/* Dark background sections */
.page-download__dark-section {
  background-color: #017439;
  color: #ffffff;
  padding: 80px 0;
}

.page-download__dark-section .page-download__section-title,
.page-download__dark-section .page-download__text-block {
  color: #ffffff;
}

/* Light background sections */
.page-download__light-bg {
  background-color: #ffffff;
  color: #333333;
  padding: 80px 0;
}

/* Hero Section */
.page-download__hero-section {
  padding: 60px 0;
  padding-top: 10px; /* Small top padding, body handles header offset */
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  text-align: center;
}

.page-download__hero-section .page-download__container {
  width: 100%; /* Ensure desktop width is 100% with max-width */
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: space-between;
  gap: 40px;
}

.page-download__hero-content {
  flex: 1;
  text-align: left;
}

.page-download__main-title {
  font-weight: bold;
  line-height: 1.2;
  letter-spacing: -0.02em;
  color: #ffffff;
  margin-bottom: 20px;
  /* Using clamp for responsive font-size, adhering to the rule */
  font-size: clamp(2.2rem, 4vw, 3.5rem);
}

.page-download__description {
  font-size: 1.15em;
  color: #f0f0f0;
  margin-bottom: 30px;
}

.page-download__cta-buttons {
  display: flex;
  gap: 20px;
  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;
  white-space: normal;
  word-wrap: break-word;
  box-sizing: border-box;
  text-align: center;
}

.page-download__btn-primary {
  background-color: #C30808; /* Custom color for register/login type actions */
  color: #FFFF00; /* Custom font color for register/login type actions */
  border: 2px solid #C30808;
}

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

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

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

.page-download__hero-image-wrapper {
  flex: 1;
  display: flex;
  justify-content: center;
  align-items: center;
  padding-left: 20px;
}

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

/* Why Download Section */
.page-download__why-download .page-download__section-title {
  color: #017439;
}

.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: 12px;
  box-shadow: 0 5px 20px rgba(0, 0, 0, 0.08);
  text-align: center;
  transition: transform 0.3s ease;
}

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

.page-download__feature-icon {
  width: 100%; /* Ensure image fills card */
  height: auto;
  max-height: 200px;
  object-fit: contain;
  margin-bottom: 20px;
}

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

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

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

.page-download__download-steps {
  display: flex;
  flex-direction: column;
  gap: 60px;
  margin-top: 50px;
}

.page-download__step-item {
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 30px;
}

.page-download__step-item:nth-child(even) {
  flex-direction: row-reverse; /* Alternate image/text order */
}

.page-download__step-title {
  font-size: 2em;
  color: #FFFF00; /* Yellow for step titles */
  margin-bottom: 20px;
  text-align: center;
}

.page-download__step-list {
  list-style: none;
  padding: 0;
  text-align: left;
  font-size: 1.1em;
  max-width: 600px;
  width: 100%;
  margin: 0 auto;
}

.page-download__step-list li {
  margin-bottom: 15px;
  display: flex;
  align-items: flex-start;
  color: #ffffff;
}

.page-download__step-number {
  font-weight: bold;
  background-color: #C30808; /* Red highlight */
  color: #FFFF00;
  border-radius: 50%;
  min-width: 30px;
  height: 30px;
  display: flex;
  justify-content: center;
  align-items: center;
  margin-right: 15px;
  flex-shrink: 0;
}

.page-download__step-image {
  max-width: 100%;
  height: auto;
  border-radius: 10px;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
}

.page-download__qr-codes {
  display: flex;
  justify-content: center;
  gap: 50px;
  margin-top: 60px;
  flex-wrap: wrap;
}

.page-download__qr-item {
  text-align: center;
}

.page-download__qr-label {
  font-size: 1.2em;
  color: #ffffff;
  margin-bottom: 15px;
  font-weight: bold;
}

.page-download__qr-image {
  width: 300px;
  height: 300px;
  object-fit: contain;
  background-color: #ffffff;
  padding: 10px;
  border-radius: 8px;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
}

/* Supported Games Section */
.page-download__supported-games .page-download__section-title {
  color: #017439;
}

.page-download__game-list {
  list-style: none;
  padding: 0;
  margin: 40px auto;
  max-width: 800px;
  text-align: left;
}

.page-download__game-list li {
  background-color: #f9f9f9;
  border-left: 5px solid #017439;
  padding: 15px 20px;
  margin-bottom: 15px;
  border-radius: 5px;
  font-size: 1.1em;
  color: #333333;
}

.page-download__game-list li a {
  color: #017439;
  text-decoration: none;
  font-weight: bold;
}

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

.page-download__game-image {
  max-width: 100%;
  height: auto;
  display: block;
  margin: 40px auto 0;
  border-radius: 10px;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

/* Security Info Section */
.page-download__security-info .page-download__section-title,
.page-download__security-info .page-download__text-block {
  color: #ffffff;
}

.page-download__security-list {
  list-style: none;
  padding: 0;
  margin: 40px auto;
  max-width: 800px;
  text-align: left;
}

.page-download__security-list li {
  background-color: rgba(255, 255, 255, 0.1);
  border-left: 5px solid #FFFF00;
  padding: 15px 20px;
  margin-bottom: 15px;
  border-radius: 5px;
  font-size: 1.1em;
  color: #ffffff;
  display: flex;
  align-items: center;
}

.page-download__security-icon {
  font-size: 1.5em;
  margin-right: 15px;
  flex-shrink: 0;
}

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

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

.page-download__faq-item {
  background-color: #f9f9f9;
  border: 1px solid #e0e0e0;
  border-radius: 8px;
  margin-bottom: 15px;
  overflow: hidden;
}

.page-download__faq-question {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px;
  font-size: 1.1em;
  font-weight: bold;
  color: #333333;
  cursor: pointer;
  background-color: #ffffff;
  transition: background-color 0.3s ease;
  user-select: none;
  list-style: none; /* Remove default marker for details summary */
}

.page-download__faq-question::-webkit-details-marker {
  display: none;
}

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

.page-download__faq-qtext {
  flex-grow: 1;
}

.page-download__faq-toggle {
  font-size: 1.5em;
  font-weight: normal;
  color: #017439;
  margin-left: 15px;
}

.page-download__faq-answer {
  padding: 0 20px 20px;
  font-size: 1em;
  color: #555555;
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.3s ease-out;
}

.page-download__faq-item[open] .page-download__faq-answer {
  max-height: 500px; /* Adjust as needed */
}

/* Call to Action Bottom */
.page-download__cta-bottom {
  text-align: center;
}

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

/* Responsive styles */
@media (max-width: 1024px) {
  .page-download__hero-section .page-download__container {
    flex-direction: column;
    text-align: center;
  }

  .page-download__hero-content {
    text-align: center;
    margin-bottom: 40px;
  }

  .page-download__hero-image-wrapper {
    padding-left: 0;
  }

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

  .page-download__step-item {
    flex-direction: column;
  }

  .page-download__step-item:nth-child(even) {
    flex-direction: column;
  }
}

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

  .page-download__main-title {
    font-size: clamp(1.8rem, 6vw, 2.8rem);
  }

  .page-download__text-block,
  .page-download__description,
  .page-download__feature-description,
  .page-download__step-list li,
  .page-download__game-list li,
  .page-download__security-list li,
  .page-download__faq-question,
  .page-download__faq-answer {
    font-size: 1em;
  }

  .page-download__hero-section,
  .page-download__why-download,
  .page-download__how-to-download,
  .page-download__supported-games,
  .page-download__security-info,
  .page-download__faq-section,
  .page-download__cta-bottom {
    padding: 40px 0;
  }

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

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

  /* Image responsiveness */
  .page-download img {
    max-width: 100% !important;
    width: 100% !important;
    height: auto !important;
    display: block !important;
  }
  
  .page-download__section,
  .page-download__card,
  .page-download__container,
  .page-download__hero-section .page-download__container,
  .page-download__features-grid,
  .page-download__download-steps,
  .page-download__qr-codes,
  .page-download__game-list,
  .page-download__security-list,
  .page-download__faq-list,
  .page-download__cta-buttons,
  .page-download__step-item {
    max-width: 100% !important;
    width: 100% !important;
    box-sizing: border-box !important;
    padding-left: 15px;
    padding-right: 15px;
    overflow: hidden !important;
  }

  .page-download__hero-section {
    padding-top: 10px !important; /* body handles --header-offset, this is for visual space */
  }

  .page-download__qr-image {
    width: 200px;
    height: 200px;
  }

  .page-download__game-list li,
  .page-download__security-list li {
    padding-left: 15px;
    padding-right: 15px;
  }

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

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

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

/* Ensure all images meet minimum size requirements for content images */
.page-download__feature-icon, 
.page-download__step-image, 
.page-download__qr-image, 
.page-download__game-image, 
.page-download__hero-image {
  min-width: 200px;
  min-height: 200px;
  object-fit: cover; /* To make sure they fill the space while respecting aspect ratio */
}