/* ==========================================================================
   CAMPAÑA NÉSTOR OSUNA A LA RECTORÍA - UNIVERSIDAD EXTERNADO DE COLOMBIA
   Sistema de Diseño Institucional & Motor Político Digital
   ========================================================================== */

:root {
  /* Paleta Institucional Universidad Externado */
  --ext-green-darkest: #042617;
  --ext-green-dark: #073b24;
  --ext-green-primary: #0a4f32;
  --ext-green-light: #147249;
  --ext-green-accent: #1e9d65;
  --ext-green-subtle: #e8f4ed;
  
  /* Acentos Dorados y de Prestigio Académico */
  --ext-gold-light: #f3d489;
  --ext-gold-primary: #c99c3b;
  --ext-gold-dark: #966f1e;
  --ext-gold-gradient: linear-gradient(135deg, #dfb75c 0%, #b88628 100%);
  
  /* Fondos y Neutros */
  --bg-primary: #fcfdfc;
  --bg-secondary: #f4f7f4;
  --bg-card: #ffffff;
  --bg-surface: #ffffff;
  --bg-dark-card: #082d1c;
  
  /* Textos */
  --text-primary: #122119;
  --text-secondary: #42554a;
  --text-muted: #6f8277;
  --text-light: #f7faf8;
  --text-gold: #d4a742;
  
  /* Bordes y Sombras */
  --border-subtle: #e1ebe4;
  --border-accent: rgba(201, 156, 59, 0.35);
  --shadow-sm: 0 2px 8px rgba(7, 59, 36, 0.06);
  --shadow-md: 0 8px 24px rgba(7, 59, 36, 0.08);
  --shadow-lg: 0 16px 40px rgba(7, 59, 36, 0.12);
  --shadow-gold: 0 8px 25px rgba(201, 156, 59, 0.25);
  --radius-sm: 8px;
  --radius-md: 14px;
  --radius-lg: 20px;
  --radius-full: 9999px;
  
  /* Transiciones */
  --transition-fast: 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  --transition-normal: 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

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

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

body {
  font-family: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  color: var(--text-primary);
  background-color: var(--bg-primary);
  line-height: 1.6;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4, .font-serif {
  font-family: 'Playfair Display', Georgia, 'Times New Roman', serif;
  font-weight: 700;
  color: var(--ext-green-darkest);
  line-height: 1.25;
}

/* ==========================================================================
   BARRA SUPERIOR INSTITUCIONAL
   ========================================================================== */
.top-institutional-bar {
  background: var(--ext-green-darkest);
  color: rgba(255, 255, 255, 0.85);
  font-size: 0.82rem;
  padding: 0.45rem 1.5rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 1px solid rgba(201, 156, 59, 0.3);
}

.institutional-motto {
  font-style: italic;
  letter-spacing: 0.5px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.motto-gold {
  color: var(--ext-gold-light);
  font-weight: 600;
}

.top-bar-links {
  display: flex;
  align-items: center;
  gap: 18px;
}

.top-bar-links a {
  color: rgba(255, 255, 255, 0.85);
  text-decoration: none;
  transition: var(--transition-fast);
}

.top-bar-links a:hover {
  color: var(--ext-gold-light);
}

/* ==========================================================================
   HEADER PRINCIPAL
   ========================================================================== */
.main-header {
  position: sticky;
  top: 0;
  z-index: 1000;
  background: rgba(255, 255, 255, 0.94);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border-subtle);
  transition: var(--transition-normal);
}

.header-container {
  max-width: 1300px;
  margin: 0 auto;
  padding: 0.8rem 1.5rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1.5rem;
}

.brand-wrapper {
  display: flex;
  align-items: center;
  gap: 14px;
  text-decoration: none;
}

.brand-crest {
  width: 48px;
  height: 48px;
  border-radius: 12px;
  background: linear-gradient(135deg, var(--ext-green-darkest) 0%, var(--ext-green-primary) 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--ext-gold-light);
  box-shadow: 0 4px 12px rgba(7, 59, 36, 0.2);
  border: 1px solid rgba(201, 156, 59, 0.4);
}

.brand-text-col {
  display: flex;
  flex-direction: column;
}

.brand-candidate-name {
  font-family: 'Playfair Display', serif;
  font-size: 1.35rem;
  font-weight: 800;
  color: var(--ext-green-darkest);
  letter-spacing: -0.3px;
  line-height: 1.1;
}

.brand-subtitle {
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1.2px;
  color: var(--ext-gold-dark);
}

.main-nav {
  display: flex;
  align-items: center;
  gap: 1.2rem;
}

.nav-link {
  color: var(--text-secondary);
  font-weight: 600;
  font-size: 0.9rem;
  text-decoration: none;
  padding: 0.4rem 0.6rem;
  border-radius: var(--radius-sm);
  transition: var(--transition-fast);
  display: flex;
  align-items: center;
  gap: 6px;
}

.nav-link:hover, .nav-link.active {
  color: var(--ext-green-primary);
  background: var(--ext-green-subtle);
}

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

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-weight: 700;
  font-size: 0.92rem;
  padding: 0.65rem 1.35rem;
  border-radius: var(--radius-full);
  text-decoration: none;
  cursor: pointer;
  border: 1px solid transparent;
  transition: all var(--transition-normal);
  line-height: 1.2;
}

.btn-primary {
  background: linear-gradient(135deg, var(--ext-green-primary) 0%, var(--ext-green-dark) 100%);
  color: #ffffff;
  box-shadow: 0 4px 14px rgba(7, 59, 36, 0.25);
}

.btn-primary:hover {
  background: linear-gradient(135deg, var(--ext-green-light) 0%, var(--ext-green-primary) 100%);
  transform: translateY(-2px);
  box-shadow: 0 6px 18px rgba(7, 59, 36, 0.35);
}

.btn-gold {
  background: var(--ext-gold-gradient);
  color: #171105;
  box-shadow: var(--shadow-gold);
  border: 1px solid rgba(255, 255, 255, 0.4);
}

.btn-gold:hover {
  filter: brightness(1.08);
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(201, 156, 59, 0.4);
}

.btn-outline {
  background: transparent;
  color: var(--ext-green-darkest);
  border: 1.5px solid var(--ext-green-primary);
}

.btn-outline:hover {
  background: var(--ext-green-subtle);
  transform: translateY(-2px);
}

.btn-sm {
  padding: 0.45rem 0.95rem;
  font-size: 0.82rem;
}

.mobile-menu-btn {
  display: none;
  background: none;
  border: none;
  font-size: 1.6rem;
  color: var(--ext-green-darkest);
  cursor: pointer;
}

/* ==========================================================================
   HERO SECTION: IMPACTO PRESIDENCIAL Y RECTORAL
   ========================================================================== */
.hero-section {
  position: relative;
  background: linear-gradient(180deg, #f0f7f3 0%, var(--bg-primary) 100%);
  padding: 3.5rem 1.5rem 4rem;
  overflow: hidden;
  border-bottom: 1px solid var(--border-subtle);
}

.hero-backdrop {
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  width: 55%;
  background: url('../assets/externado_campus.jpg') center center/cover no-repeat;
  opacity: 0.18;
  mask-image: linear-gradient(to left, rgba(0,0,0,1) 40%, rgba(0,0,0,0) 100%);
  -webkit-mask-image: linear-gradient(to left, rgba(0,0,0,1) 40%, rgba(0,0,0,0) 100%);
  pointer-events: none;
}

.hero-container {
  max-width: 1300px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  gap: 3.5rem;
  align-items: center;
  position: relative;
  z-index: 2;
}

.hero-badge-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: #ffffff;
  padding: 0.4rem 1.1rem;
  border-radius: var(--radius-full);
  border: 1px solid rgba(201, 156, 59, 0.4);
  box-shadow: var(--shadow-sm);
  margin-bottom: 1.4rem;
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--ext-green-dark);
}

.pulse-dot {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background-color: var(--ext-green-accent);
  box-shadow: 0 0 0 0 rgba(30, 157, 101, 0.7);
  animation: pulse-green 1.8s infinite;
}

@keyframes pulse-green {
  0% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(30, 157, 101, 0.7); }
  70% { transform: scale(1); box-shadow: 0 0 0 8px rgba(30, 157, 101, 0); }
  100% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(30, 157, 101, 0); }
}

.hero-title {
  font-size: 3.4rem;
  letter-spacing: -0.8px;
  margin-bottom: 1.2rem;
  color: var(--ext-green-darkest);
}

.hero-title .text-gold {
  color: var(--ext-gold-dark);
  font-style: italic;
  display: block;
}

.hero-description {
  font-size: 1.15rem;
  color: var(--text-secondary);
  line-height: 1.7;
  margin-bottom: 2rem;
  max-width: 620px;
}

.hero-cta-group {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 14px;
  margin-bottom: 2.5rem;
}

/* Key Metrics Ticker */
.hero-metrics-bar {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1rem;
  background: rgba(255, 255, 255, 0.9);
  backdrop-filter: blur(8px);
  padding: 1.2rem 1.4rem;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-subtle);
  box-shadow: var(--shadow-sm);
}

.metric-item {
  display: flex;
  flex-direction: column;
}

