/* CNB-style static site
   Colors: #2e7f90 (color institucional), #f5f5f5 (gris claro), #fff (blanco)
   Fonts: Open Sans (body), ABeeZee (titulares) */

:root {
  --azul: #2e7f90;
  --azul-osc: #256b7a;
  --azul-hover: #1d5663;
  --gris-fondo: #f5f5f5;
  --gris-borde: #e3e3e3;
  --texto: #333;
  --texto-claro: #666;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

body {
  font-family: "Open Sans", Arial, sans-serif;
  color: var(--texto);
  background: #fffafa;
  line-height: 1.6;
  font-weight: 300;
}

a { color: var(--azul); text-decoration: none; }
a:hover { color: var(--azul-hover); }

h1, h2, h3, h4, h5, h6 {
  font-family: "ABeeZee", "Open Sans", sans-serif;
  font-weight: normal;
  color: var(--azul);
}

.container { max-width: 1170px; margin: 0 auto; padding: 0 15px; }

/* ===== Barra superior ===== */
#sp-top-bar {
  background: var(--azul);
  color: #fff;
  font-size: 13px;
  border-bottom: 1px solid var(--azul-osc);
}
#sp-top-bar .row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
  min-height: 38px;
}
.social-icons { list-style: none; display: flex; gap: 4px; }
.social-icons a {
  display: inline-flex;
  width: 26px; height: 26px;
  align-items: center; justify-content: center;
  color: #fff; border-radius: 3px;
  transition: background .2s;
}
.social-icons a:hover { background: rgba(255,255,255,.2); color: #fff; }
.sp-contact-info { list-style: none; display: flex; gap: 18px; flex-wrap: wrap; }
.sp-contact-info a { color: #fff; }
.sp-contact-info i { margin-right: 5px; }

/* ===== Header ===== */
#sp-header {
  background: #fff;
  border-bottom: 1px solid var(--gris-borde);
  padding: 18px 0;
}
#sp-header .row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 15px;
}
.logo img { max-height: 70px; width: auto; display: block; }
.logo .logo-mobile { display: none; }
.logo .tagline {
  display: block;
  font-size: 12px;
  color: var(--texto-claro);
  font-family: "Open Sans", sans-serif;
  margin-top: 4px;
}
@media (max-width: 768px) {
  .logo .logo-desktop { display: none; }
  .logo .logo-mobile { display: block; max-height: 50px; }
}
.sp-search form {
  display: flex;
  border: 1px solid var(--gris-borde);
  border-radius: 3px;
  overflow: hidden;
}
.sp-search input {
  border: 0;
  padding: 7px 12px;
  font-size: 14px;
  min-width: 220px;
  outline: none;
  background: #fff;
}
.sp-search button {
  background: var(--azul);
  border: 0;
  color: #fff;
  padding: 0 14px;
  cursor: pointer;
  font-size: 14px;
}
.sp-search button:hover { background: var(--azul-hover); }

/* ===== Navegacion===== */
#sp-navigation {
  background: #fff;
  border-top: 3px solid var(--azul);
  border-bottom: 1px solid var(--gris-borde);
  box-shadow: 0 2px 4px rgba(0,0,0,.04);
}
.sp-megamenu-parent {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
}
.sp-megamenu-parent > li { position: relative; }
.sp-megamenu-parent > li > a {
  display: block;
  padding: 16px 22px;
  color: var(--texto);
  font-size: 15px;
  font-weight: 600;
  border-bottom: 3px solid transparent;
  transition: all .2s;
}
.sp-megamenu-parent > li > a:hover,
.sp-megamenu-parent > li.active > a {
  color: var(--azul);
  border-bottom-color: var(--azul);
  background: #fafbff;
}
/* Dropdown */
.sp-megamenu-parent .sp-dropdown {
  position: absolute;
  top: 100%;
  left: 0;
  min-width: 240px;
  background: #fff;
  border: 1px solid var(--gris-borde);
  border-top: 2px solid var(--azul);
  box-shadow: 0 6px 14px rgba(0,0,0,.08);
  opacity: 0;
  visibility: hidden;
  transform: translateY(8px);
  transition: all .2s;
  z-index: 1000;
}
.sp-megamenu-parent li:hover > .sp-dropdown {
  opacity: 1; visibility: visible; transform: translateY(0);
}
.sp-dropdown-items { list-style: none; }
.sp-dropdown-items a {
  display: block;
  padding: 10px 18px;
  font-size: 14px;
  color: var(--texto);
  border-bottom: 1px solid #f0f0f0;
}
.sp-dropdown-items a:hover {
  background: var(--azul);
  color: #fff;
}
.menu-toggle {
  display: none;
  background: var(--azul);
  color: #fff;
  border: 0;
  padding: 12px 16px;
  width: 100%;
  font-size: 16px; cursor: pointer;
}
.menu-toggle i { margin-right: 8px; }

