
/* A quien ose adentrarse en las entrañas de la bestia que ante nos se muestra:
Sé que hay que mantener el código limpio y ordenado, y es algo que, aunque he tratado de mantener, mira, no ha podido ser.
Lo siento mucho. Me he equivocado. No volverá a ocurrir. */

*{
    font-family: "Roboto", serif;
    font-optical-sizing: auto;
    box-sizing: border-box;
    margin: 0px;
    padding: 0px;
    transition: .2s;
}

html,
body{
    overflow-x: hidden;
    scroll-behavior: smooth; 
    -ms-scroll-snap-type: y mandatory; 
        scroll-snap-type: y mandatory;
}

a{
    text-decoration: none;
    color: inherit;
}

img,
video{
    width: 100%;
}

p{
    margin: 50px;
}

/*  ----------principal--------- */

h1{
    text-transform: uppercase;
    color: #303030;
    font-family: "Space Grotesk", serif;
    font-optical-sizing: auto;
    margin: 50px;
}

#titulo{
    font-family: "Space Grotesk", serif;
    font-weight: bolder;
    font-size: 450%;
}

a{
    padding: 10px 10px 10px 10px;
    border-radius: 5px;
}

#nav{
    position: fixed;
    width: 100%;
    display: flex;
    justify-content: space-around;
}


a:hover{
    background-color: #383838;
    color: #fff;
    transition: .5s;
}

#arriba{
    position: fixed;
    bottom: 90px;
    left: 90%;
    z-index: 1000;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.6s ease;
}

#arriba.visible {
    opacity: 1;
    pointer-events: auto;
}

#creditos{
    margin-top: 20px;
    display: flex;
    flex-direction: column;
    gap: 15px;
    color: #000000;
}

section{
    min-height: 100vh;
    background-color: #adadad;
    display: grid;
    grid-template-columns: repeat(4,25%);
    grid-template-rows: repeat(5,20%);
    justify-content: center;
    align-items: center;
    padding: 0;
    border: 2px 0px 0px 0px solid #000000;
    scroll-snap-align: start;
}

/* .sec{  
    grid-template-rows: 12;
    grid-template-columns: 8;
} */

.sec h1{
    grid-row: 2;
    padding: 35px;
}

.sec p{
    grid-row-start: 3;
    grid-column-start: 1;
    grid-column-end: 3;
    padding: 15px;
}

#inicio{
    display: grid;
    grid-template-rows: 8;
    justify-content: start;
    padding: 35px;
}

/* #arriba{
    grid-row: 4;
    grid-column: 3;
} */

#titulo{
    grid-row: 2;
    justify-items: end;
}

#inicio h2{
    grid-row: 3;
    grid-column-start: 1;
    grid-column-end: 3;
    align-items: end;
}
#inicio h3{
    grid-row: 4;
    grid-column-start: 1;
    grid-column-end: 3;
}

#retr,
#narra,
#tebeo,
#foto,
#juegos,
#petru,
#mixtopor{
    grid-column-start: 4;
    grid-row-start: 3;
    margin-left: -25px;
}

#mixtopor{
    grid-column-start: 4;
    margin-top: 25px;
    grid-row-start: 2;
}

#tebeos .boton{
    grid-column-start: 3;
    grid-row-start: 4;
}

#tebeos #atrass{
    grid-column-start: 4;
    grid-row-start: 5;
}


#blog{
    grid-column-start: 3;
    grid-row-end: 6;
}

section:nth-of-type(even){
background: #ffffff;
background: linear-gradient(0deg, rgba(255, 255, 255, 1) 0%, rgba(214, 214, 214, 1) 76%, rgba(194, 194, 194, 1) 88%, rgba(166, 166, 166, 1) 100%);
}

section:nth-of-type(odd){
    background: #ffffff;
background: linear-gradient(180deg, rgba(255, 255, 255, 1) 0%, rgba(214, 214, 214, 1) 76%, rgba(194, 194, 194, 1) 88%, rgba(166, 166, 166, 1) 100%);
}

article{
    max-width: 70vh;
    background-color: #ddd;
    border: 1px solid #222;
    border-radius: 5px;
    padding: 15px;
}

/* botones */


.boton {
    width: 130px;
    height: 40px;
    color: #000000;
    border-radius: 5px;
    padding: 10px 25px;
    font-family: 'Lato', sans-serif;
    font-weight: 500;
    background-color: rgba(255, 255, 255, 0.521);
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    display: inline-block;
    box-shadow:inset 2px 2px 2px 0px rgba(255,255,255,.5),
    7px 7px 20px 0px rgba(0,0,0,.1),
    4px 4px 5px 0px rgba(0,0,0,.1);
    outline: none;
    }

