/**
 * Anyone Home — Blog redesign (Divi 5)
 * Scoped to the ah-blog-* classes in Anyone-Home-Blog-Divi5-Redesign.json.
 * Install in the child theme as /css/blog.css.
 * Does not modify the site's shared navigation or footer.
 */

/* -------------------------------------------------------
   Shared layout and editorial typography
------------------------------------------------------- */
.ah-blog-hero,
.ah-blog-stories,
.ah-blog-archive {
  --ah-blog-navy: #071d36;
  --ah-blog-blue: #087fa7;
  --ah-blog-cyan: #17a4c7;
  --ah-blog-lime: #9bdc3f;
  --ah-blog-text: #142a42;
  --ah-blog-muted: #607286;
  --ah-blog-line: #e2eaf0;
  box-sizing: border-box;
}

.ah-blog-hero *,
.ah-blog-stories *,
.ah-blog-archive * {
  box-sizing: border-box;
}

.ah-blog-hero .et_pb_row,
.ah-blog-stories .et_pb_row,
.ah-blog-archive .et_pb_row {
  width: min(90%, 1260px) !important;
  max-width: 1260px !important;
}

.ah-blog-hero a:focus-visible,
.ah-blog-stories a:focus-visible,
.ah-blog-archive a:focus-visible {
  outline: 3px solid var(--ah-blog-lime);
  outline-offset: 4px;
}

/* -------------------------------------------------------
   1. Cinematic masthead + live featured post
------------------------------------------------------- */
.ah-blog-hero {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  padding: 166px 0 112px !important;
  background:
    linear-gradient(
      111deg,
      rgba(5, 23, 47, 0.97) 3%,
      rgba(5, 48, 78, 0.94) 60%,
      rgba(4, 79, 105, 0.88) 100%
    ),
    url("https://anyonedevelop.wpenginepowered.com/wp-content/uploads/2020/02/65c6882e953b189ddff272df_blog-image.png")
      center 42% / cover no-repeat !important;
}

.ah-blog-hero::before {
  content: "";
  position: absolute;
  width: min(900px, 78vw);
  height: min(900px, 78vw);
  top: -390px;
  right: -235px;
  border: 1px solid rgba(125, 205, 230, 0.16);
  border-radius: 50%;
  box-shadow:
    0 0 0 110px rgba(125, 205, 230, 0.035),
    0 0 0 230px rgba(125, 205, 230, 0.025);
  pointer-events: none;
  z-index: -1;
}

.ah-blog-hero::after {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(
    ellipse at 72% 8%,
    rgba(45, 182, 212, 0.15),
    transparent 48%
  );
  pointer-events: none;
  z-index: -1;
}

.ah-blog-hero .ah-blog-hero-inner {
  position: relative;
  z-index: 1;
  padding: 0 !important;
}
.ah-blog-hero .ah-blog-hero-column {
  width: 100%;
}
.ah-blog-hero-eyebrow {
  margin-bottom: 14px !important;
}
.ah-blog-hero-eyebrow p {
  margin: 0 !important;
  padding: 0 !important;
  color: var(--ah-blog-lime) !important;
  font-size: 12px !important;
  font-weight: 800 !important;
  line-height: 1.5 !important;
  letter-spacing: 0.21em;
  text-transform: uppercase;
}

.ah-blog-title {
  margin: 0 0 38px !important;
  padding: 0 !important;
}
.ah-blog-title h1 {
  margin: 0 !important;
  padding: 0 !important;
  color: #fff !important;
  font-size: clamp(68px, 9vw, 128px) !important;
  font-weight: 800 !important;
  line-height: 0.95 !important;
  letter-spacing: -0.068em !important;
}
.ah-blog-title h1::after {
  content: ".";
  color: var(--ah-blog-lime);
}

.ah-blog-featured,
.ah-blog-featured .et_pb_ajax_pagination_container {
  width: 100%;
}

