/* ==========================================================================
   TOPS SAFETY CONTROL — Blog Stylesheet
   Depends on mains.css: reuses tokens (--c-*, --f-*, --ease-*), utility
   classes (.container-tops, .eyebrow, .section-title, .section-lead,
   .section-pad, .btn-tops, .link-flame, .reveal/.reveal-scale, .cut-*,
   .service-hero / .svc-breadcrumb for the page header, .side-deco).
   This file ONLY contains rules specific to the blog listing + single post.
   Load AFTER mains.css.
   ========================================================================== */

/* ============================== BLOG HERO ================================
   Uses the existing .service-hero / .svc-breadcrumb markup from mains.css —
   no overrides needed here. Kept as a comment so the pattern isn't missed:
   <section class="service-hero"> ... <div class="svc-breadcrumb">...</div>
   <h1 class="service-hero-title">...</h1> <p class="service-hero-lead">...</p>
   ========================================================================== */

/* ============================== BLOG LAYOUT =============================== */
.blog-layout {
  display: grid;
  grid-template-columns: 1fr 340px;
  gap: 64px;
  align-items: start;
}

.blog-main { min-width: 0; }

/* ============================= FEATURED POST =============================== */
.blog-featured {
  position: relative;
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  background: var(--c-white);
  border: 1px solid var(--c-line-light);
  overflow: hidden;
  margin-bottom: 46px;
  transition: box-shadow 0.4s var(--ease-out), transform 0.4s var(--ease-out);
  clip-path: polygon(22px 0, 100% 0, 100% 100%, 0 100%, 0 22px);
}
.blog-featured:hover { box-shadow: 0 30px 60px -28px rgba(10,10,11,0.25); }
.blog-featured__media { position: relative; min-height: 340px; overflow: hidden; }
.blog-featured__media img {
  width: 100%; height: 100%; object-fit: cover; transition: transform 0.6s var(--ease-out);
}
.blog-featured:hover .blog-featured__media img { transform: scale(1.05); }
.blog-featured__tag {
  position: absolute; top: 18px; left: 18px; z-index: 2;
  background: var(--c-red); color: var(--c-white);
  font-family: var(--f-mono); font-size: 0.68rem; letter-spacing: 0.06em;
  text-transform: uppercase; padding: 7px 14px;
  clip-path: polygon(8px 0, 100% 0, 100% 100%, 0 100%, 0 8px);
}
.blog-featured__body {
  padding: 40px 40px 36px;
  display: flex; flex-direction: column; justify-content: center;
}
.blog-featured__body h2 { font-size: clamp(1.4rem, 2.4vw, 1.9rem); line-height: 1.2; margin: 14px 0 16px; }
.blog-featured__body p { color: var(--c-steel); font-size: 0.95rem; line-height: 1.7; margin-bottom: 22px; text-transform: none; }

/* ================================ META ROW ================================= */
.blog-meta {
  display: flex; flex-wrap: wrap; align-items: center; gap: 18px;
  font-family: var(--f-mono); font-size: 0.72rem; letter-spacing: 0.03em;
  text-transform: uppercase; color: var(--c-steel);
}
.blog-meta span { display: inline-flex; align-items: center; gap: 7px; }
.blog-meta i { color: var(--c-red); font-size: 0.78rem; }
.blog-meta .blog-category { color: var(--c-red); font-weight: 500; }

/* ================================ BLOG GRID ================================ */
.blog-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 34px;
}

.blog-card {
  position: relative;
  background: var(--c-white);
  border: 1px solid var(--c-line-light);
  height: 100%;
  overflow: hidden;
  transition: transform 0.4s var(--ease-out), box-shadow 0.4s var(--ease-out), border-color 0.4s ease;
  clip-path: polygon(18px 0, 100% 0, 100% 100%, 0 100%, 0 18px);
}
.blog-card:hover {
  transform: translateY(-8px);
  box-shadow: 0 30px 50px -26px rgba(10,10,11,0.25);
  border-color: transparent;
}
.blog-card__media { position: relative; height: 210px; overflow: hidden; }
.blog-card__media img {
  width: 100%; height: 100%; object-fit: cover; transition: transform 0.6s var(--ease-out);
}
.blog-card:hover .blog-card__media img { transform: scale(1.08); }
.blog-card__tag {
  position: absolute; top: 14px; left: 14px; z-index: 2;
  background: var(--c-black); color: var(--c-white);
  font-family: var(--f-mono); font-size: 0.62rem; letter-spacing: 0.05em;
  text-transform: uppercase; padding: 6px 11px;
  clip-path: polygon(7px 0, 100% 0, 100% 100%, 0 100%, 0 7px);
}
.blog-card__body { padding: 26px 24px 28px; }
.blog-card__body .blog-meta { margin-bottom: 12px; font-size: 0.66rem; gap: 14px; }
.blog-card h3 {
  font-family: var(--f-body); text-transform: none; letter-spacing: 0;
  font-weight: 600; font-size: 1.02rem; line-height: 1.4; margin-bottom: 10px;
}
.blog-card h3 a { color: var(--c-ink); transition: color 0.25s ease; }
.blog-card:hover h3 a { color: var(--c-red); }
.blog-card p { color: var(--c-steel); font-size: 0.86rem; line-height: 1.65; margin-bottom: 16px; text-transform: none; }

