/*!
 * Franquias de Beleza — tema (full-width + mega menu)
 * @author Uebsites <https://klassificado.com.br>
 * @modified 2026-05-10 11:30 UTC-03:00
 */
:root {
  --fdbt-primary: var(--fdb-primary, #b9006e);
  --fdbt-secondary: var(--fdb-secondary, #1a1a2e);
  --fdbt-accent: var(--fdb-accent, #f5c518);
  --fdbt-button: var(--fdb-button, var(--fdb-primary, #b9006e));
  --fdbt-bg: #ffffff;
  --fdbt-surface: #fafafa;
  --fdbt-text: #1f2937;
  --fdbt-muted: #6b7280;
  --fdbt-border: #e5e7eb;
  --fdbt-radius: 14px;
  --fdbt-shadow: 0 10px 30px rgba(0,0,0,.08);
  --fdbt-header-h: 74px;
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body.fdb-theme {
  font-family: system-ui, -apple-system, 'Segoe UI', Roboto, Arial, sans-serif;
  color: var(--fdbt-text);
  background: var(--fdbt-bg);
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
img, svg, video { max-width: 100%; height: auto; display: block; }
a { color: var(--fdbt-button); text-decoration: none; }
a:hover { text-decoration: underline; }

/* Remove qualquer título de página no topo quando body tem .fdb-hide-title */
body.fdb-hide-title .entry-title,
body.fdb-hide-title .page-title,
body.fdb-hide-title .wp-block-post-title,
body.fdb-hide-title .post-header,
body.fdb-hide-title .page-header { display: none !important; }

/* Layout full-width: nada fica em container estreito por padrão */
body.fdb-fullwidth .fdb-main,
body.fdb-fullwidth .fdb-section,
body.fdb-fullwidth .fdb-article,
body.fdb-fullwidth .fdb-page-article,
body.fdb-fullwidth .fdb-single { width: 100%; max-width: none; margin: 0; padding: 0; }

/* Skip link */
.fdb-skip-link { position: absolute; left: -9999px; top: 0; z-index: 1000; background: #000; color: #fff; padding: .75rem 1rem; }
.fdb-skip-link:focus { left: 1rem; top: 1rem; }

/* ========== HEADER ========== */
.fdb-header {
  position: sticky;
  top: 0;
  z-index: 80;
  background: #fff;
  border-bottom: 1px solid var(--fdbt-border);
  box-shadow: 0 2px 10px rgba(0,0,0,.04);
}
.fdb-header__bar {
  display: flex;
  align-items: center;
  gap: 1rem;
  width: 100%;
  max-width: 100%;
  padding: .85rem clamp(1rem, 3vw, 2.5rem);
  min-height: var(--fdbt-header-h);
}
.fdb-header__brand { flex: 0 0 auto; }
.fdb-header__logo { display: inline-flex; align-items: center; text-decoration: none; }
.fdb-header__site-name { font-weight: 800; font-size: 1.12rem; color: var(--fdbt-secondary); letter-spacing: -.01em; }
.fdb-header__brand .custom-logo-link { display: inline-flex; align-items: center; text-decoration: none; }
.fdb-header__brand .custom-logo { max-width: var(--fdb-logo-size, 160px); width: var(--fdb-logo-size, 160px); height: auto; }

.fdb-header__toggle {
  display: none;
  background: none;
  border: none;
  padding: .5rem;
  cursor: pointer;
  flex-direction: column;
  gap: 4px;
  margin-left: auto;
}
.fdb-header__toggle span { display: block; width: 24px; height: 2px; background: var(--fdbt-secondary); border-radius: 2px; transition: transform .2s ease; }

.fdb-header__actions { display: flex; gap: .5rem; flex: 0 0 auto; margin-left: auto; }

/* ========== MEGA MENU PROFISSIONAL ========== */
.fdb-mega { flex: 1 1 auto; display: flex; justify-content: center; }
.fdb-mega__menu { list-style: none; margin: 0; padding: 0; display: flex; gap: .15rem; align-items: center; }
.fdb-mega__item { position: relative; }

.fdb-mega__link {
  display: inline-flex; align-items: center; gap: .45rem;
  padding: .75rem 1.05rem; font: inherit; font-weight: 600;
  color: var(--fdbt-secondary); background: transparent;
  border: none; border-radius: 10px; cursor: pointer;
  text-decoration: none; font-size: .94rem; line-height: 1;
  position: relative;
  transition: color .18s ease;
}
.fdb-mega__link::after {
  content: ''; position: absolute; left: 1rem; right: 1rem; bottom: 4px;
  height: 2px; background: var(--fdbt-button); border-radius: 2px;
  transform: scaleX(0); transform-origin: center; transition: transform .22s ease;
}
.fdb-mega__link:hover::after,
.fdb-mega__link:focus-visible::after,
.fdb-mega__item--open > .fdb-mega__link::after { transform: scaleX(1); }
.fdb-mega__link:hover,
.fdb-mega__link:focus-visible,
.fdb-mega__item--open > .fdb-mega__link { color: var(--fdbt-button); }

.fdb-mega__chev {
  width: 8px; height: 8px;
  border-right: 1.8px solid currentColor; border-bottom: 1.8px solid currentColor;
  transform: rotate(45deg) translateY(-2px);
  transition: transform .22s ease;
}
.fdb-mega__item--open .fdb-mega__chev { transform: rotate(-135deg) translateY(2px); }

/* Botão CTA destaque com gradiente */
.fdb-mega__link--highlight {
  background: linear-gradient(135deg, var(--fdbt-button) 0%, color-mix(in srgb, var(--fdbt-button) 75%, #fff) 100%);
  color: #fff !important;
  box-shadow: 0 6px 18px color-mix(in srgb, var(--fdbt-button) 32%, transparent);
  padding: .65rem 1.15rem;
  transition: transform .18s ease, box-shadow .18s ease;
}
.fdb-mega__link--highlight::after { display: none; }
.fdb-mega__link--highlight:hover {
  transform: translateY(-1px);
  box-shadow: 0 10px 24px color-mix(in srgb, var(--fdbt-button) 40%, transparent);
}
.fdb-mega__link--highlight .fdb-mega__icon { width: 16px; height: 16px; }

/* Backdrop atrás dos painéis abertos (apenas desktop) */
@media (min-width: 1024px) {
  body.fdb-has-open-panel::before {
    content: ''; position: fixed; inset: var(--fdbt-header-h) 0 0 0;
    background: rgba(15,15,30,.28); backdrop-filter: blur(3px);
    z-index: 60; animation: fdb-fade-in .22s ease;
    pointer-events: none;
  }
}

/* Painel padrão (dropdown menor) */
.fdb-mega__panel {
  position: absolute; top: calc(100% + 10px); left: 0;
  background: #fff; border: 1px solid var(--fdbt-border);
  border-radius: var(--fdbt-radius);
  box-shadow: 0 20px 50px rgba(15,15,30,.18);
  padding: .65rem; min-width: 340px; max-width: min(92vw, 460px);
  display: flex; flex-direction: column; gap: .25rem;
  opacity: 0; pointer-events: none; visibility: hidden;
  transform: translateY(10px) scale(.98); transform-origin: top center;
  transition: opacity .22s ease, transform .22s ease, visibility 0s .22s;
  z-index: 90;
}
.fdb-mega__item--open .fdb-mega__panel {
  opacity: 1; pointer-events: auto; visibility: visible;
  transform: translateY(0) scale(1);
  transition: opacity .22s ease, transform .22s ease;
}

/* Painel MEGA (full-width estilo apple) */
.fdb-mega__panel--mega {
  position: fixed; top: var(--fdbt-header-h); left: 50%;
  transform: translateX(-50%) translateY(10px);
  width: min(96vw, 1180px); max-width: 1180px;
  padding: 1.75rem 2rem;
}
.fdb-mega__item--open .fdb-mega__panel--mega {
  transform: translateX(-50%) translateY(0);
}
.fdb-mega__layout {
  display: grid; grid-template-columns: 1fr 320px; gap: 2rem;
}
.fdb-mega__groups {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.5rem 2rem;
}
.fdb-mega__group + .fdb-mega__group { padding-left: 1.5rem; border-left: 1px solid var(--fdbt-border); }

.fdb-mega__heading {
  margin: 0 0 .65rem; font-size: .72rem;
  text-transform: uppercase; letter-spacing: .12em;
  color: var(--fdbt-muted); font-weight: 700;
}

/* Cards com ícone */
.fdb-mega__card {
  display: flex; align-items: flex-start; gap: .8rem;
  padding: .7rem .8rem; border-radius: 12px;
  text-decoration: none; color: var(--fdbt-secondary);
  transition: background .18s ease, transform .18s ease;
}
.fdb-mega__card:hover { background: color-mix(in srgb, var(--fdbt-button) 6%, transparent); text-decoration: none; transform: translateX(2px); }
.fdb-mega__card .fdb-mega__icon {
  flex: 0 0 auto; width: 22px; height: 22px;
  color: var(--fdbt-button);
  background: color-mix(in srgb, var(--fdbt-button) 10%, transparent);
  padding: 8px; border-radius: 10px;
  width: 38px; height: 38px;
  transition: background .18s ease;
}
.fdb-mega__card:hover .fdb-mega__icon { background: color-mix(in srgb, var(--fdbt-button) 18%, transparent); }
.fdb-mega__card span {
  display: flex; flex-direction: column; gap: .15rem; min-width: 0;
}
.fdb-mega__card strong { font-weight: 600; font-size: .94rem; color: var(--fdbt-secondary); }
.fdb-mega__card small { color: var(--fdbt-muted); font-size: .82rem; line-height: 1.35; font-weight: 400; }

/* Sublist com contador (UFs) */
.fdb-mega__sublist { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: .15rem; }
.fdb-mega__sublist a {
  display: flex; align-items: center; justify-content: space-between;
  padding: .5rem .65rem; border-radius: 8px;
  color: var(--fdbt-secondary); font-weight: 500; font-size: .9rem;
  transition: background .18s ease;
}
.fdb-mega__sublist a small {
  color: var(--fdbt-muted); font-weight: 400; font-size: .76rem;
  background: var(--fdbt-surface); padding: .15rem .5rem; border-radius: 999px;
}
.fdb-mega__sublist a:hover { background: color-mix(in srgb, var(--fdbt-button) 6%, transparent); text-decoration: none; color: var(--fdbt-button); }

/* Tags / chips de especialidade */
.fdb-mega__tags { list-style: none; padding: 0; margin: 0; display: flex; flex-wrap: wrap; gap: .35rem; }
.fdb-mega__tags a {
  display: inline-block; padding: .4rem .8rem;
  background: var(--fdbt-surface); color: var(--fdbt-secondary);
  border-radius: 999px; font-size: .82rem; font-weight: 500;
  border: 1px solid var(--fdbt-border);
  transition: all .18s ease;
}
.fdb-mega__tags a:hover {
  background: var(--fdbt-button); color: #fff !important;
  border-color: var(--fdbt-button); text-decoration: none;
  transform: translateY(-1px);
}

/* Painel "feature" com gradiente lateral */
.fdb-mega__feature {
  position: relative; overflow: hidden;
  border-radius: var(--fdbt-radius);
  padding: 1.5rem; color: #fff;
  display: flex; flex-direction: column; gap: .65rem; justify-content: flex-end;
  min-height: 240px;
  background: linear-gradient(135deg, var(--fdbt-secondary) 0%, var(--fdbt-button) 100%);
}
.fdb-mega__feature-bg {
  position: absolute; inset: 0;
  background: radial-gradient(circle at 80% 20%, rgba(245,197,24,.25), transparent 60%),
              radial-gradient(circle at 20% 80%, rgba(255,255,255,.12), transparent 50%);
  pointer-events: none;
}
.fdb-mega__feature .fdb-mega__icon { width: 32px; height: 32px; color: var(--fdbt-accent); }
.fdb-mega__feature h5 { margin: 0; font-size: 1.15rem; font-weight: 700; line-height: 1.2; }
.fdb-mega__feature p { margin: 0; font-size: .88rem; color: rgba(255,255,255,.85); line-height: 1.5; }
.fdb-mega__feature .fdb-btn {
  align-self: flex-start; background: #fff; color: var(--fdbt-secondary) !important;
  font-weight: 600;
}
.fdb-mega__feature .fdb-btn:hover { background: var(--fdbt-accent); color: var(--fdbt-secondary) !important; }
.fdb-mega__feature .fdb-mega__icon[viewBox] { width: 14px; height: 14px; }

.fdb-mega__muted { color: var(--fdbt-muted); font-size: .85rem; margin: .25rem 0; }

@keyframes fdb-fade-in {
  from { opacity: 0; }
  to { opacity: 1; }
}

/* ========== MAIN / CONTEÚDO ========== */
.fdb-main { min-height: calc(100vh - var(--fdbt-header-h) - 220px); }
.fdb-section, .fdb-article, .fdb-page-article, .fdb-single { padding: clamp(1.25rem, 3vw, 3rem) clamp(1rem, 3vw, 2.5rem); }
.fdb-section__title { font-size: clamp(1.4rem, 2.5vw, 2rem); color: var(--fdbt-secondary); margin: 0 0 1rem; }
.fdb-empty { color: var(--fdbt-muted); padding: 2rem; text-align: center; }

/* 404 */
.fdb-404 { display: grid; place-items: center; min-height: 60vh; padding: 2rem; }
.fdb-404__inner { text-align: center; max-width: 520px; }
.fdb-404__code { font-size: clamp(4rem, 12vw, 8rem); margin: 0; color: var(--fdbt-button); line-height: 1; }
.fdb-404__msg { color: var(--fdbt-muted); font-size: 1.05rem; margin: 1rem 0 2rem; }

/* ========== FOOTER ========== */
.fdb-footer { background: var(--fdbt-secondary); color: #fff; padding: 3rem clamp(1rem, 3vw, 2.5rem) 1rem; margin-top: 4rem; }
.fdb-footer__grid { display: grid; grid-template-columns: 1.5fr 1fr 1fr; gap: 2rem; max-width: 1280px; margin: 0 auto 2rem; }
.fdb-footer__brand .fdb-footer__site-name { font-size: 1.2rem; }
.fdb-footer__desc { color: rgba(255,255,255,.75); font-size: .92rem; margin: .75rem 0 0; }
.fdb-footer__title { font-size: .85rem; text-transform: uppercase; letter-spacing: .08em; color: rgba(255,255,255,.6); margin: 0 0 .75rem; }
.fdb-footer__nav ul { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: .4rem; }
.fdb-footer__nav a { color: rgba(255,255,255,.85); font-size: .95rem; }
.fdb-footer__nav a:hover { color: #fff; }
.fdb-footer__bar { text-align: center; border-top: 1px solid rgba(255,255,255,.1); padding-top: 1rem; color: rgba(255,255,255,.6); font-size: .85rem; }

/* ========== BOTÕES (coerentes com o plugin) ========== */
.fdb-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .4rem;
  padding: .65rem 1.1rem;
  border-radius: 10px;
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
  border: 1px solid transparent;
  font: inherit;
  transition: transform .15s ease, background .18s ease, color .18s ease;
}
.fdb-btn--sm { padding: .45rem .85rem; font-size: .88rem; }
.fdb-btn--primary { background: var(--fdbt-button); color: #fff; }
.fdb-btn--primary:hover { background: color-mix(in srgb, var(--fdbt-button) 82%, #000); text-decoration: none; color: #fff; }
.fdb-btn--ghost { background: transparent; color: var(--fdbt-secondary); border-color: var(--fdbt-border); }
.fdb-btn--ghost:hover { background: var(--fdbt-surface); text-decoration: none; }

/* ========== Quando o painel do plugin está aberto, mata padding e footer ========== */
body.fdb-in-painel .fdb-main { padding: 0; min-height: calc(100vh - var(--fdbt-header-h)); }
body.fdb-in-painel .fdb-footer { display: none; }

/* ========== RESPONSIVO ========== */
@media (max-width: 1023px) {
  .fdb-header__toggle { display: inline-flex; }
  .fdb-mega {
    position: fixed;
    inset: var(--fdbt-header-h) 0 0 0;
    background: #fff;
    padding: 1rem;
    transform: translateX(-100%);
    transition: transform .25s ease;
    overflow-y: auto;
    z-index: 79;
  }
  body.fdb-menu-open .fdb-mega { transform: translateX(0); }
  .fdb-mega__menu { flex-direction: column; align-items: stretch; gap: .25rem; }
  .fdb-mega__link { width: 100%; justify-content: space-between; }
  .fdb-mega__panel,
  .fdb-mega__panel--mega {
    position: static;
    transform: none !important;
    min-width: 0; max-width: none; width: auto;
    opacity: 1; visibility: visible; pointer-events: auto;
    box-shadow: none; border: none;
    padding: .25rem 0 .5rem 1rem;
    background: transparent;
    display: none;
  }
  .fdb-mega__item--open .fdb-mega__panel,
  .fdb-mega__item--open .fdb-mega__panel--mega { display: flex; flex-direction: column; gap: .25rem; }
  .fdb-mega__layout { grid-template-columns: 1fr; gap: 1rem; }
  .fdb-mega__groups { grid-template-columns: 1fr; gap: 1rem; }
  .fdb-mega__group + .fdb-mega__group { padding-left: 0; border-left: none; border-top: 1px solid var(--fdbt-border); padding-top: 1rem; }
  .fdb-mega__feature { min-height: auto; padding: 1.25rem; }
  .fdb-mega__link::after { display: none; }
  .fdb-header__actions { order: 3; width: 100%; justify-content: flex-end; }
  .fdb-footer__grid { grid-template-columns: 1fr; }
}

@media (max-width: 560px) {
  .fdb-mega__cols { grid-template-columns: 1fr; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}
