/* ==============================================================================
   SISTEMA DE ELECCIONES CCM DGIRE - UNAM (CICLO 2026-2030)
   ESTILO INSTITUCIONAL UNAM + MACOS PRO GLASSMORPHISM (UI/UX PRO MAX)
   ============================================================================== */

@import url('https://fonts.googleapis.com/css2?family=Albert+Sans:wght@400;500;600;700;800&family=Inter:wght@300;400;500;600;700;800&family=Poppins:wght@500;600;700;800;900&family=JetBrains+Mono:wght@400;600&display=swap');

:root {
  /* Paleta Institucional UNAM de Alta Fidelidad */
  --unam-blue-dark: #00182E;
  --unam-blue: #002B49;
  --unam-blue-light: #0B3B60;
  --unam-blue-soft: #EBF3FA;
  --unam-blue-subtle: #F0F6FC;
  
  /* Oro Universitario de Alto Impacto */
  --unam-gold: #D4AF37;
  --unam-gold-dark: #B59325;
  --unam-gold-light: #F7E9B8;
  --unam-gold-subtle: #FCF9EE;
  --unam-gold-glow: rgba(212, 175, 55, 0.4);
  
  /* Acentos de Estado y Feedback */
  --emerald-500: #10B981;
  --emerald-600: #059669;
  --emerald-soft: #ECFDF5;
  --ruby-500: #EF4444;
  --ruby-soft: #FEF2F2;
  --amber-500: #F59E0B;
  --amber-soft: #FFFBEB;

  /* Superficies y Neutros macOS */
  --mac-bg: #F8FAFC;
  --mac-card-bg: rgba(255, 255, 255, 0.88);
  --mac-card-solid: #FFFFFF;
  --mac-border: rgba(226, 232, 240, 0.85);
  --mac-border-subtle: rgba(0, 43, 73, 0.08);
  --mac-text-main: #0F172A;
  --mac-text-muted: #475569;
  --mac-text-light: #94A3B8;

  /* Glassmorphism y Sombras Multi-capa */
  --glass-blur: blur(20px);
  --glass-border: 1px solid rgba(255, 255, 255, 0.7);
  --glass-shadow: 0 10px 30px -5px rgba(0, 43, 73, 0.06), 0 0 0 1px rgba(0, 43, 73, 0.04);
  --glass-shadow-hover: 0 20px 40px -10px rgba(0, 43, 73, 0.14), 0 0 0 1px rgba(212, 175, 55, 0.3);
  --glass-shadow-gold: 0 15px 35px -8px rgba(212, 175, 55, 0.35);

  --radius-sm: 10px;
  --radius-md: 16px;
  --radius-lg: 24px;
  --radius-xl: 32px;
  --radius-pill: 9999px;

  --ease-spring: cubic-bezier(0.16, 1, 0.3, 1);
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  background-color: var(--mac-bg);
  color: var(--mac-text-main);
  line-height: 1.6;
  min-height: 100vh;
  overflow-x: hidden;
  position: relative;
  -webkit-font-smoothing: antialiased;
}

/* Fondo decorativo con gradientes sutiles institucionales */
body::before {
  content: '';
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: 680px;
  background: radial-gradient(circle at 50% -20%, rgba(0, 43, 73, 0.07) 0%, rgba(212, 175, 55, 0.05) 45%, transparent 80%);
  pointer-events: none;
  z-index: -1;
}

h1, h2, h3, h4, h5, h6 {
  font-family: 'Poppins', -apple-system, BlinkMacSystemFont, sans-serif;
  font-weight: 700;
  color: var(--unam-blue);
  letter-spacing: -0.025em;
  line-height: 1.25;
}

/* ==============================================================================
   BARRA DE AVISOS Y BANNER INSTITUCIONAL
   ============================================================================== */