.ah-blog-featured .et_pb_post {
  display: grid;
  grid-template-columns: minmax(0, 1.03fr) minmax(0, 0.97fr);
  grid-template-rows: minmax(58px, 1fr) auto auto minmax(60px, 1fr);
  column-gap: clamp(28px, 4.4vw, 66px);
  align-items: start;
  min-height: 434px;
  margin: 0 !important;
  padding: 0 clamp(25px, 4.5vw, 68px) 0 0 !important;
  border: 1px solid rgba(255, 255, 255, 0.3);
  border-radius: 24px;
  overflow: hidden;
  background: #fff;
  box-shadow: 0 24px 70px rgba(2, 13, 29, 0.27);
}

.ah-blog-featured .et_pb_post::before {
  content: "FEATURED STORY";
  grid-column: 2;
  grid-row: 1;
  align-self: end;
  margin-bottom: 15px;
  color: #0785a8;
  font-size: 11px;
  line-height: 1.4;
  font-weight: 800;
  letter-spacing: 0.18em;
}

.ah-blog-featured .et_pb_post > .entry-featured-image-url,
.ah-blog-featured .et_pb_post > .et_pb_image_container {
  grid-column: 1;
  grid-row: 1 / 5;
  display: block;
  width: 100%;
  height: 100%;
  min-height: 434px;
  margin: 0 !important;
  overflow: hidden;
  background: #0c759c;
}
.ah-blog-featured .et_pb_image_container > a {
  display: block;
  width: 100%;
  height: 100%;
}
.ah-blog-featured .entry-featured-image-url img,
.ah-blog-featured .et_pb_image_container img {
  display: block;
  width: 100%;
  height: 100%;
  min-height: 434px;
  object-fit: cover;
  object-position: center;
  transition: transform 0.85s cubic-bezier(0.2, 0.7, 0.2, 1);
}
.ah-blog-featured .et_pb_post:hover .entry-featured-image-url img,
.ah-blog-featured .et_pb_post:hover .et_pb_image_container img {
  transform: scale(1.035);
}

.ah-blog-featured .et_pb_post > .entry-title {
  grid-column: 2;
  grid-row: 2;
  margin: 0 0 17px !important;
  padding: 0 !important;
  color: var(--ah-blog-navy) !important;
  font-size: clamp(27px, 3vw, 43px) !important;
  line-height: 1.13 !important;
  letter-spacing: -0.035em !important;
  font-weight: 800 !important;
}
.ah-blog-featured .entry-title a {
  color: inherit !important;
  text-decoration: none !important;
}
.ah-blog-featured .entry-title a:hover {
  color: var(--ah-blog-blue) !important;
}
.ah-blog-featured .et_pb_post > .post-meta {
  display: none !important;
}
.ah-blog-featured .et_pb_post > .post-content {
  grid-column: 2;
  grid-row: 3;
  color: var(--ah-blog-muted);
  font-size: 15px;
  line-height: 1.7;
}
.ah-blog-featured .post-content-inner p {
  color: inherit !important;
  line-height: 1.7 !important;
}
.ah-blog-featured a.more-link {
  display: inline-flex !important;
  align-items: center;
  gap: 18px;
  width: fit-content;
  margin-top: 22px !important;
  padding: 13px 19px !important;
  border-radius: 99px;
  color: #fff !important;
  background: #087eaa;
  font-size: 12px !important;
  font-weight: 800;
  line-height: 1.2 !important;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  text-decoration: none !important;
  transition:
    background 0.25s ease,
    transform 0.25s ease;
}
.ah-blog-featured a.more-link::after {
  content: "↗";
  font-size: 17px;
  line-height: 1;
}
.ah-blog-featured a.more-link:hover {
  background: #056184;
  transform: translateY(-2px);
}

/* -------------------------------------------------------
   2. Three dynamic article cards
------------------------------------------------------- */
.ah-blog-stories {
  padding: 108px 0 116px !important;
  background: #f4f8fb !important;
}
.ah-blog-stories-heading,
.ah-blog-archive-heading {
  padding: 0 !important;
  margin-bottom: 34px !important;
}
.ah-blog-stories-heading-text,
.ah-blog-archive-heading-text {
  margin: 0 !important;
}
.ah-blog-section-kicker {
  margin: 0 0 13px !important;
  padding: 0 !important;
  color: #0589ae !important;
  font-size: 12px !important;
  line-height: 1.5 !important;
  font-weight: 800 !important;
  letter-spacing: 0.2em !important;
  text-transform: uppercase;
}
.ah-blog-stories-heading h2,
.ah-blog-archive-heading h2 {
  margin: 0 !important;
  padding: 0 !important;
  color: var(--ah-blog-navy) !important;
  font-size: clamp(36px, 4.5vw, 59px) !important;
  line-height: 1.1 !important;
  letter-spacing: -0.052em !important;
  font-weight: 800 !important;
}

