/**
 * e2c-blog.css  -  Listagem do blog (PT/EN).
 * Conteúdo visual mantém-se alinhado ao que existia em <style> inline; tokens via e2c-vars.css.
 */

body.page-template.page.blog,
body.page-template.page.e2c-page-services {
  font-family: var(--font-base);
  font-weight: 300;
  color: var(--c-text);
  background: var(--c-white);
  line-height: 1.6;
}

/* Service detail pages: hide legacy Elementor hero strip (H1 moved to e2c-page-hero).
   Hub (os-nossos-servicos / our-services) is excluded via body.e2c-page-services-hub so the
   6-card grid is never hidden if a class is missing on the section. */
body.e2c-page-services:not(.e2c-page-services-hub) .e2c-page-root > section.e2c-page-hero + section:not(.e2c-services-grid-section) {
  display: none !important;
}

.e2c-page-blog a {
  color: inherit;
  text-decoration: none;
}

.e2c-page-blog img {
  max-width: 100%;
  height: auto;
  display: block;
}

/* Hero: imagens em /assets/images/hero/ (atributo data-e2c-hero na secção) */
.e2c-page-blog .e2c-page-hero,
body.e2c-page-about .e2c-page-hero,
body.e2c-page-services .e2c-page-hero {
  position: relative;
  background-size: cover;
  background-position: center;
  padding: 0 clamp(1rem, 2vw, 1.5rem) clamp(0.75rem, 2vw, 1rem);
  min-height: var(--e2c-cover-min-height, clamp(220px, 36vh, 360px));
  display: flex;
  align-items: center;
  justify-content: center;
}

.e2c-page-hero[data-e2c-hero="blog"] {
  background-image: url("/assets/images/hero/blog.webp");
}
.e2c-page-hero[data-e2c-hero="os-nossos-servicos"] {
  background-image: url("/assets/images/hero/os-nossos-servicos.webp");
}
.e2c-page-hero[data-e2c-hero="sobre-nos"] {
  background-image: url("/assets/images/hero/sobre-nos.webp");
}
.e2c-page-hero[data-e2c-hero="servico-limpeza-domestica"] {
  background-image: url("/assets/images/hero/servico-limpeza-domestica.webp");
}
.e2c-page-hero[data-e2c-hero="servico-limpeza-de-condominios"] {
  background-image: url("/assets/images/hero/servico-limpeza-de-condominios.webp");
}
.e2c-page-hero[data-e2c-hero="servico-limpeza-de-escritorios"] {
  background-image: url("/assets/images/hero/servico-limpeza-de-escritorios.webp");
}
.e2c-page-hero[data-e2c-hero="servico-limpeza-de-vidros"] {
  background-image: url("/assets/images/hero/servico-limpeza-de-vidros.webp");
}
.e2c-page-hero[data-e2c-hero="servico-limpeza-especializada"] {
  background-image: url("/assets/images/hero/servico-limpeza-especializada.webp");
}
.e2c-page-hero[data-e2c-hero="servico-engomadoria"] {
  background-image: url("/assets/images/hero/servico-engomadoria.webp");
}

.e2c-page-blog .e2c-page-hero__overlay,
body.e2c-page-about .e2c-page-hero__overlay,
body.e2c-page-services .e2c-page-hero__overlay {
  position: absolute;
  inset: 0;
  background-color: rgba(0, 0, 0, 0.45);
  pointer-events: none;
}

.e2c-page-blog .e2c-page-hero__inner,
body.e2c-page-about .e2c-page-hero__inner,
body.e2c-page-services .e2c-page-hero__inner {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: var(--max-content);
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  justify-content: center;
}

.e2c-page-blog .e2c-page-hero__spacer,
body.e2c-page-about .e2c-page-hero__spacer,
body.e2c-page-services .e2c-page-hero__spacer {
  height: clamp(20px, 3vw, 36px);
  flex-shrink: 0;
}

.e2c-page-blog .e2c-page-hero__title,
body.e2c-page-about .e2c-page-hero__title,
body.e2c-page-services .e2c-page-hero__title {
  color: var(--c-white);
  font-family: var(--font-base);
  font-weight: 600;
  font-size: clamp(1.65rem, 4.2vw, 2.35rem);
  line-height: 1.15;
  margin: 0;
  letter-spacing: 0;
}

.e2c-page-blog .e2c-page-hero__subtitle,
body.e2c-page-about .e2c-page-hero__subtitle,
body.e2c-page-services .e2c-page-hero__subtitle {
  color: var(--c-white);
  font-family: var(--font-base);
  font-weight: 300;
  font-size: clamp(1rem, 2vw, 1.15rem);
  line-height: 1.5;
  max-width: 42rem;
  margin: 0.85rem 0 0;
  padding: 0 0.5rem;
}

