/* ============================================
   ÁLGEBRA LAB - Responsive Styles
   ============================================ */

/* Tablet */
@media (max-width: 1024px) {
    .home-hero {
        grid-template-columns: 1fr;
        text-align: center;
        gap: 2rem;
    }

    .hero-visual {
        order: -1;
    }

    .hero-content {
        max-width: 100%;
        margin: 0 auto;
    }

    .hero-features {
        justify-content: center;
    }

    .floating-elements {
        width: 240px;
        height: 240px;
    }

    .float-element {
        font-size: 1.5rem;
        padding: 0.5rem 0.75rem;
    }

    .hero-badge {
        width: 80px;
        height: 80px;
    }

    .badge-icon {
        font-size: 2.5rem;
    }
}

/* Mobile Large */
@media (max-width: 768px) {
    :root {
        --header-height: 56px;
        --sidebar-width: 100%;
    }

    .main-content {
        padding: 1rem;
    }

    .main-header {
        padding: 0 1rem;
    }

    .app-title {
        font-size: 1rem;
    }

    .header-center {
        display: none;
    }

    .module-indicator {
        display: none;
    }

    .hero-title {
        font-size: 2rem;
    }

    .hero-subtitle {
        font-size: 1rem;
    }

    .hero-features {
        flex-direction: column;
        align-items: center;
        gap: 0.75rem;
    }

    .module-cards {
        grid-template-columns: 1fr;
    }

    .lesson-content {
        padding: 1.5rem;
        border-radius: var(--radius-xl);
    }

    .lesson-navigation {
        flex-direction: column;
    }

    .btn-nav {
        width: 100%;
        justify-content: center;
    }

    .quiz-content {
        padding: 1.5rem;
    }

    .quiz-option {
        padding: 0.75rem 1rem;
    }

    .complete-stats {
        gap: 2rem;
    }

    .stat-value {
        font-size: 1.5rem;
    }

    .floating-elements {
        width: 200px;
        height: 200px;
    }

    .float-element {
        font-size: 1.25rem;
        padding: 0.375rem 0.5rem;
    }

    .variable-box {
        width: 60px;
        height: 60px;
        font-size: 1.5rem;
    }

    .number-chip {
        min-width: 40px;
        height: 40px;
        font-size: 1rem;
    }

    .geometry-canvas {
        width: 250px;
        height: 250px;
    }

    .sidebar {
        width: 100%;
    }
}

/* Mobile Small */
@media (max-width: 480px) {
    .hero-title {
        font-size: 1.75rem;
    }

    .btn-large {
        padding: 0.875rem 1.5rem;
        font-size: 1rem;
    }

    .step-title {
        font-size: 1.25rem;
    }

    .step-theory {
        padding: 1rem;
    }

    .quiz-title {
        font-size: 1.25rem;
    }

    .question-text {
        font-size: 1.125rem;
    }

    .complete-title {
        font-size: 1.5rem;
    }

    .floating-elements {
        width: 180px;
        height: 180px;
    }

    .hero-badge {
        width: 60px;
        height: 60px;
    }

    .badge-icon {
        font-size: 2rem;
    }
}

/* Touch Devices */
@media (hover: none) and (pointer: coarse) {
    .hover-lift:hover {
        transform: none;
        box-shadow: var(--shadow-md);
    }

    .hover-scale:hover {
        transform: none;
    }

    .btn:hover:not(:disabled) {
        transform: none;
    }

    .module-card:hover:not(.locked) {
        transform: none;
    }

    .draggable {
        touch-action: none;
    }
}

/* Landscape Mobile */
@media (max-height: 500px) and (orientation: landscape) {
    .home-hero {
        min-height: auto;
        padding: 1rem 0;
    }

    .hero-visual {
        display: none;
    }

    .lesson-content {
        min-height: 250px;
    }

    .step-visual {
        min-height: 150px;
        padding: 1rem;
    }
}

/* High DPI Screens */
@media (-webkit-min-device-pixel-ratio: 2),
(min-resolution: 192dpi) {

    .variable-box,
    .number-chip,
    .expression-block {
        border-width: 1.5px;
    }
}

/* Reduced Motion */
@media (prefers-reduced-motion: reduce) {

    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }

    .float-element,
    .hero-badge,
    .celebration-icon {
        animation: none;
    }
}

/* Print */
@media print {

    .main-header,
    .sidebar,
    .lesson-navigation,
    .btn {
        display: none;
    }

    .screen {
        display: block !important;
    }

    .lesson-content {
        box-shadow: none;
        border: 1px solid #ccc;
    }
}