/*
Theme Name: Shark Atlas Theme
Author: Shark Atlas
Description: Light editorial theme for Shark Atlas: world globe of shark incidents on the front page, news articles below, and the Shark Atlas plugin's beach, species and incident pages. Based on the Nestimate theme 1.7.
Version: 1.0
Text Domain: shark-atlas-theme
*/

/* =========================================================================
   DESIGN TOKENS — from the calculator palette (nestimate.css)
   ========================================================================= */
:root {
    --ns-cold: #0f4c5c;           /* navy — primary brand */
    --ns-warm: #c92a2a;           /* red — accent / CTA */
    --ns-panel: #e4eff1;          /* light blue-gray — background */
    --ns-cold-deep: #0a3440;
    --ns-cold-soft: #e6f1f3;
    --ns-warm-deep: #9e1f1f;
    --ns-warm-soft: #fbecec;
    --ns-ink: #14262e;
    --ns-ink-soft: #4d5f67;
    --ns-ink-mute: #7f8f96;
    --ns-line: #E6E6E2;
    --ns-line2: #EFEFEC;
    --ns-surface: #FFFFFF;
    --ns-radius: 12px;
    --ns-font: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    --container-max: 820px;
}

/* =========================================================================
   RESET & BASE
   ========================================================================= */
*, *::before, *::after { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
    background-color: #f4f8f9;
    color: var(--ns-ink);
    font-family: var(--ns-font);
    margin: 0;
    padding: 0;
    -webkit-font-smoothing: antialiased;
    overflow-x: hidden;
    font-size: 16px;
    line-height: 1.55;
}

a {
    color: var(--ns-cold);
    text-decoration: none;
    transition: color 0.2s;
}
a:hover { color: var(--ns-cold-deep); }

img { max-width: 100%; height: auto; }

.container {
    width: 100%;
    max-width: var(--container-max);
    margin: 0 auto;
    padding: 20px 22px;
}

/* =========================================================================
   SCROLL PROGRESS BAR
   ========================================================================= */
#vortex-scroll-progress {
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    width: 0%;
    height: 3px !important;
    background: var(--ns-cold) !important;
    box-shadow: none !important;
    z-index: 999999 !important;
    transition: width 0.1s ease-out;
    pointer-events: none;
}

body.admin-bar #vortex-scroll-progress { top: 32px !important; }
@media screen and (max-width: 782px) {
    body.admin-bar #vortex-scroll-progress { top: 46px !important; }
}

#vortex-scroll-progress.vortex-progress-complete {
    background: var(--ns-warm) !important;
}

/* =========================================================================
   HEADER
   ========================================================================= */
header {
    background: var(--ns-surface);
    border-bottom: 1px solid var(--ns-line);
    padding: 0;
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: 0 1px 3px rgba(23,25,29,.05);
}

header .container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding-top: 14px;
    padding-bottom: 14px;
    gap: 20px;
}

/* Logo */
.site-logo-link { display: inline-flex; align-items: center; }
.site-logo-img  { height: 36px; width: auto; display: block; }
.site-title {
    font-size: 20px;
    font-weight: 700;
    color: var(--ns-cold);
    letter-spacing: -.02em;
    display: block;
}
.site-title:hover { color: var(--ns-cold-deep); }

/* =========================================================================
   PRIMARY NAVIGATION — unlimited depth, hover on desktop, accordion on mobile
   ========================================================================= */
.vortex-main-menu { margin: 0; }

.menu-list {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    gap: 2px;
    flex-wrap: wrap;
    align-items: center;
}

/* Every item is a flex row: link + optional caret toggle */
.menu-list li {
    position: relative;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
}

.menu-list a {
    color: var(--ns-ink-soft);
    font-size: 14px;
    font-weight: 500;
    padding: 7px 11px;
    border-radius: 8px;
    display: block;
    border: 1px solid transparent;
    transition: background .15s, color .15s;
}
.menu-list a:hover,
.menu-list li:hover > a,
.menu-list li:focus-within > a,
.menu-list li.ns-open > a {
    background: var(--ns-cold-soft);
    color: var(--ns-cold);
    text-shadow: none;
    transform: none;
}
.menu-list li.current-menu-item > a,
.menu-list li.current-menu-parent > a,
.menu-list li.current-menu-ancestor > a,
.menu-list li.current_page_item > a {
    background: var(--ns-cold-soft);
    color: var(--ns-cold);
    font-weight: 600;
}
.menu-list .ns-menu-desc {
    display: block;
    font-size: 11.5px;
    font-weight: 400;
    line-height: 1.35;
    color: var(--ns-ink-mute);
    margin-top: 2px;
}
.menu-list > li > a > .ns-menu-desc { display: none; }   /* keep the top bar tight */

