/* ============================================================
   HRDelivered — Single Blog Post Styles
   hrdelivered-single.css  |  v1.0
   ============================================================ */

/* ── Page background ───────────────────────────────────────── */
body.hrd-single-post {
  background-color: #ffffff;
  color: var(--color-text, #1a1a2e);
}

/* ============================================================
   BREADCRUMB BAR
   ============================================================ */
.post-breadcrumb-bar {
  background-color: #F6F3E8;
  padding-block: 10px;
}
.post-breadcrumb-bar-inner {
  max-width: 1280px;
  margin-inline: auto;
  padding-inline: 1.5rem;
}
@media (min-width: 768px) {
  .post-breadcrumb-bar-inner { padding-inline: 2.5rem; }
}
/* Breadcrumb colours on the cream bar */
.post-breadcrumb-bar .post-breadcrumbs {
  color: #6b7280;
}
.post-breadcrumb-bar .post-breadcrumbs a {
  color: #6b7280;
}
.post-breadcrumb-bar .post-breadcrumbs a:hover {
  color: var(--color-navy, #001342);
}

/* ── Shared max-width helper (matches nav-inner + footer-grid) ─ */
.post-hero-inner,
.post-layout-inner {
  max-width: 1280px;
  margin-inline: auto;
  padding-inline: 1.5rem;           /* mobile */
}
@media (min-width: 768px) {
  .post-hero-inner,
  .post-layout-inner {
    padding-inline: 2.5rem;         /* desktop — same as nav-inner + footer-grid */
  }
}

/* ============================================================
   POST HERO — dark two-column layout
   ============================================================ */
.post-hero {
  background-color: #001342;
  padding-top: calc(var(--wp-admin--admin-bar--height, 0px) + var(--nav-height) + 1.25rem);
  padding-bottom: 1.75rem;
}

.post-hero-inner {
  display: grid;
  grid-template-columns: 1fr 420px;
  gap: 1.5rem;              /* halved from 3rem */
  align-items: start;       /* top-align both columns */
}

/* Left column */
.post-hero-text {
  display: flex;
  flex-direction: column;
  gap: 0;
}

/* Breadcrumbs */
.post-breadcrumbs {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  font-size: 0.8125rem;
  flex-wrap: wrap;
}
.post-breadcrumbs a {
  text-decoration: none;
  transition: color 0.15s;
}
.post-breadcrumbs svg { flex-shrink: 0; opacity: 0.5; }

/* Title */
.post-title {
  font-size: clamp(1.625rem, 3.5vw, 2.5rem);
  font-weight: 800;
  line-height: 1.2;
  color: #ffffff;
  margin-block: 0 1.1rem;
}

/* Excerpt */
.post-excerpt {
  font-size: 1rem;
  line-height: 1.65;
  color: rgba(255, 255, 255, 0.7);
  margin-block: 0 1.75rem;
}

/* Author meta row */
.post-meta-row {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}
.post-author-avatar {
  border-radius: 50%;
  object-fit: cover;
  flex-shrink: 0;
  width: 40px;
  height: 40px;
  border: 2px solid rgba(255, 255, 255, 0.25);
}
.post-meta-text {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
}
.post-author-name {
  font-size: 0.875rem;
  font-weight: 600;
  color: #ffffff;
}
.post-meta-sub {
  font-size: 0.8125rem;
  color: rgba(255, 255, 255, 0.55);
}
.post-meta-dot {
  margin-inline: 0.3rem;
}
.post-meta-cat {
  color: rgba(255, 255, 255, 0.55);
  text-decoration: none;
  transition: color 0.15s;
}
.post-meta-cat:hover { color: #ffffff; }

/* Right column — featured image */
.post-hero-image {
  display: flex;
  align-items: center;
  justify-content: center;
  padding-bottom: 20px;
}
.post-hero-thumbnail {
  display: block;
  width: 100%;
  height: auto;
  border-radius: 12px;
  object-fit: cover;
  box-shadow: 0 16px 48px rgba(0, 0, 0, 0.35);
}

/* ============================================================
   CONTENT + SIDEBAR LAYOUT
   ============================================================ */
.post-layout {
  background: #ffffff;
  padding-block: 3rem 4rem;
}
.post-layout-inner {
  display: grid;
  grid-template-columns: 1fr 340px;
  gap: 4rem;
  align-items: start;
}

/* ── Article content ───────────────────────────────────────── */
.post-content {
  min-width: 0; /* prevent grid blowout */
  font-size: 1.0625rem;
  line-height: 1.75;
  color: #374151;
}

/* Typography inside post body */
.post-content h2 {
  font-size: clamp(1.25rem, 2.5vw, 1.625rem);
  font-weight: 700;
  color: var(--color-navy, #1a1a2e);
  margin-block: 2.25rem 0.75rem;
  line-height: 1.3;
}
.post-content h3 {
  font-size: 1.125rem;
  font-weight: 700;
  color: var(--color-navy, #1a1a2e);
  margin-block: 1.75rem 0.5rem;
}
.post-content h4 {
  font-size: 1rem;
  font-weight: 600;
  color: var(--color-navy, #1a1a2e);
  margin-block: 1.5rem 0.4rem;
}
.post-content p {
  margin-block: 0 1.25rem;
}
.post-content a {
  color: var(--color-blue, #1e4db7);
  text-decoration: underline;
  text-underline-offset: 2px;
}
.post-content a:hover { color: var(--color-navy, #1a1a2e); }
.post-content ul,
.post-content ol {
  padding-left: 1.5rem;
  margin-block: 0 1.25rem;
}
.post-content li {
  margin-bottom: 0.4rem;
}
.post-content blockquote {
  border-left: 4px solid var(--color-blue, #1e4db7);
  margin: 1.75rem 0;
  padding: 1rem 1.5rem;
  background: #f5f7ff;
  border-radius: 0 8px 8px 0;
  font-style: italic;
  color: #374151;
}
.post-content blockquote p { margin-bottom: 0; }
.post-content img {
  max-width: 100%;
  border-radius: 8px;
  margin-block: 1rem;
}
.post-content figure {
  margin: 1.5rem 0;
}
.post-content figcaption {
  font-size: 0.8125rem;
  color: #9ca3af;
  text-align: center;
  margin-top: 0.4rem;
}
.post-content pre {
  background: #1e1e2e;
  color: #cdd6f4;
  border-radius: 8px;
  padding: 1.25rem 1.5rem;
  overflow-x: auto;
  font-size: 0.875rem;
  margin-block: 1.25rem;
}
.post-content code {
  background: #f0f2ff;
  color: #1e3a5f;
  border-radius: 4px;
  padding: 0.15em 0.4em;
  font-size: 0.875em;
}
.post-content pre code {
  background: none;
  color: inherit;
  padding: 0;
}
.post-content hr {
  border: none;
  border-top: 1px solid #e5e7eb;
  margin-block: 2rem;
}
.post-content table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.9375rem;
  margin-block: 1.5rem;
}
.post-content th,
.post-content td {
  padding: 0.6rem 0.9rem;
  border: 1px solid #e5e7eb;
  text-align: left;
}
.post-content th {
  background: #f5f7ff;
  font-weight: 600;
  color: var(--color-navy, #1a1a2e);
}

/* Multi-page links */
.post-page-links {
  margin-block: 1.5rem;
  font-size: 0.9rem;
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
}
.post-page-links a {
  display: inline-block;
  padding: 0.25rem 0.6rem;
  border: 1px solid #e5e7eb;
  border-radius: 4px;
  color: var(--color-blue, #1e4db7);
  text-decoration: none;
  transition: background 0.15s;
}
.post-page-links a:hover { background: #f0f4ff; }

/* Tags */
.post-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  align-items: center;
  margin-top: 2rem;
  padding-top: 1.5rem;
  border-top: 1px solid #f0f0f4;
}
.post-tags-label {
  font-size: 0.875rem;
  font-weight: 600;
  color: #6b7280;
  margin-right: 0.25rem;
}
.post-tag {
  display: inline-block;
  font-size: 0.8125rem;
  font-weight: 500;
  color: var(--color-navy, #1a1a2e);
  background: #f3f4f6;
  border-radius: 999px;
  padding: 0.2rem 0.65rem;
  text-decoration: none;
  transition: background 0.15s, color 0.15s;
}
.post-tag:hover {
  background: var(--color-blue, #1e4db7);
  color: #ffffff;
}

/* Share bar */
.post-share {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-top: 1.5rem;
  padding-top: 1.5rem;
  border-top: 1px solid #f0f0f4;
  flex-wrap: wrap;
}
.post-share-label {
  font-size: 0.875rem;
  font-weight: 600;
  color: #6b7280;
}
.post-share-links {
  display: flex;
  gap: 0.5rem;
}
.post-share-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: 8px;
  border: 1px solid #e5e7eb;
  background: transparent;
  color: #374151;
  cursor: pointer;
  text-decoration: none;
  transition: background 0.15s, color 0.15s, border-color 0.15s;
}
.post-share-btn:hover {
  background: var(--color-navy, #1a1a2e);
  color: #ffffff;
  border-color: var(--color-navy, #1a1a2e);
}

/* ============================================================
   SIDEBAR
   ============================================================ */
.post-sidebar {
  position: sticky;
  top: calc(var(--wp-admin--admin-bar--height, 0px) + var(--nav-height, 72px) + 1.5rem);
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

/* Sidebar card */
.sidebar-card {
  background: #ffffff;
  border: 1px solid #e9eaf0;
  border-radius: 14px;
  padding: 1.25rem 1.5rem;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.04);
}

/* Author card */
.sidebar-author-card {
  display: flex;
  gap: 1rem;
  align-items: flex-start;
}
.sidebar-author-avatar {
  width: 52px;
  height: 52px;
  border-radius: 50%;
  object-fit: cover;
  flex-shrink: 0;
}
.sidebar-author-body {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
}
.sidebar-author-label {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: #9ca3af;
  font-weight: 600;
}
.sidebar-author-name {
  font-size: 0.9375rem;
  font-weight: 700;
  color: var(--color-navy, #1a1a2e);
}
.sidebar-author-bio {
  font-size: 0.8125rem;
  color: #6b7280;
  line-height: 1.55;
  margin-top: 0.4rem;
  margin-bottom: 0;
}

/* Sidebar heading */
.sidebar-heading {
  font-size: 0.9375rem;
  font-weight: 700;
  color: var(--color-navy, #1a1a2e);
  margin-block: 0 1rem;
}

/* Category list */
.sidebar-cat-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}
.sidebar-cat-link {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.4rem 0.5rem;
  border-radius: 7px;
  font-size: 0.875rem;
  color: #374151;
  text-decoration: none;
  transition: background 0.15s, color 0.15s;
}
.sidebar-cat-link:hover,
.sidebar-cat-link.is-active {
  background: #f0f4ff;
  color: var(--color-blue, #1e4db7);
  font-weight: 600;
}
.sidebar-cat-count {
  font-size: 0.75rem;
  color: #9ca3af;
  background: #f3f4f6;
  border-radius: 999px;
  padding: 0.1rem 0.5rem;
  font-weight: 500;
}
.sidebar-cat-link.is-active .sidebar-cat-count {
  background: #dde6f5;
  color: var(--color-blue, #1e4db7);
}

/* CTA card */
.sidebar-cta-card {
  background: #F6F3E8;
  border-color: transparent;
  text-align: center;
  padding: 1.75rem 1.5rem;
}
.sidebar-cta-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: rgba(0, 19, 66, 0.08);
  color: var(--color-navy, #001342);
  margin-bottom: 0.875rem;
}
.sidebar-cta-heading {
  font-size: 1rem;
  font-weight: 700;
  color: var(--color-navy, #001342);
  margin-block: 0 0.5rem;
}
.sidebar-cta-text {
  font-size: 0.875rem;
  color: rgba(0, 19, 66, 0.65);
  line-height: 1.55;
  margin-bottom: 1.25rem;
}
.sidebar-cta-card .btn-primary {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.875rem;
  font-weight: 600;
  background: var(--color-crimson, #d7013f);
  color: #ffffff;
  padding: 0.6rem 1.25rem;
  border-radius: var(--radius-full, 9999px);
  text-decoration: none;
  transition: background 0.15s;
}
.sidebar-cta-card .btn-primary:hover {
  background: var(--color-crimson-dark, #a40130);
  color: #ffffff;
}

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 1024px) {
  .post-hero-inner {
    grid-template-columns: 1fr 340px;
    gap: 1.25rem;
  }
  .post-layout-inner {
    grid-template-columns: 1fr 300px;
    gap: 2.5rem;
  }
}

@media (max-width: 768px) {
  .post-hero {
    padding-block: 2rem 2.25rem;
  }
  .post-hero-inner {
    grid-template-columns: 1fr;
    gap: 1.75rem;
  }
  /* Stack image above text on mobile */
  .post-hero-image {
    order: -1;
  }
  .post-hero-thumbnail {
    max-height: 260px;
    object-fit: cover;
    width: 100%;
  }
  .post-layout-inner {
    grid-template-columns: 1fr;
    gap: 2.5rem;
  }
  .post-sidebar {
    position: static;
  }
  .sidebar-cta-card {
    order: -1;
  }
  .post-layout {
    padding-block: 2rem 3rem;
  }
}

@media (max-width: 480px) {
  .post-title {
    font-size: 1.5rem;
  }
}
