/*
Theme Name: Edwar Montenegro
Theme URI: https://edwardmontenegro.com/
Author: Dr. Edwar Montenegro / OpenAI
Author URI: https://edwardmontenegro.com/
Description: Tema institucional com estética sóbria e científica, inspirado em sites de agências espaciais e cientistas seniores.
Version: 1.0
Requires at least: 6.0
Tested up to: 6.8
Requires PHP: 7.4
Text Domain: edwar-montenegro
*/

/* =========================================================
   1. TOKENS VISUAIS
   ========================================================= */
:root {
  --bg: #08111f;
  --bg-soft: #0d1b2e;
  --bg-elevated: #10233d;
  --surface: #ffffff;
  --surface-soft: #f5f7fb;
  --surface-muted: #edf2f8;
  --text: #122033;
  --text-soft: #4b5d73;
  --text-inverse: #f7fbff;
  --line: rgba(17, 35, 58, 0.1);
  --line-strong: rgba(17, 35, 58, 0.18);
  --accent: #1f6fb2;
  --accent-2: #5ba7e1;
  --gold: #c8a96a;
  --gold-soft: #e3cfaa;
  --success: #0f766e;
  --danger: #b42318;
  --shadow-sm: 0 10px 24px rgba(5, 18, 34, 0.06);
  --shadow-md: 0 18px 50px rgba(5, 18, 34, 0.1);
  --shadow-lg: 0 28px 80px rgba(4, 13, 25, 0.18);
  --radius-sm: 8px;
  --radius-md: 14px;
  --radius-lg: 22px;
  --radius-pill: 999px;
  --container: 1240px;
  --header-height: 92px;
  --transition: 220ms ease;
}

/* =========================================================
   2. RESET E BASE
   ========================================================= */
*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: "Inter", "Segoe UI", Roboto, Arial, sans-serif;
  font-size: 16px;
  line-height: 1.7;
  color: var(--text);
  background: linear-gradient(180deg, #f8fbff 0%, #eef3f9 100%);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body.admin-bar .site-header {
  top: 32px;
}

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

a {
  color: var(--accent);
  text-decoration: none;
  transition: color var(--transition), opacity var(--transition), transform var(--transition);
}

a:hover,
a:focus {
  color: #16598f;
}

button,
input,
select,
textarea {
  font: inherit;
}

iframe {
  max-width: 100%;
}

figure {
  margin: 0;
}

ul,
ol {
  padding-left: 1.2rem;
}

