:root {
  --blog-bg: #ffffff;
  --blog-surface: #ffffff;
  --blog-card: #ffffff;
  --blog-text: #111827;
  --blog-body: #374151;
  --blog-muted: #525e6f;
  --blog-accent: #e76225;
  --blog-accent-dark: #c94c14;
  --blog-border: #e5e7eb;
  --blog-font: "Poppins", Arial, Helvetica, sans-serif;
  --font-nav: "Be Vietnam Pro", "Poppins", Arial, Helvetica, sans-serif;
  --font-bebas: "Bebas Neue", "Poppins", Arial, Helvetica, sans-serif;
  --blog-width: 1280px;
  --nav-offset: 110px;
}

* { box-sizing: border-box; }

@media (prefers-reduced-motion: no-preference) {
  html {
    scroll-behavior: smooth;
  }
}

html, body {
  margin: 0;
  padding: 0;
  min-height: 100%;
  background: var(--blog-bg);
  color: var(--blog-text);
  font-family: var(--blog-font);
  line-height: 1.7;
  overflow-x: clip;
  -webkit-font-smoothing: antialiased;
}

body {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

a { color: var(--blog-accent-dark); }
img { max-width: 100%; height: auto; }

/* ---------- Navbar (matches main site) ---------- */
.rh-navbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 50;
  background: rgba(0, 0, 0, 0.95);
  backdrop-filter: blur(8px);
  font-family: var(--font-nav);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.2);
}

.rh-navbar__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.65rem 1.5rem;
  max-width: 1400px;
  margin: 0 auto;
}

.rh-navbar__logo img {
  display: block;
  width: 70px;
  height: auto;
}

.rh-navbar__links {
  display: flex;
  list-style: none;
  margin: 0;
  padding: 0;
  gap: 2rem;
}

.rh-navbar__links a {
  color: #ffffff;
  text-decoration: none;
  font-size: 1.05rem;
  font-weight: 500;
  position: relative;
  transition: color 0.2s;
}

.rh-navbar__links a:hover,
.rh-navbar__links a.is-active {
  color: var(--blog-accent);
}

.rh-navbar__actions {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.rh-navbar__phone {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  border: 2px solid var(--blog-accent);
  border-radius: 999px;
  padding: 0.35rem 0.85rem;
  color: #ffffff;
  text-decoration: none;
  font-weight: 700;
  font-size: 0.95rem;
  transition: background 0.2s, color 0.2s;
}

.rh-navbar__phone:hover {
  background: rgba(231, 98, 37, 0.15);
  color: #ffb347;
}

.rh-navbar__phone-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: var(--blog-accent);
  color: #ffffff;
}

.rh-navbar__cta {
  display: inline-block;
  background: var(--blog-accent-dark);
  color: #ffffff;
  text-decoration: none;
  font-weight: 700;
  font-size: 0.95rem;
  padding: 0.6rem 1.15rem;
  border-radius: 999px;
  transition: background 0.2s, transform 0.2s;
}

.rh-navbar__cta:hover {
  background: var(--blog-accent);
}

.rh-navbar__toggle {
  display: none;
  background: transparent;
  border: none;
  color: var(--blog-accent);
  cursor: pointer;
  padding: 0.35rem;
}

.rh-navbar__drawer {
  display: none;
  flex-direction: column;
  align-items: center;
  gap: 1rem;
  background: #000000;
  padding: 1.25rem 1rem 1.75rem;
  border-top: 1px solid rgba(255, 255, 255, 0.12);
}

.rh-navbar__drawer a {
  color: #ffffff;
  text-decoration: none;
  font-weight: 700;
  font-size: 1.05rem;
}

.rh-navbar__drawer.is-open {
  display: flex;
}

@media (max-width: 900px) {
  .rh-navbar__links,
  .rh-navbar__actions {
    display: none;
  }
  .rh-navbar__toggle {
    display: inline-flex;
  }
}

/* ---------- Main blog container ---------- */
.blog-wrap {
  flex: 1;
  width: 100%;
  padding: 6.75rem 0 4.5rem;
}

/* ---------- Hero & List page ---------- */
.blog-hero {
  text-align: center;
  padding: 0.75rem 1.5rem 2rem;
  max-width: 720px;
  margin: 0 auto;
}

