/* =========================================================
   Página de inicio — Trámites y servicios
   Usa también styles.css para el encabezado, el modal y los botones.
   ========================================================= */

body { background: #f4f6f8; }

.home-main {
  max-width: 1040px;
  margin: 0 auto;
  padding: 26px 20px 60px;
}

.home-title {
  margin: 6px 0 14px;
  text-align: center;
  font-size: clamp(26px, 6vw, 40px);
  font-weight: 700;
  color: #1f5fb0;
  letter-spacing: .3px;
}
.home-regla {
  height: 4px;
  margin: 0 auto 28px;
  max-width: 940px;
  background: #1f5fb0;
  border-radius: 2px;
}

.home-intro {
  max-width: 720px;
  margin: 0 auto 26px;
  text-align: center;
  font-size: clamp(14px, 3.8vw, 15.5px);
  color: #42566b;
  line-height: 1.6;
}

/* ---- Rejilla de servicios (responsive) ---- */
.grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 20px 12px;
  max-width: 880px;
  margin: 0 auto;
}
@media (min-width: 540px) {
  .grid { grid-template-columns: repeat(3, 1fr); gap: 24px 14px; }
}
@media (min-width: 768px) {
  .grid { grid-template-columns: repeat(4, 1fr); gap: 30px 18px; }
}

.servicio {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
  padding: 16px 8px;
  border: 0;
  border-radius: 16px;
  background: #ffffff;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.04);
  color: #0b4f8a;
  font: inherit;
  text-align: center;
  text-decoration: none;
  cursor: pointer;
  min-height: 140px;
  transition: background .15s, transform .15s, box-shadow .15s;
}
.servicio:hover {
  background: #ffffff;
  transform: translateY(-4px);
  box-shadow: 0 8px 20px rgba(11, 79, 138, 0.12);
}
.servicio:active { transform: translateY(0); }

