/* =========================================================
   🔹 NAVIGATION BAR (NAV)
   ========================================================= */
.nav-inner {
    position: relative; /* garante que os elementos absolutos (menu mobile) fiquem sob o nav */
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding: 0.6rem 1rem;
    background: var(--azul);
    border-bottom: 1px solid rgba(0, 0, 0, 0.06);
    z-index: 1200; /* garante que o nav fique acima do conteúdo quando expandido */
}

/* =========================================================
   🔹 LOGO / BRAND
   ========================================================= */
.brand {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    text-decoration: none;
    font-weight: 700;
}

.brand img {
    width: auto;
    height: 60px;
    display: block;
}

.brand span {
    font-size: 1.2rem;
    color: #ffffff;
    font-weight: bold;
    font-family: "Bronkoh-Heavy";
}

/* =========================================================
   🔹 TOGGLE (HAMBURGER MENU - MOBILE)
   ========================================================= */
.nav-toggle {
    background: transparent;
    border: 0;
    padding: 0.4rem;
    display: none;
    cursor: pointer;
}

.hamburger,
.hamburger::before,
.hamburger::after {
    display: block;
    width: 26px;
    height: 2px;
    background: #ffffff;
    position: relative;
    border-radius: 2px;
}

.hamburger::before,
.hamburger::after {
    content: "";
    position: absolute;
    left: 0;
}

.hamburger::before {
    top: -7px;
}

.hamburger::after {
    top: 7px;
}

/* =========================================================
   🔹 MAIN MENU
   ========================================================= */
.nav-menu {
    list-style: none;
    display: flex;
    gap: 1rem;
    margin: 0;
    padding: 0;
    align-items: center;
}

.nav-menu a {
    text-decoration: none;
    color: #ffffff;
    font-size: 1.2rem;
    padding: 0.4rem 0.6rem;
    display: inline-block;
    border-radius: 4px;
}

.nav-menu a:hover {
    background: var(--verde);
}

.nav-menu ul li {
    margin: 0;
    padding: 0;
    list-style: none;
}

/* =========================================================
   🔹 BOTÃO DE DESTAQUE (EX: "Contato" ou "Login")
   ========================================================= */
#b-nav {
    position: relative;
    display: inline-block;
    overflow: hidden;
    background: linear-gradient(90deg, #92c01f, #25a198);
    color: #fff;
    font-weight: 700;
    text-decoration: none;
    padding: 10px 32px;
    border-radius: 100px;
    font-size: 1.1rem;
    border: none;
    cursor: pointer;
    transition: transform 0.2s;
}

#b-nav::before {
    content: "";
    position: absolute;
    top: 0;
    left: -75%;
    width: 50%;
    height: 100%;
    background: rgba(255, 255, 255, 0.25);
    transform: skewX(-25deg);
    transition: left 0.5s ease;
}

#b-nav:hover::before {
    left: 125%;
}

#b-nav:hover {
    transform: scale(1.04);
}

/* #b-nav {
    position: relative;
    display: inline-block;
    background: radial-gradient(
        circle at var(--x, 50%) var(--y, 50%),
        #92c01f,
        #25a198
    );
    color: #ffffff;
    font-weight: 700;
    text-decoration: none;
    padding: 10px 32px;
    border-radius: 100px;
    font-size: 1.1rem;
    box-shadow: 0 2px 8px rgba(28, 112, 182, 0.13);
    border: none;
    cursor: pointer;
    transition: transform 0.2s, box-shadow 0.2s;
    overflow: hidden;
}

#b-nav:hover {
    transform: scale(1.04);
    box-shadow: 0 6px 18px rgba(146, 192, 31, 0.18);
} */


/* =========================================================
   🔹 DROPDOWNS (SUB-MENUS)
   ========================================================= */
.has-dropdown {
    position: relative;
}

/* Botão toggle (somente mobile) */
.dropdown-toggle {
    display: none;
    border: 0;
    background: transparent;
    width: 28px;
    height: 28px;
    margin-left: 0.2rem;
    cursor: pointer;
}

/* Menu dropdown (desktop) */
.dropdown {
    position: absolute;
    left: 0;
    top: calc(100% + 6px);
    background: var(--azul);
    box-shadow: 0 6px 18px rgba(0, 0, 0, 0.08);
    border-radius: 6px;
    padding: 0.4rem 0;
    min-width: 180px;
    display: none;
    z-index: 20;
}

.dropdown li {
    padding: 0;
}

.dropdown a {
    display: block;
    padding: 0.5rem 0.9rem;
    white-space: nowrap;
}

