/* ==========================================================================
   STYLE.CSS - Estilos Globales y Base (Enfoque Mobile First)
   Alcaldía Metropolitana Moderna
   ========================================================================== */

/* --- Importación de Fuentes (Google Fonts) --- */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&family=Montserrat:wght@400;500;600;700;800&display=swap');

/* --- Variables y Paleta de Colores (Claro por defecto) --- */
:root {
  --primary-green: #0f5132;        /* Verde Institucional Profundo */
  --primary-green-rgb: 15, 81, 50;
  --secondary-green: #198754;      /* Verde Esmeralda */
  --accent-celeste: #0ea5e9;       /* Celeste Tecnológico */
  --accent-celeste-rgb: 14, 165, 233;
  --celeste-light: #e0f2fe;        /* Celeste Suave */
  --white: #ffffff;
  --bg-light: #f8fafc;             /* Gris Neutro Claro */
  --bg-card: #ffffff;
  --text-dark: #0f172a;            /* Pizarra Oscuro (Alta legibilidad) */
  --text-muted: #64748b;           /* Gris Secundario */
  --border-color: #e2e8f0;
  --accent-orange: #f59e0b;        /* Color de destaque secundario (alerta/obras) */
  
  /* Fuentes */
  --font-title: 'Montserrat', sans-serif;
  --font-body: 'Inter', sans-serif;
  
  /* Sombras y Bordes */
  --shadow-sm: 0 1px 3px rgba(0,0,0,0.1);
  --shadow-md: 0 4px 6px -1px rgba(0,0,0,0.1), 0 2px 4px -1px rgba(0,0,0,0.06);
  --shadow-lg: 0 10px 15px -3px rgba(0,0,0,0.1), 0 4px 6px -2px rgba(0,0,0,0.05);
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 20px;
  --transition-smooth: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  --header-height: 80px;
}

/* --- Variables en Modo Oscuro (Dark Mode) --- */
body.dark-mode {
  --primary-green: #198754;
  --primary-green-rgb: 25, 135, 84;
  --secondary-green: #2ec4b6;
  --accent-celeste: #38bdf8;
  --accent-celeste-rgb: 56, 189, 248;
  --celeste-light: #0c4a6e;
  --bg-light: #0b0f19;             /* Fondo oscuro principal */
  --bg-card: #1e293b;             /* Fondo de tarjetas oscuro */
  --text-dark: #f8fafc;           /* Texto claro */
  --text-muted: #94a3b8;
  --border-color: #334155;
  --white: #1e293b;
}

/* ==========================================================================
   Resets y Configuración Global
   ========================================================================== */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  font-size: 16px; /* Base */
}

body {
  font-family: var(--font-body);
  background-color: var(--bg-light);
  color: var(--text-dark);
  line-height: 1.6;
  overflow-x: hidden;
  transition: background-color 0.3s ease, color 0.3s ease;
}

