/* Estilos extra para complementar Tailwind sin duplicar utilidades */
.hero-digesto {
  background-image: linear-gradient(120deg, rgba(10, 31, 46, 0.35), rgba(10, 31, 46, 0.7)), url('../img/back2.png');
  background-position: center;
  background-repeat: no-repeat;
  background-size: cover;
}

/* Estado activo para el item de navegacion actual */
.nav-active {
  color: #0b4a6f;
  text-decoration: underline;
  text-underline-offset: 6px;
}

/* Mensajes de validacion del formulario */
.msg-ok {
  display: block;
  background: #dcfce7;
  color: #14532d;
}

.msg-error {
  display: block;
  background: #fee2e2;
  color: #7f1d1d;
}

/* ==========================================================
   INTERRUPTOR CLARO / OSCURO - ESTILO SPEEDTEST
   Mantiene el mismo id #darkToggle usado por el JS.
   ========================================================== */

.dark-toggle {
  position: relative;
  width: 76px;
  height: 38px;
  padding: 0;
  border: 1px solid #cbd5e1;
  border-radius: 9999px;
  background: linear-gradient(180deg, #f8fafc, #e2e8f0);
  box-shadow:
    inset 0 1px 2px rgba(15, 23, 42, 0.08),
    0 5px 14px rgba(15, 23, 42, 0.10);
  cursor: pointer;
  overflow: hidden;
  isolation: isolate;
  transition:
    background .32s ease,
    border-color .32s ease,
    box-shadow .32s ease;
}

.dark-toggle::before,
.dark-toggle::after {
  position: absolute;
  top: 50%;
  z-index: 1;
  transform: translateY(-50%);
  font-size: 14px;
  line-height: 1;
  pointer-events: none;
  transition: opacity .25s ease, transform .32s ease;
}

.dark-toggle::before {
  content: "☀";
  left: 11px;
  color: #d97706;
  opacity: 1;
}

.dark-toggle::after {
  content: "☾";
  right: 11px;
  color: #e2e8f0;
  opacity: .55;
}

.dark-toggle .theme-switch-knob {
  position: absolute;
  top: 4px;
  left: 4px;
  z-index: 2;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: #ffffff;
  box-shadow:
    0 3px 10px rgba(15, 23, 42, .22),
    inset 0 0 0 1px rgba(15, 23, 42, .05);
  transition:
    transform .34s cubic-bezier(.22, 1, .36, 1),
    background .3s ease,
    box-shadow .3s ease;
}

.dark-toggle.is-dark {
  background: linear-gradient(180deg, #182231, #0f172a);
  border-color: #334155;
  box-shadow:
    inset 0 1px 2px rgba(0, 0, 0, .35),
    0 5px 16px rgba(0, 0, 0, .22);
}

.dark-toggle.is-dark .theme-switch-knob {
  transform: translateX(38px);
  background: #f8fafc;
  box-shadow:
    0 3px 12px rgba(0, 0, 0, .40),
    0 0 14px rgba(125, 211, 252, .16);
}

.dark-toggle.is-dark::before {
  opacity: .45;
}

.dark-toggle.is-dark::after {
  opacity: 1;
}

.dark-toggle:hover {
  border-color: #7dd3fc;
}

.dark-toggle:focus-visible {
  outline: none;
  box-shadow:
    0 0 0 3px rgba(56, 189, 248, .20),
    0 5px 16px rgba(15, 23, 42, .16);
}

/* Logos institucionales de alta resolución */
.logo {
  width: auto;
  height: 3rem;
  max-width: 240px;
  object-fit: contain;
  image-rendering: auto;
}

.logo-dark {
  display: block;
}

.logo-light {
  display: none;
}

body.dark .logo-dark {
  display: none;
}

body.dark .logo-light {
  display: block;
}

/* Logo tricolor para la portada */
.hero-logo-tricolor {
  display: block;
  width: min(100%, 560px);
  height: auto;
  object-fit: contain;
  image-rendering: auto;
  filter: drop-shadow(0 18px 30px rgba(0, 0, 0, .16));
}

/* Modo oscuro global */
body.dark {
  background: #1e1e1e !important;
  color: #e5e7eb !important;
}

body.dark header {
  background: rgba(30, 30, 30, 0.96) !important;
  border-color: #3c3c3c !important;
  color: #e2e8f0 !important;
}

body.dark #mobileMenu {
  background: #252526 !important;
  border-color: #3c3c3c !important;
}

body.dark .nav-active {
  color: #7dd3fc;
}

body.dark .rounded-xl,
body.dark .rounded-2xl,
body.dark .admin-card,
body.dark .upload-card,
body.dark .table-card,
body.dark .search-card,
body.dark .result-item,
body.dark .card-flip,
body.dark .notification-dropdown,
body.dark .notification-item,
body.dark .file-block {
  background: #252526 !important;
  color: #e5e7eb !important;
  border-color: #3c3c3c !important;
}

body.dark input,
body.dark select,
body.dark textarea {
  background: #1e1e1e !important;
  color: #e5e7eb !important;
  border-color: #4b4b4b !important;
}

body.dark input::placeholder,
body.dark textarea::placeholder {
  color: #94a3b8 !important;
}

body.dark section#contacto {
  background: #202020 !important;
}

