@import url('https://fonts.googleapis.com/css2?family=Inter:ital,opsz,wght@0,14..32,100..900;1,14..32,100..900&display=swap');

:root {
    --primary: #ffffff;
    --secondary: #e4c590;
    --terciary: #111111;
    --hover: #d3f1df;
}

html {
    scroll-behavior: smooth;
}

* {
    margin: 0;
    box-sizing: border-box;
    font-family: "Inter", serif;
}

body {
    background-color: var(--terciary);
    display: flex;
    flex-direction: column;
    align-items: center;
}

body>h1 {
    padding-top: 5%;
    font-weight: 400;
    color: var(--primary);
    text-transform: uppercase;
}

.desbloqueadas {
    display: flex;
    justify-content: space-between;
    flex-wrap: wrap;
    row-gap: 2rem;
    padding: 0px 1% 3% 3%;
}

strong {
    color: var(--secondary);
}

#usuario {
    display: flex;
    column-gap: .5rem;
}

#logout {
    background-color: transparent;
    border: none;
    color: var(--primary);
    text-decoration: underline;
    padding: 0;
    cursor: pointer;
}

#logout:hover {
    color: var(--hover);
}

#usuario>img {
    width: 4rem;
    height: 4rem;
    border-radius: 50%;
}

#info-user {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    justify-content: center;
}

#info-user>p {
    color: var(--primary);
}

header {
    width: 100%;
    height: 75vh;
    display: flex;
    flex-direction: column;
    background-image: url(images/51600.png);
    background-size: cover;
    background-position: bottom;
    padding: 1rem;
}

header nav {
    display: flex;
    justify-content: space-evenly;
    gap: 20px;
    height: 3rem;
    align-items: center;
}

nav>a:nth-child(1) {
    font-weight: 600;
    font-size: 1.6rem;
}

nav a {
    color: var(--primary);
    text-decoration: none;
    font-size: 1.3rem;
}

nav>img {
    width: 2.5rem;
    display: none;
    cursor: pointer;
}

nav span {
    display: flex;
    column-gap: 2.5rem;
    font-weight: 300;
}

nav span a {
    font-size: 1.2rem;
}

a.button,
button.button {
    padding: 9px 17px;
    border: 2px var(--secondary) solid;
    color: var(--secondary);
    font-size: 1.1rem;
    text-decoration: none;
    font-weight: 500;
    width: fit-content;
}

a.button:hover,
button.button:hover {
    background-color: var(--hover);
    color: #000000;
}

#header-center {
    display: flex;
    flex-direction: column;
    height: 100%;
    justify-content: center;
    align-items: center;
    row-gap: 1rem;
}


#header-center p {
    color: var(--primary);
    font-weight: 300;
    font-size: 1.2rem;
}

#header-center h1 {
    font-size: 5rem;
    color: var(--primary);
}

.buscador {
    display: flex;
    width: 100%;
    justify-content: flex-start;
    margin-top: 3rem;
    padding-left: 3%;
}

.buscador>input {
    height: 3rem;
    background-color: #000000;
    border: none;
    border-radius: 10px;
    padding: 0px 15px;
    width: 20rem;
    position: relative;
    color: #fff;
    outline: none;
}

#contenedor {
    width: 100%;
    display: flex;
}



.loading {
    font-size: 2rem;
    color: var(--primary);
}

.desbloqueadas {
    padding-top: 3rem;
    display: flex;
    flex-wrap: wrap;
    width: 80%;
    justify-content: flex-start;
    row-gap: 2rem;
    column-gap: 1rem
}

.carta {
    display: flex;
    width: 48%;
    align-items: center;
    border: 1px #ffffff1c solid;
    border-radius: 5px;
    padding: 1% 2% 1% 1%;
    height: fit-content;
}

.carta:hover {
    background-color: #1c1a1a;
}

.carta img {
    width: 7rem;
    cursor: pointer;
}

.info-carta {
    display: flex;
    flex-direction: column;
    width: calc(100% - 7rem);
    justify-content: space-between;
    height: 100%;
    padding-left: 1rem;
    color: var(--primary);
}

.titulo-carta {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.titulo-carta>strong {
    font-weight: 400;
    font-size: .9rem;
    min-width: fit-content;
}

.extracto {
    font-weight: 200;
    line-height: 1.5rem;
    display: -webkit-box;
    -webkit-line-clamp: 5;
    /* Número de líneas antes del corte */
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-align: justify;
}

.edicion {
    color: var(--secondary);
}

#desbloqueadas>p {
    color: var(--primary);
    font-size: 1.3rem;
    font-weight: 300;
    padding: 2rem 0px;
}