.top-notice-banner {
  position: relative;
  background: linear-gradient(90deg, #FEF3C7 0%, #FFFBEB 100%);
  border-bottom: 1px solid #FDE68A;
  color: #92400E;
  padding: 0.4rem 1.25rem;
  z-index: 990;
  margin-top: 82px;
  animation: slideDownNotice 0.3s var(--ease-spring);
}

@keyframes slideDownNotice {
  from { transform: translateY(-100%); opacity: 0; }
  to { transform: translateY(0); opacity: 1; }
}

/* ==============================================================================
   BARRA DE NAVEGACIÓN SUPERIOR FIJA MACOS GLASS (TRANSPARENTE Y ELEGANTE)
   ============================================================================== */
.navbar-glass {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: 82px;
  background: rgba(255, 255, 255, 0.82);
  backdrop-filter: blur(20px) saturate(180%);
  -webkit-backdrop-filter: blur(20px) saturate(180%);
  border-bottom: 1px solid rgba(0, 43, 73, 0.09);
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 1rem;
  transition: all 0.3s var(--ease-spring);
  box-shadow: 0 4px 24px rgba(0, 24, 46, 0.05);
}

.navbar-brand-logo {
  height: 61px;
  width: auto;
  object-fit: contain;
  transition: transform 0.2s var(--ease-spring);
}

.navbar-brand-logo:hover {
  transform: scale(1.03);
}

.brand-area {
  display: flex;
  align-items: center;
  gap: 0.9rem;
  text-decoration: none;
  cursor: pointer;
  transition: transform 0.2s var(--ease-spring);
}

.brand-area:hover {
  transform: translateY(-1px);
}

.brand-logo {
  height: 48px;
  width: auto;
  object-fit: contain;
  filter: drop-shadow(0 2px 4px rgba(0, 43, 73, 0.1));
}

.brand-text h1 {
  font-size: 1.05rem;
  font-weight: 800;
  color: var(--unam-blue);
  margin: 0;
  letter-spacing: -0.01em;
}

.brand-text span {
  font-size: 0.72rem;
  color: var(--unam-gold-dark);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  display: block;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  list-style: none;
  background: rgba(0, 43, 73, 0.04);
  padding: 0.35rem;
  border-radius: var(--radius-pill);
  border: 1px solid rgba(0, 43, 73, 0.06);
}

.nav-link-btn {
  padding: 0.45rem 1.1rem;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--unam-blue);
  text-decoration: none;
  border-radius: var(--radius-pill);
  transition: all 0.25s var(--ease-spring);
  display: flex;
  align-items: center;
  gap: 0.5rem;
  border: none;
  background: transparent;
  cursor: pointer;
}

.nav-link-btn:hover {
  background: rgba(255, 255, 255, 0.85);
  color: var(--unam-blue-dark);
  transform: translateY(-1px);
}

.nav-link-btn.active {
  background: var(--unam-blue);
  color: #FFFFFF;
  box-shadow: 0 4px 14px rgba(0, 43, 73, 0.25);
}

.nav-link-btn.active .nav-icon {
  color: var(--unam-gold);
}

/* Botón de Acceso DGIRE Discreto y Elegante */
.btn-login-discrete {
  background: rgba(0, 43, 73, 0.04);
  border: 1px solid rgba(0, 43, 73, 0.12);
  color: var(--unam-blue);
  padding: 0.45rem 1rem;
  border-radius: var(--radius-pill);
  font-size: 0.8125rem;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  cursor: pointer;
  transition: all 0.25s var(--ease-spring);
}

.btn-login-discrete:hover {
  background: var(--unam-blue);
  color: #FFFFFF;
  border-color: var(--unam-blue);
  box-shadow: 0 4px 14px rgba(0, 43, 73, 0.2);
  transform: translateY(-1px);
}

.btn-login-discrete:hover i {
  color: var(--unam-gold);
}

/* Menú Drawer Móvil */
.mobile-nav-drawer {
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  background: rgba(255, 255, 255, 0.98);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  box-shadow: 0 16px 32px rgba(0, 24, 46, 0.12);
  border-bottom: 1px solid rgba(0, 43, 73, 0.1);
  animation: slideDownNav 0.25s var(--ease-spring);
}

@keyframes slideDownNav {
  from { transform: translateY(-10px); opacity: 0; }
  to { transform: translateY(0); opacity: 1; }
}

.btn-mobile-nav {
  padding: 0.65rem 1rem;
  border-radius: 12px;
  border: 1px solid transparent;
  background: transparent;
  color: var(--unam-blue);
  font-weight: 600;
  font-size: 0.9rem;
  display: flex;
  align-items: center;
  width: 100%;
  transition: all 0.2s ease;
}

.btn-mobile-nav:hover, .btn-mobile-nav.active {
  background: var(--unam-blue-soft);
  color: var(--unam-blue);
  border-color: rgba(0, 43, 73, 0.1);
}

/* ==============================================================================
   DROPDOWN Y PILL DE USUARIO ADMINISTRADOR AUTENTICADO
   ============================================================================== */
.admin-logged-pill {
  position: relative;
  display: inline-flex;
  align-items: center;
  background: #FFFFFF;
  border: 1.5px solid rgba(0, 43, 73, 0.18);
  border-radius: var(--radius-pill);
  padding: 0.3rem 0.85rem;
  box-shadow: 0 2px 8px rgba(0, 43, 73, 0.06);
  transition: all 0.25s var(--ease-spring);
  user-select: none;
}