.metric-number {
  font-family: 'Playfair Display', serif;
  font-size: 1.65rem;
  font-weight: 800;
  color: var(--ext-green-primary);
  line-height: 1.1;
}

.metric-label {
  font-size: 0.76rem;
  color: var(--text-muted);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

/* Hero Portrait Card */
.hero-visual-card {
  position: relative;
  display: flex;
  justify-content: center;
}

.portrait-frame {
  position: relative;
  width: 100%;
  max-width: 480px;
  height: 500px;
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-lg);
  border: 3px solid rgba(255, 255, 255, 0.9);
  background: var(--ext-green-darkest);
}

.portrait-frame img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 50% 15%;
  display: block;
  transition: transform 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}

.portrait-frame:hover img {
  transform: scale(1.03);
}

.real-gallery-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
  margin-top: 3.5rem;
}

.gallery-card {
  background: #ffffff;
  border-radius: var(--radius-md);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--border-subtle);
  transition: all var(--transition-normal);
  display: flex;
  flex-direction: column;
}

.gallery-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-md);
  border-color: var(--ext-gold-primary);
}

.gallery-card img {
  width: 100%;
  height: 240px;
  object-fit: cover;
  object-position: center;
  display: block;
}

.gallery-card-body {
  padding: 1.1rem 1.3rem;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.gallery-card-tag {
  font-size: 0.72rem;
  text-transform: uppercase;
  font-weight: 800;
  color: var(--ext-gold-dark);
  letter-spacing: 0.8px;
}

.gallery-card-title {
  font-family: 'Playfair Display', serif;
  font-weight: 700;
  font-size: 1.05rem;
  color: var(--ext-green-darkest);
  line-height: 1.3;
}

.gallery-card-source {
  font-size: 0.78rem;
  color: var(--text-muted);
  margin-top: 4px;
}

.portrait-floating-tag {
  position: absolute;
  bottom: 18px;
  left: 18px;
  right: 18px;
  background: rgba(7, 59, 36, 0.92);
  backdrop-filter: blur(10px);
  color: #ffffff;
  padding: 1.1rem 1.3rem;
  border-radius: var(--radius-md);
  border: 1px solid rgba(201, 156, 59, 0.5);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.35);
}

.tag-title {
  font-family: 'Playfair Display', serif;
  font-size: 1.25rem;
  font-weight: 700;
  margin-bottom: 3px;
  color: var(--ext-gold-light);
}

.tag-sub {
  font-size: 0.82rem;
  color: rgba(255, 255, 255, 0.88);
}

.candidate-quick-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 8px;
}

.mini-badge {
  background: rgba(255, 255, 255, 0.15);
  font-size: 0.72rem;
  padding: 2px 8px;
  border-radius: var(--radius-full);
  font-weight: 600;
}

/* ==========================================================================
   ALERT BAR LIVE ACTIVITY
   ========================================================================== */
.live-activity-stream {
  background: var(--ext-green-darkest);
  color: #ffffff;
  padding: 0.75rem 1.5rem;
  overflow: hidden;
  border-bottom: 2px solid var(--ext-gold-primary);
}

.stream-inner {
  max-width: 1300px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  gap: 18px;
}

.stream-badge {
  background: var(--ext-gold-gradient);
  color: #1a1202;
  font-weight: 800;
  font-size: 0.75rem;
  padding: 0.25rem 0.65rem;
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  gap: 5px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  flex-shrink: 0;
}

.stream-text {
  font-size: 0.86rem;
  color: rgba(255, 255, 255, 0.9);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  animation: fadeInOut 5s infinite;
}

@keyframes fadeInOut {
  0% { opacity: 0; transform: translateY(6px); }
  10% { opacity: 1; transform: translateY(0); }
  90% { opacity: 1; transform: translateY(0); }
  100% { opacity: 0; transform: translateY(-6px); }
}

/* ==========================================================================
   SECCIONES COMUNES
   ========================================================================== */
.section {
  padding: 5rem 1.5rem;
}

.section-alt {
  background: var(--bg-secondary);
}

.section-header {
  text-align: center;
  max-width: 780px;
  margin: 0 auto 3.5rem;
}

.section-pill {
  display: inline-block;
  background: var(--ext-green-subtle);
  color: var(--ext-green-primary);
  font-weight: 800;
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 1.5px;
  padding: 0.35rem 1rem;
  border-radius: var(--radius-full);
  margin-bottom: 0.9rem;
  border: 1px solid rgba(10, 79, 50, 0.15);
}

.section-title {
  font-size: 2.5rem;
  color: var(--ext-green-darkest);
  margin-bottom: 1rem;
  letter-spacing: -0.5px;
}

.section-subtitle {
  font-size: 1.1rem;
  color: var(--text-secondary);
  line-height: 1.6;
}

/* ==========================================================================
   MÁQUINA POLÍTICA MULTINIVEL ("RED DE MULTIPLICADORES")
   ========================================================================== */
.political-engine-card {
  background: #ffffff;
  border-radius: var(--radius-lg);
  border: 2px solid var(--border-accent);
  box-shadow: var(--shadow-lg);
  overflow: hidden;
  max-width: 1250px;
  margin: 0 auto;
}

.engine-header-banner {
  background: linear-gradient(135deg, var(--ext-green-darkest) 0%, var(--ext-green-dark) 100%);
  color: #ffffff;
  padding: 2.2rem 2.5rem;
  position: relative;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 1.5rem;
}

.engine-header-banner::after {
  content: '';
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  width: 300px;
  background: radial-gradient(circle, rgba(201, 156, 59, 0.2) 0%, transparent 70%);
  pointer-events: none;
}

.engine-title {
  color: #ffffff;
  font-size: 2rem;
  margin-bottom: 0.4rem;
}

.engine-desc {
  color: rgba(255, 255, 255, 0.85);
  font-size: 0.95rem;
  max-width: 600px;
}

.engine-stats-pills {
  display: flex;
  gap: 14px;
}

.engine-stat-pill {
  background: rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(6px);
  padding: 0.8rem 1.2rem;
  border-radius: var(--radius-md);
  border: 1px solid rgba(255, 255, 255, 0.15);
  text-align: center;
}

.engine-stat-val {
  font-size: 1.45rem;
  font-weight: 800;
  color: var(--ext-gold-light);
  line-height: 1;
}

.engine-stat-lbl {
  font-size: 0.72rem;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.75);
  margin-top: 4px;
}

/* User Activist State Container */
.activist-workspace {
  padding: 2.5rem;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2.5rem;
}

.activist-card-box {
  background: var(--bg-secondary);
  border-radius: var(--radius-md);
  padding: 1.8rem;
  border: 1px solid var(--border-subtle);
}

.box-title {
  font-size: 1.25rem;
  color: var(--ext-green-darkest);
  margin-bottom: 1rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

/* Registration Form */
.registration-form {
  display: flex;
  flex-direction: column;
  gap: 1.1rem;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.form-label {
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--text-primary);
}

.form-input, .form-select, .form-textarea {
  width: 100%;
  padding: 0.75rem 1rem;
  border-radius: var(--radius-sm);
  border: 1.5px solid var(--border-subtle);
  background: #ffffff;
  font-size: 0.92rem;
  font-family: inherit;
  color: var(--text-primary);
  transition: var(--transition-fast);
}

.form-input:focus, .form-select:focus, .form-textarea:focus {
  outline: none;
  border-color: var(--ext-green-primary);
  box-shadow: 0 0 0 3px rgba(10, 79, 50, 0.12);
}

/* Multi-tier Level Tree Showcase */
.tiers-hierarchy {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.tier-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: #ffffff;
  padding: 0.9rem 1.1rem;
  border-radius: var(--radius-sm);
  border-left: 4px solid var(--ext-green-light);
  box-shadow: var(--shadow-sm);
}

.tier-item.current-tier {
  border-left-color: var(--ext-gold-primary);
  background: #fffdf5;
  border: 1px solid rgba(201, 156, 59, 0.4);
  border-left-width: 5px;
}

.tier-info {
  display: flex;
  align-items: center;
  gap: 10px;
}

.tier-icon {
  font-size: 1.5rem;
}

.tier-name {
  font-weight: 700;
  font-size: 0.92rem;
  color: var(--ext-green-darkest);
}

.tier-req {
  font-size: 0.76rem;
  color: var(--text-muted);
}

.tier-points-pill {
  font-weight: 800;
  font-size: 0.82rem;
  background: var(--ext-green-subtle);
  color: var(--ext-green-primary);
  padding: 0.3rem 0.7rem;
  border-radius: var(--radius-full);
}

/* Interactive Network Visualization */
.network-tree-view {
  background: #ffffff;
  border-radius: var(--radius-md);
  padding: 1.5rem;
  border: 1px solid var(--border-subtle);
  min-height: 250px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.network-root-node {
  background: linear-gradient(135deg, var(--ext-green-primary) 0%, var(--ext-green-dark) 100%);
  color: #ffffff;
  padding: 1rem 1.2rem;
  border-radius: var(--radius-md);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.network-branches-container {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding-left: 20px;
  border-left: 2px dashed var(--border-subtle);
  margin-left: 20px;
}

.network-subnode {
  background: var(--bg-secondary);
  padding: 0.75rem 1rem;
  border-radius: var(--radius-sm);
  display: flex;
  justify-content: space-between;
  align-items: center;
  border: 1px solid var(--border-subtle);
  animation: slideInNode 0.3s ease-out;
}

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

.referral-share-box {
  background: #ffffff;
  border: 2px dashed var(--ext-gold-primary);
  border-radius: var(--radius-md);
  padding: 1.2rem;
  margin-top: 1rem;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.ref-link-display {
  display: flex;
  gap: 8px;
}

.ref-link-input {
  background: var(--bg-secondary);
  font-family: monospace;
  font-size: 0.88rem;
  padding: 0.6rem 0.8rem;
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  flex-grow: 1;
}

.share-buttons-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.btn-whatsapp {
  background: #25D366;
  color: #ffffff;
}

.btn-whatsapp:hover {
  background: #20bd5a;
  color: #ffffff;
}

.btn-telegram {
  background: #0088cc;
  color: #ffffff;
}

.btn-telegram:hover {
  background: #0077b5;
  color: #ffffff;
}

.btn-x {
  background: #000000;
  color: #ffffff;
}

/* ==========================================================================
   MISIONES DIARIAS Y RECOMPENSAS
   ========================================================================== */
.tasks-container {
  max-width: 1250px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  gap: 2rem;
}

.tasks-card, .badges-card {
  background: #ffffff;
  border-radius: var(--radius-lg);
  padding: 2.2rem;
  border: 1px solid var(--border-subtle);
  box-shadow: var(--shadow-md);
}

.tasks-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1.8rem;
  border-bottom: 1px solid var(--border-subtle);
  padding-bottom: 1.2rem;
}

.tasks-progress-wrapper {
  margin-bottom: 1.8rem;
}

.progress-labels {
  display: flex;
  justify-content: space-between;
  font-size: 0.82rem;
  font-weight: 700;
  margin-bottom: 6px;
  color: var(--text-secondary);
}

.progress-bar-bg {
  width: 100%;
  height: 10px;
  background: var(--border-subtle);
  border-radius: var(--radius-full);
  overflow: hidden;
}

.progress-bar-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--ext-green-light) 0%, var(--ext-gold-primary) 100%);
  border-radius: var(--radius-full);
  transition: width 0.5s cubic-bezier(0.16, 1, 0.3, 1);
}

