* {
    margin: 1;
    padding: 1;
    box-sizing: border-box;
}


body {
    font-family: Georgia, 'Times New Roman', Times, serif;
    line-height: 1.6;
    padding: 20px;
    background: #21BCFF;
    color: #e5e5e5;
}


header {
    background-image: url("imgs/snoopy1.webp");
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    color: #0b54c8;
    font-style: bold;
    padding: 60px 20px;
    text-align: center;
    border-radius: 8px;
    z-index: 1;
    overflow: hidden;
}


header::before {
    content: "";
    position: absolute;
    top: 0; left: 0;
    width: 100%; height: 100%;
    background: rgba(205, 217, 229, 0.3);
    z-index: -1;
}


header * {
    position: relative;
    z-index: 1;
}

nav ul {
    list-style: none;
    display: flex;
    justify-content: center;
    gap: 20px;
    padding: 10px 0;
}

nav ul li {
    display: inline;
    margin: 0 10px;
}


nav ul li a {
    color: #ffffff;
    text-decoration: none;
    font-weight: bold;
    font-size: 15px;
}


nav a {
    color: #e6e6e6;
    text-decoration: none;
    padding: 10px 15px;
    border-radius: 5px;
    transition: background 0.3s ease;
    text-align: center;
}


nav a:hover {
    background: #6456ff9c;
    color: #ffffff;
}

main {
    margin-top: 20px;
    text-align: center;
}

section {
    margin-bottom: 40px;
    padding: 20px;
    background: #6456ff9c;
    border-radius: 8px;
    text-align: center;
}


form {
    display: flex;
    flex-direction: column;
    gap: 10px;
}


input, textarea {
    padding: 10px;
    border: 1px solid #818eff;
    border-radius: 5px;
    text-align: center;
} 


button {
    background: #2070fb;
    color: #ffffff;
    border: none;
    padding: 10px;
    cursor: pointer;
    border-radius: 5px;
    transition: background 0.3s ease;
    text-align: center;
}


button:hover {
    background: #6456ff9c;
}


button#backToTop {
    background: #2070fb;
    color: #ffffff;
    border: none;
    padding: 10px;
    cursor: pointer;
    border-radius: 5px;
    transition: background 0.3s ease;
    text-align: center;
}


#backToTop {
    margin-top: 15px;
}

#backToTop {
    display: block;
    width: 100%;
    padding: 10px;
    background: #6456ff9c;
    color: #ffffff;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    transition: background 0.3s ease;
}

#backToTop:hover {
    background: #6456ff9c;
}


footer {
    text-align: center;
    margin-top: 40px;
    color: #ffffff;
}


html {
    scroll-behavior: smooth;
}

/*form + * {
    background: transparent !important;
    height: auto !important;
    margin: 0 !important;
    padding: 0 !important;
}*/

@media (max-width: 600px) {
    header h1 {
        font-size: 1.5rem;
    }

    nav ul {
        flex-direction: column;
        gap: 10px;
    }

    nav a {
        display: block;
        text-align: center;
    }

    section {
        padding: 15px;
    }

    input, textarea, button {
        font-size: 1rem;
    }
}


/* --- GALERÍA DE IMÁGENES --- */
#galeria {
    padding: 40px;
    text-align: center;
}

.gallery {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 20px;
}


/* Carrusel de imágenes */

@media (max-width: 768px) {
    .gallery {
        display: flex;
        overflow-x: auto;
        scroll-snap-type: x mandatory;
        -webkit-overflow-scrolling: touch;
        gap: 15px;
        padding-bottom: 20px;
    }

    .gallery-item {
        flex: 0 0 80%;
        scroll-snap-align: center;
    }

    .gallery-item img {
        width: 100%;
        border-radius: 10px;
    }
}

.gallery-item {
    text-align: center;
}

.gallery-item img {
    width: 100%;
    border-radius: 8px;
    transition: transform 0.3s ease;
    cursor: pointer;
}

.gallery-item img:hover {
    transform: scale(1.1);
}

.gallery-item p {
    margin-top: 8px;
    font-size: 14px;
}


/* --- LIGHTBOX --- */

.lightbox {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0; top: 0;
    width: 100%; height: 100%;
    background: rgba(0, 0, 0, 0.9);
    justify-content: center;
    align-items: center;
    flex-direction: column;
}

.lightbox img {
    max-width: 80%;
    max-height: 70%;
    margin-bottom: 10px;
}

.lightbox p {
    color: #fff;
    margin-bottom: 15px
}

.lightbox-controls {
    display: flex;
    gap: 10px;
}

.lightbox-controls button {
    padding: 8px 15px;
    background: #0066cc;
    color: white;
    border: none;
    border-radius: 5px;
    cursor: pointer;
}

.lightbox-controls button:hover {
    background: #004c99;
}

.close {
    position: absolute;
    top: 20px; right: 40px;
    font-size: 40px;
    color: white;
    cursor: pointer;
}