.servicio .ico {
  display: grid;
  place-items: center;
  width: clamp(70px, 18vw, 105px);
  height: clamp(70px, 18vw, 105px);
}
.servicio svg {
  width: 100%;
  height: 100%;
  fill: none;
  stroke: #0b1622;
  stroke-width: 4;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.servicio .etq {
  font-size: clamp(13.5px, 3.6vw, 17.5px);
  font-weight: 700;
  line-height: 1.25;
  color: #0b4f8a;
}

/* Servicios activos */
.servicio.activa .ico { position: relative; }
.servicio.activa .ico::after {
  content: "";
  position: absolute;
  inset: auto 0 -6px 0;
  height: 3px;
  margin: 0 auto;
  width: 38px;
  border-radius: 2px;
  background: #1f5fb0;
  opacity: .0;
  transition: opacity .15s;
}
.servicio.activa:hover .ico::after { opacity: 1; }

/* Servicios muestra */
.servicio.muestra { color: #4a6076; }
.servicio.muestra .etq { color: #4a6076; }
.servicio.muestra svg { stroke: #33424f; opacity: .78; }

/* ---- BANNER CONSULTA (CON SVG Y RESPONSIVE) ---- */
.banner-consulta {
  display: flex;
  align-items: center;
  gap: 20px;
  margin: 44px 0;
  padding: 24px 28px;
  border-radius: 18px;
  background: linear-gradient(135deg, #0b3f73 0%, #1d5fa0 100%);
  color: #ffffff;
  box-shadow: 0 8px 24px rgba(11, 63, 115, 0.18);
}
.banner-icon {
  flex: none;
  background: rgba(255, 255, 255, 0.15);
  width: 58px;
  height: 58px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  color: #ffffff;
}
.banner-content { flex: 1; }
.banner-content h3 {
  margin: 0 0 6px;
  font-size: clamp(17px, 4.5vw, 20px);
  font-weight: 700;
  letter-spacing: 0.2px;
}
.banner-content p {
  margin: 0;
  font-size: clamp(13.5px, 3.5vw, 14.5px);
  opacity: 0.92;
  line-height: 1.5;
}
.btn-banner {
  flex: none;
  padding: 12px 22px;
  border: 0;
  border-radius: 10px;
  background: #ffffff;
  color: #0b3f73;
  font: inherit;
  font-weight: 700;
  font-size: 15px;
  cursor: pointer;
  min-height: 44px;
  transition: background 0.15s, transform 0.1s;
}
.btn-banner:hover { background: #eef4fd; transform: translateY(-1px); }

@media (max-width: 768px) {
  .banner-consulta {
    flex-direction: column;
    text-align: center;
    padding: 24px 20px;
  }
  .banner-icon { margin: 0 auto; }
  .btn-banner { width: 100%; max-width: 280px; margin-top: 4px; }
}

/* ---- SECCIONES GENERALES DE INICIO ---- */
.home-seccion {
  margin: 48px 0;
}
.seccion-header {
  margin-bottom: 22px;
}
.subtitulo-seccion {
  display: block;
  font-size: 12.5px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1.2px;
  color: #1f5fb0;
}
.titulo-seccion {
  margin: 4px 0 0;
  font-size: clamp(20px, 5vw, 24px);
  font-weight: 700;
  color: #162e44;
}

/* ---- TARJETAS DE NOTICIAS ---- */
.noticias-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 20px;
}
@media (min-width: 640px) {
  .noticias-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (min-width: 960px) {
  .noticias-grid { grid-template-columns: repeat(3, 1fr); }
}

.noticia-card {
  display: flex;
  flex-direction: column;
  background: #ffffff;
  border-radius: 16px;
  padding: 22px;
  border: 1px solid #e1e7ee;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.03);
  transition: transform 0.15s, box-shadow 0.15s;
}
.noticia-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.08);
}
.badge-tag {
  align-self: flex-start;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  padding: 4px 10px;
  border-radius: 6px;
  letter-spacing: 0.6px;
}
.tar-verde { background: #e3f4ec; color: #068460; }
.tar-azul { background: #e5eefb; color: #1d4f7c; }
.tar-amarillo { background: #fff4d6; color: #8a6400; }

.noticia-fecha {
  font-size: 12.5px;
  color: #788a9c;
  margin: 10px 0 6px;
}
.noticia-card h4 {
  margin: 0 0 10px;
  font-size: clamp(16px, 4vw, 17.5px);
  color: #14365a;
  line-height: 1.4;
}
.noticia-card p {
  margin: 0 0 16px;
  font-size: 14px;
  color: #4f6377;
  line-height: 1.55;
  flex: 1;
}
.noticia-link {
  align-self: flex-start;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  border: 0;
  background: none;
  padding: 0;
  color: #1f5fb0;
  font: inherit;
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
  min-height: 36px;
}
.noticia-link:hover { text-decoration: underline; }
.noticia-link svg { transition: transform 0.15s; }
.noticia-link:hover svg { transform: translateX(3px); }

/* ---- CANALES DE ATENCIÓN (CON SVG) ---- */
.canales-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 20px;
}
@media (min-width: 580px) {
  .canales-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (min-width: 880px) {
  .canales-grid { grid-template-columns: repeat(3, 1fr); }
}

.canal-card {
  background: #ffffff;
  border-radius: 16px;
  padding: 24px 20px;
  border: 1px solid #e1e7ee;
  text-align: center;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.03);
  display: flex;
  flex-direction: column;
  align-items: center;
}
.canal-ico {
  width: 54px;
  height: 54px;
  background: #e5eefb;
  color: #1f5fb0;
  border-radius: 50%;
  display: grid;
  place-items: center;
  margin-bottom: 14px;
}
.canal-card h4 {
  margin: 0 0 10px;
  font-size: 18px;
  color: #14365a;
}
.canal-card p {
  margin: 0 0 16px;
  font-size: 14px;
  color: #4f6377;
  line-height: 1.55;
  flex: 1;
}
.canal-horario {
  display: inline-block;
  font-size: 12.5px;
  font-weight: 600;
  color: #068460;
  background: #e3f4ec;
  padding: 6px 14px;
  border-radius: 20px;
}
.btn-canal {
  width: 100%;
  max-width: 220px;
  padding: 10px 18px;
  border: 1.5px solid #1f5fb0;
  border-radius: 8px;
  background: #ffffff;
  color: #1f5fb0;
  font: inherit;
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
  min-height: 44px;
  transition: background 0.15s, color 0.15s;
}
.btn-canal:hover {
  background: #1f5fb0;
  color: #ffffff;
}

/* ---- PREGUNTAS FRECUENTES (FAQ ACORDEÓN MEJORADO) ---- */
.faq-container {
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.faq-item {
  background: #ffffff;
  border: 1px solid #e1e7ee;
  border-radius: 12px;
  overflow: hidden;
  transition: border-color 0.15s, box-shadow 0.15s;
}
.faq-item:hover {
  border-color: #b5ceec;
}
.faq-item[open] {
  border-color: #90b2db;
  box-shadow: 0 4px 12px rgba(11, 63, 115, 0.06);
}
.faq-item summary {
  padding: 16px 20px;
  font-size: clamp(14.5px, 4vw, 16px);
  font-weight: 600;
  color: #14365a;
  cursor: pointer;
  list-style: none;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  user-select: none;
  min-height: 52px;
}
.faq-item summary::-webkit-details-marker { display: none; }
.faq-icon {
  flex: none;
  color: #1f5fb0;
  transition: transform 0.2s;
}
.faq-item[open] summary .faq-icon {
  transform: rotate(180deg);
}
.faq-resp {
  padding: 0 20px 18px;
  font-size: 14.5px;
  color: #4f6377;
  line-height: 1.6;
  border-top: 1px solid #f0f4f8;
}
.faq-resp p { margin: 12px 0 0; }

/* ---- FOOTER INSTITUCIONAL ---- */
.home-footer {
  background: #0b2341;
  color: #e5eefb;
  margin-top: 50px;
  padding: 50px 20px 24px;
  font-size: 14px;
}
.footer-inner {
  max-width: 1040px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1fr;
  gap: 32px 24px;
  padding-bottom: 36px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.12);
}
@media (min-width: 480px) {
  .footer-inner { grid-template-columns: repeat(2, 1fr); }
}
@media (min-width: 840px) {
  .footer-inner { grid-template-columns: repeat(4, 1fr); }
}

.footer-col h4 {
  margin: 0 0 16px;
  font-size: 16px;
  color: #ffffff;
  font-weight: 700;
}
.footer-col ul {
  list-style: none;
  padding: 0;
  margin: 0;
}
.footer-col ul li {
  margin-bottom: 10px;
}
.footer-col ul a {
  color: #a3c4f3;
  text-decoration: none;
  display: inline-block;
  padding: 2px 0;
  transition: color 0.15s;
}
.footer-col ul a:hover {
  color: #ffffff;
  text-decoration: underline;
}
.footer-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 14px;
}
.footer-logo .escudo { width: 30px; height: 36px; }
.footer-wordmark {
  font-size: 20px;
  font-weight: 700;
  color: #ffffff;
}
.footer-desc {
  line-height: 1.5;
  color: #b0ccf0;
  margin: 0 0 12px;
}
.footer-dir {
  font-size: 13px;
  color: #8faed9;
  margin: 0;
  line-height: 1.45;
}
.footer-info {
  margin: 0 0 14px;
  line-height: 1.45;
  color: #b0ccf0;
}
.footer-info strong {
  color: #ffffff;
}
.footer-bottom {
  max-width: 1040px;
  margin: 20px auto 0;
  text-align: center;
  font-size: 13px;
  color: #7b9dc7;
  line-height: 1.5;
}