#acacia{
    width: 130px;
    height:140px;
    grid-row-start: 3;
    grid-column-start: 3;
    align-content: center;
}

.boton:after {
    color: #fff;
    position: absolute;
    content: "";
    width: 0;
    height: 100%;
    top: 0;
    left: 0;
    direction: rtl;
    z-index: -1;
    box-shadow:
    -7px -7px 20px 0px #fff9,
    -4px -4px 5px 0px #fff9,
    7px 7px 20px 0px #0002,
    4px 4px 5px 0px #0001;
    transition: all 0.3s ease;
    }

.boton:hover {
    color: #fff;
    background-color: #000000;

}

.boton:hover:after {
    left: auto;
    right: 0;
    width: 100%;
}

.boton{
    text-align: center;
    grid-row: 4;
    grid-column: 3;
}

#atrass{
    grid-row: 5;
    grid-column: 4;
    justify-content: center;
}

#atrash{
    justify-content: center;

}

/* ------------------------------------- */
/* ---------------SECCIONES------------- */
/* ------------------------------------- */

/* Inicio */

/* Narrativa */

/* Novelas */

.catalogo {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    justify-content: center;
}

#bancat{
    font-size: 48px;
    padding: 15px;
    justify-self: center;
}

.libro {
    background: white;
    padding: 15px;
    border-radius: 8px;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
    width: 400px;
    height: 60vh;
    text-align: center;
    overflow-y: auto;
}

.libro img {
    width: 100%;
    border-radius: 5px;
}

.libro a {
    text-decoration: none;
    color: black;
    display: block;
}
.descripcion {
    margin-top: 10px;
}

.descripcion:hover{
    color: #ddd;
}
/* cada novela */

.nov body{
    display: grid;
    grid-template-columns: repeat(2,50%);
}   

.nov article{
    border: 0;
    background-color: #fff;
    align-items: center;
    margin-left: 100px;
}

/* Tebeos */



/* Foto */



.galefoto {
    display: flex;
    flex-direction: column;
    margin: 0;
    padding: 0;
    background-color: #f4f4f4;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
} 

.galeria {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 15px;
    max-width: 80%;
}
.galeria img {
    width: 100%;
    height: auto;
    border-radius: 8px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
    transition: transform 0.3s ease;
}


/* Lightbox */
.lightbox {
    display: none;
    position: fixed;
    z-index: 999;
    left: 0;
    top: 0;
    width: 100vw;
    height: 100vh;
    background-color: rgba(0, 0, 0, 0.8);
    justify-content: center;
    align-items: center;
}

.lightbox img {
    max-width: 90%;
    max-height: 90%;
    -o-object-fit: contain;
    object-fit: contain;
}

.lightbox .cerrar {
    position: absolute;
    top: 20px;
    right: 30px;
    font-size: 40px;
    color: white;
    cursor: pointer;
    font-weight: bold;
}

.galeria img {
    transition: transform 0.3s ease, box-shadow 0.3s ease;  
}

.galeria img:hover {
    transform: scale(1.05);
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.3);
}

/* Flechas de navegación */
.flecha {
    position: absolute;
    top: 50%;
    font-size: 60px;
    color: white;
    cursor: pointer;
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    user-select: none;
    padding: 10px;
    transform: translateY(-50%);
    transition: background-color 0.2s, opacity 0.3s;
    opacity: 0;
    pointer-events: none;
}

.lightbox:hover .flecha {
    opacity: 1;
    pointer-events: auto;
}

.flecha.izq {
    left: 30px;
}

.flecha.der {
    right: 30px;
}

.botonos {
    margin-top: 20px;
    display: flex;
    flex-direction: column;
    gap: 15px;
}
/* #fotoatras{
    ;
}
 */

/* Juegos */

/* Ill Petruccio */

/* publis */

.lista {
    max-width: 200px;
    background: white;
    padding: 15px;
    border-radius: 8px;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
}

.publis{
    grid-row-start: 3;
    grid-column-start: 2;
}

ul {
    display: flex;
    flex-direction: column;
    list-style-type: none;
    justify-content: center;
    padding: 0;
    align-items: center;
}

li {
    background: #e9ecef;
    margin: 5px 0;
    padding: 10px;
    border-radius: 5px;
    border: #00000071 1px solid;
    justify-content: center;
    width: 100%;
}

#bsk:hover {
    background: #0085ff;
    color: #ffffff;
}

#ins:hover {
    background: #f6007e;
    color: #ffffff;
}