/* ================================ PAGINATION ================================ */
.blog-pagination {
  display: flex; align-items: center; justify-content: center; gap: 10px;
  margin-top: 54px;
}
.blog-pagination a, .blog-pagination span {
  width: 42px; height: 42px; display: flex; align-items: center; justify-content: center;
  font-family: var(--f-mono); font-size: 0.8rem; color: var(--c-ink);
  border: 1px solid var(--c-line-light); border-radius: 50%;
  transition: all 0.3s ease;
}
.blog-pagination a:hover { background: var(--c-off-white); }
.blog-pagination .is-active { background: var(--c-red); border-color: var(--c-red); color: var(--c-white); }
.blog-pagination .blog-pg-next, .blog-pagination .blog-pg-prev {
  width: auto; padding: 0 18px; border-radius: 30px; gap: 8px;
}

/* ================================= SIDEBAR =================================== */
.blog-sidebar { display: flex; flex-direction: column; gap: 34px; position: sticky; top: 120px; }

.blog-widget {
  background: var(--c-white); border: 1px solid var(--c-line-light);
  padding: 30px 26px;
  clip-path: polygon(16px 0, 100% 0, 100% 100%, 0 100%, 0 16px);
}
.blog-widget h4 {
  font-size: 0.92rem; letter-spacing: 0.03em; margin-bottom: 22px;
  padding-bottom: 16px; border-bottom: 1px solid var(--c-line-light);
  display: flex; align-items: center; gap: 10px;
}
.blog-widget h4 i { color: var(--c-red); font-size: 0.85rem; }

/* Search */
.blog-search { position: relative; }
.blog-search input {
  width: 100%; border: 1px solid var(--c-line-light); background: var(--c-off-white);
  padding: 13px 46px 13px 16px; font-size: 0.88rem; font-family: var(--f-body);
  color: var(--c-ink); transition: border-color 0.3s ease;
  clip-path: polygon(10px 0, 100% 0, 100% 100%, 0 100%, 0 10px);
}
.blog-search input:focus { outline: none; border-color: var(--c-red); }
.blog-search button {
  position: absolute; right: 0; top: 0; bottom: 0; width: 44px;
  background: var(--c-red); border: none; color: var(--c-white); cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  transition: background 0.3s ease;
}
.blog-search button:hover { background: var(--c-red-dark); }

/* Categories */
.blog-categories { display: flex; flex-direction: column; gap: 2px; }
.blog-categories li a {
  display: flex; align-items: center; justify-content: space-between;
  padding: 12px 4px; font-size: 0.88rem; color: var(--c-ink);
  border-bottom: 1px solid var(--c-line-light);
  transition: color 0.25s ease, padding-left 0.25s ease;
}
.blog-categories li:last-child a { border-bottom: none; }
.blog-categories li a:hover { color: var(--c-red); padding-left: 6px; }
.blog-categories li a span.count {
  font-family: var(--f-mono); font-size: 0.7rem; color: var(--c-steel);
  background: var(--c-off-white); padding: 2px 8px; border-radius: 20px;
}

/* Recent posts */
.blog-recent-list { display: flex; flex-direction: column; gap: 18px; }
.blog-recent-item { display: flex; gap: 14px; align-items: flex-start; }
.blog-recent-item__thumb {
  width: 66px; height: 66px; flex: none; overflow: hidden;
  clip-path: polygon(8px 0, 100% 0, 100% 100%, 0 100%, 0 8px);
}
.blog-recent-item__thumb img { width: 100%; height: 100%; object-fit: cover; }
.blog-recent-item h5 {
  font-family: var(--f-body); text-transform: none; letter-spacing: 0;
  font-weight: 600; font-size: 0.86rem; line-height: 1.4; margin-bottom: 6px;
}
.blog-recent-item h5 a { color: var(--c-ink); transition: color 0.25s ease; }
.blog-recent-item h5 a:hover { color: var(--c-red); }
.blog-recent-item span {
  font-family: var(--f-mono); font-size: 0.66rem; color: var(--c-steel);
  text-transform: uppercase; letter-spacing: 0.03em;
}

