/* Sporvit Enhanced - CSS Styles - Vertical Sections */

/* Prevenir scroll horizontal */
html, body {
    overflow-x: hidden;
    max-width: 100vw;
}

* {
    max-width: 100%;
}

* Font display optimization */
@font-face {
  font-family: 'Inter';
  font-display: swap;
  font-style: normal;
  font-weight: 400 700;
  src: url('https://fonts.gstatic.com/s/inter/v13/UcCO3FwrK3iLTeHuS_fvQtMwCp50KnMw2boKoduKmMEVuLyeMZhrib2Bg-4.woff2') format('woff2');
}

/* Fallback font stack mejorado */
:root {
    --font-family: 'Inter', system-ui, -apple-system, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    /* resto de variables... */
}

/* ===== RESET Y VARIABLES ===== */
*, *::before, *::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    /* Colores principales */
    --primary-50: #f0f9ff;
    --primary-100: #e0f2fe;
    --primary-400: #38bdf8;
    --primary-500: #0ea5e9;
    --primary-600: #0284c7;
    --primary-700: #0369a1;
    
    /* Grises neutros */
    --gray-50: #f9fafb;
    --gray-100: #f3f4f6;
    --gray-200: #e5e7eb;
    --gray-300: #d1d5db;
    --gray-400: #9ca3af;
    --gray-500: #6b7280;
    --gray-600: #4b5563;
    --gray-700: #374151;
    --gray-800: #1f2937;
    --gray-900: #111827;
    
    /* Estados */
    --success: #10b981;
    --warning: #f59e0b;
    --error: #ef4444;
    
    /* Tipografía */
    --font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    --font-size-xs: 0.75rem;
    --font-size-sm: 0.875rem;
    --font-size-base: 1rem;
    --font-size-lg: 1.125rem;
    --font-size-xl: 1.25rem;
    --font-size-2xl: 1.5rem;
    --font-size-3xl: 1.875rem;
    --font-size-4xl: 2.25rem;
    --font-size-5xl: 3rem;
    --font-size-6xl: 3.75rem;
    
    /* Espaciado */
    --space-1: 0.25rem;
    --space-2: 0.5rem;
    --space-3: 0.75rem;
    --space-4: 1rem;
    --space-5: 1.25rem;
    --space-6: 1.5rem;
    --space-8: 2rem;
    --space-10: 2.5rem;
    --space-12: 3rem;
    --space-16: 4rem;
    --space-20: 5rem;
    --space-24: 6rem;
    
    /* Bordes y sombras */
    --radius-sm: 0.375rem;
    --radius-md: 0.5rem;
    --radius-lg: 0.75rem;
    --radius-xl: 1rem;
    --radius-2xl: 1.5rem;
    
    --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);
    --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
    --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);
    --shadow-xl: 0 20px 25px -5px rgb(0 0 0 / 0.1), 0 8px 10px -6px rgb(0 0 0 / 0.1);
    
    /* Transiciones */
    --transition-fast: 150ms ease;
    --transition-normal: 200ms ease;
    --transition-slow: 300ms ease;
}

/* ===== BASE STYLES ===== */
html {
    scroll-behavior: smooth;
    font-size: 108%;
}

body {
    font-family: 'Inter', system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    font-size: var(--font-size-base);
    line-height: 1.6;
    color: var(--gray-700);
    background-color: white;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* Container System */
.container {
    width: 100%;
    max-width: none;
    margin: 0 auto;
    padding-left: 0;
    padding-right: 0;
}

/* ===== COMPONENTES REUTILIZABLES ===== */

/* Botones */
.btn {
    display: inline-flex;
    align-items: center;
    gap: var(--space-2);
    padding: var(--space-3) var(--space-6);
    font-size: var(--font-size-sm);
    font-weight: 500;
    line-height: 1;
    border-radius: var(--radius-lg);
    border: 1px solid transparent;
    cursor: pointer;
    text-decoration: none;
    transition: all var(--transition-normal);
    white-space: nowrap;
}
.btn svg {
    flex-shrink: 0;
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary-500), var(--primary-600));
    color: white;
    border-color: var(--primary-600);
    box-shadow: var(--shadow-sm);
    position: relative;
    overflow: hidden;
}
.btn-primary::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: left 0.6s ease;
}

