/* style/download.css */
:root {
  --thabet-primary-color: #11A84E;
  --thabet-secondary-color: #22C768;
  --thabet-button-gradient: linear-gradient(180deg, #2AD16F 0%, #13994A 100%);
  --thabet-card-bg: #11271B;
  --thabet-background: #08160F;
  --thabet-text-main: #F2FFF6;
  --thabet-text-secondary: #A7D9B8;
  --thabet-border: #2E7A4E;
  --thabet-glow: #57E38D;
  --thabet-gold: #F2C14E;
  --thabet-divider: #1E3A2A;
  --thabet-deep-green: #0A4B2C;
}

.page-download {
  font-family: Arial, sans-serif;
  line-height: 1.6;
  color: var(--thabet-text-main); /* Main text color for the page */
  background-color: var(--thabet-background); /* Main background color for the page */
}

/* HERO Section */
.page-download__hero-section {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 10px 0 60px; /* Small top padding, more bottom padding */
  background-color: var(--thabet-background);
  overflow: hidden;
}

.page-download__hero-image-wrapper {
  width: 100%;
  max-width: 100%;
  margin-bottom: 30px;
}

.page-download__hero-image {
  display: block;
  width: 100%;
  height: auto;
  object-fit: cover;
  border-radius: 8px;
}

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

.page-download__main-title {
  font-size: clamp(2.2em, 4vw, 3.2em);
  font-weight: 700;
  color: var(--thabet-text-main);
  margin-bottom: 20px;
  line-height: 1.2;
}

.page-download__hero-description {
  font-size: 1.1em;
  color: var(--thabet-text-secondary);
  margin-bottom: 30px;
}

.page-download__cta-buttons {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 15px;
  margin-top: 30px;
}

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

.page-download__btn-primary {
  background: var(--thabet-button-gradient);
  color: var(--thabet-text-main);
  border: none;
}

.page-download__btn-primary:hover {
  opacity: 0.9;
  transform: translateY(-2px);
}

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

.page-download__btn-secondary:hover {
  background: var(--thabet-primary-color);
  color: var(--thabet-text-main);
  transform: translateY(-2px);
}

.page-download__btn-full-width {
  width: 100%;
}

/* General Section Styles */
.page-download__section-title {
  font-size: 2.2em;
  font-weight: 700;
  color: var(--thabet-text-main);
  text-align: center;
  margin-bottom: 40px;
  padding-top: 40px;
  line-height: 1.3;
}

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

.page-download__text-block {
  font-size: 1.05em;
  color: var(--thabet-text-secondary);
  margin-bottom: 20px;
  text-align: justify;
}

/* Card Styles */
.page-download__card {
  background-color: var(--thabet-card-bg);
  border: 1px solid var(--thabet-border);
  border-radius: 12px;
  padding: 25px;
  text-align: center;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
}

.page-download__card:hover {
  transform: translateY(-5px);
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.3);
}

.page-download__card-title {
  font-size: 1.4em;
  font-weight: 600;
  color: var(--thabet-text-main);
  margin: 15px 0 10px;
  line-height: 1.3;
}

.page-download__card-title a {
  color: var(--thabet-text-main);
  text-decoration: none;
  transition: color 0.3s ease;
}

.page-download__card-title a:hover {
  color: var(--thabet-primary-color);
}

.page-download__card-description {
  font-size: 0.95em;
  color: var(--thabet-text-secondary);
  flex-grow: 1;
}

/* Introduction Section */
.page-download__introduction-section {
  padding: 60px 0;
}

.page-download__dark-section {
  background-color: var(--thabet-deep-green);
  color: var(--thabet-text-main);
}

.page-download__dark-section .page-download__text-block {
  color: var(--thabet-text-secondary);
}

/* Features Section */
.page-download__features-section {
  padding: 60px 0;
  background-color: var(--thabet-background);
}

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

.page-download__feature-icon {
  width: 100%;
  height: auto;
  max-width: 120px; /* Adjust size for icons within cards */
  margin-bottom: 15px;
  border-radius: 8px;
  object-fit: cover;
}

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

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

.page-download__guide-block {
  background-color: var(--thabet-card-bg);
  border: 1px solid var(--thabet-border);
  border-radius: 12px;
  padding: 30px;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
  height: 100%;
  box-sizing: border-box;
}

.page-download__guide-title {
  font-size: 1.6em;
  color: var(--thabet-primary-color);
  margin-bottom: 20px;
  text-align: center;
}

.page-download__qr-code-wrapper {
  text-align: center;
  margin: 25px 0;
}

.page-download__qr-code {
  width: 100%;
  max-width: 200px;
  height: auto;
  border: 5px solid var(--thabet-text-main);
  border-radius: 8px;
  display: inline-block; /* Ensure it respects text-align */
}

.page-download__installation-steps {
  list-style-type: decimal;
  color: var(--thabet-text-secondary);
  padding-left: 25px;
  margin-top: 25px;
}

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

