/* ============================================
   U.E. JOSÉ MARÍA VELASCO IBARRA
   ELECCIÓN DE LA REINA 2026
   ESTILOS PRINCIPALES - ACADÉMICO PROFESIONAL
   ============================================ */

/* ─── VARIABLES ─── */
:root {
  --color-bg: #0c0c0e;
  --color-bg-alt: #111114;
  --color-surface: rgba(255, 255, 255, 0.04);
  --color-surface-hover: rgba(255, 255, 255, 0.07);
  --color-text: #e8e4de;
  --color-text-muted: rgba(232, 228, 222, 0.55);
  --color-text-dim: rgba(232, 228, 222, 0.35);
  --color-gold: #c9a84c;
  --color-gold-light: #dfc06a;
  --color-gold-dark: #a07d2e;
  --color-red: #8b1a1a;
  --color-red-light: #b22222;
  --color-red-dark: #5c1010;
  --color-green: #2d5a27;
  --color-green-light: #4a8c42;
  --font-display: 'Playfair Display', serif;
  --font-body: 'Inter', sans-serif;
  --font-serif: 'Cormorant Garamond', serif;
  --gold-gradient: linear-gradient(135deg, #c9a84c, #dfc06a, #c9a84c);
  --gold-gradient-vertical: linear-gradient(180deg, #c9a84c, #dfc06a, #c9a84c);
  --radius-sm: 6px;
  --radius-md: 12px;
  --radius-lg: 16px;
  --radius-xl: 20px;
  --radius-full: 50px;
  --shadow-gold: 0 8px 32px rgba(201, 168, 76, 0.2);
  --shadow-gold-sm: 0 4px 16px rgba(201, 168, 76, 0.12);
  --shadow-card: 0 4px 24px rgba(0, 0, 0, 0.3);
  --transition-smooth: all 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
  --border-academic: 1px solid rgba(201, 168, 76, 0.15);
  --border-academic-light: 1px solid rgba(255, 255, 255, 0.06);
}

/* ─── RESET & BASE ─── */
*, *::before, *::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

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

body {
  font-family: var(--font-body);
  background: var(--color-bg);
  color: var(--color-text);
  overflow-x: hidden;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

::selection {
  background: rgba(201, 168, 76, 0.25);
  color: #fff;
}

a {
  text-decoration: none;
  color: inherit;
}

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

/* ─── SCROLLBAR ─── */
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: #141416; }
::-webkit-scrollbar-thumb {
  background: linear-gradient(180deg, var(--color-gold), var(--color-gold-dark));
  border-radius: 3px;
}

/* ─── TOP BAR ─── */
.top-bar {
  position: fixed;
  top: 0; left: 0; right: 0;
  height: 3px;
  z-index: 1002;
  background: linear-gradient(90deg,
    transparent 0%,
    var(--color-red) 25%,
    var(--color-gold) 50%,
    var(--color-red) 75%,
    transparent 100%
  );
}

/* ─── PARTICLES ─── */
#particles-canvas {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 0;
}

/* ─── NAVBAR ─── */
.navbar {
  position: fixed;
  top: 3px;
  left: 0;
  width: 100%;
  z-index: 1000;
  padding: 16px 48px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  transition: all 0.4s ease;
  background: transparent;
}

.navbar.scrolled {
  background: rgba(12, 12, 14, 0.95);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: var(--border-academic-light);
  padding: 10px 48px;
}

.navbar-brand {
  display: flex;
  align-items: center;
  gap: 12px;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1rem;
  color: var(--color-text);
}

.navbar-brand img {
  width: 36px;
  height: 36px;
  object-fit: contain;
  transition: transform 0.4s ease;
}

.navbar-brand:hover img {
  transform: scale(1.05);
}

.navbar-links {
  display: flex;
  align-items: center;
  gap: 28px;
  list-style: none;
}

.navbar-links a {
  font-size: 0.78rem;
  font-weight: 500;
  color: var(--color-text-dim);
  letter-spacing: 1.2px;
  text-transform: uppercase;
  transition: color 0.3s ease;
  position: relative;
  padding: 4px 0;
}

.navbar-links a::after {
  content: '';
  position: absolute;
  bottom: -2px;
  left: 0;
  width: 0;
  height: 1.5px;
  background: var(--color-gold);
  transition: width 0.3s ease;
}

.navbar-links a:hover {
  color: var(--color-gold);
}

.navbar-links a:hover::after {
  width: 100%;
}

.nav-toggle {
  display: none;
  background: none;
  border: none;
  color: var(--color-gold);
  font-size: 1.4rem;
  cursor: pointer;
  z-index: 1001;
  padding: 8px;
}

/* ─── HERO ─── */
.hero {
  position: relative;
  z-index: 1;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 120px 24px 80px;
  background: linear-gradient(160deg, #0c0c0e 0%, #100808 30%, #0c0c0e 60%, #0d0c0a 100%);
  overflow: hidden;
}

.hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse at 30% 15%, rgba(139, 26, 26, 0.06) 0%, transparent 50%),
    radial-gradient(ellipse at 70% 85%, rgba(201, 168, 76, 0.04) 0%, transparent 50%),
    radial-gradient(ellipse at 50% 50%, rgba(45, 90, 39, 0.03) 0%, transparent 40%);
  pointer-events: none;
}

.hero-shield {
  width: 130px;
  height: 130px;
  margin-bottom: 24px;
  position: relative;
  z-index: 2;
}

.hero-shield img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.hero-institution {
  font-family: var(--font-body);
  font-weight: 400;
  font-size: clamp(0.8rem, 1.4vw, 1.05rem);
  color: var(--color-text-dim);
  letter-spacing: 3px;
  text-transform: uppercase;
  position: relative;
  z-index: 2;
  margin-bottom: 10px;
}

.hero-institution span {
  display: inline-block;
  padding: 0 14px;
  position: relative;
}

.hero-institution span::before,
.hero-institution span::after {
  content: '';
  position: absolute;
  top: 50%;
  width: 24px;
  height: 1px;
  background: var(--color-gold);
  opacity: 0.4;
}

.hero-institution span::before { right: 100%; }
.hero-institution span::after { left: 100%; }

.hero-title {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: clamp(2.2rem, 6vw, 4.8rem);
  color: var(--color-text);
  position: relative;
  z-index: 2;
  line-height: 1.15;
  margin-bottom: 16px;
  letter-spacing: 2px;
}

.hero-title span {
  display: block;
}

.hero-title .year {
  font-size: clamp(2.6rem, 7vw, 5.5rem);
  color: var(--color-gold);
  letter-spacing: 6px;
  font-weight: 900;
}

.hero-subtitle {
  font-family: var(--font-serif);
  font-style: italic;
  font-size: clamp(1rem, 1.8vw, 1.3rem);
  color: var(--color-text-muted);
  position: relative;
  z-index: 2;
  margin-bottom: 40px;
  max-width: 520px;
  line-height: 1.5;
}

.hero-btn {
  position: relative;
  z-index: 2;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 16px 44px;
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 0.85rem;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--color-text);
  background: transparent;
  border: 1.5px solid var(--color-gold);
  border-radius: 4px;
  cursor: pointer;
  transition: all 0.4s ease;
  position: relative;
  overflow: hidden;
}

