/* ==================================================
   NILPAR — Floating smart-sticky header (Microsoft AI mechanics, Nilpar tone)
   ================================================== */

.nilpar-header {
  position: sticky;
  top: 0;
  z-index: 999;
  /* Tighter top rhythm (reduces the perceived “gap” above the header card) */
  /* Slightly wider than content, with generous viewport breathing room */
  /* Phase 6 — Step 3: slightly wider horizontal rhythm (institutional breathing room) */
  padding: 6px 38px 0;
  /* Phase 6 fix: use body-safe width math (avoid 100vw scrollbar asymmetry) */
  transition: transform 0.2s ease;
}

.nilpar-header.is-hidden { transform: translateY(-140%); }

/* When the mobile menu is open, keep header visible to prevent a "stuck" state */
body.nilpar-menu-open .nilpar-header,
body.nilpar-menu-open .nilpar-header.is-hidden { transform: translateY(0) !important; }

.nilpar-header__inner {
  /* Phase 6 (LOCKED): header is slightly wider than ALL content (gallery+summary grid)
     while still maintaining a safe gap to the viewport edge (no “clipped” right side). */
  width: 100%;
  box-sizing: border-box;
  /* D) “Slightly wider than all content”
     Base on WIDE container (used by the product grid), not the reading column.
     Keep a consistent safe inset so the right side never feels tight.
  */
  max-width: calc(var(--nilpar-container-wide-width) + 64px);
  /* width:100% already constrains within header padding; avoids "wider only on right" illusion */
  margin: 0 auto;
  background: rgba(248, 245, 238, 0.92);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(0, 0, 0, 0.08);
  border-radius: 16px;
  /* Horizontal padding sets the "breathing room" on the right side (nav + hamburger)
     so it never kisses the card edge. */
  /* Phase 6 — Step 3: calm authority, a touch more room */
  padding: 14px 30px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  box-shadow: 0 10px 30px rgba(0,0,0,0.08);
}

/* --------------------------------------------------
   Phase 6 — Header card breathing room (LOCK)
   Why: nilpar-style.css also defines padding on .nilpar-header__inner.
   This override ensures the right-hand side never sits against the card edge.
   -------------------------------------------------- */
.nilpar-header .nilpar-header__inner{
  padding: 14px 30px !important;
}

@media (max-width: 1024px){
  .nilpar-header .nilpar-header__inner{
    padding: 14px 24px !important;
    /* Keep the floating card comfortably away from the viewport edges */
    max-width: 100% !important;
    /* rely on header padding for safe inset */
  }
}

.nilpar-header__left,
.nilpar-header__right {
  display: flex;
  align-items: center;
  gap: 12px;
}

/* Left logo (replaces search) */
.nilpar-header__logo {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: auto;
  height: auto;
  padding: 4px 6px;
  border-radius: 0;
  border: none;
  background: transparent;
}

/* Desktop logo scale: readable and confident */
.nilpar-header__logo img {
  /* Phase 6 — Step 3: +20–25% for authority */
  width: 144px;
  height: 144px;
  object-fit: contain;
}

/* (Intentionally no second .nilpar-header__logo block) */

/* Give the symbol room to breathe; header should feel curated */
@media (max-width: 1024px) {
  .nilpar-header { padding: 14px 22px 0; }
  .nilpar-header__logo { width: 56px; height: 64px; }
  .nilpar-header__logo img { width: 52px; height: 52px; }
}

/* Remove "Home" from desktop nav (mobile keeps it) */
.nilpar-header__nav .menu-item-home { display: none; }
.nilpar-header__mobile .menu-item-home { display: list-item; }

/* Hamburger only on mobile */
.nilpar-header__hamburger { display: none; }

.nilpar-brand {
  font-weight: 600;
  letter-spacing: 0.02em;
  text-decoration: none;
}

.nilpar-nav {
  display: flex;
  align-items: center;
  gap: 18px;
}

.nilpar-nav a {
  text-decoration: none;
}

