/**
 * NovaFolio – Navigation & Animation Polish
 * ------------------------------------------
 * Overrides loaded AFTER header.css and animations.css to refine
 * typography, transitions, and micro-interactions toward a quieter,
 * gallery-grade aesthetic (inspired by Artlogic / Gagosian / Pace).
 *
 * @since 1.7.0
 */

/* ============================================================
   1.  PRIMARY NAVIGATION  — Quieter, mixed-case, more elegant
   ============================================================ */

/* --- Typography ------------------------------------------------ */
.nova-primary-nav {
    font-size: .82rem;
    font-weight: 400;
    text-transform: none;
    /* Remove aggressive uppercase */
    letter-spacing: .025em;
    /* Much lighter tracking       */
    gap: 36px;
    /* Tighter but still airy      */
}

/* --- Link transitions ------------------------------------------ */
.nova-primary-nav>li>a {
    transition:
        color .35s cubic-bezier(.22, .61, .36, 1),
        opacity .35s cubic-bezier(.22, .61, .36, 1);
}

/* Remove the "jump up" hover — replace with subtle opacity shift */
.nova-primary-nav>li:hover>a {
    transform: none;
    opacity: .65;
}

.nova-primary-nav>li.current-menu-item>a,
.nova-primary-nav>li.current_page_item>a {
    opacity: 1;
}

/* --- Underline indicator --------------------------------------- */
.nova-primary-nav>li>a::after {
    height: 1.5px;
    /* Thinner line                */
    bottom: 1px;
    /* Keep underline inside header to avoid segmented line below bar */
    transition: width .4s cubic-bezier(.22, .61, .36, 1);
}

/* ============================================================
   2.  DROPDOWN MENUS  — Cinematic open, snappy close
   ============================================================ */

/* Hover bridge: invisible zone bridging the 26px gap between parent link and dropdown */
.nova-primary-nav>li:not(.nvf-mm)>ul::before {
    content: '';
    position: absolute;
    bottom: 100%;
    left: 0;
    width: 100%;
    height: 30px;
    /* slightly larger than the 26px gap */
    pointer-events: auto;
}

.nova-primary-nav>li:not(.nvf-mm) ul {
    border-radius: var(--nvf-submenu-radius, 10px);
    box-shadow: 0 12px 40px rgba(15, 23, 42, .10),
        0 2px 8px rgba(15, 23, 42, .04);
    backdrop-filter: blur(12px);
    /* Resting / closed: shifted down + slightly scaled  */
    transform: translateY(6px) scale(.97);
    /* Leave → close: quick snap-back (accelerate-out)    */
    transition:
        opacity .15s cubic-bezier(.4, 0, 1, 1),
        transform .15s cubic-bezier(.4, 0, 1, 1),
        visibility 0s linear .15s;
}

/* Enter → open: cinematic overshoot entrance             */
.nova-primary-nav>li:not(.nvf-mm):hover>ul,
.nova-primary-nav>li:not(.nvf-mm):focus-within>ul {
    transform: translateY(0) scale(1);
    transition:
        opacity .28s cubic-bezier(.16, 1, .3, 1),
        transform .28s cubic-bezier(.16, 1, .3, 1),
        visibility 0s;
}

/* --- Item stagger ------------------------------------------ */
@keyframes nvf-sub-item-in {
    from {
        opacity: 0;
        transform: translateY(6px);
    }

    to {
        opacity: 1;
        transform: none;
    }
}

.nova-primary-nav>li:not(.nvf-mm):is(:hover, :focus-within)>ul>li {
    animation: nvf-sub-item-in .22s cubic-bezier(.16, 1, .3, 1) both;
}

.nova-primary-nav>li:not(.nvf-mm):is(:hover, :focus-within)>ul>li:nth-child(2) {
    animation-delay: .03s;
}

.nova-primary-nav>li:not(.nvf-mm):is(:hover, :focus-within)>ul>li:nth-child(3) {
    animation-delay: .05s;
}

