:root {
  --bg: #080808;
  --panel: #101010;
  --panel-2: #0c0c0c;
  --text: #f8faff;
  --muted: #b0bad8;
  --brand: #ffd700;
  --brand-2: #1a82ff;
  --accent: #1a82ff;
  --danger: #ff4d4d;
  --shadow: 0 12px 35px rgba(0, 0, 0, 0.5);
  --radius: 16px;
  --serif: 'Crimson Text', Georgia, serif;
  --mono: 'JetBrains Mono', 'Fira Code', monospace;
}
* {
  box-sizing: border-box;
}
html,
body {
  margin: 0;
  padding: 0;
  overflow-x: hidden;
  background: radial-gradient(1200px 800px at 15% 0%, rgba(26, 130, 255, 0.3), transparent),
    radial-gradient(1000px 600px at 85% 20%, rgba(255, 215, 0, 0.3), transparent),
    radial-gradient(1100px 700px at 25% 40%, rgba(255, 215, 0, 0.3), transparent),
    radial-gradient(900px 500px at 75% 60%, rgba(26, 130, 255, 0.3), transparent),
    radial-gradient(1000px 600px at 20% 80%, rgba(26, 130, 255, 0.3), transparent),
    radial-gradient(1100px 700px at 80% 100%, rgba(255, 215, 0, 0.3), transparent),
    var(--bg);
  color: var(--text);
  font-family: Inter, system-ui, -apple-system, Segoe UI, Roboto, Ubuntu, Cantarell, Noto Sans, sans-serif;
  line-height: 1.6;
  position: relative;
  transition: background 0.5s ease;
}
html::before {
  content: '';
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-image: radial-gradient(circle at 1px 1px, rgba(255, 255, 255, 0.04) 1px, transparent 0);
  background-size: 45px 45px;
  pointer-events: none;
  z-index: 0;
  opacity: 0.8;
  transition: opacity 0.5s ease;
}
.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px;
  position: relative;
  z-index: 1;
}
.hero .container {
  max-width: 1600px;
}

/* Header */
.site-header {
  position: fixed; /* Cambiado a 'fixed' para que esté siempre visible */
  top: 0;
  left: 0;
  width: 100%; /* Asegura que ocupe todo el ancho */
  z-index: 1000;
  background: rgba(8, 8, 8, 0.82);
  backdrop-filter: saturate(220%) blur(18px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  transition: all 0.4s ease;
}
.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 80px;
  padding: 10px 0;
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: 14px;
  color: var(--text);
  text-decoration: none;
  font-weight: 800;
  letter-spacing: 0.3px;
  transition: all 0.4s ease;
  padding: 6px 10px;
  border-radius: 12px;
}
.brand:hover {
  transform: scale(1.03);
}
.logo {
  display: block;
}
.logo-img {
  display: block;
  transition: all 0.4s ease;
}
.brand:hover .logo-img {
  transform: rotate(7deg);
}
.nav-controls {
  display: flex;
  align-items: center;
  gap: 16px;
  min-width: 0;
  padding: 4px 6px;
  border-radius: 12px;
}
/* Contenedor principal del menú */
.primary-nav {
  width: 100%;           /* ocupa todo el ancho disponible */
  display: flex;         /* activa flexbox */
  justify-content: flex-start; /* alinea el contenido a la izquierda */
  margin: 0;             /* elimina márgenes */
  padding: 0;            /* elimina padding */
}

/* Lista de elementos del menú */
.primary-nav ul {
  display: flex;         /* flex para los items */
  gap: 20px;             /* espacio entre botones */
  list-style: none;      /* quita viñetas */
  margin: 0;             /* quita margen */
  padding: 0;            /* quita padding */
}

/* Cada elemento de la lista */
.primary-nav li {
  flex: 0 1 auto;        /* ancho flexible pero no crece más de lo necesario */
  min-width: 150px;      /* ancho mínimo del botón */
  white-space: nowrap;   /* evita que el texto se rompa */
}

/* Enlaces dentro del menú */
.primary-nav a {
  display: block;
  text-align: center;    /* texto centrado dentro del botón */
  padding: 10px 15px;    /* un poco de espacio dentro del botón */
}


.language-toggle {
  display: inline-grid;
  grid-auto-flow: column;
  align-items: center;
  gap: 7px;
  background: rgba(255, 255, 255, 0.07);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 999px;
  padding: 7px 12px;
  cursor: pointer;
  transition: all 0.4s ease;
  color: var(--text);
  font-size: 15px;
  font-weight: 700;
  position: relative;
}
.language-toggle:hover {
  background: rgba(255, 255, 255, 0.12);
  border-color: rgba(255, 255, 255, 0.25);
  transform: scale(1.03);
}
.lang-flag {
  width: 20px;
  height: 14px;
  display: inline-grid;
  position: relative;
}
.lang-flag .flag {
  position: absolute;
  inset: 0;
  transition: opacity 0.25s ease;
}
.lang-flag .flag-es {
  opacity: 0;
}
.language-toggle[data-current='es'] .lang-flag .flag-en {
  opacity: 0;
}
.language-toggle[data-current='es'] .lang-flag .flag-es {
  opacity: 1;
}
.lang-text {
  transition: opacity 0.4s ease;
  display: inline-block;
  min-width: 2.2ch;
  text-align: center;
}
.primary-nav a {
  color: var(--muted);
  text-decoration: none;
  padding: 12px 14px;
  border-radius: 12px;
  transition: all 0.4s ease;
  position: relative;
  overflow: hidden;
}
.primary-nav a::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.12), transparent);
  transition: left 0.6s ease;
}
.primary-nav a:hover::before {
  left: 100%;
}
.primary-nav a:hover,
.primary-nav a:focus {
  color: var(--text);
  background: rgba(255, 255, 255, 0.07);
  transform: translateY(-2px);
}

