/* Navbar & Topbar responsive rules */

@media (max-width: 1268px) {
    nav .link-item a,
    nav .language-button,
    nav .custom-button .button-text {
        font-size: 14px;
    }

    nav .custom-button {
        padding: 10px 20px !important;
    }

    nav .logo,
    nav .logo-daw {
        min-width: 56px;
        min-height: 56px;
        height: 56px;
        width: 56px;
    }
}

@media (max-width: 992px) {
    /* Stack middle content and reduce clutter */
    nav .middle {
        padding: 8px 12px;
        gap: 6px;
    }

    nav .mobile-logo {
        display: flex;
        align-items: center;
        justify-content: center;
        gap: 12px;
    }
    nav .logo-daw-mobile {
        height: 40px;
        width: 40px;
    }

    nav .navbar {
        align-items: flex-start;
        gap: 12px;
    }

    /* Nav menu wraps if needed */
    nav .navbar .nav-menu {
        justify-content: center;
        gap: 12px;
    }

    /* Shorten phone label on medium screens */
    nav .phone .phone-label {
        display: none;
    }
}

@media (max-width: 916px) {
    nav .link-item a,
    nav .language-button,
    nav .custom-button .button-text {
        font-size: 12px;
    }
    nav .language-button svg {
        width: 8px !important;
    }

    nav .custom-button {
        padding: 8px 16px !important;
    }

    .logo-daw {
        display: none;
    }
}

@media (max-width: 768px) {
    nav {
        margin-top: 12px;
    }

    nav .logo {
        display: none;
    }
    nav .middle .mobile-logo {
        display: flex !important;
    }

    /* Mobile dropdown */
    nav .navbar .nav-menu {
        overflow-x: auto;
        white-space: nowrap;
        flex-wrap: nowrap;
        justify-content: flex-start;
        display: flex;
        flex-direction: column;
        gap: 8px;
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background: rgba(255, 255, 255, 1);
        -webkit-backdrop-filter: blur(14px);
        backdrop-filter: blur(14px);
        border-radius: 16px;
        padding: 12px;
        margin-top: 8px;
        z-index: 1000;
        /* Smooth open/close */
        max-height: 0;
        opacity: 0;
        transform: translateY(-8px);
        visibility: hidden;
        pointer-events: none;
        overflow: hidden;
        transition: max-height 0.6s cubic-bezier(0.2, 0.8, 0.2, 1),
                    opacity 0.4s ease,
                    transform 0.4s ease,
                    visibility 0s linear 0.6s;
    }

    /* Open state */
    nav .middle.open .nav-menu {
        max-height: 80vh;
        opacity: 1;
        transform: translateY(0);
        visibility: visible;
        pointer-events: auto;
        transition: max-height 0.6s cubic-bezier(0.2, 0.8, 0.2, 1),
                    opacity 0.4s ease,
                    transform 0.4s ease,
                    visibility 0s linear 0s;
    }

    nav .link-item a,
    nav .language-button {
        font-size: 16px;
    }

    nav .navbar .nav-menu::-webkit-scrollbar {
        display: none;
    }

    /* Densify links */
    .link-item .iocaste {
        padding: 4px 0;
    }
    .link-item .link__graphic--slide {
        stroke-width: 1.5px;
        top: -2px;
    }

    /* Contact area trims content */
    nav .navbar-contact .custom-button {
        display: none !important;
    }
    nav .navbar-contact .phone .phone-number span {
        font-size: 14px;
    }
}

@media (max-width: 576px) {
    /* Tighten paddings, hide external logo */
    nav .middle {
        padding: 8px 10px;
    }
    a.logo-daw {
        display: none;
    }

    /* Language switch stays accessible */
    .language-button {
        padding: 6px 10px;
    }

    /* Reduce visual noise from SVG underline animations */
    .link-item .link__graphic--slide {
        display: none;
    }
}

@media (max-width: 400px) {
    /* Show only essential items */
    nav .navbar-contact .phone {
        display: none;
    }
}

/* Burger menu */
.navbar-contact-mobile {
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
}
.burger {
    display: none;
    min-width: 42px;
    height: 42px;
    border: none;
    background: rgba(255, 255, 255, 0.65);
    backdrop-filter: blur(14px);
    border-radius: 222px;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    gap: 5px;
    cursor: pointer;
}

.burger span {
    display: block;
    width: 22px;
    height: 2px;
    background: var(--text);
    transition: transform 0.3s ease, opacity 0.3s ease;
}

.burger.active span:nth-child(1) {
    transform: translateY(7px) rotate(45deg);
}
.burger.active span:nth-child(2) {
    opacity: 0;
}
.burger.active span:nth-child(3) {
    transform: translateY(-7px) rotate(-45deg);
}

@media (max-width: 768px) {
    nav .burger {
        display: flex;
    }

    nav .middle {
        position: relative;
    }

    nav .middle .navbar-contact {
        display: none;
    }

    nav .middle.open .nav-menu,
    nav .middle.open .navbar-contact {
        display: flex;
        flex-direction: column;
        gap: 10px;
        width: 100%;
    }

    /* Align links in dropdown */
    nav .middle.open .nav-menu .link-item {
        justify-content: center;
    }
} 