* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --azulEscuro: #173C7D;
    --azulClaro: #4360A4;
    --verde: #65CB93;
    --verde-escuro: #39855b;
    --corFundo: #E6EDEA;
}

body {
    background: linear-gradient(135deg, #E6EDEA 0%, #d4e4de 100%);
    font-family: "Poppins", sans-serif;
    color: #333;
    overflow-x: hidden;
}

body.menu-open {
    overflow: hidden;
}

/* ==================== CABEÇALHO ATUALIZADO ==================== */
.Cabecalho {
    background: var(--azulClaro);
    position: fixed;
    display: flex;
    left: 50%;
    transform: translateX(-50%);
    align-items: center;
    justify-content: space-between;
    padding: 1rem 2%;
    margin: 1rem 0;
    width: 90%;
    max-width: 1400px;
    border-radius: 12px;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
    z-index: 10000;
    top: 0;
}

.logoCabecalho img {
    height: 60px;
    width: 90px;
    border-radius: 20px;
    transition: transform 0.3s ease;
}

.logoCabecalho img:hover {
    transform: scale(1.05);
}

.navCabecalho ul {
    list-style: none;
    display: flex;
    gap: 1.5rem;
    margin: 0;
    padding: 0;
}

.navCabecalho a {
    text-decoration: none;
    color: #fff;
    font-weight: 700;
    font-size: 0.95rem;
    transition: 0.3s;
    position: relative;
    white-space: nowrap;
}

/* Linha verde embaixo dos links */
.navCabecalho a::after {
    content: "";
    position: absolute;
    width: 0;
    height: 1px;
    bottom: -4px;
    left: 0;
    background-color: var(--verde);
    transition: width 0.3s;
}

.navCabecalho a:hover::after,
.navCabecalho a.ativo::after {
    width: 100%;
}

/* Link ativo em verde */
.navCabecalho a.ativo {
    color: var(--verde);
}

.menu-mobile-wrapper {
    display: flex;
    align-items: center;
    gap: 1.5rem;
}

.doeAgora {
    background: var(--verde);
    color: #fff;
    padding: 0.8rem 2rem;
    border-radius: 25px;
    font-weight: 600;
    font-size: 0.9rem;
    text-decoration: none;
    transition: all 0.3s;
}

.doeAgora:hover {
    background: var(--verde-escuro);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(101, 203, 147, 0.3);
}

.menu-toggle {
    display: none;
    background: none;
    border: none;
    cursor: pointer;
    padding: 0.8rem;
    min-width: 48px;
    min-height: 48px;
    position: relative;
    z-index: 10002;
}

.menu-toggle span {
    display: block;
    width: 25px;
    height: 3px;
    background: #fff;
    margin: 5px 0;
    transition: 0.3s;
    border-radius: 3px;
}

/* ==================== CONTEÚDO PRINCIPAL ==================== */
main {
    padding-top: 7rem;
}

.main-content {
    width: 90%;
    max-width: 1000px;
    margin: 2rem auto 5rem auto;
    background: #fff;
    border-radius: 16px;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.1);
    padding: 2rem;
}

.section-title {
    text-align: center;
    color: var(--azulEscuro);
    font-size: 1.8rem;
    font-weight: 700;
    margin-bottom: 2rem;
    text-decoration: underline;
    text-decoration-color: var(--verde);
    text-underline-offset: 8px;
}

.search-container {
    display: flex;
    margin-bottom: 2rem;
    gap: 0.5rem;
}

#searchInput {
    flex: 1;
    padding: 0.8rem 1rem;
    border: 1px solid #ddd;
    border-radius: 8px;
    font-family: "Poppins", sans-serif;
    font-size: 1rem;
    transition: border-color 0.3s;
}

#searchInput:focus {
    outline: none;
    border-color: var(--azulClaro);
}

#searchButton {
    background: var(--azulClaro);
    color: white;
    border: none;
    border-radius: 8px;
    padding: 0 1.5rem;
    font-family: "Poppins", sans-serif;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
}

