/* ==========================================================================
   TEMA INSTITUCIONAL 2026 — Alcaldía Bolivariana de Jesús Enrique Lossada
   --------------------------------------------------------------------------
   Esta hoja de estilos se carga DESPUÉS de css/styles.css en las páginas
   públicas del sitio. No reemplaza styles.css (otras pantallas internas del
   sistema, como fichas de empleado o control de entrada/salida, siguen
   dependiendo de él), sino que reescribe la paleta, la tipografía y los
   componentes visibles al ciudadano para darle una identidad propia,
   inspirada en el propio escudo municipal: el municipio agrícola, ganadero
   y petrolero del occidente del Zulia.

   Firma visual: un "sello" circular (anillo de trazos, como un timbre
   oficial) que enmarca el escudo real del municipio, y una línea de
   contorno topográfico de fondo que representa el relieve de sus llanos.
   ========================================================================== */

@import url('https://fonts.googleapis.com/css2?family=Fraunces:opsz,wght@9..144,400;9..144,500;9..144,600;9..144,700&family=Inter:wght@400;500;600;700;800&family=IBM+Plex+Mono:wght@400;500;600&display=swap');

:root {
  /* ---- Paleta institucional 2026 ------------------------------------- */
  --blue: #0c3350;            /* Azul llano — tinta principal */
  --blue-light: #1f6f86;      /* Azul agua — secundario */
  --blue-dark: #071f33;

  --yellow: #e2a530;          /* Oro municipal (antes amarillo neón) */
  --accent-color: var(--yellow);
  --accent-light: #f0c368;
  --accent-dark: #b8811f;

  --green: #2f6b4a;           /* Verde agropecuario, tomado del escudo */
  --green-light: #4f8f68;
  --green-dark: #1f4a34;

  --red: #b5222f;             /* Rojo bandera, sólo para alertas/errores */
  --red-light: #d1444f;
  --red-dark: #7e1620;

  --bg-paper: #f5f7f5;        /* Fondo general, papel frío */
  --bg-ink: #0a2438;          /* Paneles oscuros (footer, hero, media) */

  --text-default: #16232e;

  /* ---- Tipografía ------------------------------------------------------ */
  --font-display: 'Fraunces', 'Georgia', serif;
  --font-body: 'Inter', 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  --font-mono: 'IBM Plex Mono', 'Courier New', monospace;

  /* ---- Formas ------------------------------------------------------- */
  --radius-md: 14px;
  --radius-lg: 20px;
  --shadow-sm: 0 1px 2px rgba(10, 30, 48, 0.08);
  --shadow-md: 0 8px 24px -8px rgba(10, 30, 48, 0.22);
  --shadow-lg: 0 20px 45px -16px rgba(10, 30, 48, 0.35);
}

/* Quitar la animación de degradado móvil de los botones/navbar heredada de
   styles.css: para un sitio institucional, lo estático transmite más
   seriedad que un fondo en movimiento perpetuo. */
.bg-primary {
  background: var(--blue) !important;
  animation: none !important;
}
.btn-primary {
  background: var(--blue);
  border-color: var(--blue);
}
.btn-primary:hover {
  background: var(--blue-dark);
  border-color: var(--blue-dark);
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
  filter: none;
}
.btn-secondary {
  background: var(--green);
  border-color: var(--green);
}
.btn-secondary:hover {
  background: var(--green-dark);
  border-color: var(--green-dark);
}
.text-accent { color: var(--accent-dark) !important; }
.bg-accent {
  background: var(--yellow) !important;
  color: var(--blue-dark) !important;
}

body {
  font-family: var(--font-body);
  background-color: var(--bg-paper);
  color: var(--text-default);
}

h1, h2, h3, h4, .section-title, .card-title, .navbar-brand,
.hero-content h1, .modal-title {
  font-family: var(--font-display);
  letter-spacing: -0.01em;
}

.section-title {
  font-weight: 600;
  color: var(--blue-dark);
}
.section-title::after { background: var(--yellow) !important; }

small, .small, .badge, .eyebrow, .desc-type-pill, .card-header {
  letter-spacing: 0.02em;
}

/* ---- Franja de utilidad + navbar ---------------------------------------- */
.topbar-institucional {
  background: var(--blue-dark);
  color: rgba(255, 255, 255, 0.82);
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.04em;
  padding: 0.35rem 0;
}
.topbar-institucional a { color: rgba(255, 255, 255, 0.82); text-decoration: none; }
.topbar-institucional a:hover { color: var(--yellow); }
.topbar-institucional .divider { opacity: 0.35; margin: 0 0.6rem; }