.page-download__installation-steps li strong {
  color: var(--thabet-text-main);
}

/* Games Section */
.page-download__games-section {
  padding: 60px 0;
  background-color: var(--thabet-background);
}

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

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

.page-download__center-cta {
  text-align: center;
  margin-top: 50px;
}

/* Promotions Section */
.page-download__promotions-section {
  padding: 60px 0;
}

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

.page-download__promotion-image {
  width: 100%;
  height: auto;
  max-height: 200px;
  object-fit: cover;
  border-radius: 8px;
  margin-bottom: 15px;
}

/* Why Choose Section */
.page-download__why-choose-section {
  padding: 60px 0;
  background-color: var(--thabet-background);
}

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

.page-download__why-choose-item {
  background-color: var(--thabet-card-bg);
  border: 1px solid var(--thabet-border);
  border-radius: 12px;
  padding: 25px;
  height: 100%;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

.page-download__item-title {
  font-size: 1.5em;
  color: var(--thabet-primary-color);
  margin-bottom: 15px;
  text-align: center;
}

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

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

.page-download__faq-item {
  background-color: var(--thabet-card-bg);
  border: 1px solid var(--thabet-border);
  border-radius: 10px;
  margin-bottom: 15px;
  overflow: hidden;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.page-download__faq-question {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px 25px;
  cursor: pointer;
  font-size: 1.15em;
  font-weight: 600;
  color: var(--thabet-text-main);
  background-color: var(--thabet-card-bg);
  transition: background-color 0.3s ease;
  list-style: none; /* For <details> summary */
}

.page-download__faq-question::-webkit-details-marker {
  display: none; /* For <details> summary */
}

.page-download__faq-question:hover {
  background-color: #1a352a; /* Slightly lighter card bg on hover */
}

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

.page-download__faq-toggle {
  font-size: 1.5em;
  font-weight: 700;
  color: var(--thabet-primary-color);
  margin-left: 15px;
}

.page-download__faq-answer {
  padding: 0 25px 20px;
  color: var(--thabet-text-secondary);
  font-size: 1em;
}

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

/* Final CTA Section */
.page-download__final-cta-section {
  padding: 60px 0;
  background-color: var(--thabet-deep-green);
}

/* Responsive Design */
@media (min-width: 769px) {
  .page-download__hero-section {
    flex-direction: row;
    padding: 60px 20px;
    text-align: left;
    justify-content: space-between;
    align-items: center;
  }

  .page-download__hero-image-wrapper {
    flex: 1;
    margin-right: 40px;
    margin-bottom: 0;
    max-width: 50%;
  }

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

  .page-download__cta-buttons {
    justify-content: flex-start;
  }
}

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

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

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

  .page-download__btn-primary,
  .page-download__btn-secondary {
    width: 100% !important;
    max-width: 100% !important;
    box-sizing: border-box !important;
    white-space: normal !important;
    word-wrap: break-word !important;
    padding-left: 15px;
    padding-right: 15px;
  }

  /* Image responsive */
  .page-download img {
    max-width: 100% !important;
    width: 100% !important;
    height: auto !important;
    display: block !important;
  }
  
  .page-download__hero-image-wrapper,
  .page-download__features-grid,
  .page-download__download-guides,
  .page-download__game-categories,
  .page-download__promotions-grid,
  .page-download__why-choose-grid,
  .page-download__faq-list,
  .page-download__container,
  .page-download__guide-block,
  .page-download__feature-card,
  .page-download__game-card,
  .page-download__promotion-card,
  .page-download__why-choose-item,
  .page-download__faq-item {
    max-width: 100% !important;
    width: 100% !important;
    box-sizing: border-box !important;
    padding-left: 15px;
    padding-right: 15px;
    overflow: hidden !important; /* Ensure no overflow */
  }

  .page-download__hero-section {
    padding-top: 10px !important;
    padding-bottom: 30px;
  }

  .page-download__introduction-section,
  .page-download__features-section,
  .page-download__how-to-download-section,
  .page-download__games-section,
  .page-download__promotions-section,
  .page-download__why-choose-section,
  .page-download__faq-section,
  .page-download__final-cta-section {
    padding-top: 30px;
    padding-bottom: 30px;
  }

  .page-download__section-title {
    margin-bottom: 30px;
    padding-top: 0;
  }

  .page-download__feature-icon,
  .page-download__game-image,
  .page-download__promotion-image,
  .page-download__qr-code {
    max-width: 100% !important;
    height: auto !important;
    width: auto !important; /* Allow natural width based on max-width */
    margin-left: auto;
    margin-right: auto;
  }

  .page-download__qr-code-wrapper {
    padding: 0 20px;
  }
  
  .page-download__installation-steps {
    padding-left: 20px;
  }

  .page-download__cta-buttons {
    padding: 0 15px;
  }
}