/* Blog listing and article templates — Dentoveda design system. */
.blog-page.dv-home,
.blog-article-page.dv-home {
  --blog-ink: #413329;
  --blog-muted: #756f67;
  --blog-gold: #8e6d3e;
  --blog-line: #d3c8b8;
  --blog-paper: #fbf9f5;
  --blog-cream: #f1ece3;
  background: var(--blog-paper);
  color: var(--blog-ink);
}

.blog-page.dv-home main,
.blog-article-page.dv-home main {
  overflow: hidden;
  background: var(--blog-paper);
}

.blog-shell {
  width: min(100% - 176px, 1200px);
  margin-inline: auto;
}

.blog-page main section,
.blog-article-page main section,
.blog-article-page article {
  scroll-margin-top: 96px;
}

.blog-page main :is(h1, h2, h3, p),
.blog-article-page main :is(h1, h2, h3, p) {
  text-wrap: balance;
}

.blog-page main :is(h1, h2, h3),
.blog-article-page main :is(h1, h2, h3) {
  color: var(--blog-ink);
  font-family: var(--font-body);
}

.blog-page main :is(h1, h2) em,
.blog-article-page main :is(h1, h2) em {
  color: var(--blog-gold);
  font-family: var(--font-body);
  font-style: normal;
  font-weight: 500;
}

/* Listing hero */
.blog-hero {
  position: relative;
  padding: clamp(42px, 5vw, 66px) 0 clamp(54px, 6vw, 78px);
  overflow: clip;
  background:
    radial-gradient(circle at 78% 25%, rgba(255, 255, 255, .94), transparent 34%),
    linear-gradient(135deg, #f8f5ef, var(--blog-cream));
}

.blog-hero__grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(420px, .88fr);
  gap: clamp(42px, 6vw, 78px);
  align-items: center;
  min-height: 430px;
}

.blog-hero__content {
  position: relative;
  z-index: 3;
  max-width: 650px;
}

.blog-hero h1 {
  max-width: 10em;
  margin: 0;
  font-size: clamp(2.6rem, 4.2vw, 4.2rem);
  font-weight: 500;
  line-height: 1.08;
  letter-spacing: -.03em;
}

.blog-hero h1 span,
.blog-hero h1 em {
  display: block;
}

.blog-hero__content > p {
  max-width: 590px;
  margin: 20px 0 0;
  color: var(--blog-muted);
  font-size: 1.05rem;
  line-height: 1.7;
}

.blog-hero__actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 14px 24px;
  margin-top: 26px;
}

.blog-hero__media {
  position: relative;
  min-height: 420px;
}

.blog-hero__image {
  position: absolute;
  margin: 0;
  overflow: hidden;
  border: 7px solid #fff;
  border-radius: 20px;
  background: #e4ddd1;
  box-shadow: 0 18px 42px rgba(65, 51, 41, .12);
}

.blog-hero__image--main {
  inset: 0 8% 24px 0;
}

.blog-hero__image--detail {
  right: 0;
  bottom: 0;
  width: 34%;
  aspect-ratio: 4 / 5;
  transform: rotate(2deg);
}

.blog-hero__image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 700ms var(--ease-standard);
}

.blog-hero__image--main img { object-position: center; }
.blog-hero__image--detail img { object-position: center 45%; }

.blog-hero__badge {
  position: absolute;
  top: 26px;
  right: 0;
  z-index: 2;
  min-height: 38px;
  display: inline-flex;
  align-items: center;
  gap: 9px;
  padding: 7px 12px;
  border: 1px solid var(--blog-line);
  border-radius: 999px;
  background: rgba(251, 249, 245, .95);
  box-shadow: 0 8px 22px rgba(65, 51, 41, .08);
  color: var(--blog-muted);
  font-size: .68rem;
  font-weight: 600;
}

.blog-hero__badge-mark {
  color: var(--blog-gold);
  font-weight: 700;
}

/* Listing sections */
.blog-section {
  padding: clamp(56px, 5vw, 80px) 0;
}

.blog-section--dark {
  background: #2b241e;
  color: #f7f3ec;
}

