body {
    margin: 0;
    font-family: Arial, Helvetica, sans-serif;
    background-color: #0f172a;
    color: #e5e7eb;
    line-height: 1.6;
}

/* Header */
header {
    background: linear-gradient(135deg, #020617, #1e293b);
    padding: 2rem;
    text-align: center;
}

header h1 {
    margin: 0;
    font-size: 2.5rem;
    color: #38bdf8;
}

header p {
    margin-top: 0.5rem;
    color: #cbd5f5;
}

/* Navigation */
nav {
    background-color: #020617;
    padding: 0.8rem;
    text-align: center;
}

nav a {
    color: #e5e7eb;
    text-decoration: none;
    margin: 0 1rem;
    font-weight: bold;
}

nav a:hover {
    color: #38bdf8;
}

/* Sections */
section {
    padding: 3rem 1.5rem;
    max-width: 1000px;
    margin: auto;
}

h2 {
    color: #38bdf8;
    margin-bottom: 1rem;
}

/* Cards */
.cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
}

.card {
    background-color: #020617;
    padding: 1.5rem;
    border-radius: 8px;
    border: 1px solid #1e293b;
}

/* Footer */
footer {
    background-color: #020617;
    text-align: center;
    padding: 1.5rem;
    font-size: 0.9rem;
    color: #94a3b8;
}

footer a {
    color: #38bdf8;
    text-decoration: none;
}
/* Galería */
.gallery {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
}

.gallery-img {
    width: 100%;
    border-radius: 8px;
    cursor: pointer;
    transition: transform 0.3s, box-shadow 0.3s;
}

.gallery-img:hover {
    transform: scale(1.05);
    box-shadow: 0 0 15px rgba(56, 189, 248, 0.4);
}

/* Lightbox */
#lightbox {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(2, 6, 23, 0.95);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 999;
}

#lightbox-img {
    max-width: 90%;
    max-height: 90%;
    border-radius: 10px;
}

#close {
    position: absolute;
    top: 20px;
    right: 30px;
    font-size: 3rem;
    color: #38bdf8;
    cursor: pointer;
}
/* =========================
   Optimización móvil
========================= */

@media (max-width: 768px) {

    header h1 {
        font-size: 2rem;
    }

    nav {
        display: flex;
        flex-wrap: wrap;
        justify-content: center;
        gap: 0.5rem;
    }

    nav a {
        margin: 0.3rem 0.6rem;
        font-size: 0.95rem;
    }

    section {
        padding: 2rem 1rem;
    }

    h2 {
        font-size: 1.5rem;
    }
}

/* =========================
   Galería móvil
========================= */

@media (max-width: 600px) {

    .gallery {
        grid-template-columns: repeat(2, 1fr);
        gap: 0.7rem;
    }

    .gallery-img {
        border-radius: 6px;
    }

    .gallery-img:hover {
        transform: none; /* Evita zoom molesto en móvil */
        box-shadow: none;
    }

    /* Lightbox */
    #lightbox-img {
        max-width: 95%;
        max-height: 80%;
    }

    #close {
        font-size: 2.5rem;
        top: 10px;
        right: 15px;
    }
}

/* Extra pequeño (móviles antiguos) */
@media (max-width: 400px) {
    .gallery {
        grid-template-columns: 1fr;
    }
}
