/* =====================================================================
   UFIDET Salta / IES N° 6036 - Hoja de Estilos Global Rediseñada (UI/UX)
   Paleta Corporativa: Celestes Tecnológicos, Azules Profundos y Blancos Puros
   ===================================================================== */

:root {
  /* Paleta Corporativa Principal */
  --color-blue-brand: #0284c7;    /* Azul Corporativo Sky 600 */
  --color-blue-dark: #0369a1;     /* Azul Marino Sky 700 */
  --color-blue-deep: #0c4a6e;     /* Azul Institucional Sky 900 */
  --color-cyan-vibrant: #0ea5e9;  /* Celeste Vibrante Sky 500 */
  --color-cyan-neon: #06b6d4;     /* Cian Tecnológico Cyan 500 */
  --color-cyan-glow: #38bdf8;     /* Cian Luminoso Sky 400 */
  
  /* Tonos Espaciales y Fondos Oscuros */
  --color-space-deep: #020617;    /* Slate 950 */
  --color-space-night: #0f172a;   /* Slate 900 */
  --color-space-surface: #1e293b; /* Slate 800 */
  
  /* Tonos Claros y Superficies Suaves */
  --color-bg-light: #f8fafc;      /* Slate 50 ultra suave */
  --color-surface-white: #ffffff; /* Blanco Puro */
  --color-border-subtle: rgba(226, 232, 240, 0.85); /* Borde sutil */
  --color-border-hover: rgba(14, 165, 233, 0.45);   /* Borde interactivo */

  /* Sombras Modernas Multinivel con Reflejo Azul */
  --shadow-subtle: 0 2px 8px -1px rgba(15, 23, 42, 0.04), 0 1px 3px -1px rgba(15, 23, 42, 0.02);
  --shadow-card: 0 4px 20px -2px rgba(15, 23, 42, 0.05), 0 2px 6px -1px rgba(15, 23, 42, 0.03);
  --shadow-card-hover: 0 20px 35px -8px rgba(2, 132, 199, 0.16), 0 8px 16px -4px rgba(15, 23, 42, 0.06);
  --shadow-glass: 0 8px 32px 0 rgba(15, 23, 42, 0.07);
  --glow-cyan: 0 0 25px rgba(6, 182, 212, 0.25);
  --glow-cyan-strong: 0 0 35px rgba(6, 182, 212, 0.45);
  --glow-blue: 0 0 25px rgba(2, 132, 199, 0.3);
}

/* =====================================================================
   Base, Tipografía y Scroll Suave
   ===================================================================== */
html {
  scroll-behavior: smooth;
  scroll-padding-top: 5.5rem;
}

