/* ─────────────────────────────────────────────────────────────
   blog.css — Blog-specific styles for Optyk Premium Bogucki
   Extends: ../css/styles.css  (must be linked BEFORE this file)
   ───────────────────────────────────────────────────────────── */

/* ─── Reading progress bar ──────────────────────────────────── */
#reading-progress {
  position: fixed;
  top: 0; left: 0;
  height: 2px;
  background: var(--gold);
  width: 0%;
  z-index: 200;
  transition: width .08s linear;
  pointer-events: none;
}

/* ─── Nav active state ──────────────────────────────────────── */
/* Handled globally in ../css/styles.css via .nav-links a.nav-active */

/* ─── Blog hero (listing page) ──────────────────────────────── */
.blog-hero-wrap {
  padding-top: 64px;
  border-bottom: 1px solid var(--ink-10);
  position: relative;
  isolation: isolate;
}
.blog-hero {
  max-width: 1400px;
  margin: 0 auto;
  padding: 88px 64px 72px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 48px;
  align-items: end;
}
.section-pattern {
  position: absolute;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  overflow: hidden;
}
.section-pattern svg { width: 100%; height: 100%; display: block; }
.blog-hero-left {}
.blog-hero-eyebrow {
  font-family: var(--sans);
  font-size: 11px;
  letter-spacing: .18em;
  text-transform: uppercase;
  color: var(--gold);
  opacity: .85;
  margin-bottom: 18px;
}
.blog-hero-title {
  font-family: var(--serif);
  font-size: clamp(36px, 5vw, 62px);
  font-weight: 300;
  line-height: 1.08;
  color: var(--ink);
}
.blog-hero-title em {
  font-family: 'Cormorant Garamond', Georgia, serif;
  font-style: italic;
  font-weight: 300;
}
.blog-hero-right {}
.blog-hero-desc {
  font-size: 16px;
  font-weight: 300;
  color: var(--ink-60);
  line-height: 1.75;
  max-width: 440px;
  margin-bottom: 28px;
}
.blog-hero-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.blog-hero-tag {
  display: inline-block;
  padding: 5px 14px;
  border: 1px solid var(--ink-10);
  border-radius: 20px;
  font-size: 12px;
  font-weight: 300;
  letter-spacing: .04em;
  color: var(--ink-60);
  font-family: var(--sans);
}

/* ─── Blog listing section ──────────────────────────────────── */
.blog-listing {
  max-width: 1400px;
  margin: 0 auto;
  padding: 72px 64px 96px;
}
.blog-listing-header {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  margin-bottom: 40px;
}
.blog-listing-count {
  font-size: 12px;
  color: var(--ink-30);
  font-family: var(--sans);
  letter-spacing: .06em;
}
.blog-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 28px;
}

/* ─── Blog card ─────────────────────────────────────────────── */
.blog-card {
  border: 1px solid var(--ink-10);
  border-radius: 3px;
  overflow: hidden;
  background: var(--cream);
  text-decoration: none;
  color: inherit;
  display: flex;
  flex-direction: column;
  transition: transform .3s var(--ease-out), box-shadow .3s, border-color .3s;
}
.blog-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 20px 48px rgba(28,25,23,.09);
  border-color: rgba(184,146,74,.28);
}
.blog-card-img {
  height: 220px;
  overflow: hidden;
  background: var(--cream-2);
  position: relative;
  flex-shrink: 0;
}
.blog-card-img img {
  width: 100%; height: 100%;
  object-fit: cover; object-position: center;
  display: block;
  transition: transform .55s var(--ease-out);
}
.blog-card:hover .blog-card-img img { transform: scale(1.05); }
.blog-card-body {
  padding: 22px 24px 26px;
  display: flex;
  flex-direction: column;
  flex: 1;
}
.blog-card-category {
  font-size: 10px;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--gold);
  font-family: var(--sans);
  margin-bottom: 10px;
}
.blog-card-title {
  font-family: var(--serif);
  font-size: 20px;
  font-weight: 400;
  line-height: 1.26;
  color: var(--ink);
  margin-bottom: 10px;
  flex: 1;
}
.blog-card-excerpt {
  font-size: 13px;
  font-weight: 300;
  color: var(--ink-60);
  line-height: 1.65;
  margin-bottom: 18px;
}
.blog-card-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 14px;
  border-top: 1px solid var(--ink-10);
  margin-top: auto;
}
.blog-card-meta {
  font-size: 11px;
  color: var(--ink-30);
  font-family: var(--sans);
  letter-spacing: .03em;
}
.blog-card-readmore {
  font-size: 11px;
  font-weight: 500;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--gold);
  font-family: var(--sans);
  display: inline-flex;
  align-items: center;
  gap: 5px;
}

