/* ==========================================================
   Faculdade Malta Barão — camada base do site
   (tokens, tipografia, header, menu, rodapé, botões)

   Identidade: SOMENTE vermelho e branco. Tons escuros e claros
   são derivados do próprio vermelho (vinho e rosado) — nada de
   cinza, preto ou azul.

   Linguagem própria do Barão: imersiva e acolhedora — muito
   vermelho, cantos generosos, botões pílula e tipografia
   Plus Jakarta Sans. (Picos segue outra linha: editorial/cartaz.)

   Convive com bootstrap / style.css / main.css, que as demais
   páginas ainda usam; por isso as classes daqui têm nomes
   próprios (menu-*, btn-b, site-*) para não colidir.
   ========================================================== */

:root {
    --red: #ba1016;
    --red-hot: #da161e;
    --red-deep: #8a0b10;
    --red-night: #5a060a;
    --ink: #45080b;
    --ink-soft: #8b4a4d;
    --tint: #fff4f3;
    --tint-2: #ffe3e1;
    --line: #f6d4d2;
    --white: #fff;

    --font: "Plus Jakarta Sans", system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
    --wrap: 78rem;
    --gutter: clamp(1.1rem, 4vw, 2.25rem);
    --header-h: 4.75rem;
    --r-sm: .75rem;
    --r: 1.25rem;
    --r-lg: 2rem;
    --pill: 999px;
    --ease: cubic-bezier(.22, .8, .24, 1);
    --shadow-sm: 0 .4rem 1rem rgba(90, 6, 10, .08);
    --shadow: 0 1.25rem 2.75rem rgba(90, 6, 10, .14);
}

/* ===================== BASE ===================== */
html {
    scroll-behavior: smooth;
    scroll-padding-top: calc(var(--header-h) + 1rem);
}

body.site-barao {
    margin: 0;
    font-family: var(--font);
    color: var(--ink);
    background: var(--white);
    -webkit-font-smoothing: antialiased;
    text-rendering: optimizeLegibility;
    overflow-x: clip;
}

.site-barao :is(h1, h2, h3, h4, h5, h6) {
    font-family: var(--font);
    color: var(--ink);
    letter-spacing: -.02em;
}

.site-barao .btn {
    font-family: var(--font);
}

.site-barao .btn-danger,
.site-barao .btn-primary {
    background-color: var(--red);
    border-color: var(--red);
    color: var(--white);
    border-radius: var(--pill);
}

.site-barao .btn-danger:hover,
.site-barao .btn-primary:hover {
    background-color: var(--red-deep);
    border-color: var(--red-deep);
    color: var(--white);
}

::selection {
    background: var(--red);
    color: var(--white);
}

.site-barao :focus-visible {
    outline: 3px solid var(--red);
    outline-offset: 3px;
}

.wrap {
    width: 100%;
    max-width: var(--wrap);
    margin-inline: auto;
    padding-inline: var(--gutter);
}

.skip-link {
    position: absolute;
    left: 1rem;
    top: -4rem;
    z-index: 2000;
    background: var(--white);
    color: var(--red);
    padding: .75rem 1.1rem;
    border-radius: var(--pill);
    font-weight: 700;
    text-decoration: none;
    transition: top .2s;
}

.skip-link:focus {
    top: 1rem;
}

/* Kicker das páginas internas (legado .section-title) no novo estilo */
.site-barao .section-title {
    display: inline-flex;
    align-items: center;
    gap: .55rem;
    font-family: var(--font);
    text-transform: uppercase;
    font-size: .78rem;
    font-weight: 800;
    letter-spacing: .1em;
    color: var(--red) !important;
    background: var(--tint-2) !important;
    padding: .45rem 1rem !important;
    border-radius: var(--pill);
}

.site-barao .section-title::before,
.site-barao .section-title::after {
    display: none !important;
}

/* ===================== BOTÕES ===================== */
.btn-b {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: .55rem;
    font-family: var(--font);
    font-weight: 700;
    font-size: .98rem;
    line-height: 1;
    letter-spacing: -.005em;
    text-decoration: none;
    white-space: nowrap;
    padding: 1rem 1.6rem;
    border: 2px solid transparent;
    border-radius: var(--pill);
    cursor: pointer;
    transition: background-color .25s ease, color .25s ease, border-color .25s ease, transform .25s var(--ease), box-shadow .25s ease;
}