.blog-hero__badge {
  display: inline-block;
  margin-bottom: 0.65rem;
  padding: 0.25rem 0.75rem;
  border-radius: 999px;
  background: rgba(231, 98, 37, 0.1);
  color: var(--blog-accent-dark);
  font-size: 0.74rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.blog-list h1 {
  margin: 0 0 0.6rem;
  font-size: clamp(2rem, 4.2vw, 3rem);
  font-weight: 800;
  line-height: 1.1;
  letter-spacing: -0.025em;
  color: var(--blog-text);
  text-align: center;
}

.blog-list__intro {
  margin: 0 auto;
  max-width: 580px;
  color: var(--blog-muted);
  text-align: center;
  font-size: 1.02rem;
  line-height: 1.65;
}

/* ---------- Featured latest post (full-bleed band like DeltaVivid) ---------- */
.blog-featured {
  width: 100%;
  background: #f1f5f9;
  border-top: 1px solid rgba(203, 213, 225, 0.45);
  border-bottom: 1px solid rgba(203, 213, 225, 0.45);
  padding: 2.75rem 0;
  margin-bottom: 2.75rem;
}

.blog-featured__inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 1.5rem;
}

.blog-featured__card {
  display: grid;
  grid-template-columns: 1fr 1fr;
  background: #ffffff;
  border-radius: 10px;
  overflow: hidden;
  border: 1px solid var(--blog-border);
  box-shadow: 0 10px 28px rgba(15, 23, 42, 0.08);
}

.blog-featured__media {
  display: block;
  min-height: 280px;
  background: #e5e7eb;
  overflow: hidden;
}

.blog-featured__media img {
  display: block;
  width: 100%;
  height: 100%;
  max-height: 400px;
  object-fit: cover;
  transition: transform 0.3s ease-out;
}

.blog-featured__card:hover .blog-featured__media img {
  transform: scale(1.06);
}

.blog-featured__media--empty {
  width: 100%;
  height: 100%;
  min-height: 280px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, #1f2937 0%, #e76225 100%);
  color: #ffffff;
  font-weight: 700;
  font-size: 1.1rem;
  letter-spacing: 0.04em;
}

.blog-featured__body {
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 2.25rem 2.75rem;
}

.blog-featured__badge {
  display: inline-block;
  align-self: flex-start;
  margin-bottom: 0.9rem;
  padding: 0.35rem 0.9rem;
  border-radius: 999px;
  background: var(--blog-accent-dark);
  color: #ffffff;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.blog-featured__body h2 {
  margin: 0 0 0.85rem;
  font-size: clamp(1.55rem, 2.6vw, 2.15rem);
  font-weight: 700;
  line-height: 1.22;
  color: var(--blog-text);
}

.blog-featured__body h2 a {
  color: inherit;
  text-decoration: none;
  transition: color 0.15s ease;
}

.blog-featured__body h2 a:hover {
  color: var(--blog-accent-dark);
}

.blog-featured__meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.55rem;
  margin-bottom: 0.85rem;
  font-size: 0.875rem;
  color: var(--blog-muted);
}

.blog-featured__excerpt {
  margin: 0 0 1.4rem;
  color: var(--blog-body);
  font-size: 0.95rem;
  line-height: 1.6;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.blog-featured__btn {
  align-self: flex-start;
  display: inline-block;
  padding: 0.72rem 1.4rem;
  border-radius: 8px;
  background: var(--blog-accent-dark);
  color: #ffffff;
  font-size: 0.92rem;
  font-weight: 600;
  text-decoration: none;
  transition: background 0.15s ease;
}

.blog-featured__btn:hover {
  background: var(--blog-accent);
}

@media (max-width: 900px) {
  .blog-featured__card {
    grid-template-columns: 1fr;
  }
  .blog-featured__body {
    padding: 1.65rem;
  }
}

/* ---------- Card grid & Load More ---------- */
.blog-grid-wrap {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 1.5rem;
}

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

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

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

.blog-post-item {
  display: flex;
}

.blog-post-item.is-hidden {
  display: none;
}

.blog-card {
  width: 100%;
  border-radius: 9px;
  background: var(--blog-card);
  overflow: hidden;
  border: 1px solid var(--blog-border);
  box-shadow: none;
  transition: border-color 0.2s ease;
}

.blog-card:hover {
  border-color: #cbd5e1;
}

.blog-card__link {
  display: flex;
  flex-direction: column;
  height: 100%;
  text-decoration: none;
  color: inherit;
}

.blog-card__link:hover h2 {
  color: var(--blog-accent-dark);
}

.blog-card__media {
  width: 100%;
  aspect-ratio: 16 / 10;
  background: #f3f4f6;
  overflow: hidden;
  border-bottom: 1px solid #f1f5f9;
}

.blog-card__media--empty {
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, #1f2937 0%, #e76225 100%);
  color: rgba(255, 255, 255, 0.92);
  font-weight: 700;
  font-size: 0.92rem;
  letter-spacing: 0.04em;
}

.blog-card__cover {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.3s ease;
}

.blog-card:hover .blog-card__cover {
  transform: scale(1.04);
}

.blog-card__text {
  display: flex;
  flex-direction: column;
  flex: 1;
  padding: 0.95rem 1.1rem 1.1rem;
}

.blog-card h2 {
  margin: 0.2rem 0 0.4rem;
  font-size: 1.05rem;
  font-weight: 700;
  line-height: 1.35;
  color: var(--blog-text);
  transition: color 0.2s ease;
}

.blog-card__excerpt {
  margin: 0 0 0.75rem;
  color: var(--blog-body);
  font-size: 0.875rem;
  line-height: 1.5;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  flex: 1;
}

.blog-card__more {
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--blog-accent-dark);
}