/* ─── Blog footer ───────────────────────────────────────────── */
.blog-footer {
  background: var(--cream-2);
  border-top: 1px solid var(--ink-10);
  padding: 32px 64px;
}
.blog-footer-inner {
  max-width: 1400px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.blog-footer-copy {
  font-size: 12px;
  color: var(--ink-30);
  font-family: var(--sans);
}
.blog-footer-back {
  font-size: 12px;
  color: var(--ink-60);
  font-family: var(--sans);
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: color .2s;
}
.blog-footer-back:hover { color: var(--ink); }

/* ═══════════════════════════════════════════════════════════════
   ARTICLE / POST PAGE STYLES
   ═══════════════════════════════════════════════════════════════ */

/* ─── Post top wrapper ──────────────────────────────────────── */
.post-top { padding-top: 64px; }

/* ─── Post header ───────────────────────────────────────────── */
.post-header-wrap {
  border-bottom: 1px solid var(--ink-10);
  background: var(--cream);
}
.post-header {
  max-width: 1400px;
  margin: 0 auto;
  padding: 72px 64px 60px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 64px;
  align-items: center;
}
.post-header-right {}
.post-header-image {
  border-radius: 10px;
  overflow: hidden;
  border: 1px solid var(--ink-10);
  aspect-ratio: 4/3;
  background: var(--cream-2);
}
.post-header-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.post-breadcrumb {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  color: var(--ink-30);
  font-family: var(--sans);
  margin-bottom: 22px;
  flex-wrap: wrap;
}
.post-breadcrumb a { color: var(--ink-30); text-decoration: none; transition: color .2s; }
.post-breadcrumb a:hover { color: var(--ink); }
.post-breadcrumb .sep { opacity: .5; }
.post-category {
  display: inline-block;
  padding: 4px 14px;
  border: 1px solid rgba(184,146,74,.4);
  border-radius: 20px;
  font-size: 11px;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--gold);
  font-family: var(--sans);
  margin-bottom: 20px;
}
.post-title {
  font-family: var(--serif);
  font-size: clamp(28px, 4.2vw, 50px);
  font-weight: 300;
  line-height: 1.1;
  color: var(--ink);
  margin-bottom: 24px;
  letter-spacing: -.01em;
}
.post-title em {
  font-family: 'Cormorant Garamond', Georgia, serif;
  font-style: italic;
  font-weight: 300;
}
.post-meta {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 12px;
  font-family: var(--sans);
  color: var(--ink-30);
  letter-spacing: .04em;
}
.post-meta-dot {
  width: 3px; height: 3px;
  border-radius: 50%;
  background: var(--ink-30);
}
.post-intro {
  margin-top: 28px;
  font-size: 17px;
  font-weight: 300;
  line-height: 1.78;
  color: var(--ink-60);
  max-width: 68ch;
  padding-top: 24px;
  border-top: 1px solid var(--ink-10);
}

/* ─── Featured image ────────────────────────────────────────── */
.post-image-wrap {
  max-width: 1000px;
  margin: 0 auto;
  padding: 0 24px;
}
.post-image-wrap img {
  width: 100%;
  display: block;
  object-fit: cover;
  max-height: 500px;
  border-radius: 3px;
}

/* ─── Article layout ────────────────────────────────────────── */
.post-layout {
  max-width: 820px;
  margin: 0 auto;
  padding: 0 24px 96px;
}

/* ─── Key takeaways box ─────────────────────────────────────── */
.post-takeaways {
  background: var(--cream-2);
  border: 1px solid rgba(184,146,74,.28);
  border-left: 3px solid var(--gold);
  border-radius: 3px;
  padding: 22px 28px;
  margin: 48px 0 0;
}
.post-takeaways-label {
  font-size: 10px;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: var(--gold);
  font-family: var(--sans);
  margin-bottom: 12px;
}
.post-takeaways ul {
  list-style: none;
  padding: 0;
  margin: 0;
}
.post-takeaways li {
  font-size: 14px;
  font-weight: 300;
  color: var(--ink-60);
  line-height: 1.65;
  padding-left: 18px;
  position: relative;
  margin-bottom: 6px;
}
.post-takeaways li:last-child { margin-bottom: 0; }
.post-takeaways li::before {
  content: '';
  position: absolute;
  left: 0; top: .6em;
  width: 5px; height: 5px;
  border-radius: 50%;
  background: var(--gold);
  opacity: .7;
}

