/* ======================================================
   SINGLE POST — PREMIUM EDITORIAL (V8) — NO GRADIENT
   File: /assets/css/single-post.css

   Purpose:
   - Premium editorial single post (scoped to single post only).
   - ✅ Keeps 2-col layout fix (read column + sidebar).
   - ✅ TOC default collapsed supported (.is-collapsed).
   - ✅ NO gradients anywhere in this file.
   - ✅ Buttons: solid orange + white text.
   - ✅ TOC: light blue (no gradient).

   Related:
   - /assets/css/sidebar.css (global layout system)
====================================================== */

/* Force ONLY single post width */
body.single-post{
  --hdaf-content-width: 1500px;

  /* Scoped palette (NO gradients) */
  --hdaf-sp-orange: #ff7a00;                 /* brand orange */
  --hdaf-sp-orange-soft: rgba(255,122,0,.10);
  --hdaf-sp-orange-soft2: rgba(255,122,0,.16);

  --hdaf-sp-link: #0b5bd3;
  --hdaf-sp-link-hover: #ff7a00;

  /* TOC light blue */
  --hdaf-sp-toc-bg: #eaf4ff;                 /* light blue */
  --hdaf-sp-toc-border: rgba(11,91,211,.22); /* blue border */
  --hdaf-sp-toc-link: rgba(0,0,0,.82);
}

.hdaf-sp{
  --hdaf-sp-wrap: 1450px;
  --hdaf-sp-read: 1100px;
  --hdaf-sp-gap: 20px;

  --hdaf-sp-text: rgba(0,0,0,.88);
  --hdaf-sp-muted: rgba(0,0,0,.62);
  --hdaf-sp-line: rgba(0,0,0,.09);

  padding: 44px 0 72px;
}

/* Outer container */
.hdaf-sp__wrap{
  max-width: var(--hdaf-sp-wrap);
  margin: 0 auto;
  padding: 0 20px;
}

/* ======================================================
   Layout (desktop)
====================================================== */
@media (min-width: 992px){
  .hdaf-sp .hdaf-layout.hdaf-layout--right{
    grid-template-columns: minmax(0, var(--hdaf-sp-read)) var(--hdaf-sidebar-width) !important;
    column-gap: var(--hdaf-sp-gap) !important;
    justify-content: center;
    align-items: start;
  }
  .hdaf-sp .hdaf-layout__content{ min-width: 0; }
  .hdaf-sp aside.hdaf-sidebar{ min-width: 0; }
}

/* =========================
   Header
========================= */
.hdaf-sp__header{
  max-width: var(--hdaf-sp-read);
  margin: 0 0 18px;
}

.hdaf-sp__kicker{
  font-size: 12px;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--hdaf-sp-muted);
  margin: 0 0 12px;
}

.hdaf-sp__kicker a{
  color: inherit;
  text-decoration: none;
  border-bottom: 1px solid transparent;
}
.hdaf-sp__kicker a:hover{
  border-bottom-color: rgba(0,0,0,.12);
}

.hdaf-sp__title{
  font-size: clamp(30px, 3.25vw, 52px);
  line-height: 1.08;
  letter-spacing: -0.03em;
  margin: 0 0 14px;

  /* NO gradient text */
  color: rgba(0,0,0,.92);
}

.hdaf-sp__meta{
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  font-size: 13px;
  color: var(--hdaf-sp-muted);
}
.hdaf-sp__meta-sep{ opacity: .55; }

/* =========================
   Hero
========================= */
.hdaf-sp__hero{
  max-width: var(--hdaf-sp-read);
  margin: 18px 0 0;
  border-radius: 18px;
  overflow: hidden;
  border: 1px solid var(--hdaf-sp-line);
  background: rgba(0,0,0,.02);
  box-shadow: 0 10px 30px rgba(0,0,0,.06);
}
.hdaf-sp__hero-img{
  width: 100%;
  display: block;
  height: auto;
}
.hdaf-sp__hero-cap{
  display: block;
  text-align: center;
  font-size: 12px;
  line-height: 1.4;
  color: var(--hdaf-sp-muted);
  padding: 10px 12px 12px;
  border-top: 1px solid rgba(0,0,0,.06);
  background: rgba(255,255,255,.65);
}