.mission-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.mission-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1.1rem 1.3rem;
  border-radius: var(--radius-md);
  border: 1.5px solid var(--border-subtle);
  background: var(--bg-secondary);
  transition: all var(--transition-fast);
  cursor: pointer;
}

.mission-card:hover {
  border-color: var(--ext-green-light);
  transform: translateY(-2px);
  box-shadow: var(--shadow-sm);
}

.mission-card.completed {
  background: #f0faf4;
  border-color: var(--ext-green-accent);
}

.mission-left {
  display: flex;
  align-items: center;
  gap: 14px;
}

.mission-checkbox {
  width: 24px;
  height: 24px;
  border-radius: 6px;
  border: 2px solid var(--border-subtle);
  display: flex;
  align-items: center;
  justify-content: center;
  background: #ffffff;
  transition: var(--transition-fast);
  font-size: 0.9rem;
  color: #ffffff;
}

.mission-card.completed .mission-checkbox {
  background: var(--ext-green-accent);
  border-color: var(--ext-green-accent);
}

.mission-title {
  font-weight: 700;
  font-size: 0.95rem;
  color: var(--ext-green-darkest);
}

.mission-card.completed .mission-title {
  text-decoration: line-through;
  color: var(--text-muted);
}

.mission-desc {
  font-size: 0.8rem;
  color: var(--text-muted);
}

.mission-pts {
  font-weight: 800;
  font-size: 0.85rem;
  color: var(--ext-gold-dark);
  background: #fff9e6;
  padding: 0.35rem 0.75rem;
  border-radius: var(--radius-full);
  border: 1px solid rgba(201, 156, 59, 0.3);
}

/* Insignias de Compromiso */
.badges-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
  margin-top: 1.2rem;
}

.badge-item {
  background: var(--bg-secondary);
  border-radius: var(--radius-md);
  padding: 1rem;
  text-align: center;
  border: 1px solid var(--border-subtle);
  transition: var(--transition-normal);
}

.badge-item.unlocked {
  background: #fffdf7;
  border: 1.5px solid var(--ext-gold-primary);
  box-shadow: 0 4px 12px rgba(201, 156, 59, 0.15);
}

.badge-item.locked {
  opacity: 0.55;
  filter: grayscale(1);
}

.badge-icon {
  font-size: 2.2rem;
  margin-bottom: 6px;
}

.badge-name {
  font-weight: 700;
  font-size: 0.88rem;
  color: var(--ext-green-darkest);
}

.badge-status {
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--ext-gold-dark);
  text-transform: uppercase;
}

/* Rewards Catalog */
.rewards-strip {
  margin-top: 2rem;
  background: linear-gradient(135deg, var(--ext-green-darkest) 0%, var(--ext-green-dark) 100%);
  border-radius: var(--radius-md);
  padding: 1.5rem;
  color: #ffffff;
}

.rewards-title {
  color: var(--ext-gold-light);
  font-size: 1.15rem;
  margin-bottom: 0.8rem;
}

.reward-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.6rem 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  font-size: 0.85rem;
}

.reward-row:last-child {
  border-bottom: none;
}

/* ==========================================================================
   DEMOCRACIA DIGITAL PARTICIPATIVA
   ========================================================================== */
.democracy-wrapper {
  max-width: 1250px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2.5rem;
}

.democracy-card {
  background: #ffffff;
  border-radius: var(--radius-lg);
  padding: 2.2rem;
  border: 1px solid var(--border-subtle);
  box-shadow: var(--shadow-md);
}

.poll-box {
  margin-bottom: 2rem;
  background: var(--bg-secondary);
  border-radius: var(--radius-md);
  padding: 1.4rem;
  border: 1px solid var(--border-subtle);
}

.poll-question {
  font-family: 'Playfair Display', serif;
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--ext-green-darkest);
  margin-bottom: 1rem;
}

.poll-options {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.poll-option-btn {
  background: #ffffff;
  border: 1.5px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  padding: 0.85rem 1.1rem;
  display: flex;
  flex-direction: column;
  gap: 4px;
  cursor: pointer;
  transition: all var(--transition-fast);
  text-align: left;
  position: relative;
  overflow: hidden;
}

.poll-option-btn:hover {
  border-color: var(--ext-green-light);
  transform: translateY(-1px);
}

.poll-option-btn.selected {
  border-color: var(--ext-green-primary);
  background: #f4faf6;
}

.option-top-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-weight: 600;
  font-size: 0.9rem;
  position: relative;
  z-index: 2;
}

.option-pct-bar {
  position: absolute;
  top: 0;
  bottom: 0;
  left: 0;
  background: rgba(30, 157, 101, 0.12);
  z-index: 1;
  transition: width 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}

/* Ágora de Propuestas de la Comunidad */
.proposals-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-top: 1.5rem;
  max-height: 480px;
  overflow-y: auto;
  padding-right: 6px;
}

.proposal-item {
  background: var(--bg-secondary);
  border-radius: var(--radius-md);
  padding: 1.2rem;
  border: 1px solid var(--border-subtle);
}

.proposal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 6px;
}

.proposal-author {
  font-weight: 700;
  font-size: 0.88rem;
  color: var(--ext-green-darkest);
}

.proposal-tag {
  font-size: 0.72rem;
  background: var(--ext-green-subtle);
  color: var(--ext-green-primary);
  padding: 2px 8px;
  border-radius: var(--radius-full);
  font-weight: 700;
}

.proposal-text {
  font-size: 0.9rem;
  color: var(--text-secondary);
  margin-bottom: 12px;
}

.proposal-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.upvote-btn {
  background: #ffffff;
  border: 1px solid var(--border-subtle);
  padding: 0.4rem 0.85rem;
  border-radius: var(--radius-full);
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--ext-green-primary);
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 6px;
  transition: var(--transition-fast);
}

.upvote-btn:hover {
  background: var(--ext-green-primary);
  color: #ffffff;
  border-color: var(--ext-green-primary);
}

.incorporada-badge {
  font-size: 0.72rem;
  font-weight: 700;
  color: #0b5134;
  background: #e2f4ea;
  padding: 3px 8px;
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  gap: 4px;
}

/* ==========================================================================
   BIOGRAFÍA & TRAYECTORIA
   ========================================================================== */
.bio-timeline-wrapper {
  max-width: 1100px;
  margin: 0 auto;
}

.bio-card-highlight {
  display: grid;
  grid-template-columns: 340px 1fr;
  gap: 2.5rem;
  background: #ffffff;
  border-radius: var(--radius-lg);
  padding: 2.5rem;
  box-shadow: var(--shadow-md);
  border: 1px solid var(--border-subtle);
  margin-bottom: 3.5rem;
  align-items: center;
}

.bio-photo-box {
  position: relative;
  border-radius: var(--radius-md);
  overflow: hidden;
  box-shadow: var(--shadow-md);
  border: 2px solid var(--ext-gold-primary);
}

.bio-photo-box img {
  width: 100%;
  height: 380px;
  object-fit: cover;
  display: block;
}