/* Header menu typography: slightly larger + UI letter spacing */
.nilpar-header__nav .nilpar-nav > ul > li > a{
  /* Phase 6 — Step 3: slightly larger, but still quiet */
  font-size: var(--nilpar-font-size-nav, 0.97rem);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--nilpar-color-text-dark);
  padding: 12px 10px;
}

/* Never show nested items in the desktop header nav */
.nilpar-header__nav .sub-menu,
.nilpar-header__nav ul ul{
  display: none !important;
}

/* Desktop header should never expose sub-pages */
.nilpar-header__nav .nilpar-nav .sub-menu{
  display: none !important;
}

/* Desktop menu: larger + clearer */
.nilpar-header__nav .nilpar-nav a{
  font-size: var(--nilpar-font-size-nav, 0.97rem);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--nilpar-color-text-dark);
}

/* Safety: never show submenu items in the desktop header */
.nilpar-header__nav .sub-menu{
  display: none !important;
}

/* Icon buttons */
.nilpar-iconbtn {
  width: 40px;
  height: 40px;
  border-radius: 999px;
  border: 1px solid rgba(0,0,0,0.08);
  background: rgba(255,255,255,0.25);
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

/* Mobile + tablet */
@media (max-width: 1024px) {
  .nilpar-header__nav { display: none; }
  .nilpar-header__hamburger { display: inline-flex; }
}

/* Desktop safety: never show the mobile overlay above desktop breakpoint */
@media (min-width: 1025px) {
  .nilpar-mobile-menu { display: none !important; }
}

.nilpar-menu--mobile {
  list-style: none;
  margin: 0;
  padding: 0;
}

.nilpar-menu--mobile li { margin: 10px 0; }
.nilpar-menu--mobile a {
  display: inline-block;
  text-decoration: none;
  font-size: 22px;
  line-height: 1.25;
}

/* Mobile menu panel */
.nilpar-mobile-menu {
  position: fixed;
  inset: 0;
  z-index: 2000;
  /* Always flex; hidden via opacity/visibility for smoother feel */
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding: 22px 18px;
  background: rgba(10, 10, 12, 0.55);
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity 0.18s ease, visibility 0s linear 0.18s;
}

.nilpar-mobile-menu.is-open {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  transition: opacity 0.18s ease;
}

.nilpar-mobile-menu__inner {
  /* Editorial reading width inside a full-screen overlay */
  max-width: 820px;
  width: 100%;
  position: relative;
  max-height: calc(100vh - 44px);
  margin: 0;
  background: rgba(248, 245, 238, 0.96);
  border: 1px solid rgba(0,0,0,0.08);
  border-radius: 18px;
  padding: 88px 22px 26px;
  overflow: auto;
  box-shadow: 0 18px 50px rgba(0,0,0,0.18);
}

.nilpar-mobile-menu__close {
  position: absolute;
  top: 18px;
  right: 18px;
  width: 42px;
  height: 42px;
  border-radius: 999px;
  border: 1px solid rgba(0,0,0,0.12);
  background: rgba(255,255,255,0.35);
  font-size: 18px;
  line-height: 1;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;

  color: #111;
  font-weight: 700;
}

.nilpar-mobile-menu__inner { position: relative; }


/* If logged in, WordPress admin bar sits on top; don't let it crush the overlay */
body.admin-bar .nilpar-mobile-menu {
  top: 32px;
  height: calc(100vh - 32px);
}

@media (max-width: 782px) {
  body.admin-bar .nilpar-mobile-menu {
    top: 46px;
    height: calc(100vh - 46px);
  }
}

.nilpar-mobile-menu nav ul {
  list-style: none;
  padding: 0;
  margin: 18px 0 0;
}

/* Hard override: ensure mobile overlay nav never inherits desktop flex menu */
.nilpar-mobile-menu .nilpar-nav,
.nilpar-mobile-menu nav {
  display: block;
}

.nilpar-mobile-menu .nilpar-menu {
  display: block !important;
  flex-direction: column;
  align-items: flex-start;
  justify-content: flex-start;
  gap: 0;
  margin: 18px 0 0;
  padding: 0;
  list-style: none;
}

.nilpar-mobile-menu .nilpar-menu li {
  margin: 0;
}

.nilpar-mobile-menu .nilpar-menu a {
  display: block;
  width: 100%;
  text-decoration: none;
  font-size: 28px;
  line-height: 1.15;
  padding: 12px 0;
  border-bottom: 1px solid rgba(0,0,0,0.06);
}

.nilpar-mobile-menu .nilpar-menu li:last-child a {
  border-bottom: 0;
}

.nilpar-mobile-menu nav li {
  margin: 0;
}

.nilpar-mobile-menu nav a {
  display: block;
  width: 100%;
  text-decoration: none;
  font-size: 28px;
  line-height: 1.15;
  padding: 12px 0;
}

/* Scroll lock is handled in JS (fixed body) to avoid layout shift */

/* ==================================================
   NILPAR — Floating Header + Minimal Footer
   ================================================== */

:root {
  --nilpar-adminbar-offset: 0px;
  --nilpar-header-maxw: 1120px;
  --nilpar-header-top: 16px;
  --nilpar-header-radius: 14px;
  --nilpar-header-shadow: 0 10px 35px rgba(0,0,0,0.12);
  --nilpar-header-border: 1px solid rgba(0,0,0,0.08);
  --nilpar-header-bg: rgba(255,255,255,0.72);
  --nilpar-header-blur: 10px;
  --nilpar-header-transition: 0.2s; /* snappy by default */
}

body.admin-bar { --nilpar-adminbar-offset: 32px; }
@media (max-width: 782px){ body.admin-bar { --nilpar-adminbar-offset: 46px; } }

/* Header wrap (fixed + floating) */
.nilpar-floating-header {
  position: fixed;
  top: var(--nilpar-adminbar-offset);
  left: 0;
  right: 0;
  z-index: 999;
  pointer-events: none; /* allow page scroll; inner bar re-enables */
}

.nilpar-floating-header__bar {
  width: calc(100% - 24px);
  max-width: var(--nilpar-header-maxw);
  margin: var(--nilpar-header-top) auto 0;
  background: var(--nilpar-header-bg);
  -webkit-backdrop-filter: blur(var(--nilpar-header-blur));
  backdrop-filter: blur(var(--nilpar-header-blur));
  border: var(--nilpar-header-border);
  box-shadow: var(--nilpar-header-shadow);
  border-radius: var(--nilpar-header-radius);
  pointer-events: auto;
  transition: transform var(--nilpar-header-transition) ease, opacity var(--nilpar-header-transition) ease;
}

/* hide on scroll down */
.nilpar-floating-header.is-hidden .nilpar-floating-header__bar {
  transform: translateY(calc(-1 * (var(--nilpar-header-top) + 120%)));
  opacity: 0;
}

.nilpar-floating-header__inner {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 14px;
  padding: 12px 14px;
}

/* Left tools */
.nilpar-header-tool {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  border-radius: 10px;
  border: 1px solid rgba(0,0,0,0.08);
  background: rgba(255,255,255,0.55);
}

.nilpar-header-tool svg {
  width: 18px;
  height: 18px;
}

/* Center brand */
.nilpar-header-brand {
  text-align: center;
  line-height: 1;
}

.nilpar-header-brand a {
  text-decoration: none;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  font-size: 14px;
}

/* Desktop nav */
.nilpar-header-nav {
  display: flex;
  align-items: center;
  gap: 14px;
  justify-content: flex-end;
}

.nilpar-header-nav .menu {
  display: flex;
  gap: 14px;
  list-style: none;
  margin: 0;
  padding: 0;
}

.nilpar-header-nav .menu a {
  text-decoration: none;
  font-size: 14px;
  padding: 8px 6px;
}

/* Mobile menu toggle */
.nilpar-header-toggle {
  display: none;
}

/* Search drawer */
.nilpar-search-drawer {
  display: none;
  border-top: 1px solid rgba(0,0,0,0.08);
  padding: 10px 14px 14px;
}

.nilpar-search-drawer.is-open {
  display: block;
}

.nilpar-search-drawer form {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 10px;
  align-items: center;
}

.nilpar-search-drawer input[type="search"] {
  width: 100%;
  padding: 10px 12px;
  border-radius: 10px;
  border: 1px solid rgba(0,0,0,0.15);
  background: rgba(255,255,255,0.75);
}

.nilpar-search-drawer button {
  padding: 10px 12px;
  border-radius: 10px;
  border: 1px solid rgba(0,0,0,0.15);
  background: rgba(255,255,255,0.75);
}

/* Mobile panel */
.nilpar-mobile-panel {
  display: none;
  border-top: 1px solid rgba(0,0,0,0.08);
  padding: 12px 14px 16px;
}

.nilpar-mobile-panel.is-open {
  display: block;
}

.nilpar-mobile-panel .menu {
  list-style: none;
  margin: 0;
  padding: 0;
}

.nilpar-mobile-panel .menu li {
  margin: 10px 0;
}

.nilpar-mobile-panel .menu a {
  display: inline-block;
  text-decoration: none;
  font-size: 32px;
  line-height: 1.05;
}

.nilpar-mobile-panel .nilpar-footer-micro {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
  margin-top: 18px;
  font-size: 14px;
}

.nilpar-mobile-panel .nilpar-footer-micro a {
  text-decoration: none;
}

/* IMPORTANT: Nilpar uses the sticky header (no body offset needed).
   Keep the page tight; the admin bar already provides safe separation. */
body { padding-top: 0; }

@media (max-width: 960px) {
  :root {
  --nilpar-adminbar-offset: 0px;
    --nilpar-header-top: 12px;
  }

  .nilpar-header-nav {
    display: none;
  }

  .nilpar-header-toggle {
    display: inline-flex;
  }

  body {
    padding-top: 0;
  }
}

/* Footer */
.nilpar-footer {
  /* Reduce “dead air” before the footer; keep it calm, not empty */
  margin-top: 28px;
  padding: 28px 20px;
}

.nilpar-footer__inner {
  width: 100%;
  max-width: var(--nilpar-header-maxw);
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1.2fr 1fr 1fr 1.4fr;
  gap: 22px;
  align-items: start;
}

.nilpar-footer__brand {
  letter-spacing: 0.08em;
  text-transform: uppercase;
  font-size: 14px;
}

.nilpar-footer__heading {
  margin: 0 0 10px;
  font-size: 12px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  opacity: 0.7;
}

.nilpar-footer__col--legal {
  grid-column: 1 / -1;
}

/* Bottom row: copyright + socials on one line (desktop), wrap on mobile */
.nilpar-footer__bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}