.navbar.navbar-institucional {
  background: var(--blue) !important;
  animation: none !important;
  box-shadow: var(--shadow-sm);
  padding-top: 0.6rem;
  padding-bottom: 0.6rem;
}
.navbar-institucional .navbar-brand {
  display: flex;
  align-items: center;
  gap: 0.65rem;
}
.seal-mark {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  background: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 0 0 2px var(--yellow), 0 0 0 4px rgba(255, 255, 255, 0.18);
  flex-shrink: 0;
}
.seal-mark img { width: 32px; height: 32px; object-fit: contain; }
.navbar-institucional .brand-text { display: flex; flex-direction: column; line-height: 1.1; }
.navbar-institucional .brand-text .brand-title { font-family: var(--font-display); font-weight: 600; font-size: 1.05rem; color: #fff; }
.navbar-institucional .brand-text .brand-sub {
  font-family: var(--font-mono);
  font-size: 0.62rem;
  letter-spacing: 0.09em;
  color: var(--accent-light);
  text-transform: uppercase;
}
.navbar-institucional .nav-link {
  font-weight: 500;
  color: rgba(255, 255, 255, 0.85) !important;
}
.navbar-institucional .nav-link:hover,
.navbar-institucional .nav-link.active { color: #fff !important; }
.navbar-institucional .nav-link::after { background: var(--yellow) !important; }
.navbar-institucional .dropdown-menu {
  border: none;
  box-shadow: var(--shadow-lg);
  border-radius: var(--radius-md);
  padding: 0.5rem;
}
.navbar-institucional .dropdown-item { border-radius: 8px; font-weight: 500; }
.navbar-institucional .dropdown-item:hover,
.navbar-institucional .dropdown-item.active {
  background: rgba(226, 165, 48, 0.14);
  color: var(--blue-dark);
}

/* ---- Franja de contorno topográfico (firma visual) ---------------------- */
.topo-band {
  position: relative;
  background: var(--bg-ink);
  overflow: hidden;
}
.topo-band::before {
  content: "";
  position: absolute;
  inset: 0;
  opacity: 0.16;
  background-image:
    repeating-radial-gradient(circle at 12% 30%, transparent 0, transparent 26px, rgba(255,255,255,0.5) 27px, transparent 28px, transparent 64px),
    repeating-radial-gradient(circle at 88% 78%, transparent 0, transparent 34px, rgba(255,255,255,0.4) 35px, transparent 36px, transparent 78px);
  pointer-events: none;
}

/* ---- Héroes de página --------------------------------------------------- */
.hero-section {
  background: var(--bg-ink) !important;
  color: #fff;
  position: relative;
  overflow: hidden;
}
.hero-section::before, .hero-section::after { display: none !important; }
.hero-section {
  background-image:
    repeating-linear-gradient(115deg, rgba(255,255,255,0.035) 0 2px, transparent 2px 46px),
    linear-gradient(135deg, var(--bg-ink) 0%, var(--blue) 100%) !important;
}
.hero-content h1 { color: #fff; font-weight: 600; }
.hero-content .lead { color: rgba(255, 255, 255, 0.82); }
.hero-section .text-muted { color: rgba(255,255,255,0.7) !important; }

.logo-card { background: #fff; border-radius: var(--radius-lg); }

/* ---- Encabezado simple de páginas internas ------------------------------ */
.page-header {
  background: var(--bg-ink);
  color: #fff;
  padding: 2.75rem 0 3.25rem;
  margin-bottom: -2rem;
  position: relative;
  overflow: hidden;
}
.page-header::before {
  content: "";
  position: absolute;
  inset: 0;
  opacity: 0.14;
  background-image: repeating-linear-gradient(115deg, rgba(255,255,255,0.5) 0 1px, transparent 1px 42px);
  pointer-events: none;
}
.page-header .eyebrow {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--accent-light);
  display: block;
  margin-bottom: 0.5rem;
}
.page-header h1 {
  color: #fff;
  font-size: clamp(1.75rem, 3vw, 2.5rem);
  margin: 0;
  position: relative;
}
.page-header p { color: rgba(255,255,255,0.78); max-width: 60ch; margin: 0.75rem 0 0; position: relative; }
.page-content-shell {
  background: var(--bg-paper);
  position: relative;
  border-radius: var(--radius-lg) var(--radius-lg) 0 0;
  padding-top: 2rem;
}

/* ---- Tarjetas y contenido ------------------------------------------------ */
.card {
  border-radius: var(--radius-md);
  border-color: rgba(10, 36, 56, 0.08);
}
.card .card-header.bg-primary,
.card .card-header.bg-secondary {
  background: var(--blue) !important;
  border: none;
  font-weight: 600;
}
.card .card-header.bg-secondary { background: var(--green) !important; }
.card .card-header.bg-accent { background: var(--yellow) !important; color: var(--blue-dark) !important; border: none; font-weight: 600; }
.card.border-primary { border-color: var(--blue) !important; }
.card.border-secondary { border-color: var(--green) !important; }
.card.border-accent { border-color: var(--yellow) !important; }

.badge.bg-primary { background: var(--blue) !important; }
.badge.bg-secondary { background: var(--green) !important; }
.badge.bg-accent, .bg-accent.badge { background: var(--yellow) !important; color: var(--blue-dark) !important; }

.symbol-box { background: #eef1ee !important; }

/* ---- Accesos rápidos (home) --------------------------------------------- */
.quick-access {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 1rem;
}
.quick-access .qa-card {
  background: #fff;
  border-radius: var(--radius-md);
  padding: 1.25rem 1.1rem;
  text-decoration: none;
  color: var(--text-default);
  box-shadow: var(--shadow-sm);
  border: 1px solid rgba(10,36,56,0.06);
  transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease;
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
}
.quick-access .qa-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-md);
  border-color: var(--yellow);
}
.quick-access .qa-icon {
  width: 42px; height: 42px;
  border-radius: 10px;
  display: flex; align-items: center; justify-content: center;
  background: rgba(12, 51, 80, 0.08);
  color: var(--blue);
  font-size: 1.1rem;
}
.quick-access .qa-card span.qa-title { font-weight: 600; }
.quick-access .qa-card span.qa-desc { font-size: 0.82rem; color: #5b6b76; }

/* ---- Pie de página institucional ----------------------------------------- */
.site-footer.footer-institucional {
  background: var(--bg-ink) !important;
  position: relative;
  padding-top: 2.75rem !important;
  padding-bottom: 1.5rem !important;
}
.footer-institucional::before {
  content: "";
  position: absolute;
  top: 0; left: 0; right: 0; height: 3px;
  background: linear-gradient(90deg, var(--yellow) 0%, var(--green) 55%, var(--blue-light) 100%);
}
.footer-institucional .footer-title {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--accent-light);
  margin-bottom: 0.6rem;
  display: block;
}
.footer-institucional a { color: rgba(255,255,255,0.82); }
.footer-institucional a:hover { color: var(--yellow); }
.footer-institucional .social-links a {
  width: 34px; height: 34px; border-radius: 50%;
  display: inline-flex; align-items: center; justify-content: center;
  background: rgba(255,255,255,0.08);
}
.footer-institucional .social-links a:hover { background: var(--yellow); color: var(--blue-dark) !important; }
.footer-institucional hr { border-color: rgba(255,255,255,0.12); }

/* ---- Reveal on scroll ----------------------------------------------------- */
.reveal { opacity: 0; transform: translateY(14px); transition: opacity .6s ease, transform .6s ease; }
.reveal.visible { opacity: 1; transform: none; }

@media (max-width: 768px) {
  .page-header { padding: 2.25rem 0 2.5rem; }
}

/* ==========================================================================
   RESPONSIVE — versión móvil simplificada
   ========================================================================== */
@media (max-width: 991.98px) {
  /* La franja de utilidad ya se oculta en móvil (d-none d-md-block);
     el menú colapsado se simplifica para que no se vea recargado. */
  .navbar-institucional .navbar-collapse {
    background: var(--blue-dark);
    margin-top: 0.75rem;
    padding: 0.5rem 0.75rem 0.75rem;
    border-radius: var(--radius-md);
  }
  .navbar-institucional .nav-link {
    padding-top: 0.6rem;
    padding-bottom: 0.6rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  }
  .navbar-institucional .navbar-nav > .nav-item:last-child > .nav-link { border-bottom: none; }
  .navbar-institucional .dropdown-menu {
    background: rgba(255, 255, 255, 0.06);
    box-shadow: none;
    border-radius: 10px;
    margin: 0.25rem 0 0.5rem;
  }
  .navbar-institucional .dropdown-item {
    color: rgba(255, 255, 255, 0.85);
  }
  .navbar-institucional .dropdown-item:hover,
  .navbar-institucional .dropdown-item.active {
    background: rgba(226, 165, 48, 0.18);
    color: #fff;
  }
  .navbar-institucional .dropdown-header { color: rgba(255,255,255,0.5); }
  .navbar-institucional .dropdown-divider { border-color: rgba(255,255,255,0.12); }
}

@media (max-width: 575.98px) {
  /* Marca más compacta: se oculta el subtítulo para no saturar la barra */
  .navbar-institucional .brand-text .brand-sub { display: none; }
  .navbar-institucional .brand-text .brand-title { font-size: 0.95rem; }
  .seal-mark { width: 36px; height: 36px; }
  .seal-mark img { width: 26px; height: 26px; }

  /* Héroes y encabezados: menos relleno, texto más compacto */
  .hero-section { padding: 2.5rem 0 !important; }
  .hero-content h1 { font-size: 1.5rem; }
  .hero-content .lead { font-size: 0.95rem; }
  .hero-content .btn { width: 100%; margin: 0 0 0.5rem !important; }
  .hero-content .d-inline-block[style] { white-space: normal; }

  .page-header { padding: 1.75rem 0 2rem; }
  .page-header h1 { font-size: 1.4rem; }
  .page-header p { font-size: 0.92rem; }

  /* Accesos rápidos: una sola columna para lectura clara */
  .quick-access { grid-template-columns: 1fr; }

  /* Pie de página: columnas apiladas y centradas, más simple */
  .footer-institucional .row > div { text-align: center; }
  .footer-institucional .d-flex.align-items-start { justify-content: center; }
  .footer-institucional .social-links { justify-content: center; }
}

@media (prefers-reduced-motion: reduce) {
  .reveal, .quick-access .qa-card, .btn-primary { transition: none !important; }
}
