/*
Theme Name: Modo História
Theme URI: https://modohistoria.com.br
Author: Modo História
Description: Tema do blog do canal Modo História — visual claro com bordas pretas grossas (neubrutalista), roxo e amarelo da marca, faixa animada com os artigos da semana e colunas de anúncio do AdSense.
Version: 1.0.0
Requires at least: 6.0
Requires PHP: 7.4
License: GNU General Public License v2 or later
Text Domain: modo-historia
*/

/* ---------- Fontes (hospedadas no próprio tema) ---------- */
@font-face {
  font-family: "Inter";
  font-style: normal;
  font-weight: 400 900;
  font-display: swap;
  src: url("assets/fonts/inter-latin.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "Inter";
  font-style: normal;
  font-weight: 400 900;
  font-display: swap;
  src: url("assets/fonts/inter-latin-ext.woff2") format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
/* Sublima: fonte de exibição, usada só na logo */
@font-face {
  font-family: "Sublima";
  src: url("assets/fonts/Sublima-ExtraLight.otf") format("opentype");
  font-weight: 200;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Sublima";
  src: url("assets/fonts/Sublima-ExtraBold.otf") format("opentype");
  font-weight: 800;
  font-style: normal;
  font-display: swap;
}

/* ---------- Cores da marca ---------- */
:root {
  /* Site é só modo claro: impede o navegador do celular de escurecer sozinho */
  color-scheme: light;

  --mh-bg: #fcfbf8;
  --mh-ink: #17151d;
  --mh-primary: #7e2ee7;
  --mh-primary-dark: #6423ba;
  --mh-secondary: #fec601;
  --mh-muted-1: #4a4653;
  --mh-muted-2: #6b6674;
  --mh-muted-3: #7a7583;
  --mh-muted-4: #a29cad;
  --mh-panel: #efecf3;
  --mh-line: rgba(23, 21, 29, 0.06);
  --mh-max: 72rem;
  --mh-font: "Inter", ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
}
@supports (color: oklch(0.985 0.003 90)) {
  :root {
    --mh-bg: oklch(0.985 0.003 90);
  }
}

/* ---------- Base ---------- */
*,
*::before,
*::after {
  box-sizing: border-box;
}
html {
  -webkit-text-size-adjust: 100%;
}
body {
  margin: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background: var(--mh-bg);
  color: var(--mh-ink);
  font-family: var(--mh-font);
  font-size: 16px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}
h1, h2, h3, h4, h5, h6, p, figure, blockquote {
  margin: 0;
  font-size: inherit;
  font-weight: inherit;
}
a {
  color: inherit;
  text-decoration: none;
}
img {
  display: block;
  max-width: 100%;
  height: auto;
}
::selection {
  background: var(--mh-secondary);
  color: var(--mh-ink);
}
.screen-reader-text {
  position: absolute !important;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
}
.mh-main {
  flex: 1;
}
.mh-container {
  width: 100%;
  max-width: var(--mh-max);
  margin: 0 auto;
  padding-left: 24px;
  padding-right: 24px;
}
.mh-scroll {
  scrollbar-width: none;
  -ms-overflow-style: none;
}
.mh-scroll::-webkit-scrollbar {
  display: none;
}

/* ---------- Faixa animada ---------- */
.mh-marquee {
  overflow: hidden;
  white-space: nowrap;
  background: var(--mh-primary);
  color: #fff;
  padding: 8px 0;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.025em;
}
.mh-marquee__track {
  display: inline-block;
  animation: mh-marquee 24s linear infinite;
}
.mh-marquee a:hover {
  text-decoration: underline;
}
.mh-marquee__sep {
  margin: 0 12px;
}
@keyframes mh-marquee {
  from { transform: translateX(0); }
  to { transform: translateX(-50%); }
}

/* ---------- Cabeçalho ---------- */
.mh-header {
  padding-top: 24px;
  padding-bottom: 24px;
}
.mh-header__row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}
.mh-logo {
  display: flex;
  flex-shrink: 0;
  align-items: center;
  gap: 10px;
}
.mh-logo__mark {
  display: flex;
  width: 32px;
  height: 32px;
  align-items: center;
  justify-content: center;
  border-radius: 8px;
  background: var(--mh-ink);
  transform: rotate(-6deg);
}
.mh-logo__mark span {
  width: 10px;
  height: 10px;
  border-radius: 3px;
  background: var(--mh-secondary);
}
.mh-logo__text {
  font-family: "Sublima", var(--mh-font);
  font-size: 20px;
  line-height: 28px;
  font-weight: 800;
  letter-spacing: -0.025em;
  color: var(--mh-ink);
}
.mh-nav {
  display: none;
  min-width: 0;
  flex: 1;
  align-items: center;
  justify-content: center;
  gap: 32px;
  overflow-x: auto;
}
.mh-nav a {
  flex-shrink: 0;
  font-size: 15px;
  font-weight: 600;
  color: var(--mh-ink);
  transition: color 0.15s;
}
.mh-nav a:hover {
  color: var(--mh-primary);
}
.mh-nav--mobile {
  display: flex;
  margin-top: 16px;
  align-items: center;
  justify-content: center;
  gap: 24px;
  overflow-x: auto;
}
.mh-nav--mobile a {
  flex-shrink: 0;
  font-size: 14px;
  font-weight: 600;
  color: var(--mh-ink);
}
.mh-nav--mobile a:hover {
  color: var(--mh-primary);
}
.mh-yt {
  display: flex;
  flex-shrink: 0;
  align-items: center;
  gap: 8px;
  border: 2px solid var(--mh-ink);
  border-radius: 9999px;
  background: #fff;
  padding: 10px 20px;
  font-size: 14px;
  font-weight: 700;
  color: var(--mh-ink);
  transition: background 0.15s, color 0.15s;
}
.mh-yt:hover {
  background: var(--mh-ink);
  color: #fff;
}
.mh-yt svg {
  width: 16px;
  height: 16px;
}

/* ---------- Hero ---------- */
.mh-hero {
  padding-top: 16px;
  padding-bottom: 56px;
}
.mh-hero__grid {
  display: grid;
  grid-template-columns: 1fr;
  align-items: center;
  gap: 40px;
}
.mh-hero__badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  border-radius: 9999px;
  background: var(--mh-secondary);
  padding: 6px 14px;
  font-size: 12px;
  line-height: 16px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.025em;
  color: var(--mh-ink);
}
.mh-hero__title {
  margin-top: 20px;
  font-size: 38px;
  font-weight: 900;
  line-height: 1.05;
  letter-spacing: -0.025em;
  color: var(--mh-ink);
}
.mh-hero__title a:hover {
  color: var(--mh-primary);
}
.mh-hero__excerpt {
  margin-top: 20px;
  max-width: 32rem;
  font-size: 17px;
  line-height: 1.625;
  color: var(--mh-muted-1);
}
.mh-hero__actions {
  margin-top: 28px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 16px;
}
.mh-btn {
  display: inline-block;
  border-radius: 9999px;
  background: var(--mh-ink);
  padding: 14px 28px;
  font-size: 15px;
  font-weight: 700;
  color: #fff;
  transition: opacity 0.15s;
}
.mh-btn:hover {
  opacity: 0.9;
}
.mh-hero__time {
  font-size: 14px;
  font-weight: 600;
  color: var(--mh-muted-3);
}
.mh-hero__media {
  position: relative;
}
.mh-hero__img {
  position: relative;
  display: block;
  aspect-ratio: 4 / 3;
  overflow: hidden;
  border: 3px solid var(--mh-ink);
  border-radius: 20px;
  background: var(--mh-panel);
}
.mh-hero__img img,
.mh-card__img img,
.mh-related__img img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.mh-hero__score {
  position: absolute;
  right: -16px;
  bottom: -16px;
  transform: rotate(4deg);
  border: 3px solid var(--mh-ink);
  border-radius: 16px;
  background: var(--mh-secondary);
  padding: 12px 18px;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
  color: var(--mh-ink);
}
.mh-hero__score strong {
  font-size: 20px;
  font-weight: 900;
}
.mh-hero__score span {
  font-size: 12px;
  font-weight: 700;
}

