/* ===== RESPONSIVE DESIGN - MOBILE FIRST ===== */

/* ===== BASE MOBILE STYLES ===== */
.container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* ===== NAVEGACIÓN RESPONSIVE ===== */
.hero-nav {
    padding: var(--spacing-md) var(--spacing-sm);
}

.nav-actions {
    gap: var(--spacing-xs);
}

.nav-actions .btn-primary,
.nav-actions .btn-secondary {
    padding: 8px 16px;
    font-size: 14px;
}

/* ===== HERO RESPONSIVE ===== */
.hero-content {
    padding: var(--spacing-xl) var(--spacing-sm);
    gap: var(--spacing-lg);
    text-align: center;
}

.hero-text {
    order: 1;
}

.hero-visual {
    order: 2;
}

.hero-actions {
    flex-direction: column;
    gap: var(--spacing-sm);
}

.hero-actions .btn-large {
    width: 100%;
    justify-content: center;
}

/* ===== CARACTERÍSTICAS RESPONSIVE ===== */
.features-grid {
    grid-template-columns: 1fr;
    gap: var(--spacing-lg);
}

/* ===== ESTADÍSTICAS RESPONSIVE ===== */
.stats-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: var(--spacing-lg);
}


/* ===== TABLET BREAKPOINT ===== */
@media (min-width: 768px) {
    .container {
        padding: 0 32px;
    }

    /* Navegación */
    .hero-nav {
        padding: var(--spacing-lg) var(--spacing-xl);
    }
    
    .nav-actions .btn-primary,
    .nav-actions .btn-secondary {
        padding: 12px 24px;
        font-size: 14px;
    }

    /* Hero Section */
    .hero-content {
        padding: var(--spacing-xxl) var(--spacing-xl);
        gap: var(--spacing-xxl);
    }
    
    .hero-actions {
        flex-direction: row;
        gap: var(--spacing-md);
    }
    
    .hero-actions .btn-large {
        width: auto;
    }

    /* Características */
    .features-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: var(--spacing-xl);
    }

    /* Estadísticas */
    .stats-grid {
        grid-template-columns: repeat(4, 1fr);
    }

}

/* ===== DESKTOP BREAKPOINT ===== */
@media (min-width: 1024px) {
    .container {
        padding: 0 40px;
    }

    /* Hero Section */
    .hero-content {
        grid-template-columns: 1fr 1fr;
        align-items: center;
        text-align: left;
        gap: var(--spacing-xxl);
    }
    
    .hero-text {
        order: 1;
    }
    
    .hero-visual {
        order: 2;
    }

    /* Características */
    .features-grid {
        grid-template-columns: repeat(4, 1fr);
        gap: var(--spacing-xl);
    }

    /* Navegación mejorada */
    .hero-nav {
        padding: var(--spacing-lg) var(--spacing-xxl);
    }

    /* Testimonios */
    .testimonials-carousel {
        max-width: 900px;
    }
}

/* ===== LARGE DESKTOP BREAKPOINT ===== */
@media (min-width: 1440px) {
    .container {
        max-width: 1400px;
        padding: 0 60px;
    }

    /* Hero mejorado */
    .hero-content {
        gap: 80px;
    }
    
    .hero-title {
        font-size: 4.5rem;
    }

    /* Espaciado mejorado */
    .features-section,
    .stats-section,
    .testimonials-section {
        padding: 120px 0;
    }
}

/* ===== BREAKPOINT EXTRA LARGE ===== */
@media (min-width: 1920px) {
    .container {
        max-width: 1600px;
    }
    
    .hero-title {
        font-size: 5rem;
    }
}

/* ===== ORIENTACIÓN LANDSCAPE EN MÓVILES ===== */
@media (max-width: 768px) and (orientation: landscape) {
    .hero-section {
        min-height: auto;
        padding: var(--spacing-lg) 0;
    }
    
    .hero-content {
        padding: var(--spacing-lg) var(--spacing-sm);
    }
    
    .hero-title {
        font-size: 2rem;
    }
}

