/* =================================================================
   HMS Frontend — RESPONSIVE
   - All width-based media queries
   ================================================================= */

/* 1200 ↓ */
@media (max-width:1200px) {
  .hero__grid {
    grid-template-columns: 1fr !important;
    gap: var(--space-5);
  }

  .hero__content {
    max-width: 780px;
  }

  .hero__media .media-frame {
    height: clamp(260px, 48vw, 380px);
  }
}

/* 1024 ↓ */
@media (max-width:1024px) {
  .hero__media {
    display: none;
  }

  .nav__toggle {
    display: inline-block;
  }

  .nav__list {
    position: fixed;
    inset: 64px 0 auto 0;
    background: #fff;
    border-bottom: 1px solid var(--border);
    display: grid;
    gap: var(--space-4);
    padding: var(--space-6) var(--gutter);
    transform-origin: top;
    transform: scaleY(0);
    opacity: 0;
    pointer-events: none;
  }

  .nav__list.is-open {
    transform: scaleY(1);
    opacity: 1;
    pointer-events: auto;
  }

  .kpis {
    grid-template-columns: 1fr 1fr;
  }

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

  .form__grid {
    grid-template-columns: 1fr;
  }
}

/* 640 ↓ */
@media (max-width:640px) {
  .hero__title {
    line-height: 1.1;
  }

  /* .hero__media .media-frame{ height:260px; } */
  .hero__media {
    display: none;
  }

  .hero__tagline {
    grid-template-columns: 1fr
  }

  .hero__tagline span {
    justify-content: center;
    text-align: left;
  }

  .header__cta {
    display: none !important;
  }

  .cards {
    grid-template-columns: 1fr;
  }

  .section-header {
    border-radius: 12px;
  }

  .section-title::after {
    width: 72px;
  }

  .hero__actions {
    justify-content: center;

  }

}

/* mobile nav bar */
/* ==============================
   Mobile nav — Seamless Header Extension Dropdown (Tier-A Enterprise)
   ============================== */
@media (max-width: 1024px) {

  /* Clean Toggle */
  .nav__toggle {
    display: flex;
    justify-content: center;
    align-items: center;
    width: 40px;
    height: 40px;
    padding: 0;
    border-radius: 8px;
    border: 1px solid var(--border);
    background: #ffffff;
    color: var(--brand-ink);
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04);
    transition: all 0.15s ease;
    cursor: pointer;
  }

  .nav__toggle:active {
    transform: scale(0.96);
  }

  .nav__toggle-bar {
    display: none;
  }

  .nav__toggle i {
    font-size: 1.1rem;
    line-height: 1;
  }

  /* Panel — Full Width Seamless Dropdown (Attaches Directly Below Header) */
  .nav__list {
    display: none;
    position: fixed;
    left: 0;
    right: 0;
    top: var(--header-h); 
    width: 100%;
    z-index: 1000;
    max-height: calc(100vh - var(--header-h));
    overflow-y: auto;

    /* Theme: 100% Solid Crisp White */
    background: #ffffff;
    padding: 1rem var(--gutter) 1.5rem;
    border-bottom: 1px solid var(--border);
    box-shadow: 0 20px 40px -10px rgba(15, 23, 42, 0.15);
    
    transform-origin: top center;
    animation: navSlideDown 0.18s cubic-bezier(0.16, 1, 0.3, 1);
  }

  @keyframes navSlideDown {
    from { opacity: 0; transform: translateY(-6px); }
    to { opacity: 1; transform: translateY(0); }
  }

  /* Open when toggle expanded */
  .nav__toggle[aria-expanded="true"] + .nav__list,
  .nav__list.is-open {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
  }

  /* Remove any muddy pseudo-element overlay */
  .nav__list::before {
    content: none !important;
  }

  /* List Items */
  .nav__list li {
    margin: 0;
    list-style: none;
    display: block;
  }

  /* Nav Links — Clean Enterprise Typography */
  .nav__list a {
    position: relative;
    display: flex;
    align-items: center;
    width: 100%;
    min-height: 44px;
    padding: 0.65rem 0.85rem;
    border-radius: 8px;
    box-shadow: none !important;
    
    color: var(--brand-ink);
    font-weight: 500;
    font-size: 1rem;
    text-decoration: none;
    transition: all 0.15s ease;
  }

  /* Remove all right chevrons / arrows on flat links */
  .nav__list a::after,
  .nav__list a::before {
    content: none !important;
  }

  /* Hover state */
  @media (hover:hover) {
    .nav__list a:hover {
      background: #f8fafc;
      color: var(--brand-primary);
    }
  }

  /* Active/Current item */
  .nav__list a.is-active,
  .nav__list a[aria-current="page"] {
    background: #fff7ed;
    color: var(--brand-accent);
    font-weight: 600;
  }

  /* Mobile Drawer CTA Button */
  .nav__mobile-cta-wrap {
    display: block;
    padding-top: 0.75rem;
    margin-top: 0.5rem;
    border-top: 1px solid var(--border);
  }

  .nav__mobile-cta {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0.75rem 1.25rem;
    font-size: 0.95rem;
    font-weight: 600;
    border-radius: 8px;
    background: var(--brand-accent) !important;
    color: #ffffff !important;
    text-decoration: none;
    box-shadow: none !important;
  }
}

/* Header spacing on mobile */
@media (max-width:1024px) {
    .header__row {
        justify-content: space-between;
    }
}