/* Conteúdo logo abaixo do hero (mesma largura máx. que o blog) */
body.e2c-page-about .e2c-about-lead__inner {
  max-width: var(--max-content);
  margin: 0 auto;
  font-family: var(--font-base);
  color: var(--c-text);
}

body.e2c-page-about .e2c-about-lead__tagline {
  margin: 0 0 0.75rem;
  font-size: clamp(1.05rem, 2vw, 1.22rem);
  font-weight: 600;
  color: var(--c-brand-dark, #1c244b);
}

body.e2c-page-about .e2c-about-lead .e2c-about-tight {
  margin: 0;
}

body.e2c-page-about .e2c-about-lead__dek {
  margin: 0 0 1rem;
  font-size: clamp(0.95rem, 1.6vw, 1.05rem);
  line-height: 1.65;
  font-weight: 300;
  color: var(--c-text-muted);
  max-width: var(--max-prose);
}

/* Hero — conversão (kit: accent CTA + contacto) */
body.e2c-page-about .e2c-page-hero__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem 1.25rem;
  align-items: center;
  justify-content: center;
  margin-top: 1.35rem;
}

body.e2c-page-about .e2c-about-hero-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.62rem 1.4rem;
  background: var(--c-brand-mid);
  color: #fff;
  font-family: var(--font-base);
  font-weight: 600;
  font-size: 0.94rem;
  letter-spacing: 0.02em;
  border-radius: 999px;
  text-decoration: none;
  box-shadow: 0 2px 12px rgba(49, 179, 135, 0.35);
  transition: background var(--transition), transform 0.15s ease, box-shadow 0.15s ease;
}

body.e2c-page-about .e2c-about-hero-btn:hover,
body.e2c-page-about .e2c-about-hero-btn:focus-visible {
  background: var(--c-brand-hover);
  box-shadow: 0 4px 16px rgba(37, 153, 112, 0.4);
}

body.e2c-page-about .e2c-page-hero .e2c-about-hero-btn:focus-visible {
  outline: 2px solid #fff;
  outline-offset: 3px;
}

body.e2c-page-about .e2c-about-cta .e2c-about-hero-btn:focus-visible {
  outline: 2px solid var(--c-brand-mid);
  outline-offset: 3px;
}

body.e2c-page-about .e2c-about-hero-tel {
  font-family: var(--font-base);
  font-weight: 500;
  font-size: 0.92rem;
  color: rgba(255, 255, 255, 0.95);
  text-decoration: none;
  border-bottom: 1px solid rgba(255, 255, 255, 0.45);
  padding-bottom: 2px;
  transition: border-color 0.15s ease, color 0.15s ease;
}

body.e2c-page-about .e2c-about-hero-tel:hover,
body.e2c-page-about .e2c-about-hero-tel:focus-visible {
  color: #fff;
  border-bottom-color: #fff;
}

/* About story page — text-first layout (sem grelha de imagens stock) */
body.e2c-page-about .e2c-about-lead {
  background: #fff;
  border-bottom: 1px solid rgba(28, 36, 75, 0.08);
  padding: clamp(1.5rem, 3.5vw, 2.25rem) clamp(1rem, 2vw, 1.5rem);
}

body.e2c-page-about .e2c-about-body {
  background: #fff;
}

body.e2c-page-about .e2c-about-section {
  padding: clamp(1.35rem, 3vw, 2rem) clamp(1rem, 2vw, 1.5rem);
  max-width: var(--max-content);
  margin: 0 auto;
  box-sizing: border-box;
  border-bottom: 1px solid rgba(28, 36, 75, 0.06);
}

body.e2c-page-about .e2c-about-section:last-child {
  border-bottom: none;
}

body.e2c-page-about .e2c-about-section__title {
  font-family: var(--font-base);
  font-size: clamp(1.05rem, 2vw, 1.28rem);
  font-weight: 600;
  color: var(--c-brand-dark);
  margin: 0 0 0.75rem;
  line-height: 1.2;
}

body.e2c-page-about .e2c-about-section p {
  margin: 0 0 0.75rem;
  max-width: var(--max-prose);
  font-size: clamp(0.94rem, 1.55vw, 1.02rem);
  line-height: 1.65;
  font-weight: 300;
  color: var(--c-text-muted);
}

body.e2c-page-about .e2c-about-section p:last-child {
  margin-bottom: 0;
}

body.e2c-page-about .e2c-about-section .e2c-about-tight {
  margin-top: 0.65rem;
  padding-left: 0.15rem;
}

body.e2c-page-about .e2c-about-section .e2c-about-tight li {
  position: relative;
  padding-left: 1.1rem;
  margin-bottom: 0.4rem;
  color: var(--c-text-muted);
  font-weight: 300;
}

