/*
Theme Name: diegomartinfernandez-theme
Author: www.icarochaparrop.com
Author URI: www.icarochaparrop.com
Version: 05.26
.
General comments/License Statement if any.
.
*/

@import url('https://fonts.googleapis.com/css2?family=Roboto&display=swap');

:root {
    /* tipografía */
    --sans: 400 1.125rem/1.5 'Roboto', sans-serif;

    /* colores */
    --blanco: #f7f7f7;
    --negro: #1a1a1a;
    --acento: #D936CB;
    --seleccionado: #f0f0f0;

    /* espaciado */
    --s: .5rem;
    --m: 1rem;
    --l: 1.5rem
}

/* reset */
*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

*{font: var(--sans)}

html {
    -webkit-text-size-adjust: 100%;
}

body {
    font: var(--sans);
    color: var(--negro);
    background-color: var(--blanco);
    min-height: 100dvh;
}

img, video, svg {
    display: block;
    max-width: 100%;
}

ul, ol {
    list-style: none;
}

a {
    color: inherit;
    text-decoration: none;
}

button, input, select, textarea {
    font: inherit;
    border: none;
    background: none;
}

/* header */
header {
    position: sticky;
    top: 0;
    z-index: 450;
    padding: 12px;
    padding-bottom: 2rem;
    margin-bottom: 2rem;
    background: linear-gradient(to bottom, var(--blanco) 57.5%, transparent);
}

.header-top,
.header-bottom {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.header-top {
    margin-bottom: 0.25rem;
}

.logo {
    font: var(--sans); font-size: 1.5rem;
}

#menu-header{display: flex; gap: 1.5rem;}

header nav ul {
    display: flex;
    gap: 2rem;
}

header svg {
    width: 1.25rem;
    height: 1.25rem;
}

/* home */
.home-content {
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    column-gap: 12px;
    row-gap: 5rem;
    padding: 0 12px 6rem;
}

.seccion {
    grid-column: 1 / -1;
    display: grid;
    grid-template-columns: subgrid;
}

.seccion-label {
    font: var(--sans);
    grid-column: 1;
}

.seccion-contenido {
    grid-column: 2 / 6;
    text-wrap: pretty;
}

.seccion-contenido a {
    color: var(--acento);
    background-color: var(--seleccionado);
}

.lista-items {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.item {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    gap: 1rem;
}

.item-tab{justify-content: start ;}

.item-ano {
    white-space: nowrap;
}

/* tabs otros */
.tabs-nav {
    display: flex;
    flex-wrap: wrap;
    margin-bottom: 0.5rem;
}

.tab-btn {
    cursor: pointer;
    color: #999;
    padding: 0 8px;
    background-color: var(--seleccionado);
}

.tab-btn.active {
    color: var(--negro);
    background-color: transparent;
}

.tab-panel {
    display: none;
}

.tab-panel.active {
    display: block;
}

/* single */
.single-content {
    padding: 0 12px 6rem;
    max-width: 720px;
}

.single-titulo {
    font: var(--sans);
    font-size: 1.5rem;
    margin-bottom: 2rem;
    position: relative;
    z-index: 450;
}

.password-overlay {
    position: fixed;
    inset: 0;
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
    z-index: 400;
    pointer-events: none;
}

.post-password-form {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 500;
    width: calc(100% - 24px);
    max-width: 360px;
}

.post-password-form p {
    display: flex;
    align-items: center;
    gap: var(--s);
}

.post-password-form input[name="post_password"] {
    color: var(--acento);
    background-color: var(--seleccionado);
    padding: 0.25rem var(--s);
    outline: none;
    flex: 1;
    max-width: 192px ;
}

.post-password-form button[type="submit"] {
    flex-shrink: 0;
    cursor: pointer;
    display: flex;
    align-items: center;
}

.post-password-form button[type="submit"] svg {
    width: 1.25rem;
    height: 1.25rem;
}

/* category */
.category-content {
    padding: 0 12px 6rem;
}

.posts-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.posts-grid::after {
    content: '';
    flex-grow: 9999;
}

.grid-item {
    height: 220px;
    flex-grow: 1;
    min-width: 60px;
    overflow: hidden;
    cursor: pointer;
}

.grid-item img {
    height: 100%;
    width: 100%;
    object-fit: cover;
    transition: filter 0.25s ease, opacity 0.25s ease;
}

.grid-item.dimmed img {
    filter: grayscale(1);
    opacity: 0.12;
}

/* lightbox */
.posts-grid {
    transition: filter 0.3s ease, opacity 0.3s ease;
}

.lightbox-open {
    overflow: hidden;
}

.lightbox-open .posts-grid {
    filter: grayscale(1) blur(10px);
    opacity: 0.2;
}

.lightbox {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 100;
    align-items: center;
    justify-content: center;
}

.lightbox.open {
    display: flex;
}

.lb-img {
    max-width: 85vw;
    max-height: 82vh;
    object-fit: contain;
}

.lb-caption {
    display: none;
}

.hover-info {
    position: fixed;
    bottom: 1.5rem;
    left: 50%;
    transform: translateX(-50%);
    white-space: nowrap;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.2s ease;
    z-index: 300;
}

.hover-info.visible {
    opacity: 1;
}

#hoverSubtitulo {
    color: #999;
}

@media (max-width: 1200px) {
    .seccion-contenido {
        grid-column: 2 / -1;
    }
}

@media (max-width: 480px) {

    :root {
        --sans: 400 1rem/1.5 'Roboto', sans-serif;
    }

    /* header mobile */
    header {
        position: static;
        padding-bottom: 12px;
        margin-bottom: 1rem;
    }

    .header-top {
        display: block;
    }

    .header-top > a:last-child {
        display: none;
    }

    .logo {
        display: block;
        width: 100%;
        font-size: 8vw;
    }

    .header-bottom {
        position: fixed;
        bottom: 0;
        left: 0;
        right: 0;
        justify-content: center;
        padding: 0.875rem 12px 1.5rem;
        background: linear-gradient(to top, var(--blanco) 55%, transparent);
        z-index: 200;
        transform: translateY(0);
        transition: transform 0.35s ease;
    }

    .header-bottom.hidden {
        transform: translateY(100%);
    }

    .header-bottom > a {
        display: none;
    }

    #menu-header {
        justify-content: center;
    }

    body {
        padding-bottom: 4rem;
    }

    .home-content {
        grid-template-columns: 1fr;
    }

    .seccion-label,
    .seccion-contenido {
        grid-column: 1;
    }

    .seccion-label{margin-bottom: var(--l);}
    .lista-items{gap: var(--s);}
    .item-texto{margin-right: var(--m);}

    /* category móvil */
    .posts-grid {
        display: block;
    }

    .posts-grid::after {
        display: none;
    }

    .grid-item {
        height: auto;
        width: 100%;
        margin-bottom: 6px;
    }

    .grid-item img {
        height: auto;
        object-fit: initial;
    }

    .hover-info {
        display: none;
    }

    .lightbox.open {
        flex-direction: column;
        justify-content: center;
        overflow-y: auto;
    }

    .lb-img {
        max-width: calc(100vw - var(--m));
        max-height: none;
        width: 100%;
    }

    .lb-caption {
        display: block;
        margin-top:  var(--s);
    }

    #lbSubtitulo {
        color: #999;
    }
}
