/*
Theme Name: FONDEANI (Child de Astra)
Theme URI: https://fondeani.com
Description: Tema hijo institucional para el Fondo de Empleados de la Agencia Nacional de Infraestructura (FONDEANI). Basado en Astra.
Author: FONDEANI
Template: astra
Version: 1.0.0
Text Domain: fondeani-child
*/

/* =========================================================
   FONDEANI — DESIGN TOKENS
   Inspirados en la identidad de infraestructura vial del logo:
   la carretera y el arco de puente.
   ========================================================= */
:root {
  /* Color */
  --fde-navy: #0A2A5E;
  --fde-navy-dark: #071b40;
  --fde-orange: #F0904A;
  --fde-orange-dark: #d97730;
  --fde-asphalt: #4A4A4A;
  --fde-asphalt-light: #6b6b6b;
  --fde-white: #FAFAF7;
  --fde-bg-soft: #EEF2F7;
  --fde-green: #2F855A;
  --fde-border: #E2E6EC;
  --fde-text: #1F2733;

  /* Tipografía */
  --fde-font-display: 'Space Grotesk', 'Segoe UI', sans-serif;
  --fde-font-body: 'Inter', 'Segoe UI', sans-serif;
  --fde-font-mono: 'JetBrains Mono', 'Courier New', monospace;

  /* Espaciado / radios */
  --fde-radius: 10px;
  --fde-radius-sm: 6px;
  --fde-shadow: 0 8px 24px rgba(10, 42, 94, 0.08);
  --fde-shadow-hover: 0 14px 32px rgba(10, 42, 94, 0.14);
}

/* =========================================================
   BASE
   ========================================================= */
body {
  font-family: var(--fde-font-body);
  color: var(--fde-text);
  background: var(--fde-white);
}

h1, h2, h3, h4, .fde-display {
  font-family: var(--fde-font-display);
  color: var(--fde-navy);
  font-weight: 700;
  letter-spacing: -0.01em;
}

a { color: var(--fde-navy); }
a:hover { color: var(--fde-orange); }

/* Línea "carretera" — divisor de sección con marcas de carril,
   reutiliza el motivo del logo como elemento estructural, no decorativo. */
.fde-road-divider {
  position: relative;
  height: 4px;
  background: var(--fde-asphalt);
  margin: 3rem 0;
  overflow: hidden;
  border-radius: 2px;
}
.fde-road-divider::after {
  content: "";
  position: absolute;
  top: 50%;
  left: 0;
  width: 200%;
  height: 2px;
  transform: translateY(-50%);
  background: repeating-linear-gradient(
    to right,
    var(--fde-white) 0,
    var(--fde-white) 18px,
    transparent 18px,
    transparent 34px
  );
  animation: fde-road-move 6s linear infinite;
}
@media (prefers-reduced-motion: reduce) {
  .fde-road-divider::after { animation: none; }
}
@keyframes fde-road-move {
  from { transform: translate(0, -50%); }
  to   { transform: translate(-50%, -50%); }
}

/* =========================================================
   HERO
   ========================================================= */
.fde-hero {
  background: linear-gradient(135deg, var(--fde-navy) 0%, var(--fde-navy-dark) 100%);
  color: var(--fde-white);
  padding: 5rem 1.5rem;
  position: relative;
  overflow: hidden;
}
.fde-hero__arc {
  position: absolute;
  right: -10%;
  top: -20%;
  width: 60%;
  height: 140%;
  border: 14px solid var(--fde-orange);
  border-radius: 50%;
  opacity: 0.15;
  pointer-events: none;
}
.fde-hero h1 {
  color: var(--fde-white);
  font-size: clamp(2rem, 4vw, 3.2rem);
  max-width: 760px;
}
.fde-hero p {
  font-size: 1.15rem;
  max-width: 620px;
  opacity: 0.9;
}
.fde-hero__ctas {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
  margin-top: 2rem;
}

/* =========================================================
   BOTONES
   ========================================================= */
.fde-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-family: var(--fde-font-display);
  font-weight: 600;
  padding: 0.85rem 1.6rem;
  border-radius: var(--fde-radius-sm);
  text-decoration: none;
  transition: transform 0.15s ease, box-shadow 0.15s ease, background 0.15s ease;
}
.fde-btn:focus-visible {
  outline: 3px solid var(--fde-orange);
  outline-offset: 2px;
}
.fde-btn--primary {
  background: var(--fde-orange);
  color: var(--fde-navy-dark);
}
.fde-btn--primary:hover {
  background: var(--fde-orange-dark);
  color: var(--fde-navy-dark);
  transform: translateY(-2px);
  box-shadow: var(--fde-shadow-hover);
}
.fde-btn--secondary {
  background: transparent;
  color: var(--fde-white);
  border: 2px solid rgba(255,255,255,0.5);
}
.fde-btn--secondary:hover {
  border-color: var(--fde-white);
  color: var(--fde-white);
  transform: translateY(-2px);
}
.fde-btn--tertiary {
  background: var(--fde-navy);
  color: var(--fde-white);
}
.fde-btn--tertiary:hover {
  background: var(--fde-navy-dark);
  color: var(--fde-white);
  transform: translateY(-2px);
  box-shadow: var(--fde-shadow-hover);
}