/* ===== TABLETS EN ORIENTACIÓN PORTRAIT ===== */
@media (min-width: 768px) and (max-width: 1024px) and (orientation: portrait) {
    .hero-content {
        grid-template-columns: 1fr;
        text-align: center;
    }
    
    .features-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* ===== AJUSTES PARA PANTALLAS PEQUEÑAS ===== */
@media (max-width: 480px) {
    .container {
        padding: 0 16px;
    }

    /* Navegación compacta */
    .hero-nav {
        padding: var(--spacing-sm);
    }
    
    .logo-text {
        font-size: 1rem;
    }
    
    .nav-actions {
        gap: 8px;
    }
    
    .nav-actions .btn-primary,
    .nav-actions .btn-secondary {
        padding: 6px 12px;
        font-size: 12px;
    }

    /* Hero compacto */
    .hero-content {
        padding: var(--spacing-lg) var(--spacing-sm);
    }
    
    .hero-title {
        font-size: 2.5rem;
        line-height: 1.1;
    }
    
    .hero-description {
        font-size: 1rem;
    }
    
    .hero-badge {
        padding: 6px 12px;
        font-size: 12px;
    }

    /* Botones más grandes en móvil */
    .btn-large {
        padding: 16px 24px;
        font-size: 16px;
        min-height: 48px;
    }

    /* Grid compacto */
    .stats-grid {
        grid-template-columns: 1fr;
        gap: var(--spacing-lg);
    }
    
}

/* ===== AJUSTES PARA PANTALLAS MUY PEQUEÑAS ===== */
@media (max-width: 360px) {
    .container {
        padding: 0 12px;
    }
    
    .hero-title {
        font-size: 2rem;
    }
    
    .floating-card {
        margin: 0 -12px;
    }
    
    .feature-card,
    .testimonial-card {
        padding: var(--spacing-lg);
    }
}

/* ===== AJUSTES PARA DISPOSITIVOS CON NOTCH ===== */
@supports (padding-top: env(safe-area-inset-top)) {
    .hero-nav {
        padding-top: calc(var(--spacing-md) + env(safe-area-inset-top));
    }
}

/* ===== AJUSTES PARA MODO OSCURO DEL SISTEMA ===== */
@media (prefers-color-scheme: dark) {
    /* Los estilos ya están optimizados para modo oscuro */
}

/* ===== AJUSTES PARA MOVIMIENTO REDUCIDO ===== */
@media (prefers-reduced-motion: reduce) {
    .floating,
    .pulse,
    .particle {
        animation: none;
    }
    
    .animate-on-scroll {
        transform: none;
        opacity: 1;
    }
    
    .lift-hover:hover {
        transform: none;
    }
}

/* ===== AJUSTES PARA CONTRASTE ALTO ===== */
@media (prefers-contrast: high) {
    .glass-card {
        background: rgba(0, 0, 0, 0.8);
        border: 2px solid var(--course-primary);
    }
    
    .btn-secondary {
        border-width: 2px;
    }
    
    .feature-card {
        border: 1px solid rgba(255, 255, 255, 0.3);
    }
}

/* ===== AJUSTES PARA IMPRESIÓN ===== */
@media print {
    .hero-background,
    .particles-container,
    .floating,
    .pulse,
    .animated-gradient {
        display: none !important;
    }
    
    .hero-section,
    .features-section,
    .stats-section,
    .testimonials-section {
        background: white !important;
        color: black !important;
    }
    
    .hero-nav {
        position: static;
    }
    
    .btn-primary,
    .btn-secondary {
        border: 1px solid black;
        background: white;
        color: black;
    }
}

/* ===== ICONOS RESPONSIVE ===== */
@media (max-width: 768px) {
    .feature-icon .icon {
        width: 40px;
        height: 40px;
    }
    
    .rocket-icon {
        width: 18px;
        height: 18px;
    }
    
    .btn-icon {
        width: 16px;
        height: 16px;
    }
}

@media (max-width: 480px) {
    .feature-icon .icon {
        width: 36px;
        height: 36px;
    }
    
    .rocket-icon {
        width: 16px;
        height: 16px;
    }
    
    .btn-icon {
        width: 14px;
        height: 14px;
    }
}

/* ===== MEJORAS DE PERFORMANCE RESPONSIVE ===== */
@media (max-width: 768px) {
    .particle {
        display: none;
    }
    
    .floating {
        animation-duration: 10s;
    }
    
    .glass-card {
        backdrop-filter: blur(10px);
    }
}

/* ===== AJUSTES ESPECÍFICOS PARA DISPOSITIVOS ===== */

/* iPhone SE y dispositivos similares */
@media (max-width: 375px) and (max-height: 667px) {
    .hero-section {
        min-height: 100vh;
    }
    
    .hero-content {
        padding: var(--spacing-lg) var(--spacing-sm);
    }
}

/* iPad y tablets similares */
@media (min-width: 768px) and (max-width: 1024px) {
    .hero-content {
        padding: var(--spacing-xxl) var(--spacing-xl);
    }
    
    .features-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: var(--spacing-xl);
    }
}

/* Desktop grande */
@media (min-width: 1200px) {
    .hero-visual {
        transform: scale(1.1);
    }
    
    .features-grid {
        gap: 48px;
    }
}

/* ===== UTILIDADES RESPONSIVE ===== */
.mobile-only {
    display: block;
}

.tablet-only,
.desktop-only {
    display: none;
}

@media (min-width: 768px) {
    .mobile-only {
        display: none;
    }
    
    .tablet-only {
        display: block;
    }
}

@media (min-width: 1024px) {
    .tablet-only {
        display: none;
    }
    
    .desktop-only {
        display: block;
    }
}