/* ---------- Filtro de categorias ---------- */
.mh-filter {
  display: flex;
  align-items: center;
  gap: 12px;
  overflow-x: auto;
  border-bottom: 2px solid var(--mh-line);
  padding-bottom: 28px;
}
.mh-pill {
  flex-shrink: 0;
  border: 2px solid var(--mh-ink);
  border-radius: 9999px;
  background: #fff;
  padding: 8px 18px;
  font-size: 14px;
  font-weight: 700;
  color: var(--mh-ink);
  transition: background 0.15s, color 0.15s;
}
.mh-pill:hover {
  background: var(--mh-ink);
  color: #fff;
}
.mh-pill.is-active {
  background: var(--mh-primary);
  color: #fff;
}

/* ---------- Seções e grade ---------- */
.mh-section {
  padding-top: 40px;
  padding-bottom: 40px;
}
.mh-h2 {
  margin-bottom: 28px;
  font-size: 26px;
  font-weight: 800;
  letter-spacing: -0.025em;
  color: var(--mh-ink);
}
.mh-layout {
  display: grid;
  grid-template-columns: 1fr;
  align-items: start;
  gap: 40px;
}
.mh-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 32px;
}
.mh-aside {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 24px;
}
.mh-empty {
  padding-top: 64px;
  padding-bottom: 64px;
  text-align: center;
  color: var(--mh-muted-2);
}

