/* ESTILO PARA: NUNCA LO LOGRAREMOS
   Estética: Minimalismo Oscuro / Tipo de cambio
*/

/* 1. Configuración General y Colores */
body {
    background-color: #111;
    color: #999;
    font-family: 'Courier New', Courier, monospace;
    line-height: 1.6;
    max-width: 650px;
    margin: 60px auto;
    padding: 0 20px;
    word-wrap: break-word;
}

/* 2. Títulos y Subtítulo */
header {
    margin-bottom: 50px;
}

.site-title {
    color: #eee;
    text-decoration: none;
    font-size: 1.6rem;
    font-weight: bold;
    display: block;
    margin-bottom: 8px;
}

.subtitle {
    color: #666;
    font-size: 0.95rem;
    margin: 0 0 30px 0;
    line-height: 1.4;
}

/* 3. La Foto de Portada (Autorretrato) */
.link-portada {
    display: block;
    text-decoration: none;
}

.img-portada {
    max-width: 100%;
    height: auto;
    display: block;
    margin: 30px 0;
    filter: grayscale(100%);
    opacity: 0.8;
    transition: all 0.4s ease;
    border: 1px solid #222;
}

.link-portada:hover .img-portada {
    filter: none;
    opacity: 1;
    border-color: #444;
}

/* 4. Navegación */
nav {
    display: flex;
    gap: 15px;
    font-size: 0.9rem;
    margin-top: 20px;
}

nav a {
    color: #888;
    text-decoration: none;
}

nav a:hover {
    color: #eee;
    text-decoration: underline;
}

/* 5. Lista de Entradas */
.post-list {
    list-style: none;
    padding: 0;
    margin-top: 50px;
}

.post-list li {
    display: flex;
    margin-bottom: 15px;
    align-items: flex-start;
}

.post-date {
    min-width: 120px;
    color: #444;
    font-size: 0.9rem;
}

.post-list a {
    color: #bbb;
    text-decoration: underline;
    text-decoration-color: #333;
    text-underline-offset: 4px;
}

.post-list a:hover {
    color: #fff;
    text-decoration-color: #888;
}

/* 6. Estilo para los artículos internos */
article h1 {
    color: #eee;
    font-size: 1.4rem;
    margin-top: 0;
}

article p {
    margin-bottom: 20px;
}

/* ============================================
   7. GALERÍA DE FOTOS
   ============================================ */

.galeria-header {
    margin-bottom: 40px;
}

.galeria-header h1 {
    color: #eee;
    font-size: 1.4rem;
    margin: 0 0 10px 0;
}

.galeria-header p {
    color: #666;
    font-size: 0.9rem;
    margin: 0;
}

.galeria-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 20px;
    margin-top: 30px;
}

.tarjeta-foto {
    background: #1a1a1a;
    border: 1px solid #222;
    overflow: hidden;
    transition: border-color 0.3s ease;
}

.tarjeta-foto:hover {
    border-color: #444;
}

.tarjeta-foto img {
    width: 100%;
    height: 200px;
    object-fit: cover;
    display: block;
    filter: grayscale(100%);
    opacity: 0.85;
    transition: all 0.4s ease;
}

.tarjeta-foto:hover img {
    filter: none;
    opacity: 1;
}

.tarjeta-info {
    padding: 12px 15px;
}

.tarjeta-info .fecha {
    color: #555;
    font-size: 0.8rem;
    display: block;
    margin-bottom: 4px;
}

.tarjeta-info .descripcion {
    color: #bbb;
    font-size: 0.9rem;
    margin: 0;
    line-height: 1.4;
}

/* Estado de carga / error */
#galeria-estado {
    color: #666;
    font-style: italic;
    padding: 40px 0;
    text-align: center;
}

/* 8. Responsivo */
@media (max-width: 500px) {
    body {
        margin: 30px auto;
    }
    
    .post-list li {
        flex-direction: column;
        margin-bottom: 25px;
    }
    
    .post-date {
        margin-bottom: 5px;
        font-size: 0.8rem;
    }

    .galeria-grid {
        grid-template-columns: 1fr;
    }
}

/* ============================================
   LIGHTBOX
   ============================================ */

#lightbox-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.92);
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
    animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.lightbox-contenido {
    position: relative;
    max-width: 90vw;
    max-height: 90vh;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.lightbox-contenido img {
    max-width: 100%;
    max-height: 80vh;
    object-fit: contain;
    display: block;
    border: 1px solid #333;
}

.lightbox-cerrar {
    position: absolute;
    top: -40px;
    right: 0;
    color: #888;
    font-size: 2rem;
    cursor: pointer;
    line-height: 1;
    transition: color 0.2s ease;
    user-select: none;
}

.lightbox-cerrar:hover {
    color: #fff;
}

.lightbox-info {
    margin-top: 15px;
    text-align: center;
}

.lightbox-fecha {
    color: #555;
    font-size: 0.8rem;
    display: block;
    margin-bottom: 4px;
}

.lightbox-desc {
    color: #bbb;
    font-size: 0.95rem;
    margin: 0;
}

/* Cursor pointer en las fotos de la galería */
.tarjeta-foto img {
    cursor: zoom-in;
}
