/* css/portfolio.css - Portfolio Page & Project Detail Styles */

/* ========================================================
   1. PORTFOLIO PAGE STYLES (Fixed equal-size cards grid)
   ======================================================== */
.page-header {
    padding-top: 150px;
    padding-bottom: var(--space-md);
    text-align: center;
}

.filter-container {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 12px;
    margin-bottom: var(--space-lg);
}

.filter-btn {
    padding: 10px 22px;
    border: 1px solid var(--color-border);
    color: var(--color-text-secondary);
    border-radius: 30px;
    font-size: 0.85rem;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 1px;
    transition: var(--transition-fast);
    background: transparent;
    cursor: pointer;
    outline: none;
}

.filter-btn:hover,
.filter-btn.active {
    border-color: var(--color-accent);
    color: var(--color-accent);
    background: rgba(255, 212, 59, 0.05);
}

/* Portfolio Equal-Sized Card Grid */
.portfolio-cards-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
    gap: 30px;
    width: 100%;
}

@media (max-width: 768px) {
    .portfolio-cards-grid {
        grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
        gap: 20px;
    }
}

@media (max-width: 480px) {
    .portfolio-cards-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }
}

/* Equal Sized Project Card */
.project-card {
    display: flex;
    flex-direction: column;
    height: 100%;
    border-radius: 16px;
    overflow: hidden;
    background: rgba(255, 255, 255, 0.02);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid var(--color-border);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
    transition: transform 0.4s cubic-bezier(0.25, 1, 0.5, 1),
        box-shadow 0.4s cubic-bezier(0.25, 1, 0.5, 1),
        border-color 0.4s ease;
    text-decoration: none;
    cursor: pointer;
    outline: none;
}

.project-card:hover,
.project-card:focus-visible {
    transform: translateY(-8px);
    border-color: var(--color-accent);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.7), 0 0 25px rgba(255, 212, 59, 0.18);
}

/* Thumbnail Fixed Aspect Ratio */
.project-card-thumb {
    position: relative;
    width: 100%;
    aspect-ratio: 16 / 10;
    overflow: hidden;
    background: #0b0b0b;
}

.project-card-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.6s cubic-bezier(0.25, 1, 0.5, 1), filter 0.6s ease;
}

.project-card:hover .project-card-thumb img {
    transform: scale(1.06);
    filter: brightness(1.05);
}

/* Hover Dark Overlay & View Project Button */
.project-card-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(5, 5, 5, 0.88) 0%, rgba(5, 5, 5, 0.3) 60%, transparent 100%);
    opacity: 0;
    transition: opacity 0.35s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.project-card:hover .project-card-overlay {
    opacity: 1;
}

.view-project-btn {
    padding: 10px 24px;
    background: var(--color-accent);
    color: #050505;
    border-radius: 30px;
    font-size: 0.85rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    transform: translateY(12px);
    transition: transform 0.35s cubic-bezier(0.25, 1, 0.5, 1), background 0.2s ease;
    box-shadow: 0 4px 20px rgba(255, 212, 59, 0.35);
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.project-card:hover .view-project-btn {
    transform: translateY(0);
}

/* Project Card Content Body */
.project-card-body {
    padding: 24px;
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.project-card-category {
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 2px;
    color: var(--color-accent);
    margin-bottom: 6px;
    display: inline-block;
}

.project-card-title {
    font-family: var(--font-primary);
    font-size: 1.3rem;
    font-weight: 600;
    color: var(--color-text);
    margin-bottom: 8px;
    line-height: 1.3;
}

.project-card-desc {
    font-size: 0.92rem;
    color: var(--color-text-secondary);
    line-height: 1.55;
    margin-bottom: 18px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.project-card-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.82rem;
    color: #888888;
    border-top: 1px solid rgba(255, 255, 255, 0.06);
    padding-top: 14px;
    margin-top: auto;
}

/* ========================================================
   2. PROJECT DETAIL PAGE STYLES (Hero + Masonry Gallery)
   ======================================================== */
.detail-page-container {
    padding-top: 120px;
    padding-bottom: var(--space-lg);
}

.back-btn {
    background: transparent;
    color: var(--color-text);
    border: 1px solid var(--color-border);
    padding: 10px 24px;
    border-radius: 30px;
    cursor: pointer;
    font-size: 0.9rem;
    margin-bottom: var(--space-md);
    display: inline-flex;
    align-items: center;
    gap: 10px;
    transition: var(--transition-fast);
    text-decoration: none;
}

.back-btn:hover {
    border-color: var(--color-accent);
    color: var(--color-accent);
    background: rgba(255, 212, 59, 0.05);
}

/* Hero Banner */
.project-detail-hero {
    position: relative;
    width: 100%;
    height: 55vh;
    min-height: 360px;
    max-height: 560px;
    border-radius: 20px;
    overflow: hidden;
    margin-bottom: 40px;
    border: 1px solid var(--color-border);
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.6);
}

.project-detail-hero img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.project-detail-hero-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(5, 5, 5, 0.92) 0%, rgba(5, 5, 5, 0.3) 60%, transparent 100%);
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    padding: 40px;
}

