/* =========================================
   CORRECCIONES RESPONSIVE PARA MÓVILES
   =========================================
   Este archivo mejora la visualización en dispositivos móviles
   IMPORTANTE: Este archivo debe cargarse DESPUÉS de style.css
   ========================================= */

/* ===== OVERLAY OSCURO PARA MENÚ MÓVIL ===== */
.menu-overlay {
    display: none !important;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    z-index: 999;
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

.menu-overlay.active {
    display: block !important;
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
}

/* ===== AJUSTES GENERALES PARA MÓVILES ===== */
@media (max-width: 768px) {

    /* Prevenir scroll cuando el menú está abierto */
    body.menu-open {
        overflow: hidden;
        position: fixed;
        width: 100%;
    }

    /* Ajustes de body - selector específico */
    body {
        font-size: 14px;
        overflow-x: hidden;
    }

    /* Espaciado general - selector más específico */
    main section,
    body>section,
    .hero+section {
        padding: 60px 1rem;
    }

    /* Títulos más pequeños - selectores específicos */
    .hero h1,
    section h1,
    #inicio h1 {
        font-size: 1.8rem;
        line-height: 1.3;
    }

    .section-title,
    section h2,
    #nosotros h2,
    #servicios h2 {
        font-size: 1.5rem;
    }

    section h3,
    .about-card h3 {
        font-size: 1.2rem;
    }

    /* HEADER Y NAVEGACIÓN - selectores más específicos */
    header {
        padding: 0.75rem 0;
        position: relative;
        z-index: 1001;
    }

    /* Nav - solo en móvil, más específico */
    header nav {
        padding-left: 1rem;
        padding-right: 1rem;
        gap: 1rem;
        position: relative;
    }

    .logo img.logo-img,
    header .logo .logo-img {
        max-height: 40px;
        width: auto;
    }

    header .logo .logo-text {
        font-size: 1rem;
    }

    /* MEJORAS AL MENÚ MÓVIL - refuerzo de reglas ya corregidas en style.css */
    /* ASEGURAR QUE EL MENÚ ESTÉ OCULTO POR DEFECTO */
    header nav .nav-links:not(.active),
    nav:not(.active) .nav-links,
    header nav:not(.active) .nav-links {
        right: -100% !important;
        opacity: 0 !important;
        visibility: hidden !important;
        pointer-events: none !important;
    }

    header nav .user-actions:not(.active),
    nav:not(.active) .user-actions,
    header nav:not(.active) .user-actions {
        opacity: 0 !important;
        visibility: hidden !important;
        pointer-events: none !important;
    }

    /* NAV-LINKS - MENÚ COMPLETO cuando está activo - RESPONSIVE ESTABLE */
    /* ALTURA AJUSTADA: Ocupa toda la altura visible sin scroll partido */
    header nav.active .nav-links,
    nav.active .nav-links {
        display: flex !important;
        flex-direction: column !important;
        background: linear-gradient(135deg, var(--azul-electrico) 0%, var(--azul-oscuro) 100%) !important;
        box-shadow: -5px 0 30px rgba(0, 0, 0, 0.5) !important;
        right: 0 !important;
        opacity: 1 !important;
        visibility: visible !important;
        pointer-events: auto !important;
        /* ANCHO RESPONSIVE ESTABLE: Se adapta sin desbordarse */
        width: min(90vw, 380px) !important;
        /* Usa el menor entre 90vw y 380px */
        max-width: 380px !important;
        /* Aumentado de 350px para evitar corte de texto largo */
        min-width: min(300px, 85vw) !important;
        /* Mínimo adaptativo */
        /* ALTURA: Ocupa toda la pantalla como app móvil, sin scroll partido */
        height: 100vh !important;
        /* Altura completa del viewport */
        max-height: 100vh !important;
        /* Nunca exceder la altura visible */
        overflow-x: hidden !important;
        /* Evitar scroll horizontal */
        overflow-y: auto !important;
        /* Scroll interno si es necesario */
        word-wrap: normal !important;
        overflow-wrap: normal !important;
        box-sizing: border-box !important;
        /* Incluir padding en el cálculo del ancho */
        /* Asegurar que el scroll sea interno, no de la página */
        position: fixed !important;
        top: 0 !important;
        z-index: 1000 !important;
    }

    /* USER-ACTIONS - SOLO visible cuando hay usuario autenticado */
    /* Si no hay usuario autenticado, los botones están dentro de nav-links */
    header nav.active .user-actions:has(.user-menu-wrapper),
    nav.active .user-actions:has(.user-menu-wrapper) {
        display: flex !important;
        flex-direction: column !important;
        right: auto !important;
        opacity: 1 !important;
        visibility: visible !important;
        pointer-events: auto !important;
        width: 100% !important;
        max-width: 100% !important;
        position: relative !important;
        margin-top: 1rem !important;
    }

    /* OCULTAR el cuadro negro con Registrarse/Iniciar Sesión en móvil */
    .guest-actions,
    .user-actions .guest-actions,
    header .guest-actions,
    nav .guest-actions,
    #userActions .guest-actions {
        display: none !important;
        visibility: hidden !important;
        opacity: 0 !important;
        pointer-events: none !important;
    }

    /* MEJORAR ESTILO DE LOS ENLACES DEL MENÚ */
    header nav.active .nav-links a {
        font-size: 1.1rem !important;
        padding: 1.1rem 1.5rem !important;
        margin: 0.5rem 0 !important;
        background: rgba(255, 255, 255, 0.1) !important;
        border: 2px solid rgba(255, 255, 255, 0.2) !important;
        border-radius: 12px !important;
        transition: all 0.3s ease !important;
        display: block !important;
        width: 100% !important;
        min-width: 100% !important;
        text-align: left !important;
        white-space: nowrap !important;
        /* Texto completo en una línea */
        overflow: visible !important;
        /* Mostrar todo el texto */
        text-overflow: clip !important;
        /* No cortar con ellipsis */
        word-wrap: normal !important;
        /* No dividir palabras */
        max-width: 100% !important;
        box-sizing: border-box !important;
    }

    header nav.active .nav-links a:hover,
    header nav.active .nav-links a:active,
    header nav.active .nav-links a:focus {
        background: rgba(255, 215, 0, 0.25) !important;
        border-color: var(--amarillo) !important;
        transform: translateX(8px) !important;
        box-shadow: 0 4px 12px rgba(255, 215, 0, 0.3) !important;
    }

    /* MEJORAR LISTA DEL MENÚ */
    header nav.active .nav-links li {
        width: 100% !important;
        min-width: 100% !important;
        margin: 0 !important;
        list-style: none !important;
        overflow: visible !important;
    }

    /* ASEGURAR QUE EL CONTENEDOR NAV-LINKS NO CORTE EL TEXTO */
    header nav.active .nav-links {
        word-wrap: normal !important;
        overflow-wrap: normal !important;
    }

    /* ENLACES DEL MENÚ - RESPONSIVE SIN DESBORDAMIENTO */
    header nav.active .nav-links a,
    nav.active .nav-links a {
        /* Mantener texto en una línea pero ajustarse al contenedor */
        white-space: nowrap !important;
        /* Mantener en una línea si es posible */
        overflow: hidden !important;
        /* Ocultar desbordamiento */
        text-overflow: ellipsis !important;
        /* Mostrar "..." si el texto es demasiado largo */
        width: 100% !important;
        min-width: 0 !important;
        /* Permitir que se encoja si es necesario */
        max-width: 100% !important;
        word-wrap: normal !important;
        overflow-wrap: normal !important;
        word-break: keep-all !important;
        /* No dividir palabras */
        box-sizing: border-box !important;
        /* Incluir padding y border en el ancho */
        padding-left: 1.25rem !important;
        /* Reducido de 1.5rem para dar más espacio */
        padding-right: 1.25rem !important;
    }

    /* ASEGURAR QUE LOS LI NO LIMITEN EL ANCHO */
    header nav.active .nav-links li,
    nav.active .nav-links li {
        width: 100% !important;
        min-width: 100% !important;
        overflow: visible !important;
    }

    /* BOTONES DE AUTENTICACIÓN DENTRO DE NAV-LINKS (mismo estilo que otros items) */
    header nav.active .nav-links .menu-auth-buttons {
        display: block !important;
        /* Mostrar en móvil (ocultos por defecto en style.css) */
        margin-top: 0.5rem !important;
        margin-bottom: 0 !important;
        width: 100% !important;
    }

    /* Botón "Registrarse" dentro del menú - Estilo destacado pero consistente */
    header nav.active .nav-links .menu-btn-register {
        display: block !important;
        width: 100% !important;
        padding: 1.1rem 1.5rem !important;
        margin: 0.5rem 0 !important;
        text-align: left !important;
        font-size: 1.1rem !important;
        font-weight: 700 !important;
        background: linear-gradient(135deg, var(--amarillo) 0%, #FFC107 100%) !important;
        color: var(--azul-oscuro) !important;
        border: 2px solid var(--amarillo) !important;
        border-radius: 12px !important;
        box-shadow: 0 4px 12px rgba(255, 215, 0, 0.3) !important;
        transition: all 0.3s ease !important;
        box-sizing: border-box !important;
        white-space: nowrap !important;
        overflow: hidden !important;
        text-overflow: ellipsis !important;
        min-height: 44px !important;
    }

    header nav.active .nav-links .menu-btn-register:hover,
    header nav.active .nav-links .menu-btn-register:active,
    header nav.active .nav-links .menu-btn-register:focus {
        background: linear-gradient(135deg, #FFC107 0%, var(--amarillo) 100%) !important;
        transform: translateX(8px) !important;
        box-shadow: 0 6px 20px rgba(255, 215, 0, 0.5) !important;
    }

    /* Botón "Iniciar Sesion" dentro del menú - Estilo consistente con otros items */
    header nav.active .nav-links .menu-btn-login {
        display: block !important;
        width: 100% !important;
        padding: 1.1rem 1.5rem !important;
        margin: 0.5rem 0 !important;
        text-align: left !important;
        font-size: 1.1rem !important;
        font-weight: 600 !important;
        background: rgba(255, 255, 255, 0.1) !important;
        color: white !important;
        border: 2px solid rgba(255, 255, 255, 0.2) !important;
        border-radius: 12px !important;
        box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2) !important;
        transition: all 0.3s ease !important;
        box-sizing: border-box !important;
        white-space: nowrap !important;
        overflow: hidden !important;
        text-overflow: ellipsis !important;
        min-height: 44px !important;
    }

    header nav.active .nav-links .menu-btn-login:hover,
    header nav.active .nav-links .menu-btn-login:active,
    header nav.active .nav-links .menu-btn-login:focus {
        background: rgba(255, 215, 0, 0.25) !important;
        border-color: var(--amarillo) !important;
        transform: translateX(8px) !important;
        box-shadow: 0 4px 12px rgba(255, 215, 0, 0.3) !important;
    }

    /* GUEST-ACTIONS - OCULTAR en móvil (esta regla sobrescribe la anterior) */
    header nav.active .guest-actions {
        display: none !important;
        visibility: hidden !important;
        opacity: 0 !important;
    }

    /* Botón "Registrarse" - Estilo destacado - RESPONSIVE */
    header nav.active .btn-nav-register {
        width: 100% !important;
        text-align: center !important;
        padding: 1rem 1rem !important;
        /* Reducido ligeramente de 1.5rem a 1rem para dar más espacio al texto */
        font-size: 1rem !important;
        /* Ligeramente reducido de 1.05rem para que quepa mejor */
        border-radius: 12px !important;
        transition: all 0.3s ease !important;
        font-weight: 700 !important;
        background: linear-gradient(135deg, var(--amarillo) 0%, #FFC107 100%) !important;
        color: var(--azul-oscuro) !important;
        border: 2px solid var(--amarillo) !important;
        box-shadow: 0 4px 12px rgba(255, 215, 0, 0.3) !important;
        box-sizing: border-box !important;
        /* Incluir padding y border en el ancho */
        white-space: normal !important;
        /* Permitir wrap si es necesario */
        word-wrap: break-word !important;
        /* Permitir romper palabras largas */
        overflow-wrap: break-word !important;
        min-height: 44px !important;
        /* Mínimo touch-friendly */
        display: flex !important;
        align-items: center !important;
        justify-content: center !important;
    }

    header nav.active .btn-nav-register:hover,
    header nav.active .btn-nav-register:active {
        transform: translateY(-3px) !important;
        box-shadow: 0 6px 20px rgba(255, 215, 0, 0.5) !important;
        background: linear-gradient(135deg, #FFC107 0%, var(--amarillo) 100%) !important;
    }

    /* Botón "Iniciar Sesión" - Estilo secundario - RESPONSIVE */
    header nav.active .btn-nav-login {
        width: 100% !important;
        text-align: center !important;
        padding: 1rem 1rem !important;
        /* Reducido ligeramente de 1.5rem a 1rem para dar más espacio al texto */
        font-size: 1rem !important;
        /* Ligeramente reducido de 1.05rem para que quepa mejor */
        border-radius: 12px !important;
        transition: all 0.3s ease !important;
        font-weight: 700 !important;
        background: rgba(255, 255, 255, 0.15) !important;
        color: white !important;
        border: 2px solid rgba(255, 255, 255, 0.4) !important;
        box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2) !important;
        box-sizing: border-box !important;
        /* Incluir padding y border en el ancho */
        white-space: normal !important;
        /* Permitir wrap si es necesario */
        word-wrap: break-word !important;
        /* Permitir romper palabras largas */
        overflow-wrap: break-word !important;
        min-height: 44px !important;
        /* Mínimo touch-friendly */
        display: flex !important;
        align-items: center !important;
        justify-content: center !important;
    }

    header nav.active .btn-nav-login:hover,
    header nav.active .btn-nav-login:active {
        transform: translateY(-3px) !important;
        background: rgba(255, 255, 255, 0.25) !important;
        border-color: rgba(255, 255, 255, 0.6) !important;
        box-shadow: 0 4px 12px rgba(255, 255, 255, 0.3) !important;
    }

    /* User menu button cuando está autenticado */
    header nav.active .user-menu-button {
        width: 100% !important;
        padding: 1rem 1.5rem !important;
        background: rgba(255, 255, 255, 0.1) !important;
        border: 2px solid rgba(255, 255, 255, 0.2) !important;
        border-radius: 12px !important;
        color: white !important;
        font-weight: 600 !important;
    }

    /* Botón de cerrar en el menú - MEJORADO */
    header nav .menu-close-btn {
        position: absolute !important;
        top: 1.2rem !important;
        right: 1.2rem !important;
        background: rgba(255, 255, 255, 0.2) !important;
        border: 2px solid rgba(255, 255, 255, 0.3) !important;
        color: white !important;
        font-size: 1.5rem !important;
        width: 45px !important;
        height: 45px !important;
        border-radius: 50% !important;
        cursor: pointer !important;
        display: flex !important;
        align-items: center !important;
        justify-content: center !important;
        z-index: 1002 !important;
        transition: all 0.3s ease !important;
        box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2) !important;
    }

    header nav .menu-close-btn:hover,
    header nav .menu-close-btn:active {
        background: rgba(255, 215, 0, 0.3) !important;
        border-color: var(--amarillo) !important;
        transform: rotate(90deg) scale(1.1) !important;
        box-shadow: 0 4px 12px rgba(255, 215, 0, 0.4) !important;
    }

    /* HERO SECTION - selectores específicos */
    section.hero {
        padding: 100px 1rem 60px;
        min-height: auto;
    }

    section.hero h1,
    .hero h1 {
        font-size: 1.75rem;
        margin-bottom: 0.75rem;
    }

    section.hero p,
    .hero p {
        font-size: 0.95rem;
        margin-bottom: 1.5rem;
    }

    .hero-inner h1 {
        font-size: 1.8rem;
    }

    /* BOTONES - selectores específicos */
    .hero .cta-button,
    section button[type="submit"],
    .hero .btn-primary {
        padding: 0.75rem 1.5rem;
        font-size: 0.9rem;
        width: 100%;
        max-width: 300px;
        margin: 0 auto;
        display: block;
    }

    /* GRIDS Y CONTENEDORES - selectores específicos */
    section .services-grid,
    section .catalog-grid,
    section .combos-grid,
    section .gallery-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }

    /* TARJETAS */
    section .service-card,
    section .catalog-item,
    section .combo-card,
    section .gallery-item {
        width: 100%;
        max-width: 100%;
        margin: 0 auto;
    }

    /* MODALES - solo necesitamos algunos !important aquí */
    .modal-content,
    .cart-modal-content,
    .catalog-modal-content {
        width: 95%;
        max-width: 95%;
        margin: 5% auto;
        padding: 1.5rem;
    }

    /* FORMULARIOS - el font-size 16px es necesario para evitar zoom en iOS */
    form input[type="text"],
    form input[type="email"],
    form input[type="tel"],
    form input[type="number"],
    form input[type="date"],
    form input[type="time"],
    form textarea,
    form select {
        font-size: 16px;
        /* Necesario para evitar zoom en iOS */
        width: 100%;
        padding: 0.75rem;
    }

    /* IMÁGENES - solo ajustes básicos */
    section img,
    .gallery-item img {
        max-width: 100%;
        height: auto;
    }

    .gallery-item img {
        object-fit: cover;
        height: 250px;
    }

    /* COTIZADOR - selector específico (móvil siempre 1 columna) */
    .quote__grid {
        grid-template-columns: 1fr;
        gap: 1rem;
    }

    .cotizador-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }

    .cotizador-form {
        padding: 1.5rem;
    }

    /* FOOTER - selector específico */
    footer {
        padding: 2rem 1rem;
        text-align: center;
    }

    footer .footer-content {
        flex-direction: column;
        gap: 1.5rem;
    }

    /* WHATSAPP FLOAT - selector específico */
    .whatsapp-float {
        width: 50px;
        height: 50px;
        font-size: 1.3rem;
        bottom: 15px;
        right: 15px;
    }

    /* CHATBOT - selector específico */
    .chat-button {
        width: 50px;
        height: 50px;
        bottom: 15px;
        right: 75px;
        font-size: 1.3rem;
    }

    .chat-window {
        width: calc(100vw - 20px);
        height: calc(100vh - 100px);
        right: 10px;
        bottom: 80px;
        max-width: 100%;
    }

    /* TABLAS */
    section table {
        font-size: 0.85rem;
        display: block;
        overflow-x: auto;
        white-space: nowrap;
    }

    /* ESPACIOS */
    section .container,
    section .wrapper {
        padding-left: 1rem;
        padding-right: 1rem;
        max-width: 100%;
    }
}

