*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --navy: #0d1b4c;
  --navy-deep: #0a1540;
  --orange: #f77c00;
  --blue: #1348e5;
  --white: #ffffff;
  --gray: #f5f7fa;
  --gray-line: #e2e8f0;
  --text: #1a2a3a;
  --text-mid: #52627a;
  --text-light: #cdd6ea;
  --green: #1eae5a;
  --font-head: 'Barlow Condensed', 'Arial Narrow', sans-serif;
  --font-body: 'Barlow', Helvetica, sans-serif;
  --shadow: 0 12px 40px rgba(13,27,76,.12);
  --shadow-sm: 0 6px 20px rgba(13,27,76,.08);
  --radius: 14px;
  --post-bg-height: 700px;
}

html { scroll-behavior: smooth; }
body {
  font-family: var(--font-body);
  background: var(--white);
  color: var(--text);
  line-height: 1.6;
}
a { text-decoration: none; color: inherit; }
img { max-width: 100%; height: auto; display: block; }

.wrap { max-width: 1120px; margin: 0 auto; padding: 0 22px; }

/* ── Header / Nav ── */
.blog-header {
  background: var(--navy);
  color: #fff;
}
.site-nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 0 18px;
}
.site-nav .brand-logo { height: 40px; width: auto; display: block; }
.nav-links {
  display: flex;
  align-items: center;
  gap: 24px;
}
.nav-link {
  color: var(--text-light);
  font-weight: 600;
  font-size: 15px;
  transition: color .15s;
}
.nav-link:hover { color: #fff; }
.nav-cta {
  background: var(--orange);
  color: #fff;
  padding: 11px 24px;
  border-radius: 7px;
  font-family: var(--font-head);
  text-transform: uppercase;
  font-weight: 700;
  font-size: 16px;
  letter-spacing: .5px;
  transition: filter .18s, transform .15s;
}
.nav-cta:hover { filter: brightness(1.08); transform: translateY(-1px); }

/* ── Footer ── */
footer {
  background: var(--navy-deep);
  color: var(--text-light);
  padding: 44px 0 40px;
  text-align: center;
}
footer .brand-logo { height: 44px; width: auto; display: inline-block; margin-bottom: 14px; }
footer .f-links {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 8px 22px;
  margin: 18px 0;
  font-size: 15px;
}
footer .f-links a:hover { color: #fff; }
footer .copy { font-size: 14px; opacity: .75; margin-top: 10px; }

/* ── Blog Index ── */
.blog-index { padding: 60px 0 80px; }
.blog-title {
  text-align: center;
  font-family: var(--font-head);
  font-size: clamp(30px, 5vw, 48px);
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--navy);
}
.blog-intro {
  text-align: center;
  max-width: 700px;
  margin: 16px auto 0;
  font-size: 18px;
  color: var(--text-mid);
}

/* Category filter */
.category-filter {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 10px;
  margin: 32px 0 40px;
}
.cat-link {
  padding: 8px 18px;
  border-radius: 6px;
  font-size: 15px;
  font-weight: 600;
  color: var(--text-mid);
  border: 1px solid var(--gray-line);
  transition: all .15s;
}
.cat-link:hover { border-color: var(--orange); color: var(--orange); }
.cat-link.active {
  background: var(--orange);
  color: #fff;
  border-color: var(--orange);
}

/* Posts grid */
.posts-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 30px;
}
@media (max-width: 1023px) { .posts-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 639px) { .posts-grid { grid-template-columns: 1fr; } }