/* Caret / sub-menu toggle button */
.menu-list .ns-submenu-toggle {
    background: transparent !important;
    border: 0 !important;
    box-shadow: none !important;
    color: var(--ns-ink-mute) !important;
    width: 26px !important;
    height: 26px;
    min-width: 0;
    margin: 0 4px 0 -6px;
    padding: 0 !important;
    border-radius: 6px;
    cursor: pointer;
    flex: 0 0 auto;
    display: inline-flex !important;
    align-items: center;
    justify-content: center;
    transition: background .15s, color .15s;
}
.menu-list .ns-submenu-toggle:hover {
    background: var(--ns-cold-soft) !important;
    color: var(--ns-cold) !important;
    transform: none;
    box-shadow: none;
}
.menu-list .ns-submenu-toggle:focus-visible {
    outline: 2px solid var(--ns-cold);
    outline-offset: 1px;
}
.ns-caret {
    width: 6px;
    height: 6px;
    border-right: 2px solid currentColor;
    border-bottom: 2px solid currentColor;
    transform: rotate(45deg) translate(-1px, -1px);
    transition: transform .18s ease;
}
.menu-list .ns-submenu-toggle[aria-expanded="true"] .ns-caret {
    transform: rotate(-135deg) translate(-1px, -1px);
}

/* ---- Drop-downs / flyouts ---- */
.menu-list .sub-menu {
    display: none;
    position: absolute;
    top: calc(100% + 8px);
    left: 0;
    flex-direction: column;
    align-items: stretch;
    background: var(--ns-surface);
    border: 1px solid var(--ns-line);
    border-radius: var(--ns-radius);
    padding: 6px;
    margin: 0;
    min-width: 224px;
    max-width: 300px;
    list-style: none;
    z-index: 9999;
    box-shadow: 0 10px 30px rgba(23,25,29,.12);
}
.menu-list .sub-menu > li { width: 100%; }
.menu-list .sub-menu a {
    flex: 1 1 auto;
    font-size: 13.5px;
    color: var(--ns-ink);
    padding: 9px 12px;
    border-radius: 8px;
    text-align: left;
}

/* Invisible bridge so the pointer can travel into the panel */
.menu-list > li.ns-has-children::after {
    content: "";
    position: absolute;
    left: 0; right: 0; top: 100%;
    height: 10px;
}

@media (min-width: 769px) {
    .menu-list li:hover > .sub-menu,
    .menu-list li:focus-within > .sub-menu,
    .menu-list li.ns-open > .sub-menu { display: flex; }

    /* Level 2 and deeper fly out to the side */
    .menu-list .sub-menu .sub-menu {
        top: -7px;
        left: calc(100% + 5px);
    }
    .menu-list .sub-menu .ns-caret {
        transform: rotate(-45deg) translate(-1px, -1px);
    }
    .menu-list .sub-menu .ns-submenu-toggle { margin: 0 2px 0 0; }

    /* Flipped by JS when the panel would leave the viewport */
    .menu-list > li.ns-flip > .sub-menu { left: auto; right: 0; }
    .menu-list .sub-menu li.ns-flip > .sub-menu {
        left: auto;
        right: calc(100% + 5px);
    }
}

/* =========================================================================
   HAMBURGER
   ========================================================================= */
.hamburger-btn {
    display: none;
    background: none !important;
    border: 1px solid var(--ns-line) !important;
    color: var(--ns-ink) !important;
    cursor: pointer;
    box-shadow: none !important;
    width: 42px !important;
    height: 42px;
    border-radius: 9px;
    padding: 0 !important;
    line-height: 1;
    text-shadow: none;
    transition: background .15s, border-color .15s;
    flex-shrink: 0;
    align-items: center;
    justify-content: center;
}
.hamburger-btn:hover {
    background: var(--ns-cold-soft) !important;
    border-color: var(--ns-cold) !important;
    transform: none;
}
.hamburger-box {
    width: 20px;
    height: 14px;
    position: relative;
    display: block;
}
.hamburger-bar {
    position: absolute;
    left: 0;
    width: 100%;
    height: 2px;
    border-radius: 2px;
    background: var(--ns-ink);
    transition: transform .22s ease, opacity .15s ease, top .22s ease;
}
.hamburger-bar:nth-child(1) { top: 0; }
.hamburger-bar:nth-child(2) { top: 6px; }
.hamburger-bar:nth-child(3) { top: 12px; }
.hamburger-btn.is-open .hamburger-bar:nth-child(1) { top: 6px; transform: rotate(45deg); }
.hamburger-btn.is-open .hamburger-bar:nth-child(2) { opacity: 0; }
.hamburger-btn.is-open .hamburger-bar:nth-child(3) { top: 6px; transform: rotate(-45deg); }

/* Screen-reader-only helper (used by the menu toggles) */
.screen-reader-text {
    border: 0;
    clip: rect(1px, 1px, 1px, 1px);
    clip-path: inset(50%);
    height: 1px; width: 1px;
    margin: -1px;
    overflow: hidden;
    padding: 0;
    position: absolute !important;
    word-wrap: normal !important;
}

/* PWA install — keep subtle */
#pwa-install-container { margin-bottom: 0; }
#pwa-install-btn {
    background: var(--ns-cold) !important;
    color: #fff !important;
    font-size: 11px;
    padding: 6px 14px;
    border-radius: 20px;
    border: none !important;
    font-weight: 600;
    letter-spacing: .02em;
}

