.lightbox-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(10px);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 2000;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
    cursor: zoom-out;
}

.lightbox-overlay.active {
    opacity: 1;
    visibility: visible;
}

.lightbox-content {
    max-width: 90%;
    max-height: 90%;
    transform: scale(0.8);
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.5);
    border-radius: 12px;
    background: white;
    padding: 10px;
}

.lightbox-overlay.active .lightbox-content {
    transform: scale(1);
}

.lightbox-content.is-gallery {
    background: transparent;
    padding: 0;
    box-shadow: none;
    max-width: none;
    border-radius: 0;
}

.lightbox-content img,
.lightbox-content video {
    display: block;
    width: auto;
    height: auto;
    max-width: 100%;
    max-height: 85vh;
    border-radius: 8px;
    object-fit: contain;
}

.lightbox-close {
    position: absolute;
    top: 30px;
    right: 30px;
    width: 44px;
    height: 44px;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    color: white;
    font-size: 24px;
    display: flex;
    justify-content: center;
    align-items: center;
    cursor: pointer;
    transition: all 0.3s ease;
    z-index: 2001;
}

.lightbox-close:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: rotate(90deg);
}

.bento-card-img, .service-thumb, .testimonial-image {
    cursor: zoom-in;
}

.bento-card-img, .service-thumb {
    transition: transform 0.3s ease;
}

.bento-card-img:hover, .service-thumb:hover {
    transform: scale(1.02);
}

/* ===== Tercer cuadro: disparador de galería ===== */
.service-gallery-trigger {
    position: relative;
    cursor: pointer;
}
.service-gallery-trigger .service-thumb {
    filter: brightness(0.72) saturate(0.9);
}
.service-gallery-overlay {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 8px;
    text-align: center;
    padding: 12px;
    color: #fff;
    background: linear-gradient(180deg, rgba(15,25,23,0.15), rgba(15,25,23,0.55));
    transition: background 0.35s ease;
}
.service-gallery-trigger:hover .service-gallery-overlay {
    background: linear-gradient(180deg, rgba(15,25,23,0.25), rgba(15,25,23,0.7));
}
.service-gallery-overlay svg { width: 30px; height: 30px; }
.service-gallery-overlay .g-label {
    font-size: 13px;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}
.service-gallery-overlay .g-count {
    font-size: 11px;
    opacity: 0.85;
    font-weight: 500;
}
.service-gallery-corner {
    position: absolute;
    top: 10px;
    right: 10px;
    width: 26px;
    height: 26px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
    background: rgba(255,255,255,0.16);
    border: 1px solid rgba(255,255,255,0.28);
}
.service-gallery-corner svg { width: 15px; height: 15px; }

/* ===== Galería dentro del lightbox ===== */
.lightbox-gallery {
    background: #ffffff;
    padding: 26px;
    border-radius: 14px;
    width: min(92vw, 1040px);
    max-height: 88vh;
    overflow-y: auto;
    box-shadow: 0 30px 70px rgba(0,0,0,0.5);
}
.lightbox-gallery-head {
    display: flex;
    align-items: baseline;
    gap: 12px;
    margin: 0 0 18px;
    flex-wrap: wrap;
}
.lightbox-gallery-head h3 {
    margin: 0;
    font-size: 22px;
    font-weight: 800;
    color: #16241f;
    letter-spacing: 0.01em;
}
.lightbox-gallery-head span {
    font-size: 13px;
    color: #6b7a76;
    font-weight: 500;
}
.lightbox-gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 14px;
}
.lightbox-gallery-grid img {
    width: 100%;
    aspect-ratio: 4 / 5;
    object-fit: cover;
    border-radius: 10px;
    display: block;
    background: #f1efe9;
}
