*{
    margin:0;
    padding:0;
    box-sizing:border-box;
    font-family:'Segoe UI',sans-serif;
    scroll-behavior:smooth;
}

body{
    background:#f8f1e7;
    color:#4b3832;
}

/* MENÚ */
nav{
    background:#cbb89d;
    display:flex;
    justify-content:space-between;
    align-items:center;
    padding:15px 50px;
    position:sticky;
    top:0;
    z-index:1000;
    box-shadow:0 2px 10px rgba(0,0,0,.2);
}

.logo{
    font-size:22px;
    font-weight:bold;
}

nav ul{
    display:flex;
    list-style:none;
    gap:25px;
}

nav a{
    text-decoration:none;
    color:#4b3832;
    font-weight:bold;
    transition:.3s;
}

nav a:hover{
    color:#8b5e34;
}

/* HERO */
.hero{
    height:90vh;
    display:flex;
    align-items:center;
    justify-content:center;
    text-align:center;
    background:
    linear-gradient(rgba(0,0,0,.45),rgba(0,0,0,.45)),
    url("imagenes/fondo-libros.jpg");
    background-size:cover;
    background-position:center;
    color:white;
}

.hero h1{
    font-size:4rem;
    margin-bottom:20px;
}

.hero p{
    font-size:1.4rem;
    max-width:800px;
    margin:auto;
}

/* BÚHO */
.buho{
    position:fixed;
    right:20px;
    bottom:20px;
    animation:flotar 3s infinite ease-in-out;
}

.buho img{
    width:140px;
}

@keyframes flotar{
    0%{transform:translateY(0);}
    50%{transform:translateY(-15px);}
    100%{transform:translateY(0);}
}

/* CARRUSEL */
.slider{
    width:90%;
    max-width:1200px;
    height:500px;
    margin:50px auto;
    overflow:hidden;
    border-radius:20px;
    box-shadow:0 0 20px rgba(0,0,0,.2);
}

.slides{
    display:flex;
    width:400%;
    animation:slide 18s infinite;
}

.slides img{
    width:25%;
    height:500px;
    object-fit:cover;
}

@keyframes slide{
    0%,20%{margin-left:0;}
    25%,45%{margin-left:-100%;}
    50%,70%{margin-left:-200%;}
    75%,100%{margin-left:-300%;}
}

/* SECCIONES */
section{
    padding:80px 10%;
}

.titulo{
    text-align:center;
    font-size:2.5rem;
    margin-bottom:40px;
    color:#8b5e34;
}

.cards{
    display:grid;
    grid-template-columns:repeat(auto-fit,minmax(300px,1fr));
    gap:30px;
}

.card{
    background:white;
    padding:25px;
    border-radius:15px;
    box-shadow:0 0 15px rgba(0,0,0,.1);
    transition:.4s;
}

.card:hover{
    transform:translateY(-10px);
}

.card h3{
    margin-bottom:15px;
    color:#8b5e34;
}

/* GALERÍA */
.galeria{
    display:grid;
    grid-template-columns:repeat(auto-fit,minmax(300px,1fr));
    gap:20px;
}

.galeria img{
    width:100%;
    height:250px;
    object-fit:cover;
    border-radius:15px;
    transition:.4s;
}

.galeria img:hover{
    transform:scale(1.05);
}

/* FOOTER */
footer{
    background:#cbb89d;
    text-align:center;
    padding:25px;
    font-size:18px;
    margin-top:40px;
}

footer p{
    margin:5px 0;
}

/* RESPONSIVE */
@media(max-width:768px){

    nav{
        flex-direction:column;
        gap:15px;
    }

    nav ul{
        flex-wrap:wrap;
        justify-content:center;
    }

    .hero h1{
        font-size:2.5rem;
    }

    .hero p{
        font-size:1.1rem;
    }

    .slider,
    .slides img{
        height:300px;
    }
}