/* base.css
   Tokens, reset e componentes compartilhados por todas as paginas:
   nav, botoes, footer, reveal, botao flutuante do WhatsApp e o card de busca. */

:root {
    /* Paleta extraida da logomarca */
    --sea: #0d9bdb;
    --sea-deep: #0a6f9c;
    --sea-dark: #075677;
    --sun: #f4d92a;
    --sun-warm: #f5c61f;
    --ink: #1f2123;
    --ink-soft: #4a4d50;
    --sand: #faf5ea;
    --sand-deep: #f1e7d3;
    --shell: #fffdf8;
    --foam: #ffffff;
    --line: rgba(31, 33, 35, .12);

    --maxw: 1150px;
    --r: 18px;
    --shadow: 0 18px 40px -22px rgba(7, 86, 119, .45);
    --shadow-sm: 0 8px 22px -14px rgba(7, 86, 119, .4);

    --display: "Bricolage Grotesque", system-ui, sans-serif;
    --body: "Hanken Grotesk", system-ui, sans-serif;
    --hand: "Caveat", cursive;
    scroll-padding-top: 86px
}

/* ancoras param abaixo da nav fixa em vez de debaixo dela */


section[id],
div[id] {
    scroll-margin-top: 86px
}

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

html {
    scroll-behavior: smooth
}

body {
    font-family: var(--body);
    color: var(--ink);
    background: var(--sand);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    overflow-x: hidden;
}

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

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

.wrap {
    width: 100%;
    max-width: var(--maxw);
    margin: 0 auto;
    padding: 0 24px
}

/* rotulos manuscritos que ecoam o script da logo */
.eyebrow {
    font-family: var(--hand);
    font-size: 2rem;
    color: var(--sea);
    line-height: 1;
    display: inline-block;
    transform: rotate(-2deg);
}

.section-title {
    font-family: var(--display);
    font-weight: 700;
    font-size: clamp(1.9rem, 4.5vw, 3rem);
    line-height: 1.05;
    letter-spacing: -.02em;
    margin: .35rem 0 .9rem;
}

.lead {
    font-size: 1.08rem;
    color: var(--ink-soft);
    max-width: 54ch
}

/* ===== BOTOES ===== */
.btn {
    display: inline-flex;
    align-items: center;
    gap: .5rem;
    font-family: var(--display);
    font-weight: 600;
    font-size: 1rem;
    padding: .85rem 1.5rem;
    border-radius: 999px;
    cursor: pointer;
    border: none;
    transition: transform .18s ease, box-shadow .18s ease, background .18s ease;
}

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

.btn-zap {
    background: var(--sun);
    color: var(--ink);
    box-shadow: var(--shadow-sm)
}

.btn-zap:hover {
    background: var(--sun-warm)
}

.btn-sea {
    background: var(--sea);
    color: #fff;
    box-shadow: var(--shadow-sm)
}

.btn-sea:hover {
    background: var(--sea-deep)
}

.btn-ghost {
    background: transparent;
    color: #fff;
    border: 1.5px solid rgba(255, 255, 255, .55)
}

.btn-ghost:hover {
    background: rgba(255, 255, 255, .12)
}

.btn[disabled] {
    opacity: .55;
    cursor: not-allowed;
    transform: none
}

/* ===== NAV ===== */
header.nav {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 50;
    transition: background .25s ease, box-shadow .25s ease, padding .25s ease;
    padding: 18px 0;
}

header.nav.scrolled,
header.nav.solid {
    background: rgba(255, 253, 248, .92);
    backdrop-filter: blur(10px);
    box-shadow: 0 6px 24px -18px rgba(7, 86, 119, .6);
    padding: 10px 0;
}

.nav-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px
}

.brand {
    display: flex;
    align-items: center;
    gap: 10px;
    font-family: var(--display);
    font-weight: 700;
    font-size: 1.15rem;
    color: #fff;
    transition: color .25s;
}

header.nav.scrolled .brand,
header.nav.solid .brand {
    color: var(--ink)
}

.brand .mark {
    width: 34px;
    height: 34px;
    flex: none
}

/* ===== LOGO REAL (imagem) ===== */
.brand-logo {
    height: 44px;
    width: auto;
    display: block;
    flex: none;
}

/* Sobre a foto (topo): logo branca. Ao rolar (fundo claro): logo colorida. */
.brand-logo-escura {
    display: none
}

header.nav.scrolled .brand-logo-clara,
header.nav.solid .brand-logo-clara {
    display: none
}

header.nav.scrolled .brand-logo-escura,
header.nav.solid .brand-logo-escura {
    display: block
}

