/* ==========================================================================
   IPESFA – Section Nav
   ========================================================================== */

.snav {
  background: #fff;
  border-bottom: 1px solid #e5e7eb;
  position: sticky;
  top: 72px;
  z-index: 500;
  box-shadow: 0 1px 8px rgba(0,0,0,.05);
}

.snav__inner {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
  max-width: 1140px;
  margin: 0 auto;
  padding: 10px 24px;
  overflow-x: auto;
  scrollbar-width: none;
  -ms-overflow-style: none;
}

.snav__inner::-webkit-scrollbar { display: none; }

/* Nombre de la sección padre */
.snav__parent {
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: .04em;
  text-transform: uppercase;
  color: #3F4656;
  text-decoration: none;
  padding: 7px 14px;
  border-radius: 999px;
  background: #f4f6f8;
  border: 1px solid #e5e7eb;
  white-space: nowrap;
  transition: background .2s ease, color .2s ease, border-color .2s ease;
}

.snav__parent::before {
  content: '';
  display: inline-block;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #5FA9B3;
  flex-shrink: 0;
}

.snav__parent:hover {
  background: #e8f6f8;
  border-color: #5FA9B3;
  color: #3F4656;
  text-decoration: none;
}

.snav__parent.is-active {
  background: #5FA9B3;
  border-color: #5FA9B3;
  color: #fff;
}

.snav__parent.is-active::before {
  background: rgba(255,255,255,.7);
}

/* Separador */
.snav__div {
  flex-shrink: 0;
  width: 1px;
  height: 16px;
  background: #e5e7eb;
  margin: 0 4px;
}

/* Lista */
.snav__list {
  display: flex;
  align-items: center;
  gap: 4px;
  list-style: none;
  margin: 0;
  padding: 0;
  flex-wrap: nowrap;
}

/* Pills de subpáginas */
.snav__item {
  display: inline-block;
  font-size: 13px;
  font-weight: 500;
  color: #6b7280;
  text-decoration: none;
  padding: 7px 14px;
  border-radius: 999px;
  white-space: nowrap;
  border: 1px solid transparent;
  transition: background .2s ease, color .2s ease, border-color .2s ease;
}

.snav__item:hover {
  background: #f4f6f8;
  color: #3F4656;
  text-decoration: none;
}

.snav__item.is-active {
  background: #e8f6f8;
  color: #5FA9B3;
  font-weight: 700;
  border-color: #c5e8ec;
}

@media (max-width: 639px) {
  .snav__inner { padding: 8px 16px; }
  .snav__item, .snav__parent { font-size: 12px; padding: 6px 11px; }
}

/* Oculta el título duplicado de Spacious en páginas con barra de sección */
body:has(.snav) .header-post-title-container {
  display: none !important;
}

/* Elimina el padding-top de #main en páginas con barra de sección */
body:has(.snav) #main {
  padding-top: 0 !important;
}
