/* NH Elements — Header & Footer Styles v1.0.0 */

/* ── CSS variable defaults (overridden by inline :root from PHP) ── */
:root {
    --nh-hdr-bg:          #fdfaf6;
    --nh-hdr-bg-sticky:   #fdfaf6;
    --nh-hdr-mobile-bg:   #fdfaf6;
    --nh-hdr-border:      rgba(125,63,40,0.10);
    --nh-hdr-h:           76px;
    --nh-hdr-h-sticky:    64px;
    --nh-hdr-h-mobile:    64px;
    --nh-hdr-pad-x:       64px;
    --nh-hdr-content-w:   1280px;
    --nh-logo-h:          40px;
    --nh-logo-h-sticky:   36px;
    --nh-logo-h-mobile:   34px;
    --nh-nav-size:        14px;
    --nh-nav-color:       #5c4030;
    --nh-nav-sticky:      #5c4030;
    --nh-nav-hover:       #7d3f28;
    --nh-dropdown-bg:     #2a1c12;
    --nh-dropdown-link:   rgba(253,250,246,0.85);
    --nh-cta-bg:          #7d3f28;
    --nh-cta-color:       #fdfaf6;
    --nh-cta-border:      #7d3f28;
    --nh-cta-hover-bg:    #5c2d1a;
    --nh-cta-hover-color: #fdfaf6;
    --nh-cta-hover-border:#5c2d1a;
    --nh-cta-radius:      50px;
    --nh-cta-size:        13px;
    --nh-cta-pad-y:       11px;
    --nh-cta-pad-x:       26px;
    /* Footer */
    --nh-footer-bg:         #2a1c12;
    --nh-footer-text:       rgba(253,250,246,0.45);
    --nh-footer-link:       rgba(253,250,246,0.55);
    --nh-footer-link-hover: #d4956a;
    --nh-footer-head:       #e8dac8;
    --nh-footer-border:     rgba(253,250,246,0.07);
}

/* ── Header shell ────────────────────────────────────────────────── */

.nh-header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    height: var(--nh-hdr-h);
    background: var(--nh-hdr-bg);
    border-bottom: 1px solid var(--nh-hdr-border);
    transition: height 0.3s ease, box-shadow 0.3s ease, background 0.3s ease;
}

.nh-header.is-sticky {
    height: var(--nh-hdr-h-sticky);
    background: var(--nh-hdr-bg-sticky);
    box-shadow: 0 2px 20px rgba(42,28,18,0.10);
}

.nh-header__inner {
    display: flex;
    align-items: center;
    gap: 32px;
    max-width: var(--nh-hdr-content-w);
    height: 100%;
    margin: 0 auto;
    padding: 0 var(--nh-hdr-pad-x);
}

/* Push nav + CTA to the right (default) */
.nh-header__nav { margin-left: auto; }

/* Nav center: logo left, nav centered, CTA right */
.nh-header--nav-center .nh-header__nav {
    margin-left: auto;
    margin-right: auto;
}
.nh-header--nav-center .nh-header__cta { margin-left: 0; }

/* Nav left: logo left, nav immediate right, CTA pushed to far right */
.nh-header--nav-left .nh-header__nav { margin-left: 0; }
.nh-header--nav-left .nh-header__cta { margin-left: auto; }

/* ── Logo ─────────────────────────────────────────────────────────── */

.nh-header__logo {
    position: relative;
    display: inline-flex;
    align-items: center;
    flex-shrink: 0;
    text-decoration: none;
}

.nh-header__logo-default,
.nh-header__logo-sticky {
    display: block;
    height: var(--nh-logo-h);
    width: auto;
    transition: height 0.3s ease, opacity 0.3s ease;
}

.nh-header.is-sticky .nh-header__logo-default,
.nh-header.is-sticky .nh-header__logo-sticky {
    height: var(--nh-logo-h-sticky);
}

/* If both logos present: crossfade on sticky */
.nh-header__logo-default + .nh-header__logo-sticky {
    position: absolute;
    top: 50%;
    left: 0;
    transform: translateY(-50%);
    opacity: 0;
}

.nh-header.is-sticky .nh-header__logo-default + .nh-header__logo-sticky {
    opacity: 1;
}

.nh-header.is-sticky .nh-header__logo-default:has(+ .nh-header__logo-sticky) {
    opacity: 0;
}

.nh-header__logo-text {
    font-family: "Playfair Display", Georgia, serif;
    font-size: 20px;
    font-weight: 700;
    color: var(--nh-nav-color);
    text-decoration: none;
    transition: color 0.3s;
}

/* ── Nav ──────────────────────────────────────────────────────────── */