.primary-nav a:active {
  color: var(--text);
  background: rgba(255, 255, 255, 0.1);
  transform: translateY(0);
  transition: all 0.1s ease;
}

.primary-nav a:focus:not(:focus-visible) {
  outline: none;
  background: transparent;
  color: var(--muted);
  transform: translateY(0);
}
.cta-link {
  color: #080808;
  background: linear-gradient(135deg, var(--brand), #ffe766);
  padding: 12px 16px;
  border-radius: 999px;
  font-weight: 800;
  transition: all 0.4s ease;
}
.cta-link:hover {
  filter: brightness(1.08);
  transform: translateY(-2px);
}
.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: transparent;
  border: 0;
  cursor: pointer;
  transition: all 0.4s ease;
  padding: 10px;
}
.nav-toggle:hover {
  transform: scale(1.06);
}
.nav-toggle span {
  display: block;
  width: 26px;
  height: 2.5px;
  background: var(--text);
  transition: all 0.4s ease;
  border-radius: 1.5px;
}

/* Hero */
.hero {
  padding: 120px 0 40px;
  background: transparent;
  position: relative;
  overflow: hidden;
  transition: background 0.5s ease;
}
.hero::before {
  display: none;
}
@keyframes heroGlow {
  0% {
    opacity: 0.4;
  }
  100% {
    opacity: 0.8;
  }
}
.hero-inner {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 32px;
  align-items: center;
  position: relative;
  z-index: 1;
  max-width: 1400px;
  margin: 0 auto;
}
.hero-copy h1 {
  font-size: 48px;
  line-height: 1.08;
  margin: 10px 0 14px;
  font-weight: 800;
  letter-spacing: -0.025em;
  background: linear-gradient(135deg, var(--text), var(--brand));
  background-clip: text;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  animation: fadeInUp 1.2s ease-out;
  transition: all 0.4s ease;
}
.hero-proposals-title {
  margin: 0 0 10px;
  font-size: 22px;
  font-weight: 800;
  color: var(--brand);
}
.hero-copy p {
  margin: 0 0 18px;
  color: var(--muted);
  font-size: 18px;
  line-height: 1.6;
  animation: fadeInUp 1.2s ease-out 0.3s both;
  transition: color 0.4s ease;
}
.hero-logo {
  filter: drop-shadow(0 7px 20px rgba(255, 215, 0, 0.3));
  animation: logoFloat 5s ease-in-out infinite;
  transition: all 0.4s ease;
}
.hero-logo:hover {
  transform: scale(1.12) rotate(12deg);
  filter: drop-shadow(0 10px 28px rgba(255, 215, 0, 0.45));
}
@keyframes logoFloat {
  0%,
  100% {
    transform: translateY(0px);
  }
  50% {
    transform: translateY(-12px);
  }
}
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(35px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}
.hero-actions {
  display: flex;
  gap: 10px;
  margin: 14px 0 18px;
  animation: fadeInUp 1.2s ease-out 0.5s both;
}
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 16px;
  border-radius: 12px;
  text-decoration: none;
  font-weight: 700;
  font-size: 15px;
  transition: all 0.4s ease;
  position: relative;
  overflow: hidden;
}
.btn::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.12), transparent);
  transition: left 0.6s ease;
}
.btn:hover::before {
  left: 100%;
}
.btn-primary {
  background: rgba(255, 255, 255, 0.07);
  color: var(--text);
  border: 1px solid rgba(255, 255, 255, 0.12);
  transition: all 0.4s ease;
}
.btn-primary:hover {
  background: rgba(255, 255, 255, 0.12);
  transform: translateY(-3px);
  border-color: rgba(255, 255, 255, 0.25);
}
.btn-secondary {
  background: rgba(255, 255, 255, 0.07);
  color: var(--text);
  border: 1px solid rgba(255, 255, 255, 0.12);
  transition: all 0.4s ease;
}
.btn-secondary:hover {
  background: rgba(255, 255, 255, 0.12);
  transform: translateY(-3px);
  border-color: rgba(255, 255, 255, 0.25);
}
.btn-ghost {
  background: transparent;
  color: var(--text);
  border: 1px solid rgba(255, 255, 255, 0.18);
  transition: all 0.4s ease;
}
.btn-ghost:hover {
  background: rgba(255, 255, 255, 0.06);
  border-color: rgba(255, 255, 255, 0.3);
  transform: translateY(-3px);
}
.download-btn {
  /* Propiedades añadidas para contener los efectos */
  position: relative; /* Establece el contexto de posición para ::before */
  overflow: hidden;   /* Recorta cualquier efecto que se salga de los bordes */

  /* Estilos originales */
  background: rgba(255, 215, 0, 0.15);
  color: var(--text);
  border: 1px solid rgba(255, 215, 0, 0.3);
  padding: 10px 14px;
  border-radius: 12px;
  font-weight: 700;
  font-size: 14px;
  transition: all 0.4s ease;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-top: 10px;
}

.download-btn:hover {
  background: rgba(255, 215, 0, 0.25);
  border-color: rgba(255, 215, 0, 0.4);
  transform: translateY(-3px);
}

.download-btn::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 215, 0, 0.2), transparent);
  transition: left 0.6s ease;
}

.download-btn:hover::before {
  left: 100%;
}