/* Tags */
.blog-tags { display: flex; flex-wrap: wrap; gap: 9px; }
.blog-tags a {
  font-size: 0.76rem; padding: 8px 14px; background: var(--c-off-white); color: var(--c-ink);
  border-radius: 30px; transition: all 0.25s ease;
}
.blog-tags a:hover { background: var(--c-red); color: var(--c-white); }

/* Newsletter widget (dark) */
.blog-widget--dark {
  background: var(--c-black); border-color: var(--c-line-dark); color: var(--c-white); position: relative; overflow: hidden;
}
.blog-widget--dark h4 { color: var(--c-white); border-color: var(--c-line-dark); }
.blog-widget--dark p { color: var(--c-steel-light); font-size: 0.85rem; line-height: 1.6; margin-bottom: 18px; text-transform: none; }
.blog-widget--dark input {
  width: 100%; border: 1px solid var(--c-line-dark); background: rgba(255,255,255,0.06);
  padding: 12px 14px; font-size: 0.85rem; color: var(--c-white); margin-bottom: 12px;
  clip-path: polygon(8px 0, 100% 0, 100% 100%, 0 100%, 0 8px);
}
.blog-widget--dark input::placeholder { color: var(--c-steel); }
.blog-widget--dark input:focus { outline: none; border-color: var(--c-red); }
.blog-widget--dark .btn-tops { width: 100%; justify-content: center; }

/* ============================== SINGLE POST ================================= */
.blog-post-head { max-width: 820px; margin: 0 auto; text-align: center; }
.blog-post-head .blog-meta { justify-content: center; margin-bottom: 20px; }
.blog-post-head h1 {
  font-size: clamp(2rem, 4vw, 3.1rem); line-height: 1.12; color: var(--c-white); margin-bottom: 22px;
}
.blog-post-author-row {
  display: flex; align-items: center; justify-content: center; gap: 12px; margin-top: 26px;
}
.blog-post-author-row img { width: 40px; height: 40px; border-radius: 50%; object-fit: cover; }
.blog-post-author-row div { text-align: left; }
.blog-post-author-row strong { display: block; color: var(--c-white); font-size: 0.85rem; }
.blog-post-author-row span { font-family: var(--f-mono); font-size: 0.68rem; color: var(--c-steel-light); text-transform: uppercase; }

.blog-post-cover {
  width: 100%; max-height: 520px; overflow: hidden; margin: -70px auto 54px; position: relative; z-index: 3;
  max-width: 1080px; box-shadow: 0 40px 80px -30px rgba(10,10,11,0.4);
  clip-path: polygon(26px 0, 100% 0, 100% calc(100% - 26px), calc(100% - 26px) 100%, 0 100%, 0 26px);
}
.blog-post-cover img { width: 100%; height: 100%; object-fit: cover; display: block; }

.blog-post-body {
  max-width: 760px; margin: 0 auto;
  color: var(--c-ink); font-size: 1.02rem; line-height: 1.85;
}
.blog-post-body p { margin: 0 0 22px; text-transform: none; }
.blog-post-body h2, .blog-post-body h3 {
  margin: 44px 0 18px; text-transform: none; letter-spacing: 0; line-height: 1.3;
}
.blog-post-body h2 { font-size: 1.5rem; }
.blog-post-body h3 { font-size: 1.2rem; }
.blog-post-body ul, .blog-post-body ol { margin: 0 0 24px; padding-left: 22px; }
.blog-post-body li { margin-bottom: 10px; line-height: 1.7; }
.blog-post-body img {
  width: 100%; margin: 32px 0; clip-path: polygon(18px 0, 100% 0, 100% 100%, 0 100%, 0 18px);
}
.blog-post-body blockquote {
  margin: 32px 0; padding: 26px 30px; background: var(--c-off-white);
  border-left: 3px solid var(--c-red); font-family: var(--f-display);
  font-size: 1.15rem; line-height: 1.5; color: var(--c-ink);
  clip-path: polygon(14px 0, 100% 0, 100% 100%, 0 100%, 0 14px);
}
.blog-post-body a { color: var(--c-red); text-decoration: underline; text-underline-offset: 3px; }