.nh-header__nav .nh-nav__list {
    display: flex;
    align-items: center;
    gap: 4px;
    list-style: none;
    margin: 0;
    padding: 0;
}

.nh-header__nav .nh-nav__list > li {
    position: relative;
}

.nh-header__nav .nh-nav__list > li > a {
    display: block;
    padding: 8px 14px;
    font-family: "DM Sans", system-ui, sans-serif;
    font-size: var(--nh-nav-size);
    font-weight: 400;
    color: var(--nh-nav-color);
    text-decoration: none;
    border-radius: 6px;
    transition: color 0.2s, background 0.2s;
    white-space: nowrap;
}

.nh-header__nav .nh-nav__list > li > a:hover,
.nh-header__nav .nh-nav__list > li.current-menu-item > a,
.nh-header__nav .nh-nav__list > li.current-menu-parent > a {
    color: var(--nh-nav-hover);
    background: rgba(125,63,40,0.06);
}

.nh-header.is-sticky .nh-header__nav .nh-nav__list > li > a {
    color: var(--nh-nav-sticky);
}

/* Dropdown indicator */
.nh-header__nav .menu-item-has-children > a::after {
    content: '';
    display: inline-block;
    width: 6px;
    height: 6px;
    border-right: 1.5px solid currentColor;
    border-bottom: 1.5px solid currentColor;
    transform: rotate(45deg) translateY(-2px);
    margin-left: 6px;
    opacity: 0.7;
    vertical-align: middle;
}

/* Dropdown */
.nh-header__nav .sub-menu {
    position: absolute;
    top: calc(100% + 8px);
    left: 0;
    min-width: 200px;
    background: var(--nh-dropdown-bg);
    border-radius: 10px;
    padding: 8px 0;
    list-style: none;
    margin: 0;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-6px);
    transition: opacity 0.2s, transform 0.2s, visibility 0.2s;
    box-shadow: 0 8px 32px rgba(42,28,18,0.18);
    z-index: 100;
}

.nh-header__nav .menu-item-has-children:hover .sub-menu,
.nh-header__nav .menu-item-has-children:focus-within .sub-menu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.nh-header__nav .sub-menu li a {
    display: block;
    padding: 10px 20px;
    font-family: "DM Sans", system-ui, sans-serif;
    font-size: 13px;
    font-weight: 400;
    color: var(--nh-dropdown-link);
    text-decoration: none;
    transition: color 0.2s, background 0.2s;
    white-space: nowrap;
}

.nh-header__nav .sub-menu li a:hover {
    color: #d4956a;
    background: rgba(255,255,255,0.05);
}

/* ── CTA Button ───────────────────────────────────────────────────── */

.nh-header__cta {
    display: inline-block;
    padding: var(--nh-cta-pad-y) var(--nh-cta-pad-x);
    background: var(--nh-cta-bg);
    color: var(--nh-cta-color);
    border: 1.5px solid var(--nh-cta-border);
    border-radius: var(--nh-cta-radius);
    font-family: "DM Sans", system-ui, sans-serif;
    font-size: var(--nh-cta-size);
    font-weight: 500;
    text-decoration: none;
    white-space: nowrap;
    flex-shrink: 0;
    transition: background 0.2s, color 0.2s, border-color 0.2s, box-shadow 0.2s;
    letter-spacing: 0.01em;
}

.nh-header__cta:hover {
    background: var(--nh-cta-hover-bg);
    color: var(--nh-cta-hover-color);
    border-color: var(--nh-cta-hover-border);
    box-shadow: 0 4px 16px rgba(125,63,40,0.22);
}

.nh-header__cta--block {
    display: block;
    text-align: center;
}

/* ── Hamburger ────────────────────────────────────────────────────── */

.nh-hamburger {
    display: none;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 5px;
    width: 40px;
    height: 40px;
    padding: 8px;
    border: none;
    background: transparent;
    cursor: pointer;
    border-radius: 6px;
    transition: background 0.2s;
    flex-shrink: 0;
}

.nh-hamburger:hover { background: rgba(125,63,40,0.06); }

.nh-hamburger span {
    display: block;
    width: 22px;
    height: 1.5px;
    background: var(--nh-nav-color);
    border-radius: 2px;
    transition: transform 0.3s, opacity 0.3s;
    transform-origin: center;
}

.nh-hamburger[aria-expanded="true"] span:nth-child(1) {
    transform: translateY(6.5px) rotate(45deg);
}
.nh-hamburger[aria-expanded="true"] span:nth-child(2) {
    opacity: 0;
}
.nh-hamburger[aria-expanded="true"] span:nth-child(3) {
    transform: translateY(-6.5px) rotate(-45deg);
}