blockquote {
  margin: 2rem 0;
  padding: 1.5rem 1.75rem;
  border-left: 4px solid var(--gold);
  background: linear-gradient(180deg, #f8fbff 0%, #eef5fc 100%);
  color: var(--text-soft);
  border-radius: 0 var(--radius-md) var(--radius-md) 0;
}

hr {
  border: 0;
  border-top: 1px solid var(--line);
  margin: 2rem 0;
}

/* =========================================================
   3. TIPOGRAFIA
   ========================================================= */
h1,
h2,
h3,
h4,
h5,
h6,
.site-title,
.editorial-title,
.section-title {
  font-family: "Playfair Display", Georgia, "Times New Roman", serif;
  color: #0e223c;
  line-height: 1.15;
  letter-spacing: -0.02em;
  margin: 0 0 0.85rem;
}

h1 { font-size: clamp(2.5rem, 5vw, 4.5rem); }
h2 { font-size: clamp(2rem, 4vw, 3.2rem); }
h3 { font-size: clamp(1.5rem, 3vw, 2.1rem); }
h4 { font-size: 1.35rem; }
h5 { font-size: 1.12rem; }
h6 { font-size: 1rem; }

p {
  margin: 0 0 1.2rem;
  color: var(--text-soft);
}

.lead,
.hero-lead,
.section-lead {
  font-size: clamp(1.05rem, 1.6vw, 1.22rem);
  color: var(--text-soft);
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.45rem 0.9rem;
  border: 1px solid rgba(255,255,255,0.18);
  border-radius: var(--radius-pill);
  background: rgba(255,255,255,0.08);
  color: rgba(255,255,255,0.92);
  font-size: 0.82rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.12em;
}

.text-center { text-align: center; }
.text-right { text-align: right; }
.text-left { text-align: left; }

/* =========================================================
   4. ESTRUTURA / LAYOUT
   ========================================================= */
.container,
.site-container {
  width: min(var(--container), calc(100% - 32px));
  margin-inline: auto;
}

.site-shell {
  position: relative;
  min-height: 100vh;
}

.section-block {
  position: relative;
  padding: 88px 0;
}

.section-block.section-tight {
  padding: 56px 0;
}

.section-block.section-dark {
  background:
    radial-gradient(circle at top right, rgba(91, 167, 225, 0.18), transparent 28%),
    radial-gradient(circle at bottom left, rgba(200, 169, 106, 0.12), transparent 24%),
    linear-gradient(180deg, #091321 0%, #0d1a2b 100%);
  color: var(--text-inverse);
}

.section-block.section-dark h1,
.section-block.section-dark h2,
.section-block.section-dark h3,
.section-block.section-dark h4,
.section-block.section-dark h5,
.section-block.section-dark h6,
.section-block.section-dark p,
.section-block.section-dark li {
  color: var(--text-inverse);
}

.surface-card,
.content-card,
.editorial-card,
.stat-card,
.media-card,
.book-card,
.research-card,
.post-card {
  background: rgba(255,255,255,0.98);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
}

/* =========================================================
   5. CABEÇALHO E NAVEGAÇÃO
   ========================================================= */
.site-header {
  position: sticky;
  top: 0;
  z-index: 998;
  background: rgba(7, 17, 30, 0.9);
  backdrop-filter: blur(18px);
  border-bottom: 1px solid rgba(255,255,255,0.08);
}

.header-topline {
  border-bottom: 1px solid rgba(255,255,255,0.08);
  color: rgba(255,255,255,0.75);
  font-size: 0.82rem;
}

.header-topline .container {
  min-height: 42px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.site-branding-wrap {
  min-height: var(--header-height);
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 1.4rem;
}

.site-branding {
  display: inline-flex;
  align-items: center;
  gap: 0.95rem;
}

.custom-logo,
.site-logo {
  width: 120px;
  height: 120px;
  object-fit: contain;
}

.site-title {
  margin: 0;
  font-size: 1.35rem;
  color: #ffffff;
}

.site-description {
  margin: 0.15rem 0 0;
  font-size: 0.84rem;
  color: rgba(255,255,255,0.72);
}

.main-navigation {
  justify-self: center;
}

.main-navigation ul {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 0.45rem 1.1rem;
  list-style: none;
  margin: 0;
  padding: 0;
}

.main-navigation a {
  position: relative;
  display: inline-flex;
  align-items: center;
  min-height: 42px;
  color: rgba(255,255,255,0.88);
  font-size: 0.94rem;
  font-weight: 600;
  letter-spacing: 0.03em;
  text-transform: uppercase;
}

.main-navigation a::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: 4px;
  width: 100%;
  height: 2px;
  transform: scaleX(0);
  transform-origin: center;
  background: linear-gradient(90deg, var(--gold) 0%, var(--accent-2) 100%);
  transition: transform var(--transition);
}

.main-navigation a:hover::after,
.main-navigation .current-menu-item > a::after,
.main-navigation .current_page_item > a::after {
  transform: scaleX(1);
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 0.8rem;
}

.header-social {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
}

.header-social a,
.social-icons a,
.footer-social a {
  width: 40px;
  height: 40px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  border: 1px solid rgba(255,255,255,0.12);
  background: rgba(255,255,255,0.08);
  color: #fff;
}

.header-social a:hover,
.social-icons a:hover,
.footer-social a:hover {
  background: rgba(200,169,106,0.14);
  border-color: rgba(200,169,106,0.45);
  transform: translateY(-2px);
}

.menu-toggle {
  display: none;
  padding: 0.8rem 1rem;
  border: 1px solid rgba(255,255,255,0.16);
  border-radius: 10px;
  background: transparent;
  color: #fff;
}

/* =========================================================
   6. BOTÕES
   ========================================================= */
.button,
.wp-element-button,
.wp-block-button__link,
input[type="submit"],
button[type="submit"] {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.65rem;
  min-height: 52px;
  padding: 0.95rem 1.4rem;
  border: 0;
  border-radius: var(--radius-pill);
  background: linear-gradient(135deg, #0f3b68 0%, #1f6fb2 100%);
  color: #fff;
  font-weight: 700;
  letter-spacing: 0.01em;
  box-shadow: 0 14px 28px rgba(31, 111, 178, 0.18);
  cursor: pointer;
}

.button:hover,
.wp-element-button:hover,
.wp-block-button__link:hover,
input[type="submit"]:hover,
button[type="submit"]:hover {
  color: #fff;
  transform: translateY(-2px);
  box-shadow: 0 18px 34px rgba(31, 111, 178, 0.22);
}

.button-outline {
  background: transparent;
  color: var(--accent);
  border: 1px solid rgba(31,111,178,0.22);
  box-shadow: none;
}

.button-gold {
  background: linear-gradient(135deg, #a88645 0%, #d1b37a 100%);
  box-shadow: 0 14px 28px rgba(168, 134, 69, 0.18);
}

/* =========================================================
   7. HERO / CAPA PRINCIPAL
   ========================================================= */
.hero-home,
.hero-scientist {
  position: relative;
  overflow: hidden;
  padding: 110px 0 86px;
  background:
    radial-gradient(circle at top right, rgba(91, 167, 225, 0.18), transparent 28%),
    radial-gradient(circle at 15% 85%, rgba(200, 169, 106, 0.14), transparent 24%),
    linear-gradient(180deg, #07111e 0%, #0a1830 60%, #0c1e3a 100%);
}

.hero-home::before,
.hero-scientist::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(255,255,255,0.04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,0.04) 1px, transparent 1px);
  background-size: 34px 34px;
  opacity: 0.14;
  pointer-events: none;
}

.hero-grid {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  gap: 2.2rem;
  align-items: center;
}

.hero-copy {
  color: #ffffff;
}

.hero-copy h1,
.hero-copy h2,
.hero-copy h3 {
  color: #ffffff;
}

.hero-copy .hero-lead,
.hero-copy p {
  color: rgba(255,255,255,0.84);
  max-width: 760px;
}

.hero-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin: 1.25rem 0 1.7rem;
}

.hero-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  min-height: 44px;
  padding: 0.65rem 0.95rem;
  border-radius: var(--radius-pill);
  border: 1px solid rgba(255,255,255,0.14);
  background: rgba(255,255,255,0.08);
  color: rgba(255,255,255,0.92);
  backdrop-filter: blur(10px);
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.85rem;
  margin-top: 1.8rem;
}

.hero-panel {
  position: relative;
  padding: 22px;
  border-radius: 28px;
  border: 1px solid rgba(255,255,255,0.08);
  background: linear-gradient(180deg, rgba(255,255,255,0.08) 0%, rgba(255,255,255,0.03) 100%);
  box-shadow: var(--shadow-lg);
  backdrop-filter: blur(12px);
}

.hero-portrait {
  overflow: hidden;
  border-radius: 22px;
  border: 1px solid rgba(255,255,255,0.12);
  background: rgba(255,255,255,0.06);
}

.hero-portrait img {
  width: 100%;
  aspect-ratio: 4 / 5;
  object-fit: cover;
}

.hero-counter {
  position: absolute;
  left: 22px;
  right: 22px;
  bottom: 22px;
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 1rem;
  align-items: center;
  padding: 1rem 1.1rem;
  border-radius: 18px;
  background: rgba(5, 15, 27, 0.74);
  color: #fff;
  border: 1px solid rgba(255,255,255,0.1);
}

.hero-counter .label {
  font-size: 0.82rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  opacity: 0.8;
}

.hero-counter .value {
  font-size: clamp(1.3rem, 2vw, 2rem);
  font-weight: 800;
  color: var(--gold-soft);
}

/* =========================================================
   8. BLOCOS INSTITUCIONAIS
   ========================================================= */
.section-heading {
  max-width: 900px;
  margin: 0 auto 2.4rem;
  text-align: center;
}

.section-heading p {
  max-width: 760px;
  margin-inline: auto;
}

.editorial-grid,
.research-grid,
.features-grid,
.books-grid,
.media-grid,
.portfolio-grid,
.posts-grid,
.stats-grid {
  display: grid;
  gap: 1.4rem;
}

.editorial-grid.two,
.features-grid.two,
.media-grid.two {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.editorial-grid.three,
.research-grid,
.books-grid,
.portfolio-grid,
.posts-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.stats-grid {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.editorial-card,
.research-card,
.post-card,
.book-card,
.media-card,
.stat-card {
  height: 100%;
  padding: 1.45rem;
}

.editorial-card h3,
.research-card h3,
.post-card h3,
.book-card h3,
.media-card h3,
.stat-card h3 {
  font-size: 1.35rem;
  margin-bottom: 0.6rem;
}

.card-kicker {
  display: inline-block;
  margin-bottom: 0.8rem;
  color: var(--accent);
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.stat-card {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: flex-start;
  min-height: 220px;
  border-top: 3px solid rgba(31,111,178,0.15);
}

.stat-icon {
  width: 58px;
  height: 58px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 18px;
  background: linear-gradient(135deg, rgba(31,111,178,0.1) 0%, rgba(91,167,225,0.12) 100%);
  color: var(--accent);
  font-size: 1.4rem;
  margin-bottom: 1rem;
}

.stat-number {
  font-size: clamp(2rem, 3.8vw, 3rem);
  line-height: 1;
  font-weight: 800;
  color: #0d233f;
  margin-bottom: 0.5rem;
}

.stat-label {
  font-size: 0.98rem;
  color: var(--text-soft);
}

.info-strip {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  padding: 1.1rem 1.2rem;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: linear-gradient(180deg, #fff 0%, #f7fafd 100%);
  box-shadow: var(--shadow-sm);
}

.info-strip > * {
  flex: 1 1 220px;
}

/* =========================================================
   9. POSTS / SLIDER / BLOG
   ========================================================= */
.featured-posts-wrap,
.latest-news-wrap {
  position: relative;
}

.posts-slider,
.latest-posts-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1.4rem;
}

.post-card {
  overflow: hidden;
}

.post-card .thumb,
.post-card .post-thumb {
  margin: -1.45rem -1.45rem 1rem;
  overflow: hidden;
  border-radius: 22px 22px 0 0;
}

.post-card .thumb img,
.post-card .post-thumb img {
  width: 100%;
  aspect-ratio: 16 / 10;
  object-fit: cover;
  transition: transform 400ms ease;
}

.post-card:hover img {
  transform: scale(1.04);
}

.post-meta,
.entry-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.8rem;
  margin-bottom: 0.9rem;
  font-size: 0.84rem;
  color: #69809a;
}

.post-title,
.entry-title {
  font-size: clamp(1.4rem, 2vw, 2.2rem);
}

.post-excerpt,
.entry-summary,
.entry-content {
  color: var(--text-soft);
}

/* =========================================================
   10. PÁGINAS E POSTS INTERNOS
   ========================================================= */
.page-hero,
.entry-hero {
  padding: 88px 0 54px;
  background:
    radial-gradient(circle at top right, rgba(91,167,225,0.18), transparent 24%),
    linear-gradient(180deg, #091321 0%, #0d1a2b 100%);
}

.page-hero h1,
.page-hero p,
.entry-hero h1,
.entry-hero p {
  color: #fff;
}

.site-main {
  min-height: 40vh;
}

.page-content-wrap,
.single-content-wrap,
.archive-content-wrap {
  padding: 70px 0 90px;
}

.content-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 320px;
  gap: 2rem;
  align-items: start;
}

.primary-content,
.entry-article,
.archive-listing,
.sidebar-area .widget {
  background: rgba(255,255,255,0.98);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
}

.primary-content,
.entry-article,
.archive-listing {
  padding: clamp(1.3rem, 2vw, 2rem);
}

.entry-content > *:first-child,
.primary-content > *:first-child {
  margin-top: 0;
}

.entry-content img,
.primary-content img,
.wp-block-image img {
  border-radius: 18px;
}

.entry-content table,
.primary-content table {
  width: 100%;
  border-collapse: collapse;
  margin: 1.8rem 0;
  overflow: hidden;
  border-radius: 14px;
}

.entry-content th,
.entry-content td,
.primary-content th,
.primary-content td {
  padding: 0.95rem 1rem;
  border: 1px solid var(--line);
  text-align: left;
}

.entry-content th,
.primary-content th {
  background: #f0f5fb;
  color: #10233d;
}

.sidebar-area {
  display: grid;
  gap: 1.2rem;
}

.widget {
  padding: 1.35rem;
}

.widget-title {
  font-size: 1.2rem;
  margin-bottom: 0.95rem;
}

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

.widget li + li {
  padding-top: 0.7rem;
  margin-top: 0.7rem;
  border-top: 1px solid var(--line);
}

/* =========================================================
   11. VÍDEO, MÍDIA E CAPAS
   ========================================================= */
.video-container {
  position: relative;
  width: 100%;
  overflow: hidden;
  border-radius: 20px;
  aspect-ratio: 16 / 9;
  background: #02070d;
}

.video-container iframe,
.video-container video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
}

.media-card .media-caption,
.book-card .book-caption {
  margin-top: 0.95rem;
}

.book-cover,
.media-cover {
  overflow: hidden;
  border-radius: 16px;
  border: 1px solid var(--line);
}

.book-cover img,
.media-cover img {
  width: 100%;
  aspect-ratio: 4 / 5;
  object-fit: cover;
}

/* =========================================================
   12. FORMULÁRIOS
   ========================================================= */
input[type="text"],
input[type="email"],
input[type="url"],
input[type="search"],
input[type="password"],
input[type="number"],
textarea,
select {
  width: 100%;
  min-height: 52px;
  padding: 0.9rem 1rem;
  border: 1px solid rgba(17, 35, 58, 0.14);
  border-radius: 14px;
  background: #fff;
  color: var(--text);
  transition: border-color var(--transition), box-shadow var(--transition);
}

textarea {
  min-height: 160px;
  resize: vertical;
}

input:focus,
textarea:focus,
select:focus {
  outline: none;
  border-color: rgba(31,111,178,0.4);
  box-shadow: 0 0 0 4px rgba(31,111,178,0.08);
}

.search-form,
.wp-block-search__inside-wrapper {
  display: flex;
  gap: 0.7rem;
}

/* =========================================================
   13. RODAPÉ
   ========================================================= */
.site-footer {
  position: relative;
  padding: 70px 0 26px;
  background:
    radial-gradient(circle at top right, rgba(91,167,225,0.18), transparent 26%),
    linear-gradient(180deg, #07111e 0%, #0a1628 100%);
  color: rgba(255,255,255,0.82);
}

.site-footer h2,
.site-footer h3,
.site-footer h4,
.site-footer h5,
.site-footer h6,
.site-footer p,
.site-footer a,
.site-footer li {
  color: rgba(255,255,255,0.88);
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.1fr 0.7fr 0.7fr 0.9fr;
  gap: 1.5rem;
  margin-bottom: 2rem;
}

.footer-col {
  min-width: 0;
}

.footer-branding {
  max-width: 360px;
}

.footer-bottom {
  padding-top: 1.2rem;
  border-top: 1px solid rgba(255,255,255,0.1);
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
  font-size: 0.9rem;
}

/* =========================================================
   14. WORDPRESS CORE
   ========================================================= */
.aligncenter {
  display: block;
  margin-left: auto;
  margin-right: auto;
}

.alignleft {
  float: left;
  margin-right: 1.5rem;
  margin-bottom: 1rem;
}

.alignright {
  float: right;
  margin-left: 1.5rem;
  margin-bottom: 1rem;
}

.wp-caption {
  max-width: 100%;
  margin: 1.4rem 0;
}

.wp-caption-text,
.gallery-caption,
figcaption {
  margin-top: 0.7rem;
  color: #6a7f95;
  font-size: 0.92rem;
}

.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;
}

.sticky {
  position: relative;
}

.bypostauthor {
  position: relative;
}

.pagination,
.nav-links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.7rem;
  align-items: center;
  justify-content: center;
  margin-top: 2rem;
}

.page-numbers {
  min-width: 44px;
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: #fff;
  color: var(--text);
}

.page-numbers.current {
  background: linear-gradient(135deg, #0f3b68 0%, #1f6fb2 100%);
  border-color: transparent;
  color: #fff;
}

/* =========================================================
   15. UTILITÁRIOS
   ========================================================= */
.mb-0 { margin-bottom: 0 !important; }
.mb-1 { margin-bottom: 0.5rem !important; }
.mb-2 { margin-bottom: 1rem !important; }
.mb-3 { margin-bottom: 1.5rem !important; }
.mb-4 { margin-bottom: 2rem !important; }
.mt-0 { margin-top: 0 !important; }
.mt-1 { margin-top: 0.5rem !important; }
.mt-2 { margin-top: 1rem !important; }
.mt-3 { margin-top: 1.5rem !important; }
.mt-4 { margin-top: 2rem !important; }
.py-section { padding: 88px 0; }
.bg-white { background: #fff; }
.bg-soft { background: var(--surface-soft); }
.bg-dark { background: var(--bg); color: #fff; }
.rounded-lg { border-radius: var(--radius-lg); }
.shadow-sm { box-shadow: var(--shadow-sm); }
.shadow-md { box-shadow: var(--shadow-md); }

/* =========================================================
   16. RESPONSIVIDADE
   ========================================================= */
@media (max-width: 1180px) {
  .site-branding-wrap {
    grid-template-columns: auto 1fr auto;
    gap: 1rem;
  }

  .main-navigation ul {
    gap: 0.35rem 0.9rem;
  }

  .hero-grid,
  .content-layout,
  .footer-grid {
    grid-template-columns: 1fr;
  }

  .stats-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 960px) {
  .main-navigation {
    display: none;
  }

  .menu-toggle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
  }

  .site-header.menu-open .main-navigation {
    display: block;
    grid-column: 1 / -1;
    width: 100%;
    padding-bottom: 1rem;
  }

  .site-header.menu-open .main-navigation ul {
    align-items: flex-start;
    justify-content: flex-start;
    flex-direction: column;
    gap: 0.25rem;
  }

  .editorial-grid.three,
  .research-grid,
  .books-grid,
  .portfolio-grid,
  .posts-grid,
  .posts-slider,
  .latest-posts-grid,
  .editorial-grid.two,
  .features-grid.two,
  .media-grid.two {
    grid-template-columns: 1fr;
  }

  .hero-home,
  .hero-scientist,
  .page-hero,
  .entry-hero,
  .section-block {
    padding-top: 72px;
    padding-bottom: 72px;
  }
}

@media (max-width: 640px) {
  body {
    font-size: 15px;
  }

  .container,
  .site-container {
    width: min(var(--container), calc(100% - 22px));
  }

  .site-branding-wrap {
    min-height: 78px;
  }

  .site-title {
    font-size: 1.08rem;
  }

  .site-description {
    display: none;
  }

  .hero-actions,
  .header-actions,
  .hero-meta,
  .footer-bottom {
    flex-direction: column;
    align-items: stretch;
  }

  .hero-counter {
    position: static;
    margin-top: 1rem;
    grid-template-columns: 1fr;
  }

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

  .stat-card {
    min-height: auto;
  }

  .section-block,
  .page-content-wrap,
  .single-content-wrap,
  .archive-content-wrap {
    padding-top: 54px;
    padding-bottom: 54px;
  }
}

/* =========================================================
   16. NASA PREMIUM HOME OVERRIDES
   These rules intentionally use higher specificity and
   !important where needed to override inline CSS in front-page.php.
   ========================================================= */

html,
body {
  overflow-x: hidden;
}

body {
  background:
    radial-gradient(circle at 15% 0%, rgba(31, 111, 178, 0.06), transparent 26%),
    radial-gradient(circle at 85% 0%, rgba(200, 169, 106, 0.05), transparent 22%),
    linear-gradient(180deg, #f6f9fd 0%, #eef4fb 100%);
}

.site-content,
.site-main,
.content-area,
.entry-content {
  width: 100%;
}

.em-home {
  position: relative;
  width: 100%;
  overflow: hidden;
}

.em-home .container {
  width: min(1520px, calc(100vw - 48px)) !important;
  max-width: none !important;
  margin-inline: auto !important;
}

.em-home .section-block {
  margin: 0 !important;
  padding: clamp(26px, 3vw, 46px) 0 !important;
}

.em-home .hero {
  position: relative;
  isolation: isolate;
  padding: clamp(54px, 7vw, 90px) 0 clamp(42px, 5vw, 68px) !important;
  background:
    radial-gradient(circle at 12% 18%, rgba(91, 167, 225, 0.18), transparent 28%),
    radial-gradient(circle at 85% 12%, rgba(200, 169, 106, 0.16), transparent 24%),
    linear-gradient(90deg, #020814 0%, #04122a 28%, #071a39 58%, #0b2245 100%) !important;
}

.em-home .hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(rgba(255,255,255,0.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,0.03) 1px, transparent 1px);
  background-size: 64px 64px;
  mask-image: linear-gradient(180deg, rgba(0,0,0,0.75), rgba(0,0,0,0.2));
  opacity: 0.38;
  z-index: -2;
}

.em-home .hero::after {
  content: "";
  position: absolute;
  inset: auto -10% -120px -10%;
  height: 240px;
  background: radial-gradient(circle at center, rgba(91, 167, 225, 0.2), transparent 60%);
  filter: blur(40px);
  z-index: -1;
}

.em-home .hero-grid {
  display: grid !important;
  grid-template-columns: minmax(0, 1.18fr) minmax(380px, 0.82fr) !important;
  align-items: center !important;
  gap: clamp(26px, 3vw, 42px) !important;
}

.em-home .hero h1 {
  max-width: 12ch;
  font-size: clamp(3.2rem, 6vw, 6rem) !important;
  line-height: 0.95 !important;
  letter-spacing: -0.04em !important;
  text-shadow: 0 8px 26px rgba(0,0,0,0.22);
}

.em-home .hero p {
  max-width: 820px !important;
  font-size: clamp(1.08rem, 1.55vw, 1.32rem) !important;
  line-height: 1.75 !important;
}

.em-home .hero-kicker,
.em-home .section-eyebrow {
  border-color: rgba(200, 169, 106, 0.32) !important;
  background: linear-gradient(180deg, rgba(255,255,255,0.1), rgba(255,255,255,0.04)) !important;
  color: #f7e7c4 !important;
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.08), 0 8px 18px rgba(0,0,0,0.12);
}

.em-home .hero-actions {
  margin-top: 24px !important;
}

.em-home .button {
  background: linear-gradient(135deg, #c8a96a 0%, #e2c58b 100%) !important;
  color: #0b1427 !important;
  border: 1px solid rgba(255,255,255,0.18);
  box-shadow: 0 12px 28px rgba(200, 169, 106, 0.24) !important;
}

.em-home .button:hover {
  box-shadow: 0 16px 32px rgba(200, 169, 106, 0.32) !important;
}

.em-home .button-outline,
.em-home .button-outline.dark {
  border-width: 1px !important;
  backdrop-filter: blur(8px);
}

.em-home .hero-tags {
  gap: 12px !important;
  max-width: 820px;
}

.em-home .hero-tag {
  background: linear-gradient(180deg, rgba(255,255,255,0.08), rgba(255,255,255,0.04)) !important;
  border: 1px solid rgba(255,255,255,0.12) !important;
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.05);
}

.em-home .hero-stats,
.em-home .numbers-grid,
.em-home .stats-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
  gap: 16px !important;
}

.em-home .hero-stat,
.em-home .stat-card,
.em-home .panel,
.em-home .post-card,
.em-home .media-card,
.em-home .book-card,
.em-home .research-card,
.em-home .editorial-card,
.em-home .content-card,
.em-home .surface-card {
  position: relative;
  background:
    linear-gradient(180deg, rgba(255,255,255,0.96) 0%, rgba(247,250,254,0.98) 100%) !important;
  border: 1px solid rgba(19, 43, 74, 0.1) !important;
  border-radius: 24px !important;
  box-shadow:
    0 18px 45px rgba(9, 23, 46, 0.08),
    inset 0 1px 0 rgba(255,255,255,0.9) !important;
  overflow: hidden;
}

.em-home .hero-stat::before,
.em-home .stat-card::before,
.em-home .panel::before,
.em-home .post-card::before,
.em-home .media-card::before,
.em-home .book-card::before,
.em-home .research-card::before,
.em-home .editorial-card::before,
.em-home .content-card::before,
.em-home .surface-card::before {
  content: "";
  position: absolute;
  inset: 0 0 auto 0;
  height: 3px;
  background: linear-gradient(90deg, rgba(91,167,225,0.85), rgba(200,169,106,0.85));
}

.em-home .hero-profile-card {
  position: relative;
  padding: 22px !important;
  border-radius: 30px !important;
  background:
    linear-gradient(180deg, rgba(255,255,255,0.11) 0%, rgba(255,255,255,0.05) 100%) !important;
  border: 1px solid rgba(255,255,255,0.14) !important;
  box-shadow: 0 28px 80px rgba(2, 9, 20, 0.32) !important;
}

.em-home .hero-profile-card::before {
  content: "";
  position: absolute;
  inset: 20px;
  border: 1px solid rgba(91,167,225,0.2);
  border-radius: 24px;
  pointer-events: none;
}

.em-home .hero-profile-card img {
  width: 100% !important;
  min-height: clamp(520px, 58vw, 760px) !important;
  max-height: 78vh;
  object-fit: cover !important;
  object-position: center top;
  border-radius: 24px !important;
}

.em-home .profile-meta {
  grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
}

.em-home .profile-pill {
  background: linear-gradient(180deg, rgba(255,255,255,0.08), rgba(255,255,255,0.03)) !important;
  border: 1px solid rgba(255,255,255,0.1) !important;
}

.em-home .section-title {
  font-size: clamp(2.4rem, 4vw, 4rem) !important;
  line-height: 1.04 !important;
  color: #0b1b34 !important;
}

.em-home .section-desc {
  max-width: 860px !important;
  font-size: clamp(1rem, 1.3vw, 1.14rem) !important;
}

.em-home .panel-inner {
  padding: clamp(24px, 2.2vw, 36px) !important;
}

.em-home .numbers-grid,
.em-home .posts-grid,
.em-home .research-grid,
.em-home .portfolio-grid,
.em-home .books-grid,
.em-home .media-grid,
.em-home .features-grid,
.em-home .editorial-grid {
  gap: clamp(16px, 1.8vw, 24px) !important;
}

.em-home .numbers-grid {
  grid-template-columns: repeat(4, minmax(0, 1fr)) !important;
}

.em-home .numbers-grid .chip,
.em-home .stats-grid .chip,
.em-home .hero-stat,
.em-home .stat-card {
  min-height: 158px;
}

.em-home .numbers-grid .chip,
.em-home .stat-card,
.em-home .hero-stat {
  padding: 22px !important;
}

.em-home .numbers-grid .val,
.em-home .hero-stat .value,
.em-home .stat-card .value {
  font-size: clamp(2rem, 3vw, 3rem) !important;
  font-weight: 800 !important;
  letter-spacing: -0.04em;
}

.em-home .numbers-grid .lab,
.em-home .hero-stat .sub,
.em-home .stat-card .label {
  font-size: 0.98rem !important;
}

.em-home .latest-posts-slider,
.em-home .posts-slider {
  padding-inline: 2px;
}

.em-home .latest-post-card,
.em-home .post-card {
  height: 100%;
}

.em-home .latest-post-card img,
.em-home .post-card img,
.em-home .book-card img,
.em-home .media-card img,
.em-home .portfolio-card img {
  width: 100%;
  aspect-ratio: 16 / 10;
  object-fit: cover;
}

.em-home .section-dark,
.em-home .cta-section,
.em-home .mission-panel,
.em-home .authority-band {
  background:
    radial-gradient(circle at top right, rgba(91,167,225,0.16), transparent 24%),
    radial-gradient(circle at bottom left, rgba(200,169,106,0.12), transparent 28%),
    linear-gradient(180deg, #07101d 0%, #0c1728 100%) !important;
}

.em-home .section-dark .section-title,
.em-home .cta-section .section-title,
.em-home .mission-panel .section-title,
.em-home .authority-band .section-title {
  color: #ffffff !important;
}

.em-home .site-counter,
.em-home .hero-counter,
.em-home .counter-card {
  background: linear-gradient(180deg, rgba(255,255,255,0.12), rgba(255,255,255,0.06)) !important;
  border: 1px solid rgba(255,255,255,0.14) !important;
  border-radius: 22px !important;
  box-shadow: 0 18px 40px rgba(0,0,0,0.2) !important;
}

.em-home .site-counter strong,
.em-home .hero-counter strong,
.em-home .counter-card strong {
  color: #f7e7c4 !important;
}

@media (min-width: 1600px) {
  .em-home .container {
    width: min(1660px, calc(100vw - 52px)) !important;
  }

  .em-home .hero-grid {
    grid-template-columns: minmax(0, 1.2fr) minmax(420px, 0.8fr) !important;
  }
}

@media (max-width: 1280px) {
  .em-home .container {
    width: calc(100vw - 34px) !important;
  }

  .em-home .hero-grid {
    grid-template-columns: minmax(0, 1fr) minmax(360px, 0.86fr) !important;
  }

  .em-home .numbers-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
  }
}

@media (max-width: 1100px) {
  .em-home .hero-grid {
    grid-template-columns: 1fr !important;
  }

  .em-home .hero h1,
  .em-home .hero p {
    max-width: none !important;
  }

  .em-home .hero-profile-card {
    max-width: 760px;
    margin-inline: auto;
  }

  .em-home .numbers-grid,
  .em-home .hero-stats,
  .em-home .stats-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  }
}

@media (max-width: 760px) {
  .em-home .container {
    width: calc(100vw - 20px) !important;
  }

  .em-home .hero {
    padding-top: 38px !important;
    padding-bottom: 34px !important;
  }

  .em-home .hero-kicker,
  .em-home .hero-tag,
  .em-home .section-eyebrow {
    font-size: 0.76rem !important;
  }

  .em-home .profile-meta,
  .em-home .hero-stats,
  .em-home .numbers-grid,
  .em-home .stats-grid {
    grid-template-columns: 1fr !important;
  }

  .em-home .hero-profile-card img {
    min-height: 420px !important;
    max-height: none;
  }

  .em-home .panel-inner,
  .em-home .numbers-grid .chip,
  .em-home .hero-stat,
  .em-home .stat-card {
    padding: 18px !important;
  }
}

/* =========================================================
   17. WIDE LAYOUT OVERRIDES
   Expande a largura útil do tema e da home .em-home
   para ocupar melhor monitores desktop e notebooks largos.
   ========================================================= */

:root {
  --container: 1540px;
}

.container,
.site-container {
  width: min(var(--container), calc(100% - 48px));
  max-width: none;
}

.header-topline .container,
.site-branding-wrap.container,
.site-footer .container,
.page-hero .container,
.entry-hero .container,
.page-content-wrap .container,
.single-content-wrap .container,
.archive-content-wrap .container,
.section-block > .container {
  width: min(1540px, calc(100% - 48px));
  max-width: none;
}

/* HOME criada com CSS inline dentro do front-page.php */
.em-home {
  width: 100%;
}

.em-home .container {
  width: min(1660px, calc(100vw - 44px)) !important;
  max-width: 1660px !important;
  margin-left: auto !important;
  margin-right: auto !important;
}

.em-home .home-hero {
  padding-left: 0 !important;
  padding-right: 0 !important;
}

.em-home .home-hero-grid {
  grid-template-columns: minmax(0, 1.22fr) minmax(420px, 0.78fr) !important;
  gap: 56px !important;
}

.em-home .numbers-grid {
  grid-template-columns: repeat(5, minmax(0, 1fr)) !important;
}

.em-home .research-grid,
.em-home .posts-slider,
.em-home .latest-posts-grid,
.em-home .portfolio-grid,
.em-home .books-grid {
  gap: 1.6rem !important;
}

.em-home .research-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
}

