/* Custom Premium Gallery Styles */
:root {
    --transition-smooth: 0.4s cubic-bezier(0.165, 0.84, 0.44, 1);
}

/* Base Card Styling (Galerias Lisiting) */
.gallery-premium-card {
    transition: transform var(--transition-smooth), box-shadow var(--transition-smooth);
    border-radius: 12px;
}

.gallery-premium-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.1) !important;
}

/* Image Zoom Effect */
.card-img-zoom {
    overflow: hidden;
    border-radius: 12px 12px 0 0;
}

.card-img-zoom img {
    transition: transform 0.6s cubic-bezier(0.165, 0.84, 0.44, 1);
}

.gallery-premium-card:hover .card-img-zoom img {
    transform: scale(1.05);
}

/* Glassmorphism Panel for Internal Banner */
.glass-panel {
    background: rgba(255, 255, 255, 0.85);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.5);
    border-radius: 16px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.05);
}

.gp-hero {
    position: relative;
    border-radius: 18px;
    overflow: hidden;
    background: #eef2f7;
    box-shadow: 0 12px 34px rgba(17, 24, 39, 0.08);
    margin-bottom: 26px;
    min-height: 260px;
}

.gp-hero-media {
    position: absolute;
    inset: 0;
}

.gp-hero-open {
    width: 100%;
    height: 100%;
    border: 0;
    padding: 0;
    background: transparent;
    cursor: zoom-in;
    display: block;
}

.gp-hero-media img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transform: scale(1.02);
}

.gp-hero::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.1) 0%, rgba(255, 255, 255, 0.6) 55%, rgba(255, 255, 255, 0.92) 100%);
}

.gp-hero-content {
    position: relative;
    z-index: 2;
    padding: 22px;
    min-height: 260px;
    display: flex;
    align-items: flex-end;
}

.gp-hero-glass {
    background: rgba(255, 255, 255, 0.84);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    border: 1px solid rgba(255, 255, 255, 0.65);
    border-radius: 16px;
    box-shadow: 0 10px 30px rgba(17, 24, 39, 0.08);
    padding: 18px 18px 14px;
    max-width: 760px;
}

.gp-hero-title {
    margin: 0 0 10px 0;
    font-weight: 900;
    color: #111827;
    font-size: clamp(1.35rem, 2.5vw, 2.1rem);
    line-height: 1.12;
}

.gp-hero-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 10px 18px;
    color: #4b5563;
    font-size: 0.95rem;
    font-weight: 600;
}

.gp-hero-meta i {
    color: #ffb81c;
}

.gp-hero-actions {
    margin-top: 14px;
}

.gp-hero-back {
    border-radius: 12px;
}

.gp-photos {
    padding-top: 6px;
}

.gp-loadmore {
    display: flex;
    justify-content: center;
    margin-top: 16px;
}

.gp-loadmore-btn {
    border-radius: 999px;
    padding: 10px 18px;
}

/* Masonry Layout for Internal Images */
.masonry-grid {
    column-count: 1;
    column-gap: 20px;
}

.masonry-grid > div {
    break-inside: avoid;
    margin-bottom: 20px;
}

/* Masonry Breakpoints */
@media (min-width: 576px) {
    .masonry-grid {
        column-count: 2;
    }
}
@media (min-width: 992px) {
    .masonry-grid {
        column-count: 3;
    }
}

.masonry-item {
    border-radius: 10px;
    overflow: hidden;
    position: relative;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
    transition: transform var(--transition-smooth), box-shadow var(--transition-smooth);
}

.masonry-item:hover {
    transform: translateY(-3px) scale(1.01);
    box-shadow: 0 12px 25px rgba(0, 0, 0, 0.15);
}

.masonry-item img {
    display: block;
    width: 100%;
    height: auto;
    object-fit: cover;
}

/* Premium full-screen dark lightbox (Modal override) */
.modal-premium {
    background-color: rgba(15, 16, 21, 0.95);
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
}

#modalFoto.modal {
    z-index: 20000 !important;
}

.modal-backdrop {
    z-index: 19990 !important;
}

.modal-premium .modal-dialog {
    margin: 0;
}

.modal-premium .modal-content {
    background: transparent;
    border: none;
    box-shadow: none;
    height: 100%;
}

.modal-premium .modal-header {
    border-bottom: none;
    position: absolute;
    top: 15px;
    right: 15px;
    z-index: 1050;
    padding: 0;
}

.modal-premium .btn-close-white {
    filter: invert(1) grayscale(100%) brightness(200%);
    background-color: rgba(255,255,255,0.1);
    border-radius: 50%;
    padding: 12px;
    transition: background-color 0.3s;
}

.modal-premium .btn-close-white:hover {
    background-color: rgba(255,255,255,0.3);
}

.modal-premium .modal-body {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    padding: 20px;
    position: relative;
}

.modal-premium img#modalFotoImg {
    max-height: 90vh;
    max-width: 90vw;
    object-fit: contain;
    border-radius: 8px;
    box-shadow: 0 15px 50px rgba(0, 0, 0, 0.5);
    animation: zoomInLight 0.4s cubic-bezier(0.165, 0.84, 0.44, 1);
    cursor: zoom-in;
    user-select: none;
    -webkit-user-select: none;
    touch-action: none;
    will-change: transform;
}

.gp-lightbox-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 44px;
    height: 44px;
    border-radius: 999px;
    border: 1px solid rgba(255, 255, 255, 0.28);
    background: rgba(0, 0, 0, 0.35);
    color: #fff;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 34px;
    line-height: 1;
    padding: 0;
    cursor: pointer;
    transition: background-color 0.2s ease, transform 0.2s ease, opacity 0.2s ease;
    z-index: 2;
}

.gp-lightbox-nav:hover {
    background: rgba(0, 0, 0, 0.55);
    transform: translateY(-50%) scale(1.04);
}

.gp-lightbox-nav:disabled {
    opacity: 0.3;
    cursor: default;
}

.gp-lightbox-prev {
    left: 16px;
}

.gp-lightbox-next {
    right: 16px;
}

.gp-lightbox-counter {
    position: absolute;
    top: 16px;
    left: 16px;
    padding: 8px 10px;
    border-radius: 999px;
    background: rgba(0, 0, 0, 0.35);
    border: 1px solid rgba(255, 255, 255, 0.18);
    color: rgba(255, 255, 255, 0.92);
    font-weight: 700;
    font-size: 0.9rem;
    z-index: 2;
}

@media (max-width: 575.98px) {
    .gp-lightbox-nav {
        width: 40px;
        height: 40px;
        font-size: 30px;
    }

    .gp-lightbox-prev {
        left: 10px;
    }

    .gp-lightbox-next {
        right: 10px;
    }

    .gp-lightbox-counter {
        top: 10px;
        left: 10px;
        font-size: 0.85rem;
    }
}

@keyframes zoomInLight {
    from {
        opacity: 0;
        transform: scale(0.95);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

@media (max-width: 575.98px) {
    .gp-hero {
        min-height: 220px;
        margin-bottom: 18px;
    }

    .gp-hero-content {
        padding: 16px;
        min-height: 220px;
    }

    .gp-hero-glass {
        padding: 14px 14px 12px;
    }
}