/* ---------- Card de artigo ---------- */
.mh-card {
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.mh-card__img {
  position: relative;
  display: block;
  aspect-ratio: 16 / 10;
  overflow: hidden;
  border: 2px solid var(--mh-ink);
  border-radius: 16px;
  background: var(--mh-panel);
}
.mh-card__img img {
  transition: transform 0.3s;
}
.mh-card__img:hover img {
  transform: scale(1.05);
}
.mh-card__meta {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  line-height: 16px;
}
.mh-card__cat {
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.025em;
  color: var(--mh-primary);
}
.mh-card__dot {
  color: var(--mh-muted-4);
}
.mh-card__time {
  font-weight: 600;
  color: var(--mh-muted-3);
}
.mh-card__title {
  font-size: 19px;
  font-weight: 800;
  line-height: 1.25;
  letter-spacing: -0.025em;
  color: var(--mh-ink);
}
.mh-card__title a:hover {
  color: var(--mh-primary);
}
.mh-card__excerpt {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  font-size: 14px;
  line-height: 1.625;
  color: var(--mh-muted-2);
}

/* ---------- Anúncios ---------- */
.mh-ad {
  text-align: center;
}
.mh-ad__label {
  display: block;
  margin-bottom: 8px;
  font-size: 10px;
  line-height: 16px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.025em;
  opacity: 0.4;
}

/* ---------- Página de artigo ---------- */
.mh-single {
  padding-top: 40px;
  padding-bottom: 40px;
}
.mh-single__layout {
  display: block;
}
.mh-single__meta {
  margin-bottom: 20px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
  font-size: 14px;
}
.mh-single__meta .mh-card__cat {
  font-size: 12px;
}
.mh-single__title {
  margin-bottom: 24px;
  font-size: 32px;
  font-weight: 900;
  line-height: 1.25;
  letter-spacing: -0.025em;
  color: var(--mh-ink);
}
.mh-single__cover {
  margin-bottom: 32px;
  width: 100%;
  border: 2px solid var(--mh-ink);
  border-radius: 16px;
  object-fit: cover;
}
.mh-tags {
  margin-top: 32px;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.mh-tag {
  border: 2px solid var(--mh-ink);
  border-radius: 9999px;
  padding: 4px 12px;
  font-size: 12px;
  font-weight: 600;
  color: var(--mh-ink);
  transition: background 0.15s, color 0.15s;
}
.mh-tag:hover {
  background: var(--mh-ink);
  color: #fff;
}
.mh-single__yt {
  margin-top: 40px;
}
.mh-single__aside {
  margin-top: 56px;
}
.mh-single__aside-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 40px;
}
.mh-related {
  width: 100%;
}
.mh-related__title {
  margin-bottom: 20px;
  font-size: 18px;
  font-weight: 800;
  color: var(--mh-ink);
}
.mh-related__list {
  display: flex;
  flex-direction: column;
  gap: 24px;
}
.mh-related__img {
  position: relative;
  display: block;
  width: 100%;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  border: 2px solid var(--mh-ink);
  border-radius: 12px;
  background: var(--mh-panel);
}
.mh-related__img img {
  transition: transform 0.3s;
}
.mh-related__item:hover img {
  transform: scale(1.05);
}
.mh-related__name {
  margin-top: 12px;
  font-size: 16px;
  font-weight: 700;
  line-height: 1.375;
  color: var(--mh-ink);
}
.mh-related__item:hover .mh-related__name {
  color: var(--mh-primary);
}
.mh-related__date {
  display: block;
  margin-top: 4px;
  font-size: 12px;
  color: var(--mh-muted-4);
}

/* Texto do artigo */
.mh-content {
  font-size: 18px;
  line-height: 1.75;
  color: #2a2733;
}
.mh-content > * + * {
  margin-top: 1.25em;
}
.mh-content h2 {
  margin-top: 2em;
  font-size: 28px;
  font-weight: 800;
  line-height: 1.25;
  letter-spacing: -0.02em;
  color: var(--mh-ink);
}
.mh-content h3 {
  margin-top: 1.75em;
  font-size: 22px;
  font-weight: 800;
  line-height: 1.3;
  color: var(--mh-ink);
}
.mh-content a {
  color: var(--mh-primary);
  text-decoration: underline;
  text-underline-offset: 3px;
}
.mh-content a:hover {
  color: var(--mh-primary-dark);
}
.mh-content ul,
.mh-content ol {
  padding-left: 1.5em;
}
.mh-content li + li {
  margin-top: 0.4em;
}
.mh-content blockquote {
  border-left: 4px solid var(--mh-primary);
  padding-left: 20px;
  font-style: italic;
  color: var(--mh-muted-1);
}
.mh-content img {
  border: 2px solid var(--mh-ink);
  border-radius: 16px;
}
.mh-content figure img {
  width: 100%;
}
.mh-content figcaption {
  margin-top: 8px;
  text-align: center;
  font-size: 14px;
  color: var(--mh-muted-3);
}
.mh-content strong {
  font-weight: 700;
  color: var(--mh-ink);
}
.mh-content code {
  border-radius: 6px;
  background: var(--mh-panel);
  padding: 2px 6px;
  font-size: 0.9em;
}
.mh-content iframe,
.mh-content video {
  max-width: 100%;
  border-radius: 16px;
}
.mh-content .wp-block-embed__wrapper {
  position: relative;
}
.mh-content .wp-has-aspect-ratio iframe {
  width: 100%;
  aspect-ratio: 16 / 9;
  height: auto;
}

/* ---------- Páginas de arquivo e simples ---------- */
.mh-archive-title {
  margin-bottom: 32px;
  font-size: 26px;
  font-weight: 800;
  letter-spacing: -0.025em;
  color: var(--mh-ink);
}
.mh-pagination {
  margin-top: 48px;
}
.mh-pagination .nav-links {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px;
}
.mh-pagination .page-numbers {
  border: 2px solid var(--mh-ink);
  border-radius: 9999px;
  background: #fff;
  padding: 8px 16px;
  font-size: 14px;
  font-weight: 700;
  color: var(--mh-ink);
}
.mh-pagination a.page-numbers:hover {
  background: var(--mh-ink);
  color: #fff;
}
.mh-pagination .page-numbers.current {
  background: var(--mh-primary);
  color: #fff;
}
.mh-notfound {
  padding-top: 96px;
  padding-bottom: 96px;
  text-align: center;
}
.mh-notfound .mh-single__title {
  margin-bottom: 16px;
}
.mh-notfound p {
  margin-bottom: 28px;
  color: var(--mh-muted-2);
}

/* ---------- Rodapé ---------- */
.mh-cta-wrap {
  padding-bottom: 40px;
}
.mh-cta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 32px;
  border-radius: 24px;
  background: var(--mh-ink);
  padding: 32px;
}
.mh-cta h3 {
  font-size: 24px;
  font-weight: 800;
  letter-spacing: -0.025em;
  color: #fff;
}
.mh-cta p {
  margin-top: 8px;
  max-width: 28rem;
  font-size: 15px;
  color: var(--mh-muted-4);
}
.mh-cta__btn {
  flex-shrink: 0;
  border-radius: 9999px;
  background: var(--mh-secondary);
  padding: 14px 24px;
  font-size: 15px;
  font-weight: 800;
  color: var(--mh-ink);
  transition: opacity 0.15s;
}
.mh-cta__btn:hover {
  opacity: 0.9;
}
.mh-footer {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding-bottom: 40px;
}
.mh-footer span {
  font-size: 13px;
  color: var(--mh-muted-4);
}
.mh-footer a {
  font-size: 13px;
  font-weight: 600;
  color: var(--mh-muted-2);
}
.mh-footer a:hover {
  color: var(--mh-ink);
}

