/* ==========================================================================
   NPF ETFs — global styles (tokens, base, header, hero, footer, shared components)
   Values measured on npfinvestetfs.com at 1528px (Divi build, Oct 2026).
   ========================================================================== */

/* Fustat lives in the media library (uploaded through Divi's custom-font manager) */
@font-face { font-family: "Fustat Regular";   src: url("/wp-content/uploads/et-fonts/Fustat-Regular.ttf") format("truetype");   font-display: swap; }
@font-face { font-family: "Fustat Medium";    src: url("/wp-content/uploads/et-fonts/Fustat-Medium.ttf") format("truetype");    font-display: swap; }
@font-face { font-family: "Fustat Semibold";  src: url("/wp-content/uploads/et-fonts/Fustat-SemiBold.ttf") format("truetype");  font-display: swap; }
@font-face { font-family: "Fustat Bold";      src: url("/wp-content/uploads/et-fonts/Fustat-Bold.ttf") format("truetype");      font-display: swap; }
@font-face { font-family: "Fustat Extrabold"; src: url("/wp-content/uploads/et-fonts/Fustat-ExtraBold.ttf") format("truetype"); font-display: swap; }

:root {
    --navy:   #1b4057;
    --green:  #00845f;
    --sage:   #e9efeb;
    --taupe:  #a89f8b;
    --ink:    #2d2d2d;
    --body:   #666666;
    --white:  #ffffff;

    --f-body:     Inter, Helvetica, Arial, Lucida, sans-serif;
    --f-regular:  "Fustat Regular", Helvetica, Arial, Lucida, sans-serif;
    --f-medium:   "Fustat Medium", Helvetica, Arial, Lucida, sans-serif;
    --f-semibold: "Fustat Semibold", Helvetica, Arial, Lucida, sans-serif;
    --f-bold:     "Fustat Bold", Helvetica, Arial, Lucida, sans-serif;
    --f-xbold:    "Fustat Extrabold", Helvetica, Arial, Lucida, sans-serif;

    --row: 90%;            /* Divi row width (1362px of a 1513px viewport) */
    --row-max: 1600px;
    --admin-bar: 0px;
    --sp: 54px;           /* Divi section padding (50px ≤980) */
    --rp: 27px;           /* Divi row padding (30px ≤980) */
}
@media (max-width: 1349px) { :root { --sp: 4vw; --rp: 2vw; } }   /* Divi: section 4% / row 2% of the width below 1350px */
@media (max-width: 980px) { :root { --sp: 50px; --rp: 30px; } }
.admin-bar { --admin-bar: 32px; }   /* the live pill sits 35px below a 32px offset at every width */

/* ── Base ───────────────────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
    margin: 0;
    background: var(--white);
    color: var(--body);
    font: 500 14px/1.7em var(--f-body);     /* Divi: computed 23.8px, inherited as a length */
    -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; height: auto; display: block; }
