/* =========================================================
   Responsive layout
   Breakpoints: 1200px · 1280px (mobile menu) · 992px · 768px · 576px · 400px
   ========================================================= */

@media (max-width: 1560px) {
  .nav-list > li > a, .dropdown-toggle { padding: 0.5rem 0.4rem; font-size: 0.93rem; }
  .nav-list > li > a[aria-current="page"]::after,
  .nav-list > li.is-active > .dropdown-toggle::after { left: 0.45rem; right: 0.45rem; }
  .nav-list > li.nav-cta > a.btn { padding: 0.55rem 0.9rem; }
  .nav-cta { margin-left: 0.3rem; }
  .brand__name { font-size: 1.05rem; }
}

/* ---------- Mobile navigation (off-canvas panel) ---------- */
@media (max-width: 1365px) {
  .nav-toggle { display: inline-flex; }
  .primary-nav {
    position: fixed; top: 0; right: 0; bottom: 0; width: min(340px, 88vw); z-index: 1200;
    background: #fff; padding: 5.5rem 1.4rem 2rem; overflow-y: auto;
    transform: translateX(100%); transition: transform 0.3s var(--ease), visibility 0.3s;
    visibility: hidden; box-shadow: -10px 0 30px -12px rgba(0,0,0,0.3);
  }
  .primary-nav.is-open { transform: none; visibility: visible; }
  .nav-toggle { position: relative; z-index: 1300; }
  .nav-backdrop { display: block; position: fixed; inset: 0; z-index: 1100; background: rgba(4, 26, 26,0.5); opacity: 0; visibility: hidden; transition: opacity 0.3s, visibility 0.3s; }
  .nav-backdrop.is-open { opacity: 1; visibility: visible; }
  .nav-list { flex-direction: column; align-items: stretch; gap: 0; }
  .nav-list > li { border-bottom: 1px solid var(--line); }
  .nav-list > li > a, .dropdown-toggle { width: 100%; justify-content: space-between; padding: 0.9rem 0.3rem; font-size: 1.05rem; }
  .nav-list > li > a[aria-current="page"]::after,
  .nav-list > li.is-active > .dropdown-toggle::after { left: 0; right: auto; width: 4px; top: 0.8rem; bottom: 0.8rem; height: auto; }
  .nav-list > li > a[aria-current="page"], .nav-list > li.is-active > .dropdown-toggle { padding-left: 0.9rem; }
  .dropdown {
    position: static; opacity: 1; visibility: visible; transform: none; box-shadow: none; border: 0;
    padding: 0 0 0.6rem 0.8rem; display: none; min-width: 0;
  }
  .has-dropdown:hover > .dropdown, .has-dropdown:focus-within > .dropdown { display: none; }
  .has-dropdown.is-open > .dropdown { display: block; }
  .has-dropdown:hover > .dropdown-toggle i { transform: none; }
  .has-dropdown.is-open > .dropdown-toggle i { transform: rotate(180deg); }
  .nav-cta { margin: 1.4rem 0 0; border-bottom: 0 !important; }
  .nav-cta .btn { width: 100%; }
}

@media (max-width: 1200px) {
  .card-grid--4, .tiles { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 992px) {
  .split, .principal, .contact-grid, .two-col { grid-template-columns: 1fr; }
  .split--reverse .split__media { order: 0; }
  .split__media--framed::before { inset: 0.8rem -0.8rem -0.8rem 0.8rem; }
  .principal__photo { max-width: 300px; }
  .features { grid-template-columns: repeat(2, 1fr); }
  .feature, .feature:not(:nth-child(3n + 1)) { padding: 1.8rem 1.4rem 1.8rem 0; border-left: 0; }
  .feature:nth-child(2n) { padding-left: 1.4rem; border-left: 1px solid var(--line); }
  .card-grid--3 { grid-template-columns: repeat(2, 1fr); }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .topper-detail { grid-template-columns: 1fr; }
  .topper-detail__photo { max-width: 280px; }
  .map-wrap { aspect-ratio: 4 / 3; }
}

@media (max-width: 768px) {
  :root { --header-h: 72px; }
  .topbar__info .hide-sm { display: none; }
  .brand img { width: 46px; height: 46px; }
  .hero { min-height: 640px; }
  .hero__content { padding: 6rem 0 7rem; }
  .hero__controls { left: 1.25rem; right: auto; }
  .features { grid-template-columns: 1fr; }
  .feature, .feature:nth-child(2n), .feature:not(:nth-child(3n + 1)) { padding: 1.6rem 0; border-left: 0; }
  .form-grid { grid-template-columns: 1fr; }
  .section-head--split { align-items: flex-start; }
  .gallery-grid { columns: 2 200px; }
  .cta-band { flex-direction: column; align-items: flex-start; }
}

@media (max-width: 576px) {
  body { font-size: 1rem; }
  .container { width: min(100% - 2rem, var(--container)); }
  .topbar { font-size: 0.85rem; }
  .topbar__inner { justify-content: center; }
  .topbar__social { display: none !important; }
  .brand__place { display: none; }
  .brand__name { font-size: 0.98rem; }
  .card-grid--3, .card-grid--4, .tiles { grid-template-columns: 1fr; }
  .tile { aspect-ratio: 16 / 10; }
  .footer-grid { grid-template-columns: 1fr; gap: 2rem; }
  .stats { grid-template-columns: repeat(3, 1fr); }
  .stats li { padding: 1.5rem 0.8rem; }
  .detail-list { grid-template-columns: 1fr; }
  .btn-row .btn { flex: 1 1 auto; }
  .gallery-grid { columns: 1; }
  .lightbox__stage { padding: 0; }
  .lightbox__prev, .lightbox__next { top: auto; bottom: -3.8rem; transform: none; }
  .lightbox { grid-template-rows: auto 1fr auto auto; padding-bottom: 5rem; }
  .filter-btn { padding: 0.45rem 0.9rem; font-size: 0.93rem; }
  .topper-stats { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0.5rem; }
  .topper-stats li { padding: 0.8rem 0.7rem; }
  .topper-stats strong { font-size: 1.35rem; }
  .topper-stats span { display: block; font-size: 0.82rem; line-height: 1.3; margin-top: 0.2rem; }
}

@media (max-width: 400px) {
  .brand img { width: 40px; height: 40px; }
  .brand__name { font-size: 0.9rem; }
  .stats { grid-template-columns: 1fr; }
  .stats li, .stats li:nth-child(3) { border-left: 0; padding-left: 0; border-top: 1px solid rgba(255,255,255,0.14); }
  .stats li:first-child { border-top: 0; }
}