body.dark .bg-white,
body.dark .bg-white\/95,
body.dark .bg-white\/80,
body.dark .bg-\[\#f3f4f6\],
body.dark .bg-\[\#f8fafc\],
body.dark .bg-\[\#dfe2e7\] {
  background: #252526 !important;
}

body.dark .text-slate-900,
body.dark .text-slate-800,
body.dark .text-slate-700,
body.dark .text-slate-600 {
  color: #e5e7eb !important;
}

body.dark .border-slate-300,
body.dark .border-slate-400 {
  border-color: #3c3c3c !important;
}

body.dark .text-brand {
  color: #7dd3fc !important;
}

body.dark .hover\:bg-slate-200:hover {
  background: #2d2d30 !important;
}

body.dark table,
body.dark th,
body.dark td,
body.dark table.dataTable thead th {
  background: #252526 !important;
  color: #e5e7eb !important;
  border-color: #3c3c3c !important;
}


/* ==========================================================
   DIGESTO SANTA MARIA
   SISTEMA DE ANIMACIONES / UI MOTION
   ========================================================== */

/* ---------- Entrada general ---------- */

.reveal {
  opacity: 0;
  transform: translateY(30px);
  transition:
    opacity 0.8s ease,
    transform 0.8s cubic-bezier(0.22, 1, 0.36, 1);
}

.reveal.reveal-visible {
  opacity: 1;
  transform: translateY(0);
}

/* Variantes */

.reveal-left {
  opacity: 0;
  transform: translateX(-40px);
  transition:
    opacity 0.9s ease,
    transform 0.9s cubic-bezier(0.22, 1, 0.36, 1);
}

.reveal-right {
  opacity: 0;
  transform: translateX(40px);
  transition:
    opacity 0.9s ease,
    transform 0.9s cubic-bezier(0.22, 1, 0.36, 1);
}

.reveal-left.reveal-visible,
.reveal-right.reveal-visible {
  opacity: 1;
  transform: translateX(0);
}


/* ==========================================================
   HERO
   ========================================================== */

.hero-digesto {
  position: relative;
  overflow: hidden;
}

/* Zoom extremadamente suave del fondo */

.hero-digesto::before { 
  content: "";
  position: absolute;
  inset: -3%;
  background-image:
    linear-gradient(
      120deg,
      rgba(10, 31, 46, 0.35),
      rgba(10, 31, 46, 0.70)
    ),
    url('../img/back2.png');

  background-position: center;
  background-repeat: no-repeat;
  background-size: cover;

  animation: digestoHeroZoom 18s ease-in-out infinite alternate;

  z-index: -2;
}

@keyframes digestoHeroZoom {

  from {
    transform: scale(1);
  }

  to {
    transform: scale(1.07);
  }

}


/* ---------- Etiqueta institucional ---------- */

.hero-badge {
  opacity: 0;
  transform: translateY(-15px);

  animation:
    heroBadgeIn 0.7s ease forwards;

  animation-delay: 0.15s;
}

@keyframes heroBadgeIn {

  to {
    opacity: 1;
    transform: translateY(0);
  }

}


/* ---------- Título ---------- */

.hero-title {
  opacity: 0;
  transform: translateY(28px);

  animation:
    heroTitleIn 0.9s cubic-bezier(0.22, 1, 0.36, 1) forwards;

  animation-delay: 0.30s;
}

@keyframes heroTitleIn {

  to {
    opacity: 1;
    transform: translateY(0);
  }

}


/* ---------- Descripción ---------- */

.hero-description {
  opacity: 0;
  transform: translateY(22px);

  animation:
    heroDescriptionIn 0.9s cubic-bezier(0.22, 1, 0.36, 1) forwards;

  animation-delay: 0.48s;
}

@keyframes heroDescriptionIn {

  to {
    opacity: 1;
    transform: translateY(0);
  }

}


/* ---------- Botones del Hero ---------- */

.hero-actions {
  opacity: 0;
  transform: translateY(22px);

  animation:
    heroActionsIn 0.9s cubic-bezier(0.22, 1, 0.36, 1) forwards;

  animation-delay: 0.65s;
}

@keyframes heroActionsIn {

  to {
    opacity: 1;
    transform: translateY(0);
  }

}


/* ==========================================================
   LOGO CONCEJO
   ========================================================== */

.hero-logo {
  opacity: 0;
  transform:
    translateX(50px)
    scale(0.90);

  animation:
    heroLogoIn 1.2s cubic-bezier(0.22, 1, 0.36, 1) forwards,
    heroLogoFloat 5s ease-in-out 1.4s infinite;

}

@keyframes heroLogoIn {

  to {
    opacity: 1;
    transform:
      translateX(0)
      scale(1);
  }

}

@keyframes heroLogoFloat {

  0%,
  100% {
    transform: translateY(0);
  }

  50% {
    transform: translateY(-9px);
  }

}


/* ==========================================================
   BOTONES
   ========================================================== */

.motion-button {
  position: relative;
  overflow: hidden;

  transition:
    transform 0.25s ease,
    box-shadow 0.25s ease,
    filter 0.25s ease;
}

.motion-button:hover {
  transform: translateY(-3px);
  box-shadow:
    0 12px 25px rgba(15, 23, 42, 0.22);
}

.motion-button:active {
  transform: translateY(-1px) scale(0.98);
}


/* brillo al pasar el mouse */

.motion-button::after {
  content: "";
  position: absolute;

  top: 0;
  left: -80%;

  width: 35%;
  height: 100%;

  background: linear-gradient(
    90deg,
    transparent,
    rgba(255, 255, 255, 0.28),
    transparent
  );

  transform: skewX(-20deg);

  transition: left 0.55s ease;

  pointer-events: none;
}

.motion-button:hover::after {
  left: 130%;
}


/* ==========================================================
   ACCESOS RAPIDOS
   ========================================================== */

.quick-access-card {
  transition:
    transform 0.3s cubic-bezier(0.22, 1, 0.36, 1),
    box-shadow 0.3s ease;
}

.quick-access-card:hover {
  transform: translateY(-5px);
  box-shadow:
    0 18px 35px rgba(15,23,42,0.15);
}


.quick-link {

  position: relative;

  transition:
    transform 0.25s ease,
    border-color 0.25s ease,
    box-shadow 0.25s ease;

}

.quick-link:hover {

  transform: translateX(6px);

  box-shadow:
    0 7px 18px rgba(15,23,42,0.10);

}


/* flecha */

.quick-link::after {

  content: "→";

  position: absolute;

  right: 16px;

  opacity: 0;

  transform: translateX(-8px);

  transition:
    opacity 0.25s ease,
    transform 0.25s ease;

}

.quick-link:hover::after {

  opacity: 1;

  transform: translateX(0);

}


/* ==========================================================
   TARJETAS DE NOVEDADES
   ========================================================== */

.news-card {

  transition:
    transform 0.3s cubic-bezier(0.22, 1, 0.36, 1),
    box-shadow 0.3s ease,
    border-color 0.3s ease;

}

.news-card:hover {

  transform: translateY(-7px);

  border-color: #38bdf8;

  box-shadow:
    0 18px 32px rgba(15,23,42,0.14);

}


/* ==========================================================
   HEADER
   ========================================================== */

header {

  transition:
    box-shadow 0.3s ease,
    background-color 0.3s ease,
    border-color 0.3s ease;

}

header.header-scrolled {

  box-shadow:
    0 8px 30px rgba(15,23,42,0.12);

}


/* navegación */

[data-nav] {

  transition:
    color 0.2s ease,
    transform 0.2s ease;

}

[data-nav]:hover {

  transform: translateY(-1px);

}


/* ==========================================================
   DARK MODE
   ========================================================== */

body.dark .quick-access-card,
body.dark .news-card {

  box-shadow:
    0 10px 25px rgba(0,0,0,0.28);

}

body.dark .quick-access-card:hover,
body.dark .news-card:hover {

  box-shadow:
    0 18px 38px rgba(0,0,0,0.40);

}


/* ==========================================================
   ACCESIBILIDAD
   Si Windows / navegador tiene reducción de movimiento
   ========================================================== */

@media (prefers-reduced-motion: reduce) {

  *,
  *::before,
  *::after {

    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;

    transition-duration: 0.01ms !important;

    scroll-behavior: auto !important;

  }

  .reveal,
  .reveal-left,
  .reveal-right {

    opacity: 1 !important;
    transform: none !important;

  }

} 
 
/* ==========================================================
   INTEGRACION HEADER + HERO EN MODO OSCURO
   ========================================================== */

body.dark header {
  background: rgba(15, 23, 42, 0.82) !important;
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
}

/* Suaviza la unión visual entre header y hero */
body.dark .hero-digesto {
  box-shadow: inset 0 45px 45px -45px rgba(15, 23, 42, 0.75);
}

/* Menú desplegable oscuro */
body.dark header .group ul {
  background: rgba(30, 41, 59, 0.98) !important;
  border-color: rgba(148, 163, 184, 0.25) !important;
} 
 
/* ==========================================================
   FIX MENU INSTITUCIONAL - DARK MODE
   ========================================================== */

body.dark header nav .group > ul {
  background: #252526 !important;
  border-color: #3c3c3c !important;
  color: #e5e7eb !important;
  box-shadow: 0 14px 35px rgba(0, 0, 0, 0.45) !important;
}

body.dark header nav .group > ul a {
  color: #e5e7eb !important;
  background: transparent !important;
}

body.dark header nav .group > ul a:hover {
  background: #333337 !important;
  color: #7dd3fc !important;
} 
 
/* FIX DEFINITIVO - eliminar destello de botones */
.motion-button::after,
.motion-button:hover::after,
.motion-button:focus::after,
.motion-button:active::after {
  content: none !important;
  display: none !important;
} 
 
/* ==========================================================
   DIGESTO - BUSCADOR PUBLICO
   ========================================================== */

/* ---------- Entrada del buscador ---------- */

.search-entrance {
  animation: searchEntrance 0.8s cubic-bezier(0.22, 1, 0.36, 1) both;
}

@keyframes searchEntrance {
  from {
    opacity: 0;
    transform: translateY(28px) scale(0.985);
  }

  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}


/* ---------- Tarjeta principal ---------- */

.search-card {
  transition:
    transform 0.3s cubic-bezier(0.22, 1, 0.36, 1),
    box-shadow 0.3s ease,
    border-color 0.3s ease;
}

.search-card:hover {
  box-shadow: 0 18px 38px rgba(15, 23, 42, 0.14);
}


/* ---------- Inputs ---------- */

.search-card input,
.search-card select {
  transition:
    border-color 0.2s ease,
    box-shadow 0.2s ease,
    transform 0.2s ease;
}

.search-card input:focus,
.search-card select:focus {
  border-color: #0b4a6f;
  box-shadow: 0 0 0 3px rgba(11, 74, 111, 0.12);
}


/* ==========================================================
   BOTON BUSCAR
   ========================================================== */

.search-submit {
  position: relative;
  overflow: hidden;

  transition:
    transform 0.2s ease,
    box-shadow 0.2s ease,
    background-color 0.2s ease;
}

.search-submit:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 22px rgba(11, 74, 111, 0.25);
}

.search-submit:active {
  transform: scale(0.98);
}


/* ==========================================================
   LOADER
   ========================================================== */

.search-loader {
  display: none;
  align-items: center;
  justify-content: center;
  gap: 10px;

  margin-top: 18px;

  color: #0b4a6f;
  font-size: 0.875rem;
  font-weight: 700;
}

.search-loader.active {
  display: flex;
}

.search-spinner {
  width: 22px;
  height: 22px;

  border: 3px solid rgba(11, 74, 111, 0.20);
  border-top-color: #0b4a6f;
  border-radius: 50%;

  animation: digestoSpinner 0.75s linear infinite;
}

@keyframes digestoSpinner {
  to {
    transform: rotate(360deg);
  }
}


/* ==========================================================
   RESULTADOS
   ========================================================== */

.results-title {
  animation: resultsTitleIn 0.55s ease both;
}

@keyframes resultsTitleIn {
  from {
    opacity: 0;
    transform: translateY(15px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}


.result-item {
  opacity: 0;
  transform: translateY(22px);

  animation:
    resultItemIn 0.55s cubic-bezier(0.22, 1, 0.36, 1) forwards;

  transition:
    transform 0.25s ease,
    box-shadow 0.25s ease,
    border-color 0.25s ease;
}

@keyframes resultItemIn {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.result-item:hover {
  transform: translateY(-4px);

  border-color: #7dd3fc;

  box-shadow:
    0 14px 30px rgba(15, 23, 42, 0.14);
}


/* escalonado de resultados */

.result-item:nth-child(1) { animation-delay: 0.05s; }
.result-item:nth-child(2) { animation-delay: 0.10s; }
.result-item:nth-child(3) { animation-delay: 0.15s; }
.result-item:nth-child(4) { animation-delay: 0.20s; }
.result-item:nth-child(5) { animation-delay: 0.25s; }
.result-item:nth-child(6) { animation-delay: 0.30s; }
.result-item:nth-child(7) { animation-delay: 0.35s; }
.result-item:nth-child(8) { animation-delay: 0.40s; }


/* ==========================================================
   BOTONES PDF
   ========================================================== */

.pdf-button {
  transition:
    transform 0.2s ease,
    box-shadow 0.2s ease;
}

.pdf-button:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 18px rgba(11, 74, 111, 0.20);
}

.pdf-button:active {
  transform: scale(0.97);
}


/* ==========================================================
   MODAL PDF ANIMADO
   ========================================================== */

.pdf-modal {
  display: flex !important;
  visibility: hidden;
  opacity: 0;

  align-items: center;
  justify-content: center;

  transition:
    opacity 0.25s ease,
    visibility 0.25s ease;
}

.pdf-modal.open {
  visibility: visible;
  opacity: 1;
}

.pdf-content {
  margin: 0 !important;

  opacity: 0;

  transform:
    translateY(25px)
    scale(0.96);

  transition:
    opacity 0.3s ease,
    transform 0.35s cubic-bezier(0.22, 1, 0.36, 1);
}

.pdf-modal.open .pdf-content {
  opacity: 1;

  transform:
    translateY(0)
    scale(1);
}


/* ---------- Boton cerrar PDF ---------- */

.pdf-close {
  transition:
    transform 0.2s ease,
    background-color 0.2s ease,
    color 0.2s ease;
}

.pdf-close:hover {
  transform: rotate(90deg);
  background: #ef4444;
  color: white;
}


/* ==========================================================
   DARK MODE - BUSCADOR
   ========================================================== */

body.dark .search-loader {
  color: #7dd3fc;
}

body.dark .search-spinner {
  border-color: rgba(125, 211, 252, 0.20);
  border-top-color: #7dd3fc;
}

body.dark .search-card:hover,
body.dark .result-item:hover {
  box-shadow:
    0 18px 38px rgba(0, 0, 0, 0.38);
}

body.dark .search-card input:focus,
body.dark .search-card select:focus {
  border-color: #7dd3fc !important;

  box-shadow:
    0 0 0 3px rgba(125, 211, 252, 0.12);
}


/* ==========================================================
   MOBILE
   ========================================================== */

@media (max-width: 640px) {

  .result-item:hover {
    transform: none;
  }

  .pdf-content {
    width: 100% !important;
    height: 88vh !important;
  }

}


/* ==========================================================
   REDUCIR MOVIMIENTO
   ========================================================== */

@media (prefers-reduced-motion: reduce) {

  .search-entrance,
  .results-title,
  .result-item {
    opacity: 1 !important;
    transform: none !important;
    animation: none !important;
  }

  .search-spinner {
    animation-duration: 1.5s !important;
  }

}
/* ===== ACTUALIDAD INSTITUCIONAL + HERO CLARO/OSCURO ===== */
.hero-digesto { background-image: url('../img/back2.png'); }
.hero-digesto::before { background-image: url('../img/back2.png'); }
.hero-cream-overlay { background: linear-gradient(90deg,rgba(255,248,240,.20),rgba(255,248,240,.04)); pointer-events:none; }
.hero-digesto .hero-copy, body.dark .hero-digesto .hero-copy { color:#17384a; }
.hero-digesto .hero-description, body.dark .hero-digesto .hero-description { color:#435560 !important; }
.hero-digesto .hero-badge, body.dark .hero-digesto .hero-badge { color:#704d3e; background:rgba(255,250,244,.68); border:1px solid rgba(112,77,62,.28); }
.hero-digesto .hero-secondary-button, body.dark .hero-digesto .hero-secondary-button { color:#17384a; background:rgba(255,250,244,.62); border:1px solid rgba(23,56,74,.32); }
.hero-digesto .hero-secondary-button:hover { background:rgba(255,250,244,.90); }
body.dark .hero-digesto { background-color:#00070a; }
body.dark .hero-digesto::before { background-image:linear-gradient(120deg,rgba(0,7,10,.97),rgba(1,18,23,.95)),url('../img/back2.png'); background-blend-mode:multiply; }
body.dark .hero-cream-overlay { background:linear-gradient(90deg,rgba(0,5,8,.55),rgba(1,13,17,.38),rgba(2,22,27,.25)); }
body.dark .hero-digesto .hero-copy { color:#fff; }
body.dark .hero-digesto .hero-description { color:#e2e8f0 !important; }
body.dark .hero-digesto .hero-badge { color:#e0f2fe; background:rgba(15,23,42,.38); border-color:rgba(125,211,252,.32); }
body.dark .hero-digesto .hero-secondary-button { color:#fff; background:rgba(15,23,42,.32); border-color:rgba(255,255,255,.4); }
.actualidad-section { background:#f8f6f2; color:#17384a; }
.actualidad-header { display:flex; align-items:end; justify-content:space-between; flex-wrap:wrap; gap:1.5rem; }
.actualidad-header p { color:#576a74; }
.actualidad-eyebrow { font-size:.75rem; letter-spacing:.18em; font-weight:800; color:#996b4e!important; margin-bottom:.5rem; }
.actualidad-facebook-link { display:inline-flex; align-items:center; justify-content:center; border-radius:12px; padding:12px 18px; background:#17384a; color:white; font-weight:700; transition:transform .2s,background .2s; }
.actualidad-facebook-link:hover { background:#24556b; transform:translateY(-2px); }
.actualidad-grid { display:grid; grid-template-columns:minmax(0,1fr) minmax(0,500px); gap:1.5rem; align-items:stretch; }
.actualidad-feature { position:relative; isolation:isolate; overflow:hidden; border-radius:22px; padding:clamp(26px,5vw,58px); min-height:440px; background:linear-gradient(140deg,#173b4b,#0a222d); color:#fff; display:flex; flex-direction:column; justify-content:center; align-items:flex-start; box-shadow:0 18px 40px rgba(14,35,45,.12); }
.actualidad-chip { font-size:.72rem; font-weight:800; letter-spacing:.13em; padding:8px 12px; border:1px solid rgba(255,255,255,.32); border-radius:999px; }
.actualidad-feature h3 { font-size:clamp(1.7rem,3vw,2.5rem); line-height:1.12; font-weight:850; margin:24px 0 16px; max-width:480px; }
.actualidad-feature p { max-width:480px; line-height:1.8; color:#d9e6ec; }
.actualidad-feature a { display:inline-block; color:#f6d5a8; margin-top:28px; font-weight:750; }
.actualidad-feature a:hover { text-decoration:underline; }
.actualidad-feature-decoration { position:absolute; z-index:-1; right:-15px; bottom:-75px; font-size:210px; font-weight:900; letter-spacing:-.1em; color:rgba(255,255,255,.035); pointer-events:none; }
.actualidad-feed { background:white; border:1px solid #e5e5e5; border-radius:22px; padding:18px; display:flex; flex-direction:column; align-items:center; box-shadow:0 18px 40px rgba(14,35,45,.07); min-width:0; }
.actualidad-feed-top { width:100%; display:flex; align-items:center; gap:10px; padding:5px 3px 16px; font-size:.94rem; }
.actualidad-live-dot { width:9px; height:9px; border-radius:50%; background:#1877f2; flex-shrink:0; }
.actualidad-source { margin-left:auto; font-size:.75rem; color:#64748b; }
.actualidad-feed iframe { display:block; max-width:100%; }
.actualidad-feed-note { text-align:center; font-size:.8rem; color:#64748b; margin-top:12px; }
.actualidad-feed-note a { text-decoration:underline; color:#14577b; }
.actualidad-disclaimer { color:#6b7280; font-size:.82rem; margin-top:18px; }
body.dark .actualidad-section { background:#071116; color:#e5eef2; }
body.dark .actualidad-header p { color:#a9bbc5; }
body.dark .actualidad-eyebrow { color:#c9a58d!important; }
body.dark .actualidad-facebook-link { background:#16445b; color:#fff; }
body.dark .actualidad-feature { background:linear-gradient(145deg,#071b24,#010a0e); border:1px solid #173340; }
body.dark .actualidad-feed { background:#0b1b23; border-color:#1b3744; color:#e5eef2; }
body.dark .actualidad-source,body.dark .actualidad-feed-note,body.dark .actualidad-disclaimer { color:#a9bbc5; }
body.dark .actualidad-feed-note a { color:#9bd8f4; }
@media(max-width:900px) { .actualidad-grid { grid-template-columns:1fr; } .actualidad-feature { min-height:340px; } }
@media(max-width:550px) { .actualidad-feed { padding:10px; } .actualidad-source { display:none; } .actualidad-feature { padding:26px; } }

/* Noticias institucionales propias */
.noticias-digesto-section{padding:64px 20px;background:#f5eee6;color:#173443}
.noticias-digesto-container{max-width:1200px;margin:auto}.noticias-digesto-container>h2{font-size:clamp(1.7rem,4vw,2.5rem);font-weight:800;margin:8px 0}.noticias-digesto-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(min(100%,300px),1fr));gap:22px;margin-top:28px}
.noticia-digesto-card{overflow:hidden;border:1px solid #d8d2ca;border-radius:18px;background:#fff;box-shadow:0 8px 22px #0000000d}.noticia-digesto-img{display:block;width:100%;height:210px;object-fit:cover}.noticia-digesto-body{padding:22px}.noticia-digesto-tag{font-size:11px;font-weight:800;letter-spacing:.08em;color:#8c593a}.noticia-digesto-body h3{font-size:1.25rem;font-weight:800;margin:10px 0}.noticia-digesto-body p{line-height:1.6}.noticia-digesto-body small{display:block;margin:12px 0;color:#67747c}.noticia-digesto-body a{color:#09617b;font-weight:700;text-decoration:underline}.noticias-vacio{padding:22px;background:#fff;border-radius:12px}
body.dark .noticias-digesto-section{background:#061217;color:#e4edf0}body.dark .noticia-digesto-card,body.dark .noticias-vacio{background:#10252c;border-color:#29434b;color:#e4edf0}body.dark .noticia-digesto-body small{color:#a9bbc1}body.dark .noticia-digesto-body a{color:#80d6e8}

/* Noticias: formato fotográfico institucional 4:3, sin recorte */
.noticia-digesto-img {
  width: 100%;
  height: auto;
  aspect-ratio: 4 / 3;
  object-fit: contain;
  object-position: center;
  background: #eee7de;
}
body.dark .noticia-digesto-img { background: #0b1a20; }

/* Enlaces a noticias completas */
.noticia-digesto-photo-link{display:block;overflow:hidden}
.noticia-digesto-title-link{color:inherit!important;text-decoration:none!important}
.noticia-digesto-title-link:hover{text-decoration:underline!important}
.noticia-digesto-read{display:inline-block;margin-top:6px}
.noticia-digesto-photo-link:focus-visible,.noticia-digesto-title-link:focus-visible,.noticia-digesto-read:focus-visible{outline:3px solid #d89d49;outline-offset:3px}

/* CIVI - Avatar de presentación institucional */
.civi-avatar-presentacion {
    display: flex;
    justify-content: center;
    align-items: center;
    margin: 20px 0;
}

.civi-avatar-presentacion img {
    display: block;
    width: min(100%, 240px);
    height: auto;
    object-fit: contain;
    filter: drop-shadow(0 12px 28px rgba(0, 191, 255, 0.18));
}

@media (max-width: 768px) {
    .civi-avatar-presentacion img {
        width: min(100%, 190px);
    }
}


/* CIVI - Ilustración de presentación */
.civi-preview-features {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.civi-preview-container > .civi-avatar-presentacion {
    grid-column: 2;
    grid-row: 1;
    margin: 0 auto 18px;
}

.civi-preview-container > .civi-avatar-presentacion img {
    width: min(100%, 320px);
    height: auto;
}

@media (max-width: 768px) {
    .civi-preview-container > .civi-avatar-presentacion {
        grid-column: 1;
        grid-row: auto;
    }

    .civi-preview-container > .civi-avatar-presentacion img {
        width: min(100%, 260px);
    }
}


/* ==========================================
   DIGESTO - CORRECCIÓN FONDO BEIGE
   ========================================== */

/* Base beige institucional */
body:not(.dark) .hero-digesto {
    background: #F2E8D8 !important;
}

/* Trama original, ahora tenue y en tonos cálidos */
body:not(.dark) .hero-digesto::before {
    content: "";
    position: absolute;
    inset: 0;
    background-image: url('../img/back2.png') !important;
    background-size: cover;
    background-position: center;
    opacity: 0.10 !important;
    filter: sepia(1) saturate(0.45) !important;
    pointer-events: none;
    z-index: 0;
}

/* Capa cálida uniforme */
body:not(.dark) .hero-cream-overlay {
    background: rgba(242, 232, 216, 0.18) !important;
    pointer-events: none;
    z-index: 1;
}

/* Contenido por encima de la trama */
body:not(.dark) .hero-digesto > .relative {
    position: relative;
    z-index: 2;
}