#searchButton:hover {
    background: var(--azulEscuro);
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
}

.category-item {
    background: var(--azulClaro);
    color: #fff;
    padding: 1rem;
    border-radius: 12px;
    font-weight: 600;
    font-size: 1.1rem;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: all 0.3s;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    margin-bottom: 0.5rem;
}

.category-item:hover {
    background: var(--azulEscuro);
    transform: translateY(-2px);
    box-shadow: 0 6px 12px rgba(0, 0, 0, 0.15);
}

.category-header {
    display: flex;
    flex-direction: column;
    gap: 0.3rem;
}

.category-header h3 {
    margin: 0;
    font-size: 1rem;
}

.document-count {
    font-size: 0.75rem;
    opacity: 0.8;
    font-weight: 400;
}

.chevron-icon {
    font-size: 1rem;
    transition: transform 0.3s;
}

.category-item.active .chevron-icon {
    transform: rotate(90deg);
}

.accordion-content {
    display: none;
    background: #f9f9f9;
    border-radius: 0 0 12px 12px;
    padding: 0;
    margin-top: -0.5rem;
    margin-bottom: 1rem;
    box-shadow: inset 0 2px 6px rgba(0, 0, 0, 0.05);
    overflow: hidden;
    animation: slideDown 0.3s ease-out;
}

@keyframes slideDown {
    from {
        max-height: 0;
        opacity: 0;
    }
    to {
        max-height: 1000px;
        opacity: 1;
    }
}

.accordion-content.active {
    display: block;
}

.documents-table {
    overflow-x: auto;
    padding: 1.5rem;
}

.documents-table table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 0;
}

.documents-table th,
.documents-table td {
    padding: 1rem;
    text-align: left;
    border-bottom: 1px solid #eee;
}

.documents-table th {
    background-color: var(--azulClaro);
    color: white;
    font-weight: 600;
}

.documents-table tr:hover {
    background-color: #f5f5f5;
}

.document-link {
    color: var(--azulClaro);
    text-decoration: none;
    font-weight: 600;
    padding: 0.4rem 0.8rem;
    border-radius: 4px;
    background-color: rgba(67, 96, 164, 0.1);
    transition: all 0.2s;
    display: inline-block;
}

.document-link:hover {
    color: var(--azulEscuro);
    background-color: rgba(67, 96, 164, 0.2);
    transform: translateY(-1px);
}

/* ==================== FOOTER ATUALIZADO ==================== */
.footer-ccb {
    background: var(--azulClaro);
    color: #fff;
    margin-top: 4rem;
    padding: 0;
}

.footer-container {
    display: flex;
    justify-content: space-between;
    max-width: 1200px;
    margin: 0 auto;
    padding: 2.5rem 2rem;
    gap: 2rem;
    flex-wrap: wrap;
}

.footer-col {
    flex: 1 1 250px;
    min-width: 220px;
}

.footer-logo {
    width: 120px;
    border-radius: 12px;
    margin-bottom: 1rem;
}

.footer-logo-info p {
    font-size: 1rem;
    color: #e0e0e0;
    margin-bottom: 0.5rem;
}

.footer-nav h3,
.footer-contato h1 {
    font-size: 1.3rem;
    margin-bottom: 1rem;
    font-weight: 700;
}

.footer-nav ul {
    list-style: none;
    padding: 0;
}

.footer-nav li {
    margin-bottom: 0.5rem;
}

.footer-nav a {
    color: #fff;
    text-decoration: none;
    transition: color 0.2s;
}

.footer-nav a:hover {
    color: var(--verde);
}

.footer-contato {
    background: var(--azulEscuro);
    border-radius: 16px;
    padding: 2rem 1.5rem;
}

.form {
    display: flex;
    flex-direction: column;
    gap: 0.7rem;
}

.label-formulario {
    font-size: 0.95rem;
    font-weight: 500;
}

