/**
 * MXGate Website - Responsive Styles
 */

/* ===================================
   Large Tablets (max-width: 1024px)
   =================================== */
@media (max-width: 1024px) {
    .hero-content {
        grid-template-columns: 1fr;
        text-align: center;
    }

    .hero-text h1 {
        font-size: 2.5rem;
    }

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

    .hero-image {
        max-width: 600px;
        margin: 0 auto;
    }

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

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

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

    .pricing-card.popular {
        transform: none;
        grid-column: span 2;
        max-width: 400px;
        justify-self: center;
    }

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

/* ===================================
   Tablets (max-width: 768px)
   =================================== */
@media (max-width: 768px) {
    :root {
        --container-padding: 1rem;
    }

    h1 { font-size: 2rem; }
    h2 { font-size: 1.75rem; }
    h3 { font-size: 1.25rem; }

    .section {
        padding: var(--space-2xl) 0;
    }

    /* Navigation */
    .nav {
        position: fixed;
        top: 72px;
        left: 0;
        right: 0;
        background: var(--white);
        flex-direction: column;
        padding: var(--space-lg);
        box-shadow: var(--shadow-lg);
        transform: translateY(-100%);
        opacity: 0;
        visibility: hidden;
        transition: all var(--transition-base);
    }

    .nav.active {
        transform: translateY(0);
        opacity: 1;
        visibility: visible;
    }

    .nav-link {
        padding: var(--space-md) 0;
        border-bottom: 1px solid var(--gray-200);
        width: 100%;
        text-align: center;
    }

    .nav-link.active::after {
        display: none;
    }

    .nav-actions {
        flex-direction: column;
        width: 100%;
        gap: var(--space-md);
        margin-top: var(--space-md);
    }

    .nav-actions .btn {
        width: 100%;
    }

    .mobile-toggle {
        display: flex;
    }

    .mobile-toggle.active span:nth-child(1) {
        transform: rotate(45deg) translate(5px, 5px);
    }

    .mobile-toggle.active span:nth-child(2) {
        opacity: 0;
    }

    .mobile-toggle.active span:nth-child(3) {
        transform: rotate(-45deg) translate(5px, -5px);
    }

    /* Hero */
    .hero {
        padding: 6rem 0 3rem;
    }

    .hero-text h1 {
        font-size: 2rem;
    }

    .hero-text p {
        font-size: 1rem;
    }

    .hero-buttons {
        flex-direction: column;
    }

    .hero-buttons .btn {
        width: 100%;
    }

    /* Grids */
    .grid-2,
    .grid-3,
    .grid-4 {
        grid-template-columns: 1fr;
    }

    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: var(--space-lg);
    }

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

    /* Pricing */
    .pricing-cards {
        grid-template-columns: 1fr;
        max-width: 400px;
        margin: 0 auto;
    }

    .pricing-card.popular {
        grid-column: span 1;
        transform: none;
    }

    /* Blog */
    .blog-grid {
        grid-template-columns: 1fr;
    }

    /* Contact */
    .contact-grid {
        grid-template-columns: 1fr;
    }

    .contact-form {
        order: 2;
    }

    .contact-info {
        order: 1;
    }

    /* Footer */
    .footer-grid {
        grid-template-columns: 1fr;
        text-align: center;
    }

    .footer-brand .logo {
        justify-content: center;
    }

    .social-links {
        justify-content: center;
    }

    .footer-bottom {
        flex-direction: column;
        gap: var(--space-md);
        text-align: center;
    }
}

/* ===================================
   Mobile (max-width: 480px)
   =================================== */
@media (max-width: 480px) {
    h1 { font-size: 1.75rem; }
    h2 { font-size: 1.5rem; }

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

    .hero {
        padding: 5rem 0 2rem;
    }

    .hero-text h1 {
        font-size: 1.75rem;
    }

    .btn {
        padding: 0.625rem 1.25rem;
        font-size: 0.9375rem;
    }

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

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

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

    .pricing-price {
        font-size: 2.5rem;
    }

    .stats-grid {
        grid-template-columns: 1fr;
    }

    .stat-item {
        padding: var(--space-md);
    }

    .contact-form {
        padding: var(--space-lg);
    }

    .scroll-top {
        width: 40px;
        height: 40px;
        bottom: 1rem;
        right: 1rem;
    }
}

/* ===================================
   Print Styles
   =================================== */
@media print {
    .header,
    .footer,
    .scroll-top,
    .mobile-toggle,
    .nav-actions {
        display: none !important;
    }

    .hero {
        padding-top: 0;
    }

    a {
        text-decoration: underline;
    }

    .section {
        padding: 1rem 0;
    }
}

/* ===================================
   High DPI Displays
   =================================== */
@media (-webkit-min-device-pixel-ratio: 2), (min-resolution: 192dpi) {
    /* Add any high-DPI specific styles here */
}

/* ===================================
   Reduced Motion
   =================================== */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }
}

/* ===================================
   Dark Mode Support (optional)
   =================================== */
@media (prefers-color-scheme: dark) {
    /* Uncomment to enable automatic dark mode
    :root {
        --white: #111827;
        --gray-50: #1f2937;
        --gray-100: #374151;
        --gray-200: #4b5563;
        --gray-300: #6b7280;
        --gray-400: #9ca3af;
        --gray-500: #d1d5db;
        --gray-600: #e5e7eb;
        --gray-700: #f3f4f6;
        --gray-800: #f9fafb;
        --gray-900: #ffffff;
    }
    */
}