.foot-logo {
    height: 52px;
    width: auto;
    display: block;
    margin-bottom: .8rem;
}

@media(max-width: 640px) {
    .brand-logo {
        height: 38px
    }

    .foot-logo {
        height: 46px
    }
}

.brand small {
    display: block;
    font-family: var(--hand);
    font-size: .95rem;
    font-weight: 600;
    color: var(--sun);
    line-height: 1;
    margin-top: -2px;
}

header.nav.scrolled .brand small,
header.nav.solid .brand small {
    color: var(--sea)
}

.nav-links {
    display: flex;
    align-items: center;
    gap: 30px
}

.nav-links a.link {
    font-weight: 500;
    color: rgba(255, 255, 255, .92);
    font-size: .98rem;
    position: relative;
}

header.nav.scrolled .nav-links a.link,
header.nav.solid .nav-links a.link {
    color: var(--ink-soft)
}

.nav-links a.link::after {
    content: "";
    position: absolute;
    left: 0;
    right: 100%;
    bottom: -5px;
    height: 2px;
    background: var(--sun);
    transition: right .25s ease;
}

.nav-links a.link:hover::after {
    right: 0
}

header.nav.scrolled .nav-links a.link::after,
header.nav.solid .nav-links a.link::after {
    background: var(--sea)
}

.burger {
    display: none;
    background: none;
    border: none;
    cursor: pointer;
    width: 42px;
    height: 42px;
    flex: none
}

.burger span {
    display: block;
    height: 2.5px;
    width: 24px;
    margin: 5px auto;
    background: #fff;
    border-radius: 2px;
    transition: .25s
}

header.nav.scrolled .burger span,
header.nav.solid .burger span {
    background: var(--ink)
}

/* ===== CARD DE BUSCA ===== */
.busca-card {
    background: var(--shell);
    border-radius: var(--r);
    box-shadow: var(--shadow);
    border: 1px solid rgba(255, 255, 255, .6);
    padding: 22px;
}

.busca-form {
    display: grid;
    grid-template-columns: 1fr 1fr auto auto auto;
    gap: 14px;
    align-items: end;
}

.busca-form .campo {
    display: flex;
    flex-direction: column;
    gap: 5px
}

.busca-form label {
    font-family: var(--display);
    font-weight: 600;
    font-size: .82rem;
    color: var(--ink-soft);
}

.busca-form input {
    font-family: var(--body);
    font-size: .98rem;
    color: var(--ink);
    background: #fff;
    border: 1.5px solid var(--line);
    border-radius: 12px;
    padding: .7rem .85rem;
    transition: border-color .18s ease;
}

.busca-form input:focus {
    outline: none;
    border-color: var(--sea)
}

.busca-form input[type="number"] {
    width: 92px
}

.busca-erro {
    grid-column: 1 / -1;
    font-size: .88rem;
    color: #c0392b;
    min-height: 1.2em;
    margin: 0;
}

/* ===== FOOTER ===== */
footer {
    background: #141618;
    color: rgba(255, 255, 255, .72);
    padding: 54px 0 30px
}

.foot-grid {
    display: grid;
    grid-template-columns: 1.4fr 1fr 1fr;
    gap: 36px;
    padding-bottom: 34px;
    border-bottom: 1px solid rgba(255, 255, 255, .1);
}

.foot-brand {
    display: flex;
    align-items: center;
    gap: 10px;
    font-family: var(--display);
    font-weight: 700;
    font-size: 1.2rem;
    color: #fff;
    margin-bottom: .8rem;
}

.foot-brand small {
    font-family: var(--hand);
    color: var(--sun);
    font-size: 1rem;
    display: block;
    line-height: 1
}

footer h5 {
    font-family: var(--display);
    color: #fff;
    font-size: .95rem;
    margin-bottom: 14px;
    text-transform: uppercase;
    letter-spacing: .06em;
}

footer ul {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 9px
}

footer a:hover {
    color: var(--sun)
}

.foot-bottom {
    display: flex;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 10px;
    padding-top: 22px;
    font-size: .82rem;
    color: rgba(255, 255, 255, .5);
}

/* ===== REVEAL ===== */
.reveal {
    opacity: 0;
    transform: translateY(26px);
    transition: opacity .7s ease, transform .7s ease
}

.reveal.in {
    opacity: 1;
    transform: none
}

/* ===== WHATSAPP FLUTUANTE ===== */
.zap-float {
    position: fixed;
    right: 20px;
    bottom: 20px;
    z-index: 60;
    width: 58px;
    height: 58px;
    border-radius: 50%;
    background: #25d366;
    display: grid;
    place-items: center;
    box-shadow: 0 12px 30px -8px rgba(37, 211, 102, .6);
    transition: transform .2s ease;
}

