:root {
  --bg: #0f172a;           /* fondo oscuro elegante */
  --card: #1e293b;         /* tarjetas */
  --primary: #3b82f6;      /* azul moderno */
  --text: #e2e8f0;         /* texto claro */
  --muted: #94a3b8;
  --radius: 16px;
}

body {
  margin: 0;
  font-family: 'Segoe UI', sans-serif;
  background: var(--bg);
  color: var(--text);
}

body.light {
  --bg: #f1f5f9;
  --card: #ffffff;
  --text: #0f172a;
  --muted: #475569;
}

.header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 15px 25px;
  background: rgba(30, 41, 59, 0.8);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid rgba(255,255,255,0.05);
}

.logo {
  font-weight: bold;
  font-size: 18px;
}

.menu-title {
  font-size: 14px;
  color: var(--muted);
}

#themeToggle {
  background: var(--card);
  border: none;
  color: var(--text);
  padding: 8px 12px;
  border-radius: 10px;
  cursor: pointer;
}

.container {
  display: grid;
  gap: 20px;
  padding: 25px;
  grid-template-columns: 1fr;
}

/* Tablet */
@media (min-width: 600px) {
  .container {
    grid-template-columns: repeat(2, 1fr);
  }
}

/* PC */
@media (min-width: 992px) {
  .container {
    grid-template-columns: repeat(3, 1fr);
  }
}

.card {
  background: var(--card);
  border-radius: var(--radius);
  padding: 20px;
  text-decoration: none;
  color: var(--text);
  position: relative;
  overflow: hidden;
  transition: all 0.25s ease;
  border: 1px solid rgba(255,255,255,0.05);
}

/* efecto hover pro */
.card:hover {
  transform: translateY(-6px);
  border-color: rgba(59,130,246,0.5);
  box-shadow: 0 10px 30px rgba(0,0,0,0.4);
}

/* línea glow */
.card::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: var(--radius);
  padding: 1px;
  background: linear-gradient(120deg, transparent, var(--primary), transparent);
  -webkit-mask: 
    linear-gradient(#000 0 0) content-box, 
    linear-gradient(#000 0 0);
  -webkit-mask-composite: xor;
          mask-composite: exclude;
  opacity: 0;
  transition: 0.3s;
}

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

.card h3 {
  margin: 10px 0 5px;
}

.card p {
  font-size: 14px;
  color: var(--muted);
}

.img-icon {
  width: 50px;
  height: 50px;
  object-fit: contain;
  filter: drop-shadow(0 0 5px rgba(59,130,246,0.5));
}

.footer {
  text-align: center;
  padding: 20px;
  color: var(--muted);
  border-top: 1px solid rgba(255,255,255,0.05);
}

.footer-logo {
  width: 190px;
  margin-top: 10px;
  opacity: 0.7;
}

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

.container {
  animation: fadeInUp 0.6s ease forwards;
}

.card {
  opacity: 0;
  animation: fadeInUp 0.5s ease forwards;
}

/* delays progresivos */
.card:nth-child(1) { animation-delay: 0.1s; }
.card:nth-child(2) { animation-delay: 0.2s; }
.card:nth-child(3) { animation-delay: 0.3s; }
.card:nth-child(4) { animation-delay: 0.4s; }
.card:nth-child(5) { animation-delay: 0.5s; }
.card:nth-child(6) { animation-delay: 0.6s; }

.card {
  transform-style: preserve-3d;
  will-change: transform;
  transition: transform 0.15s ease;
}


/* Por defecto (modo oscuro) */
.logo-light {
  display: none;
}

.logo-dark {
  display: block;
  width: 50px;
}

/* Cuando activas modo claro */
body.light .logo-dark {
  display: none;
}

body.light .logo-light {
  display: block;
  width: 50px;
}