/*
Theme Name: Nav Saini
Description: Editorial financing and grants website with editable WordPress pages.
Version: 1.4.0
Requires at least: 6.7
Requires PHP: 8.1
Text Domain: navsaini
*/

:root {
    --ink:#132f2b;
    --forest:#102e28;
    --cream:#f9f7f1;
    --gold:#dfbc79;
    --muted:#49635b;
    --line:#d9dfd3;
    --white:#fff;
    --width:1200px;
}

* {
    box-sizing:border-box;
}

body {
    margin:0;
    background:var(--cream);
    color:var(--ink);
    font:16px/1.65 system-ui,sans-serif;
}

a {
    color:inherit;
    text-underline-offset:.2em;
}

a:focus-visible,summary:focus-visible,button:focus-visible,input:focus-visible,select:focus-visible {
    outline:3px solid #a66d18;
    outline-offset:4px;
}

h1,h2,h3 {
    font-family:Georgia,serif;
    font-weight:500;
    line-height:1.13;
    margin:0 0 .5em;
}

h1 {
    font-size:clamp(2.75rem,6.5vw,6rem);
    letter-spacing:-.055em;
}

h2 {
    font-size:clamp(1.85rem,3vw,3rem);
    letter-spacing:-.035em;
}

h3 {
    font-size:1.35rem;
}

p {
    margin:0 0 1em;
}

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

.ns-wrap {
    width:min(var(--width),calc(100% - 3rem));
    margin:auto;
}

.ns-header {
    background:#fdfbf5;
    border-bottom:1px solid var(--line);
}

.ns-head {
    display:flex;
    justify-content:space-between;
    align-items:center;
    gap:1.25rem;
    min-height:84px;
    padding:.75rem 0;
}

.ns-brand {
    font:600 1.5rem Georgia,serif;
    text-decoration:none;
    display:inline-flex;
    gap:.65rem;
    align-items:center;
    white-space:nowrap;
}

.ns-head ul {
    display:flex;
    align-items:center;
    flex-wrap:wrap;
    gap:.4rem 1.25rem;
    padding:0;
    margin:0;
    list-style:none;
}

.ns-head nav a {
    display:block;
    padding:.25rem 0;
    text-decoration:none;
    font-size:.9rem;
}

.ns-head nav [aria-current] {
    text-decoration:underline;
}

.ns-head nav li:last-child a {
    background:var(--forest);
    color:white;
    padding:.55rem 1rem;
    border-radius:4px;
}

.ns-hero {
    background:var(--forest);
    color:white;
    padding:clamp(2.5rem,5vw,4.5rem) 0;
    border-bottom:1px solid #c9a461;
    position:relative;
    overflow:hidden;
}

.ns-hero p:not(.ns-kicker) {
    max-width:63ch;
    color:#edf2e9;
    font-size:1.05rem;
}

.ns-kicker {
    font-size:.76rem;
    font-weight:750;
    letter-spacing:.16em;
    text-transform:uppercase;
    color:var(--muted);
    margin-bottom:1rem;
}

.ns-hero .ns-kicker {
    color:var(--gold);
}

.ns-body {
    padding:clamp(2.25rem,5vw,4.5rem) 0;
}

.ns-body>.wp-block-group {
    margin-bottom:2.5rem;
}

.ns-services {
    display:grid!important;
    grid-template-columns:repeat(3,minmax(0,1fr));
    gap:1rem;
}

.ns-services p {
    margin:0;
}

.ns-services a {
    display:block;
    background:#fff;
    padding:1.25rem;
    border:1px solid var(--line);
    border-radius:12px;
    text-decoration:none;
    font-weight:650;
}

.ns-services a:hover {
    border-color:var(--forest);
}

.ns-layout {
    display:grid!important;
    grid-template-columns:minmax(0,1.15fr) minmax(0,1fr);
    gap:clamp(1.25rem,4vw,3.5rem);
    align-items:start;
}

