:root {
    --color-primary: #0056a6;
    --color-primary-dark: #003a73;
    --color-primary-deep: #0a2540;
    --color-secondary: #00a86b;
    --color-secondary-dark: #00794d;
    --color-accent: #e8f2fb;
    --color-bg: #f5f8fc;
    --color-card: #ffffff;
    --color-text: #16324a;
    --color-muted: #5e7286;
    --color-border: rgba(0, 86, 166, 0.12);
    --color-white: #ffffff;

    --shadow-sm: 0 12px 28px rgba(7, 42, 83, 0.08);
    --shadow-md: 0 22px 48px rgba(7, 42, 83, 0.14);

    --radius-sm: 14px;
    --radius-md: 18px;
    --radius-lg: 24px;

    --container: 1200px;
    --transition: 0.25s ease;
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    background: var(--color-bg);
    color: var(--color-text);
    font-family: "Inter", Arial, Helvetica, sans-serif;
}

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

a {
    color: inherit;
    text-decoration: none;
}

button,
input,
textarea,
select {
    font: inherit;
}

h1,
h2,
h3,
h4,
h5,
h6 {
    margin-top: 0;
    font-family: "Montserrat", "Inter", Arial, sans-serif;
}

.app-topbar {
    background: linear-gradient(90deg, var(--color-primary-deep), var(--color-primary-dark));
    color: rgba(255, 255, 255, 0.92);
    font-size: 0.9rem;
}

.app-topbar__container {
    max-width: var(--container);
    margin: 0 auto;
    padding: 10px 22px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 18px;
    flex-wrap: wrap;
}

.app-topbar__item {
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.app-topbar__item svg {
    width: 16px;
    height: 16px;
}

.app-header {
    position: sticky;
    top: 0;
    z-index: 60;
    background: rgba(255, 255, 255, 0.9);
    border-bottom: 1px solid var(--color-border);
    -webkit-backdrop-filter: blur(14px);
    backdrop-filter: blur(14px);
}

.app-header__container {
    max-width: var(--container);
    margin: 0 auto;
    padding: 14px 22px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    position: relative;
}

.app-brand {
    display: flex;
    align-items: center;
    min-width: 0;
    max-width: 100%;
}

.app-brand__logo {
    height: 54px;
    width: auto;
    object-fit: contain;
}

.app-nav {
    display: flex;
    align-items: center;
    gap: 8px;
}

.app-nav a {
    padding: 10px 14px;
    border-radius: 999px;
    font-size: 0.95rem;
    font-weight: 700;
    color: var(--color-primary-deep);
    transition: var(--transition);
}

.app-nav a:hover {
    background: var(--color-accent);
    color: var(--color-primary-dark);
}

.app-nav__button {
    background: var(--color-primary);
    color: #ffffff !important;
    box-shadow: var(--shadow-sm);
}

.app-nav__button:hover {
    background: var(--color-primary-dark) !important;
}

.app-menu-toggle {
    display: none;
    align-items: center;
    justify-content: center;
    width: 46px;
    height: 46px;
    border: 0;
    border-radius: 14px;
    background: var(--color-accent);
    color: var(--color-primary-dark);
    cursor: pointer;
}

.app-main {
    min-height: calc(100vh - 180px);
}

.app-footer {
    margin-top: 0;
    background: linear-gradient(135deg, var(--color-primary-deep), var(--color-primary-dark));
    color: rgba(255, 255, 255, 0.86);
}

.app-footer__container {
    max-width: var(--container);
    margin: 0 auto;
    padding: 28px 22px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 24px;
    flex-wrap: wrap;
}

.app-footer__brand {
    display: flex;
    align-items: center;
    gap: 14px;
}

.app-footer__logo {
    height: 42px;
    width: auto;
    object-fit: contain;
    flex-shrink: 0;
    filter: brightness(0) invert(1);
    opacity: 0.95;
}

.app-footer__brand strong {
    display: block;
    font-size: 1rem;
    color: #ffffff;
    font-family: "Montserrat", "Inter", Arial, sans-serif;
}

.app-footer__brand span {
    display: block;
    margin-top: 2px;
    font-size: 0.92rem;
}

.app-footer__meta {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 4px;
    font-size: 0.92rem;
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 50px;
    padding: 0 22px;
    border-radius: 999px;
    border: 0;
    font-weight: 800;
    transition: var(--transition);
    cursor: pointer;
    white-space: nowrap;
}

.btn-primary {
    background: var(--color-secondary);
    color: #ffffff;
    box-shadow: 0 12px 24px rgba(0, 168, 107, 0.22);
}

.btn-primary:hover {
    background: var(--color-secondary-dark);
    transform: translateY(-2px);
}

.btn-secondary {
    background: rgba(255, 255, 255, 0.14);
    color: #ffffff;
    border: 1px solid rgba(255, 255, 255, 0.22);
}

.btn-secondary:hover {
    background: rgba(255, 255, 255, 0.22);
}

.section-chip {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 8px 14px;
    border-radius: 999px;
    background: var(--color-accent);
    color: var(--color-primary-dark);
    font-size: 0.8rem;
    font-weight: 800;
}

.section-chip--light {
    background: rgba(255, 255, 255, 0.16);
    color: #ffffff;
    border: 1px solid rgba(255, 255, 255, 0.18);
}

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

    .app-nav {
        display: none;
        position: absolute;
        top: calc(100% + 10px);
        right: 22px;
        left: 22px;
        flex-direction: column;
        align-items: stretch;
        padding: 14px;
        border-radius: var(--radius-md);
        background: rgba(255, 255, 255, 0.96);
        border: 1px solid var(--color-border);
        box-shadow: var(--shadow-md);
        -webkit-backdrop-filter: blur(14px);
        backdrop-filter: blur(14px);
    }

    .app-nav.is-open {
        display: flex;
    }

    .app-nav a {
        width: 100%;
        border-radius: 12px;
    }

    .app-nav__button {
        text-align: center;
    }
}

