/* Estudos Jurídicos — tema principal */

:root {
  --ej-ink: #16121f;
  --ej-ink-soft: #2a2438;
  --ej-paper: #f6f3ee;
  --ej-paper-2: #efe9df;
  --ej-card: #fffcf8;
  --ej-line: #ddd4c6;
  --ej-muted: #6b645c;
  --ej-text: #2c2833;
  --ej-accent: #9b3b32;
  --ej-accent-hover: #7c2d26;
  --ej-gold: #c4a574;
  --ej-gold-dim: #a88958;
  --ej-header: var(--ej-ink);
  --ej-nav: #100e16;
  --font-display: "Cormorant Garamond", "Times New Roman", serif;
  --font-script: "Great Vibes", cursive;
  --font-serif: "Source Serif 4", "Georgia", serif;
  --font-sans: "Source Sans 3", "Segoe UI", sans-serif;
  --wrap: 1180px;
  --radius: 14px;
  --shadow: 0 18px 40px rgba(22, 18, 31, 0.08);
}

*,
*::before,
*::after { box-sizing: border-box; }

html { scroll-behavior: smooth; }

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

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

a {
  color: var(--ej-accent);
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
}

a:hover { color: var(--ej-accent-hover); }

h1, h2, h3, h4, .site-title, .hero-title, .article-title, .card-title, .section-title, .page-title {
  font-family: var(--font-display);
  font-weight: 600;
  letter-spacing: -0.01em;
  color: var(--ej-ink);
  line-height: 1.2;
}

.wrap {
  width: min(calc(100% - 40px), var(--wrap));
  margin-inline: auto;
}

