/**
 * REGLAS RESPONSIVE Y MEDIA QUERIES
 * Dr. Andrés Herrera - Cirugía Plástica y Estética
 */

/* ==========================================================================
   1. LAPTOPS Y PANTALLAS MEDIANAS (Max-width: 1200px)
   ========================================================================== */
@media (max-width: 1200px) {
  .nav-menu {
    gap: 0.95rem;
  }

  .nav-link {
    font-size: 0.85rem;
    white-space: nowrap;
  }

  .navbar-acciones {
    gap: 0.5rem;
  }

  .navbar-acciones .btn {
    padding: 0.45rem 0.85rem;
    font-size: 0.82rem;
  }
}

@media (max-width: 1024px) {
  .doctor-grid {
    gap: var(--espacio-2xl);
  }

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

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

  .footer-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 2.5rem;
  }
}

/* ==========================================================================
   2. TABLETS Y MÓVILES (Max-width: 960px)
   ========================================================================== */
@media (max-width: 960px) {
  /* Header y Menú Móvil (Píldora Flotante) */
  .header-navbar {
    padding: 0.85rem 1rem;
  }

  .header-navbar.scrolled {
    padding: 0.65rem 0.85rem;
  }

  .navbar-contenedor {
    width: 100%;
    padding: 0.45rem 1.15rem;
  }

  .header-navbar.scrolled .navbar-contenedor {
    width: 100%;
    padding: 0.45rem 1.15rem;
  }

  .logo {
    gap: 0.65rem;
    min-width: 0;
  }

  .logo-icono {
    width: 36px;
    height: 36px;
    padding: 2px;
    flex-shrink: 0;
  }

  .logo-nombre {
    font-size: 0.95rem;
    white-space: nowrap;
  }

  .logo-especialidad {
    font-size: 0.62rem;
    white-space: nowrap;
  }

  .nav-menu {
    display: none;
  }

  .navbar-acciones .btn {
    display: none;
  }

  .selector-idioma {
    margin-right: 0.25rem;
    flex-shrink: 0;
  }

  .btn-hamburguesa {
    display: flex;
    flex-shrink: 0;
  }

  /* Hero */
  .hero {
    padding: 7rem 0 4rem;
  }

  .hero-sellos {
    grid-template-columns: 1fr;
    gap: 1.25rem;
    max-width: 320px;
  }

  .sello-item {
    justify-content: flex-start;
  }

  .hero-scroll-indicator {
    display: none;
  }

  /* Estadísticas */
  .seccion-estadisticas {
    margin-top: -2rem;
  }

  .estadisticas-tarjeta {
    grid-template-columns: repeat(2, 1fr);
    padding: 2rem 1.5rem;
    gap: 1.5rem;
  }

  .estadistica-item:nth-child(2)::after {
    display: none;
  }

  /* Acreditaciones */
  .banda-acreditaciones {
    padding: 2.8rem 0;
  }

  .acreditaciones-logos-grid {
    gap: 2rem;
  }

  .acreditacion-logo-item {
    height: 80px;
  }

  .logo-amcper .acreditacion-logo-img {
    height: 68px;
    max-width: 160px;
  }

  .logo-isaps .acreditacion-logo-img {
    height: 92px;
    max-width: 185px;
  }

  .logo-american .acreditacion-logo-img {
    height: 80px;
    max-width: 120px;
  }

  .logo-asaps .acreditacion-logo-img {
    height: 68px;
    max-width: 160px;
  }

  .logo-aaaasfi .acreditacion-logo-img {
    height: 60px;
    max-width: 150px;
  }

  /* Sobre el Doctor */
  .doctor-grid {
    grid-template-columns: 1fr;
    gap: 3.5rem;
  }

  .doctor-imagen-columna {
    max-width: 440px;
    margin: 0 auto;
    width: 100%;
    padding: 0;
  }

  .doctor-foto {
    height: clamp(340px, 60vw, 440px);
  }

  .doctor-badge-experiencia {
    left: 0;
    right: 0;
    margin-left: auto;
    margin-right: auto;
    bottom: -15px;
    transform: none;
    width: max-content;
    max-width: calc(100% - 24px);
    padding: 0.75rem 1rem;
  }

  .doctor-badge-experiencia .badge-texto strong {
    font-size: 0.95rem;
  }

  .doctor-badge-experiencia .badge-texto span {
    font-size: 0.68rem;
  }

  .doctor-firma-caja {
    flex-direction: column;
    align-items: stretch;
    gap: 1rem;
    text-align: left;
  }

  .doctor-firma-caja .btn {
    width: 100%;
    text-align: center;
    justify-content: center;
  }

  /* Elementos Flotantes en móvil */
  .flotantes-contenedor {
    bottom: 1.25rem;
    right: 1.25rem;
    gap: 0.65rem;
  }

  .btn-volver-arriba,
  .btn-whatsapp-flotante {
    width: 44px;
    height: 44px;
  }

  .btn-volver-arriba {
    font-size: 1rem;
  }

  .btn-whatsapp-flotante {
    font-size: 1.4rem;
  }

  .whatsapp-tooltip {
    display: none;
  }

  /* Proceso */
  .proceso-timeline {
    grid-template-columns: repeat(2, 1fr);
    gap: 3rem 1.5rem;
  }

  .proceso-timeline::before {
    display: none;
  }

  .proceso-paso {
    padding-top: 2.5rem;
  }

  /* Credenciales */
  .credenciales-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  /* Contacto */
  .contacto-grid {
    grid-template-columns: 1fr;
    gap: 2.5rem;
  }

  .form-fila-doble {
    grid-template-columns: 1fr;
  }
}