.btn-primary:hover::before {
    left: 100%;
}

.btn-primary:hover {
    background: linear-gradient(135deg, var(--primary-600), var(--primary-700));
    box-shadow: var(--shadow-md);
    transform: translateY(-1px);
    color: white; /* Forzar color blanco en hover */
}

/* También asegurar que el color se mantenga en focus */
.btn-primary:focus {
    color: white;
}

/* Y en estado active */
.btn-primary:active {
    color: white;
}

/* Focus visible mejorado para accesibilidad */
.btn:focus-visible,
.form-input:focus-visible,
.nav-link:focus-visible {
    outline: 2px solid rgba(255, 255, 255, 0.8);
    outline-offset: 2px;
}

/* ===== NAVEGACIÓN ===== */
.nav {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    width: 100%;
    background: rgba(0, 0, 0, 0.95); /* Era: background: transparent; */
    backdrop-filter: blur(10px); /* AGREGAR blur para mejor UX */
    z-index: 1000;
    transition: all 0.3s ease;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.nav.scrolled {
    background: rgba(0, 0, 0, 0.98);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.nav-container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 70px;
    max-width: min(1280px, 100vw);
    margin: 0 auto;
    padding: 0 clamp(0.75rem, 4vw, 1.5rem);
    width: 100%;
}

.nav-brand {
    display: flex;
}

.brand-link {
    display: flex;
    align-items: center;
    gap: var(--space-2);
    text-decoration: none;
    color: var(--gray-900);
    font-weight: 600;
    font-size: var(--font-size-lg);
}

.brand-logo img {
    width: 120px;
    height: auto;
    display: block;
    filter: brightness(0) invert(1);
}

.nav-menu {
    display: flex;
    align-items: center;
    gap: var(--space-8);
    background: transparent;
    margin-left: auto;
}

.nav-link {
    color: rgba(255, 255, 255, 0.95);
    text-decoration: none;
    font-weight: 500;
    transition: all var(--transition-fast);
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.6);
    position: relative;
}

.nav-link:hover {
    color: white;
    transform: translateY(-1px);
    text-shadow: 0 3px 6px rgba(0, 0, 0, 0.8);
}

/* Agregar indicador visual para mejor UX */
.nav-link::after {
    content: '';
    position: absolute;
    bottom: -8px;
    left: 50%;
    width: 0;
    height: 2px;
    background: white;
    transition: all 0.3s ease;
    transform: translateX(-50%);
}

.nav-link:hover::after {
    width: 100%;
}

.nav-toggle {
    display: none;
    flex-direction: column;
    gap: 4px;
    background: none;
    border: none;
    cursor: pointer;
    padding: var(--space-2);
}

.nav-toggle span {
    width: 20px;
    height: 2px;
    background: white;
    transition: all var(--transition-normal);
}

.nav-toggle.active span:nth-child(1) {
    transform: rotate(45deg) translate(5px, 5px);
}

.nav-toggle.active span:nth-child(2) {
    opacity: 0;
}

.nav-toggle.active span:nth-child(3) {
    transform: rotate(-45deg) translate(7px, -6px);
}

.social-icons-nav a {
    color: rgba(255, 255, 255, 0.7);
    opacity: 0.8;
    background: transparent;
    display: flex;
    align-items: center;
    
}

.social-icons-nav a:hover {
    opacity: 1;
    transform: translateY(-2px);
    background: rgba(255, 255, 255, 0.15);
}

.social-icons-nav svg {
    display: block;
}



/* ===== HERO SECTION ===== */
.hero {
    padding-top: 0px;
    background: #f8f9fa; /* Cambio de degradado azul a gris claro */
    min-height: 100vh;
    display: flex;
    align-items: center; 
    position: relative;
}
.hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-image: 
        radial-gradient(circle at 25% 25%, rgba(14, 165, 233, 0.05) 0%, transparent 50%),
        radial-gradient(circle at 75% 75%, rgba(14, 165, 233, 0.05) 0%, transparent 50%);
    pointer-events: none;
    z-index: 1;
}

