/* ==========================================================================
   PORTAL WEB INSTITUCIONAL - I.E.A. SIGIFREDO GUTIÉRREZ (MORALES, CAUCA)
   Estándar de Accesibilidad MinTIC Resolución 1519 de 2020 & Ley 1712 de 2014
   ========================================================================== */

:root {
  /* Paleta Institucional (Gov.co + Identidad Agropecuaria) */
  --gov-primary: #003366;       /* Azul institucional Colombia */
  --gov-primary-dark: #002244;
  --gov-secondary: #00853e;     /* Verde agropecuario Cauca */
  --gov-secondary-light: #e6f4ea;
  --gov-accent: #f39200;        /* Amarillo/Dorado institucional */
  --gov-accent-hover: #d97d00;
  
  --bg-page: #f8fafc;
  --bg-surface: #ffffff;
  --bg-subtle: #f1f5f9;
  --border-color: #cbd5e1;
  --border-focus: #0056b3;
  
  --text-main: #1e293b;
  --text-muted: #64748b;
  --text-inverse: #ffffff;
  
  --shadow-sm: 0 1px 3px rgba(0,0,0,0.08);
  --shadow-md: 0 4px 12px rgba(0,0,0,0.08);
  --shadow-lg: 0 10px 25px rgba(0,0,0,0.12);
  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 16px;
  
  --font-base: 'Segoe UI', system-ui, -apple-system, BlinkMacSystemFont, Roboto, sans-serif;
  --font-dyslexic: 'OpenDyslexic', 'Comic Sans MS', sans-serif;
  --font-size-multiplier: 1;
  --gov-topbar-height: 35px;
}

/* Modos de Accesibilidad WCAG 2.1 AA */
body.high-contrast {
  --bg-page: #000000 !important;
  --bg-surface: #121212 !important;
  --bg-subtle: #1e1e1e !important;
  --text-main: #ffff00 !important;   /* Amarillo de alto contraste */
  --text-muted: #ffffff !important;
  --border-color: #ffff00 !important;
  --gov-primary: #000000 !important;
  --gov-secondary: #ffff00 !important;
  --gov-accent: #00ff00 !important;
  --text-inverse: #000000 !important;
}

body.high-contrast a,
body.high-contrast button,
body.high-contrast h1,
body.high-contrast h2,
body.high-contrast h3,
body.high-contrast h4,
body.high-contrast p,
body.high-contrast span {
  color: #ffff00 !important;
  border-color: #ffff00 !important;
}

body.grayscale-mode {
  filter: grayscale(100%) !important;
}

body.dyslexic-font {
  font-family: var(--font-dyslexic) !important;
  letter-spacing: 0.05em !important;
  line-height: 1.8 !important;
}

body.links-underlined a {
  text-decoration: underline !important;
  font-weight: 700 !important;
}

/* Reset y Base */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  font-size: calc(16px * var(--font-size-multiplier));
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-base);
  background-color: var(--bg-page);
  color: var(--text-main);
  line-height: 1.6;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* Skip Link para Lectores de Pantalla */
.skip-link {
  position: absolute;
  top: -60px;
  left: 10px;
  background: var(--gov-accent);
  color: #000;
  padding: 10px 16px;
  z-index: 99999;
  font-weight: bold;
  border-radius: var(--radius-sm);
  transition: top 0.2s ease;
  text-decoration: none;
}
.skip-link:focus {
  top: 10px;
}

/* -------------------------------------------------------------
   1. BARRA SUPERIOR GOV.CO Y ACCESIBILIDAD MINTIC
   ------------------------------------------------------------- */
.gov-topbar {
  background: #3366cc;
  color: #fff;
  padding: 6px 16px;
  font-size: 0.82rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 2px solid #002244;
  position: sticky;
  top: 0;
  z-index: 1002;
  min-height: var(--gov-topbar-height);
  box-sizing: border-box;
}

.gov-topbar-brand {
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 700;
  letter-spacing: 0.5px;
}

