/* ==========================================================================
   NEXOCOLONIA - CENTRO OFICIAL DE PARTES DE JEFATURA DE POLICÍA DE COLONIA
   Identidad Visual Institucional: Azul Primario, Verde de Acento, Blanco y Grafito
   ========================================================================== */

:root {
  --pol-navy: #071a37;
  --pol-navy-dark: #030e1f;
  --pol-navy-light: #0d2c59;
  --pol-green: #0d7a46;
  --pol-green-bright: #10b981;
  --pol-green-light: #eaf5ee;
  --pol-green-subtle: #f2f7f3;
  --pol-gold: #cb9b51;
  --pol-border: #d7e4dc;
  --pol-border-light: #e8f0ec;
  --pol-text: #1e293b;
  --pol-muted: #526577;
  --pol-radius: 12px;
  --pol-radius-lg: 16px;
  --pol-shadow: 0 4px 20px -2px rgba(7, 26, 55, 0.08);
  --pol-shadow-hover: 0 14px 34px -4px rgba(7, 26, 55, 0.16);
}

/* --------------------------------------------------------------------------
   1. CABECERA INSTITUCIONAL DE JEFATURA
   -------------------------------------------------------------------------- */
.police-hero-section {
  position: relative;
  background: linear-gradient(135deg, #031226 0%, #07264a 55%, #041a35 100%);
  color: #ffffff;
  padding: 3.5rem 0 3rem 0;
  border-bottom: 3px solid var(--pol-green);
  box-shadow: 0 10px 30px rgba(0, 15, 35, 0.35);
  margin-bottom: 2.5rem;
}

.police-hero-section:before {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at 80% 20%, rgba(16, 185, 129, 0.12), transparent 45%),
              radial-gradient(circle at 10% 80%, rgba(7, 103, 223, 0.15), transparent 40%);
  pointer-events: none;
}

.police-hero-inner {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 2.5rem;
  position: relative;
  z-index: 2;
}

/* Logo / Escudo Oficial de Jefatura enviado por el organismo */
.jefatura-logo-container {
  max-width: 380px;
  min-width: 220px;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(255, 255, 255, 0.95);
  border: 1px solid rgba(255, 255, 255, 0.3);
  border-radius: 12px;
  padding: 10px 16px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.3);
  transition: transform 0.3s ease;
}

.jefatura-logo-container:hover {
  transform: scale(1.02);
}

.jefatura-logo-container img {
  width: 100%;
  height: auto;
  max-height: 95px;
  object-fit: contain;
}

.police-hero-info {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

.police-kicker-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  width: fit-content;
  padding: 4px 12px;
  border-radius: 999px;
  background: rgba(16, 185, 129, 0.15);
  border: 1px solid rgba(16, 185, 129, 0.4);
  color: #a7f3d0;
  font-size: 11px;
  font-weight: 900;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.police-kicker-badge span.dot {
  width: 7px;
  height: 7px;
  background: var(--pol-green-bright);
  border-radius: 50%;
  box-shadow: 0 0 8px var(--pol-green-bright);
  animation: pulse 1.8s infinite;
}

.police-hero-title {
  font-family: 'Playfair Display', Georgia, serif;
  font-size: clamp(2rem, 3.5vw, 2.75rem);
  font-weight: 900;
  letter-spacing: -0.02em;
  line-height: 1.15;
  margin: 0;
  color: #ffffff;
}

.police-hero-subtitle {
  color: #cbd5e1;
  font-size: 14.5px;
  margin: 0;
  max-width: 680px;
  line-height: 1.5;
}

/* --------------------------------------------------------------------------
   2. BARRA DE CONTROL Y FILTROS AVANZADOS
   -------------------------------------------------------------------------- */
.police-controls-bar {
  background: #ffffff;
  border: 1px solid var(--pol-border);
  border-radius: var(--pol-radius);
  padding: 1.25rem 1.5rem;
  margin-bottom: 2rem;
  box-shadow: var(--pol-shadow);
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.police-controls-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
}

.police-search-form {
  display: flex;
  align-items: center;
  gap: 8px;
  flex: 1 1 320px;
}

.police-search-input-wrap {
  position: relative;
  flex: 1;
}

.police-search-input-wrap input {
  width: 100%;
  height: 42px;
  padding: 0 1rem 0 2.5rem;
  border: 1px solid var(--pol-border);
  border-radius: 8px;
  background: var(--pol-green-subtle);
  color: var(--pol-navy);
  font-size: 13.5px;
  transition: all 0.2s ease;
}

.police-search-input-wrap input:focus {
  background: #ffffff;
  border-color: var(--pol-green);
  outline: none;
  box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.15);
}

.police-search-icon {
  position: absolute;
  left: 10px;
  top: 50%;
  transform: translateY(-50%);
  color: #94a3b8;
  font-size: 14px;
}

.police-search-btn {
  height: 42px;
  padding: 0 1.25rem;
  border: none;
  border-radius: 8px;
  background: var(--pol-navy);
  color: #ffffff;
  font-weight: 750;
  font-size: 13px;
  cursor: pointer;
  transition: background 0.2s ease;
}

.police-search-btn:hover {
  background: var(--pol-navy-light);
}

