/* ========================================
   GALLERY MODULE CSS
   Estilos específicos para Galería de Imágenes
   ======================================== */

/* ==========================================
   PHOTOGRAPHY PORTFOLIO GALLERY
   ========================================== */

.mfp-wrap.photography-portfolio-gallery {
		opacity: 0;
		transition: ease opacity 300ms;
}

#photographyLightbox {
		position: absolute;
		width: 100vw;
		height: 100vh;
		top: 50%;
		left: 50%;
		transform: translate3d(-50%, -50%, 0);
}

#photographyLightbox .mfp-close {
		background-color: #242E39;
		color: var(--light);
		top: 0;
		right: 0;
		opacity: 1;
}

#photographyLightbox .mfp-close:hover {
		opacity: 0.7;
}

#photographyLightbox .thumb-gallery {
		position: absolute;
		width: 100vw;
		height: 95vh;
		top: 50%;
		left: 50%;
		transform: translate3d(-50%, -50%, 0);
}

#photographyLightbox .owl-carousel .owl-item > div {
		position: relative;
		height: 95vh;
}

#photographyLightbox .owl-carousel .owl-item > div .img-thumbnail {
		position: absolute;
		top: 50%;
		left: 50%;
		width: 100%;
		padding: 0;
		border: none;
		background: transparent;
		text-align: center;
		transform: translate3d(-50%, -50%, 0);
}

#photographyLightbox .owl-carousel .owl-item img {
		display: inline-block !important;
		width: auto;
		max-width: 95vw;
		max-height: 90vh;
		box-shadow: 0px 0px 40px -10px #000;
}

#photographyLightbox .owl-carousel .owl-nav button.owl-prev,
#photographyLightbox .owl-carousel .owl-nav button.owl-next {
		border: 0 none;
		border-radius: 0;
		color: var(--light);
		height: 80px;
		line-height: 68px;
		margin-top: -20px;
		transition: all 0.3s ease;
}

#photographyLightbox .owl-carousel .owl-nav button.owl-prev:before,
#photographyLightbox .owl-carousel .owl-nav button.owl-next:before {
		font-family: simple-line-icons;
		content: "\e605";
		font-size: 11px;
}

#photographyLightbox .owl-carousel .owl-nav button.owl-next::before {
		font-family: simple-line-icons;
		content: "\e606";
}

/* ==========================================
   THUMBNAIL GALLERY - MINIATURAS
   ========================================== */

#photographyLightbox #thumbGalleryThumbs {
		width: 98%;
		height: 13vh;
		position: fixed;
		bottom: 0;
		left: 50%;
		transform: translateX(-50%);
}

#photographyLightbox #thumbGalleryThumbs:hover .owl-stage-outer, 
#photographyLightbox #thumbGalleryThumbs.show-thumbs .owl-stage-outer {
		opacity: 1;
		transform: translateY(0);
}

#photographyLightbox #thumbGalleryThumbs.boxed-thumbs:hover .owl-stage-outer {
		opacity: 1;
		transform: translateY(0);
}

#photographyLightbox #thumbGalleryThumbs.boxed-thumbs .owl-item > div {
		height: 20vh;
}

#photographyLightbox #thumbGalleryThumbs.boxed-thumbs .owl-item > div .img-thumbnail {
		height: 5.3vw;
		overflow: hidden;
		border: none;
		box-shadow: none;
}

#photographyLightbox #thumbGalleryThumbs.boxed-thumbs .owl-item img {
		width: auto;
		height: 100%;
		position: absolute;
		top: 50%;
		left: 50%;
		transform: translate3d(-50%, -50%, 0);
}

#photographyLightbox #thumbGalleryThumbs.full-proportion-thumbs:hover .owl-stage-outer {
		opacity: 1;
		transform: translateY(-32%);
}

#photographyLightbox #thumbGalleryThumbs.full-proportion-thumbs .owl-item.active-thumb {
		opacity: 0.5;
}

#photographyLightbox #thumbGalleryThumbs.full-proportion-thumbs .owl-item > div {
		height: 20vh;
}

