:root {
    --primary: #a10014;
    --primary-dark: #6f0012;
    --secondary: #a936a8;
    --secondary-dark: #7b247c;
    --accent: #d44b72;
    --warm: #f6b24b;
    --teal: #1f7a82;
    --blue: #365a7d;
    --cream: #fff8ec;
    --ink: #24212a;
    --muted: #6f6875;
    --line: #ece6ee;
    --soft: #faf6f9;
    --soft-strong: #f1e7ef;
    --white: #ffffff;
    --shadow: 0 18px 45px rgba(55, 24, 44, 0.12);
    --radius: 8px;
    --hero-surface: #fbf7f1;
    --hero-surface-dark: #2a1721;
}

:root[data-theme="dark"] {
    color-scheme: dark;
    --primary: #ff6f86;
    --primary-dark: #d73d5c;
    --secondary: #e58be6;
    --secondary-dark: #c76ac8;
    --accent: #ff8cac;
    --warm: #ffd08a;
    --teal: #64c7cf;
    --blue: #8db5dd;
    --cream: #231d17;
    --ink: #f7f3f7;
    --muted: #c9bdcb;
    --line: #3b3340;
    --soft: #17131a;
    --soft-strong: #211a25;
    --white: #121017;
    --shadow: 0 18px 45px rgba(0, 0, 0, 0.34);
}

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

html {
    scroll-behavior: smooth;
}

body {
    font-family: "Inter", "Segoe UI", Arial, sans-serif;
    font-size: 17px;
    line-height: 1.65;
    color: var(--ink);
    background: var(--white);
    transition: background 0.25s ease, color 0.25s ease;
}

:root[data-theme="dark"] body {
    background: #121017;
}

img {
    max-width: 100%;
    display: block;
}

a {
    color: inherit;
}

.container {
    width: min(1120px, calc(100% - 32px));
    margin: 0 auto;
}

.main-header {
    position: sticky;
    top: 0;
    z-index: 50;
    background: rgba(255, 255, 255, 0.96);
    border-bottom: 1px solid rgba(161, 0, 20, 0.12);
    backdrop-filter: blur(18px);
    transition: box-shadow 0.25s ease, border-color 0.25s ease, background 0.25s ease;
}

:root[data-theme="dark"] .main-header {
    background: rgba(18, 16, 23, 0.94);
    border-bottom-color: rgba(255, 255, 255, 0.08);
}

.main-header.scrolled {
    background: rgba(255, 255, 255, 0.985);
    box-shadow: 0 12px 30px rgba(54, 18, 34, 0.1);
    border-color: transparent;
}

:root[data-theme="dark"] .main-header.scrolled {
    background: rgba(18, 16, 23, 0.985);
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.32);
}

.header-container {
    min-height: 76px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 26px;
}

.main-header .container {
    width: min(1260px, calc(100% - 32px));
}

.brand {
    display: inline-flex;
    align-items: center;
    flex: 0 0 auto;
    padding: 4px 0;
}

.brand img {
    width: 204px;
    height: auto;
}

.nav-menu {
    display: flex;
    align-items: center;
    gap: 16px;
    flex: 0 1 auto;
    min-width: 0;
}

.nav-menu ul {
    display: flex;
    align-items: center;
    flex-wrap: nowrap;
    gap: 2px;
    list-style: none;
}

.nav-menu a,
.nav-logout-form button {
    text-decoration: none;
    font-size: 0.95rem;
    font-weight: 700;
    color: var(--ink);
    padding: 9px 11px;
    border-radius: 999px;
    border: 0;
    background: transparent;
    white-space: nowrap;
    cursor: pointer;
    transition: color 0.2s ease, background 0.2s ease, transform 0.2s ease;
}

.nav-menu a:hover,
.nav-logout-form button:hover {
    color: var(--primary);
    background: rgba(161, 0, 20, 0.07);
}

.nav-logout-form {
    margin: 0;
}

.nav-menu a.active {
    color: var(--primary);
    background: rgba(161, 0, 20, 0.1);
    box-shadow: inset 0 0 0 1px rgba(161, 0, 20, 0.05);
}

.theme-toggle {
    width: 50px;
    min-width: 50px;
    min-height: 28px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    border: 0;
    border-radius: 999px;
    background: transparent;
    color: var(--ink);
    font: inherit;
    cursor: pointer;
    box-shadow: none;
    transition: transform 0.2s ease;
}

:root[data-theme="dark"] .theme-toggle {
    box-shadow: none;
}

.theme-toggle:hover,
.theme-toggle:focus-visible {
    transform: translateY(-1px);
    outline: none;
}

:root[data-theme="dark"] .theme-toggle:hover,
:root[data-theme="dark"] .theme-toggle:focus-visible {
    box-shadow: none;
}

.theme-toggle-track {
    position: relative;
    width: 50px;
    height: 28px;
    flex: 0 0 auto;
    border-radius: 999px;
    background: linear-gradient(135deg, #f6b24b, #f7d79d);
    box-shadow: inset 0 0 0 1px rgba(111, 0, 18, 0.12);
    transition: background 0.24s ease, box-shadow 0.24s ease;
}

:root[data-theme="dark"] .theme-toggle-track {
    background: linear-gradient(135deg, #142b36, #3b1020);
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.13);
}

.theme-toggle-thumb {
    position: absolute;
    top: 3px;
    left: 3px;
    width: 22px;
    height: 22px;
    display: grid;
    place-items: center;
    border-radius: 999px;
    background: #ffffff;
    color: var(--primary);
    box-shadow: 0 4px 10px rgba(55, 24, 44, 0.24);
    transition: transform 0.24s ease, color 0.24s ease, background 0.24s ease;
}

:root[data-theme="dark"] .theme-toggle-thumb {
    transform: translateX(22px);
    background: #f7f3f7;
    color: #142b36;
}

.theme-icon {
    width: 14px;
    height: 14px;
    stroke: currentColor;
    fill: none;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.theme-icon-sun {
    display: none;
}

:root[data-theme="dark"] .theme-icon-sun {
    display: block;
}

:root[data-theme="dark"] .theme-icon-moon {
    display: none;
}

.btn,
button.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-height: 46px;
    padding: 12px 20px;
    border: 0;
    border-radius: var(--radius);
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    color: #ffffff;
    font-size: 1rem;
    font-weight: 800;
    text-decoration: none;
    cursor: pointer;
    box-shadow: 0 12px 28px rgba(161, 0, 20, 0.22);
    transition: transform 0.2s ease, box-shadow 0.2s ease, filter 0.2s ease;
}

.btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 16px 34px rgba(161, 0, 20, 0.28);
    filter: saturate(1.08);
}

.btn-outline {
    background: var(--white);
    color: var(--primary);
    box-shadow: inset 0 0 0 1px rgba(161, 0, 20, 0.24);
}

:root[data-theme="dark"] .btn-outline {
    background: rgba(255, 255, 255, 0.04);
    color: var(--ink);
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.16);
}

.page-contato .btn-outline:hover {
    background: linear-gradient(135deg, var(--primary), var(--accent));
    color: #ffffff;
    box-shadow: 0 16px 34px rgba(161, 0, 20, 0.28);
}

.btn-small {
    min-height: 38px;
    padding: 9px 14px;
    font-size: 0.95rem;
}

.nav-cta {
    color: #ffffff !important;
    border-radius: var(--radius) !important;
    padding-left: 16px !important;
    padding-right: 16px !important;
    background: linear-gradient(135deg, var(--primary), var(--primary-dark)) !important;
}

.svg-icon {
    width: 1.2em;
    height: 1.2em;
    flex: 0 0 auto;
    stroke: currentColor;
    fill: none;
    stroke-width: 1.8;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.menu-toggle {
    display: none;
    width: 44px;
    height: 44px;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: var(--white);
    cursor: pointer;
}

.menu-toggle span {
    display: block;
    width: 20px;
    height: 2px;
    margin: 5px auto;
    background: var(--primary);
    transition: transform 0.2s ease, opacity 0.2s ease;
}

.hero,
.page-hero {
    position: relative;
    overflow: hidden;
    color: var(--ink);
    background: var(--hero-surface);
}

:root[data-theme="dark"] .hero,
:root[data-theme="dark"] .page-hero {
    color: #ffffff;
    background: var(--hero-surface-dark);
}

.hero::after,
.page-hero::after {
    content: none;
}

.eyebrow {
    display: inline-flex;
    color: var(--secondary);
    background: transparent;
    padding: 0 0 0 10px;
    border-left: 3px solid currentColor;
    border-radius: 0;
    font-size: 0.82rem;
    font-weight: 800;
    letter-spacing: 0;
    text-transform: none;
}

.hero .eyebrow,
.page-hero .eyebrow,
.final-cta .eyebrow {
    color: var(--primary);
    background: transparent;
}

:root[data-theme="dark"] .hero .eyebrow,
:root[data-theme="dark"] .page-hero .eyebrow,
:root[data-theme="dark"] .final-cta .eyebrow {
    color: #ffffff;
}

.hero h1,
.page-hero h1 {
    max-width: 880px;
    margin-top: 18px;
    font-size: 4.2rem;
    line-height: 1.04;
    letter-spacing: 0;
}

.hero p,
.page-hero p {
    max-width: 720px;
    margin-top: 18px;
    color: var(--muted);
    font-size: 1.18rem;
}

:root[data-theme="dark"] .hero p,
:root[data-theme="dark"] .page-hero p {
    color: rgba(255, 255, 255, 0.9);
}

.hero-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 14px;
    margin-top: 26px;
}

.page-hero {
    padding: 88px 0;
}

.page-hero .container {
    position: relative;
    z-index: 1;
}

.page-hero-split {
    display: grid;
    grid-template-columns: minmax(0, 0.92fr) minmax(320px, 1.08fr);
    gap: clamp(28px, 5vw, 58px);
    align-items: center;
}

.page-hero-copy {
    min-width: 0;
}

.page-hero-media {
    min-width: 0;
    overflow: hidden;
    border-radius: 14px;
    box-shadow: 0 24px 70px rgba(0, 0, 0, 0.24);
    background: transparent;
}

.page-hero-media img {
    display: block;
    width: 100%;
    height: clamp(300px, 44svh, 500px);
    object-fit: cover;
    object-position: center;
}

.page-hero-illustration {
    display: grid;
    place-items: center;
    padding: 0;
    border: 0;
    box-shadow: none;
    background: transparent;
}

