/*
 * SFP Formación Política — nav-footer.css
 * EdTech visual system — Header (fixed, white) + Footer (near-black).
 * Reference: registroformacionpoliticafp.edu.do
 *
 * Nav:    white bg · gray links · green CTA · 1px bottom border
 * Footer: #0f172a bg · slate-400 text · white hover links
 *
 * Depende de los custom properties definidos en _variables.css.
 */

/* ─────────────────────────────────────────────────────────────
   BODY OFFSET — compensa el header fixed
───────────────────────────────────────────────────────────── */
.sfp-site {
  padding-top: 70px;
}

/* ─────────────────────────────────────────────────────────────
   HEADER
   EdTech: pure white, 1px bottom border, not transparent/dark.
───────────────────────────────────────────────────────────── */
.sfp-header {
  position:      fixed;
  top:           0;
  left:          0;
  right:         0;
  z-index:       200;
  width:         100%;
  background:    #0c1f0e;   /* night green — dark institutional */
  border-bottom: 1px solid rgba(255, 255, 255, 0.07);
  transition:    box-shadow 0.3s ease;
}

/* Scrolled state: night green stays, add depth shadow */
.sfp-header.scrolled {
  background:          #0c1f0e;
  box-shadow:          0 2px 20px rgba(0, 0, 0, 0.4);
  border-bottom-color: transparent;
}

/* ─────────────────────────────────────────────────────────────
   NAV INNER
───────────────────────────────────────────────────────────── */
.sfp-nav__inner {
  display:         flex;
  justify-content: space-between;
  align-items:     center;
  max-width:       1280px;
  margin:          0 auto;
  padding:         1.1rem var(--pad, 1.5rem);
  gap:             1.5rem;
}

/* ─────────────────────────────────────────────────────────────
   LOGO
   Dark text on white nav — "Secretaría de Formación Política"
   must be legible against the white background.
───────────────────────────────────────────────────────────── */
.sfp-nav__logo {
  display:         flex;
  align-items:     center;
  gap:             0.9rem;
  text-decoration: none;
  color:           rgba(255, 255, 255, 0.92);
  flex-shrink:     0;
}

.sfp-nav__logo:hover,
.sfp-nav__logo:focus-visible {
  opacity: 0.85;
}

/* Logo mark — cream square on dark nav; strong contrast anchor */
.sfp-nav__logo-mark {
  display:         flex;
  align-items:     center;
  justify-content: center;
  padding:         0.35rem 0.5rem;
  background:      #f5f0e8;   /* cream — stands out on night green */
  border-radius:   6px;
  font-family:     'Inter', sans-serif;
  font-weight:     800;
  font-size:       0.875rem;
  color:           #0c1f0e;   /* dark on cream — contrast > 14:1 ✓ */
  letter-spacing:  0.02em;
  flex-shrink:     0;
  line-height:     1;
}

/* Logo text — white on dark nav */
.sfp-nav__logo-text {
  display:        flex;
  flex-direction: column;
  font-family:    'Inter', sans-serif;
  font-weight:    700;
  font-size:      0.875rem;
  color:          #f1f5f9;   /* near-white */
  line-height:    1.2;
  white-space:    nowrap;
}

.sfp-nav__logo-text small {
  font-size:   0.7rem;
  font-weight: 400;
  color:       rgba(255, 255, 255, 0.45);
  opacity:     1;
}

/* ─────────────────────────────────────────────────────────────
   MENU PRINCIPAL (desktop)
───────────────────────────────────────────────────────────── */
.sfp-nav__menu-wrap {
  flex:            1;
  display:         flex;
  justify-content: center;
  align-items:     center;
}

.sfp-nav__links {
  display:     flex;
  gap:         1rem;
  list-style:  none;
  margin:      0;
  padding:     0;
  align-items: center;
  flex-wrap:   nowrap;
}

/* Nav links — white on dark nav, institutional style */
.sfp-nav__links a,
.sfp-nav__links--fallback a {
  font-family:     'Inter', sans-serif;
  font-size:       0.8rem;
  font-weight:     500;
  color:           rgba(255, 255, 255, 0.82);
  text-decoration: none;
  padding-block:   0.5rem;
  position:        relative;
  transition:      color 0.2s ease;
  white-space:     nowrap;
}

.sfp-nav__links a:hover,
.sfp-nav__links a:focus-visible,
.sfp-nav__links--fallback a:hover,
.sfp-nav__links--fallback a:focus-visible {
  color: #ffffff;
}

/* Indicador de página activa — bright green underline */
.sfp-nav__links li.current-menu-item > a,
.sfp-nav__links li.current-menu-ancestor > a,
.sfp-nav__links li.current_page_item > a,
.sfp-nav__links li.current_page_ancestor > a {
  color:       #ffffff;
  font-weight: 600;
}