body.e2c-page-about .e2c-about-section .e2c-about-tight li::before {
  content: "–";
  position: absolute;
  left: 0;
  top: 0;
  color: var(--c-brand-mid);
  font-weight: 500;
}

body.e2c-page-about .e2c-about-lead .e2c-about-tight li {
  position: relative;
  padding-left: 1.1rem;
  margin-bottom: 0.35rem;
  color: var(--c-text-muted);
}

body.e2c-page-about .e2c-about-lead .e2c-about-tight li::before {
  content: "–";
  position: absolute;
  left: 0;
  top: 0;
  color: var(--c-brand-mid);
  font-weight: 500;
}

body.e2c-page-about .e2c-about-location {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(1.35rem, 3vw, 2.25rem);
  align-items: start;
}

@media (max-width: 768px) {
  body.e2c-page-about .e2c-about-location {
    grid-template-columns: 1fr;
  }

  body.e2c-page-about .e2c-about-location__map {
    order: 2;
  }

  body.e2c-page-about .e2c-about-location__text {
    order: 1;
  }
}

body.e2c-page-about .e2c-about-location__map {
  border-radius: var(--radius-md, 8px);
  overflow: hidden;
  border: 1px solid rgba(28, 36, 75, 0.1);
}

body.e2c-page-about .e2c-about-location__map iframe {
  width: 100%;
  height: 280px;
  border: 0;
  display: block;
}

body.e2c-page-about .e2c-about-location__map-fallback {
  margin: 0.5rem 0 0;
  text-align: center;
  font-size: 0.9rem;
}

body.e2c-page-about .e2c-about-location__map-fallback a {
  color: var(--c-brand-mid, #31b387);
  text-decoration: underline;
}

body.e2c-page-about .e2c-about-address {
  font-weight: 500;
  color: var(--c-brand-dark);
}

body.e2c-page-about .e2c-about-cta {
  padding: clamp(1.75rem, 3.5vw, 2.5rem) clamp(1rem, 2vw, 1.5rem);
  background: var(--c-secondary, #f3f5f8);
  border-top: 1px solid rgba(28, 36, 75, 0.08);
}

body.e2c-page-about .e2c-about-cta__inner {
  max-width: 28rem;
  margin: 0 auto;
  text-align: center;
  padding: 0;
}

body.e2c-page-about .e2c-about-cta__inner h2 {
  font-family: var(--font-base);
  font-size: clamp(1.15rem, 2.4vw, 1.4rem);
  font-weight: 600;
  color: var(--c-brand-dark);
  margin: 0 0 0.6rem;
  line-height: 1.25;
}

body.e2c-page-about .e2c-about-cta__inner > p:first-of-type {
  margin: 0 auto 1rem;
  max-width: 26rem;
  color: var(--c-text-muted);
  line-height: 1.6;
  font-weight: 300;
  font-size: clamp(0.92rem, 1.5vw, 1rem);
}

body.e2c-page-about .e2c-about-cta__inner .e2c-about-hero-btn {
  margin: 0.2rem auto 0;
  display: inline-flex;
}

body.e2c-page-about .e2c-about-cta__sub {
  margin: 0.85rem 0 0;
  font-size: 0.86rem;
  font-weight: 400;
  color: var(--c-text-muted);
}

body.e2c-page-about .e2c-about-cta__sub a {
  color: var(--c-brand-mid);
  font-weight: 500;
  text-decoration: none;
  border-bottom: 1px solid transparent;
  transition: border-color 0.15s ease, color 0.15s ease;
}

body.e2c-page-about .e2c-about-cta__sub a:hover,
body.e2c-page-about .e2c-about-cta__sub a:focus-visible {
  color: var(--c-brand-hover);
  border-bottom-color: rgba(49, 179, 135, 0.5);
}

body.e2c-page-about .e2c-trabalhe-strip--subtle {
  background: #fff;
  border-top: 1px solid rgba(28, 36, 75, 0.08);
}

body.e2c-page-about .e2c-trabalhe-strip--subtle p {
  color: var(--c-text-muted);
}

body.e2c-page-about .e2c-trabalhe-strip--subtle a {
  color: var(--c-brand-mid);
  font-weight: 600;
}

body.e2c-page-about .e2c-trabalhe-strip--subtle a:hover,
body.e2c-page-about .e2c-trabalhe-strip--subtle a:focus-visible {
  color: var(--c-brand-hover);
}

/* Sobre nós / About (PT post-26, EN post-2464) e páginas de serviço (detalhe): ritmo + content width.
   Exclui .e2c-services-faq: esse bloco vem do hub (os-nossos-servicos) e usa só e2c-hero + tokens. */
body.e2c-page-about .e2c-page-root > section.e2c-breaking-bad.e2c-section,
body.e2c-page-services:not(.e2c-page-services-hub) .e2c-page-root > section.e2c-breaking-bad.e2c-section:not(.e2c-services-faq) {
  padding-top: clamp(1.5rem, 3.5vw, 2.5rem);
  padding-bottom: clamp(1.5rem, 3.5vw, 2.5rem);
  box-sizing: border-box;
}

body.e2c-page-about .e2c-page-root > section.e2c-breaking-bad.e2c-section .e2c-container,
body.e2c-page-services:not(.e2c-page-services-hub) .e2c-page-root > section.e2c-breaking-bad.e2c-section:not(.e2c-services-faq) .e2c-container {
  max-width: var(--max-content);
  margin-left: auto;
  margin-right: auto;
  padding-left: clamp(12px, 3vw, 32px);
  padding-right: clamp(12px, 3vw, 32px);
  box-sizing: border-box;
}

body.e2c-page-about .e2c-widget--maps .e2c-widget-inner iframe {
  width: 100%;
  max-width: 100%;
  height: 300px;
  border: 0;
  display: block;
}

.e2c-page-blog .blog-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--spacing-lg);
  max-width: var(--max-content);
  margin: var(--spacing-xl) auto;
  padding: 0 var(--spacing-lg);
}