/* ── Mobile Drawer ────────────────────────────────────────────────── */

.nh-mobile-drawer {
    position: fixed;
    top: 0;
    right: 0;
    bottom: 0;
    width: min(360px, 100vw);
    background: var(--nh-hdr-mobile-bg);
    z-index: 1100;
    transform: translateX(100%);
    transition: transform 0.35s cubic-bezier(0.4,0,0.2,1);
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    box-shadow: -4px 0 32px rgba(42,28,18,0.12);
}

.nh-mobile-drawer.is-open {
    transform: translateX(0);
}

.nh-mobile-drawer__inner {
    display: flex;
    flex-direction: column;
    min-height: 100%;
    padding: 0 0 32px;
}

.nh-mobile-drawer__head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 20px 24px;
    border-bottom: 1px solid var(--nh-hdr-border);
}

.nh-mobile-drawer__logo {
    height: var(--nh-logo-h-mobile);
    width: auto;
}

.nh-mobile-drawer__close {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border: none;
    background: transparent;
    cursor: pointer;
    color: var(--nh-nav-color);
    border-radius: 6px;
    transition: background 0.2s;
    flex-shrink: 0;
}

.nh-mobile-drawer__close:hover { background: rgba(125,63,40,0.06); }

/* Prevent Elementor's global rule from collapsing the close button SVG */
.nh-mobile-drawer__close svg {
    width: 20px;
    height: 20px;
    display: block;
    flex-shrink: 0;
}

/* Mobile nav list */
.nh-mobile-nav .nh-nav__list {
    list-style: none;
    margin: 0;
    padding: 12px 0;
}

.nh-mobile-nav .nh-nav__list > li > a {
    display: block;
    padding: 13px 24px;
    font-family: "DM Sans", system-ui, sans-serif;
    font-size: 15px;
    font-weight: 500;
    color: var(--nh-nav-color);
    text-decoration: none;
    border-bottom: 1px solid var(--nh-hdr-border);
    transition: color 0.2s, background 0.2s;
}

.nh-mobile-nav .nh-nav__list > li > a:hover {
    color: var(--nh-nav-hover);
    background: rgba(125,63,40,0.04);
}

/* Mobile sub-menu */
.nh-mobile-nav .sub-menu {
    list-style: none;
    margin: 0;
    padding: 0;
    background: rgba(125,63,40,0.03);
}

.nh-mobile-nav .sub-menu li a {
    display: block;
    padding: 11px 24px 11px 40px;
    font-family: "DM Sans", system-ui, sans-serif;
    font-size: 13px;
    font-weight: 400;
    color: var(--nh-nav-color);
    text-decoration: none;
    border-bottom: 1px solid var(--nh-hdr-border);
    opacity: 0.8;
    transition: color 0.2s, opacity 0.2s;
}

.nh-mobile-nav .sub-menu li a:hover {
    color: var(--nh-nav-hover);
    opacity: 1;
}

.nh-mobile-drawer__footer {
    margin-top: auto;
    padding: 24px;
    /* Always keep CTA in view — stick to bottom of the drawer */
    position: sticky;
    bottom: 0;
    background: var(--nh-hdr-mobile-bg);
    border-top: 1px solid var(--nh-hdr-border);
}

/* ── Overlay ──────────────────────────────────────────────────────── */

.nh-mobile-overlay {
    position: fixed;
    inset: 0;
    background: rgba(42,28,18,0.45);
    z-index: 1050;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.35s, visibility 0.35s;
}

.nh-mobile-overlay.is-visible {
    opacity: 1;
    visibility: visible;
}

/* ── Body offset ──────────────────────────────────────────────────── */

body {
    padding-top: var(--nh-hdr-h) !important;
    transition: padding-top 0.3s;
}

/* ── Inline mobile menu (alternative to off-canvas) ──────────────── */

.nh-mobile-drawer--inline {
    position: fixed;
    top: var(--nh-hdr-h-mobile);
    left: 0;
    right: 0;
    bottom: auto;
    width: 100%;
    transform: translateY(-100%);
    box-shadow: 0 8px 32px rgba(42,28,18,0.12);
    border-top: 1px solid var(--nh-hdr-border);
}

.nh-mobile-drawer--inline.is-open {
    transform: translateY(0);
}

.nh-mobile-drawer--inline .nh-mobile-drawer__inner {
    padding: 0 0 16px;
}

.nh-mobile-drawer--inline .nh-mobile-drawer__footer {
    padding: 16px 20px;
}