.hero-container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--space-16);
    align-items: center;
    max-width: 1280px; /* Mismo que section-content */
    margin: 0 auto;
    padding: var(--space-8) var(--space-6);
    width: 100%;
    position: relative;
    z-index: 2;
}

.hero-content {
    max-width: 600px;
}

.hero-badge {
    display: inline-flex;
    align-items: center;
    gap: var(--space-2);
    padding: var(--space-1) var(--space-4);
    background: var(--primary-500);
    color: white;
    border-radius: var(--radius-2xl);
    font-size: var(--font-size-sm);
    font-weight: 500;
    margin-bottom: var(--space-4); /* Era: margin-bottom: var(--space-6); */
    border: 1px solid var(--primary-100);
}

.hero-title {
    font-size: var(--font-size-6xl);
    font-weight: 800;
    line-height: 1.1;
    color: var(--gray-900); /* Cambiar de blanco a gris oscuro */
    margin-bottom: var(--space-6);
}

.hero-accent {
    background: linear-gradient(135deg, var(--primary-500), var(--primary-600));
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.hero-subtitle {
    font-size: var(--font-size-xl);
    font-weight: 600;
    color: var(--gray-700); /* Cambiar de blanco a gris medio-oscuro */
    margin-bottom: var(--space-4);
}

.hero-description {
    font-size: var(--font-size-lg);
    color: var(--gray-600); /* Cambiar de blanco a gris medio */
    margin-bottom: var(--space-8);
    line-height: 1.7;
}

.hero-actions {
    display: flex;
    justify-content: center;
    gap: var(--space-4);
    margin-bottom: var(--space-10);
    flex-wrap: wrap;
}
/* Ajustar botón para mejor contraste en fondo claro */
.hero-actions .btn-primary {
    background: linear-gradient(135deg, var(--primary-600), var(--primary-700));
    color: #fff;
    border-color: var(--primary-700);
    box-shadow: var(--shadow-lg);
    transform: translateY(0);
    transition: transform 0.25s ease, box-shadow 0.25s ease;
}
.hero-actions .btn-primary:hover {
    transform: translateY(-3px) scale(1.03);
    box-shadow: 0 6px 18px rgba(0,0,0,0.25);
}

/* Hero Visual */
.hero-visual {
    display: flex;
    justify-content: center;
    align-items: center;
    max-width: 600px;
    margin: 0 auto;
    position: relative;
    z-index: 10;
    padding: 2rem;
}

.hero-card {
    background: white;
    padding: var(--space-8);
    border-radius: var(--radius-2xl);
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 8px 10px -6px rgba(0, 0, 0, 0.1); /* Sombra más prominente */
    border: 1px solid var(--gray-200);
    max-width: 400px;
    width: 100%;
}

.card-header {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: var(--space-2);
    margin-bottom: var(--space-6);
}

.trainer-avatar {
    width: 120px;
    height: 120px;
    border-radius: 50%;
    overflow: hidden;
    border: 2px solid white;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
    flex-shrink: 0;
    background-color: var(--gray-100);
}

.trainer-icon {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    display: block;
}

.hero-card h3 {
    font-size: var(--font-size-xl);
    font-weight: 700;
    color: var(--gray-900);
    margin: var(--space-2) 0;
}

.hero-card p {
    color: var(--gray-600);
    margin-bottom: var(--space-6);
    font-size: var(--font-size-sm);
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: var(--space-4);
    margin-bottom: var(--space-6);
}

.stat {
    text-align: center;
}

.stat-number {
    font-size: var(--font-size-lg);
    font-weight: 700;
    color: var(--gray-900);
    display: block;
}

.stat-label {
    font-size: var(--font-size-xs);
    color: var(--gray-500);
    margin-top: var(--space-1);
    display: block;
}

.capabilities {
    display: flex;
    gap: var(--space-2);
    justify-content: center;
    flex-wrap: wrap;
}

.capability {
    padding: var(--space-1) var(--space-3);
    background: var(--gray-100);
    color: var(--gray-600);
    border-radius: var(--radius-md);
    font-size: var(--font-size-xs);
    font-weight: 500;
}

/* Indicador de scroll para hero */
.scroll-indicator {
    position: absolute;
    bottom: 2rem;
    left: 50%;
    transform: translateX(-50%);
    color: var(--gray-500); /* Cambiar de blanco a gris para contraste */
    animation: bounce 2s infinite;
    cursor: pointer;
}
/* Mejorar visibilidad del scroll indicator */
.scroll-indicator:hover {
    color: var(--primary-600);
}

@keyframes bounce {
    0%, 20%, 50%, 80%, 100% {
        transform: translateX(-50%) translateY(0);
    }
    40% {
        transform: translateX(-50%) translateY(-10px);
    }
    60% {
        transform: translateX(-50%) translateY(-5px);
    }
}

/* ===== SECCIONES PRINCIPALES ===== */

/* Section Base Styles */
.coach-section,
.calculators-section,
.nutrition-section,
.knowledge-section,
.calendar-section {
    width: 100%;
    padding: var(--space-12) 0; /* Reducir de 6rem a 3rem */
}

/* Fondos alternados */
.coach-section {
    background: #f8f9fa;
}

.calculators-section {
  background: white;
}

.nutrition-section {
    background: var(--gray-50);
}

.knowledge-section {
    background: var(--gray-50);
}

/* Content Layout */
.section-content {
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 var(--space-6);
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--space-16);
    align-items: center;
}