.admin-logged-pill:hover {
  border-color: var(--unam-gold);
  box-shadow: 0 4px 14px rgba(212, 175, 55, 0.25);
}

.admin-avatar-mini {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: #002B49;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.75rem;
  box-shadow: 0 2px 5px rgba(0, 43, 73, 0.2);
}

.admin-dropdown-menu {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  min-width: 230px;
  background: #FFFFFF;
  border: 1px solid rgba(0, 43, 73, 0.12);
  border-radius: 14px;
  box-shadow: 0 12px 32px -4px rgba(0, 43, 73, 0.18), 0 0 0 1px rgba(0, 0, 0, 0.04);
  padding: 0.5rem;
  z-index: 10000;
  display: none;
  flex-direction: column;
  gap: 0.25rem;
  animation: dropdownFade 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

.admin-dropdown-menu.active {
  display: flex !important;
}

@keyframes dropdownFade {
  from { opacity: 0; transform: translateY(-6px); }
  to { opacity: 1; transform: translateY(0); }
}

.dropdown-item-btn {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  width: 100%;
  padding: 0.55rem 0.85rem;
  border: none;
  background: transparent;
  border-radius: 8px;
  font-size: 0.8125rem;
  font-weight: 600;
  color: #1E293B;
  text-align: left;
  transition: all 0.15s ease;
  cursor: pointer;
}

.dropdown-item-btn:hover {
  background: #F1F5F9;
  color: #002B49;
}

.dropdown-item-btn.text-danger {
  color: #DC2626 !important;
}

.dropdown-item-btn.text-danger:hover {
  background: #FEE2E2 !important;
  color: #991B1B !important;
}

/* ==============================================================================
   TARJETAS GLASSMORPHISM MACOS Y CONTENEDORES
   ============================================================================== */
.mac-card {
  background: var(--mac-card-bg);
  backdrop-filter: var(--glass-blur);
  -webkit-backdrop-filter: var(--glass-blur);
  border: 1px solid var(--mac-border);
  border-radius: var(--radius-lg);
  box-shadow: var(--glass-shadow);
  padding: 1.75rem;
  transition: all 0.3s var(--ease-spring);
  position: relative;
  overflow: hidden;
}

.mac-card:hover {
  box-shadow: var(--glass-shadow-hover);
  transform: translateY(-3px);
}

.mac-card-gold {
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.95), rgba(254, 249, 231, 0.85));
  border: 1px solid rgba(212, 175, 55, 0.4);
  box-shadow: var(--glass-shadow-gold);
}

.mac-card-gold:hover {
  border-color: var(--unam-gold);
  box-shadow: 0 20px 45px -8px rgba(212, 175, 55, 0.45);
}

/* ==============================================================================
   ESTILOS DE LECTURA JUSTIFICADA Y FORMATO EDITORIAL INSTITUCIONAL
   ============================================================================== */
.text-narrativa-justificada {
  text-align: justify !important;
  text-justify: inter-word !important;
  hyphens: auto;
  -webkit-hyphens: auto;
  word-break: break-word;
  line-height: 1.68 !important;
  letter-spacing: -0.006em;
}

.propuesta-visual-card {
  border-radius: var(--radius-lg);
  transition: all 0.28s var(--ease-spring);
  background: #FFFFFF;
}

.propuesta-visual-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 16px 36px -6px rgba(0, 43, 73, 0.12), 0 0 0 1px rgba(212, 175, 55, 0.35);
}

/* ==============================================================================
   PESTAÑAS SEGMENTADAS POR ZONA (ORGANIZACIÓN EN 2 FILAS)
   ============================================================================== */
.zone-tabs-container {
  background: rgba(241, 245, 249, 0.9);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid rgba(0, 43, 73, 0.09);
  border-radius: var(--radius-xl);
  padding: 0.65rem;
  box-shadow: inset 0 2px 6px rgba(0, 0, 0, 0.03);
}

.zone-tabs-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 0.5rem;
  width: 100%;
}

@media (max-width: 1100px) {
  .zone-tabs-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

@media (max-width: 640px) {
  .zone-tabs-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

.zone-tab-btn {
  background: #FFFFFF;
  border: 1px solid #E2E8F0;
  color: var(--unam-blue);
  font-weight: 700;
  border-radius: 12px;
  padding: 0.5rem 0.6rem;
  font-size: 0.785rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.35rem;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.04);
  transition: all 0.2s var(--ease-spring);
  text-align: center;
  white-space: nowrap;
}

.zone-tab-btn:hover {
  background: #F8FAFC;
  border-color: var(--unam-gold);
  color: var(--unam-blue-dark);
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 43, 73, 0.1);
}