/* =========================================================
   LÍNEAS DE CRÉDITO — "SEÑALES DE SALIDA DE AUTOPISTA"
   Elemento de firma del sitio.
   ========================================================= */
.fde-routes {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1.5rem;
  margin: 2.5rem 0;
}
.fde-route-card {
  background: var(--fde-white);
  border: 1px solid var(--fde-border);
  border-radius: var(--fde-radius);
  box-shadow: var(--fde-shadow);
  overflow: hidden;
  transition: transform 0.18s ease, box-shadow 0.18s ease;
}
.fde-route-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--fde-shadow-hover);
}
.fde-route-card__sign {
  background: var(--fde-asphalt);
  color: var(--fde-white);
  font-family: var(--fde-font-mono);
  font-size: 0.78rem;
  letter-spacing: 0.06em;
  padding: 0.5rem 1rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.fde-route-card__sign span.fde-exit-num {
  background: var(--fde-orange);
  color: var(--fde-navy-dark);
  font-weight: 700;
  padding: 0.1rem 0.5rem;
  border-radius: 4px;
}
.fde-route-card__body { padding: 1.25rem 1.4rem 1.5rem; }
.fde-route-card__title {
  font-family: var(--fde-font-display);
  color: var(--fde-navy);
  font-size: 1.15rem;
  margin: 0 0 0.75rem;
}
.fde-route-card__stats {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.6rem 1rem;
  font-family: var(--fde-font-mono);
  font-size: 0.85rem;
  margin-bottom: 1rem;
}
.fde-route-card__stats dt {
  color: var(--fde-asphalt-light);
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
.fde-route-card__stats dd {
  margin: 0;
  font-weight: 700;
  color: var(--fde-navy);
}
.fde-route-card__stats dd.fde-rate { color: var(--fde-green); }
.fde-route-card__cond {
  font-size: 0.85rem;
  color: var(--fde-text);
  border-top: 1px dashed var(--fde-border);
  padding-top: 0.75rem;
}

/* Filtro Ordinarios / Extraordinarios */
.fde-route-filters {
  display: flex;
  gap: 0.75rem;
  margin: 1.5rem 0;
  flex-wrap: wrap;
}
.fde-route-filters button {
  font-family: var(--fde-font-display);
  font-weight: 600;
  font-size: 0.85rem;
  border: 2px solid var(--fde-navy);
  background: transparent;
  color: var(--fde-navy);
  padding: 0.5rem 1.1rem;
  border-radius: 999px;
  cursor: pointer;
  transition: all 0.15s ease;
}
.fde-route-filters button.is-active,
.fde-route-filters button:hover {
  background: var(--fde-navy);
  color: var(--fde-white);
}

/* =========================================================
   BIBLIOTECA DOCUMENTAL / TRANSPARENCIA
   ========================================================= */
.fde-doc-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 1.25rem;
  margin: 2rem 0;
}
.fde-doc-card {
  display: flex;
  align-items: flex-start;
  gap: 0.9rem;
  background: var(--fde-bg-soft);
  border-radius: var(--fde-radius);
  padding: 1.1rem 1.2rem;
  text-decoration: none;
  color: var(--fde-text);
  border: 1px solid transparent;
  transition: border-color 0.15s ease, transform 0.15s ease;
}
.fde-doc-card:hover {
  border-color: var(--fde-orange);
  transform: translateY(-2px);
  color: var(--fde-text);
}
.fde-doc-card__icon {
  flex-shrink: 0;
  width: 40px; height: 40px;
  border-radius: 8px;
  background: var(--fde-navy);
  color: var(--fde-white);
  display: flex; align-items: center; justify-content: center;
  font-family: var(--fde-font-mono);
  font-weight: 700;
  font-size: 0.75rem;
}
.fde-doc-card__title { font-weight: 700; color: var(--fde-navy); margin: 0 0 0.2rem; font-size: 0.95rem; }
.fde-doc-card__meta { font-size: 0.78rem; color: var(--fde-asphalt-light); font-family: var(--fde-font-mono); }

/* =========================================================
   BOTÓN FLOTANTE WHATSAPP
   ========================================================= */
.fde-whatsapp-float {
  position: fixed;
  bottom: 22px;
  right: 22px;
  z-index: 9999;
  width: 58px;
  height: 58px;
  border-radius: 50%;
  background: #25D366;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 6px 18px rgba(0,0,0,0.25);
  transition: transform 0.15s ease;
}
.fde-whatsapp-float:hover { transform: scale(1.08); }
.fde-whatsapp-float svg { width: 30px; height: 30px; fill: #fff; }
.fde-whatsapp-float:focus-visible {
  outline: 3px solid var(--fde-navy);
  outline-offset: 3px;
}

/* =========================================================
   RESPONSIVE
   ========================================================= */
@media (max-width: 600px) {
  .fde-hero { padding: 3.5rem 1.25rem; }
  .fde-route-card__stats { grid-template-columns: 1fr 1fr; font-size: 0.78rem; }
}
