/* ===========================
   0: HOME: LAYOUT GENERAL
   =========================== */

.content {
  max-width: var(--content-max, 1120px);
  margin: 24px auto 40px;
  padding: 0 16px 40px;
}

/* Tarjeta base para secciones de la home */
.home-hero,
.home-section {
  background: var(--panel);
  border-radius: var(--radius, 14px);
  padding: 20px 20px 18px;
  box-shadow: var(--panel-surf-shadow);
  border: 1px solid var(--panel-surf-border);
  margin-bottom: 20px;
}

/* Layout de 2 columnas: contenido + dashboard */
.home-layout {
  display: flex;
  align-items: flex-start;
  gap: 20px;
}

.home-main {
  flex: 1 1 auto;
}

.home-aside {
  flex: 0 0 280px;   /* ancho fijo aproximado para el panel derecho */
}

/* ===========================
   1: NOTIFAST (BANNER SUPERIOR)
   =========================== */

.notifbar-wrapper {
  max-width: var(--content-max, 1120px);
  margin: 12px auto 0;
  padding: 0 16px;            /* mismo padding lateral que .content */
}

.notifbar {
  padding: 10px 14px;

  background: var(--panel);
  border-radius: 12px;
  border: 1px solid var(--panel-surf-border);
  box-shadow: var(--panel-surf-shadow);

  display: flex;
  align-items: center;
  gap: 10px;

  font-size: 13px;
  color: var(--muted, #9fb0d0);
}

.notifbar-pill {
  width: 28px;
  height: 28px;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;

  /* Color ahora lo definimos por tipo (tip / law) */
  background: transparent;
  color: var(--text);
}

/* TIP RÁPIDO (turquesa) */
.notifbar-pill--tip {
  background: rgba(0, 209, 255, 0.12);
  color: var(--brand, #00d1ff);
}

/* LEY RÁPIDA (amarillo/ámbar) */
.notifbar-pill--law {
  background: rgba(250, 204, 21, 0.22); /* #facc15 con transparencia */
  color: #e6b800;
}



.notifbar-pill i {
  font-size: 14px;
}

.notifbar-text strong {
  color: var(--text-strong, #f5f7ff);
  margin-right: 4px;
}


/* Que el texto se mantenga en UNA línea con "..." si es largo */
.notifbar-text {
  flex: 1;
  min-width: 0;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}

/* Controles (chevron izq/der) */
.notifbar-controls {
  display: flex;
  align-items: center;
  gap: 4px;
  margin-left: 8px;
  flex-shrink: 0;
}

.notif-btn {
  width: 24px;
  height: 24px;
  border-radius: 999px;
  border: none;
  padding: 0;

  display: inline-flex;
  align-items: center;
  justify-content: center;

  background: transparent;
  color: var(--muted, #9fb0d0);
  cursor: pointer;

  transition:
    background 0.15s ease,
    color 0.15s ease,
    transform 0.1s ease;
}

.notif-btn i {
  font-size: 12px;
}

.notif-btn:hover {
  background: var(--hover);
  color: var(--text);
  transform: translateY(-1px);
}

.notif-btn:focus-visible {
  outline: 2px solid var(--brand);
  outline-offset: 2px;
}

/* Si en algún momento queremos ocultar controles (ej: solo 1 tip) */
.notifbar-controls.is-hidden {
  display: none;
}

/* Enlace "Leer más" dentro del texto */
.notifbar-more {
  margin-left: 8px;
  font-size: 12px;
  font-weight: 500;
  color: var(--brand, #00d1ff);
  text-decoration: underline;
  cursor: pointer;
  white-space: nowrap;
  display: none;
}

.notifbar-more:hover {
  text-decoration: none;
}

/* Contenedor interno para animar el texto */
.notifbar-text-inner {
  display: inline-block;
}

/* Estados de animación */
.notif-slide-out-next {
  animation: notifSlideOutNext 0.22s ease forwards;
}
.notif-slide-in-next {
  animation: notifSlideInNext 0.22s ease forwards;
}

.notif-slide-out-prev {
  animation: notifSlideOutPrev 0.22s ease forwards;
}
.notif-slide-in-prev {
  animation: notifSlideInPrev 0.22s ease forwards;
}

/* Keyframes para siguiente (sale hacia la izq, entra desde la der) */
@keyframes notifSlideOutNext {
  to {
    transform: translateX(-16px);
    opacity: 0;
  }
}
@keyframes notifSlideInNext {
  from {
    transform: translateX(16px);
    opacity: 0;
  }
  to {
    transform: translateX(0);
    opacity: 1;
  }
}

/* Keyframes para anterior (sale hacia la der, entra desde la izq) */
@keyframes notifSlideOutPrev {
  to {
    transform: translateX(16px);
    opacity: 0;
  }
}
@keyframes notifSlideInPrev {
  from {
    transform: translateX(-16px);
    opacity: 0;
  }
  to {
    transform: translateX(0);
    opacity: 1;
  }
}


/* ===========================
   2: HERO / BIENVENIDA
   =========================== */

.home-hero-header {
  margin-bottom: 16px;
}

.home-title {
  font-size: 28px;
  line-height: 1.25;
  color: var(--text-strong, #f5f7ff);
  margin: 0 0 6px;
}

.home-subtitle {
  margin: 0;
  font-size: 15px;
  color: var(--muted, #9fb0d0);
}

.home-hero-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px 14px;
  margin-top: 20px;
}

.home-hero-secondary {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

/* Botones reutilizables */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 8px 16px;
  border-radius: 999px;
  font-size: 14px;
  border: 1px solid transparent;
  cursor: pointer;
  text-decoration: none;
  white-space: nowrap;
  transition:
    background 0.15s ease,
    color 0.15s ease,
    border-color 0.15s ease,
    transform 0.1s ease;
}

/* Hacer que el botón principal destaque un poco más */
.btn-primary {
  background: var(--brand, #00d1ff);
  color: #021019;
  font-weight: 600;
  padding-inline: 20px;
  box-shadow: 0 8px 18px rgba(0, 209, 255, 0.25);
}


.btn-primary:hover {
  transform: translateY(-1px);
  box-shadow: 0 10px 22px rgba(0, 209, 255, 0.35);
}

.btn-ghost {
  background: transparent;
  color: var(--text, #dbe5ff);
  border-color: var(--border, rgba(255,255,255,.1));
}

.btn-ghost:hover {
  background: var(--hover, rgba(255,255,255,.06));
}

.btn i {
  font-size: 16px;
}

.home-meta {
  margin-top: 10px;
  font-size: 12px;
  color: var(--muted, #9fb0d0);
}

/* ===========================
   2.1: SECCIONES GENERALES
   =========================== */

.home-section-header {
  margin-bottom: 14px;
}

.home-section-title {
  margin: 0 0 4px;
  font-size: 18px;
  color: var(--text-strong, #f5f7ff);
}

.home-section-subtitle {
  margin: 0;
  font-size: 14px;
  color: var(--muted, #9fb0d0);
}

/* ===========================
   3: ACCESO A LOS BAÑOS
   =========================== */

.access-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 12px;
  margin-top: 10px;
}

/* Tarjeta base */
.access-card {
  border-radius: 12px;
  padding: 16px 14px 18px;

  display: flex;
  flex-direction: column;
  gap: 8px;

  text-align: center;

  /* base neutra muy suave (para que el tinte de color se note) */
  background: var(--panel-2, #f3f4f8);
  border: 1px solid transparent;

  /* animaciones suaves */
  transition:
    transform 0.15s ease-out,
    box-shadow 0.15s ease-out,
    border-color 0.15s ease-out,
    background 0.15s ease-out;
}

/* Hover general de las tarjetas */
.access-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 18px rgba(0, 0, 0, 0.12);
}

/* Variaciones por tipo: fondo pastel + borde de color fuerte */
.access-card--blue {
  background: none;   /* pastel MUY suave */
  border-color: rgba(53, 137, 202, 0.75);
}


.access-card--green {
  background: none;
  border-color: rgba(85, 206, 54, 0.75);
}


.access-card--orange {
  background: none;
  border-color: rgba(242, 148, 22, 0.8);
}


.access-card--blue,
.access-card--green,
.access-card--orange {
  border-width: 1.6px; /* o 2px si quieres más impacto */
}



/* Contenedor del icono */
.access-icon {
  width: 80px;
  height: 80px;
  margin: 0 auto 8px;

  display: flex;
  align-items: center;
  justify-content: center;
}

/* Imagen SVG dentro */
.access-icon-img {
  width: 100%;
  height: 100%;
  display: block;
}

.access-title {
  margin: 0;
  font-size: 15px;
  font-weight: 600;
  color: var(--text, #101320);
}

.access-desc {
  margin: 0;
  font-size: 13px;
  line-height: 1.45;
  color: var(--muted, #6f809d);
}


/* ===========================
   4: CARACTERÍSTICAS DEL BAÑO
   =========================== */

.features-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  column-gap: 40px;   /* separación entre columnas */
  row-gap: 18px;      /* separación entre filas */
  margin-top: 14px;
}

/* Cada característica (icono + texto) */
.feature-item {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding-block: 4px;   /* un poco de aire arriba/abajo */
}

/* Emoji / icono */
.feature-icon {
  font-size: 26px;
  line-height: 1;
  margin-top: 3px;      /* baja un poco el icono para alinearlo al título */
}

/* Bloque de texto */
.feature-body {
  flex: 1;
}

/* Título de la característica */
.feature-title {
  margin: 0;
  font-size: 14px;
  font-weight: 600;
  color: var(--text, #1f2933);
}

/* Descripción corta */
.feature-desc {
  margin: 2px 0 0;
  font-size: 13px;
  line-height: 1.45;
  color: var(--muted, #6b7280);
}




/* ===========================
   5: DASHBOARD: IMPACTO
   =========================== */

.impact-card {
  background: var(--panel);
  border-radius: var(--radius, 14px);
  padding: 16px 16px 14px;
  border: 1px solid var(--panel-surf-border);
  box-shadow: var(--panel-surf-shadow);
}

.impact-header {
  margin-bottom: 10px;
}

.impact-title {
  margin: 0 0 4px;
  font-size: 15px;
  font-weight: 600;
  color: var(--text-strong, #f5f7ff);
}

.impact-subtitle {
  margin: 0;
  font-size: 12px;
  color: var(--muted, #9fb0d0);
}

/* Contenedor de las métricas */
.impact-metrics {
  display: flex;
  flex-direction: column;
  gap: 14px;
  margin-top: 12px;
}

/* Cada métrica: icono + texto + valor en fila */
.impact-metric {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  column-gap: 10px;
}

/* ===== 5: DASHBOARD IMPACTO (ajuste light/dark) ===== */

/* Base: por si algún día no hay data-theme */
.impact-icon {
  width: 42px;
  height: 42px;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;

  /* fallback genérico */
  background: rgba(56, 189, 248, 0.16);
  border: 1px solid rgba(56, 189, 248, 0.55);
  color: #020617; /* icono oscuro por defecto */
}

/* LIGHT MODE: fondo más clarito, icono oscuro */
body[data-theme="light"] .impact-icon {
  background: rgba(56, 189, 248, 0.18);  /* turquesa suave */
  border-color: rgba(56, 189, 248, 0.60);
  color: #020617;                        /* icono casi negro */
}

/* DARK MODE: fondo más oscuro, icono claro */
body[data-theme="dark"] .impact-icon {
  background: rgba(15, 23, 42, 0.95);    /* casi el panel dark */
  border-color: rgba(56, 189, 248, 0.65);
  color: #f9fafb;                        /* icono casi blanco */
}
/* ===== 5: DASHBOARD IMPACTO (ajuste light/dark) ===== */

/* SVG interno (tamaño del ícono) */
.impact-icon-svg {
  width: 50px;
  height: 50px;
  display: block;
  color: var(--text);   /* 🔹 AQUÍ se pinta el icono con el color del tema */
}

/* Texto de la métrica */
.impact-metric-label {
  font-size: 13px;
  color: var(--text, #dbe5ff);
}

.impact-metric-value {
  font-size: 22px;
  font-weight: 700;
  letter-spacing: 0.02em;
  color: var(--text-strong, #f5f7ff);
}

.impact-footnote {
  margin: 10px 0 0;
  font-size: 11px;
  color: var(--muted, #9fb0d0);
}


/* ===========================
   6: FAB "ABRIR MAPA"
   =========================== */

.fab-map {
  position: fixed;
  right: 28px;
  bottom: 28px;
  z-index: 900;

  display: inline-flex;
  align-items: center;
  gap: 8px;

  padding: 10px 18px;
  border-radius: 999px;

  background: var(--brand, #00d1ff);
  color: #041016;
  font-size: 14px;
  font-weight: 600;
  text-decoration: none;

  box-shadow: 0 14px 30px rgba(0, 0, 0, 0.35);
  transition:
    transform 0.18s ease-out,
    box-shadow 0.18s ease-out,
    background 0.18s ease-out,
    color 0.18s ease-out;
}

/* Icono dentro del FAB */
.fab-map-icon {
  width: 26px;
  height: 26px;
  border-radius: 999px;

  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.fab-map-icon i {
  font-size: 16px;
}

/* Hover / focus */
.fab-map:hover,
.fab-map:focus-visible {
  transform: translateY(-2px);
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.45);
}

.fab-map:focus-visible {
  outline: 2px solid #ffffff;
  outline-offset: 3px;
}

/* Respeta usuarios con "reducir movimiento" */
@media (prefers-reduced-motion: reduce) {
  .fab-map {
    transition: none;
  }
}

/* ──────────────────────────
   Responsive: solo icono en móvil
   ────────────────────────── */

@media (max-width: 768px) {
  .fab-map {
    padding: 0;
    width: 60px;
    height: 60px;
    border-radius: 999px;
    justify-content: center;
  }

  .fab-map-label {
    display: none;          /* móvil: sin texto */
  }

  .fab-map-icon {
    width: 30px;
    height: 30px;
    background: rgba(4, 16, 22, 0.10);
  }

  .fab-map-icon i {
    font-size: 16px;
  }
}




/* ===========================
   RESPONSIVE
   =========================== */

@media (max-width: 720px) {
  .home-title {
    font-size: 22px;
  }

  .home-hero {
    padding: 16px 14px 16px;
  }

  .home-section {
    padding: 16px 14px 16px;
  }

  .home-hero-actions {
    flex-direction: column;
    align-items: flex-start;
  }

  .home-hero-secondary {
    width: 100%;
    flex-wrap: wrap;
  }

  .btn {
    width: auto;
  }

  .home-layout {
    flex-direction: column;
    gap: 16px;
  }

  .home-aside {
    flex: 0 0 auto;
    width: 100%;
  }

  .impact-card {
    padding: 14px 14px 12px;
  }

  .impact-metric-value {
    font-size: 20px;
  }

  .notifbar {
    margin: 10px 8px 0;
    padding: 9px 10px;
  }
}



/*____________________________________________________________________________________________________________*/
/*                                                /ES/AVISOS/                                                 */
/*____________________________________________________________________________________________________________*/


/* Texto resaltado dentro de avisos */
.page-avisos .notice-highlight {
  background: #facc15;          /* amarillo suave */
  color: #111827;               /* texto oscuro para contraste */
  padding: 0 1px;
  border-radius: 2px;
}

/* ===========================
   /ES/AVISOS – LISTA DE TARJETAS
   =========================== */

/* Contenedor general */
.page-avisos .notices-section {
  max-width: var(--content-max, 1120px);
  margin: 0 auto;
  padding-top: 24px;
}

/* Título + subtítulo */
.page-avisos .notices-header {
  margin-bottom: 20px;
}

.page-avisos .notices-title {
  font-size: 24px;
  font-weight: 600;
  color: var(--text, #dbe5ff);
  margin-bottom: 6px;
}

.page-avisos .notices-subtitle {
  font-size: 13px;
  color: var(--muted, #9fb0d0);
}

/* GRID de tarjetas */
.page-avisos .notices-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr)); /* mismo ancho */
  gap: 16px;

  /* ⬇️ IMPORTANTE: las tarjetas NO se estiran a la altura de la más alta */
  align-items: flex-start;
}


@media (max-width: 1100px) {
  .page-avisos .notices-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 720px) {
  .page-avisos .notices-grid {
    grid-template-columns: 1fr;
  }
}

/* Tarjeta individual */
.page-avisos .notice-card {
  background: var(--panel, #161b22);
  border-radius: 16px;
  border: 1px solid var(--border, rgba(148, 163, 184, 0.4));
  padding: 14px 16px 13px;
  box-shadow: var(--shadow-md);   /* sombra del sistema */

  display: flex;
  flex-direction: column;
  gap: 6px;

  position: relative;  /* ⬅️ para anclar el icono */
  overflow: hidden;    /* ⬅️ por si el icono se sale un poco */
}

/* Badge arriba */
.page-avisos .notice-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 3px 9px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 500;
  color: var(--badge-pill-text, #111827);
}

/* Variantes de badge */
.page-avisos .notice-badge--law {
  background: var(--badge-law-bg);
}

.page-avisos .notice-badge--health {
  background: var(--badge-health-bg);
}

.page-avisos .notice-badge--tip {
  background: var(--badge-tip-bg);
}

.page-avisos .notice-badge i {
  font-size: 12px;
}

/* Título de aviso */
.page-avisos .notice-title {
  font-size: 16px;
  font-weight: 600;
  color: var(--text, #dbe5ff);
  margin-top: 4px;
}

/* Meta y descripción */
.page-avisos .notice-meta {
  font-size: 12px;
  color: var(--muted, #9fb0d0);
}

.page-avisos .notice-desc {
  font-size: 13px;
  color: var(--text, #e5e7eb);
}

/* Link al aviso oficial */
.page-avisos .notice-link {
  margin-top: 4px;
  font-size: 12px;
  color: var(--brand, #00d1ff);
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.page-avisos .notice-link i {
  font-size: 11px;
}

.page-avisos .notice-link:hover {
  text-decoration: underline;
}

/* Estado “sin resultados” */
.page-avisos .notice-empty {
  margin-top: 20px;
  font-size: 13px;
  color: var(--muted, #9fb0d0);
}