#yt:hover {
    background: #f60002;
    color: #ffffff;
}

#fb:hover {
    background: #1773ea;
    color: #ffffff;
}

#kf:hover {
    background: #FF6433;
    color: #ffffff;
}

ul button {
    background: transparent;
    border: none;
    color: inherit;
    font-size: 1em;
    cursor: pointer;
    padding: 0;
    width: 100%;
}

/* Contacto */


#contacto{
    display: grid;
    gap: 0%;
    justify-content: space-between;
    align-items: center;
}

#contacto p {
    grid-row-start: 2;
    grid-column-start: 2;
    grid-row-end: 4;
    grid-column-end: 3;
}

#contacto article{
    grid-row-start: 1;
    grid-column-start: 2;    
    background-color: #ffffff00;
    color: #000000;
    border: none;
}

#contacto fieldset{
    grid-row-start: 3;
    grid-column-start: 2;
    grid-row-end: 6;
    grid-column-end: 6;
    display: flex;
    flex-direction: column;
    width: 100%;
}

#contacto input{
    size: 100%;
    padding: 8px;
    background-color: #cfcfcf;
    font-size: large;
    margin: 5px;
}

#contacto legend{
    width: 20%;
    display: flex;
    flex-direction: column;
    margin: 8px;
    font-size: 1.5em;
    text-align: center;
    padding: 8px;
}

#contacto fieldset{
    width: 50vh;
    height: 380px;
    padding: 8px;
}

#miFormulario button{
    grid-row-start: 6;
    grid-column-start: 4;
    border-radius: 5px;
    border: none;
    padding: 10px 20px;
    font-size: 18px;
    cursor: pointer;
    margin: 2px 0;
}

#contacto input:focus {
/*     width: 100%;
 */    background-color: #b6b6b6;
}

#cont h1{
    margin: 15px;
    padding: 0%;
}
#contacto .form-container {
    width: 600px;
    height: 800px;
    display: flex;
    flex-direction: column;
    justify-content: right;
    padding: 1%;
}

form {
    max-width: 600px;
    }

label {
    width: 100%;
    display: flex;
    margin-top: 10px;
    justify-items: left;
    justify-content: flex-start;
    }

textarea {
    width: 95%;
    padding: 8px;
    margin-top: 4px;
    }
    
.checkbox-group {
    display: flex;
    flex-direction: column;
    justify-content: right;
    flex-wrap: wrap;
    width: 500px;
    }

#contacto #submit{
    grid-row-start: 6;
    grid-column-start: 4;
}

fieldset a{
    padding: 0px 0px 0px 8px;
    border-radius: 0px;
    text-decoration: none;
    color: #af0c0c;
    font-size: 1em;
}

.footer{
    justify-self: center;
    margin: 1em;
    padding: 0%;
}

#message {
    margin: 0 15px;
}

#email {
    padding: 0 0 0 30px;
}

#botatnov{
    position: fixed; 
    bottom: 20px;
    left: 47%;
}

h2{
    padding-bottom: 25px;
}

.menucito {
    display: none;
}

.desplegable {
    padding: 3%;
}



/* ACACIA */

#acaciatit{
    text-transform: none;
    font-family: "Roboto", serif;
    font-size: 2.5rem;
    padding: 1%;
    margin: 1%;
}

.acaciasec{
    display: flex;
    flex-direction: column;
}

.acaciapar{
    font-size: 1.2em;
    grid-row-end: 3;
    color: #000000 !important;
    justify-content: center;
    align-items: center;
    padding: 1%;
}

#leeaca{
    height: 55px;
    align-items: center;
}

/* Este descenso a los infiernos del CSS viene patrocinado por mi poca disposición a mantener una estructura en condiciones una vez supero las 40 líneas */

.acacia{
    font-size: 1.2em;
    display: block;
    padding: 5%;
    background-color: #eee;   
    color: #000000;
    text-align: justify;
}

/* MODAL */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(0,0,0,0.6);
    }

.modal-contenido {
    background-color: #2a1318;
    color: #f5e6e8;
    margin: 10% auto;
    padding: 2rem;
    border: 1px solid #a77d85;
    width: 90%;
    max-width: 500px;
    border-radius: 10px;
    position: relative;
    }

.cerrar {
    color: #e99ca4;
    position: absolute;
    top: 0.8rem;
    right: 1rem;
    font-size: 1.8rem;
    font-weight: bold;
    cursor: pointer;
    }

.cerrar:hover {
    color: #ffffff;
    }

/* Responsive Design */


