/* =========================================================
   NODO Gestión y Consultoría — Design tokens
   Ink navy = confianza · Verde nodo = conexión/crecimiento
   Ámbar = energía humana · Papel cálido = cercanía
========================================================= */
:root{
  --ink:        #0B1E33;
  --ink-2:      #123354;
  --ink-3:      #1B3F63;
  --emerald:    #17997A;
  --emerald-dk: #0F6E5C;
  --amber:      #F2A63D;
  --amber-dk:   #D98A1F;
  --paper:      #F7F4EC;
  --paper-2:    #EFEAE0;
  --white:      #FFFFFF;
  --text:       #1C2430;
  --text-soft:  #5B6472;
  --text-inv:   #E9EEF3;
  --text-inv-soft: rgba(233,238,243,0.72);

  /* Placa de logo: azules muy claros derivados del navy del fondo, para que
     la placa pertenezca a la paleta en lugar de ser un recorte blanco. */
  --plate:      #DCE5EF;
  --plate-2:    #C2D1E1;
  --plate-3:    #AFC2D6;

  --font-display: 'Sora', 'Segoe UI', sans-serif;
  --font-body: 'Inter', 'Segoe UI', sans-serif;

  --radius-s: 8px;
  --radius-m: 14px;
  --radius-l: 24px;

  --shadow-card: 0 10px 30px -12px rgba(11,30,51,0.18);
  --shadow-pop: 0 20px 45px -16px rgba(11,30,51,0.35);

  --topbar-h: 76px;
}

*, *::before, *::after{ box-sizing: border-box; }
html{ scroll-behavior: smooth; scroll-padding-top: var(--topbar-h); }

/* El atributo hidden SIEMPRE debe ganar, aunque un componente (botones,
   modales, el panel de sesión, etc.) también fije su propio "display".
   Sin esta regla, cualquier clase con display:flex/inline-flex hace que
   ".hidden = true" desde JS no oculte nada. */
[hidden]{ display: none !important; }

@media (prefers-reduced-motion: reduce){
  html{ scroll-behavior: auto; }
  *{ animation-duration: 0.01ms !important; animation-iteration-count: 1 !important; transition-duration: 0.01ms !important; }
}

body{
  margin: 0;
  background: var(--paper);
  color: var(--text);
  font-family: var(--font-body);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3{
  font-family: var(--font-display);
  color: var(--ink);
  line-height: 1.15;
  margin: 0 0 0.5em;
  letter-spacing: -0.01em;
}

h2{ font-size: clamp(1.8rem, 3.2vw, 2.6rem); font-weight: 700; }
h3{ font-size: 1.2rem; font-weight: 600; }
p{ margin: 0 0 1em; color: var(--text-soft); }
a{ color: inherit; text-decoration: none; }
img{ max-width: 100%; display: block; }
button{ font-family: inherit; cursor: pointer; }

.container{
  width: min(1180px, 92%);
  margin: 0 auto;
}

/* ---------- Eyebrow / structural label ----------
   The dot+line stands for a "node" — this is the company's
   own visual language, used instead of generic 01/02/03 markers. */
.eyebrow{
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-display);
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--emerald-dk);
  margin-bottom: 14px;
}
.eyebrow-light{ color: var(--amber); }
.eyebrow-dot{
  width: 9px; height: 9px; border-radius: 50%;
  background: var(--amber);
  position: relative;
}
.eyebrow-dot::after{
  content:"";
  position: absolute; left: 100%; top: 50%;
  width: 34px; height: 1.5px;
  background: currentColor;
  opacity: 0.5;
  transform: translateY(-50%);
}

.lead{ font-size: 1.08rem; max-width: 54ch; }
.lead-center{ margin-left: auto; margin-right: auto; text-align: center; }

/* =========================================================
   TOPBAR
========================================================= */
.topbar{
  position: sticky; top: 0; z-index: 100;
  height: var(--topbar-h);
  background: rgba(247,244,236,0.86);
  backdrop-filter: blur(14px) saturate(1.2);
  border-bottom: 1px solid rgba(11,30,51,0.08);
  transition: box-shadow .25s ease, background .25s ease;
}
.topbar.is-scrolled{
  box-shadow: 0 8px 24px -14px rgba(11,30,51,0.25);
}

/* Reading-progress hairline anchored to the topbar's own edge —
   the "connection" growing as you move through the page. */
.scroll-progress{
  position: absolute; left: 0; bottom: -1px;
  height: 2.5px; width: 0%;
  background: linear-gradient(90deg, var(--emerald), var(--amber));
  transition: width 0.12s linear;
}

.topbar-inner{
  height: 100%;
  width: min(1280px, 94%);
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 12px;
}

.topbar-zone{ display: flex; align-items: center; gap: 22px; min-width: 0; }
.zone-start{ justify-content: flex-start; }
.zone-end{ justify-content: flex-end; }

.btn-inicio{
  display: inline-flex; align-items: center; gap: 7px;
  font-family: var(--font-display);
  font-weight: 600; font-size: 0.92rem;
  color: var(--white);
  background: var(--ink);
  padding: 9px 16px 9px 13px;
  border-radius: 999px;
  transition: background .2s ease, transform .2s ease;
  white-space: nowrap;
}
.btn-inicio:hover{ background: var(--emerald-dk); transform: translateY(-1px); }

.nav-cluster{ display: flex; align-items: center; gap: 22px; }
.nav-cluster a{
  font-size: 0.95rem; font-weight: 500; color: var(--ink-2);
  position: relative; padding: 6px 0; white-space: nowrap;
}
.nav-cluster a::after{
  content:""; position: absolute; left:0; right:100%; bottom: 0;
  height: 2px; background: var(--amber); border-radius: 2px;
  transition: right .22s ease;
}
.nav-cluster a:hover{ color: var(--ink); }
.nav-cluster a:hover::after{ right: 0; }

.brand{
  display: flex; align-items: center; gap: 10px;
  justify-self: center;
}
/* Soft amber breathing glow — echoes the old pulsing node dot,
   now applied to the logo artwork as a whole. */
@keyframes logoGlow{
  0%, 100%{ filter: drop-shadow(0 1px 3px rgba(11,30,51,0.15)) drop-shadow(0 0 0 rgba(242,166,61,0)); }
  50%{ filter: drop-shadow(0 1px 3px rgba(11,30,51,0.15)) drop-shadow(0 0 6px rgba(242,166,61,0.55)); }
}

/* Logo completo (isotipo + nombre) en la franja superior */
.brand-logo-img{
  display: block;
  height: 52px;
  width: auto;
  opacity: 0.96;
  filter: drop-shadow(0 1px 3px rgba(11,30,51,0.15));
  animation: logoGlow 3.2s ease-in-out infinite;
  transition: opacity .2s ease, transform .2s ease;
}
.brand:hover .brand-logo-img{ opacity: 1; transform: translateY(-1px); }

/* Pequeño respiro visual cada vez que el panel cambia de estado
   (invitado <-> sesión iniciada) — sutil, no compite con el toast. */
@keyframes softRise{
  from{ opacity: 0; transform: translateY(8px); }
  to{ opacity: 1; transform: translateY(0); }
}
.auth-session{ animation: softRise .32s ease both; }

.auth-error{
  font-size: 0.8rem; font-weight: 500; color: #C13B2E;
  background: rgba(193,59,46,0.08);
  border-radius: var(--radius-s);
  padding: 8px 10px; margin: -2px 0 0;
}

