/* ============================================================
   NORBURN DESIGN - gallery-pages.css
   Shared styles for animation.html, motion-graphics.html,
   explainer-videos.html.
   Requires: ../css/style.css (base variables & components)
   ============================================================ */


/* ── Page Hero ─────────────────────────────────────────────── */
.page-hero {
    min-height: 54vh;
    background-color: var(--bg-dark);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-end;
    text-align: center;
    padding: calc(var(--nav-height) + 64px) 32px 0;
    position: relative;
    overflow: hidden;
}

.page-hero::before {
    content: '';
    position: absolute;
    inset: 0;
    background:
        radial-gradient(ellipse 75% 55% at 12% 115%, rgba(199,50,0,0.20) 0%, transparent 58%),
        radial-gradient(ellipse 55% 45% at 90% -5%,  rgba(199,50,0,0.10) 0%, transparent 55%);
    pointer-events: none;
    z-index: 0;
}

.page-hero__inner {
    position: relative;
    z-index: 1;
    max-width: 800px;
}

.page-hero__title {
    color: var(--white);
    margin-bottom: 20px;
}

.page-hero__sub {
    font-size: 1.05rem;
    color: rgba(255,255,255,0.70);
    line-height: 1.75;
    max-width: 600px;
    margin: 0 auto;
}

.page-hero__scroll-hint {
    margin-top: 48px;
    font-size: 1.4rem;
    color: var(--brand);
    animation: bounce 2s ease infinite;
    padding-bottom: 28px;
    position: relative;
    z-index: 1;
}

@keyframes bounce {
    0%, 100% { transform: translateY(0);    opacity: 0.55; }
    50%       { transform: translateY(8px); opacity: 1;    }
}


/* ── Discipline intro strip (below hero) ───────────────────── */
.discipline-intro {
    background-color: var(--bg-dark);
    border-top: 1px solid rgba(255,255,255,0.06);
    padding: 60px 40px 70px;
}

.discipline-intro__inner {
    max-width: 1060px;
    margin: 0 auto;
    display: flex;
    gap: 72px;
    align-items: flex-start;
}

.discipline-intro__text {
    /*flex: 1 1 500px;*/
}

.discipline-intro__text p {
    font-size: 1.05rem;
    color: rgba(255,255,255,0.70);
    line-height: 1.82;
    margin-bottom: 16px;
}

.discipline-intro__text p:last-child {
    margin-bottom: 0;
}

.discipline-intro__tags {
    flex: 0 0 280px;
    display: flex;
    flex-direction: column;
    gap: 0;
    align-self: center;
    border-left: 2px solid rgba(199,50,0,0.30);
    padding-left: 28px;
}

.discipline-intro__tags li {
    list-style: none;
    font-size: 0.82rem;
    font-weight: 600;
    letter-spacing: 2px;
    text-transform: uppercase;
    color: rgba(255,255,255,0.45);
    padding: 10px 0;
    border-bottom: 1px solid rgba(255,255,255,0.06);
    transition: color 0.2s ease;
}

.discipline-intro__tags li:last-child {
    border-bottom: none;
}

.discipline-intro__tags li::before {
    content: '◆ ';
    color: var(--brand);
    font-size: 0.5rem;
    vertical-align: middle;
    margin-right: 4px;
}


/* ── Filter bar ────────────────────────────────────────────── */
.filter-bar {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
    gap: 10px;
    padding: 44px 32px 0;
}

.filter-btn {
    display: inline-flex;
    align-items: center;
    height: 36px;
    padding: 0 20px;
    font-family: "IBM Plex Sans Condensed", "Arial Narrow", Arial, sans-serif;
    font-size: 0.78rem;
    font-weight: 600;
    letter-spacing: 2px;
    text-transform: uppercase;
    color: var(--ink-soft);
    background-color: transparent;
    border: 1.5px solid #ddd;
    border-radius: 3px;
    cursor: pointer;
    transition: border-color 0.2s ease, color 0.2s ease, background-color 0.2s ease;
}

.filter-btn:hover,
.filter-btn.active {
    border-color: var(--brand);
    color: var(--brand);
    background-color: rgba(199,50,0,0.04);
}

.filter-btn.active {
    background-color: var(--brand);
    color: var(--white);
}


