/* ============ Hero da página ============ */
/* (idêntico ao padrão de funcionalidades.css, pra manter consistência entre as páginas internas) */
.fn-hero { padding: 80px 0 60px; }
.fn-back {
  display: inline-flex; align-items: center; gap: 6px;
  color: var(--muted); font-size: 14px; font-weight: 500;
  margin-bottom: 32px; transition: color .2s;
}
.fn-back:hover { color: var(--accent); }
.fn-hero__title { margin-bottom: 24px; }
.fn-hero__meta {
  display: flex; gap: 48px; margin-top: 48px; flex-wrap: wrap;
  padding-top: 32px; border-top: 1px solid var(--border);
}
.fn-hero__meta > div { display: flex; flex-direction: column; }
.fn-hero__meta strong {
  font-family: var(--display); font-size: 48px; font-weight: 700;
  line-height: 1; letter-spacing: -0.02em;
}
.fn-hero__meta span { color: var(--muted); font-size: 14px; margin-top: 4px; }

/* ============ Filtros ============ */
.fn-filters {
  position: sticky; top: 72px; z-index: 40;
  background: var(--nav-bg-scrolled);
  backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
  border-top: 1px solid var(--border); border-bottom: 1px solid var(--border);
  padding: 16px 0;
}
.fn-tabs {
  display: flex; gap: 8px; overflow-x: auto; scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
}
.fn-tabs::-webkit-scrollbar { display: none; }
.fn-tab {
  padding: 8px 16px; border-radius: 999px; font-size: 14px; font-weight: 500;
  color: var(--muted); border: 1px solid var(--border); background: var(--card);
  white-space: nowrap; transition: var(--transition);
}
.fn-tab:hover { color: var(--text-strong); border-color: var(--border-strong); }
.fn-tab.is-active {
  background: var(--accent); color: #fff; border-color: var(--accent);
}

/* ============ Section ============ */
.fn-section { padding: 60px 0 100px; border-top: none; }

/* ============ Grid de templates ============ */
/* Cards mais "pesados" (mockup + texto + lista + 2 CTAs) pedem 2 colunas, não 3 */
.fn-grid {
  display: grid; grid-template-columns: repeat(2, 1fr); gap: 24px;
}

.fn-card {
  position: relative;
  background: var(--card); border: 1px solid var(--border); border-radius: var(--radius-lg);
  overflow: hidden;
  display: flex; flex-direction: column;
  transition: transform .25s ease, border-color .25s ease;
}
.fn-card::before {
  content: ""; position: absolute; top: 0; left: 0; right: 0; height: 2px;
  background: linear-gradient(90deg, transparent, var(--ac, var(--accent)), transparent);
  transform: scaleX(0); transform-origin: left; transition: transform .35s ease;
  z-index: 2;
}
.fn-card:hover {
  transform: translateY(-4px);
  border-color: var(--ac, var(--accent));
}
.fn-card:hover::before { transform: scaleX(1); }
.fn-card[hidden] { display: none; }

/* Animação de entrada ao filtrar */
@keyframes fnCardIn {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: none; }
}
.fn-card:not([hidden]) { animation: fnCardIn .35s ease both; }

.fn-empty {
  text-align: center; padding: 80px 24px; color: var(--muted);
}

/* ============ Mockup de navegador (preview do template) ============ */
.tpl__browser {
  background: var(--bg, #0D0D0F);
  border-bottom: 1px solid var(--border);
}
.browser__bar {
  display: flex; align-items: center; gap: 6px; padding: 10px 14px;
  background: rgba(127, 127, 127, 0.14);
  border-bottom: 1px solid rgba(127, 127, 127, 0.14);
}
.dot { width: 10px; height: 10px; border-radius: 50%; display: inline-block; }
.dot--r { background: #FF5F57; }
.dot--y { background: #FEBC2E; }
.dot--g { background: #28C840; }

.tpl__mock {
  padding: 20px; display: flex; flex-direction: column; gap: 14px;
  min-height: 200px;
}

.m-nav { display: flex; align-items: center; justify-content: space-between; }
.m-logo { font-size: 20px; line-height: 1; }
.m-links { display: flex; gap: 8px; }
.m-links i {
  display: block; width: 28px; height: 6px; border-radius: 2px;
  background: rgba(255, 255, 255, 0.15);
}

.m-hero { display: flex; flex-direction: column; gap: 8px; padding: 6px 0; }
.m-line {
  height: 10px; border-radius: 3px; background: rgba(255, 255, 255, 0.12);
}
.m-line.w80 { width: 80%; }
.m-line.w50 { width: 50%; }
.m-cta {
  width: 90px; height: 24px; border-radius: 5px; margin-top: 4px;
  background: var(--ac, var(--accent));
}

.m-banner {
  height: 40px; border-radius: 6px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.m-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.m-stats div {
  height: 34px; border-radius: 6px;
  background: rgba(255, 255, 255, 0.06);
  border-top: 2px solid var(--ac, var(--accent));
}

.m-gallery { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.m-gallery div {
  height: 44px; border-radius: 6px;
  background: rgba(255, 255, 255, 0.08);
}

.m-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; }
.m-card {
  height: 40px; border-radius: 5px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-top: 2px solid var(--ac, var(--accent));
}

/* Variante clara — mockups com fundo claro (Clínica, Belle, Pousada, Praia & Cia) */
.tpl__mock--light .m-links i,
.tpl__mock--light .m-line { background: rgba(0, 0, 0, 0.10); }
.tpl__mock--light .m-banner,
.tpl__mock--light .m-stats div,
.tpl__mock--light .m-gallery div,
.tpl__mock--light .m-card {
  background: rgba(0, 0, 0, 0.045);
  border-color: rgba(0, 0, 0, 0.08);
}

/* ============ Informações do template ============ */
.template-info { padding: 28px 24px 24px; display: flex; flex-direction: column; flex-grow: 1; }
.fn-card__cat {
  display: inline-block; font-size: 11px; font-weight: 600;
  color: var(--ac, var(--accent)); text-transform: uppercase; letter-spacing: 0.1em;
  margin-bottom: 12px;
}
.template-info h3 {
  font-size: 20px; margin-bottom: 8px; line-height: 1.3;
  color: var(--text-strong);
}
.template-info p {
  color: var(--muted); font-size: 14px; line-height: 1.55; margin-bottom: 18px;
}

.template-features {
  display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px 16px;
  margin-bottom: 24px; flex-grow: 1;
}
.template-features li {
  color: var(--muted); font-size: 13px; padding-left: 20px; position: relative; line-height: 1.4;
}
.template-features li::before {
  content: "✓"; position: absolute; left: 0; color: var(--ac, var(--accent)); font-weight: 700;
}

.template-actions { display: flex; gap: 10px; flex-wrap: wrap; }
.template-actions .btn { flex: 1; min-width: 130px; }

/* ============ Responsive ============ */
@media (max-width: 900px) {
  .fn-grid { grid-template-columns: 1fr; }
  .fn-hero__meta { gap: 32px; }
  .fn-hero__meta strong { font-size: 36px; }
}
@media (max-width: 600px) {
  .fn-hero { padding: 60px 0 40px; }
  .fn-filters { top: 72px; padding: 12px 0; }
  .template-features { grid-template-columns: 1fr; }
  .template-actions .btn { flex: 1 1 100%; }
}