.hero-btn::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: var(--gold-gradient);
  opacity: 0;
  transition: opacity 0.4s ease;
  z-index: -1;
}

.hero-btn:hover::before {
  opacity: 1;
}

.hero-btn:hover {
  color: #0c0c0e;
  border-color: transparent;
  transform: translateY(-2px);
  box-shadow: 0 8px 28px rgba(201, 168, 76, 0.25);
}

.hero-scroll {
  position: absolute;
  bottom: 28px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  color: var(--color-text-dim);
  font-size: 0.65rem;
  letter-spacing: 2px;
  text-transform: uppercase;
  animation: scrollBounce 2.5s ease-in-out infinite;
  cursor: pointer;
}

.hero-scroll i {
  font-size: 1rem;
}

@keyframes scrollBounce {
  0%, 100% { transform: translateX(-50%) translateY(0); }
  50% { transform: translateX(-50%) translateY(8px); }
}

/* ─── SECTION COMMON ─── */
.section {
  position: relative;
  z-index: 1;
  padding: 100px 24px;
  max-width: 1200px;
  margin: 0 auto;
}

.section-header {
  text-align: center;
  margin-bottom: 56px;
}

.section-label {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-body);
  font-weight: 500;
  font-size: 0.65rem;
  letter-spacing: 3px;
  text-transform: uppercase;
  color: var(--color-gold);
  margin-bottom: 12px;
}

