/* ============================================
   PROJECTS PAGE STYLES (Matching Awards Page Layout & Design System)
   ============================================ */

.project-page {
    background: #000000;
    color: #ffffff;
}

/* --- Hero Section --- */
.project-hero {
    padding: clamp(120px, 15vw, 190px) 5% 64px;
    max-width: 1440px;
    margin: 0 auto;
    text-align: center;
}

.project-hero h1 {
    max-width: 760px;
    margin: 0 auto;
    color: #ffffff;
    font-size: clamp(3rem, 7vw, 7rem);
    font-weight: 400;
    line-height: .92;
    letter-spacing: -0.04em;

}

.project-subtitle {
    max-width: 430px;
    margin: 24px auto 0;
    color: rgba(255, 255, 255, 0.72);
    font-size: clamp(.9rem, 1.2vw, 1.05rem);
    font-weight: 400;
    line-height: 1.55;
}

/* --- Project Filter Bar --- */
.project-filter-bar {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 12px;
    margin: 36px auto 16px;
    flex-wrap: wrap;
}

.filter-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: #121415;
    color: rgba(255, 255, 255, 0.85);
    border: 1px solid rgba(255, 255, 255, 0.26);
    padding: 11px 24px;
    font-family: 'DM Sans', sans-serif;
    font-size: 0.82rem;
    font-weight: 500;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    cursor: pointer;
    border-radius: 40px;
    transition: all 0.3s cubic-bezier(0.25, 1, 0.5, 1);
    outline: none;
    user-select: none;
}

.filter-btn:hover {
    background: #1c2022;
    border-color: rgba(255, 255, 255, 0.35);
    color: #ffffff;
    transform: translateY(-1px);
}

.filter-btn.active {
    background: #ffffff;
    color: #000000;
    border-color: #ffffff;
    box-shadow: 0 4px 16px rgba(255, 255, 255, 0.18);
}

.filter-btn .filter-count {
    display: inline-block;
    margin-left: 8px;
    padding: 2px 7px;
    font-size: 0.72rem;
    font-weight: 600;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.14);
    color: currentColor;
    transition: background 0.3s ease;
}

.filter-btn.active .filter-count {
    background: rgba(0, 0, 0, 0.15);
}

.project-divider {
    display: none;
    padding-top: 10px;
    height: 1px;
}

/* --- Project Grid --- */
.project-grid-section {
    padding: 0 2.6% 8%;
    max-width: 1600px;
    margin: 0 auto;
}

.project-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 24px;
    align-items: stretch;
}

.project-item {
    position: relative;
    display: flex;
    flex-direction: column;
    width: 100%;
    height: 100%;
    margin: 0;
    padding: 0;
    overflow: hidden;
    background: #0d0f0f;
    border: 1px solid rgba(255, 255, 255, .18);
    border-radius: 6px;
    color: #f4f3ef;
    text-align: left;
    cursor: pointer;
    text-decoration: none;
    transition: opacity 0.35s ease, transform 0.35s cubic-bezier(0.25, 1, 0.5, 1), border-color 0.35s ease, box-shadow 0.35s ease;
}

.project-item:hover {
    border-color: rgba(255, 255, 255, 0.5);
    transform: translateY(-3px);
    box-shadow: 0 12px 32px rgba(0, 0, 0, 0.6);
}

.project-item.hide-item {
    display: none !important;
}

.project-category-badge {
    position: absolute;
    top: 14px;
    right: 14px;
    z-index: 3;
    background: rgba(13, 15, 15, 0.82);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    color: #ffffff;
    font-family: 'DM Sans', sans-serif;
    font-size: 0.65rem;
    font-weight: 600;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    padding: 4px 10px;
    border-radius: 20px;
    border: 1px solid rgba(255, 255, 255, 0.35);
    pointer-events: none;
    transition: all 0.3s ease;
}