.input-formulario,
.textarea-formulario {
    width: 100%;
    padding: 0.7rem;
    border-radius: 6px;
    border: none;
    font-family: "Poppins", sans-serif;
    font-size: 1rem;
}

.textarea-formulario {
    min-height: 100px;
    resize: vertical;
}

.button-formulario {
    background: var(--verde);
    color: #fff;
    border: none;
    border-radius: 6px;
    padding: 0.8rem;
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s;
    font-family: "Poppins", sans-serif;
}

.button-formulario:hover {
    background: var(--verde-escuro);
}

.footer-social {
    display: flex;
    gap: 1.2rem;
    justify-content: center;
    padding: 1.5rem 2rem 0;
    max-width: 1200px;
    margin: 0 auto;
}

.footer-social a img {
    width: 32px;
    height: 32px;
    transition: transform 0.2s;
    border-radius: 7px;
    box-shadow: 0 4px 16px rgba(23, 60, 125, 0.25);
}

.footer-social a img:hover {
    transform: scale(1.1);
    box-shadow: 0 8px 24px rgba(23, 60, 125, 0.35);
}

.footer-bottom {
    border-top: 1px solid rgba(255, 255, 255, 0.2);
    padding: 1.2rem 2rem;
    text-align: center;
    max-width: 1200px;
    margin: 0 auto;
}

.footer-copy {
    font-size: 1rem;
    color: #e0e0e0;
    margin: 0;
}

/* ==================== MEDIA QUERIES ==================== */
@media (max-width: 768px) {
    .Cabecalho {
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        margin: 0;
        padding: 0.8rem 3%;
        border-radius: 0;
        transform: none;
    }

    .menu-toggle {
        display: block;
        z-index: 102;
    }

    .logoCabecalho img {
        height: 50px;
        width: 75px;
    }

    .navCabecalho {
        position: fixed;
        top: 0;
        right: 0;
        width: 80%;
        max-width: 300px;
        height: 100vh;
        background: var(--azulClaro);
        transition: transform 0.5s ease-in-out;
        z-index: 101;
        padding: 2rem 1rem;
        box-shadow: -2px 0 10px rgba(0, 0, 0, 0.3);
        transform: translateX(100%);
        overflow-y: auto;
    }
    
    .navCabecalho.active {
        transform: translateX(0);
    }

    .navCabecalho ul {
        flex-direction: column;
        gap: 1.5rem;
        padding-top: 3rem;
    }

    .navCabecalho a {
        font-size: 1.1rem;
        display: block;
        padding: 0.5rem 0;
    }

    main {
        padding-top: 5rem;
    }

    .main-content {
        padding: 1.5rem;
    }

    .section-title {
        font-size: 1.4rem;
    }

    .search-container {
        flex-direction: column;
    }

    .documents-table table {
        font-size: 0.9rem;
    }

    .documents-table th,
    .documents-table td {
        padding: 0.7rem 0.5rem;
    }

    .footer-container {
        flex-direction: column;
        align-items: center;
        text-align: center;
    }

    .footer-logo-info {
        align-items: center;
    }
}

@media (max-width: 480px) {
    .Cabecalho {
        padding: 0.7rem 3%;
    }

    .logoCabecalho img {
        height: 45px;
        width: 68px;
    }

    .doeAgora {
        padding: 0.5rem 1rem;
        font-size: 0.75rem;
    }

    .section-title {
        font-size: 1.2rem;
    }

    .documents-table {
        font-size: 0.8rem;
    }

    .documents-table th,
    .documents-table td {
        padding: 0.5rem 0.3rem;
    }

    .document-link {
        padding: 0.3rem 0.5rem;
        font-size: 0.8rem;
    }

    .category-item {
        padding: 1rem;
    }

    .documents-table {
        padding: 0.8rem;
    }
}

@media (min-width: 1400px) {
    html {
        font-size: 18px;
    }

    .Cabecalho {
        padding: 1rem 3%;
    }

    .navCabecalho ul {
        gap: 2rem;
    }
}