/* =========================
   TOC (Light Blue — NO gradient)
========================= */
.hdaf-toc{
  max-width: var(--hdaf-sp-read);
  margin: 18px 0 0;
  border: 1px solid var(--hdaf-sp-toc-border);
  border-radius: 16px;
  background: var(--hdaf-sp-toc-bg);
  padding: 14px 16px;
}

.hdaf-toc__title{
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;

  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: .12em;
  color: rgba(0,0,0,.62);
  margin: 0 0 10px;
}

.hdaf-toc__toggle{
  appearance: none;
  border: 1px solid rgba(11,91,211,.28);
  background: #fff;
  border-radius: 999px;
  padding: 7px 12px;
  font-size: 12px;
  line-height: 1;
  cursor: pointer;
  color: rgba(0,0,0,.78);
  font-weight: 800;
  transition: transform .12s ease, background .12s ease, border-color .12s ease;
}
.hdaf-toc__toggle:hover{
  background: rgba(11,91,211,.08);
  border-color: rgba(11,91,211,.40);
  transform: translateY(-1px);
}

.hdaf-toc__list{
  margin: 0;
  padding-left: 18px;
}
.hdaf-toc__list li{ margin: 0 0 8px; }

.hdaf-toc__list a{
  color: var(--hdaf-sp-toc-link);
  text-decoration: none;
  border-bottom: 1px solid rgba(11,91,211,.22);
}
.hdaf-toc__list a:hover{
  border-bottom-color: rgba(11,91,211,.45);
  color: rgba(0,0,0,.92);
}

.hdaf-toc__link.is-active{
  border-bottom-color: rgba(11,91,211,.60);
  font-weight: 800;
}

.hdaf-toc.is-collapsed .hdaf-toc__list{ display: none; }

/* =========================
   Content typography
========================= */
.hdaf-sp__content{
  max-width: var(--hdaf-sp-read);
  margin: 26px 0 0;
  font-size: 16.5px;
  line-height: 1.82;
  color: var(--hdaf-sp-text);
}

.hdaf-sp__content > *:first-child{ margin-top: 0; }
.hdaf-sp__content p{ margin: 0 0 18px; }

.hdaf-sp__content > p:first-of-type{
  font-size: 17.5px;
  color: rgba(0,0,0,.84);
}

/* Links */
.hdaf-sp__content a{
  color: var(--hdaf-sp-link);
  text-decoration: none;
  border-bottom: 1px solid rgba(11,91,211,.25);
  transition: border-color .12s ease, color .12s ease;
}
.hdaf-sp__content a:hover{
  color: var(--hdaf-sp-link-hover);
  border-bottom-color: rgba(255,122,0,.55);
}

.hdaf-sp__content ul,
.hdaf-sp__content ol{
  padding-left: 22px;
  margin: 0 0 18px;
}
.hdaf-sp__content li{ margin: 0 0 9px; }

.hdaf-sp__content code{
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
  font-size: .92em;
  padding: 2px 6px;
  border-radius: 8px;
  background: rgba(0,0,0,.04);
  border: 1px solid rgba(0,0,0,.08);
}

.hdaf-sp__content pre{
  overflow: auto;
  padding: 16px 18px;
  border-radius: 14px;
  background: rgba(0,0,0,.05);
  border: 1px solid var(--hdaf-sp-line);
}
.hdaf-sp__content pre code{
  background: transparent;
  border: 0;
  padding: 0;
}

/* Blockquote (NO gradient) */
.hdaf-sp__content blockquote{
  margin: 22px 0;
  padding: 16px 18px 16px 16px;
  border-radius: 16px;
  border: 1px solid rgba(0,0,0,.10);
  background: rgba(0,0,0,.03);
  position: relative;
}
.hdaf-sp__content blockquote:before{
  content: "“";
  position: absolute;
  top: -18px;
  left: 14px;
  font-size: 54px;
  line-height: 1;
  color: rgba(0,0,0,.18);
}
.hdaf-sp__content blockquote p{ margin: 0; }

