/* Adaptação fluida do cabeçalho e da abertura para notebooks menores. */

@media (min-width: 1241px) {
    .nav-content {
        flex-wrap: nowrap;
        gap: clamp(8px, 1vw, 20px);
    }

    .logo img {
        width: clamp(146px, 10vw, 174px);
    }

    .main-nav {
        min-width: 0;
        flex-wrap: nowrap;
        gap: clamp(2px, 0.45vw, 8px);
    }

    .main-nav a {
        flex: 0 0 auto;
        padding-inline: clamp(8px, 0.72vw, 14px);
        font-size: clamp(0.78rem, 0.72vw, 0.9rem);
        line-height: 1.2;
        white-space: nowrap;
    }

    .nav-phone {
        flex: 0 0 auto;
        gap: 7px;
        margin-left: clamp(0px, 0.45vw, 8px);
        padding-left: clamp(10px, 1vw, 20px);
        font-size: clamp(0.82rem, 0.78vw, 0.96rem);
    }

    .fixed-header-btn {
        flex: 0 0 auto;
        padding-inline: clamp(13px, 1.05vw, 20px);
        font-size: clamp(0.82rem, 0.78vw, 0.94rem);
    }
}

/* Notebook intermediário: mantém o menu inteiro, mas libera espaço do telefone. */
@media (min-width: 1241px) and (max-width: 1499px) {
    .nav-content {
        width: calc(100% - 40px);
        max-width: 1380px;
        padding-left: 18px;
        gap: 10px;
    }

    .nav-phone {
        display: none;
    }

    .desktop-story-active .hero-content {
        width: 50%;
        max-width: 650px;
    }

    .desktop-story-active .hero h1 {
        font-size: clamp(2.8rem, 3.8vw, 3.45rem);
    }

    .desktop-story-active .hero-container > .quote-calculator,
    .desktop-story-active .hero-container > .route-map-panel {
        right: clamp(104px, 9vw, 148px);
        width: 440px;
        max-width: 42%;
    }
}

/* Antes de qualquer quebra de texto, assume a composição do último print. */
@media (min-width: 769px) and (max-width: 1240px) {
    .navbar {
        top: 12px;
    }

    .nav-content {
        width: calc(100% - 32px);
        max-width: 1120px;
        min-height: 82px;
        flex-wrap: nowrap;
        gap: 12px;
        padding: 9px 12px 9px 18px;
        border-radius: 24px;
    }

    .logo img {
        width: clamp(145px, 17vw, 170px);
    }

    .main-nav,
    .nav-phone {
        display: none !important;
    }

    .desktop-theme-toggle {
        flex: 0 0 auto;
        margin-left: auto;
    }

    .fixed-header-btn {
        display: inline-flex !important;
        flex: 0 0 auto;
        min-height: 50px;
        padding: 12px clamp(14px, 2vw, 20px);
        font-size: clamp(0.82rem, 1.35vw, 0.94rem);
        white-space: nowrap;
    }

    .mobile-menu-toggle {
        display: grid !important;
        flex: 0 0 auto;
        margin-left: 0;
    }

    .desktop-scroll-map {
        display: none;
    }

    .desktop-story-active .hero {
        min-height: 900px;
    }

    .desktop-story-active .hero-container {
        padding-top: 22px;
    }

    .desktop-story-active .hero-content {
        width: 100%;
        max-width: 760px;
    }

    .desktop-story-active .hero h1 {
        max-width: 760px;
        font-size: clamp(2.75rem, 5.1vw, 4rem);
    }

    .desktop-story-active .hero-content > p {
        max-width: 700px;
    }

    .desktop-story-active .hero .microcopy {
        display: none;
    }

    .desktop-story-active .hero-container > .quote-calculator {
        position: relative;
        top: auto;
        right: auto;
        width: 100%;
        max-width: 760px;
        max-height: none;
        margin: 390px auto 0;
    }

    .desktop-story-active .hero-container > .route-map-panel {
        position: relative;
        top: auto;
        right: auto;
        width: 100%;
        max-width: 760px;
        margin: 24px auto 0;
    }
}

@media (min-width: 769px) and (max-width: 860px) {
    .nav-content {
        width: calc(100% - 20px);
        gap: 8px;
        padding-inline: 12px;
    }

    .logo img {
        width: 138px;
    }

    .fixed-header-btn {
        padding-inline: 13px;
        font-size: 0.8rem;
    }
}
