/* 1. Base y Centrado Horizontal Fijo */
body, html {
    height: 100%;
    margin: 0;
    padding: 0;
    font-family: 'Segoe UI', Arial, sans-serif;
    background-color: var(--cfondo);
    display: flex;
    justify-content: center; /* Centra horizontalmente */
    /* Quitamos el centrado vertical para que el buscador no salte */
}

.pantalla-completa {
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 100%;
    padding-top: 80px; /* Distancia fija desde el tope de la pantalla */
}

/* 2. Contenedores de Título y Buscador (Estrechos y elegantes) */
.contenedor-titulo, 
.contenedor-busqueda {
    width: 95%;
    max-width: 600px; /* Ancho fijo para que no crezcan con la tabla */
    text-align: center;
    margin-bottom: 30px;
}

.contenedor-titulo img{
max-width: 200px;
max-height:50px;

}


h1 {
    margin: 0;
    color: var(--ctitulo);
    font-weight: 300;
    font-size: 1.8rem;
    line-height: 1.2;
}

h1 span {
    font-weight: 600;
    color: var(--ctituloh);
}

/* 3. Estilos del Buscador (Cápsula) */
.marco-busqueda {
    display: flex;
    align-items: center;
    background: white;
    padding: 6px 10px;
    border-radius: 50px;
    border: 1px solid var(--cclaro);
    box-shadow: 0 4px 12px rgba(0,0,0,0.08);
    transition: all 0.3s ease;
}

.marco-busqueda:focus-within {
    box-shadow: 0 6px 20px rgba(0,0,0,0.12);
    border-color: var(--cluces);
}

.input-busqueda {
    flex: 1;
    border: none;
    background: transparent;
    padding: 12px 15px;
    font-size: 17px;
    outline: none;
    color: var(--ctexto);
    min-width: 0;
}

.boton-busqueda {
    background-color: var(--cluces);
    color: white;
    border: none;
    cursor: pointer;
    width: 42px;
    height: 42px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 28px;
    flex-shrink: 0;
    transition: transform 0.2s, background 0.2s;
}

.boton-busqueda:hover {
    background-color: var(--clucesoff);
    transform: scale(1.08);
}

/* 4. Tabla de Resultados (Ancha y con Scroll) */
.divrespuesta {
    width: calc(100% - 20px); /* Más ancha que el buscador */
    max-width: 1800px;
    margin-top: 20px;
    max-height: 60vh; /* Altura máxima para activar scroll interno */
    overflow-y: auto;
    border: 1px solid var(--cclaro);
    border-radius: 12px;
    background: white;
    box-shadow: 0 10px 30px rgba(0,0,0,0.05);
    animation: fadeIn 0.4s ease-out;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
}

/* Centrado de títulos de tabla */
th {
    position: sticky;
    top: 0;
    background-color: var(--cluces);
    color: white;
    padding: 15px;
    z-index: 10;
    text-align: center; /* Títulos centrados */
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

td {
    padding: 8px 9px;
    border-bottom: 1px solid var(--cclaro);
    color: var(--ctexto);
    font-size: 0.8rem;
    text-align: center; /* Contenido centrado por defecto */
}

/* Alinear a la izquierda columnas con mucho texto */
td:nth-child(3), td:nth-child(4) {
    text-align: left;
}

tr:hover td {
    background-color: #fcfcfc;
}

/* 5. Adaptación para Móviles */
@media (max-width: 600px) {
    .pantalla-completa {
        padding-top: 40px;
    }
    
    .divrespuesta {
        width: 100%;
        margin-top: 15px;
        border-radius: 0;
        border-left: none;
        border-right: none;
    }

    th, td {
        padding: 10px;
        font-size: 0.85rem;
    }
}