/* Blog da Advocacia - estilos base */
:root {
  --bg: #f7f9fb;
  --text: #15202b;
  --muted: #4b5563;
  --brand: #0e3a59;
  --brand-2: #0f5e7e;
  --card: #ffffff;
  --border: #e5e7eb;
  --success: #059669;
  --warning: #d97706;
}

* {
  box-sizing: border-box;
}
html,
body {
  height: 100%;
}
body {
  margin: 0;
  font-family: system-ui, -apple-system, Segoe UI, Roboto, Ubuntu, Cantarell,
    Noto Sans, Helvetica Neue, Arial, "Apple Color Emoji", "Segoe UI Emoji";
  background: var(--bg);
  color: var(--text);
  line-height: 1.55;
}

.container {
  width: 100%;
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 16px;
}

/* Header */
.site-header {
  background: var(--card);
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 50;
}
.header-wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 64px;
}
.brand {
  display: flex;
  align-items: center;
  gap: 6px;
  text-decoration: none;
}
.brand-logo {
  font-size: 24px;
}
.brand-logo-img {
  width: 40px;
  height: 40px;
  display: block;
  object-fit: contain;
}
.brand-name {
  font-weight: 700;
  color: var(--brand);
  font-size: 20px;
}

.menu-toggle {
  display: none;
  background: transparent;
  border: none;
  width: 42px;
  height: 42px;
}
.menu-icon,
.menu-icon::before,
.menu-icon::after {
  content: "";
  display: block;
  height: 2px;
  width: 22px;
  background: var(--text);
  position: relative;
}
.menu-icon::before {
  top: -6px;
  position: relative;
}
.menu-icon::after {
  top: 4px;
  position: relative;
}

.site-nav ul {
  list-style: none;
  display: flex;
  gap: 18px;
  margin: 0;
  padding: 0;
}
.site-nav a {
  text-decoration: none;
  color: var(--text);
  font-weight: 600;
}
.site-nav a:hover {
  color: var(--brand-2);
}

/* Hero */
.hero {
  padding: 40px 0 16px;
}
.hero h1 {
  margin: 0 0 8px;
  font-size: 28px;
  color: var(--brand);
}
.hero p {
  margin: 0;
  color: var(--muted);
}

/* Cards grid */
.grid {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  gap: 16px;
  margin: 24px 0 40px;
}
.card {
  grid-column: span 12;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 18px;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.03);
}
.card-app .app-head {
  display: flex;
  align-items: center;
  gap: 12px;
}
.app-icon {
  width: 40px;
  height: 40px;
  border-radius: 10px;
  display: inline-block;
  object-fit: contain;
  background: #eef6fb;
  padding: 6px;
}
.app-icon-fallback {
  font-size: 28px;
  line-height: 40px;
  text-align: center;
  background: #eef6fb;
  width: 40px;
  height: 40px;
  border-radius: 10px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.card h2 {
  margin-top: 0;
  color: var(--brand);
  font-size: 20px;
}
.card p {
  color: var(--muted);
}
.card .actions {
  margin-top: 12px;
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

/* Forms */
label {
  display: block;
  font-weight: 600;
  margin: 8px 0 6px;
}
input,
select {
  width: 100%;
  padding: 10px 12px;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: #fff;
}
.result {
  background: #f3faf7;
  border: 1px solid #def7ec;
  color: #03543f;
  border-radius: 8px;
  padding: 12px;
  margin-top: 8px;
  font-weight: 700;
}
.note {
  font-size: 14px;
  color: var(--muted);
  margin-top: 6px;
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--brand);
  color: #fff;
  text-decoration: none;
  border: none;
  border-radius: 8px;
  padding: 10px 14px;
  font-weight: 700;
  cursor: pointer;
}
.btn.secondary {
  background: var(--brand-2);
}
.btn.ghost {
  background: transparent;
  color: var(--brand);
  border: 1px solid var(--brand);
}
.btn:hover {
  opacity: 0.92;
}

/* Footer */
.site-footer {
  background: var(--card);
  border-top: 1px solid var(--border);
  margin-top: 40px;
}
.footer-wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 16px 0;
  flex-wrap: wrap;
}
.footer-nav ul {
  list-style: none;
  display: flex;
  gap: 16px;
  margin: 0;
  padding: 0;
  flex-wrap: wrap;
}
.footer-nav a {
  text-decoration: none;
  color: var(--muted);
}
.copy {
  color: var(--muted);
  margin: 0;
}

/* Espaçamento entre cards de seção (fora da grid de apps) */
.site-main .card:not(.card-app) + .card:not(.card-app) { margin-top: 40px; }

/* Responsive */
@media (max-width: 900px) {
  .card {
    grid-column: span 12;
  }
}
@media (min-width: 700px) {
  .card.half {
    grid-column: span 6;
  }
}
@media (min-width: 960px) {
  .card.third {
    grid-column: span 4;
  }
}
@media (max-width: 760px) {
  .menu-toggle {
    display: inline-block;
  }
  /* Overlay de menu mobile full-screen */
  .site-nav {
    position: fixed;
    inset: 0;
    background: rgba(14, 58, 89, 0.85);
    backdrop-filter: blur(2px);
    display: none;
    z-index: 9999;
  }
  .site-nav.open {
    display: flex;
  }
  .site-nav ul {
    flex-direction: column;
    gap: 12px;
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 20px;
    margin: 80px 16px 16px auto;
    width: 86%;
    max-width: 340px;
    box-shadow: 0 10px 24px rgba(0, 0, 0, 0.2);
  }
  .site-nav a {
    font-size: 18px;
  }
}

/* Bloqueio de scroll quando menu está aberto */
.menu-open {
  overflow: hidden;
}

@media (max-width: 640px) {
  .footer-wrap {
    flex-direction: column;
    align-items: center;
    gap: 8px;
    text-align: center;
  }
  .footer-nav ul {
    gap: 12px 16px;
    justify-content: center;
  }
}
