/* PÁGINA DE MATEMÁTICA — PADRÃO REFORÇA LIBRAS */
:root {
    --gold-primary: gold;
    --gold-hover-gradient: linear-gradient(101deg, darkgoldenrod, khaki, peru, sandybrown);
    --blue-primary: #2f80ed;
    --blue-soft: #A0C4DF;
    --navy-dark: #1d3557;
    --dark-bg: #000000;
    --font-main: 'Nunito', sans-serif;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

body {
    min-height: 100vh;
    font-family: var(--font-main);
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    background-attachment: fixed;
    overflow-x: hidden;
}

/* ==========================
   TOPO PADRÃO REFORÇA LIBRAS
========================== */
/* ==========================
   CABEÇALHO PADRÃO DO INDEX
========================== */

.menu.topo {
    position: sticky;
    top: 0;

    width: 100%;
    min-height: 96px;

    display: flex;
    align-items: center;
    justify-content: center;

    padding: 12px 70px;

    background: #000000;
    color: white;

    border-bottom: 2px solid gold;

    box-shadow:
        0 3px 15px
        rgba(0, 0, 0, 0.4);

    z-index: 999;
}

.cabecalho-interno {
    display: flex;
    align-items: center;
    justify-content: center;

    gap: 20px;

    width: 100%;
    max-width: 1400px;
}

/* Logo com o mesmo tamanho do index */

.menu.topo .logo-area {
    display: flex;
    align-items: center;
    justify-content: center;
}

.menu.topo .logo-area img {
    display: block;

    width: auto;
    height: 70px;
    max-width: 180px;
    max-height: 70px;

    object-fit: contain;
}

.menu.topo h1 {
    margin: 0;

    color: white;

    font-family: var(--font-main);
    font-size: clamp(30px, 4vw, 42px);
    font-weight: 900;
    text-align: center;
}


/* ==========================
   BOTÃO VOLTAR
========================== */

.topo .btn-voltar {
    position: absolute;

    top: 50%;
    left: 20px;

    transform: translateY(-50%);

    width: 40px;
    height: 40px;

    display: flex;
    justify-content: center;
    align-items: center;

    margin: 0;
    padding: 0;

    background: transparent;
    border: none;
    border-radius: 50%;

    cursor: pointer;
    z-index: 10;

    transition: transform 0.2s ease;
}

.topo .btn-voltar .btn-voltar-img {
    display: block;

    width: 34px;
    height: 34px;
    max-width: 34px;
    max-height: 34px;

    margin: 0;
    padding: 0;

    object-fit: contain;
}

.topo .btn-voltar:hover {
    transform:
        translateY(-50%)
        scale(1.08);

    background: transparent;
}

.topo .btn-voltar:active {
    transform:
        translateY(-50%)
        scale(0.95);
}

main {
    width: 100%;
    max-width: 1400px;
    min-height: 65vh;

    margin: auto;
    padding: 40px 20px 20px;
}
.apresentacao {
    max-width: 820px;
    margin: 0 auto 30px;
    padding: 25px;
    background: rgba(255, 255, 255, 0.95);
    border: 2px solid var(--gold-primary);
    border-radius: 25px;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.3);
    text-align: center;
}

.etiqueta {
    margin-bottom: 6px;
    color: var(--blue-primary);
    font-size: 13px;
    font-weight: 900;
    letter-spacing: 2px;
}

.apresentacao h2 {
    margin-bottom: 10px;
    color: var(--navy-dark);
    font-size: clamp(25px, 4vw, 36px);
}

.apresentacao > p:last-child { color: #333; line-height: 1.6; }

.ferramentas {
    max-width: 1050px;
    margin: 0 auto 30px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
}

.campo-pesquisa {
    width: 100%;
    max-width: 420px;
    height: 42px;
    display: flex;
    align-items: center;
    overflow: hidden;
    background: #FFFFFF;
    border: 2px solid var(--blue-soft);
    border-radius: 20px;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.05);
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

.campo-pesquisa:focus-within {
    border-color: #D4AF37;
    box-shadow: 0 0 6px rgba(212, 175, 55, 0.3);
}

.campo-pesquisa span {
    margin: 0 5px 0 12px;
    color: var(--navy-dark);
    font-size: 20px;
    font-weight: bold;
}

#pesquisa-conteudo {
    flex: 1;
    height: 100%;
    padding: 0 10px;
    background: transparent;
    color: #4A4A4A;
    border: none;
    outline: none;
    font-family: var(--font-main);
    font-size: 14px;
}

#pesquisa-conteudo::placeholder { color: #A0A0A0; }

#quantidade-conteudos {
    padding: 8px 15px;
    background: white;
    color: var(--navy-dark);
    border: 2px solid var(--gold-primary);
    border-radius: 20px;
    font-weight: bold;
    white-space: nowrap;
}



/* ==========================
   LISTA DE CONTEÚDOS
========================== */

.grade-conteudos {
    width: 100%;
    max-width: 900px;

    margin: 0 auto;

    display: flex;
    flex-direction: column;

    gap: 18px;
}


/* ==========================
   CARDS — PADRÃO POTENCIAÇÃO
========================== */

.card-conteudo {
    position: relative;

    width: 100%;
    min-height: auto;

    display: grid;

    grid-template-columns:
        55px
        minmax(0, 1fr);

    gap: 18px;

    padding: 21px;

    overflow: visible;

    background: white;

    border: 2px solid #d5e6ed;
    border-radius: 23px;

    box-shadow:
        0 8px 20px
        rgba(29, 53, 87, 0.12);

    transition:
        transform 0.2s ease,
        box-shadow 0.2s ease;
}