/* ===== Contenido ===== */
#sp-main-body { padding: 40px 0; min-height: 50vh; }
#sp-page-title {
  background: var(--azul);
  color: #fff;
  padding: 28px 0;
  margin-bottom: 10px;
}
#sp-page-title h1 { color: #fff; font-size: 30px; }
#sp-page-title .breadcrumb {
  font-size: 13px; opacity: .85; margin-top: 4px;
}
#sp-page-title .breadcrumb a { color: #fff; text-decoration: underline; }

.hero {
  background: linear-gradient(135deg, var(--azul), var(--azul-osc));
  color: #fff;
  padding: 70px 0;
  text-align: center;
}
.hero h2 { color: #fff; font-size: 38px; margin-bottom: 15px; }
.hero p { font-size: 18px; max-width: 760px; margin: 0 auto 25px; opacity: .95; }
.hero .btn {
  display: inline-block;
  background: #fff;
  color: var(--azul);
  padding: 12px 28px;
  border-radius: 3px;
  font-weight: 700;
  margin: 0 6px;
}
.hero .btn:hover { background: #f0f0f0; }
.hero .btn-outline {
  background: transparent;
  color: #fff;
  border: 2px solid #fff;
}
.hero .btn-outline:hover { background: rgba(255,255,255,.15); color: #fff; }

.section { padding: 50px 0; }
.section.alt { background: var(--gris-fondo); }
.section h2 { font-size: 28px; margin-bottom: 12px; }
.section .lead { color: var(--texto-claro); margin-bottom: 30px; max-width: 760px; }

.grid { display: grid; gap: 24px; }
.grid-3 { grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); }
.grid-2 { grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); }

.card {
  background: #fff;
  border: 1px solid var(--gris-borde);
  border-top: 3px solid var(--azul);
  border-radius: 3px;
  padding: 24px;
  transition: box-shadow .2s, transform .2s;
}
.card:hover { box-shadow: 0 8px 20px rgba(0,0,0,.08); transform: translateY(-3px); }
.card .icon {
  width: 56px; height: 56px;
  display: flex; align-items: center; justify-content: center;
  background: var(--azul);
  color: #fff;
  border-radius: 50%;
  font-size: 24px;
  margin-bottom: 16px;
}
.card h3 { font-size: 19px; margin-bottom: 8px; }
.card p { font-size: 14px; color: var(--texto-claro); }
.card .more {
  display: inline-block;
  margin-top: 12px;
  font-weight: 700;
  font-size: 14px;
  color: var(--azul);
}

/* Lista de documentos */
.doc-list { list-style: none; }
.doc-list li {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  padding: 16px 0;
  border-bottom: 1px solid var(--gris-borde);
}
.doc-list li:last-child { border-bottom: 0; }
.doc-list .doc-icon {
  color: var(--azul);
  font-size: 22px;
  margin-top: 2px;
}
.doc-list .doc-title { font-weight: 600; display: block; }
.doc-list .doc-meta { font-size: 13px; color: var(--texto-claro); }

/* ===== Footer ===== */
#sp-bottom {
  background: var(--gris-fondo);
  padding: 36px 0 26px;
  border-top: 1px solid var(--gris-borde);
}
#sp-bottom .row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 28px;
}
#sp-bottom h4 {
  font-size: 16px;
  margin-bottom: 14px;
  color: var(--azul);
}
#sp-bottom ul { list-style: none; }
#sp-bottom ul li { margin-bottom: 8px; font-size: 14px; }
#sp-bottom a { color: var(--texto); }
#sp-bottom a:hover { color: var(--azul); }
#sp-bottom p { font-size: 14px; color: var(--texto-claro); }
#sp-bottom .social-icons a {
  background: var(--azul);
  color: #fff;
  margin-right: 6px;
}
#sp-bottom .social-icons a:hover { background: var(--azul-hover); }