.ns-product {
    margin:.75rem 0;
    padding:1.2rem 1.35rem;
    background:white;
    border:1px solid var(--line);
    border-radius:12px;
}

.ns-product p {
    color:var(--muted);
    margin-bottom:.55rem;
}

.ns-product p:last-child {
    margin:0;
}

.ns-product a {
    font-weight:700;
    font-size:.88rem;
}

.ns-product-grid {
    display:grid!important;
    grid-template-columns:repeat(2,minmax(0,1fr));
    gap:1rem;
}

.ns-product-grid .ns-product {
    margin:0;
}

.wp-block-details {
    padding:1rem 1.15rem;
    border:1px solid var(--line);
    background:#fdfbf5;
    border-radius:12px;
    margin:1rem 0;
}

.wp-block-details summary {
    cursor:pointer;
    font-weight:700;
}

.ns-band {
    background:#e8ede3;
    padding:clamp(1.35rem,3vw,2.5rem);
    border-radius:12px;
}

.ns-band>:last-child {
    margin-bottom:0;
}

.ns-button,.ns-form button {
    display:inline-block;
    padding:.75rem 1.15rem;
    border:0;
    border-radius:4px;
    background:var(--forest);
    color:white;
    text-decoration:none;
    font:inherit;
    font-weight:700;
    cursor:pointer;
}

.ns-hero .ns-button {
    background:var(--gold);
    color:var(--ink);
}

.ns-form {
    max-width:760px;
    background:white;
    border:1px solid var(--line);
    border-radius:12px;
    padding:clamp(1.25rem,4vw,2.5rem);
}

.ns-fields {
    display:grid;
    grid-template-columns:repeat(2,minmax(0,1fr));
    gap:1rem;
}

.ns-form label {
    display:block;
    font-weight:650;
}

.ns-form input:not([type=checkbox]),.ns-form select {
    display:block;
    width:100%;
    min-height:46px;
    margin-top:.25rem;
    padding:.55rem;
    background:white;
    border:1px solid #8b9e93;
    border-radius:4px;
    color:var(--ink);
    font:inherit;
}

.ns-form .ns-consent {
    margin:1.25rem 0;
}

.ns-form small,.ns-footer p {
    font-size:.9rem;
}

.ns-form [hidden] {
    display:none;
}

.ns-status {
    padding:1rem;
    background:#e8ede3;
    border-left:4px solid var(--forest);
    margin-bottom:1rem;
}

.ns-trap {
    position:absolute;
    left:-10000px;
}

.ns-footer {
    background:#102f29;
    color:#f1f4eb;
    padding:2.5rem 0;
}

.ns-footer p {
    max-width:85ch;
}

.ns-footer-links {
    display:flex;
    gap:.75rem 1.25rem;
    flex-wrap:wrap;
}

.ns-footer .ns-brand {
    margin-bottom:1rem;
}

.ns-wa {
    display:inline-flex;
    align-items:center;
    gap:.5rem;
    border:1px solid #c7d9cb;
    border-radius:4px;
    padding:.45rem .7rem;
    font-weight:700;
    text-decoration:none;
}

.screen-reader-text {
    position:absolute;
    width:1px;
    height:1px;
    overflow:hidden;
    clip-path:inset(50%);
    white-space:nowrap;
}

.screen-reader-text:focus {
    position:fixed;
    z-index:10;
    top:0;
    left:0;
    width:auto;
    height:auto;
    padding:1rem;
    background:white;
    clip-path:none;
}

.ns-body>p,.ns-body>ul {
    max-width:78ch;
}

.ns-body>section {
    margin-bottom:2.5rem;
}

@media(max-width:800px) {
    .ns-layout {
        grid-template-columns:1fr;
    }
    .ns-head {
        align-items:flex-start;
        flex-direction:column;
        gap:.5rem;
    }
    .ns-head ul {
        gap:.25rem 1rem;
    }
}

