* {
    box-sizing: border-box;
}

.contenedor-principal {
    display: flex;
    gap: 3%; 
    max-width: 90%;
    margin: 0 auto;
    overflow-x: hidden; /* Evita cualquier desplazamiento lateral */
}

/* =========================================
    NUEVA SECCIÓN HERO ESTÁNDAR
   ========================================= */
.team-hero-header {
    background-color: #000;
    padding: 60px 0;
    text-align: center;
    display: flex;
    justify-content: center;
    align-items: center;
    width: 100%;
    margin-top: 90px; /* Compensación por el header fijo de Protech */
    min-height: 250px; /* Altura estándar Desktop */
}

/* Ajustes para móviles */
@media screen and (max-width: 768px) {
    .team-hero-header {
        min-height: 250px; /* Misma altura que desktop para consistencia */
        padding: 40px 0;
        margin-top: 70px; 
    }
    
    .team-hero-header img {
        max-width: 75% !important; /* Logo más grande y visible en móvil */
        max-height: 120px;
        margin-top: 15px;
    }
}



.team-hero-header img {
    max-height: 110px; /* Tamaño más imponente, igual que Rockseries */
    max-width: 500px;  /* Libertad total para logos alargados */
    width: auto;
    height: auto;
    display: block;
    margin: 0 auto;
    object-fit: contain;
    filter: drop-shadow(0 0 10px rgba(255,255,255,0.05)); /* Brillo sutil */
    transition: transform 0.3s ease;
}

.team-hero-header img:hover {
    transform: scale(1.02); /* Micro-interacción premium */
}



/* =========================================
    2. COLUMNAS Y ESPACIADO (ZONA DE CORRECCIÓN)
    ========================================= */

/* -----------------------------------------
    2.1. Columna de Requisitos (Izquierda)
    ----------------------------------------- */

.columna-izquierda {
    width: 45%; 
    padding: 25px;
    background-color: #ffffff;
    border-radius: 12px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.05);
    max-height: 85vh;
    overflow-y: auto; 
    padding-right: 20px; 
    line-height: 1.6;
    font-size: 14px; /* Tamaño Base / Párrafos */
    color: #444;
    overflow-x: hidden;
    -webkit-overflow-scrolling: touch;
    word-wrap: break-word;
    
    /* Efecto Premium: Sombras de profundidad que indican que hay más contenido arriba o abajo */
    background: 
        linear-gradient(#fff 30%, rgba(255,255,255,0)), 
        linear-gradient(rgba(255,255,255,0), #fff 70%) 0 100%, 
        radial-gradient(farthest-side at 50% 0, rgba(0,0,0,.1), rgba(0,0,0,0)), 
        radial-gradient(farthest-side at 50% 100%, rgba(0,0,0,.1), rgba(0,0,0,0)) 0 100%;
    background-repeat: no-repeat;
    background-color: #fff;
    background-size: 100% 40px, 100% 40px, 100% 14px, 100% 14px;
    background-attachment: local, local, scroll, scroll;
}

/* Barra de scroll optimizada para iPhone/Safari */
.columna-izquierda::-webkit-scrollbar {
    width: 6px;
    height: 6px;
}

.columna-izquierda::-webkit-scrollbar-track {
    background: transparent;
}

.columna-izquierda::-webkit-scrollbar-thumb {
    background-color: rgba(227, 30, 36, 0.8);
    border-radius: 10px;
    border: 1px solid #ffffff; /* El borde ayuda a la visibilidad en iOS */
}

.seccion-texto {
    margin-bottom: 30px;
    border-bottom: 1px solid #f0f0f0;
    padding-bottom: 15px;
}

.seccion-texto:last-child {
    border-bottom: none;
}

.seccion-texto h4 {
    color: #111; 
    border-left: 4px solid #e31e24; 
    padding-left: 10px;
    font-size: 18px; /* Único tamaño para Títulos de la Izquierda */
    margin-bottom: 15px;
    display: flex;
    align-items: center;
    gap: 10px;
    font-weight: 800;
}

.seccion-texto h4 i {
    font-size: 18px; /* Se iguala al tamaño del título */
    color: #e31e24; 
}

.seccion-texto ul {
    padding-left: 20px;
    margin: 10px 0;
}

.seccion-texto ul li {
    margin-bottom: 8px;
    list-style-type: disc;
    font-size: 16px; /* Tamaño específico para las listas */
}

.columna-izquierda span {
    font-weight: bold;
    color: #111; /* Texto resaltado en negro, no rojo */
}

.columna-izquierda p {
    margin-bottom: 15px;
    margin-top: 0; 
    word-break: break-word; /* Evita que palabras largas rompan el ancho */
}

/* -----------------------------------------
    2.2. Columna del Formulario (Derecha)
    ----------------------------------------- */

.columna-derecha {
    width: 52%; 
    padding: 20px; 
    background-color: #ffffff;
    border-radius: 8px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    border: 1px solid #ccc;
}

/* =========================================
    3. BARRA DE PROGRESO (PASOS)
    ========================================= */

.barra-progreso {
    display: flex;
    justify-content: center;
    gap: 20px;
    margin-bottom: 30px;
    padding: 0;
}

.paso-indicador {
    text-align: center;
    padding: 10px 20px;
    border-radius: 50px;
    background: #f0f0f0;
    color: #888;
    transition: all 0.3s ease;
    font-size: 13px;
    font-weight: 600;
    border: 1px solid transparent;
}

.paso-indicador.activo {
    background: #e31e2415;
    border-color: #e31e24;
    color: #e31e24;
}

.paso-indicador.completado {
    background: #28a74515;
    border-color: #28a745;
    color: #28a745;
}

/* =========================================
    4. ESTILOS DEL FORMULARIO Y CAMPOS
    ========================================= */

.formulario-pasos h3 {
    margin-top: 0; 
    margin-bottom: 15px; 
    border-bottom: 1px solid #eee;
    padding-bottom: 5px;
    font-size: 18px; /* Se iguala al tamaño de los títulos de la izquierda */
    color: #333;
}

#miFormulario {
    width: 90%;
    margin: auto;
}