.gov-flag {
  display: inline-flex;
  flex-direction: column;
  height: 16px;
  width: 24px;
  border-radius: 2px;
  overflow: hidden;
  box-shadow: 0 0 2px rgba(0,0,0,0.3);
  flex-shrink: 0;
}
.gov-flag-y { flex: 2; width: 100%; background: #FFD100; }
.gov-flag-b { flex: 1; width: 100%; background: #003893; }
.gov-flag-r { flex: 1; width: 100%; background: #CE1126; }

.gov-portal-link {
  color: #fff;
  text-decoration: none;
  display: flex;
  align-items: center;
  gap: 4px;
}
.gov-portal-link:hover {
  text-decoration: underline;
}

/* Barra de Accesibilidad */
.accessibility-bar {
  background: #1e293b;
  color: #f1f5f9;
  padding: 6px 16px;
  display: flex;
  justify-content: flex-end;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  font-size: 0.85rem;
}

.accessibility-bar span {
  font-weight: 600;
  margin-right: 4px;
}

.a11y-btn {
  background: #334155;
  color: #fff;
  border: 1px solid #475569;
  padding: 4px 10px;
  font-size: 0.8rem;
  border-radius: 4px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  transition: all 0.2s ease;
}
.a11y-btn:hover, .a11y-btn:focus {
  background: var(--gov-accent);
  color: #000;
  outline: 2px solid #fff;
}
.a11y-btn.active {
  background: var(--gov-accent);
  color: #000;
  font-weight: bold;
}

/* -------------------------------------------------------------
   2. CABECERA INSTITUCIONAL
   ------------------------------------------------------------- */
.header-institutional {
  background: linear-gradient(135deg, var(--gov-primary) 0%, #004d80 70%, var(--gov-secondary) 100%);
  color: #ffffff;
  padding: 24px 20px;
  border-bottom: 4px solid var(--gov-accent);
}

.header-container {
  max-width: 1280px;
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 20px;
  flex-wrap: wrap;
}

.institution-branding {
  display: flex;
  align-items: center;
  gap: 20px;
}

.crest-wrapper {
  width: 90px;
  height: 90px;
  background: #ffffff;
  border-radius: 50%;
  padding: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 12px rgba(0,0,0,0.25);
  border: 3px solid var(--gov-accent);
  flex-shrink: 0;
}

.crest-wrapper img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  border-radius: 50%;
}

.crest-svg {
  width: 100%;
  height: 100%;
}

.footer-brand-header {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 14px;
}

.footer-logo {
  width: 52px;
  height: 52px;
  border-radius: 50%;
  background: #ffffff;
  padding: 3px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.3);
  object-fit: contain;
  flex-shrink: 0;
}

.institution-titles h1 {
  font-size: 1.55rem;
  font-weight: 800;
  line-height: 1.25;
  letter-spacing: -0.5px;
  color: #ffffff;
  text-shadow: 0 2px 4px rgba(0,0,0,0.2);
}

.institution-meta {
  font-size: 0.85rem;
  color: #e2e8f0;
  margin-top: 4px;
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.institution-badge {
  background: rgba(255,255,255,0.15);
  padding: 2px 8px;
  border-radius: 4px;
  font-size: 0.75rem;
  font-weight: 600;
  border: 1px solid rgba(255,255,255,0.3);
}

.header-actions {
  display: flex;
  gap: 12px;
  align-items: center;
}

.btn-transparency-highlight {
  background: var(--gov-accent);
  color: #1a1a1a;
  padding: 12px 20px;
  border-radius: var(--radius-md);
  text-decoration: none;
  font-weight: 700;
  font-size: 0.95rem;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  box-shadow: 0 4px 14px rgba(243, 146, 0, 0.45);
  transition: transform 0.2s, box-shadow 0.2s, background 0.2s;
  border: 2px solid #ffffff;
}
.btn-transparency-highlight:hover, .btn-transparency-highlight:focus {
  transform: translateY(-2px);
  box-shadow: 0 6px 18px rgba(243, 146, 0, 0.6);
  background: #ffaa1a;
}

.btn-pqrs-quick {
  background: rgba(255,255,255,0.15);
  color: #ffffff;
  padding: 12px 18px;
  border-radius: var(--radius-md);
  text-decoration: none;
  font-weight: 600;
  font-size: 0.9rem;
  border: 1px solid rgba(255,255,255,0.4);
  transition: all 0.2s;
}
.btn-pqrs-quick:hover {
  background: #ffffff;
  color: var(--gov-primary);
}

/* -------------------------------------------------------------
   3. NAVEGACIÓN PRINCIPAL
   ------------------------------------------------------------- */
.main-navbar {
  background: #ffffff;
  border-bottom: 1px solid var(--border-color);
  position: sticky;
  top: var(--gov-topbar-height);
  z-index: 1001;
  box-shadow: var(--shadow-sm);
}

.navbar-container {
  max-width: 1280px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 16px;
}

.nav-links {
  display: flex;
  list-style: none;
  gap: 4px;
}

.nav-item {
  position: relative;
}

.nav-link {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 16px 14px;
  color: var(--text-main);
  text-decoration: none;
  font-weight: 600;
  font-size: 0.9rem;
  border-bottom: 3px solid transparent;
  transition: all 0.2s;
}

.nav-link:hover, .nav-link:focus, .nav-link.active {
  color: var(--gov-primary);
  border-bottom-color: var(--gov-secondary);
  background: var(--bg-subtle);
}

.nav-link.transparency-pill {
  color: #b45309;
  font-weight: 700;
}

/* Dropdown */
.dropdown-menu {
  position: absolute;
  top: 100%;
  left: 0;
  background: #ffffff;
  min-width: 260px;
  box-shadow: var(--shadow-lg);
  border: 1px solid var(--border-color);
  border-radius: 0 0 var(--radius-md) var(--radius-md);
  display: none;
  flex-direction: column;
  z-index: 1001;
  padding: 8px 0;
}

.nav-item:hover .dropdown-menu,
.nav-item:focus-within .dropdown-menu {
  display: flex;
}

.dropdown-link {
  padding: 10px 18px;
  color: var(--text-main);
  text-decoration: none;
  font-size: 0.87rem;
  font-weight: 500;
  display: flex;
  align-items: center;
  gap: 8px;
  transition: background 0.15s;
}
.dropdown-link:hover, .dropdown-link:focus {
  background: var(--gov-secondary-light);
  color: var(--gov-secondary);
}

.mobile-menu-btn {
  display: none;
  background: transparent;
  border: none;
  font-size: 1.5rem;
  cursor: pointer;
  padding: 8px;
  color: var(--gov-primary);
}

/* -------------------------------------------------------------
   4. HERO BANNER
   ------------------------------------------------------------- */
.hero-section {
  background: linear-gradient(rgba(0, 34, 68, 0.78), rgba(0, 85, 45, 0.78)), 
              url('https://images.unsplash.com/photo-1577896851231-70ef18881754?auto=format&fit=crop&w=1600&q=80') center/cover no-repeat;
  color: #ffffff;
  padding: 65px 20px;
  position: relative;
}

.hero-container {
  max-width: 1280px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1.3fr 0.9fr;
  gap: 40px;
  align-items: center;
}

.hero-content h2 {
  font-size: 2.35rem;
  font-weight: 800;
  line-height: 1.2;
  margin-bottom: 16px;
  text-shadow: 0 2px 4px rgba(0,0,0,0.3);
}

.hero-subtitle {
  font-size: 1.15rem;
  color: #f1f5f9;
  margin-bottom: 24px;
  line-height: 1.5;
}

.hero-badges-list {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 28px;
}

.hero-badge-tag {
  background: rgba(255,255,255,0.2);
  backdrop-filter: blur(8px);
  padding: 6px 14px;
  border-radius: 20px;
  font-size: 0.85rem;
  font-weight: 600;
  border: 1px solid rgba(255,255,255,0.35);
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.hero-cta-group {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
}

.btn-hero-primary {
  background: var(--gov-accent);
  color: #1a1a1a;
  padding: 14px 26px;
  font-weight: 700;
  border-radius: var(--radius-md);
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  box-shadow: 0 4px 15px rgba(243,146,0,0.5);
  transition: all 0.2s;
}
.btn-hero-primary:hover {
  background: #ffaa1a;
  transform: translateY(-2px);
}

.btn-hero-secondary {
  background: rgba(255,255,255,0.15);
  color: #fff;
  padding: 14px 22px;
  font-weight: 600;
  border-radius: var(--radius-md);
  text-decoration: none;
  border: 1px solid rgba(255,255,255,0.5);
  transition: background 0.2s;
}
.btn-hero-secondary:hover {
  background: rgba(255,255,255,0.3);
}

/* Tarjeta rápida de transparencia en Hero */
.hero-transparency-card {
  background: rgba(255, 255, 255, 0.96);
  backdrop-filter: blur(12px);
  border-radius: var(--radius-lg);
  padding: 28px;
  color: var(--text-main);
  box-shadow: var(--shadow-lg);
  border-top: 6px solid var(--gov-secondary);
}

.card-title-gov {
  font-size: 1.15rem;
  font-weight: 800;
  color: var(--gov-primary);
  margin-bottom: 12px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.card-desc {
  font-size: 0.88rem;
  color: var(--text-muted);
  margin-bottom: 20px;
}

.transparency-quick-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.quick-portal-btn {
  background: var(--bg-subtle);
  border: 1px solid var(--border-color);
  padding: 12px;
  border-radius: var(--radius-sm);
  text-decoration: none;
  color: var(--text-main);
  font-size: 0.84rem;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 8px;
  transition: all 0.2s;
}
.quick-portal-btn:hover {
  background: var(--gov-secondary-light);
  color: var(--gov-secondary);
  border-color: var(--gov-secondary);
  transform: translateY(-2px);
}

/* -------------------------------------------------------------
   5. SECCIÓN GENERAL Y CONTENEDORES
   ------------------------------------------------------------- */
.main-content {
  flex: 1;
}

.section-wrapper {
  padding: 60px 20px;
}
.section-wrapper.bg-alt {
  background-color: var(--bg-subtle);
}

.container {
  max-width: 1280px;
  margin: 0 auto;
}

.section-header {
  text-align: center;
  max-width: 800px;
  margin: 0 auto 40px auto;
}

.section-tag {
  color: var(--gov-secondary);
  text-transform: uppercase;
  font-weight: 800;
  font-size: 0.8rem;
  letter-spacing: 1.2px;
  margin-bottom: 6px;
  display: block;
}

.section-title {
  font-size: 2rem;
  font-weight: 800;
  color: var(--gov-primary);
  margin-bottom: 12px;
  position: relative;
  display: inline-block;
}

.section-title::after {
  content: '';
  display: block;
  width: 50px;
  height: 4px;
  background: var(--gov-accent);
  margin: 8px auto 0 auto;
  border-radius: 2px;
}

.section-description {
  color: var(--text-muted);
  font-size: 1rem;
}

/* Botón de lectura por voz para secciones */
.speak-section-btn {
  background: #f1f5f9;
  border: 1px solid var(--border-color);
  color: var(--gov-primary);
  padding: 4px 12px;
  border-radius: 20px;
  font-size: 0.78rem;
  font-weight: 600;
  cursor: pointer;
  margin-top: 10px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: all 0.2s;
}
.speak-section-btn:hover {
  background: var(--gov-primary);
  color: #fff;
}

/* -------------------------------------------------------------
   6. GRID DE NOTICIAS Y PUBLICACIONES (ADMIN / MYSQL)
   ------------------------------------------------------------- */
.news-filter-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 16px;
  margin-bottom: 28px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--border-color);
}

.news-categories {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.cat-btn {
  background: #fff;
  border: 1px solid var(--border-color);
  color: var(--text-main);
  padding: 6px 14px;
  border-radius: 20px;
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
}
.cat-btn:hover, .cat-btn.active {
  background: var(--gov-primary);
  color: #fff;
  border-color: var(--gov-primary);
}

.sync-status-indicator {
  font-size: 0.82rem;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  gap: 8px;
}

.dot-status {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: #10b981;
  display: inline-block;
}

.posts-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
  gap: 24px;
}

.post-card {
  background: #ffffff;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-color);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  display: flex;
  flex-direction: column;
  transition: transform 0.2s, box-shadow 0.2s;
}
.post-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-md);
}

.post-card-img-wrap {
  position: relative;
  height: 190px;
  background: #e2e8f0;
  overflow: hidden;
}

.post-card-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.3s ease;
}
.post-card:hover .post-card-img {
  transform: scale(1.05);
}

