/* =====================================================
   ACADEMIA DE HABILIDADES - CSS MODERNIZADO
   Diseño contemporáneo con paleta vibrante y profesional
   ===================================================== */

/* Variables CSS - Paleta Moderna y Profesional */
:root {
  /* Colores Principales - Azul Corporativo */
  --primary-500: #005AEE;
  --primary-700: #0041AD;
  --primary-100: #E6F0FF;
  
  /* Colores de Acento Estratégicos */
  --accent-purple: #8A3FFC;
  --accent-orange: #FF7A00;
  --accent-green: #00A78F;
  
  /* Paleta Neutral - Base del 90% */
  --neutral-900: #121217;
  --neutral-700: #4A4A52;
  --neutral-300: #DDE1E6;
  --neutral-100: #FFFFFF;
  --neutral-50: #F8F9FA;
  
  /* Colores Semánticos */
  --success: #28A745;
  --warning: #FFC107;
  --error: #DC3545;
  
  /* Gradientes */
  --gradient-primary: linear-gradient(135deg, var(--primary-500) 0%, var(--primary-700) 100%);
  --gradient-accent: linear-gradient(135deg, var(--accent-purple) 0%, var(--accent-orange) 100%);
  --gradient-hero: radial-gradient(circle, var(--primary-100) 0%, var(--neutral-50) 60%);
  
  /* Tipografía */
  --font-headings: 'Poppins', sans-serif;
  --font-body: 'Inter', sans-serif;
  
  /* Espaciado (Sistema de 4px) */
  --space-1: 4px;
  --space-2: 8px;
  --space-3: 12px;
  --space-4: 16px;
  --space-5: 20px;
  --space-6: 24px;
  --space-8: 32px;
  --space-12: 48px;
  --space-18: 72px;
  --space-20: 80px;
  
  /* Radios */
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;
  --radius-full: 50%;
  
  /* Sombras */
  --shadow-subtle: 0 4px 12px rgba(0, 90, 238, 0.1);
  --shadow-elevated: 0 8px 24px rgba(18, 18, 23, 0.08);
  --shadow-hero: 0 20px 60px rgba(0, 90, 238, 0.15);
  
  /* Transiciones */
  --transition-fast: 0.2s ease-out;
  --transition-smooth: 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
  --transition-hero: 1.5s ease-out;
}

/* =====================================================
   RESET Y BASE
   ===================================================== */

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.6;
  color: var(--neutral-900);
  background: 
    linear-gradient(135deg, 
      #F8F9FA 0%, 
      #FFFFFF 50%, 
      #F1F3F4 100%),
    radial-gradient(circle at 10% 10%, rgba(0, 90, 238, 0.02) 0%, transparent 50%),
    radial-gradient(circle at 90% 90%, rgba(138, 63, 252, 0.02) 0%, transparent 50%);
  background-attachment: fixed;
  overflow-x: hidden;
  min-height: 100vh;
}

/* Background patterns for sections */
.section {
  position: relative;
  overflow: hidden;
}

.section:nth-child(even) {
  background: linear-gradient(135deg, 
    rgba(0, 90, 238, 0.02) 0%, 
    rgba(255, 255, 255, 0.5) 50%, 
    rgba(0, 167, 143, 0.02) 100%);
}

h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-headings);
  font-weight: 600;
  line-height: 1.3;
  color: var(--neutral-900);
  margin-bottom: var(--space-4);
}

h1 {
  font-size: clamp(2.5rem, 5vw, 3.5rem);
  font-weight: 700;
}

h2 {
  font-size: clamp(2rem, 4vw, 2.5rem);
}

h3 {
  font-size: 1.375rem;
  font-weight: 600;
}

p {
  margin-bottom: var(--space-4);
  color: var(--neutral-700);
}

.container {
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 var(--space-6);
}

/* =====================================================
   HERO SECTION MEJORADO
   ===================================================== */

.hero {
  min-height: 600px;
  background: var(--gradient-hero);
  display: flex;
  align-items: center;
  position: relative;
  overflow: hidden;
  padding: var(--space-20) 0;
}

.hero::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23005AEE' fill-opacity='0.03'%3E%3Ccircle cx='30' cy='30' r='1'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
  animation: float 20s ease-in-out infinite;
}

@keyframes float {
  0%, 100% { transform: translateY(0px); }
  50% { transform: translateY(-20px); }
}

.hero-content {
  position: relative;
  z-index: 2;
  text-align: center;
  width: 100%;
}

.hero-title {
  margin-bottom: var(--space-6);
  background: var(--gradient-primary);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  animation: fadeInUp var(--transition-hero) ease-out;
}