body {
  background-color: #f8fafc;
  background-image: 
    radial-gradient(circle at 10% 15%, rgba(14, 165, 233, 0.04) 0%, transparent 40%),
    radial-gradient(circle at 90% 85%, rgba(2, 132, 199, 0.04) 0%, transparent 40%);
  background-attachment: fixed;
  color: #1e293b;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* Selección de texto con realce corporativo */
::selection {
  background: #bae6fd;
  color: #0369a1;
}

/* Scrollbar moderno estilizado */
::-webkit-scrollbar {
  width: 9px;
  height: 9px;
}
::-webkit-scrollbar-track {
  background: #f1f5f9;
}
::-webkit-scrollbar-thumb {
  background: #cbd5e1;
  border-radius: 9999px;
  border: 2px solid #f1f5f9;
  transition: background 0.2s ease;
}
::-webkit-scrollbar-thumb:hover {
  background: #0284c7;
}

/* =====================================================================
   Alineación Global a Ambos Márgenes (Justificado en Todo el Proyecto)
   ===================================================================== */
p, 
article p, 
section p, 
main p, 
.academic-card p, 
.card-text-clamp, 
.expandable-text-container p, 
.text-content, 
.text-content p, 
.text-justify, 
.prose p, 
.prose div, 
.prose-slate p, 
.career-desc,
.profile-text,
article .space-y-4 p {
  text-align: justify !important;
  text-justify: inter-word !important;
}

/* Forzar que cualquier elemento con clase .text-justify siempre se justifique */
.text-justify {
  text-align: justify !important;
  text-justify: inter-word !important;
}

/* Preservación estricta de títulos y encabezados (alineados a la izquierda) */
h1, h2, h3, h4, h5, h6 {
  text-align: left !important;
}

/* Títulos y textos explícitamente centrados */
.text-center,
.text-center :is(h1, h2, h3, h4, h5, h6),
:is(h1, h2, h3, h4, h5, h6).text-center,
p.text-center,
span.text-center,
div.text-center > p,
div.text-center > h2,
div.text-center > h1 {
  text-align: center !important;
}

/* Textos explícitamente a la derecha o izquierda */
.text-right,
p.text-right,
td.text-right,
th.text-right {
  text-align: right !important;
}

.text-left,
p.text-left {
  text-align: left !important;
}

/* Preservar alineación natural en menús, navegación y controles interactivos */
header, 
header *,
nav, 
nav *, 
.dropdown-menu, 
.dropdown-menu *, 
.dropdown-group, 
.glass-nav-tech,
input:not([type="button"]):not([type="submit"]):not([type="reset"]), 
select, 
.badge-status, 
.badge {
  text-align: left;
}

/* Preservar centrado en botones y enlaces de acción */
button, 
button *, 
.btn, 
.btn *, 
.btn-tech-primary, 
.btn-toggle-expand,
[role="button"], 
a.btn, 
input[type="button"], 
input[type="submit"], 
input[type="reset"] {
  text-align: center !important;
}

/* =====================================================================
   Alineación a Ambos Márgenes (Justificado) en Admin y Módulos Específicos
   ===================================================================== */
.admin-nosotros-view,
.admin-nosotros-view p,
.admin-nosotros-view .card-text,
.admin-nosotros-view textarea,
.admin-nosotros-view table td:not(:last-child),
.admin-nosotros-view table th:not(:last-child),
.admin-nosotros-view .text-content,
.admin-nosotros-view label {
  text-align: justify !important;
  text-justify: inter-word !important;
}

.admin-nosotros-view table td:last-child,
.admin-nosotros-view table th:last-child {
  text-align: right !important;
}

.admin-nosotros-view button[type="submit"],
.admin-nosotros-view .btn-submit {
  text-align: center !important;
}

/* =====================================================================
   Alineación a Ambos Márgenes (Justificado) en Vista Nosotros e Historia
   ===================================================================== */
#historia,
#historia .prose,
#historia .prose p,
#historia .prose div,
#historia p,
.prose,
.prose p,
.prose-slate,
.prose-slate p {
  text-align: justify !important;
  text-justify: inter-word !important;
}

#historia h1,
#historia h2,
#historia h3,
#historia h4,
#historia span.text-brand-600 {
  text-align: left !important;
}

/* =====================================================================
   Rediseño de Tarjetas (Cards) Modernas & Efectos de Profundidad
   ===================================================================== */
.academic-card,
article.bg-white,
.card-modern {
  background: #ffffff;
  border-radius: 1.5rem !important;
  border: 1px solid var(--color-border-subtle);
  box-shadow: var(--shadow-card);
  transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1), 
              box-shadow 0.3s cubic-bezier(0.16, 1, 0.3, 1), 
              border-color 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  will-change: transform, box-shadow;
}

.academic-card:hover,
article.bg-white:hover,
.card-modern:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-card-hover);
  border-color: var(--color-border-hover) !important;
}

/* Glassmorphism para Tarjetas Claras */
.glass-card-light {
  background: rgba(255, 255, 255, 0.88);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid rgba(255, 255, 255, 0.8);
  box-shadow: var(--shadow-glass);
}

/* Glassmorphism para Paneles Oscuros */
.glass-card-dark {
  background: rgba(15, 23, 42, 0.85);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid rgba(255, 255, 255, 0.12);
  box-shadow: 0 20px 40px -10px rgba(0, 0, 0, 0.45);
}

/* Glassmorphism Tecnológico para Navbar */
.glass-nav-tech {
  background: rgba(15, 23, 42, 0.94) !important;
  backdrop-filter: blur(20px) !important;
  -webkit-backdrop-filter: blur(20px) !important;
  border-bottom: 1px solid rgba(56, 189, 248, 0.18) !important;
  box-shadow: 0 10px 35px -5px rgba(0, 0, 0, 0.35);
}