a {
  text-decoration: none;
  color: inherit;
  transition: var(--transition-smooth);
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

ul, ol {
  list-style: none;
}

button, input, textarea, select {
  font-family: inherit;
  font-size: inherit;
  border: none;
  background: none;
  outline: none;
}

/* --- Estructura y Espaciado --- */
.container {
  width: 100%;
  margin-left: auto;
  margin-right: auto;
  padding-left: 1.5rem;
  padding-right: 1.5rem;
}

.section {
  padding: 4rem 0;
  position: relative;
}

.section-title {
  font-family: var(--font-title);
  font-size: 1.75rem;
  font-weight: 700;
  text-align: center;
  margin-bottom: 1rem;
  color: var(--primary-green);
  position: relative;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

body.dark-mode .section-title {
  color: var(--accent-celeste);
}

.section-title::after {
  content: '';
  display: block;
  width: 60px;
  height: 4px;
  background: linear-gradient(90deg, var(--primary-green), var(--accent-celeste));
  margin: 0.75rem auto 0;
  border-radius: 2px;
}

.section-desc {
  text-align: center;
  color: var(--text-muted);
  max-width: 600px;
  margin: 0 auto 3rem;
  font-size: 1rem;
}

/* ==========================================================================
   Componentes Comunes
   ========================================================================== */

/* --- Botones --- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.75rem 1.75rem;
  border-radius: var(--radius-sm);
  font-weight: 600;
  font-family: var(--font-title);
  cursor: pointer;
  transition: var(--transition-smooth);
  text-align: center;
  gap: 0.5rem;
}

.btn-primary {
  background-color: var(--primary-green);
  color: #ffffff !important;
}

.btn-primary:hover {
  background-color: var(--secondary-green);
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(15, 81, 50, 0.3);
}

.btn-celeste {
  background-color: var(--accent-celeste);
  color: #ffffff !important;
}

.btn-celeste:hover {
  background-color: #0284c7;
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(14, 165, 233, 0.3);
}

.btn-outline {
  border: 2px solid var(--primary-green);
  color: var(--primary-green);
}

.btn-outline:hover {
  background-color: var(--primary-green);
  color: #ffffff !important;
  transform: translateY(-2px);
}

body.dark-mode .btn-outline {
  border-color: var(--accent-celeste);
  color: var(--accent-celeste);
}

body.dark-mode .btn-outline:hover {
  background-color: var(--accent-celeste);
  color: #0b0f19 !important;
}

/* --- Tarjetas (Cards) --- */
.card {
  background-color: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 1.5rem;
  box-shadow: var(--shadow-sm);
  transition: var(--transition-smooth);
}

.card:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-lg);
  border-color: rgba(var(--accent-celeste-rgb), 0.3);
}

/* ==========================================================================
   Header y Navegación
   ========================================================================== */
.header {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: var(--header-height);
  background-color: rgba(255, 255, 255, 0.85);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid rgba(226, 232, 240, 0.8);
  z-index: 1000;
  transition: var(--transition-smooth);
}

body.dark-mode .header {
  background-color: rgba(11, 15, 25, 0.85);
  border-bottom-color: rgba(51, 65, 85, 0.8);
}

.header.sticky {
  height: 70px;
  box-shadow: var(--shadow-md);
}

.nav-container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  height: 100%;
}

/* --- Logo --- */
.logo {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.logo img {
  height: 48px;
  width: auto;
  border-radius: 50%;
}

.logo-text {
  display: flex;
  flex-direction: column;
}

.logo-title {
  font-family: var(--font-title);
  font-size: 1.15rem;
  font-weight: 800;
  color: var(--primary-green);
  line-height: 1.2;
}

body.dark-mode .logo-title {
  color: #ffffff;
}

.logo-subtitle {
  font-size: 0.7rem;
  letter-spacing: 1px;
  text-transform: uppercase;
  color: var(--accent-celeste);
  font-weight: 600;
}

/* --- Menú de Navegación Móvil --- */
.nav-menu {
  position: fixed;
  top: var(--header-height);
  left: -100%;
  width: 100%;
  height: calc(100vh - var(--header-height));
  background-color: var(--bg-card);
  display: flex;
  flex-direction: column;
  padding: 2rem 1.5rem;
  gap: 1.5rem;
  overflow-y: auto;
  transition: left 0.4s ease-in-out;
  border-right: 1px solid var(--border-color);
}

.nav-menu.active {
  left: 0;
}

.nav-item {
  width: 100%;
}

.nav-link {
  display: block;
  font-family: var(--font-title);
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--text-dark);
  padding: 0.75rem 0;
  border-bottom: 1px solid var(--border-color);
}

.nav-link:hover,
.nav-link.active {
  color: var(--primary-green);
  border-bottom-color: var(--primary-green);
  padding-left: 0.5rem;
}

body.dark-mode .nav-link:hover,
body.dark-mode .nav-link.active {
  color: var(--accent-celeste);
  border-bottom-color: var(--accent-celeste);
}

/* Controles de Header (Dark mode y Hamburger) */
.header-actions {
  display: flex;
  align-items: center;
  gap: 1rem;
}

/* Botón Modo Oscuro */
.theme-toggle-btn {
  background: none;
  cursor: pointer;
  color: var(--text-dark);
  font-size: 1.25rem;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background-color: rgba(var(--accent-celeste-rgb), 0.1);
  transition: var(--transition-smooth);
}