.screen-reader-text {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.skip-link:focus {
  position: fixed;
  left: 16px;
  top: 16px;
  z-index: 10000;
  width: auto;
  height: auto;
  margin: 0;
  clip: auto;
  padding: 10px 14px;
  background: #fff;
  color: var(--ej-ink);
}

/* Topbar */
.site-topbar {
  background: var(--ej-nav);
  color: #d8d1c4;
  font-size: 12px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.topbar-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 38px;
  gap: 16px;
}

.topbar-text { margin: 0; }

.topbar-actions {
  display: flex;
  align-items: center;
  gap: 18px;
}

.topbar-actions a,
.topbar-social {
  color: #d8d1c4;
  text-decoration: none;
}

.topbar-actions a:hover { color: var(--ej-gold); }

.secondary-menu {
  display: flex;
  gap: 16px;
  list-style: none;
  margin: 0;
  padding: 0;
}

/* Header */
.site-header {
  background: var(--ej-header);
  color: #f4efe6;
  padding: 28px 0 0;
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  padding-bottom: 22px;
}

.site-branding { text-align: center; }

.site-title {
  margin: 0;
  font-family: var(--font-script);
  font-weight: 400;
  font-size: clamp(2.4rem, 5vw, 3.6rem);
  line-height: 1.1;
}

.site-title a {
  color: #f7f1e8;
  text-decoration: none;
}

.custom-logo-link img {
  margin: 0 auto;
  max-height: 72px;
  width: auto;
}

.site-description {
  margin: 8px 0 0;
  color: #cbbfae;
  font-family: var(--font-serif);
  font-style: italic;
  font-size: 0.98rem;
  letter-spacing: 0.01em;
}

.menu-toggle {
  display: none;
  position: absolute;
  right: 0;
  top: 8px;
  background: transparent;
  border: 1px solid rgba(255,255,255,.18);
  color: #fff;
  border-radius: 999px;
  padding: 8px 12px;
  align-items: center;
  gap: 8px;
  font-family: var(--font-sans);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  font-size: 11px;
  cursor: pointer;
}

.menu-toggle-bars {
  display: flex;
  flex-direction: column;
  gap: 3px;
  width: 16px;
}

.menu-toggle-bars span {
  display: block;
  height: 1.5px;
  background: #fff;
}

/* Navigation */
.main-navigation {
  background: color-mix(in srgb, var(--ej-header) 88%, #000);
  border-top: 1px solid rgba(196, 165, 116, 0.18);
}

.nav-inner {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0;
  position: relative;
  flex-wrap: wrap;
}

.primary-menu {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 4px 0;
  list-style: none;
  margin: 0;
  padding: 0;
}

.primary-menu > .menu-item > a {
  display: block;
  padding: 16px 18px;
  color: #e8e0d4;
  text-decoration: none;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.primary-menu > .menu-item > a:hover,
.primary-menu > .current-menu-item > a,
.primary-menu > .current-menu-ancestor > a {
  color: var(--ej-gold);
}

.primary-menu .menu-item-has-children { position: relative; }

.primary-menu .sub-menu {
  position: absolute;
  left: 50%;
  top: calc(100% - 4px);
  transform: translateX(-50%);
  min-width: 240px;
  background: #fff;
  color: var(--ej-ink);
  list-style: none;
  margin: 0;
  padding: 10px 0;
  border-radius: 12px;
  box-shadow: var(--shadow);
  border: 1px solid var(--ej-line);
  opacity: 0;
  visibility: hidden;
  translate: 0 8px;
  transition: .2s ease;
  z-index: 30;
}

.primary-menu .menu-item-has-children:hover > .sub-menu,
.primary-menu .menu-item-has-children:focus-within > .sub-menu {
  opacity: 1;
  visibility: visible;
  translate: 0 0;
}

.primary-menu .sub-menu a {
  display: block;
  padding: 10px 18px;
  color: var(--ej-ink);
  text-decoration: none;
  font-size: 15px;
  letter-spacing: 0;
  text-transform: none;
}

.primary-menu .sub-menu a:hover { background: var(--ej-paper-2); color: var(--ej-accent); }

.submenu-toggle { display: none; }

.search-toggle {
  background: transparent;
  border: 0;
  color: #e8e0d4;
  cursor: pointer;
  padding: 10px;
}

.search-icon {
  display: block;
  width: 16px;
  height: 16px;
  border: 1.6px solid currentColor;
  border-radius: 50%;
  position: relative;
}

.search-icon::after {
  content: "";
  position: absolute;
  width: 7px;
  height: 1.6px;
  background: currentColor;
  right: -5px;
  bottom: -1px;
  transform: rotate(42deg);
}

.search-toggle--nav { position: absolute; right: 0; }

.site-search {
  background: #fff;
  border-bottom: 1px solid var(--ej-line);
  padding: 18px 0;
}

.site-search .wrap {
  display: flex;
  gap: 12px;
  align-items: center;
}

.search-form {
  display: flex;
  gap: 8px;
  flex: 1;
}

.search-form label { flex: 1; }

.search-field,
.ej-newsletter-form input[type="email"],
.comment-form input,
.comment-form textarea {
  width: 100%;
  border: 1px solid var(--ej-line);
  background: #fff;
  padding: 12px 14px;
  font: inherit;
  border-radius: 10px;
  color: var(--ej-ink);
}

.search-submit,
.btn,
.ej-newsletter-form button,
.comment-form .submit {
  appearance: none;
  border: 0;
  background: var(--ej-ink);
  color: #fff;
  font-family: var(--font-sans);
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  font-size: 12px;
  padding: 13px 18px;
  border-radius: 10px;
  cursor: pointer;
  text-decoration: none;
  display: inline-block;
}

.btn-accent,
.ej-newsletter-form button {
  background: var(--ej-accent);
  color: #fff;
}

.btn-accent:hover,
.ej-newsletter-form button:hover { background: var(--ej-accent-hover); color: #fff; }

.search-close {
  background: transparent;
  border: 0;
  color: var(--ej-muted);
  cursor: pointer;
}

/* Hero */
.hero {
  padding: 48px 0 20px;
}

.hero-grid {
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  gap: 48px;
  align-items: center;
}

.hero-title {
  font-size: clamp(2.1rem, 4.4vw, 3.35rem);
  margin: 8px 0 16px;
}

.hero-title a { color: inherit; text-decoration: none; }

.hero-excerpt {
  font-family: var(--font-serif);
  font-size: 1.12rem;
  color: #4a4450;
  max-width: 38em;
}

.hero-meta { margin: 14px 0 22px; color: var(--ej-muted); font-size: 0.92rem; }

.hero-media img,
.hero-placeholder {
  width: 100%;
  height: 420px;
  object-fit: cover;
  border-radius: 18px;
  box-shadow: var(--shadow);
}

.hero-placeholder {
  background:
    linear-gradient(160deg, #2a2438, #16121f);
}

.ej-kicker {
  margin: 0 0 8px;
  color: var(--ej-gold-dim);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.2em;
  text-transform: uppercase;
}

.cat-links { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 8px; }

.cat-pill {
  display: inline-block;
  text-decoration: none;
  color: var(--ej-accent);
  background: color-mix(in srgb, var(--ej-accent) 8%, #fff);
  border: 1px solid color-mix(in srgb, var(--ej-accent) 18%, #fff);
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 4px 9px;
  border-radius: 999px;
  font-weight: 600;
}

/* Category explorer */
.category-explorer {
  margin: 10px 0 36px;
  padding: 22px 0 6px;
  border-top: 1px solid var(--ej-line);
}

.explorer-label {
  margin: 0 0 12px;
  font-size: 11px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--ej-muted);
  font-weight: 700;
}

.explorer-list {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  list-style: none;
  margin: 0;
  padding: 0;
}

.explorer-list a {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: var(--ej-ink);
  background: var(--ej-card);
  border: 1px solid var(--ej-line);
  padding: 8px 12px 8px 14px;
  border-radius: 999px;
  font-size: 14px;
}

.explorer-list a:hover { border-color: var(--ej-gold); }

.explorer-count {
  min-width: 22px;
  text-align: center;
  font-size: 11px;
  color: var(--ej-muted);
  background: var(--ej-paper-2);
  border-radius: 999px;
  padding: 2px 7px;
}

/* Grids */
.latest-section,
.category-strip { padding: 10px 0 40px; }

.section-header { margin-bottom: 22px; }

.section-header--row {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 16px;
}

.section-title {
  margin: 0;
  font-size: 2rem;
}

.section-more {
  text-decoration: none;
  font-size: 13px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  font-weight: 600;
}

.posts-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 22px;
}

.posts-grid--3 { grid-template-columns: repeat(3, 1fr); }

.post-card {
  background: var(--ej-card);
  border: 1px solid var(--ej-line);
  border-radius: var(--radius);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  min-height: 100%;
  box-shadow: 0 1px 0 rgba(22,18,31,.02);
}

.post-card:hover { border-color: color-mix(in srgb, var(--ej-gold) 50%, var(--ej-line)); }

.card-media img,
.card-media--empty {
  width: 100%;
  height: 210px;
  object-fit: cover;
}

.card-media--empty {
  background:
    linear-gradient(180deg, #ece4d6, #d8cbb8);
}

.card-body {
  padding: 18px 18px 16px;
  display: flex;
  flex-direction: column;
  flex: 1;
}

.card-title {
  margin: 0 0 8px;
  font-size: 1.45rem;
}

.card-title a { color: inherit; text-decoration: none; }

.card-title a:hover { color: var(--ej-accent); }

.card-excerpt {
  color: #534d57;
  font-size: 0.96rem;
  flex: 1;
}

.card-excerpt p { margin: 0 0 12px; }

.card-meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
  color: var(--ej-muted);
  font-size: 0.84rem;
  margin-top: 8px;
}

.card-more {
  text-decoration: none;
  font-weight: 600;
  letter-spacing: 0.02em;
}

/* Article */
.article-wrap { width: min(calc(100% - 40px), 780px); padding: 48px 0 64px; }

.article-title {
  font-size: clamp(2.1rem, 4vw, 3.1rem);
  margin: 6px 0 14px;
}

.article-meta {
  display: flex;
  gap: 16px;
  color: var(--ej-muted);
  font-size: 0.92rem;
  margin-bottom: 24px;
}

.article-hero { margin: 0 0 28px; }

.article-hero img {
  width: 100%;
  border-radius: 16px;
  max-height: 460px;
  object-fit: cover;
}

.entry-content {
  font-family: var(--font-serif);
  font-size: 1.125rem;
  line-height: 1.8;
}

.entry-content p { margin: 0 0 1.15em; }

.entry-content h2,
.entry-content h3 {
  margin: 1.6em 0 0.6em;
}

.entry-content blockquote {
  margin: 1.6em 0;
  padding: 4px 0 4px 22px;
  border-left: 2px solid var(--ej-gold);
  color: #3d3844;
  font-style: italic;
}

.article-footer { margin-top: 36px; padding-top: 20px; border-top: 1px solid var(--ej-line); }

.tag-links a {
  display: inline-block;
  margin: 0 8px 8px 0;
  text-decoration: none;
  color: var(--ej-ink);
  border-bottom: 1px solid var(--ej-gold);
}

.tags-label {
  display: block;
  margin-bottom: 8px;
  font-size: 11px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--ej-muted);
}

.post-navigation {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  margin: 40px 0;
}

.post-navigation .nav-previous,
.post-navigation .nav-next {
  background: var(--ej-card);
  border: 1px solid var(--ej-line);
  border-radius: 12px;
  padding: 16px;
}

.post-navigation .nav-next { text-align: right; }

.nav-label {
  display: block;
  font-size: 11px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ej-muted);
  margin-bottom: 6px;
}

.post-navigation a { text-decoration: none; color: var(--ej-ink); }

.related-posts { margin: 20px 0 40px; }

.page-header { padding: 36px 0 18px; }

.page-title { margin: 0 0 8px; font-size: clamp(2rem, 4vw, 2.8rem); }

.archive-description { color: var(--ej-muted); max-width: 42em; }

.home-pagination,
.navigation.pagination {
  margin: 32px 0 10px;
  display: flex;
  justify-content: center;
}

.nav-links,
.home-pagination {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  justify-content: center;
}

.page-numbers,
.nav-links a,
.home-pagination a,
.home-pagination span {
  min-width: 40px;
  text-align: center;
  padding: 8px 12px;
  border: 1px solid var(--ej-line);
  border-radius: 8px;
  text-decoration: none;
  color: var(--ej-ink);
  background: var(--ej-card);
}

.page-numbers.current { background: var(--ej-ink); color: #fff; border-color: var(--ej-ink); }

/* Newsletter */
.ej-newsletter {
  background:
    linear-gradient(180deg, #1b1624 0%, #120e18 100%);
  color: #f3ece2;
  border-radius: 20px;
  padding: 42px 40px;
  margin: 20px 0 48px;
  position: relative;
  overflow: hidden;
}

.ej-newsletter::before {
  content: "";
  position: absolute;
  inset: auto -40px -60px auto;
  width: 220px;
  height: 220px;
  border: 1px solid rgba(196,165,116,.25);
  border-radius: 50%;
}

.ej-newsletter__inner {
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  gap: 32px;
  align-items: center;
  position: relative;
}

.ej-newsletter .ej-kicker { color: var(--ej-gold); }

.ej-newsletter__title {
  color: #f7f1e8;
  font-size: clamp(1.8rem, 3vw, 2.4rem);
  margin: 0 0 10px;
}

.ej-newsletter__text {
  margin: 0;
  color: #d2c8b8;
  font-family: var(--font-serif);
  font-size: 1.05rem;
}

.ej-newsletter-form {
  display: flex;
  gap: 8px;
}

.ej-newsletter-form--jetpack,
.ej-newsletter-form--jetpack .wp-block-jetpack-subscriptions,
.ej-newsletter-form--jetpack form {
  width: 100%;
}

.ej-newsletter-form--jetpack #subscribe-email,
.ej-newsletter-form--jetpack .subscribe-email,
.ej-newsletter-form--jetpack input[type="email"] {
  width: 100%;
  border: 1px solid var(--ej-line);
  background: rgba(255,255,255,.96);
  padding: 12px 14px;
  font: inherit;
  border-radius: 10px;
  color: var(--ej-ink);
}

.ej-newsletter-form--jetpack #subscribe-submit,
.ej-newsletter-form--jetpack button[type="submit"],
.ej-newsletter-form--jetpack input[type="submit"] {
  appearance: none;
  border: 0;
  background: var(--ej-accent);
  color: #fff;
  font-family: var(--font-sans);
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  font-size: 12px;
  padding: 13px 18px;
  border-radius: 10px;
  cursor: pointer;
}

.ej-newsletter-form--jetpack .jetpack-subscribe-form,
.ej-newsletter-form--jetpack form#subscribe-blog {
  display: flex;
  gap: 8px;
  align-items: stretch;
  flex-wrap: wrap;
}

.ej-newsletter-form input[type="email"] {
  flex: 1;
  background: rgba(255,255,255,.96);
}

.ej-newsletter__note {
  margin: 10px 0 0;
  font-size: 12px;
  color: #b7ad9e;
}

.ej-newsletter__feedback {
  margin: 8px 0 0;
  font-size: 13px;
  min-height: 1.2em;
}

.ej-newsletter__feedback.is-ok { color: #c9e0b8; }
.ej-newsletter__feedback.is-err { color: #f0b4ad; }

.ej-newsletter--footer {
  border-radius: 0;
  margin: 0;
}

.ej-newsletter--footer .ej-newsletter__inner,
.ej-newsletter--single .ej-newsletter__inner {
  width: min(calc(100% - 40px), var(--wrap));
  margin-inline: auto;
}

.ej-newsletter--single {
  margin: 36px 0;
  padding: 32px 28px;
}

.ej-newsletter--footer::before { display: none; }

/* Footer */
.site-footer {
  background: #100e16;
  color: #d5ccbf;
  padding-top: 48px;
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.3fr 1fr 1fr 1fr;
  gap: 32px;
  padding-bottom: 36px;
}

.footer-title {
  font-family: var(--font-script);
  font-size: 2rem;
  color: #f4eee4;
  margin: 0 0 8px;
}

.footer-tagline {
  font-family: var(--font-serif);
  font-style: italic;
  color: #b7ad9e;
  margin: 0 0 16px;
}

.footer-menu,
.footer-col ul {
  list-style: none;
  margin: 0;
  padding: 0;
}

.footer-menu a,
.footer-col a {
  color: #d5ccbf;
  text-decoration: none;
  display: inline-block;
  padding: 4px 0;
}

.footer-menu a:hover,
.footer-col a:hover { color: var(--ej-gold); }

.widget-title {
  color: #f4eee4;
  font-size: 1.15rem;
  margin: 0 0 12px;
}

.site-info {
  border-top: 1px solid rgba(255,255,255,.08);
  padding: 16px 0;
  font-size: 13px;
  color: #9d9487;
}

.site-info-inner {
  display: flex;
  justify-content: space-between;
  gap: 12px;
}

.site-info p { margin: 0; }

/* Comments */
.comments-area { margin-top: 48px; padding-top: 24px; border-top: 1px solid var(--ej-line); }

.comment-list { list-style: none; margin: 0; padding: 0; }

.comment { margin-bottom: 22px; }

.comment-form label { display: block; margin-bottom: 6px; font-size: 14px; }

.comment-form p { margin: 0 0 14px; }

/* Sticky Assinar floating button lookalike — not needed; keep clean */

/* Responsive */
@media (max-width: 980px) {
  .hero-grid,
  .ej-newsletter__inner,
  .footer-grid,
  .posts-grid,
  .posts-grid--3 {
    grid-template-columns: 1fr 1fr;
  }

  .hero-media img,
  .hero-placeholder { height: 320px; }

  .footer-grid { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 760px) {
  .menu-toggle { display: flex; }

  .search-toggle--nav { display: none; }

  .main-navigation {
    display: none;
    padding: 8px 0 20px;
  }

  .main-navigation.is-open { display: block; }

  .primary-menu {
    flex-direction: column;
    align-items: stretch;
  }

  .primary-menu > .menu-item > a { padding: 12px 4px; }

  .primary-menu .sub-menu {
    position: static;
    transform: none;
    opacity: 1;
    visibility: visible;
    translate: 0;
    display: none;
    box-shadow: none;
    background: transparent;
    border: 0;
    min-width: 0;
    padding: 0 0 8px 12px;
  }

  .primary-menu .sub-menu a { color: #e8e0d4; padding: 8px 4px; }

  .menu-item-has-children.submenu-open > .sub-menu { display: block; }

  .submenu-toggle {
    display: inline-flex;
    position: absolute;
    right: 0;
    top: 8px;
    width: 36px;
    height: 36px;
    border: 0;
    background: transparent;
    color: #fff;
    cursor: pointer;
  }

  .submenu-toggle::before {
    content: "";
    width: 8px;
    height: 8px;
    border-right: 1.5px solid #fff;
    border-bottom: 1.5px solid #fff;
    transform: rotate(45deg);
    margin: auto;
  }

  .hero,
  .hero-grid,
  .posts-grid,
  .posts-grid--3,
  .footer-grid,
  .ej-newsletter__inner,
  .post-navigation {
    grid-template-columns: 1fr;
  }

  .hero { padding-top: 28px; }

  .hero-media img,
  .hero-placeholder,
  .card-media img,
  .card-media--empty { height: 220px; }

  .ej-newsletter { padding: 28px 20px; border-radius: 16px; }

  .ej-newsletter-form { flex-direction: column; }

  .topbar-text { display: none; }

  .site-info-inner { flex-direction: column; }
}

/* WP alignment helpers */
.alignwide { margin-left: calc(50% - 50vw); margin-right: calc(50% - 50vw); width: auto; }
.alignfull { width: 100vw; margin-left: calc(50% - 50vw); }
.wp-block-image img { border-radius: 10px; }
.sticky .card-title::after {
  content: "Fixo";
  margin-left: 8px;
  font-family: var(--font-sans);
  font-size: 10px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--ej-gold-dim);
  vertical-align: middle;
}
