/* =====================================================
   KHODORA LTD — responsive.css
   Breakpoints: 1024px / 860px / 640px / 420px
   ===================================================== */

/* ---------- ≤ 1024px (small laptop / large tablet) ---------- */
@media (max-width: 1024px) {
  .services-grid,
  .why-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .tech-grid {
    grid-template-columns: repeat(3, 1fr);
  }

  .company-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .footer-grid {
    grid-template-columns: 1fr 1fr;
    gap: 2.5rem;
  }
}

/* ---------- ≤ 860px (tablet / mobile nav) ---------- */
@media (max-width: 860px) {
  :root {
    --header-h: 68px;
  }

  /* Mobile navigation */
  .nav-toggle {
    display: flex;
  }

  .site-header {
    background: rgba(12, 12, 14, 0.88);
    backdrop-filter: blur(18px);
    -webkit-backdrop-filter: blur(18px);
    border-bottom: 1px solid var(--line-inverse);
  }

  .site-nav {
    position: fixed;
    top: var(--header-h);
    left: 0;
    right: 0;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    padding: 1.25rem 1.5rem 2rem;
    background: rgba(12, 12, 14, 0.97);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--line-inverse);
    transform: translateY(-12px);
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: transform 0.3s ease, opacity 0.3s ease, visibility 0.3s;
  }

  .site-nav.is-open {
    transform: translateY(0);
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
  }

  .site-nav ul {
    flex-direction: column;
    gap: 0;
  }

  .site-nav ul a {
    display: block;
    padding: 0.9rem 0;
    font-size: 1.05rem;
    border-bottom: 1px solid var(--line-inverse);
  }

  .site-nav ul a::after {
    display: none;
  }

  .nav-cta {
    margin-top: 1.25rem;
    justify-content: center;
  }

  /* Hero */
  .hero {
    min-height: auto;
    padding-bottom: 4rem;
  }

  .hero-inner {
    grid-template-columns: 1fr;
    gap: 3rem;
  }

  .hero-visual {
    order: -1;
    display: none;
  }

  .hero-stats {
    gap: 1.75rem;
  }

  /* About */
  .about-grid {
    grid-template-columns: 1fr;
    gap: 3.5rem;
  }

  .about-img {
    aspect-ratio: 16 / 10;
  }

  .about-media-card {
    right: 1rem;
    bottom: -1.25rem;
  }

  /* Security */
  .security-grid {
    grid-template-columns: 1fr;
    gap: 3rem;
  }

  .security-img {
    aspect-ratio: 16 / 10;
  }

  .security-badge {
    left: 1rem;
  }

  /* Footer */
  .footer-grid {
    grid-template-columns: 1fr 1fr;
  }
}

/* ---------- ≤ 640px (mobile) ---------- */
@media (max-width: 640px) {
  .container,
  .container-narrow {
    width: min(100% - 2.25rem, 1200px);
  }

  .services-grid,
  .why-grid,
  .company-grid {
    grid-template-columns: 1fr;
  }

  .tech-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .hero-actions .btn {
    width: 100%;
  }

  .hero-stats {
    flex-direction: column;
    gap: 1.25rem;
  }

  /* Timeline */
  .timeline::before {
    left: 21px;
  }

  .timeline-item {
    gap: 1.15rem;
  }

  .timeline-marker {
    width: 44px;
    height: 44px;
    box-shadow: 0 0 0 4px var(--paper);
  }

  .timeline-marker span {
    font-size: 0.8rem;
  }

  .timeline-card {
    padding: 1.4rem 1.5rem;
  }

  /* Contact */
  .contact-actions {
    flex-direction: column;
    align-items: stretch;
  }

  .contact-btn {
    min-width: 0;
    width: 100%;
    justify-content: flex-start;
  }

  /* Footer */
  .footer-grid {
    grid-template-columns: 1fr;
    gap: 2.25rem;
  }

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

  /* Legal */
  .legal-cta {
    flex-direction: column;
    text-align: center;
  }
}

/* ---------- ≤ 420px (small mobile) ---------- */
@media (max-width: 420px) {
  .tech-grid {
    grid-template-columns: 1fr 1fr;
    gap: 0.85rem;
  }

  .tech-card {
    padding: 1.3rem 1rem;
  }

  .hero-eyebrow {
    font-size: 0.72rem;
    padding: 0.4rem 0.8rem;
  }

  .section-head {
    margin-bottom: 2.5rem;
  }

  .service-card,
  .why-card {
    padding: 1.75rem 1.5rem;
  }
}

/* ---------- Large screens ---------- */
@media (min-width: 1600px) {
  :root {
    --fs-hero: 5rem;
  }
}
