/**
 * Anyone Home | Cinematic single-post body template (Divi 5 export)
 * Scoped to .ah-post-*; header/footer and /blog/ are not affected.
 * Enqueue /css/single-post.css on is_singular('post').
 */

/* =============== Shared tokens / structural resets =============== */
.ah-post-hero,
.ah-post-body {
  --ahp-navy: #06182f;
  --ahp-navy-light: #0b304c;
  --ahp-blue: #087eaa;
  --ahp-lime: #95da39;
  --ahp-cyan: #2ca8c5;
  --ahp-ink: #102640;
  --ahp-muted: #52677d;
  --ahp-hairline: #dfebf1;
  box-sizing: border-box;
}
.ah-post-hero *,
.ah-post-body * {
  box-sizing: border-box;
}
.ah-post-hero .et_pb_row,
.ah-post-body .et_pb_row {
  width: min(90%, 1260px) !important;
  max-width: 1260px !important;
}
.ah-post-hero a:focus-visible,
.ah-post-body a:focus-visible {
  outline: 3px solid var(--ahp-lime);
  outline-offset: 4px;
}

/* =============== 01 | Cinematic editorial masthead =============== */
.ah-post-hero {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  padding: clamp(150px, 14vw, 205px) 0 110px !important;
  color: #fff;
  background:
    radial-gradient(
      ellipse at 88% 13%,
      rgba(26, 165, 199, 0.3) 0%,
      transparent 39%
    ),
    radial-gradient(
      ellipse at 2% 100%,
      rgba(10, 130, 164, 0.17) 0%,
      transparent 46%
    ),
    linear-gradient(119deg, #05152c 5%, #082640 53%, #06364e 100%) !important;
}
.ah-post-hero::before {
  content: "";
  position: absolute;
  z-index: -1;
  top: -370px;
  right: -270px;
  width: min(1050px, 91vw);
  aspect-ratio: 1;
  border: 1px solid rgba(136, 218, 239, 0.17);
  border-radius: 50%;
  box-shadow:
    0 0 0 110px rgba(83, 204, 230, 0.045),
    0 0 0 235px rgba(83, 204, 230, 0.027),
    0 0 0 365px rgba(83, 204, 230, 0.014);
  pointer-events: none;
}
.ah-post-hero::after {
  content: "";
  position: absolute;
  z-index: -1;
  inset: 0;
  opacity: 0.23;
  background-image:
    linear-gradient(to right, rgba(142, 217, 234, 0.15) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(142, 217, 234, 0.11) 1px, transparent 1px);
  background-size: 94px 94px;
  -webkit-mask-image: linear-gradient(92deg, transparent 30%, #000 100%);
  mask-image: linear-gradient(92deg, transparent 30%, #000 100%);
  pointer-events: none;
}
.ah-post-hero-row {
  position: relative;
  z-index: 1;
  padding: 0 !important;
}
.ah-post-hero-column {
  width: 100% !important;
  padding: 0 !important;
}

/* Existing Back to Blog link: same text and destination, styled as a chip. */
.ah-post-back {
  margin-bottom: clamp(48px, 7vw, 88px) !important;
}
.ah-post-back p {
  margin: 0 !important;
  padding: 0 !important;
}
.ah-post-back a {
  display: inline-flex;
  align-items: center;
  min-height: 42px;
  padding: 10px 19px;
  border: 1px solid rgba(195, 235, 242, 0.28);
  border-radius: 999px;
  color: #dbedf6 !important;
  background: rgba(255, 255, 255, 0.065);
  font-size: 12px !important;
  line-height: 1.3 !important;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-decoration: none !important;
  backdrop-filter: blur(10px);
  transition:
    border-color 0.25s,
    background 0.25s,
    transform 0.25s;
}
.ah-post-back a:hover {
  border-color: rgba(149, 218, 57, 0.65);
  background: rgba(255, 255, 255, 0.13);
  transform: translateX(-3px);
}
.ah-post-eyebrow {
  margin: 0 0 15px !important;
  padding: 0 !important;
}
.ah-post-eyebrow p {
  margin: 0 !important;
  padding: 0 !important;
  color: var(--ahp-lime) !important;
  font-size: 12px !important;
  line-height: 1.5 !important;
  font-weight: 800 !important;
  text-transform: uppercase;
  letter-spacing: 0.23em;
}
.ah-post-eyebrow p::before {
  content: "";
  display: inline-block;
  vertical-align: middle;
  margin: 0 12px 2px 0;
  width: 27px;
  height: 2px;
  background: var(--ahp-lime);
}

/* Post Title is dynamic: Divi outputs the article title and featured image. */
.ah-post-title {
  margin: 0 !important;
  padding: 0 !important;
}
.ah-post-title .et_pb_title_container {
  max-width: 1150px;
}
.ah-post-title h1,
.ah-post-title h1.entry-title,
.ah-post-title .entry-title {
  max-width: 1150px;
  margin: 0 !important;
  padding: 0 !important;
  color: #fff !important;
  /* font-size: clamp(43px, 5.65vw, 82px) !important; */
  font-weight: 800 !important;
  line-height: 1.065 !important;
  letter-spacing: -0.055em !important;
  text-wrap: balance;
}
.ah-post-title .post-meta {
  color: #c8dce8 !important;
}
.ah-post-title .post-meta a {
  color: #d5f0fa !important;
}

/* Keep full branded feature art visible: absolutely no object-fit: cover. */
.ah-post-title .et_pb_title_featured_container {
  display: block;
  width: min(100%, 1040px);
  max-width: 1040px;
  margin: clamp(42px, 5vw, 69px) 0 0 !important;
  padding: clamp(7px, 0.9vw, 13px);
  border: 1px solid rgba(202, 244, 255, 0.35);
  border-radius: clamp(15px, 2vw, 28px);
  overflow: hidden;
  background: linear-gradient(
    137deg,
    rgba(255, 255, 255, 0.22),
    rgba(255, 255, 255, 0.055)
  );
  box-shadow: 0 34px 90px rgba(0, 7, 22, 0.36);
  transition:
    transform 0.45s ease,
    box-shadow 0.45s ease;
}
.ah-post-title .et_pb_title_featured_container:hover {
  transform: translateY(-5px);
  box-shadow: 0 42px 102px rgba(0, 7, 22, 0.42);
}
.ah-post-title .et_pb_title_featured_container img {
  display: block !important;
  width: 100% !important;
  max-width: 100% !important;
  height: auto !important;
  max-height: none !important;
  object-fit: contain !important;
  object-position: center !important;
  border-radius: clamp(9px, 1.3vw, 18px);
  transform: none !important;
}

/* =============== 02 | Long-form reading experience =============== */
.ah-post-body {
  position: relative;
  z-index: 2;
  padding: 0 0 clamp(95px, 11vw, 150px) !important;
  background: linear-gradient(
    180deg,
    #eaf3f8 0%,
    #f6fafc 270px,
    #f6fafc 100%
  ) !important;
}
.ah-post-layout {
  display: grid !important;
  grid-template-columns: minmax(0, 1.82fr) minmax(280px, 0.88fr);
  gap: clamp(25px, 3.1vw, 43px);
  align-items: start;
  position: relative;
  /*   margin-top: 0 !important;
  padding: 0 !important; */
}
.ah-post-layout > .et_pb_column {
  float: none !important;
  min-width: 0 !important;
  width: 100% !important;
  max-width: none !important;
  margin: 0 !important;
}
.ah-post-article-column {
  position: relative;
  min-width: 0;
  padding: clamp(27px, 4.5vw, 72px) !important;
  border: 1px solid #e1ebf1;
  border-radius: 23px;
  background: #fff !important;
  box-shadow: 0 21px 68px rgba(8, 43, 70, 0.08);
}
.ah-post-article-column::before {
  content: "";
  position: absolute;
  top: 0;
  left: clamp(27px, 4.5vw, 72px);
  width: 78px;
  height: 4px;
  border-radius: 0 0 8px 8px;
  background: var(--ahp-lime);
}
.ah-post-story-label,
.ah-post-nav-label {
  padding: 0 !important;
}
.ah-post-story-label {
  margin-bottom: 35px !important;
}
.ah-post-story-label p,
.ah-post-nav-label p {
  margin: 0 !important;
  padding: 0 !important;
  color: #0982a7 !important;
  font-size: 11px !important;
  line-height: 1.5 !important;
  font-weight: 800 !important;
  letter-spacing: 0.21em;
  text-transform: uppercase;
}

/* Dynamic Post Content — applies to whatever each post contains. */
.ah-post-content,
.ah-post-content .et_pb_post_content {
  width: 100%;
  min-width: 0;
  margin: 0 !important;
  padding: 0 !important;
  color: var(--ahp-ink) !important;
  background: transparent !important;
}
.ah-post-content :is(p, ul, ol, blockquote) {
  color: #344c62;
  font-size: clamp(16px, 1.12vw, 18px) !important;
  line-height: 1.9 !important;
  overflow-wrap: anywhere;
}
.ah-post-content p {
  margin: 0 0 1.35em !important;
  padding: 0 !important;
}
.ah-post-content :is(h1, h2, h3, h4, h5, h6) {
  color: var(--ahp-ink) !important;
  font-weight: 800 !important;
  line-height: 1.25 !important;
  letter-spacing: -0.027em;
  overflow-wrap: anywhere;
}
.ah-post-content h2 {
  margin: 1.65em 0 0.7em !important;
  font-size: clamp(27px, 3vw, 36px) !important;
}
.ah-post-content h3 {
  margin: 1.5em 0 0.65em !important;
  font-size: clamp(22px, 2.2vw, 27px) !important;
}
.ah-post-content h4 {
  margin: 1.25em 0 0.6em !important;
  font-size: 21px !important;
}
.ah-post-content :is(ul, ol) {
  margin: 0 0 1.4em !important;
  padding-left: 1.55em !important;
}
.ah-post-content li {
  margin-bottom: 0.45em !important;
}
.ah-post-content li::marker {
  color: #078bb2;
}
.ah-post-content a:not(.et_pb_button) {
  color: #066e9b !important;
  text-decoration: underline !important;
  text-underline-offset: 3px;
  text-decoration-thickness: 1px;
}
.ah-post-content a:not(.et_pb_button):hover {
  color: #054b72 !important;
}
.ah-post-content blockquote {
  margin: 1.8em 0 !important;
  padding: 22px 28px !important;
  border-left: 4px solid var(--ahp-lime) !important;
  border-radius: 0 11px 11px 0;
  background: #f2f8fb;
}
.ah-post-content blockquote p {
  margin-bottom: 0 !important;
  font-style: italic;
}
.ah-post-content :is(img, picture, video, iframe, figure) {
  max-width: 100%;
}
.ah-post-content img {
  height: auto !important;
  object-fit: contain !important;
}
.ah-post-content figure {
  margin: 2em auto !important;
}
.ah-post-content figcaption {
  margin-top: 0.5em;
  color: var(--ahp-muted);
  font-size: 13px;
  text-align: center;
}
.ah-post-content hr {
  margin: 2.5em 0;
  border: 0;
  border-top: 1px solid var(--ahp-hairline);
}
.ah-post-content .wp-block-table,
.ah-post-content table {
  max-width: 100%;
}
.ah-post-content .wp-block-table {
  overflow-x: auto;
}

/* =============== 03 | Article-to-article navigation =============== */
.ah-post-nav-label {
  margin: clamp(55px, 7vw, 90px) 0 18px !important;
  padding-top: 28px !important;
  border-top: 1px solid var(--ahp-hairline);
}
.ah-post-nav,
.ah-post-nav.et_pb_posts_nav {
  display: flex !important;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 14px;
  margin: 0 !important;
  padding: 0 !important;
}
.ah-post-nav .nav-previous,
.ah-post-nav .nav-next {
  display: flex;
  flex: 1 1 185px;
  min-width: 0;
  margin: 0 !important;
}
.ah-post-nav .nav-next {
  justify-content: flex-end;
  text-align: right;
}
.ah-post-nav .nav-previous a,
.ah-post-nav .nav-next a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  min-height: 58px;
  padding: 15px 19px;
  border: 1px solid #cadfe9;
  border-radius: 12px;
  background: #f3f9fc;
  color: #086e95 !important;
  font-size: 13px !important;
  font-weight: 800 !important;
  line-height: 1.45 !important;
  text-decoration: none !important;
  transition:
    border-color 0.25s,
    background 0.25s,
    transform 0.25s;
}
.ah-post-nav .nav-previous a:hover,
.ah-post-nav .nav-next a:hover {
  transform: translateY(-3px);
  border-color: #76c3d8;
  background: #e8f5fa;
}
/* .ah-post-nav .nav-previous a::before { content: '←'; margin-right: 10px; font-size: 20px; }
.ah-post-nav .nav-next a::after { content: '→'; margin-left: 10px; font-size: 20px; } */

/* =============== 04 | Sticky editorial sidebar =============== */
.ah-post-sidebar-column {
  position: sticky;
  top: 110px;
  align-self: start;
  min-width: 0;
  padding: clamp(28px, 3.4vw, 42px) !important;
  border: 1px solid rgba(115, 185, 213, 0.23);
  border-radius: 22px;
  overflow: hidden;
  background:
    radial-gradient(
      ellipse at 92% 0%,
      rgba(32, 162, 199, 0.18),
      transparent 53%
    ),
    linear-gradient(150deg, #082d4a, #071a33 85%) !important;
  box-shadow: 0 25px 60px rgba(7, 42, 71, 0.17);
}
.ah-post-sidebar-column::before {
  content: "";
  position: absolute;
  top: -125px;
  right: -120px;
  width: 275px;
  height: 275px;
  border: 1px solid rgba(173, 227, 240, 0.15);
  border-radius: 50%;
  pointer-events: none;
}
.ah-post-sidebar,
.ah-post-sidebar .et_pb_widget {
  width: 100% !important;
}
.ah-post-sidebar .et_pb_widget {
  float: none !important;
  margin: 0 0 33px !important;
}
.ah-post-sidebar .et_pb_widget:last-child {
  margin-bottom: 0 !important;
}
.ah-post-sidebar :is(.widgettitle, .widget-title, h2, h3) {
  position: relative;
  margin: 0 0 18px !important;
  padding: 0 0 20px !important;
  border-bottom: 1px solid rgba(223, 241, 249, 0.19);
  color: #fff !important;
  font-size: 20px !important;
  font-weight: 800 !important;
  line-height: 1.25 !important;
  letter-spacing: -0.02em;
}
.ah-post-sidebar :is(.widgettitle, .widget-title, h2, h3)::after {
  content: "";
  position: absolute;
  bottom: -1px;
  left: 0;
  width: 39px;
  height: 2px;
  background: var(--ahp-lime);
}
.ah-post-sidebar ul {
  margin: 0 !important;
  padding: 0 !important;
  list-style: none !important;
}
.ah-post-sidebar li {
  margin: 0 !important;
  padding: 13px 0 !important;
  border-bottom: 1px solid rgba(223, 241, 249, 0.12);
  color: #d7e9f2 !important;
  font-size: 14px !important;
  line-height: 1.55 !important;
}
.ah-post-sidebar li:last-child {
  border-bottom: 0;
}
.ah-post-sidebar a {
  color: #d8ebf3 !important;
  font-size: inherit;
  line-height: 1.55;
  text-decoration: none !important;
  transition:
    color 0.22s,
    padding-left 0.22s;
}
.ah-post-sidebar li a:hover {
  color: var(--ahp-lime) !important;
  padding-left: 3px;
}
.ah-post-sidebar p {
  color: #d8ebf3 !important;
}

/* =============== 05 | Responsive =============== */
@media (max-width: 1100px) {
  .ah-post-layout {
    grid-template-columns: minmax(0, 1.65fr) minmax(250px, 0.9fr);
    gap: 25px;
  }
  .ah-post-article-column {
    padding: 40px !important;
  }
  .ah-post-article-column::before {
    left: 40px;
  }
}
@media (max-width: 980px) {
  .ah-post-hero {
    padding: 145px 0 92px !important;
  }
  .ah-post-back {
    margin-bottom: 58px !important;
  }
  .ah-post-title h1,
  .ah-post-title h1.entry-title,
  .ah-post-title .entry-title {
    font-size: clamp(40px, 7vw, 65px) !important;
  }
  .ah-post-title .et_pb_title_featured_container {
    margin-top: 42px !important;
  }
  .ah-post-layout {
    grid-template-columns: minmax(0, 1fr);
    margin-top: -34px !important;
  }
  .ah-post-article-column {
    padding: clamp(28px, 5vw, 52px) !important;
  }
  .ah-post-article-column::before {
    left: clamp(28px, 5vw, 52px);
  }
  .ah-post-sidebar-column {
    position: static;
  }
}
@media (max-width: 650px) {
  .ah-post-hero .et_pb_row,
  .ah-post-body .et_pb_row {
    width: min(91%, 1260px) !important;
  }
  .ah-post-hero {
    padding: 126px 0 74px !important;
  }
  .ah-post-back {
    margin-bottom: 44px !important;
  }
  .ah-post-back a {
    font-size: 11px !important;
  }
  .ah-post-eyebrow p {
    font-size: 10px !important;
    letter-spacing: 0.14em;
  }
  .ah-post-eyebrow p::before {
    width: 16px;
    margin-right: 8px;
  }
  .ah-post-title h1,
  .ah-post-title h1.entry-title,
  .ah-post-title .entry-title {
    font-size: clamp(37px, 9.4vw, 56px) !important;
    line-height: 1.1 !important;
    letter-spacing: -0.045em !important;
  }
  .ah-post-title .et_pb_title_featured_container {
    margin-top: 29px !important;
    border-radius: 14px;
    padding: 6px;
  }
  .ah-post-title .et_pb_title_featured_container img {
    border-radius: 9px;
  }
  .ah-post-body {
    padding-bottom: 74px !important;
  }
  .ah-post-layout {
    margin-top: -26px !important;
    gap: 22px;
  }
  .ah-post-article-column {
    padding: 28px 23px 31px !important;
    border-radius: 17px;
  }
  .ah-post-article-column::before {
    left: 23px;
  }
  .ah-post-story-label {
    margin-bottom: 22px !important;
  }
  .ah-post-content :is(p, ul, ol, blockquote) {
    font-size: 16px !important;
    line-height: 1.8 !important;
  }
  .ah-post-nav .nav-previous,
  .ah-post-nav .nav-next {
    flex-basis: 100%;
  }
  .ah-post-sidebar-column {
    border-radius: 17px;
    padding: 28px 23px !important;
  }
}
@media (prefers-reduced-motion: reduce) {
  .ah-post-hero *,
  .ah-post-body * {
    scroll-behavior: auto !important;
    transition: none !important;
    animation: none !important;
  }
}

/* Optional progress indicator injected by anyone-home-single-post.js. */
.ah-post-reading-progress {
  position: fixed;
  z-index: 99990;
  top: var(--wp-admin--admin-bar--height, 0px);
  left: 0;
  width: 100%;
  height: 3px;
  pointer-events: none;
  transform: scaleX(0);
  transform-origin: left center;
  background: linear-gradient(90deg, #168bb4 0%, #92d83b 100%);
  box-shadow: 0 1px 8px rgba(11, 135, 174, 0.3);
}
