/**
 * i3D Mobility journal — listing + single blog.
 */

body.blog .site-main,
body.archive:not(.post-type-archive-product):not(.tax-product_cat):not(.tax-product_tag) .site-main,
body.single-post .site-main,
body.search-results .site-main,
body.search .i3d-blog-main {
  background: #f7f7f5;
}

/* Hero ----------------------------------------------------------------- */
.i3d-blog-hero {
  background:
    radial-gradient(900px 280px at 8% -20%, rgba(200, 16, 46, 0.07), transparent 55%),
    linear-gradient(180deg, #fff 0%, #f7f7f5 100%);
  border-bottom: 1px solid #e8e8e6;
  padding: var(--space-section-sm, clamp(36px, 5vw, 56px)) 0 var(--space-5, 32px);
  text-align: center;
}

.i3d-blog-hero__inner {
  max-width: 760px;
  margin: 0 auto;
}

.i3d-blog-hero .i3d-crumbs {
  margin-bottom: 14px;
}

.i3d-blog-main > .container > .terea-breadcrumb {
  margin: 0 0 20px;
  padding: 0;
  background: transparent;
}

.i3d-blog-main > .container > .terea-breadcrumb > .container {
  padding: 0;
  max-width: none;
}

.i3d-blog-hero__eyebrow {
  margin: 0 0 10px;
  font-family: var(--tx-font-heading, Syne, sans-serif);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--tx-accent, #c8102e);
}

.i3d-blog-hero__title {
  margin: 0 0 12px;
  font-family: var(--tx-font-heading, Syne, sans-serif);
  font-size: clamp(2rem, 4vw, 3rem);
  line-height: 1.08;
  letter-spacing: -0.03em;
  color: #111;
}

.i3d-blog-hero__lead {
  margin: 0 auto;
  font-size: 1.05rem;
  line-height: 1.6;
  color: #4b5563;
  max-width: 48ch;
}

.i3d-blog-hero__meta {
  margin: 16px 0 0;
  font-size: 13px;
  font-weight: 650;
  color: #6b7280;
}

/* Layout --------------------------------------------------------------- */
.i3d-blog-main > .container {
  padding-top: clamp(28px, 4vw, 44px);
  padding-bottom: clamp(48px, 6vw, 80px);
}

.i3d-blog-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(260px, 320px);
  gap: clamp(28px, 4vw, 48px);
  align-items: start;
}

.i3d-blog-maincol {
  min-width: 0;
}

.i3d-blog-crumbs {
  margin: 0 0 24px;
}

/* Post grid / cards ---------------------------------------------------- */
.i3d-post-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 22px;
}