.hero-subtitle {
  font-size: 1.25rem;
  color: var(--neutral-700);
  max-width: 600px;
  margin: 0 auto var(--space-12);
  animation: fadeInUp var(--transition-hero) ease-out 0.2s both;
}

/* =====================================================
   HEADER Y NAVEGACIÓN MODERNA
   ===================================================== */

.header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--neutral-300);
  z-index: 1000;
  transition: all var(--transition-smooth);
}

.navbar {
  padding: var(--space-4) 0;
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-left: var(--space-6);
  padding-right: var(--space-6);
}

.nav-logo {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  font-family: var(--font-headings);
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--primary-500);
  text-decoration: none;
}

.nav-logo i {
  font-size: 2rem;
  background: var(--gradient-primary);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.nav-menu {
  display: flex;
  list-style: none;
  gap: var(--space-8);
  align-items: center;
}

.nav-link {
  text-decoration: none;
  color: var(--neutral-700);
  font-weight: 500;
  font-size: 1rem;
  padding: var(--space-2) var(--space-4);
  border-radius: var(--radius-sm);
  transition: all var(--transition-fast);
  position: relative;
}

.nav-link:hover {
  color: var(--primary-500);
  background: var(--primary-100);
}

.nav-link::after {
  content: '';
  position: absolute;
  bottom: -2px;
  left: 50%;
  width: 0;
  height: 2px;
  background: var(--gradient-primary);
  transition: all var(--transition-smooth);
  transform: translateX(-50%);
}

.nav-link:hover::after {
  width: 80%;
}

.hamburger {
  display: none;
  flex-direction: column;
  cursor: pointer;
  padding: var(--space-2);
}

.hamburger span {
  width: 25px;
  height: 3px;
  background: var(--primary-500);
  margin: 3px 0;
  transition: var(--transition-fast);
  border-radius: 2px;
}

.nav-cta {
  background: var(--gradient-primary);
  color: white;
  padding: var(--space-3) var(--space-6);
  border-radius: var(--radius-md);
  font-weight: 600;
  text-decoration: none;
  transition: all var(--transition-smooth);
  box-shadow: var(--shadow-subtle);
}

.nav-cta:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-elevated);
  color: white;
}

/* Mobile Navigation */
@media (max-width: 992px) {
  .hamburger {
    display: flex;
  }
  
  .nav-menu {
    position: fixed;
    top: 80px;
    left: -100%;
    width: 100%;
    height: calc(100vh - 80px);
    background: rgba(255, 255, 255, 0.98);
    backdrop-filter: blur(20px);
    flex-direction: column;
    justify-content: flex-start;
    align-items: center;
    padding-top: var(--space-12);
    gap: var(--space-6);
    transition: left var(--transition-smooth);
  }
  
  .nav-menu.active {
    left: 0;
  }
  
  .hamburger.active span:nth-child(1) {
    transform: rotate(45deg) translate(5px, 5px);
  }
  
  .hamburger.active span:nth-child(2) {
    opacity: 0;
  }
  
  .hamburger.active span:nth-child(3) {
    transform: rotate(-45deg) translate(7px, -6px);
  }
}

/* =====================================================
   HERO SECTION MEJORADA CON MÁS COLOR
   ===================================================== */

.hero {
  min-height: 700px;
  background: linear-gradient(135deg, 
    var(--primary-100) 0%, 
    var(--neutral-50) 30%,
    #FFF5E6 60%,
    var(--accent-purple) 100%);
  display: flex;
  align-items: center;
  position: relative;
  overflow: hidden;
  padding: calc(var(--space-20) + 80px) 0 var(--space-20);
}

.hero-background {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 1;
}

.gradient-overlay {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(45deg, 
    rgba(0, 90, 238, 0.05) 0%, 
    transparent 50%, 
    rgba(138, 63, 252, 0.05) 100%);
}

.floating-elements {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  pointer-events: none;
  z-index: 2;
}

.floating-icon {
  position: absolute;
  font-size: 1.5rem;
  color: var(--primary-500);
  opacity: 0.6;
  animation: floatIcon 6s ease-in-out infinite;
}

.floating-icon:nth-child(1) {
  top: 20%;
  left: 10%;
  animation-delay: 0s;
}

.floating-icon:nth-child(2) {
  top: 60%;
  right: 15%;
  animation-delay: 1.5s;
}

.floating-icon:nth-child(3) {
  bottom: 30%;
  left: 15%;
  animation-delay: 3s;
}

.floating-icon:nth-child(4) {
  top: 40%;
  right: 10%;
  animation-delay: 4.5s;
}

