/* ==========================================================================
   Voshé — Responsive
   Mobile first. Breakpoints: 375 / 430 / 768 / 1024 / 1366 / 1440 / 1920
   ========================================================================== */

/* Small phones already covered by base mobile styles */

@media (min-width: 375px) {
  .zones-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (min-width: 430px) {
  .hero__controls,
  .hero__dots {
    bottom: max(1.5rem, var(--space-8));
  }
}

/* Tablet */
@media (min-width: 768px) {
  .grid--2,
  .grid--3,
  .grid--4,
  .about-home__features,
  .team-grid,
  .values-grid,
  .bio-cards,
  .related-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .form__row {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .about-home {
    grid-template-columns: 1.05fr 0.95fr;
    gap: var(--space-12);
  }

  .why-editorial {
    grid-template-columns: 0.9fr 1.1fr;
    gap: var(--space-12);
  }

  .why-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .contact-split,
  .treatment-intro {
    grid-template-columns: 1fr 1fr;
  }

  .process {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .footer-grid {
    grid-template-columns: 1.4fr 1fr 1fr;
  }

  .zones-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .topbar__inner {
    flex-wrap: nowrap;
  }
}

/* Desktop navigation */
@media (min-width: 1024px) {
  .nav-toggle {
    display: none;
  }

  .nav-overlay {
    display: none !important;
  }

  .nav-panel {
    display: flex !important;
    align-items: center;
    gap: var(--space-4);
    position: static;
    width: auto;
    height: auto;
    background: transparent;
    padding: 0;
    transform: none;
    visibility: visible;
    opacity: 1;
    overflow: visible;
  }

  .nav-list {
    flex-wrap: wrap;
    justify-content: flex-end;
  }

  .grid--3 {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .footer-grid {
    grid-template-columns: 1.5fr 1fr 1fr 1.2fr;
  }

  .process {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }

  .values-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .team-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .bio-cards {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .zones-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }

  .whatsapp-float {
    right: 1.5rem;
    bottom: 1.5rem;
  }
}

/* Wide desktop */
@media (min-width: 1366px) {
  .grid--4 {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }

  .hero__inner {
    max-width: 52rem;
  }
}

@media (min-width: 1440px) {
  :root {
    --container: 76rem;
    --container-wide: 86rem;
  }
}

@media (min-width: 1920px) {
  :root {
    --container: 80rem;
  }
}

/* Mobile navigation drawer */
@media (max-width: 1023px) {
  .nav-panel {
    position: fixed;
    top: 0;
    right: 0;
    z-index: calc(var(--z-overlay) + 1);
    display: flex;
    flex-direction: column;
    width: min(100%, 22rem);
    height: 100%;
    padding: calc(var(--header-main-h) + var(--space-8)) var(--space-6) var(--space-8);
    background: var(--color-ivory);
    transform: translateX(100%);
    visibility: hidden;
    transition: transform var(--duration) var(--ease), visibility var(--duration) var(--ease);
    overflow-y: auto;
  }

  .nav-panel.is-open {
    display: flex;
    transform: translateX(0);
    visibility: visible;
  }

  .nav-list {
    flex-direction: column;
    align-items: stretch;
    gap: var(--space-1);
  }

  .nav-list > li > a,
  .nav-list > li > button {
    width: 100%;
    justify-content: space-between;
    padding: 0.85rem 0.5rem;
    color: var(--color-text) !important;
    font-size: var(--fs-base);
  }

  .has-dropdown .dropdown {
    position: static;
    opacity: 1;
    visibility: visible;
    transform: none;
    box-shadow: none;
    border: none;
    background: transparent;
    padding: 0 0 0 var(--space-3);
    max-height: 0;
    overflow: hidden;
    min-width: 0;
    transition: max-height var(--duration) var(--ease);
  }

  .has-dropdown.is-open .dropdown {
    max-height: 40rem;
    padding-bottom: var(--space-3);
  }

  .nav-cta {
    margin: var(--space-6) 0 0;
    width: 100%;
  }

  .nav-cta.btn {
    width: 100%;
  }

  /* Always readable logo text on mobile when menu open */
  body.is-menu-open .logo__fallback {
    color: var(--color-black);
  }

  body.is-menu-open .nav-toggle__bar {
    background: var(--color-black);
  }

  .topbar {
    display: none;
  }

  :root {
    --header-h: var(--header-main-h);
  }

  .whatsapp-float__tooltip {
    display: none;
  }

  .whatsapp-float {
    bottom: max(1rem, env(safe-area-inset-bottom));
  }

  /* Avoid covering form CTAs on small screens */
  body {
    padding-bottom: 4.5rem;
  }

  .site-footer {
    margin-bottom: 0;
  }
}

/* Extra-small phones */
@media (max-width: 374px) {
  .btn {
    width: 100%;
  }

  .btn-group {
    flex-direction: column;
    align-items: stretch;
  }

  .hero__title {
    font-size: clamp(2.1rem, 8.5vw, 2.75rem);
    max-width: 100%;
  }

  .hero__controls {
    transform: translateX(calc(-50% + 3.75rem));
    bottom: 1.15rem;
  }

  .hero__dots {
    transform: translateX(calc(-50% - 2.75rem));
    bottom: calc(1.15rem + 0.85rem);
  }

  .whatsapp-float {
    right: 0.75rem;
    bottom: max(0.75rem, env(safe-area-inset-bottom));
  }

  .page-hero h1,
  .page-hero--service h1 {
    max-width: none;
  }

  .promo-card__title {
    padding-right: 0;
    margin-top: 1.5rem;
  }
}

/* Prevent horizontal scroll */
html,
body {
  overflow-x: hidden;
  max-width: 100%;
}

*,
*::before,
*::after {
  min-width: 0;
}

img,
iframe,
video,
svg {
  max-width: 100%;
}

.container,
.hero__inner,
.section-header,
.cta-band__inner {
  max-width: 100%;
}

.btn,
.btn-group a {
  max-width: 100%;
  white-space: normal;
}

.site-footer {
  overflow-wrap: anywhere;
}

.whatsapp-float {
  z-index: var(--z-whatsapp);
}

@media (max-width: 1023px) {
  .site-footer {
    padding-bottom: calc(var(--space-8) + 3.5rem);
  }
}

/* Print */
@media print {
  .site-header,
  .whatsapp-float,
  .hero__controls,
  .hero__dots,
  .nav-toggle {
    display: none !important;
  }

  body {
    padding: 0;
    color: #000;
    background: #fff;
  }
}