.btn-b i {
    font-size: 1.05em;
    transition: transform .25s var(--ease);
}

.btn-b:hover {
    transform: translateY(-2px);
}

.btn-b:hover .bi-arrow-right {
    transform: translateX(.2rem);
}

.btn-red {
    background: var(--red);
    border-color: var(--red);
    color: var(--white);
    box-shadow: 0 .6rem 1.4rem rgba(186, 16, 22, .28);
}

.btn-red:hover,
.btn-red:focus-visible {
    background: var(--red-deep);
    border-color: var(--red-deep);
    color: var(--white);
}

.btn-white {
    background: var(--white);
    border-color: var(--white);
    color: var(--red);
    box-shadow: 0 .6rem 1.4rem rgba(60, 4, 7, .25);
}

.btn-white:hover,
.btn-white:focus-visible {
    background: var(--tint-2);
    border-color: var(--tint-2);
    color: var(--red-deep);
}

.btn-ghost {
    background: rgba(255, 255, 255, .08);
    border-color: rgba(255, 255, 255, .55);
    color: var(--white);
}

.btn-ghost:hover,
.btn-ghost:focus-visible {
    background: var(--white);
    border-color: var(--white);
    color: var(--red);
}

.btn-line {
    background: transparent;
    border-color: var(--red);
    color: var(--red);
}

.btn-line:hover,
.btn-line:focus-visible {
    background: var(--red);
    color: var(--white);
}

.btn-sm {
    padding: .72rem 1.2rem;
    font-size: .9rem;
}

/* ===================== HEADER (vermelho) ===================== */
.site-header {
    position: sticky;
    top: 0;
    z-index: 1030;
    background: var(--red);
    color: var(--white);
    transition: box-shadow .3s ease, background .3s ease;
}

.site-header.is-scrolled {
    background: var(--red-deep);
    box-shadow: 0 .5rem 1.75rem rgba(60, 4, 7, .3);
}

.header-inner {
    max-width: var(--wrap);
    margin-inline: auto;
    padding: 0 var(--gutter);
    height: var(--header-h);
    display: flex;
    align-items: center;
    gap: 1.25rem;
}

.brand {
    position: relative;
    z-index: 2;
    flex: 0 0 auto;
    display: block;
}

.brand img {
    display: block;
    height: clamp(2.2rem, 3.4vw, 2.6rem);
    width: auto;
}

.main-nav {
    margin-left: auto;
}

.menu-list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    align-items: center;
    gap: .2rem;
}

.menu-link,
.menu-trigger {
    display: inline-flex;
    align-items: center;
    gap: .35rem;
    padding: .6rem .9rem;
    background: none;
    border: 0;
    border-radius: var(--pill);
    font-family: var(--font);
    font-size: .92rem;
    font-weight: 600;
    color: var(--white);
    text-decoration: none;
    cursor: pointer;
    transition: background .2s ease;
}

.menu-link:hover,
.menu-trigger:hover,
.menu-group.is-open > .menu-trigger {
    background: rgba(255, 255, 255, .14);
    color: var(--white);
}

.menu-trigger i {
    font-size: .72rem;
    transition: transform .25s ease;
}

.menu-group {
    position: relative;
}

.menu-panel {
    position: absolute;
    top: calc(100% + .85rem);
    left: 50%;
    z-index: 5;
    min-width: 16.5rem;
    padding: .55rem;
    background: var(--white);
    border-radius: var(--r);
    box-shadow: 0 1.5rem 3rem rgba(60, 4, 7, .28);
    opacity: 0;
    visibility: hidden;
    transform: translate(-50%, .6rem);
    transition: opacity .2s ease, transform .25s var(--ease), visibility .2s;
}

/* setinha + ponte invisível para o hover não "cair" */
.menu-panel::before {
    content: "";
    position: absolute;
    left: 0;
    right: 0;
    top: -1rem;
    height: 1rem;
}