.card-conteudo:hover {
    transform: translateY(-3px);

    box-shadow:
        0 10px 24px
        rgba(29, 53, 87, 0.18);
}


/* CÍRCULO DO CONTEÚDO */

.card-topo {
    width: 55px;
    height: 55px;

    display: flex;
    align-items: center;
    justify-content: center;

    flex-shrink: 0;

    background: var(--navy-dark);
    color: white;

    border: 2px solid var(--gold-primary);
    border-radius: 50%;

    font-size: 22px;
    font-weight: 900;
}


/* CONTEÚDO DO CARD */

.card-corpo {
    min-width: 0;

    display: flex;
    flex-direction: column;

    padding: 0;
}

.card-meta {
    display: flex;
    justify-content: flex-start;
    align-items: center;
    flex-wrap: wrap;

    gap: 8px;

    margin-bottom: 5px;

    color: var(--blue-primary);

    font-size: 10px;
    font-weight: 900;

    letter-spacing: 1px;
    text-transform: uppercase;
}

.card-conteudo h3 {
    margin: 0 0 7px;

    color: var(--navy-dark);

    font-size: 21px;
    font-weight: 900;
}

.card-conteudo p {
    margin: 0 0 16px;

    color: #637582;

    font-size: 14px;
    line-height: 1.5;
}


/* ==========================
   BOTÕES DOS CARDS
========================== */

.card-acoes {
    display: flex;
    justify-content: flex-end;
    flex-wrap: wrap;

    gap: 10px;

    margin-top: auto;
    padding-top: 4px;
}

.botao-card {
    min-width: 190px;

    display: flex;
    align-items: center;
    justify-content: center;

    padding: 11px 14px;

    background: var(--blue-soft);
    color: var(--navy-dark);

    border: 1px solid #93c6db;
    border-radius: 18px;

    font-family: var(--font-main);
    font-size: 13px;
    font-weight: 900;

    text-align: center;
    text-decoration: none;

    transition:
        transform 0.2s ease,
        background 0.2s ease;
}

.botao-card.secundario {
    background: var(--navy-dark);
    color: white;

    border: 1px solid var(--gold-primary);
}

.botao-card:hover,
.botao-card.secundario:hover {
    transform: translateY(-2px);
}

.botao-card:hover {
    background: #b8d9e8;
    color: var(--navy-dark);
}

.botao-card.secundario:hover {
    background: #294b72;
    color: white;
}


/* ETIQUETA NOVO */

.novo {
    position: absolute;

    top: 12px;
    right: 12px;

    z-index: 2;

    padding: 5px 10px;

    background: var(--gold-primary);
    color: black;

    border: 1px solid var(--navy-dark);
    border-radius: 20px;

    font-size: 10px;
    font-weight: 900;
}

/* Paginação */
.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    flex-wrap: wrap;
    gap: 7px;
    margin: 40px auto 0;
}

.pagination button {
    min-width: 42px;
    height: 42px;
    padding: 8px 14px;
    background: white;
    color: black;
    border: 2px solid var(--gold-primary);
    border-radius: 14px;
    font-family: var(--font-main);
    font-size: 15px;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s ease;
}

.pagination button.active {
    background: var(--blue-primary);
    color: white;
    border-color: var(--blue-primary);
}

.pagination button:hover:not(.active):not(:disabled) {
    transform: translateY(-3px);
    background: var(--gold-hover-gradient);
    color: black;
}

.pagination button:disabled {
    opacity: 0.45;
    cursor: not-allowed;
}

.pagination[hidden] { display: none; }

.sem-resultados {
    max-width: 600px;
    margin: 30px auto;
    padding: 30px;
    background: white;
    color: #333;
    border: 2px solid var(--gold-primary);
    border-radius: 25px;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.3);
    text-align: center;
}

.sem-resultados span { font-size: 45px; }
.sem-resultados h3 { margin: 8px 0; color: var(--navy-dark); }




footer {
    background: var(--dark-bg);
    color: white;
    text-align: center;

    padding: 25px;
    margin-top: 60px;

    border-top: 2px solid var(--gold-primary);

    font-weight: bold;
}

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

@media (max-width: 700px) {
    .menu.topo {
        min-height: 86px;
        padding: 10px 55px;
    }

    .cabecalho-interno {
        gap: 10px;
    }

    .menu.topo .logo-area img {
        width: auto;
        height: 58px;
        max-height: 58px;
    }

    .menu.topo h1 {
        font-size: 27px;
    }

    .topo .btn-voltar {
        left: 12px;
    }

    main {
        padding: 30px 15px 10px;
    }

    .ferramentas {
        flex-direction: column;
        align-items: stretch;
        gap: 10px;
    }

    .campo-pesquisa {
        max-width: none;
    }

    #quantidade-conteudos {
        align-self: flex-start;
    }

    .grade-conteudos {
        width: 100%;
        max-width: 100%;
    }

    .card-conteudo {
        width: 100%;
        grid-template-columns: 48px minmax(0, 1fr);
        gap: 13px;
        padding: 17px;
    }

    .card-topo {
        width: 48px;
        height: 48px;
        font-size: 19px;
    }

    .card-conteudo h3 {
        padding-right: 35px;
        font-size: 19px;
    }

    .card-acoes {
        grid-column: 1 / -1;
        flex-direction: column;
        padding-top: 8px;
    }

    .botao-card {
        width: 100%;
        min-width: 0;
    }
}