@keyframes floatIcon {
  0%, 100% { 
    transform: translateY(0px) rotate(0deg); 
    opacity: 0.6; 
  }
  50% { 
    transform: translateY(-20px) rotate(5deg); 
    opacity: 0.8; 
  }
}

.hero::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: 
    radial-gradient(circle at 20% 80%, rgba(138, 63, 252, 0.1) 0%, transparent 50%),
    radial-gradient(circle at 80% 20%, rgba(0, 90, 238, 0.1) 0%, transparent 50%),
    url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23005AEE' fill-opacity='0.03'%3E%3Ccircle cx='30' cy='30' r='2'/%3E%3Ccircle cx='20' cy='20' r='1'/%3E%3Ccircle cx='40' cy='40' r='1'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
  animation: float 20s ease-in-out infinite;
}

.hero::after {
  content: '';
  position: absolute;
  top: 10%;
  right: 10%;
  width: 200px;
  height: 200px;
  background: var(--gradient-accent);
  border-radius: var(--radius-full);
  opacity: 0.1;
  animation: floatReverse 25s ease-in-out infinite;
  z-index: 1;
}

.hero-stats {
  position: relative;
  margin: var(--space-20) auto var(--space-8);
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: var(--space-8);
  width: 100%;
  max-width: 700px;
  z-index: 10;
}

.stat-card {
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.95) 0%, rgba(255, 255, 255, 0.85) 100%);
  backdrop-filter: blur(15px);
  padding: var(--space-8);
  border-radius: var(--radius-lg);
  text-align: center;
  box-shadow: 
    0 12px 40px rgba(0, 90, 238, 0.12),
    0 6px 20px rgba(0, 0, 0, 0.08),
    inset 0 1px 0 rgba(255, 255, 255, 0.3);
  border: 1px solid rgba(0, 90, 238, 0.15);
  transition: all var(--transition-smooth);
  position: relative;
  overflow: hidden;
}

.stat-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: var(--gradient-primary);
  opacity: 0;
  transition: opacity var(--transition-smooth);
}

.stat-card:hover {
  transform: translateY(-8px) scale(1.02);
  box-shadow: 
    0 25px 80px rgba(0, 90, 238, 0.2),
    0 12px 40px rgba(0, 0, 0, 0.12),
    inset 0 1px 0 rgba(255, 255, 255, 0.4);
  border-color: var(--primary-500);
}

.stat-card:hover::before {
  opacity: 1;
}

.stat-icon {
  font-size: 3rem;
  margin-bottom: var(--space-4);
  background: var(--gradient-primary);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  filter: drop-shadow(0 4px 8px rgba(0, 90, 238, 0.2));
  display: inline-block;
  animation: pulse 3s ease-in-out infinite;
}

.stat-number {
  font-size: 2.5rem;
  font-weight: 800;
  background: var(--gradient-primary);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  font-family: var(--font-headings);
  margin-bottom: var(--space-3);
  line-height: 1;
  filter: drop-shadow(0 2px 4px rgba(0, 90, 238, 0.1));
}

.stat-label {
  font-size: 0.85rem;
  color: var(--neutral-700);
  font-weight: 600;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  line-height: 1.2;
}

/* =====================================================
   CONTADOR PRINCIPAL MEJORADO
   ===================================================== */

.main-counter {
  background: var(--neutral-100);
  padding: var(--space-8);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-hero);
  margin: var(--space-12) auto;
  max-width: 500px;
  text-align: center;
  animation: fadeInUp var(--transition-hero) ease-out 0.4s both;
  border: 1px solid var(--neutral-300);
}

.counter-amount {
  font-size: 3.5rem;
  font-weight: 700;
  color: var(--primary-500);
  font-family: var(--font-headings);
  line-height: 1;
  margin-bottom: var(--space-2);
  display: block;
  animation: countUp 2s ease-out 0.6s both;
}

.counter-label {
  font-size: 1.125rem;
  font-weight: 500;
  color: var(--neutral-700);
  margin-bottom: var(--space-6);
}

.counter-stats {
  display: flex;
  justify-content: space-around;
  gap: var(--space-6);
  margin-top: var(--space-6);
  padding-top: var(--space-6);
  border-top: 1px solid var(--neutral-300);
}

.stat-item {
  text-align: center;
}

.stat-number {
  display: block;
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--primary-500);
  font-family: var(--font-headings);
}