@media (max-width: 768px) {
    .project-detail-hero {
        height: 40vh;
        min-height: 280px;
    }

    .project-detail-hero-overlay {
        padding: 24px;
    }
}

/* Detail Header Text Info */
.project-detail-info {
    max-width: 850px;
    margin: 0 auto 60px auto;
    text-align: center;
}

.detail-category-badge {
    color: var(--color-accent);
    text-transform: uppercase;
    letter-spacing: 3px;
    font-size: 0.85rem;
    font-weight: 600;
    margin-bottom: 12px;
    display: inline-block;
}

.detail-title {
    font-size: clamp(2.2rem, 4.5vw, 3.8rem);
    margin-bottom: 16px;
    color: #ffffff;
}

.detail-meta-pills {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 16px;
    color: var(--color-text-secondary);
    font-size: 0.95rem;
    margin-bottom: 24px;
}

.meta-pill {
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid var(--color-border);
    padding: 6px 16px;
    border-radius: 20px;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.meta-pill strong {
    color: var(--color-text);
}

.detail-description {
    font-size: 1.15rem;
    line-height: 1.8;
    color: var(--color-text-secondary);
    margin: 0 auto;
}

/* Detail Page Masonry Gallery */
.gallery-section-title {
    font-size: 1.8rem;
    margin-bottom: 24px;
    text-align: center;
    position: relative;
    padding-bottom: 12px;
}

.gallery-section-title::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 60px;
    height: 2px;
    background: var(--color-accent);
}

.detail-masonry-gallery {
    column-count: 3;
    column-gap: 20px;
    width: 100%;
}

@media (max-width: 992px) {
    .detail-masonry-gallery {
        column-count: 2;
        column-gap: 16px;
    }
}

@media (max-width: 576px) {
    .detail-masonry-gallery {
        column-count: 1;
        column-gap: 0;
    }
}

/* Masonry Gallery Item - Preserves ORIGINAL Aspect Ratio */
.gallery-item {
    break-inside: avoid;
    margin-bottom: 20px;
    border-radius: 14px;
    overflow: hidden;
    position: relative;
    cursor: pointer;
    border: 1px solid var(--color-border);
    background: rgba(255, 255, 255, 0.02);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.4);
    transition: transform 0.35s cubic-bezier(0.25, 1, 0.5, 1),
        box-shadow 0.35s cubic-bezier(0.25, 1, 0.5, 1),
        border-color 0.35s ease;
    outline: none;
}

.gallery-item img {
    width: 100%;
    height: auto;
    /* Keeps natural aspect ratio: portrait stays portrait, landscape stays landscape! */
    display: block;
    object-fit: contain;
    transition: transform 0.5s cubic-bezier(0.25, 1, 0.5, 1);
}

.gallery-item:hover,
.gallery-item:focus-visible {
    transform: translateY(-5px);
    border-color: var(--color-accent);
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.7), 0 0 20px rgba(255, 212, 59, 0.15);
}

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

.gallery-item-overlay {
    position: absolute;
    inset: 0;
    background: rgba(5, 5, 5, 0.45);
    backdrop-filter: blur(2px);
    opacity: 0;
    transition: opacity 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

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

.zoom-badge {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: var(--color-accent);
    color: #050505;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.3rem;
    transform: scale(0.7);
    transition: transform 0.3s cubic-bezier(0.25, 1, 0.5, 1);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.5);
}

.gallery-item:hover .zoom-badge {
    transform: scale(1);
}

/* ========================================================
   3. FULLSCREEN LIGHTBOX MODAL STYLES
   ======================================================== */
.lightbox-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(5, 5, 5, 0.95);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    z-index: 99999;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    align-items: center;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.35s cubic-bezier(0.25, 1, 0.5, 1), visibility 0.35s cubic-bezier(0.25, 1, 0.5, 1);
    padding: 20px;
    box-sizing: border-box;
    user-select: none;
}

.lightbox-modal.active {
    opacity: 1;
    visibility: visible;
}

.lightbox-header {
    width: 100%;
    max-width: 1200px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 0;
    z-index: 10;
}

.lightbox-counter {
    font-size: 0.85rem;
    letter-spacing: 2px;
    text-transform: uppercase;
    color: var(--color-accent);
    font-weight: 600;
}

.lightbox-close-btn {
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid var(--color-border);
    color: var(--color-text);
    width: 44px;
    height: 44px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
    cursor: pointer;
    transition: all 0.25s ease;
    outline: none;
}

