/* =============================================================
   WowCodes — Shared Layout CSS (nav + footer + bottom nav)
   ============================================================= */

/* CSS Variables — available to all pages that load this file */
:root {
  --bg: #0d0d0d;
  --bg2: #141414;
  --bg3: #1a1a1a;
  --bg4: #222;
  --border: rgba(255,255,255,0.07);
  --border2: rgba(255,255,255,0.13);
  --amber: #f0a500;
  --amber-bg: rgba(240,165,0,0.08);
  --amber-bg2: rgba(240,165,0,0.15);
  --text: #f0ede6;
  --text2: #9a9690;
  --text3: #5c5a56;
  --teal: #1abc8a;
  --teal-bg: rgba(26,188,138,0.08);
  --r: 6px;
  --rl: 12px;
}

/* ============================
   TOP NAV
   ============================ */
nav.topnav {
  position: sticky; top: 0; z-index: 1000;
  background: rgba(13,13,13,0.94);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 0.5px solid var(--border);
  padding: 0 48px;
  display: flex; align-items: center; justify-content: space-between;
  height: 58px;
}

.nav-logo {
  font-family: 'DM Serif Display', serif;
  font-size: 20px; color: var(--text);
  display: flex; align-items: center; gap: 10px;
  text-decoration: none; flex-shrink: 0;
}

.nav-links {
  display: flex; gap: 2px; align-items: center;
}

/* Plain link */
.nav-link {
  font-size: 13px; color: var(--text2);
  padding: 6px 12px; border-radius: var(--r);
  transition: color 0.15s, background 0.15s;
  background: none; border: none;
  font-family: 'DM Sans', sans-serif;
  text-decoration: none; white-space: nowrap;
  display: inline-flex; align-items: center; gap: 4px;
  cursor: pointer;
}
.nav-link:hover,
.nav-link.active { color: var(--text); background: rgba(255,255,255,0.05); }

/* Dropdown container */
.nav-dropdown {
  position: relative;
}

.nav-caret {
  font-size: 9px; opacity: 0.5;
  transition: transform 0.15s;
  display: inline-block;
}
.nav-dropdown:hover .nav-caret,
.nav-dropdown:focus-within .nav-caret { transform: rotate(180deg); }

/* Dropdown panel */
.nav-dropdown-menu {
  position: absolute;
  top: calc(100% + 10px);
  left: 50%;
  transform: translateX(-50%) translateY(-6px);
  background: #1c1c1c;
  border: 0.5px solid var(--border2);
  border-radius: var(--rl);
  padding: 6px;
  min-width: 230px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.15s, transform 0.15s;
  box-shadow: 0 12px 40px rgba(0,0,0,0.5);
}
/* Invisible bridge fills the gap between button and menu so
   moving the cursor down doesn't lose the hover state */
.nav-dropdown-menu::before {
  content: '';
  position: absolute;
  top: -12px;
  left: -16px;
  right: -16px;
  height: 12px;
}
.nav-dropdown:hover .nav-dropdown-menu,
.nav-dropdown:focus-within .nav-dropdown-menu {
  opacity: 1;
  pointer-events: all;
  transform: translateX(-50%) translateY(0);
}

/* Dropdown items */
.nav-dd-item {
  display: flex; align-items: center; gap: 10px;
  padding: 9px 10px; border-radius: 8px;
  text-decoration: none; color: var(--text2);
  transition: background 0.12s, color 0.12s;
  font-family: 'DM Sans', sans-serif;
}
.nav-dd-item:hover { background: rgba(255,255,255,0.05); color: var(--text); }

.nav-dd-icon {
  width: 30px; height: 30px; flex-shrink: 0;
  background: var(--bg3); border: 0.5px solid var(--border);
  border-radius: 8px;
  display: flex; align-items: center; justify-content: center;
  font-size: 14px; line-height: 1;
}

.nav-dd-name {
  font-size: 13px; font-weight: 500;
  color: var(--text); display: block; line-height: 1.3;
}
.nav-dd-desc {
  font-size: 11px; color: var(--text3);
  display: block; line-height: 1.3;
}

.nav-dd-divider {
  height: 0.5px; background: var(--border);
  margin: 4px 6px;
}

