/* ══════════════════════════════════════════
   DROPDOWN MEGA-MENU — Outros Serviços
   Usado em todas as sub-páginas Ampopar
   Abertura/fechamento controlados via JS
   (js/dropdown.js) — mouseenter/mouseleave
   com grace period de 600 ms
══════════════════════════════════════════ */

/* ── Wrapper (o <li>) ── */
.nav-dropdown-wrap {
    position: relative;
}

.nav-dropdown-wrap > a {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    cursor: pointer;
    white-space: nowrap;
}

/* Seta de caret */
.nav-dropdown-wrap > a .dd-caret {
    font-size: 0.58rem;
    transition: transform 0.22s ease, color 0.22s ease;
    color: rgba(255,255,255,0.4);
    display: inline-block;
}

.nav-dropdown-wrap > a:hover { color: #fff !important; }
.nav-dropdown-wrap > a:hover .dd-caret { color: rgba(255,255,255,0.7); }

/* ─────────────────────────────────────────
   PAINEL — fechado por padrão
   position:fixed e top/left injetados pelo JS
───────────────────────────────────────── */
.nav-dropdown {
    position: fixed;
    top: 88px;
    left: -9999px;          /* escondido até o JS calcular */

    width: 560px;
    max-width: calc(100vw - 24px);
    padding: 18px 18px 16px;

    background: rgba(8, 12, 30, 0.97);
    backdrop-filter: blur(24px);
    -webkit-backdrop-filter: blur(24px);
    border: 1px solid rgba(255,255,255,0.1);
    border-radius: 18px;
    box-shadow:
        0 32px 80px rgba(0,0,0,0.75),
        0 0 0 1px rgba(249,115,22,0.07) inset;
    z-index: 99999;
    margin: 0;
    box-sizing: border-box;

    /* Estado fechado */
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transform: translateY(-6px);
    transition:
        opacity  0.18s ease,
        transform 0.18s ease,
        visibility 0s linear 0.18s;
}

/* Seta decorativa no topo */
.nav-dropdown::before {
    content: '';
    position: absolute;
    top: -7px;
    left: 50%;
    transform: translateX(-50%);
    border-left:   7px solid transparent;
    border-right:  7px solid transparent;
    border-bottom: 7px solid rgba(255,255,255,0.12);
    pointer-events: none;
}

/* ── Estado ABERTO ── */
.nav-dropdown.dd-open {
    opacity: 1;
    visibility: visible;
    pointer-events: all;
    transform: translateY(0);
    transition:
        opacity  0.16s ease,
        transform 0.16s ease,
        visibility 0s linear 0s;
}

/* ── Cabeçalho ── */
.dd-header {
    display: flex;
    align-items: center;
    gap: 10px;
    padding-bottom: 12px;
    margin-bottom: 10px;
    border-bottom: 1px solid rgba(255,255,255,0.06);
}

.dd-header-icon {
    width: 30px; height: 30px; flex-shrink: 0;
    background: linear-gradient(135deg, #f97316, #ea580c);
    border-radius: 8px;
    display: flex; align-items: center; justify-content: center;
    font-size: 0.8rem; color: #fff;
}

.dd-header h4 {
    font-size: 0.77rem; font-weight: 800;
    color: #fff; letter-spacing: 0.03em; margin: 0;
}

.dd-header p {
    font-size: 0.67rem;
    color: rgba(255,255,255,0.38);
    margin: 1px 0 0;
}

/* ── Grid 2 colunas ── */
.dd-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 6px;
    /* Garante que o grid não ultrapasse o painel */
    width: 100%;
    box-sizing: border-box;
}

/* ── Item individual ── */
.dd-item {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    padding: 10px 12px;
    border-radius: 11px;
    text-decoration: none;
    border: 1px solid transparent;
    transition: background 0.18s, border-color 0.18s;
    /* Prevent overflow */
    min-width: 0;
    overflow: hidden;
    box-sizing: border-box;
    /* Reset herança de white-space de qualquer ancestor */
    white-space: normal;
}

.dd-item:hover {
    background: rgba(249,115,22,0.09);
    border-color: rgba(249,115,22,0.22);
}

/* Ícone */
.dd-item-icon {
    width: 36px; height: 36px; flex-shrink: 0;
    border-radius: 9px;
    display: flex; align-items: center; justify-content: center;
    font-size: 1rem;
    transition: transform 0.18s ease;
}
.dd-item:hover .dd-item-icon { transform: scale(1.07); }

/* Texto — ocupa o espaço restante e quebra corretamente */
.dd-item-text {
    flex: 1;
    min-width: 0;          /* essencial para o flex quebrar o texto */
    overflow: hidden;
}

.dd-item-text h5 {
    font-size: 0.81rem;
    font-weight: 700;
    color: #dde2f0;
    margin: 0 0 2px;
    line-height: 1.25;
    white-space: normal;
    overflow-wrap: break-word;
    word-break: break-word;
}

.dd-item-text p {
    font-size: 0.68rem;
    color: rgba(220,224,240,0.42);
    margin: 0;
    line-height: 1.35;
    white-space: normal;
    overflow-wrap: break-word;
    word-break: break-word;
}

.dd-item:hover .dd-item-text h5 { color: #f97316; }

/* ── Rodapé ── */
.dd-footer {
    margin-top: 10px;
    padding-top: 10px;
    border-top: 1px solid rgba(255,255,255,0.06);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
}

.dd-footer-link {
    font-size: 0.69rem;
    color: rgba(255,255,255,0.32);
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 5px;
    transition: color 0.18s;
    white-space: nowrap;
    flex-shrink: 0;
}
.dd-footer-link:hover { color: #f97316; }

.dd-footer-wpp {
    display: inline-flex; align-items: center; gap: 6px;
    background: rgba(37,211,102,0.1);
    border: 1px solid rgba(37,211,102,0.22);
    color: #25D366;
    font-size: 0.69rem; font-weight: 700;
    padding: 5px 13px;
    border-radius: 20px;
    text-decoration: none;
    transition: background 0.18s, transform 0.18s;
    white-space: nowrap;
    flex-shrink: 0;
}
.dd-footer-wpp:hover {
    background: rgba(37,211,102,0.2);
    transform: translateY(-1px);
}

/* ── Mobile: ocultar ── */
@media (max-width: 860px) {
    .nav-dropdown { display: none !important; }
}
