/* /css/bwe-nav.css - Session 19 canonical nav styles
   Linked by every page so nav stays consistent.
   Uses #nav (ID selector) for high specificity to override page-specific
   inline nav styles without us editing 10 different style blocks.
   - Orange Weave button (.nav-weave) for the feature CTA
   - Tighter 320px search pill (was 480px, too wide on 13" laptops)
   - Better contrast on placeholder + icon
*/

#nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 600;
  height: 60px; display: flex; align-items: center; justify-content: space-between;
  padding: 0 28px;
  background: rgba(245, 240, 230, 0.85);
  backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid transparent;
  transition: border-color .3s, background .3s;
}
#nav.scrolled {
  border-bottom-color: rgba(45, 40, 32, 0.12);
  background: rgba(245, 240, 230, 0.97);
}

#nav .nav-logo { display: flex; align-items: center; gap: 9px; text-decoration: none; }
#nav .nav-logo img { height: 28px; width: auto; display: block; }

/* search pill: 320px, more contrast */
#nav .nav-search {
  flex: 0 1 420px; max-width: 420px; margin: 0 18px; position: relative;
  display: flex; align-items: center;
  background: rgba(255, 255, 255, 0.85);
  border: 1.5px solid rgba(45, 40, 32, 0.12); border-radius: 100px;
  transition: border-color .18s, background .18s, box-shadow .18s;
}
#nav .nav-search:focus-within {
  background: #fff; border-color: #9a70d4;
  box-shadow: 0 0 0 3px rgba(154, 112, 212, .15);
}
#nav .nav-search-icon {
  position: absolute; left: 14px; color: #5a5040; pointer-events: none;
}
#nav .nav-search-input {
  flex: 1; padding: 9px 16px 9px 38px;
  border: none; background: transparent;
  font-family: 'Fredoka', sans-serif; font-size: 15px; color: #2d2820;
  outline: none; border-radius: 100px; width: 100%; min-width: 0;
}
#nav .nav-search-input::placeholder { color: #5a5040; font-style: italic; }

#nav .nav-mid { display: flex; align-items: center; gap: 22px; }
#nav .nav-mid > a {
  font-size: 16px; color: #5a5040; text-decoration: none; transition: color .18s;
}
#nav .nav-mid > a:hover { color: #2d2820; }

/* orange Weave button: the feature CTA in the nav */
#nav .nav-weave {
  background: #e8845a; color: #fff !important;
  padding: 7px 18px; border-radius: 100px; font-weight: 600;
  border: 2px solid #e8845a; transition: all .2s;
}
#nav .nav-weave:hover {
  background: #c85535; border-color: #c85535; color: #fff !important;
  transform: translateY(-1px); box-shadow: 0 4px 14px rgba(232, 132, 90, .3);
}

#nav .nav-r { display: flex; align-items: center; gap: 14px; }
#nav .nav-login { font-size: 16px; color: #5a5040; text-decoration: none; }
#nav .nav-login:hover { color: #2d2820; }
#nav .nav-cta {
  background: #9a70d4; color: #fff; padding: 9px 22px; border-radius: 100px;
  font-family: 'Fredoka', sans-serif; font-size: 16px; font-weight: 600;
  text-decoration: none; transition: all .2s; border: 2px solid #9a70d4;
}
#nav .nav-cta:hover {
  background: #6a48a4; border-color: #6a48a4; transform: translateY(-1px);
}

/* hamburger for mobile */
#nav .nav-ham {
  display: none; flex-direction: column; gap: 4px; cursor: pointer;
  padding: 6px; background: none; border: none;
  -webkit-tap-highlight-color: transparent;
}
#nav .nav-ham span {
  display: block; width: 20px; height: 2px;
  background: #5a5040; border-radius: 2px; transition: all .25s;
}
#nav .nav-ham.open span:nth-child(1) { transform: translateY(6px) rotate(45deg); }
#nav .nav-ham.open span:nth-child(2) { opacity: 0; }
#nav .nav-ham.open span:nth-child(3) { transform: translateY(-6px) rotate(-45deg); }