/* Transiciones Suaves y Elevación en Menús Desplegables */
.dropdown-menu {
  display: block;
  opacity: 0;
  visibility: hidden;
  transform: translateY(10px) scale(0.98);
  pointer-events: none;
  transition: opacity 0.22s cubic-bezier(0.16, 1, 0.3, 1),
              transform 0.22s cubic-bezier(0.16, 1, 0.3, 1),
              visibility 0.22s;
  transform-origin: top center;
  border: 1px solid rgba(56, 189, 248, 0.25) !important;
  box-shadow: 0 20px 40px -10px rgba(0, 0, 0, 0.5), 0 0 20px rgba(6, 182, 212, 0.15);
}

.dropdown-group:hover .dropdown-menu,
.dropdown-group:focus-within .dropdown-menu,
.group:hover .dropdown-menu {
  opacity: 1 !important;
  visibility: visible !important;
  transform: translateY(0) scale(1) !important;
  pointer-events: auto !important;
}

/* =====================================================================
   Botones Interactivos, Efectos Hover y Transiciones
   ===================================================================== */
/* Botón Primario con Gradiente Tecnológico y Microinteracción */
.btn-tech-primary,
.btn-primary-gradient {
  background: linear-gradient(135deg, #0ea5e9 0%, #0284c7 50%, #0369a1 100%) !important;
  color: #ffffff !important;
  box-shadow: 0 6px 18px -3px rgba(2, 132, 199, 0.35);
  transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
  position: relative;
  overflow: hidden;
}

.btn-tech-primary:hover,
.btn-primary-gradient:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 25px -4px rgba(2, 132, 199, 0.5), 0 0 20px rgba(14, 165, 233, 0.3);
  filter: brightness(1.05);
}

.btn-tech-primary:active,
.btn-primary-gradient:active {
  transform: translateY(0) scale(0.98);
}