.hero-metrics {
  display: flex;
  gap: 28px;
  color: var(--muted);
  animation: fadeInUp 1.2s ease-out 0.7s both;
  transition: color 0.4s ease;
}
.hero-metrics div {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  transition: all 0.4s ease;
}
.hero-metrics div:hover {
  transform: translateY(-3px);
}
.hero-metrics strong {
  font-size: 24px;
  color: var(--text);
  transition: all 0.4s ease;
}
.hero-metrics div:hover strong {
  color: var(--brand);
}
.hero-art {
  position: relative;
  min-height: 300px;
  border-radius: var(--radius);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.07), rgba(255, 255, 255, 0.03));
  box-shadow: var(--shadow);
  overflow: hidden;
  animation: fadeInUp 1.2s ease-out 0.9s both;
  transition: all 0.4s ease;
  margin-top: 0;
}
.hero-art:hover {
  transform: scale(1.05);
}
.hero-art .sun-circle {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 120px;
  height: 120px;
  border-radius: 50%;
  background: #ffd700;
  transform: translate(-50%, -50%);
}
.hero-art .earth-circle {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 60px;
  height: 60px;
  border-radius: 50%;
  background: #1a82ff;
  animation: orbit 10s linear infinite;
}
.hero-art .star {
  position: absolute;
  width: 2px;
  height: 2px;
  background: #fff;
  border-radius: 50%;
  animation: twinkle 2s infinite ease-in-out;
}
.hero-art .star:nth-child(1) {
  top: 20%;
  left: 30%;
  animation-delay: 0s;
}
.hero-art .star:nth-child(2) {
  top: 40%;
  left: 70%;
  animation-delay: 0.5s;
}
.hero-art .star:nth-child(3) {
  top: 60%;
  left: 20%;
  animation-delay: 1s;
}
.hero-art .star:nth-child(4) {
  top: 80%;
  left: 80%;
  animation-delay: 1.5s;
}
.hero-art .star:nth-child(5) {
  top: 10%;
  left: 50%;
  animation-delay: 0.2s;
}
.hero-art .star:nth-child(6) {
  top: 30%;
  left: 90%;
  animation-delay: 0.8s;
}
.hero-art .star:nth-child(7) {
  top: 50%;
  left: 10%;
  animation-delay: 1.2s;
}
.hero-art .star:nth-child(8) {
  top: 70%;
  left: 40%;
  animation-delay: 1.8s;
}
.hero-art .star:nth-child(9) {
  top: 90%;
  left: 60%;
  animation-delay: 0.4s;
}
.hero-art .star:nth-child(10) {
  top: 25%;
  left: 55%;
  animation-delay: 1.6s;
}
@keyframes orbit {
  0% {
    transform: translate(-50%, -50%) translateX(160px) rotate(0deg);
  }
  100% {
    transform: translate(-50%, -50%) translateX(160px) rotate(360deg);
  }
}
@keyframes orbit-sm {
  0% {
    transform: translate(-50%, -50%) translateX(110px) rotate(0deg);
  }
  100% {
    transform: translate(-50%, -50%) translateX(110px) rotate(360deg);
  }
}
@keyframes twinkle {
  0%,
  100% {
    opacity: 0.5;
    transform: scale(1);
  }
  50% {
    opacity: 1;
    transform: scale(1.5);
  }
}

/* Sections */
.section {
  padding: 90px 0;
  transition: background 0.5s ease;
}
.section.alt {
  background: transparent;
  transition: background 0.5s ease;
}
#propuestas.section.alt {
  background: transparent;
  border-top: 0;
  padding-top: 20px;
}
.section-header {
  margin-bottom: 45px;
  text-align: center;
  transition: all 0.4s ease;
}
.section-header h2 {
  margin: 0 0 14px;
  font-size: 40px;
  font-weight: 800;
  letter-spacing: -0.025em;
  transition: color 0.4s ease;
}
.mono-accent {
  font-family: var(--mono);
  color: var(--brand);
  transition: color 0.4s ease;
}
.typewriter {
  font-family: var(--mono);
  color: var(--brand);
  background: rgba(255, 215, 0, 0.06);
  border-left: 4px solid var(--brand);
  padding: 14px;
  border-radius: 10px;
  transition: all 0.4s ease;
}
.card .typewriter {
  color: var(--text);
  background: rgba(255, 255, 255, 0.06);
  border-left-color: var(--brand);
  word-break: break-all;
  overflow-wrap: anywhere;
  white-space: normal;
}
.card h3 {
  word-break: break-word;
}
.section-subtitle {
  margin: 0 0 24px;
  color: var(--muted);
  font-size: 19px;
  line-height: 1.7;
  transition: color 0.4s ease;
}

.contact-note {
  margin: 0 0 24px;
  color: var(--brand);
  font-size: 16px;
  line-height: 1.6;
  font-style: italic;
  transition: color 0.4s ease;
  text-align: center;
}

.crypto-privacy-note {
  margin: 32px 0 24px;
  text-align: center;
}

.crypto-privacy-note p {
  color: var(--brand);
  font-size: 18px;
  line-height: 1.6;
  font-weight: 600;
  margin: 0;
  transition: color 0.4s ease;
}
.constitution-badge {
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  gap: 7px;
  background: linear-gradient(135deg, rgba(255, 215, 0, 0.12), rgba(26, 130, 255, 0.12));
  border: 1px solid rgba(255, 215, 0, 0.25);
  padding: 14px 24px;
  border-radius: 14px;
  margin-top: 10px;
  transition: all 0.4s ease;
}