/* -----------------------------------------
    4.1. Grupos de Campos (Diseño Compacto)
    ----------------------------------------- */

.grupo-campos {
    display: flex;
    gap: 15px; 
    margin: 25px 0; 
}

.campo {
    position: relative;
    flex: 1;
}

.campo label {
    position: absolute;
    top: 15px;
    left: 20px;
    color: #aaa;
    font-size: 0.95rem;
    pointer-events: none;
    transition: all 0.3s ease;
    background: transparent;
    padding: 0;
}

/* Estado: Enfocado (Azul) */
.campo input:focus ~ label,
.campo select:focus ~ label {
    color: #007bff;
}

/* Estado: Completado (Verde) - Cuando tiene texto y no está enfocado */
.campo input:not(:placeholder-shown):not(:focus) ~ label,
.campo select.tiene-valor:not(:focus) ~ label {
    color: #28a745;
}

.campo input:focus ~ label,
.campo input:not(:placeholder-shown) ~ label,
.campo select:focus ~ label,
.campo select.tiene-valor ~ label {
    top: -10px;
    left: 15px;
    font-size: 0.8rem;
    background: #fff;
    padding: 0 5px;
    font-weight: 700;
}

.campo input, .campo select, .flatpickr-input {
    padding: 15px 20px;
    border: 1px solid #e1e1e1;
    border-radius: 8px; 
    width: 100% !important;
    font-size: 1rem;
    outline: none;
    background: #fff;
    transition: all 0.3s ease;
    box-sizing: border-box;
    display: block;
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
    max-width: 100%; /* Evita desbordamiento */
}

/* Foco Azul */
.campo input:focus, .campo select:focus, .flatpickr-input:focus {
    border-color: #007bff; 
    box-shadow: 0 0 0 4px rgba(0, 123, 255, 0.1);
    background-color: #fff;
}

/* Completado Verde */
.campo input:not(:placeholder-shown):not(:focus),
.campo select.tiene-valor:not(:focus) {
    border-color: #28a745;
    background-color: #f8fff9; /* Fondo verde muy sutil */
}

/* Campos de archivo específicos */
.campo.archivo-campo {
    padding: 30px 20px;
    border: 2px dashed #eee;
    border-radius: 15px;
    text-align: center;
    transition: all 0.3s ease;
    background: #fafafa;
    cursor: pointer; /* Mano al pasar por encima */
    position: relative;
    overflow: hidden;
}

