/* ==========================================================================
   Livin' Tulsa — Interior Page Builder
   Loaded only on pages using template-interior-builder.php
   ========================================================================== */

.livin-builder-page {
  --livin-hero-height: clamp(240px, 26vw, 400px); /* adjust hero height here */
  --livin-radius: 16px;
  --livin-border: #d6d6d6;
  --livin-light-bg: #fdf4ee;
  --livin-section-space: 60px;
}

/* Let sections span the full width; each section has its own .wrap */
.livin-builder-page .content-sidebar-wrap {
  max-width: none;
  padding-top: 0;
  padding-bottom: 0;
}
.livin-builder-page .site-inner .content {
  width: 100%;
  float: none;
  padding: 0;
}

/* --------------------------------------------------------------------------
   Hero
   ------------------------------------------------------------------------ */

.livin-hero {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: var(--livin-hero-height);
  overflow: hidden;
  background-color: #333;
  color: #fff;
  text-align: center;
}
.livin-hero__img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
}
.livin-hero::after {
  content: "";
  position: absolute;
  inset: 0;
  background: #000;
  opacity: var(--livin-hero-overlay, 0.45);
  z-index: 1;
}
.livin-hero__inner {
  position: relative;
  z-index: 2;
  width: 100%;
  padding-top: 40px;
  padding-bottom: 40px;
}
.livin-hero__title {
  margin: 0;
  color: #fff;
  /* Slider titles are <p> tags, so give them the heading font explicitly */
  font-family: var(--heading-font-family);
  font-weight: var(--heading-font-weight);
  font-size: 48px;
  font-size: 4.8rem;
  line-height: 1.15;
  text-shadow: 0 2px 12px rgba(0, 0, 0, 0.35);
}
.livin-hero__subtitle {
  max-width: 760px;
  margin: 12px auto 0;
  font-size: 20px;
  font-size: 2rem;
  color: #fff;
}

/* --------------------------------------------------------------------------
   Title only (no hero image)
   ------------------------------------------------------------------------ */

