/* ===== MEJORAS RESPONSIVAS Y MOBILE ===== */

/* Mejoras para tablets */
@media (max-width: 1024px) {
    .services-container {
        grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
        gap: 25px;
        padding: 30px 15px;
    }
    
    .staff-container {
        gap: 25px;
        padding: 30px 15px;
    }
    
    .staff-member {
        max-width: 300px;
        padding: 25px;
    }
}

/* Mejoras específicas para móviles */
@media (max-width: 768px) {
    /* Header mejorado para móvil */
    .header-container {
        padding: 10px 15px;
    }
    
    .logo {
        width: 180px;
    }
    
    /* Hero section optimizado */
    .text-content {
        padding: 15px;
        max-width: 95%;
    }
    
    .text-content h1 {
        font-size: 2rem;
        margin-bottom: 8px;
    }
    
    .text-content p {
        font-size: 1rem;
    }
    
    /* Staff cards móvil */
    .staff-container {
        flex-direction: column;
        align-items: center;
        gap: 20px;
        padding: 20px 10px;
    }
    
    .staff-member {
        width: 100%;
        max-width: 350px;
        padding: 20px;
    }
    
    .staff-photo {
        width: 100px;
        height: 100px;
    }
    
    /* Services cards móvil */
    .services-container {
        grid-template-columns: 1fr;
        gap: 20px;
        padding: 20px 10px;
    }
    
    .service-card {
        padding: 25px 20px;
        margin: 0 auto;
        max-width: 350px;
    }
    
    .service-card h3 {
        font-size: 1.3rem;
    }
    
    /* Modal móvil */
    .modal {
        width: 95%;
        padding: 25px;
        margin: 10px;
        max-height: 90vh;
        overflow-y: auto;
    }
    
    .modal h2 {
        font-size: 1.5rem;
    }
    
    .modal input, .modal select, .modal button[type="submit"] {
        padding: 12px;
        font-size: 16px; /* Evita zoom en iOS */
    }
    
    /* Progress bar móvil */
    .scroll-progress {
        height: 3px;
    }
    
    /* Back to top móvil */
    #back-to-top {
        width: 45px;
        height: 45px;
        bottom: 20px;
        right: 15px;
        font-size: 16px;
    }
    
    /* Sección de contacto móvil */
    .contact-container {
        padding: 20px 10px;
    }
    
    .map-container iframe {
        width: 100%;
        height: 250px;
    }
    
    .contact-info {
        padding: 20px;
        font-size: 0.95rem;
    }
    
    /* Footer móvil */
    footer {
        padding: 15px 10px;
    }
    
    footer .footer-logo {
        width: 40px;
    }
    
    footer p {
        font-size: 12px;
    }
}

/* Mejoras para pantallas muy pequeñas */
@media (max-width: 480px) {
    .text-content h1 {
        font-size: 1.8rem;
    }
    
    .text-content p {
        font-size: 0.95rem;
    }
    
    .staff-member {
        padding: 15px;
    }
    
    .staff-photo {
        width: 80px;
        height: 80px;
    }
    
    .service-card {
        padding: 20px 15px;
    }
    
    .modal {
        padding: 20px;
    }
    
    .btn-reserva {
        padding: 10px 20px;
        font-size: 0.9rem;
    }
}

/* Animaciones táctiles para móvil */
@media (max-width: 768px) {
    .staff-member:active {
        transform: scale(0.98);
    }
    
    .service-card:active {
        transform: scale(0.98);
    }
    
    .btn-reserva:active {
        transform: scale(0.95);
    }
    
    /* Mejoras de hover para touch devices */
    @media (hover: none) {
        .staff-member:hover,
        .service-card:hover {
            transform: none;
            box-shadow: none;
        }
        
        .staff-member:active {
            transform: scale(0.98);
            transition: transform 0.1s ease;
        }
        
        .service-card:active {
            transform: scale(0.98);
            transition: transform 0.1s ease;
        }
    }
}

/* Mejoras de accesibilidad */
@media (prefers-contrast: high) {
    .staff-member,
    .service-card {
        border-width: 2px;
        border-color: var(--primary-color);
    }
    
    .modal {
        border: 2px solid var(--primary-color);
    }
}

/* Orientación landscape en móviles */
@media (max-width: 768px) and (orientation: landscape) {
    .text-content {
        padding: 10px;
    }
    
    .text-content h1 {
        font-size: 1.6rem;
    }
    
    .text-content p {
        font-size: 0.9rem;
    }
    
    .slider-controls {
        width: 35px;
        height: 35px;
        font-size: 14px;
    }
    
    .slider-indicators {
        bottom: 15px;
    }
}

/* Dark mode support */
@media (prefers-color-scheme: dark) {
    :root {
        --background-color: #000;
        --white-color: #fff;
    }
}

/* Mejoras de performance para móvil */
@media (max-width: 768px) {
    * {
        -webkit-tap-highlight-color: transparent;
    }
    
    .parallax-element {
        transform: none !important; /* Desactivar parallax en móvil para mejor performance */
    }
    
    .staff-member,
    .service-card {
        will-change: transform;
    }
}

/* Estilos para PWA */
@media (display-mode: standalone) {
    body {
        padding-top: env(safe-area-inset-top);
        padding-bottom: env(safe-area-inset-bottom);
    }
    
    .header-container {
        padding-top: calc(15px + env(safe-area-inset-top));
    }
}