/* ============================================================
   css/nav.css — Shared navigation, sidebar & utility styles
   Include on every page alongside its page-specific CSS
   ============================================================ */

/* ── Sidebar Overlay ──────────────────────────────────────── */
.sidebar-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.42);
  z-index: 240;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.35s ease;
}
.sidebar-overlay.open {
  opacity: 1;
  pointer-events: all;
}

/* ── Sidebar Drawer ───────────────────────────────────────── */
.sidebar {
  position: fixed;
  top: 0; left: 0; bottom: 0;
  width: 300px;
  background: #fff;
  border-right: 3px solid #7A0000;
  z-index: 1000;
  transform: translateX(-100%);
  transition: transform 0.42s cubic-bezier(0.25, 0.46, 0.45, 0.94);
  display: flex;
  flex-direction: column;
  padding: 120px 0 44px;        /* Clears the tallest breakpoint */
  box-shadow: 4px 0 40px rgba(0,0,0,0.10);
}
.sidebar.open {
  transform: translateX(0);
}
.sidebar-menu {
  list-style: none;
  margin: 0; padding: 0;
  flex: 1;
}
.sidebar-menu li {
  border-bottom: 1px solid #e8e2d9;
}
.sidebar-menu li a {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 36px;
  color: #1a1410;
  text-decoration: none;
  font-family: 'Montserrat', sans-serif;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  transition: color 0.25s, background 0.2s, padding-left 0.25s;
}
.sidebar-menu li a:hover {
  color: #7A0000;
  background: rgba(122,0,0,0.04);
  padding-left: 44px;
}
.sidebar-menu li a.active {
  color: #7A0000;
  background: rgba(122,0,0,0.05);
  border-left: 3px solid #7A0000;
  padding-left: 33px;
  font-weight: 700;
}
.sidebar-menu li a svg {
  width: 14px; height: 14px;
  stroke: #7A0000;
  fill: none;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
  flex-shrink: 0;
  opacity: 0.5;
  transition: opacity 0.2s, transform 0.2s;
}
.sidebar-menu li a:hover svg,
.sidebar-menu li a.active svg {
  opacity: 1;
}
.sidebar-menu li a:hover svg { transform: translateX(4px); }
.sidebar-logo {
  padding: 28px 36px 0;
  border-top: 1px solid #e8e2d9;
  margin-top: auto;
}
.sidebar-logo img {
  height: 44px;
  opacity: 0.5;
  object-fit: contain;
}

/* ── Hamburger / Menu Button ──────────────────────────────── */
.menu-btn {
  background: none;
  border: none;
  cursor: pointer;
  padding: 8px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  outline: none;
  flex-shrink: 0;
  border-radius: 4px;
  transition: background 0.2s;
}
.menu-btn:hover { background: rgba(122,0,0,0.06); }
.menu-btn span {
  display: block;
  width: 24px; height: 2px;
  background: #7A0000;
  border-radius: 2px;
  transition: transform 0.3s ease, opacity 0.3s ease;
}
.menu-btn.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.menu-btn.open span:nth-child(2) { opacity: 0; transform: scaleX(0); }
.menu-btn.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ── Unified Nav Bar ──────────────────────────────────────── */
nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 200;
  display: flex; align-items: center; justify-content: space-between;
  padding: 0px 32px;
  background: rgba(250,248,245,0.97);
  backdrop-filter: blur(16px);
  border-bottom: 1px solid rgba(122,0,0,0.10);
  box-shadow: 0 2px 20px rgba(0,0,0,0.04);
  min-height: clamp(88px, 5vw, 104px);
  gap: 0px;
  transition: background 0.3s, box-shadow 0.3s;
  overflow: visible;                 /* Allow logo to break out */
}
nav.scrolled {
  background: rgba(250,248,245,0.99);
  box-shadow: 0 4px 32px rgba(0,0,0,0.08);
}
.nav-left {
  display: flex; align-items: center; gap: 16px;
  flex-shrink: 0;
  overflow: visible;                 /* Allow logo to break out */
}
.nav-logo-wrap {
  display: flex; align-items: center;
  text-decoration: none;
  overflow: visible;                 /* Allow logo to break out */
}
.nav-logo-wrap img,
.nav-logo img {
  height: clamp(101px, 5.75vw, 120px);   /* ~115% of nav min-height */
  width: auto;
  object-fit: contain;
  display: block;
}
.nav-right {
  display: flex; align-items: center;
  gap: 10px;
}

