/* ===== Header padrão AFR Advocacia (usado em todas as páginas) ===== */
:root {
    --afr-header-h: 82px;
}

.afr-header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    box-sizing: border-box;
    width: 100%;
    height: var(--afr-header-h);
    margin: 0;
    padding: 0 2rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    background: #1a1a1a;
    border: none;
    border-radius: 0;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.25);
    font-family: 'Segoe UI', system-ui, -apple-system, Arial, sans-serif;
}

/* Reserva no fluxo a altura do header fixo. */
.afr-header__spacer {
    height: var(--afr-header-h);
    flex: none;
}

.afr-header__brand {
    display: flex;
    align-items: center;
    gap: 15px;
    min-width: 0;
    color: #ffffff;
    text-decoration: none;
    background: none;
    padding: 0;
}

.afr-header__brand img {
    height: 50px;
    width: auto;
    display: block;
    flex: none;
}

.afr-header__name {
    font-size: 1.8rem;
    font-weight: 700;
    line-height: 1;
    color: #ffffff;
    white-space: nowrap;
}

.afr-header__toggle {
    display: none;
    width: 44px;
    height: 44px;
    padding: 0;
    border: none;
    background: none;
    color: #ffffff;
    cursor: pointer;
    align-items: center;
    justify-content: center;
}

.afr-header__toggle svg {
    width: 26px;
    height: 26px;
    fill: currentColor;
    display: block;
}

.afr-header__toggle .afr-icon-close { display: none; }
.afr-header__toggle[aria-expanded="true"] .afr-icon-open { display: none; }
.afr-header__toggle[aria-expanded="true"] .afr-icon-close { display: block; }

.afr-header__nav ul {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    list-style: none;
    margin: 0;
    padding: 0;
}

.afr-header__nav li { margin: 0; }

.afr-header__nav a {
    display: block;
    padding: 0;
    color: #ffffff;
    font-size: 1rem;
    font-weight: 500;
    text-decoration: none;
    border: none;
    background: none;
    transition: color 0.3s;
}

.afr-header__nav a:hover,
.afr-header__nav a:focus {
    color: #c98a52;
    text-decoration: none;
}

.afr-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 998;
}

.afr-overlay.is-open { display: block; }

@media (max-width: 900px) {
    :root { --afr-header-h: 72px; }

    .afr-header { padding: 0 1rem; }

    .afr-header__brand img { height: 40px; }

    .afr-header__name { font-size: 1.3rem; }

    .afr-header__toggle { display: flex; }

    .afr-header__nav {
        position: fixed;
        top: var(--afr-header-h);
        left: -100%;
        width: 80%;
        max-width: 320px;
        height: calc(100vh - var(--afr-header-h));
        padding: 24px 20px;
        background: #1a1a1a;
        z-index: 999;
        overflow-y: auto;
        transition: left 0.3s ease;
    }

    .afr-header__nav.is-open { left: 0; }

    .afr-header__nav ul {
        flex-direction: column;
        align-items: flex-start;
        gap: 0;
    }

    .afr-header__nav li { width: 100%; }

    .afr-header__nav a {
        padding: 15px 0;
        font-size: 1.05rem;
    }
}

@media (max-width: 380px) {
    .afr-header__name { font-size: 1.1rem; }
}