/* Alternar orden en secciones pares */
.calculators-section .section-content,
.knowledge-section .section-content {
    grid-template-areas: "info visual";
}

.calculators-section .section-info,
.knowledge-section .section-info {
    grid-area: info;
}

.calculators-section .section-visual,
.knowledge-section .section-visual {
    grid-area: visual;
}

/* Knowledge: visual izquierda, texto derecha */
.knowledge-section .section-content {
  grid-template-areas: "visual info";
}

.knowledge-section .section-visual { grid-area: visual; }
.knowledge-section .section-info   { grid-area: info; }

.section-info {
    max-width: 600px;
}

.section-title {
    font-size: var(--font-size-4xl);
    font-weight: 700;
    color: var(--gray-900);
    margin-bottom: var(--space-4);
    line-height: 1.2;
}

.section-subtitle {
    font-size: var(--font-size-xl);
    font-weight: 600;
    color: var(--gray-600);
    margin-bottom: var(--space-4);
}

.section-description {
    font-size: var(--font-size-lg);
    color: var(--gray-600);
    margin-bottom: var(--space-8);
    line-height: 1.7;
}

.stat-badge {
    display: inline-flex;
    align-items: center;
    gap: var(--space-2);
    padding: var(--space-2) var(--space-4);
    background: var(--primary-50);
    color: var(--primary-600);
    border-radius: var(--radius-2xl);
    font-size: var(--font-size-sm);
    font-weight: 500;
    margin-bottom: var(--space-6);
    border: 1px solid var(--primary-100);
}

/* ===== CALENDARIO SECTION ===== */
/* Agregar después de nutrition-section y antes de knowledge-section */

.calendar-section {
    background: white;
    width: 100%;
    padding: var(--space-12) 0; /* Consistent with other sections */
}

/* Calendar Visual Styles */
.calendar-visual {
    display: flex;
    justify-content: center;
    align-items: center;
}

.calendar-display {
    background: white;
    border-radius: var(--radius-2xl);
    padding: var(--space-6);
    border: 2px solid var(--gray-200);
    box-shadow: var(--shadow-lg);
    max-width: 320px;
    width: 100%;
    transition: transform 0.3s ease;
}

.calendar-display:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-xl);
}

.calendar-header {
    text-align: center;
    margin-bottom: var(--space-4);
    padding-bottom: var(--space-3);
    border-bottom: 1px solid var(--gray-200);
}

.month-year {
    font-size: var(--font-size-lg);
    font-weight: 600;
    color: var(--gray-900);
}

.calendar-grid {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: var(--space-2);
    margin-bottom: var(--space-4);
}