.menu-panel::after {
    content: "";
    position: absolute;
    top: -.4rem;
    left: 50%;
    width: .9rem;
    height: .9rem;
    background: var(--white);
    border-radius: .2rem;
    transform: translateX(-50%) rotate(45deg);
}

.menu-panel a {
    position: relative;
    z-index: 1;
    display: block;
    padding: .6rem .85rem;
    border-radius: var(--r-sm);
    font-size: .92rem;
    line-height: 1.35;
    color: var(--ink);
    text-decoration: none;
    transition: background .15s ease, color .15s ease;
}

.menu-panel a:hover,
.menu-panel a:focus-visible {
    background: var(--tint);
    color: var(--red);
}

.menu-panel-title {
    margin: .45rem .85rem .3rem;
    font-size: .72rem;
    font-weight: 800;
    letter-spacing: .1em;
    text-transform: uppercase;
    color: var(--red);
}

.menu-group.is-open > .menu-panel {
    opacity: 1;
    visibility: visible;
    transform: translate(-50%, 0);
}

.menu-group.is-open > .menu-trigger i {
    transform: rotate(180deg);
}

@media (hover: hover) and (min-width: 1100px) {
    .menu-group:hover > .menu-panel {
        opacity: 1;
        visibility: visible;
        transform: translate(-50%, 0);
    }
}

.menu-drawer-cta {
    display: none;
}

.header-actions {
    position: relative;
    z-index: 2;
    display: flex;
    align-items: center;
    gap: .9rem;
    margin-left: .5rem;
}

.header-phone {
    display: none;
    align-items: center;
    gap: .4rem;
    font-size: .88rem;
    font-weight: 600;
    color: var(--white);
    text-decoration: none;
    opacity: .9;
}

.header-phone:hover {
    color: var(--white);
    opacity: 1;
}

@media (min-width: 1320px) {
    .header-phone {
        display: inline-flex;
    }
}

.menu-toggle {
    display: none;
    width: 2.9rem;
    height: 2.9rem;
    padding: 0;
    border: 0;
    border-radius: 50%;
    background: var(--white);
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: .32rem;
    cursor: pointer;
    box-shadow: 0 .4rem 1rem rgba(60, 4, 7, .25);
}

.menu-toggle span {
    display: block;
    width: 1.15rem;
    height: 2px;
    border-radius: 2px;
    background: var(--red);
    transition: transform .3s var(--ease);
}

html.menu-open .menu-toggle span:nth-child(1) {
    transform: translateY(calc(.16rem + 1px)) rotate(45deg);
}

html.menu-open .menu-toggle span:nth-child(2) {
    transform: translateY(calc(-.16rem - 1px)) rotate(-45deg);
}

.menu-overlay {
    display: none;
}

/* ---------- menu mobile: tela cheia vermelha que "brota" do botão ---------- */
@media (max-width: 1099.98px) {
    :root {
        --header-h: 4.25rem;
    }

    .menu-toggle {
        display: inline-flex;
    }

    .main-nav {
        position: fixed;
        inset: 0;
        z-index: 1;
        margin: 0;
        padding: 6rem var(--gutter) 2rem;
        display: flex;
        flex-direction: column;
        background: radial-gradient(120% 80% at 100% 0%, var(--red-hot) 0%, var(--red) 45%, var(--red-deep) 100%);
        overflow-y: auto;
        overscroll-behavior: contain;
        clip-path: circle(0% at calc(100% - 2.6rem) 2.1rem);
        visibility: hidden;
        transition: clip-path .55s var(--ease), visibility .55s;
    }

    html.menu-open {
        overflow: hidden;
    }

    html.menu-open .main-nav {
        clip-path: circle(150% at calc(100% - 2.6rem) 2.1rem);
        visibility: visible;
    }

    .menu-list {
        flex-direction: column;
        align-items: stretch;
        gap: 0;
        max-width: 34rem;
        width: 100%;
        margin-inline: auto;
    }

    .menu-link,
    .menu-trigger {
        width: 100%;
        justify-content: space-between;
        padding: 1rem .25rem;
        border-radius: 0;
        border-bottom: 1px solid rgba(255, 255, 255, .18);
        font-size: 1.45rem;
        font-weight: 700;
        letter-spacing: -.02em;
    }

    .menu-link:hover,
    .menu-trigger:hover,
    .menu-group.is-open > .menu-trigger {
        background: none;
    }

    .menu-trigger i {
        font-size: 1rem;
    }

    .menu-panel {
        position: static;
        display: none;
        min-width: 0;
        margin: .6rem 0 .8rem;
        padding: .4rem;
        background: rgba(255, 255, 255, .1);
        box-shadow: none;
        opacity: 1;
        visibility: visible;
        transform: none;
    }

    .menu-panel::before,
    .menu-panel::after {
        display: none;
    }

    .menu-group.is-open > .menu-panel {
        display: block;
        transform: none;
    }

    .menu-panel a {
        color: var(--white);
        font-size: 1rem;
    }

    .menu-panel a:hover,
    .menu-panel a:focus-visible {
        background: rgba(255, 255, 255, .14);
        color: var(--white);
    }

    .menu-panel-title {
        color: var(--white);
        opacity: .7;
    }

    .menu-drawer-cta {
        display: grid;
        gap: .75rem;
        max-width: 34rem;
        width: 100%;
        margin: auto auto 0;
        padding-top: 2rem;
    }
}

