/* =========================================================
   BLOG POST (SINGLE) – STYLES
   File: /wp-content/assets/css/pages/post.css
   Fokus:
   - Hero + Meta + Share
   - Post Layout (ToC rechts sticky, mobile oben)
   - Keine FAQ Styles hier (FAQ kommt zentral wie Service)
========================================================= */

.post-page{
  --container: 1300px;
  padding-bottom: clamp(56px, 6vw, 96px);
}

.post-page .container{
  max-width: 1300px;
}

/* ---------------------------------------------------------
   HERO
---------------------------------------------------------- */

.post-hero{
  background: var(--color-primary);
  color: var(--color-text-invert);

  min-height: 70vh;
  max-height: 70vh;

  padding-top: clamp(
    calc(var(--header-height, 0px) + 32px),
    var(--hero-content-offset),
    calc(var(--header-height, 0px) + 96px)
  );

  padding-bottom: 0;
  box-sizing: border-box;
  overflow: hidden;
}

.post-hero__grid{
  display: grid;
  grid-template-columns: minmax(420px, 1fr) minmax(520px, 1fr);
  gap: clamp(32px, 4vw, 64px);
  align-items: start;
}

.post-hero__text{
  max-width: 560px;
}

.post-hero__crumb{
  margin: 0 0 12px 0;
}

.post-hero__title{
  margin: 0 0 20px 0;
  color: inherit;
}

.post-hero__excerpt{
  margin: 0 0 22px 0;
  max-width: 520px;
  font-size: var(--fs-body);
  line-height: var(--lh-body);
  color: inherit;
  opacity: 0.92;
}

/* Meta */
.post-meta{
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 6px;

  font-size: var(--fs-body);
  line-height: var(--lh-body);

  color: inherit;
  opacity: 0.9;
  margin-bottom: 14px;
}

.post-meta__label{
  font-weight: 600;
}

/* =========================================================
   SHARE BUTTONS (HERO)
   - kein Scale
   - Hover nur Border + Text Accent
   - kleiner für Mobile (eine Zeile)
========================================================= */

.post-share{
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px 10px;
}

.post-share__label{
  font-size: var(--fs-body);
  line-height: var(--lh-body);
  opacity: 0.9;
  margin-right: 2px;
}

.post-share__btn{
  display: inline-flex;
  align-items: center;
  justify-content: center;

  padding: 7px 10px;
  border-radius: 999px;

  border: 1px solid color-mix(in srgb, currentColor 32%, transparent);
  background: transparent;

  color: inherit;
  text-decoration: none;

  font-size: 0.95em;
  line-height: 1;
  white-space: nowrap;

  transition:
    color .18s ease,
    border-color .18s ease;
}

.post-share__btn:focus-visible{
  outline: 2px solid currentColor;
  outline-offset: 2px;
}

.post-hero .post-share__btn:is(:hover, :focus-visible){
  color: var(--color-accent);
  border-color: var(--color-accent);
  background: transparent;
}

@media (max-width: 480px){
  .post-share{
    flex-wrap: nowrap;
    gap: 8px;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
  }
  .post-share::-webkit-scrollbar{ display: none; }

  .post-share__btn{
    padding: 6px 9px;
    font-size: 0.9em;
    flex: 0 0 auto;
  }
}

/* ---------------------------------------------------------
   HERO MEDIA (Radius immer wie Service)
---------------------------------------------------------- */

.post-hero__media{
  margin: 0;
}

.post-hero__mediaInner{
  width: 100%;
  max-width: 680px;
  margin-left: auto;

  border-radius: 14px;
  overflow: hidden;

  aspect-ratio: 16 / 10;
  background: color-mix(in srgb, #000 10%, transparent);
}

.post-hero__mediaInner img{
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
}

/* ---------------------------------------------------------
   BLOG LAYOUT (TOC + CONTENT)
   Ziel: fühlt sich wie Home an → klare Card, ruhige Borders
---------------------------------------------------------- */

.post-layout{
  display: grid;
  grid-template-columns: minmax(0, 1fr) 340px;
  gap: clamp(24px, 4vw, 64px);
  align-items: start;

  grid-template-areas: "article toc";
}

.post-article{
  grid-area: article;
  min-width: 0;
}

.post-aside{
  grid-area: toc;
}

.post-aside__inner{
  position: sticky;
  top: calc(var(--header-height, 0px) + 24px);
}

/* TOC Card */
.post-toc{
  border: 1px solid color-mix(in srgb, var(--color-primary) 18%, transparent);
  border-radius: 14px;
  padding: 18px;

  background: #fff;
}

.post-toc__title{
  margin: 0 0 12px 0;
  font-weight: 700;
}

.post-toc__list{
  margin: 0;
  padding-left: 1.1em;
}

.post-toc__item + .post-toc__item{
  margin-top: 10px;
}

.post-toc__link,
.post-toc__subLink{
  text-decoration: none;
  color: inherit;
}

.post-toc__link:is(:hover, :focus-visible),
.post-toc__subLink:is(:hover, :focus-visible){
  text-decoration: underline;
  text-underline-offset: 3px;
}

.post-toc__sub{
  margin-top: 6px;
  padding-left: 14px;
  opacity: 0.95;
}

.post-toc__subItem + .post-toc__subItem{
  margin-top: 6px;
}

/* Content Basics (nur safe) */
.post-content{
  max-width: 78ch;
}

.post-content > *:first-child{
  margin-top: 0;
}

.post-content h2{
  margin-top: 34px;
  margin-bottom: 12px;
}

.post-content h3{
  margin-top: 26px;
  margin-bottom: 10px;
}

.post-content p{
  margin: 0 0 18px 0;
}

.post-content a{
  color: inherit;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.post-content a:is(:hover, :focus-visible){
  opacity: 0.9;
}

.post-content ol{
  margin: 0 0 18px 0;
  padding-left: 1.2em;
}

.post-content ol li{
  margin: 0 0 10px 0;
}

.post-content ul{
  margin: 0 0 18px 0;
  padding-left: 0;
  list-style: none;
}

.post-content ul li{
  position: relative;
  padding-left: 18px;
  margin: 0 0 10px 0;
}

.post-content ul li::before{
  content: "";
  position: absolute;
  left: 0;
  top: 0.65em;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: currentColor;
  opacity: 0.55;
}

/* ---------------------------------------------------------
   RESPONSIVE
   - ToC oben (wie Home: zuerst Orientierung)
---------------------------------------------------------- */

@media (max-width: 1023px){
  .post-hero{
    min-height: auto;
    max-height: none;
    padding-bottom: 64px;
  }

  .post-hero__grid{
    grid-template-columns: 1fr;
    gap: 40px;
  }

  .post-hero__media{
    width: 100vw;
    margin-left: calc(50% - 50vw);
    margin-right: calc(50% - 50vw);
    margin-top: 22px;
  }

  .post-hero__mediaInner{
    max-width: none;
    width: 100%;
    border-radius: 14px;
    aspect-ratio: 16 / 9;
    overflow: hidden;
  }

  .post-layout{
    grid-template-columns: 1fr;
    grid-template-areas:
      "toc"
      "article";
  }

  .post-aside__inner{
    position: sticky;
    top: calc(var(--header-height, 0px) + 12px);
    z-index: 5;
  }
}