.calendar-day {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: var(--space-2);
    border-radius: var(--radius-md);
    position: relative;
    transition: all 0.2s ease;
    cursor: pointer;
    min-height: 40px;
}

.calendar-day:hover {
    background: var(--gray-50);
}

.calendar-day.active {
    background: var(--primary-500);
    color: white;
}

.calendar-day.active:hover {
    background: var(--primary-600);
}

.day-number {
    font-size: var(--font-size-sm);
    font-weight: 500;
    margin-bottom: var(--space-1);
}

.event-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--primary-500);
    opacity: 0.6;
}

.event-dot.active {
    background: white;
    opacity: 1;
}

.upcoming-event {
    background: var(--gray-50);
    padding: var(--space-3);
    border-radius: var(--radius-lg);
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-left: 3px solid var(--primary-500);
}

.event-title {
    font-size: var(--font-size-sm);
    font-weight: 600;
    color: var(--gray-900);
}

.event-date {
    font-size: var(--font-size-xs);
    color: var(--primary-600);
    font-weight: 500;
    background: white;
    padding: var(--space-1) var(--space-2);
    border-radius: var(--radius-sm);
}

/* Responsive adjustments para calendar */
@media (max-width: 768px) {
    .calendar-display {
        max-width: 280px;
        padding: var(--space-4);
    }
    
    .calendar-grid {
        gap: var(--space-1);
    }
    
    .calendar-day {
        min-height: 35px;
        padding: var(--space-1);
    }
    
    .upcoming-event {
        flex-direction: column;
        align-items: flex-start;
        gap: var(--space-1);
    }
}

/* ===== VISUAL ELEMENTS ===== */

/* Calculator Visual */
.calc-visual {
    display: flex;
    justify-content: center;
    align-items: center;
    perspective: 1000px;
}

.calc-display {
    background: white;
    border-radius: var(--radius-2xl);
    padding: var(--space-8);
    border: 2px solid var(--gray-200);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: var(--space-2);
    box-shadow: var(--shadow-lg);
    transform: rotateX(10deg) rotateY(-5deg);
    transition: transform 0.3s ease;
    max-width: min(300px, calc(100vw - 3rem));
}

.calc-display:hover {
    transform: rotateX(0deg) rotateY(0deg);
}

.calc-label {
    font-size: var(--font-size-sm);
    color: var(--gray-500);
    font-weight: 500;
}

.calc-value {
    font-size: var(--font-size-5xl);
    font-weight: 800;
    color: var(--primary-600);
}

.calc-unit {
    font-size: var(--font-size-sm);
    color: var(--gray-500);
}

/* Nutrition Chart */
.nutrition-visual {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 300px; /* Asegurar altura mínima */
}

.nutrition-chart {
    display: flex;
    align-items: flex-end; /* Cambiar de 'end' a 'flex-end' para mejor compatibilidad */
    justify-content: center;
    gap: 2rem;
    height: 200px; /* Altura fija específica */
    width: min(320px, calc(100vw - 3rem));
    max-width: 100%;
    padding: var(--space-6);
    background: white;
    border-radius: var(--radius-2xl);
    border: 2px solid var(--gray-200);
    box-shadow: var(--shadow-lg);
    position: relative;
    transition: transform 0.3s ease;
}

.nutrition-chart:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-xl);
}

.chart-bar {
    background: linear-gradient(to top, var(--primary-500), var(--primary-400));
    border-radius: var(--radius-sm) var(--radius-sm) 0 0;
    width: 50px; /* Aumentar ancho de las barras */
    position: relative;
    transition: all 0.3s ease;
    animation: growUp 1.5s ease-out forwards;
    transform-origin: bottom;
    min-height: 20px; /* Altura mínima visible */
    height: 0; /* inicia en cero */
    flex: 1;
    max-width: 100px; /* evita que sean demasiado anchas */
    position: relative;
}

.chart-bar:hover {
    background: linear-gradient(to top, var(--primary-600), var(--primary-500));
    transform: scaleY(1.05);
}

