/*
Theme Name: PBS Theme
Author: Nodinet
Description: Tema propio para la Escuela de Psicobiología Social
Version: 1.0.2
Text Domain: pbs-theme
*/

/* ============================================================
   TOKENS
   ============================================================ */
:root {
  /* Paleta */
  --bg:          #fff7e6;
  --bg-card:     #ffffff;
  --acento:      #6486ac;
  --acento-dark: #122e4a;
  --texto:       #122e4a;
  --texto-med:   rgba(18, 46, 74, 0.65);
  --borde:       rgba(18, 46, 74, 0.12);

  /* Tipografía única */
  --font-main: 'Inter', system-ui, sans-serif;

  /* Espaciado y layout */
  --max-w:  1200px;
  --gap:    2rem;
  --radius: 8px;

  /* Sombras */
  --shadow-sm: 0 1px 4px rgba(18, 46, 74, 0.08);
  --shadow-md: 0 4px 24px rgba(18, 46, 74, 0.12);
}

/* ============================================================
   RESET MÍNIMO
   ============================================================ */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}
img, video {
  max-width: 100%;
  display: block;
}
a {
  color: inherit;
  text-decoration: none;
}
ul, ol {
  list-style: none;
}

/* ============================================================
   BASE
   ============================================================ */
html {
  font-size: 16px;
  scroll-behavior: smooth;
}
body.pbs {
  font-family: var(--font-main);
  background: var(--bg);
  color: var(--texto);
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
}

/* ============================================================
   TIPOGRAFÍA
   ============================================================ */
h1 {
  font-family: var(--font-main);
  font-weight: 600;
  letter-spacing: -0.02em;
}
h2 {
  font-family: var(--font-main);
  font-weight: 500;
  letter-spacing: -0.01em;
}
h3 {
  font-family: var(--font-main);
  font-weight: 500;
}
p {
  font-weight: 400;
}
strong {
  font-weight: 600;
}

/* ============================================================
   UTILIDADES GLOBALES
   ============================================================ */
.nd-container {
  width: 100%;
  max-width: var(--max-w);
  margin-inline: auto;
  padding-inline: clamp(1.25rem, 5vw, 3rem);
}

.nd-btn {
  display: inline-block;
  font-family: var(--font-main);
  font-size: 0.9rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  padding: 0.8rem 2rem;
  border-radius: var(--radius);
  cursor: pointer;
  border: none;
  transition: opacity 0.2s, transform 0.15s;
}
.nd-btn:hover {
  opacity: 0.88;
  transform: translateY(-1px);
}
.nd-btn--primary {
  background: var(--acento-dark);
  color: var(--bg);
}
.nd-btn--secondary {
  background: transparent;
  color: var(--acento-dark);
  border: 1.5px solid var(--acento-dark);
}
.nd-btn--accent {
  background: var(--acento);
  color: #fff;
}

/* ============================================================
   HEADER
   ============================================================ */
.nd-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--acento-dark);
  border-bottom: 1px solid rgba(255, 247, 230, 0.08);
}
.nd-nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 68px;
  gap: var(--gap);
}
.nd-logo {
  font-family: var(--font-main);
  font-size: 1.35rem;
  font-weight: 600;
  color: var(--bg);
  letter-spacing: 0.01em;
  line-height: 1.2;
}
.nd-logo span {
  display: block;
  font-size: 0.7rem;
  font-weight: 400;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--acento);
  margin-top: 1px;
}
.nd-nav ul {
  display: flex;
  align-items: center;
  gap: 2rem;
  list-style: none;
}
.nd-nav ul a {
  font-size: 0.875rem;
  font-weight: 500;
  color: rgba(255, 247, 230, 0.75);
  letter-spacing: 0.02em;
  transition: color 0.2s;
}
.nd-nav ul a:hover {
  color: var(--bg);
}

/* ============================================================
   FOOTER
   ============================================================ */