.posts-grid-3 { grid-template-columns: repeat(3, 1fr); }
@media (max-width: 1023px) { .posts-grid-3 { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 639px) { .posts-grid-3 { grid-template-columns: 1fr; } }

/* Post card */
.post-card {
  display: flex;
  flex-direction: column;
  border: 1px solid var(--gray-line);
  border-radius: 8px;
  background: #fff;
  overflow: hidden;
  transition: box-shadow .2s;
}
.post-card:hover { box-shadow: var(--shadow-sm); }
.card-image-link { display: block; }
.card-image {
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  display: block;
}
.card-image-placeholder {
  width: 100%;
  aspect-ratio: 16 / 9;
  background: linear-gradient(135deg, var(--blue) 0%, var(--navy) 100%);
}
.card-body {
  padding: 20px 22px 24px;
  display: flex;
  flex-direction: column;
  flex: 1;
}
.card-title {
  font-family: var(--font-body);
  font-size: 1.25rem;
  font-weight: 500;
  text-align: center;
  line-height: 1.35;
  margin-bottom: 10px;
}
.card-title a { color: var(--text); }
.card-title a:hover { color: var(--blue); }
.card-meta {
  font-size: 13px;
  color: var(--text-mid);
  text-align: center;
  margin-bottom: 14px;
}
.card-meta a { color: var(--text-mid); text-decoration: underline; }
.card-meta a:hover { color: var(--blue); }
.card-excerpt {
  font-size: 15px;
  color: var(--text);
  line-height: 1.6;
  display: -webkit-box;
  -webkit-line-clamp: 4;
  -webkit-box-orient: vertical;
  overflow: hidden;
  flex: 1;
}
.card-read-more {
  display: inline-block;
  margin-top: 16px;
  font-size: 13px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1.5px;
  text-decoration: underline;
  color: var(--blue);
}
.card-read-more:hover { color: var(--orange); }

.empty-state {
  text-align: center;
  font-size: 18px;
  color: var(--text-mid);
  padding: 60px 0;
}

/* Pagination */
.pagination {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 6px;
  margin-top: 50px;
}
.page-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 38px;
  height: 38px;
  padding: 0 12px;
  border-radius: 6px;
  font-size: 15px;
  font-weight: 600;
  color: var(--text-mid);
  border: 1px solid var(--gray-line);
  transition: all .15s;
}
.page-link:hover { border-color: var(--orange); color: var(--orange); }
.page-current {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 38px;
  height: 38px;
  padding: 0 12px;
  border-radius: 6px;
  font-size: 15px;
  font-weight: 700;
  background: var(--orange);
  color: #fff;
  border: 1px solid var(--orange);
}

/* ── Single Post ── */
.post-page { position: relative; }