footer {
    background-image: url(images/footer.png);
    background-position: top;
    background-size: cover;
    height: 40vh;
    width: 100%;
    margin-top: 3%;
}

#menu-responsive {
    display: none;
}

#menu-responsive>a {
    color: var(--primary);
    font-size: 1.2rem;
}

.lightbox {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    justify-content: center;
    align-items: center;
    opacity: 0;
    /* Inicialmente invisible */
    transform: scale(0.9);
    /* Inicialmente más pequeño */
    pointer-events: none;
    /* Evitar que sea clickeable cuando está invisible */
    transition: opacity 0.3s ease, transform 0.3s ease;
    /* Transición suave de opacidad y escala */
    display: flex;
    backdrop-filter: blur(4px);
}

.lightbox.mostrar {
    opacity: 1;
    /* Hacer visible */
    transform: scale(1);
    /* Restaurar tamaño normal */
    pointer-events: all;
    /* Hacerlo clickeable */
}

.lightbox-img {
    max-width: 90%;
    max-height: 90%;
    border-radius: 10px;
    box-shadow: 0 0 20px rgba(255, 255, 255, 0.2);
}

.cerrar {
    position: absolute;
    top: 20px;
    right: 30px;
    font-size: 30px;
    color: white;
    cursor: pointer;
}

/* COMENTARIOS */
#comentarios {
    width: 30%;
    padding: 3% 1% 0% 0%;
}

#comentarios>h3 {
    height: 4rem;
    font-weight: 200;
    font-size: 2rem;
    color: #fff;
}

.comentario {
    display: flex;
    column-gap: 1rem;
    margin-bottom: 2rem;
}

.contenido {
    display: flex;
    flex-direction: column;
    color: #fff;
}

.contenido>small {
    color: #929292;
}

.contenido>p {
    font-size: .9rem;
    font-weight: 200;
}

.comentario>img {
    width: 4rem;
    height: 4rem;
    border-radius: 50%;
}

#formulario-comentario {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    row-gap: .5rem;
}

#formulario-comentario>p {
    justify-self: flex-start;
    align-self: flex-start;
    color: var(--secondary);
    padding-bottom: 2rem;
    font-size: 1.3rem;
}

#formulario-comentario>textarea {
    width: 100%;
    height: 4rem;
    background-color: #000000;
    padding: 15px;
    border-radius: 10px;
    border: none;
    outline: none;
}

#formulario-comentario>button {
    background-color: var(--secondary);
    color: var(--terciary);
    padding: 5px 10px;
    border: none;
    width: 6rem;
    height: 2rem;
    cursor: pointer;
}

#formulario-comentario>button:hover {
    background-color: var(--hover);
}

@media(max-width: 1000px) {
    .desbloqueadas {
        padding: 0px 5% 3% 5%;
        width: 100%;
    }

    .buscador {
        width: 90%;
        padding-left: 0%;
        margin-bottom: 2rem;
    }

    .info-carta {
        row-gap: .5rem;
    }

    .extracto {
        font-size: .9rem;
        line-height: 1.2rem;
    }

    #contenedor {
        flex-direction: column;
    }

    #comentarios {
        width: 100%;
        padding: 3% 5% 0% 5%;
    }
}

@media(max-width: 800px) {
    .desbloqueadas {
        flex-direction: column;
    }

    .carta {
        width: 100%;
    }

    h1.subtitulo {
        text-align: center;
    }

    .titulo-carta>strong {
        font-size: .8rem;
    }
    .buscador>input {
        width: 100%;
    }
}

@media(max-width: 950px) {

    nav>a:nth-child(1),
    nav>span {
        display: none;
    }

    header>nav {
        justify-content: space-between;
        padding: 1rem 2rem;
        height: fit-content;
    }

    nav>img {
        display: block;
    }

    header {
        height: 60vh;
    }

    #menu-responsive {
        height: 200vh;
        position: fixed;
        top: 0;
        left: 0;
        background-color: #000000eb;
        width: 100vh;
        flex-direction: column;
        row-gap: 2rem;
        padding-left: 4rem;
        padding-top: 8rem;
    }
}