.stat-label {
  font-size: 0.875rem;
  color: var(--neutral-700);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

@keyframes countUp {
  from {
    opacity: 0;
    transform: translateY(30px) scale(0.8);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* =====================================================
   BOTONES MODERNOS
   ===================================================== */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: var(--space-3) var(--space-6);
  border: none;
  border-radius: var(--radius-sm);
  font-family: var(--font-headings);
  font-size: 1rem;
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
  transition: all var(--transition-fast);
  gap: var(--space-2);
  min-height: 48px;
}

.btn-primary {
  background: var(--gradient-primary);
  color: var(--neutral-100);
  box-shadow: var(--shadow-subtle);
}

.btn-primary:hover {
  transform: translateY(-2px) scale(1.03);
  box-shadow: var(--shadow-elevated);
}

.btn-secondary {
  background: var(--neutral-100);
  color: var(--primary-500);
  border: 2px solid var(--primary-500);
}

.btn-secondary:hover {
  background: var(--primary-500);
  color: var(--neutral-100);
  transform: translateY(-2px) scale(1.03);
}

.btn-large {
  padding: var(--space-4) var(--space-8);
  font-size: 1.125rem;
  min-height: 56px;
}

/* =====================================================
   TARJETAS DE PROYECTO MEJORADAS
   ===================================================== */

.project-card {
  background: var(--neutral-100);
  border-radius: var(--radius-md);
  box-shadow: 
    0 8px 32px rgba(0, 90, 238, 0.08),
    0 4px 16px rgba(0, 0, 0, 0.04),
    inset 0 1px 0 rgba(255, 255, 255, 0.1);
  overflow: hidden;
  transition: all var(--transition-smooth);
  border: 1px solid rgba(0, 90, 238, 0.1);
  position: relative;
}

.project-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: var(--gradient-primary);
  opacity: 0;
  transition: opacity var(--transition-smooth);
}

.project-card:hover {
  transform: translateY(-8px) scale(1.02);
  box-shadow: 
    0 20px 60px rgba(0, 90, 238, 0.15),
    0 8px 32px rgba(0, 0, 0, 0.08),
    inset 0 1px 0 rgba(255, 255, 255, 0.2);
  border-color: var(--primary-500);
}

.project-card:hover::before {
  opacity: 1;
}

/* Cards con colores de categoría */
.project-card.design {
  border-left: 4px solid var(--accent-purple);
}

.project-card.programming {
  border-left: 4px solid var(--primary-500);
}

.project-card.creative {
  border-left: 4px solid var(--accent-orange);
}

.project-card.practical {
  border-left: 4px solid var(--accent-green);
}

.project-image {
  width: 100%;
  height: 200px;
  background: var(--gradient-accent);
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
}

.project-category {
  position: absolute;
  top: var(--space-4);
  right: var(--space-4);
  background: var(--neutral-100);
  color: var(--neutral-900);
  padding: var(--space-1) var(--space-3);
  border-radius: var(--radius-full);
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.project-content {
  padding: var(--space-8);
}

.project-title {
  font-size: 1.25rem;
  font-weight: 600;
  margin-bottom: var(--space-3);
  color: var(--neutral-900);
}

.project-description {
  color: var(--neutral-700);
  margin-bottom: var(--space-6);
  font-size: 0.95rem;
  line-height: 1.5;
}

.project-progress {
  margin: var(--space-6) 0;
}

.progress-bar {
  width: 100%;
  height: 8px;
  background: var(--neutral-300);
  border-radius: 4px;
  overflow: hidden;
  margin-bottom: var(--space-2);
}

.progress-fill {
  height: 100%;
  background: var(--gradient-primary);
  border-radius: 4px;
  transition: width var(--transition-smooth);
}

.progress-stats {
  display: flex;
  justify-content: space-between;
  font-size: 0.875rem;
  color: var(--neutral-700);
}

.project-tags {
  display: flex;
  gap: var(--space-2);
  flex-wrap: wrap;
  margin-top: var(--space-4);
}

.tag {
  background: var(--primary-100);
  color: var(--primary-500);
  padding: var(--space-1) var(--space-3);
  border-radius: var(--radius-sm);
  font-size: 0.75rem;
  font-weight: 500;
}

.tag.purple { background: rgba(138, 63, 252, 0.1); color: var(--accent-purple); }
.tag.orange { background: rgba(255, 122, 0, 0.1); color: var(--accent-orange); }
.tag.green { background: rgba(0, 167, 143, 0.1); color: var(--accent-green); }

/* =====================================================
   MODAL DE DONACIÓN PROFESIONAL
   ===================================================== */

.modal {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(18, 18, 23, 0.8);
  z-index: 1000;
  backdrop-filter: blur(10px);
  animation: modalFadeIn 0.3s ease-out;
}

.modal.show {
  display: flex !important;
}

/* Centrado vertical y horizontal perfecto */
.modal::before {
  content: '';
  display: block;
  height: 100%;
  width: 1px;
  margin-left: -0.5px;
}

/* Fallback para navegadores sin flexbox */
.modal:not(.show) {
  display: none;
}

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes float {
  0%, 100% { transform: translateY(0px) rotate(0deg); }
  33% { transform: translateY(-10px) rotate(1deg); }
  66% { transform: translateY(-5px) rotate(-1deg); }
}

@keyframes floatReverse {
  0%, 100% { transform: translateY(0px) rotate(0deg) scale(1); }
  33% { transform: translateY(-15px) rotate(-2deg) scale(1.1); }
  66% { transform: translateY(-8px) rotate(1deg) scale(0.9); }
}

@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes pulse {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.05); }
}