.post-category-tag {
  position: absolute;
  top: 12px;
  left: 12px;
  background: var(--gov-primary);
  color: #fff;
  padding: 4px 10px;
  font-size: 0.72rem;
  font-weight: 700;
  border-radius: 4px;
  text-transform: uppercase;
}

.post-card-body {
  padding: 20px;
  display: flex;
  flex-direction: column;
  flex: 1;
}

.post-date-author {
  font-size: 0.78rem;
  color: var(--text-muted);
  margin-bottom: 8px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.post-title {
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--gov-primary);
  line-height: 1.35;
  margin-bottom: 10px;
}

.post-excerpt {
  font-size: 0.88rem;
  color: var(--text-main);
  line-height: 1.5;
  margin-bottom: 18px;
  flex: 1;
}

.post-footer-btn {
  color: var(--gov-secondary);
  font-weight: 700;
  font-size: 0.88rem;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  cursor: pointer;
  background: none;
  border: none;
  padding: 0;
}
.post-footer-btn:hover {
  text-decoration: underline;
}

/* -------------------------------------------------------------
   7. SECCIÓN DE TRANSPARENCIA Y LEY 1712
   ------------------------------------------------------------- */
.transparency-tabs-nav {
  display: flex;
  gap: 8px;
  border-bottom: 2px solid var(--border-color);
  margin-bottom: 30px;
  overflow-x: auto;
  padding-bottom: 4px;
}