/* ===== AJUSTES PARA PANTALLAS MUY PEQUEÑAS ===== */
@media (max-width: 480px) {

    body {
        font-size: 13px;
    }

    main section,
    body>section {
        padding: 40px 0.75rem;
    }

    .hero h1,
    section h1 {
        font-size: 1.5rem;
    }

    .section-title,
    section h2 {
        font-size: 1.3rem;
    }

    section.hero {
        padding: 80px 0.75rem 50px;
    }

    header .logo .logo-text {
        display: none;
    }

    header .logo img.logo-img {
        max-height: 35px;
    }

    @media (max-width: 480px) {
        header nav {
            padding-left: 0.75rem;
            padding-right: 0.75rem;
        }
    }

    .whatsapp-float,
    .chat-button {
        width: 45px;
        height: 45px;
        font-size: 1.2rem;
        bottom: 10px;
    }

    .chat-button {
        right: 65px;
    }

    section button,
    section .btn {
        font-size: 0.85rem;
        padding: 0.6rem 1.2rem;
    }

    .modal-content,
    .cart-modal-content {
        padding: 1rem;
        margin: 2% auto;
    }
}

/* ===== CORRECCIONES ESPECÍFICAS ===== */

/* Evitar zoom automático en inputs en iOS - ESTE SÍ necesita !important */
@media (max-width: 768px) {

    input[type="text"],
    input[type="email"],
    input[type="tel"],
    input[type="number"],
    input[type="date"],
    input[type="time"],
    textarea,
    select {
        font-size: 16px !important;
        /* Necesario para evitar zoom en iOS */
    }
}