/* =====================================================
   ELEMENTOS DECORATIVOS COLORIDOS
   ===================================================== */

.colored-accent {
  position: relative;
}

.colored-accent::after {
  content: '';
  position: absolute;
  bottom: -4px;
  left: 0;
  width: 60px;
  height: 3px;
  background: var(--gradient-accent);
  border-radius: 2px;
}

.colored-section {
  background: linear-gradient(135deg, 
    rgba(0, 90, 238, 0.03) 0%, 
    rgba(255, 255, 255, 0.8) 50%, 
    rgba(138, 63, 252, 0.03) 100%);
  position: relative;
}

.colored-section::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: var(--gradient-accent);
  opacity: 0.6;
}

.highlight-box {
  background: linear-gradient(135deg, 
    rgba(0, 90, 238, 0.05) 0%, 
    rgba(255, 255, 255, 0.9) 100%);
  border: 1px solid rgba(0, 90, 238, 0.1);
  border-radius: var(--radius-lg);
  padding: var(--space-8);
  position: relative;
  overflow: hidden;
}

.highlight-box::before {
  content: '';
  position: absolute;
  top: 0;
  right: 0;
  width: 100px;
  height: 100px;
  background: var(--gradient-accent);
  opacity: 0.05;
  border-radius: var(--radius-full);
  transform: translate(30px, -30px);
}

.modal-content {
  position: absolute;
  top: 25%;  /* Posicionado en la parte superior */
  left: 50%;
  transform: translateX(-50%);
  background: var(--neutral-100);
  border-radius: var(--radius-lg);
  box-shadow: 
    0 25px 80px rgba(0, 0, 0, 0.3),
    0 8px 32px rgba(0, 0, 0, 0.2),
    inset 0 1px 0 rgba(255, 255, 255, 0.1);
  max-width: 550px;
  width: 90%;
  max-height: 70vh;  /* Reducido para mejor ajuste */
  overflow-y: auto;
  animation: modalSlideIn 0.3s ease-out;
  border: 1px solid rgba(255, 255, 255, 0.2);
  padding: var(--space-10);
}

@keyframes modalSlideIn {
  from {
    opacity: 0;
    transform: translate(-50%, 0px) scale(0.95);
  }
  to {
    opacity: 1;
    transform: translate(-50%, 0px) scale(1);
  }
}

@keyframes modalFadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

.modal-close {
  position: absolute;
  top: var(--space-4);
  right: var(--space-4);
  font-size: 1.5rem;
  font-weight: bold;
  color: var(--neutral-700);
  cursor: pointer;
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-full);
  transition: all var(--transition-fast);
  background: rgba(255, 255, 255, 0.9);
  border: 1px solid var(--neutral-300);
}

.modal-close:hover {
  background: var(--primary-500);
  color: white;
  transform: scale(1.1);
  border-color: var(--primary-500);
}

/* Prevent horizontal scrolling in modal */
.modal-content * {
  max-width: 100%;
  word-wrap: break-word;
}

/* Modal Header */
.modal-header {
  padding: var(--space-8) var(--space-12) var(--space-6);
  border-bottom: 1px solid var(--neutral-200);
  position: relative;
  flex-shrink: 0;
}

/* Modal content areas */
.modal-body {
  overflow-y: auto;
  flex: 1;
  padding: var(--space-6) var(--space-12) var(--space-8);
  padding-right: var(--space-8); /* Space for custom scrollbar */
}

/* Ultra-subtle scrollbar for modal */
.modal-body::-webkit-scrollbar {
  width: 1px;
}

.modal-body::-webkit-scrollbar-track {
  background: transparent;
}