.project-item:hover .project-category-badge {
    background: rgba(0, 0, 0, 0.95);
    border-color: rgba(255, 255, 255, 0.45);
}

/* --- Image Container & Skeleton Loader --- */
.project-img-wrapper,
.mm-card-img {
    width: 100%;
    aspect-ratio: 16 / 14;
    height: auto;
    margin: 0;
    position: relative;
    flex: 1 1 auto;
    background-color: #121515;
    border-radius: 0;
    overflow: hidden;
    transition: filter .35s ease;
    contain: layout paint;
}

.project-img-wrapper::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(90deg, transparent 0%, rgba(255, 255, 255, 0.06) 50%, transparent 100%);
    background-size: 200% 100%;
    animation: shimmer 1.8s infinite linear;
    pointer-events: none;
    transition: opacity 0.4s ease;
    z-index: 1;
}

.project-img-wrapper.img-loaded::after {
    opacity: 0;
    animation: none;
}

@keyframes shimmer {
    0% {
        background-position: 200% 0;
    }

    100% {
        background-position: -200% 0;
    }
}

.project-img-wrapper img,
.mm-card-img img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    display: block;
    opacity: 0;
    filter: blur(8px);
    transition: opacity 0.5s cubic-bezier(0.25, 1, 0.5, 1), filter 0.5s cubic-bezier(0.25, 1, 0.5, 1), transform .7s var(--ease);
    will-change: opacity, filter, transform;
}

.project-img-wrapper img.loaded,
.mm-card-img img.loaded {
    opacity: 1;
    filter: blur(0);
}

.project-item:hover .project-img-wrapper img.loaded,
.mm-card:hover .mm-card-img img.loaded {
    transform: scale(1.045);
    filter: saturate(1.08) contrast(1.04);
}

/* Text Styles */
.project-item h3,
.mm-card-text h3 {
    display: none;
    margin: 0;
    padding: 18px 16px 4px;
    color: #f4f3ef;
    font-size: clamp(1.05rem, 1.6vw, 1.35rem);
    font-weight: 600;
    line-height: 1.15;
    text-align: left;
}

.project-item:hover h3,
.mm-card:hover .mm-card-text h3 {
    color: #fff;
}

.project-item p {
    display: none;
    margin: 0;
    padding: 0 16px 16px;
    color: rgba(244, 243, 239, .58);
    font-size: .86rem;
    line-height: 1.45;
}

.project-tag {
    display: none;
    padding: 0 16px 18px;
    color: rgba(244, 243, 239, .72);
    font-family: 'DM Sans', sans-serif;
    font-size: .7rem;
    font-weight: 500;
    letter-spacing: .12em;
    text-transform: uppercase;
}


/* Responsive */
@media (max-width: 768px) {
    .project-hero {
        padding: 96px 6% 42px;
    }

    .project-hero h1 {
        font-size: clamp(2.6rem, 13vw, 4.5rem);
        line-height: 1;
    }

    .project-subtitle {
        max-width: 34rem;
        margin-top: 18px;
        font-size: .92rem;
        line-height: 1.5;
    }

    .project-grid-section {
        padding: 0 4% 10%;
    }

    .project-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 16px;
    }

    .project-item h3 {
        padding: 12px 10px 4px;
        font-size: .9rem;
    }

    .project-item p {
        padding: 0 10px 12px;
        font-size: .8rem;
    }

    .project-tag {
        padding: 0 10px 12px;
        font-size: .7rem;
    }
}

@media (max-width: 520px) {
    .project-hero {
        padding: 88px 5% 34px;
    }

    .project-hero h1 {
        font-size: clamp(2.45rem, 15vw, 3.8rem);
    }

    .project-subtitle {
        max-width: 22rem;
        font-size: .86rem;
    }

    .project-grid-section {
        padding-right: 5%;
        padding-left: 5%;
    }

    .project-grid {
        grid-template-columns: 1fr;
        gap: 16px;
    }

}