@media (max-width: 900px) {
  .e2c-page-blog .blog-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 600px) {
  .e2c-page-blog .blog-grid { grid-template-columns: 1fr; }
}

/* ── Filter bar ────────────────────────────────────────────── */
.blog-filter-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  justify-content: center;
  max-width: var(--max-content);
  margin: 1.75rem auto 0;
  padding: 0 var(--spacing-lg);
}

.blog-filter-btn {
  border: 1px solid var(--c-border, #ddd);
  background: #fff;
  color: var(--c-text, #333);
  font-size: 0.82rem;
  font-weight: 500;
  padding: 0.4rem 1rem;
  border-radius: 100px;
  cursor: pointer;
  transition: background 0.15s, color 0.15s, border-color 0.15s;
  font-family: inherit;
}

.blog-filter-btn:hover {
  background: var(--c-brand-mid, #31B387);
  color: #fff;
  border-color: var(--c-brand-mid, #31B387);
}

.blog-filter-btn.is-active {
  background: var(--c-brand-mid, #31B387);
  color: #fff;
  border-color: var(--c-brand-mid, #31B387);
}

/* ── Show more button ──────────────────────────────────────── */
.blog-show-more-wrap {
  text-align: center;
  margin: 2rem auto 3rem;
}

.blog-show-more-btn {
  display: inline-block;
  padding: 0.7rem 2.25rem;
  border: 2px solid var(--c-brand-mid, #31B387);
  border-radius: 8px;
  background: transparent;
  color: var(--c-brand-mid, #31B387);
  font-size: 0.92rem;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.2s, color 0.2s;
  font-family: inherit;
}

.blog-show-more-btn:hover {
  background: var(--c-brand-mid, #31B387);
  color: #fff;
}

.blog-show-more-btn[hidden] { display: none; }

.e2c-page-blog .post-card {
  border: 1px solid var(--c-border);
  border-radius: var(--radius-md);
  overflow: hidden;
  transition: box-shadow var(--transition);
}

.e2c-page-blog .post-card:hover {
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
}

.e2c-page-blog .post-card-link {
  display: block;
  text-decoration: none;
  color: inherit;
}

.e2c-page-blog .post-card img {
  width: 100%;
  height: 200px;
  object-fit: cover;
  display: block;
}

.e2c-page-blog .post-card-body {
  padding: 1.25rem;
}

.e2c-page-blog .post-category-badge,
.e2c-page-blog .post-category {
  display: inline-block;
  background: var(--c-brand-mid);
  color: var(--c-white);
  font-size: 0.72rem;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 0.25rem 0.7rem;
  border-radius: var(--radius-sm);
  margin-bottom: 0.4rem;
}

.e2c-page-blog .post-card-body h2 {
  font-size: 1.1rem;
  margin: 0;
  line-height: 1.35;
  color: var(--c-brand-dark);
}

.e2c-page-blog .post-card-body p {
  font-size: 1rem;
  font-weight: 300;
  color: var(--c-text);
  margin-bottom: 1rem;
}

.e2c-page-blog .post-meta {
  font-size: 0.78rem;
  color: var(--c-text-muted);
}

.e2c-page-blog .read-more {
  display: inline-block;
  margin-top: 0.75rem;
  font-size: 0.85rem;
  color: var(--c-brand-mid);
  font-weight: 600;
  transition: color var(--transition);
}

.e2c-page-blog .read-more:hover {
  text-decoration: underline;
  color: var(--c-brand-hover);
}
