/* =====================
   VARIABLES CSS GLOBALES
   ===================== */
:root {
  --force-green: #16a34a;
  --force-dark: #0f172a;
  --force-blue: #1e40af;
  --force-neon: #22d3ee;
  --transition: all 0.3s ease;
}

/* =====================
   ADMIN / GHOST MODE
   ===================== */
.ghost-mode {
  pointer-events: none;
  opacity: 0.4;
  transform: scale(0.95);
  filter: blur(0.5px);
  transition: var(--transition);
}

.admin-only { 
  transition: var(--transition); 
}

/* =====================
   ANIMACIONES FADE-IN Y SLIDE-UP
   ===================== */
.fade-in, .slide-up {
  opacity: 0;
  transform: translateY(20px);
  transition: all 0.7s ease-out;
}

.fade-in.show, .slide-up.show {
  opacity: 1;
  transform: translateY(0);
}

/* =====================
   TABS
   ===================== */
.tab-content { 
  display: none; 
}

.tab-content.active { 
  display: block; 
}

.tab-btn { 
  cursor: pointer; 
  padding: 10px 15px; 
  border-radius: 0.5rem; 
  background: #e4e6eb; 
  margin-right: 0.5rem; 
  transition: var(--transition);
}

.tab-btn.active { 
  background: var(--force-blue); 
  color: #fff; 
}

/* =====================
   DARK MODE GLOBAL MEJORADO
   ===================== */
html {
  scroll-behavior: smooth;
  transition: background-color 0.3s ease, color 0.3s ease;
}

body {
  transition: background-color 0.3s ease, color 0.3s ease;
}

.dark body {
  background-color: #111827;
  color: #f3f4f6;
}

.dark .bg-white { 
  background-color: #1f2937 !important; 
}

.dark .text-gray-800 { 
  color: #f3f4f6 !important; 
}

.dark .shadow-lg { 
  box-shadow: 0 10px 15px -3px rgba(0,0,0,0.4), 
              0 4px 6px -2px rgba(0,0,0,0.3) !important; 
}

.dark img { 
  filter: brightness(0.95); 
}

/* =====================
   IMÁGENES OPTIMIZADAS
   ===================== */
img {
  display: block;
  max-width: 100%;
  height: auto;
  object-fit: cover;
  transition: filter 0.3s ease, transform 0.3s ease;
}

/* =====================
   BOTONES Y ENLACES
   ===================== */
.btn-primary {
  background: linear-gradient(135deg, var(--force-green), var(--force-blue));
  color: white;
  padding: 12px 24px;
  border-radius: 12px;
  font-weight: 600;
  transition: var(--transition);
  border: none;
  cursor: pointer;
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 20px rgba(0,0,0,0.2);
}

/* =====================
   TARJETAS DE PROYECTOS
   ===================== */
.project-card {
  background: rgba(255,255,255,0.1);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255,255,255,0.2);
  border-radius: 16px;
  transition: var(--transition);
}

.project-card:hover {
  transform: translateY(-5px);
  border-color: var(--force-neon);
}

/* =====================
   NAVEGACIÓN MÓVIL
   ===================== */
.mobile-menu {
  transform: translateX(-100%);
  transition: transform 0.3s ease;
}

.mobile-menu.open {
  transform: translateX(0);
}

/* =====================
   LOADING STATES
   ===================== */
.loading {
  opacity: 0.6;
  pointer-events: none;
}

/* =====================
   UTILIDADES
   ===================== */
.text-gradient {
  background: linear-gradient(135deg, var(--force-green), var(--force-neon), var(--force-blue));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  background-size: 200% 200%;
  animation: gradient-shift 3s ease infinite;
}

@keyframes gradient-shift {
  0%, 100% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* =====================
   FIX URGENTE MODO OSCURO
   ===================== */