.modal-body::-webkit-scrollbar-thumb {
  background: linear-gradient(to bottom, 
    transparent 0%, 
    rgba(0, 90, 238, 0.2) 50%, 
    transparent 100%);
  border-radius: 1px;
  transition: background 0.3s ease;
}

/* Only show scrollbar on hover for ultra-clean look */
.modal-body:hover::-webkit-scrollbar-thumb {
  background: linear-gradient(to bottom, 
    transparent 0%, 
    rgba(0, 90, 238, 0.4) 50%, 
    transparent 100%);
}

/* Firefox scrollbar - ultra subtle */
.modal-body {
  scrollbar-width: none; /* Hide by default for Firefox */
}

.modal-body:hover {
  scrollbar-width: thin;
  scrollbar-color: rgba(0, 90, 238, 0.2) transparent;
}

.donation-amounts {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: var(--space-4);
  margin: var(--space-8) 0;
}

.amount-btn {
  padding: var(--space-5) var(--space-4);
  border: 2px solid var(--neutral-300);
  background: linear-gradient(135deg, var(--neutral-100) 0%, rgba(255, 255, 255, 0.9) 100%);
  border-radius: var(--radius-md);
  font-family: var(--font-headings);
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: all var(--transition-smooth);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
  position: relative;
  overflow: hidden;
}

.amount-btn::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: var(--gradient-primary);
  transition: left var(--transition-smooth);
  opacity: 0;
}
  transition: all var(--transition-fast);
  color: var(--neutral-700);
}

.amount-btn:hover {
  border-color: var(--primary-500);
  color: var(--primary-500);
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(0, 90, 238, 0.2);
}

.amount-btn:hover::before {
  left: 0;
  opacity: 0.1;
}

.amount-btn.selected {
  border-color: var(--primary-500);
  background: var(--gradient-primary);
  color: white;
  box-shadow: 0 8px 25px rgba(0, 90, 238, 0.3);
  transform: translateY(-2px);
}

.amount-btn.selected::before {
  left: 0;
  opacity: 0.1;
}

.amount-btn.custom {
  background: var(--gradient-accent);
  color: var(--neutral-100);
  border-color: transparent;
}

.amount-btn.custom:hover {
  transform: scale(1.05);
}

#custom-amount {
  width: 100%;
  padding: var(--space-4);
  border: 2px solid var(--neutral-300);
  border-radius: var(--radius-sm);
  font-size: 1rem;
  margin-top: var(--space-3);
  transition: border-color var(--transition-fast);
}

#custom-amount:focus {
  outline: none;
  border-color: var(--primary-500);
}

.form-group {
  margin-bottom: var(--space-6);
}

.form-group label {
  display: block;
  margin-bottom: var(--space-2);
  font-weight: 500;
  color: var(--neutral-900);
}

.form-group input {
  width: 100%;
  padding: var(--space-4);
  border: 2px solid var(--neutral-300);
  border-radius: var(--radius-sm);
  font-size: 1rem;
  transition: border-color var(--transition-fast);
}

.form-group input:focus {
  outline: none;
  border-color: var(--primary-500);
}

.checkbox-group {
  display: flex;
  align-items: center;
  gap: var(--space-3);
}

/* General input improvements */
input, textarea {
  border: 2px solid var(--neutral-300);
  border-radius: var(--radius-sm);
  padding: var(--space-3);
  font-family: var(--font-body);
  font-size: 1rem;
  transition: all var(--transition-smooth);
  width: 100%;
}

input:focus, textarea:focus {
  outline: none;
  border-color: var(--primary-500);
  box-shadow: 0 0 0 3px rgba(0, 90, 238, 0.1);
}

.amount-input {
  border: 2px solid var(--neutral-300);
  border-radius: var(--radius-md);
  padding: var(--space-4) var(--space-5);
  font-family: var(--font-headings);
  font-size: 1.25rem;
  font-weight: 600;
  text-align: center;
  background: linear-gradient(135deg, var(--neutral-100) 0%, rgba(255, 255, 255, 0.9) 100%);
  transition: all var(--transition-smooth);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
}

.amount-input:focus {
  border-color: var(--primary-500);
  box-shadow: 0 8px 25px rgba(0, 90, 238, 0.15);
  transform: translateY(-1px);
}

.checkbox-group input[type="checkbox"] {
  width: auto;
  margin: 0;
  width: 18px;
  height: 18px;
  accent-color: var(--primary-500);
}

.security-indicator {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  background: rgba(40, 167, 69, 0.1);
  padding: var(--space-3);
  border-radius: var(--radius-sm);
  color: var(--success);
  font-size: 0.875rem;
  margin: var(--space-6) 0;
}