.nd-footer {
  background: var(--acento-dark);
  color: rgba(255, 247, 230, 0.6);
  padding: 3rem 0 2rem;
  font-size: 0.85rem;
}
.nd-footer__inner {
  display: flex;
  flex-wrap: wrap;
  gap: 2rem;
  justify-content: space-between;
  align-items: flex-start;
  padding-bottom: 2rem;
  border-bottom: 1px solid rgba(255, 247, 230, 0.08);
  margin-bottom: 1.5rem;
}
.nd-footer__brand {
  font-size: 1.2rem;
  font-weight: 600;
  color: var(--bg);
  margin-bottom: 0.4rem;
}
.nd-footer__tagline {
  font-size: 0.78rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--acento);
}
.nd-footer__links {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}
.nd-footer__links a {
  color: rgba(255, 247, 230, 0.6);
  transition: color 0.2s;
}
.nd-footer__links a:hover {
  color: var(--bg);
}
.nd-footer__bottom {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.5rem;
  font-size: 0.78rem;
}
.nd-footer__bottom a {
  color: var(--acento);
}

/* ============================================================
   PÁGINAS INTERNAS GENÉRICAS
   ============================================================ */
.nd-page {
  padding-block: 5rem;
}
.nd-page h1 {
  font-size: clamp(2rem, 5vw, 3.5rem);
  font-weight: 600;
  line-height: 1.15;
  margin-bottom: 1.5rem;
  color: var(--acento-dark);
}
.nd-page__content {
  max-width: 720px;
  font-size: 1rem;
  line-height: 1.8;
  color: var(--texto-med);
}
.nd-page__content p { margin-bottom: 1.25rem; }
.nd-page__content h2 {
  font-size: 1.8rem;
  font-weight: 500;
  color: var(--acento-dark);
  margin: 2rem 0 0.75rem;
}

/* ============================================================
   REVEAL ON SCROLL
   ============================================================ */
.reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.55s ease, transform 0.55s ease;
}
.reveal.is-visible {
  opacity: 1;
  transform: none;
}

/* ============================================================
   WHATSAPP FLOTANTE
   ============================================================ */
.nd-wa-wrap{position:fixed;bottom:1.75rem;right:1.75rem;z-index:200;display:flex;align-items:center;flex-direction:row-reverse;gap:8px;}
.nd-wa{width:52px;height:52px;background:#25d366;border-radius:50%;display:flex;align-items:center;justify-content:center;box-shadow:0 4px 16px rgba(0,0,0,0.18);transition:transform 0.2s;flex-shrink:0;}
.nd-wa:hover{transform:scale(1.08);}
.nd-wa svg{width:26px;height:26px;fill:#fff;}
.nd-wa-tooltip{background:#122e4a;color:#ffffff;font-size:13px;font-weight:500;padding:8px 16px;border-radius:20px;white-space:nowrap;box-shadow:0 4px 16px rgba(0,0,0,0.15);display:flex;align-items:center;gap:10px;}
.nd-wa-tooltip-close{background:none;border:none;color:rgba(255,255,255,0.5);cursor:pointer;font-size:16px;line-height:1;padding:0;}
.nd-wa-tooltip-close:hover{color:#ffffff;}

/* ============================================================
   HAMBURGER
   ============================================================ */
.nd-hamburger {
  display: none;
  flex-direction: column;
  gap: 5px;
  cursor: pointer;
  background: none;
  border: none;
  padding: 4px;
}
.nd-hamburger span {
  display: block;
  width: 22px;
  height: 2px;
  background: var(--bg);
  border-radius: 2px;
  transition: transform 0.3s, opacity 0.3s;
}

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 768px) {
  .nd-nav ul {
    display: none;
    position: absolute;
    top: 68px;
    left: 0;
    right: 0;
    flex-direction: column;
    background: var(--acento-dark);
    padding: 1.5rem var(--gap);
    gap: 1.25rem;
    border-top: 1px solid rgba(255, 247, 230, 0.08);
  }
  .nd-nav ul.is-open {
    display: flex;
  }
  .nd-hamburger {
    display: flex;
  }
  .nd-footer__inner {
    flex-direction: column;
  }
}