@media (max-width: 519.98px) {
    .header-cta {
        display: none;
    }
}

/* Páginas de inscrição usam cabeçalho próprio (.navbar-incricao) */
body:has(.navbar-incricao) .site-header,
body:has(.navbar-incricao) .mobile-bar {
    display: none;
}

/* ===================== RODAPÉ ===================== */
/* .site-footer zera as regras genéricas de `footer` do main.css */
.site-footer {
    position: relative;
    display: block;
    max-width: none;
    margin: clamp(3rem, 6vw, 5rem) 0 0;
    padding: 0 0 1.75rem;
    gap: 0;
    background: var(--red-night);
    color: var(--white);
    text-align: left;
    border-radius: 2.5rem 2.5rem 0 0;
    overflow: hidden;
    isolation: isolate;
}

/* anéis da marca como textura */
.site-footer::before,
.site-footer::after {
    content: "";
    position: absolute;
    z-index: -1;
    border-radius: 50%;
    border: 3.5rem solid rgba(255, 255, 255, .035);
    pointer-events: none;
}

.site-footer::before {
    width: 34rem;
    height: 34rem;
    right: -10rem;
    top: -8rem;
}

.site-footer::after {
    width: 22rem;
    height: 22rem;
    left: -8rem;
    bottom: -9rem;
}

.site-footer a:not(.btn-b) {
    color: var(--white);
    text-decoration: none;
}

.footer-cta {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 1.5rem 2.5rem;
    margin: clamp(2.5rem, 5vw, 3.5rem) 0 clamp(2.5rem, 5vw, 3.5rem);
    padding: clamp(1.75rem, 4vw, 2.75rem);
    background: var(--white);
    color: var(--ink);
    border-radius: var(--r-lg);
    box-shadow: 0 1.5rem 3rem rgba(0, 0, 0, .18);
}

.footer-kicker {
    display: inline-block;
    margin: 0 0 .6rem;
    padding: .3rem .75rem;
    border-radius: var(--pill);
    background: var(--tint-2);
    color: var(--red);
    font-size: .75rem;
    font-weight: 800;
    letter-spacing: .08em;
    text-transform: uppercase;
}

.footer-cta-title {
    margin: 0 0 .35rem;
    font-size: clamp(1.6rem, 3.5vw, 2.4rem);
    font-weight: 800;
    letter-spacing: -.03em;
    line-height: 1.1;
    color: var(--ink);
}

.footer-cta-text {
    margin: 0;
    color: var(--ink-soft);
}

.footer-cta-actions {
    display: flex;
    flex-wrap: wrap;
    gap: .75rem;
}

.footer-grid {
    display: grid;
    grid-template-columns: 1.5fr repeat(3, 1fr) auto;
    gap: 2.5rem 2rem;
    padding-bottom: 2.5rem;
}

.footer-brand img {
    display: block;
    width: 10.5rem;
    height: auto;
    margin-bottom: 1.4rem;
}

