/* ===================================
   SEMPRE LOGADO - HEADER CSS
   Estilo: Moderno Minimalista
   ================================= */

/* ── WRAPPER ── */
.header-wrapper {
    position: sticky;
    top: 0;
    z-index: 1000;
    background: rgba(255, 255, 255, 0.97);
    box-shadow: 0 1px 0 rgba(0, 0, 0, 0.07);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    transition: box-shadow 0.3s ease;
}

/* ── HEADER ── */
.header {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 48px;
    height: 100px;
    display: flex;
    align-items: center;
    position: relative;
}

/* ── LOGO ── */
.header__heading {
    margin: 0;
    padding: 0;
    flex-shrink: 0;
    position: absolute;
    left: 48px;
    top: 50%;
    transform: translateY(-50%);
    z-index: 2;
}

.header__heading-link {
    display: inline-block;
    line-height: 0;
}

.header__heading-logo {
    height: 90px;
    width: auto;
    transition: opacity 0.2s ease;
}

.header__heading-link:hover .header__heading-logo {
    opacity: 0.85;
}

/* ── NAVIGATION ── */
.header__inline-menu {
    width: 100%;
    padding: 0;
    border-top: none;
}

.list-menu {
    list-style: none;
    margin: 0;
    padding: 0;
}

.list-menu--inline {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 0;
    flex-wrap: wrap;
}

.list-menu__item {
    margin: 0;
    opacity: 0;
    transform: translateY(-6px);
    animation: navFadeIn 0.4s ease forwards;
}

.list-menu__item:nth-child(1) { animation-delay: 0.10s; }
.list-menu__item:nth-child(2) { animation-delay: 0.17s; }
.list-menu__item:nth-child(3) { animation-delay: 0.24s; }
.list-menu__item:nth-child(4) { animation-delay: 0.31s; }
.list-menu__item:nth-child(5) { animation-delay: 0.38s; }
.list-menu__item:nth-child(6) { animation-delay: 0.45s; }