.em-home .content-band,
.em-home .section-spacing,
.em-home section,
.em-home .main-content {
  width: 100%;
}

/* melhora o cabeçalho em telas largas */
.site-header .container,
.site-header .site-container {
  width: min(1680px, calc(100% - 40px));
}

/* amplia os grids institucionais do tema */
.posts-slider,
.latest-posts-grid,
.posts-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.stats-grid {
  grid-template-columns: repeat(5, minmax(0, 1fr));
}

@media (min-width: 1700px) {
  :root {
    --container: 1680px;
  }

  .container,
  .site-container {
    width: min(1680px, calc(100% - 56px));
  }

  .em-home .container {
    width: min(1760px, calc(100vw - 56px)) !important;
    max-width: 1760px !important;
  }

  .site-header .container,
  .site-header .site-container {
    width: min(1760px, calc(100% - 48px));
  }
}

@media (max-width: 1400px) {
  .em-home .container {
    width: min(1480px, calc(100vw - 34px)) !important;
    max-width: 1480px !important;
  }

  .em-home .numbers-grid,
  .stats-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr)) !important;
  }
}

@media (max-width: 1180px) {
  .container,
  .site-container {
    width: min(100%, calc(100% - 30px));
  }

  .em-home .container {
    width: min(100%, calc(100vw - 28px)) !important;
    max-width: none !important;
  }

  .em-home .home-hero-grid {
    grid-template-columns: 1fr !important;
    gap: 32px !important;
  }

  .em-home .numbers-grid,
  .stats-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  }
}