.ah-blog-story-grid {
  display: grid !important;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  align-items: stretch;
  gap: 25px;
  padding: 0 !important;
}
.ah-blog-story-grid > .et_pb_column {
  display: flex !important;
  flex-direction: column;
  float: none !important;
  width: 100% !important;
  max-width: none !important;
  margin: 0 !important;
  padding: 0 !important;
}
.ah-blog-story-module,
.ah-blog-story-module .et_pb_ajax_pagination_container {
  height: 100%;
}
.ah-blog-story-module .et_pb_post {
  display: flex;
  flex-direction: column;
  height: 100%;
  min-height: 450px;
  margin: 0 !important;
  padding: 0 0 28px !important;
  overflow: hidden;
  border: 1px solid #e5edf2;
  border-radius: 20px;
  background: #fff;
  box-shadow: 0 12px 32px rgba(9, 41, 66, 0.045);
  transition:
    box-shadow 0.3s ease,
    transform 0.3s ease,
    border-color 0.3s ease;
}
.ah-blog-story-module .et_pb_post:hover {
  transform: translateY(-7px);
  border-color: #bcddea;
  box-shadow: 0 22px 45px rgba(8, 46, 77, 0.13);
}
.ah-blog-story-module .entry-featured-image-url,
.ah-blog-story-module .et_pb_image_container {
  display: block;
  width: 100%;
  aspect-ratio: 16 / 10;
  margin: 0 0 28px !important;
  overflow: hidden;
  background: #06799f;
}
.ah-blog-story-module .et_pb_image_container > a {
  display: block;
  height: 100%;
}
.ah-blog-story-module .entry-featured-image-url img,
.ah-blog-story-module .et_pb_image_container img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.7s cubic-bezier(0.22, 0.75, 0.22, 1);
}
.ah-blog-story-module .et_pb_post:hover img {
  transform: scale(1.05);
}
.ah-blog-story-module .entry-title {
  margin: 0 26px 14px !important;
  padding: 0 !important;
  color: var(--ah-blog-text) !important;
  font-size: clamp(19px, 1.7vw, 23px) !important;
  font-weight: 800 !important;
  line-height: 1.3 !important;
  letter-spacing: -0.025em !important;
}
.ah-blog-story-module .entry-title a {
  color: inherit !important;
  text-decoration: none !important;
}
.ah-blog-story-module .entry-title a:hover {
  color: var(--ah-blog-blue) !important;
}
.ah-blog-story-module .post-meta {
  display: none !important;
}
.ah-blog-story-module .post-content {
  display: flex;
  flex: 1;
  flex-direction: column;
  align-items: flex-start;
  margin: 0 26px !important;
  color: var(--ah-blog-muted);
}
.ah-blog-story-module .post-content-inner {
  margin-bottom: 22px;
}
.ah-blog-story-module .post-content-inner p {
  color: inherit !important;
  font-size: 14px !important;
  line-height: 1.65 !important;
}
.ah-blog-story-module a.more-link {
  display: inline-flex !important;
  align-items: center;
  gap: 9px;
  margin-top: auto !important;
  padding-bottom: 3px !important;
  border-bottom: 2px solid var(--ah-blog-lime);
  color: #076f95 !important;
  font-size: 12px !important;
  line-height: 1.6 !important;
  font-weight: 800 !important;
  letter-spacing: 0.11em;
  text-transform: uppercase;
  text-decoration: none !important;
}
.ah-blog-story-module a.more-link::after {
  content: "↗";
  font-size: 16px;
}
.ah-blog-story-module a.more-link:hover {
  color: var(--ah-blog-navy) !important;
}