@keyframes navFadeIn {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ── LINKS ── */
.list-menu__item--link {
    display: block;
    padding: 10px 18px;
    color: #1a1a1a;
    font-weight: 500;
    font-size: 0.9rem;
    text-decoration: none;
    font-family: 'Poppins', sans-serif;
    letter-spacing: 0.01em;
    position: relative;
    transition: color 0.25s ease;
}

/* Underline que cresce do centro */
.list-menu__item--link::after {
    content: '';
    position: absolute;
    bottom: 4px;
    left: 50%;
    transform: translateX(-50%);
    width: 0;
    height: 1.5px;
    background: #007acc;
    border-radius: 2px;
    transition: width 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.list-menu__item--link:hover {
    color: #007acc;
    background-color: transparent;
}

.list-menu__item--link:hover::after {
    width: calc(100% - 36px);
}

/* ── LOJA ONLINE – BOTÃO CTA ── */
.list-menu__item:last-child .list-menu__item--link {
    background: #007acc;
    color: #ffffff;
    border-radius: 6px;
    padding: 9px 20px;
    margin-left: 8px;
    transition: background 0.2s ease, transform 0.15s ease, color 0.2s ease;
}

.list-menu__item:last-child .list-menu__item--link::after {
    display: none;
}

.list-menu__item:last-child .list-menu__item--link:hover {
    background: #005fa3;
    color: #ffffff;
    transform: translateY(-1px);
}

/* ── DROPDOWN CHEVRON ── */
.dropdown-chevron {
    display: inline-block;
    vertical-align: middle;
    margin-left: 3px;
    transition: transform 0.25s ease;
}

.list-menu__item--has-dropdown:hover .dropdown-chevron {
    transform: rotate(180deg);
}

/* ── DROPDOWN MENU ── */
.list-menu__item--has-dropdown {
    position: relative;
}

/* Ponte invisível entre o link e o dropdown para não perder o hover */
.list-menu__item--has-dropdown::after {
    content: '';
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    height: 14px;
    background: transparent;
    display: none;
}

.list-menu__item--has-dropdown:hover::after {
    display: block;
}

.dropdown-menu {
    position: absolute;
    top: calc(100% + 14px);
    left: 50%;
    transform: translateX(-50%) translateY(-6px);
    background: #ffffff;
    border-radius: 10px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.10), 0 1px 0 rgba(0, 0, 0, 0.04);
    min-width: 210px;
    list-style: none;
    padding: 8px;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.2s ease, transform 0.2s ease;
    z-index: 100;
}

.list-menu__item--has-dropdown:hover .dropdown-menu {
    opacity: 1;
    pointer-events: all;
    transform: translateX(-50%) translateY(0);
}

.dropdown-menu li a {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 12px;
    border-radius: 6px;
    font-family: 'Poppins', sans-serif;
    font-size: 0.875rem;
    font-weight: 400;
    color: #1a1a1a;
    text-decoration: none;
    transition: background 0.15s ease, color 0.15s ease;
}

.dropdown-menu li a:hover {
    background: #f0f7ff;
    color: #007acc;
}

.dropdown-logo {
    height: 20px;
    width: auto;
    object-fit: contain;
}

/* ── MOBILE TOGGLE – ESCONDIDO EM DESKTOP ── */
.mobile-menu-toggle {
    display: none;
}

/* ===================================
   RESPONSIVIDADE
   =================================== */

@media (max-width: 1100px) {
    .list-menu__item--link {
        padding: 10px 13px;
        font-size: 0.875rem;
    }
}

@media (max-width: 768px) {
    .header {
        flex-direction: row;
        justify-content: center;
        align-items: center;
        padding: 0 20px;
        height: 70px;
    }

    .header__heading {
        position: static;
        transform: none;
        top: auto;
        left: auto;
    }

    .header__heading-logo {
        height: 60px;
    }

    /* BOTÃO HAMBÚRGUER */
    .mobile-menu-toggle {
        display: flex !important;
        flex-direction: column;
        justify-content: center;
        align-items: center;
        gap: 5px;
        background: none;
        border: none;
        cursor: pointer;
        padding: 10px;
        position: absolute;
        left: 20px;
        top: 50%;
        transform: translateY(-50%);
        width: 40px;
        height: 40px;
        z-index: 1001;
    }

    .mobile-menu-toggle span {
        display: block !important;
        width: 25px !important;
        height: 3px !important;
        background-color: #007acc !important;
        border-radius: 2px;
        transition: all 0.3s ease;
    }

    .mobile-menu-toggle.active span:nth-child(1) {
        transform: rotate(45deg) translate(5px, 5px);
    }

    .mobile-menu-toggle.active span:nth-child(2) {
        opacity: 0;
    }

    .mobile-menu-toggle.active span:nth-child(3) {
        transform: rotate(-45deg) translate(6px, -6px);
    }

    /* MENU MOBILE */
    .header__inline-menu {
        display: none;
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background: #ffffff;
        box-shadow: 0 4px 16px rgba(0, 0, 0, 0.10);
        z-index: 999;
    }

    .header__inline-menu.active {
        display: block;
    }

    .list-menu--inline {
        flex-direction: column;
        align-items: stretch;
    }

    /* Reset animações no mobile */
    .list-menu__item {
        opacity: 1;
        transform: none;
        animation: none;
    }

    .list-menu__item--link {
        padding: 15px 20px;
        border-bottom: 1px solid #eeeeee;
        font-size: 0.9375rem;
    }

    .list-menu__item--link::after {
        display: none;
    }

    /* Reset CTA mobile */
    .list-menu__item:last-child .list-menu__item--link {
        background: transparent;
        color: #1a1a1a;
        margin-left: 0;
        border-radius: 0;
        border-bottom: none;
        transform: none;
        padding: 15px 20px;
    }

    .list-menu__item:last-child .list-menu__item--link:hover {
        color: #007acc;
        transform: none;
    }

    /* Dropdown mobile */
    .dropdown-menu {
        position: static;
        transform: none;
        box-shadow: none;
        border-radius: 0;
        opacity: 1;
        pointer-events: all;
        display: none;
        padding: 0;
        border-top: 1px solid #eeeeee;
    }

    .list-menu__item--has-dropdown.active .dropdown-menu {
        display: block;
    }

    .dropdown-menu li a {
        padding: 12px 32px;
        border-radius: 0;
        border-bottom: 1px solid #f5f5f5;
        font-size: 0.875rem;
        color: #444;
    }
}

@media (max-width: 480px) {
    .header__heading-logo {
        height: 52px;
    }

    .mobile-menu-toggle {
        left: 15px;
    }
}

/* Garantir visibilidade quando animações são desativadas (prefers-reduced-motion) */
@media (prefers-reduced-motion: reduce) {
    .list-menu__item {
        opacity: 1 !important;
        transform: none !important;
        animation: none !important;
    }
}

/* ── DROPDOWN CLICK-BASED (páginas internas) ── */
.list-menu__item--dropdown-toggle { display: flex; align-items: center; gap: 5px; cursor: pointer; user-select: none; }
.list-menu__item--has-dropdown.is-open .dropdown-chevron { transform: rotate(180deg); }
.dropdown-menu {
    display: none; position: absolute; top: calc(100% + 10px); left: 50%;
    transform: translateX(-50%); background-color: #fff; border-radius: 8px;
    box-shadow: 0 8px 30px rgba(0,0,0,0.12); min-width: 180px;
    list-style: none; margin: 0; padding: 8px 0; z-index: 1000;
    border: 1px solid rgba(0,0,0,0.07);
}
.dropdown-menu::before {
    content: ''; position: absolute; top: -6px; left: 50%; transform: translateX(-50%);
    border-left: 6px solid transparent; border-right: 6px solid transparent;
    border-bottom: 6px solid #fff; filter: drop-shadow(0 -2px 2px rgba(0,0,0,0.06));
}
.list-menu__item--has-dropdown.is-open .dropdown-menu { display: block; }
.dropdown-menu__link {
    display: flex; align-items: center; gap: 10px;
    padding: 10px 18px; color: #333; text-decoration: none;
    font-size: 0.9rem; font-weight: 500;
    transition: background-color 0.15s ease, color 0.15s ease;
    white-space: nowrap;
}
.dropdown-menu__link:hover { background-color: #f0f7ff; color: #007acc; }
.dropdown-menu__link.active { color: #007acc; font-weight: 600; background-color: #f0f7ff; }
.dropdown-logo {
    width: 26px; height: 26px; object-fit: contain;
    border-radius: 5px; flex-shrink: 0; background: #f0f4f8;
}
.dropdown-logo-placeholder {
    width: 26px; height: 26px; border-radius: 5px; flex-shrink: 0;
    background: linear-gradient(135deg, #0066cc, #003d99);
    display: flex; align-items: center; justify-content: center;
    font-size: 11px; font-weight: 700; color: #fff; letter-spacing: -.5px;
}
@media (max-width: 992px) {
    .dropdown-menu {
        position: static; transform: none !important; box-shadow: none; border: none;
        border-left: 3px solid #007acc; border-radius: 0;
        background-color: rgba(0,122,204,0.05); padding: 4px 0; margin: 4px 0 4px 12px;
    }
    .dropdown-menu::before { display: none; }
    .dropdown-menu__link { padding: 8px 14px; font-size: 0.95rem; }
}