.theme-toggle-btn:hover {
  background-color: rgba(var(--accent-celeste-rgb), 0.2);
  transform: rotate(15deg);
}

/* Hamburger */
.hamburger {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  width: 30px;
  height: 20px;
  background: transparent;
  cursor: pointer;
  z-index: 1100;
}

.hamburger span {
  display: block;
  width: 100%;
  height: 3px;
  background-color: var(--primary-green);
  border-radius: 2px;
  transition: var(--transition-smooth);
}

body.dark-mode .hamburger span {
  background-color: var(--accent-celeste);
}

.hamburger.active span:nth-child(1) {
  transform: translateY(8.5px) rotate(45deg);
}

.hamburger.active span:nth-child(2) {
  opacity: 0;
}

.hamburger.active span:nth-child(3) {
  transform: translateY(-8.5px) rotate(-45deg);
}

/* ==========================================================================
   Sección Hero (Home y Subpáginas)
   ========================================================================== */
.hero {
  position: relative;
  min-height: 80vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding-top: calc(var(--header-height) + 2rem);
  background-color: var(--bg-light);
  overflow: hidden;
}

.hero-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(135deg, rgba(15, 81, 50, 0.95), rgba(14, 165, 233, 0.85));
  z-index: 2;
}

body.dark-mode .hero-overlay {
  background: linear-gradient(135deg, rgba(11, 15, 25, 0.95), rgba(15, 81, 50, 0.85));
}

.hero-bg {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  z-index: 1;
}

.hero-container {
  position: relative;
  z-index: 3;
  color: #ffffff;
  text-align: center;
}

.hero-tag {
  font-family: var(--font-title);
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 2px;
  color: var(--accent-celeste);
  font-weight: 700;
  background-color: rgba(255, 255, 255, 0.1);
  padding: 0.5rem 1.25rem;
  border-radius: 50px;
  display: inline-block;
  margin-bottom: 1.5rem;
  border: 1px solid rgba(255, 255, 255, 0.2);
}

.hero-title {
  font-family: var(--font-title);
  font-size: 2.25rem;
  font-weight: 800;
  line-height: 1.2;
  margin-bottom: 1.5rem;
  text-shadow: 0 2px 4px rgba(0,0,0,0.2);
}

.hero-desc {
  font-size: 1.05rem;
  margin-bottom: 2rem;
  max-width: 650px;
  margin-left: auto;
  margin-right: auto;
  color: rgba(255, 255, 255, 0.9);
}

.hero-buttons {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  width: 100%;
  max-width: 320px;
  margin: 0 auto;
}

/* --- Hero para subpáginas (Banner más corto) --- */
.hero-page {
  min-height: 45vh;
  padding-top: calc(var(--header-height) + 1rem);
  padding-bottom: 2rem;
}

.hero-page .hero-title {
  font-size: 2rem;
  margin-bottom: 0.5rem;
}

/* ==========================================================================
   Sección Quiénes Somos y Misión/Visión
   ========================================================================== */
.about-grid {
  display: flex;
  flex-direction: column;
  gap: 2.5rem;
}

.about-content {
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.about-highlight {
  font-size: 1.15rem;
  color: var(--primary-green);
  font-weight: 600;
  margin-bottom: 1rem;
}

body.dark-mode .about-highlight {
  color: var(--accent-celeste);
}

.about-text {
  color: var(--text-muted);
  margin-bottom: 1.5rem;
}

.about-img-wrapper {
  position: relative;
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-lg);
}

.about-img-wrapper img {
  width: 100%;
  height: 250px;
  object-fit: cover;
  transition: var(--transition-smooth);
}

.about-img-wrapper:hover img {
  transform: scale(1.05);
}

/* Misión y Visión */
.mv-container {
  background-color: var(--bg-light);
  border-top: 1px solid var(--border-color);
}

.mv-grid {
  display: flex;
  flex-direction: column;
  gap: 2rem;
}

.mv-card {
  text-align: center;
  padding: 2.5rem 1.5rem;
}