.bio-summary-col {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.bio-quote-callout {
  background: #f7faf8;
  border-left: 4px solid var(--ext-gold-primary);
  padding: 1.1rem 1.4rem;
  font-style: italic;
  font-size: 1.05rem;
  color: var(--ext-green-darkest);
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  line-height: 1.6;
}

.timeline-track {
  position: relative;
  padding-left: 2rem;
  border-left: 3px solid var(--border-subtle);
  display: flex;
  flex-direction: column;
  gap: 2.2rem;
  margin-top: 2rem;
}

.timeline-point {
  position: relative;
}

.timeline-point::before {
  content: '';
  position: absolute;
  left: -2.85rem;
  top: 4px;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: var(--ext-green-primary);
  border: 4px solid #ffffff;
  box-shadow: 0 0 0 2px var(--ext-gold-primary);
}

.timeline-year {
  font-family: 'Playfair Display', serif;
  font-weight: 800;
  font-size: 1.15rem;
  color: var(--ext-gold-dark);
  margin-bottom: 4px;
}

.timeline-heading {
  font-size: 1.25rem;
  color: var(--ext-green-darkest);
  margin-bottom: 6px;
}

.timeline-text {
  font-size: 0.95rem;
  color: var(--text-secondary);
  line-height: 1.6;
}

/* ==========================================================================
   EJES DE GOBIERNO (5 PILARES)
   ========================================================================== */
.pillars-grid {
  max-width: 1250px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.8rem;
}

.pillar-card {
  background: #ffffff;
  border-radius: var(--radius-lg);
  padding: 2.2rem;
  border: 1px solid var(--border-subtle);
  box-shadow: var(--shadow-sm);
  transition: all var(--transition-normal);
  display: flex;
  flex-direction: column;
}

.pillar-card:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow-lg);
  border-color: var(--ext-gold-primary);
}

.pillar-number {
  font-family: 'Playfair Display', serif;
  font-size: 2.5rem;
  font-weight: 800;
  color: rgba(201, 156, 59, 0.4);
  line-height: 1;
  margin-bottom: 1rem;
}

.pillar-title {
  font-size: 1.35rem;
  color: var(--ext-green-darkest);
  margin-bottom: 0.9rem;
}

.pillar-desc {
  font-size: 0.92rem;
  color: var(--text-secondary);
  line-height: 1.65;
  margin-bottom: 1.2rem;
}

.pillar-points-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: auto;
  font-size: 0.85rem;
  color: var(--text-primary);
}

.pillar-points-list li {
  position: relative;
  padding-left: 20px;
}

.pillar-points-list li::before {
  content: '✓';
  position: absolute;
  left: 0;
  color: var(--ext-green-accent);
  font-weight: 800;
}

/* ==========================================================================
   TABLA DE HONOR Y RANKING
   ========================================================================== */
.leaderboard-card {
  max-width: 1000px;
  margin: 0 auto;
  background: #ffffff;
  border-radius: var(--radius-lg);
  padding: 2rem;
  box-shadow: var(--shadow-md);
  border: 1px solid var(--border-subtle);
}

.leaderboard-table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 1.2rem;
}

.leaderboard-table th {
  text-align: left;
  padding: 0.85rem 1rem;
  font-size: 0.78rem;
  text-transform: uppercase;
  color: var(--text-muted);
  border-bottom: 2px solid var(--border-subtle);
}

.leaderboard-table td {
  padding: 1rem;
  border-bottom: 1px solid var(--border-subtle);
  font-size: 0.92rem;
}

.rank-pos {
  font-weight: 800;
  font-size: 1.1rem;
  width: 50px;
  color: var(--ext-green-darkest);
}

.rank-pos.gold { color: #d4af37; }
.rank-pos.silver { color: #a0a0a0; }
.rank-pos.bronze { color: #cd7f32; }

/* ==========================================================================
   MODAL DE REGISTRO / COMPARTIR
   ========================================================================== */
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(4, 38, 23, 0.75);
  backdrop-filter: blur(8px);
  z-index: 2000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
}

.modal-overlay.active {
  opacity: 1;
  pointer-events: auto;
}

.modal-card {
  background: #ffffff;
  border-radius: var(--radius-lg);
  max-width: 560px;
  width: 100%;
  padding: 2.2rem;
  box-shadow: var(--shadow-lg);
  border: 2px solid var(--ext-gold-primary);
  position: relative;
  transform: translateY(20px);
  transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  max-height: 90vh;
  overflow-y: auto;
}

.modal-overlay.active .modal-card {
  transform: translateY(0);
}

.modal-close-btn {
  position: absolute;
  top: 1.2rem;
  right: 1.2rem;
  background: var(--bg-secondary);
  border: none;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  font-size: 1.2rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-secondary);
}

/* ==========================================================================
   TOAST NOTIFICACIONES
   ========================================================================== */
.toast-container {
  position: fixed;
  bottom: 25px;
  right: 25px;
  z-index: 3000;
  display: flex;
  flex-direction: column;
  gap: 10px;
  pointer-events: none;
}

.toast-msg {
  background: var(--ext-green-darkest);
  color: #ffffff;
  border-left: 5px solid var(--ext-gold-primary);
  padding: 0.9rem 1.4rem;
  border-radius: var(--radius-sm);
  box-shadow: var(--shadow-lg);
  font-size: 0.92rem;
  display: flex;
  align-items: center;
  gap: 10px;
  animation: slideToast 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  pointer-events: auto;
}

@keyframes slideToast {
  from { transform: translateX(100%); opacity: 0; }
  to { transform: translateX(0); opacity: 1; }
}

/* ==========================================================================
   FOOTER INSTITUCIONAL
   ========================================================================== */
.main-footer {
  background: var(--ext-green-darkest);
  color: rgba(255, 255, 255, 0.85);
  padding: 4.5rem 1.5rem 2.5rem;
  border-top: 3px solid var(--ext-gold-primary);
}

.footer-container {
  max-width: 1300px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1.5fr 1fr 1fr 1fr;
  gap: 3rem;
  margin-bottom: 3rem;
}

.footer-col h4 {
  color: var(--ext-gold-light);
  font-size: 1.15rem;
  margin-bottom: 1.2rem;
}

.footer-col p {
  font-size: 0.9rem;
  color: rgba(255, 255, 255, 0.75);
  line-height: 1.6;
}

.footer-links {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.footer-links a {
  color: rgba(255, 255, 255, 0.75);
  text-decoration: none;
  font-size: 0.9rem;
  transition: var(--transition-fast);
}

.footer-links a:hover {
  color: var(--ext-gold-light);
  padding-left: 4px;
}

.footer-bottom {
  max-width: 1300px;
  margin: 0 auto;
  padding-top: 2rem;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 1rem;
  font-size: 0.82rem;
  color: rgba(255, 255, 255, 0.6);
}

/* ==========================================================================
   MÁQUINA DE VOTOS ESTUDIANTILES (PADRÓN DIGITAL JOVEN & IMPACTO FACULTADES)
   ========================================================================== */
.student-vote-section {
  background: linear-gradient(180deg, #f7faf8 0%, #edf4ef 100%);
  position: relative;
  border-top: 1px solid var(--border-subtle);
  border-bottom: 2px solid var(--border-accent);
}

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

.vote-header-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 1.2rem;
  margin-bottom: 2rem;
}

.vote-pill-tag {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--ext-green-darkest);
  color: var(--ext-gold-light);
  padding: 0.45rem 1.1rem;
  border-radius: var(--radius-full);
  font-size: 0.82rem;
  font-weight: 800;
  letter-spacing: 0.8px;
  box-shadow: 0 4px 14px rgba(4, 38, 23, 0.25);
  border: 1px solid rgba(201, 156, 59, 0.4);
}

.live-pulse-dot {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background-color: #ff4757;
  box-shadow: 0 0 0 0 rgba(255, 71, 87, 0.7);
  animation: pulse-red 1.6s infinite;
}

@keyframes pulse-red {
  0% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(255, 71, 87, 0.7); }
  70% { transform: scale(1); box-shadow: 0 0 0 8px rgba(255, 71, 87, 0); }
  100% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(255, 71, 87, 0); }
}

.vote-live-counter {
  display: flex;
  align-items: baseline;
  gap: 10px;
  background: #ffffff;
  padding: 0.6rem 1.4rem;
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-sm);
  border: 1px solid rgba(201, 156, 59, 0.35);
}

.counter-num {
  font-family: 'Playfair Display', serif;
  font-size: 1.7rem;
  font-weight: 900;
  color: var(--ext-green-darkest);
}

.counter-lbl {
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--text-secondary);
}

.vote-machine-grid {
  display: grid;
  grid-template-columns: 1fr 1.05fr;
  gap: 2rem;
  margin-bottom: 2.5rem;
}

/* Tarjeta de Registro de Voto */
.vote-pledge-card {
  background: #ffffff;
  border-radius: var(--radius-lg);
  padding: 2.2rem;
  box-shadow: 0 12px 36px rgba(7, 59, 36, 0.1);
  border: 2px solid var(--ext-gold-primary);
  display: flex;
  flex-direction: column;
  justify-content: center;
  position: relative;
  overflow: hidden;
}

.vote-form-header {
  margin-bottom: 1.5rem;
}