.blog-load-more {
  display: flex;
  justify-content: center;
  margin-top: 2.25rem;
}

.blog-load-more__btn {
  padding: 0.7rem 1.5rem;
  border: 1px solid var(--blog-accent-dark);
  border-radius: 8px;
  background: var(--blog-accent-dark);
  color: #ffffff;
  font-family: inherit;
  font-size: 0.92rem;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.2s ease, border-color 0.2s ease;
}

.blog-load-more__btn:hover {
  background: var(--blog-accent);
  border-color: var(--blog-accent);
}

.blog-empty {
  grid-column: 1 / -1;
  color: var(--blog-muted);
  text-align: center;
  padding: 2.5rem 1.5rem;
  border: 1px solid var(--blog-border);
  border-radius: 9px;
}

/* ---------- Post page shell & TOC ---------- */
.blog-post-shell {
  width: 100%;
  max-width: var(--blog-width);
  margin: 0 auto;
  padding: 0.5rem 1.5rem 0;
}

.blog-toc,
.blog-toc-spacer {
  display: none;
}

@media (min-width: 1100px) {
  .blog-post-shell--with-toc {
    display: grid;
    grid-template-columns: minmax(180px, 240px) minmax(0, 720px) minmax(180px, 240px);
    gap: 2rem;
    justify-content: center;
    align-items: start;
  }

  .blog-post-shell--with-toc .blog-toc {
    display: block;
    grid-column: 1;
    position: sticky;
    top: var(--nav-offset);
    max-height: calc(100vh - var(--nav-offset) - 24px);
    overflow-y: auto;
    padding-right: 0.5rem;
  }

  .blog-post-shell--with-toc .blog-post__article {
    grid-column: 2;
    margin: 0;
  }

  .blog-post-shell--with-toc .blog-toc-spacer {
    display: block;
    grid-column: 3;
  }
}

.blog-toc__title {
  margin: 0 0 0.7rem;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--blog-muted);
}

.blog-toc__list,
.blog-toc__sublist {
  list-style: none;
  margin: 0;
  padding: 0;
}

.blog-toc__link {
  display: block;
  padding: 0.3rem 0 0.3rem 0.75rem;
  font-size: 0.84rem;
  line-height: 1.42;
  color: var(--blog-muted);
  text-decoration: none;
  border-left: 2px solid #e5e7eb;
  transition: color 0.15s ease, border-color 0.15s ease;
}

.blog-toc__item--h3 .blog-toc__link {
  padding-left: 1.35rem;
  font-size: 0.79rem;
}

.blog-toc__link:hover {
  color: var(--blog-text);
}

.blog-toc__link.is-active {
  color: var(--blog-accent-dark);
  border-left-color: var(--blog-accent);
  font-weight: 600;
}

/* ---------- Post article (unboxed, clean reading column) ---------- */
.blog-post {
  max-width: 720px;
  width: 100%;
  min-width: 0;
  margin: 0 auto;
  background: transparent;
  border: none;
  border-radius: 0;
  box-shadow: none;
  padding: 0;
}

.blog-breadcrumb {
  margin-bottom: 1.1rem;
}

.blog-breadcrumb ol {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.45rem;
  list-style: none;
  margin: 0;
  padding: 0;
  font-size: 0.84rem;
  color: var(--blog-muted);
}

