/* =========================================================
   Downloadable Files page-specific CSS
   Global reset, fonts, headings, container, buttons,
   images, header, nav, basket, and footer come from core.css.
   Load this file after core.css.
========================================================= */


/* =========================================================
   PAGE WRAPPER
========================================================= */

.downloads-page main {
  overflow: hidden;
}

.downloads-page .main-nav .nav-wrapper {
  border-bottom: 1px solid var(--border-color);
}


/* =========================================================
   INTRO
========================================================= */

.downloads-intro {
  padding: clamp(30px, 5vw, 60px) 0 clamp(30px, 4vw, 50px);
  text-align: center;
}

.downloads-intro .heading-2 {
  margin-bottom: clamp(16px, 2vw, 28px);
}

.downloads-intro p {
  max-width: 760px;
  margin: 0 auto;
  text-wrap: balance;
}


/* =========================================================
   DOWNLOAD CARDS
========================================================= */

.downloads-area {
  padding: 0 0 clamp(70px, 8vw, 120px);
}

.downloads-grid {
  --dl-gap: clamp(20px, 2.5vw, 30px);
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: var(--dl-gap);
  max-width: 1400px;
  margin: 0 auto;
  padding: 0;
  list-style: none;
}

.download-card {
  flex: 1 1 calc((100% - 3 * var(--dl-gap)) / 4);
  max-width: 340px;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: clamp(28px, 3vw, 42px) clamp(18px, 1.6vw, 26px);
  border: 2px dashed #f9ad4b;
  border-radius: 20px;
  background: var(--color-white);
}

.download-card--green {
  border-color: #54c175;
}

.download-card--pink {
  border-color: #ff6aa2;
}

.download-card--blue {
  border-color: #4fb3e8;
}

.download-card__image {
  display: block;
  margin-bottom: clamp(16px, 2vw, 24px);
  transition: transform 0.2s ease;
}

.download-card__image:hover {
  transform: translateY(-2px);
}

.download-card__image img {
  display: block;
  width: auto;
  height: clamp(150px, 12vw, 190px);
}

.download-card__title {
  font-size: clamp(1.25rem, 1.0417rem + 0.5vw, 1.5rem);
  margin-bottom: 10px;
  color: #f79a46;
  text-wrap: balance;
}

.download-card--green .download-card__title {
  color: #54c175;
}

.download-card--pink .download-card__title {
  color: #ff6aa2;
}

.download-card--blue .download-card__title {
  color: #4fb3e8;
}

.download-card__text {
  margin: 0 0 clamp(20px, 2vw, 28px);
  flex-grow: 1;
}

.download-card .btn {
  font-size: clamp(14px, 1.1vw, 16px);
  padding: 10px 24px;
  border-radius: 6px;
  letter-spacing: 0.5px;
}


/* =========================================================
   FOOTER CTA BAR (as on the product pages)
========================================================= */

.footer-cta-bar {
  background-color: #ffd578;
  padding: 28px 0;
  text-align: center;
}

.footer-cta-container {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 60px;
  flex-wrap: nowrap;
}

.footer-cta-text {
  font-family: "Quicksand", sans-serif;
  font-size: clamp(18px, calc(6px + 2.34375vw), 26px);
  font-weight: 800;
  color: black;
  margin: 0;
}

.footer-cta-copy {
  text-align: start;
}

.footer-cta-subtext {
  margin: 4px 0 0;
  font-size: clamp(14px, 1.1vw, 16px);
  color: var(--text-color);
  text-wrap: balance;
}

.footer-cta-btn {
  background-color: var(--button-color);
  color: var(--color-white);
  padding: 12px 24px;
  border-radius: 6px;
  font-weight: 700;
  font-size: clamp(15px, 1.25vw, 18px);
  text-decoration: none;
  transition: background 0.3s;
  display: inline-block;
  letter-spacing: 0.5px;
  white-space: nowrap;
  font-family: "Quicksand", sans-serif;
}

.footer-cta-btn:hover {
  background-color: #d61b3c;
}


/* =========================================================
   RESPONSIVE
========================================================= */

@media screen and (min-width: 768px) and (max-width: 1199px) {
  .downloads-grid {
    max-width: 900px;
  }

  .download-card {
    flex-basis: calc((100% - var(--dl-gap)) / 2);
  }
}

@media screen and (max-width: 767px) {
  .downloads-intro {
    padding: 40px 0 30px;
  }

  .downloads-area {
    padding-bottom: 50px;
  }

  .download-card {
    flex-basis: 100%;
    max-width: none;
    padding: 24px 20px 28px;
  }

  .download-card__image {
    margin-bottom: 12px;
  }

  .download-card__image img {
    height: 130px;
  }

  .download-card__text {
    margin-bottom: 16px;
  }

  .footer-cta-container {
    flex-direction: column;
    gap: 14px;
  }

  .footer-cta-copy {
    text-align: center;
  }
}

@media (max-width: 480px) {
  .footer-cta-bar {
    padding: 18px 0;
  }

  .footer-cta-container {
    gap: 12px;
    flex-wrap: wrap;
  }

  .footer-cta-btn {
    padding: 10px 12px;
    font-size: clamp(11px, 3vw, 13px);
    white-space: normal;
    text-align: center;
  }
}

@media screen and (max-width: 969px) {
  .downloads-page .header-bottom-sm {
    border-bottom: 1px solid var(--border-color);
  }
}

/* Arabic pages (ae/AR, sa): content sections carry dir="rtl" */
html[lang="ar"] .downloads-page main :is(h1, h2, p, a) {
  font-family: "Noto Kufi Arabic", sans-serif;
}