.vote-step-pill {
  font-size: 0.75rem;
  font-weight: 800;
  color: var(--ext-green-primary);
  background: var(--ext-green-subtle);
  padding: 3px 10px;
  border-radius: var(--radius-full);
  display: inline-block;
  margin-bottom: 8px;
}

.vote-form-title {
  font-size: 1.6rem;
  color: var(--ext-green-darkest);
  margin-bottom: 6px;
}

.vote-form-desc {
  font-size: 0.92rem;
  color: var(--text-secondary);
  line-height: 1.5;
}

.quick-vote-form {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.form-row-compact {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.btn-vote-submit {
  width: 100%;
  justify-content: center;
  font-size: 1.05rem;
  font-weight: 800;
  padding: 0.9rem 1.4rem;
  letter-spacing: 0.4px;
}

.btn-pulse {
  animation: pulseGoldGlow 2.5s infinite;
}

@keyframes pulseGoldGlow {
  0% { box-shadow: 0 0 0 0 rgba(201, 156, 59, 0.6); }
  70% { box-shadow: 0 0 0 12px rgba(201, 156, 59, 0); }
  100% { box-shadow: 0 0 0 0 rgba(201, 156, 59, 0); }
}

.vote-security-note {
  font-size: 0.75rem;
  color: var(--text-muted);
  text-align: center;
  margin-top: 4px;
}

/* Carné de Votante Oficial Generado */
.carnet-voter-card {
  background: linear-gradient(135deg, #042617 0%, #073b24 100%);
  color: #ffffff;
  border-radius: var(--radius-md);
  padding: 1.8rem;
  border: 2px solid var(--ext-gold-light);
  box-shadow: 0 14px 40px rgba(4, 38, 23, 0.4);
  position: relative;
  overflow: hidden;
}

.carnet-voter-card::after {
  content: '';
  position: absolute;
  top: -50px;
  right: -50px;
  width: 180px;
  height: 180px;
  background: radial-gradient(circle, rgba(201, 156, 59, 0.25) 0%, transparent 70%);
  pointer-events: none;
}

.carnet-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 1px solid rgba(201, 156, 59, 0.35);
  padding-bottom: 1rem;
  margin-bottom: 1.2rem;
}

.carnet-brand {
  display: flex;
  align-items: center;
  gap: 10px;
}

.carnet-candidate {
  font-family: 'Playfair Display', serif;
  font-size: 1.15rem;
  font-weight: 800;
  color: var(--ext-gold-light);
  letter-spacing: 0.5px;
}

.carnet-motto {
  font-size: 0.68rem;
  color: rgba(255, 255, 255, 0.7);
  font-style: italic;
}

.carnet-verified-badge {
  background: #00d084;
  color: #042617;
  font-size: 0.72rem;
  font-weight: 800;
  padding: 4px 10px;
  border-radius: var(--radius-full);
}

.carnet-body {
  display: flex;
  align-items: center;
  gap: 18px;
  margin-bottom: 1.5rem;
}

.carnet-avatar-col {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
}

.carnet-avatar-circle {
  width: 60px;
  height: 60px;
  border-radius: 50%;
  background: var(--ext-gold-gradient);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.8rem;
  border: 2px solid #ffffff;
  box-shadow: 0 4px 12px rgba(0,0,0,0.3);
}

.carnet-id-badge {
  font-family: monospace;
  font-size: 0.72rem;
  background: rgba(255,255,255,0.15);
  padding: 2px 6px;
  border-radius: 4px;
  color: var(--ext-gold-light);
  font-weight: 700;
}

.carnet-info-col {
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.carnet-name {
  font-size: 1.35rem;
  font-weight: 800;
  color: #ffffff;
}

.carnet-faculty {
  font-size: 0.92rem;
  color: var(--ext-gold-light);
  font-weight: 600;
}

.carnet-semester {
  font-size: 0.8rem;
  color: rgba(255,255,255,0.75);
}

.carnet-points-badge {
  display: inline-block;
  margin-top: 4px;
  font-size: 0.75rem;
  font-weight: 800;
  color: #00d084;
}

.carnet-footer {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

/* Explorador de Beneficios por Facultades */
.faculty-benefits-card {
  background: #ffffff;
  border-radius: var(--radius-lg);
  padding: 2.2rem;
  box-shadow: var(--shadow-md);
  border: 1px solid var(--border-subtle);
  display: flex;
  flex-direction: column;
}

.faculty-card-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 0.8rem;
}

.faculty-tag-gold {
  font-size: 0.75rem;
  font-weight: 800;
  text-transform: uppercase;
  color: var(--ext-gold-dark);
  letter-spacing: 1px;
}

.faculty-card-title {
  font-size: 1.45rem;
  color: var(--ext-green-darkest);
}

.faculty-badge-icon {
  font-size: 2rem;
  background: var(--ext-green-subtle);
  width: 48px;
  height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 12px;
}

.faculty-select-hint {
  font-size: 0.88rem;
  color: var(--text-secondary);
  margin-bottom: 1.2rem;
}

.faculty-pills-selector {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 1.4rem;
}

.fac-pill {
  background: var(--bg-secondary);
  border: 1px solid var(--border-subtle);
  padding: 0.4rem 0.9rem;
  border-radius: var(--radius-full);
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--text-secondary);
  cursor: pointer;
  transition: var(--transition-fast);
}

.fac-pill:hover {
  background: #e6ede8;
  color: var(--ext-green-darkest);
}

.fac-pill.active {
  background: var(--ext-green-darkest);
  color: var(--ext-gold-light);
  border-color: var(--ext-gold-primary);
  box-shadow: 0 4px 12px rgba(4, 38, 23, 0.2);
}

.faculty-benefit-display {
  background: #fbfdfc;
  border-radius: var(--radius-md);
  padding: 1.3rem;
  border: 1.5px solid var(--border-subtle);
  flex-grow: 1;
  display: flex;
  flex-direction: column;
  gap: 12px;
  animation: fadeInFac 0.3s ease;
}

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

.fac-benefit-title {
  font-size: 1.05rem;
  font-weight: 800;
  color: var(--ext-green-darkest);
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 4px;
}

.fac-proposal-item {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  padding: 0.6rem 0;
  border-bottom: 1px solid rgba(0,0,0,0.05);
}

.fac-proposal-item:last-child {
  border-bottom: none;
  padding-bottom: 0;
}

.fac-proposal-icon {
  font-size: 1.3rem;
  flex-shrink: 0;
  margin-top: 2px;
}

.fac-proposal-text h5 {
  font-size: 0.92rem;
  font-weight: 700;
  color: var(--ext-green-dark);
  margin-bottom: 2px;
}

.fac-proposal-text p {
  font-size: 0.82rem;
  color: var(--text-secondary);
  line-height: 1.45;
}

/* Tarjeta de WhatsApp Explosivo */
.student-whatsapp-blast-card {
  background: linear-gradient(135deg, #053c21 0%, #032013 100%);
  border: 2px solid #25D366;
  border-radius: var(--radius-lg);
  padding: 1.8rem 2.2rem;
  display: flex;
  align-items: center;
  gap: 1.8rem;
  box-shadow: 0 10px 30px rgba(37, 211, 102, 0.2);
}

.blast-icon-col {
  flex-shrink: 0;
}

.whatsapp-glow-icon {
  width: 58px;
  height: 58px;
  border-radius: 50%;
  background: #25D366;
  color: #ffffff;
  font-size: 1.9rem;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 0 20px rgba(37, 211, 102, 0.6);
}

.blast-text-col {
  flex-grow: 1;
}

.blast-text-col h4 {
  color: #ffffff;
  font-size: 1.25rem;
  margin-bottom: 4px;
}

.blast-text-col p {
  color: rgba(255, 255, 255, 0.85);
  font-size: 0.9rem;
  line-height: 1.5;
}

.btn-whatsapp-blast {
  background: linear-gradient(135deg, #25D366 0%, #128C7E 100%);
  color: #ffffff;
  font-weight: 800;
  font-size: 0.95rem;
  padding: 0.85rem 1.6rem;
  border-radius: var(--radius-full);
  border: 1.5px solid rgba(255, 255, 255, 0.4);
  box-shadow: 0 6px 20px rgba(37, 211, 102, 0.4);
  cursor: pointer;
  white-space: nowrap;
  transition: var(--transition-normal);
}

.btn-whatsapp-blast:hover {
  transform: translateY(-3px) scale(1.02);
  box-shadow: 0 10px 28px rgba(37, 211, 102, 0.6);
}

/* Partículas de Confetti Nativas */
.confetti-particle {
  position: fixed;
  top: -20px;
  z-index: 100020;
  pointer-events: none;
  animation: fallConfetti 2.8s linear forwards;
}

@keyframes fallConfetti {
  0% { transform: translateY(0) rotate(0deg); opacity: 1; }
  100% { transform: translateY(105vh) rotate(720deg); opacity: 0; }
}

.nav-highlight {
  background: rgba(201, 156, 59, 0.15) !important;
  color: var(--ext-gold-dark) !important;
  font-weight: 800 !important;
  border: 1px solid rgba(201, 156, 59, 0.3) !important;
}

/* Gateway Cards (Acceso a Plan Rectoral y Democracia Digital) */
.gateway-two-cards-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2rem;
}

.gateway-card {
  background: #ffffff;
  border-radius: var(--radius-lg);
  padding: 2.2rem;
  box-shadow: var(--shadow-md);
  border: 1.5px solid var(--border-subtle);
  display: flex;
  flex-direction: column;
  transition: transform var(--transition-normal), box-shadow var(--transition-normal);
}

.gateway-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
  border-color: var(--ext-gold-primary);
}

.gateway-card-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1.2rem;
}

.gateway-badge-gold {
  background: #fff8e8;
  color: var(--ext-gold-dark);
  font-size: 0.78rem;
  font-weight: 800;
  padding: 4px 12px;
  border-radius: var(--radius-full);
  border: 1px solid rgba(201, 156, 59, 0.4);
}

.gateway-badge-green {
  background: var(--ext-green-subtle);
  color: var(--ext-green-primary);
  font-size: 0.78rem;
  font-weight: 800;
  padding: 4px 12px;
  border-radius: var(--radius-full);
  border: 1px solid rgba(10, 79, 50, 0.2);
}

.gateway-card-icon {
  font-size: 2rem;
}

.gateway-card-title {
  font-size: 1.5rem;
  color: var(--ext-green-darkest);
  margin-bottom: 0.8rem;
}

.gateway-card-desc {
  font-size: 0.95rem;
  color: var(--text-secondary);
  line-height: 1.6;
  margin-bottom: 1.4rem;
}

.gateway-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 8px;
  font-size: 0.88rem;
  color: var(--ext-green-dark);
  margin-bottom: 1.8rem;
}