@media (max-width: 768px) {
    #nav {
        display: block;
    }
    
    #nav .desplegable {
        position: fixed;
        justify-content: end;
        background-color: transparent;
        border-radius: 5px;
    }
    
    #nav .menucito {
        display: block;
        padding: 2% 5%;
        border-bottom: 1px dotted #ffffff00;
    }
    #nav .desplegable a .despues{
        text-align: center;
        display: block;
        padding: 2% 5%;
        border-bottom: 1px dotted #ffffff00;
    }

    .desplegable div {
        max-height: 0;
        overflow: hidden;
        background-color: rgb(180, 180, 180);
        border-radius: 0 0 5px 5px;
    }

    .desplegable:hover .nav{
        background-color: rgb(148, 148, 148);
        color: #fff;
        box-shadow: 0 0 8px #222;
    }

    .desplegable:hover>a {
        border-bottom: 1px dotted #fff;
    }

    .desplegable:hover div {
        max-height: 400px;
    }

    .desplegable div a {
        display: block;
        padding: 2% 5%;
        border-top: 1px dotted #fff;
        border-bottom: 1px dotted #fff;
    }

    .desplegable div a:hover {
        background-color: rgb(0, 0, 0);
    }

        #titulo {
            font-size: 2.5rem;
        }
        
        .menu-toggle{
            display: flex;
            justify-self: center;
            padding: 5px;
            border-radius: 5px;
        }

        .menu-toggle:hover{
            color: #eee;
            justify-content: space-between;
            display: block;
            max-height: 150px;
            background-color: #000;
        }

        #inicio{
            display: block;
        }

        section {
            display: flex;
            flex-direction: column;
            padding: 10px;
        }

        article {
            padding: 15px;
        }

        h2{
            margin:  15px 0;
        }
    
        #inicio {
            grid-template-columns: 1fr; 
            text-align: center;
        }

        #titulo, #inicio h2, #inicio h3 {
            grid-column: 1 / 2; 
            text-align: center;
        }

        #retr {
            grid-column: 1 / 2; 
            grid-row: 6 / 7; 
            width: 100%;
            margin-top: 20px;
        }
        /* 
        #contacto article{
            grid-row-start: 3;
            grid-column-start: 2;    
            grid-column-end: 4;    
            background-color: #ffffff00;
            color: #000000;
            border: none;
            width: 100%; 
        }
        
    #contacto,
    #contacto .form-container,
    #contacto fieldset {
        padding: 10px;
        height: auto;
        width: 100%;
    }
    #contacto h1 {
        grid-row-start: 1;
        grid-column-start: 2;
        grid-column-end: 4;
        text-align: center;
        margin: 15px;
        padding: 15px;
    }
    #contacto fieldset {
        display: flex;
        flex-direction: column;
        width: 100%;
        margin: 0 0 25px 0;
    }
    

    .checkbox-group {
        width: 100%;
    }

    #miFormulario button,
    #contacto #submit {
        width: 100%;
        font-size: .8em;
    }
    
    .form-container h3{
        font-size: 1em;
        } */
        @media (max-width: 768px) {
           
        
            .checkbox-group {
                width: 90vh;
            }
        
            #contacto legend {
                font-size: 1.2em;
            }
        
            #miFormulario button,
            #contacto #submit {
                font-size: 16px;
                padding: 10px;
            }
        }
    #arriba{
        bottom: 25px;
        left: 30%;
    }

    li {
    grid-column-end: 4;
    grid-column-start: 1;
    width: 100%;
    display: flex;
    justify-content: center;
}
    li a{
        align-items: center;
    }

    @media (max-width: 480px) {
        #cont h1 {
            font-size: 1.5em;
        }
    
        label {
            font-size: 0.95em;
        }
        #cont article {
            max-width: 100vh;
            padding: 10px;
        }
        #contacto input,
        textarea {
            font-size: 1em;
        }
        #contacto fieldset {
            grid-column-start: 1;
            grid-column-end: 3;
                width: 90vh;
            }
        
            .checkbox-group {
                width: 90vh;
                height: 330
            }
        
            #contacto legend {
                font-size: 1.2em;
            }
        
            #miFormulario button,
            #contacto #submit {
                font-size: 16px;
                padding: 10px;
            }
        
        
    #arriba{
        bottom: 25px;
        left: 30%;
    }

    ul {
    grid-column-end: 5;
    grid-column-start: 2;
    width: 20vh;
    display: flex;
    justify-content: center;
}
    li a{
        align-items: center;
    }

}
}
/* Tengo que reconocer que este CSS es un desastre, pero es mi desastre y lo quiero así. */