/* Grid & cards */
.grid {
  display: grid;
  gap: 28px;
  transition: gap 0.4s ease;
}
.cards {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 28px;
  margin-bottom: 0;
}
.cards.compact {
  grid-template-columns: repeat(2, 1fr);
  gap: 16px;
}
.cards#donation-grid {
  grid-template-columns: repeat(3, 1fr);
}
.card {
  background: linear-gradient(180deg, var(--panel), var(--panel-2));
  border: 1px solid rgba(255, 255, 255, 0.07);
  padding: 28px;
  border-radius: 18px;
  box-shadow: var(--shadow);
  transition: all 0.5s ease;
  position: relative;
  overflow: hidden;
}
.cards.compact .card {
  padding: 18px;
  border-radius: 14px;
}
.card::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.04), transparent);
  transition: left 0.7s ease;
}
.card:hover::before {
  left: 100%;
}
.card:hover {
  transform: translateY(-5px) scale(1.03);
  box-shadow: 0 25px 55px rgba(0, 0, 0, 0.65);
  border-color: rgba(255, 255, 255, 0.12);
}
.constitutional-card {
  position: relative;
  overflow: hidden;
}
.constitutional-card::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: linear-gradient(90deg, var(--brand), var(--brand-2));
  transition: all 0.4s ease;
}
.constitutional-card:hover::after {
  height: 6px;
  box-shadow: 0 0 25px rgba(255, 215, 0, 0.55);
}
.card-header {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 14px;
  transition: all 0.4s ease;
}
.card:hover .card-header {
  transform: translateY(-3px);
}
.article-ref {
  font-family: var(--mono);
  font-size: 13px;
  font-weight: 500;
  color: var(--brand);
  background: rgba(255, 215, 0, 0.12);
  padding: 5px 10px;
  border-radius: 8px;
  border: 1px solid rgba(255, 215, 0, 0.25);
  transition: all 0.4s ease;
}
.card:hover .article-ref {
  background: rgba(255, 215, 0, 0.25);
  border-color: rgba(255, 215, 0, 0.45);
  transform: scale(1.06);
}
.card h3 {
  margin: 0;
  color: #fff;
  font-size: 20px;
  font-weight: 700;
  transition: all 0.4s ease;
}
.card:hover h3 {
  color: var(--brand);
}
.card p {
  margin: 0 0 14px;
  color: var(--muted);
  line-height: 1.6;
  transition: all 0.4s ease;
}
.card:hover p {
  color: var(--text);
}
.addr-row {
  display: flex;
  align-items: center;
  gap: 10px;
}
.copy-btn {
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.15);
  color: var(--text);
  padding: 8px 10px;
  border-radius: 10px;
  cursor: pointer;
  transition: all 0.3s ease;
}
.copy-btn:hover {
  background: rgba(255, 255, 255, 0.14);
}
.card-quote {
  font-family: var(--mono);
  font-size: 15px;
  color: var(--brand);
  background: rgba(255, 215, 0, 0.06);
  padding: 14px;
  border-radius: 10px;
  border-left: 4px solid var(--brand);
  margin-top: 14px;
  transition: all 0.4s ease;
  position: relative;
  overflow: hidden;
}
.card-quote::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 215, 0, 0.12), transparent);
  transition: left 0.6s ease;
}
.card:hover .card-quote::before {
  left: 100%;
}
.card:hover .card-quote {
  background: rgba(255, 215, 0, 0.12);
  border-left-color: var(--brand-2);
  transform: translateX(5px);
}
.faq {
  margin-top: 24px;
  transition: all 0.4s ease;
}
.faq summary {
  cursor: pointer;
  list-style: none;
  padding: 14px 0;
  color: var(--text);
  font-weight: 600;
  transition: color 0.4s ease;
}
.faq[open] summary {
  color: var(--brand);
}
.faq-items {
  display: grid;
  gap: 14px;
  transition: gap 0.4s ease;
}
.faq-item {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.07);
  padding: 16px;
  border-radius: 16px;
  transition: all 0.4s ease;
}

/* Leaderboard */
.leaderboard-section {
  margin-bottom: 40px;
  text-align: center;
}

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

.leaderboard-section h3 {
  margin: 0;
  font-size: 28px;
  font-weight: 700;
  color: var(--brand);
  transition: color 0.4s ease;
}

.table-size-controls {
  display: flex;
  gap: 8px;
}

.size-btn {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 10px;
  color: var(--brand);
  cursor: pointer;
  padding: 12px 16px;
  transition: all 0.3s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-size: 14px;
  font-weight: 500;
  min-width: 120px;
}

.size-btn:hover {
  background: rgba(255, 215, 0, 0.1);
  border-color: rgba(255, 215, 0, 0.3);
  transform: translateY(-1px);
}

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

.size-btn svg {
  transition: transform 0.3s ease;
}

.size-btn:hover svg {
  transform: scale(1.1);
}

/* FAQ Controls */
.faq-controls {
  display: flex;
  gap: 8px;
  margin-top: 24px;
  justify-content: flex-start;
}

.faq-controls .size-btn {
  min-width: 140px;
}

/* Crypto Controls */
.crypto-controls {
  display: flex;
  gap: 8px;
  margin-top: 24px;
  justify-content: flex-end;
}

.crypto-controls .size-btn {
  min-width: 140px;
}

/* Reduce margin when collapsed (only expand button visible) */
.crypto-controls.collapsed {
  margin-top: -60px !important;
}

/* Reduce margin for crypto grid when collapsed */
#donation-grid.collapsed {
  margin-bottom: 24px !important;
}

