/* ==============================================
   ESTILOS: SECCIÓN DE COMENTARIOS Y MODALES (VERSIÓN FINAL)
=============================================== */

/* ==============================================
   CORRECCIÓN ESTRUCTURAL Y ESPACIADO
=============================================== */

/* ==============================================
   ESTRUCTURA DEFINITIVA: CENTRADO Y ESPACIO INFERIOR
=============================================== */

/* 1. SECCIÓN PRINCIPAL: Forza el espacio negro abajo */
.seccion-testimonios {
    padding-top: 80px !important;
    padding-bottom: 200px !important; /* Espacio garantizado al final */
    background-color: #0a192f !important; /* Fondo azul noche */
    width: 100% !important;
    box-sizing: border-box !important;
    display: block !important;
    overflow: visible !important; /* Permite que el espacio exista sin cortarse */
}

/* 2. EL CONTENEDOR: Centrado perfecto sin tocar el HTML */
.layout-testimonios {
    display: grid;
    grid-template-columns: 1fr;
    gap: 40px;
    
    /* La magia del centrado */
    max-width: 1100px !important; 
    margin: 0 auto !important; /* Centra el bloque en la pantalla */
    width: 90% !important; /* Da márgenes laterales en celular */
    
    align-items: start;
}

/* 3. DISTRIBUCIÓN EN PC */
@media (min-width: 992px) {
    .layout-testimonios {
        grid-template-columns: 450px 1fr !important;
        gap: 60px !important;
    }
}

/* --- 2. TEXTOS Y TÍTULOS --- */
.subtitulo-dorado {
    color: #D4AF37;
}

.subtitulo-blanco {
    color: #ffffff;
    font-size: 1.3rem;
}

/* --- 3. EL FORMULARIO Y SUS INPUTS --- */
.caja-formulario {
    background: #112240;
    border: 2px solid #D4AF37;
    border-radius: 12px;
    padding: 30px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.5);
}

.formulario-vertical {
    display: flex;
    flex-direction: column;
    gap: 15px; /* Crea el espaciado automático vertical */
}

.formulario-vertical input, 
.formulario-vertical textarea, 
.formulario-vertical button {
    width: 100%;
    margin-bottom: 0; 
    box-sizing: border-box;
}

/* El arreglo de las cajas de texto (inputs oscuros y grandes) */
.input-dorado {
    width: 100%;
    padding: 15px !important; 
    background: rgba(17, 34, 64, 0.8) !important; 
    border: 1px solid rgba(212, 175, 55, 0.5) !important; 
    border-radius: 8px;
    color: #ffffff !important; 
    font-size: 1.1rem !important;
    font-family: inherit;
    box-sizing: border-box;
    transition: all 0.3s;
}

.input-dorado:focus {
    outline: none;
    border-color: #D4AF37 !important;
    background: rgba(255, 255, 255, 0.05) !important;
}

.input-dorado::placeholder {
    color: rgba(255, 255, 255, 0.5); 
}

/* --- 4. BOTONES DEL FORMULARIO --- */
.btn-outline-dorado {
    display: block;
    width: 100%;
    padding: 12px;
    border: 1px dashed #D4AF37;
    color: #D4AF37;
    background: transparent;
    border-radius: 8px;
    cursor: pointer;
    font-weight: bold;
    text-align: center;
    transition: 0.3s;
    box-sizing: border-box;
}

.btn-outline-dorado:hover {
    background: rgba(212, 175, 55, 0.1);
    border-style: solid;
}

.btn-dorado-solido {
    width: 100%;
    display: block;
    padding: 16px;
    background: #D4AF37; 
    color: #112240; 
    border: none;
    border-radius: 8px;
    font-size: 1.1rem;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s ease;
    text-transform: uppercase;
    box-shadow: 0 4px 15px rgba(212, 175, 55, 0.4);
}

.btn-dorado-solido:hover {
    background: #f1c40f;
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(212, 175, 55, 0.6);
}

/* --- 5. GRILLA COMPACTA DE NOMBRES (Lado Derecho) --- */
.grid-nombres-compacto {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
    gap: 12px;
}

/* Diseño de las etiquetas de los clientes */
.chip-nombre {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(212, 175, 55, 0.4);
    color: #ffffff;
    padding: 8px 15px;
    border-radius: 25px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: 0.95rem;
    cursor: pointer;
    transition: 0.3s ease;
}

.chip-nombre:hover {
    background: rgba(212, 175, 55, 0.15);
    border-color: #D4AF37;
}

.chip-texto {
    flex-grow: 1;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* La X roja de borrar */
.btn-eliminar-chip {
    color: #ff4d4d;
    font-weight: bold;
    font-size: 1.1rem;
    padding-left: 10px;
    cursor: pointer;
}

.btn-eliminar-chip:hover {
    color: #ff0000;
}

/* --- 6. DISEÑO DE TODOS LOS MODALES --- */
.modal-custom {
    position: fixed;
    z-index: 9999;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.85); /* Fondo oscuro con desenfoque */
    backdrop-filter: blur(5px);
    display: none; /* Oculto por defecto, se abre con JS */
    align-items: center;
    justify-content: center;
}

.modal-visible {
    display: flex !important;
}

/* La tarjeta central del modal */
.modal-contenido {
    background: #112240;
    border: 2px solid #D4AF37;
    border-radius: 12px;
    padding: 30px;
    max-width: 450px; 
    width: 90%;
    position: relative;
    box-shadow: 0 10px 30px rgba(0,0,0,0.8);
    display: flex;
    flex-direction: column;
    max-height: 85vh; /* Evita que crezca más alto que la pantalla */
    overflow-y: auto; /* Agrega scroll si hay mucho texto */
    color: #ffffff;
}

/* El botón X para cerrar el modal */
.cerrar-btn {
    position: absolute;
    top: 15px;
    right: 20px;
    color: #D4AF37;
    font-size: 30px;
    font-weight: bold;
    cursor: pointer;
    transition: 0.3s;
    line-height: 1;
}

.cerrar-btn:hover {
    color: #ffffff;
}

/* --- 7. INTERIOR DEL COMENTARIO EN EL MODAL --- */
.comentario-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
    border-bottom: 1px solid rgba(255,255,255,0.1);
    padding-bottom: 15px;
    margin-top: 10px; /* Separación de la X de cerrar */
}

.comentario-header h4 {
    color: #ffffff;
    margin: 0;
    font-size: 1.2rem;
}

.estrellas {
    color: #D4AF37;
    letter-spacing: 2px;
}

.modal-contenido p {
    color: rgba(255, 255, 255, 0.9);
    font-style: italic;
    line-height: 1.6;
    margin: 0 0 15px 0;
}

/* La magia para que la foto no tape el modal */
.foto-modal-reducida {
    max-width: 100%;
    height: 220px; /* Tamaño máximo de alto fijo */
    object-fit: cover; /* Centra y recorta elegante sin achatar */
    border-radius: 8px;
    border: 2px solid #D4AF37;
    margin-top: 10px;
}

/* Miniatura en el formulario al subir */
.foto-cliente-preview {
    max-width: 100%;
    height: 120px;
    object-fit: cover;
    border-radius: 8px;
    border: 1px solid #D4AF37;
    margin-top: 10px;
}