/*
 * ============================================================================
 * WORK WITH US - Estilos específicos para página independiente
 * ============================================================================
 * 
 * Este archivo contiene estilos exclusivos para la página work-with-us.html
 * Asegura comportamiento correcto en desktop y mobile sin depender del index
 * ============================================================================
 */

/* ============================================================================
   DESKTOP (> 768px)
   ============================================================================ */

@media (min-width: 769px) {
    html, body {
        overflow-x: hidden;
        overflow-y: auto;
        height: 100%;
        margin: 0;
        padding: 0;
    }
    
    .work-with-us-page {
        min-height: 100vh;
        position: relative;
    }
    
    .proveedores {
        position: relative;
        width: 100vw;
        left: 0;
        right: 0;
        margin: 0;
    }
    
    /* Ajustes del formulario para desktop */
    .proveedores__form-wrapper {
        padding: 2.8rem !important;
    }
    
    .proveedores__form-grid {
        gap: 3.2rem 2rem !important;
        margin-bottom: 2.2rem !important;
    }
    
    .proveedores__form-group {
        gap: 0.9rem !important;
    }
    
    .proveedores__form-group input,
    .proveedores__form-group select {
        padding: 0.65rem 0 !important;
    }
    
    .proveedores__form-group textarea {
        min-height: 95px !important;
        height: 95px !important;
    }
    
    .proveedores__form-title::after {
        margin-top: 1.2rem !important;
        margin-bottom: 2.2rem !important;
    }
    
    .proveedores__form-submit {
        margin-top: 2rem !important;
    }
    
    /* Mostrar solo botón superior en desktop */
    .back-to-home--top {
        position: absolute;
        top: 0;
        left: 0;
        right: 0;
        z-index: 10;
        padding: 2.2rem;
        padding-left: clamp(5rem, 8vw, 10rem);
        display: flex;
        justify-content: flex-start;
        align-items: center;
    }
    
    /* Ocultar botón inferior en desktop */
    .back-to-home--bottom {
        display: none;
    }
    
    /* Hover para link "Volver a inicio" (reemplaza inline onmouseover/onmouseout) */
    .back-to-home--top a:hover {
        transform: translateX(-5px);
    }
    
    /* Ocultar flecha mobile en desktop */
    .back-arrow-mobile {
        display: none !important;
    }
}

/* ============================================================================
   MOBILE (≤ 768px) - SCROLL NATIVO COMPLETO
   ============================================================================ */

