/* =========================================================
   TechMoz — folha de estilos principal
   Tema claro e vívido: branco + azul-claro como base, com
   acentos de cor vivos por categoria. Sem fundos escuros.
   Tipografia: Space Grotesk (títulos) + IBM Plex Sans (corpo)
   ========================================================= */

:root {
  --bg: #FFFFFF;
  --surface: #F4FAFF;
  --surface-2: #EAF4FF;
  --border: #DCEBF7;
  --text: #142433;
  --text-muted: #5C7386;
  --blue: #1E9DF7;
  --blue-dark: #0B79D0;
  --blue-soft: #EAF6FF;
  --navy: #0E2A43;
  --coral: #FF6A3D;
  --max-width: 1120px;
  --radius: 10px;
  --font-display: "Space Grotesk", "Segoe UI", sans-serif;
  --font-body: "IBM Plex Sans", "Segoe UI", sans-serif;
  --shadow: 0 2px 10px rgba(20, 60, 100, 0.07);
  --shadow-lg: 0 12px 30px rgba(20, 60, 100, 0.10);
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 17px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; height: auto; display: block; }

a {
  color: var(--blue-dark);
  text-decoration: none;
}
a:hover { text-decoration: underline; }

:focus-visible {
  outline: 2px solid var(--blue);
  outline-offset: 3px;
}

h1, h2, h3, h4 {
  font-family: var(--font-display);
  font-weight: 600;
  line-height: 1.15;
  margin: 0 0 0.5em;
  letter-spacing: -0.01em;
  color: var(--navy);
}

.wrap {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 24px;
}

/* ---------- Cabeçalho ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  background: rgba(255, 255, 255, 0.9);
  backdrop-filter: saturate(140%) blur(6px);
  border-bottom: 1px solid var(--border);
}

.site-header .wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 68px;
}

.logo {
  font-family: var(--font-display);
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--navy);
}
.logo span { color: var(--blue); }
.logo:hover { text-decoration: none; }

.main-nav ul {
  display: flex;
  gap: 28px;
  list-style: none;
  margin: 0;
  padding: 0;
}
.main-nav a {
  color: var(--text-muted);
  font-size: 0.95rem;
  font-weight: 500;
}
.main-nav a:hover, .main-nav a.active {
  color: var(--blue-dark);
  text-decoration: none;
}

.nav-toggle {
  display: none;
  background: var(--surface);
  border: 1px solid var(--border);
  color: var(--navy);
  border-radius: var(--radius);
  padding: 8px 10px;
  font-size: 1rem;
}

.main-nav.nav-open {
  display: block;
  position: absolute;
  top: 68px;
  left: 0;
  right: 0;
  background: #fff;
  box-shadow: var(--shadow-lg);
  border-bottom: 1px solid var(--border);
  padding: 18px 24px 22px;
}
.main-nav.nav-open ul { flex-direction: column; gap: 16px; }

/* ---------- Divisor com padrão inspirado em capulana ---------- */
.capulana-divider {
  height: 8px;
  background-image:
    linear-gradient(135deg, var(--coral) 25%, transparent 25%, transparent 50%, var(--blue) 50%, var(--blue) 75%, transparent 75%);
  background-size: 20px 20px;
  opacity: 0.5;
}

/* ---------- Hero (só na página inicial) ---------- */
.hero {
  padding: 60px 0 40px;
  background: linear-gradient(180deg, var(--surface-2) 0%, var(--bg) 100%);
}
.hero-grid {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 48px;
  align-items: start;
}
.hero h1 {
  font-size: clamp(2.1rem, 4vw, 3.2rem);
  max-width: 14ch;
}
.hero p.lede {
  color: var(--text-muted);
  font-size: 1.15rem;
  max-width: 42ch;
  margin-bottom: 1.5em;
}
.hero .btn { margin-right: 12px; }