.chart-bar span {
    position: absolute;
    bottom: -35px; /* Más espacio para el texto */
    left: 50%;
    transform: translateX(-50%);
    font-size: var(--font-size-xs);
    white-space: nowrap;
    color: var(--gray-600);
    font-weight: 500;
    text-align: center;
    width: 80px; /* Ancho fijo para el texto */
    top: 100%;
    margin-top: 0.5rem;
}

/* Animación mejorada */
@keyframes growUp {
    from { 
        height: 0;
        opacity: 0;
    }
    to { 
        height: var(--final-height);
        opacity: 1;
    }
}


/* Responsive para nutrition chart */
@media (max-width: 768px) {
    .nutrition-visual {
        min-height: 250px;
    }
    
    .nutrition-chart {
        height: 200px;
        width: 280px;
        padding: var(--space-4);
        gap: var(--space-3);
    }
    
    .chart-bar {
        width: 40px;
    }
    
    .chart-bar span {
        bottom: -30px;
        font-size: 10px;
        width: 60px;
    }
}

@media (max-width: 640px) {
    .nutrition-chart {
        height: 180px;
        width: 240px;
        padding: var(--space-3);
    }
    
    .chart-bar {
        width: 35px;
    }
}

/* Knowledge Articles Stack */
.knowledge-visual {
    display: flex;
    justify-content: center;
    align-items: center;
}

.article-stack {
    position: relative;
    width: 250px;
    height: 160px;
}

.article-card {
    position: absolute;
    width: 100%;
    height: 120px;
    background: white;
    border-radius: var(--radius-lg);
    border: 1px solid var(--gray-200);
    box-shadow: var(--shadow-md);
    transition: transform 0.3s ease;
}

.article-card:nth-child(1) {
    transform: translateY(0) rotate(-2deg);
    z-index: 3;
}

.article-card:nth-child(2) {
    transform: translateY(20px) rotate(1deg);
    z-index: 2;
    opacity: 0.8;
}

.article-card:nth-child(3) {
    transform: translateY(40px) rotate(-1deg);
    z-index: 1;
    opacity: 0.6;
}

.knowledge-section:hover .article-card:nth-child(1) {
    transform: translateY(-10px) rotate(0deg);
}

.knowledge-section:hover .article-card:nth-child(2) {
    transform: translateY(15px) rotate(0deg);
}

.knowledge-section:hover .article-card:nth-child(3) {
    transform: translateY(35px) rotate(0deg);
}

/* ===== NEWSLETTER SECTION ===== */
.newsletter {
    padding: var(--space-24) 0;
    background: var(--primary-600);
    color: white;
    width: 100%;
}

.newsletter .container {
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 var(--space-6);
    width: 100%;
}

.newsletter-content {
    text-align: center;
    max-width: 600px;
    margin: 0 auto;
}

.newsletter h2 {
    font-size: var(--font-size-3xl);
    font-weight: 700;
    color: white;
    margin-bottom: var(--space-4);
}

.newsletter p {
    font-size: var(--font-size-lg);
    color: rgba(255, 255, 255, 0.8);
    margin-bottom: var(--space-8);
}

/* ===== MEJORA CRÍTICA 3: ESTADOS DE CARGA MEJORADOS ===== */
.newsletter-form {
    margin-bottom: var(--space-12);
    position: relative;
}

.form-group {
    display: flex;
    gap: var(--space-3);
    max-width: 500px;
    margin: 0 auto;
    position: relative;
}

.form-input {
    flex: 1;
    padding: var(--space-4);
    border: 2px solid rgba(255, 255, 255, 0.2); /* Border más visible */
    border-radius: var(--radius-lg);
    font-size: var(--font-size-base);
    background: rgba(255, 255, 255, 0.1);
    color: white;
    transition: all var(--transition-normal);
    backdrop-filter: blur(10px);
}

.form-input:focus {
    outline: none;
    border-color: rgba(255, 255, 255, 0.5);
    box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.1);
    background: rgba(255, 255, 255, 0.15);
}

.form-input::placeholder {
    color: rgba(255, 255, 255, 0.7);
}
/* Estados del botón de suscripción */
.btn-newsletter {
    position: relative;
    overflow: hidden;
    min-width: 140px;
    transition: all 0.3s ease;
}

