/* 
* Proyecto Inmobiliaria Riquelme - Condominio Doña Teresa
* Gallery section styles - ACTUALIZADO con navegación negra
*/

/* Gallery Section */
.gallery-section {
    background: linear-gradient(to bottom, #f9f9f9, #f0f0f0);
    position: relative;
    padding: 5rem 0;
    box-shadow: inset 0 5px 15px rgba(0,0,0,0.05);
}

.gallery-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: url('data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSI2MCIgaGVpZ2h0PSI2MCIgdmlld0JveD0iMCAwIDYwIDYwIj48cGF0aCBkPSJNMzAgMEM0Ni41NyAwIDYwIDEzLjQzIDYwIDMwQzYwIDQ2LjU3IDQ2LjU3IDYwIDMwIDYwQzEzLjQzIDYwIDAgNDYuNTcgMCAzMEMwIDEzLjQzIDEzLjQzIDAgMzAgMFpNMzAgMkMxNC41MzYgMiAyIDE0LjUzNiAyIDMwQzIgNDUuNDY0IDE0LjUzNiA1OCAzMCA1OEM0NS40NjQgNTggNTggNDUuNDY0IDU4IDMwQzU4IDE0LjUzNiA0NS40NjQgMiAzMCAyWiIgZmlsbD0iIzAwMDAwMCIgZmlsbC1vcGFjaXR5PSIwLjA1Ii8+PC9zdmc+');
    background-size: 60px;
    opacity: 0.05;
    pointer-events: none;
}

/* Filtros - Enhanced */
.gallery-filter-container {
    display: flex;
    justify-content: center;
    margin: 2rem 0 3rem;
}

.gallery-filter {
    display: flex;
    justify-content: center;
    background: #fff;
    border-radius: 50px;
    padding: 0.5rem;
    box-shadow: 0 5px 25px rgba(0,0,0,0.08);
    border: 1px solid rgba(212, 175, 55, 0.1);
}

.filter-btn {
    background: transparent;
    border: none;
    padding: 0.75rem 1.8rem;
    border-radius: 50px;
    color: #555;
    font-weight: 500;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.filter-btn:hover {
    color: var(--color-gold);
}

.filter-btn.active {
    background-color: var(--color-black);
    color: white;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
}

/* Imagen destacada - Enhanced */
.featured-gallery-container {
    position: relative;
    height: 550px;
    overflow: hidden;
    border-radius: 12px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.15);
    border: 1px solid rgba(255,255,255,0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.featured-gallery-container:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 40px rgba(0,0,0,0.2);
}

.featured-image {
    width: 100%;
    height: 100%;
    position: relative;
    overflow: hidden;
}

.featured-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 1s ease;
}

.featured-gallery-container:hover .featured-image img {
    transform: scale(1.05);
}

/* REMOVIDO caption según solicitud */
.featured-caption {
    display: none;
}

/* Miniaturas - Enhanced */
.gallery-thumbs-container {
    position: relative;
    padding: 0 50px;
    margin-top: 2rem;
}

.gallery-thumbs-scroll {
    overflow-x: auto;
    scrollbar-width: none;
    -ms-overflow-style: none;
    padding: 10px 0;
}

.gallery-thumbs-scroll::-webkit-scrollbar {
    display: none;
}

.gallery-thumbs {
    display: flex;
    gap: 20px;
    padding: 10px 5px;
}

.thumb-item {
    flex: 0 0 220px;
    height: 165px;
    border-radius: 10px;
    overflow: hidden;
    cursor: pointer;
    box-shadow: 0 6px 15px rgba(0,0,0,0.1);
    transition: all 0.4s cubic-bezier(0.165, 0.84, 0.44, 1);
    position: relative;
}

.thumb-item::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(to top, rgba(0,0,0,0.5) 0%, rgba(0,0,0,0) 60%);
    opacity: 0;
    transition: opacity 0.4s ease;
}

.thumb-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.6s cubic-bezier(0.165, 0.84, 0.44, 1);
}

.thumb-item:hover {
    transform: translateY(-8px);
    box-shadow: 0 12px 25px rgba(0,0,0,0.18);
}

.thumb-item:hover::after {
    opacity: 1;
}

.thumb-item:hover img {
    transform: scale(1.12);
}

.thumb-item.active {
    border: 3px solid var(--color-gold);
    box-shadow: 0 10px 25px rgba(212, 175, 55, 0.3);
}

