/* ============================================================
   HABILI - Estilo base e identidade visual
   ============================================================ */

:root {
    --azul: #0D1B2A;
    --verde: #00B87C;
    --verde-claro: #00D48E;
    --verde-escuro: #009966;
    --verde-suave: #ECFDF5;
    --branco: #FFFFFF;
    --cinza-fundo: #F8FAFC;
    --cinza-texto: #475569;
    --cinza-borda: #CBD5E1;
    --azul-escuro-hover: #081422;
    --sombra: 0 1px 3px rgba(13, 27, 42, .05), 0 2px 8px rgba(13, 27, 42, .04);
    --sombra-media: 0 8px 28px rgba(13, 27, 42, .10);
    --raio: 14px;
    --raio-pequeno: 10px;
    --fonte: 'Montserrat', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
    --largura-conteudo: 1160px;
}

* { box-sizing: border-box; }

html, body {
    margin: 0;
    padding: 0;
}

body {
    font-family: var(--fonte);
    background: var(--cinza-fundo);
    color: var(--azul);
    font-size: 16px;
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}
main { flex: 1; }

a { color: var(--verde-escuro); text-decoration: none; }
a:hover { color: var(--verde); text-decoration: underline; }

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

h1, h2, h3, h4 { color: var(--azul); line-height: 1.2; margin: 0 0 .6em; }
h1 { font-size: 2.4rem; font-weight: 800; letter-spacing: -.02em; }
h2 { font-size: 1.8rem; font-weight: 700; letter-spacing: -.01em; }
h3 { font-size: 1.25rem; font-weight: 700; }
p { margin: 0 0 1em; }

.conteudo {
    width: 100%;
    max-width: var(--largura-conteudo);
    margin: 0 auto;
    padding: 0 20px;
}

.texto-cinza { color: var(--cinza-texto); }
.centro { text-align: center; }

/* ----- Cabecalho publico ----- */
.cabecalho {
    background: var(--branco);
    border-bottom: 1px solid var(--cinza-borda);
    position: sticky;
    top: 0;
    z-index: 50;
}
.cabecalho .barra {
    display: flex;
    align-items: center;
    gap: 24px;
    height: 68px;
}
.logo { display: flex; align-items: center; gap: 10px; }
.logo:hover { text-decoration: none; }
.logo span {
    font-size: 1.35rem;
    font-weight: 800;
    letter-spacing: .5px;
    color: var(--azul);
}
.menu-topo {
    display: flex;
    align-items: center;
    gap: 22px;
    margin-left: auto;
}
.menu-topo a {
    color: var(--azul);
    font-weight: 600;
    font-size: .95rem;
    transition: color .15s;
}
.menu-topo a:hover { color: var(--verde); text-decoration: none; }

.badge-nav {
    position: absolute;
    top: -6px; right: -10px;
    background: #EF4444;
    color: var(--branco);
    font-size: .65rem;
    font-weight: 700;
    min-width: 18px;
    height: 18px;
    border-radius: 999px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0 5px;
}

