/* ==========================================================================
   v2 - tema escuro do admin + novos componentes do front
   ========================================================================== */
.logo-dark, .theme-ic-light { display: none; }
[data-theme="dark"] .logo-light, [data-theme="dark"] .theme-ic-dark { display: none; }
[data-theme="dark"] .logo-dark, [data-theme="dark"] .theme-ic-light { display: inline-block; }
[data-theme="dark"] {
  color-scheme: dark;
  --bg: #0B0B0D; --panel-bg: #0E0E11; --card: #17171B; --fg: #F4F4F5; --fg-2: #D4D4D8;
  --muted: #232329; --muted-2: #2E2E35; --muted-fg: #A1A1AA; --border: #2A2A31; --border-strong: #3A3A42;
  --brand-50: #2B2508; --info-bg: #13213F; --success-bg: #0F2A1B; --warning-bg: #2E1C0C; --danger-bg: #331314;
  --shadow-lg: 0 24px 60px -18px rgba(0,0,0,.7);
}
[data-theme="dark"] .sidebar, [data-theme="dark"] .icon-btn, [data-theme="dark"] .btn-outline, [data-theme="dark"] .editor,
[data-theme="dark"] .tree-group, [data-theme="dark"] .endpoint, [data-theme="dark"] .counter button, [data-theme="dark"] .option-card,
[data-theme="dark"] .coupon-code { background: var(--card); }
[data-theme="dark"] .topbar { background: rgba(14,14,17,.86); }
[data-theme="dark"] .card-footer, [data-theme="dark"] .table th, [data-theme="dark"] .card-muted, [data-theme="dark"] .tree-row.lvl-1,
[data-theme="dark"] .endpoint-body, [data-theme="dark"] .editor-toolbar, [data-theme="dark"] .endpoint-head:hover { background: #141418; }
[data-theme="dark"] .table tbody tr:hover { background: #1C1C21; }
[data-theme="dark"] .btn-dark { background: #F4F4F5; color: #18181B; }
[data-theme="dark"] .btn-dark:hover { background: #E4E4E7; }
[data-theme="dark"] .switch input:checked + .track, [data-theme="dark"] .progress > span { background: #F4F4F5; }
[data-theme="dark"] .progress-brand > span { background: var(--brand); }
[data-theme="dark"] .msg.me { background: #F4F4F5; color: #18181B; }
[data-theme="dark"] .badge-dark { background: #F4F4F5; color: #18181B; }
[data-theme="dark"] .callout-warning { background: #2A1D08; border-color: #4A3410; color: #FCD34D; }
[data-theme="dark"] .callout-info { background: #12203B; border-color: #1E3A6B; color: #93C5FD; }
[data-theme="dark"] .callout-success { background: #0F2A1B; border-color: #14532D; color: #86EFAC; }
[data-theme="dark"] .callout-danger { background: #2C1213; border-color: #7F1D1D; color: #FCA5A5; }
[data-theme="dark"] .callout-brand { background: #2B2508; border-color: #554A10; color: #FDE68A; }
[data-theme="dark"] .toast { background: #26262C; }
[data-theme="dark"] .chart-bars .bar span { background: #E4E4E7; }
[data-theme="dark"] .chart-bars.brand .bar span { background: var(--brand); }
[data-theme="dark"] .input::placeholder, [data-theme="dark"] .textarea::placeholder { color: #6B6B74; }
[data-theme="dark"] .select { background-color: var(--card); }
[data-theme="dark"] .skeleton { background: linear-gradient(90deg, #232329 25%, #2C2C33 37%, #232329 63%); background-size: 400% 100%; }

/* Cards de servico: fundo cinza solido */
.svc-card .thumb { background: #F1F1EF; }
.svc-card .thumb::before { display: none; }
.svc-card .thumb svg { color: #3F3F46; }
.svc-card .thumb .ic-img { width: 64px; height: 64px; object-fit: contain; position: relative; }
.svc-card:hover .thumb { background: #ECECE9; }
.ic-img-sm { width: 22px; height: 22px; object-fit: contain; }

/* Passos "Como funciona": todos apagados, acendem ao clicar */
.step { cursor: pointer; transition: background .2s, border-color .2s, transform .2s, box-shadow .2s; user-select: none; }
.step:hover { border-color: var(--border-strong); }
.step:nth-child(2) .n { background: var(--muted); }
.step.is-active { background: #fff !important; border-color: var(--fg); box-shadow: var(--shadow); transform: translateY(-3px); }
.step.is-active .n { background: var(--brand) !important; animation: pop .35s cubic-bezier(.2,.9,.3,1.4); }
@keyframes pop { 0% { transform: scale(.6); } 100% { transform: scale(1); } }

/* Barra de categorias com setas */
.nav-strip { position: relative; }
.nav-strip .container { scroll-behavior: smooth; }
.nav-arrow { position: absolute; top: 0; bottom: 0; width: 70px; display: none; align-items: center; z-index: 2; border: 0; cursor: pointer; padding: 0 12px; }
.nav-arrow svg { width: 30px; height: 30px; padding: 6px; border-radius: 50%; background: #fff; border: 1px solid var(--border); box-shadow: var(--shadow-sm); color: var(--fg); }
.nav-arrow.right { right: 0; justify-content: flex-end; background: linear-gradient(90deg, rgba(255,255,255,0), #fff 55%); }
.nav-arrow.left { left: 0; justify-content: flex-start; background: linear-gradient(270deg, rgba(255,255,255,0), #fff 55%); }
.nav-strip.can-right .nav-arrow.right, .nav-strip.can-left .nav-arrow.left { display: flex; }
@media (max-width: 960px) { .nav-arrow { display: none !important; } }

/* Banners de destaque */
.featured { position: relative; }
.featured-track { display: flex; overflow-x: auto; scroll-snap-type: x mandatory; gap: 16px; scrollbar-width: none; border-radius: 24px; }
.featured-track::-webkit-scrollbar { display: none; }
.featured-slide { flex: 0 0 100%; scroll-snap-align: start; min-height: 230px; border-radius: 24px; padding: 40px 44px; color: #fff; display: flex; flex-direction: column; justify-content: center; position: relative; overflow: hidden; background: var(--bgc, #18181B); text-decoration: none; }
.featured-slide img.bimg { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.featured-slide.has-img::before { content: ""; position: absolute; inset: 0; background: linear-gradient(90deg, rgba(0,0,0,.6), rgba(0,0,0,.05)); z-index: 1; }
.featured-slide > *:not(img) { position: relative; z-index: 2; max-width: 620px; }
.featured-slide h3 { font-size: clamp(24px, 3.4vw, 36px); font-weight: 800; letter-spacing: -.035em; }
.featured-slide p { opacity: .9; margin-top: 8px; font-size: 16px; }
.featured-slide::after { content: ""; position: absolute; right: -80px; bottom: -120px; width: 340px; height: 340px; border-radius: 50%; background: rgba(255,255,255,.08); }
.featured-dots { display: flex; gap: 6px; justify-content: center; margin-top: 12px; }
.featured-dots button { width: 8px; height: 8px; border-radius: 99px; border: 0; background: var(--border-strong); cursor: pointer; transition: width .2s, background .2s; padding: 0; }
.featured-dots button.is-active { width: 24px; background: var(--fg); }
.featured-nav { position: absolute; top: calc(50% - 14px); transform: translateY(-50%); width: 42px; height: 42px; border-radius: 50%; border: 0; background: rgba(255,255,255,.92); display: grid; place-items: center; cursor: pointer; z-index: 3; box-shadow: var(--shadow); }
.featured-nav.prev { left: 14px; } .featured-nav.next { right: 14px; }
.featured-grid { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 16px; }
.featured-grid.cols-3 { grid-template-columns: repeat(3, minmax(0,1fr)); }
.featured-grid .featured-slide { min-height: 200px; padding: 30px; }
@media (max-width: 900px) { .featured-grid, .featured-grid.cols-3 { grid-template-columns: 1fr; } .featured-slide { padding: 26px; } .featured-nav { display: none; } }

/* Favoritos */
.fav-btn { width: 40px; height: 40px; border-radius: 50%; border: 1px solid var(--border); background: #fff; display: inline-grid; place-items: center; cursor: pointer; color: var(--muted-fg); transition: transform .15s, color .15s, border-color .15s; flex-shrink: 0; }
.fav-btn:hover { transform: scale(1.06); color: #E11D48; }
.fav-btn.is-on { color: #E11D48; border-color: #FECDD3; background: #FFF1F2; }
.fav-btn.is-on svg { fill: #E11D48; }

/* Ofertas e cupons */
.offer-card { display: flex; flex-direction: column; overflow: hidden; }
.offer-top { padding: 18px 20px; display: flex; gap: 14px; align-items: center; background: var(--brand-50); border-bottom: 1px dashed #F2D94E; }
.offer-top .disc { font-family: var(--font-display); font-weight: 800; font-size: 24px; letter-spacing: -.03em; line-height: 1; }
.offer-card.coupon .offer-top { background: #FDF2F8; border-bottom-color: #F9A8D4; }
.coupon-code { display: inline-flex; align-items: center; gap: 8px; border: 1.5px dashed var(--fg); border-radius: 10px; padding: 6px 12px; font-family: ui-monospace, Consolas, monospace; font-weight: 700; letter-spacing: .06em; cursor: pointer; background: #fff; }
.coupon-code:hover { background: var(--muted); }

/* Mapa */
.map-wrap { position: relative; height: 560px; border-radius: 20px; overflow: hidden; border: 1px solid var(--border); background: #E5E7EB; }
.map-wrap #map { position: absolute; inset: 0; }
.pro-row { display: flex; gap: 12px; padding: 14px; border-bottom: 1px solid var(--border); cursor: pointer; transition: background .15s; }
.pro-row:hover, .pro-row.is-hl { background: var(--muted); }
.pin-pro { width: 36px; height: 36px; border-radius: 50%; border: 3px solid #fff; box-shadow: 0 4px 12px rgba(0,0,0,.25); display: grid; place-items: center; background: #18181B; color: #FFD000; font-size: 12px; font-weight: 800; overflow: hidden; }
.pin-pro img { width: 100%; height: 100%; object-fit: cover; }
.pin-me { width: 20px; height: 20px; border-radius: 50%; background: #2563EB; border: 4px solid #fff; box-shadow: 0 0 0 6px rgba(37,99,235,.25); }

/* Blog */
.post-card { overflow: hidden; display: flex; flex-direction: column; }
.post-cover { aspect-ratio: 16/9; background: var(--c, #F1F1EF); display: grid; place-items: center; position: relative; overflow: hidden; }
.post-cover img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.post-cover svg { width: 44px; height: 44px; color: rgba(24,24,27,.7); stroke-width: 1.5; }
.post-hero { aspect-ratio: 21/8; border-radius: 24px; background: var(--c, #F1F1EF); display: grid; place-items: center; overflow: hidden; position: relative; }
.post-hero img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.post-hero svg { width: 64px; height: 64px; color: rgba(24,24,27,.6); stroke-width: 1.3; }
.prose img { border-radius: 12px; margin: 14px 0; height: auto; }

/* Video no EAD */
.player video { width: 100%; height: 100%; background: #000; display: block; }
.player .embed-raw, .player .embed-raw iframe, .player .embed-raw video { width: 100%; height: 100%; border: 0; }

/* Rodape com logo escuro */
.site-footer .logo-white.is-dark { background: transparent; padding: 0; }
.site-footer .logo-white.is-dark img { height: 26px; }
.featured[data-carousel] .featured-slide { padding-left: 80px; padding-right: 80px; }
@media (max-width: 900px) { .featured[data-carousel] .featured-slide { padding-left: 26px; padding-right: 26px; } }
.map-wrap { isolation: isolate; z-index: 0; }

/* Setas do menu de categorias alinhadas a borda do container (1240px, padding 24px) */
.nav-arrow.right { right: max(24px, calc((100% - 1240px) / 2 + 24px)); padding-right: 0; }
.nav-arrow.left { left: max(24px, calc((100% - 1240px) / 2 + 24px)); padding-left: 0; }

/* Voltar ao topo */
.to-top { position: fixed; right: 20px; bottom: 20px; z-index: 90; width: 46px; height: 46px; border-radius: 50%; border: 1px solid var(--border); background: var(--card); color: var(--fg); box-shadow: var(--shadow); display: grid; place-items: center; cursor: pointer; opacity: 0; transform: translateY(12px) scale(.9); pointer-events: none; transition: opacity .2s, transform .2s, background .15s; }
.to-top.show { opacity: 1; transform: none; pointer-events: auto; }
.to-top:hover { background: var(--fg); color: var(--card); }
.has-mobile-nav .to-top { bottom: 20px; }
@media (max-width: 640px) { .has-mobile-nav .to-top { bottom: 80px; } .to-top { right: 14px; width: 42px; height: 42px; } }

/* Mapa "Perto de mim" em cinza claro (tiles gratuitos do OpenStreetMap com filtro CSS) */
.map-wrap { background: #EEF1F4; }
.map-wrap .leaflet-tile-pane { filter: grayscale(1) brightness(1.12) contrast(.82); }

/* ===== Imagem padrao nos cards, icones enviados nos titulos, hero editavel (2026-11-14) ===== */
.svc-card .thumb img.ph-img { object-fit: cover; }
.cat-head .ci .ic-img { width: 46px; height: 46px; object-fit: contain; }
.kpi-icon .ic-img { width: 24px; height: 24px; object-fit: contain; }
.group-tile .gi .ic-img { width: 30px; height: 30px; object-fit: contain; }
.hero-art .bubble .bubble-img { width: 58%; height: 58%; object-fit: contain; }

/* ===== Carrossel de servicos no celular (categorias e home) ===== */
@media (max-width: 767px) {
  .svc-carousel {
    grid-template-columns: none !important;
    grid-template-rows: repeat(var(--rows, 1), auto);
    grid-auto-flow: column; grid-auto-columns: 44%;
    gap: 10px; overflow-x: auto; scroll-snap-type: x mandatory; overscroll-behavior-x: contain;
    margin: 0 -16px; padding: 2px 16px 8px; scroll-padding: 0 16px; scrollbar-width: none;
  }
  .svc-carousel::-webkit-scrollbar { display: none; }
  .svc-carousel > * { scroll-snap-align: start; min-width: 0; }
  .svc-carousel .svc-card { border-radius: 14px; }
  .svc-carousel .svc-card:hover { transform: none; }
  .svc-carousel .svc-card .thumb { aspect-ratio: 4/3; }
  .svc-carousel .svc-card .thumb .ic-img { width: 40px; height: 40px; }
  .svc-carousel .svc-card .info { padding: 9px 10px 11px; }
  .svc-carousel .svc-card .info h4 { font-size: 13px; line-height: 1.25; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
  .svc-carousel .svc-card .info p { font-size: 11.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
}

/* ===== Botao "Apagar tudo" das listas do admin ===== */
.btn-danger-outline { color: var(--danger); border-color: color-mix(in srgb, var(--danger) 40%, var(--border)); }
.btn-danger-outline:hover { background: var(--danger); border-color: var(--danger); color: #fff; }

/* ===== Localizacao no topo (clicavel) ===== */
.header-search button.loc { background: none; border: 0; border-right: 1px solid var(--border-strong); border-radius: 0; cursor: pointer; font: inherit; font-size: 14px; height: 26px; max-width: 190px; }
.header-search button.loc [data-loc-label] { overflow: hidden; text-overflow: ellipsis; }
.header-search button.loc .loc-caret { width: 14px; height: 14px; opacity: .6; flex-shrink: 0; }
.header-search button.loc:hover { color: var(--fg); }
.header-search button.loc:hover .loc-caret { opacity: 1; }

/* Selos das lojas de app (rodapé) */
.site-footer .store-badges { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 18px; }
.site-footer .store-badges a { display: inline-block; padding: 0; line-height: 0; border-radius: 12px; transition: transform .15s, box-shadow .15s; }
.site-footer .store-badges a:hover { transform: translateY(-1px); box-shadow: 0 4px 14px rgba(0,0,0,.35); }
.site-footer .store-badges img { height: 44px; width: auto; display: block; }

/* Botão de busca: só a lupa no computador; no celular mostra "Buscar profissionais" (igual ao app) */
.big-search .go .go-label { display: none; }
@media (max-width: 640px) {
  .big-search .go { display: flex; align-items: center; justify-content: center; gap: 8px; height: 52px; color: #FFFFFF; font-weight: 700; font-size: 15.5px; }
  .big-search .go .go-label { display: inline; }
  .big-search .go svg { width: 22px; height: 22px; }
}

/* Logo sempre na proporção (mesma correção do Enge Market): o logo é largo (887x108) e o flex do cabeçalho o espremia */
.brand-logo { flex-shrink: 0; display: inline-flex; align-items: center; }
.brand-logo img { height: auto; width: auto; max-height: 46px; max-width: 230px; object-fit: contain; } /* SOS: logo 3:1 precisa de mais altura */
.sidebar-head a { flex-shrink: 1; min-width: 0; display: inline-flex; align-items: center; }
.sidebar-head img { height: auto !important; width: auto; max-height: 40px; max-width: 180px; object-fit: contain; }
.site-footer .logo-white img { height: auto; width: auto; max-height: 44px; max-width: 230px; object-fit: contain; }
.site-footer .logo-white.is-dark img { height: auto; max-height: 46px; }
@media (max-width: 640px) { .brand-logo img { max-width: 150px; max-height: 40px; } }
/* Cabeçalho em telas médias: a busca pode encolher até 240px e os links do menu a partir do 3º somem (no celular já somem todos) */
.header-search { min-width: 240px; }
.header-actions { flex-shrink: 0; }
@media (max-width: 1240px) { .header-actions > a.btn-ghost.hide-mobile:nth-of-type(n+3) { display: none; } }

/* =====================================================================
   SOS Serviços: cores do logo (azul) no lugar do amarelo do Clone GetNinjas
   --brand  #016FB6 (azul do pino do logo; texto branco com contraste 5,3:1)
   --brand-accent #0095D5 (azul claro do "SOS", para destaques sobre fundo escuro)
   ===================================================================== */
:root { --brand: #016FB6; --brand-600: #015E9C; --brand-50: #E8F4FB; --brand-fg: #FFFFFF; --brand-accent: #0095D5; --brand-navy: #021941; }
[data-theme="dark"] { --brand-50: #0B2238; }
.callout-brand { border-color: #B7DDF3; color: #0B3D66; }
[data-theme="dark"] .callout-brand { background: #0B2238; border-color: #164A73; color: #9BD3F2; }
.hero::after { background: radial-gradient(circle, rgba(0,149,213,.32), rgba(0,149,213,0) 65%); }
.auth-side::after { background: radial-gradient(circle, rgba(0,149,213,.40), rgba(0,149,213,0) 65%); }
.svc-card .thumb { background: var(--c, #E8F4FB); }
.coin-dot { color: #FFFFFF; border-color: #015E9C; }
.balance-card .coin, .notif.unread .ni, .step:nth-child(2) .n, .step.is-active .n { color: #FFFFFF; }
.offer-top { border-bottom-color: #8CCBEB; }
.cta-pro .stat b, .hero-art .bubble svg { color: var(--brand-accent); }
.big-search .go, .big-search .go svg { color: #FFFFFF; }.kpi-icon[style*="--brand"] { color: #FFFFFF; }