/* CTA button in nav */
.btn-nav {
  background: var(--amber); color: #0d0d0d;
  font-size: 13px; font-weight: 500;
  padding: 7px 18px; border-radius: var(--r); border: none;
  cursor: pointer; transition: background 0.15s, transform 0.1s;
  font-family: 'DM Sans', sans-serif; margin-left: 8px;
  display: inline-flex; align-items: center; gap: 6px;
  text-decoration: none; white-space: nowrap; flex-shrink: 0;
}
.btn-nav:hover { background: #ffb820; }
.btn-nav:active { transform: scale(0.97); }

/* ============================
   FOOTER
   ============================ */
footer.site-footer {
  border-top: 0.5px solid var(--border);
  padding: 56px 48px 36px;
  padding-bottom: calc(36px + env(safe-area-inset-bottom));
  font-family: 'DM Sans', sans-serif;
}

.footer-inner {
  max-width: 1100px; margin: 0 auto;
}

.footer-top {
  display: grid;
  grid-template-columns: 1.8fr 1fr 1fr 1fr;
  gap: 48px; margin-bottom: 48px;
}

.footer-logo {
  font-family: 'DM Serif Display', serif;
  font-size: 18px; color: var(--text);
  display: flex; align-items: center; gap: 8px;
  margin-bottom: 10px; text-decoration: none;
}

.footer-tagline {
  font-size: 13px; color: var(--text3);
  line-height: 1.7; max-width: 230px; font-weight: 300;
}

.footer-rating {
  display: inline-flex; align-items: center; gap: 6px;
  background: var(--bg3); border: 0.5px solid var(--border2);
  border-radius: 20px; padding: 5px 10px;
  font-size: 12px; color: var(--text2);
  margin-top: 14px;
}
.footer-rating-star { color: var(--amber); font-size: 11px; }

.footer-social {
  display: flex; gap: 6px; margin-top: 18px;
}
.footer-social-link {
  width: 32px; height: 32px;
  background: var(--bg3); border: 0.5px solid var(--border2);
  border-radius: 8px;
  display: flex; align-items: center; justify-content: center;
  color: var(--text3);
  transition: background 0.15s, color 0.15s, border-color 0.15s;
  text-decoration: none;
}
.footer-social-link:hover {
  background: var(--bg4); color: var(--text2);
  border-color: rgba(255,255,255,0.2);
}
.footer-social-link svg { width: 14px; height: 14px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }

.footer-col-title {
  font-size: 11px; font-weight: 600;
  letter-spacing: 0.1em; text-transform: uppercase;
  color: var(--text3); margin-bottom: 14px;
  font-family: 'DM Mono', monospace;
}

.footer-col-links {
  display: flex; flex-direction: column; gap: 10px;
}

.footer-col-link {
  font-size: 13px; color: var(--text2);
  text-decoration: none; transition: color 0.15s; line-height: 1.3;
  display: flex; flex-direction: column;
}
.footer-col-link:hover { color: var(--text); }
.footer-col-link em {
  font-style: normal; font-size: 11px; color: var(--text3); margin-top: 1px;
}

.footer-bottom {
  border-top: 0.5px solid var(--border);
  padding-top: 24px;
  display: flex; align-items: center; justify-content: space-between;
  flex-wrap: wrap; gap: 12px;
}
.footer-bottom-left {
  font-size: 12px; color: var(--text3);
  display: flex; align-items: center; gap: 16px; flex-wrap: wrap;
}
.footer-bottom-sep { opacity: 0.4; }
.footer-bottom-link {
  color: var(--text3); text-decoration: none; transition: color 0.15s;
}
.footer-bottom-link:hover { color: var(--text2); }

.footer-bottom-right {
  display: flex; align-items: center; gap: 8px;
  font-size: 12px; color: var(--text3);
}

/* ============================
   MOBILE BOTTOM NAV
   ============================ */
.bottom-nav {
  display: none;
  position: fixed; bottom: 0; left: 0; right: 0;
  background: rgba(13,13,13,0.97);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-top: 0.5px solid var(--border);
  grid-template-columns: repeat(4, 1fr);
  padding-bottom: env(safe-area-inset-bottom);
  z-index: 999;
}
.bn-item {
  display: flex; flex-direction: column; align-items: center;
  justify-content: center; padding: 10px 4px 8px;
  font-size: 10px; font-weight: 400;
  color: var(--text3); text-decoration: none;
  position: relative; gap: 4px;
  transition: color 0.15s;
  font-family: 'DM Sans', sans-serif;
}
.bn-item.active { color: var(--amber); }

.bn-icon {
  width: 22px; height: 22px;
  display: flex; align-items: center; justify-content: center;
}
.bn-icon svg {
  width: 100%; height: 100%;
  fill: none; stroke: currentColor;
  stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round;
}

.bn-indicator {
  position: absolute; top: 4px;
  left: 50%; transform: translateX(-50%);
  width: 18px; height: 2px;
  background: var(--amber); border-radius: 2px;
}

/* ============================
   RESPONSIVE
   ============================ */
@media (max-width: 900px) {
  nav.topnav { padding: 0 28px; }
  .footer-top { grid-template-columns: 1fr 1fr; gap: 32px; }
  footer.site-footer { padding: 40px 28px 36px; padding-bottom: calc(36px + env(safe-area-inset-bottom)); }
}

@media (max-width: 700px) {
  nav.topnav { padding: 0 20px; height: 54px; }
  .nav-links { display: none; }
  footer.site-footer { padding: 36px 24px calc(84px + env(safe-area-inset-bottom)); }
  .footer-top { grid-template-columns: 1fr 1fr; gap: 24px; margin-bottom: 32px; }
  .footer-bottom { flex-direction: column; align-items: flex-start; gap: 10px; }
  .bottom-nav { display: grid; }
}

@media (max-width: 480px) {
  .footer-top { grid-template-columns: 1fr; gap: 24px; }
}