.hdaf-sp__content img{
  max-width: 100%;
  height: auto;
  border-radius: 14px;
  border: 1px solid rgba(0,0,0,.06);
}

/* Tables */
.hdaf-sp__content table{
  width: 100%;
  border-collapse: collapse;
  margin: 18px 0 22px;
  border-radius: 14px;
  overflow: hidden;
  border: 1px solid rgba(0,0,0,.10);
}
.hdaf-sp__content th,
.hdaf-sp__content td{
  padding: 12px 14px;
  border-bottom: 1px solid rgba(0,0,0,.08);
}
.hdaf-sp__content th{
  text-align: left;
  background: rgba(0,0,0,.03);
}

/* =========================
   Headings (NO gradient)
========================= */
.hdaf-sp__content h2,
.hdaf-sp__content h3,
.hdaf-sp__content h4,
.hdaf-sp__content h5,
.hdaf-sp__content h6{
  color: rgba(0,0,0,.92);
  line-height: 1.25;
  letter-spacing: -0.015em;
  margin: 34px 0 12px;
  scroll-margin-top: 120px;
}

.hdaf-sp__content h2,
.hdaf-sp__content h3{
  position: relative;
  padding-left: 14px;
}
.hdaf-sp__content h2:before,
.hdaf-sp__content h3:before{
  content: "";
  position: absolute;
  left: 0;
  top: .22em;
  width: 4px;
  height: 1.05em;
  border-radius: 99px;

  /* solid orange only */
  background: var(--hdaf-sp-orange);
  box-shadow: none;
}

.hdaf-sp__content h2{
  font-size: 28px;
  letter-spacing: -0.02em;
  padding-bottom: 10px;
  border-bottom: 1px solid rgba(0,0,0,.10);
}
.hdaf-sp__content h3{ font-size: 22px; }
.hdaf-sp__content h4{ font-size: 18px; margin-top: 26px; }

.hdaf-sp__content h5{
  font-size: 16px;
  text-transform: uppercase;
  letter-spacing: .08em;
  color: rgba(0,0,0,.78);
  margin-top: 22px;
}
.hdaf-sp__content h6{
  font-size: 15px;
  color: var(--hdaf-sp-muted);
  margin-top: 18px;
}

/* Footer */
.hdaf-sp__footer{
  max-width: var(--hdaf-sp-read);
  margin: 34px 0 0;
  padding-top: 18px;
  border-top: 1px solid rgba(0,0,0,.10);
}

@media (max-width: 900px){
  .hdaf-sp{ padding: 34px 0 56px; }
  .hdaf-sp__hero{ border-radius: 14px; }
}

/* ======================================================
   COMMENTS — NO gradient
====================================================== */

.hdaf-cmt{
  max-width: var(--hdaf-sp-read);
  margin: 46px 0 0;
  padding-top: 26px;
  border-top: 1px solid rgba(0,0,0,.10);
}

.hdaf-cmt__top{
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 22px;
}

.hdaf-cmt__title{
  font-size: 22px;
  letter-spacing: -0.02em;
  margin: 0;
}

.hdaf-cmt__list{ list-style: none; margin: 0; padding: 0; }
.hdaf-cmt__item{ margin-bottom: 18px; }

.hdaf-cmt__card{
  display: flex;
  gap: 14px;
  padding: 16px 18px;
  border-radius: 16px;
  background: rgba(0,0,0,.03);
  border: 1px solid rgba(0,0,0,.08);
}

.hdaf-cmt__avatar img{ border-radius: 50%; }

.hdaf-cmt__body{ flex: 1; min-width: 0; }

.hdaf-cmt__head{
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 12px;
  margin-bottom: 6px;
}

.hdaf-cmt__name{
  font-weight: 700;
  color: rgba(0,0,0,.88);
}