/* Asegurar que todo quepa en la pantalla */
@media (max-width: 768px) {
    section * {
        max-width: 100%;
    }

    section img,
    section video,
    section iframe {
        max-width: 100%;
        height: auto;
    }
}

/* ===== PREVENIR DESBORDAMIENTO HORIZONTAL GLOBAL ===== */
@media (max-width: 768px) {

    html,
    body {
        overflow-x: hidden !important;
        width: 100% !important;
        max-width: 100vw !important;
        /* Nunca exceder el ancho del viewport */
        position: relative;
    }

    /* Asegurar que todos los contenedores principales respeten el ancho */
    * {
        max-width: 100% !important;
        /* Prevenir que cualquier elemento exceda el contenedor */
        box-sizing: border-box;
        /* Incluir padding y border en el ancho */
    }

    /* Excepciones: elementos que necesitan su ancho natural pero dentro de su contenedor */
    img,
    video,
    iframe,
    embed,
    object {
        max-width: 100% !important;
        height: auto !important;
    }

    /* Prevenir tablas de causar scroll horizontal */
    table {
        width: 100% !important;
        display: block !important;
        overflow-x: auto !important;
        -webkit-overflow-scrolling: touch;
    }

    /* Prevenir formularios de desbordarse */
    form {
        max-width: 100% !important;
        width: 100% !important;
    }

    input,
    textarea,
    select,
    button {
        max-width: 100% !important;
        box-sizing: border-box !important;
    }
}

