.iubello-gallery {
    position: relative;
    width: 100%;
    overflow: hidden;
    background: var(--color-blanco);
    padding: 3rem 0;
}
@media (min-width: 768px) {
    .iubello-gallery { padding: 4rem 0; }
}
.gallery__header {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1rem 2rem;
    text-align: center;
}
.gallery__title {
    margin: 0;
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--color-azul);
}
@media (min-width: 768px) {
    .gallery__title { font-size: 1.875rem; }
}
@media (min-width: 1024px) {
    .gallery__title { font-size: 2.25rem; }
}
.gallery__subtitle {
    max-width: 42rem;
    margin: 0.75rem auto 0;
    font-size: 1rem;
    color: rgba(15,15,15,0.7);
}
@media (min-width: 768px) {
    .gallery__subtitle { font-size: 1.125rem; }
}
.gallery__divider {
    width: 6rem;
    height: 4px;
    border-radius: 9999px;
    background: var(--color-azul);
    margin: 1rem auto 0;
}

/* Carousel */
.gallery__carousel-wrap {
    position: relative;
}
.gallery__nav {
    position: absolute;
    top: 50%;
    z-index: 20;
    transform: translateY(-50%);
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    border: 2px solid var(--color-azul);
    background: var(--color-blanco);
    padding: 0.5rem;
    color: var(--color-azul);
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    cursor: pointer;
    transition: all 0.3s ease;
}
@media (min-width: 768px) {
    .gallery__nav { padding: 0.75rem; }
}
.gallery__nav:hover {
    background: var(--color-azul);
    color: var(--color-blanco);
}
.gallery__nav:focus-visible {
    outline: 2px solid var(--color-azul);
    outline-offset: 2px;
}
.gallery__nav--prev { left: 0.5rem; }
@media (min-width: 768px) {
    .gallery__nav--prev { left: 1rem; }
}
.gallery__nav--next { right: 0.5rem; }
@media (min-width: 768px) {
    .gallery__nav--next { right: 1rem; }
}

.gallery__carousel {
    display: flex;
    gap: 1rem;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    padding: 0 2rem 1.5rem;
    scrollbar-width: none;
    -ms-overflow-style: none;
}
@media (min-width: 768px) {
    .gallery__carousel { gap: 1.5rem; padding: 0 4rem 1.5rem; }
}
.gallery__carousel::-webkit-scrollbar { display: none; }