/* Conmutador de vista (Lista / Cuadrícula) */
.police-view-switcher {
  display: inline-flex;
  align-items: center;
  background: var(--pol-green-subtle);
  border: 1px solid var(--pol-border);
  border-radius: 8px;
  padding: 3px;
  gap: 2px;
}

.police-view-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 34px;
  padding: 0 12px;
  border: none;
  border-radius: 6px;
  background: transparent;
  color: var(--pol-muted);
  font-size: 12.5px;
  font-weight: 750;
  cursor: pointer;
  transition: all 0.18s ease;
}

.police-view-btn.is-active {
  background: var(--pol-navy);
  color: #ffffff;
  box-shadow: 0 2px 8px rgba(7, 26, 55, 0.2);
}

/* Filtros desplegables secundarios */
.police-filters-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 0.75rem;
  padding-top: 0.75rem;
  border-top: 1px solid var(--pol-border-light);
}

.police-filter-item select,
.police-filter-item input[type="date"] {
  width: 100%;
  height: 38px;
  padding: 0 10px;
  border: 1px solid var(--pol-border);
  border-radius: 6px;
  background: #ffffff;
  color: var(--pol-text);
  font-size: 12.5px;
  cursor: pointer;
}

.police-filter-item select:focus,
.police-filter-item input[type="date"]:focus {
  border-color: var(--pol-green);
  outline: none;
}

/* --------------------------------------------------------------------------
   3. VISTA CUADRÍCULA (GRID VIEW)
   -------------------------------------------------------------------------- */
.police-reports-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
  gap: 1.5rem;
  margin-bottom: 3rem;
}

.police-card {
  position: relative;
  background: #ffffff;
  border: 1px solid var(--pol-border);
  border-radius: var(--pol-radius);
  overflow: hidden;
  box-shadow: var(--pol-shadow);
  display: flex;
  flex-direction: column;
  transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease;
}

/* Borde superior verde de acento institucional */
.police-card:before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: var(--pol-green);
  opacity: 0.85;
  transition: height 0.2s ease, opacity 0.2s ease;
}

.police-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--pol-shadow-hover);
  border-color: rgba(16, 185, 129, 0.45);
}

.police-card:hover:before {
  height: 4px;
  opacity: 1;
}

.police-card-body {
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  flex: 1;
  gap: 0.75rem;
}

.police-card-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  font-size: 11px;
}

.police-badge-official {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 2px 8px;
  border-radius: 4px;
  background: var(--pol-green-light);
  color: var(--pol-green);
  font-weight: 900;
  letter-spacing: 0.06em;
  font-size: 10px;
  text-transform: uppercase;
}

.police-card-number {
  color: var(--pol-navy);
  font-weight: 850;
  font-size: 12px;
}

.police-card-date {
  color: var(--pol-muted);
  font-size: 11px;
}

.police-card-title {
  font-family: 'Playfair Display', Georgia, serif;
  font-size: 1.25rem;
  font-weight: 800;
  color: var(--pol-navy);
  line-height: 1.3;
  margin: 0;
}

.police-card-title a {
  color: inherit;
  text-decoration: none;
  transition: color 0.2s ease;
}

.police-card-title a:hover {
  color: var(--pol-green);
}

.police-card-excerpt {
  color: var(--pol-muted);
  font-size: 13.5px;
  line-height: 1.55;
  margin: 0;
  flex: 1;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.police-card-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  margin-top: 0.5rem;
}

.police-tag-chip {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 8px;
  border-radius: 6px;
  background: var(--pol-green-subtle);
  border: 1px solid var(--pol-border);
  color: var(--pol-navy);
  font-size: 11px;
  font-weight: 700;
}

.police-card-footer {
  padding: 0.85rem 1.5rem;
  background: #fafcfb;
  border-top: 1px solid var(--pol-border-light);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.police-card-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--pol-green);
  font-size: 12.5px;
  font-weight: 800;
  text-decoration: none;
  transition: transform 0.2s ease, color 0.2s ease;
}

.police-card-link:hover {
  color: var(--pol-navy);
  transform: translateX(3px);
}

/* --------------------------------------------------------------------------
   4. VISTA LISTA COMPACTA (LIST VIEW)
   -------------------------------------------------------------------------- */
.police-reports-list {
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
  margin-bottom: 3rem;
}