/* -------------------------------------------------------
   3. Article archive + native recent-posts sidebar
------------------------------------------------------- */
.ah-blog-archive {
  padding: 105px 0 125px !important;
  background: #fff !important;
}
.ah-blog-archive-row {
  display: grid !important;
  grid-template-columns: minmax(0, 1.85fr) minmax(260px, 0.85fr);
  gap: clamp(32px, 4vw, 58px);
  align-items: start;
  padding: 0 !important;
}
.ah-blog-archive-row > .et_pb_column {
  float: none !important;
  width: 100% !important;
  max-width: none !important;
  margin: 0 !important;
  /*   padding: 0 !important; */
}
.ah-blog-archive-feed {
  min-width: 0;
  border: 1px solid #e4edf3;
  border-radius: 22px;
  padding: 10px 10px !important;
  background: linear-gradient(145deg, #f8fbfd 0%, #fff 100%) !important;
  box-shadow: 0 16px 45px rgba(7, 38, 66, 0.045);
}
.ah-blog-post-list .et_pb_post {
  display: grid;
  grid-template-columns: 155px minmax(0, 1fr);
  column-gap: 23px;
  align-items: center;
  padding: 20px 0 !important;
  margin: 0 !important;
  border-bottom: 1px solid var(--ah-blog-line);
  background: transparent;
}
.ah-blog-post-list .entry-featured-image-url,
.ah-blog-post-list .et_pb_image_container {
  grid-column: 1;
  grid-row: 1 / span 3;
  display: block;
  width: 155px;
  height: 102px;
  margin: 0 !important;
  overflow: hidden;
  border-radius: 11px;
  background: #d2e7ef;
}
.ah-blog-post-list .et_pb_image_container > a {
  display: block;
  height: 100%;
}
.ah-blog-post-list .entry-featured-image-url img,
.ah-blog-post-list .et_pb_image_container img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.6s ease;
}
.ah-blog-post-list .et_pb_post:hover img {
  transform: scale(1.06);
}
.ah-blog-post-list .entry-title {
  grid-column: 2;
  grid-row: 1;
  margin: 0 !important;
  padding: 0 !important;
  color: var(--ah-blog-text) !important;
  font-size: clamp(16px, 1.45vw, 20px) !important;
  font-weight: 800 !important;
  line-height: 1.32 !important;
  letter-spacing: -0.015em !important;
}
.ah-blog-post-list .entry-title a {
  color: inherit !important;
  text-decoration: none !important;
}
.ah-blog-post-list .entry-title a:hover {
  color: var(--ah-blog-blue) !important;
}
.ah-blog-post-list .post-meta {
  display: none !important;
}
.ah-blog-post-list .post-content {
  grid-column: 2;
}
.ah-blog-post-list
  .et_pb_post:not(:has(.entry-featured-image-url, .et_pb_image_container)) {
  grid-template-columns: minmax(0, 1fr);
}
.ah-blog-post-list
  .et_pb_post:not(:has(.entry-featured-image-url, .et_pb_image_container))
  .entry-title {
  grid-column: 1;
}
.ah-blog-post-list .pagination {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-top: 26px;
  font-size: 13px;
  font-weight: 700;
}
.ah-blog-post-list .pagination a {
  color: #087eaa !important;
  text-decoration: none !important;
}
.ah-blog-post-list .pagination a:hover {
  color: var(--ah-blog-navy) !important;
}

.ah-blog-archive-link {
  text-align: center;
  margin-top: 28px !important;
}
.ah-blog-archive-link p {
  margin: 0 !important;
  padding: 0 !important;
}
.ah-blog-archive-link a {
  display: inline-flex;
  justify-content: center;
  align-items: center;
  gap: 16px;
  border: 1px solid #b8d4e3;
  border-radius: 100px;
  padding: 13px 23px;
  background: #fff;
  color: #075e84 !important;
  font-size: 13px;
  font-weight: 800;
  line-height: 1.35;
  text-decoration: none !important;
  box-shadow: 0 5px 15px rgba(3, 42, 65, 0.04);
  transition:
    background 0.25s ease,
    transform 0.25s ease,
    border-color 0.25s ease;
}
.ah-blog-archive-link a::after {
  content: "↗";
  font-size: 17px;
  line-height: 1;
}
.ah-blog-archive-link a:hover {
  transform: translateY(-2px);
  background: #f0f8fb;
  border-color: #68b9d2;
}