.section-label::before,
.section-label::after {
  content: '';
  width: 20px;
  height: 1px;
  background: var(--color-gold);
  opacity: 0.4;
}

.section-title {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(1.6rem, 3.2vw, 2.5rem);
  color: var(--color-text);
  line-height: 1.25;
}

.section-title .highlight {
  color: var(--color-gold);
  font-style: italic;
}

.section-desc {
  max-width: 600px;
  margin: 16px auto 0;
  color: var(--color-text-muted);
  font-size: 0.9rem;
  line-height: 1.7;
}

.section-divider {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin: 14px auto 0;
}

.section-divider .line {
  width: 40px;
  height: 1px;
  background: var(--color-gold);
  opacity: 0.4;
}

.section-divider .diamond {
  width: 5px;
  height: 5px;
  background: var(--color-gold);
  transform: rotate(45deg);
  opacity: 0.5;
}

/* ─── EVENT SECTION ─── */
.event-section {
  background: var(--color-bg-alt);
}

.event-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 24px;
  margin-top: 32px;
}

.event-card {
  background: var(--color-surface);
  border: var(--border-academic-light);
  border-radius: var(--radius-md);
  padding: 36px 24px 32px;
  text-align: center;
  transition: var(--transition-smooth);
  position: relative;
}

.event-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 24px;
  right: 24px;
  height: 2px;
  background: linear-gradient(90deg, transparent, var(--color-gold), transparent);
  opacity: 0;
  transition: opacity 0.4s ease;
}

.event-card:hover::before {
  opacity: 1;
}

.event-card:hover {
  border-color: rgba(201, 168, 76, 0.25);
  background: var(--color-surface-hover);
  transform: translateY(-4px);
}

.event-card-icon {
  width: 60px;
  height: 60px;
  margin: 0 auto 18px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: rgba(201, 168, 76, 0.08);
  border: 1px solid rgba(201, 168, 76, 0.15);
  font-size: 1.4rem;
  color: var(--color-gold);
  transition: all 0.3s ease;
}

.event-card:hover .event-card-icon {
  background: rgba(201, 168, 76, 0.14);
  border-color: rgba(201, 168, 76, 0.3);
}

.event-card h3 {
  font-family: var(--font-display);
  font-size: 1.1rem;
  color: var(--color-text);
  margin-bottom: 8px;
  font-weight: 600;
}

.event-card p {
  font-size: 0.85rem;
  color: var(--color-text-muted);
  line-height: 1.7;
}

/* ─── COUNTDOWN ─── */
.countdown-section {
  background: linear-gradient(180deg, var(--color-bg-alt) 0%, var(--color-bg) 100%);
  border-top: var(--border-academic-light);
  border-bottom: var(--border-academic-light);
  max-width: 100% !important;
}

.countdown-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px;
}

.countdown-grid {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: clamp(8px, 2.5vw, 32px);
  flex-wrap: wrap;
}

.countdown-item {
  text-align: center;
  min-width: 80px;
}

.countdown-number {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(2.8rem, 6vw, 4.5rem);
  color: var(--color-text);
  line-height: 1;
  letter-spacing: 4px;
}