.lightbox-close-btn:hover,
.lightbox-close-btn:focus-visible {
    background: var(--color-accent);
    color: #050505;
    border-color: var(--color-accent);
    transform: scale(1.1);
}

.lightbox-content {
    position: relative;
    width: 100%;
    max-width: 1200px;
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.lightbox-img-wrapper {
    position: relative;
    max-width: 90vw;
    max-height: 75vh;
    display: flex;
    align-items: center;
    justify-content: center;
}

.lightbox-img {
    max-width: 90vw;
    max-height: 75vh;
    width: auto;
    height: auto;
    object-fit: contain;
    border-radius: var(--radius-sm);
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.9);
    transition: transform 0.3s ease, opacity 0.3s ease;
    transform: scale(0.95);
    opacity: 0;
}

.lightbox-modal.active .lightbox-img {
    transform: scale(1);
    opacity: 1;
}

.lightbox-nav-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid var(--color-border);
    color: var(--color-text);
    width: 50px;
    height: 50px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    cursor: pointer;
    transition: all 0.25s ease;
    z-index: 10;
    backdrop-filter: blur(8px);
    outline: none;
}

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

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

.lightbox-nav-btn:hover,
.lightbox-nav-btn:focus-visible {
    background: var(--color-accent);
    color: #050505;
    border-color: var(--color-accent);
    transform: translateY(-50%) scale(1.1);
}

.lightbox-footer {
    width: 100%;
    max-width: 900px;
    text-align: center;
    padding: 12px 0 8px 0;
    z-index: 10;
}

.lightbox-title {
    font-family: var(--font-primary);
    font-size: 1.2rem;
    color: var(--color-text);
    margin-bottom: 4px;
}

.lightbox-meta {
    font-size: 0.85rem;
    color: var(--color-text-secondary);
}

@media (max-width: 768px) {
    .lightbox-nav-btn {
        width: 40px;
        height: 40px;
        font-size: 1.2rem;
    }

    .lightbox-prev-btn {
        left: 5px;
    }

    .lightbox-next-btn {
        right: 5px;
    }

    .lightbox-img {
        max-height: 65vh;
        max-width: 92vw;
    }

    .lightbox-title {
        font-size: 1rem;
    }
}

/* ========================================================
   4. CINEMATIC HIGHLIGHTS VIDEO SHOWCASE STYLES
   ======================================================== */
.cinematic-highlights-section {
    margin-bottom: 70px;
    padding: 20px 0;
}

.cinematic-section-header {
    text-align: center;
    max-width: 750px;
    margin: 0 auto 40px auto;
}

.cinematic-badge {
    display: inline-block;
    color: var(--color-accent);
    font-size: 0.8rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 3px;
    background: rgba(255, 212, 59, 0.08);
    border: 1px solid rgba(255, 212, 59, 0.25);
    padding: 6px 18px;
    border-radius: 30px;
    margin-bottom: 14px;
}

.cinematic-title {
    font-family: var(--font-primary);
    font-size: clamp(1.8rem, 3.5vw, 2.8rem);
    color: #ffffff;
    margin-bottom: 12px;
    position: relative;
    padding-bottom: 12px;
}

.cinematic-title::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 60px;
    height: 2px;
    background: var(--color-accent);
}

.cinematic-subtitle {
    font-size: 1rem;
    color: var(--color-text-secondary);
    line-height: 1.6;
}

/* Video Grid Layouts */
.cinematic-video-grid {
    display: grid;
    gap: 30px;
    width: 100%;
}

.cinematic-video-grid.single-video {
    max-width: 850px;
    margin: 0 auto;
    grid-template-columns: 1fr;
}

.cinematic-video-grid.two-videos {
    grid-template-columns: repeat(auto-fit, minmax(380px, 1fr));
}

/* Video Card Styling */
.video-card {
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid var(--color-border);
    border-radius: 18px;
    overflow: hidden;
    box-shadow: 0 12px 35px rgba(0, 0, 0, 0.5);
    transition: transform 0.4s cubic-bezier(0.25, 1, 0.5, 1),
        border-color 0.4s ease,
        box-shadow 0.4s ease;
}

.video-card:hover {
    transform: translateY(-6px);
    border-color: var(--color-accent);
    box-shadow: 0 20px 45px rgba(0, 0, 0, 0.7), 0 0 25px rgba(255, 212, 59, 0.15);
}

/* Video Thumbnail Container */
.video-thumbnail-container {
    position: relative;
    width: 100%;
    aspect-ratio: 16 / 9;
    background: #000;
    overflow: hidden;
    cursor: pointer;
}

.video-card-element {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.video-thumbnail-img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    z-index: 1;
    transition: transform 0.6s cubic-bezier(0.25, 1, 0.5, 1);
}

.video-card:hover .video-thumbnail-img,
.video-card:hover .video-card-element {
    transform: scale(1.05);
}

