/* ============================================
   RESPONSIVE.CSS - Media queries específicas
   ============================================ */

/* ===== MOBILE FIRST ===== */

/* Pantallas pequeñas (móviles) */
@media (max-width: 640px) {
    /* Ajustes generales */
    .container {
        padding: 0 var(--spacing-4);
    }
    
    /* Hero */
    .hero {
        min-height: 70vh;
        padding: var(--spacing-8) 0;
    }
    
    .hero-title {
        font-size: var(--font-size-3xl);
    }
    
    .hero-subtitle {
        font-size: var(--font-size-lg);
    }
    
    .hero-features {
        flex-direction: column;
        align-items: center;
    }
    
    .hero-buttons {
        flex-direction: column;
        align-items: stretch;
    }
    
    /* Header mobile */
    .nav-toggle {
        display: block;
    }
    
    .nav-menu {
        display: none;
    }
    
    .header-cta .btn {
        display: none;
    }
    
    /* Grids */
    .servicios-grid,
    .razones-grid,
    .testimonios-grid,
    .blog-grid {
        grid-template-columns: 1fr;
        gap: var(--spacing-6);
    }
    
    /* Footer */
    .footer-grid {
        grid-template-columns: 1fr;
        text-align: center;
    }
    
    .footer-col h3::after {
        left: 50%;
        transform: translateX(-50%);
    }
    
    .footer-contact p {
        justify-content: center;
    }
    
    .footer-social {
        justify-content: center;
    }
    
    /* Formularios */
    .contacto-grid {
        grid-template-columns: 1fr;
    }
    
    /* Botones WhatsApp */
    .whatsapp-float {
        bottom: 20px;
        right: 20px;
        width: 50px;
        height: 50px;
        font-size: var(--font-size-xl);
    }
    
    .back-to-top {
        bottom: 80px;
        right: 20px;
        width: 40px;
        height: 40px;
    }
}

/* ===== TABLETS ===== */
@media (min-width: 641px) and (max-width: 768px) {
    .container {
        padding: 0 var(--spacing-6);
    }
    
    .hero-title {
        font-size: var(--font-size-4xl);
    }
    
    .servicios-grid,
    .razones-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .testimonios-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .blog-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .footer-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    /* Header tablet */
    .nav-toggle {
        display: block;
    }
    
    .nav-menu {
        display: none;
    }
}

/* ===== TABLETS GRANDES ===== */
@media (min-width: 769px) and (max-width: 1024px) {
    .container {
        padding: 0 var(--spacing-8);
    }
    
    .servicios-grid,
    .razones-grid {
        grid-template-columns: repeat(3, 1fr);
    }
    
    .testimonios-grid {
        grid-template-columns: repeat(3, 1fr);
    }
    
    .blog-grid {
        grid-template-columns: repeat(3, 1fr);
    }
    
    .footer-grid {
        grid-template-columns: repeat(3, 1fr);
    }
    
    /* Header desktop visible */
    .nav-toggle {
        display: none;
    }
    
    .nav-menu {
        display: flex;
    }
    
    .mobile-menu,
    .menu-overlay {
        display: none !important;
    }
}

/* ===== DESKTOP ===== */
@media (min-width: 1025px) {
    /* Header siempre visible */
    .nav-toggle {
        display: none;
    }
    
    .nav-menu {
        display: flex;
    }
    
    .mobile-menu,
    .menu-overlay {
        display: none !important;
    }
    
    /* Ajustes específicos para desktop */
    .hero-title {
        font-size: var(--font-size-5xl);
    }
    
    .servicios-grid {
        grid-template-columns: repeat(4, 1fr);
    }
    
    .razones-grid {
        grid-template-columns: repeat(3, 1fr);
    }
    
    .footer-grid {
        grid-template-columns: 2fr 1fr 1fr 1.5fr;
    }
}

/* ===== DESKTOP GRANDE ===== */
@media (min-width: 1281px) {
    .container {
        max-width: var(--breakpoint-xl);
    }
    
    .hero-title {
        font-size: var(--font-size-6xl);
    }
}

/* ===== IMPRESIÓN ===== */
@media print {
    .header,
    .footer,
    .whatsapp-float,
    .back-to-top,
    .hero-buttons,
    .nav-toggle {
        display: none !important;
    }
    
    body {
        color: #000;
        background: #fff;
        font-size: 12pt;
    }
    
    .container {
        max-width: 100%;
        padding: 0;
    }
    
    a {
        color: #000;
        text-decoration: none;
    }
    
    .hero {
        background: none !important;
        color: #000;
        min-height: auto;
        padding: 1rem 0;
    }
    
    .hero-title,
    .section-title {
        color: #000;
        text-shadow: none;
    }
    
    .servicio-card,
    .testimonio-card,
    .blog-articulo {
        box-shadow: none;
        border: 1px solid #ddd;
        page-break-inside: avoid;
    }
    
    /* Evitar que se corten elementos importantes */
    .servicios-grid,
    .testimonios-grid {
        break-inside: avoid;
    }
}

/* ===== ALTA DENSIDAD DE PÍXELES ===== */
@media (-webkit-min-device-pixel-ratio: 2), (min-resolution: 192dpi) {
    .logo img {
        image-rendering: -webkit-optimize-contrast;
        image-rendering: crisp-edges;
    }
}

/* ===== ORIENTACIÓN ===== */
@media (orientation: portrait) {
    .hero {
        min-height: 100vh;
    }
}

@media (orientation: landscape) and (max-height: 500px) {
    .hero {
        min-height: 150vh;
    }
    
    .hero-title {
        font-size: var(--font-size-3xl);
    }
}

/* ===== PREFERENCIAS DE USUARIO ===== */
@media (prefers-reduced-motion: reduce) {
    .servicio-card,
    .razon,
    .testimonio-card,
    .blog-articulo {
        animation: none !important;
        transition: none !important;
    }
    
    .whatsapp-float {
        animation: none !important;
    }
}

@media (prefers-contrast: high) {
    .btn-primary,
    .btn-secondary {
        border: 3px solid #000;
    }
    
    .nav-menu .active::after {
        height: 3px;
    }
}

@media (prefers-color-scheme: dark) {
    /* Se maneja en variables.css */
}