a { color: inherit; text-decoration: none; }
h1, h2, h3, h4, h5, h6 { margin: 0; padding-bottom: 10px; font-family: var(--f-semibold); font-weight: 500; line-height: 1em; color: #333; }   /* Divi defaults */
p { margin: 0; }
p + p { padding-top: 1em; }    /* Divi paragraph spacing */
ul { margin: 0; padding: 0 0 0 1em; }

.row { width: var(--row); max-width: var(--row-max); margin: 0 auto; }
.section { padding: var(--sp) 0; }
.section--sage  { background: var(--sage); }
.section--navy  { background: var(--navy); color: var(--white); }
.section--green { background: var(--green); color: var(--white); }
.section--taupe { background: var(--taupe); color: var(--white); }

.skip-to-content { position: absolute; left: -9999px; top: 0; z-index: 2000; background: var(--white); padding: 8px 16px; }
.skip-to-content:focus { left: 8px; top: 8px; }


/* ── Round button (live .round-button) ──────────────────────────────────── */
.round-button {
    display: inline-flex; align-items: center;
    width: 210px;                 /* Divi module CSS #round-button { width: 210px } (min-width rules in live-custom.css) */
    padding: .3em 2em .3em .7em;  /* 5.4px 36px 5.4px 12.6px at 18px; Divi scales it with the font */
    border-radius: 60px;
    background: var(--navy); color: var(--white);
    font: 600 18px/1.7 var(--f-body); letter-spacing: -0.33px;
    transition: background-color .3s;
}
.round-button:hover { background: var(--green); }

/* Arrow links (.read-more-link-black / -white / .more-link) and .au come from live-custom.css */
.round-button { position: relative; min-width: 252px; }
.round-button::after {           /* Divi ETmodules "$" (arrow right), always shown */
    content: ""; position: absolute; right: 12px; top: 50%; width: 18px; height: 18px; transform: translateY(-50%);
    background: currentColor;
    -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M4 12h14M13 6l6 6-6 6' fill='none' stroke='%23000' stroke-width='2'/%3E%3C/svg%3E") center/contain no-repeat;
            mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M4 12h14M13 6l6 6-6 6' fill='none' stroke='%23000' stroke-width='2'/%3E%3C/svg%3E") center/contain no-repeat;
}

/* ── Header (floating pill, fixed) ──────────────────────────────────────── */
.site-header {
    position: fixed; z-index: 1000;
    top: calc(35px + var(--admin-bar)); left: 0; right: 0;
    pointer-events: none;
}
.site-header__pill {
    pointer-events: auto;
    width: 95%; max-width: 1625px; min-height: 109px;
    margin: 0 auto; padding: 10px 30px;
    display: flex; align-items: center; justify-content: space-between;
    border-radius: 60px;
    background: radial-gradient(circle at 0% 0%, #fff 0%, rgba(255, 255, 255, .8) 70%);
    box-shadow: 0 2px 18px rgba(0, 0, 0, .3);
}
.site-logo img { width: 144px; height: auto; }

.primary-nav__list { list-style: none; margin: 0; padding: 0; display: flex; }
.primary-nav__list > li { position: relative; padding: 0 11px; }
.primary-nav__list > li:last-child { padding-right: 0; }
.primary-nav__list > li > a {
    display: flex; align-items: center; gap: 6px;
    padding: 31px 0;
    font: 500 18px/1.5 var(--f-bold); letter-spacing: -0.27px; color: var(--navy);
    transition: opacity .3s;
}
.primary-nav__list > li > a:hover { opacity: .7; }
.primary-nav__list > li.is-current > a { color: var(--green); }
.caret { width: 8px; height: 8px; display: inline-block; background: currentColor;
    -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 10 6'%3E%3Cpath d='M1 1l4 4 4-4' fill='none' stroke='%23000' stroke-width='1.6'/%3E%3C/svg%3E") center/contain no-repeat;
            mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 10 6'%3E%3Cpath d='M1 1l4 4 4-4' fill='none' stroke='%23000' stroke-width='1.6'/%3E%3C/svg%3E") center/contain no-repeat; }

.sub-menu {
    list-style: none; margin: 0; padding: 20px 0;
    position: absolute; top: 88px; left: 0; width: 240px;
    background: var(--navy); box-shadow: 0 2px 5px rgba(0, 0, 0, .1);
    opacity: 0; visibility: hidden; transition: opacity .2s, visibility .2s;
}
.has-sub:hover > .sub-menu, .has-sub.is-open > .sub-menu, .has-sub:focus-within > .sub-menu { opacity: 1; visibility: visible; }
.sub-menu a { display: block; padding: 6px 20px; font: 500 16px/1.5 var(--f-bold); color: var(--white); }
.sub-menu a:hover { opacity: .7; }

.nav-toggle { display: none; background: none; border: 0; padding: 8px; cursor: pointer; color: var(--navy); }
.nav-toggle__icon { display: grid; gap: 5px; width: 28px; }
.nav-toggle__icon span { height: 3px; background: currentColor; border-radius: 2px; }

/* ── Page hero ──────────────────────────────────────────────────────────── */
.page-hero {
    min-height: 500px;
    padding: calc(300px + var(--sp) + var(--rp)) 0 calc(5px + var(--rp));   /* Divi: section + 250px row margin + row padding + 50px text margin (381px / 32px at ≥1350px) */
    background:
        linear-gradient(230deg, #1b4057 0%, rgba(27, 64, 87, .6) 100%),
        url("/wp-content/uploads/2025/09/NPF_ZigZag_Insight_SiteBannerOpt2-1024x333-1.webp") center/cover no-repeat;
    background-color: var(--navy);
}
.page-hero__row { width: var(--row); max-width: var(--row-max); margin: 0 auto; }
.page-hero__title { font: 500 80px/1.14 var(--f-regular); color: var(--white); letter-spacing: -1.5px; padding-bottom: 0; }

/* ── Footer ─────────────────────────────────────────────────────────────── */
.site-footer { background: var(--green); color: var(--white); padding: calc(10px + var(--rp)) 0 calc(17px + var(--rp)); text-align: center; }   /* 37px / 44px at ≥1350px */
.site-footer__inner { width: var(--row); max-width: var(--row-max); margin: 0 auto; }
.site-footer__line { font: 600 14px/1.5 var(--f-medium); }
.site-footer__line + .site-footer__line { padding-top: 2.75%; }   /* Divi module gap: 2.75% of the row */
.site-footer__line a:hover { text-decoration: underline; }
.site-footer__social { display: grid; grid-template-columns: 1fr 1fr; align-items: start; padding-top: var(--rp); }   /* live: 2 columns, split at the centre */
.site-footer__follow { margin: 10px 25px 0 0; text-align: right; font: 600 18px/1.5 var(--f-regular); }
.site-footer__icons { display: flex; gap: 15px; }
.social-icon img { width: 40px; height: 40px; }

/* ── Divider (live 0.8px navy rule) ─────────────────────────────────────── */
.divider { border: 0; border-top: .8px solid var(--navy); margin: 14px 0 8px; }   /* Divi divider module box */

/* ── Pop-ups (native <dialog>) ──────────────────────────────────────────── */
dialog { border: 0; padding: 0; max-width: 95vw; }
dialog::backdrop { background: rgba(0, 0, 0, .5); }
dialog:focus { outline: none; }

/* ── Tablet / phone ─────────────────────────────────────────────────────── */
@media (max-width: 980px) {
    /* Live Divi menu module on tablet/phone: 625px (phone 465px) pill, 100px tall, hamburger + navy dropdown */
    .site-header__pill { position: relative; max-width: 625px; min-height: 100px; padding: 20px 30px; flex-wrap: nowrap; align-items: flex-start; }
    .nav-toggle { margin-top: 8px; }
    .nav-toggle { display: block; }
    .primary-nav {
        display: none; position: absolute; top: 100%; left: 30px; right: 30px; z-index: 5;
        background: var(--navy); border-top: 3px solid var(--green); box-shadow: 0 2px 5px rgba(0, 0, 0, .1);
    }
    .nav-open .primary-nav { display: block; }
    .primary-nav__list { flex-direction: column; padding: 5% 5%; }
    .primary-nav__list > li { padding: 0; }
    .primary-nav__list > li > a { padding: 10px 5%; color: var(--white); border-bottom: 1px solid rgba(0, 0, 0, .03); }
    .primary-nav__list > li.is-current > a { color: var(--green); }
    .caret { display: none; }
    .sub-menu { position: static; width: auto; opacity: 1; visibility: visible; background: none; box-shadow: none; padding: 0 0 0 20px; }
    .sub-menu a { color: var(--white); padding: 10px 5%; }
    .page-hero { min-height: 300px; padding: 230px 0 35px; }   /* Divi: 50 + 100px row margin + 30 + 50px text margin */
    .page-hero__title { font-size: 50px; }
    /* footer social row: Divi columns stack — "Follow Us" right-aligned, icons centred below */
    .site-footer { padding: 40px 0 47px; }
    .site-footer__social { grid-template-columns: 1fr; width: 88.9%; margin: 0 auto; }   /* live row: 80% of the screen */
    .site-footer__icons { justify-content: center; }
    .site-footer__line + .site-footer__line { padding-top: 30px; }
}
@media (max-width: 767px) {
    .site-header__pill { max-width: 465px; }
    .page-hero__title { font-size: 40px; }
}