/* ─── Article body typography ───────────────────────────────── */
.post-body { padding: 52px 0; }
.post-body > * + * { margin-top: 1.55em; }

.post-body h2 {
  font-family: var(--serif);
  font-size: clamp(20px, 2.5vw, 28px);
  font-weight: 400;
  line-height: 1.18;
  color: var(--ink);
  margin-top: 2.6em;
  margin-bottom: .5em;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--ink-10);
}
.post-body h2:first-child { margin-top: 0; }

.post-body h3 {
  font-family: var(--sans);
  font-size: 16px;
  font-weight: 500;
  letter-spacing: .02em;
  color: var(--ink);
  margin-top: 2em;
  margin-bottom: .45em;
}

.post-body p {
  font-size: 16px;
  font-weight: 300;
  line-height: 1.82;
  color: rgba(28,25,23,.8);
  max-width: 68ch;
}

.post-body ul, .post-body ol {
  padding-left: 0;
  list-style: none;
}
.post-body ul li {
  padding-left: 22px;
  position: relative;
  font-size: 16px;
  font-weight: 300;
  line-height: 1.75;
  color: rgba(28,25,23,.8);
  margin-bottom: .55em;
}
.post-body ul li::before {
  content: '';
  position: absolute;
  left: 0; top: .72em;
  width: 6px; height: 6px;
  border-radius: 50%;
  background: var(--gold);
  opacity: .65;
}
.post-body ol { counter-reset: post-ol; }
.post-body ol li {
  padding-left: 30px;
  position: relative;
  font-size: 16px;
  font-weight: 300;
  line-height: 1.75;
  color: rgba(28,25,23,.8);
  margin-bottom: .6em;
  counter-increment: post-ol;
}
.post-body ol li::before {
  content: counter(post-ol) '.';
  position: absolute;
  left: 0; top: 0;
  font-size: 14px;
  font-weight: 500;
  color: var(--gold);
  font-family: var(--sans);
  line-height: 1.75;
}

.post-body strong { font-weight: 500; color: var(--ink); }

.post-body a {
  color: var(--ink);
  text-decoration: underline;
  text-underline-offset: 3px;
  text-decoration-color: rgba(184,146,74,.4);
  transition: text-decoration-color .2s;
}
.post-body a:hover { text-decoration-color: var(--gold); }

.post-body blockquote {
  border-left: 3px solid var(--gold);
  padding: 14px 0 14px 24px;
  margin: 2em 0;
}
.post-body blockquote p {
  font-family: var(--serif);
  font-size: 18px;
  font-style: italic;
  color: var(--ink-60);
  line-height: 1.62;
  margin: 0;
}

/* Tip / callout box */
.tip-box {
  background: var(--cream-2);
  border: 1px solid rgba(184,146,74,.22);
  border-left: 3px solid var(--gold);
  border-radius: 3px;
  padding: 18px 24px;
  margin: 2em 0;
}
.tip-box-label {
  font-size: 10px;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: var(--gold);
  font-family: var(--sans);
  margin-bottom: 7px;
}
.tip-box p {
  font-size: 14px;
  line-height: 1.7;
  color: var(--ink-60);
  margin: 0;
}
.tip-box p + p { margin-top: .6em; }

/* Table */
.post-body table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
  margin: 1.5em 0;
}
.post-body th {
  text-align: left;
  padding: 10px 14px;
  font-family: var(--sans);
  font-size: 11px;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--ink-60);
  border-bottom: 1px solid var(--ink-10);
  font-weight: 500;
}
.post-body td {
  padding: 12px 14px;
  font-weight: 300;
  color: rgba(28,25,23,.8);
  border-bottom: 1px solid var(--ink-10);
  line-height: 1.5;
  vertical-align: top;
}
.post-body tr:last-child td { border-bottom: none; }

/* ─── FAQ in articles ───────────────────────────────────────── */
.post-faq { margin-top: 2.6em; }
.post-faq-item {
  border-bottom: 1px solid var(--ink-10);
  overflow: hidden;
}
.post-faq-q {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 18px 0;
  cursor: pointer;
  font-family: var(--serif);
  font-size: 18px;
  font-weight: 400;
  color: var(--ink);
  gap: 16px;
  transition: color .2s;
  user-select: none;
}
.post-faq-q:hover { color: var(--gold); }
.post-faq-icon {
  width: 22px; height: 22px;
  flex-shrink: 0;
  border: 1px solid var(--ink-10);
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 14px;
  color: var(--ink-30);
  transition: transform .3s var(--ease-out), border-color .2s, color .2s;
}
.post-faq-item.open .post-faq-icon {
  transform: rotate(45deg);
  border-color: rgba(184,146,74,.4);
  color: var(--gold);
}
.post-faq-a {
  max-height: 0;
  overflow: hidden;
  transition: max-height .45s var(--ease-out), padding .35s;
  font-size: 15px;
  font-weight: 300;
  color: var(--ink-60);
  line-height: 1.76;
  padding: 0;
}
.post-faq-item.open .post-faq-a { max-height: 300px; padding-bottom: 18px; }

