/* =========================================================
   Single blog post page  –  Edulateral Foundation
   ========================================================= */

/* ---- Hero ---- */
.post-hero { background: var(--navy-dark); padding: 84px 0 64px; position: relative; overflow: hidden; }
.post-hero::before {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background:
    radial-gradient(ellipse 70% 60% at 110% 40%, rgba(255,196,20,.2) 0%, transparent 70%),
    radial-gradient(ellipse 50% 50% at -10% 80%, rgba(27,58,107,.6) 0%, transparent 70%);
}
.post-hero::after {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background-image:
    linear-gradient(rgba(255,255,255,.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,.03) 1px, transparent 1px);
  background-size: 56px 56px;
}
.post-hero .container { position: relative; z-index: 1; }

.post-crumbs { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-bottom: 22px; font-size: .82rem; color: rgba(255,255,255,.65); }
.post-crumbs a { color: rgba(255,255,255,.85); text-decoration: none; }
.post-crumbs a:hover { color: var(--gold); }
.post-crumbs [aria-current] { color: var(--gold); }

.post-hero h1 { color: #fff; font-size: clamp(1.8rem, 3.6vw, 2.7rem); line-height: 1.2; margin: 0 0 24px; max-width: 900px; }
.post-hero h1 span { color: var(--gold); }

.post-meta { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 10px 22px; font-size: .88rem; color: rgba(255,255,255,.8); }
.post-meta li { display: inline-flex; align-items: center; gap: 8px; }
.post-meta svg { color: var(--gold); }

/* ---- Article + sidebar layout ---- */
.post { background: #fffdf8; padding: 56px 0 96px; }
.post-layout { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 44px; align-items: start; }
.post-main { min-width: 0; }

.post-figure { margin: 0 0 36px; border-radius: 24px; overflow: hidden; box-shadow: 0 18px 48px rgba(14,32,56,.14); background: #cfe9f7; }
.post-figure img { display: block; width: 100%; height: auto; }

.post-body p { font-size: 1.05rem; line-height: 1.9; color: var(--muted); margin: 0 0 22px; }
.post-body ul, .post-body ol { margin: 0 0 22px; padding: 0 0 0 1.25rem; }
.post-body li { font-size: 1.05rem; line-height: 1.9; color: var(--muted); margin: 0 0 8px; padding-left: 4px; }
.post-body li::marker { color: #f5b800; }
.post-body strong { color: var(--ink, inherit); }
.post-figure--small { max-width: 600px; margin-left: auto; margin-right: auto; }

/* ---- LinkedIn CTA ---- */
.post-cta {
  margin-top: 40px; display: flex; align-items: center; justify-content: space-between; gap: 24px;
  background: var(--navy-dark); border-radius: 22px; padding: 30px 34px; position: relative; overflow: hidden;
}
.post-cta::before {
  content: ""; position: absolute; right: -60px; top: -80px; width: 260px; height: 260px; border-radius: 50%;
  background: radial-gradient(circle, rgba(255,196,20,.28), transparent 70%); pointer-events: none;
}
.post-cta-text { position: relative; }
.post-cta-text h2 { color: #fff; font-size: 1.35rem; margin: 0 0 6px; }
.post-cta-text p { color: rgba(255,255,255,.72); font-size: .94rem; line-height: 1.6; margin: 0; max-width: 42ch; }
.post-cta-btn { position: relative; flex: none; display: inline-flex; align-items: center; gap: 10px; white-space: nowrap; }

.post-back { display: inline-flex; align-items: center; gap: 8px; margin-top: 34px; font-weight: 600; font-size: .94rem; color: var(--navy); text-decoration: none; border-bottom: 2px solid var(--gold); padding-bottom: 2px; }
.post-back:hover { color: var(--gold-dark); }


/* ---- Extra content styles ---- */
.post-subhead { font-size: 1.15rem; color: var(--navy-dark); margin: 34px 0 14px; }
.post-quote { margin: 0 0 26px; padding: 22px 26px; background: #fff; border: 1px solid var(--line); border-left: 5px solid var(--gold); border-radius: 0 16px 16px 0; box-shadow: 0 8px 24px rgba(14,32,56,.06); }
.post-quote p { margin: 0; font-family: var(--font-head); font-size: 1.2rem; line-height: 1.6; color: var(--navy-dark); font-weight: 500; }
.post-kudos { background: rgba(255,196,20,.16); border: 1px solid rgba(255,196,20,.45); border-radius: 14px; padding: 16px 20px; color: var(--navy-dark) !important; font-weight: 600; }

/* ---- Sidebar ---- */
.post-sidebar { position: sticky; top: calc(var(--header-h) + 24px); }
.side-widget { background: #fff; border: 1px solid var(--line); border-radius: 22px; padding: 26px 24px 24px; box-shadow: 0 14px 40px rgba(14,32,56,.08); }
.side-title { font-size: 1.2rem; color: var(--navy-dark); margin: 0 0 20px; padding-bottom: 14px; position: relative; border-bottom: 1px solid var(--line); }
.side-title::after { content: ""; position: absolute; left: 0; bottom: -1px; width: 52px; height: 3px; background: var(--gold); border-radius: 3px; }
.side-list { list-style: none; margin: 0; padding: 0; }
.side-list li + li { margin-top: 18px; padding-top: 18px; border-top: 1px solid var(--line); }
.side-post { display: flex; gap: 14px; align-items: flex-start; text-decoration: none; color: inherit; }
.side-post img { flex: none; width: 96px; height: 80px; object-fit: cover; object-position: 50% 30%; border-radius: 12px; background: #cfe9f7; transition: transform .3s ease; }
.side-post:hover img { transform: scale(1.04); }
.side-post-text { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.side-post-title { font-size: .94rem; font-weight: 600; line-height: 1.4; color: var(--navy-dark); display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; transition: color .2s; }
.side-post:hover .side-post-title { color: var(--gold-dark); }
.side-post-date { font-size: .78rem; color: var(--muted); }
.side-all { display: inline-flex; align-items: center; gap: 8px; margin-top: 22px; font-weight: 600; font-size: .9rem; color: var(--navy); text-decoration: none; border-bottom: 2px solid var(--gold); padding-bottom: 2px; }
.side-all:hover { color: var(--gold-dark); }

@media (max-width: 1000px) {
  .post-layout { grid-template-columns: 1fr; gap: 40px; }
  .post-sidebar { position: static; }
}

@media (max-width: 720px) {
  .post-hero { padding: 64px 0 48px; }
  .post { padding: 36px 0 72px; }
  .post-figure { border-radius: 18px; margin-bottom: 28px; }
  .post-cta { flex-direction: column; align-items: flex-start; padding: 26px 24px; }
  .post-cta-btn { width: 100%; justify-content: center; }
}

/* =========================================================
   Posts page hero extras
   ========================================================= */
.posts-hero-lead { color: rgba(255,255,255,.78); font-size: var(--p-size); line-height: var(--p-line); max-width: 56ch; margin: 0; }
.posts-list { background: var(--cream); padding: 56px 0 100px; min-height: 40vh; }
.posts-count { font-size: .85rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--gold-dark); margin: 0 0 24px; }
@media (max-width: 640px) { .posts-list { padding: 40px 0 72px; } }

/* =========================================================
   Previous / Next post navigation
   ========================================================= */
.post-nav { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin-top: 40px; }
.post-nav-link {
  display: flex; flex-direction: column; gap: 8px; padding: 18px 22px; text-decoration: none; color: inherit;
  background: #fff; border: 1px solid var(--line); border-radius: 18px; box-shadow: 0 8px 24px rgba(14,32,56,.05);
  transition: transform .2s ease, border-color .2s ease, box-shadow .2s ease;
}
a.post-nav-link:hover { transform: translateY(-3px); border-color: var(--gold); box-shadow: 0 14px 32px rgba(14,32,56,.12); }
.post-nav-link--next { text-align: right; }
.post-nav-label { font-size: .72rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--gold-dark); }
.post-nav-title { font-size: .95rem; font-weight: 600; line-height: 1.4; color: var(--navy-dark); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
a.post-nav-link:hover .post-nav-title { color: var(--gold-dark); }
.post-nav-link.is-empty { background: transparent; border-style: dashed; box-shadow: none; opacity: .6; }
.post-nav-link.is-empty .post-nav-title { font-weight: 500; color: var(--muted); }

/* =========================================================
   Comments + replies
   ========================================================= */
.comments { margin-top: 56px; }
.comments-title { font-size: 1.5rem; color: var(--navy-dark); margin: 0 0 22px; padding-bottom: 14px; border-bottom: 1px solid var(--line); position: relative; }
.comments-title::after { content: ""; position: absolute; left: 0; bottom: -1px; width: 56px; height: 3px; background: var(--gold); border-radius: 3px; }
.comments-title span { color: var(--gold-dark); font-weight: 600; }

.comment-list, .comment-replies { list-style: none; margin: 0; padding: 0; }
.comment-list > .comment { margin-bottom: 22px; }
.comment-box { display: flex; gap: 16px; align-items: flex-start; background: #fff; border: 1px solid var(--line); border-radius: 18px; padding: 20px 22px; box-shadow: 0 8px 24px rgba(14,32,56,.05); }
.comment-avatar { flex: none; width: 46px; height: 46px; border-radius: 50%; background: var(--navy-dark); color: var(--gold); display: grid; place-items: center; font-family: var(--font-head); font-weight: 700; font-size: 1.15rem; }
.comment-main { min-width: 0; flex: 1; }
.comment-head { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 12px; margin-bottom: 6px; }
.comment-name { color: var(--navy-dark); font-size: 1rem; }
.comment-date { font-size: .78rem; color: var(--muted); }
.comment-to { margin: 0 0 6px; font-size: .8rem; color: var(--muted); }
.comment-to strong { color: var(--gold-dark); }
.comment-text { margin: 0 0 12px; font-size: .98rem; line-height: 1.75; color: var(--ink); white-space: pre-line; overflow-wrap: anywhere; }
.comment-reply { background: none; border: 0; padding: 0; cursor: pointer; font: inherit; font-size: .85rem; font-weight: 700; color: var(--navy); border-bottom: 2px solid var(--gold); line-height: 1.4; }
.comment-reply:hover { color: var(--gold-dark); }

.comment-replies { margin: 16px 0 0 28px; padding-left: 22px; border-left: 2px solid rgba(255,196,20,.55); }
.comment-replies > .comment { margin-bottom: 16px; }
.comment--reply .comment-box { background: #fffaf0; }
.comment--reply .comment-avatar { width: 40px; height: 40px; font-size: 1rem; }
.comment-reply-form { margin: 14px 0 0 28px; }

.comment.is-new > .comment-box { animation: commentFlash 2.2s ease; }
@keyframes commentFlash { 0% { box-shadow: 0 0 0 4px rgba(255,196,20,.7); } 100% { box-shadow: 0 8px 24px rgba(14,32,56,.05); } }

.comment-empty { margin: 0 0 28px; color: var(--muted); font-size: .98rem; }

/* ---- Form ---- */
.comment-form-slot { margin-top: 34px; }
.comment-form { background: #fff; border: 1px solid var(--line); border-radius: 20px; padding: 26px 26px 24px; box-shadow: 0 12px 34px rgba(14,32,56,.07); }
.comment-form--reply { padding: 20px; border-radius: 16px; background: #fff; }
.comment-form-title { font-size: 1.25rem; color: var(--navy-dark); margin: 0 0 18px; }
.comment-replying { margin: 0 0 14px; font-size: .88rem; color: var(--muted); }
.comment-replying strong { color: var(--gold-dark); }
.cf-row { display: flex; flex-direction: column; gap: 6px; margin-bottom: 16px; }
.cf-row label { font-size: .82rem; font-weight: 700; color: var(--navy-dark); }
.cf-row input, .cf-row textarea {
  width: 100%; font: inherit; font-size: .96rem; color: var(--ink); background: #fffdf8;
  border: 1px solid var(--line); border-radius: 12px; padding: 12px 14px; transition: border-color .2s, box-shadow .2s;
}
.cf-row textarea { resize: vertical; min-height: 96px; line-height: 1.6; }
.cf-row input:focus, .cf-row textarea:focus { outline: none; border-color: var(--gold); box-shadow: 0 0 0 4px rgba(255,196,20,.28); background: #fff; }
.cf-hp { position: absolute !important; left: -9999px; width: 1px; height: 1px; opacity: 0; }
.cf-status { min-height: 1.2em; margin: 0 0 8px; font-size: .86rem; font-weight: 600; color: #b3261e; }
.cf-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 18px; }
.cf-cancel { background: none; border: 0; cursor: pointer; font: inherit; font-weight: 600; font-size: .9rem; color: var(--muted); padding: 6px 4px; }
.cf-cancel:hover { color: var(--navy-dark); text-decoration: underline; }

@media (max-width: 720px) {
  .post-nav { grid-template-columns: 1fr; }
  .post-nav-link--next { text-align: left; }
  .comment-box { padding: 16px; gap: 12px; }
  .comment-avatar { width: 38px; height: 38px; font-size: 1rem; }
  .comment-replies { margin-left: 8px; padding-left: 14px; }
  .comment-reply-form { margin-left: 8px; }
  .comment-form { padding: 20px 18px; }
}
@media (prefers-reduced-motion: reduce) { .comment.is-new > .comment-box { animation: none; } .post-nav-link { transition: none; } }