.sfp-nav__links li.current-menu-item > a::after,
.sfp-nav__links li.current-menu-ancestor > a::after,
.sfp-nav__links li.current_page_item > a::after,
.sfp-nav__links li.current_page_ancestor > a::after {
  content:      '';
  position:     absolute;
  bottom:       0;
  left:         0;
  right:        0;
  height:       2px;
  background:   #16a34a;   /* bright accent green underline */
  border-radius: 1px;
  transition:   opacity 0.2s ease;
}

/* Submenú — dark dropdown matching nav */
.sfp-nav__links .sub-menu {
  display:      none;
  position:     absolute;
  top:          100%;
  left:         0;
  background:   #0c1f0e;
  min-width:    200px;
  list-style:   none;
  margin:       0;
  padding:      0.5rem 0;
  border-radius: 8px;
  box-shadow:   0 12px 32px rgba(0, 0, 0, 0.4);
  border:       1px solid rgba(255, 255, 255, 0.10);
  z-index:      300;
}

.sfp-nav__links > li {
  position:   relative;
  display:    flex;
  align-items: center;
  align-self: center;
  margin:     0;
}

.sfp-nav__links > li[class] {
  display:     flex;
  align-items: center;
  align-self:  center;
}

.sfp-nav__links li:hover > .sub-menu,
.sfp-nav__links li:focus-within > .sub-menu {
  display: block;
}

.sfp-nav__links .sub-menu a {
  display:  block;
  padding:  0.5rem 1rem;
  color:    rgba(255, 255, 255, 0.78);
}

.sfp-nav__links .sub-menu a:hover {
  color:      #ffffff;
  background: rgba(255, 255, 255, 0.07);
}

/* ─────────────────────────────────────────────────────────────
   CTAS
   EdTech nav CTAs: outline (gray border, dark text) + solid (green).
───────────────────────────────────────────────────────────── */
.sfp-nav__ctas {
  display:     flex;
  align-items: center;
  gap:         0.75rem;
  flex-shrink: 0;
}

.sfp-nav__btn {
  font-family:     'Inter', sans-serif;
  font-size:       0.8125rem;
  font-weight:     600;
  text-decoration: none;
  padding:         0.45rem 1rem;
  border-radius:   6px;
  transition:      background 0.2s ease, color 0.2s ease, border-color 0.2s ease;
  white-space:     nowrap;
  display:         inline-flex;
  align-items:     center;
  gap:             0.25rem;
}

/* Outline — white border on dark nav */
.sfp-nav__btn--outline {
  border:      1.5px solid rgba(255, 255, 255, 0.5);
  color:       rgba(255, 255, 255, 0.88);
  background:  transparent;
  font-weight: 600;
}

.sfp-nav__btn--outline:visited {
  color: rgba(255, 255, 255, 0.88);
}

.sfp-nav__btn--outline:hover,
.sfp-nav__btn--outline:focus-visible {
  border-color: rgba(255, 255, 255, 0.85);
  color:        #ffffff;
  background:   rgba(255, 255, 255, 0.08);
}

/* Solid — bright accent green CTA (high-visibility on dark nav) */
.sfp-nav__btn--solid {
  background: #16a34a;   /* bright accent green */
  color:      #fff;
  border:     1.5px solid #16a34a;
}

.sfp-nav__btn--solid:visited {
  color: #fff;
}

.sfp-nav__btn--solid:hover,
.sfp-nav__btn--solid:focus-visible {
  background:   #16a34a;
  border-color: #16a34a;
  color:        #fff;
}

/* ─────────────────────────────────────────────────────────────
   MOBILE TOGGLE
   Bars are dark gray on white nav.
───────────────────────────────────────────────────────────── */
.sfp-nav__toggle {
  display:        none;
  flex-direction: column;
  justify-content: center;
  gap:            5px;
  background:     transparent;
  border:         none;
  cursor:         pointer;
  padding:        0.35rem;
  border-radius:  4px;
  transition:     background 0.2s;
}

.sfp-nav__toggle:hover,
.sfp-nav__toggle:focus-visible {
  background: rgba(255, 255, 255, 0.08);
  outline:    none;
}

.sfp-nav__toggle-bar {
  display:       block;
  width:         22px;
  height:        2px;
  background:    rgba(255, 255, 255, 0.85);   /* white bars on dark nav */
  border-radius: 2px;
  transition:    transform 0.25s ease, opacity 0.25s ease;
}

/* Toggle — open state */
.sfp-nav__toggle[aria-expanded="true"] .sfp-nav__toggle-bar:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}
.sfp-nav__toggle[aria-expanded="true"] .sfp-nav__toggle-bar:nth-child(2) {
  opacity:   0;
  transform: scaleX(0);
}
.sfp-nav__toggle[aria-expanded="true"] .sfp-nav__toggle-bar:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

