/* Navbar + footer únicos de Nuywame, compartidos por TODAS las páginas
   (landing en Tailwind, LMS en Bootstrap, páginas de contenido nuevas).
   Se escriben a mano (no utilidades de Tailwind) para no depender de un
   framework de CSS particular ni de su reset global — así se puede incluir
   este archivo en cualquier página sin romper el resto de sus estilos.
   Los colores replican el theme de Tailwind ya usado en index.html. */

:root {
  --nw-crema: #F4EFE2;
  --nw-crema-2: #EDE6D4;
  --nw-cafe: #1B1712;
  --nw-cafe-2: #241E17;
  --nw-oliva: #69744C;
  --nw-oliva-dark: #525C3B;
  --nw-dorado: #C8A968;
  --nw-hueso: #EFE8D6;
  --nw-serif: 'Cormorant Garamond', Georgia, serif;
  --nw-sans: 'Jost', 'Helvetica Neue', Arial, sans-serif;
}

.nw-nav *, .nw-footer * { box-sizing: border-box; }
.hidden { display: none !important; }
.sr-only {
  position: absolute; width: 1px; height: 1px;
  padding: 0; margin: -1px; overflow: hidden;
  clip: rect(0,0,0,0); white-space: nowrap; border: 0;
}

.nw-nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 999;
  transition: background-color .3s ease, box-shadow .3s ease, backdrop-filter .3s ease;
  font-family: var(--nw-sans);
  /* Color sólido y constante por default — la mayoría de las páginas no
     tienen una imagen oscura justo debajo del nav, así que un nav
     transparente ahí se confunde con el fondo claro de la página. */
  background-color: rgba(27, 23, 18, .96);
  backdrop-filter: blur(10px);
  box-shadow: 0 4px 18px rgba(0,0,0,.12);
}
/* Solo la home (con hero a pantalla completa justo debajo del nav) usa el
   efecto de nav transparente que se vuelve sólido al hacer scroll. */
.nw-nav.nw-nav--hero {
  background-color: transparent;
  backdrop-filter: none;
  box-shadow: none;
}
.nw-nav.nw-nav--hero.is-scrolled {
  background-color: rgba(27, 23, 18, .92);
  backdrop-filter: blur(10px);
  box-shadow: 0 6px 24px rgba(0,0,0,.25);
}
.nw-nav-inner {
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 24px;
  height: 80px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}
.nw-nav-logo img { height: 36px; width: auto; display: block; }

.nw-nav-links {
  display: none;
  align-items: center;
  gap: 30px;
  list-style: none;
  margin: 0; padding: 0;
}
.nw-nav-links > li { position: relative; }
.nw-nav-link, .nw-nav-link-btn {
  background: none; border: none; cursor: pointer;
  display: inline-flex; align-items: center; gap: 5px;
  color: rgba(239,232,214,.9);
  font-size: .83rem; font-weight: 500; letter-spacing: .02em;
  font-family: var(--nw-sans);
  text-decoration: none;
  transition: color .2s ease;
  padding: 0;
}
.nw-nav-link:hover, .nw-nav-link-btn:hover, .nw-nav-link.is-active { color: var(--nw-dorado); }
.nw-nav-caret { width: 10px; height: 10px; flex-shrink: 0; }

.nw-nav-dropdown {
  position: absolute;
  left: 50%;
  top: 100%;
  transform: translateX(-50%);
  padding-top: 12px;
  min-width: 220px;
  opacity: 0;
  visibility: hidden;
  transition: opacity .18s ease, visibility .18s ease;
}
.nw-nav-item:hover .nw-nav-dropdown,
.nw-nav-item:focus-within .nw-nav-dropdown { opacity: 1; visibility: visible; }
.nw-nav-dropdown-inner {
  background: var(--nw-cafe-2);
  border: 1px solid rgba(239,232,214,.1);
  border-radius: 10px;
  padding: 8px 0;
  box-shadow: 0 20px 40px rgba(0,0,0,.35);
}
.nw-nav-dropdown-inner a {
  display: block;
  padding: 9px 18px;
  color: rgba(239,232,214,.8);
  font-size: .85rem;
  text-decoration: none;
  white-space: nowrap;
}
.nw-nav-dropdown-inner a:hover { color: var(--nw-dorado); background: rgba(255,255,255,.05); }