.btn-newsletter:disabled {
    opacity: 0.7;
    cursor: not-allowed;
    transform: none !important;
}

.btn-newsletter.loading {
    color: transparent;
}

.btn-newsletter.loading::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 20px;
    height: 20px;
    margin: -10px 0 0 -10px;
    border: 2px solid transparent;
    border-top: 2px solid white;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

.btn-newsletter.success {
    background: var(--success) !important;
    border-color: var(--success) !important;
}

.btn-newsletter.error {
    background: var(--error) !important;
    border-color: var(--error) !important;
    animation: shake 0.5s ease-in-out;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

@keyframes shake {
    0%, 100% { transform: translateX(0); }
    25% { transform: translateX(-5px); }
    75% { transform: translateX(5px); }
}

/* Mensaje de feedback */
.feedback-message {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    margin-top: var(--space-2);
    padding: var(--space-2) var(--space-4);
    border-radius: var(--radius-md);
    font-size: var(--font-size-sm);
    text-align: center;
    opacity: 0;
    transform: translateY(-10px);
    transition: all 0.3s ease;
    pointer-events: none;
}

.feedback-message.show {
    opacity: 1;
    transform: translateY(0);
}

.feedback-message.success {
    background: rgba(16, 185, 129, 0.2);
    border: 1px solid rgba(16, 185, 129, 0.3);
    color: rgb(16, 185, 129);
}

.feedback-message.error {
    background: rgba(239, 68, 68, 0.2);
    border: 1px solid rgba(239, 68, 68, 0.3);
    color: rgb(239, 68, 68);
}

/***** Social Links **********/
.social-links {
    text-align: center;
    margin-top: 2rem;
}

.social-links p {
    color: rgba(255, 255, 255, 0.7);
    margin-bottom: 0.75rem;
}

.social-icons-nav {
    display: flex;
    align-items: center;
    gap: var(--space-4); /* Gap va aquí para separar iconos */
    margin-left: auto; /* Empujar todo el grupo a la derecha */
}

.social-icons a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: var(--gray-800);
    color: var(--gray-400);
    text-decoration: none;
    transition: all 0.3s ease;
}

.social-icons a:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 18px rgba(59, 130, 246, 0.3);
    background: var(--primary-500);
    color: white;
}

.social-icons svg {
    width: 20px;
    height: 20px;
    display: block;
}

/* ===== FOOTER ===== */
.footer {
    background: var(--gray-800);
    color: #f8fafc;
    padding: 2rem 1rem;
}

.footer-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1.25rem;
    text-align: center;
}

.footer-brand .brand-logo {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: inherit;
    text-decoration: none;
    font-weight: 700;
    font-size: 1.25rem;
}

.footer-brand img {
    filter: brightness(0) invert(1);
}

.footer-links ul {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    gap: 1.5rem;
    flex-wrap: wrap;
    justify-content: center;
}

.footer-links a {
    color: #cbd5e1;
    text-decoration: none;
    font-size: 0.95rem;
    transition: color 0.3s;
}

.footer-links a:hover {
    color: #3b82f6;
}

.footer-bottom {
    margin-top: 1.5rem;
    font-size: 0.875rem;
    color: #94a3b8;
    text-align: center;
}

/* ===== RESPONSIVE DESIGN ===== */
@media (max-width: 1024px) {
    .hero-container,
    .section-content {
        grid-template-columns: 1fr;
        gap: var(--space-12);
        text-align: center;
    }
    
    .hero-title {
        font-size: var(--font-size-5xl);
    }
    
    .section-title {
        font-size: var(--font-size-3xl);
    }
}