.gateway-card-action {
  margin-top: auto;
}

@media (max-width: 900px) {
  .gateway-two-cards-grid {
    grid-template-columns: 1fr;
  }
}

/* ==========================================================================
   ELEMENTOS DE INTERFAZ RESPONSIVA (MENÚ MÓVIL Y TABLAS)
   ========================================================================== */
.table-responsive {
  width: 100%;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

.btn-block {
  width: 100%;
  justify-content: center;
}

/* Mobile Navigation Backdrop & Drawer */
.mobile-nav-backdrop {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(4, 38, 23, 0.65);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  z-index: 100001;
  opacity: 0;
  pointer-events: none;
  transition: opacity var(--transition-normal);
}

.mobile-nav-backdrop.active {
  opacity: 1;
  pointer-events: auto;
}

.mobile-nav-drawer {
  position: fixed;
  top: 0;
  right: 0;
  bottom: 0;
  width: 320px;
  max-width: 86vw;
  background: #ffffff;
  z-index: 100002;
  box-shadow: -10px 0 35px rgba(0, 0, 0, 0.28);
  display: flex;
  flex-direction: column;
  transform: translateX(100%);
  transition: transform 0.35s cubic-bezier(0.16, 1, 0.3, 1);
}

.mobile-nav-drawer.active {
  transform: translateX(0);
}

.mobile-nav-header {
  padding: 1.2rem 1.4rem;
  border-bottom: 1px solid var(--border-subtle);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.mobile-nav-close {
  background: var(--bg-secondary);
  border: 1px solid var(--border-subtle);
  width: 38px;
  height: 38px;
  border-radius: 50%;
  font-size: 1.15rem;
  color: var(--ext-green-darkest);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: var(--transition-fast);
}

.mobile-nav-close:hover {
  background: #e8ede9;
}

.mobile-nav-user-badge {
  background: #f7faf8;
  padding: 0.85rem 1.4rem;
  border-bottom: 1px solid var(--border-subtle);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.mobile-nav-links {
  flex-grow: 1;
  overflow-y: auto;
  padding: 1rem 0.8rem;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.mobile-nav-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 0.85rem 1rem;
  color: var(--text-primary);
  text-decoration: none;
  font-weight: 600;
  font-size: 0.95rem;
  border-radius: var(--radius-sm);
  transition: var(--transition-fast);
}

.mobile-nav-item:hover, .mobile-nav-item:active {
  background: var(--ext-green-subtle);
  color: var(--ext-green-primary);
}

.mobile-nav-footer {
  padding: 1.2rem 1.4rem;
  border-top: 1px solid var(--border-subtle);
  background: #ffffff;
}

/* ==========================================================================
   RESPONSIVIDAD INTEGRAL (DESKTOP, TABLET Y MÓVILES)
   ========================================================================== */
@media (max-width: 1024px) {
  .hero-container {
    grid-template-columns: 1fr;
    text-align: center;
    gap: 2.5rem;
  }
  .hero-description {
    margin-left: auto;
    margin-right: auto;
  }
  .hero-cta-group {
    justify-content: center;
  }
  .hero-metrics-bar {
    grid-template-columns: repeat(2, 1fr);
  }
  .vote-machine-grid {
    grid-template-columns: 1fr;
    gap: 2rem;
  }
  .gateway-two-cards-grid {
    grid-template-columns: 1fr;
    gap: 1.8rem;
  }
  .activist-workspace, .tasks-container, .democracy-wrapper {
    grid-template-columns: 1fr;
  }
  .pillars-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .footer-container {
    grid-template-columns: 1fr 1fr;
  }
  .bio-card-highlight {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 768px) {
  html, body {
    overflow-x: hidden !important;
    width: 100% !important;
  }

  .top-institutional-bar {
    flex-direction: column;
    text-align: center;
    gap: 4px;
    padding: 0.45rem 1rem;
    font-size: 0.75rem;
  }
  .top-bar-links {
    display: none;
  }
  .institutional-motto {
    flex-wrap: wrap;
    justify-content: center;
  }

  .main-nav {
    display: none;
  }
  .header-user-status {
    display: none !important;
  }
  .header-actions .btn-sm {
    display: none !important;
  }
  .mobile-menu-btn {
    display: flex !important;
    align-items: center;
    justify-content: center;
    width: 42px;
    height: 42px;
    border-radius: 10px;
    border: 1.5px solid var(--border-subtle);
    background: var(--bg-secondary);
    color: var(--ext-green-darkest);
    font-size: 1.4rem;
    cursor: pointer;
    margin-left: 6px;
  }
  .header-container {
    padding: 0.65rem 1rem;
  }
  .brand-crest {
    width: 38px;
    height: 38px;
  }
  .brand-crest svg {
    width: 20px;
    height: 20px;
  }
  .brand-candidate-name {
    font-size: 1.15rem;
  }
  .brand-subtitle {
    font-size: 0.62rem;
  }

  .hero-section {
    padding: 2.2rem 1rem 2.8rem;
  }
  .hero-badge-pill {
    font-size: 0.72rem;
    padding: 0.35rem 0.8rem;
    white-space: normal;
    text-align: center;
  }
  .hero-title {
    font-size: clamp(1.85rem, 6.5vw, 2.5rem);
    letter-spacing: -0.5px;
    line-height: 1.18;
  }
  .hero-description {
    font-size: 0.95rem;
    line-height: 1.55;
    margin-bottom: 1.4rem;
  }
  .hero-cta-group {
    flex-direction: column;
    width: 100%;
    gap: 10px;
  }
  .hero-cta-group .btn {
    width: 100%;
    justify-content: center;
    padding: 0.8rem 1.2rem;
  }

  /* Sección Máquina de Voto Unificada */
  .student-vote-section {
    padding: 2.5rem 1rem !important;
  }
  .vote-header-row {
    flex-direction: column;
    align-items: stretch;
    gap: 12px;
  }
  .vote-pill-tag {
    text-align: center;
    justify-content: center;
    font-size: 0.74rem;
  }
  .vote-live-counter {
    justify-content: center;
    padding: 0.6rem 1rem;
  }
  .counter-num {
    font-size: 1.45rem;
  }
  .vote-pledge-card, .faculty-benefits-card {
    padding: 1.5rem 1.1rem;
  }
  .vote-form-title {
    font-size: 1.35rem;
  }
  .faculty-card-title {
    font-size: 1.25rem;
  }
  .faculty-badge-icon {
    width: 40px;
    height: 40px;
    font-size: 1.6rem;
  }

  /* WhatsApp Explosivo */
  .student-whatsapp-blast-card {
    flex-direction: column;
    text-align: center;
    gap: 1.2rem;
    padding: 1.6rem 1.2rem;
  }
  .blast-action-col {
    width: 100%;
  }
  .btn-whatsapp-blast {
    width: 100%;
    white-space: normal;
    padding: 0.85rem 1.2rem;
    font-size: 0.9rem;
    display: flex;
    justify-content: center;
    line-height: 1.3;
  }

  /* Carné de Votante Unificado */
  .carnet-voter-card {
    padding: 1.4rem 1.1rem;
  }
  .carnet-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
  }
  .carnet-body {
    flex-direction: column;
    text-align: center;
    gap: 14px;
  }
  .carnet-info-col {
    align-items: center;
  }
  .carnet-footer {
    flex-direction: column;
    width: 100%;
    gap: 8px;
  }
  .carnet-footer .btn {
    width: 100%;
    justify-content: center;
  }

  /* Gateway Cards */
  .gateway-card {
    padding: 1.6rem 1.2rem;
  }
  .gateway-card-title {
    font-size: 1.35rem;
  }
  .gateway-card-features {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
  }
  .gateway-card .btn {
    width: 100%;
    justify-content: center;
  }

  /* Secciones Generales */
  .section {
    padding: 3rem 1rem;
  }
  .section-title {
    font-size: 1.75rem;
  }
  .section-subtitle {
    font-size: 0.92rem;
  }
  .pillars-grid {
    grid-template-columns: 1fr;
    gap: 1.2rem;
  }
  .footer-container {
    grid-template-columns: 1fr;
    gap: 2rem;
    padding: 3rem 1rem;
  }
  .footer-bottom {
    flex-direction: column;
    text-align: center;
    gap: 10px;
    padding: 1.2rem 1rem;
  }
  .badges-grid {
    grid-template-columns: 1fr;
  }
  .tasks-card, .badges-card {
    padding: 1.5rem 1.1rem;
  }
  .engine-header-banner {
    padding: 1.5rem 1.2rem;
    flex-direction: column;
    align-items: flex-start;
  }
  .engine-title {
    font-size: 1.4rem;
  }
  .engine-stats-pills {
    width: 100%;
    flex-wrap: wrap;
    gap: 8px;
  }
  .bio-card-highlight {
    padding: 1.3rem 1rem;
    gap: 1.2rem;
  }
  .bio-photo-box img {
    height: 260px;
    width: 100%;
    object-fit: cover;
  }
  .timeline-track {
    padding-left: 1.5rem;
  }
  .timeline-point::before {
    left: -2.15rem;
  }
  .voting-card {
    padding: 1.2rem;
  }
  .leaderboard-card {
    padding: 1.4rem 0.8rem;
  }
  .leaderboard-table {
    min-width: 480px;
  }

  /* Walking Avatar en Móviles y Tablets */
  .nestor-walking-track {
    bottom: 8px !important;
    left: 8px !important;
    right: 8px !important;
    height: 110px !important;
    z-index: 99990 !important;
  }
  .nestor-walker {
    width: 95px !important;
    height: 110px !important;
    animation: walkAcrossMobile 18s ease-in-out infinite !important;
  }
  @keyframes walkAcrossMobile {
    0% { left: 2%; }
    48% { left: 40%; }
    50% { left: 40%; }
    98% { left: 2%; }
    100% { left: 2%; }
  }
  .walker-speech-bubble {
    font-size: 0.65rem !important;
    padding: 0.25rem 0.5rem !important;
    max-width: 130px !important;
    white-space: normal !important;
    line-height: 1.2 !important;
    margin-bottom: 3px !important;
  }
  .walker-figure {
    transform-origin: bottom center;
    transform: scale(0.75);
  }

  /* Ventana Chat con IA en estilo Bottom Sheet nativo */
  .ai-chat-window {
    position: fixed !important;
    bottom: 0 !important;
    left: 0 !important;
    right: 0 !important;
    width: 100% !important;
    max-width: 100% !important;
    height: 85vh !important;
    max-height: 85vh !important;
    border-radius: 20px 20px 0 0 !important;
    box-shadow: 0 -12px 40px rgba(0, 0, 0, 0.45) !important;
    z-index: 100010 !important;
  }
}

@media (max-width: 576px) {
  .form-row-compact {
    grid-template-columns: 1fr;
    gap: 10px;
  }
  .hero-metrics-bar {
    grid-template-columns: 1fr 1fr;
    gap: 0.5rem;
    padding: 0.75rem;
  }
  .metric-item {
    padding: 0.35rem;
  }
  .metric-number {
    font-size: 1.25rem;
  }
  .metric-label {
    font-size: 0.64rem;
  }
  .portrait-frame {
    height: 300px;
    max-width: 100%;
  }
  .portrait-floating-tag {
    padding: 0.75rem;
    bottom: 8px;
    left: 8px;
    right: 8px;
  }
  .tag-title {
    font-size: 0.92rem;
  }
  .tag-sub {
    font-size: 0.68rem;
  }
  .candidate-quick-badges {
    display: none;
  }
  .faculty-pills-selector {
    gap: 5px;
  }
  .fac-pill {
    font-size: 0.72rem;
    padding: 0.35rem 0.65rem;
  }
}

@media (max-width: 420px) {
  .hero-title {
    font-size: 1.65rem;
    line-height: 1.2;
  }
  .brand-candidate-name {
    font-size: 1.05rem;
  }
  .brand-crest {
    width: 34px;
    height: 34px;
  }
  .brand-crest svg {
    width: 18px;
    height: 18px;
  }
  .ref-link-display {
    flex-direction: column;
  }
  .ref-link-display .btn {
    width: 100%;
    justify-content: center;
  }
  .share-buttons-row .btn {
    flex: 1 1 100%;
    justify-content: center;
  }
  .modal-content, .modal-card {
    width: 95%;
    padding: 1.3rem 0.9rem;
  }
  .mission-item {
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
  }
  .mission-check-btn {
    width: 100%;
    justify-content: center;
  }
}

/* ==========================================================================
   AVATAR CAMINANTE DE NÉSTOR OSUNA & CHAT CON IA (GEMINI API)
   ========================================================================== */

/* Walking Character Container - Fixed above content, high z-index */
.nestor-walking-track {
  position: fixed;
  bottom: 20px;
  left: 20px;
  right: 20px;
  height: 150px;
  pointer-events: none;
  z-index: 99998;
}

.nestor-walker {
  position: absolute;
  bottom: 0;
  left: 3%;
  width: 140px;
  height: 145px;
  pointer-events: auto;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  align-items: center;
  transition: transform 0.3s ease;
  animation: walkAcross 18s ease-in-out infinite;
}

.nestor-walker:hover {
  animation-play-state: paused;
  transform: scale(1.06);
}

@keyframes walkAcross {
  0% {
    left: 3%;
  }
  48% {
    left: 45%;
  }
  50% {
    left: 45%;
  }
  98% {
    left: 3%;
  }
  100% {
    left: 3%;
  }
}

/* Walking Speech Bubble - Always Forward, Never Mirrored */
.walker-speech-bubble {
  background: #ffffff;
  color: #042617;
  border: 2px solid #c99c3b;
  border-radius: 12px;
  padding: 0.45rem 0.85rem;
  font-size: 0.8rem;
  font-weight: 800;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.22);
  white-space: nowrap;
  margin-bottom: 8px;
  position: relative;
  text-align: center;
  animation: bubbleFloat 2s ease-in-out infinite alternate;
  pointer-events: auto;
  transform: none !important; /* Nunca se invierte el texto */
  direction: ltr !important;
  unicode-bidi: normal !important;
}

.walker-speech-bubble::after {
  content: '';
  position: absolute;
  bottom: -7px;
  left: 50%;
  transform: translateX(-50%);
  border-width: 7px 7px 0;
  border-style: solid;
  border-color: #ffffff transparent;
  display: block;
  width: 0;
}

@keyframes bubbleFloat {
  from { transform: translateY(0) scaleX(1); }
  to { transform: translateY(-5px) scaleX(1); }
}

/* Walking Avatar Figure (Real Face + Animated Academic Suit) - Flips orientation without flipping text */
.walker-figure {
  position: relative;
  width: 74px;
  height: 95px;
  display: flex;
  flex-direction: column;
  align-items: center;
  animation: figureOrientation 18s ease-in-out infinite;
}

@keyframes figureOrientation {
  0% {
    transform: scaleX(1);
  }
  48% {
    transform: scaleX(1);
  }
  50% {
    transform: scaleX(-1);
  }
  98% {
    transform: scaleX(-1);
  }
  100% {
    transform: scaleX(1);
  }
}


.walker-head {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  border: 3px solid #c99c3b;
  overflow: hidden;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.35);
  background: #042617;
  position: relative;
  z-index: 2;
  animation: headBob 0.6s ease-in-out infinite alternate;
}

.walker-head img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: top center;
  display: block;
}