.page-hero-illustration img {
    max-height: clamp(280px, 40svh, 460px);
    object-fit: contain;
}

:root[data-theme="dark"] .page-hero-illustration {
    background: transparent;
}

.page-noticias .page-hero-split {
    grid-template-columns: minmax(0, 0.86fr) minmax(300px, 0.92fr);
    gap: clamp(24px, 4vw, 46px);
}

.page-noticias .page-hero-illustration {
    justify-self: center;
    overflow: visible;
}

.page-noticias .page-hero-illustration img {
    width: min(100%, 430px);
    max-height: min(620px, calc(100svh - 126px));
}

.library-hero {
    padding: 70px 0;
}

.library-hero-grid {
    position: relative;
    z-index: 1;
    display: grid;
    grid-template-columns: minmax(0, 0.85fr) minmax(360px, 1.15fr);
    gap: 42px;
    align-items: center;
}

.library-hero-photo {
    overflow: hidden;
    border-radius: 14px;
    border: 1px solid rgba(255, 255, 255, 0.24);
    box-shadow: 0 28px 80px rgba(0, 0, 0, 0.28);
}

.library-hero-photo img {
    width: 100%;
    height: 520px;
    object-fit: cover;
    object-position: center 42%;
}

.section {
    padding: 82px 0;
}

.page-biblioteca,
.page-projetos,
.page-contato,
.page-noticias,
.page-transparencia,
.page-noticia,
body[class^="page-noticia-"] {
    --page-header-height: 76px;
    scroll-snap-type: y mandatory;
}

.page-biblioteca main,
.page-projetos main,
.page-contato main,
.page-noticias main,
.page-transparencia main,
.page-noticia main,
body[class^="page-noticia-"] main {
    scroll-snap-type: y mandatory;
}

.page-biblioteca main > section,
.page-projetos main > section,
.page-contato main > section,
.page-noticias main > section,
.page-transparencia main > section,
.page-noticia main > section,
body[class^="page-noticia-"] main > section {
    min-height: calc(100svh - var(--page-header-height));
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 28px;
    scroll-snap-align: start;
    scroll-snap-stop: always;
    padding-top: clamp(34px, 5vw, 64px);
    padding-bottom: clamp(34px, 5vw, 64px);
}

.page-biblioteca main > section > .container,
.page-projetos main > section > .container,
.page-contato main > section > .container,
.page-noticias main > section > .container,
.page-transparencia main > section > .container,
.page-noticia main > section > .container,
body[class^="page-noticia-"] main > section > .container {
    width: min(1120px, calc(100% - 32px));
}

.page-sobre main > section + section,
.page-projetos .project-photo-band,
.page-projetos .final-cta {
    position: relative;
    border-top: 1px solid rgba(161, 0, 20, 0.08);
}

.page-sobre main > section + section::before,
.page-projetos .project-photo-band::before,
.page-projetos .final-cta::before {
    content: none;
}

:root[data-theme="dark"] .page-sobre main > section + section,
:root[data-theme="dark"] .page-projetos .project-photo-band,
:root[data-theme="dark"] .page-projetos .final-cta {
    border-top-color: rgba(255, 255, 255, 0.055);
}

:root[data-theme="dark"] .page-sobre main > section + section::before,
:root[data-theme="dark"] .page-projetos .project-photo-band::before,
:root[data-theme="dark"] .page-projetos .final-cta::before {
    content: none;
}

.section-soft {
    background: #fbfaf8;
}

:root[data-theme="dark"] .section-soft {
    background: #17131a;
}

.section-heading h2 {
    margin-top: 14px;
    max-width: 720px;
    font-size: 3rem;
    line-height: 1.1;
    color: var(--ink);
}

.section-heading p {
    max-width: 680px;
    margin-top: 12px;
    color: var(--muted);
    font-size: 1.1rem;
    line-height: 1.7;
}

.centered {
    text-align: center;
}

.centered h2,
.centered p {
    margin-left: auto;
    margin-right: auto;
}

.story-layout,
.contact-layout {
    display: grid;
    grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr);
    gap: 42px;
    align-items: start;
}

.content-card,
.form-card,
.about-narrative,
.about-highlight,
.contact-info {
    color: var(--muted);
    font-size: 1.12rem;
}

.content-card,
.about-narrative,
.about-highlight,
.form-card,
.feature-card,
.news-card,
.project-card,
.empty-state {
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: var(--white);
    box-shadow: var(--shadow);
}

.content-card,
.about-narrative,
.about-highlight,
.form-card {
    padding: 34px;
}

.donation-slot {
    min-height: 0;
    display: block;
    scroll-margin-top: 110px;
}

:root[data-theme="dark"] .donation-slot {
    background:
        linear-gradient(180deg, rgba(255, 255, 255, 0.035), rgba(255, 255, 255, 0.018)),
        #121017;
}

.donation-widget {
    display: grid;
    gap: 14px;
}

.donation-widget h2 {
    color: var(--ink);
    font-size: clamp(1.55rem, 3vw, 2.05rem);
    line-height: 1.08;
}

.donation-widget p {
    color: var(--muted);
    line-height: 1.55;
}

.donation-support-ways {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 8px;
}

.donation-support-ways div {
    padding: 10px 12px;
    border: 1px solid var(--line);
    border-top: 3px solid var(--accent);
    border-radius: 8px;
    background: linear-gradient(135deg, rgba(246, 178, 75, 0.08), rgba(255, 255, 255, 0.42));
}

.donation-support-ways strong {
    display: block;
    margin-bottom: 2px;
    color: var(--ink);
    font-size: 0.9rem;
}

.donation-support-ways span {
    display: block;
    color: var(--muted);
    font-size: 0.88rem;
    line-height: 1.32;
}

.donation-values {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 10px;
}

.donation-value {
    min-height: 46px;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: var(--soft);
    color: var(--ink);
    font: inherit;
    font-weight: 800;
    cursor: pointer;
    transition: transform 0.2s ease, border-color 0.2s ease, background 0.2s ease, color 0.2s ease;
}

.donation-value:hover,
.donation-value.active {
    transform: translateY(-1px);
    border-color: rgba(161, 0, 20, 0.26);
    background: linear-gradient(135deg, var(--primary), var(--accent));
    color: #ffffff;
}

.donation-custom {
    display: grid;
    gap: 6px;
    color: var(--ink);
    font-weight: 800;
}

.donation-custom input,
.pix-copy-area textarea {
    width: 100%;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: var(--white);
    color: var(--ink);
    font: inherit;
    outline: none;
    transition: border-color 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.donation-custom input {
    min-height: 46px;
    padding: 10px 12px;
}

.donation-note {
    margin-top: -8px;
    font-size: 0.88rem;
    line-height: 1.35;
}

.donation-custom input:focus,
.pix-copy-area textarea:focus,
.donation-value:focus-visible,
.donation-submit:focus-visible,
.pix-actions .btn:focus-visible,
.donation-whatsapp-direct:focus-visible {
    border-color: rgba(31, 122, 130, 0.45);
    box-shadow: 0 0 0 4px rgba(31, 122, 130, 0.12);
}

.donation-submit {
    width: 100%;
}

.donation-whatsapp-direct {
    width: 100%;
    justify-content: center;
}

.pix-feedback {
    min-height: 20px;
    font-weight: 800;
    font-size: 0.92rem;
    color: var(--teal);
}

.pix-feedback.error {
    color: var(--primary);
}

.pix-feedback.success {
    color: var(--teal);
}

.pix-result {
    display: grid;
    grid-template-columns: 150px minmax(0, 1fr);
    gap: 14px;
    align-items: start;
    padding-top: 14px;
    border-top: 1px solid var(--line);
}

.pix-result[hidden] {
    display: none;
}

.pix-qr-card {
    padding: 8px;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: #ffffff;
}

.pix-qr-card img {
    width: 100%;
    aspect-ratio: 1;
    object-fit: contain;
}

.pix-copy-area {
    display: grid;
    gap: 8px;
    min-width: 0;
}

.pix-copy-area strong {
    color: var(--ink);
}

.pix-copy-area textarea {
    min-height: 92px;
    padding: 10px;
    resize: vertical;
    font-family: "Consolas", "Courier New", monospace;
    font-size: 0.82rem;
    line-height: 1.35;
}

.pix-actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
}

:root[data-theme="dark"] .donation-value {
    background: rgba(255, 255, 255, 0.045);
    border-color: rgba(255, 255, 255, 0.11);
}

:root[data-theme="dark"] .donation-support-ways div {
    background: rgba(255, 255, 255, 0.045);
    border-color: rgba(255, 255, 255, 0.12);
    border-top-color: var(--accent);
}

:root[data-theme="dark"] .donation-value:hover,
:root[data-theme="dark"] .donation-value.active {
    border-color: rgba(255, 111, 134, 0.42);
    background: linear-gradient(135deg, var(--primary-dark), var(--accent));
    color: #ffffff;
    box-shadow: 0 12px 28px rgba(255, 111, 134, 0.18);
}

:root[data-theme="dark"] .donation-custom input,
:root[data-theme="dark"] .pix-copy-area textarea {
    background: rgba(255, 255, 255, 0.045);
    border-color: rgba(255, 255, 255, 0.14);
}

:root[data-theme="dark"] .pix-result {
    border-top-color: rgba(255, 255, 255, 0.11);
}

.content-card p + p {
    margin-top: 18px;
}

.about-intro-section {
    background: #fbfaf8;
}

:root[data-theme="dark"] .about-intro-section {
    background: #17131a;
}

.about-intro {
    display: grid;
    grid-template-columns: minmax(0, 1.25fr) minmax(300px, 0.75fr);
    gap: 28px;
    align-items: stretch;
}

.about-narrative {
    box-shadow: none;
    background: transparent;
    border-color: transparent;
    padding-left: 0;
}

.about-narrative h2 {
    max-width: 720px;
    margin: 14px 0 18px;
    color: var(--ink);
    font-size: 3rem;
    line-height: 1.08;
}

.about-narrative p {
    max-width: 760px;
}

.about-narrative p + p {
    margin-top: 16px;
}

