/* ===== VARIABLES CSS UNIFICADAS ===== */
:root {
  /* Colores principales del sistema - CAMBIADOS A AZUL */
  --primary-blue: #3b82f6;
  --primary-blue-dark: #2563eb;
  --primary-blue-light: #60a5fa;
  --accent-blue: #1d4ed8;
  
  /* Espaciado y dimensiones */
  --padding-sm: 8px;
  --padding-base: 15px;
  --padding-lg: 25px;
  --padding-xl: 30px;
  
  /* Border radius */
  --radius-sm: 8px;
  --radius-base: 12px;
  --radius-lg: 15px;
  --radius-xl: 20px;
  
  /* Transiciones */
  --transition-fast: all 0.2s ease;
  --transition-base: all 0.3s ease;
  --transition-slow: all 0.4s ease;
  --transition-bounce: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  
  /* Sombras base - ACTUALIZADAS CON AZUL */
  --shadow-sm: 0 4px 15px rgba(0, 0, 0, 0.15);
  --shadow-base: 0 8px 25px rgba(0, 0, 0, 0.2);
  --shadow-lg: 0 15px 35px rgba(0, 0, 0, 0.3);
  --shadow-blue: 0 8px 25px rgba(59, 130, 246, 0.3);
  
  /* Efectos glassmorphism */
  --glass-bg: rgba(255, 255, 255, 0.1);
  --glass-border: rgba(255, 255, 255, 0.2);
  --backdrop-blur: blur(15px);
}

/* ===== VARIABLES POR MODO ===== */
body {
  /* MODO CLARO */
  --bg-body: linear-gradient(135deg, #f8fafc 0%, #e2e8f0 50%, #cbd5e1 100%);
  --bg-navbar: rgba(15, 23, 42, 0.95);
  --bg-card: rgba(255, 255, 255, 0.9);
  --bg-card-hover: rgba(255, 255, 255, 0.95);
  --text-main: #0f172a;
  --text-secondary: #475569;
  --text-navbar: #ffffff;
  --text-muted: #64748b;
  --border-color: rgba(148, 163, 184, 0.3);
  --shadow-card: 0 10px 25px rgba(15, 23, 42, 0.1);
  --shadow-card-hover: 0 20px 40px rgba(15, 23, 42, 0.15);
  --bg-image-overlay: rgba(179, 181, 184, 0.75);
}

/* MODO OSCURO */
body.dark-mode {
  --bg-body: linear-gradient(135deg, #0f172a 0%, #1e293b 50%, #334155 100%);
  --bg-navbar: rgba(15, 23, 42, 0.95);
  --bg-card: rgba(30, 41, 59, 0.9);
  --bg-card-hover: rgba(51, 65, 85, 0.95);
  --text-main: #f1f5f9;
  --text-secondary: #cbd5e1;
  --text-navbar: #ffffff;
  --text-muted: #94a3b8;
  --border-color: rgba(71, 85, 105, 0.3);
  --shadow-card: 0 10px 25px rgba(0, 0, 0, 0.4);
  --shadow-card-hover: 0 20px 40px rgba(0, 0, 0, 0.6);
  --bg-image-overlay: rgba(15, 23, 42, 0.75);
}

/* ===== RESET Y BASE ===== */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: 'Roboto', 'Segoe UI', Tahoma, Geneva, Verdana, system-ui, sans-serif;
  background: var(--bg-body);
  background-attachment: fixed;
  color: var(--text-main);
  transition: var(--transition-base);
  min-height: 100vh;
  line-height: 1.6;
  position: relative;
}

/* Overlay para imagen de fondo en modo claro */
body:not(.dark-mode)::before {
  content: '';
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-image: url('imagenes/ima6.jpeg');
  background-size: cover;
  background-position: center;
  background-attachment: fixed;
  opacity: 0.85;
  z-index: -2;
  pointer-events: none;
}

body:not(.dark-mode)::after {
  content: '';
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: var(--bg-image-overlay);
  z-index: -1;
  pointer-events: none;
}

/* Imagen de fondo para modo oscuro */
body.dark-mode::before {
  content: '';
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-image: url('imagenes/ima6.jpeg');
  background-size: cover;
  background-position: center;
  background-attachment: fixed;
  opacity: 0.35;
  z-index: -2;
  pointer-events: none;
}

body.dark-mode::after {
  content: '';
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: var(--bg-image-overlay);
  z-index: -1;
  pointer-events: none;
}

/* ===== HEADER SIN ANIMACIONES ===== */
.header {
  position: sticky;
  top: 0;
  z-index: 1000;
  backdrop-filter: var(--backdrop-blur);
}

.navbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background-color: var(--bg-navbar);
  color: var(--text-navbar);
  padding: 15px 30px;
  flex-wrap: wrap;
  /* ELIMINADAS LAS TRANSICIONES DEL NAVBAR */
}  

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

/* ===== BOTONES MODERNIZADOS SIN FLECHAS ===== */
.btn {
  border: none;
  cursor: pointer;
  transition: var(--transition-bounce);
  font-weight: 600;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  position: relative;
  overflow: hidden;
}

