/*
    creative.css
    Author: Sri Dharshan
    Description: Styles for the Creative Work standalone page
*/

/* ── PAGE HERO ───────────────────────────────────────────────── */
.creative-hero {
    padding: 8rem 1.5rem 3rem;
    max-width: 1280px;
    margin: 0 auto;
}
.creative-hero-inner { max-width: 640px; }

.page-hero-breadcrumb {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-family: 'Lexend', sans-serif;
    font-size: 0.75rem;
    color: rgba(255,255,255,0.35);
    margin-bottom: 1.5rem;
    letter-spacing: 0.05em;
}
.page-hero-breadcrumb a {
    color: rgba(255,255,255,0.35);
    transition: color 0.2s;
}
.page-hero-breadcrumb a:hover { color: rgba(255,255,255,0.7); }
.page-hero-breadcrumb i { font-size: 0.6rem; }

.creative-hero-title {
    font-family: 'Lexend', sans-serif;
    font-size: clamp(2.5rem, 6vw, 4.5rem);
    font-weight: 700;
    color: #fff;
    line-height: 1.05;
    letter-spacing: -0.02em;
    margin-bottom: 0.75rem;
}
.creative-hero-subtitle {
    font-size: 0.95rem;
    color: rgba(255,255,255,0.4);
    letter-spacing: 0.06em;
    font-family: 'Lexend', sans-serif;
}

/* ── FILTER BAR ──────────────────────────────────────────────── */
.creative-filter-bar {
    border-top: 1px solid rgba(255,255,255,0.06);
    border-bottom: 1px solid rgba(255,255,255,0.06);
    padding: 0.9rem 1.5rem;
    position: sticky;
    top: 70px;
    background: rgba(10,10,15,0.92);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    z-index: 10;
}

.creative-container {
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 1.5rem;
}

.creative-filter-bar .creative-container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 8px;
    padding: 0;
}

.filter-group {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.creative-filter-btn {
    font-family: 'Lexend', sans-serif;
    font-size: 0.75rem;
    letter-spacing: 0.04em;
    padding: 6px 16px;
    border-radius: 99px;
    border: 1px solid rgba(255,255,255,0.1);
    background: transparent;
    color: rgba(255,255,255,0.45);
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    gap: 6px;
}
.creative-filter-btn i { font-size: 0.7rem; }
.creative-filter-btn:hover {
    border-color: rgba(255,255,255,0.28);
    color: rgba(255,255,255,0.8);
}
.creative-filter-btn.active {
    background: #fff;
    color: #0a0a0f;
    border-color: #fff;
}

.item-count {
    font-family: 'Lexend', sans-serif;
    font-size: 0.72rem;
    color: rgba(255,255,255,0.25);
    letter-spacing: 0.05em;
    white-space: nowrap;
}

/* ── GALLERY SECTION ─────────────────────────────────────────── */
.gallery-section {
    padding: 3rem 0 6rem;
}

/* Masonry layout using CSS columns */
.masonry-grid {
    columns: 3;
    column-gap: 1rem;
}
@media (max-width: 1024px) { .masonry-grid { columns: 2; } }
@media (max-width: 560px)  { .masonry-grid { columns: 1; } }

/* ── GALLERY ITEM ────────────────────────────────────────────── */
.gallery-item {
    break-inside: avoid;
    margin-bottom: 1rem;
    border-radius: 14px;
    overflow: hidden;
    position: relative;
    cursor: pointer;
    display: block;
    background: rgba(255,255,255,0.03);
    border: 1px solid rgba(255,255,255,0.06);
    transition: border-color 0.3s ease, transform 0.3s ease;
}
.gallery-item:hover {
    border-color: rgba(255,255,255,0.18);
    transform: translateY(-3px);
}
.gallery-item[data-hidden="true"] { display: none; }

/* Media wrapper */
.gallery-media { display: block; overflow: hidden; }
.gallery-media img {
    width: 100%;
    display: block;
    transition: transform 0.55s cubic-bezier(0.4,0,0.2,1);
}
.gallery-item:hover .gallery-media img { transform: scale(1.05); }

/* Placeholder tiles (used until real images are added) */
.gallery-placeholder {
    width: 100%;
    aspect-ratio: 4/3;
    background: rgba(255,255,255,0.03);
    display: flex;
    align-items: center;
    justify-content: center;
    color: rgba(255,255,255,0.06);
    font-size: 2.5rem;
    background-image: repeating-linear-gradient(
        45deg,
        rgba(255,255,255,0.015) 0px,
        rgba(255,255,255,0.015) 1px,
        transparent 1px,
        transparent 24px
    );
}
.gallery-placeholder.tall  { aspect-ratio: 3/4; }
.gallery-placeholder.wide  { aspect-ratio: 16/7; }

/* Overlay */
.gallery-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(0,0,0,0.82) 0%, rgba(0,0,0,0.1) 55%, transparent 100%);
    opacity: 0;
    transition: opacity 0.3s ease;
    display: flex;
    align-items: flex-end;
    padding: 1.1rem;
}
.gallery-item:hover .gallery-overlay { opacity: 1; }