@media(max-width:560px) {
    .ns-wrap {
        width:calc(100% - 2rem);
    }
    .ns-product-grid,.ns-services,.ns-fields {
        grid-template-columns:1fr;
    }
    .ns-head nav a {
        font-size:.81rem;
    }
    .ns-head ul {
        gap:.25rem .65rem;
    }
}

/* WordPress can add an inner wrapper to Group blocks in classic themes. */
.ns-layout > .wp-block-group__inner-container,
.ns-services > .wp-block-group__inner-container,
.ns-product-grid > .wp-block-group__inner-container {
    display: contents;
}

.ns-brand img {
    width: 48px;
    height: 48px;
}
.custom-logo-link {
    display: inline-flex;
}
.custom-logo {
    width: auto;
    max-width: 200px;
    max-height: 56px;
}
.ns-footer .custom-logo-link {
    margin-bottom: 1rem;
}
.ns-icon {
    width: 22px;
    height: 22px;
    flex: 0 0 auto;
}
.ns-hero {
    background: radial-gradient(ellipse at 88% 85%, #254940, var(--forest) 60%);
}
.ns-hero-with-image .ns-hero-layout {
    display: grid;
    grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr);
    align-items: center;
    gap: clamp(2rem, 5vw, 4.75rem);
}
.ns-hero h1 {
    max-width: 17ch;
    font-size: clamp(2.55rem, 5.1vw, 4.75rem);
    margin-bottom: .34em;
    text-wrap: balance;
}
.ns-hero-copy .ns-intro {
    margin-bottom: 1.5rem;
}
.ns-hero-media {
    padding: 8px;
    background: #f3dfa012;
    border: 1px solid #f3dfa042;
    border-radius: 18px;
}
.ns-hero-media img {
    display: block;
    width: 100%;
    aspect-ratio: 4 / 3;
    object-fit: cover;
    border-radius: 11px;
}
.ns-services a {
    min-height: 84px;
    display: flex;
    align-items: center;
    gap: .85rem;
    padding: 1rem;
    box-shadow: 0 6px 16px #112b2310;
}
.ns-services a::before {
    content: "";
    width: 42px;
    height: 42px;
    flex: 0 0 42px;
    border-radius: 10px;
    background: #e7efe7 url(assets/commercial.png) center / 24px no-repeat;
}
.ns-services p:nth-child(2) a::before {
    background-image: url(assets/residential.png);
}
.ns-services p:nth-child(3) a::before {
    background-image: url(assets/grants.png);
}
.ns-product {
    border-top: 2px solid #c8aa72;
    box-shadow: 0 6px 18px #112b2309;
}
.ns-layout .ns-product {
    margin-block: .9rem;
}
.ns-footer {
    padding-block: 3rem;
}
.ns-wa {
    align-items: center;
}
@media (max-width: 800px) {
    .ns-hero-with-image .ns-hero-layout {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
    .ns-hero-media {
        max-width: 640px;
    }
    .ns-hero-media img {
        aspect-ratio: 16 / 10;
    }
}
@media (max-width: 560px) {
    .ns-services a {
        min-height: 64px;
        padding: .65rem .9rem;
    }
}


.ns-growth-grid, .ns-program-grid, .ns-stat-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 1rem;
}
.ns-growth-grid, .ns-program-grid { display: grid !important; }
.ns-growth-grid > .wp-block-group__inner-container,
.ns-program-grid > .wp-block-group__inner-container,
.ns-stat-grid > .wp-block-group__inner-container,
.ns-feature > .wp-block-group__inner-container {
    display: contents;
}
.ns-growth-grid .ns-product {
    position: relative;
    padding-top: 3.8rem;
}
.ns-growth-grid .ns-product::before {
    content: "";
    position: absolute;
    inset: 1rem auto auto 1.35rem;
    width: 34px;
    height: 34px;
    border-radius: 8px;
    background: #e7efe7 url(assets/commercial.png) center / 20px no-repeat;
}
.page-grants .ns-growth-grid .ns-product::before {
    background-image: url(assets/grants.png);
}
.ns-feature {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    gap: clamp(1.5rem, 5vw, 4rem);
    align-items: center;
    padding: clamp(1rem, 3vw, 2rem);
    border: 1px solid var(--line);
    border-radius: 16px;
    background: #fff;
}
.ns-feature .ns-feature-photo { margin: 0; }
.ns-feature-photo img {
    display: block;
    width: 100%;
    aspect-ratio: 4 / 3;
    object-fit: cover;
    border-radius: 10px;
}
.ns-stat-grid p {
    margin: .35rem 0;
    padding: 1rem;
    background: #fff;
    border-radius: 9px;
    line-height: 1.4;
}
.ns-stat-grid strong {
    font: 500 clamp(1.45rem, 3vw, 2.4rem) Georgia, serif;
}
.ns-contact-band {
    background: var(--forest);
    color: #fff;
    border-radius: 12px;
    padding: clamp(1.5rem, 4vw, 3rem);
}
.ns-contact-band a { color: var(--gold); font-weight: 700; }
.ns-directory-controls {
    display: flex;
    flex-wrap: wrap;
    align-items: end;
    gap: .75rem 1.25rem;
    margin: 1rem 0;
}
.ns-directory-controls label { font-weight: 700; }
.ns-directory-controls input {
    display: block;
    max-width: 100%;
    min-height: 46px;
    margin-top: .35rem;
    padding: .6rem .8rem;
    border: 1px solid #8b9e93;
    border-radius: 6px;
    background: white;
    font: inherit;
}
.ns-directory-controls p { margin: 0; }
.ns-program { margin: 0; }
.ns-program[hidden] { display: none !important; }
.ns-program .ns-program-type {
    font-size: .8rem;
    font-weight: 700;
}
@media (max-width: 800px) {
    .ns-growth-grid, .ns-program-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .ns-feature { grid-template-columns: 1fr; }
}
@media (max-width: 560px) {
    .ns-growth-grid, .ns-program-grid, .ns-stat-grid { grid-template-columns: 1fr; }
}