/* Crypto Transitions */
.crypto-card {
  transition: all 0.6s cubic-bezier(0.4, 0, 0.2, 1);
  overflow: hidden;
  max-height: 500px;
}

.crypto-card.crypto-hidden {
  opacity: 0;
  max-height: 0;
  padding-top: 0;
  padding-bottom: 0;
  transform: translateY(-20px) scale(0.9);
  pointer-events: none;
}

/* FAQ Transitions */
#en_la_practica .manifesto {
  transition: all 0.6s cubic-bezier(0.4, 0, 0.2, 1);
  overflow: hidden;
  margin: 8px 0;
  max-height: 1000px;
}

#en_la_practica .manifesto.faq-hidden {
  opacity: 0;
  transform: translateY(-15px) scale(0.92);
  max-height: 0;
  margin: 0;
  padding: 0;
}

/* Manifesto and Constitution Transitions */
#manifiesto .manifesto,
#constitucion .manifesto,
#en_la_practica .manifesto {
  transition: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);
  overflow: hidden;
  margin: 8px 0;
}

#manifiesto .manifesto summary,
#constitucion .manifesto summary,
#en_la_practica .manifesto summary {
  transition: all 0.3s ease;
  padding: 12px 16px;
}

#manifiesto .manifesto[open] summary,
#constitucion .manifesto[open] summary,
#en_la_practica .manifesto[open] summary {
  transform: translateY(0);
}

#manifiesto .manifesto:not([open]) summary,
#constitucion .manifesto:not([open]) summary,
#en_la_practica .manifesto:not([open]) summary {
  transform: translateY(-5px);
}

#manifiesto .manifesto-content,
#constitucion .manifesto-content,
#en_la_practica .manifesto-content {
  transition: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);
  overflow: hidden;
}

#manifiesto .manifesto[open] .manifesto-content,
#constitucion .manifesto[open] .manifesto-content,
#en_la_practica .manifesto[open] .manifesto-content {
  opacity: 1;
  transform: translateY(0) scale(1);
  max-height: 2000px;
  padding: 16px 18px;
}

#manifiesto .manifesto:not([open]) .manifesto-content,
#constitucion .manifesto:not([open]) .manifesto-content,
#en_la_practica .manifesto:not([open]) .manifesto-content {
  opacity: 0;
  transform: translateY(-10px) scale(0.98);
  max-height: 0;
  padding: 0 18px;
}

.leaderboard-table {
  background: linear-gradient(180deg, var(--panel), var(--panel-2));
  border: 1px solid rgba(255, 255, 255, 0.07);
  border-radius: 18px;
  box-shadow: var(--shadow);
  overflow-y: auto;
  transition: max-height 0.3s ease;
  max-height: 350px; /* Shows exactly 5 rows without scroll */
}

.leaderboard-table.expanded {
  max-height: 640px; /* Shows exactly 10 rows without scroll */
}

.leaderboard-table.compact {
  max-height: 360px; /* Shows exactly 5 rows without scroll */
}

/* Donor visibility controlled by JavaScript */
.leaderboard-table .donor-row.hidden,
.leaderboard-table .message-row.hidden {
  display: none;
}

.leaderboard-table:hover {
  border-color: rgba(255, 255, 255, 0.12);
  box-shadow: 0 25px 55px rgba(0, 0, 0, 0.65);
}

.leaderboard-table table {
  width: 100%;
  border-collapse: collapse;
  table-layout: fixed;
}

.leaderboard-table thead {
  background: rgba(255, 215, 0, 0.15);
  position: sticky;
  top: 0;
  z-index: 10;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
  backdrop-filter: blur(10px);
}

.leaderboard-table th {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  min-height: 56px;
  vertical-align: middle;
  border: none;
  border-bottom: none;
}

.leaderboard-table tbody {
  display: table-row-group;
}

.leaderboard-table thead tr {
  display: table-row;
}

.leaderboard-table tbody tr {
  display: table-row;
}

/* Custom scrollbar for leaderboard */
.leaderboard-table::-webkit-scrollbar {
  width: 8px;
}

.leaderboard-table::-webkit-scrollbar-track {
  background: rgba(255, 255, 255, 0.05);
  border-radius: 4px;
}

.leaderboard-table::-webkit-scrollbar-thumb {
  background: rgba(255, 215, 0, 0.3);
  border-radius: 4px;
  transition: background 0.3s ease;
}

.leaderboard-table::-webkit-scrollbar-thumb:hover {
  background: rgba(255, 215, 0, 0.5);
}

.leaderboard-table th {
  padding: 16px 20px;
  text-align: center;
  font-weight: 700;
  color: var(--brand);
  font-size: 16px;
  transition: color 0.3s ease;
  width: auto;
}

.leaderboard-table th:first-child {
  text-align: center;
  width: 12%;
}

.leaderboard-table th:nth-child(2) {
  text-align: center;
  width: 48%;
}

.leaderboard-table th:nth-child(3) {
  text-align: center;
  width: 25%;
}

.leaderboard-table th:nth-child(4) {
  text-align: center;
  width: 15%;
}

.leaderboard-table tbody tr {
  border-bottom: none;
  transition: background-color 0.3s ease;
  position: relative;
  height: auto;
}

.leaderboard-table tbody tr:hover {
  background: rgba(255, 255, 255, 0.03);
}

