/**
 * Spotlight blog designs (theme 2.161.0) — the listing
 * (template-parts/blog-listing-spotlight.php) and the post
 * (template-parts/blog-detail-spotlight.php).
 *
 * Ported from the legacy Apollo octave-child blog CSS
 * (assets/css/apollo/apl-blog-grid.css) and measured against
 * artsinorlando.com, whose blog used it. Sizes are the legacy ones; the
 * typefaces map to the Brand Kit: the display font for headings, labels and
 * the featured title, the body font (bold) for card titles and bylines.
 * Band color and image come from Posts → Blog Settings → Spotlight Design,
 * printed inline on .blog-spotlight__band.
 *
 * Enqueued only while a Spotlight design renders (functions.php,
 * artsopolis_octave_is_blog_spotlight()).
 */

/* Headings are prefixed with .site-main: an Elementor Kit styles bare h1-h6
   as `.elementor-kit-N hX`, which would otherwise outrank a single class. */

/* The band sits flush under the masthead, as in the legacy design. */
.site-main.blog-spotlight,
.site-main:has(> .post-detail--spotlight) {
  padding-top: 0;
}

.post-detail.post-detail--spotlight {
  padding-top: 0;
}

/* ---------------------------------------------------------------------------
   Band (shared)
   ------------------------------------------------------------------------ */
.blog-spotlight__band {
  --spotlight-ink: #000;
  color: var(--spotlight-ink);
  background-repeat: no-repeat;
  background-size: cover;
  background-position: center;
}

.blog-spotlight__band--light {
  --spotlight-ink: #fff;
}

.blog-spotlight__band a {
  color: inherit;
  text-decoration: none;
}

.blog-spotlight__band a:hover,
.blog-spotlight__band a:focus-visible {
  text-decoration: underline;
}

.blog-spotlight__band p {
  margin: 0;
}

/* ---------------------------------------------------------------------------
   Listing — band
   ------------------------------------------------------------------------ */
.blog-spotlight__inner {
  max-width: 1140px;
  margin: 0 auto;
  padding: 20px 0;
}

.site-main .blog-spotlight__heading {
  margin: 0;
  padding-bottom: 20px;
  font-family: var(--font-display);
  font-size: 150px;
  line-height: 1;
  text-transform: uppercase;
  color: inherit;
}

.blog-spotlight__featured {
  display: flex;
  flex-direction: row-reverse;
  align-items: flex-start;
  gap: 20px;
}

/* As in the legacy design the image is not cropped: it is centered, at full
   width, in a box two-thirds as tall as it is wide, so a wide image shows the
   band above and below it. */
.blog-spotlight__featured-image {
  position: relative;
  flex: 0 1 60%;
  display: block;
  aspect-ratio: 100 / 66;
  overflow: hidden;
}

.blog-spotlight__featured-image img,
.blog-spotlight__detail-image img {
  position: absolute;
  top: 50%;
  left: 50%;
  display: block;
  width: 100%;
  height: auto;
  transform: translate(-50%, -50%);
}

.blog-spotlight__featured-detail {
  flex: 1 1 40%;
  min-width: 0;
  padding-right: 10px;
}

.blog-spotlight__label {
  margin-bottom: 20px !important;
  padding-top: 10px;
  border-top: 3px solid var(--spotlight-ink);
  font-family: var(--font-display);
  font-size: 24px;
  line-height: 1;
  font-weight: 700;
  text-transform: uppercase;
}

.site-main .blog-spotlight__featured-title {
  margin: 0;
  font-family: var(--font-display);
  font-size: 42px;
  line-height: 1;
  text-transform: uppercase;
  color: inherit;
}

.blog-spotlight__byline,
.blog-spotlight__date {
  margin: 10px 0 13px !important;
  font-family: var(--font-body);
  font-size: 14px;
  font-weight: 700;
  line-height: 1.3;
  letter-spacing: 0.8px;
  text-transform: uppercase;
}

.blog-spotlight__excerpt {
  font-family: var(--font-body);
  font-size: 20px;
  font-weight: 400;
  line-height: 1.7;
}