@media (max-width: 720px) {
  .container,
  .site-container,
  .em-home .container {
    width: calc(100% - 20px) !important;
  }

  .em-home .numbers-grid,
  .stats-grid {
    grid-template-columns: 1fr !important;
  }
}

/* === HOME REFINEMENT: NASA premium alignment === */
:root{
  --container: 1600px;
}

.container,
.site-container{
  width:min(var(--container), calc(100% - 28px));
}

.site-header,
.header-topline{
  background:
    linear-gradient(180deg, rgba(7,17,30,.96) 0%, rgba(8,20,36,.94) 100%);
}

.site-header{
  box-shadow: 0 10px 40px rgba(0,0,0,.18);
}

.site-branding-wrap{
  min-height: 98px;
  gap: 1.8rem;
}

.site-title{
  font-size: clamp(1.35rem, 1.5vw, 1.7rem);
  letter-spacing: -.02em;
}

.site-description{
  font-size: .9rem;
}

.main-navigation ul{
  gap: .55rem 1.25rem;
}

.main-navigation a{
  font-size: .92rem;
  letter-spacing: .06em;
}

.header-social a,
.social-icons a,
.footer-social a{
  box-shadow: inset 0 1px 0 rgba(255,255,255,.04);
}

.em-home{
  background:
    linear-gradient(180deg, #06101c 0%, #08192d 22%, #eef4fb 22.01%, #f6f9fd 100%);
}

.em-home .container{
  width:min(1720px, calc(100vw - 24px)) !important;
  max-width:none !important;
}

.em-home .hero{
  padding: clamp(58px, 6vw, 96px) 0 clamp(46px, 5vw, 72px) !important;
  background:
    radial-gradient(circle at 8% 12%, rgba(91,167,225,.18), transparent 24%),
    radial-gradient(circle at 85% 10%, rgba(200,169,106,.14), transparent 20%),
    linear-gradient(90deg, #030b16 0%, #07162f 38%, #0b2245 70%, #10305d 100%) !important;
}

.em-home .hero::before{
  background:
    linear-gradient(rgba(255,255,255,.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,.025) 1px, transparent 1px);
  background-size: 58px 58px;
  opacity: .5;
}

.em-home .hero-grid{
  grid-template-columns: minmax(0, 1.24fr) minmax(420px, .76fr) !important;
  gap: clamp(28px, 3.2vw, 56px) !important;
}

.em-home .hero-copy{
  max-width: 920px;
}

.em-home .hero h1{
  max-width: 11.5ch;
  font-size: clamp(3.4rem, 5.8vw, 6.2rem) !important;
}

.em-home .hero p,
.em-home .hero-copy .hero-lead{
  max-width: 900px !important;
}

.em-home .hero-meta,
.em-home .hero-tags{
  margin-top: 1.2rem;
}

.em-home .hero-chip,
.em-home .hero-tag{
  padding: .85rem 1.1rem !important;
  border-radius: 999px !important;
  font-weight: 600;
}

.em-home .hero-actions{
  display:flex;
  flex-wrap:wrap;
  gap: 14px;
}

.em-home .button,
.em-home .button-outline{
  min-height: 52px;
  padding: 0 1.45rem !important;
  border-radius: 999px !important;
  font-weight: 700 !important;
}

.em-home .button-outline,
.em-home .button-outline.dark{
  background: rgba(255,255,255,.05) !important;
  border: 1px solid rgba(255,255,255,.14) !important;
  color: #fff !important;
}

.em-home .button-outline:hover,
.em-home .button-outline.dark:hover{
  background: rgba(255,255,255,.1) !important;
  border-color: rgba(200,169,106,.45) !important;
}

.em-home .hero-profile-card{
  padding: 24px !important;
  border-radius: 32px !important;
  background:
    linear-gradient(180deg, rgba(255,255,255,.12) 0%, rgba(255,255,255,.05) 100%) !important;
}

.em-home .hero-profile-card::after{
  content:"";
  position:absolute;
  inset:auto 24px 24px 24px;
  height: 1px;
  background: linear-gradient(90deg, transparent 0%, rgba(200,169,106,.5) 35%, rgba(91,167,225,.5) 65%, transparent 100%);
  pointer-events:none;
}

.em-home .hero-profile-card img{
  border-radius: 26px !important;
  min-height: clamp(520px, 46vw, 700px) !important;
}

.em-home .profile-meta{
  gap: 14px !important;
}

.em-home .profile-pill{
  padding: 16px 18px !important;
  border-radius: 20px !important;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.04);
}

.em-home .hero-counter,
.em-home .site-counter,
.em-home .counter-card{
  margin-top: 16px;
  padding: 18px 20px !important;
}

.em-home .hero-counter .label{
  font-size: .78rem;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: rgba(255,255,255,.72);
}

.em-home .hero-counter .value{
  font-size: clamp(1.9rem, 3vw, 2.9rem);
  font-weight: 800;
  line-height: 1;
  color: #fff;
}

.em-home .section-block{
  padding: clamp(62px, 6vw, 92px) 0 !important;
}

.em-home .section-heading{
  max-width: 980px;
  margin: 0 auto 2rem;
  text-align: center;
}

.em-home .section-title{
  font-size: clamp(2.5rem, 4.5vw, 4.25rem) !important;
}

.em-home .section-desc{
  max-width: 860px !important;
  margin-inline: auto;
}

.em-home .surface-card,
.em-home .stat-card,
.em-home .editorial-card,
.em-home .research-card,
.em-home .post-card,
.em-home .media-card,
.em-home .book-card,
.em-home .panel{
  border-radius: 26px !important;
  box-shadow:
    0 18px 45px rgba(6,20,40,.08),
    0 3px 10px rgba(6,20,40,.04),
    inset 0 1px 0 rgba(255,255,255,.94) !important;
}

.em-home .surface-card:hover,
.em-home .stat-card:hover,
.em-home .editorial-card:hover,
.em-home .research-card:hover,
.em-home .post-card:hover,
.em-home .media-card:hover,
.em-home .book-card:hover{
  transform: translateY(-6px);
  box-shadow:
    0 26px 60px rgba(6,20,40,.12),
    0 10px 24px rgba(6,20,40,.06),
    inset 0 1px 0 rgba(255,255,255,.96) !important;
}

.em-home .stat-card{
  padding: 26px !important;
  min-height: 205px;
}

.em-home .stat-icon{
  width: 60px;
  height: 60px;
  border-radius: 18px !important;
  display:grid;
  place-items:center;
  font-size: 1.32rem;
  background:
    linear-gradient(135deg, rgba(16,48,93,.08), rgba(200,169,106,.14)) !important;
  color: #0f2b52 !important;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.7);
}

.em-home .stat-number{
  font-size: clamp(2.25rem, 3vw, 3.35rem) !important;
  line-height: 1;
  letter-spacing: -.04em;
  margin-top: .9rem;
  color: #0c1f39 !important;
}

.em-home .stat-label{
  margin-top: .6rem;
  font-size: 1rem !important;
  color: #44556a !important;
}

.em-home .card-kicker{
  display: inline-block;
  margin-top: .2rem;
  margin-bottom: .5rem;
  color: #a37b2d !important;
  font-size: .76rem;
  font-weight: 800;
  letter-spacing: .12em;
  text-transform: uppercase;
}

.em-home .numbers-grid{
  grid-template-columns: repeat(4, minmax(0, 1fr)) !important;
  gap: 20px !important;
}

.em-home .research-grid,
.em-home .books-grid,
.em-home .media-grid,
.em-home .features-grid,
.em-home .posts-grid,
.em-home .editorial-grid,
.em-home .quick-links{
  display:grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 20px !important;
}

.em-home .quick-link-card,
.em-home .feature-link-card,
.em-home .award-link-card{
  display:flex !important;
  flex-direction:column;
  justify-content:flex-start;
  padding: 26px !important;
  min-height: 100%;
}

.em-home .editorial-card h3,
.em-home .research-card h3,
.em-home .book-card h3,
.em-home .media-card h3,
.em-home .post-card h3{
  font-size: clamp(1.28rem, 1.6vw, 1.55rem);
  line-height: 1.18;
}

.em-home .info-strip{
  display:grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
}

.em-home .info-strip > div{
  padding: 22px 24px;
  border-radius: 24px;
  background:
    linear-gradient(180deg, rgba(255,255,255,.96), rgba(248,250,254,.98));
  border: 1px solid rgba(17,35,58,.09);
  box-shadow: var(--shadow-sm);
}

.em-home .info-strip strong{
  display:block;
  margin-bottom:.55rem;
  color:#0f2441;
  font-size:1rem;
}

.em-home .latest-posts-end{
  background:
    radial-gradient(circle at 100% 0%, rgba(91,167,225,.08), transparent 22%),
    linear-gradient(180deg, #f7fbff 0%, #eff5fb 100%);
}

.em-home .latest-posts-end .post-card{
  border-radius: 28px !important;
}

.em-home .latest-posts-end .post-thumb img{
  aspect-ratio: 16 / 9;
}

.em-home .latest-posts-end .post-body{
  padding: 1.55rem !important;
}

.em-home .mission-quote{
  font-size: clamp(1.18rem, 1.55vw, 1.6rem);
}

@media (min-width: 1700px){
  :root{ --container: 1680px; }

  .container,
  .site-container{
    width:min(var(--container), calc(100% - 32px));
  }

  .em-home .container{
    width:min(1800px, calc(100vw - 26px)) !important;
  }

  .em-home .numbers-grid{
    grid-template-columns: repeat(5, minmax(0, 1fr)) !important;
  }
}

@media (max-width: 1320px){
  .em-home .container{
    width:calc(100vw - 20px) !important;
  }

  .em-home .hero-grid{
    grid-template-columns:minmax(0, 1fr) minmax(370px, .85fr) !important;
  }

  .em-home .numbers-grid{
    grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
  }

  .em-home .research-grid,
  .em-home .books-grid,
  .em-home .media-grid,
  .em-home .features-grid,
  .em-home .posts-grid,
  .em-home .editorial-grid,
  .em-home .quick-links,
  .em-home .info-strip{
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 1080px){
  .site-branding-wrap{
    grid-template-columns: 1fr auto;
  }

  .main-navigation{
    grid-column: 1 / -1;
    justify-self: stretch;
  }

  .em-home .hero-grid{
    grid-template-columns: 1fr !important;
  }

  .em-home .hero-copy{
    max-width: none;
  }

  .em-home .hero h1{
    max-width: none;
  }

  .em-home .hero-profile-card{
    max-width: 840px;
    margin-inline: auto;
  }
}

@media (max-width: 760px){
  .container,
  .site-container,
  .em-home .container{
    width: calc(100% - 16px) !important;
  }

  .em-home{
    background:
      linear-gradient(180deg, #06101c 0%, #08192d 18%, #eef4fb 18.01%, #f6f9fd 100%);
  }

  .em-home .hero{
    padding: 34px 0 26px !important;
  }

  .em-home .button,
  .em-home .button-outline{
    width: 100%;
    justify-content: center;
  }

  .em-home .numbers-grid,
  .em-home .research-grid,
  .em-home .books-grid,
  .em-home .media-grid,
  .em-home .features-grid,
  .em-home .posts-grid,
  .em-home .editorial-grid,
  .em-home .quick-links,
  .em-home .info-strip,
  .em-home .profile-meta{
    grid-template-columns: 1fr !important;
  }

  .em-home .stat-card{
    min-height: 0;
  }
}

.home-edwar .container,
.home-edwar .site-container {
  width: min(1420px, calc(100% - 28px));
}

.home-edwar .impact-stats-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 1.15rem;
}

.home-edwar .impact-stat {
  position: relative;
  padding: 1.5rem 1.25rem 1.35rem;
  min-height: 210px;
  border-radius: 26px;
  background: linear-gradient(180deg, #ffffff 0%, #f7fbff 100%);
  border: 1px solid rgba(12, 32, 58, 0.08);
  box-shadow: 0 18px 46px rgba(7, 19, 36, 0.08);
  overflow: hidden;
  text-align: center;
}

.home-edwar .impact-stat::before {
  content: "";
  position: absolute;
  inset: auto -12% -42% auto;
  width: 180px;
  height: 180px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(91,167,225,0.22) 0%, rgba(91,167,225,0) 72%);
  pointer-events: none;
}

.home-edwar .impact-stat-orbit {
  position: relative;
  width: 112px;
  height: 112px;
  margin: 0 auto 1rem;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: radial-gradient(circle at 30% 30%, rgba(255,255,255,0.7) 0%, rgba(255,255,255,0.16) 18%, rgba(18,43,74,0.9) 19%, rgba(8,20,39,1) 100%);
  border: 1px solid rgba(31, 111, 178, 0.18);
  box-shadow: inset 0 0 0 1px rgba(255,255,255,0.06), 0 20px 34px rgba(13, 31, 56, 0.14);
}

.home-edwar .impact-stat-orbit::before,
.home-edwar .impact-stat-orbit::after {
  content: "";
  position: absolute;
  inset: 8px;
  border-radius: 50%;
  border: 1px solid rgba(91, 167, 225, 0.2);
}

.home-edwar .impact-stat-orbit::after {
  inset: -10px;
  border-color: rgba(200, 169, 106, 0.22);
}

.home-edwar .impact-stat-orbit span {
  position: relative;
  z-index: 1;
  font-family: "Playfair Display", Georgia, serif;
  font-size: 2rem;
  line-height: 1;
  color: #ffffff;
}

.home-edwar .impact-stat-label {
  position: relative;
  z-index: 1;
  font-size: 1rem;
  font-weight: 700;
  color: #122741;
}

.academic-credentials-wrap {
  position: relative;
  overflow: hidden;
}

.academic-credentials-wrap::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(255,255,255,0.04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,0.04) 1px, transparent 1px);
  background-size: 36px 36px;
  opacity: 0.14;
  pointer-events: none;
}

.home-edwar .credentials-links {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.8rem;
  margin: 1.6rem 0 2.2rem;
}

.home-edwar .academic-credentials-wrap .button-outline {
  border-color: rgba(255,255,255,0.18);
  color: #ffffff;
}

.home-edwar .academic-credentials-wrap .button-outline:hover {
  background: rgba(255,255,255,0.08);
}

.home-edwar .credentials-orbit-grid {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 1.2rem;
}

.home-edwar .credential-orbit {
  position: relative;
  min-height: 360px;
  padding: 1.6rem 1.35rem 1.5rem;
  text-align: center;
  border-radius: 28px;
  background: linear-gradient(180deg, rgba(255,255,255,0.1) 0%, rgba(255,255,255,0.04) 100%);
  border: 1px solid rgba(255,255,255,0.11);
  box-shadow: 0 24px 56px rgba(4, 13, 25, 0.18);
  backdrop-filter: blur(10px);
  overflow: hidden;
}

.home-edwar .credential-orbit::before {
  content: "";
  position: absolute;
  width: 240px;
  height: 240px;
  left: 50%;
  top: -48px;
  transform: translateX(-50%);
  border-radius: 50%;
  border: 1px solid rgba(255,255,255,0.08);
  opacity: 0.7;
}

.home-edwar .credential-orbit::after {
  content: "";
  position: absolute;
  inset: auto -18% -36% auto;
  width: 210px;
  height: 210px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(91,167,225,0.22) 0%, rgba(91,167,225,0) 72%);
}