/* ─── CTA box ───────────────────────────────────────────────── */
.post-cta {
  background: var(--ink);
  border-radius: 3px;
  padding: 44px 52px;
  margin-top: 64px;
}
.post-cta-eyebrow {
  font-size: 10px;
  letter-spacing: .18em;
  text-transform: uppercase;
  color: rgba(255,255,255,.3);
  font-family: var(--sans);
  margin-bottom: 12px;
}
.post-cta-title {
  font-family: var(--serif);
  font-size: clamp(22px, 2.8vw, 32px);
  font-weight: 300;
  color: white;
  line-height: 1.15;
  margin-bottom: 8px;
}
.post-cta-body {
  font-size: 13px;
  font-weight: 300;
  color: rgba(255,255,255,.4);
  line-height: 1.65;
  margin-bottom: 26px;
}
.post-cta-stars {
  color: var(--gold-light);
  font-size: 12px;
  letter-spacing: 2px;
  margin-bottom: 22px;
}
.post-cta-actions { display: flex; gap: 12px; flex-wrap: wrap; }

/* ─── Related posts ─────────────────────────────────────────── */
.post-related {
  margin-top: 64px;
  padding-top: 48px;
  border-top: 1px solid var(--ink-10);
}
.post-related-eyebrow {
  font-size: 11px;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: var(--gold);
  font-family: var(--sans);
  margin-bottom: 28px;
}
.post-related-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}
.post-related-card {
  border: 1px solid var(--ink-10);
  border-radius: 3px;
  overflow: hidden;
  background: var(--cream);
  text-decoration: none;
  color: inherit;
  display: block;
  transition: transform .3s var(--ease-out), box-shadow .25s, border-color .25s;
}
.post-related-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 14px 36px rgba(28,25,23,.09);
  border-color: rgba(184,146,74,.25);
}
.post-related-img {
  height: 140px;
  overflow: hidden;
  background: var(--cream-2);
}
.post-related-img img {
  width: 100%; height: 100%;
  object-fit: cover; display: block;
  transition: transform .5s var(--ease-out);
}
.post-related-card:hover .post-related-img img { transform: scale(1.05); }
.post-related-body { padding: 15px 17px 17px; }
.post-related-category {
  font-size: 9px;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--gold);
  font-family: var(--sans);
  margin-bottom: 6px;
}
.post-related-title {
  font-family: var(--serif);
  font-size: 15px;
  font-weight: 400;
  line-height: 1.3;
  color: var(--ink);
}

/* ═══════════════════════════════════════════════════════════════
   RESPONSIVE
   ═══════════════════════════════════════════════════════════════ */

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

@media (max-width: 960px) {
  .blog-hero { grid-template-columns: 1fr; gap: 28px; padding: 80px 32px 60px; }
  .blog-listing { padding: 52px 32px 72px; }
  .blog-footer { padding: 28px 32px; }
  .post-header { grid-template-columns: 1fr; gap: 40px; padding: 60px 32px 48px; }
  .post-header-right { order: -1; }
  .post-header-image { aspect-ratio: 16/7; }
  .post-cta { padding: 32px 36px; }
}

@media (max-width: 640px) {
  .blog-hero { padding: 72px 20px 48px; }
  .blog-listing { padding: 40px 20px 60px; }
  .blog-grid { grid-template-columns: 1fr; }
  .blog-footer { padding: 24px 20px; }
  .blog-footer-inner { flex-direction: column; gap: 10px; align-items: flex-start; }
  .post-header { padding: 48px 20px 40px; }
  .post-header-image { aspect-ratio: 16/8; border-radius: 8px; }
  .post-layout { padding: 0 20px 64px; }
  .post-body p { font-size: 15px; }
  .post-body h2 { font-size: 21px; }
  .post-cta { padding: 28px 22px; }
  .post-cta-actions { flex-direction: column; }
  .post-cta-actions .btn-primary,
  .post-cta-actions .btn-secondary { justify-content: center; width: 100%; box-sizing: border-box; }
  .post-related-grid { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 480px) {
  .post-related-grid { grid-template-columns: 1fr; }
}
