@media (max-width: 992px) {
    .grid-4 {
        grid-template-columns: repeat(2, 1fr);
    }

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

    /* Tablet adjustments */
    .hero-section h1 {
        font-size: 40px;
    }
}

@media (max-width: 768px) {

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

    .header-cta {
        display: none;
    }

    /* Hide CTA on mobile for space */

    .nav {
        position: fixed;
        top: var(--header-height);
        left: -100%;
        width: 100%;
        height: calc(100vh - var(--header-height));
        background-color: var(--color-bg-dark);
        padding: 20px;
        transition: all 0.3s ease;
        overflow-y: auto;
    }

    .nav.active {
        left: 0;
    }

    .nav-list {
        flex-direction: column;
        align-items: flex-start;
        gap: 0;
    }

    .nav-item {
        width: 100%;
        border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    }

    .nav-link {
        font-size: 16px;
        padding: 15px 0;
        width: 100%;
        justify-content: space-between;
    }

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

    /* Remove underline hover on mobile */

    .mobile-toggle {
        display: flex;
    }

    /* Mobile Mega Menu Overrides */
    .mega-menu {
        position: static;
        width: 100%;
        opacity: 1;
        visibility: visible;
        transform: none;
        box-shadow: none;
        padding: 0;
        border-top: none;
        background-color: transparent;
        max-height: 0;
        overflow: hidden;
        transition: max-height 0.3s ease;
        display: block;
        /* Ensure it's in flow for height transition */
    }

    .nav-item.has-mega-menu.active .mega-menu {
        max-height: 1000px;
        /* Large enough to fit content */
        padding-bottom: 20px;
    }

    .nav-item.has-mega-menu .arrow {
        transform: rotate(0);
        transition: transform 0.3s;
    }

    .nav-item.has-mega-menu.active .arrow {
        transform: rotate(180deg);
    }

    .mega-menu-grid {
        grid-template-columns: 1fr;
        gap: 15px;
        padding-left: 15px;
    }

    .mega-menu-col h4 {
        color: var(--color-accent);
        /* Change header color for contrast on dark bg */
        font-size: 14px;
        margin-bottom: 10px;
        border-bottom: none;
    }

    .mega-menu-col a {
        color: rgba(255, 255, 255, 0.7);
        padding: 5px 0;
    }

    .mega-menu-col a:hover {
        color: #fff;
        transform: translateX(5px);
    }

    .mega-menu-image {
        display: none;
    }

    /* Hide large images in mobile menu */

    /* Section padding adjustments */
    .section {
        padding: 50px 0;
    }

    .hero-section {
        padding-top: 120px;
        padding-bottom: 60px;
    }

    .hero-section h1 {
        font-size: 32px;
    }

    .hero-image {
        display: none;
    }

    /* Hide illustration on mobile as per design */
    .footer-bottom {
        flex-direction: column;
        text-align: center;
        gap: 15px;
    }
}