.footer-brand address {
    display: grid;
    gap: .9rem;
    margin: 0;
    font-style: normal;
    font-size: .92rem;
    line-height: 1.5;
}

.footer-brand address a {
    display: flex;
    gap: .75rem;
    align-items: flex-start;
    opacity: .88;
}

.footer-brand address a:hover {
    opacity: 1;
}

.footer-brand address i {
    flex: 0 0 auto;
    width: 2rem;
    height: 2rem;
    display: grid;
    place-items: center;
    border-radius: 50%;
    background: rgba(255, 255, 255, .1);
    font-size: .9rem;
}

.site-footer .footer-col h3 {
    margin: 0 0 1rem;
    font-size: .78rem;
    font-weight: 800;
    letter-spacing: .12em;
    text-transform: uppercase;
    color: var(--white);
    opacity: .65;
}

.footer-col ul {
    list-style: none;
    margin: 0;
    padding: 0;
    display: grid;
    gap: .6rem;
}

.footer-col a {
    font-size: .94rem;
    opacity: .9;
    transition: opacity .2s ease;
}

.footer-col a:hover {
    opacity: 1;
    text-decoration: underline;
    text-underline-offset: .25em;
}

.footer-emec img {
    display: block;
    width: 7rem;
    height: auto;
    border-radius: var(--r-sm);
}

.footer-bottom {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    gap: .5rem 1.5rem;
    padding-top: 1.5rem;
    border-top: 1px solid rgba(255, 255, 255, .14);
    font-size: .84rem;
    opacity: .75;
}

@media (max-width: 991.98px) {
    .footer-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .footer-brand {
        grid-column: 1 / -1;
    }
}

@media (max-width: 479.98px) {
    .footer-grid {
        grid-template-columns: minmax(0, 1fr);
    }

    .footer-cta-actions .btn-b {
        flex: 1 1 100%;
    }
}

/* ===================== FLUTUANTES ===================== */
.wa-float {
    position: fixed;
    right: 1.25rem;
    bottom: 1.25rem;
    z-index: 1020;
    width: 3.75rem;
    height: 3.75rem;
    display: grid;
    place-items: center;
    border-radius: 50%;
    background: var(--white);
    color: var(--red);
    font-size: 1.85rem;
    box-shadow: 0 .9rem 2rem rgba(90, 6, 10, .3);
    text-decoration: none;
    transition: transform .25s var(--ease), background .2s, color .2s;
}

.wa-float::before {
    content: "";
    position: absolute;
    inset: 0;
    border-radius: 50%;
    border: 2px solid var(--red);
    animation: ring 2.4s ease-out infinite;
}

.wa-float:hover {
    background: var(--red);
    color: var(--white);
    transform: scale(1.06);
}

@keyframes ring {
    0% { transform: scale(1); opacity: .6; }
    100% { transform: scale(1.6); opacity: 0; }
}

.to-top {
    position: fixed;
    right: 1.6rem;
    bottom: 5.9rem;
    z-index: 1020;
    width: 3rem;
    height: 3rem;
    display: grid;
    place-items: center;
    padding: 0;
    border: 0;
    border-radius: 50%;
    background: var(--red);
    color: var(--white);
    font-size: 1.1rem;
    box-shadow: 0 .6rem 1.4rem rgba(90, 6, 10, .3);
    cursor: pointer;
    opacity: 0;
    visibility: hidden;
    transform: translateY(.5rem);
    transition: opacity .25s ease, transform .25s ease, visibility .25s, background .2s;
}

.to-top.is-visible {
    opacity: 1;
    visibility: visible;
    transform: none;
}

.to-top:hover {
    background: var(--red-deep);
}

/* barra de ações fixa no celular */
.mobile-bar {
    display: none;
}