/* Message row that appears below donor on hover */
.leaderboard-table tbody tr.message-row {
  display: table-row;
  background: rgba(255, 255, 255, 0.03);
  max-height: 0;
  overflow: hidden;
  opacity: 0;
  line-height: 0;
  transition: max-height 0.5s cubic-bezier(0.4, 0, 0.2, 1), opacity 0.3s ease, line-height 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

.leaderboard-table tbody tr.message-row td {
  text-align: center;
  font-style: italic;
  font-size: 14px;
  font-weight: 500;
  color: var(--brand);
  padding: 0 20px;
  line-height: 0;
  transition: padding 0.5s cubic-bezier(0.4, 0, 0.2, 1), line-height 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Show message row when hovering over the donor row above it */
.leaderboard-table tbody tr:hover + tr.message-row {
  max-height: 80px;
  opacity: 1;
  line-height: 1.4;
}

.leaderboard-table tbody tr:hover + tr.message-row td {
  padding: 16px 20px;
  line-height: 1.4;
}

.leaderboard-table tbody tr:last-child {
  border-bottom: none;
}

.leaderboard-table td {
  padding: 14px 20px;
  color: var(--text);
  font-size: 15px;
  transition: color 0.3s ease;
  width: auto;
}

.leaderboard-table td.position {
  text-align: center;
  font-weight: 700;
  color: var(--brand);
  font-size: 18px;
  width: 12%;
  vertical-align: middle;
}

.leaderboard-table td.name {
  font-weight: 600;
  color: var(--text);
  text-align: center;
  width: 48%;
  vertical-align: middle;
}

.leaderboard-table td.amount {
  text-align: center;
  font-family: var(--mono);
  font-weight: 600;
  color: var(--brand);
  width: 25%;
  vertical-align: middle;
}

.leaderboard-table td.currency {
  text-align: center;
  font-family: var(--mono);
  font-weight: 500;
  color: var(--muted);
  font-size: 14px;
  width: 15%;
  vertical-align: middle;
}

/* Responsive por ancho de pantalla */
@media (max-width: 1024px) {
  .cards,
  .cards#donation-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}
@media (max-width: 768px) {
  .cards,
  .cards.compact,
  .cards#donation-grid {
    grid-template-columns: 1fr;
  }
  .card {
    padding: 20px;
  }
  .card h3 {
    font-size: 18px;
  }
  .card p {
    font-size: 14px;
  }
  .leaderboard-section h3 {
    font-size: 24px;
  }
  .leaderboard-table {
    max-height: 400px;
  }
  .leaderboard-table tbody {
    max-height: 300px;
  }
  .leaderboard-table th,
  .leaderboard-table td {
    padding: 12px 16px;
    font-size: 14px;
  }
  .leaderboard-table th:first-child,
  .leaderboard-table td.position {
    width: 12%;
  }
  .leaderboard-table th:nth-child(2),
  .leaderboard-table td.name {
    width: 48%;
  }
  .leaderboard-table th:nth-child(3),
  .leaderboard-table td.amount {
    width: 25%;
  }
  .leaderboard-table th:nth-child(4),
  .leaderboard-table td.currency {
    width: 15%;
  }
}
@media (max-width: 480px) {
  .card {
    padding: 16px;
    border-radius: 14px;
  }
  .card h3 {
    font-size: 16px;
  }
  .section-subtitle {
    font-size: 0.9rem;
  }
  .leaderboard-section h3 {
    font-size: 20px;
  }
  .leaderboard-table {
    max-height: 350px;
  }
  .leaderboard-table tbody {
    max-height: 250px;
  }
  .leaderboard-table th,
  .leaderboard-table td {
    padding: 10px 12px;
    font-size: 13px;
  }
  .leaderboard-table th:first-child,
  .leaderboard-table td.position {
    width: 12%;
  }
  .leaderboard-table th:nth-child(2),
  .leaderboard-table td.name {
    width: 48%;
  }
  .leaderboard-table th:nth-child(3),
  .leaderboard-table td.amount {
    width: 25%;
  }
  .leaderboard-table th:nth-child(4),
  .leaderboard-table td.currency {
    width: 15%;
  }
}

/* Manifesto */
.manifesto details {
  background: transparent;
  /* border: 1px solid rgba(255, 255, 255, 0.07); */
  padding: 16px 18px;
  border-radius: 16px;
  box-shadow: none;
  transition: all 0.5s ease;
}
.manifesto details + details {
  margin-top: 14px;
  transition: margin 0.4s ease;
}
.manifesto summary {
  font-weight: 800;
  transition: color 0.4s ease;
  font-size: 20px;
  padding: 8px 0;
  cursor: pointer;
}
.manifesto .manifesto-content {
  padding-top: 10px;
  transition: padding 0.4s ease;
}
.manifesto .manifesto-content,
.typewriter {
  font-family: var(--mono);
  color: var(--text);
  background: none;
  border-left: none;
  padding: 16px 18px;
  border-radius: 14px;
  transition: all 0.4s ease;
}
.manifesto summary {
  font-family: var(--mono);
  color: var(--brand);
  transition: color 0.4s ease;
}
.manifesto details + details {
  margin-top: 14px;
  transition: margin 0.4s ease;
}
.manifesto-cta {
  display: flex;
  gap: 14px;
  margin-top: 18px;
  transition: margin 0.4s ease;
}

/* Incisos */
.incisos {
  list-style-type: decimal;
  padding-left: 20px;
}
.incisos li {
  margin-bottom: 10px;
}

/* Two columns */
.two-col {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 32px;
  align-items: start;
  transition: gap 0.4s ease;
}
.quote {
  background: linear-gradient(180deg, var(--panel), var(--panel-2));
  padding: 32px;
  border-radius: 18px;
  border: 1px solid rgba(255, 255, 255, 0.07);
  box-shadow: var(--shadow);
  position: relative;
  transition: all 0.4s ease;
}
.quote::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 5px;
  background: linear-gradient(90deg, var(--brand), var(--brand-2));
  transition: height 0.4s ease;
}
.quote blockquote {
  margin: 0 0 14px;
  font-size: 26px;
  font-family: var(--serif);
  font-style: italic;
  line-height: 1.5;
  color: var(--text);
  transition: font-size 0.4s ease;
}
.quote cite {
  font-family: var(--mono);
  font-size: 15px;
  color: var(--brand);
  font-weight: 500;
  transition: font-size 0.4s ease;
}
.list-check {
  padding-left: 20px;
  transition: padding 0.4s ease;
}
.list-check li {
  margin: 10px 0;
  transition: margin 0.4s ease;
}

/* Team */
.team {
  grid-template-columns: repeat(4, 1fr);
  transition: grid-template-columns 0.4s ease;
}
.person {
  background: linear-gradient(180deg, var(--panel), var(--panel-2));
  border: 1px solid rgba(255, 255, 255, 0.07);
  padding: 24px;
  border-radius: 18px;
  text-align: center;
  position: relative;
  overflow: hidden;
  transition: all 0.4s ease;
}
.person::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--brand), var(--brand-2));
  transition: height 0.4s ease;
}
.person-icon {
  font-size: 52px;
  margin-bottom: 14px;
  display: block;
  filter: drop-shadow(0 5px 14px rgba(255, 215, 0, 0.35));
  transition: all 0.4s ease;
}
.person h3 {
  margin: 0 0 10px;
  color: #fff;
  transition: color 0.4s ease;
}
.person p {
  color: var(--muted);
  font-size: 15px;
  line-height: 1.5;
  transition: color 0.4s ease;
}