.ns-jump-links, .ns-jump-links > .wp-block-group__inner-container {
    display: flex;
    flex-wrap: wrap;
    gap: .55rem;
}
.ns-jump-links p { margin: 0; }
.ns-jump-links a {
    display: inline-block;
    border: 1px solid var(--line);
    background: #fff;
    padding: .55rem .9rem;
    border-radius: 999px;
    text-decoration: none;
    font-weight: 650;
    font-size: .9rem;
}
.ns-jump-links a:hover { border-color: var(--forest); }
.ns-body [id] { scroll-margin-top: 1.5rem; }
.ns-card-icon { position: relative; padding-top: 3.8rem; }
.ns-card-icon::before,
.ns-growth-grid .ns-product.ns-card-icon::before {
    content: "";
    position: absolute;
    inset: 1rem auto auto 1.35rem;
    width: 34px;
    height: 34px;
    border-radius: 8px;
    background: #e7efe7 var(--card-icon, url(assets/documents.png)) center / 22px no-repeat;
}
.ns-icon-loan { --card-icon: url(assets/loan.png); }
.ns-icon-equipment { --card-icon: url(assets/equipment.png); }
.ns-icon-software { --card-icon: url(assets/software.png); }
.ns-icon-commercial { --card-icon: url(assets/commercial.png); }
.ns-icon-residential { --card-icon: url(assets/residential.png); }
.ns-icon-build { --card-icon: url(assets/build.png); }
.ns-icon-renewal { --card-icon: url(assets/renewal.png); }
.ns-icon-training { --card-icon: url(assets/training.png); }
.ns-icon-grants { --card-icon: url(assets/grants.png); }
.ns-prep-grid {
    display: grid;
    grid-template-columns: repeat(3,minmax(0,1fr));
    gap: 1rem;
}
.ns-prep-grid > .wp-block-group__inner-container { display: contents; }
.ns-prep-grid p {
    margin: 0;
    padding: 1rem;
    background: #fff;
    border-radius: 10px;
}
.ns-prep-grid strong { display: inline-block; margin-bottom: .35rem; }
@media (max-width: 680px) {
    .ns-prep-grid { grid-template-columns: 1fr; }
}