.nav-drop {
  display: none; position: fixed; top: 60px; left: 0; right: 0;
  background: rgba(245, 240, 230, .98); backdrop-filter: blur(16px);
  border-bottom: 1.5px solid rgba(45, 40, 32, 0.12);
  z-index: 599; flex-direction: column; padding: 12px 20px 18px;
}
.nav-drop a {
  padding: 11px 0; font-size: 16px; color: #5a5040;
  text-decoration: none; border-bottom: 1px solid rgba(45, 40, 32, 0.12);
  display: block; transition: color .18s;
}
.nav-drop a:last-child { border-bottom: none; }
.nav-drop a:hover { color: #9a70d4; }
.nav-drop.open { display: flex; }

/* mobile breakpoints */
@media (max-width: 980px) {
  #nav .nav-search { display: none; }
}
@media (max-width: 768px) {
  #nav { padding: 0 16px; }
  #nav .nav-mid { display: none; }
  #nav .nav-ham { display: flex; }
}

/* === s42: Find pill + Donate link in nav ============================= */
#nav .find-pill {
  display: inline-flex; align-items: center; gap: 7px;
  margin: 0 18px; padding: 8px 16px 8px 14px;
  background: rgba(107, 76, 154, 0.06);
  border: 1.5px solid #A88FCB; border-radius: 100px;
  color: #6B4C9A;
  font-family: 'Fredoka','Inter',sans-serif; font-weight: 500;
  font-size: 14px; letter-spacing: 0.01em;
  text-decoration: none; white-space: nowrap; flex: 0 0 auto;
  transition: all .18s ease;
}
#nav .find-pill:hover { background: #6B4C9A; color: #fff; border-color: #6B4C9A; }
#nav .find-pill-icon { width: 13px; height: 13px; flex-shrink: 0; }
#nav .nav-donate { font-size: 16px; color: #5a5040; text-decoration: none; transition: color .18s; }
#nav .nav-donate:hover { color: #2d2820; }
@media (max-width: 600px) {
  #nav .find-pill { padding: 8px 10px; margin: 0 10px; }
  #nav .find-pill span { display: none; }
}

/* === s42r2: Find pill polish ====================================== */
#nav .find-pill {
  padding: 9px 18px 9px 15px;
  font-size: 15px;
  font-weight: 600;
}
#nav .find-pill-icon { width: 14px; height: 14px; }

/* === s42r3: Find pill tighter to logo (legacy) ===================== */
#nav .find-pill { margin-right: auto; margin-left: 12px; }

/* === s42r4: nav-mid/nav-r gap + logged-in mid hide =================== */
body.rw-loggedin #nav .nav-mid > a:not(.nav-weave) { display: none; }

/* === s43r3: nav layout (A+B) + heart icon ============================= */

/* A: pull weave next to find-pill, push nav-mid right */
#nav .find-pill { margin-right: 12px; margin-left: 12px; }
#nav .nav-mid { margin-left: auto; }
body.rw-loggedin #nav .nav-mid { display: none; }
body.rw-loggedin #nav .nav-r { margin-left: auto; }
/* === s43r3c: nav-r uniform spacing + weave underline fix (kept) ====== */
#nav .nav-weave { text-decoration: none; }
#nav .nav-r { gap: 22px; margin-left: 22px; }

/* === s49r3 mobile-nav: cramped-nav cleanup ===========================
   On mobile, hide the orange Weave CTA + nav-r entirely. Hamburger
   does all the work. Find-pill becomes a clean 42px circle on phones. */
@media (max-width: 768px) {
  #nav .nav-weave { display: none !important; }
  #nav .nav-r { display: none !important; }
  #nav .nav-ham { margin-left: auto !important; }
}
@media (max-width: 480px) {
  #nav .find-pill {
    padding: 0 !important; margin: 0 8px 0 0 !important;
    gap: 0 !important; border-radius: 50% !important;
    width: 42px; height: 42px;
    justify-content: center; flex-shrink: 0;
  }
  #nav .find-pill span { display: none !important; }
  #nav .find-pill-icon { width: 16px !important; height: 16px !important; }
  #nav .nav-logo img { height: 24px !important; }
}

/* Bar-crop fix: letterbox bars on specific CF Stream videos */
/* scale(1.259) = 1/(1-2*(37/360)) - removes the ~10% top/bottom bars precisely */
iframe[src*="ad0b0202f1e78b87082d009aa1e2f252"],
iframe[src*="68571250ff0c40cd16a44a90586596ac"] {
  transform: scale(1.259) !important;
  transform-origin: center center !important;
}
