/* ==========================================================================
   BARBERÍA GHIL — RESPONSIVE STYLESHEET
   Soporte completo: 320px, 375px, 430px, 768px, 1024px, 1280px, 1440px+
   ========================================================================== */

/* ==========================================================================
   PANTALLAS GRANDES (1440px+)
   ========================================================================== */
@media (min-width: 1440px) {
  :root {
    --container: 1240px;
  }
}

/* ==========================================================================
   LAPTOP / TABLET LANDSCAPE (<= 1199px)
   ========================================================================== */
@media (max-width: 1199px) {
  .services-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .ritual-timeline {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .hero__grid {
    gap: 2.25rem;
  }

  .booking-layout {
    grid-template-columns: 1fr 320px;
    gap: 1.5rem;
  }
}

/* ==========================================================================
   TABLET (<= 1024px) — Composición dedicada 2x2 y Navegación Off-Canvas
   ========================================================================== */
@media (max-width: 1024px) {
  :root {
    --space-xl: 4.5rem;
    --header-height: 76px;
  }

  .desktop-nav,
  .header-actions .btn-reserve-desktop {
    display: none;
  }

  .mobile-toggle {
    display: inline-flex;
  }

  /* Hero equilibrado en Tablet */
  .hero {
    min-height: auto;
    padding-top: calc(var(--header-height) + 2.5rem);
    padding-bottom: 4rem;
  }

  .hero__grid {
    grid-template-columns: 1fr;
    gap: 2.75rem;
  }

  .hero__content {
    max-width: 100%;
  }

  .hero__visual {
    max-width: 620px;
    margin-inline: auto;
    width: 100%;
  }

  .hero__floating-card {
    left: 16px;
    bottom: 16px;
  }

  .hero__scroll {
    display: none;
  }

  /* Prueba social 2x2 en Tablet */
  .proof-bar__grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 1.5rem;
  }

  .proof-item:nth-child(2) {
    border-right: none;
  }

  /* Grids en 2 columnas para Tablet */
  .grid-3,
  .grid-4,
  .barbers-grid,
  .stats-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  /* Masonry adaptado a Tablet */
  .masonry-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    grid-auto-rows: 260px;
  }

  .gallery-item,
  .gallery-item--tall,
  .gallery-item--wide,
  .gallery-item--large,
  .gallery-item--half {
    grid-column: span 1;
    grid-row: span 1;
  }

  .gallery-item--tall,
  .gallery-item--large {
    grid-row: span 2;
  }

  .promo-pack {
    padding: 2.25rem;
  }

  .promo-pack__grid {
    grid-template-columns: 1fr;
    gap: 2rem;
  }

  .location-grid,
  .booking-layout {
    grid-template-columns: 1fr;
  }

  .booking-summary {
    position: static;
  }

  .site-footer__grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 2rem;
  }
}

/* ==========================================================================
   MOBILE (<= 767px) — 430px, 375px
   ========================================================================== */
@media (max-width: 767px) {
  :root {
    --space-xl: 3.5rem;
    --space-lg: 2.25rem;
    --header-height: 70px;
  }

  .section-header--split {
    flex-direction: column;
    align-items: flex-start;
  }

  .hero__actions {
    flex-direction: column;
    align-items: stretch;
  }

  .hero__actions .btn {
    width: 100%;
  }

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

  .hero__frame-accent {
    display: none;
  }

  .proof-bar__grid,
  .services-grid,
  .ritual-timeline,
  .barbers-grid,
  .stats-grid,
  .grid-2,
  .grid-3,
  .grid-4,
  .selectable-grid,
  .form-grid,
  .promo-pack__list {
    grid-template-columns: 1fr;
  }

  .proof-item {
    border-right: none;
    border-bottom: 1px solid var(--border-subtle);
    padding-right: 0;
    padding-bottom: 1rem;
  }

  .proof-item:last-child {
    border-bottom: none;
    padding-bottom: 0;
  }

  /* Galería en móvil */
  .masonry-grid {
    grid-template-columns: 1fr;
    grid-auto-rows: 280px;
  }

  .gallery-item,
  .gallery-item--tall,
  .gallery-item--wide,
  .gallery-item--large,
  .gallery-item--half {
    grid-column: span 1 !important;
    grid-row: span 1 !important;
  }

  /* Lightbox móvil */
  .lightbox {
    padding: 1rem;
  }

  .lightbox__nav {
    top: auto;
    bottom: 1.25rem;
    transform: none;
  }

  .lightbox__nav--prev {
    left: calc(50% - 56px);
  }

  .lightbox__nav--next {
    right: calc(50% - 56px);
  }

  /* Modal de barbero en móvil */
  .barber-modal__dialog {
    padding: 1.5rem 1.25rem;
  }

  .barber-modal__grid {
    grid-template-columns: 1fr;
    gap: 1.25rem;
  }

  .barber-modal__photo {
    max-height: 300px;
  }

  /* Reservas en móvil */
  .booking-wizard {
    padding: 1.4rem 1.15rem;
  }

  .stepper {
    gap: 0.25rem;
  }

  .stepper__label {
    font-size: 0.64rem;
  }

  .time-slots-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .wizard-actions {
    flex-direction: column-reverse;
    align-items: stretch;
  }

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

  .testimonial-slide {
    padding: 1.85rem 1.35rem;
  }

  .promo-pack {
    padding: 1.75rem 1.35rem;
  }

  .promo-pack__price-box {
    padding: 1.5rem;
  }

  .info-panel {
    padding: 1.5rem;
  }

  .site-footer__grid {
    grid-template-columns: 1fr;
    gap: 2rem;
  }

  .site-footer__bottom {
    flex-direction: column;
    align-items: flex-start;
  }

  /* CTA Flotante WhatsApp en móvil con separación suficiente */
  .whatsapp-float {
    right: 16px;
    bottom: 20px;
  }

  .whatsapp-float__tooltip {
    display: none;
  }
}

/* ==========================================================================
   SMALL MOBILE (<= 375px y 320px)
   ========================================================================== */
@media (max-width: 375px) {
  .container {
    width: calc(100% - 24px);
  }

  h1,
  .h1 {
    font-size: 2rem;
  }

  h2,
  .h2 {
    font-size: 1.65rem;
  }

  .stepper__label {
    display: none;
  }

  .barber-card__actions {
    flex-direction: column;
  }

  .hero__floating-card {
    position: static;
    margin-top: 0.85rem;
    max-width: 100%;
  }
}
