/* ===== RESPONSIVE CSS ===== */

/* Large Desktop */
@media (min-width: 1400px) {
    .container {
        max-width: 1320px;
    }
}

/* Desktop */
@media (max-width: 1199px) {
    h1 {
        font-size: 3rem;
    }
    
    h2 {
        font-size: 2.25rem;
    }
    
    .hero h1 {
        font-size: 3.5rem;
    }
    
    .grid-4 {
        grid-template-columns: repeat(3, 1fr);
    }
}

/* Tablet Landscape */
@media (max-width: 991px) {
    .container {
        padding: 0 var(--spacing-lg);
    }
    
    h1 {
        font-size: 2.75rem;
    }
    
    h2 {
        font-size: 2rem;
    }
    
    .hero h1 {
        font-size: 3rem;
    }
    
    .hero p {
        font-size: 1.1rem;
    }
    
    .grid-3,
    .grid-4 {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .nav-menu {
        gap: var(--spacing-lg);
    }
    
    .footer-grid {
        grid-template-columns: repeat(3, 1fr);
    }
    
    .modules-grid {
        grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    }
}

/* Tablet Portrait */
@media (max-width: 768px) {
    h1 {
        font-size: 2.5rem;
    }
    
    h2 {
        font-size: 1.75rem;
    }
    
    .section {
        padding: var(--spacing-xl) 0;
    }
    
    .hero {
        min-height: 80vh;
        text-align: center;
    }
    
    .hero h1 {
        font-size: 2.5rem;
    }
    
    .hero-buttons {
        justify-content: center;
    }
    
    .grid-2,
    .grid-3,
    .grid-4 {
        grid-template-columns: 1fr;
    }
    
    /* Mobile Navigation */
    .nav-toggle {
        display: block;
    }
    
    .nav-menu {
        position: fixed;
        top: 0;
        right: -100%;
        width: 80%;
        max-width: 400px;
        height: 100vh;
        background-color: white;
        flex-direction: column;
        padding: 80px var(--spacing-xl) var(--spacing-xl);
        box-shadow: var(--shadow-lg);
        transition: var(--transition-normal);
        z-index: 1000;
        gap: var(--spacing-md);
        overflow-y: auto;
    }
    
    .nav-menu.active {
        right: 0;
    }
    
    body.nav-open {
        overflow: hidden;
    }
    
    body.nav-open::before {
        content: '';
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        background-color: rgba(0, 0, 0, 0.5);
        z-index: 999;
    }
    
    .nav-menu a {
        padding: var(--spacing-sm) 0;
        font-size: 1.1rem;
        border-bottom: 1px solid var(--light-gray);
        width: 100%;
    }
    
    .nav-menu a::after {
        display: none;
    }
    
    .nav-actions {
        margin-left: auto;
    }
    
    /* Footer */
    .footer-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: var(--spacing-lg);
    }
    
    .footer-bottom {
        flex-direction: column;
        text-align: center;
        gap: var(--spacing-sm);
    }
    
    /* Pricing */
    .pricing-card.featured {
        transform: none;
    }
    
    /* Demo Steps */
    .demo-steps {
        flex-direction: column;
        gap: var(--spacing-xl);
    }
    
    .demo-steps::before {
        display: none;
    }
    
    .demo-step {
        display: flex;
        align-items: center;
        gap: var(--spacing-lg);
        text-align: left;
    }
    
    .step-number {
        margin: 0;
        flex-shrink: 0;
    }
    
    /* Error Page */
    .error-content h1 {
        font-size: 6rem;
    }
    
    .error-content h2 {
        font-size: 2rem;
    }
    
    .error-actions {
        flex-direction: column;
    }
    
    /* Auth */
    .auth-box {
        padding: var(--spacing-lg);
    }
}

/* Mobile */
@media (max-width: 576px) {
    :root {
        --spacing-xs: 0.375rem;
        --spacing-sm: 0.75rem;
        --spacing-md: 1.25rem;
        --spacing-lg: 1.75rem;
        --spacing-xl: 2.5rem;
        --spacing-xxl: 3.5rem;
    }
    
    .container {
        padding: 0 var(--spacing-md);
    }
    
    h1 {
        font-size: 2rem;
    }
    
    h2 {
        font-size: 1.5rem;
    }
    
    h3 {
        font-size: 1.25rem;
    }
    
    .hero h1 {
        font-size: 2rem;
    }
    
    .hero p {
        font-size: 1rem;
    }
    
    .btn {
        padding: 0.625rem 1.25rem;
        font-size: 0.875rem;
    }
    
    .btn-lg {
        padding: 0.875rem 1.75rem;
    }
    
    .section-title::after {
        width: 60px;
    }
    
    .footer-grid {
        grid-template-columns: 1fr;
    }
    
    .nav-actions {
        flex-direction: column;
        align-items: flex-end;
        gap: var(--spacing-sm);
    }
    
    .user-btn span {
        display: none;
    }
    
    .modules-grid {
        grid-template-columns: 1fr;
    }
    
    .dashboard-stats {
        grid-template-columns: 1fr;
    }
    
    /* Contact Form */
    .contact-grid {
        grid-template-columns: 1fr;
    }
    
    /* Demo Form */
    .demo-step {
        flex-direction: column;
        text-align: center;
        gap: var(--spacing-md);
    }
    
    /* Flash Messages */
    .flash-message {
        top: 10px;
        right: 10px;
        left: 10px;
        max-width: none;
    }
}

/* Small Mobile */
@media (max-width: 375px) {
    h1 {
        font-size: 1.75rem;
    }
    
    .hero h1 {
        font-size: 1.75rem;
    }
    
    .hero-buttons {
        flex-direction: column;
        width: 100%;
    }
    
    .hero-buttons .btn {
        width: 100%;
    }
    
    .nav-actions {
        position: absolute;
        top: 100%;
        left: 0;
        width: 100%;
        background-color: white;
        padding: var(--spacing-md);
        box-shadow: var(--shadow-md);
        display: none;
    }
    
    .nav-menu.active + .nav-actions {
        display: flex;
        top: calc(100vh - 140px);
        flex-direction: column;
        align-items: stretch;
    }
    
    .nav-actions .btn {
        width: 100%;
        justify-content: center;
    }
}

/* Print Styles */
@media print {
    .site-header,
    .site-footer,
    .btn,
    .no-print {
        display: none !important;
    }
    
    main {
        margin-top: 0;
    }
    
    .container {
        max-width: 100%;
        padding: 0;
    }
    
    body {
        font-size: 12pt;
        color: black;
        background: white;
    }
    
    a {
        color: black !important;
        text-decoration: underline;
    }
    
    .card {
        box-shadow: none;
        border: 1px solid #ddd;
        break-inside: avoid;
    }
    
    .section {
        padding: 1cm 0 !important;
    }
    
    h1, h2, h3, h4, h5, h6 {
        color: black !important;
    }
}