@media (max-width: 768px) {
    
    /* ========================================
       SCROLL NATIVO LIBRE - Sin restricciones
       ======================================== */
    
    html {
        overflow-x: hidden !important;
        overflow-y: auto !important;
        height: auto !important;
        scroll-behavior: smooth !important;
        margin: 0 !important;
        padding: 0 !important;
    }
    
    body {
        overflow-x: hidden !important;
        overflow-y: auto !important;
        height: auto !important;
        min-height: 100vh !important;
        position: relative !important;
        margin: 0 !important;
        padding: 0 !important;
    }
    
    .work-with-us-page {
        overflow: visible !important;
        height: auto !important;
        min-height: 100vh !important;
        margin: 0 !important;
        padding: 0 !important;
    }
    
    /* ========================================
       SECCIÓN PROVEEDORES - Layout mobile sin espacio superior
       ======================================== */
    
    .proveedores {
        position: relative !important;
        width: 100% !important;
        height: auto !important;
        min-height: 100vh !important;
        overflow: visible !important;
        left: 0 !important;
        right: 0 !important;
        margin: 0 !important;
        padding: 0 !important;
        padding-top: 2rem !important;
        padding-bottom: 3rem !important;
        padding-left: 1.5rem !important;
        padding-right: 1.5rem !important;
    }
    
    .proveedores__bg-parallax {
        overflow: hidden !important;
    }
    
    .proveedores__container {
        overflow: visible !important;
        height: auto !important;
        max-height: none !important;
        position: relative !important;
        margin-top: 0 !important;
        padding-top: 0 !important;
    }
    
    /* Layout de una columna */
    .proveedores__content {
        display: flex !important;
        flex-direction: column !important;
        gap: 2.5rem !important;
        overflow: visible !important;
        height: auto !important;
        align-items: stretch !important;
        margin-top: 0 !important;
        padding-top: 0 !important;
    }
    
    .proveedores__text-wrapper {
        position: relative !important;
        width: 100% !important;
        margin-bottom: 1rem !important;
        margin-top: 0 !important;
        padding-top: 0 !important;
    }
    
    .proveedores__text-wrapper .quienes__title {
        font-size: clamp(2rem, 9vw, 3rem) !important;
        margin-bottom: 1rem !important;
        margin-top: 0 !important;
        padding-top: 0 !important;
        line-height: 1.2 !important;
    }
    
    /* Header con título y flecha */
    .work-with-us-header {
        display: flex !important;
        align-items: center !important;
        justify-content: space-between !important;
        width: 100% !important;
        margin-bottom: 0 !important;
        gap: 1rem !important;
    }
    
    .work-with-us-header .quienes__title {
        margin-bottom: 0 !important;
    }
    
    /* Flecha de retorno - solo visible en mobile */
    .back-arrow-mobile {
        display: flex !important;
        align-items: center !important;
        justify-content: center !important;
        color: #ffffff !important;
        font-size: 2.5rem !important;
        text-decoration: none !important;
        background: transparent !important;
        border: none !important;
        cursor: pointer !important;
        transition: transform 0.2s ease !important;
        padding: 0 !important;
        margin: 0 !important;
        margin-top: -0.5rem !important;
        line-height: 1 !important;
        flex-shrink: 0 !important;
    }
    
    .back-arrow-mobile:hover {
        transform: translateX(-5px) !important;
    }
    
    .proveedores__intro {
        margin-top: 1.5rem !important;
    }
    
    .proveedores__subtitle {
        font-size: clamp(1.2rem, 5vw, 1.6rem) !important;
        margin-bottom: 1rem !important;
    }
    
    .proveedores__description {
        font-size: 1rem !important;
        line-height: 1.7 !important;
    }
    
    /* ========================================
       FORMULARIO - Sin restricciones de altura
       ======================================== */
    
    .proveedores__form-wrapper {
        position: relative !important;
        width: 100% !important;
        height: auto !important;
        max-height: none !important;
        overflow: visible !important;
        padding: 2rem 1.5rem !important;
        border-width: 1.5px !important;
        margin-top: 0 !important;
    }
    
    .proveedores__form,
    #proveedores-form {
        overflow: visible !important;
        height: auto !important;
        max-height: none !important;
    }
    
    .proveedores__form-title {
        font-size: clamp(1.5rem, 6vw, 2rem) !important;
    }
    
    /* Grid de formulario: columna simple */
    .proveedores__form-grid {
        display: flex !important;
        flex-direction: column !important;
        grid-template-columns: 1fr !important;
        gap: 1.8rem !important;
        overflow: visible !important;
        height: auto !important;
    }
    
    .proveedores__form-group {
        gap: 0.6rem !important;
        overflow: visible !important;
        height: auto !important;
    }
    
    .proveedores__form-group--full {
        overflow: visible !important;
        height: auto !important;
    }
    
    .proveedores__form-group label {
        font-size: 0.75rem !important;
    }
    
    /* Inputs sin restricciones */
    .proveedores__form-group input,
    .proveedores__form-group textarea {
        font-size: 1rem !important;
        padding: 0.75rem 0 !important;
        min-height: 44px !important;
        height: auto !important;
        overflow: visible !important;
    }
    
    /* Textarea expandible */
    .proveedores__form-group textarea {
        min-height: 120px !important;
        height: auto !important;
        max-height: none !important;
        resize: vertical !important;
        overflow-y: auto !important;
    }
    
    /* Botón de envío */
    .proveedores__form-submit {
        font-size: 0.85rem !important;
        padding: 1rem 2rem !important;
        width: 100% !important;
        text-align: center !important;
        margin-top: 1.5rem !important;
        margin-bottom: 2rem !important;
        min-height: 48px !important;
        position: relative !important;
    }
    
    /* ========================================
       BOTONES VOLVER A INICIO - Control de visibilidad mobile
       ======================================== */
    
    /* Ocultar botón superior en mobile */
    .back-to-home--top {
        display: none !important;
    }
    
    /* Ocultar botón inferior en mobile */
    .back-to-home--bottom {
        display: none !important;
    }
    
    .back-to-home--bottom a {
        background: transparent !important;
        color: #ffffff !important;
        padding: 0 !important;
        border-radius: 0 !important;
        font-size: 2rem !important;
        box-shadow: none !important;
        display: flex !important;
        margin: 2rem 0 0 0 !important;
        max-width: none !important;
        justify-content: flex-start !important;
        align-items: center !important;
        gap: 1rem !important;
        font-weight: 500 !important;
        transition: transform 0.2s !important;
        text-shadow: 0 2px 4px rgba(0,0,0,0.3) !important;
    }
    
    .back-to-home--bottom a:hover {
        transform: translateX(-5px) !important;
    }
    
    .back-to-home--bottom a span:first-child {
        font-size: 3rem !important;
        color: #ffffff !important;
    }
    
    .back-to-home--bottom a span:last-child {
        color: #ffffff !important;
    }
}

/* ============================================================================
   MOBILE PEQUEÑO (≤ 480px)
   ============================================================================ */

@media (max-width: 480px) {
    
    /* Mantener scroll libre */
    html, body {
        overflow-x: hidden !important;
        overflow-y: auto !important;
        height: auto !important;
        margin: 0 !important;
        padding: 0 !important;
    }
    
    .proveedores {
        padding: 1.5rem 1.2rem 2.5rem 1.2rem !important;
    }
    
    .proveedores__content {
        gap: 2rem !important;
    }
    
    .proveedores__text-wrapper .quienes__title {
        font-size: 1.8rem !important;
        margin-bottom: 0.8rem !important;
    }
    
    .proveedores__subtitle {
        font-size: 1.15rem !important;
        margin-bottom: 0.8rem !important;
    }
    
    .proveedores__description {
        font-size: 0.9rem !important;
        line-height: 1.65 !important;
    }
    
    .proveedores__form-wrapper {
        padding: 1.5rem 1.2rem !important;
    }
    
    .proveedores__form-title {
        font-size: 1.4rem !important;
    }
    
    .proveedores__form-grid {
        gap: 1.5rem !important;
    }
    
    .back-to-home {
        padding: 1.2rem !important;
    }
    
    .back-to-home a {
        font-size: 0.85rem !important;
        padding: 0.7rem 1.2rem !important;
    }
}