.countdown-number span {
  color: var(--color-gold);
}

.countdown-label {
  font-family: var(--font-body);
  font-weight: 500;
  font-size: 0.7rem;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--color-text-dim);
  margin-top: 6px;
}

.countdown-separator {
  font-family: var(--font-display);
  font-size: clamp(2.2rem, 5vw, 4rem);
  color: rgba(201, 168, 76, 0.2);
  line-height: 1;
  margin-bottom: 24px;
}

/* ─── CANDIDATES GALLERY ─── */
.candidates-section {
  background: var(--color-bg-alt);
}

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

.candidate-card {
  background: var(--color-surface);
  border: var(--border-academic-light);
  border-radius: var(--radius-lg);
  overflow: hidden;
  transition: all 0.5s cubic-bezier(0.25, 0.46, 0.45, 0.94);
  opacity: 0;
  transform: translateY(30px);
  position: relative;
}

.candidate-card.visible {
  opacity: 1;
  transform: translateY(0);
}

.candidate-card:hover {
  border-color: rgba(201, 168, 76, 0.25);
  background: var(--color-surface-hover);
  transform: translateY(-6px);
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.3);
}

.candidate-photo-wrapper {
  position: relative;
  overflow: hidden;
  height: 400px;
  background: #141416;
}

.candidate-photo {
  width: 100%;
  height: 100%;
  object-fit: cover;
  cursor: pointer;
  transition: transform 0.6s ease;
}

.candidate-card:hover .candidate-photo {
  transform: scale(1.06);
}

.candidate-photo-wrapper .zoom-hint {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%) scale(0);
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: rgba(12, 12, 14, 0.6);
  backdrop-filter: blur(6px);
  border: 1.5px solid rgba(201, 168, 76, 0.4);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-size: 1rem;
  z-index: 3;
  transition: transform 0.35s ease;
  pointer-events: none;
}

.candidate-photo-wrapper:hover .zoom-hint {
  transform: translate(-50%, -50%) scale(1);
}

.candidate-number-badge {
  position: absolute;
  top: 14px;
  left: 14px;
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-body);
  font-weight: 700;
  font-size: 1rem;
  color: var(--color-text);
  background: rgba(12, 12, 14, 0.7);
  backdrop-filter: blur(6px);
  border: 1px solid rgba(201, 168, 76, 0.3);
  border-radius: 50%;
  z-index: 2;
}

.candidate-info {
  padding: 20px 20px 24px;
  text-align: center;
}

.candidate-name {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.2rem;
  color: var(--color-text);
  margin-bottom: 2px;
  letter-spacing: 0.5px;
}

.candidate-course {
  font-family: var(--font-body);
  font-weight: 400;
  font-size: 0.82rem;
  color: var(--color-gold);
  margin-bottom: 10px;
  letter-spacing: 0.5px;
}

.candidate-desc {
  font-size: 0.82rem;
  color: var(--color-text-muted);
  line-height: 1.6;
  margin-bottom: 18px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.vote-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 28px;
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 0.75rem;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  color: var(--color-text);
  background: transparent;
  border: 1.5px solid var(--color-gold);
  border-radius: 4px;
  cursor: pointer;
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
}

.vote-btn::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: var(--gold-gradient);
  opacity: 0;
  transition: opacity 0.3s ease;
  z-index: -1;
}

.vote-btn:hover::before {
  opacity: 1;
}

.vote-btn:hover {
  color: #0c0c0e;
  border-color: transparent;
  transform: translateY(-1px);
  box-shadow: 0 4px 16px rgba(201, 168, 76, 0.2);
}

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

.vote-btn:disabled {
  opacity: 0.3;
  cursor: not-allowed;
  transform: none !important;
  box-shadow: none !important;
  border-color: rgba(255, 255, 255, 0.1);
}

/* ─── FOOTER ─── */
.footer {
  position: relative;
  z-index: 1;
  background: #08080a;
  border-top: var(--border-academic-light);
  padding: 48px 24px 28px;
  text-align: center;
}

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

