/* ============================================================================
   ESTILOS RESPONSIVE - OPTIMIZACIÓN PARA TODOS LOS DISPOSITIVOS
   ============================================================================ */

/* Ajustes adicionales responsive para móviles pequeños */
@media (max-width: 576px) {
    /* Sale items en el dashboard */
    .sale-item {
        flex-wrap: wrap;
        padding: 12px 8px;
    }

    .user-avatar {
        width: 35px;
        height: 35px;
        font-size: 0.9rem;
    }

    .sale-info span {
        font-size: 0.9rem;
    }

    .sale-amount span {
        font-size: 0.9rem;
    }

    /* Comparación cards */
    .comparison-card h3 {
        font-size: 1.3rem;
    }

    .comparison-card ul li {
        font-size: 0.9rem;
        margin-bottom: 12px;
    }

    /* Notifications preview */
    .notifications-preview {
        padding: 12px;
        margin: 20px 0;
    }

    .notifications-preview p {
        font-size: 0.85rem;
    }

    .notifications-preview span {
        font-size: 0.85rem;
        margin-bottom: 6px;
    }
}

/* Tablets - orientación portrait */
@media (min-width: 577px) and (max-width: 768px) {
    .hero-content h1 {
        font-size: 2.5rem;
    }

    .creations-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .comparison-container {
        gap: 25px;
    }
}

/* Tablets - orientación landscape y pantallas medianas */
@media (min-width: 769px) and (max-width: 992px) {
    .container {
        max-width: 750px;
    }

    .hero-content h1 {
        font-size: 3rem;
    }

    .saas-info-section {
        gap: 35px;
    }

    .creations-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* Pantallas grandes - Optimización adicional */
@media (min-width: 1400px) {
    .container {
        max-width: 1000px;
    }

    .comparison-section,
    .saas-info-section,
    .creations-section,
    .componentization-section {
        max-width: 1400px;
    }

    .hero-content h1 {
        font-size: 4rem;
    }
}

/* Orientación landscape en móviles */
@media (max-height: 500px) and (orientation: landscape) {
    .main-header {
        padding: 10px 20px;
    }

    .logo span {
        font-size: 1rem;
    }

    .hero-content h1 {
        font-size: 1.8rem;
    }

    .hero-content {
        margin-bottom: 30px;
    }

    .btn {
        padding: 10px 20px;
    }

    .comparison-section,
    .saas-info-section,
    .creations-section,
    .componentization-section,
    .software-anatomy-section,
    .github-module-section,
    .supabase-auth-section,
    .supabase-modelagem-section,
    .supabase-avancado-section,
    .supabase-security-section,
    .stripe-section {
        padding: 40px 20px;
    }
}

/* Optimización para reducir motion en dispositivos que lo prefieren */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }

    .bg-shape {
        animation: none;
    }
}

/* Touch devices - Aumentar áreas de toque */
@media (hover: none) and (pointer: coarse) {
    .btn {
        min-height: 44px;
        min-width: 44px;
    }

    .main-nav a {
        min-height: 44px;
        padding: 10px 16px;
    }

    .creation-card,
    .comparison-card {
        cursor: default;
    }

    /* Eliminar hover effects en touch devices */
    .creation-card:hover {
        transform: none;
    }
}

/* Impresión - Estilos para cuando se imprima la página */
@media print {
    .animated-background,
    .main-header,
    .btn,
    .popup-overlay {
        display: none !important;
    }

    body {
        background: white;
        color: black;
    }

    .container,
    .comparison-section,
    .saas-info-section,
    .creations-section {
        max-width: 100%;
        padding: 20px;
    }
}