.nova-primary-nav>li:not(.nvf-mm):is(:hover, :focus-within)>ul>li:nth-child(4) {
    animation-delay: .07s;
}

.nova-primary-nav>li:not(.nvf-mm):is(:hover, :focus-within)>ul>li:nth-child(5) {
    animation-delay: .09s;
}

.nova-primary-nav>li:not(.nvf-mm):is(:hover, :focus-within)>ul>li:nth-child(n+6) {
    animation-delay: .10s;
}

/* Dropdown item links — cinematic easing                 */
.nova-primary-nav>li:not(.nvf-mm) ul li a {
    font-family: var(--nvf-menu-font, var(--nvf-body-font, var(--nvf-body-font-family, inherit)));
    font-weight: 400;
    font-size: .8rem;
    letter-spacing: var(--nvf-header-menu-ls, .01em);
    border-radius: 6px;
    position: relative;
    padding-left: 14px;
    transition:
        background .25s cubic-bezier(.16, 1, .3, 1),
        color .2s ease,
        padding-left .3s cubic-bezier(.25, .59, .29, .96);
}

/* Orbius-style animated line — appears from left on hover */
.nova-primary-nav>li:not(.nvf-mm) ul li a::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 10px;
    height: 1px;
    width: 0;
    background: currentColor;
    opacity: 0;
    transition:
        width .3s cubic-bezier(.25, .59, .29, .96),
        opacity .25s ease;
}

/* Active state: line + padding shift (Orbius signature) */
.nova-primary-nav>li:not(.nvf-mm) ul li a:hover::before,
.nova-primary-nav>li:not(.nvf-mm) ul li.current-menu-item>a::before,
.nova-primary-nav>li:not(.nvf-mm) ul li.current_page_item>a::before {
    width: 16px;
    opacity: 1;
}

