/*
  Theme Name: Rhye Child
  Template: rhye
  Theme URI: https://artemsemkin.com/rhye/wp/
  Description: Athena child theme customizations
  Author: Artem Semkin
  Author URI: https://artemsemkin.com/
  Version: 1.0.5
*/

/* Athena charcoal header, cream navigation, and gold hover state. */
body.blog #page-header,
body.blog header,
body.blog .header,
body.blog .header__wrapper,
body.blog .header__container,
body.blog .header__bar,
body.page-id-3013 #page-header,
body.page-id-3013 header,
body.page-id-3013 .header,
body.page-id-3013 .header__wrapper,
body.page-id-3013 .header__container,
body.page-id-3013 .header__bar {
  background-color: #181c1d !important;
  color: #f4edce !important;
}

body.blog #page-header a,
body.blog header nav a,
body.blog .header__menu a,
body.page-id-3013 #page-header a,
body.page-id-3013 header nav a,
body.page-id-3013 .header__menu a {
  color: #f4edce !important;
  transition: color .2s ease;
}

body.blog #page-header a:hover,
body.blog #page-header a:focus-visible,
body.blog header nav a:hover,
body.blog .header__menu a:hover,
body.page-id-3013 #page-header a:hover,
body.page-id-3013 #page-header a:focus-visible,
body.page-id-3013 header nav a:hover,
body.page-id-3013 .header__menu a:hover {
  color: #af9b69 !important;
}

/* Keep both page titles on the same charcoal masthead as Our Story. */
body.blog .section-masthead,
body.blog .section-masthead .container,
body.blog .section-masthead .container-fluid,
body.page-id-3013 .section-masthead,
body.page-id-3013 .section-masthead .container,
body.page-id-3013 .section-masthead .container-fluid {
  background-color: #181c1d !important;
  color: #f4edce !important;
}
body.blog .section-masthead h1,
body.blog .section-masthead .h1,
body.page-id-3013 .section-masthead h1,
body.page-id-3013 .section-masthead .h1,
body.page-id-3013 .elementor > .elementor-element:first-child h1 {
  color: #f4edce !important;
}

/* The How We Work title sits in the first Elementor block on this page. */
body.page-id-3013 .elementor > .elementor-element:first-child,
body.page-id-3013 .elementor-widget-heading:has(h1) .elementor-widget-container {
  background-color: #181c1d !important;
}

/* The Letter CTA renders server-side before the post grid and shares the dark masthead palette. */
body.blog .athena-letter-subscribe-wrap {
  box-sizing: border-box;
  display: flex;
  justify-content: center;
  width: 100%;
  grid-column: 1 / -1;
  margin: 0 auto 48px;
  padding: 30px 24px 40px;
  background-color: #181c1d !important;
}
body.blog .athena-letter-subscribe.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 52px;
  padding: 14px 28px;
  border: 1px solid #af9b69 !important;
  border-radius: 999px;
  background-color: #f4edce !important;
  color: #181c1d !important;
  text-align: center;
}
body.blog .athena-letter-subscribe.button .button__label {
  color: #181c1d !important;
}
body.blog .athena-letter-subscribe.button:hover,
body.blog .athena-letter-subscribe.button:hover .button__label,
body.blog .athena-letter-subscribe.button:focus-visible,
body.blog .athena-letter-subscribe.button:focus-visible .button__label {
  background-color: #af9b69 !important;
  color: #181c1d !important;
}

/* Matching dark footer treatment retained for both pages. */
body.blog .page-footer,
body.blog #page-footer,
body.page-id-3013 .page-footer,
body.page-id-3013 #page-footer {
  background-color: #181c1d !important;
  color: #f4edce !important;
}
body.blog .page-footer *,
body.blog #page-footer *,
body.page-id-3013 .page-footer *,
body.page-id-3013 #page-footer * {
  background-color: #181c1d !important;
  color: #f4edce !important;
}
body.blog .page-footer a:hover,
body.blog #page-footer a:hover,
body.page-id-3013 .page-footer a:hover,
body.page-id-3013 #page-footer a:hover {
  color: #af9b69 !important;
}

@media (max-width: 767px) {
  body.blog .section-masthead { padding-bottom: 72px !important; }
  body.blog .athena-letter-subscribe-wrap { margin-bottom: 32px; padding: 24px 18px 32px; }
  body.blog .athena-letter-subscribe.button { max-width: 100%; padding: 14px 20px; }
}


/* Force the CTA label to remain visible without theme animation. */
body.blog .athena-letter-subscribe-wrap a.athena-letter-subscribe {
  opacity: 1 !important;
  visibility: visible !important;
  display: inline-flex !important;
  width: auto !important;
  max-width: 100%;
  background-color: #f4edce !important;
  color: #181c1d !important;
  text-indent: 0 !important;
}
body.blog .athena-letter-subscribe-wrap a.athena-letter-subscribe:hover,
body.blog .athena-letter-subscribe-wrap a.athena-letter-subscribe:focus-visible {
  background-color: #af9b69 !important;
  color: #181c1d !important;
}
body.page-id-3013 .elementor-widget-heading:has(h1) .elementor-widget-container {
  background-color: #181c1d !important;
}