/* =========================================
   MEJORAS ADICIONALES PARA MÓVIL
   ========================================= */

@media (max-width: 768px) {

    /* ===== TARJETAS DE PRODUCTOS (CATALOG-ITEM) ===== */
    .catalog-item {
        padding: 1.25rem !important;
        margin-bottom: 1.5rem !important;
        border-radius: 20px !important;
        box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1) !important;
    }

    .catalog-item-image {
        height: 220px !important;
        margin-bottom: 1rem !important;
        border-radius: 15px !important;
        overflow: hidden !important;
    }

    .catalog-item h3 {
        font-size: 1.4rem !important;
        margin-bottom: 0.75rem !important;
        line-height: 1.3 !important;
    }

    .catalog-item p {
        font-size: 0.95rem !important;
        line-height: 1.5 !important;
        margin-bottom: 1rem !important;
    }

    /* Botones de productos más grandes para touch */
    .catalog-item-btn {
        min-height: 48px !important;
        padding: 0.85rem 1.5rem !important;
        font-size: 1rem !important;
        font-weight: 600 !important;
        border-radius: 12px !important;
        margin-top: 1rem !important;
    }

    /* ===== TARJETAS DE COMBOS (COMBO-CARD) ===== */
    .combo-card {
        margin-bottom: 2rem !important;
        border-radius: 20px !important;
    }

    .combo-image {
        height: 220px !important;
    }

    .combo-content {
        padding: 1.5rem !important;
    }

    .combo-content h3 {
        font-size: 1.5rem !important;
        margin-bottom: 0.75rem !important;
    }

    .combo-description {
        font-size: 0.95rem !important;
        line-height: 1.5 !important;
        margin-bottom: 1.25rem !important;
    }

    .combo-includes {
        margin-bottom: 1.5rem !important;
    }

    .combo-includes li {
        padding: 0.7rem 0 !important;
        font-size: 0.95rem !important;
    }

    .combo-includes i {
        font-size: 1.1rem !important;
    }

    .combo-price {
        width: 80px !important;
        height: 80px !important;
        font-size: 1.4rem !important;
        padding: 0.7rem !important;
        bottom: 15px !important;
        right: 15px !important;
    }

    .combo-badge {
        font-size: 0.85rem !important;
        padding: 0.4rem 0.9rem !important;
        top: 15px !important;
        left: 15px !important;
    }

    .combo-note {
        padding: 1.25rem !important;
        font-size: 0.9rem !important;
    }

    .combo-note i {
        font-size: 1.3rem !important;
    }

    /* ===== TARJETAS DE SERVICIOS (SERVICE-CARD) ===== */
    .service-card {
        padding: 1.75rem !important;
        min-height: 280px !important;
        margin-bottom: 1.5rem !important;
    }

    .service-card .service-icon {
        font-size: 3.5rem !important;
        margin-bottom: 1.25rem !important;
    }

    .service-card .service-icon .emoji-icon {
        font-size: 4rem !important;
    }

    .service-card h3 {
        font-size: 1.4rem !important;
        margin-bottom: 1rem !important;
    }

    .service-card p {
        font-size: 0.95rem !important;
        line-height: 1.5 !important;
        margin-bottom: 1.5rem !important;
    }

    /* ===== BOTONES GENERALES - TOUCH-FRIENDLY ===== */
    button,
    .btn,
    .btn-primary,
    .btn-secondary,
    input[type="submit"],
    input[type="button"] {
        min-height: 44px !important;
        padding: 0.75rem 1.5rem !important;
        font-size: 1rem !important;
        font-weight: 600 !important;
        border-radius: 12px !important;
        touch-action: manipulation !important;
        -webkit-tap-highlight-color: rgba(0, 0, 0, 0.1) !important;
    }

    .cta-button,
    .hero .cta-button {
        min-height: 50px !important;
        padding: 0.9rem 2rem !important;
        font-size: 1.05rem !important;
    }

    /* ===== FORMULARIOS MEJORADOS ===== */
    form {
        padding: 1.5rem !important;
    }

    .form-group {
        margin-bottom: 1.5rem !important;
    }

    label {
        font-size: 1rem !important;
        font-weight: 600 !important;
        margin-bottom: 0.5rem !important;
        display: block !important;
    }

    input[type="text"],
    input[type="email"],
    input[type="tel"],
    input[type="number"],
    input[type="date"],
    input[type="time"],
    input[type="password"],
    textarea,
    select {
        min-height: 48px !important;
        padding: 0.85rem 1rem !important;
        font-size: 16px !important;
        /* Evita zoom en iOS */
        border-radius: 10px !important;
        border: 2px solid #ddd !important;
        width: 100% !important;
        box-sizing: border-box !important;
    }

    textarea {
        min-height: 120px !important;
        resize: vertical !important;
    }

    input:focus,
    textarea:focus,
    select:focus {
        border-color: var(--azul-electrico) !important;
        outline: none !important;
        box-shadow: 0 0 0 3px rgba(0, 102, 255, 0.1) !important;
    }

    /* ===== MODALES MEJORADOS ===== */
    .catalog-modal-content {
        width: 95% !important;
        max-width: 95% !important;
        margin: 3% auto !important;
        padding: 0 !important;
        max-height: 95vh !important;
        border-radius: 20px !important;
    }

    .catalog-header {
        padding: 1.5rem !important;
        border-radius: 20px 20px 0 0 !important;
    }

    .catalog-header h2 {
        font-size: 1.5rem !important;
    }

    .close-catalog {
        width: 44px !important;
        height: 44px !important;
        font-size: 2rem !important;
        min-height: 44px !important;
    }

    .catalog-body {
        padding: 1.5rem !important;
    }

    /* ===== GALERÍA DE IMÁGENES ===== */
    .gallery-item {
        margin-bottom: 1.5rem !important;
        border-radius: 15px !important;
        overflow: hidden !important;
    }

    .gallery-item img {
        height: 250px !important;
        object-fit: cover !important;
    }

    /* ===== ESPACIADO MEJORADO ===== */
    .container,
    .wrapper {
        padding-left: 1rem !important;
        padding-right: 1rem !important;
    }

    section {
        padding-top: 3rem !important;
        padding-bottom: 3rem !important;
    }

    /* ===== MEJORAS DE LEGIBILIDAD ===== */
    p {
        line-height: 1.6 !important;
    }

    h1,
    h2,
    h3,
    h4,
    h5,
    h6 {
        line-height: 1.3 !important;
    }

    /* ===== FOOTER MEJORADO ===== */
    footer {
        padding: 2.5rem 1rem !important;
        font-size: 0.9rem !important;
    }

    footer .footer-content {
        gap: 2rem !important;
    }

    footer h4 {
        font-size: 1.2rem !important;
        margin-bottom: 1rem !important;
    }

    footer a,
    footer p {
        font-size: 0.9rem !important;
        line-height: 1.6 !important;
    }
}