.nova-primary-nav>li:not(.nvf-mm) ul li a:hover,
.nova-primary-nav>li:not(.nvf-mm) ul li.current-menu-item>a,
.nova-primary-nav>li:not(.nvf-mm) ul li.current_page_item>a {
    padding-left: 34px;
    background: var(--nvf-color-soft, #f3f4f6);
    color: var(--nvf-color-text, #111827);
}

/* ============================================================
   2b. MEGA-MENU  — Cinematic open, snappy close, column stagger
   ============================================================ */

/* Panel close: fast snap-back */
.nova-primary-nav>li.nvf-mm>ul.sub-menu.nvf-mm__panel {
    transition:
        opacity .15s cubic-bezier(.4, 0, 1, 1),
        transform .18s cubic-bezier(.4, 0, 1, 1),
        visibility 0s linear .15s;
}

/* Panel open: cinematic entrance */
body.nvf-mm-mode-hover .nova-primary-nav>li.nvf-mm:hover>ul.sub-menu.nvf-mm__panel,
body.nvf-mm-mode-hover .nova-primary-nav>li.nvf-mm:focus-within>ul.sub-menu.nvf-mm__panel,
.nova-primary-nav>li.nvf-mm.nvf-mm--open>ul.sub-menu.nvf-mm__panel {
    transition:
        opacity .3s cubic-bezier(.16, 1, .3, 1),
        transform .38s cubic-bezier(.16, 1, .3, 1),
        visibility 0s;
}

/* Overlay — silkier fade */
#nvf-mm-overlay {
    transition: opacity .3s cubic-bezier(.16, 1, .3, 1);
}

/* Mega-menu item links — cinematic color shift */
ul.sub-menu.nvf-mm__col-list a.nvf-mm__item-link {
    transition: color .25s cubic-bezier(.16, 1, .3, 1);
}

/* --- Column stagger ---------------------------------------- */
@keyframes nvf-mm-col-in {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

    to {
        opacity: 1;
        transform: none;
    }
}

body.nvf-mm-mode-hover .nova-primary-nav>li.nvf-mm:is(:hover, :focus-within)>.nvf-mm__panel>.nvf-mm__col,
.nova-primary-nav>li.nvf-mm.nvf-mm--open>.nvf-mm__panel>.nvf-mm__col {
    animation: nvf-mm-col-in .3s cubic-bezier(.16, 1, .3, 1) both;
}

body.nvf-mm-mode-hover li.nvf-mm:is(:hover, :focus-within)>.nvf-mm__panel>.nvf-mm__col:nth-child(2),
li.nvf-mm.nvf-mm--open>.nvf-mm__panel>.nvf-mm__col:nth-child(2) {
    animation-delay: .05s;
}

body.nvf-mm-mode-hover li.nvf-mm:is(:hover, :focus-within)>.nvf-mm__panel>.nvf-mm__col:nth-child(3),
li.nvf-mm.nvf-mm--open>.nvf-mm__panel>.nvf-mm__col:nth-child(3) {
    animation-delay: .09s;
}

body.nvf-mm-mode-hover li.nvf-mm:is(:hover, :focus-within)>.nvf-mm__panel>.nvf-mm__col:nth-child(n+4),
li.nvf-mm.nvf-mm--open>.nvf-mm__panel>.nvf-mm__col:nth-child(n+4) {
    animation-delay: .12s;
}

/* ============================================================
   Safari load-time nav shift fix
   Reserve logo column space before image dimensions are known,
   preventing flex reflow that shifts the centred navigation.
   ============================================================ */
.nova-logo {
    min-width: var(--nova-logo-min-width, 80px);
}

/* Reserve scrollbar gutter to prevent viewport-width shift
   when the scrollbar appears after content load (Safari 15.4+) */
html {
    scrollbar-gutter: stable;
}

/* ============================================================
   3.  BURGER / MOBILE OFF-CANVAS  — Smoother motion
   ============================================================ */

/* Burger button — remove jump hover */
.nova-burger-menu:hover {
    transform: none;
    box-shadow: 0 4px 16px rgba(15, 23, 42, .10);
}

/* Off-canvas panel — galleria-style slide */
.nova-mobile-menu-wrap {
    transition: transform .4s cubic-bezier(.22, .61, .36, 1);
}

.nova-mobile-overlay-bg {
    transition: opacity .35s ease;
}

/* Keep sticky header anchored while offcanvas lock is active */
html:has(body.nova-mobile-menu-open) {
    overflow: visible !important;
}

body.nova-mobile-menu-open {
    overflow: hidden !important;
}

/* Mobile nav links — lighter tracking to match desktop */
.nova-mobile-nav-list>li>a,
.nova-mobile-menu-wrap .nova-mobile-nav-list>li:not(.menu-item-has-children)>a,
.nova-mobile-menu-wrap .nova-mobile-nav-list>li.menu-item-has-children>.nvf-mobile-row>a {
    letter-spacing: .03em;
    font-weight: 400;
    text-transform: none;
}

/* Off-canvas social icons — remove jump */
.nova-offcanvas-social-icons .nvf-social-link--offcanvas:hover,
.nova-offcanvas-social-icons .nvf-social-link--offcanvas:focus-visible {
    transform: none;
}

/* ============================================================
   4.  SITE TITLE / BRANDING — Soften
   ============================================================ */

.nova-site-title {
    letter-spacing: .04em;
    text-transform: none;
    font-weight: 500;
}

/* ============================================================
   5.  HEADER BAR — Refined shadow & sticky transition
   ============================================================ */

#nova-header.header-main {
    box-shadow: none;
    border-bottom: 1px solid rgba(15, 23, 42, .08);
    transition:
        transform .68s cubic-bezier(.4, 0, .2, 1),
        box-shadow .35s ease,
        border-color .35s ease,
        background-color .35s ease;
}

#nova-header.header-main::after {
    content: none !important;
}

#nova-header.header-main.is-sticky {
    border-bottom-color: transparent;
    box-shadow: 0 8px 18px -16px rgba(15, 23, 42, .30);
}

body:not(.nova-has-sticky-header) #nova-header.header-main.is-sticky {
    border-bottom-color: rgba(15, 23, 42, .08);
    box-shadow: none;
}