/* ── Gallery section wrapper ───────────────────────────────── */
.gallery-section {
    padding: 40px 30px 90px;
}

.gallery-section .subtitle-heading {
    margin-bottom: 36px;
}

.gallery-section .subtitle-heading p {
    font-size: 0.95rem;
    color: var(--ink-soft);
}


/* ── Gallery grid ──────────────────────────────────────────── */
.video-gallery {
    display: flex;
    justify-content: center;
    align-items: stretch;
    flex-wrap: wrap;
    gap: 20px;
}

/* Featured card - spans wider */
.item-container--featured {
    flex: 1 1 560px;
    max-width: 700px;
}

/* Standard card */
.item-container {
    flex: 1 1 300px;
    max-width: 460px;
    min-height: 320px;
    border-radius: 4px;
    overflow: hidden;
    opacity: 0;
    transform: translateY(22px);
    animation: cardReveal 0.5s ease forwards;
    animation-timeline: view();
    animation-range: 50px 38%;
}

@keyframes cardReveal {
    to { opacity: 1; transform: translateY(0); }
}

/* Inner clickable wrapper */
.vidbg-container {
    position: relative;
    width: 100%;
    height: 100%;
    min-height: 320px;
    overflow: hidden;
    border: 1px solid var(--brand);
    border-radius: 4px;
    cursor: pointer;
    box-shadow: 0 4px 18px rgba(0,0,0,0.16);
    transition: box-shadow 0.3s ease;
}

.item-container--featured .vidbg-container {
    min-height: 420px;
}

.vidbg-container:hover {
    box-shadow: 0 10px 36px rgba(199,50,0,0.20);
}

.vidbg-container img,
.vidbg-container video {
    position: absolute;
    top: 50%;
    left: 50%;
    min-width: 100%;
    min-height: 100%;
    width: auto;
    height: auto;
    transform: translate(-50%, -50%);
    object-fit: cover;
    z-index: 0;
    transition: transform 0.5s ease;
}

.vidbg-container:hover img,
.vidbg-container:hover video {
    transform: translate(-50%, -50%) scale(1.04);
}

/* Dark gradient overlay */
.vidbg-container::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient( to top, rgba(17,19,24,0.86) 0%, rgba(17,19,24,0.16) 38%, rgba(17,19,24,0) 76.4% );
    z-index: 1;
    transition: opacity 0.3s ease;
}

/* Card overlay contents */
.card-overlay {
    position: absolute;
    inset: 0;
    z-index: 2;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 24px;
}

/* Play button */
.card-overlay__play {
    width: 60px;
    height: 60px;
    flex-shrink: 0;
    transition: opacity 0.3s ease, transform 0.3s ease;
}

.card-overlay__play svg {
    width: 100%;
    height: 100%;
    filter: drop-shadow(0 2px 8px rgba(0,0,0,0.5));
}

.vidbg-container:hover .card-overlay__play {
    opacity: 0;
    transform: scale(0.82);
}

/* Text content */
.card-overlay__content {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 20px 22px;
    opacity: 0;
    transform: translateY(8px);
    transition: opacity 0.3s ease, transform 0.3s ease;
}

.vidbg-container:hover .card-overlay__content {
    opacity: 1;
    transform: translateY(0);
}

.card-overlay__tag {
    display: inline-block;
    background-color: var(--brand);
    color: var(--white);
    font-size: 0.70rem;
    font-weight: 700;
    letter-spacing: 2px;
    text-transform: uppercase;
    padding: 3px 10px;
    border-radius: 2px;
    margin-bottom: 9px;
}

.card-overlay__content p {
    font-size: 0.88rem;
    color: rgba(255,255,255,0.88);
    line-height: 1.55;
    margin: 0;
}

/* Card label - always-visible title at bottom (replaces hover for labelling) */
.card-overlay__label {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 12px 18px;
    z-index: 2;
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 12px;
    transition: opacity 0.3s ease;
}

.vidbg-container:hover .card-overlay__label {
    opacity: 0;
}

.card-overlay__label-title {
    font-family: "Castoro Titling", Georgia, "Times New Roman", serif;
    font-size: 0.95rem;
    color: rgba(255,255,255,0.90);
    line-height: 1.2;
}

