/* ===========================================================
   style.css — Material de Aula
   Folha de estilos externa para a página "Material Aula"
   =========================================================== */

:root {
    --cor-fundo: #f4f6f9;
    --cor-caixa: #ffffff;
    --cor-texto: #2b2f38;
    --cor-titulo: #1a3d63;
    --cor-subtitulo: #3a6ea5;
    --cor-link: #1d5da6;
    --cor-link-hover: #123f73;
    --cor-borda: #dfe4ea;
    --cor-item-hover: #eef3fa;
    --fonte-base: "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    padding: 2.5rem 1rem;
    background-color: var(--cor-fundo);
    color: var(--cor-texto);
    font-family: var(--fonte-base);
    line-height: 1.6;
}

/* Container central para limitar a largura do conteúdo */
body > * {
    max-width: 820px;
    margin-left: auto;
    margin-right: auto;
}

h1 {
    color: var(--cor-titulo);
    font-size: 1.9rem;
    font-weight: 700;
    border-bottom: 3px solid var(--cor-subtitulo);
    padding-bottom: 0.4rem;
    margin-top: 2.5rem;
    margin-bottom: 1rem;
}

h1:first-of-type {
    margin-top: 0;
}

h2 {
    color: var(--cor-subtitulo);
    font-size: 1.25rem;
    font-weight: 600;
    margin-top: 1.8rem;
    margin-bottom: 0.6rem;
}

hr {
    max-width: 820px;
    margin: 2.5rem auto;
    border: none;
    border-top: 1px solid var(--cor-borda);
}

ol {
    background-color: var(--cor-caixa);
    border: 1px solid var(--cor-borda);
    border-radius: 8px;
    padding: 0.75rem 1rem 0.75rem 2.5rem;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

li {
    padding: 0.45rem 0.5rem;
    border-radius: 4px;
    transition: background-color 0.15s ease;
}

li:not(:last-child) {
    border-bottom: 1px solid var(--cor-borda);
}

li:hover {
    background-color: var(--cor-item-hover);
}

a {
    color: var(--cor-link);
    text-decoration: none;
}

a:hover,
a:focus {
    color: var(--cor-link-hover);
    text-decoration: underline;
}

a::before {
    content: "\f1c1";
    font-family: "Font Awesome 7 Free";
    font-weight: 900;
    margin-right: 0.5rem;
    color: var(--cor-subtitulo);
    font-size: 0.9em;
}

details.secao {
    margin-top: 2.5rem;
}

details.secao:first-of-type {
    margin-top: 0;
}

details.subsecao {
    margin-top: 1.8rem;
}

details.subsecao:first-of-type {
    margin-top: 1rem;
}

summary {
    cursor: pointer;
    list-style: none;
    display: flex;
    align-items: center;
    gap: 0.7rem;
    user-select: none;
}

summary::-webkit-details-marker {
    display: none;
}

summary::before {
    content: "▸";
    display: inline-block;
    color: var(--cor-subtitulo);
    line-height: 1;
    transition: transform 0.15s ease;
    flex-shrink: 0;
}

details.secao > summary::before {
    font-size: 2rem;
}

details.subsecao > summary::before {
    font-size: 1.4rem;
}

details[open] > summary::before {
    transform: rotate(90deg);
}

details.secao > summary h1,
details.subsecao > summary h2 {
    margin-top: 0;
    flex: 1;
}

details.secao > summary:hover h1,
details.subsecao > summary:hover h2 {
    color: var(--cor-link-hover);
}

details.secao > summary h1 i,
details.subsecao > summary h2 i {
    margin-right: 0.55rem;
    font-size: 0.8em;
    color: var(--cor-subtitulo);
}

.contador,
.contador-vazio {
    color: var(--cor-subtitulo);
    font-weight: 400;
    font-size: 0.6em;
    opacity: 0.75;
    white-space: nowrap;
}

.barra-acoes {
    max-width: 820px;
    margin: 0 auto 1.5rem auto;
    display: flex;
    justify-content: flex-end;
    gap: 0.75rem;
}

.barra-acoes button {
    font-family: var(--fonte-base);
    font-size: 0.85rem;
    color: var(--cor-link);
    background: none;
    border: 1px solid var(--cor-borda);
    border-radius: 6px;
    padding: 0.35rem 0.8rem;
    cursor: pointer;
    transition: background-color 0.15s ease, color 0.15s ease;
}

.barra-acoes button:hover {
    background-color: var(--cor-item-hover);
    color: var(--cor-link-hover);
}

/* Ajustes para telas menores */
@media (max-width: 600px) {
    body {
        padding: 1.5rem 0.75rem;
    }

    h1 {
        font-size: 1.5rem;
    }

    ol {
        padding-left: 1.75rem;
    }
}
