.line-clamp-1 {
    display: -webkit-box;
    -webkit-line-clamp: 1;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.line-clamp-2 {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.line-clamp-3 {
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.prose {
    max-width: 65ch;
    color: #374151;
}

.prose h1 {
    font-size: 2.25rem;
    font-weight: 700;
    margin-bottom: 1rem;
    color: #111827;
}

.prose h2 {
    font-size: 1.5rem;
    font-weight: 700;
    margin-top: 2rem;
    margin-bottom: 1rem;
    color: #111827;
}

.prose h3 {
    font-size: 1.25rem;
    font-weight: 600;
    margin-top: 1.5rem;
    margin-bottom: 0.75rem;
    color: #111827;
}

.prose p {
    margin-bottom: 1.25rem;
    line-height: 1.75;
}

.prose ul {
    list-style-type: disc;
    padding-left: 1.5rem;
    margin-bottom: 1.25rem;
}

.prose ol {
    list-style-type: decimal;
    padding-left: 1.5rem;
    margin-bottom: 1.25rem;
}

.prose li {
    margin-bottom: 0.5rem;
}

.prose a {
    color: var(--cor-primaria);
    text-decoration: underline;
}

.prose a:hover {
    color: var(--cor-secundaria);
}

.prose blockquote {
    border-left: 4px solid var(--cor-primaria);
    padding-left: 1rem;
    font-style: italic;
    color: #6b7280;
    margin: 1.5rem 0;
}

.prose table {
    width: 100%;
    border-collapse: collapse;
    margin: 1.5rem 0;
}

.prose th,
.prose td {
    border: 1px solid #e5e7eb;
    padding: 0.75rem;
    text-align: left;
}

.prose th {
    background-color: #f9fafb;
    font-weight: 600;
}

.prose img {
    max-width: 100%;
    height: auto;
    border-radius: 0.5rem;
    margin: 1.5rem 0;
}

.prose code {
    background-color: #f3f4f6;
    padding: 0.125rem 0.375rem;
    border-radius: 0.25rem;
    font-size: 0.875rem;
}

.prose pre {
    background-color: #1f2937;
    color: #f9fafb;
    padding: 1rem;
    border-radius: 0.5rem;
    overflow-x: auto;
    margin: 1.5rem 0;
}

.prose pre code {
    background-color: transparent;
    padding: 0;
    color: inherit;
}

.btn-primary {
    background-color: var(--cor-primaria);
    color: white;
    padding: 0.75rem 1.5rem;
    border-radius: 0.5rem;
    font-weight: 600;
    transition: opacity 0.2s;
}

.btn-primary:hover {
    opacity: 0.9;
}

.btn-secondary {
    background-color: #f3f4f6;
    color: #374151;
    padding: 0.75rem 1.5rem;
    border-radius: 0.5rem;
    font-weight: 600;
    transition: background-color 0.2s;
}

.btn-secondary:hover {
    background-color: #e5e7eb;
}

.input-field {
    width: 100%;
    border: 1px solid #d1d5db;
    border-radius: 0.5rem;
    padding: 0.5rem 0.75rem;
    transition: border-color 0.2s, box-shadow 0.2s;
}

.input-field:focus {
    outline: none;
    border-color: var(--cor-primaria);
    box-shadow: 0 0 0 3px rgba(var(--cor-primaria-rgb), 0.1);
}

.card {
    background-color: white;
    border-radius: 0.5rem;
    box-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.1);
    overflow: hidden;
}

.card-hover:hover {
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
}

@media print {
    header,
    footer,
    nav,
    aside {
        display: none !important;
    }

    main {
        width: 100%;
        margin: 0;
        padding: 0;
    }

    .no-print {
        display: none !important;
    }
}

@media (max-width: 640px) {
    .container {
        padding-left: 1rem;
        padding-right: 1rem;
    }
}

.animate-fade-in {
    animation: fadeIn 0.3s ease-in-out;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.loading {
    position: relative;
    pointer-events: none;
}

.loading::after {
    content: "";
    position: absolute;
    inset: 0;
    background-color: rgba(255, 255, 255, 0.7);
    display: flex;
    align-items: center;
    justify-content: center;
}

.spinner {
    width: 2rem;
    height: 2rem;
    border: 3px solid #e5e7eb;
    border-top-color: var(--cor-primaria);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

/* ==========================================
   Acessibilidade - Alto Contraste
   ========================================== */

html.high-contrast,
html.high-contrast body {
    background-color: #000 !important;
    color: #fff !important;
}

html.high-contrast a {
    color: #ff0 !important;
}

html.high-contrast a:hover {
    color: #fff !important;
    text-decoration: underline !important;
}

html.high-contrast header,
html.high-contrast nav,
html.high-contrast footer {
    background-color: #000 !important;
    border-color: #fff !important;
}

html.high-contrast .bg-white,
html.high-contrast .bg-gray-50,
html.high-contrast .bg-gray-100,
html.high-contrast .bg-gray-200 {
    background-color: #000 !important;
}

html.high-contrast .text-gray-500,
html.high-contrast .text-gray-600,
html.high-contrast .text-gray-700,
html.high-contrast .text-gray-800,
html.high-contrast .text-gray-900 {
    color: #fff !important;
}

html.high-contrast .border,
html.high-contrast .border-gray-200,
html.high-contrast .border-gray-300,
html.high-contrast [class*="border-"] {
    border-color: #fff !important;
}

html.high-contrast button,
html.high-contrast .btn-primary,
html.high-contrast .btn-secondary {
    background-color: #fff !important;
    color: #000 !important;
    border: 2px solid #fff !important;
}

html.high-contrast button:hover,
html.high-contrast .btn-primary:hover,
html.high-contrast .btn-secondary:hover {
    background-color: #ff0 !important;
    color: #000 !important;
}

html.high-contrast input,
html.high-contrast select,
html.high-contrast textarea {
    background-color: #000 !important;
    color: #fff !important;
    border: 2px solid #fff !important;
}

html.high-contrast input:focus,
html.high-contrast select:focus,
html.high-contrast textarea:focus {
    border-color: #ff0 !important;
    outline: 2px solid #ff0 !important;
}

html.high-contrast .card,
html.high-contrast .shadow,
html.high-contrast .shadow-sm,
html.high-contrast .shadow-lg,
html.high-contrast [class*="shadow"] {
    background-color: #000 !important;
    border: 2px solid #fff !important;
    box-shadow: none !important;
}

html.high-contrast img {
    filter: grayscale(100%) contrast(120%);
}

html.high-contrast .prose {
    color: #fff !important;
}

html.high-contrast .prose h1,
html.high-contrast .prose h2,
html.high-contrast .prose h3 {
    color: #fff !important;
}

html.high-contrast .prose a {
    color: #ff0 !important;
}

/* ==========================================
   Acessibilidade - Skip Link
   ========================================== */

.skip-link {
    position: absolute;
    top: -100px;
    left: 50%;
    transform: translateX(-50%);
    background: #000;
    color: #fff;
    padding: 12px 24px;
    z-index: 9999;
    text-decoration: none;
    font-weight: bold;
    border-radius: 0 0 8px 8px;
    transition: top 0.3s ease;
}

.skip-link:focus {
    top: 0;
    outline: 2px solid #ff0;
}

/* ── Page Banner ── */
.page-banner {
    position: relative;
    color: #fff;
    padding: 3.5rem 0;
    overflow: hidden;
    background: linear-gradient(
        135deg,
        var(--cor-primaria) 0%,
        color-mix(in srgb, var(--cor-primaria) 80%, #000) 60%,
        color-mix(in srgb, var(--cor-primaria) 65%, #000) 100%
    );
}
.page-banner::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, transparent 50%, color-mix(in srgb, var(--cor-secundaria) 18%, transparent) 100%);
}
.page-banner__deco1 { position: absolute; top: -4rem; right: -4rem; width: 18rem; height: 18rem; border-radius: 50%; background: #fff; opacity: .04; }
.page-banner__deco2 { position: absolute; bottom: 0; right: 10rem; width: 11rem; height: 11rem; border-radius: 50%; background: #fff; opacity: .04; }
.page-banner__deco3 { position: absolute; top: 1.5rem; right: 25%; width: 4rem; height: 4rem; border-radius: 50%; background: var(--cor-secundaria); opacity: .10; }
.page-banner__icon {
    width: 3.5rem;
    height: 3.5rem;
    border-radius: .75rem;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    border: 1px solid rgba(255, 255, 255, .20);
    background: rgba(255, 255, 255, .15);
    backdrop-filter: blur(8px);
}
.page-banner__title  { font-size: 2.25rem; font-weight: 700; letter-spacing: -.025em; }
.page-banner__sub    { margin-top: .25rem; font-size: 1.125rem; opacity: .80; }
.page-banner__accent { margin-top: .75rem; display: block; height: 3px; width: 3rem; border-radius: 9999px; background: var(--cor-secundaria); }

/* ============================================================
   Transparência — cards e filtros de ano
   ============================================================ */
.transparencia-card {
    display: flex;
    align-items: flex-start;
    gap: 1rem;
    padding: 1.25rem;
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: .75rem;
    transition: box-shadow .15s, border-color .15s;
    text-decoration: none;
    color: inherit;
}
.transparencia-card:hover {
    box-shadow: 0 4px 12px rgba(0,0,0,.08);
    border-color: var(--cor-primaria);
}
.transparencia-card__icon {
    width: 2.5rem;
    height: 2.5rem;
    border-radius: .5rem;
    background: color-mix(in srgb, var(--cor-primaria) 10%, transparent);
    color: var(--cor-primaria);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    transition: background .15s;
}
.transparencia-card:hover .transparencia-card__icon {
    background: color-mix(in srgb, var(--cor-primaria) 18%, transparent);
}
.transparencia-card__title {
    font-weight: 600;
    font-size: .9375rem;
    color: #1f2937;
}
.transparencia-card__desc {
    font-size: .8125rem;
    color: #6b7280;
    margin-top: .2rem;
}
.transparencia-ano-btn {
    display: inline-block;
    padding: .25rem .75rem;
    border-radius: 9999px;
    border: 1px solid #d1d5db;
    font-size: .8125rem;
    font-weight: 500;
    color: #374151;
    background: #fff;
    text-decoration: none;
    transition: all .15s;
}
.transparencia-ano-btn:hover { border-color: var(--cor-primaria); color: var(--cor-primaria); }
.transparencia-ano-btn.ativo { background: var(--cor-primaria); border-color: var(--cor-primaria); color: #fff; }

/* ==========================================
   Animação de sublinhado do menu principal
   ========================================== */
.nav-menu-link {
    position: relative;
}
.nav-menu-link::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    right: 50%;
    height: 2px;
    background-color: white;
    transition: left 0.25s ease, right 0.25s ease;
}
.nav-menu-link:hover::after,
.nav-menu-link.nav-ativo::after {
    left: 20px;
    right: 20px;
}

.nav-menu-btn {
    position: relative;
}
.nav-menu-btn::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    right: 50%;
    height: 2px;
    background-color: white;
    transition: left 0.25s ease, right 0.25s ease;
}
.nav-menu-btn:hover::after {
    left: 20px;
    right: 20px;
}