.mv-icon {
  width: 70px;
  height: 70px;
  border-radius: 50%;
  background: linear-gradient(135deg, rgba(15, 81, 50, 0.1), rgba(14, 165, 233, 0.1));
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 1.5rem;
  color: var(--primary-green);
  font-size: 2rem;
}

body.dark-mode .mv-icon {
  color: var(--accent-celeste);
  background: linear-gradient(135deg, rgba(14, 165, 233, 0.2), rgba(25, 135, 84, 0.2));
}

.mv-card h3 {
  font-family: var(--font-title);
  font-size: 1.35rem;
  margin-bottom: 1rem;
  color: var(--primary-green);
}

body.dark-mode .mv-card h3 {
  color: var(--accent-celeste);
}

.mv-card p {
  color: var(--text-muted);
  font-size: 0.95rem;
}

/* ==========================================================================
   Sección Estadísticas / Contadores
   ========================================================================== */
.stats-section {
  background: linear-gradient(135deg, var(--primary-green), var(--secondary-green));
  color: #ffffff;
  text-align: center;
}

body.dark-mode .stats-section {
  background: linear-gradient(135deg, #090d16, #0e2a1b);
}

.stats-grid {
  display: flex;
  flex-direction: column;
  gap: 2.5rem;
}

.stat-item {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.stat-icon {
  font-size: 2.5rem;
  margin-bottom: 1rem;
  color: var(--accent-celeste);
}

.stat-number {
  font-family: var(--font-title);
  font-size: 3rem;
  font-weight: 800;
  margin-bottom: 0.5rem;
  line-height: 1;
}

.stat-label {
  font-size: 0.95rem;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: rgba(255, 255, 255, 0.85);
  font-weight: 600;
}

/* ==========================================================================
   Sección Ubicación (Google Maps)
   ========================================================================== */
.map-section {
  padding-bottom: 0;
}

.map-wrapper {
  position: relative;
  width: 100%;
  height: 350px;
  border-radius: var(--radius-lg) var(--radius-lg) 0 0;
  overflow: hidden;
  box-shadow: var(--shadow-lg);
  border: 1px solid var(--border-color);
  border-bottom: none;
}

.map-wrapper iframe {
  width: 100%;
  height: 100%;
  border: 0;
}

.map-info-card {
  position: absolute;
  bottom: 20px;
  left: 20px;
  right: 20px;
  background-color: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(8px);
  padding: 1.25rem;
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-lg);
  z-index: 5;
  border-left: 5px solid var(--primary-green);
}

body.dark-mode .map-info-card {
  background-color: rgba(30, 41, 59, 0.95);
  border-left-color: var(--accent-celeste);
}

.map-info-title {
  font-family: var(--font-title);
  font-weight: 700;
  font-size: 1rem;
  margin-bottom: 0.25rem;
}

.map-info-text {
  font-size: 0.85rem;
  color: var(--text-muted);
}

/* ==========================================================================
   Pie de Página (Footer)
   ========================================================================== */
.footer {
  background-color: #0b0f19;
  color: #94a3b8;
  padding: 4rem 0 2rem;
  border-top: 3px solid var(--primary-green);
}

body.dark-mode .footer {
  border-top-color: var(--accent-celeste);
}

.footer-grid {
  display: flex;
  flex-direction: column;
  gap: 3rem;
  margin-bottom: 3rem;
}

.footer-col-brand h3 {
  color: #ffffff;
  font-family: var(--font-title);
  font-size: 1.35rem;
  margin-bottom: 0.5rem;
}

.footer-col-brand p {
  font-size: 0.9rem;
  margin-bottom: 1.5rem;
  line-height: 1.5;
}

.footer-socials {
  display: flex;
  gap: 1rem;
}

.social-link {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background-color: rgba(255, 255, 255, 0.05);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #ffffff;
  transition: var(--transition-smooth);
  font-size: 1.1rem;
}

.social-link:hover {
  background-color: var(--accent-celeste);
  transform: translateY(-3px);
  color: #0b0f19;
}

.footer-col-title {
  color: #ffffff;
  font-family: var(--font-title);
  font-size: 1.1rem;
  font-weight: 700;
  margin-bottom: 1.5rem;
  position: relative;
  padding-bottom: 0.5rem;
}

.footer-col-title::after {
  content: '';
  position: absolute;
  left: 0;
  bottom: 0;
  width: 35px;
  height: 3px;
  background-color: var(--accent-celeste);
  border-radius: 2px;
}

.footer-links {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.footer-link {
  font-size: 0.9rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.footer-link::before {
  content: '→';
  color: var(--accent-celeste);
  font-size: 0.8rem;
  transition: var(--transition-smooth);
}

.footer-link:hover {
  color: #ffffff;
  padding-left: 0.25rem;
}

.footer-contact-info {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  font-size: 0.9rem;
}

.footer-contact-item {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
}

.footer-contact-item i {
  color: var(--accent-celeste);
  font-size: 1.1rem;
  margin-top: 0.2rem;
}

/* Copyright */
.footer-bottom {
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  padding-top: 2rem;
  text-align: center;
  font-size: 0.8rem;
}

.footer-bottom p {
  margin-bottom: 0.5rem;
}

.footer-developer {
  color: var(--accent-celeste);
  font-weight: 500;
}

/* ==========================================================================
   DIRECTORES MUNICIPALES (Tarea 1)
   ========================================================================== */
.directores-section {
  background-color: var(--bg-card);
  border-top: 1px solid var(--border-color);
}

.directores-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.5rem;
}

.director-card {
  text-align: center;
  padding: 0;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  height: 100%;
}

.director-img-wrapper {
  position: relative;
  width: 100%;
  height: 250px;
  overflow: hidden;
  background-color: var(--bg-light);
}

.director-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: var(--transition-smooth);
}

.director-card:hover .director-img {
  transform: scale(1.05);
}

.director-info {
  padding: 1.5rem;
  flex-grow: 1;
  display: flex;
  flex-direction: column;
}

.director-nombre {
  font-family: var(--font-title);
  font-weight: 700;
  font-size: 1.15rem;
  color: var(--text-dark);
  margin-bottom: 0.35rem;
}

.director-cargo {
  color: var(--primary-green);
  font-size: 0.9rem;
  font-weight: 600;
  margin-bottom: 0.75rem;
  line-height: 1.35;
}

body.dark-mode .director-cargo {
  color: var(--accent-celeste);
}

.director-contacto {
  font-size: 0.85rem;
  color: var(--text-muted);
  border-top: 1px solid var(--border-color);
  padding-top: 0.75rem;
  margin-top: auto;
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.director-contacto a {
  color: var(--text-muted);
  transition: var(--transition-smooth);
}

.director-contacto a:hover {
  color: var(--primary-green);
}

body.dark-mode .director-contacto a:hover {
  color: var(--accent-celeste);
}

/* ==========================================================================
   PORTAL DE TRANSPARENCIA Y TABS (Tarea 2)
   ========================================================================== */
.trans-tabs-container {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.5rem;
  margin-bottom: 2.5rem;
}

.trans-tab-btn {
  padding: 0.65rem 1.25rem;
  border-radius: 50px;
  background-color: var(--bg-card);
  border: 1px solid var(--border-color);
  color: var(--text-muted);
  font-family: var(--font-title);
  font-weight: 600;
  font-size: 0.88rem;
  cursor: pointer;
  transition: var(--transition-smooth);
}

.trans-tab-btn:hover {
  border-color: var(--primary-green);
  color: var(--primary-green);
  transform: translateY(-2px);
}

.trans-tab-btn.active {
  background-color: var(--primary-green);
  border-color: var(--primary-green);
  color: #ffffff !important;
  box-shadow: 0 4px 10px rgba(var(--primary-green-rgb), 0.25);
}

body.dark-mode .trans-tab-btn:hover {
  border-color: var(--accent-celeste);
  color: var(--accent-celeste);
}

body.dark-mode .trans-tab-btn.active {
  background-color: var(--accent-celeste);
  border-color: var(--accent-celeste);
  color: #0b0f19 !important;
  box-shadow: 0 4px 10px rgba(var(--accent-celeste-rgb), 0.25);
}

.trans-doc-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.5rem;
}

.trans-doc-card {
  padding: 1.75rem;
  display: flex;
  flex-direction: column;
  border-top: 4px solid var(--primary-green);
  transition: var(--transition-smooth);
}

body.dark-mode .trans-doc-card {
  border-top-color: var(--accent-celeste);
}

.trans-doc-header {
  display: flex;
  align-items: flex-start;
  gap: 1rem;
  margin-bottom: 1rem;
}

.trans-doc-icon {
  font-size: 2.25rem;
  color: #ef4444;
  flex-shrink: 0;
}

.trans-doc-title-group {
  flex-grow: 1;
}

.trans-doc-title {
  font-family: var(--font-title);
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--text-dark);
  line-height: 1.35;
  margin-bottom: 0.25rem;
}