@media (max-width: 768px) {
   .hero {
        background: #f8f9fa; /* Mantener gris en mobile */
        min-height: 100vh;
        padding: var(--space-16) 0 var(--space-8) 0;
    }    

   .hero-container {
        display: flex;
        flex-direction: column;
        gap: var(--space-12);
        text-align: center;
        padding: 0 var(--space-4); /* Usar padding consistente */
        max-width: none;
    }

    .container {
        padding-left: var(--space-4);
        padding-right: var(--space-4);
    }
    
    .nav-menu {
        position: fixed;
        top: 70px;
        left: 0;
        right: 0;
        background: rgba(0, 0, 0, 0.98); /* Más opaco para mobile */
        backdrop-filter: blur(20px);
        flex-direction: column;
        gap: var(--space-6); /* Más espacio entre links */
        padding: var(--space-8) var(--space-6);
        transform: translateY(-100%);
        transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1); /* Transición más suave */
        visibility: hidden;
        opacity: 0;
        border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    }
    
    .nav-menu.active {
        transform: translateY(0);
        visibility: visible;
        opacity: 1;
    }

   .nav-link {
        font-size: var(--font-size-lg); /* Más grande en mobile */
        padding: var(--space-3) 0;
        text-align: center;
        border-bottom: 1px solid rgba(255, 255, 255, 0.1);
        width: 100%;
    }
    
    .nav-link:last-child {
        border-bottom: none;
    }
    
    .nav-toggle {
        display: flex;
        z-index: 1001;
    }
    
    .social-icons-nav {
        margin-left: 0;
        margin-top: 1rem;
        justify-content: center;
    }    
    
    .hero-content {
        order: 1;
        max-width: none;
    }
    
    .hero-visual {
        order: 2;
        padding: var(--space-4);
    }
    
    .hero-title {
        font-size: var(--font-size-4xl);
        line-height: 1.2;
        margin-bottom: var(--space-4);
    }
    
    .hero-subtitle {
        font-size: var(--font-size-lg);
        margin-bottom: var(--space-3);
    }
    
    .hero-description {
        font-size: var(--font-size-base);
        line-height: 1.6;
        margin-bottom: var(--space-6);
    }
    
    .coach-section,
    .calculators-section,
    .nutrition-section,
    .calendar-section, 
    .knowledge-section {
        padding: var(--space-8) 0; /* Aún menos padding en mobile */
    }
    
    /* SECCIONES RESPONSIVE MEJORADAS */
    .section-content {
        display: flex;
        flex-direction: column;
        gap: var(--space-8);
        text-align: center;
        padding: 0 var(--space-4);
        max-width: min(1280px, 100vw);
        margin: 0 auto;
        padding: 0 clamp(0.75rem, 4vw, 1.5rem);
    }
    
    .section-info {
        order: 1;
        max-width: none;
    }
    /* Asegurar que section-visual siempre vaya segundo */
    .section-visual {
        order: 2;
    }
    
    .section-title {
        font-size: var(--font-size-2xl);
        line-height: 1.3;
    }
    
    .section-subtitle {
        font-size: var(--font-size-lg);
    }
    
    .section-description {
        font-size: var(--font-size-base);
        line-height: 1.6;
    }
    
    .trainer-avatar-large {
        width: 200px;
        height: 200px;
    }
    
    .calc-display {
        max-width: 250px;
        padding: var(--space-6);
    }
    
    .calc-value {
        font-size: var(--font-size-4xl);
    }
    
    .nutrition-chart {
        height: 150px;
        padding: var(--space-4);
    }
    
    .chart-bar {
        width: 30px;
    }
    
    .article-stack {
        width: 200px;
        height: 120px;
    }
    
    .article-card {
        height: 80px;
    }
    
    .form-group {
        flex-direction: column;
    }
    
    .footer-links ul {
        flex-direction: column;
        gap: 1rem;
    }
}


@media (max-width: 640px) {  
.hero {
   padding-top: var(--space-8);
   padding-bottom: var(--space-6);
}
    .hero-container,
    .section-content {
        gap: var(--space-6);
        padding: 0 var(--space-3);
    }
    
    .hero-title {
        font-size: var(--font-size-3xl);
    }
    
    .hero-card {
        padding: var(--space-4);
        margin: 0 var(--space-2);
    }
    
    .section-content {
        padding: 0 var(--space-3);
        gap: var(--space-6);
    }

    
    .section-title {
        font-size: var(--font-size-xl);
    }
    
    
    
    .trainer-avatar {
        width: 80px;
        height: 80px;
    }
    
    .trainer-avatar-large {
        width: 150px;
        height: 150px;
    }
}