.transparency-tab-btn {
  background: none;
  border: none;
  padding: 12px 18px;
  font-weight: 700;
  font-size: 0.92rem;
  color: var(--text-muted);
  cursor: pointer;
  border-bottom: 3px solid transparent;
  white-space: nowrap;
  transition: all 0.2s;
  display: flex;
  align-items: center;
  gap: 8px;
}
.transparency-tab-btn:hover {
  color: var(--gov-primary);
}
.transparency-tab-btn.active {
  color: var(--gov-primary);
  border-bottom-color: var(--gov-accent);
  background: var(--bg-subtle);
  border-radius: var(--radius-sm) var(--radius-sm) 0 0;
}

html {
  scroll-behavior: smooth;
}

.transparency-pane {
  display: none;
  scroll-margin-top: 100px;
}
.transparency-pane.active {
  display: block;
}

.section-wrapper,
.pqrs-wrapper,
.table-responsive,
.contact-card {
  scroll-margin-top: 100px;
}

/* Tarjetas de contacto institucional */
.contact-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 20px;
}

.contact-card {
  background: #ffffff;
  padding: 24px;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-color);
  box-shadow: var(--shadow-sm);
}

.contact-card h3 {
  font-size: 1.1rem;
  color: var(--gov-primary);
  margin-bottom: 14px;
  display: flex;
  align-items: center;
  gap: 8px;
  border-bottom: 2px solid var(--gov-secondary-light);
  padding-bottom: 8px;
}