.trans-doc-meta {
  font-size: 0.8rem;
  color: var(--text-muted);
  display: flex;
  gap: 0.75rem;
  flex-wrap: wrap;
}

.trans-doc-desc {
  font-size: 0.9rem;
  color: var(--text-muted);
  margin-bottom: 1.5rem;
  flex-grow: 1;
  line-height: 1.55;
}

.trans-doc-actions {
  display: flex;
  gap: 0.75rem;
  flex-wrap: wrap;
  margin-top: auto;
  border-top: 1px solid var(--border-color);
  padding-top: 1.25rem;
}

.trans-doc-actions .btn {
  flex: 1 1 auto;
  font-size: 0.85rem;
  padding: 0.6rem 1rem;
}

/* ==========================================================================
   MODAL VISOR DE PDF (Tarea 3)
   ========================================================================== */
.pdf-modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background-color: rgba(15, 23, 42, 0.78);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  z-index: 3000;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s ease, visibility 0.3s ease;
  padding: 1rem;
}

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

.pdf-modal-container {
  background-color: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.4);
  width: 95%;
  max-width: 1050px;
  height: 90vh;
  max-height: 900px;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  transform: scale(0.94) translateY(20px);
  transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.pdf-modal-overlay.active .pdf-modal-container {
  transform: scale(1) translateY(0);
}