/* ===== PANTALLAS MUY PEQUEÑAS (480px) ===== */
@media (max-width: 480px) {

    /* Tarjetas más compactas */
    .catalog-item,
    .combo-card,
    .service-card {
        padding: 1rem !important;
        margin-bottom: 1.25rem !important;
    }

    .catalog-item-image,
    .combo-image {
        height: 200px !important;
    }

    /* Títulos más pequeños */
    .catalog-item h3,
    .combo-content h3,
    .service-card h3 {
        font-size: 1.25rem !important;
    }

    /* Botones ligeramente más pequeños pero aún touch-friendly */
    button,
    .btn,
    .catalog-item-btn {
        min-height: 44px !important;
        padding: 0.7rem 1.25rem !important;
        font-size: 0.95rem !important;
    }

    /* Modales más pequeños */
    .catalog-modal-content {
        width: 98% !important;
        max-width: 98% !important;
        margin: 1% auto !important;
    }

    .catalog-header,
    .catalog-body {
        padding: 1.25rem !important;
    }

    /* Secciones más compactas */
    section {
        padding-top: 2.5rem !important;
        padding-bottom: 2.5rem !important;
    }

    /* Hero más compacto */
    section.hero {
        padding: 80px 0.75rem 50px !important;
    }

    .hero h1 {
        font-size: 1.5rem !important;
    }

    .hero p {
        font-size: 0.9rem !important;
    }
}