.contact-detail-row {
  margin-bottom: 12px;
  font-size: 0.9rem;
}
.contact-label {
  font-weight: 700;
  display: block;
  color: var(--text-muted);
  font-size: 0.78rem;
  text-transform: uppercase;
}

/* Sedes Educativas */
.sedes-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 16px;
  margin-top: 16px;
}

.sede-card {
  background: #fff;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 16px;
  border-left: 5px solid var(--gov-secondary);
}

.sede-card h4 {
  font-size: 0.98rem;
  color: var(--gov-primary);
  margin-bottom: 6px;
}
.sede-dane {
  font-size: 0.78rem;
  background: var(--bg-subtle);
  display: inline-block;
  padding: 2px 6px;
  border-radius: 4px;
  margin-bottom: 8px;
  font-family: monospace;
}

/* -------------------------------------------------------------
   8. PQRS FORMULARIO Y CANALES
   ------------------------------------------------------------- */
.pqrs-wrapper {
  background: #ffffff;
  border-radius: var(--radius-lg);
  border: 1px solid var(--border-color);
  box-shadow: var(--shadow-md);
  padding: 36px;
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 36px;
}

.form-group {
  margin-bottom: 18px;
}

.form-label {
  display: block;
  font-weight: 700;
  font-size: 0.88rem;
  margin-bottom: 6px;
  color: var(--text-main);
}
.form-label .required {
  color: #dc2626;
}

