/*
 * Single Post Template
 * Only layout styles unique to this template.
 * Form/button base styles are in site.css.
 */

.sp-page { width: 100%; }

.sp-container,
.sp-hero__inner { max-width: 1200px; margin: 0 auto; padding: 0 24px; }

body.single-post .peflon-hero { display: none !important; }

/* Shared surfaces */
.sp-content,
.sp-toc,
.sp-quote-form,
.sp-postnav__link,
.sp-related__card {
  background: var(--hs-bg);
  border: 1px solid var(--hs-border);
  border-radius: 10px;
  box-shadow: var(--hs-shadow-card);
}

/* Hero */
.sp-hero { min-height: 477px; display: flex; align-items: center; background: var(--hs-bg-alt); margin-bottom: 50px; }
.sp-hero__inner { display: flex; align-items: center; width: 100%; padding-top: 40px; padding-bottom: 40px; }
.sp-hero__image { width: 50%; flex-shrink: 0; }
.sp-hero__image img { width: 100%; height: 350px; max-height: 400px; display: block; object-fit: cover; border-radius: 10px; }
.sp-hero__text { width: 52%; padding-left: 40px; display: flex; flex-direction: column; justify-content: center; }
.sp-hero__divider { display: block; width: 60px; height: 3px; margin-bottom: 20px; background: var(--hs-accent); }
.sp-hero__title { margin: 0 0 16px; color: var(--hs-title); font-size: 34px; font-weight: 700; line-height: 1.25; }
.sp-hero__meta { display: flex; align-items: center; gap: 16px; margin-bottom: 20px; color: var(--hs-text); font-size: 14px; }

.sp-meta-cat {
  padding: 3px 10px;
  border-radius: 5px;
  background: var(--hs-accent);
  color: #fff;
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
}

.sp-meta-date { color: #697469; }

.sp-share { display: flex; gap: 10px; }
.sp-share__btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: #e6ece4;
  color: var(--hs-text);
  text-decoration: none;
  transition: background-color 0.2s, color 0.2s, transform 0.2s;
}