/* Keep the subscribe CTA clear of the overlapping archive cards. */
body.blog .athena-letter-subscribe-wrap {
  position: relative !important;
  z-index: 20 !important;
  display: flex !important;
  justify-content: center !important;
  align-items: center !important;
  box-sizing: border-box !important;
  padding: 12px 20px !important;
  margin: 0 0 16px !important;
  transform: translateY(-80px) !important;
  background: #181c1d !important;
}
body.blog .athena-letter-subscribe-wrap a.athena-letter-subscribe {
  color: #181c1d !important;
  border: 1px solid #af9b69 !important;
  background: #f4edce !important;
  text-transform: none !important;
}
body.blog .athena-letter-subscribe-wrap a.athena-letter-subscribe:hover,
body.blog .athena-letter-subscribe-wrap a.athena-letter-subscribe:focus-visible {
  color: #181c1d !important;
  border-color: #af9b69 !important;
  background: #af9b69 !important;
}

/* Allow the CTA block to sit in the gap above the archive cards. */
body.blog .section-blog .js-grid.grid_fluid-2 {
  overflow: visible !important;
}

/* Keep the five How We Work steps legible on their dark section. */
body.page-id-3013 .athena-five-step-row .counter__number {
  color: #f4edce !important;
}
body.page-id-3013 .athena-five-step-row .counter__label,
body.page-id-3013 .athena-five-step-row .counter__label .paragraph {
  color: #f4edce !important;
}
body.page-id-3013 .athena-five-step-row .aside-counters__wrapper-item {
  border-color: rgba(175, 155, 105, 0.55) !important;
}

/* Align Athena Letter posts in a real three-column archive grid. */
@media (min-width: 1025px) {
  body.blog .section-blog.section-blog_grid .js-grid.grid_fluid-2 {
    display: grid !important;
    grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
    grid-auto-flow: row !important;
    align-items: start !important;
    gap: 36px 32px !important;
    height: auto !important;
    margin-top: -80px !important;
    overflow: visible !important;
  }
  body.blog .section-blog.section-blog_grid .js-grid__sizer {
    display: none !important;
  }
  body.blog .section-blog.section-blog_grid .athena-letter-subscribe-wrap {
    grid-column: 1 / -1 !important;
    width: 100vw !important;
    max-width: none !important;
    margin: 0 calc(50% - 50vw) !important;
    transform: none !important;
    padding: 18px 20px !important;
  }
  body.blog .section-blog.section-blog_grid .js-grid__item {
    position: relative !important;
    inset: auto !important;
    width: 100% !important;
    max-width: none !important;
    margin: 0 !important;
    transform: none !important;
    align-self: start !important;
  }
}
@media (min-width: 768px) and (max-width: 1024px) {
  body.blog .section-blog.section-blog_grid .js-grid.grid_fluid-2 {
    display: grid !important;
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    grid-auto-flow: row !important;
    align-items: start !important;
    gap: 32px 24px !important;
    height: auto !important;
    margin-top: -80px !important;
    overflow: visible !important;
  }
  body.blog .section-blog.section-blog_grid .js-grid__sizer { display: none !important; }
  body.blog .section-blog.section-blog_grid .athena-letter-subscribe-wrap {
    grid-column: 1 / -1 !important;
    width: 100vw !important;
    max-width: none !important;
    margin: 0 calc(50% - 50vw) !important;
    transform: none !important;
    padding: 18px 20px !important;
  }
  body.blog .section-blog.section-blog_grid .js-grid__item {
    position: relative !important; inset: auto !important; width: 100% !important;
    max-width: none !important; margin: 0 !important; transform: none !important;
  }
}
@media (max-width: 767px) {
  body.blog .section-blog.section-blog_grid .js-grid.grid_fluid-2 {
    display: block !important; height: auto !important; margin-top: -80px !important; overflow: visible !important;
  }
  body.blog .section-blog.section-blog_grid .js-grid__sizer { display: none !important; }
  body.blog .section-blog.section-blog_grid .athena-letter-subscribe-wrap {
    width: 100vw !important; max-width: none !important;
    margin: 0 calc(50% - 50vw) 28px !important; transform: none !important;
    padding: 16px 16px !important;
  }
  body.blog .section-blog.section-blog_grid .js-grid__item {
    position: relative !important; inset: auto !important; width: 100% !important;
    max-width: none !important; margin: 0 0 32px !important; transform: none !important;
  }
}

/* Join the Letter subscribe band directly to the masthead. */
@media (min-width: 768px) {
  body.blog .section-blog.section-blog_grid .js-grid.grid_fluid-2 { margin-top: -117px !important; }
}