.nw-nav-session { display: flex; align-items: center; gap: 16px; }
.nw-nav-account { display: none; color: rgba(239,232,214,.85); font-size: .8rem; font-weight: 500; text-decoration: none; }
.nw-nav-account:hover { color: var(--nw-dorado); }
.nw-nav-cta {
  display: none;
  background: var(--nw-oliva);
  color: var(--nw-hueso);
  font-size: .8rem; font-weight: 500; letter-spacing: .02em;
  padding: 10px 20px;
  border-radius: 999px;
  text-decoration: none;
  transition: background-color .2s ease;
  white-space: nowrap;
}
.nw-nav-cta:hover { background: var(--nw-oliva-dark); }
.nw-nav-toggle {
  display: inline-flex;
  background: none; border: none; color: var(--nw-hueso);
  cursor: pointer; padding: 4px;
}

.nw-notif-menu { position: relative; display: none; }
.nw-nav-bell {
  position: relative;
  display: none;
  background: none; border: none; cursor: pointer;
  color: rgba(239,232,214,.85);
  text-decoration: none;
  padding: 4px;
}
.nw-nav-bell:hover { color: var(--nw-dorado); }
.nw-nav-bell-badge {
  position: absolute; top: -2px; right: -4px;
  background: var(--nw-dorado); color: var(--nw-cafe);
  font-size: .62rem; font-weight: 700; line-height: 1;
  border-radius: 999px; padding: 2px 5px; min-width: 16px; text-align: center;
}
.nw-notif-dropdown {
  position: absolute; right: 0; top: 100%;
  padding-top: 12px; width: 320px; max-width: 88vw;
  opacity: 0; visibility: hidden;
  transition: opacity .18s ease, visibility .18s ease;
}
.nw-notif-menu:hover .nw-notif-dropdown,
.nw-notif-menu:focus-within .nw-notif-dropdown { opacity: 1; visibility: visible; }
.nw-notif-dropdown-inner {
  background: var(--nw-cafe-2);
  border: 1px solid rgba(239,232,214,.1);
  border-radius: 10px; padding: 8px 0;
  box-shadow: 0 20px 40px rgba(0,0,0,.35);
  max-height: 70vh; overflow-y: auto;
}
.nw-notif-vacio {
  padding: 16px 18px; margin: 0;
  color: rgba(239,232,214,.55); font-size: .82rem; font-family: var(--nw-sans);
}
.nw-notif-item {
  display: flex; flex-direction: column; gap: 2px;
  padding: 10px 18px;
  color: rgba(239,232,214,.8); text-decoration: none;
  font-family: var(--nw-sans);
  border-left: 2px solid transparent;
}
.nw-notif-item:hover { background: rgba(255,255,255,.05); }
.nw-notif-item--sin-leer { background: rgba(200,169,104,.08); border-left-color: var(--nw-dorado); }
.nw-notif-item-titulo { font-size: .84rem; font-weight: 500; color: rgba(239,232,214,.92); }
.nw-notif-item-mensaje {
  font-size: .76rem; color: rgba(239,232,214,.55);
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.nw-notif-ver-todas {
  display: block; text-align: center;
  padding: 10px 18px; color: var(--nw-dorado);
  font-size: .82rem; font-weight: 500; font-family: var(--nw-sans);
  text-decoration: none;
}
.nw-notif-ver-todas:hover { background: rgba(255,255,255,.05); }

.nw-nav-cart {
  position: relative;
  display: none;
  color: rgba(239,232,214,.85);
  text-decoration: none;
  padding: 4px;
}
.nw-nav-cart:hover { color: var(--nw-dorado); }
.nw-nav-cart-badge {
  position: absolute; top: -2px; right: -4px;
  background: var(--nw-dorado); color: var(--nw-cafe);
  font-size: .62rem; font-weight: 700; line-height: 1;
  border-radius: 999px; padding: 2px 5px; min-width: 16px; text-align: center;
}

.nw-user-menu { position: relative; display: none; }
.nw-user-chip {
  display: flex; align-items: center; gap: 8px;
  background: none; border: none; cursor: pointer; padding: 0;
  color: rgba(239,232,214,.9); font-family: var(--nw-sans); font-size: .82rem; font-weight: 500;
}
.nw-user-chip:hover { color: var(--nw-dorado); }
.nw-user-avatar {
  width: 30px; height: 30px; border-radius: 999px;
  background: var(--nw-oliva); color: var(--nw-hueso);
  display: flex; align-items: center; justify-content: center;
  font-size: .8rem; font-weight: 600; flex-shrink: 0;
}
.nw-user-avatar-foto { object-fit: cover; }
.nw-user-dropdown {
  position: absolute; right: 0; top: 100%;
  padding-top: 12px; min-width: 200px;
  opacity: 0; visibility: hidden;
  transition: opacity .18s ease, visibility .18s ease;
}
.nw-user-menu:hover .nw-user-dropdown,
.nw-user-menu:focus-within .nw-user-dropdown { opacity: 1; visibility: visible; }
.nw-user-dropdown-inner {
  background: var(--nw-cafe-2);
  border: 1px solid rgba(239,232,214,.1);
  border-radius: 10px; padding: 8px 0;
  box-shadow: 0 20px 40px rgba(0,0,0,.35);
}
.nw-user-dropdown-inner a, .nw-user-dropdown-inner button {
  display: block; width: 100%; text-align: left;
  padding: 9px 18px; color: rgba(239,232,214,.8);
  font-size: .85rem; font-family: var(--nw-sans);
  text-decoration: none; background: none; border: none; cursor: pointer;
  white-space: nowrap;
}
.nw-user-dropdown-inner a:hover, .nw-user-dropdown-inner button:hover { color: var(--nw-dorado); background: rgba(255,255,255,.05); }
.nw-user-dropdown-divider { height: 1px; background: rgba(239,232,214,.1); margin: 6px 0; }
.nw-user-dropdown-toggle:hover { color: var(--nw-dorado); background: rgba(255,255,255,.05); }
.nw-user-dropdown-toggle {
  display: flex; align-items: center; gap: 10px;
  padding: 9px 18px; color: rgba(239,232,214,.8);
  font-size: .85rem; font-family: var(--nw-sans); white-space: nowrap;
}

.nw-stripe-banner {
  position: fixed; top: 0; left: 0; right: 0; z-index: 1000;
  background: #5b3a00; color: var(--nw-hueso);
  padding: 10px 16px; text-align: center; font-size: .85rem;
  font-family: var(--nw-sans);
}
.nw-stripe-banner button {
  background: none; border: 1px solid var(--nw-hueso); color: var(--nw-hueso);
  border-radius: 999px; padding: 3px 14px; margin-left: 10px; cursor: pointer; font-size: .8rem;
}

/* Interruptor tipo switch (activar/desactivar) — panel de admin, ver nw_toggle() en admin_ui.php */
.nw-switch { position: relative; display: inline-block; width: 42px; height: 24px; vertical-align: middle; }
.nw-switch input { position: absolute; inset: 0; width: 100%; height: 100%; margin: 0; opacity: 0; cursor: pointer; z-index: 1; }
.nw-switch-track {
  position: absolute; inset: 0;
  background: var(--nw-cafe); opacity: .35;
  border-radius: 999px;
  transition: background-color .2s ease, opacity .2s ease;
}
.nw-switch-track::before {
  content: ''; position: absolute; top: 3px; left: 3px; width: 18px; height: 18px;
  background: #fff; border-radius: 50%;
  box-shadow: 0 1px 2px rgba(0,0,0,.35);
  transition: transform .2s ease;
}
.nw-switch input:checked ~ .nw-switch-track { background: var(--nw-oliva); opacity: 1; }
.nw-switch input:checked ~ .nw-switch-track::before { transform: translateX(18px); }
.nw-switch input:disabled ~ .nw-switch-track { opacity: .2; }
.nw-switch input:disabled { cursor: not-allowed; }

/* Carrusel de imágenes (ficha de producto) — el zoom/pan a pantalla completa
   lo da PhotoSwipe (CDN, ver content/sections/store/producto.php); esto solo
   es el visor en línea con flechas y puntos. */
.nw-carousel { position: relative; aspect-ratio: 1 / 1; border-radius: 12px; overflow: hidden; background: var(--nw-cafe-2); }
.nw-carousel-track { display: flex; height: 100%; transition: transform .35s ease; }
.nw-carousel-slide { flex: 0 0 100%; height: 100%; }
.nw-carousel-slide a, .nw-carousel-slide img { display: block; width: 100%; height: 100%; object-fit: contain; cursor: zoom-in; }
.nw-carousel-btn {
  position: absolute; top: 50%; transform: translateY(-50%);
  width: 36px; height: 36px; border-radius: 50%; border: none;
  background: rgba(27,23,18,.55); color: #fff; font-size: 1.5rem; line-height: 1;
  cursor: pointer; display: flex; align-items: center; justify-content: center;
  transition: background-color .2s ease;
}
.nw-carousel-btn:hover { background: rgba(27,23,18,.8); }
.nw-carousel-prev { left: 12px; }
.nw-carousel-next { right: 12px; }
.nw-carousel-dots { position: absolute; bottom: 12px; left: 0; right: 0; display: flex; justify-content: center; gap: 6px; }
.nw-carousel-dot { width: 8px; height: 8px; border-radius: 50%; border: none; background: rgba(255,255,255,.5); cursor: pointer; padding: 0; }
.nw-carousel-dot.is-active { background: #fff; }

/* Bloque colapsable estilo Notion dentro del contenido de curso/evento (ver
   panel/admin/_quill_editor.php) — mismas clases que usa el blot de Quill,
   funciona igual en el editor y en la página pública (es un <details>
   nativo, no necesita JS para abrir/cerrar). */
.pf-colapsable-embed {
  border: 1px solid rgba(27,23,18,.12);
  border-radius: 8px;
  padding: 10px 14px;
  margin: 0 0 14px;
  background: var(--nw-crema-2);
}
.pf-colapsable-embed summary { cursor: pointer; font-weight: 600; color: var(--nw-cafe); outline: none; }
.pf-colapsable-embed .pf-colapsable-body-editable { margin-top: 10px; }
.pf-colapsable-embed .pf-colapsable-body-editable > :last-child { margin-bottom: 0; }
.pf-colapsable-embed .pf-colapsable-body-editable ul,
.pf-colapsable-embed .pf-colapsable-body-editable ol { margin: 0 0 10px; padding-left: 22px; }
.pf-colapsable-embed .pf-colapsable-body-editable ul > li,
.pf-colapsable-embed .pf-colapsable-body-editable ol > li { list-style-position: outside; padding-left: 0; margin-bottom: 4px; }
.pf-colapsable-embed .pf-colapsable-body-editable ul > li { list-style-type: disc; }
.pf-colapsable-embed .pf-colapsable-body-editable ol > li { list-style-type: decimal; }

.nw-toast-sesion {
  position: fixed; bottom: 24px; left: 50%; transform: translateX(-50%) translateY(20px);
  background: var(--nw-cafe); color: var(--nw-hueso);
  padding: 14px 22px; border-radius: 12px;
  box-shadow: 0 20px 40px rgba(0,0,0,.35);
  font-family: var(--nw-sans); font-size: .88rem;
  opacity: 0; visibility: hidden; transition: opacity .25s ease, transform .25s ease;
  z-index: 1200;
}
.nw-toast-sesion.mostrar { opacity: 1; visibility: visible; transform: translateX(-50%) translateY(0); }

@media (min-width: 1024px) {
  .nw-notif-menu { display: inline-flex; }
  .nw-nav-bell { display: inline-flex; }
  .nw-nav-cart { display: inline-flex; }
  .nw-user-menu { display: inline-flex; }
}

.nw-mobile-menu {
  display: none;
  background: var(--nw-cafe);
  border-top: 1px solid rgba(239,232,214,.1);
}
.nw-mobile-menu.is-open { display: block; }
.nw-mobile-menu-inner { padding: 24px; display: flex; flex-direction: column; gap: 16px; }
.nw-mobile-menu a, .nw-mobile-menu button {
  background: none; border: none; text-align: left; padding: 0;
  color: rgba(239,232,214,.9); font-size: .9rem; font-family: var(--nw-sans);
  text-decoration: none; cursor: pointer;
}
.nw-mobile-menu a:hover { color: var(--nw-dorado); }
.nw-mobile-group-label { color: rgba(239,232,214,.45); font-size: .72rem; letter-spacing: .1em; text-transform: uppercase; margin-top: 6px; }
.nw-mobile-cta {
  display: inline-flex; justify-content: center;
  background: var(--nw-oliva); color: var(--nw-hueso) !important;
  padding: 12px 20px; border-radius: 999px; margin-top: 8px;
}

@media (min-width: 1024px) {
  .nw-nav-links { display: flex; }
  .nw-nav-account { display: inline-flex; }
  .nw-nav-cta { display: inline-flex; }
  .nw-nav-toggle { display: none; }
}

/* Espaciador para que el contenido no quede oculto bajo el nav fijo — cada
   página debe colocar <div class="nw-nav-spacer"></div> justo después del
   header SOLO si su primera sección no está pensada para quedar detrás del
   nav (la home, con hero a pantalla completa, no lo necesita). */
.nw-nav-spacer { height: 80px; }

/* ============================= FOOTER ============================= */

.nw-footer {
  background: var(--nw-cafe);
  padding: 80px 24px 32px;
  font-family: var(--nw-sans);
}
.nw-footer-inner { max-width: 1280px; margin: 0 auto; }
.nw-footer-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 40px;
  padding-bottom: 48px;
  border-bottom: 1px solid rgba(239,232,214,.1);
}
@media (min-width: 768px) {
  .nw-footer-grid { grid-template-columns: 1.3fr 1fr 1fr 1.3fr; gap: 48px; }
}
.nw-footer-logo img { height: 32px; width: auto; display: block; margin-bottom: 16px; }
.nw-footer-tagline { color: rgba(239,232,214,.55); font-size: .9rem; line-height: 1.6; max-width: 22em; margin: 0 0 20px; }
.nw-footer-social { display: flex; gap: 12px; }
.nw-footer-social a {
  width: 36px; height: 36px; border-radius: 999px;
  border: 1px solid rgba(239,232,214,.15);
  display: flex; align-items: center; justify-content: center;
  color: rgba(239,232,214,.7); text-decoration: none;
  transition: color .2s ease, border-color .2s ease;
}
.nw-footer-social a:hover { color: var(--nw-dorado); border-color: rgba(200,169,104,.5); }
.nw-footer-heading { color: rgba(239,232,214,.5); font-size: .72rem; letter-spacing: .15em; text-transform: uppercase; margin: 0 0 16px; }
.nw-footer-links { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 10px; }
.nw-footer-links a { color: rgba(239,232,214,.75); font-size: .9rem; text-decoration: none; }
.nw-footer-links a:hover { color: var(--nw-dorado); }
.nw-footer-newsletter p { color: rgba(239,232,214,.55); font-size: .9rem; line-height: 1.6; margin: 0 0 16px; }
.nw-footer-form { display: flex; gap: 8px; }
.nw-footer-form input {
  min-width: 0; flex: 1;
  background: rgba(255,255,255,.05);
  border: 1px solid rgba(239,232,214,.15);
  border-radius: 999px;
  padding: 10px 16px;
  font-size: .9rem;
  color: var(--nw-hueso);
  font-family: var(--nw-sans);
}
.nw-footer-form input::placeholder { color: rgba(239,232,214,.4); }
.nw-footer-form button {
  flex-shrink: 0;
  background: var(--nw-oliva); color: var(--nw-hueso);
  border: none; font-size: .9rem; font-weight: 500;
  padding: 10px 20px; border-radius: 999px; cursor: pointer;
  transition: background-color .2s ease;
}
.nw-footer-form button:hover { background: var(--nw-oliva-dark); }
.nw-footer-msg { color: var(--nw-dorado); font-size: .78rem; margin-top: 8px; }
.nw-footer-bottom {
  display: flex; flex-direction: column; align-items: center; gap: 12px;
  padding-top: 24px;
  font-size: .78rem; color: rgba(239,232,214,.45);
}
@media (min-width: 640px) {
  .nw-footer-bottom { flex-direction: row; justify-content: space-between; }
}
.nw-footer-legal { display: flex; gap: 24px; }
.nw-footer-legal a { color: rgba(239,232,214,.45); text-decoration: none; }
.nw-footer-legal a:hover { color: var(--nw-dorado); }