@media (max-width: 768px) {
    .app-topbar__container,
    .app-header__container,
    .app-footer__container {
        padding-left: 16px;
        padding-right: 16px;
    }

    .app-brand__logo {
        height: 44px;
    }

    .app-footer__container {
        flex-direction: column;
        align-items: flex-start;
    }

    .app-footer__meta {
        align-items: flex-start;
    }
}

@media (max-width: 540px) {
    .app-topbar__container {
        font-size: 0.82rem;
        gap: 8px;
    }

    .app-brand__logo {
        height: 36px;
        max-width: 180px;
    }

    .app-header__container {
        padding-top: 12px;
        padding-bottom: 12px;
    }

    .app-footer__logo {
        height: 34px;
    }

    .btn {
        width: 100%;
    }
}

.skip-link {
    position: absolute;
    left: -999px;
    top: 12px;
    z-index: 999;
    padding: 10px 14px;
    border-radius: 10px;
    background: var(--color-primary-deep);
    color: #ffffff;
    font-weight: 800;
}

.skip-link:focus {
    left: 12px;
}

.app-nav a.is-active {
    background: var(--color-accent);
    color: var(--color-primary-dark);
}

/* =========================================================
   AJUSTES MOBILE — CABEÇALHO E RODAPÉ
   ========================================================= */

@media (max-width: 768px) {
    .app-topbar__container {
        justify-content: center;
        text-align: center;
        gap: 8px;
        flex-wrap: wrap;
    }

    .app-topbar__item {
        justify-content: center;
        font-size: 0.78rem;
    }

    .app-header__container {
        min-height: 72px;
        gap: 12px;
    }

    .app-brand__logo {
        max-width: 190px;
        height: auto;
    }

    .app-menu-toggle {
        flex-shrink: 0;
    }

    .app-nav {
        border-radius: 0 0 18px 18px;
    }

    .app-footer__container {
        display: grid;
        gap: 18px;
        text-align: center;
        justify-items: center;
    }

    .app-footer__brand {
        display: grid;
        justify-items: center;
        text-align: center;
        gap: 10px;
    }

    .app-footer__logo {
        max-width: 190px;
        height: auto;
    }

    .app-footer__meta {
        display: grid;
        justify-items: center;
        gap: 6px;
        text-align: center;
    }
}

@media (max-width: 480px) {
    .app-brand__logo,
    .app-footer__logo {
        max-width: 165px;
    }

    .app-topbar__item {
        font-size: 0.74rem;
    }

    .app-footer__brand strong {
        font-size: 1rem;
    }

    .app-footer__brand span,
    .app-footer__meta span {
        font-size: 0.82rem;
        line-height: 1.45;
    }
}

/* =========================================================
   AJUSTES RESPONSIVOS — CABEÇALHO E RODAPÉ
   ========================================================= */

/* Barra azul institucional:
   permanece no desktop e some no mobile */
@media (max-width: 768px) {
    .app-topbar {
        display: none;
    }
}

/* Rodapé mais compacto */
.app-footer {
    padding: 18px 0;
}

.app-footer__container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    flex-wrap: wrap;
}

.app-footer__brand {
    display: flex;
    align-items: center;
    gap: 12px;
    min-width: 0;
}

.app-footer__logo {
    max-width: 145px;
    height: auto;
    display: block;
}