/* ============================================================
   Mobile menu parity: submenu + mega menu item typography
   must match the main mobile nav entries.
   ============================================================ */
@media (max-width: 1024px) {

    .nova-mobile-menu-wrap .nova-mobile-nav-list>li>a,
    .nova-mobile-menu-wrap .nova-mobile-nav-list>li.menu-item-has-children>.nvf-mobile-row>a {
        font-size: .8rem !important;
        font-weight: 400 !important;
        letter-spacing: .03em !important;
        text-transform: none !important;
    }

    .nova-mobile-menu-wrap .nova-mobile-nav-list .sub-menu>li>a,
    .nova-mobile-menu-wrap .nova-mobile-nav-list .sub-menu li.menu-item-has-children>.nvf-mobile-row>a,
    .nova-mobile-menu-wrap .nova-mobile-nav-list .sub-menu .nvf-mm__item-link,
    .nova-mobile-menu-wrap .nova-mobile-nav-list .sub-menu .nvf-mm__item-title,
    .nova-mobile-menu-wrap .nova-mobile-nav-list .sub-menu .nvf-mm__col-title,
    .nova-mobile-menu-wrap .nova-mobile-nav-list .sub-menu a.nvf-mm__col-title-link {
        font-size: .8rem !important;
        font-weight: 400 !important;
        letter-spacing: .03em !important;
        text-transform: none !important;
        line-height: 1.35 !important;
    }
}

/* ============================================================
   6.  SCROLL ANIMATIONS  — Reduced distance, refined easing
   ============================================================ */

[data-nvf-anim] {
    transition:
        opacity .7s cubic-bezier(.16, 1, .3, 1),
        transform .7s cubic-bezier(.16, 1, .3, 1);
}

/* Smaller translate distances for a quieter entrance */
[data-nvf-anim="fade-up"] {
    transform: translateY(24px);
}

[data-nvf-anim="fade-down"] {
    transform: translateY(-18px);
}

[data-nvf-anim="fade-left"] {
    transform: translateX(24px);
}

[data-nvf-anim="fade-right"] {
    transform: translateX(-24px);
}

[data-nvf-anim="scale-in"] {
    transform: scale(.96);
}

[data-nvf-anim="zoom-up"] {
    transform: translateY(18px) scale(.97);
}

/* ============================================================
   7.  PORTFOLIO CARD HOVER — Smoother overlay
   ============================================================ */

.nvf-core-card--portfolio .nvf-card-hover-label {
    transition:
        opacity .4s cubic-bezier(.22, .61, .36, 1),
        transform .4s cubic-bezier(.22, .61, .36, 1);
}

/* ============================================================
   8.  GENERIC LINK TRANSITIONS — Site-wide grace
   ============================================================ */

#nova-header a {
    transition: color .3s cubic-bezier(.22, .61, .36, 1);
}

/* ============================================================
   9.  ART GALLERY (mobile) — Current Exhibition breathing room
       + wider Hero slide content to avoid over-constrained text
   ============================================================ */

@media (max-width: 1024px) {

    body.page-id-291304 .entry-content .nvf-section.nvf-section--width-wide.nvf-space-top-xl.nvf-space-bottom-none+.nvf-section.nvf-section--width-full.nvf-space-top-none.nvf-space-bottom-xl.nvf-pad-x-none.alignfull>.nvf-section__inner,
    body.page-id-291304 .entry-content .nvf-section.nvf-section--width-full.nvf-space-top-none.nvf-space-bottom-xl.nvf-pad-x-none.alignfull.wp-block-novafolio-section>.nvf-section__inner {
        width: min(95vw, var(--nvf-layout-wide-width, 1440px)) !important;
        max-width: min(95vw, var(--nvf-layout-wide-width, 1440px)) !important;
        margin-left: auto !important;
        margin-right: auto !important;
        padding-left: clamp(24px, 6vw, 44px) !important;
        padding-right: clamp(24px, 6vw, 44px) !important;
        box-sizing: border-box;
    }

    body.page-id-291304 .entry-content .nvf-section.nvf-section--width-full.nvf-space-top-none.nvf-space-bottom-xl.nvf-pad-x-none.alignfull>.nvf-section__inner>.wp-block-columns {
        gap: clamp(16px, 4vw, 24px) !important;
    }

    body.page-id-291304 .nvf-hero-slider.nvf-hero-layout-full .nvf-hero-slide-content {
        width: min(95vw, var(--nvf-hero-content-max-width, min(1800px, 95vw)));
        max-width: min(95vw, var(--nvf-hero-content-max-width, min(1800px, 95vw)));
        padding-left: calc(var(--nvf-space-s, 14px) + 36px);
        padding-right: calc(var(--nvf-space-s, 14px) + 36px);
        box-sizing: border-box;
    }
}