#photographyLightbox #thumbGalleryThumbs.full-proportion-thumbs .owl-item > div .img-thumbnail {
		border: none;
		box-shadow: none;
		overflow: visible;
}

#photographyLightbox #thumbGalleryThumbs.full-proportion-thumbs .owl-item img {
		max-height: 20vh;
		box-shadow: none;
		height: auto;
		width: 100%;
}

#photographyLightbox #thumbGalleryThumbs .owl-stage-outer {
		opacity: 0;
		transform: translateY(100%);
		transition: ease all 300ms;
}

#photographyLightbox #thumbGalleryThumbs .owl-stage {
		margin: 0 auto;
}

#photographyLightbox #thumbGalleryThumbs .owl-item.active-thumb {
		opacity: 0.5;
}

#photographyLightbox #thumbGalleryThumbs .owl-item > div {
		height: 20vh;
}

#photographyLightbox #thumbGalleryThumbs .owl-item > div .img-thumbnail {
		height: 5.3vw;
		box-shadow: 0px 0px 50px -10px #000;
		overflow: hidden;
}

#photographyLightbox #thumbGalleryThumbs .owl-item img {
		width: 100%;
		height: auto;
		max-height: none;
		position: absolute;
		top: 50%;
		left: 50%;
		transform: translate3d(-50%, -50%, 0);
}

/* ==========================================
   PORTFOLIO SLIDER WITH THUMBS
   ========================================== */

#portfolioSliderWithThumbs {
		margin-top: 0;
}

#portfolioSliderWithThumbs #thumbGalleryDetail {
		height: 600px;
}

#portfolioSliderWithThumbs #thumbGalleryDetail .owl-nav {
		margin-top: 0;
}

#portfolioSliderWithThumbs #thumbGalleryDetail .owl-nav button.owl-prev,
#portfolioSliderWithThumbs #thumbGalleryDetail .owl-nav button.owl-next {
		border: 0 none;
		border-radius: 0;
		color: var(--light);
		height: 80px;
		line-height: 68px;
		margin-top: -20px;
		transition: all 0.3s ease;
}

#portfolioSliderWithThumbs #thumbGalleryDetail .owl-nav button.owl-prev:before,
#portfolioSliderWithThumbs #thumbGalleryDetail .owl-nav button.owl-next:before {
		font-family: simple-line-icons;
		content: "\e605";
		font-size: 11px;
}

#portfolioSliderWithThumbs #thumbGalleryDetail .owl-nav button.owl-next::before {
		font-family: simple-line-icons;
		content: "\e606";
}

#portfolioSliderWithThumbs #thumbGalleryDetail .owl-item > div {
		background-size: cover !important;
		width: 100%;
		height: 600px;
}

#portfolioSliderWithThumbs #thumbGalleryThumbs {
		height: 80px;
}

#portfolioSliderWithThumbs #thumbGalleryThumbs .owl-item.active-thumb {
		opacity: 0.5;
}

#portfolioSliderWithThumbs #thumbGalleryThumbs .owl-item > div {
		background-size: cover !important;
		width: 100%;
		height: 80px;
}

/* ==========================================
   THUMB GALLERY WRAPPER - PORTO STYLE
   ========================================== */

.thumb-gallery-wrapper .thumbnail-porto {
    transition: all 0.3s ease;
    border: 2px solid transparent;
    cursor: pointer;
}

.thumb-gallery-wrapper .thumbnail-porto:hover {
    border-color: var(--primary);
    transform: scale(1.05);
    box-shadow: 0 4px 15px var(--primary-rgba-30);
}

.thumb-gallery-wrapper .owl-item.selected .thumbnail-porto {
    border-color: var(--primary);
    box-shadow: 0 4px 15px var(--primary-rgba-40);
}

/* Owl Carousel Navigation para galería */
.thumb-gallery-detail .owl-nav {
    position: absolute;
    top: 50%;
    width: 100%;
    transform: translateY(-50%);
    pointer-events: none;
}

.thumb-gallery-detail .owl-nav .owl-prev,
.thumb-gallery-detail .owl-nav .owl-next {
    position: absolute;
    background: var(--warning) !important;
    color: white !important;
    border-radius: 50%;
    width: 45px;
    height: 45px;
    line-height: 41px;
    text-align: center;
    border: none;
    opacity: 0.8;
    transition: all 0.3s ease;
    pointer-events: all;
    font-size: 16px;
}