.card-overlay__label-type {
    font-size: 0.68rem;
    font-weight: 600;
    letter-spacing: 1.5px;
    text-transform: uppercase;
    color: rgba(199,50,0,0.90);
    flex-shrink: 0;
}

/* Focus styles */
.vidbg-container:focus-visible {
    outline: 3px solid var(--brand);
    outline-offset: 3px;
}

/* Hidden filter state */
.item-container[data-hidden="true"] {
    display: none;
}


/* ── Lightbox (mirrors about.css - consolidated here) ──────── */
.lightbox {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(10,10,12,0.97);
    z-index: 2000;
    justify-content: center;
    align-items: center;
    touch-action: none;
    flex-direction: column;
}

.lightbox-content {
    width: min(900px, 90vw);
    display: flex;
    flex-direction: column;
    align-items: center;
}

.lightbox-content video {
    width: 100%;
    display: block;
    border-radius: 3px;
    box-shadow: 0 20px 60px rgba(0,0,0,0.6);
}

.info-panel {
    width: 100%;
    padding: 18px 4px 0;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

#videoTitle {
    font-family: "Castoro Titling", Georgia, "Times New Roman", serif;
    font-size: 1.2rem;
    color: var(--white);
    margin: 0;
}

#videoCaption {
    font-size: 0.88rem;
    color: rgba(255,255,255,0.55);
    margin: 0;
    line-height: 1.5;
}

.loading-spinner {
    border: 3px solid rgba(255,255,255,0.12);
    border-top: 3px solid var(--brand);
    border-radius: 50%;
    width: 36px;
    height: 36px;
    animation: spin 0.9s linear infinite;
    position: absolute;
    display: none;
}

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

button {
    background: none;
    color: inherit;
    border: none;
    padding: 0;
    font: inherit;
    cursor: pointer;
    outline: inherit;
}

.prev-btn,
.next-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 52px;
    height: 52px;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: rgba(255,255,255,0.05);
    border-radius: 2px;
    transition: background-color 0.2s ease;
}

.prev-btn { left: 20px; }
.next-btn { right: 20px; }

.prev-btn:hover,
.next-btn:hover {
    background-color: rgba(199,50,0,0.50);
}

.chev-prev-icon-cross line,
.chev-next-icon-cross line {
    stroke: white;
    stroke-width: 3;
    stroke-linecap: round;
}

.close-btn {
    position: absolute;
    top: 0;
    right: 0;
    width: 52px;
    height: 52px;
    background-color: var(--brand);
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 0 0 0 3px;
    transition: background-color 0.2s ease;
}

.close-btn:hover {
    background-color: var(--brand-dark);
}

.close-icon-cross line {
    stroke: white;
    stroke-width: 2.5;
    stroke-linecap: round;
}


/* ── Responsive ────────────────────────────────────────────── */
@media (max-width: 900px) {
    .discipline-intro__inner {
        flex-direction: column;
        gap: 40px;
    }

    .discipline-intro__tags {
        border-left: none;
        border-top: 2px solid rgba(199,50,0,0.30);
        padding-left: 0;
        padding-top: 24px;
        flex-direction: column;
        flex-wrap: wrap;
        gap: 0 32px;
    }

    .discipline-intro__tags li {
        border-bottom: none;
        padding: 6px 0;
    }
}

@media (max-width: 720px) {
    .page-hero__title { font-size: 2rem; }
    .page-hero__sub   { font-size: 0.95rem; }

    .discipline-intro { padding: 48px 24px 56px; }

    .gallery-section { padding: 32px 16px 70px; }

    .item-container,
    .item-container--featured {
        flex: 1 1 100%;
        max-width: 100%;
        min-height: 280px;
    }

    .vidbg-container,
    .item-container--featured .vidbg-container {
        min-height: 280px;
    }

    /* Always show card text on touch devices */
    .card-overlay__content {
        opacity: 1;
        transform: translateY(0);
    }

    .card-overlay__play {
        width: 50px;
        height: 50px;
    }

    .filter-bar { padding: 32px 16px 0; }

    .prev-btn { left: 8px; }
    .next-btn { right: 8px; }

    .lightbox-content { width: 95vw; }
}