/* =========================================================================
   AD SLOTS
   ========================================================================= */
.vortex-ad-slot {
    background: var(--ns-line2);
    border: 1px dashed var(--ns-line);
    border-radius: var(--ns-radius);
    text-align: center;
    padding: 12px;
    margin: 20px auto;
    min-height: 90px;
    display: flex;
    justify-content: center;
    align-items: center;
    color: var(--ns-ink-mute);
    font-size: 11px;
    letter-spacing: .04em;
    width: 100%;
}
.vortex-adblock-collapse:empty { display: none !important; margin: 0 !important; padding: 0 !important; min-height: 0 !important; }

/* =========================================================================
   ARTICLE PANEL (replacing .theme-glass-panel)
   ========================================================================= */
.theme-glass-panel {
    background: var(--ns-surface);
    border: 1px solid var(--ns-line);
    border-radius: 16px;
    padding: 28px 28px 32px;
    color: var(--ns-ink);
    width: 100%;
    overflow-wrap: break-word;
}

/* Content typography inside panels */
.theme-glass-panel h1,
.theme-glass-panel h2,
.theme-glass-panel h3 {
    color: var(--ns-ink);
    letter-spacing: -.02em;
    line-height: 1.2;
}
.theme-glass-panel h1 { font-size: clamp(22px, 4vw, 32px); font-weight: 700; }
.theme-glass-panel h2 { font-size: clamp(18px, 3vw, 24px); font-weight: 600; }
.theme-glass-panel p  { color: var(--ns-ink-soft); line-height: 1.7; }
.theme-glass-panel a  { color: var(--ns-cold); }
.theme-glass-panel a:hover { color: var(--ns-cold-deep); }

/* =========================================================================
   POST CARDS (.quiz-card)
   ========================================================================= */
.quiz-loop-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 20px;
}

.quiz-card {
    position: relative;
    height: 360px;
    background: var(--ns-surface);
    border: 1px solid var(--ns-line);
    border-radius: 16px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    text-decoration: none;
    transition: box-shadow .2s, transform .15s, border-color .2s;
    box-shadow: 0 1px 3px rgba(23,25,29,.05);
}
/* remove neon spin animation entirely */
.quiz-card::before { display: none; }

.quiz-card:hover {
    box-shadow: 0 8px 28px rgba(44,74,120,.12);
    transform: translateY(-3px);
    border-color: color-mix(in srgb, var(--ns-cold) 30%, transparent);
}

.quiz-card-image {
    position: absolute !important;
    inset: 0 !important;
    width: 100% !important;
    height: 100% !important;
    object-fit: cover !important;
    object-position: var(--card-focus, center center) !important;
    border-radius: 0;
    z-index: 1;
    transition: filter 0.3s ease;
}
div.quiz-card-image {
    background: var(--ns-cold-soft) !important;
}

.quiz-card picture {
    position: absolute !important;
    inset: 0 !important;
    width: 100% !important;
    height: 100% !important;
    z-index: 1;
    overflow: hidden;
    display: block;
}
.quiz-card picture .quiz-card-image,
.quiz-card picture img {
    position: absolute !important;
    inset: 0 !important;
    width: 100% !important;
    height: 100% !important;
    object-fit: cover !important;
    border-radius: 0 !important;
}

/* gradient scrim — subtle, lighter */
.quiz-card::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(23,25,29,.82) 0%, rgba(23,25,29,.35) 55%, transparent 100%);
    z-index: 2;
    pointer-events: none;
}

.quiz-card:hover .quiz-card-image { filter: brightness(1.05); }

.card-content {
    position: relative;
    z-index: 10;
    padding: 16px 18px 6px;
    text-align: left;
}
.card-content h2,
.card-content h3 {
    font-size: 17px;
    color: #fff !important;
    text-shadow: 0 1px 6px rgba(0,0,0,.6);
    margin: 0 0 6px;
    font-weight: 600;
    line-height: 1.3;
}
.card-content p {
    font-size: 13px;
    color: rgba(255,255,255,.85);
    margin: 0;
    text-shadow: 0 1px 4px rgba(0,0,0,.6);
    line-height: 1.45;
}

.card-action-wrapper {
    position: relative;
    z-index: 10;
    padding: 10px 18px 18px;
}

/* Action button — clean, branded */
button:not([class*="sa-"]),
.action-btn {
    background: var(--ns-cold) !important;
    border: none !important;
    color: #fff !important;
    padding: 11px 20px;
    border-radius: 10px;
    font-weight: 600;
    font-size: 13px;
    letter-spacing: .01em;
    cursor: pointer;
    transition: background .2s, transform .08s;
    outline: none;
    width: 100%;
    margin-bottom: 0;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 6px;
    font-family: var(--ns-font);
    text-transform: none;
    box-shadow: none;
}
button:not([class*="sa-"]):hover, .action-btn:hover {
    background: var(--ns-cold-deep) !important;
    color: #fff !important;
    box-shadow: none;
    border-color: transparent !important;
    transform: translateY(-1px);
}
button:not([class*="sa-"]):active, .action-btn:active { transform: translateY(0); }

