/* ============================================================================
   CONECTA CIDADE (nacidadeonline.com.br) — Estilos HD, Faixa Loop & Icone 3D
   Mobile-First | Alto Contraste | Acessibilidade | Variaveis do Painel Admin
   ============================================================================ */

:root {
    --cor-primaria: #0f172a;
    --cor-secundaria: #16a34a;
    --cor-destaque: #f59e0b;
}

html {
    scroll-behavior: smooth;
    -webkit-tap-highlight-color: transparent;
}

html.fonte-maior {
    font-size: 112.5%;
}

body {
    font-family: 'Inter', system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background-color: #e9eff6;
    color: #0f172a;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* Utilitarios ligados as cores dinamicas do Painel Admin */
.bg-tema-primario { background-color: var(--cor-primaria) !important; }
.text-tema-primario { color: var(--cor-primaria) !important; }
.border-tema-primario { border-color: var(--cor-primaria) !important; }

.bg-tema-secundario { background-color: var(--cor-secundaria) !important; }
.text-tema-secundario { color: var(--cor-secundaria) !important; }
.border-tema-secundario { border-color: var(--cor-secundaria) !important; }

.bg-tema-destaque { background-color: var(--cor-destaque) !important; }
.text-tema-destaque { color: var(--cor-destaque) !important; }

/* Scroll horizontal limpo para abas e filtros no Mobile */
.no-scrollbar::-webkit-scrollbar { display: none; }
.no-scrollbar { -ms-overflow-style: none; scrollbar-width: none; }

/* ============================================================================
   BOTAO CORACAO 3D PARA DOACAO / APOIO SOCIAL
   ============================================================================ */
.btn-doacao-3d {
    background: linear-gradient(180deg, #fffbeb 0%, #fef3c7 100%);
    border: 1px solid #fbbf24;
    box-shadow: 0 4px 12px rgba(245, 158, 11, 0.28), inset 0 1px 0 rgba(255, 255, 255, 0.9);
    transition: transform 0.2s cubic-bezier(0.22, 1, 0.36, 1), box-shadow 0.2s ease;
}
.btn-doacao-3d:hover {
    transform: translateY(-2px) scale(1.03);
    box-shadow: 0 8px 18px rgba(245, 158, 11, 0.4), inset 0 1px 0 rgba(255, 255, 255, 1);
}
.btn-doacao-3d:active {
    transform: scale(0.97);
}
.coracao-3d-svg {
    filter: drop-shadow(0 3px 4px rgba(185, 28, 28, 0.45));
    animation: batidaCoracao3d 2.4s infinite ease-in-out;
}
@keyframes batidaCoracao3d {
    0%, 100% { transform: scale(1); }
    14%      { transform: scale(1.14); }
    28%      { transform: scale(1); }
    42%      { transform: scale(1.1); }
    70%      { transform: scale(1); }
}

/* ============================================================================
   FAIXA ANIMADA CONTINUA EM 1 LINHA UNICA (LOOP INFINITO SEM ESPACOS VAZIOS)
   ============================================================================ */
.ticker-faixa-wrap {
    width: 100%;
    height: 36px;
    overflow: hidden;
    position: relative;
    display: flex;
    align-items: center;
    background: linear-gradient(90deg, #020617 0%, #0f172a 50%, #020617 100%);
    border-bottom: 1px solid rgba(34, 197, 94, 0.35);
    box-shadow: inset 0 -1px 0 rgba(255, 255, 255, 0.05);
}

.ticker-faixa-track {
    display: flex;
    flex-wrap: nowrap;
    align-items: center;
    width: max-content;
    white-space: nowrap;
    will-change: transform;
    animation: tickerLoopContinuo 36s linear infinite;
}

.ticker-faixa-wrap:hover .ticker-faixa-track {
    animation-play-state: paused;
}

.ticker-faixa-grupo {
    display: flex;
    flex-wrap: nowrap;
    align-items: center;
    flex-shrink: 0;
    min-width: 100vw;
    white-space: nowrap;
}

.ticker-item {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    white-space: nowrap;
    padding: 0 1.25rem;
    font-size: 0.78rem;
    font-weight: 600;
    letter-spacing: 0.01em;
    color: #f1f5f9;
    text-decoration: none;
    transition: color 0.18s ease;
}

.ticker-item:hover {
    color: #4ade80;
}

.ticker-dot {
    width: 6px;
    height: 6px;
    border-radius: 999px;
    background-color: #22c55e;
    display: inline-block;
    flex-shrink: 0;
}

.ticker-sep {
    color: rgba(148, 163, 184, 0.45);
    font-weight: 700;
    user-select: none;
}

@keyframes tickerLoopContinuo {
    0%   { transform: translate3d(0, 0, 0); }
    100% { transform: translate3d(-50%, 0, 0); }
}

/* Garantia de visibilidade das barras de busca independente de cache */
@media (min-width: 1024px) {
    .busca-desktop-box { display: block !important; }
    .busca-mobile-box  { display: none !important; }
}
@media (max-width: 1023px) {
    .busca-desktop-box { display: none !important; }
    .busca-mobile-box  { display: block !important; }
}

/* Elevacao fluida e micro-interacoes nos cards */
.card-hover {
    transition: transform 0.24s cubic-bezier(0.22, 1, 0.36, 1),
                box-shadow 0.24s cubic-bezier(0.22, 1, 0.36, 1),
                border-color 0.24s ease;
    will-change: transform;
}
.card-hover:hover {
    transform: translateY(-4px);
    box-shadow: 0 18px 34px -12px rgba(15, 23, 42, 0.18);
}
.card-hover:active {
    transform: scale(0.99);
}

/* Animacoes fluidas de entrada e banners */
@keyframes fadeUpSuave {
    from { opacity: 0; transform: translateY(16px) scale(0.985); }
    to   { opacity: 1; transform: translateY(0) scale(1); }
}

@keyframes fadeSlideBanner {
    from { opacity: 0.4; transform: scale(1.01); }
    to   { opacity: 1; transform: scale(1); }
}

@keyframes brilhoCta {
    0%   { transform: translateX(-120%) skewX(-20deg); }
    45%, 100% { transform: translateX(220%) skewX(-20deg); }
}

@keyframes pulseSuave {
    0%, 100% { opacity: 1; transform: scale(1); }
    50% { opacity: 0.55; transform: scale(1.12); }
}

.animate-fade-up {
    animation: fadeUpSuave 0.48s cubic-bezier(0.22, 1, 0.36, 1) both;
}

.banner-animado {
    animation: fadeSlideBanner 0.5s cubic-bezier(0.22, 1, 0.36, 1) both;
}

.ponto-vivo {
    animation: pulseSuave 2s infinite ease-in-out;
}

.btn-brilho {
    position: relative;
    overflow: hidden;
}
.btn-brilho::after {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    width: 45%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.28), transparent);
    animation: brilhoCta 4.5s infinite ease-in-out;
    pointer-events: none;
}

.reveal-card {
    opacity: 0;
    transform: translateY(16px);
    transition: opacity 0.45s cubic-bezier(0.22, 1, 0.36, 1),
                transform 0.45s cubic-bezier(0.22, 1, 0.36, 1);
}
.reveal-card.is-visible {
    opacity: 1;
    transform: translateY(0);
}

@media (prefers-reduced-motion: reduce) {
    .reveal-card { opacity: 1; transform: none; transition: none; }
    .btn-brilho::after, .animate-fade-up, .banner-animado, .ticker-faixa-track, .coracao-3d-svg { animation: none; }
}

/* Espacamento seguro para a barra inferior + Bloqueio total de zoom automatico em inputs/chat no Mobile */
html, body, button, a, input, select, textarea {
    touch-action: manipulation;
}

@media (max-width: 1023px) {
    input:not([type="checkbox"]):not([type="radio"]):not([type="color"]):not([type="file"]),
    textarea,
    select {
        font-size: 16px !important;
        line-height: 1.4 !important;
    }
}

@media (max-width: 767px) {
    body.com-barra-mobile {
        padding-bottom: 78px;
    }
}

/* Impressao limpa para relatorios e receitas */
@media print {
    .no-print { display: none !important; }
    body { background: #ffffff !important; padding: 0 !important; }
}