.btn::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 0;
  height: 0;
  background: rgba(255, 255, 255, 0.2);
  border-radius: 25%;
  transform: translate(-50%, -50%);
  transition: var(--transition-fast);
  z-index: 0;
}

.btn:hover::before {
  width: 100%;
  height: 100%;
}

.btn > * {
  position: relative;
  z-index: 1;
}

.btn.modo {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: var(--glass-bg);
  backdrop-filter: var(--backdrop-blur);
  border: 1px solid var(--glass-border);
  color: var(--primary-blue-light);
  font-size: 1.2rem;
  box-shadow: var(--shadow-sm);
}

.btn.modo:hover {

  box-shadow: var(--shadow-blue);
  background: var(--primary-blue);
  color: #ffffff;
}

.btn.cerrar {
  background: linear-gradient(135deg, #ef4444, #dc2626);
  color: white;
  padding: var(--padding-sm) var(--padding-base);
  border-radius: 7px;
  font-size: 0.9rem;
  box-shadow: var(--shadow-sm);
  transition: var(--transition-bounce);
}

.btn.cerrar:hover {
  transform: translateY(-2px) scale(1.05);
  box-shadow: 0 8px 25px rgba(239, 68, 68, 0.4);
  background: linear-gradient(135deg, #dc2626, #b91c1c);
}


/* ===== CONTAINER PRINCIPAL ===== */
.container {
  max-width: 1400px;
  margin: 0 auto;
  padding: var(--padding-xl) 20px;
  text-align: center;
}

/* Modo claro - azul noche */
h1 {
  font-size: clamp(2rem, 5vw, 3rem);
  font-weight: 800;
  margin-bottom: var(--padding-xl);
  color: #1e293b; /* azul noche uniforme */
  text-shadow: 0 2px 3px rgba(48, 115, 241, 0.3);
  position: relative;
}

/* Modo oscuro - azul uniforme */
body.dark-mode h1 {
  color: var(--primary-blue); /* o el color azul que prefieras */
}



/* ===== GRID DE TARJETAS MODERNIZADO ===== */
.cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: var(--padding-lg);
  max-width: 1200px;
  margin: 0 auto;
  width: 100%;
}

/* ===== TARJETAS MODERNIZADAS CON FONDOS ===== */
.card {
  background: var(--bg-card);
  backdrop-filter: var(--backdrop-blur);
  border: 1px solid var(--border-color);
  padding: var(--padding-xl);
  border-radius: var(--radius-lg);
  position: relative;
  box-shadow: var(--shadow-card);
  transition: var(--transition-bounce);
  overflow: hidden;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  min-height: 280px;
}

/* Fondo con degradado para cada tarjeta */
.card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(135deg, transparent 0%, var(--card-bg-color) 100%);
  opacity: 0.1;
  z-index: -1;
  transition: var(--transition-base);
}

.card::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 4px;
  background: linear-gradient(90deg, transparent, var(--card-accent), transparent);
  transform: translateX(-100%);
  transition: var(--transition-base);
}

.card:hover {
  transform: translateY(-8px) scale(1.02);
  background: var(--bg-card-hover);
  box-shadow: var(--shadow-card-hover);
}

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

.card:hover::after {
  transform: translateX(0);
}

.card img {
  width: 60px;
  height: 60px;
  margin-bottom: var(--padding-base);
  transition: var(--transition-bounce);
  filter: drop-shadow(0 4px 8px rgba(0, 0, 0, 0.1));
}

.card:hover img {
  transform: scale(1.1) rotate(5deg);
}

.card-text {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.card h2 {
  font-size: 1.25rem;
  font-weight: 700;
  margin-bottom: var(--padding-sm);
  color: var(--text-main);
  line-height: 1.3;
}

.card p {
  font-size: 0.95rem;
  color: var(--text-secondary);
  line-height: 1.5;
  margin-bottom: var(--padding-base);
}

/* ===== BOTÓN INGRESAR SIN FLECHAS ===== */
.read-more {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: var(--padding-base) var(--padding-lg);
  border: none;
  color: white;
  border-radius: var(--radius-base);
  font-weight: 600;
  font-size: 0.95rem;
  cursor: pointer;
  text-decoration: none;
  transition: var(--transition-bounce);
  position: relative;
  overflow: hidden;
  min-width: 120px;
}

/* ELIMINADA LA FLECHA DEL BOTÓN */
.read-more:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.2);
}

.read-more:active {
  transform: translateY(0);
}

