/* ==========================================================================
   Split Showcase — multiscroll (Manon-style)
   Wheel events trigger section-by-section transitions.
   Left column slides DOWN, right column slides UP — no page scroll.
   ========================================================================== */

/* ── 1. Body — lock page scroll ──────────────────────────────── */

body.page-template-page-split-showcase {
    overflow: hidden !important;
    height: 100vh;
}

body.page-template-page-split-showcase .nova-main-container,
body.page-template-page-split-showcase .nova-site-content,
body.page-template-page-split-showcase #nova-content {
    padding: 0 !important;
    margin: 0 !important;
}

/* ── 1.b Header/menu smart contrast on split background ─────── */

body.page-template-page-split-showcase #nova-header {
    background: transparent !important;
    box-shadow: none !important;
}

/* Keep default theme colors unless JS marks an element as over dark side. */
body.page-template-page-split-showcase #nova-header .nova-primary-nav > li > a,
body.page-template-page-split-showcase #nova-header .nova-site-title a,
body.page-template-page-split-showcase #nova-header .nova-logo .custom-logo-link {
    transition: color 0.2s ease;
}

body.page-template-page-split-showcase #nova-header .nova-primary-nav > li > a.nvf-on-dark,
body.page-template-page-split-showcase #nova-header .nova-site-title a.nvf-on-dark,
body.page-template-page-split-showcase #nova-header .nova-logo .custom-logo-link.nvf-on-dark {
    color: #ffffff !important;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.35);
}

/* Smart logo swap: use alternate (e.g. white) logo only on dark zones. */
body.page-template-page-split-showcase #nova-header .nvf-logo-switch.nvf-has-alt-logo .nvf-logo-dark {
    display: none;
}

body.page-template-page-split-showcase #nova-header .nvf-logo-switch.nvf-has-alt-logo.nvf-on-dark .nvf-logo-light {
    display: none !important;
}

body.page-template-page-split-showcase #nova-header .nvf-logo-switch.nvf-has-alt-logo.nvf-on-dark .nvf-logo-dark {
    display: block !important;
}

body.page-template-page-split-showcase #nova-header .nvf-logo-switch.nvf-has-alt-logo:not(.nvf-on-dark) .nvf-logo-light {
    display: block !important;
}

body.page-template-page-split-showcase #nova-header .nvf-logo-switch.nvf-has-alt-logo:not(.nvf-on-dark) .nvf-logo-dark {
    display: none !important;
}

body.page-template-page-split-showcase #nova-header .nova-primary-nav > li > a.nvf-on-dark:after {
    background: #ffffff !important;
}

/* ── 2. Viewport — full screen below header ──────────────────── */

.nvf-split-showcase {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    top: 0;
    display: flex;
    z-index: 50;
    overflow: hidden;
}

body.admin-bar .nvf-split-showcase {
    top: 32px;
}

/* ── 3. Columns — each 50% width, absolute positioned ────────── */

.nvf-split-showcase__col {
    position: absolute;
    width: 50%;
    height: 100%;
    overflow: hidden;
}

.nvf-split-showcase__col--images {
    left: 0;
    top: 0;
    background: #0a0a0a;
}

.nvf-split-showcase__col--content {
    right: 0;
    top: 0;
}

/* ── 4. Tracks — animated via CSS transition ─────────────────── */

.nvf-split-showcase__track {
    will-change: transform;
    transition: transform 0.7s cubic-bezier(0.77, 0, 0.175, 1);
}

/* ── 5. Panels — each fills the full viewport height ─────────── */

.nvf-split-showcase__panel {
    position: relative;
    width: 100%;
    height: 100vh;
    overflow: hidden;
}

body.admin-bar .nvf-split-showcase__panel {
    height: calc(100vh - 32px);
}

/* ── 6. Image panels ─────────────────────────────────────────── */