.ah-blog-archive-sidebar {
  min-width: 0;
  border-radius: 22px;
  padding: 34px 30px !important;
  background: linear-gradient(150deg, #072b48, #071a33 85%) !important;
  box-shadow: 0 18px 42px rgba(4, 29, 56, 0.17);
}
.ah-blog-recent-sidebar,
.ah-blog-recent-sidebar .et_pb_widget {
  width: 100% !important;
}
.ah-blog-recent-sidebar .et_pb_widget {
  float: none !important;
  margin: 0 0 28px !important;
}
.ah-blog-recent-sidebar .et_pb_widget:last-child {
  margin-bottom: 0 !important;
}
.ah-blog-recent-sidebar .widgettitle,
.ah-blog-recent-sidebar .widget-title,
.ah-blog-recent-sidebar h2,
.ah-blog-recent-sidebar h3 {
  margin: 0 0 22px !important;
  padding: 0 0 16px !important;
  border-bottom: 1px solid rgba(255, 255, 255, 0.16);
  color: #fff !important;
  font-size: 20px !important;
  font-weight: 800 !important;
  line-height: 1.3 !important;
  letter-spacing: -0.02em;
}
.ah-blog-recent-sidebar ul {
  margin: 0 !important;
  padding: 0 !important;
  list-style: none !important;
}
.ah-blog-recent-sidebar li {
  margin: 0 !important;
  padding: 12px 0 !important;
  border-bottom: 1px solid rgba(255, 255, 255, 0.12);
  color: #d7e6ed !important;
  font-size: 14px;
  line-height: 1.55;
}
.ah-blog-recent-sidebar li:last-child {
  border-bottom: 0;
}
.ah-blog-recent-sidebar a {
  color: #d7e6ed !important;
  text-decoration: none !important;
  transition: color 0.2s ease;
}
.ah-blog-recent-sidebar a:hover {
  color: var(--ah-blog-lime) !important;
}
.ah-blog-recent-sidebar p {
  color: #d7e6ed !important;
}

/* -------------------------------------------------------
   Responsive refinements
------------------------------------------------------- */
@media (max-width: 1100px) {
  .ah-blog-featured .et_pb_post {
    column-gap: 28px;
    padding-right: 30px !important;
  }
  .ah-blog-story-grid {
    gap: 18px;
  }
  .ah-blog-story-module .entry-title {
    margin-left: 20px !important;
    margin-right: 20px !important;
  }
  .ah-blog-story-module .post-content {
    margin-left: 20px !important;
    margin-right: 20px !important;
  }
}
@media (max-width: 980px) {
  .ah-blog-hero {
    padding: 138px 0 86px !important;
  }
  .ah-blog-featured .et_pb_post {
    grid-template-columns: minmax(0, 1fr);
    grid-template-rows: auto auto auto auto;
    padding: 0 0 34px !important;
    min-height: 0;
  }
  .ah-blog-featured .et_pb_post > .entry-featured-image-url,
  .ah-blog-featured .et_pb_post > .et_pb_image_container {
    grid-column: 1;
    grid-row: 1;
    height: 330px;
    min-height: 0;
  }
  .ah-blog-featured .entry-featured-image-url img,
  .ah-blog-featured .et_pb_image_container img {
    min-height: 0;
    height: 330px;
  }
  .ah-blog-featured .et_pb_post::before {
    grid-column: 1;
    grid-row: 2;
    margin: 30px 32px 10px;
  }
  .ah-blog-featured .et_pb_post > .entry-title {
    grid-column: 1;
    grid-row: 3;
    margin: 0 32px 12px !important;
  }
  .ah-blog-featured .et_pb_post > .post-content {
    grid-column: 1;
    grid-row: 4;
    margin: 0 32px;
  }
  .ah-blog-stories {
    padding: 80px 0 88px !important;
  }
  .ah-blog-story-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .ah-blog-archive {
    padding: 85px 0 95px !important;
  }
  .ah-blog-archive-row {
    grid-template-columns: minmax(0, 1fr);
  }
  .ah-blog-archive-sidebar {
    padding: 31px !important;
  }
}
@media (max-width: 650px) {
  .ah-blog-hero .et_pb_row,
  .ah-blog-stories .et_pb_row,
  .ah-blog-archive .et_pb_row {
    width: min(91%, 1260px) !important;
  }
  .ah-blog-hero {
    padding: 126px 0 70px !important;
  }
  .ah-blog-hero-eyebrow p {
    letter-spacing: 0.14em;
    font-size: 10px !important;
  }
  .ah-blog-title h1 {
    font-size: clamp(64px, 16vw, 93px) !important;
  }
  .ah-blog-featured .et_pb_post {
    border-radius: 17px;
  }
  .ah-blog-featured .et_pb_post > .entry-featured-image-url,
  .ah-blog-featured .et_pb_post > .et_pb_image_container,
  .ah-blog-featured .entry-featured-image-url img,
  .ah-blog-featured .et_pb_image_container img {
    height: 240px;
  }
  .ah-blog-featured .et_pb_post::before {
    margin: 24px 22px 8px;
  }
  .ah-blog-featured .et_pb_post > .entry-title {
    margin: 0 22px 12px !important;
    font-size: 28px !important;
  }
  .ah-blog-featured .et_pb_post > .post-content {
    margin: 0 22px;
  }
  .ah-blog-featured .post-content-inner p {
    font-size: 14px !important;
  }
  .ah-blog-stories {
    padding: 68px 0 75px !important;
  }
  .ah-blog-stories-heading,
  .ah-blog-archive-heading {
    margin-bottom: 26px !important;
  }
  .ah-blog-story-grid {
    grid-template-columns: minmax(0, 1fr);
    gap: 22px;
  }
  .ah-blog-story-module .et_pb_post {
    min-height: 0;
    padding-bottom: 27px !important;
  }
  .ah-blog-story-module .entry-featured-image-url,
  .ah-blog-story-module .et_pb_image_container {
    aspect-ratio: 16/9;
  }
  .ah-blog-archive {
    padding: 72px 0 82px !important;
  }
  .ah-blog-archive-feed {
    padding: 8px 20px 25px !important;
  }
  .ah-blog-post-list .et_pb_post {
    grid-template-columns: 102px minmax(0, 1fr);
    column-gap: 15px;
    padding: 16px 0 !important;
  }
  .ah-blog-post-list .entry-featured-image-url,
  .ah-blog-post-list .et_pb_image_container {
    width: 102px;
    height: 77px;
    border-radius: 8px;
  }
  .ah-blog-post-list .entry-title {
    font-size: 15px !important;
    line-height: 1.32 !important;
  }
  .ah-blog-archive-sidebar {
    border-radius: 18px;
    padding: 27px 24px !important;
  }
}
@media (prefers-reduced-motion: reduce) {
  .ah-blog-hero *,
  .ah-blog-stories *,
  .ah-blog-archive * {
    scroll-behavior: auto !important;
    transition-duration: 0.01ms !important;
    animation-duration: 0.01ms !important;
  }
}

/* Blog — Prevent featured images from being cropped */
.ah-blog-featured .entry-featured-image-url img,
.ah-blog-featured .et_pb_image_container img,
.ah-blog-story-module .entry-featured-image-url img,
.ah-blog-story-module .et_pb_image_container img,
.ah-blog-post-list .entry-featured-image-url img,
.ah-blog-post-list .et_pb_image_container img {
  width: 100% !important;
  height: 100% !important;
  object-fit: contain !important;
  object-position: center !important;
  transform: none !important;
}

/* Prevent hover scaling from cropping images again */
.ah-blog-featured .et_pb_post:hover img,
.ah-blog-story-module .et_pb_post:hover img,
.ah-blog-post-list .et_pb_post:hover img {
  transform: none !important;
}

/* Match image container backgrounds to the graphics */
.ah-blog-featured .entry-featured-image-url,
.ah-blog-story-module .entry-featured-image-url,
.ah-blog-post-list .entry-featured-image-url {
  background: #08759c;
}