/* Play Button & Overlay */
.video-thumbnail-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.65) 0%, rgba(0, 0, 0, 0.2) 60%, rgba(0, 0, 0, 0.4) 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 2;
    transition: background 0.3s ease;
}

.video-card:hover .video-thumbnail-overlay {
    background: linear-gradient(to top, rgba(0, 0, 0, 0.75) 0%, rgba(0, 0, 0, 0.3) 60%, rgba(0, 0, 0, 0.5) 100%);
}

.play-btn-outer {
    width: 70px;
    height: 70px;
    border-radius: 50%;
    background: rgba(255, 212, 59, 0.95);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #050505;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.6), 0 0 20px rgba(255, 212, 59, 0.4);
    transition: transform 0.35s cubic-bezier(0.25, 1, 0.5, 1),
        background 0.35s ease,
        box-shadow 0.35s ease;
}

.play-btn-outer svg {
    width: 28px;
    height: 28px;
    fill: #050505;
    margin-left: 3px;
    transition: transform 0.3s ease;
}

.video-card:hover .play-btn-outer {
    transform: scale(1.12);
    background: var(--color-accent);
    box-shadow: 0 12px 35px rgba(0, 0, 0, 0.8), 0 0 30px rgba(255, 212, 59, 0.6);
}

.video-card:hover .play-btn-outer svg {
    transform: scale(1.1);
}

/* Video Card Info */
.video-info-body {
    padding: 22px 24px;
}

.video-title {
    font-family: var(--font-primary);
    font-size: 1.3rem;
    color: #ffffff;
    margin-bottom: 8px;
}

.video-desc {
    font-size: 0.92rem;
    color: var(--color-text-secondary);
    line-height: 1.55;
    margin-bottom: 12px;
}

.video-duration {
    font-size: 0.82rem;
    color: var(--color-accent);
    letter-spacing: 1px;
    font-weight: 500;
}

/* ========================================================
   5. FULLSCREEN VIDEO PLAYER MODAL STYLES
   ======================================================== */
.video-modal {
    position: fixed;
    inset: 0;
    z-index: 999999;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.35s ease, visibility 0.35s ease;
}

.video-modal.active {
    opacity: 1;
    visibility: visible;
}

.video-modal-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.92);
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
}

.video-modal-container {
    position: relative;
    width: 90%;
    max-width: 1100px;
    aspect-ratio: 16 / 9;
    z-index: 10;
    box-shadow: 0 25px 60px rgba(0, 0, 0, 0.9);
    border-radius: 16px;
    overflow: hidden;
    background: #000;
    border: 1px solid var(--color-border);
}

.video-modal-close {
    position: absolute;
    top: -50px;
    right: 0;
    background: rgba(255, 255, 255, 0.12);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: #fff;
    font-size: 2rem;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 20;
    transition: all 0.25s ease;
    line-height: 1;
}

@media (max-width: 768px) {
    .video-modal-close {
        top: 12px;
        right: 12px;
        background: rgba(0, 0, 0, 0.6);
    }
}

.video-modal-close:hover {
    background: var(--color-accent);
    color: #050505;
    border-color: var(--color-accent);
    transform: scale(1.1);
}

.video-player-wrapper {
    width: 100%;
    height: 100%;
}

.video-player-wrapper video,
.video-player-wrapper iframe {
    width: 100%;
    height: 100%;
    border: none;
    display: block;
    object-fit: contain;
}

/* Portfolio & Detail Mobile Responsiveness Overrides */
@media (max-width: 992px) {
    .masonry-gallery {
        columns: 2;
        column-gap: 16px;
    }

    .masonry-item {
        margin-bottom: 16px;
    }

    .project-info-grid {
        grid-template-columns: 1fr;
        gap: var(--space-md);
    }

    .cinematic-video-grid.two-videos {
        grid-template-columns: 1fr;
    }
}

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

    .portfolio-cards-grid {
        grid-template-columns: 1fr !important;
        gap: 20px;
    }

    .filter-container {
        display: flex;
        flex-wrap: wrap;
        justify-content: center;
        gap: 8px;
        margin-bottom: var(--space-md);
    }

    .filter-btn {
        min-height: 44px;
        padding: 8px 16px;
        font-size: 0.8rem;
    }

    .play-btn-outer {
        width: 56px;
        height: 56px;
    }

    .play-btn-outer svg {
        width: 22px;
        height: 22px;
    }

    .video-info-body {
        padding: 16px 18px;
    }

    .video-modal-container {
        width: 95%;
        border-radius: 12px;
    }

    .lightbox-nav-btn {
        width: 44px;
        height: 44px;
        font-size: 1.2rem;
    }

    .lightbox-prev-btn {
        left: 4px;
    }

    .lightbox-next-btn {
        right: 4px;
    }
}