/* ===== COLORES DE TARJETAS CON AZUL COMO PRINCIPAL ===== */
.card.pink {
  --card-accent: #ec4899;
  --card-bg-color: #ec4899;
}
.card.pink .read-more {
  background: linear-gradient(135deg, #ec4899, #db2777);
}
.card.pink .read-more:hover {
  box-shadow: 0 8px 25px rgba(236, 72, 153, 0.4);
}

.card.blue {
  --card-accent: var(--primary-blue);
  --card-bg-color: var(--primary-blue);
}
.card.blue .read-more {
  background: linear-gradient(135deg, var(--primary-blue), var(--primary-blue-dark));
}
.card.blue .read-more:hover {
  box-shadow: var(--shadow-blue);
}

.card.blue2 {
  --card-accent: var(--primary-blue-light);
  --card-bg-color: var(--primary-blue-light);
}
.card.blue2 .read-more {
  background: linear-gradient(135deg, var(--primary-blue-light), var(--primary-blue));
}
.card.blue2 .read-more:hover {
  box-shadow: 0 8px 25px rgba(96, 165, 250, 0.4);
}

.card.red {
  --card-accent: #ef4444;
  --card-bg-color: #ef4444;
}
.card.red .read-more {
  background: linear-gradient(135deg, #ef4444, #dc2626);
}
.card.red .read-more:hover {
  box-shadow: 0 8px 25px rgba(239, 68, 68, 0.4);
}

.card.yellow {
  --card-accent: #f59e0b;
  --card-bg-color: #f59e0b;
}
.card.yellow .read-more {
  background: linear-gradient(135deg, #f59e0b, #d97706);
  color: #000;
}
.card.yellow .read-more:hover {
  box-shadow: 0 8px 25px rgba(245, 158, 11, 0.4);
}

.card.green {
  --card-accent: #10b981;
  --card-bg-color: #10b981;
}
.card.green .read-more {
  background: linear-gradient(135deg, #10b981, #059669);
}
.card.green .read-more:hover {
  box-shadow: 0 8px 25px rgba(16, 185, 129, 0.4);
}

.card.purple {
  --card-accent: #8b5cf6;
  --card-bg-color: #8b5cf6;
}
.card.purple .read-more {
  background: linear-gradient(135deg, #8b5cf6, #7c3aed);
}
.card.purple .read-more:hover {
  box-shadow: 0 8px 25px rgba(139, 92, 246, 0.4);
}

.card.orange {
  --card-accent: #f97316;
  --card-bg-color: #f97316;
}
.card.orange .read-more {
  background: linear-gradient(135deg, #f97316, #ea580c);
}
.card.orange .read-more:hover {
  box-shadow: 0 8px 25px rgba(249, 115, 22, 0.4);
}

/* ===== ANIMACIONES ELIMINADAS DEL NAVBAR ===== */
/* Solo mantenemos las animaciones de las tarjetas */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes float {
  0%, 100% {
    transform: translateY(0px);
  }
  50% {
    transform: translateY(-5px);
  }
}

/* Aplicar animaciones solo a las tarjetas */
.card {
  animation: fadeInUp 0.6s ease-out;
}

.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:nth-child(7) { animation-delay: 0.7s; }
.card:nth-child(8) { animation-delay: 0.8s; }

h1 {
  animation: fadeInUp 0.8s ease-out;
}

/* ===== RESPONSIVE DESIGN ===== */
@media (max-width: 768px) {
  .navbar {
    padding: var(--padding-base) var(--padding-base);
    flex-wrap: wrap;
    gap: var(--padding-sm);
  }
  
  .usuario {
    font-size: 0.9rem;
  }
  
  .usuario::before {
    display: none;
  }
  
  .acciones {
    gap: 6px;
  }
  
  .btn.modo {
    width: 36px;
    height: 36px;
    font-size: 1rem;
  }
  
  

  .container {
    padding: var(--padding-base) 15px;
  }

  .cards {
    grid-template-columns: 1fr;
    gap: var(--padding-base);
  }

  .card {
    padding: var(--padding-lg);
    min-height: auto;
    flex-direction: row;
    text-align: left;
    align-items: center;
    gap: var(--padding-base);
  }

  .card img {
    width: 50px;
    height: 50px;
    margin-bottom: 0;
    flex-shrink: 0;
  }

  .card-text {
    flex: 1;
    margin: 0;
  }

  .card h2 {
    font-size: 1.1rem;
    margin-bottom: 4px;
  }

  .card p {
    font-size: 0.85rem;
    margin-bottom: var(--padding-sm);
  }

  .read-more {
    padding: var(--padding-sm) var(--padding-base);
    font-size: 0.85rem;
    min-width: auto;
    flex-shrink: 0;
    border-radius: 7px;
  }

  /* Ajustar animaciones en móvil */
  .card {
    animation-delay: 0s !important;
  }
}

@media (max-width: 480px) {
  .navbar {
    padding: 10px 15px;
  }
  
  .usuario {
    font-size: 0.7rem;
  }
  

  .acciones {
    gap: 4px;
  }
  
  .btn.modo {
    width: 32px;
    height: 32px;
    font-size: 1rem;
  }


  .btn.cerrar {
    font-size: 0;
    padding: 6px;
    min-width: 32px;
  }
  
  .btn.cerrar::after {
    content: '✕';
    font-size: 1rem;
  }

  h1 {
    font-size: 1.8rem;
    margin-bottom: var(--padding-base);
  }

  .card {
    padding: var(--padding-base);
  }

  .card img {
    width: 40px;
    height: 40px;
  }

  .card h2 {
    font-size: 1rem;
  }

  .card p {
    font-size: 0.8rem;
  }

  .read-more {
    padding: 8px 14px;
    font-size: 0.8rem;
  }
}