@keyframes headBob {
  from { transform: translateY(0); }
  to { transform: translateY(3px); }
}

.walker-body {
  position: relative;
  width: 40px;
  height: 32px;
  background: linear-gradient(135deg, #073b24 0%, #042617 100%);
  border-radius: 6px 6px 3px 3px;
  margin-top: -4px;
  display: flex;
  justify-content: center;
  border: 1.5px solid rgba(201, 156, 59, 0.6);
  box-shadow: 0 3px 8px rgba(0,0,0,0.2);
}

.walker-tie {
  width: 6px;
  height: 20px;
  background: #c99c3b;
  border-radius: 1px;
  margin-top: 2px;
}

.walker-legs {
  display: flex;
  gap: 8px;
  width: 28px;
  height: 20px;
}

.walker-leg {
  width: 10px;
  height: 20px;
  background: #042617;
  border-radius: 3px;
  transform-origin: top center;
  box-shadow: 0 2px 4px rgba(0,0,0,0.3);
}

.walker-leg.left {
  animation: legStrideLeft 0.5s linear infinite alternate;
}

.walker-leg.right {
  animation: legStrideRight 0.5s linear infinite alternate;
}

@keyframes legStrideLeft {
  0% { transform: rotate(-24deg); }
  100% { transform: rotate(24deg); }
}

@keyframes legStrideRight {
  0% { transform: rotate(24deg); }
  100% { transform: rotate(-24deg); }
}

.walker-shadow {
  width: 50px;
  height: 8px;
  background: rgba(0, 0, 0, 0.35);
  border-radius: 50%;
  margin-top: -3px;
  filter: blur(2px);
  animation: shadowPulse 0.5s ease-in-out infinite alternate;
}

@keyframes shadowPulse {
  from { transform: scale(0.85); opacity: 0.3; }
  to { transform: scale(1.15); opacity: 0.5; }
}

/* ==========================================================================
   FLOATING CHAT TRIGGER (BOTTOM RIGHT) - ALWAYS VISIBLE
   ========================================================================== */
.ai-chat-trigger {
  display: none !important;
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 99999;
  display: flex;
  align-items: center;
  gap: 12px;
  background: linear-gradient(135deg, #042617 0%, #0a4f32 100%);
  color: #ffffff;
  padding: 0.65rem 1.25rem 0.65rem 0.75rem;
  border-radius: var(--radius-full);
  border: 2.5px solid #c99c3b;
  box-shadow: 0 8px 30px rgba(4, 38, 23, 0.45);
  cursor: pointer;
  transition: all var(--transition-normal);
}

.ai-chat-trigger:hover {
  transform: translateY(-4px) scale(1.03);
  box-shadow: 0 14px 38px rgba(201, 156, 59, 0.5);
}

.trigger-avatar-circle {
  width: 52px;
  height: 52px;
  border-radius: 50%;
  border: 2.5px solid #dfb75c;
  overflow: hidden;
  position: relative;
  background: #ffffff;
  flex-shrink: 0;
  box-shadow: 0 4px 12px rgba(0,0,0,0.25);
}

.trigger-avatar-circle img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: top center;
  display: block;
}

.trigger-online-dot {
  position: absolute;
  bottom: 2px;
  right: 2px;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: #00d084;
  border: 2.5px solid #042617;
  box-shadow: 0 0 8px #00d084;
}

.trigger-text-col {
  display: flex;
  flex-direction: column;
}

.trigger-title {
  font-family: 'Playfair Display', serif;
  font-size: 1.05rem;
  font-weight: 800;
  color: #dfb75c;
  line-height: 1.1;
}

.trigger-subtitle {
  font-size: 0.76rem;
  color: #ffffff;
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 5px;
}

/* ==========================================================================
   AI CHAT WINDOW MODAL (BOTTOM RIGHT DOCK)
   ========================================================================== */
.ai-chat-window {
  position: fixed;
  bottom: 24px;
  right: 24px;
  width: 380px;
  max-width: calc(100vw - 32px);
  height: 580px;
  max-height: calc(100vh - 48px);
  background: #ffffff;
  border-radius: var(--radius-lg);
  border: 2px solid var(--ext-gold-primary);
  box-shadow: 0 18px 45px rgba(4, 38, 23, 0.35);
  z-index: 2000;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.3s ease;
  transform: translateY(20px) scale(0.96);
  opacity: 0;
  pointer-events: none;
}

.ai-chat-window.active {
  transform: translateY(0) scale(1);
  opacity: 1;
  pointer-events: auto;
}

/* Header */
.chat-header {
  background: linear-gradient(135deg, var(--ext-green-darkest) 0%, var(--ext-green-primary) 100%);
  color: #ffffff;
  padding: 0.9rem 1.1rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 2px solid var(--ext-gold-primary);
}

.chat-header-profile {
  display: flex;
  align-items: center;
  gap: 10px;
}

.chat-header-avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: 2px solid var(--ext-gold-light);
  overflow: hidden;
  background: var(--ext-green-darkest);
}