/* Mostra dropdown ao passar o mouse (desktop) */
.has-dropdown:hover > .dropdown {
    display: block;
}

/* =========================================================
   🔹 INDICADOR (SETINHA ▼) PARA LINKS COM DROPDOWN
   ========================================================= */
.has-dropdown > .dropdown-link {
    position: relative;
    padding-right: 1.6rem;
    display: inline-block;
    vertical-align: middle;
}

/* Setinha padrão */
.has-dropdown > .dropdown-link::after {
    content: "";
    position: absolute;
    right: 0.6rem;
    top: 50%;
    transform: translateY(-50%) rotate(0deg);
    transform-origin: center;
    width: 0;
    height: 0;
    border-left: 5px solid transparent;
    border-right: 5px solid transparent;
    border-top: 6px solid currentColor;
    transition: transform 0.18s ease;
    pointer-events: none;
}

/* Gira a seta ao abrir o dropdown (mobile) ou ao hover (desktop) */
.has-dropdown.open > .dropdown-link::after,
.has-dropdown:hover > .dropdown-link::after {
    transform: translateY(-50%) rotate(180deg);
}

/* Ajuste de espaçamento no mobile */
@media (max-width: 768px) {
    .has-dropdown > .dropdown-link {
        padding-right: 2rem;
    }

    .has-dropdown > .dropdown-link::after {
        right: 1rem;
    }
}

/* =========================================================
   🔹 RESPONSIVE (MOBILE)
   ========================================================= */
@media (max-width: 768px) {
    /* Mostrar botão hambúrguer */
    .nav-toggle {
        display: inline-flex;
        align-items: center;
        justify-content: center;
    }

    /* Menu móvel */
    .nav-menu {
        position: absolute;
        left: 0;
        right: 0;
        top: 100%;
        background: var(--azul); /* manter a cor do cabeçalho para contraste */
        color: #ffffff;
        flex-direction: column;
        gap: 20px;
        padding: 20px;
        border-bottom: 1px solid rgba(0, 0, 0, 0.06);
        max-height: 0;
        overflow: hidden;
        transition: max-height 0.28s ease, opacity 0.2s ease;
        z-index: 60; /* fica acima do conteúdo da página */
        opacity: 0;
        flex-direction: column;
        align-items: stretch;
        width: 100%;

    }

    /* Quando expandido */
    .nav-inner.expanded .nav-menu {
        max-height: 640px;
        opacity: 1;
    }

    .nav-menu a {
        padding: 0.9rem 1rem;
        color: #ffffff; /* forçar cor clara sobre o fundo azul */
        display: flex;
        align-items: center;
        justify-content: space-between;
        gap: .6rem;
    }

    /* Dropdown no mobile (abre colapsável) */
    .has-dropdown .dropdown {
        position: static;
        box-shadow: none;
        padding: 0;
        min-width: 0;
        top: auto;
        display: block;
        max-height: 0;
        overflow: hidden;
        transition: max-height 0.25s ease, opacity .18s ease;
        opacity: 0;
    }

    .has-dropdown.open .dropdown {
        max-height: 420px;
        opacity: 1;
    }

    /* Mostrar botão de toggle no mobile e melhorar touch target */
    /* .dropdown-toggle {
        display: inline-block;
        width: 44px;
        height: 44px;
        border-radius: 6px;
        display: inline-flex;
        align-items: center;
        justify-content: center;
    } */

    /* Indicador visual do toggle (seta) */
    /* .dropdown-toggle::after {
        content: "";
        display: inline-block;
        width: 0;
        height: 0;
        border-left: 6px solid transparent;
        border-right: 6px solid transparent;
        border-top: 7px solid #ffffff;
        transform: rotate(0deg);
        transition: transform 0.18s ease;
        pointer-events: none;
    } */

    /* Gira ao abrir */
    .has-dropdown.open > .dropdown-link + .dropdown-toggle::after,
    .has-dropdown.open > .dropdown-toggle::after {
        transform: rotate(180deg);
    }

    /* Ajustar largura do link principal no mobile (usa o espaço restante ao lado do toggle) */
    .has-dropdown {
        display: flex;
        flex-direction: column;
        align-items: flex-start;
        justify-content: space-between;
        padding: 0 0.5rem;
    }

    .has-dropdown > .dropdown-link {
        display: inline-block;
        width: 100%;
        padding-left: .4rem;
    }

    /* Reduz o tamanho do logo em telas pequenas */
    .brand img {
        height: 44px;
    }
}
