* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Arial, sans-serif;
    line-height: 1.6;
    color: #2c3e50;
    background-color: #f4f8f5;
}

header {
    width: 100%;
    line-height: 0;
    box-shadow: 0 4px 12px rgba(30, 86, 49, 0.15);
}

.hero-img {
    display: block;
    width: 100%;
    height: auto;
}

main {
    max-width: 1200px;
    margin: 0 auto;
    padding: 50px 20px;
}

section {
    margin-bottom: 50px;
}

h2 {
    color: #1e5631;
    font-size: 1.8rem;
    margin-bottom: 20px;
    padding-bottom: 10px;
    border-bottom: 2px solid #2d8659;
}

.descripcion p {
    font-size: 1.1rem;
    text-align: justify;
    color: #4a5568;
    max-width: 900px;
}

.grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 24px;
}

.grid figure {
    overflow: hidden;
    border-radius: 10px;
    box-shadow: 0 2px 10px rgba(30, 86, 49, 0.12);
    background-color: #fff;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    display: flex;
    flex-direction: column;
}

.grid figure:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 20px rgba(30, 86, 49, 0.18);
}

.grid figure a {
    display: block;
    cursor: zoom-in;
}

.grid img {
    width: 100%;
    height: 220px;
    object-fit: cover;
    display: block;
    transition: transform 0.4s ease;
}

.grid figure:hover img {
    transform: scale(1.03);
}

.grid figcaption {
    padding: 14px 16px;
    font-size: 0.95rem;
    font-weight: 600;
    color: #1e5631;
    text-align: center;
    background-color: #fff;
    border-top: 1px solid #e6efe8;
}

/* Lightbox (solo CSS) */
.lightbox {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(10, 30, 15, 0.92);
    z-index: 1000;
    padding: 30px;
    text-align: center;
}

.lightbox:target {
    display: flex;
    align-items: center;
    justify-content: center;
}

.lightbox img {
    max-width: 95%;
    max-height: 90vh;
    border-radius: 8px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5);
}

.lightbox-close {
    position: absolute;
    top: 20px;
    right: 30px;
    width: 40px;
    height: 40px;
    background-color: rgba(255, 255, 255, 0.15);
    border-radius: 50%;
    text-decoration: none;
    cursor: pointer;
    transition: background-color 0.2s ease;
}

.lightbox-close:hover {
    background-color: rgba(255, 255, 255, 0.3);
}

.lightbox-close::before,
.lightbox-close::after {
    content: "";
    position: absolute;
    top: 50%;
    left: 50%;
    width: 20px;
    height: 2px;
    background-color: #fff;
}

.lightbox-close::before {
    transform: translate(-50%, -50%) rotate(45deg);
}

.lightbox-close::after {
    transform: translate(-50%, -50%) rotate(-45deg);
}

footer {
    background-color: #1e5631;
    color: #fff;
    text-align: center;
    padding: 22px 20px;
    margin-top: 40px;
    font-size: 0.95rem;
}

@media (max-width: 600px) {
    h2 {
        font-size: 1.5rem;
    }

    main {
        padding: 30px 16px;
    }

    .grid {
        gap: 18px;
    }

    .grid img {
        height: 180px;
    }

    .lightbox {
        padding: 10px;
    }

    .lightbox-close {
        top: 10px;
        right: 10px;
    }
}