/* ==========================================================================
   3. DISPOSITIVOS MÓVILES (Max-width: 640px)
   ========================================================================== */
@media (max-width: 640px) {
  :root {
    --seccion-padding-v: 4rem;
    --seccion-padding-h: 1.25rem;
  }

  /* Hero */
  .hero-titulo {
    font-size: 2.15rem;
  }

  .hero-botones {
    flex-direction: column;
    width: 100%;
  }

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

  .hero-eyebrow {
    font-size: 0.72rem;
    letter-spacing: 0.14em;
    padding: 0.35rem 0.9rem;
  }

  /* Estadísticas */
  .estadisticas-tarjeta {
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }

  .estadistica-item:not(:last-child)::after {
    display: none;
  }

  .estadistica-item:not(:last-child) {
    border-bottom: 1px solid var(--marfil-medio);
    padding-bottom: 1.25rem;
  }

  /* Acreditaciones */
  .banda-acreditaciones {
    padding: 2.4rem 0;
  }

  .acreditaciones-titulo {
    font-size: 1.35rem;
    gap: 0.75rem;
  }

  .acreditaciones-titulo::before,
  .acreditaciones-titulo::after {
    width: 22px;
  }

  .acreditaciones-logos-grid {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    gap: 1.5rem 2rem;
    width: 100%;
  }

  .acreditacion-logo-item {
    height: 70px;
  }

  .logo-amcper .acreditacion-logo-img {
    height: 58px;
    max-width: 140px;
  }

  .logo-isaps .acreditacion-logo-img {
    height: 78px;
    max-width: 160px;
  }

  .logo-american .acreditacion-logo-img {
    height: 68px;
    max-width: 105px;
  }

  .logo-asaps .acreditacion-logo-img {
    height: 58px;
    max-width: 140px;
  }

  .logo-aaaasfi .acreditacion-logo-img {
    height: 52px;
    max-width: 130px;
  }

  /* Procedimientos */
  .procedimientos-grid {
    grid-template-columns: 1fr;
  }

  .procedimientos-filtros {
    gap: 0.5rem;
  }

  .filtro-btn {
    padding: 0.45rem 1rem;
    font-size: 0.8rem;
  }

  /* Resultados Antes y Después */
  .resultados-grid {
    grid-template-columns: 1fr;
  }

  .comparador-slider {
    height: 280px;
  }

  /* Proceso */
  .proceso-timeline {
    grid-template-columns: 1fr;
    gap: 3.5rem;
  }

  /* Testimonios */
  .testimonio-contenido {
    padding: 2rem 1.25rem;
  }

  .testimonio-cita {
    font-size: 1rem;
  }

  /* Credenciales */
  .credenciales-grid {
    grid-template-columns: 1fr;
  }

  /* Formulario y Contacto */
  .formulario-tarjeta {
    padding: 2rem 1.25rem;
  }

  .contacto-info-tarjeta {
    padding: 2rem 1.25rem;
  }

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

  .footer-inferior {
    flex-direction: column;
    text-align: center;
    gap: 1.25rem;
  }

  .footer-legales {
    flex-direction: column;
    gap: 0.75rem;
  }

  /* Flotantes */
  .flotantes-contenedor {
    bottom: 1.25rem;
    right: 1.25rem;
  }

  .btn-whatsapp-flotante {
    width: 50px;
    height: 50px;
    font-size: 1.5rem;
  }

  .btn-volver-arriba {
    width: 40px;
    height: 40px;
    font-size: 0.9rem;
  }

  .whatsapp-tooltip {
    display: none;
  }
}