.form-input, .form-select, .form-textarea {
  width: 100%;
  padding: 10px 14px;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  font-family: inherit;
  font-size: 0.92rem;
  transition: border-color 0.2s, box-shadow 0.2s;
  background: #fff;
}
.form-input:focus, .form-select:focus, .form-textarea:focus {
  outline: none;
  border-color: var(--border-focus);
  box-shadow: 0 0 0 3px rgba(0, 86, 179, 0.2);
}

.btn-submit-pqrs {
  background: var(--gov-primary);
  color: #fff;
  padding: 14px 24px;
  font-size: 1rem;
  font-weight: 700;
  border: none;
  border-radius: var(--radius-sm);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  transition: background 0.2s;
  width: 100%;
  justify-content: center;
}
.btn-submit-pqrs:hover {
  background: var(--gov-primary-dark);
}

.pqrs-tracker-box {
  background: var(--bg-subtle);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 24px;
  margin-bottom: 24px;
}

.pqrs-tracker-box h4 {
  font-size: 1.05rem;
  color: var(--gov-primary);
  margin-bottom: 8px;
}

.tracker-form-inline {
  display: flex;
  gap: 8px;
  margin-top: 12px;
}

/* -------------------------------------------------------------
   9. TABLAS DE PRESUPUESTO, CONTRATACIÓN Y SECOP II
   ------------------------------------------------------------- */
.table-responsive {
  width: 100%;
  overflow-x: auto;
  margin: 16px 0;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
}

.gov-table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
  font-size: 0.88rem;
  background: #fff;
}

.gov-table th {
  background: var(--gov-primary);
  color: #fff;
  padding: 12px 16px;
  font-weight: 700;
}

.gov-table td {
  padding: 12px 16px;
  border-bottom: 1px solid var(--border-color);
}
.gov-table tr:hover {
  background: var(--bg-subtle);
}

.secop-banner-card {
  background: linear-gradient(135deg, #003366 0%, #0056b3 100%);
  color: #fff;
  padding: 24px;
  border-radius: var(--radius-md);
  margin-top: 24px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 20px;
  flex-wrap: wrap;
}

.secop-btn {
  background: var(--gov-accent);
  color: #000;
  font-weight: 700;
  padding: 12px 20px;
  border-radius: var(--radius-sm);
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 8px;
}
.secop-btn:hover {
  background: #ffaa1a;
}

/* -------------------------------------------------------------
   10. MODALES (DETALLE NOTICIA, TRATAMIENTO DATOS, ETC.)
   ------------------------------------------------------------- */
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0,0,0,0.6);
  backdrop-filter: blur(4px);
  z-index: 9999;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.modal-overlay.open {
  display: flex;
}

.modal-container {
  background: #fff;
  border-radius: var(--radius-lg);
  max-width: 760px;
  width: 100%;
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: var(--shadow-lg);
  display: flex;
  flex-direction: column;
}

.modal-header {
  padding: 18px 24px;
  background: var(--gov-primary);
  color: #fff;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.modal-title {
  font-size: 1.25rem;
  font-weight: 700;
}

.modal-close-btn {
  background: transparent;
  border: none;
  color: #fff;
  font-size: 1.5rem;
  cursor: pointer;
  line-height: 1;
}

.modal-body {
  padding: 24px;
  line-height: 1.7;
}

/* -------------------------------------------------------------
   11. FOOTER INSTITUCIONAL
   ------------------------------------------------------------- */
.gov-footer {
  background: #0f172a;
  color: #cbd5e1;
  border-top: 5px solid var(--gov-secondary);
  font-size: 0.88rem;
  margin-top: auto;
}

.footer-top {
  padding: 50px 20px 30px 20px;
}

.footer-grid {
  max-width: 1280px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 36px;
}

.footer-col h4 {
  color: #ffffff;
  font-size: 1.05rem;
  margin-bottom: 16px;
  border-bottom: 2px solid var(--gov-accent);
  padding-bottom: 6px;
  display: inline-block;
}

