/* Header público — Portal da Educação (paridade com website.php) */
:root {
    --pe-teal: #0e7c9c;
    --pe-teal-dark: #095e78;
    --pe-cyan: #19b2d8;
    --pe-orange: #f7a823;
    --pe-orange-dark: #e08c00;
    --pe-ink: #21343f;
}

.pe-header {
    position: sticky;
    top: 0;
    z-index: 1040;
    background: rgba(255, 255, 255, .92);
    border-bottom: 1px solid rgba(14, 124, 156, .10);
    transition: box-shadow .25s ease;
}

.pe-header::before {
    content: '';
    position: absolute;
    inset: 0;
    z-index: -1;
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
}

.pe-header.scrolled {
    box-shadow: 0 6px 24px rgba(10, 62, 82, .10);
}

.pe-header-inner {
    max-width: 1180px;
    margin: 0 auto;
    padding: 8px 16px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.pe-logo img {
    max-height: 56px;
    height: auto;
    display: block;
}

.pe-nav {
    display: flex;
    align-items: center;
    gap: 4px;
}

.pe-nav a {
    font-weight: 700;
    font-size: .95rem;
    color: var(--pe-ink);
    text-decoration: none;
    padding: 9px 14px;
    border-radius: 999px;
    transition: background .2s ease, color .2s ease;
    white-space: nowrap;
}

.pe-nav a:hover {
    background: rgba(25, 178, 216, .12);
    color: var(--pe-teal);
    text-decoration: none;
}

.pe-nav a.pe-nav-login {
    background: linear-gradient(135deg, var(--pe-orange), var(--pe-orange-dark));
    color: #fff;
    padding: 10px 22px;
    margin-left: 8px;
    box-shadow: 0 6px 16px rgba(247, 168, 35, .35);
}

.pe-nav a.pe-nav-login:hover {
    transform: translateY(-1px);
    color: #fff;
}

.pe-burger {
    display: none;
    background: none;
    border: 2px solid var(--pe-teal);
    border-radius: 12px;
    color: var(--pe-teal);
    font-size: 1.15rem;
    width: 44px;
    height: 44px;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    flex-shrink: 0;
}

.pe-nav-close,
.pe-nav-backdrop {
    display: none;
}

@media (max-width: 991px) {
    .pe-nav {
        position: fixed;
        top: 0;
        right: 0;
        bottom: 0;
        left: auto;
        height: 100vh;
        height: 100dvh;
        width: min(300px, 82vw);
        background: #fff;
        flex-direction: column;
        align-items: flex-start;
        justify-content: flex-start;
        padding: 84px 26px 26px;
        gap: 8px;
        box-shadow: -12px 0 40px rgba(10, 62, 82, .18);
        transform: translateX(110%);
        transition: transform .3s ease;
        z-index: 2010;
        overflow-y: auto;
        visibility: hidden;
    }

    .pe-nav.open {
        transform: translateX(0);
        visibility: visible;
    }

    .pe-nav a {
        width: 100%;
        font-size: 1.05rem;
    }

    .pe-nav a.pe-nav-login {
        margin-left: 0;
        text-align: center;
        display: block;
    }

    .pe-burger {
        display: inline-flex;
    }

    .pe-nav-close {
        display: flex;
        position: absolute;
        top: 18px;
        right: 18px;
        width: 42px;
        height: 42px;
        align-items: center;
        justify-content: center;
        background: rgba(25, 178, 216, .12);
        border: none;
        border-radius: 12px;
        color: var(--pe-teal);
        font-size: 1.1rem;
        cursor: pointer;
    }

    .pe-nav-backdrop {
        position: fixed;
        inset: 0;
        background: rgba(10, 62, 82, .45);
        z-index: 2000;
        opacity: 0;
        pointer-events: none;
        transition: opacity .3s ease;
    }

    .pe-nav-backdrop.show {
        display: block;
        opacity: 1;
        pointer-events: auto;
    }
}

body.pe-menu-open {
    overflow: hidden;
}

/* Voltar ao topo (páginas públicas legadas) */
.pe-top,
.top_to {
    position: fixed;
    right: 22px;
    bottom: 22px;
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--pe-cyan), var(--pe-teal));
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.1rem;
    box-shadow: 0 10px 24px rgba(14, 124, 156, .4);
    cursor: pointer;
    opacity: 0;
    pointer-events: none;
    transition: opacity .25s ease, transform .25s ease;
    z-index: 1030;
}

.pe-top.show,
.top_to.show {
    opacity: 1;
    pointer-events: auto;
}

.top_to span {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
}

/* Tabelas em páginas públicas no mobile */
@media (max-width: 767px) {
    .pe-public-page .main-content-lista {
        padding: 0 8px;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }

    .pe-public-page .table {
        font-size: 0.82rem;
    }

    .pe-public-page .table td,
    .pe-public-page .table th {
        white-space: normal;
        vertical-align: top;
    }
}
