/* ==========================================================================
   Eletricista BH 24h — camada de design (child theme Swyft)
   Escopo: tokens, topbar, hero, cards, sidebar, rodapé, WhatsApp flutuante.
   Não altera o template do tema pai; só veste o que ele já renderiza.
   ========================================================================== */

:root {
  --el-ink: #0d1b2a;
  --el-ink-2: #1f3350;
  --el-text: #243244;
  --el-muted: #64748b;
  --el-line: #e6ebf2;
  --el-surface: #f7f9fc;
  --el-blue: #0d6eff;
  --el-green: #25d366;
  --el-radius: 16px;
  --el-shadow: 0 8px 24px rgba(13, 27, 42, .06);
  --el-shadow-hover: 0 18px 44px rgba(13, 27, 42, .13);
  --el-container: 1200px;
}

/* ---------- base ---------- */
html, body { overflow-x: hidden; }

body {
  font-family: Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  color: var(--el-text);
  background: #fff;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4, h5, h6 { color: var(--el-ink); letter-spacing: -.02em; }

/* títulos sobre imagem (overlay "inverse" do tema) continuam claros */
[data-scheme="inverse"] h1,
[data-scheme="inverse"] h2,
[data-scheme="inverse"] h3,
[data-scheme="inverse"] .cs-entry__title,
[data-scheme="inverse"] .cs-entry__title a { color: #fff; }

/* cabeçalho de página sem imagem: degradê da marca em vez do cinza do tema */
.cs-entry__header .cs-overlay-background:not(:has(img)) {
  background:
    radial-gradient(700px 260px at 12% 0%, rgba(13, 110, 255, .45), transparent 60%),
    radial-gradient(600px 220px at 95% 10%, rgba(37, 211, 102, .18), transparent 55%),
    linear-gradient(135deg, #0d1b2a 0%, #16406e 100%);
}

/* scrim para o título do post sobre a foto */
.cs-entry__header .cs-overlay-background { position: relative; }
.cs-entry__header .cs-overlay-background::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(9, 20, 35, .10) 0%, rgba(9, 20, 35, .45) 55%, rgba(9, 20, 35, .80) 100%);
  pointer-events: none;
}

/* autor: "By" -> "Por"; nos cards some, sobra data + categoria */
.cs-meta-author .cs-meta-author-by { display: none !important; }
.cs-meta-author::before { content: "Por "; color: #94a3b8; font-weight: 500; }
.cs-posts-area .cs-meta-author { display: none !important; }
p { margin-bottom: 1.1em; }
img { max-width: 100%; height: auto; }

.cs-container {
  max-width: var(--el-container);
  padding-left: 20px;
  padding-right: 20px;
  margin-left: auto;
  margin-right: auto;
}

/* ---------- topbar ---------- */
.el-topbar { background: var(--el-ink); color: #cfe0f5; font-size: .8125rem; }
.el-topbar__inner {
  max-width: var(--el-container);
  margin: 0 auto;
  padding: 9px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}
.el-topbar__status { display: inline-flex; align-items: center; gap: 8px; font-weight: 500; }
.el-topbar__dot {
  width: 7px; height: 7px; border-radius: 50%;
  background: #22c55e;
  box-shadow: 0 0 0 3px rgba(34, 197, 94, .22);
  flex: none;
}
.el-topbar a { color: #fff; font-weight: 700; text-decoration: none; }
.el-topbar a:hover { color: #bfdcff; }
.el-topbar__area { color: #9fb6d2; }

/* ---------- header ---------- */
.cs-header {
  background: #fff;
  border-bottom: 1px solid var(--el-line);
  box-shadow: 0 2px 14px rgba(13, 27, 42, .04);
}
.cs-header__nav a {
  color: #1e293b;
  font-size: .9375rem;
  font-weight: 600;
}
.cs-header__nav a:hover { color: var(--el-blue); }
.cs-header__nav .cs-header__nav-inner { gap: 6px 18px; }
.cs-header__logo { font-weight: 800; letter-spacing: -.02em; }

/* ---------- CTA no menu ---------- */
.cs-header__nav-secondary { display: none; }
.el-nav-cta { display: flex; align-items: center; margin-left: 8px; }
.el-nav-cta > a {
  background: var(--el-green) !important;
  color: #06331b !important;
  padding: 10px 16px !important;
  border-radius: 10px;
  font-weight: 700;
  font-size: .9375rem;
  line-height: 1.2 !important;
  height: auto !important;
  display: inline-flex !important;
  align-items: center;
  box-shadow: 0 6px 16px rgba(37, 211, 102, .30);
}
.el-nav-cta > a:hover { background: #1fc35c !important; }

/* ---------- hero ---------- */
.el-hero {
  position: relative;
  overflow: hidden;
  padding: 56px 0 60px;
  background:
    radial-gradient(1000px 420px at 12% -10%, rgba(13, 110, 255, .40), transparent 60%),
    radial-gradient(760px 380px at 92% 0%, rgba(37, 211, 102, .16), transparent 55%),
    linear-gradient(160deg, #0a1725 0%, #102a47 55%, #0a1725 100%);
  color: #eaf2ff;
}
.el-hero::after {
  content: "";
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(255, 255, 255, .035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, .035) 1px, transparent 1px);
  background-size: 44px 44px;
  mask-image: linear-gradient(180deg, rgba(0,0,0,.7), transparent 75%);
  pointer-events: none;
}
.el-hero__inner {
  position: relative;
  z-index: 1;
  max-width: var(--el-container);
  margin: 0 auto;
  padding: 0 20px;
  display: grid;
  grid-template-columns: minmax(0, 1.18fr) minmax(0, .82fr);
  gap: 40px;
  align-items: center;
}
.el-hero__eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  padding: 7px 13px;
  border-radius: 999px;
  background: rgba(255, 255, 255, .07);
  border: 1px solid rgba(255, 255, 255, .16);
  color: #d7e7fb;
  font-size: .75rem;
  font-weight: 700;
  letter-spacing: .08em;
  text-transform: uppercase;
}
.el-hero h1 {
  color: #fff;
  font-size: clamp(2rem, 3.9vw, 3.25rem);
  line-height: 1.07;
  letter-spacing: -.035em;
  margin: 18px 0 14px;
  max-width: 22ch;
}
.el-hero__lead {
  color: #c3d6ec;
  font-size: 1.0625rem;
  max-width: 54ch;
  margin: 0 0 26px;
}
.el-hero__actions { display: flex; flex-wrap: wrap; gap: 12px; }
.el-hero__chips {
  display: flex; flex-wrap: wrap; gap: 10px;
  list-style: none; padding: 0; margin: 24px 0 0;
}
.el-hero__chips li {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 8px 12px;
  border-radius: 10px;
  background: rgba(255, 255, 255, .05);
  border: 1px solid rgba(255, 255, 255, .10);
  color: #d8e6f8;
  font-size: .8125rem;
  font-weight: 500;
}
.el-hero__chips svg { flex: none; }

.el-hero__card {
  background: #fff;
  color: var(--el-ink);
  border-radius: 20px;
  padding: 26px 24px 22px;
  box-shadow: 0 26px 60px rgba(0, 0, 0, .38);
}
.el-hero__card-kicker {
  display: inline-flex; align-items: center; gap: 8px;
  font-size: .75rem; font-weight: 700; letter-spacing: .08em;
  text-transform: uppercase; color: #128a4b;
}
.el-hero__card h2 { font-size: 1.125rem; margin: 10px 0 2px; }
.el-hero__phone {
  display: block;
  font-size: 1.75rem;
  font-weight: 800;
  letter-spacing: -.03em;
  color: var(--el-ink);
  text-decoration: none;
  margin: 8px 0 4px;
}
.el-hero__phone:hover { color: var(--el-blue); }
.el-hero__card-note { color: var(--el-muted); font-size: .875rem; margin: 0 0 16px; }
.el-hero__hours {
  display: flex; justify-content: space-between; gap: 10px;
  margin-top: 14px; padding-top: 12px;
  border-top: 1px dashed #e2e8f0;
  font-size: .8125rem; color: var(--el-muted);
}

/* ---------- botões ---------- */
.el-btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  padding: 14px 22px;
  border-radius: 12px;
  border: 1px solid transparent;
  font-size: 1rem;
  font-weight: 700;
  text-decoration: none;
  transition: transform .18s ease, background .18s ease, box-shadow .18s ease;
}
.el-btn svg { flex: none; }
.el-btn--wa {
  background: var(--el-green);
  color: #06331b;
  box-shadow: 0 10px 24px rgba(37, 211, 102, .32);
}
.el-btn--wa:hover { background: #1fc35c; color: #06331b; transform: translateY(-1px); }
.el-btn--ghost {
  background: rgba(255, 255, 255, .06);
  border-color: rgba(255, 255, 255, .30);
  color: #fff;
}
.el-btn--ghost:hover { background: rgba(255, 255, 255, .14); color: #fff; }
.el-btn--dark { background: var(--el-ink); color: #fff; }
.el-btn--dark:hover { background: var(--el-ink-2); color: #fff; }

/* botões do WP seguem a marca */
.wp-block-button__link,
.cs-btn-primary,
a.button {
  border-radius: 12px !important;
  background: var(--el-ink) !important;
  color: #fff !important;
  padding: 13px 22px !important;
  font-size: 1rem !important;
  font-weight: 700 !important;
  text-transform: none !important;
  letter-spacing: 0 !important;
  box-shadow: none !important;
  transition: background .18s ease, transform .18s ease !important;
}
.wp-block-button__link:hover,
.cs-btn-primary:hover,
a.button:hover { background: var(--el-blue) !important; transform: translateY(-1px); }

/* ---------- seção de artigos ---------- */
.el-section-head {
  max-width: var(--el-container);
  margin: 0 auto;
  padding: 0 20px;
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
}
.el-section-head h2 { font-size: 1.5rem; margin: 0; }
.el-section-head p { margin: 4px 0 0; color: var(--el-muted); font-size: .9375rem; }
.el-section-head + .cs-container { padding-top: 18px; }

/* ---------- cards de post ---------- */
.cs-posts-area__main { gap: 28px; }

.cs-entry {
  background: #fff;
  border: 1px solid var(--el-line);
  border-radius: var(--el-radius);
  overflow: hidden;
  box-shadow: var(--el-shadow);
  transition: transform .22s ease, box-shadow .22s ease, border-color .22s ease;
}
.cs-entry:hover {
  transform: translateY(-4px);
  box-shadow: var(--el-shadow-hover);
  border-color: #d7e3f5;
}
.cs-entry__thumbnail { margin: 0; }
.cs-entry__thumbnail,
.cs-entry__thumbnail .cs-overlay-background { border-radius: 0; }
.cs-entry__thumbnail img,
.cs-entry__thumbnail .cs-overlay-background img {
  width: 100%;
  aspect-ratio: 3 / 2;
  object-fit: cover;
  display: block;
  border-radius: 0;
  box-shadow: none;
  transition: transform .35s ease;
}
.cs-entry:hover .cs-entry__thumbnail img { transform: scale(1.03); }

.cs-entry__content { padding: 18px 20px 20px; }
.cs-entry__post-meta {
  display: flex; flex-wrap: wrap; align-items: center; gap: 10px;
  font-size: .8125rem; color: var(--el-muted);
  margin: 0 0 6px;
}
.cs-meta-author-by { color: #94a3b8; }
.cs-meta-author-link, .cs-meta-author-name { color: #475569; font-weight: 600; text-decoration: none; }

.cs-entry__title {
  font-size: 1.25rem;
  line-height: 1.3;
  font-weight: 700;
  margin: 2px 0 12px;
}
.cs-entry__title a { color: var(--el-ink); text-decoration: none; }
.cs-entry__title a:hover { color: var(--el-blue); }

.cs-meta-category ul { display: flex; flex-wrap: wrap; gap: 6px; margin: 0; padding: 0; list-style: none; }
.cs-meta-category a {
  display: inline-block;
  padding: 4px 10px;
  border-radius: 999px;
  background: #eef4ff;
  color: var(--el-blue);
  font-size: .75rem;
  font-weight: 600;
  text-decoration: none;
}
.cs-meta-category a:hover { background: #dbe8ff; }

/* ---------- sidebar ---------- */
.cs-sidebar__inner .widget {
  background: #fff;
  border: 1px solid var(--el-line);
  border-radius: var(--el-radius);
  padding: 18px 18px 20px;
  margin-bottom: 18px;
  box-shadow: var(--el-shadow);
}
.cs-sidebar__inner .widget:last-child { margin-bottom: 0; }
.cs-sidebar__inner .widget-title,
.cs-sidebar__inner .wp-block-heading {
  font-size: 1rem;
  font-weight: 700;
  color: var(--el-ink);
  margin: 0 0 12px;
}

.wp-block-search__input {
  border: 1px solid var(--el-line);
  border-radius: 10px;
  padding: 10px 12px;
  background: #f8fafc;
  font-size: .9375rem;
}
.wp-block-search__input:focus { outline: 2px solid #bfd8ff; outline-offset: 1px; }
.wp-block-search__button {
  background: var(--el-ink);
  color: #fff;
  border: none;
  border-radius: 10px;
  padding: 10px 16px;
  font-weight: 600;
}
.wp-block-search__button:hover { background: var(--el-blue); }

.widget_categories ul,
.wp-block-categories { list-style: none; padding: 0; margin: 0; }
.widget_categories li a,
.wp-block-categories li a {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  padding: 9px 0;
  border-bottom: 1px solid #f1f5f9;
  color: #334155;
  font-size: .9375rem;
  text-decoration: none;
}
.widget_categories li:last-child a,
.wp-block-categories li:last-child a { border-bottom: 0; }
.widget_categories li a:hover,
.wp-block-categories li a:hover { color: var(--el-blue); }

/* Instagram: compacto, sem dominar a coluna */
.cs-sidebar .sbi,
.cs-sidebar .sbi_photo_wrap { border-radius: 12px; overflow: hidden; }
.cs-sidebar .sbi_photo_wrap img { border-radius: 10px; }
.cs-sidebar .sbi_header_text { font-size: .875rem; }

/* CTA da sidebar */
.cs-sidebar__inner .widget.el-cta {
  background: linear-gradient(150deg, #0d1b2a 0%, #143a63 100%);
  color: #fff;
  border: 0;
}
.el-cta .widget-title,
.el-cta .wp-block-heading { color: #fff !important; }
.el-cta p { color: #c3d6ec; font-size: .9375rem; margin: 0 0 14px; }
.el-cta .el-btn { width: 100%; }
.el-cta__tel {
  display: block;
  text-align: center;
  margin-top: 10px;
  color: #dbeafe;
  font-size: .875rem;
  text-decoration: none;
}
.el-cta__tel:hover { color: #fff; }

/* ---------- artigo (single) ---------- */
.cs-entry__content p,
.entry-content p { font-size: 1.0625rem; line-height: 1.78; }
.cs-entry__content h2 { font-size: 1.6rem; margin-top: 1.6em; }
.cs-entry__content h3 { font-size: 1.3rem; margin-top: 1.4em; }
.entry-content table,
.cs-entry__content table { display: block; overflow-x: auto; border-collapse: collapse; }
.cs-entry__content blockquote {
  border-left: 4px solid var(--el-blue);
  background: #f6f9ff;
  padding: 14px 18px;
  border-radius: 0 12px 12px 0;
  color: #334155;
}

/* ---------- rodapé ---------- */
.cs-footer { background: var(--el-ink); color: #cbd5e1; }
.cs-footer .widget-title,
.cs-footer .wp-block-heading { color: #fff; }
.cs-footer a { color: #dbeafe; text-decoration: none; }
.cs-footer a:hover { color: #fff; text-decoration: underline; }

/* ---------- WhatsApp flutuante ---------- */
.swyft-whatsapp-float {
  position: fixed;
  right: 20px;
  bottom: 20px;
  z-index: 9999;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 13px 18px;
  border-radius: 999px;
  background: var(--el-green);
  color: #06331b;
  font-weight: 700;
  font-size: .9375rem;
  text-decoration: none;
  box-shadow: 0 12px 28px rgba(37, 211, 102, .40);
  transition: transform .18s ease, box-shadow .18s ease;
}
.swyft-whatsapp-float:hover {
  transform: translateY(-2px);
  box-shadow: 0 16px 34px rgba(37, 211, 102, .5);
  color: #06331b;
}
.swyft-whatsapp-float svg { width: 22px; height: 22px; fill: #fff; flex: none; }
.swyft-whatsapp-text { white-space: nowrap; }

/* ---------- responsivo ---------- */
@media (max-width: 1024px) {
  .el-hero { padding: 44px 0 48px; }
  .el-hero__inner { gap: 28px; }
}

@media (max-width: 860px) {
  .el-hero__inner { grid-template-columns: 1fr; }
  .el-hero__card { order: 2; }
  .el-hero h1 { max-width: none; }
}

@media (max-width: 640px) {
  .el-topbar__inner { padding: 8px 16px; font-size: .75rem; }
  .el-topbar__area { display: none; }
  .cs-container { padding-left: 16px; padding-right: 16px; }

  .el-hero { padding: 34px 0 40px; }
  .el-hero h1 { font-size: 1.9rem; }
  .el-hero__lead { font-size: 1rem; }
  .el-hero__actions .el-btn { width: 100%; }
  .el-hero__card { padding: 20px; }
  .el-hero__phone { font-size: 1.5rem; }

  .cs-entry__title { font-size: 1.125rem; }
  .cs-entry__content { padding: 16px; }

  .swyft-whatsapp-float { padding: 14px; border-radius: 50%; }
  .swyft-whatsapp-float .swyft-whatsapp-text { display: none; }
  .swyft-whatsapp-float svg { width: 26px; height: 26px; }
}