.blog-section--dark :is(h2, h3) { color: #f7f3ec; }
.blog-section--dark p { color: #d7cfc3; }
.blog-section--dark .dv-kicker { color: #d8c39d; }

.blog-section-heading {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(280px, .58fr);
  gap: 24px clamp(36px, 5vw, 64px);
  align-items: end;
  margin-bottom: 32px;
}

.blog-section-heading h2 {
  max-width: 12em;
  margin: 0;
  font-size: clamp(2rem, 3.4vw, 3.3rem);
  font-weight: 500;
  line-height: 1.15;
  letter-spacing: -.025em;
}

.blog-section-heading h2 span,
.blog-section-heading h2 em {
  display: block;
}

.blog-section-heading > p {
  max-width: 520px;
  margin: 0 0 4px;
  color: var(--blog-muted);
  line-height: 1.7;
}

.blog-featured,
.blog-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 20px;
}

.blog-card {
  min-width: 0;
  overflow: hidden;
  border: 1px solid var(--blog-line);
  border-radius: 18px;
  background: var(--blog-paper);
  box-shadow: 0 10px 28px rgba(65, 51, 41, .05);
  transition: transform 340ms var(--ease-standard), border-color 300ms ease, box-shadow 340ms var(--ease-standard);
}

.blog-card[hidden] { display: none; }

.blog-card__linkbox {
  height: 100%;
  display: flex;
  flex-direction: column;
  color: inherit;
}

.blog-card__media {
  display: block;
  aspect-ratio: 16 / 10;
  overflow: hidden;
  background: #e4ddd1;
}

.blog-card__media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 700ms var(--ease-standard);
}

.blog-card__body {
  flex: 1;
  display: flex;
  flex-direction: column;
  padding: 22px;
}

.blog-card__meta {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 12px;
  margin-bottom: 12px;
  color: var(--blog-muted);
  font-size: .66rem;
  font-weight: 600;
  letter-spacing: .04em;
}

.blog-card__meta span:first-child {
  color: var(--blog-gold);
  font-weight: 700;
}

.blog-card h3 {
  margin: 0;
  font-size: clamp(1.18rem, 1.7vw, 1.45rem);
  font-weight: 500;
  line-height: 1.35;
  letter-spacing: -.02em;
}

.blog-card p {
  display: -webkit-box;
  margin: 12px 0 0;
  overflow: hidden;
  color: var(--blog-muted);
  font-size: .9rem;
  line-height: 1.65;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 3;
}

.blog-card__link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-top: auto;
  padding-top: 18px;
  color: var(--blog-ink);
  font-size: .82rem;
  font-weight: 700;
}

.blog-section--dark .blog-card {
  border-color: rgba(255, 255, 255, .16);
  background: #362e27;
  box-shadow: none;
}