/* ---------- Sesión activa dentro del panel de auth ---------- */
.auth-session{ display: flex; flex-direction: column; gap: 12px; padding: 6px 8px 8px; text-align: center; }
.auth-hello{ margin: 0; font-size: 0.95rem; color: var(--text); }
.auth-hello strong{ color: var(--ink); font-family: var(--font-display); }
.role-badge{
  align-self: center;
  display: inline-flex; align-items: center;
  font-family: var(--font-display); font-size: 0.72rem; font-weight: 700;
  letter-spacing: 0.04em; text-transform: uppercase;
  color: var(--amber-dk); background: rgba(242,166,61,0.14);
  padding: 4px 12px; border-radius: 999px;
  animation: badgePop .4s cubic-bezier(.2,.8,.25,1.2) both;
}
@keyframes badgePop{
  from{ opacity: 0; transform: scale(.6); }
  to{ opacity: 1; transform: scale(1); }
}
.btn-solid{
  display: inline-flex; align-items: center; justify-content: center;
  background: var(--emerald); color: var(--white);
  font-family: var(--font-display); font-weight: 600; font-size: 0.95rem;
  padding: 12px 24px; border: none; border-radius: 999px;
  transition: background .2s ease, transform .12s ease-out, box-shadow .2s ease;
  will-change: transform;
}
.btn-solid:hover{ background: var(--emerald-dk); box-shadow: 0 10px 22px -10px rgba(15,110,92,0.6); }
.btn-full{ width: 100%; padding: 11px; }

.btn-outline{
  display: inline-flex; align-items: center; justify-content: center;
  border: 1.5px solid var(--text-inv-soft); color: var(--text-inv);
  font-family: var(--font-display); font-weight: 600; font-size: 0.95rem;
  padding: 11px 22px; border-radius: 999px;
  transition: background .2s ease, border-color .2s ease, transform .12s ease-out;
  will-change: transform;
}
.btn-outline:hover{ background: rgba(255,255,255,0.12); }
.btn-outline.btn-dark{ border-color: var(--ink); color: var(--ink); }
.btn-outline.btn-dark:hover{ background: var(--ink); color: var(--white); }

.hamburger{
  display: none;
  width: 38px; height: 38px; border: none; background: transparent;
  flex-direction: column; align-items: center; justify-content: center; gap: 5px;
}
.hamburger span{ width: 20px; height: 2px; background: var(--ink); border-radius: 2px; transition: all .25s ease; }
.hamburger.is-open span:nth-child(1){ transform: translateY(7px) rotate(45deg); }
.hamburger.is-open span:nth-child(2){ opacity: 0; }
.hamburger.is-open span:nth-child(3){ transform: translateY(-7px) rotate(-45deg); }

.mobile-menu{
  display: none;
  flex-direction: column;
  background: var(--white);
  border-bottom: 1px solid rgba(11,30,51,0.08);
  overflow: hidden;
  max-height: 0;
  transition: max-height .3s ease;
}
.mobile-menu.is-open{ max-height: 420px; }
.mobile-menu a{
  padding: 15px 6%; font-weight: 600; color: var(--ink-2);
  border-top: 1px solid var(--paper-2); font-size: 0.98rem;
}

/* =========================================================
   HERO
========================================================= */
.hero{
  position: relative;
  min-height: calc(100svh - var(--topbar-h));
  display: flex; align-items: center; justify-content: center;
  overflow: hidden;
  isolation: isolate;
}
.hero-media{ position: absolute; inset: 0; z-index: -1; }
.hero-photo{
  width: 100%; height: 100%; object-fit: cover;
  filter: saturate(0.9);
}
.hero-gradient{
  position: absolute; inset: 0;
  background:
    radial-gradient(120% 90% at 50% 15%, rgba(11,30,51,0.55) 0%, rgba(11,30,51,0.86) 55%, rgba(11,30,51,0.96) 100%);
}
.hero-canvas{ position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0.55; }

.hero-content{
  position: relative; z-index: 1;
  text-align: center;
  padding: 90px 6% 60px;
  max-width: 780px;
}
/* ---------- Placa de logo ----------
   El logo original es tinta oscura + ámbar, así que sobre fondos oscuros
   (hero, footer) se apoya en una placa. El tono es un azul muy claro sacado
   del mismo navy del fondo: pertenece a la paleta, pero se mantiene bastante
   más claro que el fondo para que el logo nunca pierda contraste. La
   separación la hacen el aro claro, la sombra y el filo verde→ámbar. */
.logo-plate{
  position: relative;
  display: inline-flex; align-items: center; justify-content: center;
  background: linear-gradient(155deg, var(--plate) 0%, var(--plate-2) 58%, var(--plate-3) 100%);
  border-radius: var(--radius-l);
  overflow: hidden;
  isolation: isolate;
}
/* Filo inferior de marca: el mismo gradiente de la barra de progreso */
.logo-plate::after{
  content: "";
  position: absolute; left: 0; right: 0; bottom: 0; height: 3px;
  background: linear-gradient(90deg, var(--emerald), var(--amber));
}

.hero-logo{
  display: flex; justify-content: center;
  margin: 0 0 30px;
}
.hero-logo-plate{
  padding: 30px 38px 26px;
  box-shadow:
    0 24px 50px -22px rgba(3,10,20,0.75),
    0 0 0 1px rgba(220,229,239,0.45),
    inset 0 1px 0 rgba(255,255,255,0.7);
  animation: heroPlateGlow 3.2s ease-in-out infinite;
}
.hero-logo-img{
  display: block;
  width: min(300px, 66vw); height: auto;
}
@keyframes heroPlateGlow{
  0%, 100%{
    box-shadow:
      0 24px 50px -22px rgba(3,10,20,0.75),
      0 0 0 1px rgba(220,229,239,0.45),
      0 0 0 0 rgba(242,166,61,0);
  }
  50%{
    box-shadow:
      0 24px 50px -22px rgba(3,10,20,0.75),
      0 0 0 1px rgba(220,229,239,0.45),
      0 0 30px 2px rgba(242,166,61,0.42);
  }
}
.hero-slogan{
  font-size: clamp(1.05rem, 2vw, 1.3rem);
  color: var(--text-inv-soft);
  max-width: 46ch; margin: 0 auto 36px;
  font-weight: 400;
}
.hero-actions{ display: flex; gap: 16px; justify-content: center; flex-wrap: wrap; }

/* Staggered entrance — one orchestrated moment on load, echoing
   points joining the network one after another. */
@keyframes heroRise{
  from{ opacity: 0; transform: translateY(22px); }
  to{ opacity: 1; transform: translateY(0); }
}
.hero-logo{ animation: heroRise .8s cubic-bezier(.2,.7,.3,1) both; animation-delay: .05s; }
.hero-slogan{ animation: heroRise .8s cubic-bezier(.2,.7,.3,1) both; animation-delay: .36s; }
.hero-actions{ animation: heroRise .8s cubic-bezier(.2,.7,.3,1) both; animation-delay: .52s; }

.hero-scroll{
  position: absolute; bottom: 26px; left: 50%; transform: translateX(-50%);
  width: 26px; height: 42px; border: 2px solid var(--text-inv-soft);
  border-radius: 20px; z-index: 1;
}
.hero-scroll span{
  position: absolute; top: 7px; left: 50%; width: 4px; height: 8px;
  background: var(--amber); border-radius: 2px; transform: translateX(-50%);
  animation: scrollDot 1.8s ease infinite;
}
@keyframes scrollDot{
  0%{ opacity: 1; top: 7px; }
  70%{ opacity: 0; top: 22px; }
  100%{ opacity: 0; top: 7px; }
}