.thumb-gallery-detail .owl-nav .owl-prev {
    left: 15px;
}

.thumb-gallery-detail .owl-nav .owl-next {
    right: 15px;
}

.thumb-gallery-detail .owl-nav .owl-prev:hover,
.thumb-gallery-detail .owl-nav .owl-next:hover {
    opacity: 1;
    transform: scale(1.1);
}

/* ==========================================
   GALLERY GRID LAYOUTS
   ========================================== */

.gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 1.5rem;
    margin: 2rem 0;
}

.gallery-item {
    position: relative;
    overflow: hidden;
    border-radius: 12px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
    cursor: pointer;
}

.gallery-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
}

.gallery-item img {
    width: 100%;
    height: 250px;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.gallery-item:hover img {
    transform: scale(1.05);
}

.gallery-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.7);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.gallery-item:hover .gallery-overlay {
    opacity: 1;
}

.gallery-overlay i {
    color: white;
    font-size: 2rem;
}

/* ==========================================
   GALLERY FILTERS
   ========================================== */

.gallery-filters {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 1rem;
    margin: 2rem 0;
}

.gallery-filter-btn {
    padding: 0.5rem 1.5rem;
    border: 2px solid var(--primary);
    background: transparent;
    color: var(--primary);
    border-radius: 25px;
    font-weight: 600;
    transition: all 0.3s ease;
    cursor: pointer;
}

.gallery-filter-btn:hover,
.gallery-filter-btn.active {
    background: var(--primary);
    color: white;
    transform: translateY(-2px);
}

/* ==========================================
   GALLERY LIGHTBOX CUSTOM
   ========================================== */

.gallery-lightbox {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.9);
    z-index: 9999;
    display: none;
    align-items: center;
    justify-content: center;
}

.gallery-lightbox.active {
    display: flex;
}

.gallery-lightbox-content {
    position: relative;
    max-width: 90%;
    max-height: 90%;
}

.gallery-lightbox img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
}

.gallery-lightbox-close {
    position: absolute;
    top: -40px;
    right: 0;
    background: white;
    border: none;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    font-size: 1.5rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
}

.gallery-lightbox-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: white;
    border: none;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    font-size: 1.2rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
}

.gallery-lightbox-prev {
    left: -60px;
}

.gallery-lightbox-next {
    right: -60px;
}

/* ==========================================
   RESPONSIVE DESIGN
   ========================================== */

@media (max-width: 991px) {
		#photographyLightbox .thumb-gallery {
				transform: translate3d(-50%, -50%, 0);
		}
		#photographyLightbox .owl-carousel .owl-item img {
				box-shadow: 0px 0px 20px #000;
				max-width: 89vw;
		}
		#photographyLightbox #thumbGalleryThumbs .owl-item img {
				box-shadow: none;
		}
		#photographyLightbox #thumbGalleryThumbs .owl-stage-outer {
				display: none;
		}
}

@media (max-width: 767px) {
		#photographyLightbox .owl-carousel .owl-item img {
				max-width: 80vw;
		}
}

@media (max-width: 767px) {
    .thumb-gallery-thumbs .owl-item {
        margin-right: 8px;
    }

    .thumbnail-porto {
        height: 60px !important;
    }

    .gallery-grid {
        grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
        gap: 1rem;
    }

    .gallery-item img {
        height: 200px;
    }

    .gallery-filters {
        gap: 0.5rem;
    }

    .gallery-filter-btn {
        padding: 0.4rem 1rem;
        font-size: 0.9rem;
    }

    .gallery-lightbox-nav {
        width: 40px;
        height: 40px;
        font-size: 1rem;
    }

    .gallery-lightbox-prev {
        left: -50px;
    }

    .gallery-lightbox-next {
        right: -50px;
    }
}

@media (max-width: 576px) {
    .gallery-grid {
        grid-template-columns: 1fr;
    }

    .gallery-item img {
        height: 180px;
    }

    .gallery-lightbox-nav {
        display: none;
    }
}