.app-footer__brand-text {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.app-footer__brand-text strong {
    font-size: 1rem;
    line-height: 1.2;
}

.app-footer__brand-text span {
    font-size: 0.88rem;
    line-height: 1.35;
    opacity: 0.92;
}

.app-footer__meta {
    display: flex;
    flex-direction: column;
    gap: 4px;
    text-align: right;
}

.app-footer__meta span {
    font-size: 0.86rem;
    line-height: 1.35;
}

/* Ajustes do cabeçalho mobile */
@media (max-width: 768px) {
    .app-header__container {
        min-height: 72px;
        gap: 12px;
    }

    .app-brand__logo {
        max-width: 180px;
        height: auto;
    }

    .app-menu-toggle {
        flex-shrink: 0;
    }

    .app-nav {
        border-radius: 0 0 18px 18px;
    }

    .app-footer {
        padding: 14px 0;
    }

    .app-footer__container {
        display: grid;
        gap: 12px;
        justify-items: center;
        text-align: center;
    }

    .app-footer__brand {
        display: grid;
        justify-items: center;
        text-align: center;
        gap: 8px;
    }

    .app-footer__logo {
        max-width: 125px;
    }

    .app-footer__brand-text {
        gap: 3px;
    }

    .app-footer__brand-text strong {
        font-size: 0.96rem;
    }

    .app-footer__brand-text span {
        font-size: 0.80rem;
        line-height: 1.3;
    }

    .app-footer__meta {
        text-align: center;
        gap: 2px;
    }

    .app-footer__meta span {
        font-size: 0.80rem;
        line-height: 1.3;
    }
}

@media (max-width: 480px) {
    .app-brand__logo {
        max-width: 160px;
    }

    .app-footer__logo {
        max-width: 112px;
    }

    .app-footer {
        padding: 12px 0;
    }

    .app-footer__brand-text strong {
        font-size: 0.92rem;
    }

    .app-footer__brand-text span,
    .app-footer__meta span {
        font-size: 0.76rem;
    }
}

/* =========================================================
   CORREÇÃO FINAL — RODAPÉ MOBILE CENTRALIZADO
   ========================================================= */

@media (max-width: 768px) {
    .app-footer {
        width: 100% !important;
        padding: 8px 0 !important;
        background: var(--color-primary-deep);
        text-align: center !important;
    }

    .app-footer__container {
        width: 100% !important;
        max-width: 100% !important;
        margin: 0 auto !important;
        padding: 0 12px !important;

        display: grid !important;
        grid-template-columns: 1fr !important;
        justify-items: center !important;
        align-items: center !important;
        gap: 4px !important;

        text-align: center !important;
    }

    .app-footer__brand {
        width: 100% !important;
        display: grid !important;
        grid-template-columns: 1fr !important;
        justify-items: center !important;
        align-items: center !important;
        gap: 0 !important;
        text-align: center !important;
    }

    .app-footer__logo {
        display: block !important;
        width: auto !important;
        max-width: 92px !important;
        height: auto !important;
        margin: 0 auto 3px auto !important;
    }

    .app-footer__brand-text {
        display: none !important;
    }

    .app-footer__meta {
        width: 100% !important;
        display: grid !important;
        grid-template-columns: 1fr !important;
        justify-items: center !important;
        align-items: center !important;
        gap: 1px !important;

        text-align: center !important;
        margin: 0 auto !important;
    }

    .app-footer__meta span {
        display: block !important;
        width: 100% !important;
        margin: 0 auto !important;
        text-align: center !important;

        color: rgba(255, 255, 255, 0.96);
        font-size: 0.72rem;
        line-height: 1.18;
        font-weight: 600;
    }
}

@media (max-width: 480px) {
    .app-footer {
        padding: 7px 0 !important;
    }

    .app-footer__logo {
        max-width: 86px !important;
    }

    .app-footer__meta span {
        font-size: 0.70rem;
        line-height: 1.16;
    }
}

/* =========================================================
   RODAPÉ — BRASÃO INSTITUCIONAL
   ========================================================= */

.app-footer__logo--brasao {
    max-width: 54px !important;
    height: auto !important;
    object-fit: contain;
}

/* Desktop */
@media (min-width: 769px) {
    .app-footer__logo--brasao {
        max-width: 58px !important;
    }
}

/* Mobile */
@media (max-width: 768px) {
    .app-footer__logo--brasao {
        max-width: 42px !important;
        margin: 0 auto 4px auto !important;
    }

    .app-footer__meta span {
        text-align: center !important;
    }
}

@media (max-width: 480px) {
    .app-footer__logo--brasao {
        max-width: 38px !important;
    }
}