@media (max-width: 1199.98px) {
  .hero {
    .swiper,
    .swiper-slide,
    .hero-content {
      min-height: 100svh;
      height: 100svh;
    }

    .hero-content {
      flex-direction: column;
      align-items: flex-start;
      justify-content: flex-end;
      gap: 1.75rem;
      max-width: 100%;
      padding: calc(var(--header-h) + 1.5rem) 1.25rem 7rem;
    }

    .hero-nums {
      flex-direction: row;
      align-items: center;
      gap: 1.25rem;
      padding-inline-start: 0;
      padding-bottom: 0.35rem;

      &::before {
        top: auto;
        bottom: 0;
        left: 0;
        right: 0;
        width: auto;
        height: 1px;
      }

      .is-active::before,
      .is-active::after {
        display: none;
      }

      .is-active {
        color: var(--main-color);
      }
    }

    .hero-text h1,
    .hero-text .hero-title {
      font-size: clamp(2.6rem, 11vw, 4rem);
    }

    .hero-social {
      left: 1.25rem;
      bottom: 1.35rem;
    }
  }

  .project-featured-media {
    height: min(48vh, 420px);
  }

  .service-vcard {
    &.is-offset {
      margin-top: 0;
    }

    .service-vcard-img {
      aspect-ratio: 3 / 3.8;
    }
  }

  .collection-item-tall {
    height: clamp(180px, 32vw, 320px);
  }

  .collection-item-short {
    height: clamp(140px, 24vw, 220px);
  }
}

@media (max-width: 991.98px) {
  .about-visual {
    padding: 1.5rem 0 1.5rem 1.25rem;
    min-height: auto;
  }

  .about-visual-main {
    height: 340px;
    width: 100% !important;
    height: 100% !important;
  }

  .about-frame {
    width: 58%;
    height: 70%;
  }

  .about-visual-float {
    width: min(46%, 200px);
    height: 140px;
  }

  .about-points {
    margin-bottom: 1.5rem;
  }

  .about-features-new li {
    border-bottom: 1px solid rgba(0, 0, 0, 0.08);
    padding-bottom: 1.25rem;
  }

  .service-vcard {
    .service-vcard-img {
      aspect-ratio: 3 / 3.4;
    }
  }

  .section-num {
    font-size: 7rem;
    top: 2% !important;
  }

  .project-featured-media {
    height: 320px;
  }
}

@media (max-width: 767.98px) {
  .hero {
    .hero-content {
      padding-bottom: 6.5rem;
    }

    .hero-text h1,
    .hero-text .hero-title {
      font-size: 2.35rem;
    }

    .hero-text p {
      font-size: 0.88rem;
      max-width: 280px;
    }

    .hero-social {
      left: 1rem;
      bottom: 1.15rem;
      gap: 0.9rem;
    }
  }

  .about-content h2 {
    font-size: 2rem;
  }

  .about-visual {
    padding: 1rem 0 2.5rem 1rem;
  }

  .about-visual-main {
    height: 260px;
  }

  .about-visual-float {
    width: 46%;
    height: 110px;
    left: 0;
  }

  .collection-item-tall,
  .collection-item-short {
    height: 200px;
  }

  .page-header {
    min-height: 260px;
    padding-top: 7rem;
  }

  .footer-bottom {
    flex-direction: column;
    text-align: center;
  }

  .accent-square {
    display: none;
  }

  .circle-arrow {
    width: 42px;
    height: 42px;
  }

  .btn-circle-link,
  .btn-hero-link,
  .btn-text-link,
  .btn-outline-link {
    font-size: 0.65rem;
    letter-spacing: 0.16em;
  }

  .quiz-wrap {
    padding: 2rem 0.75rem 3.5rem;
  }

  .quiz-card {
    padding: 22px 16px;
  }

  .quiz-section .opt-grid.cols-3,
  .quiz-section .elec-grid-3 {
    grid-template-columns: 1fr 1fr;
  }

  .quiz-section .result-header .r-total {
    font-size: 28px;
  }

  .project-tabs {
    justify-content: flex-start !important;
    overflow-x: auto;
    flex-wrap: nowrap;
    padding-bottom: 0.35rem;
  }

  .project-tabs .nav-link {
    white-space: nowrap;
  }
}

@media (min-width: 1200px) {
  /* Desktop hover open for nav dropdowns */
  .header .nav-item.dropdown:hover > .dropdown-menu {
    display: block;
    animation: dropdownIn 0.22s ease;
  }
}

@media (min-width: 992px) {
  .dropdown:hover .dropdown-menu {
    display: block;
  }

  .stat-item + .stat-item::before {
    content: "";
    position: absolute;
    inset-inline-start: 0;
    top: 50%;
    transform: translateY(-50%);
    height: calc(100% + 4.5rem);
    width: 1px;
    background: linear-gradient(
      to bottom,
      transparent,
      rgba(255, 255, 255, 0.25),
      transparent
    );
  }

  .stat-item + .stat-item::after {
    content: "";
    position: absolute;
    inset-inline-start: -2.5px;
    top: 50%;
    transform: translateY(-50%);
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--main-color);
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

/* Arabic / RTL responsive overrides */
@media (max-width: 1199.98px) {
  html[dir="rtl"] .hero .hero-social {
    left: auto;
    right: 1.25rem;
  }
}

@media (max-width: 991.98px) {
  html[dir="rtl"] .about-visual {
    padding: 1.5rem 1.25rem 1.5rem 0;
  }
}

@media (max-width: 767.98px) {
  html[dir="rtl"] .hero .hero-social {
    left: auto;
    right: 1rem;
  }

  html[dir="rtl"] .about-visual {
    padding: 1rem 1rem 2.5rem 0;
  }

  html[dir="rtl"] .about-visual-float {
    left: auto;
    right: 0;
  }

  html[dir="rtl"] .project-tabs {
    justify-content: flex-start !important;
  }
}