.home-edwar .credential-core {
  position: relative;
  width: 138px;
  height: 138px;
  margin: 0 auto 1.2rem;
  border-radius: 50%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  background: radial-gradient(circle at 50% 28%, rgba(255,255,255,0.32) 0%, rgba(255,255,255,0.08) 22%, rgba(8,23,43,1) 23%, rgba(5,14,27,1) 100%);
  border: 1px solid rgba(255,255,255,0.14);
  box-shadow: inset 0 0 0 1px rgba(255,255,255,0.04), 0 22px 36px rgba(0,0,0,0.22);
  z-index: 1;
}

.home-edwar .credential-core::before,
.home-edwar .credential-core::after {
  content: "";
  position: absolute;
  border-radius: 50%;
}

.home-edwar .credential-core::before {
  inset: 10px;
  border: 1px solid rgba(91,167,225,0.24);
}

.home-edwar .credential-core::after {
  inset: -12px;
  border: 1px solid rgba(200,169,106,0.24);
}

.home-edwar .credential-tier {
  position: relative;
  z-index: 1;
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: rgba(255,255,255,0.7);
}

.home-edwar .credential-count {
  position: relative;
  z-index: 1;
  font-family: "Playfair Display", Georgia, serif;
  font-size: 3rem;
  line-height: 1;
  color: #ffffff;
  margin-top: 0.2rem;
}