/* ============================================
   FULL-PAGE LUXURY PROJECT LIGHTBOX / VIEWER
   ============================================ */

body.lightbox-open {
    overflow: hidden !important;
    touch-action: none;
}

.project-lightbox {
    position: fixed;
    inset: 0;
    z-index: 99999;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: opacity 0.35s cubic-bezier(0.25, 1, 0.5, 1), visibility 0.35s ease;
    background: rgba(0, 0, 0, 0.95);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    user-select: none;
    -webkit-user-select: none;
}

.project-lightbox.active {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
}

/* Backdrop */
.lightbox-backdrop {
    position: absolute;
    inset: 0;
    z-index: 1;
    cursor: zoom-out;
}

/* Header Bar */
.lightbox-header {
    position: relative;
    z-index: 10;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: max(16px, env(safe-area-inset-top, 16px)) 24px 12px;
    background: linear-gradient(180deg, rgba(0, 0, 0, 0.85) 0%, rgba(0, 0, 0, 0) 100%);
    pointer-events: auto;
}

.lightbox-counter {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-family: 'DM Sans', sans-serif;
    font-size: 0.88rem;
    font-weight: 500;
    letter-spacing: 0.08em;
    color: rgba(255, 255, 255, 0.75);
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.16);
    padding: 6px 14px;
    border-radius: 20px;
    backdrop-filter: blur(8px);
}

.lightbox-counter #lightboxCurrentIdx {
    color: #ffffff;
    font-weight: 700;
}

.lightbox-top-actions {
    display: flex;
    align-items: center;
    gap: 10px;
}

.lightbox-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    background: rgba(255, 255, 255, 0.08);
    color: #ffffff;
    border: 1px solid rgba(255, 255, 255, 0.2);
    width: 44px;
    height: 44px;
    border-radius: 50%;
    cursor: pointer;
    outline: none;
    transition: all 0.25s cubic-bezier(0.25, 1, 0.5, 1);
}

.lightbox-btn:hover {
    background: rgba(255, 255, 255, 0.2);
    border-color: rgba(255, 255, 255, 0.45);
    transform: scale(1.06);
}

.lightbox-btn:active {
    transform: scale(0.95);
}

.lightbox-jump-btn {
    width: auto;
    padding: 0 14px;
    border-radius: 24px;
    font-family: 'DM Sans', sans-serif;
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.lightbox-close-btn {
    background: rgba(255, 255, 255, 0.14);
    border-color: rgba(255, 255, 255, 0.32);
}

.lightbox-close-btn:hover {
    background: rgba(239, 68, 68, 0.3);
    border-color: #ef4444;
    color: #ffffff;
}

/* Stage Area (Image + Desktop Nav) */
.lightbox-stage {
    position: relative;
    z-index: 5;
    flex: 1 1 auto;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 10px 20px;
    min-height: 0;
    overflow: hidden;
}

.lightbox-image-wrap {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    max-width: 90vw;
    max-height: calc(100vh - 180px);
    width: 100%;
    height: 100%;
    pointer-events: auto;
}

.lightbox-main-img {
    max-width: 100%;
    max-height: 100%;
    width: auto;
    height: auto;
    object-fit: contain;
    border-radius: 4px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.85), 0 0 0 1px rgba(255, 255, 255, 0.1);
    opacity: 0;
    transform: scale(0.96);
    transition: opacity 0.3s ease, transform 0.3s cubic-bezier(0.25, 1, 0.5, 1);
    will-change: transform, opacity;
}

.lightbox-main-img.loaded {
    opacity: 1;
    transform: scale(1);
}

/* Spinner */
.lightbox-spinner {
    position: absolute;
    width: 44px;
    height: 44px;
    border: 3px solid rgba(255, 255, 255, 0.15);
    border-top-color: #ffffff;
    border-radius: 50%;
    animation: lbSpinner 0.8s linear infinite;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.2s ease;
    pointer-events: none;
}