.blog-post-tags {
  max-width: 760px; margin: 40px auto 0; display: flex; flex-wrap: wrap; align-items: center; gap: 10px;
  padding-top: 28px; border-top: 1px solid var(--c-line-light);
}

.blog-post-share {
  max-width: 760px; margin: 26px auto 0; display: flex; align-items: center; gap: 14px;
}
.blog-post-share span {
  font-family: var(--f-mono); font-size: 0.7rem; letter-spacing: 0.04em; text-transform: uppercase; color: var(--c-steel);
}
.blog-post-share a {
  width: 38px; height: 38px; border-radius: 50%; border: 1px solid var(--c-line-light);
  display: flex; align-items: center; justify-content: center; color: var(--c-ink); transition: all 0.3s ease;
}
.blog-post-share a:hover { background: var(--c-red); border-color: var(--c-red); color: var(--c-white); }

/* Author box */
.blog-author-box {
  max-width: 760px; margin: 54px auto 0; background: var(--c-off-white);
  padding: 32px; display: flex; gap: 22px; align-items: flex-start;
  clip-path: polygon(18px 0, 100% 0, 100% 100%, 0 100%, 0 18px);
}
.blog-author-box img { width: 76px; height: 76px; border-radius: 50%; object-fit: cover; flex: none; }
.blog-author-box h5 { font-size: 0.98rem; text-transform: none; letter-spacing: 0; margin-bottom: 6px; }
.blog-author-box p { color: var(--c-steel); font-size: 0.86rem; line-height: 1.65; margin: 0; text-transform: none; }

/* ============================== POST NAVIGATION ==============================
   Prev/next post links shown at the bottom of a single post, below the
   author box. Not part of the original listing styles — added for the
   single-post page.
   ========================================================================== */
.blog-post-nav {
  max-width: 760px; margin: 46px auto 0;
  display: grid; grid-template-columns: 1fr 1fr; gap: 20px;
  padding-top: 34px; border-top: 1px solid var(--c-line-light);
}
.blog-post-nav a {
  display: flex; flex-direction: column; gap: 9px;
  padding: 22px 24px; background: var(--c-off-white);
  transition: background 0.3s ease;
  clip-path: polygon(14px 0, 100% 0, 100% 100%, 0 100%, 0 14px);
}
.blog-post-nav a:hover { background: var(--c-red); }
.blog-post-nav a:hover .blog-post-nav__label,
.blog-post-nav a:hover .blog-post-nav__title { color: var(--c-white); }
.blog-post-nav__next { text-align: right; align-items: flex-end; }
.blog-post-nav__label {
  font-family: var(--f-mono); font-size: 0.64rem; letter-spacing: 0.05em; text-transform: uppercase;
  color: var(--c-steel); display: flex; align-items: center; gap: 8px; transition: color 0.25s ease;
}
.blog-post-nav__next .blog-post-nav__label { flex-direction: row-reverse; }
.blog-post-nav__title {
  font-size: 0.92rem; font-weight: 600; color: var(--c-ink); line-height: 1.4;
  transition: color 0.25s ease;
}
.blog-post-nav__disabled {
  opacity: 0.4; pointer-events: none;
}

/* Related posts (single post page — reuses .blog-card) */
.blog-related-heading { max-width: 1080px; margin: 0 auto 34px; text-align: center; }
.blog-related-grid {
  max-width: 1080px; margin: 0 auto; display: grid; grid-template-columns: repeat(3, 1fr); gap: 30px;
}

/* ================================ RESPONSIVE ================================= */
@media (max-width: 1199px) {
  .blog-layout { grid-template-columns: 1fr; }
  .blog-sidebar { position: static; }
}

@media (max-width: 767px) {
  .blog-featured { grid-template-columns: 1fr; }
  .blog-featured__media { min-height: 220px; }
  .blog-featured__body { padding: 28px 24px; }
  .blog-grid { grid-template-columns: 1fr; }
  .blog-related-grid { grid-template-columns: 1fr; }
  .blog-post-cover { margin-top: -40px; margin-bottom: 36px; }
  .blog-author-box { flex-direction: column; text-align: center; align-items: center; }
  .blog-post-nav { grid-template-columns: 1fr; }
  .blog-post-nav__next { text-align: left; align-items: flex-start; }
  .blog-post-nav__next .blog-post-nav__label { flex-direction: row; }
}