/* ===================================
   FIX NAVBAR DESKTOP
   Previene sobreposición del logo con "Inicio"
   =================================== */

@media (min-width: 993px) {
    .nav-container {
        display: flex;
        justify-content: space-between;
        align-items: center;
        gap: 2rem;
        flex-wrap: nowrap;
    }
    
    .nav-logo {
        flex-shrink: 0;
        min-width: 120px;
        margin-right: 1rem;
    }
    
    .nav-menu {
        display: flex;
        flex-wrap: nowrap;
        gap: 1.5rem;
        margin-left: auto;
        align-items: center;
    }
    
    .nav-menu li {
        flex-shrink: 0;
    }
    
    .nav-link {
        white-space: nowrap;
        padding: 0.5rem 0.3rem;
    }
}

/* Ajuste para pantallas medianas (prevenir sobreposición) */
@media (min-width: 993px) and (max-width: 1300px) {
    .nav-menu {
        gap: 1rem;
    }
    
    .nav-link {
        font-size: 0.85rem;
    }
    
    .nav-btn {
        padding: 0.5rem 1rem;
        font-size: 0.85rem;
    }
    
    .lang-btn {
        padding: 0.5rem 0.8rem;
        font-size: 0.85rem;
    }
}

/* ===================================
   FIX CRÍTICO - FORMULARIO MÓVIL
   SOLO APLICADO EN MÓVIL (≤480px)
   =================================== */

