/* Responsive Design - Mobile First */

/* Extra Small Devices (phones, less than 480px) */
@media (max-width: 479px) {
    .container {
        padding: 0 var(--space-3);
    }

    h1 {
        font-size: var(--font-size-2xl);
    }

    h2 {
        font-size: var(--font-size-xl);
    }

    h3 {
        font-size: var(--font-size-lg);
    }

    .btn-large {
        padding: var(--space-3) var(--space-5);
        font-size: var(--font-size-base);
    }

    .feature-card,
    .card {
        padding: var(--space-5);
    }

    .pricing-card {
        padding: var(--space-6);
    }

    .section-header {
        margin-bottom: var(--space-6);
    }

    .grid-cols-2,
    .grid-cols-3,
    .grid-cols-4 {
        grid-template-columns: 1fr;
    }
}

/* Small Devices (landscape phones, 480px to 640px) */
@media (min-width: 480px) and (max-width: 639px) {
    .container {
        padding: 0 var(--space-4);
    }

    h1 {
        font-size: var(--font-size-3xl);
    }

    .grid-cols-3,
    .grid-cols-4 {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* Medium Devices (tablets, 640px to 768px) */
@media (min-width: 640px) and (max-width: 767px) {
    h1 {
        font-size: var(--font-size-3xl);
    }

    .grid-cols-4 {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* Large Devices (desktops, 768px to 1024px) */
@media (min-width: 768px) and (max-width: 1023px) {
    .container {
        padding: 0 var(--space-6);
    }

    .grid-cols-4 {
        grid-template-columns: repeat(3, 1fr);
    }
}

/* Extra Large Devices (large desktops, 1024px and up) */
@media (min-width: 1024px) {
    .container {
        padding: 0 var(--space-8);
    }
}

/* Navigation Responsive */
@media (max-width: 767px) {
    .nav-menu {
        position: fixed;
        top: 0;
        left: -100%;
        width: 80%;
        max-width: 300px;
        height: 100vh;
        background: var(--color-bg-card);
        flex-direction: column;
        padding: var(--space-8) var(--space-6);
        transition: left var(--transition-base);
        box-shadow: var(--shadow-xl);
        z-index: var(--z-modal);
    }

    .nav-menu.active {
        left: 0;
    }

    .nav-toggle {
        display: flex;
    }

    .nav-overlay {
        display: block;
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        background: rgba(0, 0, 0, 0.5);
        opacity: 0;
        visibility: hidden;
        transition: all var(--transition-base);
        z-index: calc(var(--z-modal) - 1);
    }

    .nav-overlay.active {
        opacity: 1;
        visibility: visible;
    }
}

@media (min-width: 768px) {
    .nav-toggle {
        display: none;
    }

    .nav-overlay {
        display: none;
    }

    .nav-menu {
        position: static;
        flex-direction: row;
        padding: 0;
        background: transparent;
        box-shadow: none;
        width: auto;
        height: auto;
    }
}

/* Hero Section Responsive */
@media (max-width: 767px) {
    .hero {
        text-align: center;
        padding: var(--space-12) 0;
    }

    .hero__content {
        align-items: center;
    }

    .hero__title {
        font-size: var(--font-size-3xl);
    }

    .hero__buttons {
        flex-direction: column;
        width: 100%;
    }

    .hero__buttons .btn {
        width: 100%;
    }
}

/* Features Section Responsive */
@media (max-width: 639px) {
    .features__grid {
        grid-template-columns: 1fr;
    }
}

/* Testimonials Responsive */
@media (max-width: 767px) {
    .testimonials__grid {
        grid-template-columns: 1fr;
    }
}

/* Pricing Responsive */
@media (max-width: 767px) {
    .pricing__grid {
        grid-template-columns: 1fr;
    }

    .pricing-card.popular {
        transform: scale(1);
    }

    .pricing-card.popular:hover {
        transform: translateY(-8px);
    }
}

/* Contact Form Responsive */
@media (max-width: 639px) {
    .contact__form {
        padding: var(--space-5);
    }

    .contact__info {
        flex-direction: column;
    }
}

/* Footer Responsive */
@media (max-width: 639px) {
    .footer__grid {
        grid-template-columns: 1fr;
    }

    .footer__bottom {
        flex-direction: column;
        text-align: center;
        gap: var(--space-4);
    }
}

/* Team Section Responsive */
@media (max-width: 639px) {
    .team__grid {
        grid-template-columns: 1fr;
    }
}

/* Products Grid Responsive */
@media (max-width: 767px) {
    .products__grid {
        grid-template-columns: 1fr;
    }
}

/* Stats Section Responsive */
@media (max-width: 639px) {
    .stats__grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* Tablet Specific Adjustments */
@media (min-width: 640px) and (max-width: 1023px) {
    .hero__title {
        font-size: var(--font-size-4xl);
    }
}

/* Print Styles */
@media print {
    .nav,
    .footer,
    .btn,
    .hero__buttons {
        display: none;
    }

    body {
        background: white;
        color: black;
    }

    .card,
    .feature-card {
        break-inside: avoid;
        box-shadow: none;
        border: 1px solid #ddd;
    }
}

/* Landscape Orientation */
@media (orientation: landscape) and (max-height: 600px) {
    .hero {
        padding: var(--space-6) 0;
    }

    section {
        padding: var(--space-8) 0;
    }
}