.blog-section--dark .blog-card h3,
.blog-section--dark .blog-card__link { color: #f7f3ec; }
.blog-section--dark .blog-card__meta { color: #c8beb2; }

.blog-controls {
  display: grid;
  gap: 18px;
  margin-bottom: 28px;
}

.blog-search {
  position: relative;
  max-width: 520px;
}

.blog-search label {
  display: block;
  margin-bottom: 8px;
  color: var(--blog-ink);
  font-size: .72rem;
  font-weight: 700;
}

.blog-search svg {
  position: absolute;
  bottom: 14px;
  left: 15px;
  width: 19px;
  height: 19px;
  color: var(--blog-gold);
}

.blog-search input {
  width: 100%;
  min-height: 48px;
  padding: 10px 16px 10px 44px;
  border: 1px solid var(--blog-line);
  border-radius: 10px;
  background: #fff;
  color: var(--blog-ink);
  font: 400 .9rem/1.4 var(--font-body);
}

.blog-search input::placeholder { color: #928a81; }

.blog-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.blog-filter {
  min-height: 42px;
  padding: 9px 14px;
  border: 1px solid var(--blog-line);
  border-radius: 10px;
  background: transparent;
  color: var(--blog-ink);
  font: 600 .76rem/1.4 var(--font-body);
  transition: background-color 260ms ease, border-color 260ms ease, color 260ms ease, transform 260ms var(--ease-standard);
}

.blog-filter.is-active {
  border-color: var(--blog-ink);
  background: var(--blog-ink);
  color: #fff;
}

.blog-pagination {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px 18px;
  margin-top: 34px;
}

.blog-pagination button {
  min-width: 112px;
  min-height: 44px;
  padding: 9px 15px;
  border: 1px solid var(--blog-line);
  border-radius: 10px;
  background: #fff;
  color: var(--blog-ink);
  font: 700 .78rem/1.4 var(--font-body);
}

.blog-pagination button:disabled {
  cursor: not-allowed;
  opacity: .45;
}

.blog-pagination__status {
  min-width: 112px;
  color: var(--blog-muted);
  font-size: .76rem;
  text-align: center;
}

.blog-empty {
  margin: 26px 0 0;
  padding: 24px;
  border: 1px dashed var(--blog-line);
  border-radius: 14px;
  color: var(--blog-muted);
  text-align: center;
}

.blog-empty strong {
  display: block;
  margin-bottom: 5px;
  color: var(--blog-ink);
}

.blog-cta {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 28px 48px;
  align-items: center;
  padding: 36px;
  border: 1px solid var(--blog-line);
  border-radius: 18px;
  background: var(--blog-cream);
}

.blog-cta h2 {
  margin: 0;
  font-size: clamp(1.9rem, 3vw, 2.8rem);
  font-weight: 500;
  line-height: 1.16;
}

.blog-cta h2 span,
.blog-cta h2 em { display: block; }

.blog-cta p {
  max-width: 700px;
  margin: 12px 0 0;
  color: var(--blog-muted);
  line-height: 1.7;
}

/* Article template */
.article-hero {
  padding: clamp(42px, 5vw, 66px) 0 clamp(48px, 5vw, 68px);
  border-bottom: 1px solid var(--blog-line);
  background: var(--blog-cream);
}

.article-breadcrumbs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 24px;
  color: var(--blog-muted);
  font-size: .76rem;
  font-weight: 500;
}

.article-breadcrumbs a { color: inherit; }

.article-hero h1 {
  max-width: 940px;
  margin: 0;
  font-size: clamp(2.6rem, 4.2vw, 4.2rem);
  font-weight: 500;
  line-height: 1.08;
  letter-spacing: -.03em;
}

.article-hero__intro {
  max-width: 780px;
  margin: 20px 0 0;
  color: var(--blog-muted);
  font-size: 1.05rem;
  line-height: 1.7;
}

.article-hero__meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 20px;
  margin-top: 22px;
  color: var(--blog-gold);
  font-size: .7rem;
  font-weight: 700;
  letter-spacing: .06em;
}

.article-layout {
  display: grid;
  grid-template-columns: minmax(0, 760px) minmax(230px, 280px);
  justify-content: space-between;
  gap: clamp(42px, 6vw, 78px);
  padding: clamp(56px, 6vw, 84px) 0;
}

.article-body {
  min-width: 0;
  color: #514b45;
  font-size: clamp(1rem, .98rem + .12vw, 1.06rem);
  line-height: 1.82;
}

.article-body h2 {
  margin: 2.15em 0 .72em;
  color: var(--blog-ink);
  font-size: clamp(1.8rem, 2.6vw, 2.35rem);
  font-weight: 500;
  line-height: 1.2;
  letter-spacing: -.025em;
}

.article-body h2:first-child { margin-top: 0; }

.article-body h3 {
  margin: 1.8em 0 .55em;
  color: var(--blog-ink);
  font-size: 1.25rem;
  font-weight: 600;
  line-height: 1.35;
}

.article-body p { margin: 0 0 1.28em; }

.article-body :is(ul, ol) {
  margin: 0 0 1.55em;
  padding-left: 1.3em;
}

.article-body li { margin-bottom: .65em; }

.article-body a {
  color: #765b26;
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
}

.article-body img,
.article-body iframe,
.article-body video {
  max-width: 100%;
}

.article-note {
  margin: 2em 0;
  padding: 20px 22px;
  border-left: 3px solid var(--blog-gold);
  border-radius: 0 12px 12px 0;
  background: var(--blog-cream);
}

.article-sidebar {
  position: sticky;
  top: 112px;
  align-self: start;
  padding: 22px;
  border: 1px solid var(--blog-line);
  border-radius: 14px;
  background: #fff;
}

.article-sidebar strong,
.article-toc > strong {
  display: block;
  margin-bottom: 10px;
  color: var(--blog-ink);
  font-size: .7rem;
  font-weight: 700;
  letter-spacing: .1em;
  text-transform: uppercase;
}

.article-sidebar > a,
.article-toc a {
  display: block;
  padding: 9px 0;
  border-bottom: 1px solid var(--blog-line);
  color: var(--blog-muted);
  font-size: .82rem;
  font-weight: 500;
  line-height: 1.45;
}

.article-toc {
  margin-bottom: 22px;
  padding-bottom: 18px;
  border-bottom: 1px solid var(--blog-line);
}

.article-toc ol {
  margin: 0;
  padding: 0;
  list-style: none;
}

.article-toc li:last-child a { border-bottom: 0; }

.article-disclaimer {
  margin-top: 40px;
  padding-top: 20px;
  border-top: 1px solid var(--blog-line);
  color: var(--blog-muted);
  font-size: .84rem;
}

.article-related {
  padding: clamp(56px, 5vw, 80px) 0;
  background: var(--blog-cream);
}

.article-cta {
  padding: clamp(48px, 5vw, 68px) 0;
  background: #2b241e;
  color: #f7f3ec;
}

.article-cta .blog-cta {
  border-color: rgba(255, 255, 255, .2);
  background: transparent;
}

.article-cta .blog-cta h2 { color: #f7f3ec; }
.article-cta .blog-cta p { color: #d7cfc3; }
.article-cta .dv-button { border-color: #d8c39d; background: #d8c39d; color: #2b241e; }

@media (hover: hover) and (pointer: fine) {
  .blog-card:hover {
    border-color: #b9a98c;
    box-shadow: 0 16px 38px rgba(65, 51, 41, .1);
    transform: translateY(-3px);
  }

  .blog-card:hover .blog-card__media img,
  .blog-hero__media:hover .blog-hero__image--main img {
    transform: scale(1.025);
  }

  .blog-filter:hover:not(.is-active),
  .blog-pagination button:hover:not(:disabled) {
    border-color: var(--blog-gold);
    color: var(--blog-gold);
    transform: translateY(-1px);
  }

  .article-toc a:hover,
  .article-sidebar > a:hover { color: var(--blog-gold); }
}

@media (max-width: 1100px) {
  .blog-shell {
    width: min(100% - 64px, 1200px);
  }

  .blog-hero__grid {
    grid-template-columns: minmax(0, 1fr) minmax(360px, .86fr);
    gap: 36px;
  }

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

  .article-layout {
    grid-template-columns: minmax(0, 1fr) minmax(210px, 250px);
  }
}

@media (max-width: 900px) {
  .blog-hero__grid,
  .blog-section-heading,
  .article-layout {
    grid-template-columns: 1fr;
  }

  .blog-hero__media {
    width: min(100%, 650px);
    min-height: 390px;
  }

  .article-sidebar {
    position: static;
  }
}

@media (max-width: 700px) {
  .blog-shell {
    width: calc(100% - 40px);
  }

  .blog-hero,
  .article-hero {
    padding: 36px 0 48px;
  }

  .blog-hero h1,
  .article-hero h1 {
    font-size: clamp(2.2rem, 8.5vw, 3rem);
  }

  .blog-hero__content > p,
  .article-hero__intro {
    margin-top: 16px;
    font-size: .94rem;
  }

  .blog-hero__actions {
    align-items: stretch;
    flex-direction: column;
    margin-top: 22px;
  }

  .blog-hero__actions .dv-button { width: 100%; }

  .blog-hero__media {
    min-height: 300px;
  }

  .blog-hero__image--main { inset: 0 12% 18px 0; }
  .blog-hero__image--detail { width: 38%; }
  .blog-hero__badge span:last-child { display: none; }

  .blog-section,
  .article-related {
    padding: 44px 0;
  }

  .blog-featured,
  .blog-grid {
    grid-template-columns: 1fr;
  }

  .blog-card__body { padding: 20px; }

  .blog-filters {
    flex-wrap: nowrap;
    margin-inline: -20px;
    padding: 2px 20px 10px;
    overflow-x: auto;
    overscroll-behavior-x: contain;
    scrollbar-width: none;
  }

  .blog-filters::-webkit-scrollbar { display: none; }
  .blog-filter { flex: 0 0 auto; }

  .blog-pagination {
    display: grid;
    grid-template-columns: 1fr 1fr;
  }

  .blog-pagination__status {
    grid-column: 1 / -1;
    grid-row: 1;
    justify-self: center;
  }

  .blog-cta {
    grid-template-columns: 1fr;
    padding: 26px;
  }

  .blog-cta .dv-button { width: 100%; }

  .article-layout {
    padding: 44px 0;
  }

  .article-body {
    overflow-wrap: anywhere;
    font-size: 1rem;
  }

  .article-related .blog-grid { grid-template-columns: 1fr; }
}

@media (max-width: 390px) {
  .blog-hero__media { min-height: 270px; }
  .blog-card h3 { font-size: 1.18rem; }
  .article-hero h1 { overflow-wrap: anywhere; }
  .blog-pagination button { min-width: 0; width: 100%; }
}

@media (prefers-reduced-motion: reduce) {
  .blog-page :is(.blog-card, .blog-card__media img, .blog-hero__image img, .blog-filter),
  .blog-article-page :is(.blog-card, .blog-card__media img) {
    transition: none;
  }
}
