/* =========================================================
   Materiais (/blog/) — hub Ouse (tokens alinhados à home)
   ========================================================= */

.os-materiais {
  --os-gold: #c6a04a;
  --os-gold-hover: #b08d3d;
  --os-ink: #1f2220;
  --os-muted: #7a7e7b;
  --os-cream: #f6f1e8;
  --os-line: #e8e4dc;
  --os-radius: 16px;
  --os-max: 1440px;
  color: var(--os-ink);
  margin: 0 0 3rem;
}

.os-materiais .os-shell {
  max-width: var(--os-max);
  margin: 0 auto;
  padding: 0 1.5rem;
  box-sizing: border-box;
}

/* ---- Hero (alinhado ao shell) ---- */
.os-mat-hero {
  background: transparent;
  padding: 0;
  margin: 0 0 1.25rem;
  border-radius: 0;
}

.os-mat-hero__panel {
  background: var(--os-cream);
  border-radius: 16px;
  padding: 2rem 1.5rem 1.75rem;
  box-sizing: border-box;
}

.os-mat-hero__eyebrow {
  display: inline-block;
  margin: 0 0 0.65rem;
  padding: 0.28rem 0.7rem;
  border-radius: 999px;
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--os-ink);
  background: #fff;
  border: 1px solid var(--os-line);
}

.os-mat-hero__title {
  margin: 0 0 0.65rem;
  max-width: 22ch;
  font-size: clamp(1.65rem, 3.2vw, 2.45rem);
  line-height: 1.12;
  font-weight: 700;
  color: var(--os-ink);
  letter-spacing: -0.02em;
}

.os-mat-hero__lead {
  margin: 0 0 1.25rem;
  max-width: 54ch;
  font-size: 1rem;
  line-height: 1.55;
  color: var(--os-muted);
}

.os-mat-hero__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem;
}

/* ---- Axes / chips ---- */
.os-mat-axes {
  margin: 0 0 1.5rem;
}

.os-mat-axes__label {
  margin: 0 0 0.5rem;
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--os-muted);
}

.os-mat-axes__list {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
}

.os-mat-chip {
  display: inline-flex;
  align-items: center;
  padding: 0.42rem 0.85rem;
  border-radius: 999px;
  border: 1px solid var(--os-line);
  background: #fff;
  color: var(--os-ink);
  font-size: 0.82rem;
  font-weight: 600;
  text-decoration: none;
  line-height: 1.3;
}

.os-mat-chip:hover,
.os-mat-chip:focus {
  border-color: #d9d2c8;
  color: var(--os-gold);
  text-decoration: none;
}