.hero-side {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px 28px;
  box-shadow: var(--shadow);
}
.hero-side h2 {
  font-size: 0.85rem;
  color: var(--text-muted);
  font-weight: 500;
  margin-bottom: 18px;
  text-transform: none;
}
.hero-side .mini-post + .mini-post {
  border-top: 1px solid var(--border);
  padding-top: 14px;
  margin-top: 14px;
}
.hero-side .mini-post a {
  color: var(--navy);
  font-family: var(--font-display);
  font-size: 1.02rem;
  display: block;
  margin-bottom: 4px;
}
.hero-side .mini-post a:hover { color: var(--blue-dark); }
.hero-side .mini-post .meta { font-size: 0.82rem; color: var(--text-muted); }

.btn {
  display: inline-block;
  background: var(--blue);
  color: #fff;
  font-weight: 600;
  padding: 12px 22px;
  border-radius: var(--radius);
  box-shadow: 0 4px 14px rgba(30, 157, 247, 0.3);
}
.btn:hover { background: var(--blue-dark); text-decoration: none; }
.btn-outline {
  background: #fff;
  border: 1px solid var(--border);
  color: var(--navy);
  box-shadow: none;
}
.btn-outline:hover { border-color: var(--blue); color: var(--blue-dark); }

/* ---------- Pílulas de categorias (cada uma na cor da categoria) ---------- */
.category-rail {
  padding: 40px 0 8px;
}
.category-rail h2 {
  font-size: 1rem;
  color: var(--text-muted);
  font-weight: 500;
  margin-bottom: 16px;
}
.pill-row {
  display: flex;
  gap: 10px;
  overflow-x: auto;
  padding-bottom: 8px;
  scrollbar-width: thin;
}
.pill {
  flex: 0 0 auto;
  background: #fff;
  border: 1.5px solid currentColor;
  padding: 8px 16px;
  border-radius: 999px;
  font-size: 0.88rem;
  font-weight: 600;
  white-space: nowrap;
}
.pill:hover { filter: brightness(0.92); text-decoration: none; }

/* ---------- Lista editorial de artigos ---------- */
.post-list {
  padding: 24px 0 60px;
}
.post-row {
  display: grid;
  grid-template-columns: 220px 1fr;
  gap: 24px;
  padding: 22px;
  margin-bottom: 20px;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}
.post-row .thumb {
  border-radius: 8px;
  overflow: hidden;
  aspect-ratio: 4/3;
  background: var(--surface);
}
.post-row .thumb img { width: 100%; height: 100%; object-fit: cover; }
.post-row .cat-tag {
  display: inline-block;
  font-size: 0.78rem;
  font-weight: 700;
  margin-bottom: 8px;
}
.post-row h3 {
  font-size: 1.35rem;
  margin-bottom: 6px;
}
.post-row h3 a { color: var(--navy); }
.post-row h3 a:hover { color: var(--blue-dark); }
.post-row p.excerpt {
  color: var(--text-muted);
  margin: 0 0 8px;
  max-width: 68ch;
}
.post-row .meta {
  font-size: 0.82rem;
  color: var(--text-muted);
}

/* ---------- Página de artigo ---------- */
.post-header { padding: 48px 0 12px; background: var(--surface-2); }
.post-header .wrap { padding-bottom: 28px; }
.post-header .cat-tag {
  font-weight: 700;
  font-size: 0.85rem;
}
.post-header h1 {
  font-size: clamp(1.9rem, 4vw, 2.6rem);
  max-width: 26ch;
  margin-top: 10px;
}
.post-header .meta {
  color: var(--text-muted);
  font-size: 0.9rem;
  margin-top: 10px;
}
.post-cover {
  border-radius: var(--radius);
  overflow: hidden;
  margin: -36px 0 8px;
  box-shadow: var(--shadow-lg);
  border: 1px solid var(--border);
  aspect-ratio: 21/9;
}
.post-cover img { width: 100%; height: 100%; object-fit: cover; }
.post-body {
  max-width: 72ch;
  padding: 8px 0 40px;
  font-size: 1.08rem;
}
.post-body h2 { font-size: 1.5rem; margin-top: 1.6em; }
.post-body h3 { font-size: 1.2rem; margin-top: 1.4em; }
.post-body p { margin: 0 0 1.2em; }
.post-body ul, .post-body ol { margin: 0 0 1.2em; padding-left: 1.3em; }
.post-body li { margin-bottom: 0.5em; }
.post-body blockquote {
  border-left: 3px solid var(--blue);
  background: var(--surface);
  border-radius: 0 8px 8px 0;
  margin: 1.6em 0;
  padding: 10px 18px;
  color: var(--text-muted);
  font-style: italic;
}
.post-body strong { color: var(--navy); }