@media (max-width: 767.98px) {
    .wa-float {
        display: none;
    }

    .to-top {
        right: 1rem;
        bottom: calc(5.5rem + env(safe-area-inset-bottom));
    }

    .mobile-bar {
        position: fixed;
        left: .75rem;
        right: .75rem;
        bottom: calc(.75rem + env(safe-area-inset-bottom));
        z-index: 1020;
        display: grid;
        grid-template-columns: auto 1fr;
        gap: .5rem;
        padding: .45rem;
        background: var(--white);
        border-radius: var(--pill);
        box-shadow: 0 .75rem 2rem rgba(90, 6, 10, .28);
        transition: transform .3s var(--ease), opacity .3s;
    }

    .mobile-bar a {
        display: inline-flex;
        align-items: center;
        justify-content: center;
        gap: .5rem;
        height: 3rem;
        padding: 0 1.1rem;
        border-radius: var(--pill);
        font-weight: 700;
        font-size: .95rem;
        text-decoration: none;
    }

    .mobile-bar .mb-wa {
        background: var(--tint);
        color: var(--red);
    }

    .mobile-bar .mb-wa i {
        font-size: 1.35rem;
    }

    .mobile-bar .mb-cta {
        background: var(--red);
        color: var(--white);
    }

    .site-footer {
        padding-bottom: calc(6rem + env(safe-area-inset-bottom));
    }
}

html.menu-open .mobile-bar,
html.menu-open .wa-float,
html.menu-open .to-top {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
}

/* ===================== ANIMAÇÕES DE ENTRADA ===================== */
html.js [data-reveal] {
    opacity: 0;
    transform: translateY(1.75rem) scale(.985);
    transition: opacity .8s var(--ease), transform .8s var(--ease);
}

html.js [data-reveal].is-visible {
    opacity: 1;
    transform: none;
}

@media (prefers-reduced-motion: reduce) {
    html {
        scroll-behavior: auto;
    }

    html.js [data-reveal] {
        opacity: 1;
        transform: none;
        transition: none;
    }

    .wa-float::before {
        animation: none;
    }
}

/* O wow.js às vezes não detecta o viewport e nunca adiciona
   .animated — preferimos conteúdo visível a animação travada. */
.wow {
    opacity: 1 !important;
    visibility: visible !important;
}

/* ===================== LEGADO: chat (páginas da IA) ===================== */
.chat-bubble {
    padding: 10px 15px;
    border-radius: 20px;
    margin-bottom: 10px;
    max-width: 80%;
    word-wrap: break-word;
}

.chat-user {
    background-color: var(--red);
    color: var(--white);
    border-top-right-radius: 0;
    margin-left: auto;
    text-align: right;
}

.chat-bot {
    background-color: var(--tint-2);
    color: var(--ink);
    border-top-left-radius: 0;
    margin-right: auto;
    text-align: left;
}

.message {
    display: flex;
    margin: 10px 0;
    max-width: 100%;
}

.message.user {
    justify-content: flex-end;
    align-self: flex-end;
}

.message.bot {
    justify-content: flex-start;
    align-self: flex-start;
}

.bubble {
    padding: 10px 15px;
    border-radius: 20px;
    word-wrap: break-word;
    max-width: 70%;
}

.message.user .bubble {
    background-color: var(--red);
    color: var(--white);
    border-top-right-radius: 0;
}

.message.bot .bubble {
    background-color: var(--tint-2);
    color: var(--ink);
    border-top-left-radius: 0;
}

/* ===================== LEGADO: select2 (fichas de inscrição) ===================== */
.select2-container {
    border: 2px solid var(--line);
    border-radius: var(--r-sm);
    padding: .3rem .5rem;
}

.select2-container .select2-selection--single {
    height: 38px;
    border: none;
    border-radius: .25rem;
    display: flex;
    align-items: center;
    background-color: var(--white);
}

.select2-container .select2-selection__rendered {
    line-height: 36px;
    color: var(--ink);
    padding-left: 12px;
}

.select2-dropdown {
    border: 1px solid var(--line);
    border-top: none;
    border-radius: 0 0 var(--r-sm) var(--r-sm);
    box-shadow: var(--shadow);
    z-index: 1051;
}

.select2-results__option--highlighted {
    background-color: var(--red) !important;
    color: var(--white) !important;
}

.select2-container--default .select2-search--dropdown .select2-search__field {
    border-radius: 4px;
    outline: none;
}

.select2-container--default .select2-selection--single .select2-selection__arrow {
    top: 10px;
}

.select2-results__options::-webkit-scrollbar {
    width: 5px;
}