/* =========================================================================
   PAGINATION
   ========================================================================= */
.vortex-pagination { margin: 36px 0; text-align: center; width: 100%; }
.vortex-pagination .nav-links { display: inline-flex; gap: 6px; justify-content: center; align-items: center; flex-wrap: wrap; }
.vortex-pagination .page-numbers {
    color: var(--ns-cold);
    padding: 9px 16px;
    border: 1px solid var(--ns-line);
    border-radius: 9px;
    text-decoration: none;
    font-weight: 500;
    font-size: 14px;
    transition: background .15s, border-color .15s;
    background: var(--ns-surface);
    display: inline-block;
}
.vortex-pagination .page-numbers:hover {
    background: var(--ns-cold-soft);
    border-color: var(--ns-cold);
    transform: none;
    box-shadow: none;
}
.vortex-pagination .page-numbers.current {
    background: var(--ns-cold);
    color: #fff;
    border-color: var(--ns-cold);
    box-shadow: none;
    cursor: default;
    transform: none;
}

/* =========================================================================
   BREADCRUMB
   ========================================================================= */
.vortex-breadcrumb {
    font-size: 13px;
    color: var(--ns-ink-mute);
    margin-bottom: 22px;
    text-align: left !important;
}
.vortex-breadcrumb a { color: var(--ns-cold); }
.vortex-breadcrumb a:hover { color: var(--ns-cold-deep); }

/* post-meta links */
.post-meta { color: var(--ns-ink-mute); text-align: left !important; }
.post-meta a { color: var(--ns-cold) !important; }

/* =========================================================================
   SINGLE POST TITLE
   ========================================================================= */
.theme-glass-panel h1.post-title,
.theme-glass-panel > h1:first-of-type {
    color: var(--ns-ink) !important;
    font-size: clamp(22px, 4vw, 34px);
    font-weight: 700;
    letter-spacing: -.025em;
    line-height: 1.15;
    text-transform: none !important;
    text-align: left !important;
    margin: 0 0 14px;
}

/* =========================================================================
   RELATED POSTS HEADING
   ========================================================================= */
.vortex-related-posts h3 {
    color: var(--ns-ink) !important;
    text-transform: none !important;
    font-size: 18px;
    font-weight: 600;
    text-shadow: none !important;
    text-align: left !important;
    margin-bottom: 16px;
}

/* =========================================================================
   AUTHOR PAGE
   ========================================================================= */
.author-avatar img {
    border-radius: 50%;
    border: 2px solid var(--ns-line) !important;
    box-shadow: none !important;
}

/* =========================================================================
   NESTIMATE PLUGIN INTEGRATION
   ========================================================================= */

/* Make the calculator feel at home inside the theme */
.nestimate-app {
    box-shadow: 0 1px 3px rgba(23,25,29,.06), 0 12px 34px rgba(23,25,29,.07);
}