.police-list-row {
  background: #ffffff;
  border: 1px solid var(--pol-border);
  border-left: 4px solid var(--pol-green);
  border-radius: 8px;
  padding: 1.25rem 1.5rem;
  box-shadow: 0 2px 8px rgba(7, 26, 55, 0.04);
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  gap: 1.5rem;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.police-list-row:hover {
  transform: translateY(-2px);
  box-shadow: var(--pol-shadow);
  border-color: rgba(16, 185, 129, 0.4);
}

.police-list-main {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.police-list-header {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  font-size: 11.5px;
}

.police-list-title {
  font-family: 'Playfair Display', Georgia, serif;
  font-size: 1.15rem;
  font-weight: 800;
  color: var(--pol-navy);
  margin: 0;
}

.police-list-title a {
  color: inherit;
  text-decoration: none;
}

.police-list-title a:hover {
  color: var(--pol-green);
}

.police-list-excerpt {
  color: var(--pol-muted);
  font-size: 13px;
  margin: 0;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* --------------------------------------------------------------------------
   5. PÁGINA INDIVIDUAL DEL PARTE OFICIAL (/policiales/{slug})
   -------------------------------------------------------------------------- */
.police-article-container {
  max-width: 860px;
  margin: 0 auto 4rem auto;
}

.police-doc-frame {
  background: #ffffff;
  border: 1px solid var(--pol-border);
  border-top: 4px solid var(--pol-green);
  border-radius: var(--pol-radius);
  box-shadow: 0 15px 45px rgba(7, 26, 55, 0.08);
  padding: 2.5rem 3rem;
}

.police-doc-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-bottom: 1.5rem;
  border-bottom: 2px solid var(--pol-green-subtle);
  margin-bottom: 2rem;
  gap: 1.5rem;
}

.police-doc-header-logo {
  max-width: 320px;
  height: auto;
}

.police-doc-header-logo img {
  width: 100%;
  height: auto;
  max-height: 85px;
  object-fit: contain;
}

.police-doc-header-info {
  text-align: right;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.police-doc-header-info strong {
  font-size: 13px;
  color: var(--pol-navy);
  letter-spacing: 0.05em;
}

.police-doc-header-info span {
  font-size: 11px;
  color: var(--pol-muted);
}

.police-doc-meta-strip {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 1rem;
}

.police-doc-number-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 12px;
  border-radius: 6px;
  background: var(--pol-navy);
  color: #ffffff;
  font-weight: 800;
  font-size: 12px;
  letter-spacing: 0.04em;
}

.police-doc-title {
  font-family: 'Playfair Display', Georgia, serif;
  font-size: clamp(1.8rem, 3vw, 2.4rem);
  font-weight: 900;
  color: var(--pol-navy);
  line-height: 1.2;
  margin: 0 0 1.25rem 0;
}

.police-doc-excerpt {
  font-size: 1.1rem;
  line-height: 1.6;
  color: #334155;
  padding-left: 1.25rem;
  border-left: 3px solid var(--pol-green);
  margin-bottom: 2rem;
  font-weight: 500;
}
.police-official-source { display: flex; align-items: center; justify-content: space-between; gap: 1.25rem; margin: 0 0 2rem; padding: 1rem 1.15rem; border: 1px solid #b9d9ca; border-left: 4px solid var(--pol-green); border-radius: 10px; background: #f0f9f4; }
.police-official-source span, .police-official-source strong { display: block; }
.police-official-source span { color: #087147; font-size: .62rem; font-weight: 900; letter-spacing: .09em; text-transform: uppercase; }
.police-official-source strong { margin-top: .2rem; color: #173a2d; font-size: .82rem; }
.police-official-source a { flex: 0 0 auto; padding: .65rem .85rem; border-radius: 8px; background: var(--pol-green); color: #fff; font-size: .72rem; font-weight: 850; text-decoration: none; }

/* Reproductor Text-to-Speech */
.police-tts-player {
  background: linear-gradient(135deg, var(--pol-navy), #0b2f5c);
  color: #ffffff;
  border-radius: var(--pol-radius);
  padding: 1.25rem 1.5rem;
  margin-bottom: 2.25rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  box-shadow: 0 8px 24px rgba(7, 26, 55, 0.2);
}

.police-tts-info {
  display: flex;
  align-items: center;
  gap: 12px;
}

.police-tts-btn-play {
  width: 46px;
  height: 46px;
  border-radius: 50%;
  border: none;
  background: var(--pol-green-bright);
  color: #ffffff;
  font-size: 18px;
  display: grid;
  place-items: center;
  cursor: pointer;
  box-shadow: 0 4px 14px rgba(16, 185, 129, 0.4);
  transition: transform 0.2s ease, filter 0.2s ease;
}

.police-tts-btn-play:hover {
  transform: scale(1.06);
  filter: brightness(1.1);
}

.police-tts-label strong {
  display: block;
  font-size: 13.5px;
}

.police-tts-label small {
  font-size: 11px;
  color: #94a3b8;
}

.police-tts-controls {
  display: flex;
  align-items: center;
  gap: 8px;
}

.police-tts-speed-btn {
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.2);
  color: #ffffff;
  padding: 4px 8px;
  border-radius: 6px;
  font-size: 11px;
  font-weight: 750;
  cursor: pointer;
}

/* Cuerpo editorial del parte */
.police-doc-body {
  font-size: 1.05rem;
  line-height: 1.8;
  color: #1e293b;
}

.police-doc-body h2 {
  font-family: 'Playfair Display', Georgia, serif;
  font-size: 1.4rem;
  font-weight: 800;
  color: var(--pol-navy);
  margin: 2rem 0 0.75rem 0;
  padding-bottom: 0.35rem;
  border-bottom: 1px solid var(--pol-border-light);
}

.police-doc-body h3{margin:1.75rem 0 1rem;color:var(--pol-navy);font-size:clamp(1.08rem,2vw,1.32rem);font-weight:700;line-height:1.35}.police-doc-body h3:first-child{margin-top:0}.police-doc-body h3+p{margin-top:0}.police-doc-body p{margin-bottom:1rem;line-height:1.7}

.police-doc-body p {
  margin-bottom: 1.25rem;
}

.police-doc-body ul,
.police-doc-body ol {
  margin-bottom: 1.25rem;
  padding-left: 1.5rem;
}

.police-doc-body li {
  margin-bottom: 0.5rem;
}

/* Navegación y acciones finales */
.police-doc-footer-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding-top: 2rem;
  margin-top: 2.5rem;
  border-top: 1px solid var(--pol-border);
  flex-wrap: wrap;
}

.police-action-btns {
  display: flex;
  align-items: center;
  gap: 8px;
}

.police-btn-outline {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 14px;
  border: 1px solid var(--pol-border);
  border-radius: 8px;
  background: #ffffff;
  color: var(--pol-navy);
  font-size: 12.5px;
  font-weight: 750;
  cursor: pointer;
  text-decoration: none;
  transition: all 0.2s ease;
}

.police-btn-outline:hover {
  border-color: var(--pol-green);
  color: var(--pol-green);
  background: var(--pol-green-subtle);
}

.police-adjacent-nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-top: 1.5rem;
}

.police-adjacent-link {
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 12px 16px;
  border-radius: 8px;
  border: 1px solid var(--pol-border);
  background: #ffffff;
  text-decoration: none;
  max-width: 48%;
  transition: all 0.2s ease;
}

.police-adjacent-link:hover {
  border-color: var(--pol-green);
  box-shadow: 0 4px 12px rgba(7, 26, 55, 0.06);
}

.police-adjacent-link small {
  color: var(--pol-muted);
  font-size: 11px;
}

.police-adjacent-link strong {
  color: var(--pol-navy);
  font-size: 13px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* --------------------------------------------------------------------------
   6. PANEL DE ADMINISTRACIÓN Y MODAL DE MUESTRA PREVIA IA
   -------------------------------------------------------------------------- */
.police-link-import {
  position: relative;
  overflow: hidden;
  margin-bottom: 2rem;
  padding: clamp(1.25rem, 2.5vw, 2rem);
  border: 1px solid #b9d8ca;
  border-radius: 16px;
  background:
    radial-gradient(circle at 100% 0, rgba(28, 163, 108, .17), transparent 20rem),
    linear-gradient(135deg, #f9fdfb, #edf8f3);
  box-shadow: 0 18px 42px rgba(7, 59, 37, .09);
}
.police-link-import::before { position: absolute; inset: 0 auto 0 0; width: 5px; background: linear-gradient(#0d7a46, #20b77a); content: ""; }
.police-link-import-header { display: grid; grid-template-columns: 54px 1fr; gap: 1rem; align-items: center; }
.police-link-import-icon { display: grid; width: 52px; height: 52px; place-items: center; border-radius: 14px; background: linear-gradient(145deg, #071a37, #0d7a46); color: #fff; font-size: 1.35rem; box-shadow: 0 12px 26px rgba(7, 26, 55, .2); }
.police-link-kicker { color: #087147; font-size: .65rem; font-weight: 900; letter-spacing: .13em; text-transform: uppercase; }
.police-link-import-header h2 { margin: .25rem 0 .35rem; color: var(--pol-navy); font: 800 clamp(1.25rem, 2.5vw, 1.8rem)/1.1 'Playfair Display', Georgia, serif; }
.police-link-import-header p { max-width: 75ch; margin: 0; color: #51685c; font-size: .8rem; line-height: 1.55; }
.police-link-form { margin-top: 1.25rem; }
.police-link-form > label > span { display: block; margin-bottom: .42rem; color: var(--pol-navy); font-size: .72rem; font-weight: 850; text-transform: uppercase; }
.police-link-form > label > div { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: .55rem; }
.police-link-form input[type="url"] { width: 100%; min-height: 50px; padding: .75rem .9rem; border: 1px solid #b8cbc1; border-radius: 10px; background: #fff; color: var(--pol-navy); font: inherit; }
.police-link-form input[type="url"]:focus { border-color: var(--pol-green); outline: 3px solid rgba(13, 122, 70, .13); }
.police-link-form [data-police-link-preview] { min-height: 50px; padding: .7rem 1rem; border: 0; border-radius: 10px; background: var(--pol-navy); color: #fff; font-size: .78rem; font-weight: 850; cursor: pointer; }
.police-link-form [data-police-link-preview]:hover { background: var(--pol-green); }
.police-link-form [data-police-link-preview]:disabled { cursor: wait; opacity: .7; }
.police-link-form > label > small { display: block; margin-top: .4rem; color: #687a70; font-size: .68rem; }
.police-link-status { min-height: 1.15rem; margin: .65rem 0 0; color: #52675c; font-size: .75rem; font-weight: 700; }
.police-link-status.is-loading { color: #8a6518; }
.police-link-status.is-ready { color: #087147; }
.police-link-status.is-error { color: #a62e43; }
.police-link-preview { overflow: hidden; margin-top: 1rem; border: 1px solid #cddbd4; border-radius: 13px; background: #fff; box-shadow: 0 14px 34px rgba(7, 26, 55, .08); }
.police-link-preview[hidden] { display: none !important; }
.police-link-preview-top { display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding: .7rem 1rem; border-bottom: 1px solid #dce7e1; background: #f4faf7; }
.police-link-preview-top > span { color: #087147; font-size: .67rem; font-weight: 900; letter-spacing: .08em; text-transform: uppercase; }
.police-link-preview-top a { color: #284c3d; font-size: .7rem; font-weight: 800; text-decoration: none; }
.police-link-preview-body { padding: 1.15rem 1.25rem; }
.police-link-preview-body > small { color: #72837a; font-size: .64rem; font-weight: 850; letter-spacing: .08em; text-transform: uppercase; }
.police-link-preview-body h3 { max-width: 34ch; margin: .4rem 0 .55rem; color: var(--pol-navy); font: 800 clamp(1.25rem, 2.7vw, 1.85rem)/1.12 'Playfair Display', Georgia, serif; }
.police-link-preview-body p { max-width: 78ch; margin: 0; color: #53665c; font-size: .8rem; line-height: 1.55; }
.police-link-preview-body dl { display: flex; flex-wrap: wrap; gap: 1.4rem; margin: 1rem 0 0; }
.police-link-preview-body dl div { display: grid; gap: .12rem; }
.police-link-preview-body dt { color: #7b8c83; font-size: .6rem; font-weight: 800; text-transform: uppercase; }
.police-link-preview-body dd { margin: 0; color: #1c3b2f; font-size: .73rem; font-weight: 800; }
.police-link-preview footer { display: flex; align-items: end; justify-content: space-between; gap: 1rem; padding: .9rem 1.1rem; border-top: 1px solid #dce7e1; background: #fbfcfc; }
.police-link-preview footer label { color: #52675d; font-size: .67rem; font-weight: 800; }
.police-link-preview footer select { display: block; min-height: 38px; margin-top: .28rem; border: 1px solid #c6d4cd; border-radius: 7px; background: #fff; }
.police-link-preview footer button { min-height: 42px; padding: .65rem 1rem; border: 0; border-radius: 9px; background: linear-gradient(135deg, #0d7a46, #075d38); color: #fff; font-size: .75rem; font-weight: 900; cursor: pointer; }
.police-link-preview footer button:disabled { cursor: not-allowed; opacity: .5; }
.police-entry-divider { display: flex; align-items: center; gap: 1rem; margin: 0 0 1.4rem; color: #728079; font-size: .68rem; font-weight: 850; letter-spacing: .08em; text-transform: uppercase; }
.police-entry-divider::before, .police-entry-divider::after { height: 1px; flex: 1; background: #dbe3df; content: ""; }

.police-ai-box {
  background: linear-gradient(135deg, #f0fdf4, #eaf5ee);
  border: 1.5px dashed var(--pol-green-bright);
  border-radius: var(--pol-radius);
  padding: 1.5rem;
  margin-bottom: 2rem;
}

.police-ai-box-title {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--pol-green);
  font-weight: 850;
  font-size: 15px;
  margin-bottom: 0.5rem;
}

.police-ai-box textarea {
  width: 100%;
  min-height: 140px;
  padding: 12px;
  border: 1px solid var(--pol-border);
  border-radius: 8px;
  background: #ffffff;
  color: var(--pol-navy);
  font-family: inherit;
  font-size: 13px;
  margin-bottom: 0.75rem;
}

.police-btn-ai-action {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 20px;
  border: none;
  border-radius: 8px;
  background: linear-gradient(135deg, var(--pol-green), #047857);
  color: #ffffff;
  font-weight: 800;
  font-size: 13.5px;
  cursor: pointer;
  box-shadow: 0 4px 14px rgba(13, 122, 70, 0.3);
  transition: transform 0.2s ease, filter 0.2s ease;
}

.police-btn-ai-action:hover {
  transform: translateY(-1px);
  filter: brightness(1.08);
}

/* Modal de Muestra Previa y Aprobación IA */
.police-ai-modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(3, 14, 31, 0.75);
  backdrop-filter: blur(6px);
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
}

.police-ai-modal-backdrop[hidden] {
  display: none !important;
}

.police-ai-modal-window {
  background: #ffffff;
  border-radius: var(--pol-radius-lg);
  border: 1px solid var(--pol-border);
  box-shadow: 0 25px 60px rgba(0, 0, 0, 0.4);
  width: min(960px, 100%);
  max-height: min(90vh, 850px);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  animation: modalIn 0.25s ease-out;
}

@keyframes modalIn {
  from { opacity: 0; transform: scale(0.95) translateY(10px); }
  to { opacity: 1; transform: scale(1) translateY(0); }
}

.police-ai-modal-header {
  background: linear-gradient(135deg, var(--pol-navy), #0b2e59);
  color: #ffffff;
  padding: 1.25rem 1.75rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 3px solid var(--pol-green);
}

.police-ai-modal-header h3 {
  margin: 0;
  font-size: 1.2rem;
  display: flex;
  align-items: center;
  gap: 8px;
}

.police-ai-modal-body {
  padding: 1.75rem;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.police-ai-field-group {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.police-ai-field-group label {
  font-size: 12px;
  font-weight: 800;
  color: var(--pol-navy);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.police-ai-field-group input,
.police-ai-field-group select,
.police-ai-field-group textarea {
  padding: 10px 12px;
  border: 1px solid var(--pol-border);
  border-radius: 8px;
  background: #fbfdfc;
  color: var(--pol-navy);
  font-size: 13.5px;
}

.police-ai-field-group textarea {
  min-height: 80px;
}

.police-ai-modal-footer {
  background: #fafcfb;
  padding: 1.25rem 1.75rem;
  border-top: 1px solid var(--pol-border);
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
}

/* --------------------------------------------------------------------------
   7. RESPONSIVE
   -------------------------------------------------------------------------- */
@media (max-width: 820px) {
  .police-link-form > label > div { grid-template-columns: 1fr; }
  .police-link-preview footer { align-items: stretch; flex-direction: column; }
  .police-link-preview footer button { width: 100%; }
  .police-official-source { align-items: stretch; flex-direction: column; }
  .police-official-source a { text-align: center; }
  .police-hero-inner {
    grid-template-columns: 1fr;
    text-align: center;
    gap: 1.5rem;
  }
  .jefatura-logo-container {
    margin: 0 auto;
    width: 110px;
    height: 110px;
  }
  .police-kicker-badge {
    margin: 0 auto;
  }
  .police-doc-frame {
    padding: 1.5rem;
  }
  .police-tts-player {
    flex-direction: column;
    align-items: flex-start;
  }
  .police-list-row {
    grid-template-columns: 1fr;
  }
}

/* --------------------------------------------------------------------------
   8. ESTILOS DE IMPRESIÓN — PARTE OFICIAL
   -------------------------------------------------------------------------- */
@page {
  size: A4 portrait;
  margin: 18mm 15mm 20mm 15mm;
}

@media print {
  /* --- Ocultar elementos no imprimibles --- */
  .site-header,
  .site-footer,
  .topline,
  .topbar,
  .public-breadcrumb,
  .mobile-nav-drawer,
  .mobile-nav-backdrop,
  .whatsapp-float,
  .toast,
  .skip-link,
  .police-hero-section,
  .police-controls-bar,
  .police-tts-player,
  .police-doc-footer-actions,
  .police-adjacent-nav,
  .police-action-btns,
  .political-ad-rail,
  .political-ad-compact,
  .political-content-frame > aside {
    display: none !important;
  }

  /* --- Reset general --- */
  body {
    background: #ffffff !important;
    color: #000000 !important;
    font-size: 11pt;
    line-height: 1.6;
    -webkit-print-color-adjust: exact;
    print-color-adjust: exact;
  }

  /* --- Contenedor principal a ancho completo --- */
  .shell {
    width: 100% !important;
    max-width: none !important;
    padding: 0 !important;
    margin: 0 !important;
  }

  .section-space {
    padding: 0 !important;
  }

  .police-article-container {
    max-width: none;
    margin: 0;
  }

  /* --- Marco del documento oficial --- */
  .police-doc-frame {
    border: none;
    box-shadow: none;
    padding: 0;
    border-top: 3px solid var(--pol-green);
    border-radius: 0;
  }

  /* --- Cabecera institucional: preservar --- */
  .police-doc-header {
    padding-bottom: 1rem;
    margin-bottom: 1.5rem;
    border-bottom: 2px solid #0d7a46;
    break-inside: avoid;
  }

  .police-doc-header-logo img {
    max-height: 70px;
  }

  .police-badge-official {
    -webkit-print-color-adjust: exact;
    print-color-adjust: exact;
  }

  /* --- Tira de metadatos --- */
  .police-doc-meta-strip {
    break-inside: avoid;
    margin-bottom: 0.75rem;
  }

  .police-doc-number-badge {
    -webkit-print-color-adjust: exact;
    print-color-adjust: exact;
    background: var(--pol-navy) !important;
    color: #ffffff !important;
  }

  /* --- Titular --- */
  .police-doc-title {
    font-size: 20pt;
    break-after: avoid;
  }

  /* --- Bajada / resumen --- */
  .police-doc-excerpt {
    border-left: 3px solid #0d7a46;
    break-inside: avoid;
  }

  /* --- Cuerpo del comunicado --- */
  .police-doc-body {
    font-size: 11pt;
    line-height: 1.7;
    orphans: 3;
    widows: 3;
  }

  .police-doc-body h2 {
    break-after: avoid;
    font-size: 14pt;
  }

  .police-doc-body p {
    break-inside: avoid;
  }

  .police-doc-body img {
    max-width: 100%;
    break-inside: avoid;
  }

  /* --- Chips de dependencias --- */
  .police-tag-chip {
    -webkit-print-color-adjust: exact;
    print-color-adjust: exact;
    break-inside: avoid;
  }

  /* --- Links no subrayados --- */
  a {
    text-decoration: none !important;
    color: inherit !important;
  }
}

/* Hero editorial 2026: misma proporcion y lenguaje visual que Profesionales. */
.police-hero-section {
  isolation: isolate;
  display: flex;
  min-height: clamp(245px, 24vw, 280px);
  margin-bottom: 0;
  padding: 0;
  overflow: hidden;
  background: #031126;
  box-shadow: none;
}

.police-hero-image,
.police-hero-shade {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

.police-hero-image {
  z-index: -3;
  display: block;
  object-fit: cover;
  object-position: center 40%;
}

.police-hero-shade {
  z-index: -2;
  background: linear-gradient(90deg, rgba(3, 14, 31, .95) 0%, rgba(3, 14, 31, .78) 38%, rgba(3, 14, 31, .2) 72%, rgba(3, 14, 31, .08) 100%);
}

.police-hero-section .police-hero-inner {
  display: flex;
  align-items: center;
  padding-block: 1.25rem 1.5rem;
}

.police-hero-glass {
  width: min(650px, 68%);
  padding: clamp(.9rem, 1.8vw, 1.2rem);
  border: 1px solid rgba(255, 255, 255, .22);
  border-radius: 8px;
  background: rgba(5, 21, 44, .62);
  box-shadow: 0 24px 55px rgba(0, 0, 0, .22);
  backdrop-filter: blur(14px) saturate(112%);
  -webkit-backdrop-filter: blur(14px) saturate(112%);
}

.police-hero-brand {
  display: flex;
  align-items: center;
  gap: .75rem;
  margin-bottom: .55rem;
}

.police-hero-brand > img {
  width: 180px;
  height: 42px;
  padding: 4px 8px;
  border-radius: 5px;
  background: rgba(255, 255, 255, .95);
  object-fit: contain;
}

.police-hero-section .police-hero-info {
  gap: .3rem;
}

.public-page--policiales .police-hero-section .police-hero-title {
  max-width: 100%;
  margin: 0;
  color: #fff;
  font: 800 clamp(2rem, 4vw, 3.2rem)/1 var(--serif, "Libre Franklin", serif);
  letter-spacing: 0;
}

.public-page--policiales .police-hero-section .police-hero-subtitle {
  max-width: 580px;
  margin: 0;
  color: #d9e5ef;
  font-size: clamp(.78rem, 1.15vw, .9rem);
  line-height: 1.45;
}

.police-hero-accent {
  position: absolute;
  right: 0;
  bottom: 0;
  left: 0;
  z-index: 3;
  display: grid;
  grid-template-columns: 1.35fr 1fr 1fr .28fr;
  height: 4px;
}

.police-hero-accent span:nth-child(1) { background: #0875d1; }
.police-hero-accent span:nth-child(2) { background: #128257; }
.police-hero-accent span:nth-child(3) { background: #ca3346; }
.police-hero-accent span:nth-child(4) { background: #b89043; }

@media (max-width: 720px) {
  .police-hero-section {
    min-height: 280px;
    align-items: end;
  }

  .police-hero-image {
    object-position: 63% center;
  }

  .police-hero-shade {
    background: linear-gradient(180deg, rgba(3, 14, 31, .15) 8%, rgba(3, 14, 31, .58) 46%, rgba(3, 14, 31, .96) 100%);
  }

  .police-hero-section .police-hero-inner {
    display: flex;
    align-items: end;
    padding-block: 2.4rem 1rem;
    text-align: left;
  }

  .police-hero-glass {
    width: 100%;
    padding: .8rem .9rem;
    background: rgba(4, 19, 40, .72);
  }

  .police-hero-brand > img {
    width: 138px;
    height: 34px;
  }

  .police-hero-section .police-kicker-badge {
    margin: 0;
    padding: 4px 8px;
    font-size: .55rem;
  }

  .public-page--policiales .police-hero-section .police-hero-title {
    font-size: clamp(1.8rem, 8.6vw, 2.45rem);
  }

  .public-page--policiales .police-hero-section .police-hero-subtitle {
    font-size: .72rem;
    line-height: 1.35;
  }
}

/* ==========================================================================
   GALERÍA FOTOGRÁFICA Y CARRUSEL DE PARTES POLICIALES
   ========================================================================== */
.police-doc-gallery {
  margin: 1.5rem 0 2rem 0;
  width: 100%;
  box-sizing: border-box;
}

.police-doc-gallery__grid {
  display: grid;
  gap: 1.25rem;
  width: 100%;
}

.police-doc-gallery.is-single .police-doc-gallery__grid {
  grid-template-columns: 1fr;
}

.police-doc-gallery.is-multiple .police-doc-gallery__grid {
  grid-template-columns: repeat(2, 1fr);
}

@media (max-width: 640px) {
  .police-doc-gallery.is-multiple .police-doc-gallery__grid {
    grid-template-columns: 1fr;
  }
}

.police-gallery-figure {
  margin: 0;
  overflow: hidden;
  border-radius: var(--pol-radius);
  background: var(--pol-navy-dark);
  border: 1px solid var(--pol-border);
  box-shadow: var(--pol-shadow);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
  display: flex;
  flex-direction: column;
}

.police-gallery-figure:hover {
  transform: translateY(-2px);
  box-shadow: var(--pol-shadow-hover);
}

.police-gallery-trigger {
  position: relative;
  display: block;
  width: 100%;
  padding: 0;
  border: 0;
  background: var(--pol-navy-dark);
  cursor: zoom-in;
  overflow: hidden;
}

.police-gallery-trigger img {
  display: block;
  width: 100%;
  height: auto;
  object-fit: cover;
  transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

.police-doc-gallery.is-single .police-gallery-trigger img {
  max-height: 520px;
  object-fit: contain;
  background: #020b17;
}

.police-doc-gallery.is-multiple .police-gallery-trigger img {
  height: 260px;
  object-fit: cover;
}

.police-gallery-trigger:hover img {
  transform: scale(1.03);
}

.police-gallery-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(3,14,31,0) 50%, rgba(3,14,31,0.65) 100%);
  opacity: 0;
  transition: opacity 0.25s ease;
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  padding: 10px 14px;
  pointer-events: none;
}

.police-gallery-trigger:hover .police-gallery-overlay {
  opacity: 1;
}

.police-badge-zoom {
  background: rgba(13, 122, 70, 0.9);
  color: #ffffff;
  padding: 4px 10px;
  border-radius: 6px;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.04em;
  box-shadow: 0 4px 10px rgba(0,0,0,0.3);
}

.police-gallery-caption {
  padding: 0.75rem 1rem;
  background: #ffffff;
  border-top: 1px solid var(--pol-border-light);
  display: flex;
  flex-direction: column;
  gap: 3px;
  font-size: 12.5px;
}

.police-caption-text {
  color: var(--pol-text);
  font-weight: 600;
  line-height: 1.4;
}

.police-caption-credit {
  color: var(--pol-green);
  font-weight: 750;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

/* --- Carrusel Automático de Fotos --- */
.police-doc-carousel {
  position: relative;
  overflow: hidden;
  border-radius: var(--pol-radius);
  background: var(--pol-navy-dark);
  border: 1px solid var(--pol-border);
  box-shadow: var(--pol-shadow);
}

.police-carousel-track {
  position: relative;
  width: 100%;
}

.police-carousel-slide {
  display: none;
  margin: 0;
  width: 100%;
  animation: policeFadeSlide 0.5s cubic-bezier(0.16, 1, 0.3, 1);
}

.police-carousel-slide.is-active {
  display: flex;
  flex-direction: column;
}

@keyframes policeFadeSlide {
  from { opacity: 0.2; transform: scale(0.99); }
  to { opacity: 1; transform: scale(1); }
}

.police-carousel-slide .police-gallery-trigger img {
  height: 420px;
  object-fit: cover;
  background: #020b17;
}

@media (max-width: 640px) {
  .police-carousel-slide .police-gallery-trigger img {
    height: 270px;
  }
}

.police-carousel-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 42px;
  height: 42px;
  border-radius: 50%;
  border: 1px solid rgba(255,255,255,0.25);
  background: rgba(3, 14, 31, 0.7);
  backdrop-filter: blur(8px);
  color: #ffffff;
  font-size: 24px;
  line-height: 1;
  display: grid;
  place-items: center;
  cursor: pointer;
  z-index: 5;
  transition: background 0.2s, transform 0.2s;
}

.police-carousel-nav:hover {
  background: var(--pol-green);
  transform: translateY(-50%) scale(1.1);
}

.police-carousel-nav.prev { left: 14px; }
.police-carousel-nav.next { right: 14px; }

.police-carousel-dots {
  position: absolute;
  bottom: 56px;
  left: 0;
  right: 0;
  display: flex;
  justify-content: center;
  gap: 8px;
  z-index: 6;
  pointer-events: auto;
}

.police-carousel-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  border: 1.5px solid #ffffff;
  background: rgba(255,255,255,0.4);
  cursor: pointer;
  padding: 0;
  transition: background 0.25s, transform 0.25s, width 0.25s;
}

.police-carousel-dot.is-active {
  background: var(--pol-green-bright);
  border-color: var(--pol-green-bright);
  width: 24px;
  border-radius: 999px;
  transform: scale(1.05);
}

/* --- Visor Modal Lightbox para Policiales --- */
.police-modal-dialog {
  padding: 0;
  border: 0;
  background: transparent;
  width: 100vw;
  height: 100vh;
  max-width: 100vw;
  max-height: 100vh;
  margin: 0;
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 99999;
}

.police-modal-dialog[open] {
  display: flex;
}

.police-modal-dialog::backdrop {
  background: rgba(3, 14, 31, 0.94);
  backdrop-filter: blur(12px);
}

.police-modal-wrapper {
  position: relative;
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 1.5rem;
  box-sizing: border-box;
}

.police-modal-topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  color: #ffffff;
  z-index: 10;
}

.police-modal-counter {
  font-size: 13px;
  font-weight: 750;
  background: rgba(255,255,255,0.15);
  padding: 4px 12px;
  border-radius: 999px;
  letter-spacing: 0.05em;
}

.police-modal-close-btn {
  background: rgba(255,255,255,0.15);
  border: 1px solid rgba(255,255,255,0.25);
  color: #ffffff;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  cursor: pointer;
  font-size: 18px;
  transition: background 0.2s;
}

.police-modal-close-btn:hover {
  background: #ca3346;
  border-color: #ca3346;
}

.police-modal-stage {
  position: relative;
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  margin: 1rem 0;
}

.police-modal-stage img {
  max-width: 90vw;
  max-height: 75vh;
  object-fit: contain;
  border-radius: 8px;
  box-shadow: 0 16px 48px rgba(0,0,0,0.6);
  cursor: zoom-in;
  transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.police-modal-stage img.is-zoomed {
  transform: scale(1.5);
  cursor: zoom-out;
}

.police-modal-bottombar {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
  color: #cbd5e1;
  text-align: center;
  font-size: 13px;
  z-index: 10;
}