/* =========================================================
   SECTIONS — shared rhythm
========================================================= */
.section{ padding: 96px 0; }
.section-servicios{ background: var(--paper); }
.section-publicaciones{ background: var(--paper-2); }

/* ---- Nosotros ---- */
.split{
  display: grid; grid-template-columns: 1.1fr 0.9fr;
  gap: 64px; align-items: center;
}
.stat-row{ display: flex; gap: 40px; margin-top: 32px; flex-wrap: wrap; }
.stat{ display: flex; flex-direction: column; }
.stat-icon{ color: var(--emerald); margin-bottom: 10px; }
.stat-num{ font-family: var(--font-display); font-size: 2.1rem; font-weight: 800; color: var(--ink); font-variant-numeric: tabular-nums; }
.stat-label{ font-size: 0.86rem; color: var(--text-soft); max-width: 14ch; }

.visual-card{
  background: var(--white);
  border-radius: var(--radius-l);
  padding: 24px;
  box-shadow: var(--shadow-card);
  aspect-ratio: 1 / 1;
  display: flex; align-items: center; justify-content: center;
}
.visual-card-logo{ width: 68%; height: auto; object-fit: contain; }

/* ---- Servicios ---- */
.section-servicios h2, .section-servicios .lead-center{ text-align: center; }
.cards-grid{
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 26px;
  margin-top: 52px;
}
.service-card{
  background: var(--white);
  border-radius: var(--radius-m);
  padding: 30px 26px;
  box-shadow: var(--shadow-card);
  border: 1px solid rgba(11,30,51,0.05);
  transition: transform .25s ease, box-shadow .25s ease;
  display: flex; flex-direction: column; align-items: flex-start;
}
.service-card:hover{ transform: translateY(-6px); box-shadow: var(--shadow-pop); }
.service-icon{
  width: 52px; height: 52px; border-radius: 14px;
  background: linear-gradient(135deg, var(--emerald), var(--ink-3));
  color: var(--white);
  display: flex; align-items: center; justify-content: center;
  margin-bottom: 18px;
  transition: transform .35s cubic-bezier(.2,.8,.3,1.3);
}
.service-card:hover .service-icon{ transform: rotate(-6deg) scale(1.08); }
.service-card h3{ margin-bottom: 8px; }
.service-card p{ font-size: 0.94rem; margin: 0; }
.service-more{
  display: inline-flex; align-items: center; gap: 6px;
  margin-top: 16px;
  font-family: var(--font-display); font-weight: 600; font-size: 0.85rem;
  color: var(--emerald-dk);
}
.service-more svg{ transition: transform .2s ease; }
.service-card:hover .service-more{ color: var(--emerald); }
.service-card:hover .service-more svg{ transform: translateX(4px); }

/* Cascade the grid reveal instead of firing all at once */
.cards-grid .service-card:nth-child(1){ transition-delay: .02s; }
.cards-grid .service-card:nth-child(2){ transition-delay: .09s; }
.cards-grid .service-card:nth-child(3){ transition-delay: .16s; }
.cards-grid .service-card:nth-child(4){ transition-delay: .02s; }
.cards-grid .service-card:nth-child(5){ transition-delay: .09s; }
.cards-grid .service-card:nth-child(6){ transition-delay: .16s; }

/* ---- Valores ---- */
.section-valores{
  background: radial-gradient(120% 140% at 15% 0%, var(--ink-3) 0%, var(--ink) 60%);
  color: var(--text-inv);
}
.light-title{ color: var(--white); max-width: 20ch; }
.values-grid{
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 30px 36px;
  margin-top: 48px;
}
.value-item{ padding-left: 26px; position: relative; }
.value-node{
  position: absolute; left: 0; top: 8px;
  width: 10px; height: 10px; border-radius: 50%;
  background: var(--amber);
}
.value-node::after{
  content:""; position: absolute; left: 4px; top: 10px;
  width: 1.5px; height: 42px;
  background: linear-gradient(var(--amber), transparent);
  opacity: 0.5;
  transform: scaleY(0);
  transform-origin: top;
  transition: transform .7s ease .25s;
}
.value-item.is-visible .value-node::after{ transform: scaleY(1); }
.value-item h3{ color: var(--white); margin-bottom: 6px; }
.value-item p{ color: var(--text-inv-soft); font-size: 0.94rem; margin: 0; }

.values-grid .value-item:nth-child(1){ transition-delay: .02s; }
.values-grid .value-item:nth-child(2){ transition-delay: .09s; }
.values-grid .value-item:nth-child(3){ transition-delay: .16s; }
.values-grid .value-item:nth-child(4){ transition-delay: .02s; }
.values-grid .value-item:nth-child(5){ transition-delay: .09s; }
.values-grid .value-item:nth-child(6){ transition-delay: .16s; }
.value-item .value-tagline{
  font-family: var(--font-display); font-weight: 600; font-size: 0.98rem;
  color: var(--amber); margin: 0 0 8px;
}

/* ---- Misión y Visión ---- */
.section-mv{ background: var(--paper-2); }
.mv-grid{ display: grid; grid-template-columns: repeat(2, 1fr); gap: 26px; }
.mv-card{
  background: var(--white);
  border-radius: var(--radius-l);
  padding: 38px 34px;
  box-shadow: var(--shadow-card);
  border: 1px solid rgba(11,30,51,0.05);
}
.mv-card .eyebrow{ margin-bottom: 18px; }
.mv-statement{
  font-family: var(--font-display); font-weight: 600;
  font-size: 1.22rem; line-height: 1.4; color: var(--ink);
  margin-bottom: 1em;
}
.mv-card p:last-child{ margin-bottom: 0; }
.mv-grid .mv-card:nth-child(2){ transition-delay: .09s; }

/* ---- Política de calidad ---- */
.section-calidad{ background: var(--paper); }
.quality-intro{ max-width: none; color: var(--ink); font-weight: 500; }
.quality-list{ list-style: none; margin: 26px 0 34px; padding: 0; display: grid; gap: 14px; }
.quality-list li{
  position: relative;
  padding: 16px 20px 16px 52px;
  background: var(--white);
  border-radius: var(--radius-m);
  box-shadow: var(--shadow-card);
  border: 1px solid rgba(11,30,51,0.05);
  color: var(--text);
  font-size: 0.98rem; line-height: 1.55;
}
.quality-list li::before{
  content: ""; position: absolute; left: 22px; top: 23px;
  width: 10px; height: 10px; border-radius: 50%;
  background: var(--amber);
}
.quality-premise{
  margin: 0; padding: 24px 28px;
  border-radius: var(--radius-l);
  background: var(--ink); color: var(--text-inv);
  font-family: var(--font-display); font-weight: 600;
  font-size: 1.05rem; line-height: 1.5;
  border-left: 5px solid var(--amber);
}