.gallery-cat {
    display: flex;
    align-items: center;
    gap: 5px;
    font-family: 'Lexend', sans-serif;
    font-size: 0.65rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: rgba(255,255,255,0.55);
    margin-bottom: 4px;
}
.gallery-title {
    font-family: 'Lexend', sans-serif;
    font-size: 0.92rem;
    font-weight: 600;
    color: #fff;
    line-height: 1.25;
}

/* Empty state */
.gallery-empty {
    display: none;
    text-align: center;
    padding: 5rem 0;
    color: rgba(255,255,255,0.2);
    font-size: 0.9rem;
}

/* ── LIGHTBOX ────────────────────────────────────────────────── */
.lightbox-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.92);
    z-index: 900;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
}
.lightbox-backdrop.open {
    opacity: 1;
    pointer-events: all;
}

.lightbox {
    position: fixed;
    inset: 0;
    z-index: 901;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
}
.lightbox.open {
    opacity: 1;
    pointer-events: all;
}

.lightbox-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1.25rem;
    max-width: 860px;
    width: 100%;
}

.lightbox-img-wrap {
    width: 100%;
    border-radius: 14px;
    overflow: hidden;
    background: rgba(255,255,255,0.04);
}
.lightbox-img-wrap img {
    width: 100%;
    display: block;
    max-height: 70vh;
    object-fit: contain;
}
.lightbox-img-wrap .gallery-placeholder {
    aspect-ratio: 16/9;
    width: 100%;
    border-radius: 0;
}

.lightbox-caption {
    text-align: center;
}
.lightbox-cat {
    font-family: 'Lexend', sans-serif;
    font-size: 0.68rem;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    color: rgba(255,255,255,0.35);
    display: block;
    margin-bottom: 6px;
}
.lightbox-title {
    font-family: 'Lexend', sans-serif;
    font-size: 1.1rem;
    font-weight: 600;
    color: #fff;
    margin-bottom: 4px;
}
.lightbox-desc {
    font-size: 0.82rem;
    color: rgba(255,255,255,0.42);
}

/* Lightbox buttons */
.lightbox-close,
.lightbox-prev,
.lightbox-next {
    position: fixed;
    background: rgba(255,255,255,0.06);
    border: 1px solid rgba(255,255,255,0.1);
    color: rgba(255,255,255,0.7);
    border-radius: 50%;
    width: 44px;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: background 0.2s, color 0.2s;
    font-size: 0.9rem;
}
.lightbox-close:hover,
.lightbox-prev:hover,
.lightbox-next:hover {
    background: rgba(255,255,255,0.14);
    color: #fff;
}

.lightbox-close { top: 5.5rem; right: 1.5rem; }
.lightbox-prev  { top: 50%; left: 1.5rem;  transform: translateY(-50%); }
.lightbox-next  { top: 50%; right: 1.5rem; transform: translateY(-50%); }

/* ── NAV ACTIVE STATE ────────────────────────────────────────── */
.nav-link.active { color: #fff !important; opacity: 1 !important; }

/* ── VIDEO SECTION ───────────────────────────────────────────── */
.video-section {
    display: none;
    /* padding: 3rem 0 6rem; */
    margin-top: -8rem;
}
.video-section.is-visible { display: block; }

.video-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.25rem;
    align-items: start;          /* prevents cards from stretching to row height */
}
@media (max-width: 1024px) { .video-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 560px)  { .video-grid { grid-template-columns: 1fr; } }