#sp-footer {
  background: var(--azul);
  color: #fff;
  padding: 18px 0;
  font-size: 13px;
}
#sp-footer .row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
}
#sp-footer a { color: #fff; }
#sp-footer a:hover { text-decoration: underline; }

/* ===== Bloques de trámites ===== */
.tramite-doc { font-size:15px; line-height:1.8; color:var(--texto); }
.tramite-doc h4 { margin:18px 0 6px; font-size:17px; }
.tramite-doc ol { margin:6px 0 18px 22px; }
.tramite-doc ol li { margin-bottom:6px; }
.tramite-doc .pago {
  background:#f7fbfc; border:1px solid #d6e6ea; border-left:4px solid var(--azul);
  border-radius:4px; padding:12px 16px; margin:10px 0 14px;
}
.tramite-doc .pago p { margin:2px 0; font-size:14px; }
.tramite-doc .pago strong { color:var(--azul); }
.tramite-doc .nota {
  margin-top:36px; padding:16px 20px; background:#f7fbfc;
  border:1px solid #d6e6ea; border-left:4px solid var(--azul); border-radius:4px;
}
.tramite-doc .nota h3 { margin-bottom:6px; }
.doc-link { display:inline-flex; align-items:center; gap:6px; font-weight:700; color:var(--azul); }

/* ===== Caja de consulta (formulario heredado) ===== */
.query-box {
  max-width: 560px;
  margin: 0 auto 24px;
  border: 1px solid var(--gris-borde);
  border-radius: 4px;
  overflow: hidden;
  box-shadow: 0 4px 12px rgba(0,0,0,.06);
}
.query-box .query-head {
  background: var(--azul);
  color: #fff;
  padding: 10px 18px;
  font-family: "ABeeZee", sans-serif;
  font-size: 15px;
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 8px;
}
.query-box .query-body {
  background: #fff;
  padding: 26px 22px;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  gap: 14px;
  flex-wrap: wrap;
}
.query-box .field { display: flex; flex-direction: column; gap: 6px; }
.query-box label {
  font-family: Arial, Helvetica, sans-serif;
  font-size: 14px;
  color: var(--texto);
  font-weight: 600;
}
.query-box input[type="text"] {
  padding: 9px 12px;
  border: 1px solid var(--gris-borde);
  border-radius: 3px;
  font-size: 15px;
  width: 200px;
  max-width: 100%;
  outline: none;
}
.query-box input[type="text"]:focus { border-color: var(--azul); }
.query-box .buttons,
.query-box input[type="submit"] {
  background: var(--azul);
  color: #fff;
  border: 0;
  padding: 10px 22px;
  border-radius: 3px;
  font-weight: 700;
  font-size: 15px;
  cursor: pointer;
  transition: background .2s;
}
.query-box .buttons:hover,
.query-box input[type="submit"]:hover { background: var(--azul-hover); }
.query-note {
  text-align: center;
  color: var(--texto-claro);
  font-size: 15px;
  margin-top: 10px;
}

/* ===== Responsive ===== */
@media (max-width: 900px) {
  .sp-megamenu-parent { display: none; flex-direction: column; }
  .sp-megamenu-wrapper.open .sp-megamenu-parent { display: flex; }
  .menu-toggle { display: block; }
  .sp-megamenu-parent .sp-dropdown {
    position: static; opacity: 1; visibility: visible;
    transform: none; box-shadow: none; border: 0; border-left: 3px solid var(--azul);
    margin-left: 10px;
  }
  .sp-contact-info { display: none; }
  .sp-search input { min-width: 140px; }
}