/* ---- Publicaciones ---- */
.section-publicaciones h2, .section-publicaciones .lead-center{ text-align: center; }
.posts-grid{
  display: grid; grid-template-columns: repeat(2, 1fr); gap: 24px;
  margin-top: 52px;
}
.post-card{
  background: var(--white);
  border-radius: var(--radius-m);
  padding: 28px;
  box-shadow: var(--shadow-card);
  transition: transform .25s ease, box-shadow .25s ease;
  animation: cardPopIn .5s cubic-bezier(.2,.7,.3,1) both;
}
.post-card:hover{ transform: translateY(-5px); box-shadow: var(--shadow-pop); }
@keyframes cardPopIn{
  from{ opacity: 0; transform: translateY(18px); }
  to{ opacity: 1; transform: translateY(0); }
}
.post-card-head{ display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.post-tag{
  display: inline-block;
  font-family: var(--font-display); font-size: 0.72rem; font-weight: 700;
  letter-spacing: 0.06em; text-transform: uppercase;
  color: var(--emerald-dk); background: rgba(23,153,122,0.12);
  padding: 5px 11px; border-radius: 999px; margin-bottom: 14px;
}
.badge-new{
  display: inline-flex; align-items: center; gap: 6px;
  font-size: 0.72rem; font-weight: 700; letter-spacing: 0.04em;
  color: var(--amber-dk); margin-bottom: 14px;
}
.badge-dot{
  width: 6px; height: 6px; border-radius: 50%; background: var(--amber);
  box-shadow: 0 0 0 0 rgba(242,166,61,0.55);
  animation: badgePing 2.2s ease-out infinite;
}
@keyframes badgePing{
  0%{ box-shadow: 0 0 0 0 rgba(242,166,61,0.5); }
  70%{ box-shadow: 0 0 0 7px rgba(242,166,61,0); }
  100%{ box-shadow: 0 0 0 0 rgba(242,166,61,0); }
}
.post-date{ font-size: 0.8rem; color: var(--text-soft); margin-bottom: 6px; }
.post-card h3{ margin-bottom: 10px; font-size: 1.15rem; }
.post-card p{ font-size: 0.94rem; }
.post-link{
  display: inline-flex; align-items: center; gap: 6px;
  font-weight: 600; color: var(--emerald-dk); font-size: 0.9rem;
  background: rgba(23,153,122,0.1);
  padding: 9px 16px; border-radius: 999px;
  transition: background .2s ease, color .2s ease, transform .12s ease-out;
}
.post-link:hover{ background: var(--emerald); color: var(--white); }
.post-link:active{ background: var(--emerald-dk); color: var(--white); transform: scale(0.96); }
.post-link .arrow{ display: inline-block; transition: transform .2s ease; }
.post-link:hover .arrow{ transform: translateX(4px); }
.posts-cta{ display: flex; justify-content: center; margin-top: 48px; }

.posts-grid .post-card:nth-child(1){ transition-delay: .02s; animation-delay: .02s; }
.posts-grid .post-card:nth-child(2){ transition-delay: .1s; animation-delay: .08s; }
.posts-grid .post-card:nth-child(3){ transition-delay: .02s; animation-delay: .14s; }
.posts-grid .post-card:nth-child(4){ transition-delay: .1s; animation-delay: .2s; }
.posts-grid .post-card:nth-child(n+5){ animation-delay: .24s; }

/* =========================================================
   FOOTER
========================================================= */
.footer{
  position: relative;
  background: var(--ink-2);
  color: var(--text-inv);
  padding-top: 56px;
}
/* Línea de conexión entre el bloque oscuro de Valores y el footer —
   evita que ambas franjas se fundan en un solo bloque sin quiebre. */
.footer::before{
  content: "";
  position: absolute; top: 0; left: 0; right: 0; height: 3px;
  background: linear-gradient(90deg, var(--emerald), var(--amber));
  opacity: 0.65;
}
.footer-inner{
  display: grid; grid-template-columns: 1.3fr 1fr 1fr;
  gap: 32px; padding-bottom: 44px;
  border-bottom: 1px solid rgba(255,255,255,0.1);
}
.footer-brand{ display: flex; align-items: flex-start; }
.footer-logo-plate{
  padding: 18px 24px 16px;
  border-radius: var(--radius-m);
  box-shadow:
    0 16px 34px -18px rgba(3,10,20,0.7),
    0 0 0 1px rgba(220,229,239,0.3),
    inset 0 1px 0 rgba(255,255,255,0.7);
}
.footer-logo-img{
  display: block;
  height: 56px;
  width: auto;
}
.footer-links{ display: flex; flex-direction: column; gap: 12px; }
.footer-links a{ color: var(--text-inv-soft); font-size: 0.92rem; }
.footer-links a:hover{ color: var(--amber); }
.footer-contact{ font-size: 0.92rem; color: var(--text-inv-soft); }
.footer-contact p{ margin: 0 0 10px; color: inherit; display: flex; align-items: center; gap: 9px; }
.footer-contact svg{ flex-shrink: 0; color: var(--emerald); opacity: 0.9; }
/* Acceso de administrador: el logo del footer es el botón. Sin pistas visuales
   (cursor normal, sin hover); solo el foco de teclado se mantiene por accesibilidad. */
.footer-logo-btn{
  display: inline-flex; padding: 0; margin: 0;
  background: none; border: 0; border-radius: var(--radius-m);
  font: inherit; color: inherit;
  cursor: default;
  -webkit-tap-highlight-color: transparent;
}
.footer-logo-btn:focus-visible{ outline: 2px solid var(--amber); outline-offset: 4px; }
.admin-access-modal{ width: min(400px, 100%); }

.footer-tel{ color: inherit; transition: color .2s ease; }
.footer-tel:hover{ color: var(--amber); }


/* Ubicación enlazada a Google Maps — subrayado visible para que se lea
   como enlace y no como texto suelto, con flecha de "abre fuera del sitio". */
.footer-map-link{
  display: inline-flex; align-items: center; gap: 5px;
  color: var(--text-inv);
  text-decoration: underline;
  text-decoration-color: rgba(23,153,122,0.8);
  text-decoration-thickness: 1.5px;
  text-underline-offset: 3px;
  transition: color .2s ease, text-decoration-color .2s ease;
}
.footer-map-link svg{ color: currentColor; opacity: 0.7; transition: transform .2s ease, opacity .2s ease; }
.footer-map-link:hover{ color: var(--amber); text-decoration-color: var(--amber); }
.footer-map-link:hover svg{ transform: translate(2px, -2px); opacity: 1; }

.social-row{ display: flex; gap: 10px; margin-top: 18px; }
.social-icon{
  width: 36px; height: 36px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  background: rgba(255,255,255,0.08);
  color: var(--text-inv);
  transition: background .2s ease, transform .2s ease, color .2s ease;
}
.social-icon svg{ flex-shrink: 0; }
.social-icon:hover{ background: var(--emerald); color: var(--white); transform: translateY(-2px); }
/* WhatsApp conserva su color de marca al pasar el cursor, en el mismo
   formato circular que Instagram, Facebook y TikTok. */
.social-icon.is-wa:hover{ background: #25D366; color: #05341F; }

.footer-bottom{ text-align: center; padding: 20px 6%; font-size: 0.8rem; color: var(--text-inv-soft); }

/* ---------- Back to top ---------- */
.back-to-top{
  position: fixed; right: 26px; bottom: 26px; z-index: 90;
  width: 46px; height: 46px; border-radius: 50%; border: none;
  background: var(--ink); color: var(--white);
  display: flex; align-items: center; justify-content: center;
  box-shadow: var(--shadow-pop);
  opacity: 0; visibility: hidden; transform: translateY(10px) scale(.9);
  transition: opacity .25s ease, transform .25s ease, visibility .25s, background .2s ease;
}
.back-to-top.is-visible{ opacity: 1; visibility: visible; transform: translateY(0) scale(1); }
.back-to-top:hover{ background: var(--emerald-dk); }

/* =========================================================
   PÁGINA: PUBLICACIONES (listado + admin)
========================================================= */
.posts-page-hero{ padding-bottom: 0; }
.posts-page-head{
  display: flex; align-items: flex-end; justify-content: space-between;
  gap: 24px; flex-wrap: wrap;
  animation: heroRise .7s cubic-bezier(.2,.7,.3,1) both;
}
.posts-page-head .lead{ margin-bottom: 0; }
.posts-page-body{ padding-top: 44px; }

.posts-status{
  text-align: center; padding: 14px; margin-bottom: 24px;
  border-radius: var(--radius-s);
  background: var(--paper-2); color: var(--text-soft); font-size: 0.92rem;
}
.posts-status.is-error{ background: rgba(193,59,46,0.08); color: #C13B2E; }

.empty-state{
  text-align: center; padding: 70px 20px;
  background: var(--white); border-radius: var(--radius-l);
  box-shadow: var(--shadow-card);
}
.empty-state svg{ margin-bottom: 16px; }
.empty-state h3{ margin-bottom: 8px; }
.empty-state p{ margin: 0 auto; max-width: 32ch; }

.post-card-head{ display: flex; align-items: flex-start; justify-content: space-between; gap: 10px; }
.post-admin-actions{ display: flex; gap: 6px; flex-shrink: 0; }
.icon-btn{
  width: 30px; height: 30px; border-radius: 8px; border: none;
  background: var(--paper-2); color: var(--ink-2);
  display: flex; align-items: center; justify-content: center;
  transition: background .2s ease, color .2s ease;
}
.icon-btn:hover{ background: var(--ink); color: var(--white); }
.icon-btn-danger:hover{ background: #C13B2E; color: var(--white); }

.nav-cluster a.is-current-page{ color: var(--ink); font-weight: 700; }
.nav-cluster a.is-current-page::after{ right: 0; }
.mobile-menu a.is-current-page{ color: var(--ink); }

/* =========================================================
   PÁGINA: PUBLICACIÓN (detalle / lectura completa)
========================================================= */
.container-narrow{ max-width: 760px; }
.post-page{ padding-top: 44px; }
/* Botón "Volver ..." en forma de píldora (el mismo estilo para "Volver al inicio"
   y "Volver a Publicaciones"). */
.post-back{
  display: inline-flex; align-items: center; gap: 8px;
  padding: 9px 18px 9px 14px;
  font-weight: 600; font-size: 0.88rem; color: var(--ink-2);
  background: var(--white);
  border: 1.5px solid var(--paper-2); border-radius: 999px;
  box-shadow: var(--shadow-card);
  margin-bottom: 28px;
  transition: color .2s ease, border-color .2s ease, transform .15s ease;
  animation: heroRise .5s cubic-bezier(.2,.7,.3,1) both;
}
.post-back:hover{ color: var(--emerald-dk); border-color: var(--emerald); }
.post-back:active{ transform: scale(0.97); }
.post-back svg{ transition: transform .2s ease; }
.post-back:hover svg{ transform: translateX(-4px); }
.post-article-meta{ display: flex; align-items: center; gap: 12px; margin-bottom: 16px; }
.post-article{ animation: heroRise .7s cubic-bezier(.2,.7,.3,1) both; animation-delay: .08s; }
.post-article h1{ font-size: clamp(1.6rem, 3.4vw, 2.3rem); margin-bottom: 22px; }
.post-article-body{
  white-space: pre-wrap; line-height: 1.8; color: var(--text);
  font-size: 1.02rem;
}

/* ---------- Tabs "Contenido" / "Galería" ---------- */
.content-tabs{
  display: inline-flex; background: var(--paper-2); border-radius: 999px;
  padding: 4px; margin: 2px 0 26px; gap: 2px;
}
.content-tab{
  border: none; background: transparent; padding: 9px 20px;
  font-family: var(--font-display); font-size: 0.85rem; font-weight: 600;
  color: var(--text-soft); border-radius: 999px; transition: all .22s ease;
}
.content-tab:hover:not(.is-active){ color: var(--ink); }
.content-tab.is-active{ background: var(--ink); color: var(--white); }

.content-end-sentinel{ height: 1px; }

.post-gallery{
  display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 18px; animation: softRise .35s ease both;
}
.post-gallery-item{
  border-radius: var(--radius-m); overflow: hidden; box-shadow: var(--shadow-card);
  aspect-ratio: 4 / 3; animation: cardPopIn .5s cubic-bezier(.2,.7,.3,1) both;
  border: none; padding: 0; background: none; display: block; width: 100%; cursor: zoom-in;
}
.post-gallery-item img{
  width: 100%; height: 100%; object-fit: cover; display: block;
  transition: transform .4s ease;
}
.post-gallery-item:hover img{ transform: scale(1.06); }
.post-gallery-item:nth-child(1){ animation-delay: .02s; }
.post-gallery-item:nth-child(2){ animation-delay: .08s; }
.post-gallery-item:nth-child(3){ animation-delay: .14s; }
.post-gallery-item:nth-child(4){ animation-delay: .2s; }
.post-gallery-item:nth-child(n+5){ animation-delay: .24s; }

/* =========================================================
   PÁGINA: DETALLE DE SERVICIO
========================================================= */
.service-detail-icon{
  width: 60px; height: 60px; border-radius: 16px;
  background: linear-gradient(135deg, var(--emerald), var(--ink-3));
  color: var(--white);
  display: flex; align-items: center; justify-content: center;
  margin-bottom: 20px;
  animation: heroRise .5s cubic-bezier(.2,.7,.3,1) both;
}
.service-detail-lead{ margin-bottom: 8px; }
.service-detail-body{ white-space: normal; }
.service-detail-body p{ margin-bottom: 1.1em; }

/* ---------- Trámites: categorías desplegables ---------- */
.service-includes-title{ margin-top: 36px; }
.tramites-hint{ margin: 4px 0 18px; font-size: 0.92rem; color: var(--text-soft); }
.tramite-groups{ display: flex; flex-direction: column; gap: 12px; }

.tramite-group{
  background: var(--white);
  border-radius: var(--radius-m);
  box-shadow: var(--shadow-card);
  overflow: hidden;
  opacity: 0; transform: translateY(10px);
  animation: heroRise .5s cubic-bezier(.2,.7,.3,1) both;
  animation-delay: calc(var(--i, 0) * 70ms + 50ms);
}
.tramite-group > summary{
  display: flex; align-items: center; gap: 12px;
  padding: 16px 20px;
  cursor: pointer; list-style: none;
  font-family: var(--font-display); font-weight: 600; color: var(--ink);
  transition: background .2s ease;
}
.tramite-group > summary::-webkit-details-marker{ display: none; }
.tramite-group > summary:hover{ background: var(--paper-2); }
.tramite-group > summary:focus-visible{ outline: 2px solid var(--emerald); outline-offset: -2px; }
.tramite-group-title{ flex: 1; min-width: 0; }
.tramite-group-count{ font-family: var(--font-body); font-weight: 500; font-size: 0.8rem; color: var(--text-soft); white-space: nowrap; }
.tramite-chevron{ flex-shrink: 0; color: var(--emerald-dk); transition: transform .25s ease; }
.tramite-group[open] > summary .tramite-chevron{ transform: rotate(180deg); }
.tramite-group[open] > summary{ border-bottom: 1px solid var(--paper-2); }

.tramite-list{ list-style: none; margin: 0; padding: 6px; animation: softRise .28s ease both; }
.tramite-item{
  display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 6px 14px;
  padding: 12px 14px;
  border-radius: var(--radius-s);
  color: var(--text); font-size: 0.96rem;
  box-shadow: inset 0 0 0 0 var(--emerald);
  transition: background .2s ease, color .2s ease, box-shadow .2s ease;
}
.tramite-item-name{ flex: 1 1 220px; min-width: 0; transition: transform .2s ease; }
.tramite-item-cta{
  display: inline-flex; align-items: center; gap: 7px;
  font-family: var(--font-display); font-weight: 600; font-size: 0.82rem;
  color: var(--emerald-dk); white-space: nowrap;
  opacity: 0; transform: translateX(-6px);
  transition: opacity .2s ease, transform .2s ease;
}
.tramite-item:hover,
.tramite-item:focus-visible{
  background: rgba(23,153,122,0.10);
  color: var(--ink);
  box-shadow: inset 3px 0 0 0 var(--emerald);
  outline: none;
}
.tramite-item:hover .tramite-item-name,
.tramite-item:focus-visible .tramite-item-name{ transform: translateX(4px); }
.tramite-item:hover .tramite-item-cta,
.tramite-item:focus-visible .tramite-item-cta{ opacity: 1; transform: translateX(0); }
/* En pantallas táctiles no hay hover: la acción de contacto queda siempre visible. */
@media (hover: none){
  .tramite-item-cta{ opacity: 1; transform: none; }
}

.service-cta{
  margin-top: 44px; padding: 26px 28px;
  border-radius: var(--radius-l);
  background: var(--paper-2);
  display: flex; align-items: center; justify-content: space-between;
  gap: 20px; flex-wrap: wrap;
}
.service-cta p{ margin: 0; color: var(--ink); font-weight: 600; }

/* =========================================================
   PÁGINA: TALENTO (equipo)
========================================================= */
.team-grid{
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 26px;
  margin-top: 8px;
}
.team-card{
  background: var(--white);
  border-radius: var(--radius-m);
  padding: 26px 24px 24px;
  box-shadow: var(--shadow-card);
  text-align: center;
  transition: transform .25s ease, box-shadow .25s ease;
  animation: cardPopIn .5s cubic-bezier(.2,.7,.3,1) both;
  position: relative;
  cursor: pointer;
}
.team-card:hover{ transform: translateY(-5px); box-shadow: var(--shadow-pop); }
.team-card:focus-visible{ outline: 2.5px solid var(--amber); outline-offset: 3px; }
.team-more{
  display: inline-flex; align-items: center; gap: 6px;
  margin-top: 14px;
  font-family: var(--font-display); font-weight: 600; font-size: 0.82rem;
  color: var(--emerald-dk);
}
.team-more svg{ transition: transform .2s ease; }
.team-card:hover .team-more{ color: var(--emerald); }
.team-card:hover .team-more svg{ transform: translateX(4px); }
.team-photo{
  width: 96px; height: 96px; border-radius: 50%;
  object-fit: cover; margin: 0 auto 16px;
  box-shadow: var(--shadow-card);
  background: var(--paper-2);
}
.team-photo-placeholder{
  width: 96px; height: 96px; border-radius: 50%;
  margin: 0 auto 16px;
  background: linear-gradient(135deg, var(--emerald), var(--ink-3));
  color: var(--white);
  display: flex; align-items: center; justify-content: center;
  font-family: var(--font-display); font-weight: 700; font-size: 1.5rem;
}
.team-card h3{ margin-bottom: 4px; font-size: 1.05rem; }
.team-role{
  font-family: var(--font-display); font-weight: 600; font-size: 0.85rem;
  color: var(--emerald-dk); margin-bottom: 10px;
}
.team-education{ font-size: 0.82rem; color: var(--text-soft); margin-bottom: 8px; }
.team-admin-actions{
  position: absolute; top: 14px; right: 14px;
  display: flex; gap: 6px;
}
.team-grid .team-card:nth-child(1){ transition-delay: .02s; animation-delay: .02s; }
.team-grid .team-card:nth-child(2){ transition-delay: .09s; animation-delay: .08s; }
.team-grid .team-card:nth-child(3){ transition-delay: .16s; animation-delay: .14s; }
.team-grid .team-card:nth-child(n+4){ animation-delay: .2s; }

/* ---------- Foto de la persona (crear/editar en Talento) ---------- */
.team-photo-field{ display: flex; flex-direction: column; gap: 10px; }
.team-photo-label{ font-size: 0.82rem; font-weight: 600; color: var(--ink-2); }
.team-photo-preview-row{ display: flex; align-items: center; gap: 14px; }
.team-photo-preview{
  width: 72px; height: 72px; border-radius: 50%; flex-shrink: 0;
  object-fit: cover; box-shadow: var(--shadow-card); background: var(--paper-2);
}
.team-photo-remove{
  border: none; background: var(--paper-2); color: var(--ink-2);
  padding: 7px 14px; border-radius: 999px;
  font-family: var(--font-display); font-weight: 600; font-size: 0.8rem;
  transition: background .2s ease, color .2s ease;
}
.team-photo-remove:hover{ background: #C13B2E; color: var(--white); }

@media (max-width: 960px){
  .team-grid{ grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 640px){
  .team-grid{ grid-template-columns: 1fr; }
}

/* =========================================================
   MODALES
========================================================= */
.modal-backdrop{
  position: fixed; inset: 0; z-index: 200;
  background: rgba(11,30,51,0.55);
  display: flex; align-items: center; justify-content: center;
  padding: 24px;
  animation: modalBackdropIn .25s ease both;
}
.modal{
  width: min(560px, 100%);
  max-height: 88vh; max-height: 88dvh; overflow-y: auto;
  background: var(--white);
  border-radius: var(--radius-l);
  box-shadow: var(--shadow-pop);
  padding: 26px 26px 28px;
  animation: modalPopIn .32s cubic-bezier(.2,.8,.3,1.15) both;
}
@keyframes modalBackdropIn{ from{ opacity: 0; } to{ opacity: 1; } }
@keyframes modalPopIn{
  from{ opacity: 0; transform: translateY(16px) scale(.96); }
  to{ opacity: 1; transform: translateY(0) scale(1); }
}
.modal-head{
  display: flex; align-items: center; justify-content: space-between;
  /* Fijo arriba del recuadro: el botón de cerrar siempre se ve y el contenido
     (que se desplaza por debajo) nunca lo tapa. */
  position: sticky; top: -26px; z-index: 5; /* -26px = el padding superior del recuadro */
  margin: -26px -26px 18px; padding: 22px 26px 12px;
  background: var(--white);
  border-radius: var(--radius-l) var(--radius-l) 0 0;
}
.modal-head h3{ margin: 0; }
.modal-close{
  width: 34px; height: 34px; border-radius: 50%; border: none;
  background: var(--paper-2); color: var(--ink);
  display: flex; align-items: center; justify-content: center;
  transition: background .2s ease;
}
.modal-close:hover{ background: var(--ink); color: var(--white); }

/* ---------- Modal de detalle de talento (vista completa) ---------- */
.member-detail-modal .modal-head h3{ font-size: 1.15rem; }
.member-detail-body{ text-align: center; }
.member-detail-photo-wrap{ display: flex; justify-content: center; margin-bottom: 12px; }
.member-detail-photo-wrap .team-photo,
.member-detail-photo-wrap .team-photo-placeholder{
  width: 128px; height: 128px; margin: 0 auto; font-size: 1.9rem;
}
.member-detail-body .team-role{ font-size: 0.92rem; }
.member-detail-body .team-education{ margin-bottom: 0; }
.member-detail-bio{
  margin-top: 18px;
  padding-top: 18px;
  border-top: 1px solid var(--paper-2);
  font-size: 0.98rem; line-height: 1.75;
  color: var(--text); text-align: left;
}

.modal-form{ display: flex; flex-direction: column; gap: 14px; }
.modal-form label{
  font-size: 0.82rem; font-weight: 600; color: var(--ink-2);
  display: flex; flex-direction: column; gap: 6px;
}
.modal-form input, .modal-form textarea{
  font-family: var(--font-body); font-size: 0.94rem;
  padding: 11px 13px; border-radius: var(--radius-s);
  border: 1.5px solid var(--paper-2); background: var(--paper);
  color: var(--text); outline: none; resize: vertical;
  transition: border-color .2s ease;
}
.modal-form input:focus, .modal-form textarea:focus{ border-color: var(--emerald); }
.modal-actions{ display: flex; justify-content: flex-end; gap: 12px; margin-top: 4px; }

/* ---------- Imágenes de la publicación (crear/editar) ---------- */
.post-images-field{ display: flex; flex-direction: column; gap: 10px; }
.post-images-label{ font-size: 0.82rem; font-weight: 600; color: var(--ink-2); }
.post-images-grid{ display: flex; flex-wrap: wrap; gap: 10px; }
.post-image-thumb{
  position: relative; width: 72px; height: 72px; flex-shrink: 0;
  border-radius: 12px; overflow: hidden; box-shadow: var(--shadow-card);
  animation: cardPopIn .3s ease both;
}
.post-image-thumb img{ width: 100%; height: 100%; object-fit: cover; display: block; }
.post-image-remove{
  position: absolute; top: 3px; right: 3px; width: 20px; height: 20px;
  border-radius: 50%; border: none; padding: 0;
  background: rgba(11,30,51,0.72); color: var(--white);
  display: flex; align-items: center; justify-content: center;
  transition: background .2s ease;
}
.post-image-remove:hover{ background: var(--ink); }
.post-images-upload{
  display: inline-flex; align-items: center; gap: 8px; align-self: flex-start;
  border: 1.5px dashed rgba(11,30,51,0.25); border-radius: 999px;
  padding: 9px 16px; font-family: var(--font-display); font-weight: 600; font-size: 0.84rem;
  color: var(--ink-2); cursor: pointer; transition: border-color .2s ease, color .2s ease;
}
.post-images-upload:hover{ border-color: var(--emerald); color: var(--emerald-dk); }
.post-images-upload.is-disabled{ opacity: 0.45; pointer-events: none; }
.post-images-hint{ font-size: 0.76rem; color: var(--text-soft); margin: 0; }

/* =========================================================
   LIGHTBOX — ver imagen de galería en grande
========================================================= */
.lightbox-backdrop{
  position: fixed; inset: 0; z-index: 300;
  background: rgba(11,30,51,0.9);
  display: flex; align-items: center; justify-content: center;
  padding: 40px;
  animation: modalBackdropIn .22s ease both;
}
.lightbox-img{
  max-width: min(1100px, 92vw); max-height: 86vh;
  width: auto; height: auto; object-fit: contain;
  border-radius: var(--radius-s);
  box-shadow: var(--shadow-pop);
  animation: modalPopIn .28s cubic-bezier(.2,.8,.3,1.15) both;
}
.lightbox-close{
  position: absolute; top: 20px; right: 20px;
  width: 40px; height: 40px; border-radius: 50%; border: none;
  background: rgba(255,255,255,0.12); color: var(--white);
  display: flex; align-items: center; justify-content: center;
  transition: background .2s ease;
}
.lightbox-close:hover{ background: rgba(255,255,255,0.25); }
.lightbox-nav{
  position: absolute; top: 50%; transform: translateY(-50%);
  width: 46px; height: 46px; border-radius: 50%; border: none;
  background: rgba(255,255,255,0.12); color: var(--white);
  display: flex; align-items: center; justify-content: center;
  transition: background .2s ease;
}
.lightbox-nav:hover{ background: rgba(255,255,255,0.25); }
.lightbox-prev{ left: 16px; }
.lightbox-next{ right: 16px; }
@media (max-width: 640px){
  .lightbox-backdrop{ padding: 16px; }
  .lightbox-nav{ width: 38px; height: 38px; }
  .lightbox-prev{ left: 6px; }
  .lightbox-next{ right: 6px; }
}

/* =========================================================
   REVEAL ON SCROLL
========================================================= */
.reveal{ opacity: 0; transform: translateY(22px); transition: opacity .7s ease, transform .7s ease; }
.reveal.is-visible{ opacity: 1; transform: translateY(0); }

/* =========================================================
   TOASTS — confirmación de inicio/cierre de sesión
========================================================= */
.nodo-toast-stack{
  position: fixed;
  top: calc(var(--topbar-h) + 16px);
  right: 20px;
  z-index: 300;
  display: flex; flex-direction: column; gap: 10px;
  pointer-events: none;
}
.nodo-toast{
  position: relative; overflow: hidden;
  display: flex; align-items: flex-start; gap: 12px;
  width: min(340px, 82vw);
  background: var(--white);
  border-radius: var(--radius-m);
  box-shadow: var(--shadow-pop);
  padding: 14px 18px 16px 14px;
  border-left: 4px solid var(--emerald);
  opacity: 0;
  animation: toastIn .45s cubic-bezier(.2,.8,.25,1.15) both;
  pointer-events: auto;
  cursor: pointer;
}
.nodo-toast.is-goodbye{ border-left-color: var(--ink-3); }
.nodo-toast.is-leaving{ animation: toastOut .3s ease both; }

.nodo-toast-icon{
  width: 34px; height: 34px; border-radius: 50%; flex-shrink: 0;
  display: flex; align-items: center; justify-content: center;
  background: rgba(23,153,122,0.12); color: var(--emerald-dk);
  margin-top: 1px;
}
.nodo-toast.is-goodbye .nodo-toast-icon{ background: rgba(11,30,51,0.08); color: var(--ink-2); }

.nodo-toast-body{ display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.nodo-toast-title{ font-family: var(--font-display); font-weight: 700; font-size: 0.92rem; color: var(--ink); }
.nodo-toast-msg{ font-size: 0.82rem; color: var(--text-soft); line-height: 1.4; }

.nodo-toast-bar{
  position: absolute; left: 0; bottom: 0; height: 2.5px; width: 100%;
  background: linear-gradient(90deg, var(--emerald), var(--amber));
  animation: toastBar 3.6s linear both;
}
.nodo-toast.is-goodbye .nodo-toast-bar{ background: linear-gradient(90deg, var(--ink-3), var(--ink)); }

@keyframes toastIn{
  from{ opacity: 0; transform: translateX(26px) scale(.96); }
  to{ opacity: 1; transform: translateX(0) scale(1); }
}
@keyframes toastOut{
  from{ opacity: 1; transform: translateX(0) scale(1); }
  to{ opacity: 0; transform: translateX(26px) scale(.97); }
}
@keyframes toastBar{ from{ width: 100%; } to{ width: 0%; } }

@media (max-width: 480px){
  .nodo-toast-stack{ left: 14px; right: 14px; top: calc(var(--topbar-h) + 10px); }
  .nodo-toast{ width: 100%; }
}

/* =========================================================
   RESPONSIVE
========================================================= */
@media (max-width: 980px){
  .split{ grid-template-columns: 1fr; }
  .cards-grid{ grid-template-columns: repeat(2, 1fr); }
  .values-grid{ grid-template-columns: repeat(2, 1fr); }
  .mv-grid{ grid-template-columns: 1fr; }
  .posts-grid{ grid-template-columns: 1fr; }
  .footer-inner{ grid-template-columns: 1fr; gap: 26px; }
}

@media (max-width: 760px){
  .nav-cluster{ display: none; }
  .btn-inicio span{ display: none; }
  .hamburger{ display: flex; }
  .mobile-menu{ display: flex; }
  .topbar-inner{ grid-template-columns: auto 1fr auto; }
  .brand-logo-img{ height: 40px; }
  .cards-grid{ grid-template-columns: 1fr; }
  .values-grid{ grid-template-columns: 1fr; }
  .mv-card{ padding: 30px 24px; }
  .section{ padding: 68px 0; }
  .stat-row{ gap: 26px; }
}

@media (max-width: 420px){
  .hero-logo-plate{ padding: 22px 24px 20px; border-radius: var(--radius-m); }
}

/* Focus visibility */
a:focus-visible, button:focus-visible, input:focus-visible{
  outline: 2.5px solid var(--amber);
  outline-offset: 2px;
}

/* =========================================================
   VIDEOS (YouTube / Vimeo), MINIATURAS Y GALERÍA DE TALENTO
========================================================= */

/* ---------- Miniatura en la tarjeta de Publicaciones ---------- */
.post-card.has-thumb{ padding-top: 0; overflow: hidden; }
.post-card-thumb{
  display: block; position: relative;
  margin: 0 -28px 22px;
  aspect-ratio: 16 / 9; overflow: hidden;
  background: var(--paper-2);
}
.post-card-thumb img{
  width: 100%; height: 100%; object-fit: cover; display: block;
  transition: transform .5s cubic-bezier(.2,.7,.3,1);
}
.post-card-thumb::after{
  content: ""; position: absolute; inset: auto 0 0 0; height: 38%;
  background: linear-gradient(to top, rgba(11,30,51,0.28), rgba(11,30,51,0));
  pointer-events: none;
}
.post-card:hover .post-card-thumb img{ transform: scale(1.06); }

/* Vista previa de la miniatura en el formulario (admin) */
.post-thumb-preview{
  width: 128px; height: 72px; flex-shrink: 0;
  object-fit: cover; border-radius: var(--radius-s);
  box-shadow: var(--shadow-card); background: var(--paper-2);
}

/* ---------- Video dentro de la galería (miniatura + botón de play) ---------- */
.post-gallery-item.is-video{ position: relative; background: var(--ink-2); }
.video-thumb-fallback{
  position: absolute; inset: 0; display: block;
  background: linear-gradient(135deg, var(--ink-2), var(--ink-3));
}
.video-play-badge{
  position: absolute; top: 50%; left: 50%;
  width: 54px; height: 54px; margin: -27px 0 0 -27px;
  border-radius: 50%;
  background: rgba(11,30,51,0.72); color: var(--white);
  display: flex; align-items: center; justify-content: center;
  padding-left: 3px; /* centra ópticamente el triángulo */
  box-shadow: 0 6px 18px rgba(0,0,0,0.35), 0 0 0 2px rgba(255,255,255,0.55) inset;
  transition: transform .25s ease, background .25s ease;
  pointer-events: none;
}
.post-gallery-item.is-video:hover .video-play-badge{
  transform: scale(1.1); background: var(--emerald);
}

/* ---------- Visor: reproductor de video ---------- */
.lightbox-video{
  width: min(1000px, 92vw); aspect-ratio: 16 / 9; max-height: 86vh;
  background: #000; border-radius: var(--radius-s); overflow: hidden;
  box-shadow: var(--shadow-pop);
  animation: modalPopIn .28s cubic-bezier(.2,.8,.3,1.15) both;
}
.lightbox-video iframe{ width: 100%; height: 100%; border: 0; display: block; }
@media (max-width: 640px){
  /* En móvil los botones pasan abajo para no tapar el video */
  .lightbox-nav{ top: auto; bottom: 20px; transform: none; }
  .lightbox-prev{ left: calc(50% - 52px); }
  .lightbox-next{ right: calc(50% - 52px); }
}

/* ---------- Campos de enlaces de video (formularios de admin) ---------- */
.video-fields-list{ display: flex; flex-direction: column; gap: 8px; }
.video-field-row{ display: flex; align-items: center; gap: 8px; }
.video-field-row input{ flex: 1; min-width: 0; }
.modal-form .video-field-row input.is-invalid{ border-color: #C13B2E; background: #FDF2F0; }
.video-field-remove{
  width: 30px; height: 30px; flex-shrink: 0; border-radius: 50%; border: none;
  background: var(--paper-2); color: var(--ink-2);
  display: flex; align-items: center; justify-content: center;
  transition: background .2s ease, color .2s ease;
}
.video-field-remove:hover{ background: #C13B2E; color: var(--white); }

/* ---------- Talento: pestañas Reseña / Galería en el detalle ---------- */
.member-detail-tabs{ margin: 18px 0 0; }
.member-detail-tabs ~ .member-detail-bio{
  margin-top: 16px; padding-top: 0; border-top: none;
}
.member-detail-bio.is-empty{ color: var(--text-soft); font-style: italic; text-align: center; }
.member-detail-gallery{
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  gap: 14px; margin-top: 18px; text-align: left;
}
@media (max-width: 480px){
  .member-detail-gallery{ grid-template-columns: 1fr 1fr; gap: 10px; }
  .video-play-badge{ width: 46px; height: 46px; margin: -23px 0 0 -23px; }
}

/* "Volver al inicio" (Publicaciones y Talento): mismo estilo que .post-back,
   solo que en su propia línea encima de la etiqueta del encabezado. */
.posts-page-hero .post-back{ display: flex; width: fit-content; margin-bottom: 22px; }

/* ---------- Mensajes de espera dinámicos (backend despertando) ---------- */
.posts-status.is-loading,
.auth-wake{
  display: flex; align-items: center; justify-content: center; gap: 10px;
}
.auth-wake{
  padding: 10px 12px; border-radius: var(--radius-s);
  background: var(--paper-2); color: var(--text-soft);
  font-size: 0.88rem; text-align: center;
}
.auth-wake[hidden]{ display: none; }
.wake-spinner{
  width: 16px; height: 16px; flex-shrink: 0; border-radius: 50%;
  border: 2.5px solid rgba(26,138,110,0.25); border-top-color: var(--emerald);
  animation: wakeSpin .8s linear infinite;
}
.wake-text{ transition: opacity .22s ease; }
.wake-text.is-swap{ opacity: 0; }
@keyframes wakeSpin{ to{ transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce){
  .wake-spinner{ animation-duration: 2.4s; }
  .wake-text{ transition: none; }
}