/* ---------- Telas maiores ---------- */
@media (min-width: 640px) {
  .mh-container {
    padding-left: 48px;
    padding-right: 48px;
  }
  .mh-marquee {
    font-size: 13px;
  }
  .mh-nav {
    display: flex;
  }
  .mh-nav--mobile {
    display: none;
  }
  .mh-hero {
    padding-bottom: 64px;
  }
  .mh-hero__title {
    font-size: 46px;
  }
  .mh-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .mh-grid--3 {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .mh-single__title {
    font-size: 42px;
  }
  .mh-cta {
    padding: 48px;
  }
  .mh-cta h3 {
    font-size: 26px;
  }
}
@media (min-width: 1024px) {
  .mh-hero__grid {
    grid-template-columns: 1.1fr 0.9fr;
    gap: 56px;
  }
  .mh-hero__title {
    font-size: 54px;
  }
  .mh-layout {
    grid-template-columns: 1fr 300px;
  }
  .mh-aside {
    position: sticky;
    top: 24px;
  }
  .mh-grid--3 {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
  .mh-single__layout {
    display: grid;
    grid-template-columns: 1fr 300px;
    align-items: start;
    gap: 56px;
  }
  .mh-single__aside {
    margin-top: 0;
  }
  .mh-single__aside-inner {
    position: sticky;
    top: 24px;
  }
}
@media (prefers-reduced-motion: reduce) {
  .mh-marquee__track {
    animation: none;
  }
}