.admin-bar .nh-mobile-drawer--inline {
    top: calc(var(--nh-hdr-h-mobile) + 32px);
}

@media screen and (max-width: 782px) {
    .admin-bar .nh-mobile-drawer--inline {
        top: calc(var(--nh-hdr-h-mobile) + 46px);
    }
}

/* ── Admin bar offset (BUG-018) ───────────────────────────────────── */

.admin-bar .nh-header { top: 32px; }
.admin-bar .nh-mobile-drawer:not(.nh-mobile-drawer--inline) { top: 32px; }

@media screen and (max-width: 782px) {
    .admin-bar .nh-header { top: 46px; }
    .admin-bar .nh-mobile-drawer:not(.nh-mobile-drawer--inline) { top: 46px; }
}

/* ── Footer ───────────────────────────────────────────────────────── */

.nh-footer {
    background: var(--nh-footer-bg);
    color: var(--nh-footer-text);
    font-family: "DM Sans", system-ui, sans-serif;
}

.nh-footer__inner {
    display: grid;
    grid-template-columns: 1.5fr 1fr 1fr 1fr;
    gap: 48px 40px;
    max-width: 1280px;
    margin: 0 auto;
    padding: 72px var(--nh-hdr-pad-x) 56px;
}

.nh-footer__brand {}

.nh-footer__logo-link { display: inline-block; }

.nh-footer__logo {
    height: 36px;
    width: auto;
    display: block;
    margin-bottom: 20px;
}

.nh-footer__site-name {
    font-family: "Playfair Display", Georgia, serif;
    font-size: 18px;
    font-weight: 700;
    color: var(--nh-footer-head);
    text-decoration: none;
    display: block;
    margin-bottom: 16px;
}

.nh-footer__tagline {
    font-size: 13px;
    line-height: 1.65;
    color: var(--nh-footer-text);
    margin: 0 0 20px;
    max-width: 280px;
}

.nh-footer__contact { display: flex; flex-direction: column; gap: 6px; }

.nh-footer__address,
.nh-footer__license {
    font-size: 12px;
    color: var(--nh-footer-text);
    margin: 0;
    line-height: 1.5;
}

.nh-footer__phone a,
.nh-footer__email a {
    font-size: 12px;
    color: var(--nh-footer-link);
    text-decoration: none;
    transition: color 0.2s;
}

.nh-footer__phone a:hover,
.nh-footer__email a:hover { color: var(--nh-footer-link-hover); }

.nh-footer__phone,
.nh-footer__email { margin: 0; }

.nh-footer__col {}

.nh-footer__col-head {
    font-family: "DM Sans", system-ui, sans-serif;
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--nh-footer-head);
    margin: 0 0 18px;
}

.nh-footer__links {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.nh-footer__links a {
    font-size: 13px;
    color: var(--nh-footer-link);
    text-decoration: none;
    transition: color 0.2s;
    line-height: 1.4;
}

.nh-footer__links a:hover { color: var(--nh-footer-link-hover); }

.nh-footer__bottom {
    border-top: 1px solid var(--nh-footer-border);
}

.nh-footer__bottom-inner {
    max-width: 1280px;
    margin: 0 auto;
    padding: 20px var(--nh-hdr-pad-x);
    display: flex;
    align-items: center;
    justify-content: center;
}

.nh-footer__bottom p {
    font-size: 11px;
    color: var(--nh-footer-text);
    margin: 0;
    opacity: 0.7;
}

/* ── Responsive ───────────────────────────────────────────────────── */

@media (max-width: 1024px) {
    .nh-header__inner { padding: 0 32px; }
    .nh-footer__inner { grid-template-columns: 1fr 1fr; padding: 56px 32px 48px; gap: 40px 32px; }
    .nh-footer__brand { grid-column: span 2; }
    .nh-footer__bottom-inner { padding: 20px 32px; }
}

@media (max-width: 767px) {
    .nh-header {
        height: var(--nh-hdr-h-mobile);
    }
    .nh-header.is-sticky {
        height: var(--nh-hdr-h-mobile);
    }
    .nh-header__inner {
        padding: 0 20px;
        gap: 16px;
    }
    .nh-header__nav,
    .nh-header__inner .nh-header__cta {
        display: none;
    }
    .nh-hamburger {
        display: flex;
        margin-left: auto;
    }
    body {
        padding-top: var(--nh-hdr-h-mobile) !important;
    }
    .nh-footer__inner {
        grid-template-columns: 1fr;
        padding: 48px 20px 40px;
        gap: 36px;
    }
    .nh-footer__brand { grid-column: span 1; }
    .nh-footer__bottom-inner { padding: 20px; }
}