.payment-methods {
  margin: var(--space-6) 0;
}

.payment-options {
  display: flex;
  gap: var(--space-4);
  margin-top: var(--space-3);
}

.payment-option {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  padding: var(--space-3);
  border: 2px solid var(--neutral-300);
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: all var(--transition-fast);
  flex: 1;
  justify-content: center;
}

.payment-option:hover {
  border-color: var(--primary-500);
}

.payment-option input[type="radio"] {
  margin: 0;
}

.bank-transfer-link {
  text-align: center;
  margin: var(--space-4) 0;
}

.bank-transfer-link a {
  color: var(--primary-500);
  text-decoration: none;
  font-size: 0.875rem;
  transition: color var(--transition-fast);
}

.bank-transfer-link a:hover {
  color: var(--primary-700);
}

/* =====================================================
   SECCIONES MEJORADAS
   ===================================================== */

.section {
  padding: var(--space-8) 0;
}

.section-title {
  text-align: center;
  margin-bottom: var(--space-18);
  position: relative;
  max-width: 800px;
  margin-left: auto;
  margin-right: auto;
  padding-top: 4px; /* Reducido aún más el espaciado superior */
}

.section-title h2 {
  display: inline-block;
  position: relative;
  margin-bottom: var(--space-8);
  margin-top: 8px;
}

.section-title h2::after {
  content: '';
  display: block;
  width: 60px;
  height: 4px;
  background: var(--gradient-primary);
  margin: var(--space-3) auto 0;
  border-radius: 2px;
  opacity: 0.8;
  transition: all var(--transition-smooth);
}

.section-title h2:hover::after {
  width: 80px;
  opacity: 1;
}

.section-title p {
  font-size: 1.125rem;
  max-width: 600px;
  margin: 0 auto;
  color: var(--neutral-700);
}


/* Grid de proyectos */
.projects-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
  gap: var(--space-8);
  margin-top: var(--space-12);
}

/* =====================================================
   CONTRIBUYENTES MEJORADOS
   ===================================================== */

.contributors-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: var(--space-6);
  margin: var(--space-12) 0;
}

.contributor-card {
  background: var(--neutral-100);
  padding: var(--space-6);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-elevated);
  border: 1px solid var(--neutral-300);
  transition: all var(--transition-smooth);
  display: flex;
  align-items: center;
  gap: var(--space-4);
}

.contributor-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-subtle);
}

.contributor-avatar {
  width: 50px;
  height: 50px;
  background: var(--gradient-primary);
  border-radius: var(--radius-full);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--neutral-100);
  font-weight: 600;
  font-size: 1.125rem;
  flex-shrink: 0;
}

.contributor-info {
  flex: 1;
}

.contributor-name {
  font-weight: 600;
  color: var(--neutral-900);
  margin-bottom: var(--space-1);
}

.contributor-amount {
  font-size: 1.125rem;
  font-weight: 700;
  color: var(--primary-500);
  font-family: var(--font-headings);
}

.contributor-date {
  font-size: 0.875rem;
  color: var(--neutral-700);
}

/* =====================================================
   FOOTER MEJORADO
   ===================================================== */

.footer {
  background: var(--neutral-900);
  color: var(--neutral-100);
  padding: var(--space-20) 0 var(--space-12);
  margin-top: var(--space-20);
}

.footer-content {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: var(--space-8);
  margin-bottom: var(--space-12);
}

.footer-section h4 {
  color: var(--neutral-100);
  margin-bottom: var(--space-4);
}

.footer-logo {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  margin-bottom: var(--space-4);
}

.footer-logo i {
  font-size: 1.5rem;
  color: var(--primary-500);
}

.footer-logo span {
  font-family: var(--font-headings);
  font-size: 1.25rem;
  font-weight: 600;
}

.footer-description {
  color: var(--neutral-300);
  margin-bottom: var(--space-6);
}

.footer-social {
  display: flex;
  gap: var(--space-4);
}

.social-link {
  width: 40px;
  height: 40px;
  background: var(--neutral-700);
  color: var(--neutral-100);
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-full);
  text-decoration: none;
  transition: all var(--transition-fast);
}

.social-link:hover {
  background: var(--primary-500);
  transform: translateY(-2px);
}

.contact-info p {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  margin-bottom: var(--space-3);
  color: var(--neutral-300);
}

.contact-info i {
  color: var(--primary-500);
  width: 16px;
}

.footer-links {
  list-style: none;
}

.footer-links li {
  margin-bottom: var(--space-2);
}

