/* ==========================================================================
   MySmartTools - Responsive CSS (Mobile-First Overrides)
   ========================================================================== */

/* Large screens and desktop scaling */
@media (max-width: 1200px) {
    .container {
        padding: 0 20px;
    }
    
    .hero-content h1 {
        font-size: 3rem;
    }
}

/* Tablets and small desktops */
@media (max-width: 992px) {
    :root {
        --header-height: 70px;
    }

    .hero-grid {
        grid-template-columns: 1fr;
        gap: 40px;
        text-align: center;
    }

    .hero-content p {
        margin-left: auto;
        margin-right: auto;
    }

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

    .hero-visual {
        height: 350px;
    }

    .grid-3 {
        grid-template-columns: repeat(2, 1fr);
        gap: 20px;
    }

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

    .testimonials-grid {
        grid-template-columns: 1fr;
        gap: 24px;
    }

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

    .tool-page-layout {
        grid-template-columns: 1fr;
        gap: 30px;
    }

    /* Header Mobile Navigation Menu Trigger */
    .hamburger {
        display: block;
    }

    .nav-menu {
        position: fixed;
        top: var(--header-height);
        left: -100%;
        width: 100%;
        height: calc(100vh - var(--header-height));
        background-color: var(--white);
        flex-direction: column;
        align-items: flex-start;
        padding: 40px;
        gap: 24px;
        box-shadow: var(--shadow-lg);
        transition: var(--transition-normal);
        z-index: 1005;
        overflow-y: auto;
    }

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

    .nav-link {
        font-size: 1.15rem;
        width: 100%;
    }

    .header-search {
        width: 100%;
        margin-top: 10px;
    }

    .header-search:focus-within {
        width: 100%;
    }

    /* Transform mega menu inside mobile layout */
    .has-mega-menu {
        width: 100%;
    }

    .mega-menu {
        position: static;
        width: 100%;
        box-shadow: none;
        opacity: 1;
        visibility: visible;
        transform: none;
        padding: 10px 0 0 16px;
        display: none; /* Toggle programmatically on click in mobile */
        max-height: none;
        overflow: visible;
        border-bottom: none;
    }

    .has-mega-menu.active .mega-menu {
        display: block;
    }

    .mega-menu-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }

    .mega-menu-search-bar {
        grid-column: span 1;
    }
}

/* Mobile Screens */
@media (max-width: 600px) {
    .hero-content h1 {
        font-size: 2.25rem;
    }

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

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

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

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

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

    .footer-bottom {
        flex-direction: column;
        gap: 16px;
        text-align: center;
    }

    .footer-bottom-links {
        justify-content: center;
    }

    .static-content-wrapper {
        padding: 24px;
    }

    .tool-interface-card {
        padding: 20px;
    }

    .tool-seo-content {
        padding: 24px;
    }
}

/* Landscape Phones */
@media (max-height: 480px) and (orientation: landscape) {
    .nav-menu {
        padding-top: 20px;
        gap: 16px;
    }
}