/* ---------------------------------------------------------------------------
   Listing — categories and grid
   ------------------------------------------------------------------------ */
.blog-spotlight__body {
  max-width: 1140px;
  margin: 30px auto 60px;
}

.blog-spotlight__cats {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px 20px;
  margin-bottom: 40px;
}

.site-main .blog-spotlight__cats-label {
  margin: 0;
  font-family: var(--font-display);
  font-size: 26px;
  line-height: 1;
  text-transform: uppercase;
  color: #000;
}

.blog-spotlight__cats-list {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.blog-spotlight__cats-list a {
  display: inline-block;
  padding: 8px;
  border: 1px solid #000;
  font-family: var(--font-body);
  font-size: 16px;
  font-weight: 400;
  line-height: 1;
  color: #000;
  text-decoration: none;
}

.blog-spotlight__cats-list a:hover,
.blog-spotlight__cats-list a:focus-visible,
.blog-spotlight__cats-list a[aria-current="page"] {
  text-decoration: underline;
}

.blog-spotlight__grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  column-gap: 30px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.blog-spotlight__card {
  margin-bottom: 20px;
  padding-bottom: 15px;
}

.blog-spotlight__card-image {
  display: block;
  aspect-ratio: 100 / 60;
  overflow: hidden;
  background: #f2f2f2;
}

.blog-spotlight__card-image img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.site-main .blog-spotlight__card-title {
  margin: 6px 0 5px;
  font-family: var(--font-body);
  font-size: 20px;
  font-weight: 700;
  line-height: 1;
  letter-spacing: 0;
  text-transform: uppercase;
}

.blog-spotlight__card-title a {
  color: #000;
  text-decoration: none;
}

.blog-spotlight__card-title a:hover,
.blog-spotlight__card-title a:focus-visible {
  text-decoration: underline;
}

.blog-spotlight__card-byline {
  margin: 0 0 10px;
  font-family: var(--font-body);
  font-size: 15px;
  font-weight: 400;
  line-height: 1;
  color: #666;
}

.blog-spotlight__card-byline a {
  font-weight: 700;
  text-transform: capitalize;
  color: #000;
  text-decoration: none;
}

.blog-spotlight__card-byline a:hover {
  text-decoration: underline;
}

.blog-spotlight__card-date {
  margin: 0;
  font-family: var(--font-body);
  font-size: 12px;
  font-weight: 400;
  line-height: 1;
  text-transform: uppercase;
  color: #000;
}

.blog-spotlight__empty {
  font-size: 18px;
}

/* ---------------------------------------------------------------------------
   Detail — band
   ------------------------------------------------------------------------ */
.blog-spotlight__detail-row {
  display: flex;
  align-items: flex-start;
  gap: 20px;
  padding: 30px;
}

.blog-spotlight__detail-left,
.blog-spotlight__detail-right {
  padding: 10px;
}

.blog-spotlight__detail-left {
  flex: 0 0 33%;
}

.blog-spotlight__detail-right {
  flex: 1 1 67%;
  min-width: 0;
}

.blog-spotlight__detail-meta {
  padding: 15px 0 20px;
  border-top: 3px solid var(--spotlight-ink);
}

.blog-spotlight__detail-author,
.blog-spotlight__detail-date,
.blog-spotlight__share-label,
.blog-spotlight__detail-cats a {
  font-family: var(--font-display);
  font-size: 24px;
  font-weight: 600;
  line-height: 1.3;
  text-transform: uppercase;
}

.blog-spotlight__detail-author {
  margin-bottom: 13px !important;
  letter-spacing: 0.8px;
  font-weight: 900;
}

.blog-spotlight__share {
  display: flex;
  flex-direction: column;
}

.blog-spotlight__share-label {
  padding: 10px 0;
  border-top: 1px solid var(--spotlight-ink);
}

.blog-spotlight__share-list {
  display: flex;
  gap: 10px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.blog-spotlight__share-link {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 30px;
  height: 30px;
  border: 2px solid var(--spotlight-ink);
  border-radius: 50%;
  color: inherit;
}

.blog-spotlight__share-link svg {
  width: 16px;
  height: 16px;
}

.blog-spotlight__share-link:hover,
.blog-spotlight__share-link:focus-visible {
  background: var(--spotlight-ink);
  color: #fff;
}

.blog-spotlight__band--light .blog-spotlight__share-link:hover,
.blog-spotlight__band--light .blog-spotlight__share-link:focus-visible {
  color: #000;
}

.blog-spotlight__detail-cats {
  display: flex;
  flex-wrap: wrap;
  gap: 0 16px;
  margin: 0;
  padding: 15px 0 20px;
  border-top: 3px solid var(--spotlight-ink);
  list-style: none;
}

.site-main .blog-spotlight__detail-title {
  margin: 0;
  padding-bottom: 10px;
  font-family: var(--font-display);
  font-size: 68px;
  line-height: 1;
  text-transform: uppercase;
  color: inherit;
}

/* The legacy box is 90% of the column wide and 66% of the column tall. */
.blog-spotlight__detail-image {
  position: relative;
  width: 90%;
  aspect-ratio: 90 / 66;
  overflow: hidden;
}

/* ---------------------------------------------------------------------------
   Detail — content
   ------------------------------------------------------------------------ */
.blog-spotlight__content {
  max-width: 1140px;
  margin: 0 auto;
  padding: 10px 10px 60px;
}

.post-detail--spotlight .post-detail__content p a {
  text-decoration: underline;
  background: linear-gradient(#ffd830, #ffd830) no-repeat bottom left / 100% 0;
  transition: background-size 0.3s ease;
}

.post-detail--spotlight .post-detail__content p a:hover {
  background-size: 100% 0.5rem;
}

/* Legacy spacing: blocks carry their own bottom margins, so Octave's generic
   "space between siblings" rule for post bodies is switched off here. */
.post-detail--spotlight .post-detail__content > * + * {
  margin-top: 0;
}

.post-detail--spotlight .post-detail__content p {
  margin: 0 0 0.9em;
  line-height: 1.7;
}

/* The legacy theme hid empty paragraphs (by script); an empty block-editor
   paragraph would otherwise still add its margin. */
.post-detail--spotlight .post-detail__content p:empty {
  display: none;
}

.post-detail--spotlight .post-detail__content div,
.post-detail--spotlight .post-detail__content figure {
  margin-bottom: 0.9em;
}

.post-detail--spotlight .post-detail__content strong {
  font-weight: 700;
}

.post-detail--spotlight .post-detail__content figure > figcaption {
  text-align: center;
}

/* ---------------------------------------------------------------------------
   Responsive
   ------------------------------------------------------------------------ */
@media (max-width: 1150px) {
  .blog-spotlight__inner,
  .blog-spotlight__body {
    padding-left: 15px;
    padding-right: 15px;
  }
}

@media (max-width: 1024px) {
  .site-main .blog-spotlight__heading {
    font-size: 100px;
  }

  .blog-spotlight__grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .blog-spotlight__detail-row {
    flex-wrap: wrap;
  }

  .site-main .blog-spotlight__detail-title {
    font-size: 48px;
  }
}

@media (max-width: 767px) {
  .site-main .blog-spotlight__heading {
    font-size: 50px;
  }

  .blog-spotlight__featured {
    flex-direction: column;
  }

  .blog-spotlight__featured-image {
    flex-basis: auto;
    width: 100%;
  }

  .site-main .blog-spotlight__featured-title {
    padding-top: 10px;
    font-size: 22px;
  }

  .site-main .blog-spotlight__cats-label {
    font-size: 14px;
  }

  .blog-spotlight__grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .blog-spotlight__detail-row {
    flex-direction: column-reverse;
    padding: 30px 15px;
  }

  .blog-spotlight__detail-left,
  .blog-spotlight__detail-right {
    flex-basis: auto;
    width: 100%;
  }

  .site-main .blog-spotlight__detail-title {
    font-size: 24px;
  }

  .blog-spotlight__detail-author,
  .blog-spotlight__detail-date {
    font-size: 20px;
  }

  .blog-spotlight__detail-image {
    width: 100%;
    aspect-ratio: 100 / 66;
  }
}