@media (max-width: 640px) {
    body.page-id-291304 .nvf-hero-slider.nvf-hero-layout-full .nvf-hero-slide-content {
        padding-left: calc(var(--nvf-space-s, 14px) + 30px);
        padding-right: calc(var(--nvf-space-s, 14px) + 30px);
    }
}

/* ART GALLERY — mobile breathing room (≤767px)
   The wp-block-group.is-layout-constrained inside nvf-section__inner
   carries inline padding:0 which collapses side margins on small screens.
   Apply 2.5vw padding directly on the section to guarantee visual breathing. */
@media (max-width: 767px) {
    body.page-id-291304 .entry-content .nvf-section.nvf-section--width-full.nvf-space-top-none.nvf-space-bottom-xl.nvf-pad-x-none.alignfull.wp-block-novafolio-section {
        padding-left: 2.5vw !important;
        padding-right: 2.5vw !important;
        box-sizing: border-box;
    }

    body.page-id-291304 .entry-content .nvf-section.nvf-section--width-full.nvf-space-top-none.nvf-space-bottom-xl.nvf-pad-x-none.alignfull.wp-block-novafolio-section>.nvf-section__inner {
        width: 100% !important;
        max-width: 100% !important;
        padding-left: 0 !important;
        padding-right: 0 !important;
        box-sizing: border-box;
    }

    body.page-id-291304 .entry-content .nvf-section.nvf-section--width-full.nvf-space-top-none.nvf-space-bottom-xl.nvf-pad-x-none.alignfull.wp-block-novafolio-section .wp-block-group.is-layout-constrained {
        padding-left: 0 !important;
        padding-right: 0 !important;
    }
}

@media (max-width: 767px) {
    body.page-id-291304 p[style*="letter-spacing:0.12em"][style*="text-transform:uppercase"] {
        margin-top: 12px !important;
    }
}

/* ============================================================
   10. EXHIBITIONS (mobile) — hide stray empty paragraphs +
       cap top margin of the first content section.
       v1.7.9 — Removed legacy page-id padding overrides that
       forced `padding-inline: clamp(24px, 6vw, 44px)` on specific
       section inners. They contradicted the universal mobile
       contract in section.css and made matched sections appear
       narrower than their siblings (visible inset on /exhibitions/).
       All sections now follow the global v1.7.9 contract:
       inherit parent gutter, no internal pad, cap at
       min(95vw, wide-width). Result: every section on every page
       shares the SAME visual column — the harmonisation goal.
   ============================================================ */

@media (max-width: 1024px) {
    body.page-id-291111 .nvf-prose>p:empty {
        display: none;
        margin: 0 !important;
    }

    body.page-id-291111 .nvf-prose>p:first-child {
        display: none;
        margin: 0 !important;
    }

    body.page-id-291111 :is(.entry-content, .nvf-prose) .nvf-section.nvf-section--width-wide.nvf-pad-none.nvf-space-top-xl.nvf-space-bottom-none.nvf-pad-x-none.align.wp-block-novafolio-section {
        margin-top: clamp(12px, 3vw, 20px) !important;
    }
}

/* ============================================================
   12. MOBILE RHYTHM SAFEGUARD — first section top spacing
       Prevent cumulative top-gap: page container padding + section top-xl/l
   ============================================================ */