.tag-row { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 24px; }
.tag-row span {
  background: var(--surface);
  border: 1px solid var(--border);
  color: var(--text-muted);
  font-size: 0.78rem;
  padding: 4px 10px;
  border-radius: 999px;
}

.related { padding: 20px 0 60px; border-top: 1px solid var(--border); margin-top: 20px; }
.related h2 { font-size: 1.1rem; color: var(--text-muted); font-weight: 500; margin-bottom: 18px; }

/* ---------- Espaço de anúncio (AdSense, quando aprovado) ----------
   Substitui o conteúdo destas divs pelo bloco <script>/<ins> do AdSense.
   Mantém a etiqueta "Publicidade" para transparência com o leitor. */
.ad-slot {
  background: var(--surface);
  border: 1px dashed var(--border);
  border-radius: var(--radius);
  color: var(--text-muted);
  font-size: 0.78rem;
  text-align: center;
  padding: 18px;
  margin: 28px 0;
}
.ad-slot span { display: block; margin-bottom: 6px; letter-spacing: 0.02em; }

/* ---------- Páginas simples (Sobre, Privacidade, Contacto) ---------- */
.simple-page { padding: 56px 0 60px; max-width: 72ch; }
.simple-page h1 { margin-bottom: 0.6em; }
.simple-page p { margin-bottom: 1.2em; color: var(--text-muted); }
.simple-page a { color: var(--blue-dark); }

/* ---------- Rodapé (claro, igual ao resto do site) ---------- */
.site-footer {
  background: var(--surface-2);
  border-top: 1px solid var(--border);
  color: var(--text-muted);
  padding: 44px 0 28px;
  margin-top: 20px;
}
.footer-grid {
  display: grid;
  grid-template-columns: 1.2fr 1fr 1fr;
  gap: 32px;
}
.footer-grid h4 {
  font-size: 0.85rem;
  color: var(--blue-dark);
  font-weight: 600;
  margin-bottom: 12px;
}
.footer-grid ul { list-style: none; margin: 0; padding: 0; }
.footer-grid li { margin-bottom: 8px; }
.footer-grid a { color: var(--text-muted); font-size: 0.92rem; }
.footer-grid a:hover { color: var(--blue-dark); }
.footer-about .logo { color: var(--navy); }
.footer-about .logo span { color: var(--blue); }
.footer-about p { color: var(--text-muted); font-size: 0.92rem; max-width: 42ch; }
.footer-bottom {
  margin-top: 32px;
  padding-top: 20px;
  border-top: 1px solid var(--border);
  color: var(--text-muted);
  font-size: 0.8rem;
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 8px;
}

/* ---------- Responsivo ---------- */
@media (max-width: 800px) {
  .hero-grid { grid-template-columns: 1fr; }
  .post-row { grid-template-columns: 1fr; }
  .post-row .thumb { aspect-ratio: 16/9; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .main-nav { display: none; }
  .nav-toggle { display: inline-block; }
}

@media (max-width: 480px) {
  .footer-grid { grid-template-columns: 1fr; }
}

@media (prefers-reduced-motion: reduce) {
  * { scroll-behavior: auto !important; transition: none !important; animation: none !important; }
}