.os-mat-chip.is-active {
  background: #faf4ef;
  border-color: #e8cbb8;
  color: var(--secundario, #d16633);
}

/* ---- Featured ---- */
.os-mat-featured {
  display: grid;
  grid-template-columns: 1.35fr 1fr;
  gap: 0.85rem;
  margin: 0 0 1.75rem;
  padding: 0.75rem;
  border-radius: var(--os-radius);
  background: var(--os-cream);
}

.os-mat-featured__side {
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
}

.os-mat-feature {
  background: #fff;
  border-radius: 12px;
  overflow: hidden;
  border: 1px solid var(--os-line);
  height: 100%;
  display: flex;
  flex-direction: column;
}

.os-mat-feature__media {
  display: block;
  line-height: 0;
}

.os-mat-feature__media img,
.os-mat-fallback {
  display: block;
  width: 100%;
  height: 180px;
  object-fit: cover;
}

.os-mat-feature--lg .os-mat-feature__media img,
.os-mat-feature--lg .os-mat-fallback {
  height: 320px;
}

.os-mat-fallback {
  background: linear-gradient(135deg, #e8e4dc, #f6f1e8);
}

.os-mat-fallback--sm {
  height: 160px;
}

.os-mat-feature__body {
  padding: 0.85rem 1rem 1rem;
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  flex: 1;
}

.os-mat-feature__title {
  margin: 0;
  font-size: 1.05rem;
  line-height: 1.3;
  font-weight: 700;
}

.os-mat-feature--lg .os-mat-feature__title {
  font-size: 1.35rem;
}

.os-mat-feature__title a {
  color: var(--os-ink);
  text-decoration: none;
}

.os-mat-feature__title a:hover {
  color: var(--os-gold);
}

.os-mat-feature__excerpt {
  margin: 0;
  font-size: 0.9rem;
  line-height: 1.5;
  color: var(--os-muted);
}

.os-mat-tag {
  display: inline-flex;
  align-self: flex-start;
  padding: 0.22rem 0.55rem;
  border-radius: 999px;
  background: var(--os-cream);
  color: var(--os-ink);
  font-size: 0.68rem;
  font-weight: 700;
  text-decoration: none;
  letter-spacing: 0.02em;
}

.os-mat-meta {
  margin: 0.25rem 0 0;
  font-size: 0.78rem;
  color: var(--os-muted);
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  align-items: center;
}

/* ---- Latest + aside ---- */
.os-mat-latest {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 280px;
  gap: 1.75rem;
  align-items: start;
}

.os-mat-latest__head {
  margin: 0 0 1rem;
}

.os-mat-latest__head h2 {
  margin: 0 0 0.35rem;
  font-size: 1.35rem;
  font-weight: 700;
  color: var(--os-ink);
}

.os-mat-latest__sub {
  margin: 0;
  color: var(--os-muted);
  font-size: 0.92rem;
}

.os-mat-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem;
}

.os-mat-card {
  background: #fff;
  border: 1px solid var(--os-line);
  border-radius: 12px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.os-mat-card__media {
  display: block;
  line-height: 0;
}

.os-mat-card__media img {
  display: block;
  width: 100%;
  height: 160px;
  object-fit: cover;
}

.os-mat-card__body {
  padding: 0.85rem 1rem 1rem;
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  flex: 1;
}

.os-mat-card__title {
  margin: 0;
  font-size: 1rem;
  line-height: 1.3;
  font-weight: 700;
}

.os-mat-card__title a {
  color: var(--os-ink);
  text-decoration: none;
}

.os-mat-card__title a:hover {
  color: var(--os-gold);
}

.os-mat-card__excerpt {
  margin: 0;
  font-size: 0.86rem;
  line-height: 1.45;
  color: var(--os-muted);
  flex: 1;
}

.os-mat-aside {
  position: sticky;
  top: 1rem;
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
}

.os-mat-aside__card {
  background: #fff;
  border: 1px solid var(--os-line);
  border-radius: 12px;
  padding: 1rem 1.1rem;
}

.os-mat-aside__card h3,
.os-mat-aside__card h4 {
  margin: 0 0 0.55rem;
  font-size: 1rem;
  font-weight: 700;
  color: var(--os-ink);
}

.os-mat-aside__card h4 {
  font-size: 0.88rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--os-muted);
}

.os-mat-aside__card p {
  margin: 0 0 0.85rem;
  font-size: 0.88rem;
  line-height: 1.45;
  color: var(--os-muted);
}

.os-mat-aside__actions {
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
}

.os-mat-aside__actions .os-btn,
.os-mat-aside__card > .os-btn {
  text-align: center;
  justify-content: center;
}

.os-mat-aside-list {
  list-style: none;
  margin: 0;
  padding: 0;
}

.os-mat-aside-list li + li {
  margin-top: 0.65rem;
  padding-top: 0.65rem;
  border-top: 1px solid var(--os-line);
}

.os-mat-aside-list a {
  display: flex;
  gap: 0.65rem;
  align-items: flex-start;
  text-decoration: none;
  color: inherit;
}

.os-mat-aside-list img,
.os-mat-aside-list__thumb {
  width: 64px;
  height: 48px;
  object-fit: cover;
  border-radius: 6px;
  flex: 0 0 auto;
  background: var(--os-cream);
}

.os-mat-aside-list strong {
  display: block;
  font-size: 0.84rem;
  line-height: 1.3;
  color: var(--os-ink);
}

.os-mat-aside-list small {
  color: var(--os-muted);
  font-size: 0.72rem;
}

.os-mat-tagcloud {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
}

.os-mat-tagcloud a {
  display: inline-flex;
  gap: 0.25rem;
  padding: 0.35rem 0.65rem;
  border-radius: 999px;
  border: 1px solid var(--os-line);
  background: var(--os-cream);
  color: var(--os-ink);
  font-size: 0.78rem;
  font-weight: 600;
  text-decoration: none;
}

.os-mat-tagcloud a:hover {
  color: var(--os-gold);
}

.os-mat-tagcloud--lg a {
  font-size: 0.88rem;
  padding: 0.5rem 0.9rem;
}

.os-mat-keywords {
  max-width: 720px;
}

/* ---- Empty ---- */
.os-mat-empty {
  grid-column: 1 / -1;
  padding: 1.5rem 1.35rem;
  border-radius: 12px;
  border: 1px dashed #d9d2c8;
  background: #fff;
}

.os-mat-empty--soft {
  background: var(--os-cream);
  border-style: solid;
  border-color: var(--os-line);
}

.os-mat-empty h3 {
  margin: 0 0 0.45rem;
  font-size: 1.1rem;
}

.os-mat-empty p,
.os-mat-empty__hint {
  margin: 0 0 1rem;
  color: var(--os-muted);
  font-size: 0.92rem;
  line-height: 1.5;
}

.os-mat-empty__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

/* ---- Post detail ---- */
.os-materiais--post .os-mat-body {
  max-width: 820px;
}

.os-mat-breadcrumbs ol {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  list-style: none;
  margin: 0 0 1.25rem;
  padding: 0;
  font-size: 0.82rem;
  color: var(--os-muted);
}

.os-mat-breadcrumbs li:not(:last-child)::after {
  content: "/";
  margin-left: 0.35rem;
  color: #c4c0b8;
}

.os-mat-breadcrumbs a {
  color: var(--os-muted);
  text-decoration: none;
}

.os-mat-breadcrumbs a:hover {
  color: var(--os-gold);
}

.os-mat-post {
  display: flex;
  flex-direction: column;
  gap: 0;
}

.os-mat-post__header {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.9rem;
  margin: 0 0 1.75rem;
  padding: 0 0 1.5rem;
  border-bottom: 1px solid var(--os-line);
}

.os-mat-post__header .os-mat-tag {
  margin: 0;
}

.os-mat-post__header h1 {
  margin: 0;
  font-size: clamp(1.55rem, 3vw, 2.2rem);
  line-height: 1.2;
  font-weight: 700;
  letter-spacing: -0.02em;
}

.os-mat-post__summary {
  margin: 0;
  font-size: 1.05rem;
  line-height: 1.55;
  color: var(--os-muted);
}

.os-mat-post__header .os-mat-meta {
  margin: 0;
}

.os-mat-post__keywords {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  margin: 0.15rem 0 0;
}

.os-mat-post__keywords a {
  display: inline-flex;
  padding: 0.35rem 0.75rem;
  border-radius: 999px;
  border: 1px solid var(--os-line);
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--os-ink);
  text-decoration: none;
  line-height: 1.3;
}