.creditos-nav {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    background: var(--verde-suave, #e0f7ef);
    color: var(--verde);
    font-weight: 700;
    font-size: .82rem;
    padding: 4px 10px;
    border-radius: 20px;
}

/* ----- Botoes ----- */
.botao {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    border: none;
    border-radius: var(--raio-pequeno);
    padding: 11px 22px;
    font-size: .95rem;
    font-weight: 700;
    font-family: inherit;
    cursor: pointer;
    transition: all .2s ease;
    text-decoration: none;
    line-height: 1.4;
}
.botao:active { transform: translateY(1px); }
.botao-primario {
    background: var(--verde);
    color: var(--branco);
    box-shadow: 0 2px 8px rgba(0, 184, 124, .25);
}
.botao-primario:hover {
    background: var(--verde-claro);
    box-shadow: 0 4px 16px rgba(0, 184, 124, .3);
    text-decoration: none;
}
.botao-secundario { background: var(--azul); color: var(--branco); }
.botao-secundario:hover { background: var(--azul-escuro-hover); text-decoration: none; }
.botao-contorno {
    background: transparent;
    color: var(--azul);
    border: 1.5px solid var(--cinza-borda);
}
.botao-contorno:hover { border-color: var(--verde); color: var(--verde); text-decoration: none; }
.botao-grande { padding: 14px 28px; font-size: 1.02rem; }

/* ----- Secao Hero (fallback sem banners) ----- */
.hero {
    background: linear-gradient(135deg, #0D1B2A 0%, #0A2E22 100%);
    color: var(--branco);
    padding: 76px 0 88px;
}
.hero h1 { color: var(--branco); max-width: 820px; }
.hero .subtitulo {
    color: rgba(255,255,255,.72);
    font-size: 1.15rem;
    max-width: 640px;
    margin-bottom: 32px;
    line-height: 1.65;
}

/* ----- Carrossel de banners ----- */
.carrossel {
    position: relative;
    width: 100%;
    height: 480px;
    overflow: hidden;
    background: #0D1B2A;
}
.carrossel-trilha { position: relative; width: 100%; height: 100%; }
.carrossel-slide {
    position: absolute;
    inset: 0;
    background-size: cover;
    background-position: center;
    opacity: 0;
    transition: opacity .7s ease;
    z-index: 0;
}
.carrossel-slide.ativo {
    opacity: 1;
    z-index: 1;
}
.carrossel-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(to right, rgba(13,27,42,.82) 0%, rgba(13,27,42,.4) 60%, rgba(13,27,42,.15) 100%);
}
.carrossel-conteudo {
    position: relative;
    z-index: 2;
    display: flex;
    flex-direction: column;
    justify-content: center;
    height: 100%;
    max-width: 600px;
    padding: 40px 0;
}
.carrossel-conteudo h2 {
    color: #fff;
    font-size: 2.2rem;
    font-weight: 800;
    line-height: 1.2;
    margin: 0 0 14px;
}
.carrossel-conteudo p {
    color: rgba(255,255,255,.8);
    font-size: 1.1rem;
    line-height: 1.6;
    margin: 0 0 24px;
    max-width: 500px;
}
.carrossel-seta {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    z-index: 5;
    background: rgba(255,255,255,.15);
    border: none;
    color: #fff;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background .2s;
    backdrop-filter: blur(4px);
}
.carrossel-seta:hover { background: rgba(255,255,255,.3); }
.carrossel-prev { left: 20px; }
.carrossel-next { right: 20px; }
.carrossel-indicadores {
    position: absolute;
    bottom: 24px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 5;
    display: flex;
    gap: 8px;
}
.carrossel-ponto {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    border: 2px solid rgba(255,255,255,.6);
    background: transparent;
    cursor: pointer;
    padding: 0;
    transition: all .2s;
}
.carrossel-ponto.ativo {
    background: #fff;
    border-color: #fff;
    width: 28px;
    border-radius: 5px;
}

/* ----- Carrossel de perfis ----- */
.carrossel-perfis-wrapper {
    overflow: hidden;
    padding: 20px 0 8px;
    mask-image: linear-gradient(90deg, transparent, #000 5%, #000 95%, transparent);
    -webkit-mask-image: linear-gradient(90deg, transparent, #000 5%, #000 95%, transparent);
}
.carrossel-perfis {
    display: flex;
    gap: 32px;
    padding: 0 20px;
    justify-content: center;
}
.carrossel-perfis.animando {
    width: max-content;
    justify-content: flex-start;
    animation: scrollPerfis var(--duracao, 20s) linear infinite;
}
.carrossel-perfis:hover { animation-play-state: paused; }
.carrossel-perfil-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    text-decoration: none;
    flex-shrink: 0;
    transition: transform .2s;
}
.carrossel-perfil-item:hover { transform: translateY(-4px); }
.carrossel-perfil-item img {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    object-fit: cover;
    border: 3px solid var(--verde);
    background: var(--cinza-fundo);
}
.carrossel-perfil-item span {
    font-size: .82rem;
    font-weight: 600;
    color: var(--azul);
    max-width: 100px;
    text-align: center;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
@keyframes scrollPerfis {
    0%   { transform: translateX(0); }
    100% { transform: translateX(-50%); }
}

/* ----- Faixa CTA ----- */
.faixa-cta {
    background: var(--verde);
    color: #fff;
    text-align: center;
    padding: 48px 32px;
    border-radius: var(--raio);
}
.faixa-cta h2 { color: #fff; margin: 0 0 10px; font-size: 1.6rem; }
.faixa-cta p { color: rgba(255,255,255,.9); margin: 0; font-size: 1.05rem; }

/* ----- Busca (separada do hero) ----- */
.busca-secao {
    background: var(--branco);
    padding: 24px 0;
    border-bottom: 1px solid #e2e8f0;
    position: relative;
    z-index: 10;
}

/* ----- Caixa de busca ----- */
.busca {
    display: flex;
    gap: 10px;
    background: var(--branco);
    padding: 14px;
    border-radius: var(--raio);
    box-shadow: 0 8px 32px rgba(0,0,0,.18);
    max-width: 760px;
    flex-wrap: wrap;
}
.busca .campo {
    flex: 1 1 200px;
    display: flex;
    flex-direction: column;
}
.busca label {
    font-size: .7rem;
    font-weight: 700;
    color: var(--cinza-texto);
    text-transform: uppercase;
    letter-spacing: .6px;
    margin: 2px 0 2px 6px;
}
.busca input {
    border: none;
    padding: 8px 6px;
    font-size: 1rem;
    color: var(--azul);
    background: transparent;
    outline: none;
    font-family: inherit;
}
.busca .botao { flex: 0 0 auto; }

/* ----- Campo generico (filtros, etc.) ----- */
.campo { display: flex; flex-direction: column; }
.campo label {
    display: block;
    font-weight: 600;
    font-size: .9rem;
    margin-bottom: 6px;
    color: var(--azul);
}
.campo select,
.campo input[type="text"],
.campo input[type="number"],
.campo input[type="date"],
.campo textarea {
    width: 100%;
    padding: 12px 14px;
    border: 1.5px solid var(--cinza-borda);
    border-radius: var(--raio-pequeno);
    font-size: 1rem;
    font-family: inherit;
    color: var(--azul);
    background: var(--branco);
    outline: none;
    transition: border-color .2s, box-shadow .2s;
}
.campo select {
    padding-right: 40px;
}
.campo select:focus,
.campo input:focus,
.campo textarea:focus {
    border-color: var(--verde);
    box-shadow: 0 0 0 3px rgba(0, 184, 124, .1);
}
.campo select:hover,
.campo input:hover,
.campo textarea:hover {
    border-color: var(--verde-claro);
}

/* ----- Formularios ----- */
.campo-form { margin-bottom: 16px; }
.campo-form label {
    display: block;
    font-weight: 600;
    font-size: .9rem;
    margin-bottom: 6px;
    color: var(--azul);
}
.campo-form input,
.campo-form select,
.campo-form textarea {
    width: 100%;
    padding: 12px 14px;
    border: 1.5px solid var(--cinza-borda);
    border-radius: var(--raio-pequeno);
    font-size: 1rem;
    font-family: inherit;
    color: var(--azul);
    background: var(--branco);
    outline: none;
    transition: border-color .2s, box-shadow .2s;
}
.campo-form input:focus,
.campo-form select:focus,
.campo-form textarea:focus {
    border-color: var(--verde);
    box-shadow: 0 0 0 3px rgba(0, 184, 124, .1);
}

/* ----- Selects estilizados ----- */
select {
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    padding: 12px 40px 12px 14px;
    border: 1.5px solid var(--cinza-borda);
    border-radius: var(--raio-pequeno);
    font-size: 1rem;
    font-family: inherit;
    color: var(--azul);
    background: var(--branco) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%23666' stroke-width='2' fill='none' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") no-repeat right 14px center;
    cursor: pointer;
    outline: none;
    transition: border-color .2s, box-shadow .2s;
}
select:focus {
    border-color: var(--verde);
    box-shadow: 0 0 0 3px rgba(0, 184, 124, .1);
}
select:hover {
    border-color: var(--verde-claro);
}

/* Alerta inicialmente oculto */
.alerta:empty { display: none; }

/* ----- Textarea ----- */
textarea {
    font-family: inherit;
    resize: vertical;
}

/* ----- Rodape ----- */
.rodape {
    background: var(--azul);
    color: rgba(255,255,255,.65);
    padding: 52px 0 28px;
    margin-top: 64px;
}
.rodape a { color: rgba(255,255,255,.65); }
.rodape a:hover { color: var(--branco); text-decoration: none; }
.rodape .colunas {
    display: flex;
    flex-wrap: wrap;
    gap: 40px;
    justify-content: space-between;
}
.rodape h4 { color: var(--branco); margin-bottom: 14px; font-size: 1rem; }
.rodape ul { list-style: none; padding: 0; margin: 0; }
.rodape li { margin-bottom: 8px; }
.rodape .creditos {
    border-top: 1px solid rgba(255,255,255,.1);
    margin-top: 32px;
    padding-top: 18px;
    font-size: .85rem;
    color: rgba(255,255,255,.4);
}

/* ----- Mensagens / alertas ----- */
.alerta {
    padding: 12px 16px;
    border-radius: var(--raio-pequeno);
    margin-bottom: 16px;
    font-size: .95rem;
    font-weight: 500;
}
.alerta-erro { background: #FEF2F2; color: #B91C1C; border: 1px solid #FECACA; }
.alerta-sucesso { background: #ECFDF5; color: #047857; border: 1px solid #A7F3D0; }
.alerta-aviso { background: #FFFBEB; color: #B45309; border: 1px solid #FDE68A; }