@media (max-width: 768px) {

    /* Global mobile cap: avoid oversized gap below titlebar on standard pages. */
    body:not(.blog):not(.archive):not(.category):not(.tag):not(.search):not(.single-portfolio) #nova-content {
        padding-top: min(var(--nvf-content-pad-top-md, 50px), clamp(18px, 4.5vw, 30px)) !important;
        padding-bottom: min(var(--nvf-content-pad-bottom-md, 50px), clamp(24px, 6vw, 44px)) !important;
    }

    body:not(.blog):not(.archive):not(.category):not(.tag):not(.search):not(.single-portfolio) #nova-content :is(.entry-content, .nvf-prose)>.wp-block-novafolio-section:first-of-type.nvf-space-top-xl {
        margin-top: clamp(12px, 3vw, 18px) !important;
        margin-block-start: clamp(12px, 3vw, 18px) !important;
    }

    body:not(.blog):not(.archive):not(.category):not(.tag):not(.search):not(.single-portfolio) #nova-content :is(.entry-content, .nvf-prose)>.wp-block-novafolio-section:first-of-type.nvf-space-top-l {
        margin-top: clamp(10px, 2.6vw, 14px) !important;
        margin-block-start: clamp(10px, 2.6vw, 14px) !important;
    }

    body.page-id-291111 #nova-content {
        padding-top: clamp(18px, 4vw, 28px) !important;
    }

    body.page-id-291111 :is(.entry-content, .nvf-prose) .nvf-section.nvf-section--width-wide.nvf-pad-none.nvf-space-top-xl.nvf-space-bottom-none.nvf-pad-x-none.align.wp-block-novafolio-section .wp-block-group.has-global-padding {
        padding-left: 0 !important;
        padding-right: 0 !important;
    }

    /* v1.7.9 — Removed legacy `padding: 2.5vw` on the section wrapper
       and `width/max-width: 100%; padding: 0` on the inner. They were
       a per-page workaround that conflicted with the universal mobile
       contract in section.css (which already caps the inner to
       min(95vw, wide-width) on all pages, producing aligned columns
       on /exhibitions/ identical to /art-gallery/). */

    body.page-id-291111 :is(.entry-content, .nvf-prose) .nvf-section.nvf-section--width-full.nvf-section--bg-none.nvf-pad-none.nvf-space-top-none.nvf-space-bottom-none.nvf-pad-x-none.alignfull.wp-block-novafolio-section .nvf-cta.nvf-space-top-xl {
        padding-top: clamp(36px, 8vw, 56px) !important;
    }

    body.page-id-291111 :is(.entry-content, .nvf-prose) .nvf-section.nvf-section--width-full.nvf-section--bg-none.nvf-pad-none.nvf-space-top-none.nvf-space-bottom-none.nvf-pad-x-none.alignfull.wp-block-novafolio-section .nvf-cta.nvf-space-bottom-xl {
        padding-bottom: clamp(36px, 8vw, 56px) !important;
    }

    body.page-id-291111 #nova-content {
        padding-bottom: clamp(24px, 5vw, 32px) !important;
    }
}

/* ============================================================
   11. REDUCED MOTION — Respect user preference
   ============================================================ */

@media (prefers-reduced-motion: reduce) {
    [data-nvf-anim] {
        transition-duration: 0.01ms !important;
        transform: none !important;
        opacity: 1 !important;
    }

    .nova-mobile-menu-wrap,
    .nova-mobile-overlay-bg,
    .nova-primary-nav>li:not(.nvf-mm) ul,
    .nova-primary-nav>li.nvf-mm>ul.sub-menu.nvf-mm__panel,
    #nvf-mm-overlay,
    #nova-header.header-main {
        transition-duration: 0.01ms !important;
    }

    .nova-primary-nav>li:not(.nvf-mm):is(:hover, :focus-within)>ul>li,
    .nvf-mm__panel>.nvf-mm__col {
        animation: none !important;
    }
}