.os-mat-post__keywords a:hover {
  border-color: #d9d2c8;
  color: var(--os-gold);
}

.os-mat-post__cover {
  margin: 0 0 1.75rem;
}

.os-mat-post__cover img {
  display: block;
  width: 100%;
  height: auto;
  max-height: 420px;
  object-fit: cover;
  border-radius: 12px;
}

.os-mat-post__body {
  margin-top: 0.25rem;
  font-size: 1.05rem;
  line-height: 1.75;
  color: #2a2d2b;
}

.os-mat-post__body h2 {
  margin: 1.75rem 0 0.65rem;
  font-size: 1.35rem;
  font-weight: 700;
}

.os-mat-post__body p {
  margin: 0 0 1rem;
}

.os-mat-post__body p.is-empty {
  display: none;
}

.os-mat-post__body img {
  max-width: 100%;
  height: auto;
  border-radius: 8px;
}

.os-mat-post__cta {
  margin: 2rem 0 0;
  padding: 1.25rem 1.35rem;
  border-radius: 12px;
  background: var(--os-cream);
  border: 1px solid var(--os-line);
}

.os-mat-post__cta h2 {
  margin: 0 0 0.4rem;
  font-size: 1.15rem;
}

.os-mat-post__cta p {
  margin: 0 0 0.85rem;
  color: var(--os-muted);
  font-size: 0.92rem;
}

.os-mat-post__cta-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.os-mat-related {
  margin: 2.5rem 0 0;
}

.os-mat-related h2 {
  margin: 0 0 1rem;
  font-size: 1.25rem;
}

.os-mat-related__grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1rem;
}

.os-mat-pagination {
  margin-top: 1.5rem;
}

/* ---- Responsive ---- */
@media (max-width: 980px) {
  .os-mat-featured {
    grid-template-columns: 1fr;
  }

  .os-mat-feature--lg .os-mat-feature__media img,
  .os-mat-feature--lg .os-mat-fallback {
    height: 220px;
  }

  .os-mat-latest {
    grid-template-columns: 1fr;
  }

  .os-mat-aside {
    position: static;
  }

  .os-mat-related__grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 640px) {
  .os-mat-grid {
    grid-template-columns: 1fr;
  }

  .os-mat-hero {
    margin-bottom: 1rem;
  }

  .os-mat-hero__panel {
    padding: 1.35rem 1rem 1.25rem;
    border-radius: 12px;
  }

  .os-materiais .os-shell {
    padding: 0 1rem;
  }
}