.post-hero-bg {
  position: absolute;
  top: 0; left: 0; right: 0;
  height: var(--post-bg-height);
  background-image: var(--post-bg);
  background-size: cover;
  background-position: center top;
  opacity: 0.15;
  -webkit-mask-image: linear-gradient(to bottom, #000 0%, transparent 100%);
  mask-image: linear-gradient(to bottom, #000 0%, transparent 100%);
  pointer-events: none;
  z-index: 0;
}

.post-content-area {
  position: relative;
  z-index: 1;
  padding: 40px 0 60px;
}

.post-wrap {
  max-width: 1080px;
  margin: 0 auto;
  padding: 0 22px;
}

.breadcrumb {
  font-size: 14px;
  color: var(--text-mid);
  margin-bottom: 20px;
}
.breadcrumb a { color: var(--blue); text-decoration: underline; }
.breadcrumb a:hover { color: var(--orange); }
.bc-sep { margin: 0 8px; }

.post-title {
  font-family: var(--font-head);
  font-size: clamp(28px, 5vw, 44px);
  text-transform: uppercase;
  letter-spacing: .5px;
  color: var(--navy);
  margin-bottom: 14px;
}

.post-meta {
  font-size: 14px;
  color: var(--text-mid);
  margin-bottom: 36px;
}
.post-meta a { color: var(--text-mid); text-decoration: underline; }
.post-meta a:hover { color: var(--blue); }

/* Post body scoped styles */
.post-body { line-height: 1.7; }

.post-body h6 {
  font-size: 1.2rem;
  font-weight: 500;
  text-transform: none;
  letter-spacing: 0;
  line-height: 1.65;
  margin-bottom: 24px;
  color: var(--text);
}

.post-body h2 {
  font-family: var(--font-head);
  font-size: 1.8rem;
  text-transform: uppercase;
  margin: 40px 0 18px;
  color: var(--navy);
}

.post-body h3 {
  font-family: var(--font-head);
  font-size: 1.5rem;
  text-transform: uppercase;
  margin: 36px 0 16px;
  color: var(--navy);
}

.post-body h4 {
  font-family: var(--font-body);
  font-size: 1.15rem;
  font-weight: 700;
  margin: 28px 0 12px;
  color: var(--navy);
}

.post-body p {
  font-size: 1.0625rem;
  line-height: 1.7;
  margin-bottom: 20px;
}

.post-body a {
  color: var(--blue);
  text-decoration: underline;
}
.post-body a:hover { color: var(--orange); }

.post-body ul, .post-body ol {
  margin: 18px 0 22px 24px;
}
.post-body li {
  font-size: 1.0625rem;
  line-height: 1.7;
  margin-bottom: 8px;
}

.post-body blockquote {
  border-left: 4px solid var(--orange);
  padding: 16px 24px;
  margin: 28px 0;
  background: var(--gray);
  font-style: italic;
  color: var(--text-mid);
}
.post-body blockquote p { margin-bottom: 0; }

.post-body hr {
  border: none;
  border-top: 1px solid var(--gray-line);
  margin: 36px 0;
}

.post-body img {
  max-width: 100%;
  height: auto;
  margin: 28px 0;
  border-radius: 6px;
}

.post-body figure {
  margin: 28px 0;
}
.post-body figcaption {
  font-size: 14px;
  color: var(--text-mid);
  text-align: center;
  margin-top: 10px;
}

.post-body table {
  width: 100%;
  border-collapse: collapse;
  margin: 24px 0;
  display: block;
  overflow-x: auto;
}
.post-body th, .post-body td {
  padding: 12px 16px;
  border: 1px solid var(--gray-line);
  text-align: left;
  font-size: 15px;
  white-space: nowrap;
}
.post-body th {
  background: var(--gray);
  font-weight: 700;
}

/* Callout class */
.post-body .td-callout {
  background-color: #fff4ea;
  border-left: 4px solid var(--orange);
  padding: 16px 20px;
  margin: 28px 0;
}

/* Responsive iframes (YouTube, Vimeo) */
.post-body iframe {
  max-width: 100%;
  aspect-ratio: 16 / 9;
  width: 100%;
  height: auto;
  margin: 28px 0;
  border: none;
  border-radius: 6px;
}

/* Author box */
.author-box {
  display: flex;
  gap: 20px;
  align-items: flex-start;
  margin-top: 50px;
  padding-top: 30px;
  border-top: 1px solid var(--gray-line);
}
.author-photo {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  object-fit: cover;
  flex-shrink: 0;
}
.author-name {
  font-weight: 700;
  font-size: 17px;
  color: var(--navy);
  margin-bottom: 2px;
}
.author-role {
  font-size: 14px;
  color: var(--text-mid);
  margin-bottom: 8px;
}
.author-bio {
  font-size: 15px;
  line-height: 1.5;
  color: var(--text);
}
.author-link {
  display: inline-block;
  margin-top: 8px;
  font-size: 14px;
  color: var(--blue);
  text-decoration: underline;
}

/* Related posts */
.related-posts {
  position: relative;
  z-index: 1;
  padding: 60px 0 80px;
  background: var(--gray);
}
.related-title {
  font-family: var(--font-head);
  font-size: 1.6rem;
  text-transform: uppercase;
  text-align: center;
  color: var(--navy);
  margin-bottom: 32px;
}

/* ── Responsive ── */
@media (max-width: 768px) {
  :root { --post-bg-height: 450px; }

  .nav-links { gap: 14px; }
  .nav-link { font-size: 13px; }
  .nav-cta { padding: 9px 16px; font-size: 14px; }

  .author-box { flex-direction: column; align-items: center; text-align: center; }
}

@media (max-width: 480px) {
  .nav-links { gap: 8px; }
  .nav-link { display: none; }
}