.hdaf-cmt__meta{
  font-size: 12px;
  color: var(--hdaf-sp-muted);
}

.hdaf-cmt__meta a{
  color: inherit;
  text-decoration: none;
  border-bottom: 1px solid rgba(0,0,0,.12);
}
.hdaf-cmt__meta a:hover{ border-bottom-color: rgba(0,0,0,.22); }

.hdaf-cmt__text{
  font-size: 15px;
  line-height: 1.7;
  color: rgba(0,0,0,.86);
}

.hdaf-cmt__awaiting{
  font-size: 13px;
  margin: 6px 0;
  color: rgba(0,0,0,.62);
}

.hdaf-cmt__actions{ margin-top: 8px; }
.hdaf-cmt__actions a{
  font-size: 13px;
  font-weight: 600;
  text-decoration: none;
  color: rgba(0,0,0,.7);
  border-bottom: 1px solid transparent;
}
.hdaf-cmt__actions a:hover{
  color: rgba(0,0,0,.85);
  border-bottom-color: rgba(0,0,0,.18);
}

.hdaf-cmt__list .children{
  list-style: none;
  margin: 14px 0 0 44px;
  padding: 0;
}

.hdaf-cmt__form{ margin-top: 36px; }

.hdaf-cmtf{
  display: grid;
  grid-template-columns: repeat(2, minmax(0,1fr));
  gap: 18px 20px;
}

.hdaf-cmtf__title{
  grid-column: 1 / -1;
  font-size: 22px;
  margin: 0 0 6px;
}