.about-highlight {
    align-self: center;
    background: linear-gradient(180deg, #f7fbfb, var(--white));
    border-color: rgba(31, 122, 130, 0.18);
}

:root[data-theme="dark"] .about-highlight {
    background:
        linear-gradient(180deg, rgba(100, 199, 207, 0.08), rgba(255, 255, 255, 0.025)),
        #18141d;
    border-color: rgba(100, 199, 207, 0.22);
}

.about-card-photo {
    width: 100%;
    aspect-ratio: 1.45;
    object-fit: cover;
    border-radius: var(--radius);
    margin-bottom: 22px;
}

.about-highlight > span {
    display: inline-flex;
    margin-bottom: 12px;
    color: var(--primary);
    font-size: 0.78rem;
    font-weight: 800;
    text-transform: uppercase;
}

.about-highlight h2 {
    color: var(--ink);
    line-height: 1.15;
    margin-bottom: 12px;
}

.story-split {
    display: grid;
    grid-template-columns: minmax(320px, 0.9fr) minmax(0, 1.1fr);
    gap: 42px;
    align-items: center;
}

.story-photo {
    overflow: hidden;
    border-radius: var(--radius);
    box-shadow: var(--shadow);
}

.story-photo img {
    width: 100%;
    min-height: 340px;
    object-fit: cover;
}

.library-intro-section {
    background: linear-gradient(180deg, var(--white), #fbfaf8);
}

:root[data-theme="dark"] .library-intro-section {
    background: linear-gradient(180deg, #121017, #17131a);
}

.library-mosaic {
    display: grid;
    grid-template-columns: 1.2fr 0.8fr;
    gap: 14px;
    align-self: stretch;
}

.library-mosaic img {
    width: 100%;
    height: 100%;
    min-height: 360px;
    object-fit: cover;
    border-radius: var(--radius);
    box-shadow: var(--shadow);
}

.library-mosaic img:last-child {
    object-position: center;
}

.library-activity {
    display: grid;
    grid-template-columns: minmax(360px, 1.15fr) minmax(0, 0.85fr);
    gap: 38px;
    align-items: center;
}

.library-activity-photo {
    overflow: hidden;
    border-radius: var(--radius);
    box-shadow: var(--shadow);
}

.library-activity-photo img {
    width: 100%;
    min-height: 430px;
    object-fit: cover;
}

.library-event-section {
    background: linear-gradient(180deg, #fbfaf8, var(--white));
}

:root[data-theme="dark"] .library-event-section {
    background: linear-gradient(180deg, #17131a, #121017);
}

.library-event-card {
    display: grid;
    grid-template-columns: 0.85fr 0.85fr 1fr;
    gap: 18px;
    align-items: stretch;
    padding: 18px;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: var(--white);
    box-shadow: var(--shadow);
}

:root[data-theme="dark"] .library-event-card {
    background:
        linear-gradient(180deg, rgba(255, 255, 255, 0.045), rgba(255, 255, 255, 0.02)),
        #18141d;
    border-color: rgba(255, 255, 255, 0.12);
}

.library-event-card img {
    width: 100%;
    height: 100%;
    min-height: 360px;
    object-fit: cover;
    border-radius: var(--radius);
}

.library-event-card > div {
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 22px;
}

.library-event-card h2 {
    margin: 14px 0 12px;
    font-size: 2.35rem;
    line-height: 1.12;
}

.library-event-card p {
    color: var(--muted);
}

.card-grid,
.project-grid {
    display: grid;
    gap: 22px;
}

.card-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    margin-top: 34px;
}

.feature-card,
.news-card {
    padding: 30px;
    position: relative;
    overflow: hidden;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.feature-card::before,
.news-card::before {
    content: none;
}

.feature-card:hover,
.news-card:hover,
.project-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 18px 36px rgba(55, 24, 44, 0.12);
}

.card-icon {
    display: inline-grid;
    place-items: center;
    width: 46px;
    height: 46px;
    margin-bottom: 22px;
    border-radius: var(--radius);
    background: rgba(161, 0, 20, 0.08);
    color: var(--primary);
    font-weight: 800;
}

.feature-card:nth-child(2) .card-icon {
    color: var(--secondary);
}

.feature-card:nth-child(3) .card-icon {
    color: var(--teal);
}

.feature-card h3,
.news-card h3,
.project-card h2 {
    margin-bottom: 10px;
    color: var(--ink);
    font-size: 1.28rem;
    line-height: 1.2;
}

.feature-card p,
.news-card p,
.project-card p,
.empty-state p {
    color: var(--muted);
    font-size: 1.02rem;
    line-height: 1.65;
}

.news-section {
    background:
        linear-gradient(180deg, var(--white), #fbfaf8);
}

:root[data-theme="dark"] .news-section {
    background:
        linear-gradient(180deg, #121017, #17131a);
}

.news-section .card-grid {
    margin-top: 30px;
}

.news-card {
    --news-card-pad: 30px;
    --news-card-pad-wide: 60px;
    min-height: 230px;
    overflow: hidden;
}

.news-card img {
    display: block;
    margin: calc(0px - var(--news-card-pad)) calc(0px - var(--news-card-pad)) 22px;
    width: calc(100% + var(--news-card-pad-wide));
    max-width: none;
    height: 210px;
    object-fit: cover;
    border-radius: 0;
}

.tag {
    display: inline-flex;
    margin-bottom: 12px;
    color: var(--primary);
    font-size: 0.84rem;
    font-weight: 800;
    text-transform: uppercase;
}

.project-card img {
    width: 100%;
    height: 210px;
    object-fit: cover;
    border-radius: var(--radius);
    margin-bottom: 18px;
}

.final-cta {
    text-align: center;
    color: #ffffff;
    background: #2a1721;
}

.final-cta h2 {
    max-width: 760px;
    margin: 14px auto 0;
    font-size: 3rem;
    line-height: 1.1;
}

.final-cta p {
    max-width: 680px;
    margin: 16px auto 26px;
    color: rgba(255, 255, 255, 0.88);
    font-size: 1.12rem;
}

.timeline {
    display: grid;
    gap: 16px;
}

.timeline-item {
    display: grid;
    grid-template-columns: 150px 1fr;
    gap: 18px;
    padding: 22px;
    border-left: 4px solid var(--primary);
    background: var(--soft);
    border-radius: var(--radius);
}

.timeline-item strong {
    color: var(--primary);
}

.contact-info {
    display: grid;
    gap: 16px;
}

.info-box {
    padding: 22px;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: var(--white);
}

a.info-box {
    position: relative;
    display: block;
    text-decoration: none;
    transition: transform 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}

a.info-box::after {
    content: "→";
    position: absolute;
    top: 20px;
    right: 20px;
    width: 28px;
    height: 28px;
    display: grid;
    place-items: center;
    border-radius: 999px;
    background: rgba(31, 122, 130, 0.09);
    color: var(--teal);
    font-weight: 800;
    transition: transform 0.2s ease, background 0.2s ease;
}

a.info-box:hover {
    transform: translateY(-2px);
    border-color: rgba(31, 122, 130, 0.25);
    box-shadow: 0 16px 36px rgba(55, 24, 44, 0.1);
}

a.info-box:hover::after {
    transform: translateX(3px);
    background: rgba(31, 122, 130, 0.14);
}

.info-box .svg-icon {
    width: 26px;
    height: 26px;
    margin-bottom: 12px;
    color: var(--teal);
}

.info-box strong {
    display: block;
    margin-bottom: 6px;
    color: var(--primary);
}

.info-box span {
    color: var(--muted);
}

.info-box em {
    display: inline-flex;
    margin-top: 14px;
    color: var(--teal);
    font-size: 0.88rem;
    font-style: normal;
    font-weight: 800;
}

.info-box.accent {
    border-color: rgba(246, 178, 75, 0.38);
    background: var(--cream);
}

.contact-direct {
    border-color: rgba(31, 122, 130, 0.28);
    background: linear-gradient(180deg, #f5fbfb, var(--white));
}

.contact-news {
    border-color: rgba(37, 211, 102, 0.28);
    background: linear-gradient(180deg, #f4fff8, var(--white));
}

.contact-facebook {
    border-color: rgba(31, 122, 130, 0.28);
    background: linear-gradient(180deg, #f2fbfa, var(--white));
}

:root[data-theme="dark"] .contact-direct {
    border-color: rgba(100, 199, 207, 0.34);
    background:
        linear-gradient(180deg, rgba(100, 199, 207, 0.12), rgba(255, 255, 255, 0.025)),
        #18141d;
}

:root[data-theme="dark"] .contact-news {
    border-color: rgba(75, 218, 132, 0.34);
    background:
        linear-gradient(180deg, rgba(75, 218, 132, 0.12), rgba(255, 255, 255, 0.025)),
        #18141d;
}

:root[data-theme="dark"] .contact-facebook {
    border-color: rgba(100, 199, 207, 0.34);
    background:
        linear-gradient(180deg, rgba(100, 199, 207, 0.12), rgba(255, 255, 255, 0.025)),
        #18141d;
}

.contact-news .svg-icon {
    color: #168a46;
}

.contact-news strong {
    color: #126c38;
}

:root[data-theme="dark"] .contact-news .svg-icon,
:root[data-theme="dark"] .contact-news strong {
    color: #6ee79b;
}

.contact-facebook .svg-icon,
.contact-facebook strong {
    color: var(--teal);
}

.contact-direct .svg-icon {
    color: var(--teal);
}

.project-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.project-card {
    overflow: hidden;
}

.project-card img {
    height: 250px;
    border-radius: 0;
    margin-bottom: 0;
}

.project-card > div:last-child {
    padding: 26px;
}

.project-visual {
    min-height: 180px;
    display: grid;
    place-items: center;
    color: rgba(255, 255, 255, 0.88);
    font-size: 4rem;
    font-weight: 800;
    background: var(--primary-dark);
}

.project-photo-band {
    background: #fbfaf8;
}

:root[data-theme="dark"] .project-photo-band {
    background: linear-gradient(180deg, #17131a, #121017);
}

.cursinho-feature {
    display: grid;
    grid-template-columns: minmax(300px, 0.88fr) minmax(0, 1.12fr);
    gap: 34px;
    align-items: center;
    padding: 18px;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: var(--white);
    box-shadow: var(--shadow);
}

:root[data-theme="dark"] .cursinho-feature {
    background:
        linear-gradient(180deg, rgba(255, 255, 255, 0.045), rgba(255, 255, 255, 0.02)),
        #18141d;
    border-color: rgba(255, 255, 255, 0.12);
}

.cursinho-copy {
    padding: 24px;
}

.cursinho-copy h2 {
    margin: 14px 0 14px;
    font-size: 3rem;
    line-height: 1.06;
}

.cursinho-copy p {
    color: var(--muted);
}

.cursinho-points {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 22px;
}

.cursinho-points span {
    display: inline-flex;
    padding: 8px 10px;
    border-radius: 999px;
    background: rgba(31, 122, 130, 0.08);
    color: var(--teal);
    font-size: 0.84rem;
    font-weight: 800;
}

.cursinho-gallery {
    display: grid;
    grid-template-columns: 1fr 0.82fr;
    grid-template-rows: repeat(2, minmax(160px, 1fr));
    gap: 12px;
}

.cursinho-gallery img {
    width: 100%;
    height: 100%;
    min-height: 160px;
    object-fit: cover;
    border-radius: var(--radius);
}

.cursinho-gallery .cursinho-main {
    grid-row: span 2;
    min-height: 420px;
}

.courses-section {
    position: relative;
}

.course-group {
    margin-top: 36px;
    display: grid;
    grid-template-columns: minmax(220px, 0.32fr) minmax(0, 0.68fr);
    gap: 24px;
    align-items: start;
}

.course-heading {
    position: sticky;
    top: 112px;
}

.course-heading span {
    display: inline-flex;
    margin-bottom: 10px;
    color: var(--primary);
    font-size: 0.78rem;
    font-weight: 800;
    text-transform: uppercase;
}

.course-heading h3 {
    font-size: 1.75rem;
    line-height: 1.15;
}

.course-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
}

.course-grid.compact {
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.course-card {
    position: relative;
    overflow: hidden;
    min-height: 170px;
    padding: 22px;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: var(--white);
    box-shadow: 0 14px 34px rgba(55, 24, 44, 0.08);
    cursor: default;
    transition: transform 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.course-card::after {
    content: none;
}

.course-card:hover,
.course-card:focus-visible {
    transform: translateY(-2px);
    border-color: rgba(31, 122, 130, 0.24);
    box-shadow: 0 18px 36px rgba(55, 24, 44, 0.1);
    background: var(--white);
    outline: 0;
}

:root[data-theme="dark"] .course-card:hover,
:root[data-theme="dark"] .course-card:focus-visible {
    background: #18141d;
    box-shadow: 0 18px 36px rgba(0, 0, 0, 0.24);
}

.course-card:hover::after,
.course-card:focus-visible::after {
    transform: scaleX(1);
}

.course-icon {
    display: inline-grid;
    place-items: center;
    width: 46px;
    height: 46px;
    margin-bottom: 18px;
    border-radius: var(--radius);
    background: rgba(31, 122, 130, 0.08);
    color: var(--teal);
    transition: background 0.2s ease, color 0.2s ease, transform 0.2s ease;
}

.course-icon .svg-icon {
    width: 25px;
    height: 25px;
}

.course-card:hover .course-icon,
.course-card:focus-visible .course-icon {
    background: rgba(161, 0, 20, 0.08);
    color: var(--primary);
    transform: rotate(-2deg) scale(1.04);
}

.course-card strong {
    display: block;
    margin-bottom: 10px;
    color: var(--ink);
    font-size: 1.05rem;
}

.course-card p {
    color: var(--muted);
}

.theatre-feature-section {
    background: #fbfaf8;
}

:root[data-theme="dark"] .theatre-feature-section {
    background: #17131a;
}

.theatre-feature {
    display: grid;
    grid-template-columns: minmax(0, 1.2fr) minmax(320px, 0.8fr);
    gap: 38px;
    align-items: center;
}

.theatre-main-photo {
    overflow: hidden;
    border-radius: 14px;
    box-shadow: 0 28px 70px rgba(36, 33, 42, 0.18);
    background: #111;
}

.theatre-main-photo img {
    width: 100%;
    min-height: 520px;
    object-fit: cover;
    object-position: center;
    transition: transform 0.35s ease;
}

.theatre-main-photo:hover img {
    transform: scale(1.03);
}

.theatre-copy {
    padding: 28px;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: rgba(255, 255, 255, 0.86);
    box-shadow: var(--shadow);
}

:root[data-theme="dark"] .theatre-copy {
    background:
        linear-gradient(180deg, rgba(255, 255, 255, 0.055), rgba(255, 255, 255, 0.025)),
        #18141d;
    border-color: rgba(255, 255, 255, 0.12);
}

.theatre-copy h2 {
    margin: 14px 0 16px;
    font-size: 3.2rem;
    line-height: 1.03;
}

.theatre-copy p {
    color: var(--muted);
    margin-bottom: 22px;
}

.theatre-gallery-large {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 16px;
    margin-top: 28px;
}

.theatre-gallery-large img {
    width: 100%;
    min-height: 210px;
    object-fit: cover;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: var(--white);
    box-shadow: 0 16px 34px rgba(36, 33, 42, 0.12);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.theatre-gallery-large img:hover {
    transform: translateY(-4px) scale(1.02);
    box-shadow: 0 22px 48px rgba(36, 33, 42, 0.16);
}

.empty-state {
    padding: 26px;
}

.transparency-hero {
    background: var(--hero-surface);
}

.transparency-hero .page-hero-split {
    grid-template-columns: minmax(0, 1.08fr) minmax(320px, 0.92fr);
}

.transparency-hero h1 {
    max-width: 12ch;
    font-size: clamp(3rem, 4.2vw, 4rem);
    overflow-wrap: normal;
}

:root[data-theme="dark"] .transparency-hero {
    background: var(--hero-surface-dark);
}

.transparency-doc-section .section-heading p {
    font-size: 1.14rem;
}

.download-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 22px;
    margin-top: 34px;
}

.download-grid.emenda-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    max-width: 900px;
}

.download-card {
    position: relative;
    display: grid;
    gap: 10px;
    min-height: 260px;
    padding: 28px;
    border: 1px solid rgba(31, 122, 130, 0.15);
    border-radius: var(--radius);
    background:
        linear-gradient(150deg, rgba(255, 255, 255, 0.92), rgba(251, 250, 248, 0.92)),
        var(--white);
    color: var(--ink);
    text-decoration: none;
    box-shadow: var(--shadow);
    transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}

:root[data-theme="dark"] .download-card {
    border-color: rgba(100, 199, 207, 0.2);
    background:
        linear-gradient(150deg, rgba(255, 255, 255, 0.04), rgba(255, 255, 255, 0.02)),
        var(--white);
}

.download-card::after {
    content: ">";
    position: absolute;
    right: 24px;
    top: 24px;
    width: 34px;
    height: 34px;
    display: grid;
    place-items: center;
    border-radius: 999px;
    background: rgba(31, 122, 130, 0.1);
    color: var(--teal);
    font-size: 1.2rem;
    font-weight: 900;
    transition: transform 0.2s ease, background 0.2s ease, color 0.2s ease;
}

.download-card:hover {
    transform: translateY(-4px);
    border-color: rgba(31, 122, 130, 0.32);
    box-shadow: 0 24px 52px rgba(36, 33, 42, 0.14);
}

.download-card:hover::after {
    transform: translateX(3px);
    background: var(--teal);
    color: #ffffff;
}

.download-icon {
    display: grid;
    place-items: center;
    width: 52px;
    height: 52px;
    margin-bottom: 4px;
    border-radius: var(--radius);
    background: rgba(161, 0, 20, 0.08);
    color: var(--primary);
}

.download-icon .svg-icon {
    width: 28px;
    height: 28px;
}

.download-card strong {
    max-width: calc(100% - 38px);
    color: var(--ink);
    font-size: 1.24rem;
    line-height: 1.22;
}

.download-card span:not(.download-icon):not(.tag) {
    color: var(--muted);
    font-size: 1rem;
    line-height: 1.6;
}

.download-card em {
    align-self: end;
    margin-top: 12px;
    color: var(--teal);
    font-style: normal;
    font-weight: 900;
}

.transparency-cta {
    padding: 68px 0;
}

.contact-layout {
    grid-template-columns: 0.8fr 1.2fr;
}

.contact-form {
    display: grid;
    gap: 16px;
}

.contact-form label {
    display: grid;
    gap: 7px;
    color: var(--ink);
    font-weight: 700;
}

input,
select,
textarea {
    width: 100%;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    padding: 13px 14px;
    font: inherit;
    color: var(--ink);
    background: var(--white);
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

:root[data-theme="dark"] input,
:root[data-theme="dark"] select,
:root[data-theme="dark"] textarea {
    background: #18141d;
    border-color: #423648;
}

::placeholder {
    color: var(--muted);
    opacity: 0.78;
}

textarea {
    resize: vertical;
}

input:focus,
select:focus,
textarea:focus {
    outline: 0;
    border-color: var(--secondary);
    box-shadow: 0 0 0 4px rgba(169, 54, 168, 0.12);
}

.news-link {
    display: block;
    color: inherit;
    text-decoration: none;
}

.news-link em {
    display: inline-flex;
    margin-top: 16px;
    color: var(--teal);
    font-style: normal;
    font-weight: 900;
}

.news-detail-hero {
    background: var(--hero-surface);
}

:root[data-theme="dark"] .news-detail-hero {
    background: var(--hero-surface-dark);
}

.news-detail-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(280px, 360px);
    gap: 28px;
    align-items: start;
}

.news-detail-content {
    padding: 28px;
}

.news-detail-cover {
    width: 100%;
    max-height: 520px;
    object-fit: cover;
    border-radius: var(--radius);
    margin-bottom: 22px;
}

.news-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 22px;
}

.news-meta span {
    display: inline-flex;
    padding: 7px 11px;
    border-radius: 999px;
    background: rgba(31, 122, 130, 0.1);
    color: var(--teal);
    font-size: 0.92rem;
    font-weight: 800;
}

.rich-text {
    color: var(--ink);
    font-size: 1.12rem;
    line-height: 1.82;
}

.news-gallery {
    display: grid;
    gap: 14px;
    padding: 22px;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: var(--white);
    box-shadow: var(--shadow);
}

.news-gallery h2 {
    color: var(--primary);
    font-size: 1.2rem;
}

.news-gallery > div {
    display: grid;
    gap: 12px;
}

.news-gallery img {
    width: 100%;
    height: 170px;
    object-fit: cover;
    border-radius: var(--radius);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.news-gallery img:hover {
    transform: translateY(-2px);
    box-shadow: 0 18px 34px rgba(36, 33, 42, 0.14);
}

.field-error {
    border-color: var(--primary) !important;
    box-shadow: 0 0 0 4px rgba(161, 0, 20, 0.1) !important;
}

.admin-page {
    background: #fbfaf8;
}

.admin-brand {
    color: var(--primary);
    font-size: 1.2rem;
    font-weight: 900;
    text-decoration: none;
}

.admin-shell {
    display: grid;
    gap: 28px;
}

.admin-dashboard-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 22px;
}

.admin-stat-card,
.admin-list,
.admin-list-item {
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: var(--white);
    box-shadow: var(--shadow);
}

.admin-stat-card {
    display: grid;
    gap: 10px;
    padding: 26px;
}

.admin-stat-card h3,
.admin-list h2 {
    color: var(--ink);
}

.admin-stat-card strong {
    color: var(--primary);
    font-size: 2.8rem;
    line-height: 1;
}

.admin-stat-card span,
.admin-list-item p {
    color: var(--muted);
}

.admin-layout {
    display: grid;
    grid-template-columns: minmax(0, 1.1fr) minmax(340px, 0.9fr);
    gap: 26px;
    align-items: start;
}

.admin-form {
    display: grid;
    gap: 16px;
}

.admin-form-row,
.admin-actions,
.admin-item-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    align-items: center;
}

.admin-form-row > label {
    flex: 1 1 220px;
}

.admin-check {
    display: inline-flex !important;
    grid-template-columns: auto 1fr;
    align-items: center;
    gap: 10px;
    padding-top: 30px;
    font-weight: 800;
}

.admin-check input {
    width: 18px;
    height: 18px;
}

.admin-image-list {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 12px;
}

.admin-image-list label {
    padding: 10px;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: var(--soft);
}

.admin-image-list img {
    width: 100%;
    height: 110px;
    object-fit: cover;
    border-radius: 8px;
}

.admin-list {
    display: grid;
    gap: 14px;
    padding: 22px;
}

.admin-list-item {
    display: grid;
    gap: 14px;
    padding: 18px;
}

.admin-list-item h3 {
    margin-bottom: 4px;
    line-height: 1.2;
}

.admin-item-actions form {
    margin: 0;
}

.form-feedback,
.alert {
    font-weight: 800;
}

.form-feedback.error,
.alert.error {
    color: var(--primary);
}

.alert.success {
    color: #147243;
}

.main-footer {
    position: relative;
    padding-top: 56px;
    border-top: 1px solid rgba(36, 33, 42, 0.12);
    background: var(--soft);
    color: var(--ink);
}

:root[data-theme="dark"] .main-footer {
    border-top-color: rgba(255, 255, 255, 0.1);
    background: #17131a;
}

.main-footer::before {
    content: none;
}

.footer-grid {
    display: grid;
    grid-template-columns: 1.35fr 1fr 0.8fr 0.8fr;
    gap: 34px;
    align-items: start;
}

.footer-logo {
    width: 230px;
    max-width: 100%;
    margin-bottom: 20px;
    padding: 0;
    border-radius: 0;
    background: transparent;
    filter: none;
}

.main-footer h2 {
    margin-bottom: 14px;
    font-size: 1rem;
    color: var(--primary);
}

.main-footer p,
.main-footer a {
    color: var(--muted);
    text-decoration: none;
}

.main-footer a {
    transition: color 0.2s ease, border-color 0.2s ease, background 0.2s ease, transform 0.2s ease;
}

.main-footer a:hover {
    color: var(--primary);
}

.footer-links {
    list-style: none;
    display: grid;
    gap: 9px;
}

.social-links {
    display: grid;
    gap: 10px;
    max-width: 170px;
}

.social-links a {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 9px 12px;
    border: 1px solid rgba(161, 0, 20, 0.16);
    border-radius: var(--radius);
    background: var(--white);
}

.social-links .svg-icon {
    width: 18px;
    height: 18px;
    color: var(--primary);
}

.social-links a:hover {
    border-color: rgba(161, 0, 20, 0.32);
    background: rgba(161, 0, 20, 0.06);
    transform: translateY(-1px);
}

.footer-bottom {
    margin-top: 42px;
    padding: 18px 16px;
    text-align: center;
    border-top: 0;
    background: #211820;
}

.footer-bottom p {
    color: rgba(255, 255, 255, 0.86);
}

.reveal {
    opacity: 0;
    transform: translateY(18px);
    transition: opacity 0.55s ease, transform 0.55s ease;
}

.reveal.visible {
    opacity: 1;
    transform: translateY(0);
}

@media (max-width: 980px) {
    .menu-toggle {
        display: block;
    }

    .menu-toggle.open span:nth-child(1) {
        transform: translateY(7px) rotate(45deg);
    }

    .menu-toggle.open span:nth-child(2) {
        opacity: 0;
    }

    .menu-toggle.open span:nth-child(3) {
        transform: translateY(-7px) rotate(-45deg);
    }

    .nav-menu {
        position: absolute;
        top: 80px;
        left: 16px;
        right: 16px;
        display: none;
        padding: 18px;
        border: 1px solid var(--line);
        border-radius: var(--radius);
        background: var(--white);
        box-shadow: var(--shadow);
    }

    .nav-menu.open {
        display: grid;
    }

    .nav-menu ul {
        display: grid;
        gap: 6px;
        align-items: stretch;
    }

    .nav-menu a,
    .nav-logout-form button {
        display: block;
        white-space: normal;
    }

    .theme-toggle {
        justify-self: center;
        margin-top: 4px;
    }

    .admin-layout,
    .news-detail-layout,
    .story-layout,
    .about-intro,
    .story-split,
    .cursinho-feature,
    .course-group,
    .theatre-feature,
    .library-hero-grid,
    .page-hero-split,
    .library-activity,
    .contact-layout {
        grid-template-columns: 1fr;
    }

    .page-hero-media {
        order: -1;
        border-radius: 12px;
    }

    .page-hero-media img {
        height: auto;
        max-height: min(320px, 38svh);
    }

    .page-noticias .page-hero-illustration img {
        width: min(86vw, 360px);
        max-height: min(360px, 42svh);
    }

    .course-heading {
        position: static;
    }

    .about-narrative {
        padding: 0;
    }

    .card-grid,
    .project-grid,
    .footer-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .download-grid,
    .download-grid.emenda-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        max-width: none;
    }

    .admin-dashboard-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .course-grid,
    .course-grid.compact {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .theatre-gallery-large {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .theatre-main-photo img,
    .library-hero-photo img,
    .cursinho-gallery .cursinho-main {
        min-height: 330px;
    }

    .cursinho-gallery {
        grid-template-columns: 1fr 1fr;
    }

    .library-mosaic,
    .library-event-card {
        grid-template-columns: 1fr 1fr;
    }

    .library-event-card > div {
        grid-column: 1 / -1;
    }
}

@media (max-width: 640px) {
    body {
        font-size: 16.5px;
    }

    .container {
        width: min(100% - 24px, 1120px);
    }

    .header-container {
        min-height: 72px;
    }

    .brand img {
        width: 176px;
    }

    .nav-menu {
        top: 76px;
        left: 12px;
        right: 12px;
    }

    .hero h1,
    .page-hero h1 {
        font-size: 2.65rem;
    }

    .library-hero-photo img {
        height: 380px;
        min-height: 380px;
    }

    .page-hero {
        padding: 62px 0;
    }

    .section {
        padding: 58px 0;
    }

    .hero-actions {
        display: grid;
    }

    .card-grid,
    .admin-dashboard-grid,
    .admin-image-list,
    .project-grid,
    .download-grid,
    .download-grid.emenda-grid,
    .footer-grid,
    .course-grid,
    .course-grid.compact,
    .theatre-gallery-large {
        grid-template-columns: 1fr;
    }

    .timeline-item {
        grid-template-columns: 1fr;
    }

    .story-photo img,
    .theatre-main-photo img,
    .theatre-gallery-large img,
    .library-mosaic img,
    .library-activity-photo img,
    .library-event-card img {
        min-height: 240px;
    }

    .cursinho-gallery {
        grid-template-columns: 1fr;
        grid-template-rows: none;
    }

    .cursinho-gallery .cursinho-main,
    .cursinho-gallery img {
        min-height: 240px;
    }

    .library-mosaic,
    .library-event-card {
        grid-template-columns: 1fr;
    }

    .content-card,
    .about-highlight,
    .form-card,
    .feature-card,
    .news-card {
        padding: 22px;
    }

    .download-card {
        min-height: 230px;
        padding: 22px;
    }

    .download-card::after {
        top: 20px;
        right: 20px;
    }

    .news-card img {
        margin: -22px -22px 20px;
        width: calc(100% + 44px);
    }
}

/* Responsividade final para produção */
html,
body {
    width: 100%;
}

body {
    overflow-x: hidden;
}

body {
    text-size-adjust: 100%;
    -webkit-text-size-adjust: 100%;
}

h1,
h2,
h3,
h4,
p,
a,
span,
strong,
em,
li,
button,
input,
select,
textarea {
    overflow-wrap: break-word;
}

.hero h1,
.page-hero h1 {
    font-size: 4.2rem;
}

.section-heading h2,
.about-narrative h2,
.final-cta h2,
.cursinho-copy h2 {
    font-size: 3rem;
}

.theatre-copy h2 {
    font-size: 3.2rem;
}

.library-event-card h2 {
    font-size: 2.35rem;
}

.course-heading h3 {
    font-size: 1.75rem;
}

.btn,
button.btn {
    max-width: 100%;
    white-space: normal;
    text-align: center;
}

.nav-menu {
    min-width: 0;
}

.nav-menu ul,
.cursinho-points,
.admin-actions,
.admin-item-actions,
.news-meta {
    min-width: 0;
}

.news-placeholder,
.project-visual {
    min-height: 210px;
}

/* Ajustes mobile adicionais */
@media (max-width: 480px) {
    .brand img {
        width: 140px;
        height: auto;
    }

    .header-container {
        min-height: 64px;
        gap: 12px;
        padding: 6px 0;
    }

    .menu-toggle {
        width: 48px;
        height: 48px;
    }

    .menu-toggle span {
        width: 22px;
        margin: 6px auto;
    }

    .hero h1,
    .page-hero h1 {
        font-size: 2rem;
        line-height: 1.08;
    }

    .hero p,
    .page-hero p {
        font-size: 1rem;
    }

    .btn,
    button.btn {
        min-height: 44px;
        padding: 10px 14px;
        font-size: 0.98rem;
    }

    .nav-menu a,
    .nav-logout-form button {
        padding: 12px 10px;
        font-size: 1rem;
        touch-action: manipulation;
    }

    input,
    select,
    textarea {
        font-size: 1rem;
        padding: 12px 10px;
    }

    .footer-grid {
        grid-template-columns: 1fr;
    }

    .container {
        width: calc(100% - 20px);
    }

    .hero-actions {
        gap: 12px;
    }
}

/* Breakpoint extra para telefones muito pequenos */
@media (max-width: 360px) {
    .brand img {
        width: 128px;
    }

    .header-container {
        min-height: 56px;
        gap: 8px;
    }

    .hero h1,
    .page-hero h1 {
        font-size: 1.75rem;
        line-height: 1.06;
    }

    .hero p,
    .page-hero p {
        font-size: 0.98rem;
    }

    .page-hero {
        padding: 40px 0;
    }

    .hero-actions {
        gap: 8px;
    }

    .btn,
    button.btn {
        padding: 9px 12px;
        min-height: 40px;
        font-size: 0.95rem;
    }

    .eyebrow {
        font-size: 0.72rem;
        padding: 6px 10px;
    }
}

.login-page {
    min-height: 100vh;
    min-height: 100dvh;
    display: grid;
    place-items: center;
    padding: 24px;
}

.login-card {
    width: min(100%, 440px);
}

.login-card img {
    max-width: min(260px, 100%);
    height: auto;
}

@media (max-width: 1120px) {
    .header-container {
        gap: 18px;
    }

    .brand img {
        width: 184px;
    }

    .nav-menu {
        gap: 10px;
    }

    .nav-menu a,
    .nav-logout-form button {
        padding-inline: 9px;
        font-size: 0.9rem;
    }
}

@media (max-width: 820px) {
    .hero h1,
    .page-hero h1 {
        font-size: 3.15rem;
    }

    .section-heading h2,
    .about-narrative h2,
    .final-cta h2,
    .cursinho-copy h2,
    .theatre-copy h2 {
        font-size: 2.35rem;
    }

    .library-event-card h2 {
        font-size: 2rem;
    }

    .page-hero,
    .library-hero {
        padding: 58px 0;
    }

    .section {
        padding: 58px 0;
    }

    .library-hero-grid {
        gap: 28px;
        padding: 48px 0;
    }

    .nav-menu {
        max-height: calc(100vh - 94px);
        max-height: calc(100dvh - 94px);
        overflow-y: auto;
    }

    .nav-menu.open {
        align-content: start;
    }

    .nav-menu ul {
        width: 100%;
    }

    .nav-menu a,
    .nav-logout-form button,
    .nav-cta {
        width: 100%;
    }

    .content-card,
    .about-highlight,
    .form-card,
    .feature-card,
    .news-card,
    .theatre-copy,
    .admin-list,
    .admin-stat-card,
    .empty-state,
    .info-box {
        padding: 24px;
    }

    .project-card > div:last-child {
        padding: 24px;
    }

    .footer-grid {
        gap: 24px;
    }

    .social-links {
        max-width: none;
    }

    .social-links a {
        width: 100%;
    }

    .news-detail-content {
        padding: 24px;
    }

    .rich-text {
        font-size: 1.04rem;
        line-height: 1.75;
    }
}

@media (max-width: 520px) {
    body {
        font-size: 16px;
        line-height: 1.58;
    }

    .container {
        width: min(100% - 20px, 1120px);
    }

    .brand img {
        width: 148px;
    }

    .header-container {
        min-height: 66px;
    }

    .menu-toggle {
        width: 42px;
        height: 42px;
        flex: 0 0 auto;
    }

    .nav-menu {
        top: 70px;
        left: 10px;
        right: 10px;
        padding: 14px;
    }

    .hero h1,
    .page-hero h1 {
        margin-top: 14px;
        font-size: 2.45rem;
        line-height: 1.08;
    }

    .section-heading h2,
    .about-narrative h2,
    .final-cta h2,
    .cursinho-copy h2,
    .theatre-copy h2 {
        font-size: 2rem;
        line-height: 1.12;
    }

    .course-heading h3 {
        font-size: 1.45rem;
    }

    .hero p,
    .page-hero p,
    .section-heading p,
    .content-card,
    .form-card,
    .about-narrative,
    .about-highlight,
    .contact-info {
        font-size: 1rem;
    }

    .hero-actions,
    .admin-actions,
    .admin-item-actions {
        grid-template-columns: 1fr;
        width: 100%;
    }

    .hero-actions .btn,
    .admin-actions .btn,
    .admin-item-actions .btn,
    .admin-item-actions form,
    .admin-item-actions button,
    .pix-actions,
    .contact-form .btn,
    .final-cta .btn {
        width: 100%;
    }

    .donation-values {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .pix-result {
        grid-template-columns: 1fr;
    }

    .pix-qr-card {
        width: min(240px, 100%);
        margin: 0 auto;
    }

    .pix-actions {
        grid-template-columns: 1fr;
    }

    .cursinho-points {
        display: grid;
        grid-template-columns: 1fr;
    }

    .library-hero-photo img,
    .story-photo img,
    .theatre-main-photo img,
    .library-activity-photo img,
    .project-card img,
    .news-card img,
    .news-detail-cover {
        height: auto;
        min-height: 220px;
        max-height: none;
        aspect-ratio: 4 / 3;
    }

    .cursinho-gallery img,
    .cursinho-gallery .cursinho-main,
    .theatre-gallery-large img,
    .library-mosaic img,
    .library-event-card img {
        height: auto;
        min-height: 210px;
        aspect-ratio: 4 / 3;
    }

    .library-event-card,
    .library-mosaic {
        gap: 12px;
    }

    .library-event-card {
        padding: 12px;
    }

    .library-event-card > div {
        padding: 12px 4px 4px;
    }

    .card-grid,
    .project-grid,
    .download-grid,
    .download-grid.emenda-grid,
    .course-grid,
    .course-grid.compact,
    .admin-dashboard-grid,
    .admin-image-list,
    .footer-grid {
        gap: 16px;
    }

    .content-card,
    .about-highlight,
    .form-card,
    .feature-card,
    .news-card,
    .theatre-copy,
    .admin-list,
    .admin-stat-card,
    .empty-state,
    .info-box,
    .news-detail-content,
    .news-gallery {
        padding: 18px;
    }

    .news-card img {
        margin: -18px -18px 18px;
        width: calc(100% + 36px);
    }

    .project-card > div:last-child {
        padding: 20px;
    }

    .download-card {
        min-height: auto;
        padding: 20px;
    }

    .download-card strong {
        max-width: none;
        padding-right: 38px;
    }

    .timeline-item {
        gap: 8px;
        padding: 18px;
    }

    .admin-form-row {
        display: grid;
        grid-template-columns: 1fr;
    }

    .admin-check {
        padding-top: 0;
    }

    .login-page {
        align-items: start;
        padding: 16px;
    }
}

@media (max-width: 380px) {
    .container {
        width: min(100% - 16px, 1120px);
    }

    .brand img {
        width: 132px;
    }

    .hero h1,
    .page-hero h1 {
        font-size: 2.12rem;
    }

    .section-heading h2,
    .about-narrative h2,
    .final-cta h2,
    .cursinho-copy h2,
    .theatre-copy h2 {
        font-size: 1.78rem;
    }

    .btn,
    button.btn {
        min-height: 44px;
        padding: 11px 14px;
    }

    .eyebrow,
    .tag {
        font-size: 0.76rem;
    }

    .content-card,
    .about-highlight,
    .form-card,
    .feature-card,
    .news-card,
    .theatre-copy,
    .admin-list,
    .admin-stat-card,
    .empty-state,
    .info-box,
    .news-detail-content,
    .news-gallery {
        padding: 16px;
    }

    .news-card img {
        margin: -16px -16px 16px;
        width: calc(100% + 32px);
    }

    input,
    select,
    textarea {
        padding: 12px;
    }
}

/* Ajustes responsivos finais para publicação */
main,
section,
.container,
.section-heading,
.project-card,
.news-card,
.download-card,
.course-card,
.info-box {
    min-width: 0;
}

.hero h1,
.page-hero h1 {
    font-size: clamp(2.15rem, 7.6vw, 4.2rem);
    line-height: 1.06;
}

.section-heading h2,
.about-narrative h2,
.final-cta h2,
.cursinho-copy h2 {
    font-size: clamp(1.82rem, 5.4vw, 3rem);
    line-height: 1.12;
}

.theatre-copy h2 {
    font-size: clamp(1.82rem, 5.6vw, 3.2rem);
    line-height: 1.08;
}

.library-event-card h2 {
    font-size: clamp(1.65rem, 4.8vw, 2.35rem);
}

.hero p,
.page-hero p,
.section-heading p {
    font-size: clamp(1rem, 2.4vw, 1.18rem);
}

.library-hero-photo,
.story-photo,
.library-activity-photo,
.theatre-main-photo,
.project-card,
.news-card,
.download-card,
.course-card,
.info-box {
    overflow: hidden;
}

.library-hero-photo img,
.story-photo img,
.library-activity-photo img,
.theatre-main-photo img,
.project-card img,
.news-card img,
.news-detail-cover,
.library-mosaic img,
.library-event-card img,
.cursinho-gallery img,
.theatre-gallery-large img {
    object-fit: cover;
}

@media (max-width: 900px) {
    .main-header {
        position: sticky;
    }

    body.menu-open {
        overflow: hidden;
    }

    .library-hero-grid,
    .story-layout,
    .contact-layout,
    .news-detail-layout,
    .course-group,
    .cursinho-feature,
    .theatre-feature {
        gap: 28px;
    }

    .page-hero,
    .library-hero {
        padding: 54px 0;
    }

    .section {
        padding: 56px 0;
    }

    .nav-menu {
        z-index: 60;
    }

    .page-biblioteca,
    .page-projetos,
    .page-contato,
    .page-noticias,
    .page-transparencia,
    .page-noticia,
    body[class^="page-noticia-"] {
        scroll-snap-type: y mandatory;
    }

    .page-biblioteca main,
    .page-projetos main,
    .page-contato main,
    .page-noticias main,
    .page-transparencia main,
    .page-noticia main,
    body[class^="page-noticia-"] main {
        scroll-snap-type: y mandatory;
    }

    .page-biblioteca main > section,
    .page-projetos main > section,
    .page-contato main > section,
    .page-noticias main > section,
    .page-transparencia main > section,
    .page-noticia main > section,
    body[class^="page-noticia-"] main > section {
        min-height: calc(100svh - var(--page-header-height));
        scroll-snap-align: start;
        padding-top: 28px;
        padding-bottom: 28px;
    }
}

@media (max-width: 700px) {
    .hero-actions,
    .admin-actions,
    .admin-item-actions {
        display: grid;
        grid-template-columns: 1fr;
    }

    .hero-actions .btn,
    .admin-actions .btn,
    .admin-item-actions .btn,
    .admin-item-actions form,
    .admin-item-actions button,
    .pix-actions,
    .contact-form .btn,
    .final-cta .btn {
        width: 100%;
    }

    .cursinho-points span,
    .news-meta span {
        width: 100%;
        justify-content: center;
        text-align: center;
    }

    .download-card strong {
        max-width: none;
        padding-right: 40px;
    }
}

@media (max-width: 560px) {
    .page-biblioteca,
    .page-projetos,
    .page-contato,
    .page-noticias,
    .page-transparencia,
    .page-noticia,
    body[class^="page-noticia-"] {
        --page-header-height: 64px;
    }

    .page-biblioteca main > section,
    .page-projetos main > section,
    .page-contato main > section,
    .page-noticias main > section,
    .page-transparencia main > section,
    .page-noticia main > section,
    body[class^="page-noticia-"] main > section {
        gap: 18px;
        padding-top: 22px;
        padding-bottom: 22px;
    }

    .container {
        width: min(100% - 20px, 1120px);
    }

    .brand img {
        width: clamp(128px, 40vw, 154px);
    }

    .header-container {
        min-height: 64px;
        gap: 12px;
    }

    .nav-menu {
        top: 68px;
        left: 10px;
        right: 10px;
        max-height: calc(100dvh - 82px);
    }

    .nav-menu a,
    .nav-logout-form button {
        padding: 12px 14px;
    }

    .page-hero,
    .library-hero {
        padding: 44px 0;
    }

    .section {
        padding: 46px 0;
    }

    .library-hero-photo,
    .story-photo,
    .library-activity-photo,
    .theatre-main-photo {
        min-height: 0;
        aspect-ratio: 4 / 3;
    }

    .library-hero-photo img,
    .story-photo img,
    .library-activity-photo img,
    .theatre-main-photo img,
    .project-card img,
    .news-card img,
    .news-detail-cover,
    .library-mosaic img,
    .library-event-card img,
    .cursinho-gallery img,
    .cursinho-gallery .cursinho-main,
    .theatre-gallery-large img {
        width: 100%;
        height: auto;
        min-height: 0;
        aspect-ratio: 4 / 3;
    }

    .news-card img {
        height: auto;
        margin: -20px -20px 18px;
        width: calc(100% + 40px);
    }

    .library-event-card {
        padding: 10px;
    }

    .library-event-card > div {
        padding: 10px 4px 4px;
    }

    .footer-grid {
        text-align: left;
    }
}

/* Melhorias para conteúdo embutido e toque em dispositivos móveis */
iframe {
    max-width: 100%;
}

video,
embed,
object {
    max-width: 100%;
    height: auto;
}

/* Reduz destaque de toque e melhora resposta em dispositivos touch */
a,
button {
    -webkit-tap-highlight-color: transparent;
    touch-action: manipulation;
}

@media (max-width: 420px) {
    .container {
        width: min(100% - 16px, 1120px);
    }

    .hero h1,
    .page-hero h1 {
        font-size: clamp(1.95rem, 9vw, 2.15rem);
    }

    .section-heading h2,
    .about-narrative h2,
    .final-cta h2,
    .cursinho-copy h2,
    .theatre-copy h2 {
        font-size: clamp(1.62rem, 7.8vw, 1.82rem);
    }

    .content-card,
    .about-highlight,
    .form-card,
    .feature-card,
    .news-card,
    .theatre-copy,
    .admin-list,
    .admin-stat-card,
    .empty-state,
    .info-box,
    .news-detail-content,
    .news-gallery,
    .download-card,
    .course-card {
        padding: 16px;
    }

    .news-card img {
        margin: -16px -16px 16px;
        width: calc(100% + 32px);
    }

    .download-card::after,
    a.info-box::after {
        right: 16px;
    }
}

@media (max-width: 640px) {
    .donation-slot {
        padding: 14px;
    }

    .donation-widget {
        gap: 10px;
    }

    .donation-widget h2 {
        font-size: clamp(1.38rem, 7vw, 1.62rem);
        line-height: 1.08;
    }

    .donation-widget > p {
        font-size: 0.94rem;
        line-height: 1.42;
    }

    .donation-support-ways {
        grid-template-columns: 1fr;
        gap: 6px;
    }

    .donation-support-ways div {
        padding: 8px 10px;
        border-top-width: 0;
        border-left: 3px solid var(--accent);
    }

    .donation-support-ways strong {
        margin: 0;
        font-size: 0.92rem;
    }

    .donation-support-ways span {
        font-size: 0.88rem;
        line-height: 1.28;
    }

    .donation-custom {
        gap: 5px;
    }

    .donation-custom input {
        min-height: 44px;
        padding: 9px 12px;
    }

    .donation-note {
        margin-top: -6px;
        font-size: 0.84rem;
    }

    .donation-submit,
    .donation-whatsapp-direct {
        min-height: 44px;
        padding-block: 9px;
    }

    .pix-feedback {
        min-height: 18px;
        font-size: 0.86rem;
    }

    .pix-result {
        grid-template-columns: 118px minmax(0, 1fr);
        gap: 10px;
        padding-top: 10px;
    }

    .pix-copy-area textarea {
        min-height: 80px;
        font-size: 0.76rem;
    }
}

@media (max-width: 420px) {
    .donation-slot {
        padding: 12px;
    }

    .donation-widget h2 {
        font-size: clamp(1.28rem, 6.8vw, 1.48rem);
    }

    .donation-widget > p,
    .donation-support-ways span {
        font-size: 0.86rem;
    }

    .donation-support-ways div {
        padding: 7px 9px;
    }

    .pix-result {
        grid-template-columns: 1fr;
    }

    .pix-qr-card {
        justify-self: center;
        width: min(176px, 100%);
    }
}

/* Refinamento mobile geral: leitura, densidade e toque */
@media (max-width: 640px) {
    body {
        font-size: 16px;
        line-height: 1.58;
    }

    .page-hero,
    .library-hero {
        padding: 36px 0 40px;
    }

    .section {
        padding: 38px 0;
    }

    .hero h1,
    .page-hero h1 {
        max-width: min(100%, 22ch);
        font-size: clamp(1.82rem, 8.8vw, 2.12rem);
        line-height: 1.08;
        letter-spacing: 0;
    }

    .hero p,
    .page-hero p,
    .section-heading p,
    .content-card p,
    .feature-card p,
    .project-card p,
    .course-card p,
    .download-card span:not(.download-icon):not(.tag),
    .info-box span {
        font-size: 0.98rem;
        line-height: 1.56;
    }

    .section-heading {
        margin-bottom: 24px;
    }

    .section-heading h2,
    .about-narrative h2,
    .final-cta h2,
    .cursinho-copy h2,
    .theatre-copy h2,
    .library-event-card h2 {
        font-size: clamp(1.48rem, 7vw, 1.78rem);
        line-height: 1.14;
        letter-spacing: 0;
    }

    .eyebrow,
    .tag {
        font-size: 0.74rem;
        line-height: 1.25;
    }

    .content-card,
    .about-highlight,
    .form-card,
    .feature-card,
    .news-card,
    .theatre-copy,
    .download-card,
    .course-card,
    .info-box,
    .library-event-card {
        border-radius: 10px;
        padding: 16px;
    }

    .btn,
    button.btn,
    .nav-menu a,
    .nav-logout-form button,
    .donation-value {
        min-height: 46px;
    }

    .hero-actions,
    .pix-actions {
        gap: 10px;
    }

    .library-hero-photo img,
    .page-hero-media img,
    .story-photo img,
    .library-activity-photo img,
    .theatre-main-photo img,
    .project-card img,
    .news-card img,
    .news-detail-cover,
    .library-mosaic img,
    .library-event-card img,
    .cursinho-gallery img,
    .cursinho-gallery .cursinho-main,
    .theatre-gallery-large img {
        max-height: 300px;
    }

    .page-hero-split {
        gap: 18px;
    }

    .page-hero-media img {
        height: auto;
        max-height: 220px;
    }

    .page-noticias .page-hero-illustration img {
        width: min(84vw, 300px);
        max-height: 280px;
    }

    .download-card {
        min-height: auto;
    }

    .download-card strong,
    .info-box strong,
    .course-card strong,
    .project-card h2 {
        font-size: 1.05rem;
        line-height: 1.22;
    }
}

@media (max-width: 420px) {
    .container {
        width: min(100% - 18px, 1120px);
    }

    .page-hero,
    .library-hero {
        padding: 30px 0 34px;
    }

    .section {
        padding: 32px 0;
    }

    .hero h1,
    .page-hero h1 {
        font-size: clamp(1.68rem, 8.6vw, 1.95rem);
    }

    .hero p,
    .page-hero p,
    .section-heading p,
    .content-card p,
    .feature-card p,
    .project-card p,
    .course-card p,
    .download-card span:not(.download-icon):not(.tag),
    .info-box span {
        font-size: 0.96rem;
        line-height: 1.52;
    }

    .section-heading h2,
    .about-narrative h2,
    .final-cta h2,
    .cursinho-copy h2,
    .theatre-copy h2,
    .library-event-card h2 {
        font-size: clamp(1.38rem, 7.4vw, 1.62rem);
    }

    .content-card,
    .about-highlight,
    .form-card,
    .feature-card,
    .news-card,
    .theatre-copy,
    .download-card,
    .course-card,
    .info-box,
    .library-event-card {
        padding: 14px;
    }

    .library-hero-photo img,
    .page-hero-media img,
    .story-photo img,
    .library-activity-photo img,
    .theatre-main-photo img,
    .project-card img,
    .news-card img,
    .news-detail-cover,
    .library-mosaic img,
    .library-event-card img,
    .cursinho-gallery img,
    .cursinho-gallery .cursinho-main,
    .theatre-gallery-large img {
        max-height: 240px;
    }

    .page-hero-media img {
        height: auto;
        max-height: 190px;
    }

    .page-noticias .page-hero-illustration img {
        width: min(82vw, 250px);
        max-height: 240px;
    }
}

/* Camada final de estabilidade mobile: evita overflow por padding variável. */
.news-card img {
    margin-inline: calc(0px - var(--news-card-pad));
    width: calc(100% + var(--news-card-pad-wide));
}

@media (max-width: 640px) {
    .news-card {
        --news-card-pad: 16px;
        --news-card-pad-wide: 32px;
    }

    .news-card img {
        margin-top: calc(0px - var(--news-card-pad));
        margin-bottom: 16px;
    }
}

@media (max-width: 420px) {
    .news-card {
        --news-card-pad: 14px;
        --news-card-pad-wide: 28px;
    }

    .news-card img {
        margin-bottom: 14px;
    }
}

/* Auditoria mobile final: estabiliza slides, mídia e componentes largos. */
@media (max-width: 900px) {
    .page-biblioteca,
    .page-projetos,
    .page-contato,
    .page-noticias,
    .page-transparencia,
    .page-noticia,
    body[class^="page-noticia-"],
    .page-index,
    .page-sobre {
        scroll-snap-type: none;
    }

    .page-biblioteca main,
    .page-projetos main,
    .page-contato main,
    .page-noticias main,
    .page-transparencia main,
    .page-noticia main,
    body[class^="page-noticia-"] main,
    .page-index main,
    .page-sobre main {
        scroll-snap-type: none;
    }

    .page-biblioteca main > section,
    .page-projetos main > section,
    .page-contato main > section,
    .page-noticias main > section,
    .page-transparencia main > section,
    .page-noticia main > section,
    body[class^="page-noticia-"] main > section,
    .page-index main > section,
    .page-sobre main > section {
        scroll-snap-align: none;
        scroll-snap-stop: normal;
    }
}

@media (max-width: 640px) {
    html,
    body {
        max-width: 100%;
        overflow-x: hidden;
    }

    body {
        font-size: 16px;
        line-height: 1.56;
    }

    .container,
    .page-hero main,
    .page-hero .container {
        width: min(100% - 20px, 1120px);
    }

    .main-header {
        min-width: 0;
    }

    .header-container {
        min-height: 64px;
        gap: 10px;
    }

    .brand {
        min-width: 0;
    }

    .brand img {
        width: clamp(126px, 39vw, 154px);
        height: auto;
    }

    .nav-menu {
        top: 68px;
        left: 10px;
        right: 10px;
        max-height: calc(100dvh - 84px);
        overflow-y: auto;
        overscroll-behavior: contain;
    }

    .nav-menu a,
    .nav-logout-form button {
        min-height: 44px;
        padding: 11px 12px;
        line-height: 1.2;
    }

    .page-hero,
    .library-hero {
        padding: 32px 0 34px;
    }

    .section {
        padding: 34px 0;
    }

    .page-hero-split,
    .library-hero-grid,
    .contact-layout,
    .news-detail-layout,
    .story-layout,
    .about-intro,
    .story-split,
    .cursinho-feature,
    .theatre-feature,
    .course-group,
    .project-grid,
    .card-grid,
    .download-grid,
    .download-grid.emenda-grid,
    .footer-grid,
    .course-grid,
    .course-grid.compact,
    .theatre-gallery-large,
    .library-mosaic,
    .library-event-card,
    .admin-layout,
    .admin-dashboard-grid,
    .admin-image-list {
        grid-template-columns: 1fr;
    }

    .page-hero-split {
        gap: 18px;
    }

    .page-hero-copy {
        order: 1;
    }

    .page-hero-media {
        order: 0;
        justify-self: center;
        width: min(100%, 420px);
        max-width: 100%;
        border-radius: 12px;
    }

    .page-hero-media img,
    .library-hero-photo img,
    .story-photo img,
    .library-activity-photo img,
    .theatre-main-photo img,
    .project-card img,
    .news-card img,
    .news-detail-cover,
    .library-mosaic img,
    .library-event-card img,
    .cursinho-gallery img,
    .cursinho-gallery .cursinho-main,
    .theatre-gallery-large img {
        width: 100%;
        height: auto;
        min-height: 0;
        max-height: 260px;
        aspect-ratio: auto;
        object-fit: cover;
    }

    .page-hero-media img {
        object-fit: contain;
    }

    .page-noticias .page-hero-media {
        width: min(88vw, 320px);
    }

    .page-noticias .page-hero-illustration img {
        width: 100%;
        max-height: min(330px, 42svh);
    }

    .hero h1,
    .page-hero h1 {
        max-width: 100%;
        font-size: clamp(1.72rem, 8vw, 2.05rem);
        line-height: 1.08;
    }

    .section-heading h2,
    .about-narrative h2,
    .final-cta h2,
    .cursinho-copy h2,
    .theatre-copy h2,
    .library-event-card h2 {
        max-width: 100%;
        font-size: clamp(1.38rem, 6.8vw, 1.72rem);
        line-height: 1.14;
    }

    .hero p,
    .page-hero p,
    .section-heading p,
    .content-card p,
    .feature-card p,
    .project-card p,
    .course-card p,
    .download-card span:not(.download-icon):not(.tag),
    .info-box span {
        font-size: 0.96rem;
        line-height: 1.52;
    }

    .hero-actions,
    .pix-actions,
    .admin-actions,
    .admin-item-actions {
        display: grid;
        grid-template-columns: 1fr;
        gap: 10px;
    }

    .hero-actions .btn,
    .pix-actions .btn,
    .admin-actions .btn,
    .admin-item-actions .btn,
    .admin-item-actions form,
    .admin-item-actions button,
    .contact-form .btn,
    .final-cta .btn {
        width: 100%;
    }

    .btn,
    button.btn,
    .donation-value {
        min-height: 44px;
        padding: 10px 14px;
    }

    .content-card,
    .about-highlight,
    .form-card,
    .feature-card,
    .news-card,
    .theatre-copy,
    .download-card,
    .course-card,
    .info-box,
    .library-event-card,
    .empty-state,
    .news-detail-content,
    .news-gallery {
        padding: 14px;
        border-radius: 10px;
    }

    .news-card {
        --news-card-pad: 14px;
        --news-card-pad-wide: 28px;
        min-height: auto;
    }

    .download-card,
    .course-card,
    .info-box {
        min-height: auto;
    }

    .pix-result {
        grid-template-columns: 1fr;
    }

    .pix-qr-card {
        justify-self: center;
    }

    .rich-text,
    .pix-copy-area textarea,
    .news-detail-content,
    .download-card,
    .info-box {
        overflow-wrap: anywhere;
    }
}

@media (max-width: 380px) {
    .container,
    .page-hero .container {
        width: min(100% - 16px, 1120px);
    }

    .brand img {
        width: clamp(118px, 37vw, 138px);
    }

    .hero h1,
    .page-hero h1 {
        font-size: clamp(1.55rem, 8.6vw, 1.8rem);
    }

    .section-heading h2,
    .about-narrative h2,
    .final-cta h2,
    .cursinho-copy h2,
    .theatre-copy h2,
    .library-event-card h2 {
        font-size: clamp(1.28rem, 7.6vw, 1.5rem);
    }

    .page-noticias .page-hero-media {
        width: min(86vw, 260px);
    }

    .page-noticias .page-hero-illustration img {
        max-height: 240px;
    }
}

@media (max-width: 1120px) {
    .menu-toggle {
        display: block;
        flex: 0 0 auto;
    }

    .menu-toggle.open span:nth-child(1) {
        transform: translateY(7px) rotate(45deg);
    }

    .menu-toggle.open span:nth-child(2) {
        opacity: 0;
    }

    .menu-toggle.open span:nth-child(3) {
        transform: translateY(-7px) rotate(-45deg);
    }

    .nav-menu {
        position: absolute;
        top: 80px;
        left: 16px;
        right: 16px;
        display: none;
        max-height: calc(100dvh - 96px);
        padding: 16px;
        border: 1px solid var(--line);
        border-radius: var(--radius);
        background: var(--white);
        box-shadow: var(--shadow);
        overflow-y: auto;
    }

    .nav-menu.open {
        display: grid;
        align-content: start;
    }

    .nav-menu ul {
        display: grid;
        width: 100%;
        gap: 6px;
    }

    .nav-menu a,
    .nav-logout-form button {
        display: block;
        width: 100%;
        white-space: normal;
        text-align: left;
    }

    .nav-cta,
    .theme-toggle {
        justify-self: stretch;
    }

    .theme-toggle {
        justify-content: center;
        width: 100%;
        min-height: 42px;
    }
}

@media (max-width: 640px) {
    .nav-menu {
        top: 68px;
        left: 10px;
        right: 10px;
        max-height: calc(100dvh - 84px);
        padding: 12px;
    }

    .theme-toggle {
        min-height: 40px;
    }
}

/* Fluxo natural: o conteúdo define a altura das seções. */
.page-biblioteca,
.page-projetos,
.page-contato,
.page-noticias,
.page-transparencia,
.page-noticia,
.page-sobre,
.page-index,
body[class^="page-noticia-"],
.page-biblioteca main,
.page-projetos main,
.page-contato main,
.page-noticias main,
.page-transparencia main,
.page-noticia main,
.page-sobre main,
.page-index main,
body[class^="page-noticia-"] main {
    scroll-snap-type: none;
}

.page-biblioteca main > section,
.page-projetos main > section,
.page-contato main > section,
.page-noticias main > section,
.page-transparencia main > section,
.page-noticia main > section,
.page-sobre main > section,
.page-index main > section,
body[class^="page-noticia-"] main > section {
    min-height: auto;
    scroll-snap-align: none;
    scroll-snap-stop: normal;
}

/* Fotos ocupam o enquadramento; somente ilustrações preservam a imagem inteira. */
.page-hero-media:not(.page-hero-illustration) img {
    width: 100%;
    height: auto;
    max-height: none;
    aspect-ratio: 3 / 2;
    object-fit: cover;
}