.chat-header-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: top center;
}

.chat-header-info h4 {
  font-family: 'Playfair Display', serif;
  font-size: 1rem;
  color: #ffffff;
  margin: 0;
  line-height: 1.1;
}

.chat-header-info span {
  font-size: 0.72rem;
  color: var(--ext-gold-light);
}

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

.chat-action-btn {
  background: rgba(255, 255, 255, 0.15);
  border: none;
  color: #ffffff;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.88rem;
  transition: var(--transition-fast);
}

.chat-action-btn:hover {
  background: var(--ext-gold-primary);
  color: #1a1202;
}

.chat-action-btn.active-voice {
  background: var(--ext-green-accent);
  color: #ffffff;
}

/* API Key Settings Pill Banner */
.api-key-banner {
  background: #fff8e8;
  padding: 0.4rem 0.8rem;
  font-size: 0.76rem;
  border-bottom: 1px solid rgba(201, 156, 59, 0.3);
  display: flex;
  justify-content: space-between;
  align-items: center;
  color: #5c430e;
}

.api-key-btn {
  background: var(--ext-gold-primary);
  color: #ffffff;
  border: none;
  padding: 2px 8px;
  border-radius: 4px;
  font-size: 0.72rem;
  font-weight: 700;
  cursor: pointer;
}

/* Messages Body */
.chat-messages-area {
  flex-grow: 1;
  padding: 1rem;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 12px;
  background: #fbfdfb;
}

.chat-msg {
  display: flex;
  flex-direction: column;
  max-width: 84%;
  font-size: 0.88rem;
  line-height: 1.5;
  animation: chatMsgFade 0.25s ease-out;
}

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

.chat-msg.bot {
  align-self: flex-start;
}

.chat-msg.user {
  align-self: flex-end;
}

.chat-bubble {
  padding: 0.75rem 0.95rem;
  border-radius: var(--radius-md);
  position: relative;
}

.chat-msg.bot .chat-bubble {
  background: #ffffff;
  color: var(--text-primary);
  border: 1px solid var(--border-subtle);
  border-top-left-radius: 4px;
  box-shadow: 0 2px 6px rgba(0,0,0,0.04);
}

.chat-msg.user .chat-bubble {
  background: linear-gradient(135deg, var(--ext-green-primary) 0%, var(--ext-green-dark) 100%);
  color: #ffffff;
  border-top-right-radius: 4px;
}

.chat-msg-time {
  font-size: 0.68rem;
  color: var(--text-muted);
  margin-top: 3px;
  padding: 0 4px;
}

.chat-msg.user .chat-msg-time {
  align-self: flex-end;
}

/* Suggestion Chips */
.chat-suggestions-row {
  display: flex;
  gap: 6px;
  overflow-x: auto;
  padding: 0.5rem 0.8rem;
  background: #f4f7f4;
  border-top: 1px solid var(--border-subtle);
  scrollbar-width: none;
}

.chat-suggestions-row::-webkit-scrollbar {
  display: none;
}

.suggestion-chip {
  background: #ffffff;
  border: 1px solid var(--border-subtle);
  color: var(--ext-green-darkest);
  font-size: 0.75rem;
  font-weight: 600;
  padding: 0.35rem 0.65rem;
  border-radius: var(--radius-full);
  white-space: nowrap;
  cursor: pointer;
  transition: var(--transition-fast);
}

.suggestion-chip:hover {
  background: var(--ext-green-subtle);
  border-color: var(--ext-green-primary);
  color: var(--ext-green-primary);
}

/* Speech Wave Indicator */
.voice-speaking-indicator {
  display: none;
  align-items: center;
  gap: 4px;
  padding: 0.35rem 0.8rem;
  background: #e8f4ed;
  color: var(--ext-green-primary);
  font-size: 0.75rem;
  font-weight: 700;
}

.wave-bar {
  width: 3px;
  height: 12px;
  background: var(--ext-green-accent);
  border-radius: 2px;
  animation: soundWave 0.8s ease-in-out infinite alternate;
}

.wave-bar:nth-child(2) { animation-delay: 0.2s; height: 16px; }
.wave-bar:nth-child(3) { animation-delay: 0.4s; height: 8px; }

@keyframes soundWave {
  from { transform: scaleY(0.4); }
  to { transform: scaleY(1.2); }
}

/* Input Area */
.chat-input-row {
  padding: 0.75rem 0.9rem;
  background: #ffffff;
  border-top: 1px solid var(--border-subtle);
  display: flex;
  align-items: center;
  gap: 8px;
}

.chat-input-field {
  flex-grow: 1;
  border: 1.5px solid var(--border-subtle);
  border-radius: var(--radius-full);
  padding: 0.55rem 0.95rem;
  font-size: 0.88rem;
  font-family: inherit;
  outline: none;
  transition: var(--transition-fast);
}

.chat-input-field:focus {
  border-color: var(--ext-green-primary);
  box-shadow: 0 0 0 3px rgba(10, 79, 50, 0.1);
}

.chat-send-btn, .chat-mic-btn {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: var(--transition-fast);
  flex-shrink: 0;
}

.chat-send-btn {
  background: var(--ext-green-primary);
  color: #ffffff;
}

.chat-send-btn:hover {
  background: var(--ext-green-dark);
}

.chat-mic-btn {
  background: var(--bg-secondary);
  color: var(--text-secondary);
  border: 1px solid var(--border-subtle);
}

.chat-mic-btn:hover {
  background: #e8f4ed;
  color: var(--ext-green-primary);
}

.chat-mic-btn.recording {
  background: #cf2e2e;
  color: #ffffff;
  animation: pulseMic 1.2s infinite;
}

@keyframes pulseMic {
  0% { transform: scale(1); box-shadow: 0 0 0 0 rgba(207, 46, 46, 0.7); }
  70% { transform: scale(1.08); box-shadow: 0 0 0 8px rgba(207, 46, 46, 0); }
  100% { transform: scale(1); box-shadow: 0 0 0 0 rgba(207, 46, 46, 0); }
}