.gallery__item {
    position: relative;
    flex-shrink: 0;
    width: 280px;
    aspect-ratio: 4/3;
    scroll-snap-align: center;
    overflow: hidden;
    border-radius: 0.5rem;
    border: 2px solid transparent;
    background: var(--color-blanco);
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    cursor: pointer;
    transition: all 0.3s ease;
    padding: 0;
}
@media (min-width: 768px) {
    .gallery__item { width: 380px; }
}
@media (min-width: 1024px) {
    .gallery__item { width: 450px; }
}
.gallery__item.is-active {
    border-color: var(--color-azul);
    box-shadow: 0 4px 16px rgba(0,0,0,0.15);
}
.gallery__item:hover {
    border-color: rgba(25,83,135,0.5);
    box-shadow: 0 4px 16px rgba(0,0,0,0.15);
}
.gallery__item:focus-visible {
    outline: 2px solid var(--color-azul);
    outline-offset: 2px;
}
.gallery__image {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}
.gallery__item:hover .gallery__image {
    transform: scale(1.05);
}
.gallery__item-overlay {
    position: absolute;
    inset: auto 0 0 0;
    background: linear-gradient(to top, rgba(15,15,15,0.8), rgba(15,15,15,0.5), transparent);
    padding: 1rem;
}
.gallery__item-title {
    margin: 0;
    font-size: 1rem;
    font-weight: 600;
    color: var(--color-blanco);
}
@media (min-width: 768px) {
    .gallery__item-title { font-size: 1.125rem; }
}
.gallery__item-caption {
    margin: 0.25rem 0 0;
    font-size: 0.875rem;
    color: rgba(245,245,245,0.9);
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.gallery__zoom {
    position: absolute;
    top: 0.75rem;
    right: 0.75rem;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: var(--color-azul);
    padding: 0.5rem;
    color: var(--color-blanco);
    box-shadow: 0 2px 8px rgba(0,0,0,0.2);
    opacity: 0;
    transition: opacity 0.3s ease;
}
.gallery__item:hover .gallery__zoom {
    opacity: 1;
}

/* Dots */
.gallery__dots {
    display: flex;
    justify-content: center;
    gap: 0.5rem;
    padding-top: 1rem;
}
.gallery__dot {
    height: 0.75rem;
    width: 0.75rem;
    border-radius: 9999px;
    background: rgba(25,83,135,0.3);
    border: none;
    cursor: pointer;
    transition: all 0.3s ease;
}
.gallery__dot:hover { background: rgba(25,83,135,0.5); }
.gallery__dot:focus-visible {
    outline: 2px solid var(--color-azul);
    outline-offset: 2px;
}
.gallery__dot.is-active {
    width: 2rem;
    background: var(--color-azul);
}
.gallery__counter {
    text-align: center;
    margin-top: 1rem;
    font-size: 0.875rem;
    color: rgba(15,15,15,0.6);
}

/* Lightbox */
.gallery__lightbox {
    position: fixed;
    inset: 0;
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(15,15,15,0.9);
}
.gallery__lightbox[hidden] { display: none; }

.gallery__lightbox-close {
    position: absolute;
    top: 1rem;
    right: 1rem;
    z-index: 10;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    border: 2px solid var(--color-blanco);
    background: rgba(15,15,15,0.5);
    padding: 0.75rem;
    color: var(--color-blanco);
    cursor: pointer;
    transition: all 0.3s ease;
}
.gallery__lightbox-close:hover {
    background: var(--color-blanco);
    color: var(--color-negro);
}
.gallery__lightbox-nav {
    position: absolute;
    top: 50%;
    z-index: 10;
    transform: translateY(-50%);
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    border: 2px solid var(--color-blanco);
    background: rgba(15,15,15,0.5);
    padding: 0.75rem;
    color: var(--color-blanco);
    cursor: pointer;
    transition: all 0.3s ease;
}
@media (min-width: 768px) {
    .gallery__lightbox-nav { padding: 1rem; }
}
.gallery__lightbox-nav:hover {
    background: var(--color-blanco);
    color: var(--color-negro);
}
.gallery__lightbox-nav--prev { left: 1rem; }
.gallery__lightbox-nav--next { right: 1rem; }

.gallery__lightbox-content {
    position: relative;
    width: 90vw;
    height: 75vh;
    max-width: 64rem;
}
.gallery__lightbox-image {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: contain;
}
.gallery__lightbox-caption {
    position: absolute;
    bottom: 1rem;
    left: 1rem;
    right: 1rem;
    border-radius: 0.5rem;
    background: rgba(245,245,245,0.95);
    padding: 1rem;
    text-align: center;
    box-shadow: 0 4px 12px rgba(0,0,0,0.2);
}
@media (min-width: 768px) {
    .gallery__lightbox-caption {
        left: auto;
        right: auto;
        bottom: 2rem;
        max-width: 42rem;
        left: 50%;
        transform: translateX(-50%);
    }
}
.gallery__lightbox-title {
    margin: 0;
    font-size: 1.125rem;
    font-weight: 700;
    color: var(--color-negro);
}
@media (min-width: 768px) {
    .gallery__lightbox-title { font-size: 1.25rem; }
}
.gallery__lightbox-text {
    margin: 0.25rem 0 0;
    font-size: 0.875rem;
    color: rgba(15,15,15,0.8);
}
@media (min-width: 768px) {
    .gallery__lightbox-text { font-size: 1rem; }
}
.gallery__lightbox-counter {
    margin: 0.5rem 0 0;
    font-size: 0.75rem;
    color: rgba(15,15,15,0.6);
}