.home-edwar .credential-axis {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 34px;
  margin-bottom: 0.8rem;
  padding: 0.35rem 0.85rem;
  border-radius: 999px;
  background: rgba(255,255,255,0.08);
  border: 1px solid rgba(255,255,255,0.1);
  color: rgba(255,255,255,0.84);
  font-size: 0.8rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.home-edwar .credential-orbit h3 {
  color: #ffffff;
  margin-bottom: 0.7rem;
}

.home-edwar .credential-orbit p {
  color: rgba(255,255,255,0.84);
  margin: 0;
}

.home-edwar .level-doctorate .credential-core,
.home-edwar .level-specializations .credential-core {
  box-shadow: inset 0 0 0 1px rgba(255,255,255,0.04), 0 22px 36px rgba(200,169,106,0.18);
}

.awards-premium-wrap {
  background: linear-gradient(180deg, #f7fbff 0%, #eef4fb 100%);
}

.home-edwar .awards-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1.25rem;
}

.home-edwar .award-plus-card {
  position: relative;
  min-height: 310px;
  padding: 1.6rem 1.35rem 1.4rem;
  border-radius: 28px;
  background: linear-gradient(180deg, #ffffff 0%, #f8fbff 100%);
  border: 1px solid rgba(12, 32, 58, 0.08);
  box-shadow: 0 18px 44px rgba(7, 19, 36, 0.09);
  overflow: hidden;
}

.home-edwar .award-plus-card::before {
  content: "";
  position: absolute;
  inset: 0 auto auto 0;
  width: 100%;
  height: 6px;
  background: linear-gradient(90deg, rgba(200,169,106,0.95) 0%, rgba(91,167,225,0.95) 100%);
}

.home-edwar .award-plus-card::after {
  content: "";
  position: absolute;
  right: -36px;
  bottom: -52px;
  width: 180px;
  height: 180px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(91,167,225,0.16) 0%, rgba(91,167,225,0) 72%);
}

.home-edwar .award-icon {
  position: relative;
  z-index: 1;
  width: 98px;
  height: 98px;
  margin: 0 0 1.1rem;
  border-radius: 50%;
  display: grid;
  place-items: center;
  color: #ffffff;
  box-shadow: 0 18px 30px rgba(13, 31, 56, 0.14);
}

.home-edwar .award-icon svg {
  width: 46px;
  height: 46px;
}

.home-edwar .award-icon-gold {
  background: linear-gradient(135deg, #9f7b3a 0%, #d8bb82 100%);
}

.home-edwar .award-icon-blue {
  background: linear-gradient(135deg, #123b68 0%, #2f7fc2 100%);
}

.home-edwar .award-plus-card h3 {
  position: relative;
  z-index: 1;
  font-size: 1.45rem;
  margin-bottom: 0.75rem;
}

.home-edwar .award-plus-card p,
.home-edwar .award-plus-card .card-kicker {
  position: relative;
  z-index: 1;
}

@media (max-width: 1180px) {
  .home-edwar .impact-stats-grid,
  .home-edwar .credentials-orbit-grid,
  .home-edwar .awards-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 767px) {
  .home-edwar .impact-stats-grid,
  .home-edwar .credentials-orbit-grid,
  .home-edwar .awards-grid {
    grid-template-columns: 1fr;
  }

  .home-edwar .impact-stat,
  .home-edwar .credential-orbit,
  .home-edwar .award-plus-card {
    min-height: auto;
  }

  .home-edwar .credential-core {
    width: 126px;
    height: 126px;
  }
}


.home-edwar .impact-stat-orbit {
  background: radial-gradient(circle at 32% 28%, rgba(91,167,225,0.22) 0%, rgba(91,167,225,0.08) 15%, rgba(12,31,57,0.96) 16%, rgba(6,16,30,1) 100%);
}

.home-edwar .credential-core {
  background: radial-gradient(circle at 50% 26%, rgba(91,167,225,0.24) 0%, rgba(91,167,225,0.08) 16%, rgba(9,24,45,0.98) 17%, rgba(4,11,22,1) 100%);
}

.home-edwar .books-dark-wrap {
  background:
    radial-gradient(circle at top right, rgba(91, 167, 225, 0.16), transparent 24%),
    radial-gradient(circle at bottom left, rgba(200, 169, 106, 0.10), transparent 22%),
    linear-gradient(180deg, #08111f 0%, #0b1628 100%);
}

.home-edwar .books-grid-premium {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1.4rem;
}

.home-edwar .book-card-premium {
  overflow: hidden;
  padding: 0;
  background: linear-gradient(180deg, rgba(255,255,255,0.08) 0%, rgba(255,255,255,0.04) 100%);
  border: 1px solid rgba(255,255,255,0.10);
  box-shadow: 0 24px 56px rgba(4, 13, 25, 0.20);
  backdrop-filter: blur(12px);
}

.home-edwar .book-card-premium::before {
  background: linear-gradient(90deg, rgba(200,169,106,0.98) 0%, rgba(91,167,225,0.92) 100%);
  height: 5px;
}

.home-edwar .book-cover-wrap {
  position: relative;
  padding: 1.25rem 1.25rem 0;
}

.home-edwar .book-cover-wrap::after {
  content: "";
  position: absolute;
  left: 1.25rem;
  right: 1.25rem;
  bottom: -12px;
  height: 80px;
  background: radial-gradient(circle, rgba(91,167,225,0.18) 0%, rgba(91,167,225,0) 72%);
  pointer-events: none;
}

.home-edwar .book-card-premium img {
  width: 100%;
  aspect-ratio: 5 / 6;
  object-fit: cover;
  object-position: center top;
  border-radius: 18px;
  border: 1px solid rgba(255,255,255,0.08);
  box-shadow: 0 16px 36px rgba(0,0,0,0.26);
  background: rgba(255,255,255,0.03);
}

.home-edwar .book-body {
  padding: 1.35rem 1.35rem 1.45rem;
}

.home-edwar .book-card-premium h3,
.home-edwar .book-card-premium p,
.home-edwar .books-dark-wrap .section-heading h2,
.home-edwar .books-dark-wrap .section-heading p,
.home-edwar .books-dark-wrap .card-kicker {
  color: #ffffff;
}

.home-edwar .book-card-premium p {
  color: rgba(255,255,255,0.82);
}

@media (max-width: 1024px) {
  .home-edwar .books-grid-premium {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 767px) {
  .home-edwar .books-grid-premium {
    grid-template-columns: 1fr;
  }
}


/* =========================================================
   AJUSTES HOME: ÓRBITAS SEM BRILHO BRANCO + MÍDIA PREMIUM
   ========================================================= */
.home-edwar .impact-stat-orbit {
  background: radial-gradient(circle at 50% 50%, rgba(16, 38, 66, 0.98) 0%, rgba(8, 21, 40, 1) 68%, rgba(4, 12, 24, 1) 100%) !important;
  box-shadow: inset 0 0 0 1px rgba(255,255,255,0.04), 0 20px 34px rgba(13, 31, 56, 0.14) !important;
}

.home-edwar .credential-core {
  background: radial-gradient(circle at 50% 50%, rgba(11, 28, 50, 0.98) 0%, rgba(6, 18, 35, 1) 70%, rgba(3, 10, 21, 1) 100%) !important;
  box-shadow: inset 0 0 0 1px rgba(255,255,255,0.04), 0 22px 36px rgba(0,0,0,0.22) !important;
}

.home-edwar .media-premium-section {
  overflow: hidden;
}

.home-edwar .media-premium-section::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(255,255,255,0.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,0.035) 1px, transparent 1px);
  background-size: 42px 42px;
  opacity: 0.2;
  pointer-events: none;
}

.home-edwar .media-premium-grid {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1.4rem;
}

.home-edwar .media-premium-card {
  position: relative;
  padding: 1.45rem;
  border-radius: 28px;
  background: linear-gradient(180deg, rgba(255,255,255,0.10) 0%, rgba(255,255,255,0.05) 100%);
  border: 1px solid rgba(255,255,255,0.12);
  box-shadow: 0 28px 60px rgba(3, 10, 20, 0.22);
  backdrop-filter: blur(12px);
  overflow: hidden;
}

.home-edwar .media-premium-card::before {
  content: "";
  position: absolute;
  inset: 0 0 auto 0;
  height: 4px;
  background: linear-gradient(90deg, rgba(200,169,106,0.95), rgba(91,167,225,0.92));
}

.home-edwar .media-premium-card::after {
  content: "";
  position: absolute;
  right: -70px;
  bottom: -80px;
  width: 210px;
  height: 210px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(91,167,225,0.16) 0%, rgba(91,167,225,0) 72%);
  pointer-events: none;
}

.home-edwar .media-premium-header {
  margin-bottom: 1.15rem;
}

.home-edwar .media-premium-card h3,
.home-edwar .media-premium-card p,
.home-edwar .media-premium-section .section-heading h2,
.home-edwar .media-premium-section .section-heading p,
.home-edwar .media-premium-section .card-kicker {
  color: #ffffff;
}

.home-edwar .media-premium-header p,
.home-edwar .media-caption {
  color: rgba(255,255,255,0.82);
}

.home-edwar .media-video-stack {
  display: grid;
  gap: 1rem;
}

.home-edwar .media-video-item {
  position: relative;
  padding: 1rem;
  border-radius: 22px;
  background: linear-gradient(180deg, rgba(255,255,255,0.07) 0%, rgba(255,255,255,0.03) 100%);
  border: 1px solid rgba(255,255,255,0.08);
}

.home-edwar .media-video-frame {
  border-radius: 18px;
  border: 1px solid rgba(255,255,255,0.08);
  box-shadow: 0 14px 34px rgba(0,0,0,0.24);
  background: #02070d;
}

.home-edwar .media-video-item .media-caption {
  margin: 0.9rem 0 0;
  font-size: 0.97rem;
  line-height: 1.65;
}

@media (max-width: 1024px) {
  .home-edwar .media-premium-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 640px) {
  .home-edwar .media-premium-card,
  .home-edwar .media-video-item {
    padding: 1rem;
  }
}