/* ─────────────────────────────────────────────────────────────
   MOBILE MENU PANEL
   Opens below white header — also white, with gray links.
───────────────────────────────────────────────────────────── */
.sfp-nav__mobile {
  background:  #0c1f0e;   /* night green — matches header */
  padding:     1.5rem var(--pad, 1.5rem) 2rem;
  border-top:  1px solid rgba(255, 255, 255, 0.08);
  box-shadow:  0 12px 24px rgba(0, 0, 0, 0.35);
}

.sfp-nav__mobile[hidden] {
  display: none;
}

.sfp-nav__mobile-links {
  list-style:    none;
  margin:        0 0 1.25rem;
  padding:       0;
  display:       flex;
  flex-direction: column;
  gap:           0;
}

.sfp-nav__mobile-links li {
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.sfp-nav__mobile-links a {
  display:         block;
  padding:         0.85rem 0;
  font-family:     'Inter', sans-serif;
  font-size:       0.9375rem;
  font-weight:     500;
  color:           rgba(255, 255, 255, 0.85);
  text-decoration: none;
  transition:      color 0.2s;
}

.sfp-nav__mobile-links a:hover,
.sfp-nav__mobile-links a:focus-visible {
  color: #ffffff;
}

.sfp-nav__mobile-links .sub-menu {
  list-style: none;
  padding:    0 0 0.5rem 1rem;
  margin:     0;
}

.sfp-nav__mobile-links .sub-menu a {
  font-size: 0.875rem;
  padding:   0.45rem 0;
  color:     rgba(255, 255, 255, 0.55);
}

.sfp-nav__mobile-links .sub-menu a:hover {
  color: #ffffff;
}

.sfp-nav__mobile-ctas {
  display:        flex;
  flex-direction: column;
  gap:            0.75rem;
  margin-top:     1.25rem;
}

.sfp-nav__mobile-ctas .sfp-btn {
  display:    block;
  text-align: center;
  width:      100%;
}

/* Primary mobile CTA — bright accent green on dark panel */
.sfp-nav__mobile-ctas .sfp-btn--primary {
  background:   #16a34a;
  color:        #fff;
  border-color: #16a34a;
}

.sfp-nav__mobile-ctas .sfp-btn--primary:hover,
.sfp-nav__mobile-ctas .sfp-btn--primary:focus-visible {
  background:   #16a34a;
  border-color: #16a34a;
}

/* ─────────────────────────────────────────────────────────────
   RESPONSIVE — <900px ocultar desktop nav, mostrar toggle
───────────────────────────────────────────────────────────── */
@media (max-width: 900px) {
  .sfp-nav__menu-wrap {
    display: none;
  }

  .sfp-nav__ctas .sfp-nav__btn--outline,
  .sfp-nav__ctas .sfp-nav__btn--solid {
    display: none;
  }

  .sfp-nav__toggle {
    display: flex;
  }
}

/* ─────────────────────────────────────────────────────────────
   FOOTER
   EdTech: #0f172a (slate-900) bg · #94a3b8 (slate-400) text ·
           white links on hover · green mark.
───────────────────────────────────────────────────────────── */
.sfp-footer {
  background:     #071409;   /* night-950 — deepest institutional dark */
  padding-top:    clamp(4rem, 8vw, 8rem);
  padding-bottom: 0;
  color:          rgba(255, 255, 255, 0.55);
}

.sfp-footer__inner {
  display:               grid;
  grid-template-columns: 1.4fr 1fr 1fr 1fr;
  gap:                   2rem 3rem;
  max-width:             1280px;
  margin:                0 auto;
  padding:               0 var(--pad, 1.5rem) clamp(3rem, 6vw, 5rem);
  align-items:           start;
}

/* Columna brand */
.sfp-footer__brand {
  display:        flex;
  flex-direction: column;
  gap:            1.25rem;
}

.sfp-footer__logo {
  display:        flex;
  align-items:    center;
  gap:            0.85rem;
  text-decoration: none;
  color:          #f1f5f9;   /* slate-100 — near-white logo text */
}

.sfp-footer__logo:hover,
.sfp-footer__logo:focus-visible {
  opacity: 0.85;
}

/* Footer logo mark — cream square (mirrors nav mark) */
.sfp-footer__logo-mark {
  display:         flex;
  align-items:     center;
  justify-content: center;
  padding:         0.4rem 0.55rem;
  background:      #f5f0e8;   /* cream — consistent brand identity */
  border-radius:   6px;
  font-family:     'Inter', sans-serif;
  font-weight:     800;
  font-size:       0.9rem;
  color:           #0c1f0e;   /* dark on cream */
  letter-spacing:  0.02em;
  flex-shrink:     0;
  line-height:     1;
}

.sfp-footer__logo-text {
  display:        flex;
  flex-direction: column;
  font-family:    'Inter', sans-serif;
  font-weight:    700;
  font-size:      1.05rem;
  color:          #f1f5f9;   /* near-white on dark footer */
  line-height:    1.2;
}

.sfp-footer__logo-text small {
  font-size:   0.72rem;
  opacity:     0.55;
  font-weight: 400;
  color:       #94a3b8;
}

.sfp-footer__tagline {
  font-family: 'Inter', sans-serif;
  font-size:   0.8125rem;
  color:       rgba(255, 255, 255, 0.35);
  line-height: 1.6;
  margin:      0;
  font-style:  italic;
}

/* Redes sociales en el footer */
.sfp-footer__rrss {
  display:   flex;
  flex-wrap: wrap;
  gap:       0.5rem;
  margin-top: 1.25rem;
}

.sfp-footer__rrss-link {
  display:          flex;
  align-items:      center;
  justify-content:  center;
  width:            36px;
  height:           36px;
  border-radius:    8px;
  background:       rgba(255, 255, 255, 0.07);
  color:            rgba(255, 255, 255, 0.55);
  transition:       background 0.2s ease, color 0.2s ease, transform 0.15s ease;
  text-decoration:  none;
}

.sfp-footer__rrss-link svg {
  width:  18px;
  height: 18px;
  display: block;
  flex-shrink: 0;
}

.sfp-footer__rrss-link:hover,
.sfp-footer__rrss-link:focus-visible {
  background: rgba(52, 179, 86, 0.25);
  color:      #34B356;
  transform:  translateY(-2px);
}

.sfp-footer__rrss-link:focus-visible {
  outline:        2px solid #34B356;
  outline-offset: 2px;
}

/* Columnas de enlaces */
.sfp-footer__col {
  display:        flex;
  flex-direction: column;
  gap:            1rem;
}

/* Footer column titles — metadata style: muted, small, uppercase */
.sfp-footer__col-title {
  font-family:    'Inter', sans-serif;
  font-weight:    700;
  font-size:      0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color:          rgba(255, 255, 255, 0.45);   /* subtle metadata label */
  margin:         0;
}

.sfp-footer__links {
  list-style:     none;
  margin:         0;
  padding:        0;
  display:        flex;
  flex-direction: column;
  gap:            0.6rem;
}

/* Footer links — 75% white default, full white on hover */
.sfp-footer__links a {
  font-family:     'Inter', sans-serif;
  font-size:       0.875rem;
  color:           rgba(255, 255, 255, 0.68);
  text-decoration: none;
  transition:      color 0.15s ease;
  line-height:     1.4;
}

.sfp-footer__links a:hover,
.sfp-footer__links a:focus-visible {
  color: #ffffff;
}

/* ─────────────────────────────────────────────────────────────
   FOOTER BOTTOM BAR
───────────────────────────────────────────────────────────── */
.sfp-footer__bottom {
  display:         flex;
  justify-content: space-between;
  align-items:     center;
  flex-wrap:       wrap;
  gap:             1rem;
  max-width:       1280px;
  margin:          0 auto;
  padding:         1.5rem var(--pad, 1.5rem);
  border-top:      1px solid rgba(255, 255, 255, 0.08);
}

.sfp-footer__copy {
  font-family: 'Inter', sans-serif;
  font-size:   0.8125rem;
  color:       #475569;   /* slate-600 — very muted */
  margin:      0;
}

.sfp-footer__partido {
  display:     flex;
  align-items: center;
  gap:         0.5rem;
}

.sfp-footer__partido-mark {
  display:         flex;
  align-items:     center;
  justify-content: center;
  padding:         0.2rem 0.3rem;
  background:      rgba(34, 197, 94, 0.25);   /* accent green tint */
  border-radius:   4px;
  font-family:     'Inter', sans-serif;
  font-weight:     800;
  font-size:       0.7rem;
  color:           #16a34a;   /* bright accent on deep dark */
  line-height:     1;
}

.sfp-footer__partido a {
  font-family:   'Inter', sans-serif;
  font-size:     0.8125rem;
  color:         #64748b;   /* slate-500 */
  text-decoration: none;
  transition:    color 0.2s;
}

.sfp-footer__partido a:hover,
.sfp-footer__partido a:focus-visible {
  color: #ffffff;
}

/* ─────────────────────────────────────────────────────────────
   FOOTER RESPONSIVE
───────────────────────────────────────────────────────────── */
@media (max-width: 900px) {
  .sfp-footer__inner {
    grid-template-columns: 1fr 1fr;
  }

  .sfp-footer__brand {
    grid-column: 1 / -1;
  }
}

@media (max-width: 500px) {
  .sfp-footer__inner {
    grid-template-columns: 1fr;
  }

  .sfp-footer__brand {
    grid-column: auto;
  }

  .sfp-footer__bottom {
    flex-direction: column;
    align-items:    flex-start;
  }
}