/* Timeline */
.timeline {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  gap: 16px;
  transition: gap 0.4s ease;
}
.timeline li {
  display: grid;
  grid-template-columns: 90px 1fr;
  gap: 16px;
  align-items: center;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.07);
  border-radius: 16px;
  padding: 14px;
  transition: all 0.4s ease;
}
.timeline .time {
  font-weight: 900;
  color: var(--brand);
  transition: color 0.4s ease;
}
.timeline .content h3 {
  margin: 0 0 7px;
  transition: margin 0.4s ease;
}

/* Join form */
.join {
  background: linear-gradient(180deg, rgba(255, 215, 0, 0.1), rgba(26, 130, 255, 0.1));
  transition: background 0.5s ease;
}
.join-form {
  background: linear-gradient(180deg, var(--panel), var(--panel-2));
  border: 1px solid rgba(255, 255, 255, 0.1);
  padding: 24px;
  border-radius: 18px;
  box-shadow: var(--shadow);
  transition: all 0.4s ease;
}
.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  margin-bottom: 16px;
  transition: gap 0.4s ease, margin 0.4s ease;
}
label {
  display: block;
  color: var(--muted);
  font-weight: 600;
  transition: color 0.4s ease;
}
input,
select,
textarea {
  width: 100%;
  margin-top: 7px;
  padding: 14px 14px;
  border-radius: 14px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  background: rgba(255, 255, 255, 0.05);
  color: var(--text);
  transition: all 0.4s ease;
}
input:focus,
select:focus,
textarea:focus {
  outline: 2px solid var(--brand-2);
  outline-offset: 3px;
}
.form-actions {
  display: flex;
  gap: 12px;
  margin-top: 14px;
  transition: margin 0.4s ease;
}

/* Contact */
.contact-list {
  list-style: none;
  padding: 0;
  margin: 0;
  transition: all 0.4s ease;
}
.contact-list li {
  margin: 10px 0;
  color: var(--muted);
  transition: margin 0.4s ease, color 0.4s ease;
}
.digital-map {
  width: 100%;
  height: 280px;
  border-radius: 14px;
  background: linear-gradient(135deg, var(--panel), var(--panel-2));
  border: 1px solid rgba(255, 255, 255, 0.1);
  position: relative;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  transition: all 0.4s ease;
}
.map-grid {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-image: radial-gradient(circle at 1px 1px, rgba(255, 255, 255, 0.12) 1px, transparent 0);
  background-size: 22px 22px;
  opacity: 0.35;
  transition: opacity 0.4s ease;
}
.map-nodes {
  display: flex;
  gap: 22px;
  margin-bottom: 18px;
  transition: gap 0.4s ease, margin 0.4s ease;
}
.node {
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.25);
  position: relative;
  transition: all 0.4s ease;
}
.node.active {
  background: var(--brand);
  box-shadow: 0 0 25px rgba(255, 215, 0, 0.55);
  animation: pulse 1.8s infinite;
  transition: all 0.4s ease;
}
.node::after {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 24px;
  height: 24px;
  border: 1px solid rgba(255, 255, 255, 0.35);
  border-radius: 50%;
  transition: all 0.4s ease;
}
.digital-map p {
  color: var(--muted);
  font-size: 15px;
  margin: 0;
  transition: font-size 0.4s ease, color 0.4s ease;
}
@keyframes pulse {
  0%,
  100% {
    opacity: 1;
  }
  50% {
    opacity: 0.6;
  }
}