.zone-tab-btn.active {
  background: linear-gradient(135deg, #002B49 0%, #00182E 100%) !important;
  color: #FFFFFF !important;
  border: 1px solid var(--unam-gold) !important;
  box-shadow: 0 6px 18px rgba(0, 43, 73, 0.3) !important;
  transform: translateY(-1px);
}

.zone-tab-btn.active .zone-badge-pill {
  background: var(--unam-gold);
  color: #00182E;
  font-weight: 900;
}

.zone-badge-pill {
  background: #E2E8F0;
  color: #475569;
  font-size: 0.7rem;
  font-weight: 800;
  padding: 0.15rem 0.45rem;
  border-radius: var(--radius-pill);
  transition: all 0.2s ease;
}

/* ==============================================================================
   BOTONES INSTITUCIONALES UNAM
   ============================================================================== */
.btn-unam {
  background-color: #002B49 !important;
  background-image: none !important;
  color: #FFFFFF !important;
  border: 1.5px solid #002B49 !important;
  padding: 0.65rem 1.4rem;
  border-radius: var(--radius-pill);
  font-weight: 700;
  font-size: 0.875rem;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  cursor: pointer;
  transition: all 0.25s var(--ease-spring);
  box-shadow: 0 4px 14px rgba(0, 43, 73, 0.2);
  text-decoration: none;
}

.btn-unam:hover {
  background-color: #00182E !important;
  background-image: none !important;
  color: #FFFFFF !important;
  border-color: #00182E !important;
  transform: translateY(-2px);
  box-shadow: 0 8px 22px rgba(0, 43, 73, 0.35);
}

.btn-unam:active {
  transform: translateY(0);
}

.btn-gold {
  background: linear-gradient(135deg, #F0C419 0%, #D4AF37 100%);
  color: #00182E;
  border: 1px solid rgba(255, 255, 255, 0.4);
  padding: 0.65rem 1.4rem;
  border-radius: var(--radius-pill);
  font-weight: 800;
  font-size: 0.875rem;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  cursor: pointer;
  transition: all 0.25s var(--ease-spring);
  box-shadow: 0 4px 16px rgba(212, 175, 55, 0.35);
  text-decoration: none;
}

.btn-gold:hover {
  background: linear-gradient(135deg, #FFE066 0%, #E5BE38 100%);
  color: #00182E;
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(212, 175, 55, 0.5);
}

.btn-outline-unam {
  background: #FFFFFF;
  color: var(--unam-blue);
  border: 1.5px solid var(--unam-blue);
  padding: 0.6rem 1.3rem;
  border-radius: var(--radius-pill);
  font-weight: 700;
  font-size: 0.875rem;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  cursor: pointer;
  transition: all 0.25s var(--ease-spring);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.03);
  text-decoration: none;
}

.btn-outline-unam:hover {
  background: var(--unam-blue);
  color: #FFFFFF;
  transform: translateY(-2px);
  box-shadow: 0 6px 18px rgba(0, 43, 73, 0.2);
}

/* Checklist de Postulación */
.checklist-item {
  display: flex;
  align-items: center;
  color: #64748B;
  transition: all 0.2s ease;
}

.checklist-item .checklist-icon {
  color: #94A3B8;
  font-size: 1.05rem;
  transition: all 0.2s ease;
}

.checklist-item.valid {
  color: #065F46;
  font-weight: 600;
}

.checklist-item.valid .checklist-icon {
  color: #10B981 !important;
}

/* ==============================================================================
   BADGES Y DISTINTIVOS
   ============================================================================== */
.badge-gold {
  background: var(--unam-gold-subtle);
  color: #856404;
  border: 1px solid rgba(212, 175, 55, 0.4);
  font-size: 0.75rem;
  font-weight: 700;
  padding: 0.25rem 0.65rem;
  border-radius: var(--radius-pill);
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
}

.badge-blue {
  background: var(--unam-blue-soft);
  color: var(--unam-blue);
  border: 1px solid rgba(0, 43, 73, 0.15);
  font-size: 0.75rem;
  font-weight: 700;
  padding: 0.25rem 0.65rem;
  border-radius: var(--radius-pill);
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
}

/* ==============================================================================
   VISTAS Y TRANSICIONES REACTIVAS
   ============================================================================== */
.view-section {
  display: none;
  opacity: 0;
  padding-top: 98px;
  padding-bottom: 60px;
  transition: opacity 0.35s var(--ease-spring), transform 0.35s var(--ease-spring);
  transform: translateY(12px);
}

/* Reducción de espacio cuando el banner de aviso está activo */
body.has-notice-banner .view-section,
body:has(#top-notice-banner:not(.d-none)) .view-section {
  padding-top: 24px;
}

.view-section.active {
  display: block;
  opacity: 1;
  transform: translateY(0);
  animation: viewFadeIn 0.4s var(--ease-spring);
}

@keyframes viewFadeIn {
  from { opacity: 0; transform: translateY(16px); }
  to { opacity: 1; transform: translateY(0); }
}

/* ==============================================================================
   TIMELINE CRONOGRAMA UNIVERSITARIO
   ============================================================================== */
.timeline-container {
  position: relative;
  padding: 1.5rem 0;
}

.timeline-step {
  position: relative;
  text-align: center;
  transition: all 0.3s var(--ease-spring);
}

.timeline-node {
  width: 52px;
  height: 52px;
  border-radius: 50%;
  background: #FFFFFF;
  border: 3px solid #CBD5E1;
  color: var(--mac-text-muted);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.15rem;
  margin: 0 auto 0.75rem auto;
  position: relative;
  z-index: 2;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.06);
  transition: all 0.3s var(--ease-spring);
}

.timeline-step.completed .timeline-node {
  background: #ECFDF5;
  border-color: #10B981;
  color: #059669;
  box-shadow: 0 6px 16px rgba(16, 185, 129, 0.25);
}

.timeline-step.active .timeline-node {
  background: linear-gradient(135deg, var(--unam-blue) 0%, var(--unam-blue-dark) 100%);
  border-color: var(--unam-gold);
  color: var(--unam-gold);
  box-shadow: 0 8px 24px rgba(0, 43, 73, 0.35), 0 0 0 4px rgba(212, 175, 55, 0.25);
  transform: scale(1.15);
}

/* ==============================================================================
   MODALES GLASSMORPHISM MACOS
   ============================================================================== */
.mac-modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 24, 46, 0.65);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  z-index: 99999;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
}