.zap-float:hover {
    transform: scale(1.08)
}

.zap-float svg {
    width: 30px;
    height: 30px;
    fill: #fff
}

/* ===== ESTADOS DE CARREGAMENTO E VAZIO ===== */
/* ===== ESTADOS DE CARREGAMENTO E VAZIO ===== */
.carregando,
.vazio {
    text-align: center;
    padding: 60px 20px;
    color: var(--ink-soft);
    grid-column: 1 / -1;
}

/* bolinha girando: o texto dentro de .carregando vira acessibilidade (leitores de tela) */
.carregando {
    font-size: 0;
}

.carregando::after {
    content: "";
    display: inline-block;
    width: 42px;
    height: 42px;
    border-radius: 50%;
    border: 4px solid var(--sand-deep);
    border-top-color: var(--sea);
    animation: girar .8s linear infinite;
}

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

.vazio h3 {
    font-family: var(--display);
    font-size: 1.4rem;
    color: var(--ink);
    margin-bottom: .4rem
}

/* ===== CARROSSEL ===== */
.carrossel {
    position: relative;
    width: 100%;
    height: 100%;
    overflow: hidden
}

.carrossel-trilho {
    display: flex;
    height: 100%;
    transition: transform .35s ease
}

.carrossel-slide {
    flex: 0 0 100%;
    height: 100%;
    background-size: cover;
    background-position: center;
    background-color: #bfe9fa;
    display: flex;
    align-items: flex-end;
}

.carrossel-seta {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 34px;
    height: 34px;
    border-radius: 50%;
    border: none;
    background: rgba(255, 253, 248, .88);
    color: var(--sea-dark);
    font-size: 1.3rem;
    line-height: 1;
    cursor: pointer;
    display: grid;
    place-items: center;
    box-shadow: var(--shadow-sm);
    transition: background .18s ease;
}

.carrossel-seta:hover {
    background: #fff
}

.carrossel-seta.prev {
    left: 10px
}

.carrossel-seta.next {
    right: 10px
}

.carrossel-dots {
    position: absolute;
    bottom: 10px;
    left: 0;
    right: 0;
    display: flex;
    justify-content: center;
    gap: 6px;
}

.carrossel-dots i {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: rgba(255, 255, 255, .55);
    transition: background .18s ease, transform .18s ease;
}

.carrossel-dots i.on {
    background: #fff;
    transform: scale(1.25)
}

/* ===== RESPONSIVO ===== */
@media(max-width:860px) {
    .nav-links {
        position: fixed;
        top: 0;
        right: 0;
        bottom: auto;
        left: auto;
        width: min(78vw, 320px);
        height: 100vh;
        height: 100dvh;
        overflow-y: auto;
        background: var(--shell);
        flex-direction: column;
        align-items: flex-start;
        justify-content: center;
        gap: 26px;
        padding: 40px;
        transform: translateX(100%);
        transition: transform .3s ease;
        box-shadow: -20px 0 50px -20px rgba(0, 0, 0, .4);
    }

    .nav-links.open {
        transform: none
    }

    .nav-links a.link {
        color: var(--ink) !important;
        font-size: 1.25rem;
        font-family: var(--display)
    }

    .nav-links .btn {
        width: 100%;
        justify-content: center
    }

    .burger {
        display: block
    }

    header.nav.scrolled .burger span,
    header.nav.solid .burger span,
    .burger.x span {
        background: var(--ink)
    }

    .burger.x span:nth-child(1) {
        transform: translateY(7.5px) rotate(45deg)
    }

    .burger.x span:nth-child(2) {
        opacity: 0
    }

    .burger.x span:nth-child(3) {
        transform: translateY(-7.5px) rotate(-45deg)
    }

    .foot-grid {
        grid-template-columns: 1fr 1fr
    }

    .busca-form {
        grid-template-columns: 1fr 1fr
    }

    .busca-form input[type="number"] {
        width: 100%
    }

    .busca-form .btn {
        grid-column: 1 / -1;
        justify-content: center
    }
}

@media(max-width:540px) {
    .foot-grid {
        grid-template-columns: 1fr
    }

    .busca-form {
        grid-template-columns: 1fr
    }
}

@media(prefers-reduced-motion:reduce) {
    * {
        animation: none !important;
        transition: none !important;
        scroll-behavior: auto
    }

    .reveal {
        opacity: 1;
        transform: none
    }

    .carregando {
        font-size: inherit
    }

    .carregando::after {
        display: none
    }
}