.hdaf-cmtf__field{
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.hdaf-cmtf__field label{
  font-size: 13px;
  color: var(--hdaf-sp-muted);
}

.hdaf-cmtf__field input,
.hdaf-cmtf__field textarea{
  width: 100%;
  padding: 10px 12px;
  border-radius: 10px;
  border: 1px solid rgba(0,0,0,.12);
  font-size: 15px;
  background: #fff;
}

.hdaf-cmtf__field input:focus,
.hdaf-cmtf__field textarea:focus{
  outline: none;
  border-color: rgba(11,91,211,.35);
  box-shadow: 0 0 0 3px rgba(11,91,211,.12);
}

.hdaf-cmtf__field--full{ grid-column: 1 / -1; }

/* Submit button: solid orange + white (NO gradient) */
.hdaf-cmtf__submit{
  grid-column: 1 / -1;
  align-self: flex-start;
  padding: 10px 22px;
  border-radius: 999px;
  border: 0;
  background: var(--hdaf-sp-orange);
  color: #fff;
  font-size: 14px;
  cursor: pointer;
  font-weight: 800;
}
.hdaf-cmtf__submit:hover{
  filter: brightness(.95);
}

@media (max-width: 900px){
  .hdaf-cmtf{ grid-template-columns: 1fr; }
  .hdaf-cmt__list .children{ margin-left: 22px; }
}

@media (max-width: 600px){
  .hdaf-cmt__card{ padding: 14px; }
  .hdaf-cmt__title,
  .hdaf-cmtf__title{ font-size: 20px; }
}

/* ======================================================
   SINGLE POST — AUTHOR BOX (Premium, WHITE + GREY)
====================================================== */

body.single-post .hdaf-sp__authorbox{
  margin-top: 30px;
  padding: 16px 16px;
  border-radius: 16px;
  border: 1px solid rgba(0,0,0,.10);
  background: #fff;
  box-shadow: 0 1px 0 rgba(0,0,0,.03);
  display: flex;
  gap: 14px;
  align-items: flex-start;
}

body.single-post .hdaf-sp__author-avatar img{
  width: 64px;
  height: 64px;
  border-radius: 999px;
  display: block;
}

body.single-post .hdaf-sp__author-body{
  min-width: 0;
  flex: 1;
}

body.single-post .hdaf-sp__author-top{
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}

body.single-post .hdaf-sp__author-name{
  font-weight: 900;
  text-decoration: none;
  color: rgba(0,0,0,.88);
}
body.single-post .hdaf-sp__author-name:hover{
  text-decoration: underline;
}

body.single-post .hdaf-sp__author-site{
  font-size: 12px;
  font-weight: 800;
  text-decoration: none;
  padding: 6px 10px;
  border-radius: 999px;
  border: 1px solid rgba(0,0,0,.12);
  background: #f3f4f6;
  color: rgba(0,0,0,.75);
}

body.single-post .hdaf-sp__author-bio{
  margin: 8px 0 0;
  font-size: 14px;
  line-height: 1.6;
  color: rgba(0,0,0,.62);
}

body.single-post .hdaf-sp__author-bio p{
  margin: 0 0 10px;
}
body.single-post .hdaf-sp__author-bio p:last-child{
  margin-bottom: 0;
}

body.single-post .hdaf-sp__author-bio strong{
  color: rgba(0,0,0,.78);
  font-weight: 800;
}
body.single-post .hdaf-sp__author-bio a{
  color: rgba(0,0,0,.78);
  text-decoration: underline;
  text-underline-offset: 3px;
}
body.single-post .hdaf-sp__author-bio a:hover{
  opacity: .9;
}

@media (max-width: 600px){
  body.single-post .hdaf-sp__authorbox{
    padding: 14px;
    gap: 12px;
  }
}

/* ======================================================
   SINGLE POST — IMAGE CAPTION FIX
====================================================== */

body.single-post .hdaf-sp__content figure figcaption,
body.single-post .hdaf-sp__content .wp-block-image figcaption{
  margin-top: 6px;
  font-size: 12px;
  line-height: 1.4;
  text-align: center;
  color: rgba(0,0,0,.55);
  font-style: normal;
}

/* ======================================================
   Generic buttons inside single post content (NO gradient)
   - Solid orange + white text
====================================================== */

body.single-post .hdaf-sp__content .wp-block-button__link,
body.single-post .hdaf-sp__content a.wp-block-button__link,
body.single-post .hdaf-sp__content button,
body.single-post .hdaf-sp__content input[type="submit"],
body.single-post .hdaf-sp__content input[type="button"],
body.single-post .hdaf-sp__content input[type="reset"]{
  background: var(--hdaf-sp-orange) !important;
  color: #fff !important;
  border: 0 !important;
  border-radius: 999px !important;
  font-weight: 800 !important;
  text-decoration: none !important;
}

body.single-post .hdaf-sp__content .wp-block-button__link:hover,
body.single-post .hdaf-sp__content a.wp-block-button__link:hover,
body.single-post .hdaf-sp__content button:hover,
body.single-post .hdaf-sp__content input[type="submit"]:hover,
body.single-post .hdaf-sp__content input[type="button"]:hover,
body.single-post .hdaf-sp__content input[type="reset"]:hover{
  filter: brightness(.95) !important;
}


/* ======================================================
   SINGLE POST — TOC + SIDEBAR POSITION FIX
   - Keep TOC locked inside the article/content column.
   - Move post sidebar 100px down on desktop so it starts near the featured image/content area.
====================================================== */

body.single-post .hdaf-sp .hdaf-layout__content > .hdaf-toc{
  width: 100%;
  max-width: var(--hdaf-sp-read);
  margin-left: 0;
  margin-right: 0;
  clear: both;
}

body.single-post .hdaf-sp .hdaf-toc__title{
  cursor: pointer;
}

body.single-post .hdaf-sp .hdaf-toc__list[hidden]{
  display: none !important;
}

body.single-post .hdaf-sp .hdaf-toc:not(.is-collapsed) .hdaf-toc__list{
  display: block;
}

@media (min-width: 992px){
  body.single-post .hdaf-sp aside.hdaf-sidebar.hdaf-sidebar--post{
    margin-top: 100px;
  }
}

@media (max-width: 991px){
  body.single-post .hdaf-sp aside.hdaf-sidebar.hdaf-sidebar--post{
    margin-top: 28px;
  }
}
