/* ==========================================================================
   Neurodinámica C — styles.css
   Estilos propios del sitio (header, navegación, menú móvil, base)
   Tipografías: Playfair Display (títulos) + Inter (texto)
   ========================================================================== */

/* ---------- Variables de color ---------- */
:root {
  --ndc-bg:        #ffffff;
  --ndc-ink:       #1f2933;   /* texto principal */
  --ndc-muted:     #6b7280;   /* texto secundario */
  --ndc-accent:    #3b6ea5;   /* azul de marca */
  --ndc-accent-dk: #2b5580;
  --ndc-line:      #e5e7eb;   /* bordes suaves */
  --ndc-header-h:  76px;
}

/* ---------- Reset ligero ---------- */
* { box-sizing: border-box; }

body {
  margin: 0;
  font-family: 'Inter', system-ui, -apple-system, Segoe UI, Roboto, sans-serif;
  color: var(--ndc-ink);
  background: var(--ndc-bg);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4 {
  font-family: 'Playfair Display', Georgia, serif;
  color: var(--ndc-ink);
  line-height: 1.2;
  font-weight: 600;
}

a { color: var(--ndc-accent); text-decoration: none; }
a:hover { color: var(--ndc-accent-dk); }

img { max-width: 100%; height: auto; }

/* Evita el scroll del fondo cuando el menú móvil está abierto */
body.menu-open { overflow: hidden; }

/* ==========================================================================
   HEADER
   ========================================================================== */
.site-header {
  position: sticky;
  top: 0;
  z-index: 1000;
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid transparent;
  transition: box-shadow .25s ease, border-color .25s ease, background .25s ease;
}

/* Cuando se hace scroll (lo añade script.js) */
.site-header.is-scrolled {
  border-bottom-color: var(--ndc-line);
  box-shadow: 0 2px 14px rgba(0, 0, 0, 0.06);
}

.header-inner {
  max-width: 1180px;
  margin: 0 auto;
  padding: 0 24px;
  min-height: var(--ndc-header-h);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}

/* ---------- Marca / logo ---------- */
.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  color: var(--ndc-ink);
}
.brand:hover { color: var(--ndc-ink); }

.brand-mark { color: var(--ndc-accent); display: flex; }

.brand-text { display: flex; flex-direction: column; line-height: 1.15; }

.brand-name {
  font-family: 'Playfair Display', Georgia, serif;
  font-weight: 600;
  font-size: 1.15rem;
  letter-spacing: .04em;
}

.brand-tag {
  font-size: .72rem;
  color: var(--ndc-muted);
  letter-spacing: .02em;
}

/* ==========================================================================
   NAVEGACIÓN DE ESCRITORIO
   ========================================================================== */
.main-nav ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
}

.main-nav a {
  display: block;
  padding: 8px 12px;
  color: var(--ndc-ink);
  font-size: .86rem;
  font-weight: 500;
  border-radius: 6px;
  transition: background .18s ease, color .18s ease;
}

.main-nav a:hover { background: #f1f5f9; color: var(--ndc-accent-dk); }

.main-nav a.is-active {
  color: var(--ndc-accent);
  background: #eef4fb;
}

/* ==========================================================================
   BOTÓN HAMBURGUESA
   ========================================================================== */
.nav-toggle {
  display: none;               /* oculto en escritorio */
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 44px;
  height: 44px;
  padding: 0;
  border: none;
  background: transparent;
  cursor: pointer;
}

.nav-toggle span {
  display: block;
  width: 26px;
  height: 2px;
  margin: 0 auto;
  background: var(--ndc-ink);
  border-radius: 2px;
  transition: transform .3s ease, opacity .3s ease;
}

/* Animación a "X" cuando está activo */
.nav-toggle.is-active span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-toggle.is-active span:nth-child(2) { opacity: 0; }
.nav-toggle.is-active span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ==========================================================================
   MENÚ MÓVIL
   ========================================================================== */
.mobile-nav {
  display: none;               /* se muestra solo en móvil vía media query */
  position: fixed;
  top: var(--ndc-header-h);
  left: 0;
  right: 0;
  bottom: 0;
  background: #ffffff;
  border-top: 1px solid var(--ndc-line);
  overflow-y: auto;
  transform: translateX(100%);
  transition: transform .3s ease;
  z-index: 999;
}

.mobile-nav.is-open { transform: translateX(0); }

.mobile-nav ul {
  list-style: none;
  margin: 0;
  padding: 12px 0 40px;
}

.mobile-nav a {
  display: block;
  padding: 14px 24px;
  color: var(--ndc-ink);
  font-size: 1rem;
  font-weight: 500;
  border-bottom: 1px solid #f3f4f6;
}

.mobile-nav a:hover,
.mobile-nav a.is-active {
  background: #f8fafc;
  color: var(--ndc-accent);
}

/* ==========================================================================
   RESPONSIVE
   ========================================================================== */
@media (max-width: 1024px) {
  .main-nav { display: none; }   /* ocultar menú de escritorio */
  .nav-toggle { display: flex; } /* mostrar hamburguesa */
  .mobile-nav { display: block; }
}

/* ---------- Contenido general (ancho de lectura) ---------- */
.site-body-wrap { min-height: 60vh; }

.ndc-container {
  max-width: 1180px;
  margin: 0 auto;
  padding: 0 24px;
}