.home .ns-body .ns-services { display: none !important; }
.ns-home-hero { padding-block: clamp(1.6rem, 3.5vw, 3rem); }
.ns-home-hero h1 { font-size: clamp(2rem, 4vw, 3.7rem); }
.ns-home-hero-layout { display: grid; gap: 1.25rem 3rem; }
.ns-home-hero-media { grid-column: 2; grid-row: 1; }
.ns-home-services {
    grid-column: 1 / -1;
    display: grid;
    grid-template-columns: repeat(3,minmax(0,1fr));
    gap: .75rem;
}
.ns-home-services a {
    display: flex;
    gap: .65rem;
    align-items: center;
    padding: .8rem;
    background: #faf8f2;
    color: #18211e;
    border-radius: 8px;
    text-decoration: none;
}
.ns-home-services a:hover strong { text-decoration: underline; }
.ns-home-services small { display: block; line-height: 1.4; }
.ns-contact-details { display: grid; gap: .3rem; margin-block: 1rem; overflow-wrap: anywhere; }
.ns-inquiry-layout {
    display: grid;
    grid-template-columns: minmax(0,2fr) minmax(0,1fr);
    gap: 1.5rem;
    align-items: start;
}
.ns-inquiry-layout aside { padding: 1.3rem; background: #e8ede3; border-radius: 12px; }
.ns-form fieldset { border: 0; padding: 0; margin: 0 0 1.2rem; min-width: 0; }
.ns-form legend { font-weight: 750; margin-bottom: .5rem; }
.ns-field-error { color: #962b23; display: block; font-size: .85rem; }
#market-updates .nsmu-cards { grid-template-columns: repeat(auto-fit,minmax(min(100%,230px),1fr)); }
.ns-other-mortgages .ns-product { box-shadow: none; }
@media (max-width: 800px) {
    .ns-home-hero-media { grid-column: 1; grid-row: 3; }
    .ns-inquiry-layout { grid-template-columns: 1fr; }
    .ns-head { min-height: 0; padding-block: .45rem; }
    .ns-head nav a { min-height: 34px; }
}
@media (max-width: 560px) {
    .ns-home-services { grid-template-columns: 1fr; }
    .ns-home-hero-media img { aspect-ratio: 2.2; }
}

/* Homepage hero, navigation and shared footer layout */
.ns-home-hero .ns-hero-layout { column-gap: clamp(1.5rem, 4vw, 3.5rem); row-gap: 1.35rem; }
@media (min-width: 801px) {
    .ns-home-hero .ns-hero-copy { grid-area: 1 / 1; }
    .ns-home-hero .ns-hero-media { grid-area: 1 / 2; }
    .ns-home-hero .ns-home-services { grid-area: 2 / 1 / 3 / -1; }
    .ns-head nav a { font-size: .96rem; }
    .ns-head nav ul { gap: 1.3rem; }
}
@media (max-width: 800px) {
    .ns-home-hero .ns-hero-media img { aspect-ratio: 2.2; }
}
.ns-footer-grid { display: grid; grid-template-columns: 1.35fr .8fr 1fr; gap: 2rem; align-items: start; }
.ns-footer-grid h2 { font: 700 1rem/1.3 system-ui, sans-serif; color: inherit; margin: 0 0 .7rem; }
.ns-footer-grid .ns-contact-details { margin: 0; }
.ns-footer-nav { display: grid; gap: .5rem; justify-items: start; }
.ns-footer-bottom { border-top: 1px solid rgba(255,255,255,.22); margin-top: 1.5rem; padding-top: 1rem; }
.ns-footer .ns-footer-bottom p { max-width: 78ch; margin: 0; }
@media (max-width: 680px) {
    .ns-footer-grid { grid-template-columns: 1fr; gap: 1.3rem; }
}