.livin-page-title {
  padding: 64px 0 0;
  text-align: center;
}
.livin-page-title__heading {
  margin: 0;
  color: var(--heading-color, #111);
  font-size: 40px;
  font-size: 4rem;
  line-height: 1.2;
}
/* Pull the first section up so the title doesn't float */
.livin-hero-title-only .livin-builder > .livin-section:first-child {
  padding-top: 40px;
}

/* --------------------------------------------------------------------------
   Hero slider
   ------------------------------------------------------------------------ */

.livin-hero--slider {
  display: block;
  min-height: 0;
}
.livin-hero--slider::after {
  content: none; /* overlay moves onto each slide */
}

/* Slides stack in one grid cell so the slider is as tall as its tallest slide */
.livin-hero__slides {
  display: grid;
}
.livin-hero__slide {
  position: relative;
  grid-area: 1 / 1;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: var(--livin-hero-height);
  opacity: 0;
  visibility: hidden;
  transition:
    opacity 0.8s ease,
    visibility 0s linear 0.8s;
}
.livin-hero__slide.is-active {
  opacity: 1;
  visibility: visible;
  transition:
    opacity 0.8s ease,
    visibility 0s;
}
.livin-hero__slide::after {
  content: "";
  position: absolute;
  inset: 0;
  background: #000;
  opacity: var(--livin-hero-overlay, 0.45);
  z-index: 1;
}
.livin-hero--slider .livin-hero__inner {
  padding-bottom: 64px; /* room for the dots */
}
.livin-hero__actions {
  margin: 20px 0 0;
}

/* Controls — overlay layer; arrows on the sides, dots at the bottom */
.livin-hero__controls {
  position: absolute;
  inset: 0;
  z-index: 3;
  pointer-events: none;
}
.livin-hero__controls[hidden] {
  display: none;
}
.livin-hero__controls > * {
  pointer-events: auto;
}

/* Keep slide text clear of the side arrows */
.livin-hero--slider .livin-hero__inner {
  padding-left: 90px;
  padding-right: 90px;
}

.livin-hero .livin-hero__arrow,
.livin-hero .livin-hero__dot {
  margin: 0;
  padding: 0;
  min-height: 0;
  border: 0;
  box-shadow: none;
  cursor: pointer;
  transition:
    background-color 0.2s ease,
    width 0.3s ease,
    transform 0.2s ease;
}

/* Arrows: solid orange circles like the site's buttons, CSS chevrons */
.livin-hero .livin-hero__arrow {
  position: absolute;
  top: 50%;
  width: 52px;
  height: 52px;
  border-radius: 50%;
  background: var(--primary-color, #f15a22);
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.25);
  transform: translateY(-50%);
}
.livin-hero .livin-hero__arrow--prev {
  left: 24px;
}
.livin-hero .livin-hero__arrow--next {
  right: 24px;
}
.livin-hero .livin-hero__arrow::before {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  width: 12px;
  height: 12px;
  border-top: 3px solid #fff;
  border-right: 3px solid #fff;
}
.livin-hero .livin-hero__arrow--prev::before {
  transform: translate(-30%, -50%) rotate(-135deg);
}
.livin-hero .livin-hero__arrow--next::before {
  transform: translate(-70%, -50%) rotate(45deg);
}
.livin-hero .livin-hero__arrow:hover,
.livin-hero .livin-hero__arrow:focus-visible {
  background: var(--secondary-color, #3b8fb3);
  transform: translateY(-50%) scale(1.06);
}

/* Dots: white pills, active one stretches and turns orange */
.livin-hero__dots {
  position: absolute;
  left: 50%;
  bottom: 16px;
  display: flex;
  align-items: center;
  gap: 0;
  transform: translateX(-50%);
}
/* 24px tap target; the visible pill is drawn inside */
.livin-hero .livin-hero__dot {
  position: relative;
  width: 24px;
  height: 24px;
  border-radius: 12px;
  background: transparent;
}
.livin-hero .livin-hero__dot::before {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  width: 12px;
  height: 12px;
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.7);
  transform: translate(-50%, -50%);
  transition:
    width 0.3s ease,
    background-color 0.2s ease;
}
.livin-hero .livin-hero__dot:hover,
.livin-hero .livin-hero__dot:focus-visible {
  background: transparent;
}
.livin-hero .livin-hero__dot:hover::before,
.livin-hero .livin-hero__dot:focus-visible::before {
  background: #fff;
}
.livin-hero .livin-hero__dot.is-active {
  width: 40px;
}
.livin-hero .livin-hero__dot.is-active::before {
  width: 32px;
  background: var(--primary-color, #f15a22);
}

.livin-hero .livin-hero__arrow:focus-visible,
.livin-hero .livin-hero__dot:focus-visible {
  outline: 2px solid #fff;
  outline-offset: 3px;
}

@media (prefers-reduced-motion: reduce) {
  .livin-hero__slide,
  .livin-hero__slide.is-active {
    transition: none;
  }
}

/* --------------------------------------------------------------------------
   Sections
   ------------------------------------------------------------------------ */

.livin-section {
  padding: var(--livin-section-space) 0;
}
.livin-section--bg-light {
  background-color: var(--livin-light-bg);
}
/* Avoid doubled spacing between two sections with the same background */
.livin-section--bg-white + .livin-section--bg-white,
.livin-section--bg-light + .livin-section--bg-light {
  padding-top: 0;
}

.livin-section__heading {
  margin: 0 0 24px;
}
.livin-section--cards .livin-section__heading {
  text-align: center;
}
.livin-section__intro > :last-child,
.livin-text > :last-child,
.livin-media__content > :last-child {
  margin-bottom: 0;
}

/* --------------------------------------------------------------------------
   Card grid (3 columns)
   ------------------------------------------------------------------------ */

/* Flex (not grid) so a leftover card on tablets sits centered */
.livin-cards {
  --livin-card-cols: 3;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 24px;
}
.livin-cards > .livin-card {
  box-sizing: border-box;
  flex: 0 0
    calc((100% - (var(--livin-card-cols) - 1) * 24px) / var(--livin-card-cols));
  min-width: 0;
}
/* Matches the Text section: full container width, left aligned */
.livin-builder .livin-cards__footer {
  margin-top: 36px;
}
.livin-cards__footer p {
  margin: 0 0 10px;
}
.livin-cards__footer > :last-child {
  margin-bottom: 0;
}
.livin-cards__footer a {
  color: var(--primary-color, #f15a22);
  text-decoration: underline;
}

.livin-card {
  display: flex;
  flex-direction: column;
  background: #fff;
  border: 1px solid var(--livin-border);
  border-radius: var(--livin-radius);
  overflow: hidden;
  text-align: center;
}
.livin-card__image {
  display: block;
  aspect-ratio: 16 / 9;
  overflow: hidden;
}
.livin-card__image img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.3s ease;
}
a.livin-card__image:hover img {
  transform: scale(1.04);
}
.livin-card__body {
  display: flex;
  flex-direction: column;
  flex: 1;
  padding: 24px 24px 28px;
}
.livin-card__title {
  margin: 0 0 12px;
  font-size: 20px;
  font-size: 2rem;
  line-height: 1.3;
}
.livin-card__text {
  margin: 0 0 16px;
  font-size: 16px;
  font-size: 1.6rem;
}
.livin-card__actions {
  margin-top: auto; /* keeps buttons aligned across a row */
  padding-top: 8px;
}
.livin-card__button.button {
  padding: 11px 26px 12px;
  font-size: 14px;
  font-size: 1.4rem;
}

/* --------------------------------------------------------------------------
   Copy — always full container width
   ------------------------------------------------------------------------ */

.livin-builder .livin-text,
.livin-builder .livin-section__intro {
  width: 100%;
  max-width: none;
  margin-left: 0;
  margin-right: 0;
  text-align: left;
}

/* Keep editor content inside the screen on small devices */
.livin-builder .entry-content {
  overflow-wrap: break-word;
}
.livin-builder .entry-content a {
  overflow-wrap: anywhere; /* long URLs / emails */
}
.livin-builder .entry-content img,
.livin-builder .entry-content iframe,
.livin-builder .entry-content video {
  max-width: 100%;
  height: auto;
}
.livin-builder .entry-content table {
  display: block;
  max-width: 100%;
  overflow-x: auto;
}

/* --------------------------------------------------------------------------
   Text + resource links
   ------------------------------------------------------------------------ */

/* Heading with a short orange accent bar */
.livin-section--resources .livin-section__heading,
.livin-feature__heading,
.livin-stats__heading {
  position: relative;
  margin-bottom: 28px;
  padding-bottom: 16px;
}
.livin-section--resources .livin-section__heading::after,
.livin-feature__heading::after,
.livin-stats__heading::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: 0;
  width: 56px;
  height: 4px;
  border-radius: 2px;
  background: var(--primary-color, #f15a22);
}

.livin-section--resources .livin-text {
  font-size: 18px;
  font-size: 1.8rem;
  line-height: 1.7;
}

/* Small uppercase label, matches the footer column titles */
.livin-resources__title {
  margin: 40px 0 18px;
  color: var(--primary-color, #f15a22);
  font-size: 15px;
  font-size: 1.5rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

/* Resource cards reuse the .livin-cards / .livin-card styles above */
.livin-section--resources .livin-text + .livin-resources {
  margin-top: 36px;
}

.livin-resource__desc {
  margin: 0 0 16px;
  font-size: 16px;
  font-size: 1.6rem;
  line-height: 1.6;
  overflow-wrap: anywhere; /* long emails / URLs never break the card */
}
.livin-resource__desc p {
  margin: 0 0 10px;
}
.livin-resource__desc > :last-child {
  margin-bottom: 0;
}
.livin-resource__desc a {
  color: var(--primary-color, #f15a22);
  text-decoration: underline;
}
/* Lists inside a description: no theme indent, centered */
.content .livin-resource__desc ul,
.content .livin-resource__desc ol {
  margin: 0 0 10px;
  padding: 0;
}
.content .livin-resource__desc ul > li,
.content .livin-resource__desc ol > li {
  list-style: none;
}

/* --------------------------------------------------------------------------
   Topics with images
   ------------------------------------------------------------------------ */

.livin-features {
  display: flex;
  flex-direction: column;
  gap: 96px;
}

.livin-feature {
  display: grid;
  grid-template-columns: minmax(0, 5fr) minmax(0, 6fr);
  gap: 72px;
  align-items: center;
}
.livin-feature--image-right {
  grid-template-columns: minmax(0, 6fr) minmax(0, 5fr);
}
.livin-feature--image-right .livin-feature__media {
  order: 2;
}
.livin-feature--no-image {
  grid-template-columns: minmax(0, 1fr);
}

/* Image with an offset cream panel and orange corner accent */
.livin-feature__media {
  position: relative;
  padding: 0 0 28px 28px;
}
.livin-feature--image-right .livin-feature__media {
  padding: 0 28px 28px 0;
}
.livin-feature__media::before {
  content: "";
  position: absolute;
  inset: 28px 28px 0 0;
  border-radius: var(--livin-radius);
  background: var(--livin-light-bg);
}
.livin-feature--image-right .livin-feature__media::before {
  inset: 28px 0 0 28px;
}
.livin-feature__media::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: 0;
  width: 96px;
  height: 96px;
  border-bottom: 6px solid var(--primary-color, #f15a22);
  border-left: 6px solid var(--primary-color, #f15a22);
  border-bottom-left-radius: var(--livin-radius);
}
.livin-feature--image-right .livin-feature__media::after {
  left: auto;
  right: 0;
  border-left: 0;
  border-right: 6px solid var(--primary-color, #f15a22);
  border-bottom-left-radius: 0;
  border-bottom-right-radius: var(--livin-radius);
}
.livin-feature__frame {
  position: relative;
  z-index: 1;
  aspect-ratio: 4 / 3;
  overflow: hidden;
  border-radius: var(--livin-radius);
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.12);
}
.livin-feature__frame img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.6s ease;
}
.livin-feature:hover .livin-feature__frame img {
  transform: scale(1.03);
}

.livin-feature__text {
  font-size: 17px;
  font-size: 1.7rem;
  line-height: 1.75;
}
.livin-feature__text p {
  margin: 0 0 16px;
}
.livin-feature__text > :last-child {
  margin-bottom: 0;
}
.livin-feature__actions {
  margin-top: 28px;
}

/* Bold stats pop a little */
.livin-feature__text strong {
  color: var(--heading-color, #1d1d1d);
  font-weight: 700;
}

/* --------------------------------------------------------------------------
   Downloads
   ------------------------------------------------------------------------ */

.livin-downloads__intro + .livin-downloads {
  margin-top: 36px;
}

/* Cover area */
.livin-download__cover {
  box-sizing: border-box;
  position: relative;
  text-decoration: none;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  aspect-ratio: 4 / 3;
  overflow: hidden;
  background: var(--livin-light-bg);
}
/* Custom cover image fills the area */
.livin-download__cover > img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.3s ease;
}
/* PDF first-page preview looks like a sheet of paper peeking up */
.livin-download__cover--page {
  padding: 24px 24px 0;
}
.livin-download__cover--page > img {
  width: 62%;
  height: 100%;
  object-fit: cover;
  object-position: top;
  border-radius: 4px 4px 0 0;
  box-shadow: 0 -2px 18px rgba(0, 0, 0, 0.14);
}
.livin-download:hover .livin-download__cover > img {
  transform: translateY(-6px);
}
.livin-download:hover
  .livin-download__cover:not(.livin-download__cover--page)
  > img {
  transform: scale(1.04);
}

/* No preview: a simple document shape with the file type */
.livin-download__cover--empty {
  align-items: center;
}
.livin-download__doc {
  position: relative;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  width: 92px;
  height: 120px;
  padding-bottom: 18px;
  background: #fff;
  border-radius: 6px;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.1);
  /* folded corner */
  clip-path: polygon(0 0, calc(100% - 26px) 0, 100% 26px, 100% 100%, 0 100%);
}
.livin-download__doc::before {
  content: "";
  position: absolute;
  top: 0;
  right: 0;
  width: 26px;
  height: 26px;
  background: #f1ded5;
  border-bottom-left-radius: 4px;
}
.livin-download__doc span {
  padding: 4px 10px;
  border-radius: 4px;
  background: var(--primary-color, #f15a22);
  color: #fff;
  font-size: 13px;
  font-size: 1.3rem;
  font-weight: 700;
  letter-spacing: 0.06em;
}

.livin-download__meta {
  margin: 0 0 6px;
  color: var(--primary-color, #f15a22);
  font-size: 12px;
  font-size: 1.2rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

@media (prefers-reduced-motion: reduce) {
  .livin-download__cover > img {
    transition: none;
  }
}

/* --------------------------------------------------------------------------
   School Directory
   ------------------------------------------------------------------------ */

.livin-schools__intro {
  margin-bottom: 32px;
}

/* Filter bar */
.livin-schools__filters {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  gap: 16px;
  padding: 22px 24px;
  background: var(--livin-light-bg);
  border-radius: var(--livin-radius);
}
.livin-schools__filters[hidden] {
  display: none;
}
.livin-schools__field {
  display: flex;
  flex: 1 1 200px;
  flex-direction: column;
  gap: 6px;
}
.livin-schools__field--search {
  flex: 2 1 280px;
}
.livin-schools__field label {
  color: var(--heading-color, #1d1d1d);
  font-size: 13px;
  font-size: 1.3rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}
.livin-schools .livin-schools__field input,
.livin-schools .livin-schools__field select {
  width: 100%;
  min-height: 48px;
  margin: 0;
  padding: 10px 14px;
  background-color: #fff;
  border: 1px solid var(--livin-border);
  border-radius: 10px;
  font-size: 16px; /* 16px stops iOS zooming in */
  font-size: 1.6rem;
}
.livin-schools .livin-schools__field input:focus,
.livin-schools .livin-schools__field select:focus {
  border-color: var(--primary-color, #f15a22);
  outline: 2px solid var(--primary-color, #f15a22);
  outline-offset: 0;
}
.livin-schools .livin-schools__reset {
  min-height: 48px;
  padding: 10px 22px;
  background: transparent;
  border: 2px solid var(--primary-color, #f15a22);
  border-radius: 30px;
  color: var(--primary-color, #f15a22);
  font-size: 15px;
  font-size: 1.5rem;
  font-weight: 700;
  cursor: pointer;
}
.livin-schools .livin-schools__reset:hover,
.livin-schools .livin-schools__reset:focus-visible {
  background: var(--primary-color, #f15a22);
  color: #fff;
}

.livin-schools__count {
  margin: 20px 0;
  font-size: 15px;
  font-size: 1.5rem;
  font-weight: 600;
}

/* Grid: cards only grow when their own details open */
.livin-schools__grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  align-items: start;
  gap: 24px;
}

.livin-school {
  box-sizing: border-box;
  display: flex;
  flex-direction: column;
  padding: 26px 26px 22px;
  background: #fff;
  border: 1px solid var(--livin-border);
  border-top: 4px solid var(--primary-color, #f15a22);
  border-radius: var(--livin-radius);
}
.livin-school[hidden] {
  display: none;
}
.livin-school__name {
  margin: 0 0 4px;
  font-size: 20px;
  font-size: 2rem;
  line-height: 1.25;
}
.livin-school__affiliation {
  margin: 0 0 16px;
  color: var(--primary-color, #f15a22);
  font-size: 14px;
  font-size: 1.4rem;
  font-weight: 700;
}

.livin-school dl {
  margin: 0;
}
.livin-school dt {
  margin: 0;
  color: #6b6b6b;
  font-size: 12px;
  font-size: 1.2rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}
.livin-school dd {
  margin: 2px 0 0;
  font-size: 15px;
  font-size: 1.5rem;
  line-height: 1.5;
}

.livin-school__facts {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px 12px;
  padding: 16px 0;
  border-top: 1px solid #eee;
  border-bottom: 1px solid #eee;
}
.livin-school__fact--wide {
  grid-column: 1 / -1;
}

.livin-school__contact {
  padding-top: 16px;
  font-size: 15px;
  font-size: 1.5rem;
  line-height: 1.5;
  overflow-wrap: anywhere;
}
.livin-school__contact p {
  margin: 0 0 6px;
}
.livin-school__contact a {
  color: var(--primary-color, #f15a22);
  font-weight: 600;
}

/* More details */
.livin-school__more {
  margin-top: 10px;
}
.livin-school__more summary {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 0;
  color: var(--heading-color, #1d1d1d);
  font-size: 14px;
  font-size: 1.4rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  cursor: pointer;
  list-style: none;
}
.livin-school__more summary::-webkit-details-marker {
  display: none;
}
/* CSS chevron */
.livin-school__more summary::after {
  content: "";
  width: 7px;
  height: 7px;
  margin-top: -4px;
  border-right: 2px solid var(--primary-color, #f15a22);
  border-bottom: 2px solid var(--primary-color, #f15a22);
  transform: rotate(45deg);
  transition:
    transform 0.2s ease,
    margin-top 0.2s ease;
}
.livin-school__more[open] summary::after {
  margin-top: 2px;
  transform: rotate(-135deg);
}
.livin-school__more summary:hover,
.livin-school__more summary:focus-visible {
  color: var(--primary-color, #f15a22);
}
.livin-school__more dl {
  display: grid;
  gap: 12px;
  padding: 8px 0 4px;
}
.livin-school__note {
  margin: 12px 0 0;
  color: #6b6b6b;
  font-size: 13px;
  font-size: 1.3rem;
  font-style: italic;
}

.livin-schools__empty {
  padding: 32px;
  background: var(--livin-light-bg);
  border-radius: var(--livin-radius);
  text-align: center;
}
.livin-schools__empty[hidden] {
  display: none;
}
.livin-schools__empty button {
  padding: 0;
  background: none;
  border: 0;
  color: var(--primary-color, #f15a22);
  font: inherit;
  font-weight: 700;
  text-decoration: underline;
  cursor: pointer;
}

@media only screen and (max-width: 1023px) {
  .livin-schools__grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}
@media only screen and (max-width: 767px) {
  .livin-schools__grid {
    grid-template-columns: minmax(0, 1fr);
    gap: 16px;
  }
  .livin-schools__filters {
    padding: 18px;
  }
  .livin-schools__field,
  .livin-schools__field--search {
    flex-basis: 100%;
  }
  .livin-schools .livin-schools__reset {
    width: 100%;
  }
  .livin-school {
    padding: 22px 20px 18px;
  }
}

/* --------------------------------------------------------------------------
   Stat boxes
   ------------------------------------------------------------------------ */

.livin-builder .livin-stats__intro {
  margin-bottom: 32px;
}
.livin-stats {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 20px;
}
.livin-stat {
  box-sizing: border-box;
  flex: 0 1 calc(50% - 10px); /* 2 per row on tablets */
  padding: 30px 24px;
  background: var(--livin-light-bg);
  border-radius: var(--livin-radius);
  text-align: center;
}
@media only screen and (min-width: 1024px) {
  .livin-stat {
    flex: 1 1 0;
    max-width: calc(25% - 15px); /* up to 4 per row */
  }
}
.livin-stat__number {
  margin: 0 0 10px;
  color: var(--primary-color, #f15a22);
  font-family: var(--heading-font-family);
  font-size: 44px;
  font-size: 4.4rem;
  font-weight: 700;
  line-height: 1.05;
}
.livin-stat__suffix {
  margin-left: 2px;
  font-size: 22px;
  font-size: 2.2rem;
}
.livin-stat__desc {
  margin: 0;
  font-size: 16px;
  font-size: 1.6rem;
  line-height: 1.5;
}
.livin-stats__actions {
  margin-top: 32px;
  text-align: left;
}
.livin-stats__source {
  margin: 20px 0 0;
  color: #6b6b6b;
  font-size: 13px;
  font-size: 1.3rem;
  font-style: italic;
  text-align: center;
}
@media only screen and (max-width: 600px) {
  .livin-stat {
    flex-basis: 100%;
  }
  .livin-stat__number {
    font-size: 38px;
    font-size: 3.8rem;
  }
}

/* --------------------------------------------------------------------------
   Embed
   ------------------------------------------------------------------------ */

.livin-embed iframe {
  display: block;
  width: 100%;
  max-width: 100%;
  height: var(--livin-embed-height, 900px);
  border: 0;
}
@media only screen and (max-width: 767px) {
  .livin-embed iframe {
    height: var(--livin-embed-height-phone, var(--livin-embed-height, 900px));
  }
}

/* --------------------------------------------------------------------------
   Image + copy
   ------------------------------------------------------------------------ */

.livin-media {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 48px;
  align-items: center;
}
.livin-media--image-right .livin-media__image {
  order: 2;
}
.livin-media__image img {
  display: block;
  width: 100%;
  height: auto;
  border-radius: var(--livin-radius);
}
.livin-media__actions {
  margin-top: 24px;
}

/* --------------------------------------------------------------------------
   Related page links — photo tiles
   ------------------------------------------------------------------------ */

.livin-related {
  padding: 0 0 calc(var(--livin-section-space) + 12px);
  text-align: center;
}
.livin-related > .wrap {
  padding-top: calc(var(--livin-section-space) + 12px);
  border-top: 1px solid var(--livin-border);
}

.livin-related__eyebrow {
  margin: 0 0 8px;
  color: var(--primary-color, #f15a22);
  font-size: 14px;
  font-size: 1.4rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}
.livin-related__heading {
  position: relative;
  margin: 0 0 40px;
  padding-bottom: 16px;
}
.livin-related__heading::after {
  content: "";
  position: absolute;
  left: 50%;
  bottom: 0;
  width: 56px;
  height: 4px;
  border-radius: 2px;
  background: var(--primary-color, #f15a22);
  transform: translateX(-50%);
}

/* Centered row of tiles; wraps and stays centered */
.content ul.livin-related__list {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 20px;
  margin: 0;
  padding: 0;
  list-style: none;
}
.content ul.livin-related__list > li {
  flex: 0 1 260px;
  margin: 0;
  list-style: none;
}

.livin-related__tile {
  position: relative;
  display: flex;
  align-items: flex-end;
  aspect-ratio: 4 / 3;
  overflow: hidden;
  border-radius: var(--livin-radius);
  background: linear-gradient(
    135deg,
    var(--primary-color, #f15a22),
    var(--secondary-color, #3b8fb3)
  );
  box-shadow: 0 8px 22px rgba(0, 0, 0, 0.1);
  color: #fff;
  text-align: left;
  text-decoration: none;
  transition:
    transform 0.3s ease,
    box-shadow 0.3s ease;
}
.livin-related__img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.6s ease;
}
/* Dark fade at the bottom keeps titles readable on any photo */
.livin-related__tile::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
  background: linear-gradient(
    to top,
    rgba(0, 0, 0, 0.75) 0%,
    rgba(0, 0, 0, 0.2) 55%,
    rgba(0, 0, 0, 0) 100%
  );
}
.livin-related__tile--no-image::before {
  background: linear-gradient(to top, rgba(0, 0, 0, 0.25), rgba(0, 0, 0, 0));
}
/* Orange bar that grows in on hover */
.livin-related__tile::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: 0;
  z-index: 2;
  width: 100%;
  height: 5px;
  background: var(--primary-color, #f15a22);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.35s ease;
}
.livin-related__title {
  position: relative;
  z-index: 2;
  display: block;
  width: 100%;
  padding: 18px 20px 20px;
  font-size: 18px;
  font-size: 1.8rem;
  font-weight: 700;
  line-height: 1.25;
  text-shadow: 0 1px 6px rgba(0, 0, 0, 0.35);
}

.livin-related__tile:hover,
.livin-related__tile:focus-visible {
  color: #fff;
  box-shadow: 0 16px 34px rgba(0, 0, 0, 0.18);
  transform: translateY(-4px);
}
.livin-related__tile:hover .livin-related__img,
.livin-related__tile:focus-visible .livin-related__img {
  transform: scale(1.06);
}
.livin-related__tile:hover::after,
.livin-related__tile:focus-visible::after {
  transform: scaleX(1);
}
.livin-related__tile:focus-visible {
  outline: 3px solid var(--primary-color, #f15a22);
  outline-offset: 3px;
}

@media (prefers-reduced-motion: reduce) {
  .livin-related__tile,
  .livin-related__img,
  .livin-related__tile::after {
    transition: none;
  }
}

/* --------------------------------------------------------------------------
   Responsive
   ------------------------------------------------------------------------ */

@media only screen and (max-width: 1023px) {
  .livin-features {
    gap: 72px;
  }
  .livin-feature,
  .livin-feature--image-right {
    gap: 48px;
  }
  .livin-builder-page {
    --livin-section-space: 48px;
  }
  .livin-cards {
    --livin-card-cols: 2;
  }
  .livin-media {
    gap: 32px;
  }
}

@media only screen and (max-width: 900px) {
  .livin-media {
    grid-template-columns: 1fr;
  }
  .livin-media--image-right .livin-media__image {
    order: 0;
  }
  .livin-media__image {
    max-width: 640px;
  }
  .livin-feature,
  .livin-feature--image-right {
    grid-template-columns: minmax(0, 1fr);
    gap: 32px;
  }
  .livin-feature--image-right .livin-feature__media {
    order: 0; /* image always on top on smaller screens */
  }
  .livin-feature__media,
  .livin-feature--image-right .livin-feature__media {
    max-width: 640px;
  }
}

@media only screen and (max-width: 767px) {
  .livin-page-title {
    padding-top: 40px;
  }
  .livin-page-title__heading {
    font-size: 30px;
    font-size: 3rem;
  }
  .livin-hero-title-only .livin-builder > .livin-section:first-child {
    padding-top: 28px;
  }
  .livin-features {
    gap: 56px;
  }
  .livin-feature__media {
    padding: 0 0 18px 18px;
  }
  .livin-feature--image-right .livin-feature__media {
    padding: 0 18px 18px 0;
  }
  .livin-feature__media::before {
    inset: 18px 18px 0 0;
  }
  .livin-feature--image-right .livin-feature__media::before {
    inset: 18px 0 0 18px;
  }
  .livin-feature__media::after {
    width: 64px;
    height: 64px;
    border-width: 4px;
  }
  .livin-hero .livin-hero__arrow {
    width: 38px;
    height: 38px;
  }
  .livin-hero .livin-hero__arrow::before {
    width: 9px;
    height: 9px;
    border-width: 2px;
  }
  .livin-hero .livin-hero__arrow--prev {
    left: 10px;
  }
  .livin-hero .livin-hero__arrow--next {
    right: 10px;
  }
  .livin-hero--slider .livin-hero__inner {
    padding-left: 56px;
    padding-right: 56px;
  }
  .livin-hero__title {
    font-size: 30px;
    font-size: 3rem;
  }
  .livin-hero__subtitle {
    font-size: 17px;
    font-size: 1.7rem;
  }
}

@media only screen and (max-width: 600px) {
  .content ul.livin-related__list {
    gap: 12px;
  }
  .content ul.livin-related__list > li {
    flex: 0 0 calc(50% - 6px); /* two tiles per row on phones */
  }
  .livin-related__heading {
    margin-bottom: 28px;
  }
  .livin-related__title {
    padding: 12px 12px 14px;
    font-size: 15px;
    font-size: 1.5rem;
  }
  .livin-builder-page {
    --livin-section-space: 40px;
  }
  .livin-cards {
    --livin-card-cols: 1;
    gap: 20px;
  }
  .livin-card__body {
    padding: 20px 20px 24px;
  }
}
