/* ========================= */
/* KNOWLEDGE BASE STYLES     */
/* ========================= */

/* Base: mantém o fundo azul da marca */
body {
    background: var(--brand-blue);
}

/* ---------------------------------------- */
/* 1. SEÇÃO DE TÍTULO (SEM HERO ESPECÍFICO) */
/* ---------------------------------------- */
main > section:first-child {
    padding: 60px 0;
    background: var(--brand-blue);
    color: white;
    position: relative;
    overflow: hidden;
}

main > section:first-child::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(
        135deg,
        rgba(50, 58, 204, 0.95) 0%,
        rgba(42, 48, 179, 0.98) 100%
    );
    z-index: 1;
}

main > section:first-child .content-container {
    position: relative;
    z-index: 2;
}

main > section:first-child h1 {
    font-family: "Dosis", sans-serif;
    font-size: clamp(2.2rem, 5vw, 3.5rem);
    color: var(--brand-yellow);
    margin-bottom: 24px;
    line-height: 1.2;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

main > section:first-child p {
    font-family: "DM Sans", system-ui, sans-serif;
    font-size: clamp(1.1rem, 2vw, 1.3rem);
    color: rgba(255, 255, 255, 0.95);
    line-height: 1.6;
    opacity: 0.95;
}

/* ---------------------------------------- */
/* 2. SEÇÕES DE CONTEÚDO (PADRÃO)           */
/* ---------------------------------------- */
main section:not(:first-child) {
    padding: 80px 0;
    background: white;
}

/* Alternância de fundo */
main section:nth-child(even):not(:first-child) {
    background-color: var(--bg-light);
}

/* Container interno para conteúdo */
.content-container {
    max-width: 800px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Títulos das seções */
main section h2 {
    font-family: "Dosis", sans-serif;
    font-weight: 600;
    color: var(--brand-blue);
    font-size: clamp(1.8rem, 3.5vw, 2.5rem);
    margin-bottom: 30px;
    position: relative;
    padding-bottom: 15px;
}

main section h2::after {
    content: "";
    position: absolute;
    bottom: 0;
    left: 0;
    width: 60px;
    height: 4px;
    background: var(--brand-yellow);
    border-radius: 2px;
}

/* Nas seções pares, a linha pode ser azul */
main section:nth-child(even):not(:first-child) h2::after {
    background: var(--brand-blue);
}

/* Subtítulos h3 */
main section h3 {
    font-family: "Dosis", sans-serif;
    font-weight: 600;
    color: var(--brand-blue);
    font-size: 1.4rem;
    margin: 30px 0 15px 0;
}

main section:nth-child(even):not(:first-child) h3 {
    color: var(--brand-yellow);
}

/* Parágrafos */
main section p {
    font-family: "DM Sans", system-ui, sans-serif;
    font-size: 1.1rem;
    line-height: 1.7;
    margin-bottom: 20px;
    color: var(--ink-700);
}

/* Listas ordenadas */
main section ol {
    padding-left: 25px;
    margin: 30px 0;
    counter-reset: item;
}

main section ol li {
    margin-bottom: 15px;
    padding-left: 10px;
    font-family: "DM Sans", system-ui, sans-serif;
    font-size: 1.1rem;
    line-height: 1.7;
    color: var(--ink-700);
    position: relative;
}

/* Tabelas */
main section table {
    width: 100%;
    border-collapse: collapse;
    margin: 30px 0;
    font-family: "DM Sans", system-ui, sans-serif;
    font-size: 1rem;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    border-radius: 8px;
    overflow: hidden;
}

main section table thead {
    background: var(--brand-blue);
    color: white;
}

main section table th {
    padding: 16px;
    text-align: left;
    font-weight: 600;
    font-family: "Dosis", sans-serif;
    font-size: 1.1rem;
}

main section table td {
    padding: 14px 16px;
    border-bottom: 1px solid #eef0ff;
    color: var(--ink-700);
}

main section table tbody tr:last-child td {
    border-bottom: none;
}

main section table tbody tr:nth-child(even) {
    background-color: #f7f8ff;
}

main section table tbody tr:hover {
    background-color: #eef0ff;
}

/* Links */
main section a {
    color: var(--brand-blue);
    text-decoration: none;
    font-weight: 600;
    border-bottom: 2px solid transparent;
    transition: all 0.2s ease;
    padding-bottom: 2px;
}

main section a:hover {
    color: var(--brand-blue-hero);
    border-bottom-color: #ffaa00;
}

/* Texto em negrito */
main section strong {
    color: var(--brand-blue);
    font-weight: 700;
}

main section:nth-child(even):not(:first-child) strong {
    color: var(--brand-yellow);
}

/* ---------------------------------------- */
/* 3. RESPONSIVIDADE                        */
/* ---------------------------------------- */
@media (max-width: 768px) {
    main > section:first-child {
        padding: 40px 0;
    }

    main > section:first-child h1 {
        font-size: clamp(1.8rem, 4vw, 2.5rem);
    }

    main section:not(:first-child) {
        padding: 60px 0;
    }

    main section h2 {
        font-size: clamp(1.6rem, 4vw, 2.2rem);
    }

    main section p,
    main section ol li {
        font-size: 1rem;
    }

    main section table {
        font-size: 0.9rem;
    }

    main section table th,
    main section table td {
        padding: 12px;
    }
}

@media (max-width: 480px) {
    .content-container {
        padding: 0 15px;
    }

    main section h2 {
        font-size: 1.5rem;
    }

    main section table {
        display: block;
        overflow-x: auto;
    }
}