/* ================================
   Portfolio Gallery Styles
   File: assets/css/portfolio-gallery.css
   ================================ */

/* Reset & Base Styles for Portfolio */
.mv-portfolio * {
    box-sizing: border-box;
}

/* Main Portfolio Section */
.mv-portfolio {
    padding: 80px 0;
    background: #fff;
    position: relative;
}

/* ================================
   CATEGORY FILTERS 
   ================================ */
.mv-portfolio__filters {
    margin-bottom: 60px;
}

.mv-filter {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 15px;
}

.mv-filter__btn {
    background: transparent;
    border: 2px solid #e6e6e6;
    color: #666;
    padding: 12px 30px;
    font-family: 'Prompt', sans-serif;
    font-size: 14px;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 1px;
    cursor: pointer;
    transition: all 0.3s ease;
    border-radius: 30px;
    position: relative;
    overflow: hidden;
}

.mv-filter__btn:hover,
.mv-filter__btn--active {
    background: #d4af37;
    border-color: #d4af37;
    color: #fff;
    transform: translateY(-2px);
}

.mv-filter__btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.2), transparent);
    transition: left 0.5s;
}

.mv-filter__btn:hover::before {
    left: 100%;
}

/* ================================
   GALLERY GRID 
   ================================ */
.mv-gallery {
    position: relative;
}

.mv-gallery__container {
    padding: 0 15px;
}

.mv-gallery__grid {
    display: grid;
    gap: 20px;
    margin-bottom: 60px;
}