.blog-breadcrumb a {
  color: var(--blog-muted);
  text-decoration: none;
  transition: color 0.15s;
}

.blog-breadcrumb a:hover {
  color: var(--blog-accent-dark);
}

.blog-breadcrumb__sep {
  color: #cbd5e1;
}

.blog-breadcrumb__current {
  color: var(--blog-body);
  font-weight: 500;
  max-width: 60%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.blog-meta {
  margin: 0 0 0.25rem;
  color: var(--blog-muted);
  font-size: 0.8rem;
  font-weight: 500;
}

.blog-post__header h1 {
  margin: 0;
  font-size: clamp(1.85rem, 4vw, 2.75rem);
  font-weight: 800;
  line-height: 1.12;
  letter-spacing: -0.025em;
  color: var(--blog-text);
}

.blog-post__meta {
  margin-top: 0.75rem;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.55rem;
  font-size: 0.875rem;
  color: var(--blog-muted);
  font-weight: 500;
}

.blog-post__cover-wrap {
  margin-top: 1.5rem;
}

.blog-post__cover {
  display: block;
  width: 100%;
  height: auto;
  max-height: min(520px, 75vh);
  border-radius: 9px;
  border: 1px solid var(--blog-border);
  box-shadow: none;
  object-fit: cover;
}

.blog-post__body {
  margin-top: 1.85rem;
  font-size: 1.03rem;
  line-height: 1.75;
  color: var(--blog-body);
}

.blog-post__body p {
  margin: 1.15rem 0;
}

.blog-post__body h1,
.blog-post__body h2,
.blog-post__body h3,
.blog-post__body h4 {
  scroll-margin-top: var(--nav-offset);
  color: var(--blog-text);
}

.blog-post__body h1 {
  font-size: clamp(1.55rem, 2.8vw, 2rem);
  line-height: 1.16;
  margin: 2.35rem 0 0.8rem;
  font-weight: 700;
}

.blog-post__body h2 {
  font-size: clamp(1.4rem, 2.5vw, 1.8rem);
  line-height: 1.2;
  margin: 2.5rem 0 0.8rem;
  font-weight: 700;
}

.blog-post__body h3 {
  font-size: 1.22rem;
  line-height: 1.3;
  margin: 1.85rem 0 0.65rem;
  font-weight: 600;
}

.blog-post__body h4 {
  font-size: 1.08rem;
  margin: 1.4rem 0 0.5rem;
  font-weight: 600;
}

.blog-post__body ul,
.blog-post__body ol {
  margin: 1.1rem 0;
  padding-left: 1.5rem;
}

.blog-post__body li {
  margin: 0.4rem 0;
}

.blog-post__body img {
  display: block;
  max-width: 100%;
  width: auto;
  height: auto;
  max-height: min(600px, calc(100vh - 120px));
  margin: 1.75rem auto;
  border-radius: 8px;
  box-shadow: none;
}

.blog-post__body blockquote {
  margin: 1.65rem 0;
  padding: 0.85rem 1.2rem;
  border-left: 3px solid var(--blog-accent);
  background: #fff9f5;
  border-radius: 0 8px 8px 0;
  color: #7c2d12;
  font-style: italic;
}

.blog-post__body blockquote p {
  margin: 0.25rem 0;
}

.blog-post__body pre {
  overflow-x: auto;
  max-width: 100%;
  padding: 1rem 1.15rem;
  background: #f8fafc;
  border: 1px solid var(--blog-border);
  border-radius: 8px;
  font-size: 0.9rem;
  line-height: 1.55;
}

.blog-post__body code {
  font-size: 0.9em;
  background: #f3f4f6;
  padding: 0.12rem 0.35rem;
  border-radius: 4px;
}

.blog-post__body pre code {
  background: transparent;
  padding: 0;
  border-radius: 0;
}

.blog-post__body table {
  border-collapse: collapse;
  width: 100%;
  margin: 1.75rem 0;
  display: block;
  overflow-x: auto;
  max-width: 100%;
}

.blog-post__body th,
.blog-post__body td {
  border: 1px solid var(--blog-border);
  padding: 0.68rem 0.9rem;
  text-align: left;
  font-size: 0.94rem;
}

.blog-post__body thead th {
  background: #f8fafc;
  font-weight: 600;
  color: var(--blog-text);
}

/* ---------- Prev / Next navigation ---------- */
.blog-prev-next {
  margin-top: 2.75rem;
  padding-top: 1.75rem;
  border-top: 1px solid var(--blog-border);
}

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

.blog-prev-next__link {
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
  padding: 0.85rem 1.05rem;
  border: 1px solid var(--blog-border);
  border-radius: 8px;
  text-decoration: none;
  color: inherit;
  transition: border-color 0.15s ease;
}

.blog-prev-next__link:hover {
  border-color: var(--blog-accent);
}

.blog-prev-next__link--next {
  text-align: right;
}

.blog-prev-next__label {
  color: var(--blog-muted);
  font-size: 0.78rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.blog-prev-next__title {
  color: var(--blog-accent-dark);
  font-size: 0.94rem;
  font-weight: 600;
  line-height: 1.35;
}

.blog-prev-next__link:hover .blog-prev-next__title {
  text-decoration: underline;
}

@media (max-width: 640px) {
  .blog-prev-next__grid {
    grid-template-columns: 1fr;
  }
  .blog-prev-next__link--next {
    text-align: left;
  }
  .blog-prev-next__spacer {
    display: none;
  }
}

/* ---------- Related Posts (cards matching list page) ---------- */
.blog-related {
  margin-top: 2.75rem;
  padding-top: 1.75rem;
  border-top: 1px solid var(--blog-border);
}

.blog-related__heading {
  margin: 0 0 1.25rem;
  font-size: 1.4rem;
  font-weight: 700;
  color: var(--blog-text);
}

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

@media (max-width: 820px) {
  .blog-related__grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 540px) {
  .blog-related__grid {
    grid-template-columns: 1fr;
  }
}

.blog-related__grid .blog-card__text {
  padding: 0.85rem 0.95rem 1rem;
}

.blog-related__grid .blog-card h2 {
  font-size: 0.98rem;
}

.blog-related__grid .blog-card__excerpt {
  display: none;
}

.blog-back {
  margin-top: 2.25rem;
  padding-top: 1.35rem;
  border-top: 1px solid var(--blog-border);
}

.blog-back a {
  font-weight: 600;
  font-size: 0.92rem;
  text-decoration: none;
}

.blog-back a:hover {
  text-decoration: underline;
}

/* ---------- Footer (matches main site) ---------- */
.rh-footer {
  width: 100%;
  background: #000000;
  color: #ffffff;
  padding: 2.25rem 1.5rem 1.5rem;
}

.rh-footer__inner {
  max-width: 1120px;
  margin: 0 auto;
  display: flex;
  justify-content: space-evenly;
  align-items: flex-start;
  gap: 2rem;
  flex-wrap: wrap;
}

.rh-footer__wordmark {
  font-family: var(--font-bebas);
  font-size: 2.75rem;
  font-weight: 400;
  letter-spacing: 0.04em;
  margin: 0;
  color: #ffffff;
}

.rh-footer__line {
  width: 100%;
  height: 1.5px;
  background: rgba(255, 255, 255, 0.85);
  margin: 0.75rem 0;
}

.rh-footer h3 {
  margin: 0.25rem 0 0.6rem;
  font-size: 1.1rem;
  font-weight: 500;
  color: #ffffff;
}

.rh-footer__socials {
  display: flex;
  gap: 1rem;
}

.rh-footer__socials a,
.rh-footer__contacts a,
.rh-footer__links a {
  color: #ffffff;
  text-decoration: none;
  transition: color 0.2s;
}

.rh-footer__socials a:hover,
.rh-footer__contacts a:hover,
.rh-footer__links a:hover {
  color: var(--blog-accent);
}

.rh-footer__contacts {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  font-size: 0.96rem;
}

.rh-footer__links ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
}

.rh-footer__links a {
  font-weight: 700;
}

.rh-footer__copy {
  margin-top: 1.75rem;
  padding-top: 1rem;
  border-top: 1px solid rgba(255, 255, 255, 0.15);
  text-align: center;
  font-size: 0.85rem;
  color: rgba(255, 255, 255, 0.8);
}

@media (max-width: 640px) {
  .blog-wrap { padding: 6rem 0 3.5rem; }
  .blog-grid-wrap, .blog-post-shell, .blog-featured__inner { padding-left: 1rem; padding-right: 1rem; }
  .rh-footer__inner { flex-direction: column; align-items: center; text-align: center; }
  .rh-footer__socials { justify-content: center; }
}