.i3d-post-grid--related {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.i3d-post-card {
  display: flex;
  flex-direction: column;
  background: #fff;
  border: 1px solid #e8e8e6;
  border-radius: 14px;
  overflow: hidden;
  box-shadow: 0 1px 0 rgba(15, 23, 42, 0.03);
  transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease;
}

.i3d-post-card:hover {
  transform: translateY(-4px);
  border-color: rgba(15, 23, 42, 0.14);
  box-shadow: 0 18px 40px rgba(15, 23, 42, 0.08);
}

.i3d-post-card__media {
  display: block;
  aspect-ratio: 16 / 10;
  overflow: hidden;
  background: linear-gradient(145deg, #1a1a1a, #3a3a3a);
}

.i3d-post-card__media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.45s ease;
}

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

.i3d-post-card__media--empty {
  display: grid;
  place-items: center;
  color: rgba(255, 255, 255, 0.45);
}

.i3d-post-card__body {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 18px 18px 16px;
  flex: 1;
}

.i3d-post-card__cat {
  align-self: flex-start;
  font-family: var(--tx-font-heading, Syne, sans-serif);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  text-decoration: none;
  color: var(--tx-accent, #c8102e);
}

.i3d-post-card__cat:hover {
  color: #111;
}

.i3d-post-card__title {
  margin: 0;
  font-family: var(--tx-font-heading, Syne, sans-serif);
  font-size: 1.15rem;
  font-weight: 700;
  line-height: 1.28;
  letter-spacing: -0.02em;
}

.i3d-post-card__title a {
  color: #111;
  text-decoration: none;
}

.i3d-post-card__title a:hover {
  color: var(--tx-accent, #c8102e);
}

.i3d-post-card__excerpt {
  margin: 0;
  color: #4b5563;
  font-size: 14px;
  line-height: 1.6;
}

.i3d-post-card__meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px 8px;
  margin-top: auto;
  padding-top: 12px;
  border-top: 1px solid #f0f0ee;
  font-size: 12px;
  color: #6b7280;
}

.i3d-post-card__dot {
  width: 3px;
  height: 3px;
  border-radius: 50%;
  background: #c5c5c0;
}

.i3d-post-card__more {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-top: 4px;
  font-family: var(--tx-font-heading, Syne, sans-serif);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  text-decoration: none;
  color: #111;
  transition: gap 0.2s ease, color 0.2s ease;
}

.i3d-post-card__more:hover {
  gap: 12px;
  color: var(--tx-accent, #c8102e);
}

.i3d-post-card--related .i3d-post-card__title {
  font-size: 1rem;
}

/* Sidebar -------------------------------------------------------------- */
.i3d-blog-sidebar {
  position: sticky;
  top: calc(var(--wh-header-h, 72px) + 16px);
  display: grid;
  gap: 14px;
}

.i3d-blog-widget {
  background: #fff;
  border: 1px solid #e8e8e6;
  border-radius: 14px;
  padding: 18px;
  box-shadow: 0 1px 0 rgba(15, 23, 42, 0.03);
}

.i3d-blog-widget__title {
  margin: 0 0 14px;
  font-family: var(--tx-font-heading, Syne, sans-serif);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: #111;
}

.i3d-blog-search {
  display: flex;
  align-items: center;
  gap: 8px;
  border: 1.5px solid #e4e4e1;
  border-radius: 10px;
  padding: 4px 4px 4px 12px;
  background: #fafafa;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.i3d-blog-search:focus-within {
  border-color: #111;
  box-shadow: 0 0 0 3px rgba(17, 17, 17, 0.06);
  background: #fff;
}

.i3d-blog-search input {
  flex: 1;
  min-width: 0;
  border: 0;
  background: transparent;
  outline: none;
  font-size: 14px;
  color: #111;
  min-height: 40px;
}

.i3d-blog-search button {
  width: 40px;
  height: 40px;
  border: 0;
  border-radius: 8px;
  background: #111;
  color: #fff;
  display: grid;
  place-items: center;
  cursor: pointer;
  transition: background 0.2s ease;
}

.i3d-blog-search button:hover {
  background: var(--tx-accent, #c8102e);
}

.i3d-blog-topics {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 6px;
}

.i3d-blog-topics a {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 12px;
  border-radius: 8px;
  text-decoration: none;
  color: #1a1a1a;
  font-size: 14px;
  font-weight: 600;
  background: #fafafa;
  border: 1px solid transparent;
  transition: background 0.2s ease, border-color 0.2s ease, color 0.2s ease;
}

.i3d-blog-topics a:hover {
  background: #111;
  color: #fff;
  border-color: #111;
}

.i3d-blog-topics em {
  font-style: normal;
  font-size: 11px;
  font-weight: 700;
  color: #6b7280;
  background: #fff;
  border-radius: 4px;
  min-width: 22px;
  text-align: center;
  padding: 2px 6px;
}

.i3d-blog-topics a:hover em {
  background: rgba(255, 255, 255, 0.16);
  color: #fff;
}

.i3d-blog-recent,
.i3d-blog-featured {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 12px;
}

.i3d-blog-recent a,
.i3d-blog-featured a {
  display: flex;
  gap: 12px;
  text-decoration: none;
  color: inherit;
  align-items: flex-start;
}

.i3d-blog-recent__thumb {
  flex: 0 0 56px;
  width: 56px;
  height: 56px;
  border-radius: 8px;
  overflow: hidden;
  background: #f0f0ee;
  display: grid;
  place-items: center;
  color: #9aa3ad;
}

.i3d-blog-recent__thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.i3d-blog-recent__title,
.i3d-blog-featured__title {
  display: block;
  font-size: 14px;
  font-weight: 700;
  line-height: 1.35;
  color: #111;
}

.i3d-blog-recent a:hover .i3d-blog-recent__title,
.i3d-blog-featured a:hover .i3d-blog-featured__title {
  color: var(--tx-accent, #c8102e);
}

.i3d-blog-recent time {
  display: block;
  margin-top: 4px;
  font-size: 12px;
  color: #6b7280;
}

.i3d-blog-featured__num {
  flex: 0 0 auto;
  font-family: var(--tx-font-heading, Syne, sans-serif);
  font-size: 13px;
  font-weight: 700;
  color: var(--tx-accent, #c8102e);
  letter-spacing: 0.04em;
  padding-top: 2px;
}

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

.i3d-blog-tags a {
  display: inline-flex;
  align-items: center;
  min-height: 32px;
  padding: 0 12px;
  border-radius: 6px;
  border: 1px solid #e4e4e1;
  background: #fff;
  color: #374151;
  font-size: 12px;
  font-weight: 600;
  text-decoration: none;
  transition: background 0.2s ease, color 0.2s ease, border-color 0.2s ease;
}

.i3d-blog-tags a:hover {
  background: #111;
  border-color: #111;
  color: #fff;
}

.i3d-blog-widget--cta {
  background: #111;
  border-color: #111;
  color: #fff;
}

.i3d-blog-cta__eyebrow {
  margin: 0 0 8px;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.55);
}

.i3d-blog-cta__title {
  margin: 0 0 8px;
  font-family: var(--tx-font-heading, Syne, sans-serif);
  font-size: 1.25rem;
  line-height: 1.25;
  color: #fff;
}

.i3d-blog-cta__text {
  margin: 0 0 16px;
  font-size: 13px;
  line-height: 1.55;
  color: rgba(255, 255, 255, 0.72);
}

.i3d-blog-cta__btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  min-height: 44px;
  border-radius: 8px;
  background: #fff;
  color: #111;
  font-family: var(--tx-font-heading, Syne, sans-serif);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  text-decoration: none;
  margin-bottom: 10px;
  transition: background 0.2s ease, color 0.2s ease;
}

.i3d-blog-cta__btn:hover {
  background: var(--tx-accent, #c8102e);
  color: #fff;
}

.i3d-blog-cta__link {
  display: block;
  text-align: center;
  color: rgba(255, 255, 255, 0.7);
  font-size: 13px;
  font-weight: 600;
  text-decoration: none;
}

.i3d-blog-cta__link:hover {
  color: #fff;
}

.i3d-blog-sidebar__extra .widget {
  background: #fff;
  border: 1px solid #e8e8e6;
  border-radius: 14px;
  padding: 18px;
  margin: 0 0 14px;
}

/* Single article ------------------------------------------------------- */
.i3d-article {
  background: #fff;
  border: 1px solid #e8e8e6;
  border-radius: 16px;
  padding: clamp(22px, 3.5vw, 40px);
  box-shadow: 0 10px 36px rgba(15, 23, 42, 0.04);
}

.i3d-article__cat {
  display: inline-flex;
  margin: 0 0 12px;
  font-family: var(--tx-font-heading, Syne, sans-serif);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  text-decoration: none;
  color: var(--tx-accent, #c8102e);
}

.i3d-article__title {
  margin: 0 0 12px;
  font-family: var(--tx-font-heading, Syne, sans-serif);
  font-size: clamp(1.75rem, 3.4vw, 2.55rem);
  line-height: 1.12;
  letter-spacing: -0.03em;
  color: #111;
}

.i3d-article__dek {
  margin: 0 0 18px;
  max-width: 48ch;
  font-size: 1.05rem;
  line-height: 1.55;
  color: #4b5563;
}

.i3d-article__meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 10px;
  margin: 0 0 24px;
  font-size: 13px;
  color: #6b7280;
}

.i3d-article__meta a {
  color: #111;
  font-weight: 700;
  text-decoration: none;
}

.i3d-article__meta a:hover {
  color: var(--tx-accent, #c8102e);
}

.i3d-article__avatar {
  width: 36px !important;
  height: 36px !important;
  border-radius: 50%;
  margin-right: 8px;
  vertical-align: middle;
}

.i3d-article__dot {
  width: 3px;
  height: 3px;
  border-radius: 50%;
  background: #c5c5c0;
}

.i3d-article__hero {
  margin: 0 0 28px;
  border-radius: 12px;
  overflow: hidden;
  background: #f0f0ee;
}

.i3d-article__hero img {
  width: 100%;
  height: auto;
  display: block;
}

.i3d-article__content {
  font-size: 1.05rem;
  line-height: 1.75;
  color: #1f2937;
  max-width: 68ch;
}

.i3d-article__content > *:first-child {
  margin-top: 0;
}

.i3d-article__content h2,
.i3d-article__content h3,
.i3d-article__content h4 {
  font-family: var(--tx-font-heading, Syne, sans-serif);
  letter-spacing: -0.02em;
  color: #111;
  margin: 1.6em 0 0.55em;
}

.i3d-article__content a {
  color: var(--tx-accent, #c8102e);
}

.i3d-article__content img {
  max-width: 100%;
  height: auto;
  border-radius: 10px;
}

.i3d-article__content blockquote {
  margin: 1.5em 0;
  padding: 14px 18px;
  border-left: 3px solid var(--tx-accent, #c8102e);
  background: #fafafa;
  color: #374151;
}

.i3d-article__consult {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin: 36px 0 28px;
  padding: 22px;
  border-radius: 12px;
  background: #111;
  color: #fff;
}

.i3d-article__consult h2 {
  margin: 0 0 6px;
  font-family: var(--tx-font-heading, Syne, sans-serif);
  font-size: 1.25rem;
}

.i3d-article__consult p {
  margin: 0;
  color: rgba(255, 255, 255, 0.72);
  font-size: 14px;
  max-width: 42ch;
}

.i3d-article__consult-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  padding: 0 18px;
  border-radius: 8px;
  background: #fff;
  color: #111;
  font-family: var(--tx-font-heading, Syne, sans-serif);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  text-decoration: none;
  white-space: nowrap;
}

.i3d-article__consult-btn:hover {
  background: var(--tx-accent, #c8102e);
  color: #fff;
}

.i3d-article__footer {
  display: grid;
  gap: 14px;
  padding-top: 22px;
  border-top: 1px solid #ececec;
}

.i3d-article__tax {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}

.i3d-article__tax > span {
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #6b7280;
  margin-right: 4px;
}

.i3d-article__tax a {
  display: inline-flex;
  align-items: center;
  min-height: 30px;
  padding: 0 12px;
  border-radius: 6px;
  border: 1px solid #e4e4e1;
  color: #111;
  font-size: 12px;
  font-weight: 600;
  text-decoration: none;
}

.i3d-article__tax a:hover {
  background: #111;
  border-color: #111;
  color: #fff;
}

.i3d-article__author {
  display: flex;
  gap: 16px;
  margin-top: 28px;
  padding: 18px;
  border-radius: 12px;
  background: #fafafa;
  border: 1px solid #ececec;
}

.i3d-article__author img {
  border-radius: 50%;
  width: 72px;
  height: 72px;
}

.i3d-article__author-label {
  margin: 0 0 4px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: #6b7280;
}

.i3d-article__author h3 {
  margin: 0 0 6px;
  font-family: var(--tx-font-heading, Syne, sans-serif);
  font-size: 1.1rem;
}

.i3d-article__author p:last-child {
  margin: 0;
  color: #4b5563;
  font-size: 14px;
  line-height: 1.55;
}

.i3d-post-nav {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-top: 28px;
}

.i3d-post-nav__item {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 16px;
  border-radius: 12px;
  border: 1px solid #e8e8e6;
  background: #fff;
  text-decoration: none;
  color: inherit;
  transition: border-color 0.2s ease, transform 0.2s ease, box-shadow 0.2s ease;
}

.i3d-post-nav__item:hover {
  border-color: #111;
  transform: translateY(-2px);
  box-shadow: 0 12px 24px rgba(15, 23, 42, 0.08);
}

.i3d-post-nav__item span {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: #6b7280;
}

.i3d-post-nav__item strong {
  font-family: var(--tx-font-heading, Syne, sans-serif);
  font-size: 14px;
  font-weight: 700;
  color: #111;
  line-height: 1.35;
}

.i3d-post-nav__item--next {
  text-align: right;
}

.i3d-post-nav__item.is-disabled {
  opacity: 0.45;
  pointer-events: none;
}

.i3d-article__comments {
  margin-top: 28px;
  background: #fff;
  border: 1px solid #e8e8e6;
  border-radius: 16px;
  padding: clamp(18px, 3vw, 28px);
}

/* Related -------------------------------------------------------------- */
.i3d-related {
  margin-top: clamp(36px, 5vw, 56px);
  padding-top: clamp(28px, 4vw, 40px);
  border-top: 1px solid #e8e8e6;
}

.i3d-related__head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 20px;
}

.i3d-related__head h2 {
  margin: 0;
  font-family: var(--tx-font-heading, Syne, sans-serif);
  font-size: clamp(1.35rem, 2.5vw, 1.75rem);
  letter-spacing: -0.02em;
}

.i3d-related__head a {
  font-size: 13px;
  font-weight: 700;
  color: var(--tx-accent, #c8102e);
  text-decoration: none;
}

.i3d-related__head a:hover {
  color: #111;
}

/* Empty / pagination --------------------------------------------------- */
.i3d-blog-empty {
  background: #fff;
  border: 1px solid #e8e8e6;
  border-radius: 14px;
  padding: clamp(36px, 5vw, 56px) 28px;
  text-align: center;
}

.i3d-blog-empty__icon {
  width: 64px;
  height: 64px;
  margin: 0 auto 16px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: #f3f4f6;
  color: #6b7280;
}

.i3d-blog-empty h2 {
  margin: 0 0 8px;
  font-family: var(--tx-font-heading, Syne, sans-serif);
  font-size: 1.35rem;
  color: #111;
}

.i3d-blog-empty p {
  margin: 0 auto 20px;
  max-width: 42ch;
  color: #4b5563;
  line-height: 1.6;
}

.i3d-blog-empty__actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px;
}

.i3d-blog-search--wide {
  margin-bottom: 22px;
  background: #fff;
}

.i3d-page-article {
  background: #fff;
  border: 1px solid #e8e8e6;
  border-radius: 16px;
  padding: clamp(22px, 3vw, 40px);
  margin-bottom: 40px;
}

.i3d-blog-pagination {
  margin-top: 32px;
}

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

.i3d-blog-pagination a,
.i3d-blog-pagination span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 42px;
  min-height: 42px;
  padding: 0 12px;
  border-radius: 8px;
  border: 1px solid #e4e4e1;
  background: #fff;
  color: #111;
  font-weight: 700;
  text-decoration: none;
}

.i3d-blog-pagination .current,
.i3d-blog-pagination a:hover {
  background: #111;
  border-color: #111;
  color: #fff;
}

/* Responsive ----------------------------------------------------------- */
@media (max-width: 980px) {
  .i3d-blog-layout {
    grid-template-columns: 1fr;
  }

  .i3d-blog-sidebar {
    position: static;
    order: 2;
  }

  .i3d-blog-maincol {
    order: 1;
  }

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

@media (max-width: 720px) {
  .i3d-post-grid,
  .i3d-post-grid--related {
    grid-template-columns: 1fr;
  }

  .i3d-post-nav {
    grid-template-columns: 1fr;
  }

  .i3d-post-nav__item--next {
    text-align: left;
  }

  .i3d-article__consult {
    flex-direction: column;
    align-items: stretch;
  }

  .i3d-article__consult-btn {
    width: 100%;
  }

  .i3d-article__author {
    flex-direction: column;
  }

  .i3d-blog-crumbs .is-current {
    max-width: 100%;
    white-space: normal;
  }
}