/* Responsive Grid Layout */
/* Desktop: 3 columns */
@media (min-width: 992px) {
    .mv-gallery__grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

/* Tablet: 2 columns */
@media (min-width: 576px) and (max-width: 991px) {
    .mv-gallery__grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* Mobile: 1 column */
@media (max-width: 575px) {
    .mv-gallery__grid {
        grid-template-columns: 1fr;
        gap: 15px;
    }
}

/* ================================
   GALLERY ITEMS 
   ================================ */
.mv-gallery__item {
    position: relative;
    overflow: hidden;
    border-radius: 15px;
    cursor: pointer;
    background: #f8f8f8;
    opacity: 0;
    transform: translateY(30px);
    animation: fadeInUp 0.6s ease forwards;
}

.mv-gallery__item:nth-child(1) { animation-delay: 0.1s; }
.mv-gallery__item:nth-child(2) { animation-delay: 0.2s; }
.mv-gallery__item:nth-child(3) { animation-delay: 0.3s; }
.mv-gallery__item:nth-child(4) { animation-delay: 0.4s; }
.mv-gallery__item:nth-child(5) { animation-delay: 0.5s; }
.mv-gallery__item:nth-child(6) { animation-delay: 0.6s; }

@keyframes fadeInUp {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.mv-gallery__item--hidden {
    display: none;
}

.mv-gallery__image {
    width: 100%;
    height: 300px;
    object-fit: cover;
    transition: transform 0.4s ease;
    display: block;
}

.mv-gallery__item:hover .mv-gallery__image {
    transform: scale(1.1);
}

.mv-gallery__overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(45deg, rgba(212,175,55,0.9), rgba(212,175,55,0.7));
    opacity: 0;
    transition: all 0.4s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-direction: column;
}

.mv-gallery__item:hover .mv-gallery__overlay {
    opacity: 1;
}

.mv-gallery__play-btn {
    width: 70px;
    height: 70px;
    background: rgba(255,255,255,0.2);
    border: 2px solid #fff;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-size: 24px;
    margin-bottom: 20px;
    transform: scale(0.8);
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
}

.mv-gallery__item:hover .mv-gallery__play-btn {
    transform: scale(1);
    background: rgba(255,255,255,0.3);
}

.mv-gallery__info {
    text-align: center;
    color: #fff;
    transform: translateY(20px);
    transition: transform 0.4s ease 0.1s;
}

.mv-gallery__item:hover .mv-gallery__info {
    transform: translateY(0);
}

.mv-gallery__title {
    font-family: 'EB Garamond', serif;
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 5px;
    line-height: 1.3;
}

.mv-gallery__category {
    font-family: 'Prompt', sans-serif;
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 1px;
    opacity: 0.9;
    margin: 0;
}

/* ================================
   LOAD MORE BUTTON 
   ================================ */
.mv-gallery__load-more {
    text-align: center;
    margin-top: 40px;
}

.mv-btn {
    background: transparent;
    border: 2px solid #d4af37;
    color: #d4af37;
    padding: 15px 40px;
    font-family: 'Prompt', sans-serif;
    font-size: 14px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    cursor: pointer;
    transition: all 0.3s ease;
    border-radius: 30px;
    position: relative;
    overflow: hidden;
    min-width: 180px;
    height: 50px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.mv-btn:hover {
    background: #d4af37;
    color: #fff;
    transform: translateY(-2px);
    box-shadow: 0 10px 30px rgba(212,175,55,0.3);
}

.mv-btn__text {
    transition: opacity 0.3s ease;
}

.mv-btn__loader {
    position: absolute;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.mv-btn--loading .mv-btn__text {
    opacity: 0;
}

.mv-btn--loading .mv-btn__loader {
    opacity: 1;
}

.mv-spinner {
    width: 20px;
    height: 20px;
    border: 2px solid rgba(212,175,55,0.3);
    border-top: 2px solid #d4af37;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.mv-btn--hidden {
    display: none;
}

/* ================================
   LIGHTBOX MODAL 
   ================================ */
.mv-lightbox {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 9999;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.mv-lightbox--active {
    opacity: 1;
    visibility: visible;
}

.mv-lightbox__overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.95);
    backdrop-filter: blur(10px);
}

.mv-lightbox__container {
    position: relative;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.mv-lightbox__close {
    position: absolute;
    top: 30px;
    right: 30px;
    width: 50px;
    height: 50px;
    background: rgba(255,255,255,0.1);
    border: 2px solid rgba(255,255,255,0.3);
    border-radius: 50%;
    color: #fff;
    font-size: 24px;
    cursor: pointer;
    z-index: 10;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    backdrop-filter: blur(10px);
}

.mv-lightbox__close:hover {
    background: rgba(255,255,255,0.2);
    border-color: rgba(255,255,255,0.5);
    transform: rotate(90deg);
}

.mv-lightbox__nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 60px;
    height: 60px;
    background: rgba(255,255,255,0.1);
    border: 2px solid rgba(255,255,255,0.3);
    border-radius: 50%;
    color: #fff;
    font-size: 20px;
    cursor: pointer;
    z-index: 10;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    backdrop-filter: blur(10px);
}

.mv-lightbox__nav:hover {
    background: rgba(255,255,255,0.2);
    border-color: rgba(255,255,255,0.5);
    transform: translateY(-50%) scale(1.1);
}

.mv-lightbox__nav--prev {
    left: 30px;
}

.mv-lightbox__nav--next {
    right: 30px;
}

.mv-lightbox__content {
    max-width: 90vw;
    max-height: 90vh;
    text-align: center;
    position: relative;
}

.mv-lightbox__image {
    max-width: 100%;
    max-height: 70vh;
    object-fit: contain;
    border-radius: 10px;
    box-shadow: 0 20px 60px rgba(0,0,0,0.5);
    transform: scale(0.9);
    animation: lightboxImageIn 0.4s ease forwards;
}

@keyframes lightboxImageIn {
    to {
        transform: scale(1);
    }
}

.mv-lightbox__info {
    margin-top: 20px;
    color: #fff;
    text-align: center;
}

.mv-lightbox__title {
    font-family: 'EB Garamond', serif;
    font-size: 24px;
    font-weight: 600;
    margin-bottom: 8px;
    line-height: 1.3;
}

.mv-lightbox__category {
    font-family: 'Prompt', sans-serif;
    font-size: 14px;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: #d4af37;
    margin: 0;
}

.mv-lightbox__counter {
    position: absolute;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%);
    color: #fff;
    font-family: 'Prompt', sans-serif;
    font-size: 14px;
    background: rgba(0,0,0,0.5);
    padding: 8px 20px;
    border-radius: 20px;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255,255,255,0.1);
}

/* ================================
   LOADING SKELETON 
   ================================ */
.mv-gallery__skeleton {
    position: relative;
    overflow: hidden;
    border-radius: 15px;
    height: 300px;
    background: #f0f0f0;
}

.mv-gallery__skeleton::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.6), transparent);
    animation: skeleton-loading 1.5s infinite;
}