/* Footer */
.site-footer {
  padding: 30px 0;
  background: transparent;
  color: #fff;
  text-align: center;
}
.footer-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 20px;
  text-align: center;
}
.social-links {
  display: flex;
  gap: 18px;
  justify-content: center;
  margin: 0;
}
.social-links img {
  width: 36px;
  height: 36px;
  background: rgba(255, 255, 255, 0.95);
  border-radius: 8px;
  padding: 6px;
  box-shadow: 0 6px 20px rgba(10, 10, 10, 0.06);
  transition: transform 0.25s ease, box-shadow 0.25s ease, filter 0.25s ease;
  display: inline-block;
}
.social-links img:hover {
  transform: translateY(-3px) scale(1.06);
  box-shadow: 0 10px 30px rgba(10, 10, 10, 0.08);
  filter: brightness(1.02);
}
.site-footer a {
  text-decoration: none;
  color: #ccc;
}
.site-footer p {
  color: #ccc;
  margin: 8px 0 0;
  font-size: 14px;
}

/* Centrar la cuarta propuesta en Key Proposals */
#key-proposals {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  align-items: stretch;
  justify-items: stretch;
  max-width: 1100px;
  margin: 0 auto;
  gap: 28px;
}
#key-proposals .card {
  min-height: 140px;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  height: 100%;
}
#key-proposals .card:nth-child(4) {
  grid-column: 2;
}
.hero-intro {
  grid-column: 1;
  color: var(--muted);
  align-self: start;
}
.hero-spacer {
  grid-column: 3;
}

/* Responsive */
@media (max-width: 1024px) {
  .primary-nav {
    position: absolute;
    inset: 70px 0 auto 0;
    background: rgba(9, 14, 30, 0.96);
    backdrop-filter: saturate(200%) blur(15px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    transform: translateX(100%);
    transition: transform 0.4s ease, opacity 0.3s ease;
    display: block;
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
  }
  .primary-nav.nav-open {
    transform: translateX(0);
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
  }
  .primary-nav ul {
    flex-direction: column;
    padding: 20px; /* Reducido para juntar los botones */
    gap: 8px; /* Reducido para juntar los botones */
  }
  .primary-nav a {
    padding: 14px 18px;
    border-radius: 14px;
    display: block;
    text-align: center;
  }
  .nav-toggle {
    display: flex;
  }
  .language-toggle {
    order: 3;
  }
  .brand span {
    font-size: 18px;
  }
}
@media (max-width: 960px) {
  .hero-inner {
    grid-template-columns: 1fr;
    max-width: 100%;
  }
  .hero-copy h1 {
    font-size: 44px;
  }
  .team {
    grid-template-columns: repeat(2, 1fr);
  }
  .cards {
    grid-template-columns: repeat(2, 1fr);
  }
  .language-toggle {
    font-size: 13px;
    padding: 5px 10px;
  }
  .lang-flag {
    font-size: 15px;
  }
  #key-proposals {
    grid-template-columns: repeat(2, 1fr);
    gap: 24px;
  }
  #key-proposals .card:nth-child(4) {
    grid-column: auto;
  }
  .hero-intro {
    grid-column: 1;
  }
  .hero-spacer {
    grid-column: 1;
  }
}
@media (max-width: 720px) {
  .hero-art {
    min-height: 260px;
  }
  .hero-art .sun-circle {
    top: 48%;
    left: 50%;
    width: 100px;
    height: 100px;
  }
  .hero-art .earth-circle {
    animation: orbit-sm 10s linear infinite;
  }
  .primary-nav {
    position: absolute;
    inset: 70px 0 auto 0;
    background: rgba(9, 14, 30, 0.96);
    backdrop-filter: saturate(200%) blur(15px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    transform: translateX(100%);
    transition: transform 0.4s ease, opacity 0.3s ease;
    display: block;
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
  }
  .primary-nav.nav-open {
    transform: translateX(0);
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
  }
  .primary-nav ul {
    flex-direction: column;
    padding: 20px;  /* antes 200px */
    gap: 6px;       /* más compacto */
  }
  .primary-nav a {
    padding: 16px 20px;  /* botones más cómodos */
    font-size: 16px;
    width: 100%;         /* ocupan todo el ancho */
    border-radius: 12px;
    display: block;
    text-align: center;
    transition: all 0.4s ease;
  }
  .primary-nav a:hover {
    background: rgba(255, 255, 255, 0.12);
    transform: translateX(-5px);
  }
  .nav-toggle {
    display: flex;
  }
  .nav-toggle span:nth-child(1),
  .nav-toggle span:nth-child(2),
  .nav-toggle span:nth-child(3) {
    transition: all 0.4s ease;
  }
  .nav-toggle[aria-expanded='true'] span:nth-child(1) {
    transform: rotate(45deg) translate(6px, 6px);
  }
  .nav-toggle[aria-expanded='true'] span:nth-child(2) {
    opacity: 0;
  }
  .nav-toggle[aria-expanded='true'] span:nth-child(3) {
    transform: rotate(-45deg) translate(8px, -7px);
  }
  .two-col,
  .form-row,
  .cards,
  .cards#donation-grid,
  #key-proposals {
    grid-template-columns: 1fr;
  }
  #key-proposals {
    gap: 24px;
  }
  #key-proposals .card,
  #key-proposals .card:nth-child(4) {
    grid-column: auto;
  }
  .hero-copy h1 {
    font-size: 36px;
  }
  .hero-metrics {
    flex-direction: column;
    gap: 18px;
    text-align: center;
  }
  .hero-metrics div {
    align-items: center;
  }
  .language-toggle {
    font-size: 12px;
    padding: 4px 8px;
    gap: 5px;
  }
  .lang-flag {
    font-size: 14px;
  }
  .lang-text {
    font-size: 12px;
  }
  .logo-img {
    width: 32px;
    height: 32px;
  }
  .hero-intro,
  .hero-spacer {
    grid-column: 1;
  }
}