/* assinatura 42.dev no rodapé */
.foot-bottom a {
    color: inherit;
    text-decoration: none;
    border-bottom: 1px solid rgba(255, 255, 255, .35);
    transition: color .2s, border-color .2s;
}

.foot-bottom a:hover {
    color: #ec7a37;
    border-color: #ec7a37;
}

/* ============================================================
 * ACRESCENTAR NO FIM DE public/css/base.css
 * Lightbox: foto em tela cheia com zoom.
 * Fica no base.css porque as tres paginas (home, resultados e
 * unidade) usam o mesmo carrossel.
 * ============================================================ */

/* Foto clicavel: so quem tem data-foto convida ao clique */
.carrossel-slide[data-foto] {
    cursor: zoom-in;
}

body.lbx-aberto {
    overflow: hidden;
}

.lbx {
    position: fixed;
    inset: 0;
    z-index: 200;
    background: rgba(6, 28, 40, .93);
    display: grid;
    grid-template-rows: minmax(0, 1fr) auto;
    animation: lbxEntra .18s ease;
}

.lbx[hidden] {
    display: none;
}

@keyframes lbxEntra {
    from {
        opacity: 0
    }

    to {
        opacity: 1
    }
}

.lbx-palco {
    grid-row: 1;
    /* Sem estes minimos a faixa do grid cresce junto com a foto e o
       max-height da imagem deixa de valer (retrato estoura a tela) */
    min-height: 0;
    min-width: 0;
    overflow: hidden;
    /* Flex, e nao grid: numa faixa de grid com altura automatica o
       max-height:100% da imagem vira referencia circular e o navegador
       desiste dele. No flex a altura do container e definida e vale. */
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 56px 16px 8px;
    touch-action: none;
}

.lbx-img {
    max-width: 100%;
    max-height: 100%;
    display: block;
    border-radius: 6px;
    touch-action: none;
    user-select: none;
    -webkit-user-drag: none;
    cursor: zoom-in;
    transform-origin: center center;
    will-change: transform;
    transition: transform .16s ease-out;
}

/* Enquanto o dedo ou o mouse arrasta, a transicao atrapalha */
.lbx-img.ampliada {
    cursor: grab;
    transition: none;
}

.lbx-img.ampliada:active {
    cursor: grabbing;
}

/* ===== Controles ===== */
.lbx-fechar,
.lbx-seta {
    position: absolute;
    z-index: 2;
    border: none;
    border-radius: 50%;
    background: rgba(255, 255, 255, .16);
    color: #fff;
    cursor: pointer;
    line-height: 1;
    display: grid;
    place-items: center;
    transition: background .18s ease;
}

.lbx-fechar:hover,
.lbx-seta:hover,
.lbx-fechar:focus-visible,
.lbx-seta:focus-visible {
    background: rgba(255, 255, 255, .3);
}

.lbx-fechar {
    top: 14px;
    right: 14px;
    width: 42px;
    height: 42px;
    font-size: 1.7rem;
}

.lbx-seta {
    top: 50%;
    transform: translateY(-50%);
    width: 46px;
    height: 46px;
    font-size: 2rem;
}

.lbx-seta[hidden] {
    display: none;
}

.lbx-seta.prev {
    left: 14px;
}

.lbx-seta.next {
    right: 14px;
}

/* ===== Barra de baixo ===== */
.lbx-barra {
    grid-row: 2;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 16px;
    flex-wrap: wrap;
    padding: 12px 16px 18px;
    color: rgba(255, 255, 255, .82);
    font-size: .84rem;
}

.lbx-contador {
    font-weight: 600;
}

.lbx-contador:empty {
    display: none;
}

.lbx-dica {
    color: rgba(255, 255, 255, .55);
    font-size: .78rem;
}

/* ===== Mobile ===== */
@media (max-width: 640px) {
    .lbx-palco {
        padding: 62px 6px 6px;
    }

    .lbx-seta {
        width: 40px;
        height: 40px;
        font-size: 1.7rem;
    }

    .lbx-seta.prev {
        left: 6px;
    }

    .lbx-seta.next {
        right: 6px;
    }

    /* No toque a dica muda: quem le isso tem dedo, nao mouse */
    .lbx-dica::before {
        content: "Toque para aproximar · dois dedos para dar zoom";
    }

    .lbx-dica {
        font-size: 0;
    }

    .lbx-dica::before {
        font-size: .78rem;
    }
}

@media (prefers-reduced-motion: reduce) {

    .lbx,
    .lbx-img {
        animation: none;
        transition: none;
    }
}