/* ── Inline Search Bar (inner pages) ─────────────────────── */
.nav-search {
  display: flex; align-items: center; gap: 10px;
  border: 1.5px solid #e8e2d9;
  border-radius: 50px;
  padding: 0px 20px;
  background: rgba(255,255,255,0.8);
  transition: border-color 0.2s, box-shadow 0.2s;
}
.nav-search:focus-within {
  border-color: rgba(122,0,0,0.4);
  box-shadow: 0 0 0 3px rgba(122,0,0,0.07);
}
.nav-search svg {
  width: 16px; height: 16px;
  stroke: #7A0000;
  fill: none;
  stroke-width: 2.2;
  stroke-linecap: round;
  stroke-linejoin: round;
  flex-shrink: 0;
}
.nav-search input {
  background: none; border: none; outline: none;
  color: #1a1410;
  font-family: 'Montserrat', sans-serif;
  font-size: 13px;
  width: 190px;
}
.nav-search input::placeholder { color: #b0a89a; }

/* ── Search Button + Overlay (index.html) ────────────────── */
.search-btn {
  background: none; border: none; cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  width: 42px; height: 42px; border-radius: 50%;
  transition: background 0.2s;
  outline: none;
}
.search-btn:hover { background: rgba(122,0,0,0.08); }
.search-btn svg {
  width: 20px; height: 20px;
  stroke: #7A0000; fill: none;
  stroke-width: 2.2; stroke-linecap: round;
}
.search-overlay {
  position: fixed; inset: 0;
  background: rgba(122,0,0,0.96);
  z-index: 1100;
  display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  opacity: 0; pointer-events: none;
  transition: opacity 0.3s ease;
}
.search-overlay.open {
  opacity: 1; pointer-events: all;
}
.search-form {
  display: flex; align-items: center; gap: 16px;
  border-bottom: 2px solid rgba(255,255,255,0.5);
  padding-bottom: 14px;
  width: min(580px, 88vw);
}
.search-form input {
  background: none; border: none; outline: none;
  font-family: 'Playfair Display', serif;
  font-size: 32px; color: white; width: 100%;
  font-weight: 400;
}
.search-form input::placeholder { color: rgba(255,255,255,0.35); }
.search-form svg {
  width: 28px; height: 28px;
  stroke: rgba(255,255,255,0.5); fill: none;
  stroke-width: 2; stroke-linecap: round;
  flex-shrink: 0;
}
.search-close {
  position: absolute; top: 26px; right: 36px;
  background: none; border: none; cursor: pointer;
  color: rgba(255,255,255,0.6); font-size: 32px; line-height: 1;
  transition: color 0.2s; outline: none;
}
.search-close:hover { color: white; }

/* ── Scroll Reveal ────────────────────────────────────────── */
.reveal {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 0.65s ease, transform 0.65s ease;
}
.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}

/* ── Responsive ───────────────────────────────────────────── */
@media (max-width: 768px) {
  nav { padding: 0px 20px; min-height: 80px; }
  .nav-logo-wrap img,.nav-logo img { height: 92px; }  /* 115% of 80px */
  .nav-search input { width: 130px; }
  .sidebar { width: 280px; }
}
@media (max-width: 480px) {
  .nav-search input { width: 90px; }
  .nav-search { padding: 8px 14px; }
}