/* Botón Secundario Moderno */
.btn-secondary-modern {
  background: #ffffff;
  color: #0f172a;
  border: 1px solid #e2e8f0;
  box-shadow: 0 2px 6px rgba(15, 23, 42, 0.04);
  transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

.btn-secondary-modern:hover {
  background: #f0f9ff;
  color: #0284c7;
  border-color: #7dd3fc;
  transform: translateY(-2px);
  box-shadow: 0 8px 18px -4px rgba(2, 132, 199, 0.15);
}

/* Microinteracción de iconos dentro de botones o enlaces */
.group:hover .arrow-icon,
.group:hover svg.transition-transform {
  transform: translateX(3px);
}

/* =====================================================================
   Formularios y Controles con Foco Visual Accesible
   ===================================================================== */
input[type="text"],
input[type="email"],
input[type="number"],
input[type="url"],
input[type="date"],
input[type="search"],
select,
textarea {
  border: 1.5px solid #cbd5e1;
  border-radius: 0.875rem;
  transition: border-color 0.2s ease, box-shadow 0.2s ease, background-color 0.2s ease;
}

input:focus,
select:focus,
textarea:focus {
  outline: none;
  border-color: #0284c7 !important;
  box-shadow: 0 0 0 3px rgba(14, 165, 233, 0.25) !important;
  background-color: #ffffff !important;
}

/* =====================================================================
   Panel de Administración: Cohesión y Estética Unificada
   ===================================================================== */
body.bg-slate-100 .bg-white.rounded-2xl {
  border-radius: 1.5rem !important;
  border: 1px solid rgba(226, 232, 240, 0.95);
  box-shadow: var(--shadow-card);
  transition: box-shadow 0.25s ease, border-color 0.25s ease;
}

body.bg-slate-100 .bg-white.rounded-2xl:hover {
  box-shadow: var(--shadow-md-modern);
}

/* Tablas Administrativas Modernizadas */
table {
  border-collapse: separate;
  border-spacing: 0;
}

table th {
  font-weight: 700;
  letter-spacing: 0.05em;
  font-size: 0.72rem;
  color: #64748b;
  border-bottom: 1.5px solid #e2e8f0;
}

table tbody tr {
  transition: background-color 0.18s ease;
}

table tbody tr:hover {
  background-color: rgba(240, 249, 255, 0.75) !important;
}

/* =====================================================================
   Efectos Visuales: Gradientes de Texto y Resplandores Tecnológicos
   ===================================================================== */
.tech-gradient-text {
  background: linear-gradient(135deg, #ffffff 0%, #e2e8f0 40%, #22d3ee 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.tech-gradient-accent {
  background: linear-gradient(135deg, #38bdf8 0%, #06b6d4 50%, #0284c7 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.tech-glow {
  box-shadow: 0 0 25px rgba(6, 182, 212, 0.2);
}

.tech-glow-hover {
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}
.tech-glow-hover:hover {
  transform: translateY(-4px);
  border-color: rgba(6, 182, 212, 0.6) !important;
  box-shadow: 0 0 30px rgba(6, 182, 212, 0.25), 0 20px 25px -5px rgba(15, 23, 42, 0.15);
}

/* Contenedor del Mapa Satelital / GPS */
.map-responsive-container {
  position: relative;
  overflow: hidden;
  border-radius: 1.5rem;
  box-shadow: 0 10px 30px -5px rgba(0, 0, 0, 0.25), 0 0 20px rgba(6, 182, 212, 0.1);
  min-height: 420px;
}

.map-responsive-container iframe {
  width: 100%;
  height: 100%;
  min-height: 420px;
  border: 0;
}

/* Badges con estilo Píldora */
.badge-status,
.status-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.375rem;
  padding: 0.25rem 0.625rem;
  font-size: 0.72rem;
  font-weight: 700;
  border-radius: 9999px;
  letter-spacing: 0.025em;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.badge-status:hover,
.status-badge:hover {
  transform: scale(1.04);
}

/* Notificación flotante / Toast */
.toast-notification {
  position: fixed;
  bottom: 2rem;
  right: 2rem;
  z-index: 9999;
  min-width: 320px;
  max-width: 450px;
  transform: translateY(100px);
  opacity: 0;
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}
.toast-notification.active {
  transform: translateY(0);
  opacity: 1;
}

/* Spinner animado */
.spinner {
  border: 3px solid rgba(255, 255, 255, 0.3);
  border-radius: 50%;
  border-top-color: #fff;
  width: 20px;
  height: 20px;
  animation: spin 0.8s linear infinite;
  display: inline-block;
  vertical-align: middle;
}
@keyframes spin {
  to { transform: rotate(360deg); }
}

/* =====================================================================
   Truncado Multilínea y Expansión Dinámica "Leer más / Leer menos"
   ===================================================================== */
.card-text-clamp {
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 3;
  line-clamp: 3;
  overflow: hidden;
  text-overflow: ellipsis;
  word-break: break-word;
  transition: max-height 0.3s ease-in-out;
}

.card-text-clamp.is-expanded {
  display: block !important;
  -webkit-line-clamp: unset !important;
  line-clamp: unset !important;
  overflow: visible !important;
}

.btn-toggle-expand {
  cursor: pointer;
  user-select: none;
  background: transparent;
  border: 0;
  padding: 0;
}

.btn-toggle-expand.is-expanded .arrow-icon {
  transform: rotate(180deg);
}

/* =====================================================================
   ESTILO BOTÓN 'LEER MÁS' CON EFECTOS Y HOVER DINÁMICO
   ===================================================================== */
.btn-leer-mas {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  font-size: 0.8125rem;
  font-weight: 700;
  color: #0284c7;
  text-decoration: none;
  padding: 0.35rem 0.75rem;
  border-radius: 0.75rem;
  background-color: #f0f9ff;
  border: 1px solid #bae6fd;
  transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: 0 1px 2px rgba(2, 132, 199, 0.05);
}

.btn-leer-mas:hover {
  color: #ffffff;
  background-color: #0284c7;
  border-color: #0284c7;
  transform: translateX(3px);
  box-shadow: 0 4px 12px rgba(2, 132, 199, 0.25);
}

.btn-leer-mas .icono-flecha {
  transition: transform 0.25s ease;
}

.btn-leer-mas:hover .icono-flecha {
  transform: translateX(3px);
}

/* Reglas line-clamp para tarjetas */
.line-clamp-2 {
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  line-clamp: 2;
  overflow: hidden;
  text-overflow: ellipsis;
}

.line-clamp-3 {
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 3;
  line-clamp: 3;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* =====================================================================
   Hero Banner Split Screen & Glassmorphism Video Player
   ===================================================================== */
.hero-glass-card {
  background: rgba(15, 23, 42, 0.72);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid rgba(6, 182, 212, 0.35);
  box-shadow: 0 20px 50px rgba(2, 6, 23, 0.6), 0 0 30px rgba(6, 182, 212, 0.18);
  transition: all 0.4s ease;
}

.hero-glass-card:hover {
  border-color: rgba(34, 211, 238, 0.55);
  box-shadow: 0 25px 60px rgba(2, 6, 23, 0.7), 0 0 45px rgba(6, 182, 212, 0.3);
}

.hero-video-wrapper {
  position: relative;
  border-radius: 1.25rem;
  overflow: hidden;
  background-color: #020617;
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.hero-video-wrapper video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.hero-badge-live {
  display: inline-flex;
  align-items: center;
  gap: 0.375rem;
  padding: 0.25rem 0.625rem;
  border-radius: 9999px;
  background: rgba(6, 182, 212, 0.12);
  border: 1px solid rgba(34, 211, 238, 0.35);
  color: #67e8f9;
  font-size: 0.6875rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.hero-pulse-dot {
  width: 0.5rem;
  height: 0.5rem;
  border-radius: 9999px;
  background-color: #22d3ee;
  animation: pulse-glow 2s cubic-bezier(0.4, 0, 0.6, 1) infinite;
}

@keyframes pulse-glow {
  0%, 100% {
    opacity: 1;
    transform: scale(1);
    box-shadow: 0 0 10px #22d3ee;
  }
  50% {
    opacity: 0.4;
    transform: scale(0.85);
    box-shadow: 0 0 2px #22d3ee;
  }
}

/* =====================================================================
   Garantizar contraste y visibilidad en cuadros de texto de Configuración
   (Previene que los cuadros se pongan blancos o el texto se vuelva invisible)
   ===================================================================== */
#hero_titulo,
#hero_descripcion,
.admin-input-hero,
input.admin-input-hero,
textarea.admin-input-hero {
  background-color: #020617 !important;
  color: #f8fafc !important;
  -webkit-text-fill-color: #f8fafc !important;
  border-color: #334155 !important;
  caret-color: #22d3ee !important;
}

#hero_titulo:focus,
#hero_descripcion:focus,
.admin-input-hero:focus,
input.admin-input-hero:focus,
textarea.admin-input-hero:focus {
  background-color: #020617 !important;
  color: #ffffff !important;
  -webkit-text-fill-color: #ffffff !important;
  border-color: #22d3ee !important;
  box-shadow: 0 0 0 3px rgba(34, 211, 238, 0.3) !important;
  outline: none !important;
}

#hero_titulo::placeholder,
#hero_descripcion::placeholder,
.admin-input-hero::placeholder {
  color: #64748b !important;
  -webkit-text-fill-color: #64748b !important;
}

/* Evitar que el autofill o autocompletado del navegador (Chrome, Brave, Edge) 
   fuerce fondo blanco o vuelva las letras invisibles */
#hero_titulo:-webkit-autofill,
#hero_titulo:-webkit-autofill:hover,
#hero_titulo:-webkit-autofill:focus,
#hero_titulo:-webkit-autofill:active,
#hero_descripcion:-webkit-autofill,
#hero_descripcion:-webkit-autofill:hover,
#hero_descripcion:-webkit-autofill:focus,
#hero_descripcion:-webkit-autofill:active,
.admin-input-hero:-webkit-autofill,
.admin-input-hero:-webkit-autofill:hover,
.admin-input-hero:-webkit-autofill:focus,
.admin-input-hero:-webkit-autofill:active {
  -webkit-text-fill-color: #f8fafc !important;
  -webkit-box-shadow: 0 0 0px 1000px #020617 inset !important;
  box-shadow: 0 0 0px 1000px #020617 inset !important;
  transition: background-color 5000s ease-in-out 0s;
  caret-color: #22d3ee !important;
}

/* =====================================================================
   Formato de Contenido Enriquecido (WYSIWYG / Editor HTML)
   ===================================================================== */
.contenido-enriquecido,
.prose-contenido {
  word-break: break-word;
}

.contenido-enriquecido ul,
.prose ul,
.prose-contenido ul {
  list-style-type: disc !important;
  margin-left: 1.75rem !important;
  margin-top: 0.75rem !important;
  margin-bottom: 0.75rem !important;
}

.contenido-enriquecido ol,
.prose ol,
.prose-contenido ol {
  list-style-type: decimal !important;
  margin-left: 1.75rem !important;
  margin-top: 0.75rem !important;
  margin-bottom: 0.75rem !important;
}

.contenido-enriquecido li,
.prose li,
.prose-contenido li {
  margin-bottom: 0.35rem !important;
  display: list-item !important;
  text-align: left !important;
}

.contenido-enriquecido strong,
.prose strong,
.prose-contenido strong,
.contenido-enriquecido b {
  font-weight: 700 !important;
  color: #0f172a !important;
}

.contenido-enriquecido em,
.prose em,
.prose-contenido em,
.contenido-enriquecido i {
  font-style: italic !important;
}

.contenido-enriquecido u {
  text-decoration: underline !important;
}

.contenido-enriquecido a,
.prose a,
.prose-contenido a {
  color: #0284c7 !important;
  text-decoration: underline !important;
  font-weight: 600 !important;
}

.contenido-enriquecido a:hover,
.prose a:hover,
.prose-contenido a:hover {
  color: #0369a1 !important;
}

.contenido-enriquecido blockquote,
.prose blockquote,
.prose-contenido blockquote {
  border-left: 4px solid #0284c7 !important;
  padding-left: 1rem !important;
  font-style: italic !important;
  color: #475569 !important;
  margin: 1rem 0 !important;
}

.contenido-enriquecido h2,
.prose h2,
.prose-contenido h2 {
  font-size: 1.35rem !important;
  font-weight: 800 !important;
  color: #0f172a !important;
  margin-top: 1.25rem !important;
  margin-bottom: 0.5rem !important;
}

.contenido-enriquecido h3,
.prose h3,
.prose-contenido h3 {
  font-size: 1.15rem !important;
  font-weight: 700 !important;
  color: #1e293b !important;
  margin-top: 1rem !important;
  margin-bottom: 0.4rem !important;
}

.contenido-enriquecido p,
.prose-contenido p {
  margin-bottom: 0.85rem !important;
}

/* Respetar alineación personalizada del editor WYSIWYG (Quill.js y estilos inline) frente a las reglas globales */
.contenido-enriquecido p:not(.ql-align-center):not(.ql-align-right):not(.ql-align-justify):not([style*="text-align"]),
.contenido-enriquecido div:not(.ql-align-center):not(.ql-align-right):not(.ql-align-justify):not([style*="text-align"]) {
  text-align: left !important;
}

.contenido-enriquecido .ql-align-left,
.contenido-enriquecido [style*="text-align: left"],
.contenido-enriquecido [style*="text-align:left"] {
  text-align: left !important;
}

.contenido-enriquecido .ql-align-center,
.contenido-enriquecido [style*="text-align: center"],
.contenido-enriquecido [style*="text-align:center"] {
  text-align: center !important;
}

.contenido-enriquecido .ql-align-right,
.contenido-enriquecido [style*="text-align: right"],
.contenido-enriquecido [style*="text-align:right"] {
  text-align: right !important;
}

.contenido-enriquecido .ql-align-justify,
.contenido-enriquecido [style*="text-align: justify"],
.contenido-enriquecido [style*="text-align:justify"] {
  text-align: justify !important;
  text-justify: inter-word !important;
}

/* Asegurar padding-left explícito en listas dentro de contenido enriquecido */
.contenido-enriquecido ul,
.contenido-enriquecido ol {
  padding-left: 1.5rem !important;
  margin-left: 0.25rem !important;
}

/* =====================================================================
   Sección de Noticias / Feed Moderno en Portada (Rotativo)
   ===================================================================== */
.noticias-rotador-viewport {
  overflow: hidden;
  padding: 4px 2px;
  transition: height 0.35s ease;
}

.noticias-rotador-track {
  will-change: transform;
}

.noticias-feed-list {
  list-style: none !important;
  padding: 0 !important;
  margin: 0 !important;
  display: flex;
  flex-direction: column;
  gap: 0.875rem;
}

.noticia-feed-item {
  margin: 0;
  padding: 0;
}

.noticia-feed-link {
  display: flex;
  align-items: flex-start;
  gap: 1.125rem;
  padding: 1.125rem 1.25rem;
  border-radius: 1rem;
  background-color: #ffffff;
  border: 1px solid #e2e8f0;
  box-shadow: 0 1px 3px rgba(15, 23, 42, 0.04);
  text-decoration: none !important;
  transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

.noticia-feed-link:hover {
  border-color: #10b981;
  background-color: #f8fafc;
  box-shadow: 0 10px 25px -8px rgba(16, 185, 129, 0.16), 0 4px 10px -4px rgba(15, 23, 42, 0.05);
  transform: translateY(-2px);
}

.noticia-badge-cuadrado {
  width: 52px;
  height: 52px;
  min-width: 52px;
  border-radius: 0.75rem;
  background: linear-gradient(135deg, #10b981 0%, #059669 100%);
  color: #ffffff;
  font-size: 1.25rem;
  font-weight: 800;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 6px 14px -3px rgba(16, 185, 129, 0.35);
  transition: transform 0.25s ease;
  margin-top: 2px;
}

.noticia-feed-link:hover .noticia-badge-cuadrado {
  transform: scale(1.06);
}

.noticia-feed-texto {
  flex: 1 1 auto;
  min-width: 0;
  text-align: left !important;
}

.noticia-feed-meta {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 0.25rem;
  font-size: 0.75rem;
}

.noticia-meta-categoria {
  font-weight: 700;
  color: #059669;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  font-size: 0.7rem;
}

.noticia-meta-sep {
  color: #cbd5e1;
}

.noticia-meta-fecha {
  color: #64748b;
  font-weight: 500;
}

.noticia-meta-destacado {
  font-size: 0.65rem;
  font-weight: 700;
  padding: 0.1rem 0.45rem;
  border-radius: 9999px;
  background-color: #fef3c7;
  color: #b45309;
  border: 1px solid #fde68a;
}

.noticia-feed-titulo {
  font-size: 1.05rem;
  font-weight: 700;
  color: #0f172a;
  line-height: 1.35;
  margin: 0 0 0.25rem 0;
  text-align: left !important;
  transition: color 0.2s ease;
}

.noticia-feed-link:hover .noticia-feed-titulo {
  color: #047857;
}

.noticia-feed-resumen {
  font-size: 0.8125rem;
  color: #475569;
  line-height: 1.55;
  margin: 0;
  text-align: left !important;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.noticia-feed-flecha {
  align-self: center;
  color: #94a3b8;
  flex-shrink: 0;
  transition: transform 0.2s ease, color 0.2s ease;
}

.noticia-feed-link:hover .noticia-feed-flecha {
  color: #059669;
  transform: translateX(4px);
}

@media (max-width: 640px) {
  .noticia-feed-link {
    padding: 0.875rem 1rem;
    gap: 0.875rem;
  }
  .noticia-badge-cuadrado {
    width: 44px;
    height: 44px;
    min-width: 44px;
    font-size: 1.1rem;
  }
  .noticia-feed-flecha {
    display: none;
  }
}

/* =====================================================================
   Listas y Sublistas Institucionales en Nosotros (#historia)
   ===================================================================== */
.nosotros-lista {
  list-style-type: disc !important;
  padding-left: 1.25rem !important;
  margin: 0 !important;
}

.nosotros-lista > li {
  display: list-item !important;
  margin-bottom: 0.5rem;
  line-height: 1.6;
  text-align: left !important;
}

.nosotros-lista > li:last-child {
  margin-bottom: 0;
}

.nosotros-sublista {
  list-style-type: circle !important;
  padding-left: 1.25rem !important;
  margin-top: 0.375rem !important;
  margin-bottom: 0.25rem !important;
}

.nosotros-sublista > li {
  display: list-item !important;
  margin-bottom: 0.25rem;
  line-height: 1.55;
  text-align: left !important;
}