.footer-brand img {
  width: 48px;
  height: 48px;
  object-fit: contain;
  opacity: 0.8;
}

.footer-brand-text {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 0.95rem;
  color: var(--color-text);
  text-align: left;
  line-height: 1.3;
}

.footer-brand-text small {
  display: block;
  font-weight: 400;
  font-size: 0.7rem;
  color: var(--color-text-dim);
  margin-top: 2px;
}

.footer-info {
  font-size: 0.8rem;
  color: var(--color-text-dim);
  margin: 4px 0;
}

.footer-official {
  margin-top: 16px;
  padding-top: 14px;
  border-top: var(--border-academic-light);
  font-family: var(--font-body);
  font-weight: 500;
  font-size: 0.6rem;
  letter-spacing: 2.5px;
  text-transform: uppercase;
  color: rgba(201, 168, 76, 0.3);
}

/* ─── LOADING ─── */
.loading-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 80px 20px;
  gap: 20px;
  grid-column: 1 / -1;
}

.loading-spinner {
  width: 36px;
  height: 36px;
  border: 2px solid rgba(201, 168, 76, 0.08);
  border-top-color: var(--color-gold);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

.loading-text {
  font-family: var(--font-serif);
  font-style: italic;
  font-size: 0.95rem;
  color: var(--color-text-dim);
}

.error-container {
  grid-column: 1 / -1;
  text-align: center;
  padding: 60px 20px;
  color: var(--color-text-muted);
}

.error-container i {
  font-size: 1.8rem;
  margin-bottom: 14px;
  display: block;
  color: var(--color-red-light);
}

.error-container small {
  display: block;
  margin-top: 6px;
  font-size: 0.75rem;
  color: var(--color-text-dim);
}

.empty-container {
  grid-column: 1 / -1;
  text-align: center;
  padding: 60px 20px;
  color: var(--color-text-dim);
}

.empty-container i {
  font-size: 1.8rem;
  margin-bottom: 14px;
  display: block;
}

/* ─── ANIMATIONS (Intersection Observer) ─── */
.fade-in,
.fade-in-left,
.fade-in-right {
  opacity: 0;
  transition: all 0.8s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.fade-in {
  transform: translateY(24px);
}

.fade-in.visible {
  opacity: 1;
  transform: translateY(0);
}

.fade-in-left {
  transform: translateX(-24px);
}

.fade-in-left.visible {
  opacity: 1;
  transform: translateX(0);
}

.fade-in-right {
  transform: translateX(24px);
}

.fade-in-right.visible {
  opacity: 1;
  transform: translateX(0);
}

/* ─── LIGHTBOX ─── */
.lightbox {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 9999;
  background: rgba(8, 8, 10, 0.95);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.35s ease;
  padding: 40px;
}

.lightbox.open {
  opacity: 1;
  pointer-events: all;
}

.lightbox-img {
  max-width: 90vw;
  max-height: 85vh;
  object-fit: contain;
  border-radius: 4px;
  box-shadow: 0 24px 80px rgba(0, 0, 0, 0.5);
  transform: scale(0.95);
  transition: transform 0.35s ease;
}

.lightbox.open .lightbox-img {
  transform: scale(1);
}

.lightbox-close {
  position: absolute;
  top: 20px;
  right: 24px;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: none;
  background: rgba(255, 255, 255, 0.06);
  color: #fff;
  font-size: 1.2rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s ease;
}

.lightbox-close:hover {
  background: rgba(201, 168, 76, 0.15);
  color: var(--color-gold);
}

.lightbox-caption {
  position: absolute;
  bottom: 28px;
  left: 50%;
  transform: translateX(-50%);
  font-family: var(--font-display);
  font-size: 1rem;
  color: rgba(255, 255, 255, 0.5);
  text-align: center;
  white-space: nowrap;
}

/* ─── RESPONSIVE ─── */

/* < 480px */
@media (max-width: 480px) {
  .navbar { padding: 12px 16px; }
  .navbar.scrolled { padding: 8px 16px; }
  .navbar-brand { font-size: 0.8rem; gap: 8px; }
  .navbar-brand img { width: 30px; height: 30px; }
  .navbar-links a { font-size: 0.85rem; }

  .hero { padding: 100px 16px 60px; }
  .hero-shield { width: 90px; height: 90px; margin-bottom: 18px; }
  .hero-btn { padding: 14px 28px; font-size: 0.8rem; }

  .section { padding: 60px 16px; }
  .candidates-grid { grid-template-columns: 1fr; gap: 20px; }
  .candidate-photo-wrapper { height: 320px; }

  .event-grid { grid-template-columns: 1fr; gap: 16px; }

  .countdown-inner { padding: 0 16px; }

  .footer { padding: 36px 16px 20px; }
  .footer-brand { flex-direction: column; text-align: center; }
  .footer-brand-text { text-align: center; }
}

/* < 768px */
@media (max-width: 768px) {
  .navbar-links {
    position: fixed;
    top: 0;
    right: -100%;
    width: 75%;
    height: 100vh;
    background: rgba(10, 10, 12, 0.98);
    backdrop-filter: blur(20px);
    flex-direction: column;
    justify-content: center;
    gap: 24px;
    transition: right 0.4s ease;
    border-left: 1px solid rgba(201, 168, 76, 0.12);
  }

  .navbar-links.open { right: 0; }

  .nav-toggle { display: block; }

  .hero-institution span::before,
  .hero-institution span::after { display: none; }

  .countdown-grid { gap: 4px; }
  .countdown-separator { margin-bottom: 20px; }
}

/* 769px - 1024px */
@media (min-width: 769px) and (max-width: 1024px) {
  .navbar { padding: 14px 32px; }
  .navbar.scrolled { padding: 10px 32px; }
  .candidates-grid { grid-template-columns: repeat(2, 1fr); gap: 24px; }
}

/* 481px - 768px */
@media (min-width: 481px) and (max-width: 768px) {
  .candidates-grid { grid-template-columns: repeat(2, 1fr); gap: 16px; }
  .candidate-photo-wrapper { height: 300px; }
}

/* > 1200px */
@media (min-width: 1200px) {
  .candidate-photo-wrapper { height: 440px; }
}

/* > 1400px */
@media (min-width: 1400px) {
  .section { max-width: 1280px; }
  .candidates-grid { grid-template-columns: repeat(4, 1fr); }
}

/* ─── ESTILOS PARA EL MODAL DE GANADORA ─── */
.swal2-popup .swal2-title {
  font-family: 'Playfair Display', serif !important;
  color: #c9a84c !important;
}

/* ─── BADGE DE VOTACIÓN CERRADA ─── */
.votacion-cerrada-badge {
  display: none;
  position: fixed;
  top: 60px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 999;
  padding: 8px 24px;
  background: rgba(239, 68, 68, 0.12);
  border: 1px solid rgba(239, 68, 68, 0.2);
  border-radius: 50px;
  color: #ef4444;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  backdrop-filter: blur(12px);
  animation: fadeInDown 0.6s ease;
}

.votacion-cerrada-badge.show {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

@keyframes fadeInDown {
  from { opacity: 0; transform: translateX(-50%) translateY(-10px); }
  to { opacity: 1; transform: translateX(-50%) translateY(0); }
}

/* Lightbox responsive */
@media (max-width: 768px) {
  .lightbox { padding: 16px; }
  .lightbox-img { max-width: 98vw; max-height: 70vh; }
  .lightbox-close { top: 12px; right: 12px; width: 36px; height: 36px; font-size: 1rem; }
  .lightbox-caption { font-size: 0.85rem; bottom: 16px; white-space: normal; }
}

/* Prefiere animaciones reducidas */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
  html { scroll-behavior: auto; }
}