.footer-links-list {
  list-style: none;
}
.footer-links-list li {
  margin-bottom: 10px;
}
.footer-links-list a {
  color: #94a3b8;
  text-decoration: none;
  transition: color 0.2s;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.footer-links-list a:hover {
  color: #ffffff;
}

.footer-bottom {
  background: #020617;
  padding: 18px 20px;
  border-top: 1px solid #1e293b;
  text-align: center;
  font-size: 0.8rem;
  color: #64748b;
}

.footer-admin-link {
  color: #475569;
  text-decoration: none;
  margin-left: 12px;
  font-size: 0.75rem;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}
.footer-admin-link:hover {
  color: #94a3b8;
  text-decoration: underline;
}

/* -------------------------------------------------------------
   12. ESTILOS ESPECÍFICOS DE /ADMIN (ADMINISTRACIÓN)
   ------------------------------------------------------------- */
.admin-layout {
  min-height: 100vh;
  background: #f1f5f9;
  display: flex;
  flex-direction: column;
}

.admin-header {
  background: #0f172a;
  color: #fff;
  padding: 14px 24px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 3px solid var(--gov-secondary);
}

.admin-header-title {
  font-size: 1.15rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 10px;
}

.admin-container {
  max-width: 1320px;
  margin: 30px auto;
  padding: 0 20px;
  width: 100%;
}

.admin-stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 16px;
  margin-bottom: 28px;
}

.stat-card {
  background: #fff;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 20px;
  box-shadow: var(--shadow-sm);
  display: flex;
  align-items: center;
  gap: 16px;
}

.stat-icon {
  width: 48px;
  height: 48px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.4rem;
  background: var(--gov-secondary-light);
  color: var(--gov-secondary);
}

.stat-num {
  font-size: 1.6rem;
  font-weight: 800;
  color: var(--text-main);
  line-height: 1;
}
.stat-label {
  font-size: 0.8rem;
  color: var(--text-muted);
}

.admin-panels-grid {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 24px;
}

.admin-card {
  background: #fff;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-sm);
  padding: 24px;
  margin-bottom: 24px;
}

.admin-card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
  border-bottom: 1px solid var(--border-color);
  padding-bottom: 12px;
}
.admin-card-header h3 {
  font-size: 1.15rem;
  color: var(--gov-primary);
}

/* Banner de Notificación / Alerta */
.alert-box {
  padding: 12px 16px;
  border-radius: var(--radius-sm);
  margin-bottom: 16px;
  font-size: 0.88rem;
  display: flex;
  align-items: center;
  gap: 10px;
}
.alert-info {
  background: #eff6ff;
  border: 1px solid #bfdbfe;
  color: #1e40af;
}
.alert-success {
  background: #f0fdf4;
  border: 1px solid #bbf7d0;
  color: #166534;
}

/* Cloudinary Upload Component */
.cloudinary-dropzone {
  border: 2px dashed #93c5fd;
  background: #f8fbff;
  border-radius: var(--radius-md);
  padding: 16px;
  text-align: center;
  transition: all 0.2s ease;
  cursor: pointer;
  margin-bottom: 12px;
}
.cloudinary-dropzone:hover, .cloudinary-dropzone.dragover {
  border-color: #2563eb;
  background: #eff6ff;
}
.cloudinary-progress-bar-wrap {
  width: 100%;
  height: 8px;
  background: #e2e8f0;
  border-radius: 4px;
  overflow: hidden;
  margin-top: 10px;
  display: none;
}
.cloudinary-progress-bar-fill {
  height: 100%;
  background: #2563eb;
  width: 0%;
  transition: width 0.3s ease;
}
.cloudinary-preview-box {
  display: none;
  align-items: center;
  gap: 12px;
  margin-top: 10px;
  padding: 10px;
  background: #fff;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
}
.cloudinary-preview-thumb {
  width: 70px;
  height: 70px;
  object-fit: cover;
  border-radius: var(--radius-sm);
  border: 1px solid #cbd5e1;
}

/* Responsive */
@media (max-width: 992px) {
  .hero-container {
    grid-template-columns: 1fr;
  }
  .pqrs-wrapper {
    grid-template-columns: 1fr;
  }
  .admin-panels-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 768px) {
  .mobile-menu-btn {
    display: block;
  }
  .nav-links {
    display: none;
    flex-direction: column;
    width: 100%;
    padding: 10px 0;
  }
  .nav-links.open {
    display: flex;
  }
  .navbar-container {
    flex-wrap: wrap;
  }
  .dropdown-menu {
    position: static;
    box-shadow: none;
    border-left: 3px solid var(--gov-accent);
  }
  .institution-titles h1 {
    font-size: 1.25rem;
  }
}