@keyframes skeleton-loading {
    0% { left: -100%; }
    100% { left: 100%; }
}

/* ================================
   RESPONSIVE DESIGN 
   ================================ */

/* Large Desktop */
@media (min-width: 1400px) {
    .mv-gallery__grid {
        gap: 25px;
    }
    
    .mv-gallery__image {
        height: 350px;
    }
}

/* Tablet Landscape */
@media (min-width: 768px) and (max-width: 991px) {
    .mv-portfolio {
        padding: 60px 0;
    }
    
    .mv-portfolio__filters {
        margin-bottom: 50px;
    }
    
    .mv-filter__btn {
        padding: 10px 25px;
        font-size: 13px;
    }
    
    .mv-gallery__image {
        height: 280px;
    }
}

/* Mobile Large */
@media (min-width: 576px) and (max-width: 767px) {
    .mv-portfolio {
        padding: 50px 0;
    }
    
    .mv-portfolio__filters {
        margin-bottom: 40px;
    }
    
    .mv-filter {
        gap: 10px;
    }
    
    .mv-filter__btn {
        padding: 8px 20px;
        font-size: 12px;
    }
    
    .mv-gallery__image {
        height: 250px;
    }
    
    .mv-gallery__title {
        font-size: 16px;
    }
}

/* Mobile Small */
@media (max-width: 575px) {
    .mv-portfolio {
        padding: 40px 0;
    }
    
    .mv-portfolio__filters {
        margin-bottom: 30px;
    }
    
    .mv-filter {
        gap: 8px;
        justify-content: center;
    }
    
    .mv-filter__btn {
        padding: 8px 16px;
        font-size: 11px;
        min-width: auto;
    }
    
    .mv-gallery__container {
        padding: 0 10px;
    }
    
    .mv-gallery__image {
        height: 220px;
    }
    
    .mv-gallery__title {
        font-size: 15px;
    }
    
    .mv-gallery__category {
        font-size: 11px;
    }
    
    .mv-btn {
        padding: 12px 30px;
        font-size: 13px;
        min-width: 150px;
        height: 45px;
    }
    
    /* Lightbox Mobile Adjustments */
    .mv-lightbox__close {
        top: 20px;
        right: 20px;
        width: 45px;
        height: 45px;
        font-size: 20px;
    }
    
    .mv-lightbox__nav {
        width: 50px;
        height: 50px;
        font-size: 18px;
    }
    
    .mv-lightbox__nav--prev {
        left: 20px;
    }
    
    .mv-lightbox__nav--next {
        right: 20px;
    }
    
    .mv-lightbox__content {
        max-width: 95vw;
        max-height: 95vh;
    }
    
    .mv-lightbox__image {
        max-height: 60vh;
    }
    
    .mv-lightbox__title {
        font-size: 20px;
    }
    
    .mv-lightbox__category {
        font-size: 12px;
    }
    
    .mv-lightbox__counter {
        bottom: 20px;
        font-size: 12px;
        padding: 6px 15px;
    }
}

/* ================================
   ANIMATION PERFORMANCE 
   ================================ */
.mv-gallery__item,
.mv-gallery__image,
.mv-gallery__overlay,
.mv-filter__btn,
.mv-btn {
    will-change: transform;
    transform: translateZ(0);
    backface-visibility: hidden;
}

/* ================================
   ACCESSIBILITY 
   ================================ */
.mv-filter__btn:focus,
.mv-btn:focus,
.mv-lightbox__close:focus,
.mv-lightbox__nav:focus {
    outline: 2px solid #d4af37;
    outline-offset: 2px;
}

/* Reduce motion for users who prefer it */
@media (prefers-reduced-motion: reduce) {
    .mv-gallery__item {
        animation: none;
        opacity: 1;
        transform: none;
    }
    
    .mv-gallery__image,
    .mv-gallery__overlay,
    .mv-filter__btn,
    .mv-btn {
        transition: none;
    }
    
    .mv-lightbox__image {
        animation: none;
        transform: none;
    }
}

/* High contrast mode support */
@media (prefers-contrast: high) {
    .mv-filter__btn {
        border-width: 3px;
    }
    
    .mv-gallery__overlay {
        background: rgba(0,0,0,0.9);
    }
    
    .mv-lightbox__overlay {
        background: rgba(0,0,0,0.98);
    }
}