.footer-links a {
  color: var(--neutral-300);
  text-decoration: none;
  transition: color var(--transition-fast);
}

.footer-links a:hover {
  color: var(--primary-500);
}

.newsletter-form {
  display: flex;
  gap: var(--space-2);
  margin-top: var(--space-4);
}

.newsletter-form input {
  flex: 1;
  padding: var(--space-3);
  border: 1px solid var(--neutral-700);
  border-radius: var(--radius-sm);
  background: var(--neutral-800);
  color: var(--neutral-100);
}

.newsletter-form input::placeholder {
  color: var(--neutral-500);
}

.footer-bottom {
  border-top: 1px solid var(--neutral-700);
  padding-top: var(--space-6);
  display: flex;
  justify-content: space-between;
  align-items: center;
  color: var(--neutral-300);
  font-size: 0.875rem;
}

.footer-legal {
  display: flex;
  gap: var(--space-6);
}

.footer-legal a {
  color: var(--neutral-300);
  text-decoration: none;
  transition: color var(--transition-fast);
}

.footer-legal a:hover {
  color: var(--primary-500);
}

/* =====================================================
   RESPONSIVE DESIGN
   ===================================================== */

@media (max-width: 768px) {
  .container {
    padding: 0 var(--space-4);
  }
  
  .hero {
    padding: var(--space-12) 0;
    min-height: 500px;
  }
  
  .section {
    padding: var(--space-12) 0;
  }
  
  .counter-amount {
    font-size: 2.5rem;
  }
  
  .counter-stats {
    flex-direction: column;
    gap: var(--space-4);
  }
  
  .donation-amounts {
    grid-template-columns: 1fr;
  }
  
  .payment-options {
    flex-direction: column;
  }
  
  .projects-grid {
    grid-template-columns: 1fr;
    gap: var(--space-6);
  }
  
  .contributors-grid {
    grid-template-columns: 1fr;
  }
  
  .footer-bottom {
    flex-direction: column;
    gap: var(--space-4);
    text-align: center;
  }
  
  .modal-content {
    padding: var(--space-8);
    width: 95%;
  }
}

@media (max-width: 480px) {
  .hero-title {
    font-size: 2rem;
  }
  
  .hero-subtitle {
    font-size: 1rem;
  }
  
  .main-counter {
    margin: var(--space-8) auto;
    padding: var(--space-6);
  }
  
  .counter-amount {
    font-size: 2rem;
  }
  
  .btn {
    width: 100%;
    justify-content: center;
  }
  
  .contributor-card {
    flex-direction: column;
    text-align: center;
  }
  
  .contributor-avatar {
    margin-bottom: var(--space-2);
  }
  
  .section-title {
    text-align: center;
    margin-bottom: var(--space-16);
    padding: 8px 0;
  }

  .section-title h2 {
    margin-bottom: var(--space-8);
    margin-top: 8px;
  }
}

/* =====================================================
   UTILIDADES
   ===================================================== */

.text-center { text-align: center; }
.text-left { text-align: left; }
.text-right { text-align: right; }

.mb-0 { margin-bottom: 0; }
.mb-2 { margin-bottom: var(--space-2); }
.mb-4 { margin-bottom: var(--space-4); }
.mb-6 { margin-bottom: var(--space-6); }
.mb-8 { margin-bottom: var(--space-8); }

.mt-0 { margin-top: 0; }
.mt-2 { margin-top: var(--space-2); }
.mt-4 { margin-top: var(--space-4); }
.mt-6 { margin-top: var(--space-6); }
.mt-8 { margin-top: var(--space-8); }

.hidden { display: none; }
.visible { display: block; }

/* =====================================================
   ANIMACIONES DE SCROLL
   ===================================================== */

.animate-on-scroll {
  opacity: 0;
  transform: translateY(30px);
  transition: all 0.6s ease-out;
}

.animate-on-scroll.animate {
  opacity: 1;
  transform: translateY(0);
}

/* Loading spinner */
.spinner {
  border: 3px solid var(--neutral-300);
  border-top: 3px solid var(--primary-500);
  border-radius: var(--radius-full);
  width: 30px;
  height: 30px;
  animation: spin 1s linear infinite;
  margin: 0 auto;
}

/* Estilos específicos para la sección final de llamada a la acción */
.cta-final {
  padding: calc(var(--space-20) + var(--space-12)) 0 calc(var(--space-20) + var(--space-12)) !important;
}

@media (max-width: 767px) {
  .cta-final {
    padding: calc(var(--space-12) + var(--space-10)) 0 calc(var(--space-12) + var(--space-10)) !important;
  }
}

@keyframes spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}