/* ── VIDEO CARD ──────────────────────────────────────────────── */
.video-card {
    border-radius: 14px;
    overflow: hidden;
    background: rgba(255,255,255,0.03);
    border: 1px solid rgba(255,255,255,0.06);
    /* single unified transition — no duplicate */
    transition: border-color 0.3s ease, transform 0.3s ease, opacity 0.45s ease;
    opacity: 0;
    transform: translateY(20px);
}
.video-card.is-visible {
    opacity: 1;
    transform: translateY(0);
}
.video-card:hover {
    border-color: rgba(255,255,255,0.18);
    transform: translateY(-3px);
}

/* Player wrapper — block so no inline gap below the video */
.video-card-player {
    display: block;
    position: relative;
    width: 100%;
    aspect-ratio: 16 / 9;       /* reserve space before Video.js loads */
    background: #0a0a0f;
    overflow: hidden;
}

/* Video.js element fills the wrapper exactly */
.video-card-player .video-js {
    position: absolute;
    inset: 0;
    width: 100% !important;
    height: 100% !important;
}

/* Video.js colour overrides — match dark theme */
.video-card .vjs-big-play-button {
    background: rgba(255,255,255,0.08) !important;
    border: 1px solid rgba(255,255,255,0.18) !important;
    border-radius: 50% !important;
    width: 52px !important;
    height: 52px !important;
    line-height: 52px !important;
    top: 50% !important;
    left: 50% !important;
    transform: translate(-50%, -50%) !important;
    margin: 0 !important;
    transition: background 0.2s !important;
}
.video-card .vjs-big-play-button:hover {
    background: rgba(255,255,255,0.18) !important;
}
.video-card .vjs-big-play-button .vjs-icon-placeholder:before {
    font-size: 1.4rem !important;
    line-height: 52px !important;
}
.video-card .vjs-control-bar {
    background: linear-gradient(to top, rgba(0,0,0,0.85), transparent) !important;
    padding: 0 4px !important;
}
.video-card .vjs-play-progress   { background: #fff !important; }
.video-card .vjs-load-progress   { background: rgba(255,255,255,0.12) !important; }
.video-card .vjs-slider          { background: rgba(255,255,255,0.18) !important; }
.video-card .vjs-volume-level    { background: #fff !important; }
.video-card .vjs-poster img      { object-fit: cover; }

/* Video placeholder tile — mirrors .gallery-placeholder */
.video-card-player .video-placeholder {
    position: absolute;
    inset: 0;
    background: rgba(255,255,255,0.03);
    background-image: repeating-linear-gradient(
        45deg,
        rgba(255,255,255,0.015) 0px,
        rgba(255,255,255,0.015) 1px,
        transparent 1px,
        transparent 24px
    );
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.6rem;
    color: rgba(255,255,255,0.12);
    font-family: 'Lexend', sans-serif;
}
.video-card-player .video-placeholder i    { font-size: 2rem; }
.video-card-player .video-placeholder span {
    font-size: 0.7rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

/* Card info strip */
.video-card-info { padding: 0.85rem 1rem; }
.video-card-cat {
    display: flex;
    align-items: center;
    gap: 5px;
    font-family: 'Lexend', sans-serif;
    font-size: 0.65rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: rgba(255,255,255,0.35);
    margin-bottom: 4px;
}
.video-card-title {
    font-family: 'Lexend', sans-serif;
    font-size: 0.88rem;
    font-weight: 600;
    color: #fff;
    margin-bottom: 3px;
    line-height: 1.3;
}
.video-card-desc {
    font-size: 0.75rem;
    color: rgba(255,255,255,0.35);
    font-family: 'Lexend', sans-serif;
}

/* ── RESPONSIVE ──────────────────────────────────────────────── */
@media (max-width: 768px) {
    .lightbox-prev { left: 0.5rem; }
    .lightbox-next { right: 0.5rem; }
    .lightbox-close { top: 1rem; right: 1rem; }
    .lightbox { padding: 1rem; }
}