.campo.archivo-campo:hover {
    border-color: #e31e24;
    background: #fff;
    box-shadow: 0 5px 15px rgba(227, 30, 36, 0.05);
}

.campo.archivo-campo label {
    position: static;
    transform: none;
    background: transparent;
    display: block;
    margin-bottom: 10px;
    font-weight: bold;
    color: #333;
    pointer-events: none; /* No bloquea el clic hacia el contenedor */
}

/* Ocultar el texto feo del "No se ha seleccionado archivo" */
.campo.archivo-campo input[type="file"] {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0; /* Lo hacemos invisible pero clickable */
    cursor: pointer;
}

/* Previsualización */
.preview-container {
    width: 100%;
    height: 120px;
    margin-top: 10px;
    border-radius: 10px;
    overflow: hidden;
    background: #f0f0f0;
    display: none; /* Se muestra con JS */
    border: 1px solid #eee;
}

.preview-container img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.preview-container.pdf-preview {
    display: none;
    align-items: center;
    justify-content: center;
    background: #fff5f5;
    color: #e31e24;
    font-size: 24px;
}

/* -----------------------------------------
    4.2. Contenedores de Fotos/Documentos
    ----------------------------------------- */

.contenedores-fotos {
    margin-top: 15px;
}

.contenedor-foto {
    display: flex;
    gap: 15px;
    margin-bottom: 10px;
}

.columna-foto-izq,
.columna-foto-der {
    flex: 1;
}

/* -----------------------------------------
    4.3. Navegación y Botones
    ----------------------------------------- */

.navegacion-pasos {
    display: flex;
    justify-content: space-between;
    margin-top: 20px;
    padding-top: 15px;
    border-top: 1px solid #eee;
}

.btn-izq,
.btn-der {
    display: flex;
    align-items: center;
}

.btn-der {
    justify-content: flex-end;
}

.navegacion-pasos button {
    padding: 10px 20px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-weight: bold;
    transition: background-color 0.3s;
}

#btnSiguientePaso2, #btnEnviarFormulario {
    background-color: #e5191e;
    color: white;
    border-radius: 8px; /* Igual que los inputs */
}

#btnAtrasPaso1 {
    background-color: #6c757d;
    color: white;
    border-radius: 8px; /* Igual que los inputs */
}

button:disabled {
    background-color: #cccccc;
    cursor: not-allowed;
    opacity: 0.7;
}

/* =========================================
    5. RESPONSIVE DESIGN (Móviles)
    ========================================= */

@media (max-width: 768px) {
    .contenedor-principal {
        flex-direction: column;
        gap: 20px; 
        padding: 5px;
        max-width: 100%;
        width: 100%;
    }

    .columna-izquierda,
    .columna-derecha {
        width: 100%; 
        border: 1px solid #eee; 
        padding: 12px; 
        box-sizing: border-box;
        overflow-x: hidden;
    }

    .columna-izquierda {
        max-height: 50vh;
        overflow-y: auto;
        margin-bottom: 25px;
        padding-right: 15px; /* Espacio para el scroll */
    }

    .grupo-campos {
        flex-direction: column;
        gap: 0; 
        margin-bottom: 0;
    }

    .campo input, .campo select, .flatpickr-input {
        padding: 12px 15px !important;
    }

    .campo {
        margin-bottom: 20px; 
        width: 100% !important;
        display: block;
        box-sizing: border-box;
    }

    .flatpickr-input,
    .flatpickr-mobile,
    .flatpickr-input.form-control,
    .flatpickr-wrapper {
        width: 100% !important;
        max-width: 100% !important;
        display: block !important;
        box-sizing: border-box !important;
        background-color: #fff !important;
        border: 1px solid #e1e1e1 !important;
    }

    .contenedor-foto {
        flex-direction: column;
        gap: 15px;
    }

    .navegacion-pasos button {
        width: 100%; 
    }

    .navegacion-pasos {
        flex-direction: column-reverse; 
        gap: 10px;
    }

    .btn-der {
        justify-content: center;
    }

    .fila-completa {
        width: 100%;
        display: block;
    }
}