.pdf-modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem 1.5rem;
  border-bottom: 1px solid var(--border-color);
  background-color: var(--bg-card);
  gap: 1rem;
}

.pdf-modal-title-group {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  overflow: hidden;
}

.pdf-modal-icon {
  font-size: 1.5rem;
  color: #ef4444;
  flex-shrink: 0;
}

.pdf-modal-title {
  font-family: var(--font-title);
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--text-dark);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.pdf-modal-actions {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  flex-shrink: 0;
}

.btn-sm {
  padding: 0.45rem 0.9rem;
  font-size: 0.85rem;
}

.pdf-modal-close {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.25rem;
  color: var(--text-muted);
  cursor: pointer;
  background-color: rgba(100, 116, 139, 0.12);
  transition: var(--transition-smooth);
}

.pdf-modal-close:hover {
  background-color: rgba(239, 68, 68, 0.15);
  color: #ef4444;
  transform: rotate(90deg);
}

.pdf-modal-body {
  position: relative;
  flex: 1;
  width: 100%;
  height: 100%;
  background-color: #333a42;
  overflow: hidden;
}

.pdf-modal-loader {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.75rem;
  color: #ffffff;
  font-size: 1.5rem;
  z-index: 1;
  pointer-events: none;
}

.pdf-modal-loader p {
  font-size: 0.9rem;
  font-family: var(--font-body);
}

.pdf-modal-iframe {
  position: relative;
  z-index: 2;
  width: 100%;
  height: 100%;
  border: none;
}

/* Soporte para Modo Oscuro en Modal */
body.dark-mode .pdf-modal-container {
  background-color: var(--bg-card);
  border-color: var(--border-color);
}

body.dark-mode .pdf-modal-header {
  background-color: var(--bg-card);
  border-color: var(--border-color);
}

body.dark-mode .pdf-modal-title {
  color: var(--text-dark);
}