/* Geo / programmatic SEO pages */
.nst-geo .wrap { max-width: var(--container-max); margin: 0 auto; padding: 0 22px 80px; }
.nst-geo .section { padding: 28px 0; border-top: 1px solid var(--ns-line2); }
.nst-geo h1 { font-size: clamp(26px, 4.5vw, 40px); letter-spacing: -.03em; margin: .2em 0; color: var(--ns-ink); }
.nst-geo .eyebrow { font-size: 12px; font-weight: 600; color: var(--ns-cold); letter-spacing: .01em; }
.nst-geo .eyebrow.warm { color: var(--ns-warm); }
.nst-geo .ncards { display: grid; grid-template-columns: repeat(auto-fill, minmax(196px, 1fr)); gap: 12px; }
.nst-geo .ncard { border: 1px solid var(--ns-line); border-radius: 12px; padding: 15px; text-decoration: none; color: var(--ns-ink); background: var(--ns-surface); transition: border-color .15s, transform .12s, box-shadow .15s; }
.nst-geo .ncard:hover { border-color: color-mix(in srgb, var(--ns-cold) 40%, transparent); transform: translateY(-2px); box-shadow: 0 4px 14px rgba(44,74,120,.10); }
.nst-geo .ncard .sc { font-size: 28px; font-weight: 700; color: var(--ns-cold); }
.nst-geo .cover { height: 180px; border-radius: 14px; background: linear-gradient(120deg, var(--ns-panel), #fff); background-size: cover; background-position: center; margin: 14px 0; }
.nst-geo .faq details { border-bottom: 1px solid var(--ns-line2); padding: 12px 0; }
.nst-geo .adzone { border: 1px solid var(--ns-line); border-radius: 11px; padding: 14px; text-align: center; background: var(--ns-line2); color: var(--ns-ink-mute); font-size: 12px; }

/* Home History page — let its own inline CSS handle colors; just ensure it fills the viewport */
.nst-hh-standalone body { margin: 0; }
.nst-hh { font-family: var(--ns-font, "Inter", sans-serif); }

/* =========================================================================
   FOCUS / ACCESSIBILITY
   ========================================================================= */
a:not([class*="sa-"]):focus-visible,
button:not([class*="sa-"]):focus-visible,
.action-btn:focus-visible,
.quiz-card:focus-visible {
    outline: 2px solid var(--ns-cold) !important;
    outline-offset: 2px;
    box-shadow: none !important;
    border-color: transparent !important;
    transform: none !important;
    background-color: transparent !important;
    color: var(--ns-cold) !important;
    z-index: 100;
}

/* =========================================================================
   RESPONSIVE
   ========================================================================= */
@media (max-width: 768px) {
    header .container { flex-wrap: wrap; }

    .hamburger-btn { display: inline-flex; }

    /* The whole menu collapses into a panel under the header bar */
    .vortex-main-menu { width: 100%; order: 3; }
    .menu-list {
        display: none;
        flex-direction: column;
        align-items: stretch;
        width: 100%;
        background: var(--ns-surface);
        border: 1px solid var(--ns-line);
        border-radius: var(--ns-radius);
        padding: 8px;
        margin-top: 10px;
        gap: 2px;
        box-shadow: 0 12px 30px rgba(23,25,29,.10);
        max-height: calc(100vh - 150px);
        overflow-y: auto;
        overscroll-behavior: contain;
    }
    .menu-list.active { display: flex; }
    .menu-list li { width: 100%; }
    .menu-list a {
        flex: 1 1 auto;
        min-width: 0;
        padding: 12px;
        font-size: 15px;
        border: 1px solid transparent;
    }
    .menu-list > li > a > .ns-menu-desc { display: block; }

    /* Bigger tap target for the caret */
    .menu-list .ns-submenu-toggle {
        width: 44px !important;
        height: 44px;
        margin: 0;
        border-radius: 8px;
    }

    /* Sub-levels become an indented accordion, any depth */
    .menu-list .sub-menu {
        display: none;
        position: static;
        flex-basis: 100%;
        width: 100%;
        min-width: 0;
        max-width: none;
        background: transparent;
        border: 0;
        border-left: 2px solid var(--ns-cold-soft);
        border-radius: 0;
        box-shadow: none;
        padding: 2px 0 2px 8px;
        margin: 0 0 4px 14px;
    }
    .menu-list li.ns-open > .sub-menu { display: flex; }
    .menu-list .sub-menu a { font-size: 14px; padding: 10px 12px; }
    .menu-list .sub-menu .ns-caret { transform: rotate(45deg) translate(-1px, -1px); }
    .menu-list .sub-menu .ns-submenu-toggle[aria-expanded="true"] .ns-caret {
        transform: rotate(-135deg) translate(-1px, -1px);
    }

    /* Lock the page behind the open menu */
    body.ns-menu-open { overflow: hidden; }

    .container { padding: 16px 16px; }
    .theme-glass-panel { padding: 20px 18px 24px; border-radius: 12px; }
    .quiz-loop-grid { grid-template-columns: 1fr; }
    .quiz-card { height: 300px; }
}

@media (max-width: 480px) {
    .quiz-card { height: 260px; }
    .card-content h2, .card-content h3 { font-size: 16px; }
}

/* =========================================================================
   THEME EFFECTS — toned-down, no strobe/shake for content site
   ========================================================================= */
.theme-fx-shake { animation: ns-shake 0.4s cubic-bezier(.36,.07,.19,.97) both; }
@keyframes ns-shake {
    10%, 90% { transform: translate3d(-1px,0,0); }
    20%, 80% { transform: translate3d(2px,0,0); }
    30%, 50%, 70% { transform: translate3d(-3px,0,0); }
    40%, 60% { transform: translate3d(3px,0,0); }
}

@media (prefers-reduced-motion: reduce) {
    * { animation: none !important; transition: none !important; }
}

/* =========================================================================
   BUILT-IN "BACK TO CALCULATOR" CTA
   The button shares the plugin funnel palette (--ns-cold/--ns-warm).
   Its label is swapped by the data-ns-resume script between cold/warm states.
   ========================================================================= */
.ns-cta-band {
    margin: 34px 0 8px;
    padding: 26px 24px;
    border: 1px solid var(--ns-panel);
    border-radius: 16px;
    background:
        radial-gradient(120% 140% at 100% 0, var(--ns-warm-soft) 0, transparent 42%),
        linear-gradient(180deg, var(--ns-cold-soft) 0, var(--ns-surface) 78%);
    text-align: center;
}
.ns-cta-band-inner { max-width: 560px; margin: 0 auto; }
.ns-cta-band-title {
    margin: 0 0 16px;
    font-size: clamp(17px, 2.4vw, 21px);
    font-weight: 600;
    letter-spacing: -.02em;
    line-height: 1.3;
    color: var(--ns-ink);
}

.ns-cta-link {
    display: inline-block;
    padding: 13px 26px;
    border-radius: 10px;
    font: inherit;
    font-weight: 600;
    font-size: 15px;
    line-height: 1;
    text-decoration: none;
    color: #fff;
    background: var(--ns-cold);
    border: 1px solid var(--ns-cold);
    box-shadow: 0 2px 10px rgba(44, 74, 120, .18);
    transition: transform .12s ease, box-shadow .12s ease, background .15s ease;
}
.ns-cta-link:hover {
    color: #fff;
    background: var(--ns-cold-deep);
    box-shadow: 0 6px 18px rgba(44, 74, 120, .26);
    transform: translateY(-1px);
}
.ns-cta-link:active { transform: translateY(0); box-shadow: 0 2px 8px rgba(44, 74, 120, .2); }
.ns-cta-link:focus-visible { outline: 3px solid var(--ns-cold-soft); outline-offset: 2px; }

/* =========================================================================
   HEADER MINI-ESTIMATE CHIP
   Only visible when a saved estimate exists; keeps the calculator in the header.
   ========================================================================= */
.ns-mini-estimate {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin-left: auto;
    padding: 7px 14px;
    border: 1px solid var(--ns-panel-line, var(--ns-panel));
    border-radius: 999px;
    background: var(--ns-cold-soft);
    color: var(--ns-cold-deep) !important;
    font-size: 13px;
    font-weight: 600;
    line-height: 1;
    text-decoration: none;
    white-space: nowrap;
    transition: background .15s ease, border-color .15s ease, transform .12s ease;
}
.ns-mini-estimate:hover {
    background: #fff;
    border-color: var(--ns-cold);
    color: var(--ns-cold-deep) !important;
    transform: translateY(-1px);
}
.ns-mini-estimate[hidden] { display: none; }
.ns-mini-dot {
    width: 8px; height: 8px; border-radius: 50%;
    background: var(--ns-warm);
    box-shadow: 0 0 0 3px var(--ns-warm-soft);
    flex: 0 0 auto;
}
@media (max-width: 640px) {
    /* Tight next to the hamburger on mobile — the chip drops below the logo. */
    .ns-mini-estimate { margin-left: 0; font-size: 12px; padding: 6px 12px; }
}

/* =========================================================================
   HOME LANDING — hero + embedded calculator + two-up article grid
   Driven by the "Nestimate Home" admin page; shares the brand tokens.
   Wider than the reading width: the front page breaks out to ~1120px
   (articles / archives keep the 820px container).
   ========================================================================= */
body.home main.container,
body.blog main.container { max-width: 1120px; }

.ns-hero {
    position: relative;
    margin: 24px 0 10px;
    padding: clamp(48px, 8vw, 92px) 28px;
    border: 1px solid var(--ns-panel);
    border-radius: 26px;
    overflow: hidden;
    text-align: center;
    background:
        radial-gradient(85% 130% at 10% -10%, var(--ns-cold-soft) 0, transparent 52%),
        radial-gradient(85% 130% at 100% 115%, var(--ns-warm-soft) 0, transparent 50%),
        linear-gradient(180deg, #fff 0, var(--ns-surface) 100%);
}
.ns-hero-inner { max-width: 900px; margin: 0 auto; }

/* Eyebrow as a small designed badge rather than plain text */
.ns-hero-eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin: 0 0 20px;
    padding: 7px 15px;
    border-radius: 999px;
    background: var(--ns-warm-soft);
    color: var(--ns-warm-deep);
    font-size: 12.5px;
    font-weight: 700;
    letter-spacing: .08em;
    text-transform: uppercase;
}
.ns-hero-eyebrow::before {
    content: "";
    width: 7px; height: 7px; border-radius: 50%;
    background: var(--ns-warm);
    box-shadow: 0 0 0 3px rgba(178, 34, 52, .18);
}

/* Big, colourful gradient headline */
.ns-hero-title {
    margin: 0;
    font-weight: 800;
    font-size: clamp(40px, 8vw, 78px);
    line-height: 1.02;
    letter-spacing: -.035em;
    color: var(--ns-cold-deep);           /* fallback */
    text-wrap: balance;
}
@supports ((-webkit-background-clip: text) or (background-clip: text)) {
    .ns-hero-title {
        background: linear-gradient(100deg,
            var(--ns-cold) 0%,
            var(--ns-cold-deep) 42%,
            var(--ns-warm) 100%);
        -webkit-background-clip: text;
        background-clip: text;
        -webkit-text-fill-color: transparent;
        color: transparent;
    }
}
.ns-hero-sub {
    margin: 22px auto 0;
    max-width: 620px;
    font-size: clamp(16px, 2.2vw, 20px);
    line-height: 1.55;
    color: var(--ns-ink-soft);
}

/* Calculator — wider than the plugin default (600px) on the landing */
.ns-home-calc { margin: 30px 0 8px; }
.ns-home-calc .nestimate-app { max-width: 820px; margin: 0 auto; }

.ns-home-grid-h {
    margin: 46px 0 20px;
    font-size: 22px;
    font-weight: 700;
    letter-spacing: -.02em;
    color: var(--ns-ink);
}
.ns-home-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;   /* two per row */
    gap: 24px;
}
@media (max-width: 720px) {
    .ns-home-grid { grid-template-columns: 1fr; gap: 16px; }
    .ns-hero { border-radius: 20px; }
    .ns-home-calc .nestimate-app { max-width: 100%; }
}

/* =========================================================================
   SITE FOOTER — brand + up to 4 menu columns + legal bottom bar
   All links come from Appearance > Menus (footer_1…4, footer_bottom).
   ========================================================================= */
.ns-footer {
    background: var(--ns-surface);
    border-top: 1px solid var(--ns-line);
    margin-top: 64px;
    color: var(--ns-ink-soft);
}
.ns-footer .container { max-width: 1120px; }

.ns-footer-inner {
    display: grid;
    grid-template-columns: minmax(190px, 1fr) 2.2fr;
    gap: 40px;
    padding-top: 46px;
    padding-bottom: 34px;
    align-items: start;
}
/* If only the brand or only the columns are present, span the full width */
.ns-footer-inner > *:only-child { grid-column: 1 / -1; }

/* Brand block */
.ns-footer-logo { display: inline-flex; align-items: center; text-decoration: none; }
.ns-footer-logo img { height: 34px; width: auto; display: block; }
.ns-footer-title {
    font-size: 19px;
    font-weight: 700;
    color: var(--ns-cold);
    letter-spacing: -.02em;
}
.ns-footer-tagline {
    margin: 12px 0 0;
    font-size: 13.5px;
    line-height: 1.6;
    color: var(--ns-ink-mute);
    max-width: 34ch;
}

/* Columns */
.ns-footer-cols {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 30px 26px;
}
.ns-footer-col-title {
    margin: 0 0 12px;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: .08em;
    text-transform: uppercase;
    color: var(--ns-ink);
}
.ns-footer-menu {
    list-style: none;
    margin: 0;
    padding: 0;
}
.ns-footer-menu li { margin: 0; }
.ns-footer-menu a {
    display: inline-block;
    padding: 5px 0;
    font-size: 14px;
    color: var(--ns-ink-soft);
    line-height: 1.45;
}
.ns-footer-menu a:hover { color: var(--ns-cold); }
.ns-footer-menu .current-menu-item > a { color: var(--ns-cold); font-weight: 600; }
.ns-footer-menu .sub-menu {
    list-style: none;
    margin: 2px 0 8px;
    padding: 0 0 0 12px;
    border-left: 1px solid var(--ns-line);
}
.ns-footer-menu .sub-menu a { font-size: 13px; color: var(--ns-ink-mute); }
.ns-footer-menu .sub-menu a:hover { color: var(--ns-cold); }

/* Optional small print */
.ns-footer-disclaimer {
    padding-top: 0;
    padding-bottom: 18px;
    font-size: 12.5px;
    line-height: 1.6;
    color: var(--ns-ink-mute);
    max-width: 1120px;
}

/* Bottom (legal) bar */
.ns-footer-bottom {
    border-top: 1px solid var(--ns-line2);
    background: #FBFCFE;
}
.ns-footer-bottom .container {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 8px 24px;
    padding-top: 16px;
    padding-bottom: 16px;
}
.ns-copyright {
    margin: 0;
    font-size: 13px;
    color: var(--ns-ink-mute);
}
.ns-copyright a { color: var(--ns-ink-soft); }
.ns-legal-menu {
    list-style: none;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 4px 20px;
    margin: 0;
    padding: 0;
}
.ns-legal-menu a {
    font-size: 13px;
    color: var(--ns-ink-mute);
}
.ns-legal-menu a:hover { color: var(--ns-cold); }

@media (max-width: 860px) {
    .ns-footer-inner {
        grid-template-columns: 1fr;
        gap: 30px;
        padding-top: 36px;
    }
}
@media (max-width: 560px) {
    .ns-footer-cols { grid-template-columns: repeat(auto-fit, minmax(135px, 1fr)); gap: 24px 18px; }
    .ns-footer-bottom .container { flex-direction: column; align-items: flex-start; gap: 12px; }
    .ns-legal-menu { gap: 4px 16px; }
}

.ns-topics { display: grid; grid-template-columns: repeat(var(--ns-topics-cols, 3), 1fr); gap: 16px; margin: 26px 0; }
.ns-topic-card { display: flex; flex-direction: column; gap: 3px; padding: 18px; border: 1px solid var(--ns-line); border-radius: 14px; background: var(--ns-surface); text-decoration: none; transition: border-color .15s, transform .12s, box-shadow .15s; }
.ns-topic-card:hover { border-color: color-mix(in srgb, var(--ns-cold) 40%, transparent); transform: translateY(-2px); box-shadow: 0 6px 18px rgba(44,74,120,.10); }
.ns-topic-name { font-weight: 700; font-size: 16px; color: var(--ns-cold-deep); letter-spacing: -.01em; }
.ns-topic-count { font-size: 12px; color: var(--ns-ink-mute); }
.ns-topic-desc { font-size: 13.5px; color: var(--ns-ink-soft); line-height: 1.5; margin-top: 5px; }
@media (max-width: 720px) { .ns-topics { grid-template-columns: 1fr 1fr; } }
@media (max-width: 460px) { .ns-topics { grid-template-columns: 1fr; } }


/* =========================================================================
   HEADER BAR — single line on desktop
   ========================================================================= */
@media (min-width: 769px) {
    header .container {
        max-width: 1180px;
        flex-wrap: nowrap;
        gap: 16px;
    }

    /* Logó ne zsugorodjon, menü ne törjön */
    .site-logo-container { flex: 0 0 auto; }
    .vortex-main-menu    { flex: 0 0 auto; margin-left: auto; }
    .menu-list           { flex-wrap: nowrap; }
    .menu-list > li > a  { white-space: nowrap; }

    /* A chip adja át a helyet, ha szűkös a sáv */
    .ns-mini-estimate {
        margin-left: 0;
        min-width: 0;
        overflow: hidden;
        text-overflow: ellipsis;
    }
}

/* Szűk desktop / tablet: kisebb padding, hogy még beférjen */
@media (min-width: 769px) and (max-width: 1080px) {
    .menu-list > li > a { padding: 7px 8px; font-size: 13.5px; }
    .menu-list .ns-submenu-toggle { width: 22px !important; margin: 0 2px 0 -4px; }
}



/* Paged landing H1 (/page/2/ …) and archive intro */
.ns-paged-h1 { margin-top: 24px; }
.ns-archive-desc p { margin: 0 0 8px; }

/* =========================================================================
   1.7 — FRONT PAGE "HOW IT WORKS" + FAQ, AUTHOR BOX
   ========================================================================= */
.ns-home-about {
    margin: 36px 0 8px;
    padding: 28px clamp(18px, 4vw, 32px);
    background: var(--ns-surface);
    border: 1px solid var(--ns-line);
    border-radius: var(--ns-radius);
    color: var(--ns-ink-soft);
    font-size: 15.5px;
    line-height: 1.7;
}
.ns-home-about h2 {
    color: var(--ns-ink);
    font-size: clamp(19px, 3vw, 23px);
    font-weight: 700;
    letter-spacing: -.02em;
    line-height: 1.25;
    margin: 0 0 12px;
    text-transform: none;
    text-align: left;
    text-shadow: none;
}
.ns-home-about h3 {
    color: var(--ns-ink);
    font-size: 16.5px;
    font-weight: 600;
    margin: 22px 0 6px;
    text-transform: none;
    text-align: left;
}
.ns-home-about p { margin: 0 0 12px; }
.ns-home-about a { color: var(--ns-cold); text-decoration: underline; text-underline-offset: 2px; }
.ns-home-about .ns-home-faq-h { margin-top: 30px; }
.ns-faq { border-top: 1px solid var(--ns-line); }
.ns-faq-item { border-bottom: 1px solid var(--ns-line); }
.ns-faq-item summary {
    cursor: pointer;
    list-style: none;
    padding: 14px 28px 14px 0;
    position: relative;
    color: var(--ns-ink);
    font-weight: 600;
    font-size: 15.5px;
}
.ns-faq-item summary::-webkit-details-marker { display: none; }
.ns-faq-item summary::after {
    content: "+";
    position: absolute;
    right: 4px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 20px;
    font-weight: 400;
    color: var(--ns-ink-mute);
}
.ns-faq-item[open] summary::after { content: "\2013"; }
.ns-faq-item summary:focus-visible { outline: 2px solid var(--ns-cold); outline-offset: 2px; border-radius: 4px; }
.ns-faq-a { padding: 0 0 14px; }
.ns-faq-a p { margin: 0; }

.ns-author-box {
    display: flex;
    gap: 16px;
    align-items: flex-start;
    margin: 24px 0 0;
    padding: 18px 20px;
    background: var(--ns-surface);
    border: 1px solid var(--ns-line);
    border-radius: var(--ns-radius);
}
.ns-author-box-avatar img { border-radius: 50%; display: block; width: 64px; height: 64px; }
.ns-author-box-body p { margin: 0; }
.ns-author-box-kicker { font-size: 12px; letter-spacing: .06em; text-transform: uppercase; color: var(--ns-ink-mute); }
.ns-author-box-name { font-weight: 700; font-size: 16px; margin: 2px 0 6px !important; }
.ns-author-box-name a { color: var(--ns-ink); text-decoration: none; }
.ns-author-box-name a:hover { color: var(--ns-cold); }
.ns-author-box-bio { font-size: 14.5px; line-height: 1.6; color: var(--ns-ink-soft); }


/* =========================================================================
   SHARK ATLAS: front page (globe hero + articles) and plugin harmony
   ========================================================================= */
html, body { overflow-x: clip; }
.home main.container, .front-page main.container { padding-top: 0; }
.sa-home-globe { margin-bottom: 36px; }
.sa-home-globe .sa-globe { margin-top: 0; }
.home .ns-home-grid-h { margin-top: 8px; }
.sa-home-latest-link { display: inline-block; margin: 4px 0 26px; font-weight: 600; color: var(--ns-cold); }