@media (max-width: 480px) {
    /* NIVEL 1: HTML y BODY */
    html {
        overflow-x: hidden !important;
        max-width: 100vw !important;
    }
    
    body {
        overflow-x: hidden !important;
        max-width: 100vw !important;
        position: relative !important;
    }
    
    /* NIVEL 2: CONTAINER PRINCIPAL */
    .container {
        padding-left: 0.5rem !important;
        padding-right: 0.5rem !important;
        max-width: 100% !important;
        width: 100% !important;
        overflow-x: hidden !important;
        box-sizing: border-box !important;
    }
    
    /* NIVEL 3: SECTION CONTACTO */
    .contact-section {
        padding-left: 0 !important;
        padding-right: 0 !important;
        overflow-x: hidden !important;
        max-width: 100vw !important;
        width: 100% !important;
    }
    
    .section-header {
        padding-left: 1rem !important;
        padding-right: 1rem !important;
        max-width: 100% !important;
    }
    
    .section-title {
        font-size: 1.6rem !important;
        word-wrap: break-word !important;
        overflow-wrap: break-word !important;
    }
    
    /* NIVEL 4: CONTACT CONTENT */
    .contact-content {
        display: block !important;
        grid-template-columns: none !important;
        width: 100% !important;
        max-width: 100% !important;
        padding: 0 !important;
        margin: 0 !important;
        overflow-x: hidden !important;
        box-sizing: border-box !important;
    }
    
    /* NIVEL 5: FORM WRAPPER */
    .contact-form-wrapper {
        width: 100% !important;
        max-width: 100% !important;
        padding: 1rem 0.5rem !important;
        margin: 0 !important;
        border-left: none !important;
        border-right: none !important;
        border-radius: 0 !important;
        overflow-x: hidden !important;
        box-sizing: border-box !important;
    }
    
    /* NIVEL 6: FORM */
    .contact-form {
        width: 100% !important;
        max-width: 100% !important;
        padding: 0 !important;
        margin: 0 !important;
        overflow-x: hidden !important;
        box-sizing: border-box !important;
    }
    
    /* NIVEL 7: FORM ROW */
    .form-row {
        display: block !important;
        grid-template-columns: none !important;
        width: 100% !important;
        max-width: 100% !important;
        gap: 0.8rem !important;
        margin-bottom: 0.8rem !important;
        padding: 0 !important;
        overflow-x: hidden !important;
        box-sizing: border-box !important;
    }
    
    /* NIVEL 8: FORM GROUP */
    .form-group {
        display: block !important;
        width: 100% !important;
        max-width: 100% !important;
        min-width: 0 !important;
        padding: 0 !important;
        margin: 0 0 0.8rem 0 !important;
        overflow-x: hidden !important;
        box-sizing: border-box !important;
    }
    
    /* NIVEL 9: LABELS */
    .form-group label {
        display: block !important;
        width: 100% !important;
        max-width: 100% !important;
        font-size: 0.8rem !important;
        margin-bottom: 0.4rem !important;
        padding: 0 !important;
        word-wrap: break-word !important;
        overflow-wrap: break-word !important;
        box-sizing: border-box !important;
    }
    
    /* NIVEL 10: INPUTS, SELECTS, TEXTAREAS - CRÍTICO */
    .form-group input,
    .form-group select,
    .form-group textarea {
        display: block !important;
        width: 100% !important;
        max-width: 100% !important;
        min-width: 0 !important;
        padding: 0.7rem 0.5rem !important;
        margin: 0 !important;
        font-size: 0.85rem !important;
        border: 1px solid rgba(212, 175, 55, 0.2) !important;
        border-radius: 8px !important;
        background: var(--black-secondary) !important;
        color: var(--white-primary) !important;
        box-sizing: border-box !important;
        -webkit-appearance: none !important;
        -moz-appearance: none !important;
        appearance: none !important;
    }
    
    /* NIVEL 11: TEXTAREA ESPECÍFICO */
    .form-group textarea {
        resize: vertical !important;
        min-height: 80px !important;
    }
    
    /* NIVEL 12: SELECT ESPECÍFICO */
    .form-group select {
        background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%23D4AF37' d='M6 9L1 4h10z'/%3E%3C/svg%3E") !important;
        background-repeat: no-repeat !important;
        background-position: right 0.5rem center !important;
        padding-right: 2rem !important;
    }
    
    /* NIVEL 13: BOOKING HOURS NOTICE */
    .booking-hours-notice {
        display: flex !important;
        width: 100% !important;
        max-width: 100% !important;
        padding: 0.6rem !important;
        margin: 0.8rem 0 !important;
        font-size: 0.75rem !important;
        line-height: 1.4 !important;
        overflow-x: hidden !important;
        box-sizing: border-box !important;
    }
    
    .booking-hours-notice i {
        flex-shrink: 0 !important;
        margin-right: 0.5rem !important;
        margin-top: 0.2rem !important;
    }
    
    .booking-hours-notice div {
        flex: 1 !important;
        word-wrap: break-word !important;
        overflow-wrap: break-word !important;
    }
    
    .booking-hours-notice strong {
        display: block !important;
        margin-bottom: 0.3rem !important;
    }
    
    .booking-hours-notice small {
        font-size: 0.7rem !important;
        line-height: 1.3 !important;
    }
    
    /* NIVEL 14: BUTTON SUBMIT */
    .btn-submit {
        display: block !important;
        width: 100% !important;
        max-width: 100% !important;
        padding: 0.9rem 1rem !important;
        margin: 1rem 0 0 0 !important;
        font-size: 0.9rem !important;
        text-align: center !important;
        box-sizing: border-box !important;
    }
    
    /* NIVEL 15: FORM MESSAGE */
    .form-message {
        width: 100% !important;
        max-width: 100% !important;
        padding: 0.8rem !important;
        margin-top: 1rem !important;
        box-sizing: border-box !important;
    }
    
    /* NIVEL 16: CONTACT INFO WRAPPER */
    .contact-info-wrapper {
        width: 100% !important;
        max-width: 100% !important;
        padding: 0 0.5rem !important;
        margin-top: 2rem !important;
        overflow-x: hidden !important;
        box-sizing: border-box !important;
    }
    
    .contact-info-card {
        width: 100% !important;
        max-width: 100% !important;
        padding: 1.5rem 1rem !important;
        overflow-x: hidden !important;
        box-sizing: border-box !important;
    }
    
    /* NIVEL 17: INFO ITEMS */
    .info-item {
        width: 100% !important;
        max-width: 100% !important;
        word-wrap: break-word !important;
        overflow-wrap: break-word !important;
    }
    
    /* NIVEL 18: PREVENIR OVERFLOW EN ELEMENTOS INLINE */
    .contact-section * {
        max-width: 100% !important;
    }
    
    /* NIVEL 19: AOS ANIMATIONS - DESACTIVAR EN MÓVIL */
    [data-aos="fade-right"],
    [data-aos="fade-left"] {
        transform: none !important;
        opacity: 1 !important;
    }
    
    /* NIVEL 20: FONT AWESOME ICONS */
    .form-group label i {
        margin-right: 0.3rem !important;
        flex-shrink: 0 !important;
    }
}

/* ===================================
   FIX ADICIONAL PARA PANTALLAS MUY PEQUEÑAS
   =================================== */

@media (max-width: 360px) {
    .container {
        padding-left: 0.25rem !important;
        padding-right: 0.25rem !important;
    }
    
    .contact-form-wrapper {
        padding: 0.8rem 0.3rem !important;
    }
    
    .form-group input,
    .form-group select,
    .form-group textarea {
        padding: 0.6rem 0.4rem !important;
        font-size: 0.8rem !important;
    }
    
    .form-group label {
        font-size: 0.75rem !important;
    }
    
    .btn-submit {
        padding: 0.8rem !important;
        font-size: 0.85rem !important;
    }
    
    .booking-hours-notice {
        padding: 0.5rem !important;
        font-size: 0.7rem !important;
    }
}