.nilpar-footer__sep {
  color: var(--nilpar-color-border-light, #D9D2C3);
}

.nilpar-footer__col a {
  display: block;
  text-decoration: none;
  margin: 6px 0;
  font-size: 14px;
}

/* Remove default menu bullets in footer columns */
.nilpar-footer ul,
.nilpar-footer__inner ul {
  list-style: none;
  padding-left: 0;
  margin: 0;
}

.nilpar-footer li { margin: 0 0 10px; }

/* Footer list rhythm: less "floaty" */
.nilpar-footer__col a {
  line-height: 1.65;
}

.nilpar-footer__legal {
  margin: 6px 0 0;
  font-size: 12px;
  opacity: 0.7;
}

.nilpar-footer__note {
  margin: 0 0 12px;
  font-size: 14px;
  line-height: 1.45;
  opacity: 0.75; /* mute meta-text */
}

.nilpar-footer__success {
  margin: 0 0 12px;
  font-size: 14px;
  opacity: 0.9;
}

.nilpar-footer__form {
  display: flex;
  gap: 10px;
  align-items: center;
  justify-content: space-between;
  margin: 0 0 14px;
}

/* Give the JOIN action its own breathing space on the far right */
.nilpar-footer__form button {
  margin-left: auto;
}

.nilpar-footer__form input[type="email"] {
  flex: 1;
  min-width: 180px;
  padding: 10px 12px;
  border: 1px solid var(--nilpar-color-border-light, #D9D2C3);
  border-radius: 12px; /* very soft-rounded: matches social tokens */
  background: transparent;
}

.nilpar-footer__form input[type="email"]:focus {
  outline: none;
  border-color: var(--nilpar-hover-underline-color, #E2C675);
}

.nilpar-footer__form button {
  padding: 10px 12px;
  border-radius: 0;
  border: none;
  background: transparent;
  color: inherit;
  cursor: pointer;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-size: 12px;
}

.nilpar-footer__form button:hover {
  text-decoration: underline;
  text-decoration-color: var(--nilpar-hover-underline-color, #E2C675);
  text-underline-offset: 6px;
}

 .nilpar-footer__sociallinks {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  font-size: 12px;
}


 .nilpar-footer__sociallinks a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 34px;
  height: 34px;
  padding: 0 10px;
  border: 1px solid var(--nilpar-color-border-light, #D9D2C3);
  border-radius: 12px; /* very soft-rounded */
  text-decoration: none;
  opacity: 0.9;
  transition: transform 0.15s ease, box-shadow 0.15s ease, border-color 0.15s ease;
}

.nilpar-footer__sociallinks a:hover {
  border-color: var(--nilpar-hover-underline-color, #E2C675);
  box-shadow: 0 10px 18px rgba(0,0,0,0.08);
  transform: translateY(-1px);
  text-decoration: underline;
  text-decoration-color: var(--nilpar-hover-underline-color, #E2C675);
  text-underline-offset: 6px;
}


@media (max-width: 780px) {
  .nilpar-footer__inner {
    grid-template-columns: 1fr;
  }

  .nilpar-footer__form {
    flex-direction: column;
    align-items: stretch;
  }
}


/* Phase 6 — Header typography polish */
.nilpar-menu--desktop a { font-size: 17px; }

@media (max-width: 980px) {
  .nilpar-header__logo img {
    height: 64px;
  }
}


/* Defensive: ensure desktop header shows no dropdown submenus */
.nilpar-header__nav .sub-menu {
  display: none !important;
}

/* ==========================================================
   PHASE 6.2 — Header + Footer micro-polish (LOCKED STRUCTURE)
   - Larger logo mark
   - Desktop nav: slightly larger type
   - Footer socials: bordered tokens (soft-rounded)
   ========================================================== */

/* Header: tighten top rhythm a touch */
.nilpar-header{ padding-top: 6px; }

/* Logo: remove circular “badge” and let the mark breathe */
.nilpar-header__logo{
  width: auto;
  height: auto;
  padding: 0;
  border: none;
  background: transparent;
  border-radius: 0;
  box-shadow: none;
}

.nilpar-header__logo img{
  height: 80px;
  width: auto;
  display: block;
}

@media (max-width: 780px){
  .nilpar-header__logo img{ height: 56px; }
}

/* Desktop nav: slightly larger, calmer */
.nilpar-menu--desktop a{
  font-size: 19px !important;
}

/* Safety: never show submenus in desktop header */
.nilpar-menu--desktop .sub-menu{ display: none !important; }

/* Footer: reduce “dead air” and make socials feel like icons */
.nilpar-footer{
  margin-top: 28px;
  padding: 28px 20px;
}

.nilpar-footer__sociallinks{
  gap: 10px;
}

.nilpar-footer__sociallinks a{
  border: 1px solid var(--nilpar-color-border-light, #D9D2C3);
  padding: 6px 10px;
  border-radius: 10px; /* Very soft-rounded */
  line-height: 1;
  transition: transform .18s ease, box-shadow .18s ease, background-color .18s ease, border-color .18s ease;
}

.nilpar-footer__sociallinks a:hover,
.nilpar-footer__sociallinks a:focus-visible{
  background: rgba(201, 162, 77, 0.10); /* antique gold glow */
  border-color: rgba(201, 162, 77, 0.55);
  transform: translateY(-1px);
  box-shadow: 0 6px 18px rgba(0,0,0,0.10);
}

.nilpar-footer__sociallinks a:not(:last-child)::after{ content: none; }