.mac-modal-overlay.active {
  display: flex;
  animation: modalFadeIn 0.3s var(--ease-spring);
}

@keyframes modalFadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

.mac-modal-window {
  background: #FFFFFF;
  border: 1px solid rgba(0, 43, 73, 0.12);
  border-radius: var(--radius-lg);
  box-shadow: 0 25px 60px -15px rgba(0, 24, 46, 0.4);
  width: 100%;
  max-width: 730px;
  max-height: 90vh;
  overflow-y: auto;
  animation: modalScaleUp 0.35s var(--ease-spring);
}

.mac-modal-window.max-w-sm { max-width: 440px !important; }
.mac-modal-window.max-w-md { max-width: 530px !important; }
.mac-modal-window.max-w-lg { max-width: 630px !important; }
.mac-modal-window.max-w-xl { max-width: 740px !important; }
.mac-modal-window.max-w-2xl { max-width: 860px !important; }
.mac-modal-window.max-w-3xl { max-width: 980px !important; }

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

.mac-modal-header {
  padding: 1.25rem 1.5rem;
  border-bottom: 1px solid #F1F5F9;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.mac-modal-body {
  padding: 1.5rem;
}

.mac-modal-footer {
  padding: 1rem 1.5rem;
  border-top: 1px solid #F1F5F9;
  background: #F8FAFC;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 0.75rem;
  border-bottom-left-radius: var(--radius-lg);
  border-bottom-right-radius: var(--radius-lg);
}

.modal-close-btn {
  background: #F1F5F9;
  border: none;
  width: 32px;
  height: 32px;
  flex-shrink: 0;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #64748B;
  cursor: pointer;
  transition: all 0.2s ease;
  position: relative;
  z-index: 10;
}

.modal-close-btn i {
  pointer-events: none;
}

.modal-close-btn:hover {
  background: #E2E8F0;
  color: #0F172A;
  transform: rotate(90deg);
}

.unam-crest,
.modal-icon-badge {
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  border-radius: 12px !important;
  background-color: #002B49;
  color: #D4AF37;
  flex-shrink: 0;
  line-height: 1;
  text-align: center;
  overflow: hidden;
  transition: all 0.25s ease;
  box-shadow: 0 4px 10px rgba(0, 43, 73, 0.15);
}