.lightbox-spinner.show {
    opacity: 1;
    visibility: visible;
}

@keyframes lbSpinner {
    to { transform: rotate(360deg); }
}

/* Desktop Side Nav Arrows */
.lightbox-nav-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    z-index: 20;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(18, 20, 21, 0.78);
    color: #ffffff;
    border: 1px solid rgba(255, 255, 255, 0.24);
    width: 56px;
    height: 56px;
    border-radius: 50%;
    cursor: pointer;
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    transition: all 0.25s cubic-bezier(0.25, 1, 0.5, 1);
    pointer-events: auto;
    outline: none;
}

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

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

.lightbox-nav-btn:hover {
    background: rgba(255, 255, 255, 0.22);
    border-color: rgba(255, 255, 255, 0.5);
    transform: translateY(-50%) scale(1.08);
}

.lightbox-nav-btn:active {
    transform: translateY(-50%) scale(0.95);
}

/* Caption / Bottom Toolbar */
.lightbox-caption-bar {
    position: relative;
    z-index: 10;
    display: flex;
    flex-direction: column;
    gap: 6px;
    padding: 14px 24px max(18px, env(safe-area-inset-bottom, 18px));
    background: linear-gradient(0deg, rgba(0, 0, 0, 0.9) 0%, rgba(0, 0, 0, 0) 100%);
    pointer-events: auto;
    text-align: center;
}

.lightbox-caption-content {
    max-width: 820px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.lightbox-badge {
    display: inline-block;
    background: rgba(255, 255, 255, 0.12);
    color: #ffffff;
    font-family: 'DM Sans', sans-serif;
    font-size: 0.65rem;
    font-weight: 600;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    padding: 3px 10px;
    border-radius: 12px;
    margin-bottom: 6px;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.lightbox-title {
    margin: 0 0 4px;
    font-family: 'DM Sans', sans-serif;
    font-size: clamp(1rem, 1.8vw, 1.25rem);
    font-weight: 600;
    color: #ffffff;
    letter-spacing: -0.01em;
}

.lightbox-desc {
    margin: 0;
    font-size: 0.85rem;
    color: rgba(255, 255, 255, 0.7);
    line-height: 1.45;
    max-height: 48px;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Mobile Controls Row (Hidden on Desktop) */
.lightbox-mobile-controls {
    display: none;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-top: 6px;
    padding-top: 8px;
    border-top: 1px solid rgba(255, 255, 255, 0.12);
}

.lightbox-mobile-nav-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: rgba(255, 255, 255, 0.12);
    color: #ffffff;
    border: 1px solid rgba(255, 255, 255, 0.28);
    padding: 10px 20px;
    border-radius: 30px;
    font-family: 'DM Sans', sans-serif;
    font-size: 0.85rem;
    font-weight: 600;
    cursor: pointer;
    min-height: 44px;
    outline: none;
    touch-action: manipulation;
}

.lightbox-mobile-nav-btn:active {
    background: rgba(255, 255, 255, 0.25);
    transform: scale(0.96);
}

.lightbox-mobile-counter {
    font-family: 'DM Sans', sans-serif;
    font-size: 0.88rem;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.85);
}

/* Mobile Responsive Optimization (< 768px) */
@media (max-width: 768px) {
    .lightbox-header {
        padding: max(12px, env(safe-area-inset-top, 12px)) 16px 8px;
    }

    .lightbox-jump-btn {
        display: none !important;
    }

    .lightbox-nav-btn {
        display: none !important;
    }

    .lightbox-stage {
        padding: 4px 10px;
    }

    .lightbox-image-wrap {
        max-width: 96vw;
        max-height: calc(100vh - 210px);
    }

    .lightbox-caption-bar {
        padding: 10px 16px max(14px, env(safe-area-inset-bottom, 14px));
    }

    .lightbox-desc {
        display: none;
    }

    .lightbox-mobile-controls {
        display: flex;
    }
}