.sp-share__btn:hover { background: var(--hs-accent); color: #fff; transform: translateY(-1px); }

/* Content + Sidebar */
.sp-body { margin-bottom: 40px; }
.sp-body__inner { display: flex; align-items: stretch; }
.sp-content { width: 70%; flex-shrink: 0; padding: 30px; }
.sp-sidebar { width: 30%; padding-left: 24px; display: flex; flex-direction: column; gap: 24px; }

/* Prose */
.sp-prose { color: var(--hs-text); font-size: 16px; line-height: 1.8; }
.sp-prose :is(h2, h3, h4) { color: var(--hs-title); font-weight: 700; }
.sp-prose h2 { margin: 32px 0 16px; padding-bottom: 8px; font-size: 24px; border-bottom: 1px solid var(--hs-border); }
.sp-prose h3 { margin: 24px 0 12px; font-size: 20px; }
.sp-prose h4 { margin: 20px 0 10px; font-size: 18px; }
.sp-prose p { margin: 0 0 16px; }
.sp-prose ul, .sp-prose ol { margin: 0 0 16px; padding-left: 24px; }
.sp-prose li { margin-bottom: 6px; }
.sp-prose img { max-width: 100%; height: auto; border-radius: 8px; }
.sp-prose a { color: var(--hs-accent); text-decoration: underline; }
.sp-prose a:hover { color: var(--hs-accent-dark); }

.sp-prose blockquote {
  margin: 20px 0;
  padding: 12px 20px;
  border-left: 4px solid var(--hs-accent);
  background: var(--hs-bg-alt);
  color: var(--hs-text);
  font-style: italic;
}

.sp-prose table { width: 100%; margin: 20px 0; border-collapse: collapse; }
.sp-prose th, .sp-prose td { padding: 10px 12px; border: 1px solid var(--hs-border); text-align: left; }
.sp-prose th { background: var(--hs-bg-alt); color: var(--hs-title); font-weight: 700; }

/* Sidebar */
.sp-sidebar__title {
  margin: 0 0 12px;
  padding-bottom: 8px;
  color: var(--hs-title);
  font-size: 16px;
  font-weight: 700;
  border-bottom: 2px solid var(--hs-accent);
}

.sp-toc, .sp-quote-form { padding: 16px; }
.sp-toc__list ol { margin: 0; padding-left: 20px; list-style: decimal; }
.sp-toc__list li { margin-bottom: 8px; font-size: 14px; line-height: 1.5; }
.sp-toc__list a { color: var(--hs-text); text-decoration: none; }
.sp-toc__list a:hover { color: var(--hs-accent); }
.sp-quote-form { position: sticky; top: 80px; }

/* Post Nav */
.sp-postnav__inner { display: flex; gap: 24px; padding: 24px; border-top: 1px solid var(--hs-border); border-bottom: 1px solid var(--hs-border); }
.sp-postnav__link { flex: 1; display: flex; flex-direction: column; gap: 6px; padding: 16px 20px; text-decoration: none; transition: transform 0.2s, box-shadow 0.2s; }
.sp-postnav__link:hover { transform: translateY(-2px); box-shadow: var(--hs-shadow-card-hover); }
.sp-postnav__placeholder { visibility: hidden; }
.sp-postnav__label { color: var(--hs-accent); font-size: 13px; font-weight: 600; letter-spacing: 0.04em; text-transform: uppercase; }
.sp-postnav__title { color: var(--hs-title); font-size: 15px; font-weight: 700; line-height: 1.45; }
.sp-postnav__prev { align-items: flex-start; }
.sp-postnav__next { align-items: flex-end; text-align: right; }

/* Related Posts */
.sp-related { padding: 50px 0; background: var(--hs-bg-alt); }
.sp-related__heading { margin: 0 0 30px; color: var(--hs-title); font-size: 26px; font-weight: 700; text-align: center; }
.sp-related__grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.sp-related__card { overflow: hidden; color: inherit; text-decoration: none; transition: transform 0.2s, box-shadow 0.2s; }
.sp-related__card:hover { transform: translateY(-2px); box-shadow: var(--hs-shadow-card-hover); }
.sp-related__thumb img { width: 100%; height: 180px; display: block; object-fit: cover; }
.sp-related__info { padding: 16px; }
.sp-related__title { margin: 0 0 8px; color: var(--hs-title); font-size: 16px; font-weight: 700; line-height: 1.45; }
.sp-related__date { color: #697469; font-size: 13px; }

/* Tablet */
@media (max-width: 992px) {
  .sp-hero__inner,
  .sp-body__inner,
  .sp-postnav__inner { flex-direction: column; }
  .sp-hero__inner { text-align: center; }
  .sp-hero__image, .sp-hero__text, .sp-content, .sp-sidebar { width: 100%; }
  .sp-hero__text { padding-top: 24px; padding-left: 0; align-items: center; }
  .sp-hero__divider, .sp-share, .sp-hero__meta { margin-left: auto; margin-right: auto; justify-content: center; }
  .sp-sidebar { padding-top: 24px; padding-left: 0; }
  .sp-quote-form { position: static; }
  .sp-related__grid { grid-template-columns: repeat(2, 1fr); }
  .sp-postnav__prev, .sp-postnav__next { align-items: flex-start; text-align: left; }
}

/* Mobile */
@media (max-width: 576px) {
  .sp-hero { min-height: auto; margin-bottom: 30px; }
  .sp-container, .sp-hero__inner { padding-left: 16px; padding-right: 16px; }
  .sp-hero__inner { padding-top: 24px; padding-bottom: 24px; }
  .sp-hero__title { font-size: 26px; }
  .sp-content { padding: 20px 16px; }
  .sp-prose { font-size: 15px; }
  .sp-prose h2 { font-size: 20px; }
  .sp-related__grid { grid-template-columns: 1fr; }
}

/* Print */
@media print {
  .sp-share, .sp-sidebar, .sp-postnav, .sp-related { display: none !important; }
  .sp-content { width: 100%; box-shadow: none; border: none; }
}