/* Botones de navegación - ACTUALIZADO */
.gallery-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.9);
    color: var(--color-black);
    border: none;
    box-shadow: 0 4px 15px rgba(0,0,0,0.15);
    z-index: 2;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.gallery-nav:hover {
    background: var(--color-black);
    color: white;
    transform: translateY(-50%) scale(1.1);
}

.gallery-nav i {
    font-size: 18px;
}

.gallery-prev {
    left: 0;
}

.gallery-next {
    right: 0;
}

/* Modal - Enhanced */
.gallery-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(17, 17, 17, 0.95);
    z-index: 1000;
    overflow: hidden;
    backdrop-filter: blur(8px);
}

.gallery-modal.active {
    display: flex;
    align-items: center;
    justify-content: center;
    animation: modalFadeIn 0.4s ease forwards;
}

@keyframes modalFadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.gallery-modal-content {
    position: relative;
    width: 90%;
    max-width: 1300px;
    max-height: 90vh;
    display: flex;
    flex-direction: column;
    color: white;
}

.gallery-modal-close {
    position: absolute;
    top: -50px;
    right: 0;
    background: transparent;
    border: none;
    color: white;
    font-size: 28px;
    cursor: pointer;
    z-index: 1001;
    transition: transform 0.3s ease;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.gallery-modal-close:hover {
    transform: rotate(90deg);
}

.gallery-modal-image-container {
    width: 100%;
    height: 70vh;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(0,0,0,0.2);
    border-radius: 6px;
}

.gallery-modal-image-container img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    box-shadow: 0 10px 30px rgba(0,0,0,0.3);
}

.gallery-modal-nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 25px;
}

.gallery-modal-prev,
.gallery-modal-next {
    background: rgba(255,255,255,0.1);
    border: none;
    color: white;
    font-size: 20px;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.gallery-modal-prev:hover,
.gallery-modal-next:hover {
    background: var(--color-black);
    transform: scale(1.1);
}

/* REMOVIDO caption según solicitud */
.gallery-modal-caption {
    display: none;
}

.gallery-modal-thumbs {
    display: flex;
    gap: 15px;
    overflow-x: auto;
    margin-top: 25px;
    padding: 10px 0;
    scrollbar-width: thin;
    scrollbar-color: var(--color-black) rgba(255,255,255,0.2);
}

.gallery-modal-thumbs::-webkit-scrollbar {
    height: 6px;
}

.gallery-modal-thumbs::-webkit-scrollbar-track {
    background: rgba(255,255,255,0.1);
    border-radius: 10px;
}

.gallery-modal-thumbs::-webkit-scrollbar-thumb {
    background-color: var(--color-black);
    border-radius: 10px;
}

.modal-thumb-item {
    flex: 0 0 120px;
    height: 80px;
    border-radius: 6px;
    overflow: hidden;
    cursor: pointer;
    opacity: 0.5;
    transition: all 0.3s ease;
    box-shadow: 0 4px 10px rgba(0,0,0,0.2);
}

.modal-thumb-item.active {
    opacity: 1;
    border: 2px solid var(--color-gold);
    transform: scale(1.05);
}

.modal-thumb-item:hover {
    opacity: 0.8;
    transform: translateY(-3px);
}

.modal-thumb-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* Ver todas button - ACTUALIZADO */
#gallery-view-more {
    background: transparent;
    color: var(--color-black);
    border: 2px solid var(--color-black);
    border-radius: 50px;
    padding: 12px 30px;
    font-weight: 500;
    transition: all 0.3s ease;
    margin-top: 2rem;
    position: relative;
    overflow: hidden;
    z-index: 1;
}

#gallery-view-more::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 0%;
    height: 100%;
    background-color: var(--color-black);
    transition: all 0.3s ease;
    z-index: -1;
}

#gallery-view-more:hover {
    color: white;
}

#gallery-view-more:hover::before {
    width: 100%;
}

/* Media Queries */
@media (max-width: 991.98px) {
    .featured-gallery-container {
        height: 450px;
    }
    
    .thumb-item {
        flex: 0 0 180px;
        height: 140px;
    }
}

@media (max-width: 767.98px) {
    .featured-gallery-container {
        height: 350px;
    }
    
    .gallery-filter {
        flex-wrap: wrap;
    }
    
    .thumb-item {
        flex: 0 0 150px;
        height: 110px;
    }
    
    .gallery-modal-image-container {
        height: 60vh;
    }
}

@media (max-width: 575.98px) {
    .featured-gallery-container {
        height: 300px;
    }
    
    .filter-btn {
        padding: 0.5rem 1rem;
        font-size: 0.9rem;
    }
    
    .thumb-item {
        flex: 0 0 120px;
        height: 90px;
    }
}