.unam-crest i,
.modal-icon-badge i {
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  line-height: 1 !important;
  margin: 0 !important;
  padding: 0 !important;
}

/* ==============================================================================
   BOLETA DIGITAL Y SELECCIÓN DE CANDIDATOS
   ============================================================================== */
.candidato-ballot-card {
  border: 2px solid #E2E8F0;
  cursor: pointer;
  transition: all 0.25s var(--ease-spring);
  border-radius: var(--radius-md);
  background: #FFFFFF;
}

.candidato-ballot-card:hover {
  border-color: var(--unam-blue);
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(0, 43, 73, 0.08);
}

.candidato-ballot-card.selected {
  border-color: var(--unam-gold) !important;
  background: linear-gradient(135deg, #FFFFFF 0%, #FEF9E7 100%) !important;
  box-shadow: 0 8px 24px rgba(212, 175, 55, 0.25) !important;
}

.radio-indicator {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  border: 2px solid #CBD5E1;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
}

.candidato-ballot-card.selected .radio-indicator {
  border-color: var(--unam-gold);
  background: var(--unam-gold);
}

.candidato-ballot-card.selected .radio-indicator::after {
  content: '';
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #00182E;
}

/* ==============================================================================
   FORMULARIOS Y CAMPOS DE ENTRADA
   ============================================================================== */
.form-control, .form-select {
  border: 1.5px solid #E2E8F0;
  border-radius: var(--radius-md);
  padding: 0.65rem 1rem;
  font-size: 0.875rem;
  color: var(--mac-text-main);
  background-color: #FFFFFF;
  transition: all 0.2s var(--ease-spring);
}

.form-control:focus, .form-select:focus {
  border-color: var(--unam-gold);
  box-shadow: 0 0 0 3px rgba(212, 175, 55, 0.25);
  outline: none;
}

/* ==============================================================================
   ESTRUCTURA DE CONTENEDOR 80% (ELIMINACIÓN DE ESPACIOS MUERTOS)
   ============================================================================== */
.content-width-80,
.main-content-container {
  width: 80% !important;
  max-width: 1400px !important;
  margin-left: auto !important;
  margin-right: auto !important;
}

@media (min-width: 1600px) {
  .content-width-80,
  .main-content-container {
    width: 80% !important;
    max-width: 1480px !important;
  }
}

@media (max-width: 1200px) {
  .content-width-80,
  .main-content-container {
    width: 90% !important;
  }
}

@media (max-width: 768px) {
  .content-width-80,
  .main-content-container {
    width: 95% !important;
  }
}

/* ==============================================================================
   FOOTER ORO PIEL DE PUMA CON DEGRADADO ELEGANTE (#DAA464 Y #DEC384)
   ============================================================================== */
.footer-puma-gold {
  background: linear-gradient(135deg, #DAA464 0%, #DEC384 50%, #DAA464 100%) !important;
  color: #00182E !important;
  border-top: 3px solid rgba(0, 43, 73, 0.2);
  box-shadow: 0 -6px 25px rgba(0, 43, 73, 0.12);
}

.footer-puma-gold h4,
.footer-puma-gold h5,
.footer-puma-gold p,
.footer-puma-gold span,
.footer-puma-gold strong,
.footer-puma-gold li {
  color: #00182E !important;
}

.footer-puma-gold a {
  color: #00182E !important;
  transition: all 0.2s ease;
}

.footer-puma-gold a:hover {
  color: #002B49 !important;
  text-decoration: underline !important;
}

/* ==============================================================================
   SLIDER DE BASES DEL CCM INTERACTIVO
   ============================================================================== */
.bases-slide-item {
  transition: opacity 0.3s var(--ease-spring), transform 0.3s var(--ease-spring);
}

.bases-slide-item.active {
  display: block !important;
  opacity: 1;
  transform: translateY(0);
  animation: slideFadeIn 0.3s var(--ease-spring);
}

@keyframes slideFadeIn {
  from { opacity: 0; transform: translateX(12px); }
  to { opacity: 1; transform: translateX(0); }
}

.hover-scale-sm {
  transition: transform 0.25s var(--ease-spring), filter 0.25s var(--ease-spring);
}

.hover-scale-sm:hover {
  transform: scale(1.03);
}

/* ==============================================================================
   BLOQUES PASTEL SOBRIOS: NATURALEZA Y FUNCIONES DEL CCM (PDF OFICIAL)
   ============================================================================== */
.pastel-card {
  border-radius: 1.5rem;
  padding: 1.5rem;
  transition: all 0.3s var(--ease-spring);
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  height: 100%;
}

.pastel-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 14px 30px -8px rgba(0, 43, 73, 0.12);
}

/* 1. Pastel Slate / Indigo (Definición y Objeto) */
.pastel-indigo {
  background-color: #F1F5F9;
  border: 1.5px solid #CBD5E1;
}
.pastel-indigo .pastel-icon {
  background-color: #E2E8F0;
  color: #1E3A8A;
}
.pastel-indigo .pastel-badge {
  background-color: #E2E8F0;
  color: #1E3A8A;
}

/* 2. Pastel Sage Green (Funciones y Atribuciones) */
.pastel-sage {
  background-color: #F0FDF4;
  border: 1.5px solid #BBF7D0;
}
.pastel-sage .pastel-icon {
  background-color: #DCFCE7;
  color: #065F46;
}
.pastel-sage .pastel-badge {
  background-color: #DCFCE7;
  color: #065F46;
}

/* 3. Pastel Warm Amber (Integración y Presidencia) */
.pastel-amber {
  background-color: #FFFDF5;
  border: 1.5px solid #FDE68A;
}
.pastel-amber .pastel-icon {
  background-color: #FEF3C7;
  color: #92400E;
}
.pastel-amber .pastel-badge {
  background-color: #FEF3C7;
  color: #92400E;
}

/* 4. Pastel Lavender (Secretaría Técnica y Consejeros) */
.pastel-purple {
  background-color: #F8F7FF;
  border: 1.5px solid #DDD6FE;
}
.pastel-purple .pastel-icon {
  background-color: #EDE9FE;
  color: #5B21B6;
}
.pastel-purple .pastel-badge {
  background-color: #EDE9FE;
  color: #5B21B6;
}

/* 5. Pastel Rose / Soft Terracotta (Requisitos de Elegibilidad) */
.pastel-rose {
  background-color: #FFF7F8;
  border: 1.5px solid #FECDD3;
}
.pastel-rose .pastel-icon {
  background-color: #FFE4E6;
  color: #9F1239;
}
.pastel-rose .pastel-badge {
  background-color: #FFE4E6;
  color: #9F1239;
}

/* 6. Pastel Ice Sky (Sesiones y Elección) */
.pastel-sky {
  background-color: #F4FAFF;
  border: 1.5px solid #BAE6FD;
}
.pastel-sky .pastel-icon {
  background-color: #E0F2FE;
  color: #0369A1;
}
.pastel-sky .pastel-badge {
  background-color: #E0F2FE;
  color: #0369A1;
}

.pastel-icon {
  width: 44px;
  height: 44px;
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.15rem;
}

.pastel-badge {
  font-size: 0.725rem;
  font-weight: 700;
  padding: 0.25rem 0.65rem;
  border-radius: 20px;
  display: inline-block;
}

.btn-pastel-trigger {
  background: #FFFFFF;
  border: 1px solid rgba(0, 43, 73, 0.15);
  color: #002B49;
  font-size: 0.8125rem;
  font-weight: 700;
  padding: 0.5rem 1rem;
  border-radius: 12px;
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  transition: all 0.2s ease;
  cursor: pointer;
}

.btn-pastel-trigger:hover {
  background: #002B49;
  color: #FFFFFF;
  border-color: #002B49;
  box-shadow: 0 4px 12px rgba(0, 43, 73, 0.15);
}

/* ==============================================================================
   RESPONSIVIDAD Y UTILIDADES
   ============================================================================== */
@media (max-width: 992px) {
  .navbar-glass {
    padding: 0 1rem;
  }
  .nav-links {
    display: none;
  }
}

/* ==============================================================================
   ESTILOS DE IMPRESIÓN Y EXPORTACIÓN A PDF OFICIAL
   ============================================================================== */
@media print {
  body * {
    visibility: hidden;
  }
  
  .mac-modal-overlay.active,
  .mac-modal-overlay.active * {
    visibility: visible;
  }
  
  .mac-modal-overlay.active {
    position: absolute;
    left: 0;
    top: 0;
    width: 100%;
    height: auto;
    background: #FFFFFF !important;
    padding: 0 !important;
    margin: 0 !important;
    display: block !important;
  }
  
  .mac-modal-window {
    max-width: 100% !important;
    width: 100% !important;
    border: none !important;
    box-shadow: none !important;
    border-radius: 0 !important;
    background: #FFFFFF !important;
    padding: 0 !important;
    margin: 0 !important;
  }
  
  .mac-modal-header,
  .mac-modal-footer,
  .modal-close-btn {
    display: none !important;
  }

  .print-only-header {
    display: block !important;
  }
  
  .mac-modal-body {
    padding: 0 !important;
    color: #000000 !important;
  }

  table {
    width: 100% !important;
    border-collapse: collapse !important;
  }

  th, td {
    border: 1px solid #D1D5DB !important;
    padding: 6px 8px !important;
    color: #000000 !important;
  }

  .badge {
    border: 1px solid #9CA3AF !important;
    color: #000000 !important;
    background: #F3F4F6 !important;
  }
}

/* ==============================================================================
   BARRA DE EDICIÓN DE TEXTO ENRIQUECIDO TIPO TINYMCE / ATTO
   ============================================================================== */
.editor-tinymce-atto-container {
  border: 1px solid #CBD5E1;
  border-radius: var(--radius-md, 14px);
  background: #FFFFFF;
  overflow: hidden;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
  display: flex;
  flex-direction: column;
}

.editor-tinymce-atto-container:focus-within {
  border-color: #002B49;
  box-shadow: 0 0 0 3px rgba(0, 43, 73, 0.14);
}

.editor-tinymce-atto-toolbar {
  background: linear-gradient(180deg, #F8FAFC 0%, #F1F5F9 100%);
  border-bottom: 1px solid #E2E8F0;
  padding: 6px 8px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 4px;
  user-select: none;
}

.editor-tinymce-atto-toolbar .editor-group {
  display: inline-flex;
  align-items: center;
  gap: 2px;
  padding-right: 6px;
  margin-right: 4px;
  border-right: 1px solid #CBD5E1;
}

.editor-tinymce-atto-toolbar .editor-group:last-child {
  border-right: none;
  padding-right: 0;
  margin-right: 0;
}

.editor-tinymce-atto-toolbar button.editor-btn {
  background: transparent;
  border: 1px solid transparent;
  border-radius: 6px;
  color: #334155;
  width: 30px;
  height: 28px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 0.82rem;
  cursor: pointer;
  transition: all 0.15s ease;
  padding: 0;
}

.editor-tinymce-atto-toolbar button.editor-btn:hover {
  background: #E2E8F0;
  color: #0F172A;
  border-color: #CBD5E1;
}

.editor-tinymce-atto-toolbar button.editor-btn:active,
.editor-tinymce-atto-toolbar button.editor-btn.active {
  background: #002B49;
  color: #F8FAFC;
  border-color: #002B49;
}

.editor-tinymce-atto-toolbar select.editor-select {
  border: 1px solid #CBD5E1;
  background: #FFFFFF;
  border-radius: 6px;
  font-size: 0.78rem;
  padding: 2px 6px;
  color: #1E293B;
  outline: none;
  height: 28px;
  cursor: pointer;
}

.editor-tinymce-atto-toolbar select.editor-select:focus {
  border-color: #002B49;
}

.editor-tinymce-atto-toolbar .color-picker-wrap {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}

.editor-tinymce-atto-toolbar .color-picker-wrap input[type="color"] {
  position: absolute;
  opacity: 0;
  width: 100%;
  height: 100%;
  left: 0;
  top: 0;
  cursor: pointer;
}

.editor-tinymce-atto-content {
  padding: 12px 14px;
  min-height: 120px;
  max-height: 280px;
  overflow-y: auto;
  outline: none;
  font-size: 0.86rem;
  line-height: 1.65;
  color: #1E293B;
  background: #FFFFFF;
  text-align: justify;
  text-justify: inter-word;
  word-break: break-word;
}

.editor-tinymce-atto-content:empty::before {
  content: attr(data-placeholder);
  color: #94A3B8;
  pointer-events: none;
  font-style: italic;
}

.editor-tinymce-atto-content p {
  margin-bottom: 0.5rem;
}

.editor-tinymce-atto-content p:last-child {
  margin-bottom: 0;
}

.editor-tinymce-atto-content ul,
.editor-tinymce-atto-content ol {
  padding-left: 1.4rem;
  margin-bottom: 0.5rem;
}

.editor-tinymce-atto-content blockquote {
  border-left: 3px solid #D4AF37;
  padding: 4px 10px;
  margin: 6px 0;
  color: #475569;
  font-style: italic;
  background: #F8FAFC;
  border-radius: 0 6px 6px 0;
}

.editor-tinymce-atto-statusbar {
  background: #F8FAFC;
  border-top: 1px solid #F1F5F9;
  padding: 4px 10px;
  font-size: 0.7rem;
  color: #64748B;
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom-left-radius: var(--radius-md, 14px);
  border-bottom-right-radius: var(--radius-md, 14px);
}


