/* css/creditos.css */

/* --- CONFIGURACIÓN BÁSICA --- */
body, html {
    margin: 0;
    padding: 0;
    width: 100%;
    height: 100%;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background-color: #000;
    color: white;
    overflow: hidden; 
}

/* --- HEADER --- */
.header-creditos {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 30px;
    background-color: #111;
    border-bottom: 1px solid #333;
    height: 70px;
    box-sizing: border-box;
    position: relative;
    z-index: 10;
}

.logo-container {
    height: 100%;
    display: flex;
    align-items: center;
}

/* Asegura que el logo se vea bien sin deformarse */
.img-logo {
    max-height: 50px;
    width: auto;
}

.btn-inicio {
    text-decoration: none;
    color: white;
    background-color: #333;
    padding: 10px 20px;
    border-radius: 5px;
    font-size: 0.9rem;
    transition: background-color 0.3s ease;
}

.btn-inicio:hover {
    background-color: #555;
}

/* --- GRID DE 4 ESQUINAS --- */
#grid-esquinas {
    display: grid;
    grid-template-columns: 1fr 1fr; /* Mitad y mitad ancho */
    grid-template-rows: 1fr 1fr;    /* Mitad y mitad alto */
    height: calc(100vh - 70px);     /* Resto de la pantalla exacto */
    width: 100vw;
    padding: 0;
    gap: 0;
    box-sizing: border-box;
}

/* --- TARJETA (CONTENEDOR) --- */
.tarjeta-esquina {
    position: relative;
    width: 100%;
    height: 100%;
    background-color: #000; /* Fondo negro para rellenar huecos */
    overflow: hidden;
    
    /* Animación */
    opacity: 0;
    transition: opacity 0.8s ease-in;
}

.tarjeta-esquina.visible {
    opacity: 1;
}

/* --- LA FOTO (SOLUCIÓN FINAL) --- */
.foto-bg {
    display: block;
    width: 100%;
    height: 100%;
    
    /* "contain" = Muestra la foto ENTERA, lo más grande posible, SIN deformar.
       Si la foto es vertical y la pantalla horizontal, habrá bandas negras a los lados. 
       Esto es geometría, no se puede evitar sin deformar o recortar. */
    object-fit: contain; 
    object-position: center;
}

/* --- TEXTO SOBRE LA FOTO --- */
.overlay-nombre {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    background: rgba(0, 0, 0, 0.7); /* Fondo oscuro semitransparente */
    color: #fff;
    padding: 15px;
    text-align: center;
    font-size: 1.1rem;
    font-weight: bold;
    z-index: 5;
}