/* ============================================================
   EMOVTTSR-EP · Hoja de estilos del sitio público
   Colores administrables vía variables CSS (Ajustes del CMS)
   ============================================================ */
*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }

:root {
  --primary: #1b5fa8;
  --dark: #0d2c4f;
  --accent: #f5b81c;
  --text: #243242;
  --muted: #5d6b7d;
  --bg: #ffffff;
  --bg-alt: #f2f6fb;
  --border: #e1e8f0;
  --radius: 14px;
  --shadow: 0 6px 24px rgba(13, 44, 79, .08);
  --shadow-lg: 0 14px 40px rgba(13, 44, 79, .14);
}

html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: 'Inter', system-ui, -apple-system, sans-serif;
  color: var(--text);
  background: var(--bg);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; }
a { color: var(--primary); text-decoration: none; }
.container { max-width: 1200px; margin: 0 auto; padding: 0 20px; }
.center { text-align: center; }
.mt-2 { margin-top: 2rem; }

/* ---------- Barra superior ---------- */
.topbar { background: var(--dark); color: #cdd9e8; font-size: .82rem; }
.topbar-inner { display: flex; justify-content: space-between; align-items: center; min-height: 36px; gap: 12px; flex-wrap: wrap; }
.topbar-info { display: flex; gap: 18px; }
.topbar-social { display: flex; gap: 14px; align-items: center; }
.topbar-social a { color: #cdd9e8; font-weight: 500; }
.topbar-social a:hover { color: var(--accent); }
.topbar-admin { background: rgba(255,255,255,.12); padding: 3px 12px; border-radius: 20px; }

/* ---------- Cabecera / Navegación ---------- */
.header { background: #fff; position: sticky; top: 0; z-index: 100; box-shadow: 0 2px 14px rgba(13,44,79,.10); }
.header-inner { display: flex; align-items: center; justify-content: space-between; gap: 18px; min-height: 78px; }
.brand { display: flex; align-items: center; gap: 12px; }
.brand-logo { height: 52px; width: auto; filter: brightness(.45) sepia(1) hue-rotate(180deg) saturate(3); }
.brand-text { display: flex; flex-direction: column; line-height: 1.2; }
.brand-text strong { color: var(--dark); font-size: 1.15rem; font-weight: 800; letter-spacing: .3px; }
.brand-text small { color: var(--muted); font-size: .72rem; }

.nav { display: flex; align-items: center; gap: 2px; }
.nav-item { position: relative; }
.nav-link {
  display: block; padding: 10px 14px; color: var(--dark);
  font-weight: 600; font-size: .92rem; border-radius: 8px; transition: .18s;
}
.nav-link:hover, .nav-link.active { background: var(--bg-alt); color: var(--primary); }
.caret { font-size: .65rem; opacity: .6; }
.submenu {
  position: absolute; top: 100%; left: 0; min-width: 250px; background: #fff;
  border-radius: 10px; box-shadow: var(--shadow-lg); padding: 8px;
  opacity: 0; visibility: hidden; transform: translateY(8px); transition: .2s;
  border-top: 3px solid var(--accent);
}
.nav-item.has-sub:hover .submenu, .nav-item.has-sub:focus-within .submenu { opacity: 1; visibility: visible; transform: translateY(0); }
.submenu a { display: block; padding: 9px 14px; color: var(--text); font-size: .88rem; font-weight: 500; border-radius: 7px; }
.submenu a:hover { background: var(--bg-alt); color: var(--primary); }
.nav-toggle { display: none; background: none; border: 1.5px solid var(--border); border-radius: 8px; font-size: 1.3rem; padding: 4px 12px; cursor: pointer; color: var(--dark); }

/* ---------- Hero / Carrusel ---------- */
.hero { position: relative; height: min(72vh, 620px); min-height: 420px; overflow: hidden; background: var(--dark); }
.hero-slide {
  position: absolute; inset: 0; background-size: cover; background-position: center;
  opacity: 0; transition: opacity .8s ease; display: flex; align-items: center;
}
.hero-slide.active { opacity: 1; z-index: 1; }
.hero-overlay { position: absolute; inset: 0; background: linear-gradient(90deg, rgba(13,44,79,.82) 0%, rgba(13,44,79,.45) 55%, rgba(13,44,79,.15) 100%); }
.hero-content { position: relative; z-index: 2; color: #fff; max-width: 1200px; width: 100%; }
.hero-content h1 { font-size: clamp(1.7rem, 4vw, 3rem); font-weight: 800; margin: 0 0 14px; max-width: 640px; line-height: 1.15; text-shadow: 0 2px 14px rgba(0,0,0,.3); }
.hero-content p { font-size: clamp(.95rem, 2vw, 1.2rem); max-width: 560px; margin: 0 0 24px; color: #e8eef6; }
.hero-arrow {
  position: absolute; top: 50%; transform: translateY(-50%); z-index: 5;
  background: rgba(255,255,255,.16); color: #fff; border: none; width: 46px; height: 46px;
  border-radius: 50%; font-size: 1.6rem; cursor: pointer; transition: .2s; backdrop-filter: blur(4px);
}
.hero-arrow:hover { background: var(--accent); color: var(--dark); }
.hero-arrow.prev { left: 18px; } .hero-arrow.next { right: 18px; }
.hero-dots { position: absolute; bottom: 22px; left: 50%; transform: translateX(-50%); z-index: 5; display: flex; gap: 9px; }
.hero-dots button { width: 11px; height: 11px; border-radius: 50%; border: none; background: rgba(255,255,255,.45); cursor: pointer; transition: .2s; padding: 0; }
.hero-dots button.active { background: var(--accent); transform: scale(1.25); }

/* ---------- Botones ---------- */
.btn {
  display: inline-block; padding: 12px 26px; border-radius: 30px; font-weight: 700;
  font-size: .92rem; transition: .2s; border: none; cursor: pointer; font-family: inherit;
}
.btn-primary { background: var(--primary); color: #fff; }
.btn-primary:hover { background: var(--dark); transform: translateY(-2px); box-shadow: var(--shadow); }
.btn-accent { background: var(--accent); color: var(--dark); }
.btn-accent:hover { transform: translateY(-2px); box-shadow: 0 8px 22px rgba(245,184,28,.4); }
.btn-sm { padding: 7px 16px; font-size: .8rem; }

/* ---------- Accesos rápidos ---------- */
.quick-access { margin-top: -34px; position: relative; z-index: 10; }
.quick-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }
.quick-card {
  background: #fff; border-radius: var(--radius); box-shadow: var(--shadow); padding: 18px;
  display: flex; gap: 14px; align-items: center; color: var(--text); transition: .2s;
  border-bottom: 3px solid transparent;
}
.quick-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-lg); border-bottom-color: var(--accent); }
.quick-ico { width: 46px; height: 46px; flex: none; border-radius: 12px; background: var(--bg-alt); color: var(--primary); display: grid; place-items: center; }
.quick-ico svg { width: 26px; height: 26px; }
.quick-card strong { display: block; color: var(--dark); font-size: .92rem; line-height: 1.25; }
.quick-card small { color: var(--muted); font-size: .78rem; }

/* ---------- Secciones ---------- */
.section { padding: 70px 0; }
.section-alt { background: var(--bg-alt); }
.section-head { text-align: center; max-width: 640px; margin: 0 auto 44px; }
.section-tag {
  display: inline-block; background: rgba(27,95,168,.1); color: var(--primary);
  font-size: .75rem; font-weight: 700; text-transform: uppercase; letter-spacing: 1.5px;
  padding: 5px 16px; border-radius: 20px; margin-bottom: 12px;
}
.section-head h2 { font-size: clamp(1.6rem, 3vw, 2.2rem); color: var(--dark); margin: 0 0 10px; font-weight: 800; }
.section-head p { color: var(--muted); margin: 0; }

/* ---------- Servicios ---------- */
.services-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; }
.service-card {
  background: #fff; border: 1.5px solid var(--border); border-radius: var(--radius);
  padding: 28px 24px; color: var(--text); transition: .22s; display: flex; flex-direction: column;
}
.service-card:hover { border-color: var(--primary); transform: translateY(-5px); box-shadow: var(--shadow-lg); }
.service-ico { width: 56px; height: 56px; border-radius: 14px; background: linear-gradient(135deg, var(--primary), var(--dark)); color: #fff; display: grid; place-items: center; margin-bottom: 18px; }
.service-ico svg { width: 30px; height: 30px; }
.service-card h3 { margin: 0 0 8px; color: var(--dark); font-size: 1.08rem; }
.service-card p { margin: 0 0 16px; font-size: .88rem; color: var(--muted); flex: 1; }
.service-more { color: var(--primary); font-weight: 700; font-size: .85rem; }

/* ---------- Noticias ---------- */
.news-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.news-card {
  background: #fff; border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow);
  display: flex; flex-direction: column; transition: .22s;
}
.news-card:hover { transform: translateY(-5px); box-shadow: var(--shadow-lg); }
.news-img { position: relative; display: block; aspect-ratio: 16/9; overflow: hidden; background: var(--bg-alt); }
.news-img img { width: 100%; height: 100%; object-fit: cover; transition: .4s; }
.news-card:hover .news-img img { transform: scale(1.06); }
.news-noimg { height: 100%; display: grid; place-items: center; color: var(--border); }
.news-noimg svg { width: 60px; height: 60px; }
.badge-fb {
  position: absolute; top: 12px; left: 12px; background: #1877f2; color: #fff;
  font-size: .68rem; font-weight: 700; padding: 4px 11px; border-radius: 14px; letter-spacing: .4px;
}
.badge-fb.inline { position: static; }
.news-body { padding: 20px 22px 24px; display: flex; flex-direction: column; flex: 1; }
.news-body time { color: var(--muted); font-size: .76rem; font-weight: 600; text-transform: uppercase; letter-spacing: .8px; }
.news-body h3 { margin: 8px 0 10px; font-size: 1.05rem; line-height: 1.35; }
.news-body h3 a { color: var(--dark); }
.news-body h3 a:hover { color: var(--primary); }
.news-body p { margin: 0 0 14px; font-size: .87rem; color: var(--muted); flex: 1;
  display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.news-more { font-weight: 700; font-size: .85rem; }

/* ---------- CTA ---------- */
.cta-strip { background: linear-gradient(120deg, var(--dark), var(--primary)); color: #fff; padding: 52px 0; }
.cta-inner { display: flex; justify-content: space-between; align-items: center; gap: 24px; flex-wrap: wrap; }
.cta-inner h2 { margin: 0 0 6px; font-size: 1.6rem; }
.cta-inner p { margin: 0; color: #dbe6f2; }

/* ---------- Cabecera de página interior ---------- */
.page-hero { background: linear-gradient(120deg, var(--dark), var(--primary)); color: #fff; padding: 54px 0; }
.page-hero h1 { margin: 0 0 8px; font-size: clamp(1.6rem, 3.5vw, 2.4rem); font-weight: 800; }
.page-hero p { margin: 0; color: #dbe6f2; }
.breadcrumb { font-size: .82rem !important; margin-bottom: 10px !important; }
.breadcrumb a { color: var(--accent); }

/* ---------- Artículos / Páginas ---------- */
.article-layout { display: grid; grid-template-columns: 1fr 320px; gap: 40px; align-items: start; }
.article-img { width: 100%; border-radius: var(--radius); margin-bottom: 26px; box-shadow: var(--shadow); }
.article-body { font-size: 1rem; color: var(--text); }
.article-body h2 { color: var(--dark); margin-top: 1.8em; }
.article-body h3 { color: var(--primary); }
.article-body img { border-radius: 10px; }
.article-body table { width: 100%; border-collapse: collapse; margin: 1.2em 0; }
.article-body th { background: var(--primary); color: #fff; text-align: left; }
.article-body th, .article-body td { padding: 10px 14px; border: 1px solid var(--border); }
.article-body tr:nth-child(even) td { background: var(--bg-alt); }
.article-page { max-width: 860px; margin: 0 auto; }

.sidebar { background: var(--bg-alt); border-radius: var(--radius); padding: 24px; position: sticky; top: 100px; }
.sidebar h3 { margin: 0 0 16px; color: var(--dark); font-size: 1.05rem; }
.sidebar-item { display: flex; gap: 12px; padding: 10px 0; border-top: 1px solid var(--border); color: var(--text); align-items: center; }
.sidebar-item img { width: 70px; height: 52px; object-fit: cover; border-radius: 8px; flex: none; }
.sidebar-item strong { display: block; font-size: .84rem; line-height: 1.3; color: var(--dark); }
.sidebar-item:hover strong { color: var(--primary); }
.sidebar-item time { font-size: .72rem; color: var(--muted); }

/* ---------- Paginación ---------- */
.pagination { display: flex; justify-content: center; gap: 8px; margin-top: 40px; }
.pagination a {
  min-width: 40px; height: 40px; display: grid; place-items: center; border-radius: 10px;
  background: var(--bg-alt); color: var(--dark); font-weight: 700; transition: .18s;
}
.pagination a:hover { background: var(--primary); color: #fff; }
.pagination a.active { background: var(--primary); color: #fff; }

/* ---------- Transparencia ---------- */
.filters { display: flex; gap: 14px; margin-bottom: 28px; flex-wrap: wrap; }
.filters select {
  padding: 11px 16px; border: 1.5px solid var(--border); border-radius: 10px;
  font-family: inherit; font-size: .9rem; color: var(--dark); background: #fff; min-width: 220px;
}
.doc-table-wrap { overflow-x: auto; border-radius: var(--radius); box-shadow: var(--shadow); }
.doc-table { width: 100%; border-collapse: collapse; background: #fff; min-width: 700px; }
.doc-table th { background: var(--dark); color: #fff; text-align: left; padding: 14px 18px; font-size: .82rem; text-transform: uppercase; letter-spacing: .6px; }
.doc-table td { padding: 13px 18px; border-top: 1px solid var(--border); font-size: .9rem; vertical-align: middle; }
.doc-table tr:hover td { background: var(--bg-alt); }
.doc-title { display: flex; align-items: center; gap: 10px; font-weight: 600; color: var(--dark); }
.doc-title svg { width: 20px; height: 20px; color: var(--primary); flex: none; }
.chip { background: rgba(27,95,168,.1); color: var(--primary); font-size: .76rem; font-weight: 700; padding: 4px 12px; border-radius: 14px; white-space: nowrap; }

/* ---------- Contacto ---------- */
.contact-layout { display: grid; grid-template-columns: 360px 1fr; gap: 40px; align-items: start; }
.contact-info { background: var(--bg-alt); border-radius: var(--radius); padding: 28px; }
.contact-info h3 { color: var(--dark); margin-top: 0; }
.contact-info p { font-size: .9rem; }
.ext-list { list-style: none; padding: 0; margin: 0; font-size: .87rem; }
.ext-list li { padding: 7px 0; border-bottom: 1px dashed var(--border); }
.contact-form label { display: block; font-weight: 600; font-size: .88rem; color: var(--dark); margin-bottom: 16px; }
.contact-form input, .contact-form textarea {
  width: 100%; margin-top: 6px; padding: 12px 14px; border: 1.5px solid var(--border);
  border-radius: 10px; font-family: inherit; font-size: .92rem; transition: .18s;
}
.contact-form input:focus, .contact-form textarea:focus { outline: none; border-color: var(--primary); box-shadow: 0 0 0 3px rgba(27,95,168,.12); }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.alert { padding: 16px 20px; border-radius: 10px; margin-bottom: 20px; font-size: .92rem; }
.alert-success { background: #e7f6ec; color: #1d7a3d; border: 1px solid #b8e3c5; }
.alert-error { background: #fdeaea; color: #b42323; border: 1px solid #f3c0c0; }

/* ---------- Pie de página ---------- */
.footer { background: var(--dark); color: #b9c8da; }
.footer-grid { display: grid; grid-template-columns: 1.3fr 1.2fr .8fr .7fr; gap: 36px; padding: 56px 20px 40px; }
.footer-col h4 { color: #fff; margin: 0 0 16px; font-size: .95rem; text-transform: uppercase; letter-spacing: 1px; }
.footer-col p { font-size: .86rem; margin: 0 0 10px; }
.footer-col a { color: #b9c8da; }
.footer-col a:hover { color: var(--accent); }
.footer-logo { height: 56px; margin-bottom: 14px; }
.footer-bottom { border-top: 1px solid rgba(255,255,255,.1); padding: 18px 0; font-size: .8rem; text-align: center; }

/* ============================================================
   ANIMACIONES
   ============================================================ */

/* Aparición al hacer scroll (las clases las aplica site.js) */
.reveal { opacity: 0; transform: translateY(28px); transition: opacity .7s ease, transform .7s ease; transition-delay: var(--d, 0s); }
.reveal.visible { opacity: 1; transform: none; }

/* Efecto Ken Burns en el carrusel */
.hero-slide::before {
  content: ''; position: absolute; inset: 0;
  background: inherit; background-size: cover; background-position: center;
}
.hero-slide.active::before { animation: kenburns 9s ease-out forwards; }
@keyframes kenburns { from { transform: scale(1); } to { transform: scale(1.04); } }

/* Entrada animada del texto del hero */
.hero-content h1, .hero-content p, .hero-content .btn { opacity: 0; }
.hero-slide.active .hero-content h1 { animation: heroUp .8s .25s ease forwards; }
.hero-slide.active .hero-content p { animation: heroUp .8s .5s ease forwards; }
.hero-slide.active .hero-content .btn { animation: heroUp .8s .75s ease forwards; }
@keyframes heroUp { from { opacity: 0; transform: translateY(26px); } to { opacity: 1; transform: none; } }

/* Subrayado animado del menú */
.nav-link { position: relative; }
.nav-link::after {
  content: ''; position: absolute; left: 14px; right: 14px; bottom: 5px; height: 2.5px;
  background: var(--accent); border-radius: 2px; transform: scaleX(0); transform-origin: left;
  transition: transform .25s ease;
}
.nav-link:hover::after, .nav-link.active::after { transform: scaleX(1); }

/* Microanimaciones */
.quick-card:hover .quick-ico { animation: wiggle .5s ease; }
.service-card:hover .service-ico { transform: scale(1.08) rotate(-4deg); }
.service-ico { transition: transform .25s ease; }
.service-more { transition: letter-spacing .2s ease; }
.service-card:hover .service-more { letter-spacing: .5px; }
@keyframes wiggle { 0%,100% { transform: rotate(0); } 30% { transform: rotate(-7deg); } 60% { transform: rotate(6deg); } }

@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1; transform: none; transition: none; }
  .hero-slide.active::before { animation: none; }
  .hero-content h1, .hero-content p, .hero-content .btn { opacity: 1; animation: none !important; }
}

/* ============================================================
   COOPERATIVAS DE BUSES
   ============================================================ */
.bus-search { display: flex; align-items: center; gap: 18px; margin-bottom: 30px; flex-wrap: wrap; }
.bus-search input {
  flex: 1; min-width: 260px; padding: 14px 20px; border: 2px solid var(--border);
  border-radius: 30px; font-family: inherit; font-size: .95rem; transition: .2s;
}
.bus-search input:focus { outline: none; border-color: var(--primary); box-shadow: 0 0 0 4px rgba(27,95,168,.1); }
.bus-count { color: var(--muted); font-size: .88rem; font-weight: 600; white-space: nowrap; }
.bus-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; }
.bus-card {
  background: #fff; border: 1.5px solid var(--border); border-radius: var(--radius);
  padding: 24px; transition: .22s; display: flex; flex-direction: column; gap: 12px;
}
.bus-card:hover { border-color: var(--primary); transform: translateY(-4px); box-shadow: var(--shadow-lg); }
.bus-head { display: flex; align-items: center; gap: 12px; }
.bus-ico { width: 44px; height: 44px; flex: none; border-radius: 12px; background: linear-gradient(135deg, var(--primary), var(--dark)); color: #fff; display: grid; place-items: center; }
.bus-ico svg { width: 24px; height: 24px; }
.bus-logo { width: 52px; height: 52px; flex: none; border-radius: 12px; background: #fff; border: 1px solid var(--border); display: grid; place-items: center; overflow: hidden; }
.bus-logo img { max-width: 100%; max-height: 100%; object-fit: contain; }
.bus-head h3 { margin: 0; font-size: 1.02rem; color: var(--dark); line-height: 1.25; }
.bus-meta { display: flex; gap: 8px; flex-wrap: wrap; }
.bus-pill { background: var(--bg-alt); color: var(--dark); font-size: .76rem; font-weight: 700; padding: 5px 12px; border-radius: 14px; }
.bus-time { margin: 0; font-size: .86rem; font-weight: 600; color: var(--primary); }
.bus-dest { display: flex; gap: 6px; flex-wrap: wrap; }
.bus-dest .chip { font-size: .72rem; }
.bus-phone { margin: 0; font-size: .84rem; color: var(--muted); margin-top: auto; }
.muted-msg { color: var(--muted); padding: 30px 0; }

/* ============================================================
   PUBLICIDAD · VENTANA FLOTANTE
   ============================================================ */
.ad-modal { position: fixed; inset: 0; z-index: 1000; display: grid; place-items: center; padding: 20px; }
.ad-modal-backdrop { position: absolute; inset: 0; background: rgba(13,44,79,.6); backdrop-filter: blur(3px); opacity: 0; transition: opacity .25s; }
.ad-modal.open .ad-modal-backdrop { opacity: 1; }
.ad-modal-box {
  position: relative; background: #fff; border-radius: 16px; overflow: hidden;
  width: min(520px, 94vw); max-height: 88vh; overflow-y: auto; box-shadow: 0 24px 70px rgba(0,0,0,.35);
  opacity: 0; transform: translateY(24px) scale(.96); transition: opacity .25s, transform .25s;
}
.ad-modal.open .ad-modal-box { opacity: 1; transform: none; }
.ad-modal-close {
  position: absolute; top: 10px; right: 10px; z-index: 5;
  width: 36px; height: 36px; border: none; border-radius: 50%; cursor: pointer;
  background: rgba(13,44,79,.65); color: #fff; font-size: 1rem; line-height: 1;
  display: grid; place-items: center; transition: .2s;
}
.ad-modal-close:hover { background: var(--accent); color: var(--dark); transform: rotate(90deg); }
.ad-slide { display: none; }
.ad-slide.active { display: block; }
.ad-media { display: block; background: var(--dark); }
.ad-media img, .ad-media video { display: block; width: 100%; max-height: 56vh; object-fit: contain; }
.ad-body { padding: 18px 22px 22px; display: flex; flex-direction: column; gap: 10px; }
.ad-body h3 { margin: 0; font-size: 1.1rem; color: var(--dark); }
.ad-body p { margin: 0; font-size: .9rem; color: var(--muted); line-height: 1.55; }
.ad-body .btn { align-self: flex-start; }
.ad-modal-nav { display: flex; justify-content: center; gap: 8px; padding: 0 0 16px; }
.ad-modal-nav button { width: 10px; height: 10px; border-radius: 50%; border: none; cursor: pointer; background: var(--border); transition: .2s; }
.ad-modal-nav button.active { background: var(--primary); transform: scale(1.25); }

/* ============================================================
   FRANJA DE ESTADÍSTICAS
   ============================================================ */
.stats-strip {
  background: linear-gradient(120deg, var(--dark) 0%, var(--primary) 100%);
  padding: 44px 0; position: relative; overflow: hidden;
}
.stats-strip::after {
  content: ''; position: absolute; right: -60px; top: -60px; width: 240px; height: 240px;
  border-radius: 50%; background: rgba(245,184,28,.12);
}
.stats-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 22px; position: relative; z-index: 1; }
.stat { text-align: center; color: #fff; display: flex; flex-direction: column; align-items: center; gap: 4px; }
.stat-ico { width: 46px; height: 46px; border-radius: 12px; background: rgba(255,255,255,.12); display: grid; place-items: center; margin-bottom: 6px; }
.stat-ico svg { width: 24px; height: 24px; }
.stat-num { font-size: 2.2rem; font-weight: 800; line-height: 1; color: var(--accent); }
.stat-label { font-size: .84rem; color: #d6e2f0; font-weight: 600; }

/* ============================================================
   WIDGETS FLOTANTES (WhatsApp, volver arriba)
   ============================================================ */
.float-stack { position: fixed; left: 18px; bottom: 18px; z-index: 900; display: flex; flex-direction: column; gap: 10px; }
.float-btn {
  width: 52px; height: 52px; border-radius: 50%; border: none; cursor: pointer;
  display: grid; place-items: center; box-shadow: 0 6px 20px rgba(0,0,0,.25);
  transition: transform .2s; text-decoration: none;
}
.float-btn:hover { transform: scale(1.1); }
.float-wa { background: #25d366; color: #fff; }
.float-wa svg { width: 28px; height: 28px; }
.float-top { background: var(--dark); color: #fff; font-size: 1.3rem; font-weight: 700; }

/* ============================================================
   ASISTENTE VIRTUAL (bot)
   ============================================================ */
.bot { position: fixed; right: 18px; bottom: 18px; z-index: 950; }
.bot-fab {
  position: relative; width: 60px; height: 60px; border-radius: 50%; border: none; cursor: pointer;
  background: linear-gradient(135deg, var(--primary), var(--dark)); color: #fff; font-size: 1.6rem;
  box-shadow: 0 8px 26px rgba(13,44,79,.4); transition: transform .2s; display: grid; place-items: center;
}
.bot-fab:hover { transform: scale(1.08); }
.bot-fab.open { background: var(--dark); }
.bot-fab-hint {
  position: absolute; right: 70px; top: 50%; transform: translateY(-50%);
  background: #fff; color: var(--dark); font-size: .78rem; font-weight: 700;
  padding: 7px 12px; border-radius: 12px; box-shadow: var(--shadow); white-space: nowrap;
  animation: hintPulse 2.4s ease infinite;
}
.bot-fab.open .bot-fab-hint { display: none; }
@keyframes hintPulse { 0%, 100% { transform: translateY(-50%) scale(1); } 50% { transform: translateY(-50%) scale(1.06); } }
.bot-panel {
  position: absolute; right: 0; bottom: 74px;
  width: min(360px, calc(100vw - 36px)); height: min(480px, 70vh);
  background: #fff; border-radius: 16px; box-shadow: 0 20px 60px rgba(0,0,0,.3);
  display: flex; flex-direction: column; overflow: hidden;
}
.bot-head {
  background: linear-gradient(135deg, var(--primary), var(--dark)); color: #fff;
  padding: 14px 16px; display: flex; align-items: center; gap: 10px;
}
.bot-avatar { font-size: 1.5rem; }
.bot-head strong { display: block; font-size: .95rem; }
.bot-head small { font-size: .74rem; opacity: .85; }
.bot-close { margin-left: auto; background: none; border: none; color: #fff; font-size: 1rem; cursor: pointer; opacity: .8; }
.bot-close:hover { opacity: 1; }
.bot-msgs { flex: 1; overflow-y: auto; padding: 14px; display: flex; flex-direction: column; gap: 9px; background: var(--bg-alt); }
.bot-msg { max-width: 85%; padding: 9px 13px; border-radius: 14px; font-size: .86rem; line-height: 1.5; animation: msgIn .25s ease; }
.bot-msg.from-bot { background: #fff; color: var(--text); border-bottom-left-radius: 4px; box-shadow: 0 1px 4px rgba(0,0,0,.08); align-self: flex-start; }
.bot-msg.user { background: var(--primary); color: #fff; border-bottom-right-radius: 4px; align-self: flex-end; }
.bot-msg a { color: var(--primary); font-weight: 700; }
.bot-msg.user a { color: #fff; }
@keyframes msgIn { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
.bot-chips { display: flex; gap: 6px; flex-wrap: wrap; padding: 10px 14px; background: var(--bg-alt); border-top: 1px solid var(--border); max-height: 110px; overflow-y: auto; }
.bot-chips button {
  background: #fff; border: 1.5px solid var(--border); border-radius: 14px;
  font-size: .74rem; font-weight: 600; color: var(--primary); padding: 5px 11px; cursor: pointer; transition: .15s;
}
.bot-chips button:hover { border-color: var(--primary); background: var(--primary); color: #fff; }
.bot-input { display: flex; border-top: 1px solid var(--border); }
.bot-input input { flex: 1; border: none; padding: 13px 14px; font-size: .88rem; font-family: inherit; }
.bot-input input:focus { outline: none; }
.bot-input button { border: none; background: var(--primary); color: #fff; width: 52px; font-size: 1rem; cursor: pointer; transition: .15s; }
.bot-input button:hover { background: var(--dark); }
/* Indicador "escribiendo..." */
.typing-bubble { background: #fff; padding: 12px 16px; }
.typing-dots { display: flex; gap: 5px; align-items: center; height: 18px; }
.typing-dots span {
  width: 8px; height: 8px; border-radius: 50%; background: var(--muted);
  animation: typingDot 1.4s ease infinite; display: block;
}
.typing-dots span:nth-child(2) { animation-delay: .22s; }
.typing-dots span:nth-child(3) { animation-delay: .44s; }
@keyframes typingDot { 0%,60%,100%{ transform:scale(.75); opacity:.4; } 30%{ transform:scale(1); opacity:1; } }

/* ============================================================
   TRANSPARENCIA (rediseño)
   ============================================================ */
.tcat-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 16px; margin-bottom: 38px; }
.tcat-card {
  background: #fff; border: 2px solid var(--border); border-radius: var(--radius);
  padding: 22px 18px; text-align: center; color: var(--text); transition: .2s;
  display: flex; flex-direction: column; align-items: center; gap: 6px;
}
.tcat-card:hover { border-color: var(--primary); transform: translateY(-3px); box-shadow: var(--shadow); }
.tcat-card.active { border-color: var(--primary); background: linear-gradient(135deg, var(--primary), var(--dark)); color: #fff; box-shadow: var(--shadow-lg); }
.tcat-card.active small { color: #cdd9e8; }
.tcat-ico { width: 46px; height: 46px; border-radius: 12px; background: rgba(27,95,168,.1); color: var(--primary); display: grid; place-items: center; }
.tcat-card.active .tcat-ico { background: rgba(255,255,255,.16); color: #fff; }
.tcat-ico svg { width: 24px; height: 24px; }
.tcat-card strong { font-size: .92rem; line-height: 1.25; }
.tcat-card small { color: var(--muted); font-size: .76rem; }

.year-block { background: #fff; border: 1.5px solid var(--border); border-radius: var(--radius); margin-bottom: 14px; overflow: hidden; }
.year-block summary {
  display: flex; justify-content: space-between; align-items: center; gap: 14px;
  padding: 18px 24px; cursor: pointer; list-style: none; transition: .15s; flex-wrap: wrap;
}
.year-block summary::-webkit-details-marker { display: none; }
.year-block summary:hover { background: var(--bg-alt); }
.year-block[open] summary { border-bottom: 1px solid var(--border); background: var(--bg-alt); }
.year-label { font-weight: 800; color: var(--dark); font-size: 1.06rem; }
.year-count { color: var(--muted); font-size: .82rem; font-weight: 600; }
.year-body { padding: 12px 24px 20px; }
.phase-title {
  margin: 18px 0 10px; color: var(--primary); font-size: .92rem; text-transform: uppercase;
  letter-spacing: .8px; border-left: 4px solid var(--accent); padding-left: 12px;
}
.doc-list { display: flex; flex-direction: column; gap: 8px; }
.doc-row {
  display: flex; align-items: center; gap: 14px; padding: 12px 16px; border: 1.5px solid var(--border);
  border-radius: 10px; color: var(--text); transition: .18s; background: #fff;
}
.doc-row:hover { border-color: var(--primary); transform: translateX(5px); box-shadow: var(--shadow); }
.doc-row-ico { width: 38px; height: 38px; flex: none; border-radius: 10px; background: rgba(27,95,168,.08); color: var(--primary); display: grid; place-items: center; }
.doc-row-ico svg { width: 20px; height: 20px; }
.doc-row-info { flex: 1; min-width: 0; }
.doc-row-info strong { display: block; font-size: .9rem; color: var(--dark); line-height: 1.3; }
.doc-row-info small { color: var(--muted); font-size: .76rem; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-top: 3px; }
.month-chip { background: var(--accent); color: var(--dark); font-weight: 800; font-size: .68rem; padding: 2px 10px; border-radius: 10px; text-transform: uppercase; letter-spacing: .5px; }
.doc-row-dl { color: var(--primary); font-weight: 700; font-size: .82rem; white-space: nowrap; }

/* ---------- Responsive ---------- */
@media (max-width: 1024px) {
  .services-grid, .news-grid { grid-template-columns: repeat(2, 1fr); }
  .quick-grid { grid-template-columns: repeat(2, 1fr); }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .article-layout { grid-template-columns: 1fr; }
  .contact-layout { grid-template-columns: 1fr; }
  .bus-grid { grid-template-columns: repeat(2, 1fr); }
  .stats-grid { grid-template-columns: repeat(2, 1fr); gap: 28px; }
}
@media (max-width: 720px) {
  .hide-sm { display: none; }
  .services-grid, .news-grid, .quick-grid { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr; }
  .form-row { grid-template-columns: 1fr; }
  .nav-toggle { display: block; }
  .nav {
    display: none; position: absolute; top: 100%; left: 0; right: 0; background: #fff;
    flex-direction: column; align-items: stretch; padding: 12px; box-shadow: var(--shadow-lg); gap: 0;
  }
  .nav.open { display: flex; }
  .submenu { position: static; opacity: 1; visibility: visible; transform: none; box-shadow: none; border-top: none; padding-left: 20px; display: none; }
  .nav-item.has-sub.open .submenu { display: block; }
  .brand-text strong { font-size: 1rem; }
  .hero { min-height: 360px; }
  .hero-arrow { display: none; }
  .bus-grid { grid-template-columns: 1fr; }
  .bot-fab-hint { display: none; }
  .float-btn { width: 46px; height: 46px; }
  .bot-fab { width: 54px; height: 54px; }
}

/* ============================================================
   MEJORAS PROFESIONALES v2
   ============================================================ */

/* Montserrat para headings */
h1, h2, h3 { font-family: 'Montserrat', 'Inter', system-ui, sans-serif; }

/* ---- Preloader ---- */
#preloader {
  position: fixed; inset: 0; z-index: 9999;
  background: var(--dark); display: flex; flex-direction: column;
  align-items: center; justify-content: center; gap: 24px;
  transition: opacity .5s .1s, visibility .5s .1s;
}
#preloader.done { opacity: 0; visibility: hidden; pointer-events: none; }
.preloader-logo { height: 72px; filter: brightness(0) invert(1); animation: pPulse 1.1s ease infinite; }
@keyframes pPulse { 0%,100%{ opacity:1; transform:scale(1); } 50%{ opacity:.5; transform:scale(.95); } }
.preloader-bar { width: 200px; height: 3px; background: rgba(255,255,255,.15); border-radius: 3px; overflow: hidden; }
.preloader-fill { height: 100%; background: var(--accent); border-radius: 3px; animation: pFill 1.4s ease-out forwards; }
@keyframes pFill { from{ width:0 } to{ width:100% } }

/* ---- Banner aviso urgente ---- */
.notice-bar {
  background: #c92a2a; color: #fff; text-align: center; padding: 9px 48px 9px 16px;
  font-size: .81rem; font-weight: 600; position: relative; display: flex;
  align-items: center; justify-content: center; gap: 10px; flex-wrap: wrap;
}
.notice-bar.notice-info { background: var(--primary); }
.notice-bar.notice-warning { background: #e67700; }
.notice-bar a { color: #fff; text-decoration: underline; }
.notice-dismiss {
  position: absolute; right: 12px; top: 50%; transform: translateY(-50%);
  background: none; border: none; color: #fff; cursor: pointer; opacity: .7;
  font-size: 1.1rem; line-height: 1; padding: 2px 6px;
}
.notice-dismiss:hover { opacity: 1; }

/* ---- Ticker de noticias ---- */
.ticker-bar {
  background: var(--primary); color: #fff; font-size: .8rem;
  border-bottom: 2px solid var(--accent); display: flex; overflow: hidden; height: 34px;
}
.ticker-label {
  background: var(--accent); color: var(--dark); font-weight: 800; font-size: .71rem;
  text-transform: uppercase; letter-spacing: 1px; padding: 0 16px; white-space: nowrap;
  display: flex; align-items: center; gap: 6px; flex: none;
}
.ticker-label svg { width: 13px; height: 13px; }
.ticker-track { overflow: hidden; flex: 1; }
.ticker-list { display: flex; align-items: center; white-space: nowrap; animation: tickerMove 30s linear infinite; height: 34px; }
.ticker-list:hover { animation-play-state: paused; }
.ticker-item { display: inline-flex; align-items: center; gap: 6px; padding: 0 36px; }
.ticker-item::before { content: '◆'; font-size: .45rem; color: var(--accent); }
.ticker-item a { color: rgba(255,255,255,.9); font-weight: 500; white-space: nowrap; }
.ticker-item a:hover { color: var(--accent); }
@keyframes tickerMove { 0%{ transform:translateX(0) } 100%{ transform:translateX(-50%) } }

/* ---- Búsqueda expandible ---- */
.header-search-btn {
  background: none; border: 1.5px solid var(--border); border-radius: 8px;
  width: 40px; height: 40px; display: grid; place-items: center;
  cursor: pointer; color: var(--muted); transition: .18s; flex: none;
}
.header-search-btn:hover { border-color: var(--primary); color: var(--primary); background: var(--bg-alt); }
.header-search-btn svg { width: 18px; height: 18px; }
.search-overlay {
  position: fixed; inset: 0; z-index: 500;
  background: rgba(13,44,79,.9); backdrop-filter: blur(6px);
  display: flex; align-items: flex-start; padding-top: 14vh;
  opacity: 0; visibility: hidden; transition: opacity .25s, visibility .25s;
}
.search-overlay.open { opacity: 1; visibility: visible; }
.search-box { width: 100%; max-width: 680px; margin: 0 auto; padding: 0 24px; }
.search-form { display: flex; background: #fff; border-radius: 16px; overflow: hidden; box-shadow: 0 24px 80px rgba(0,0,0,.4); }
.search-form input[type=search] {
  flex: 1; border: none; padding: 20px 24px; font-size: 1.1rem; font-family: inherit; color: var(--dark);
}
.search-form input[type=search]:focus { outline: none; }
.search-form button[type=submit] {
  background: var(--primary); color: #fff; border: none; padding: 0 28px;
  font-size: 1rem; cursor: pointer; transition: .15s; font-family: inherit; font-weight: 700;
}
.search-form button[type=submit]:hover { background: var(--dark); }
.search-hint { color: rgba(255,255,255,.5); font-size: .82rem; text-align: center; margin-top: 16px; }
.search-close-btn {
  display: block; margin: 20px auto 0; background: none; border: none;
  color: rgba(255,255,255,.6); font-size: .88rem; cursor: pointer; font-family: inherit;
}
.search-close-btn:hover { color: #fff; }

/* ---- Sección institucional ---- */
.institutional { padding: 72px 0; }
.inst-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 60px; align-items: center; }
.inst-img-wrap {
  border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow-lg);
  position: relative; aspect-ratio: 4/3; min-height: 260px;
  animation: instFadeLeft .8s ease both;
}
@keyframes instFadeLeft { from{ opacity:0; transform:translateX(-28px); } to{ opacity:1; transform:none; } }
.inst-content { animation: instFadeRight .8s .15s ease both; }
@keyframes instFadeRight { from{ opacity:0; transform:translateX(28px); } to{ opacity:1; transform:none; } }
.inst-img-wrap img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform .5s ease; }
.inst-img-wrap:hover img { transform: scale(1.04); }
.inst-badge {
  position: absolute; bottom: 20px; left: 20px; z-index: 2;
  background: var(--accent); color: var(--dark); font-size: .74rem; font-weight: 800;
  padding: 6px 18px; border-radius: 20px; text-transform: uppercase; letter-spacing: 1px;
}
.inst-content { display: flex; flex-direction: column; gap: 18px; }
.inst-content h2 { margin: 0; font-size: clamp(1.55rem, 2.8vw, 2.1rem); color: var(--dark); font-weight: 800; line-height: 1.2; }
.inst-content > p { color: var(--muted); font-size: .97rem; line-height: 1.75; margin: 0; }
.inst-pillars { display: flex; flex-direction: column; gap: 12px; }
.inst-pillar {
  display: flex; align-items: flex-start; gap: 14px; padding: 14px 16px;
  background: var(--bg-alt); border-radius: 12px; border-left: 4px solid transparent; transition: .22s;
}
.inst-pillar:hover { border-left-color: var(--accent); transform: translateX(6px); box-shadow: var(--shadow); }
.inst-pillar-ico {
  width: 40px; height: 40px; flex: none; border-radius: 10px;
  background: linear-gradient(135deg, var(--primary), var(--dark)); color: #fff;
  display: grid; place-items: center;
}
.inst-pillar-ico svg { width: 20px; height: 20px; }
.inst-pillar-txt strong { display: block; color: var(--dark); font-size: .93rem; font-weight: 700; }
.inst-pillar-txt span { color: var(--muted); font-size: .83rem; }
.inst-actions { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 4px; }
.btn-outline { background: none; border: 2px solid var(--border); color: var(--dark); }
.btn-outline:hover { border-color: var(--primary); color: var(--primary); }

/* ---- Wave separator ---- */
.wave-sep { display: block; width: 100%; overflow: hidden; line-height: 0; margin-bottom: -2px; }
.wave-sep svg { display: block; width: 100%; }

/* ---- Noticias – búsqueda ---- */
.news-search-bar { display: flex; gap: 12px; margin-bottom: 32px; align-items: center; flex-wrap: wrap; }
.news-search-bar form { display: flex; flex: 1; min-width: 260px; gap: 0; background: #fff; border: 2px solid var(--border); border-radius: 30px; overflow: hidden; transition: .18s; }
.news-search-bar form:focus-within { border-color: var(--primary); box-shadow: 0 0 0 4px rgba(27,95,168,.1); }
.news-search-bar input[type=search] { flex: 1; border: none; padding: 12px 20px; font-family: inherit; font-size: .92rem; color: var(--dark); background: none; }
.news-search-bar input[type=search]:focus { outline: none; }
.news-search-bar button { background: var(--primary); color: #fff; border: none; padding: 0 22px; cursor: pointer; font-weight: 700; font-size: .85rem; transition: .15s; }
.news-search-bar button:hover { background: var(--dark); }
.news-q-info { color: var(--muted); font-size: .88rem; }
.news-q-info a { color: var(--primary); font-weight: 600; }

/* ---- Footer redesign ---- */
.footer-main-grid {
  display: grid; grid-template-columns: 1.7fr 1.1fr 1fr 1fr;
  gap: 40px; padding: 56px 0 40px;
}
.footer-col-brand .footer-logo { height: 58px; margin-bottom: 16px; }
.footer-col-brand p { font-size: .86rem; color: #9eb3c8; line-height: 1.7; margin: 0 0 20px; max-width: 290px; }
.footer-social-row { display: flex; gap: 8px; flex-wrap: wrap; }
.fsoc-btn {
  width: 40px; height: 40px; border-radius: 10px; display: grid; place-items: center;
  background: rgba(255,255,255,.09); color: #c8d8e8; text-decoration: none; transition: .2s;
}
.fsoc-btn:hover { background: var(--accent); color: var(--dark); transform: translateY(-3px); }
.fsoc-btn svg { width: 19px; height: 19px; }
.footer-col h4 {
  color: #fff; font-size: .85rem; text-transform: uppercase; letter-spacing: 1.2px;
  margin: 0 0 20px; padding-bottom: 10px; border-bottom: 2px solid rgba(245,184,28,.5);
  display: inline-block;
}
.footer-col ul { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 9px; }
.footer-col ul a { color: #9eb3c8; font-size: .87rem; display: flex; align-items: center; gap: 8px; transition: .15s; }
.footer-col ul a::before { content: '›'; color: var(--accent); font-weight: 800; font-size: 1rem; line-height: 1; }
.footer-col ul a:hover { color: #fff; padding-left: 4px; }
.fcontact-item { display: flex; gap: 12px; margin-bottom: 14px; font-size: .85rem; color: #9eb3c8; align-items: flex-start; }
.fcontact-ico { width: 32px; height: 32px; border-radius: 8px; background: rgba(255,255,255,.08); color: var(--accent); display: grid; place-items: center; flex: none; margin-top: 1px; }
.fcontact-ico svg { width: 15px; height: 15px; }
.fcontact-item span { line-height: 1.6; }
.footer-divider { border: none; border-top: 1px solid rgba(255,255,255,.07); margin: 0; }
.footer-bottom-inner {
  padding: 18px 0; display: flex; justify-content: space-between;
  align-items: center; gap: 14px; flex-wrap: wrap; font-size: .78rem; color: #5a7490;
}
.footer-bottom-inner a { color: #5a7490; }
.footer-bottom-inner a:hover { color: var(--accent); }
.footer-seal { display: flex; align-items: center; gap: 10px; opacity: .5; }
.footer-seal svg { width: 30px; height: 30px; }
.footer-seal-txt { font-size: .69rem; line-height: 1.35; }

@media (max-width: 1024px) {
  .inst-grid { grid-template-columns: 1fr; gap: 32px; }
  .inst-img-wrap { aspect-ratio: 16/9; max-height: 360px; }
  .footer-main-grid { grid-template-columns: 1fr 1fr; gap: 32px; }
}
@media (max-width: 720px) {
  .ticker-bar { display: none; }
  .footer-main-grid { grid-template-columns: 1fr; }
  .footer-bottom-inner { flex-direction: column; text-align: center; }
  .inst-actions { flex-direction: column; }
}