.nvf-split-showcase__img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.nvf-split-showcase__img-placeholder {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
    font-size: clamp(6rem, 15vw, 12rem);
    font-weight: 200;
    color: rgba(255, 255, 255, 0.08);
    text-transform: uppercase;
    line-height: 1;
    user-select: none;
    background: linear-gradient(135deg, #1a1a1a, #2d2d2d);
}

/* ── 7. Content panels ──────────────────────────────────────── */

.nvf-split-showcase__col--content .nvf-split-showcase__panel {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: clamp(2rem, 5vw, 6rem);
    background: var(--nvf-showcase-accent, var(--nvf-color-surface, #fff));
}

.nvf-split-showcase__content-inner {
    max-width: 700px;
    width: 100%;
    padding: 0 clamp(1rem, 3vw, 2rem);
}

/* ── 8. Meta (type + year) ───────────────────────────────────── */

.nvf-split-showcase__meta {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.nvf-split-showcase__type,
.nvf-split-showcase__year {
    font-size: 0.75rem;
    font-weight: 500;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    color: var(--nvf-color-text-muted, #888);
}

.nvf-split-showcase__type {
    color: var(--nvf-color-text, #222);
}

.nvf-split-showcase__meta .nvf-split-showcase__year::before {
    content: "—";
    margin-right: 1rem;
    color: var(--nvf-color-text-muted, #888);
}

/* ── 9. Title ────────────────────────────────────────────────── */

.nvf-split-showcase__title {
    font-size: clamp(2rem, 4vw, 4rem);
    font-weight: 300;
    line-height: 1.1;
    letter-spacing: -0.02em;
    margin: 0 0 1.5rem;
    text-transform: uppercase;
}

.nvf-split-showcase__title a {
    color: inherit;
    text-decoration: none;
    background-image: linear-gradient(currentColor, currentColor);
    background-size: 0% 1px;
    background-position: 0 100%;
    background-repeat: no-repeat;
    transition: background-size 0.6s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.nvf-split-showcase__title a:hover {
    background-size: 100% 1px;
}

/* ── 10. Excerpt ─────────────────────────────────────────────── */

.nvf-split-showcase__excerpt {
    font-size: clamp(0.9rem, 1.1vw, 1.05rem);
    line-height: 1.7;
    color: var(--nvf-text-muted, #6b7280);
    margin-bottom: 2.5rem;
    max-width: 700px;
}

.nvf-split-showcase__excerpt p {
    margin: 0;
}

/* ── 11. Explore button ──────────────────────────────────────── */

.nvf-split-showcase__btn {
    display: inline-flex;
    align-items: center;
    gap: 0.75rem;
    font-size: 0.8rem;
    font-weight: 500;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    text-decoration: none;
    color: var(--nvf-color-text, #222);
    padding: 1rem 2rem;
    border: 1px solid currentColor;
    border-radius: 0;
    transition: all 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    position: relative;
    overflow: hidden;
    z-index: 1;
}

.nvf-split-showcase__btn::before {
    content: "";
    position: absolute;
    inset: 0;
    background: var(--nvf-color-text, #222);
    transform: scaleX(0);
    transform-origin: right;
    transition: transform 0.5s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    z-index: -1;
}

.nvf-split-showcase__btn:hover {
    color: var(--nvf-color-surface, #fff);
    border-color: var(--nvf-color-text, #222);
}

.nvf-split-showcase__btn:hover::before {
    transform: scaleX(1);
    transform-origin: left;
}

.nvf-split-showcase__btn svg {
    width: 20px;
    height: 20px;
    transition: transform 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.nvf-split-showcase__btn:hover svg {
    transform: translateX(4px);
}

/* ── 12. Navigation dots ─────────────────────────────────────── */

.nvf-split-showcase__nav {
    position: absolute;
    right: clamp(1rem, 2vw, 2.5rem);
    top: 50%;
    transform: translateY(-50%);
    display: flex;
    flex-direction: column;
    gap: 12px;
    z-index: 100;
}

.nvf-split-showcase__dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    border: 1px solid var(--nvf-color-text-muted, #999);
    background: transparent;
    padding: 0;
    cursor: pointer;
    position: relative;
    transition: border-color 0.3s ease;
}

.nvf-split-showcase__dot:hover {
    border-color: var(--nvf-color-text, #222);
}

.nvf-split-showcase__dot-fill {
    position: absolute;
    inset: 2px;
    border-radius: 50%;
    background: var(--nvf-color-text, #222);
    transform: scale(0);
    transition: transform 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.nvf-split-showcase__dot.is-active .nvf-split-showcase__dot-fill {
    transform: scale(1);
}

/* ── 13. Counter ─────────────────────────────────────────────── */

.nvf-split-showcase__counter {
    position: absolute;
    left: clamp(1rem, 2vw, 2.5rem);
    bottom: clamp(1.5rem, 3vh, 2.5rem);
    display: flex;
    align-items: baseline;
    gap: 0.3em;
    z-index: 100;
    font-size: 0.8rem;
    font-weight: 400;
    letter-spacing: 0.1em;
    color: var(--nvf-color-text-muted, #888);
    mix-blend-mode: difference;
    pointer-events: none;
}

.nvf-split-showcase__counter-current {
    font-size: 1.6rem;
    font-weight: 300;
    color: #fff;
    min-width: 2ch;
    text-align: right;
}

.nvf-split-showcase__counter-sep {
    font-weight: 200;
    opacity: 0.5;
}

/* ── 14. Scroll hint  (same design as Nova Hero block) ─────── */

.nvf-split-showcase__scroll-hint {
    position: absolute;
    bottom: clamp(24px, 4vh, 48px);
    /* Anchor to the image column center (left 25%) instead of full-width center */
    left: 25%;
    transform: translateX(-50%);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    z-index: 100;
    opacity: 1;
    transition: opacity 0.6s ease;
    pointer-events: none;
}

.nvf-split-showcase__scroll-hint.is-hidden {
    opacity: 0;
}

.nvf-split-showcase__scroll-hint-text {
    font-size: 0.65rem;
    font-weight: 500;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    color: rgba(255, 255, 255, 0.6);
}

.nvf-split-showcase__scroll-hint-line {
    width: 24px;
    height: 40px;
    border: 1.5px solid rgba(255, 255, 255, 0.35);
    border-radius: 12px;
    position: relative;
    background: none;
    animation: none;
}

.nvf-split-showcase__scroll-hint-line::after {
    content: "";
    position: absolute;
    top: 6px;
    left: 50%;
    transform: translateX(-50%);
    width: 3px;
    height: 8px;
    border-radius: 3px;
    background: rgba(255, 255, 255, 0.85);
    animation: nvf-scroll-dot 2s cubic-bezier(.4, 0, .6, 1) infinite;
}

@keyframes nvf-scroll-dot {
    0%   { top: 6px;  opacity: 1; }
    50%  { top: 22px; opacity: 0.3; }
    100% { top: 6px;  opacity: 1; }
}

/* ── 15. Header — transparent over slider ─────────────────────── */

body.page-template-page-split-showcase #nova-header,
body.page-template-page-split-showcase .header-main {
    z-index: 200;
    background: transparent !important;
    box-shadow: none !important;
}

body.page-template-page-split-showcase .nvf-topbar {
    display: none !important;
}

/* Logo + desktop nav: always over left (dark) image column → white */
body.page-template-page-split-showcase .nova-logo,
body.page-template-page-split-showcase .nova-logo a,
body.page-template-page-split-showcase .nova-site-title,
body.page-template-page-split-showcase .nova-primary-nav > li > a {
    color: #fff !important;
}

body.page-template-page-split-showcase .nova-primary-nav > li:hover > a,
body.page-template-page-split-showcase .nova-primary-nav > li.current-menu-item > a {
    color: rgba(255, 255, 255, 0.7) !important;
}

/* Header actions + burger: consistent across light / dark mode
   Light mode: dark icons on light content column
   Dark mode : light icons on dark content column                  */
body.page-template-page-split-showcase .nova-header-actions button,
body.page-template-page-split-showcase .nova-burger-menu {
    color: var(--nvf-color-text, #111827) !important;
}

body.page-template-page-split-showcase .nova-burger-menu {
    background: var(--nvf-color-bg, #ffffff) !important;
    border-color: var(--nvf-color-border, #e5e7eb) !important;
}

body.page-template-page-split-showcase .nova-burger-menu span {
    background-color: var(--nvf-color-text, #111827) !important;
}

/* Hover: burger + search / dark-toggle → always deep-dark bg + white */
body.page-template-page-split-showcase .nova-burger-menu:hover {
    background: #111827 !important;
    border-color: #111827 !important;
}
body.page-template-page-split-showcase .nova-burger-menu:hover span {
    background-color: #ffffff !important;
}

body.page-template-page-split-showcase .nova-header-actions button:hover {
    background: #111827 !important;
    border-color: #111827 !important;
    color: #ffffff !important;
    border-radius: var(--nvf-radius-pill, 999px);
    box-shadow: 0 8px 24px rgba(15, 23, 42, .18);
}

/* Hide titlebar / page-hero / breadcrumb on this template */
body.page-template-page-split-showcase .nova-titlebar,
body.page-template-page-split-showcase .nova-titlebar-inner,
body.page-template-page-split-showcase .page-header-section {
    display: none !important;
}

/* Hide footer + back-to-top on this template */
body.page-template-page-split-showcase .site-footer,
body.page-template-page-split-showcase .nvf-footer,
body.page-template-page-split-showcase #nvf-footer,
body.page-template-page-split-showcase #edgtf-back-to-top,
body.page-template-page-split-showcase [id="nova-back-to-top"],
body.page-template-page-split-showcase .back-to-top,
body.page-template-page-split-showcase [class*="back-to-top"] {
    display: none !important;
}

/* ── 16. Responsive ──────────────────────────────────────────── */

/* Tablet / Mobile: columns stacked → image on top → all header elements white */
@media (max-width: 1024px) {
    body.page-template-page-split-showcase .nova-header-actions button,
    body.page-template-page-split-showcase .nova-burger-menu {
        color: #fff !important;
    }

    /* Ghost-style burger over the image column (transparent bg, white icons) */
    body.page-template-page-split-showcase .nova-burger-menu {
        background: transparent !important;
        border-color: rgba(255, 255, 255, 0.3) !important;
    }

    body.page-template-page-split-showcase .nova-burger-menu span {
        background-color: #fff !important;
    }

    .nvf-split-showcase {
        flex-direction: column;
    }

    .nvf-split-showcase__col {
        position: relative;
        width: 100%;
        height: 50%;
    }

    .nvf-split-showcase__col--images {
        left: auto;
        right: auto;
    }

    .nvf-split-showcase__col--content {
        left: auto;
        right: auto;
        overflow: hidden;
    }

    /* Image column: ensure images fill without cropping */
    .nvf-split-showcase__col--images .nvf-split-showcase__img {
        object-fit: cover;
        object-position: center;
    }

    .nvf-split-showcase__col--content .nvf-split-showcase__panel {
        padding: clamp(1.5rem, 4vw, 3rem);
        /* Ensure panel doesn't overflow its column */
        box-sizing: border-box;
        display: flex;
        align-items: flex-start;
        justify-content: center;
    }

    .nvf-split-showcase__content-inner {
        max-width: none;
    }

    .nvf-split-showcase__title {
        font-size: clamp(1.6rem, 5vw, 2.5rem);
    }

    .nvf-split-showcase__excerpt {
        max-width: none;
        margin-bottom: 1.5rem;
        -webkit-line-clamp: 4;
        display: -webkit-box;
        -webkit-box-orient: vertical;
        overflow: hidden;
    }

    .nvf-split-showcase__nav {
        right: 0.8rem;
    }

    /* Counter must stay inside the image column only */
    .nvf-split-showcase__counter {
        z-index: 150;
    }

    /* Scroll hint → center of image column in stacked mode */
    .nvf-split-showcase__scroll-hint {
        left: 50%;
    }
}

@media (max-width: 600px) {
    .nvf-split-showcase__col--images {
        height: 45%;
    }

    .nvf-split-showcase__col--content {
        height: 55%;
    }

    .nvf-split-showcase__title {
        font-size: 1.6rem;
        margin-bottom: 1rem;
    }

    .nvf-split-showcase__meta {
        margin-bottom: 0.75rem;
    }

    .nvf-split-showcase__excerpt {
        font-size: 0.85rem;
        margin-bottom: 1.25rem;
        -webkit-line-clamp: 3;
    }

    .nvf-split-showcase__btn {
        padding: 0.8rem 1.5rem;
        font-size: 0.7rem;
    }

    .nvf-split-showcase__counter {
        left: 1rem;
        bottom: 1rem;
    }

    .nvf-split-showcase__scroll-hint {
        display: none;
    }

    .nvf-split-showcase__nav {
        gap: 8px;
    }

    .nvf-split-showcase__dot {
        width: 10px;
        height: 10px;
    }
}

/* ── 17. Dark-mode support ───────────────────────────────────── */

@media (prefers-color-scheme: dark) {
    .nvf-split-showcase__col--content .nvf-split-showcase__panel {
        background: var(--nvf-showcase-accent, var(--nvf-color-surface, #111));
    }
}

/* ── 18. Reduced motion ──────────────────────────────────────── */

@media (prefers-reduced-motion: reduce) {
    .nvf-split-showcase__track {
        transition: none !important;
    }

    .nvf-split-showcase__scroll-hint-line,
    .nvf-split-showcase__scroll-hint-line::after {
        animation: none;
    }
}
