:root {
  --brand-primary: #1f6ae1;
  --brand-primary-dark: #1756b8;
  --brand-primary-soft: #eaf2ff;
  --brand-primary-muted: #d9e8ff;

  --text-primary: #27313d;
  --text-secondary: #6d7885;

  --background: #ffffff;
  --background-soft: #f6f8fb;
  --background-dark: #18212d;

  --border: #e0e5eb;

  --shadow-soft: 0 10px 30px rgba(24, 33, 45, 0.08);

  --shadow-card: 0 18px 48px rgba(24, 33, 45, 0.12);

  --radius-medium: 14px;
  --radius-large: 22px;

  --header-height: 82px;
}

/* ========================================
   GLOBAL
======================================== */

* {
  box-sizing: border-box;
}

html {
  height: auto;
  scroll-behavior: smooth;
  overflow-x: clip;
}

body.modern-home,
body.home-page.modern-home {
  width: 100%;

  height: auto;

  min-height: 100%;

  overflow-x: clip;

  color: var(--text-primary);

  background: var(--background);

  font-family: 'Open Sans', sans-serif;

  font-size: 15px;

  font-weight: 400;

  line-height: 1.7;
}

body.modern-home h1,
body.modern-home h2,
body.modern-home h3,
body.modern-home h4,
body.modern-home h5,
body.modern-home h6 {
  color: var(--text-primary);

  font-family: 'Poppins', sans-serif;
}

body.modern-home h2 {
  font-weight: 600;
}

body.modern-home a {
  text-decoration: none;
}

body.modern-home img {
  max-width: 100%;
}

/* Primary site header/navigation lives in /css/site-navigation.css. */

/* ========================================
   HERO
======================================== */

.home-hero {
  position: relative;

  min-height: 730px;

  display: flex;

  align-items: center;

  overflow: hidden;

  background-image: url('../img/heroes/oregon-hero.png');

  background-size: cover;

  background-position: center;
}

.home-hero-overlay {
  position: absolute;

  inset: 0;

  background: linear-gradient(
    90deg,
    rgba(10, 20, 34, 0.84) 0%,

    rgba(10, 20, 34, 0.64) 45%,

    rgba(10, 20, 34, 0.25) 78%,

    rgba(10, 20, 34, 0.1) 100%
  );
}

.home-hero-container {
  position: relative;

  z-index: 2;
}

.home-hero-content {
  max-width: 720px;

  padding: 90px 0;
}

.eyebrow {
  margin-bottom: 12px;

  color: var(--brand-primary);

  font-family: 'Poppins', sans-serif;

  font-size: 12px;

  font-weight: 700;

  letter-spacing: 0.11em;

  text-transform: uppercase;
}

.hero-eyebrow,
.eyebrow-light {
  color: #a9caff;
}

.home-hero h1 {
  margin: 0 0 22px;

  color: #ffffff !important;

  font-size: clamp(52px, 6vw, 80px);

  font-weight: 600;

  line-height: 1.03;

  letter-spacing: -0.045em;
}

.home-hero h1 span {
  display: block;

  color: #9dc1ff;
}

.hero-lead {
  max-width: 690px;

  margin: 0 0 15px;

  color: rgba(255, 255, 255, 0.96);

  font-size: 20px;

  line-height: 1.65;
}

.hero-subcopy {
  max-width: 650px;

  color: rgba(255, 255, 255, 0.82);

  font-size: 16px;
}

.hero-actions,
.about-actions {
  display: flex;

  flex-wrap: wrap;

  gap: 14px;

  margin-top: 28px;
}

/* ========================================
   BUTTONS
======================================== */

.hero-primary-button,
.hero-secondary-button,
.site-button {
  display: inline-flex;

  min-height: 52px;

  align-items: center;

  justify-content: center;

  padding: 13px 25px;

  border-radius: 999px;

  font-family: 'Poppins', sans-serif;

  font-size: 13px;

  font-weight: 600;

  text-transform: uppercase;

  transition: 220ms ease;
}

.hero-primary-button,
.site-button-primary {
  color: #ffffff !important;

  background: var(--brand-primary);

  border: 1px solid var(--brand-primary);
}

.hero-primary-button:hover,
.site-button-primary:hover {
  color: #ffffff !important;

  background: var(--brand-primary-dark);

  border-color: var(--brand-primary-dark);

  transform: translateY(-2px);

  box-shadow: var(--shadow-soft);
}

.hero-secondary-button {
  color: #ffffff !important;

  background: rgba(255, 255, 255, 0.08);

  border: 1px solid rgba(255, 255, 255, 0.65);
}

.hero-secondary-button:hover {
  color: #ffffff !important;

  background: rgba(255, 255, 255, 0.17);

  border-color: #ffffff;
}

.site-button-secondary {
  color: var(--brand-primary) !important;

  background: #ffffff;

  border: 1px solid var(--brand-primary);
}

.site-button-secondary:hover {
  color: #ffffff !important;

  background: var(--brand-primary);
}

.site-button-light {
  color: #ffffff !important;

  background: transparent;

  border: 1px solid rgba(255, 255, 255, 0.65);
}

.site-button-light:hover {
  color: var(--background-dark) !important;

  background: #ffffff;
}

/* ========================================
   SECTIONS
======================================== */

.page-section {
  position: relative;

  width: 100%;

  padding: 90px 0;

  scroll-margin-top: calc(var(--header-height) + 10px);
}

.section-soft {
  background: var(--background-soft);
}

.section-heading {
  max-width: 760px;

  margin-bottom: 42px;
}

.section-heading h2 {
  margin: 0 0 14px;

  font-size: clamp(34px, 4vw, 48px);

  font-weight: 600;

  letter-spacing: -0.025em;
}

.section-heading p {
  margin: 0;

  color: var(--text-secondary);

  font-size: 17px;
}

/* ========================================
   ABOUT
======================================== */

.about-grid {
  display: grid;

  grid-template-columns:
    minmax(280px, 0.78fr)
    minmax(0, 1.22fr);

  gap: 70px;

  align-items: center;
}

.about-photo-wrap {
  position: relative;
}

.about-photo-wrap::before {
  position: absolute;

  content: '';

  width: 82%;

  height: 105%;

  left: -10%;

  top: -2.5%;

  background: var(--brand-primary-soft);

  border-radius: var(--radius-large);

  transform: rotate(-4deg);
}

.about-photo {
  position: relative;

  z-index: 1;

  display: block;

  width: 100%;

  max-width: 470px;

  margin: 0 auto;

  border-radius: var(--radius-large);

  box-shadow: var(--shadow-card);
}

.about-copy p {
  color: #4e5965;

  font-size: 16px;
}

.about-contact {
  display: flex;

  flex-wrap: wrap;

  gap: 18px;

  margin-top: 25px;
}

.about-contact a {
  color: var(--text-primary);

  font-weight: 600;
}

.about-contact i {
  color: var(--brand-primary);

  margin-right: 7px;
}

/* ========================================
   COMMUNITIES HOME CTA
======================================== */

.communities-home-section {
  padding: 60px 0;
}

.communities-home-box {
  display: grid;

  grid-template-columns:
    minmax(0, 1.6fr)
    minmax(240px, 0.6fr);

  gap: 40px;

  align-items: center;

  padding: 48px;

  color: #ffffff;

  background: linear-gradient(135deg, #18212d 0%, #233753 100%);

  border-radius: var(--radius-large);

  box-shadow: var(--shadow-card);
}

.communities-home-box h2 {
  margin: 0 0 12px;

  color: #ffffff !important;

  font-size: clamp(30px, 4vw, 44px);
}

.communities-home-box p {
  max-width: 680px;

  margin: 0;

  color: rgba(255, 255, 255, 0.78);

  font-size: 16px;
}

.communities-home-action {
  text-align: right;
}

/* ========================================
   RELOCATION
======================================== */

.relocation-grid {
  display: grid;

  grid-template-columns:
    minmax(260px, 0.75fr)
    minmax(0, 1.25fr);

  gap: 60px;

  align-items: center;
}

.relocation-image-wrap {
  display: flex;

  justify-content: center;
}

.relocation-image-wrap img {
  max-height: 600px;

  width: auto;
}

.relocation-copy h3 {
  font-size: 28px;
}

.relocation-copy p {
  color: var(--text-secondary);

  font-size: 16px;
}

.feature-list {
  margin: 24px 0 30px;

  padding: 23px 28px 23px 48px;

  background: #ffffff;

  border: 1px solid var(--border);

  border-radius: var(--radius-medium);

  box-shadow: var(--shadow-soft);
}

.feature-list li {
  margin-bottom: 9px;
}

.feature-list li::marker {
  color: var(--brand-primary);
}

/* ========================================
   FORMS
======================================== */

.site-form input[type='text'],
.site-form input[type='email'],
.site-form textarea {
  width: 100%;

  margin-bottom: 16px;

  padding: 14px 18px;

  color: var(--text-primary);

  background: #ffffff;

  border: 1px solid var(--border);

  border-radius: 10px;

  outline: none;

  transition: 180ms ease;
}

.site-form input:focus,
.site-form textarea:focus {
  border-color: var(--brand-primary);

  box-shadow: 0 0 0 3px rgba(31, 106, 225, 0.12);
}

.site-form textarea {
  min-height: 150px;

  resize: vertical;
}

.form-row-custom {
  display: grid;

  grid-template-columns: 1fr 1fr;

  gap: 14px;
}

.honeypot {
  position: absolute;

  left: -9999px;

  width: 1px;

  height: 1px;

  overflow: hidden;
}

/* ========================================
   REVIEWS
======================================== */

.reviews-carousel-home {
  position: relative;
  width: 100vw;
  margin-left: calc(50% - 50vw);
  padding: 0 clamp(24px, 4vw, 64px);
}

.reviews-carousel-shell {
  position: relative;
  width: 100%;
}

.reviews-carousel-viewport {
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scroll-behavior: smooth;
  scrollbar-width: none;
  padding: 4px 2px 18px;
}

.reviews-carousel-viewport::-webkit-scrollbar {
  display: none;
}

.reviews-carousel-track {
  display: flex;
  gap: 20px;
  align-items: stretch;
}

.review-card-home {
  flex: 0 0 calc((100% - 40px) / 3);
  min-width: 0;
  display: flex;
  flex-direction: column;
  padding: 22px;
  background: #ffffff;
  border: 1px solid var(--border);
  border-radius: var(--radius-medium);
  box-shadow: 0 8px 24px rgba(24, 33, 45, 0.07);
  scroll-snap-align: start;
}

.review-source {
  display: inline-flex;
  align-self: flex-start;
  margin-bottom: 8px;
  padding: 4px 9px;
  color: var(--brand-primary-dark);
  background: var(--brand-primary-soft);
  border-radius: 999px;
  font-family: 'Poppins', sans-serif;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.review-stars {
  margin-bottom: 9px;
  color: #f1b928;
  font-size: 15px;
  letter-spacing: 2px;
}

.review-card-home .review-quote {
  flex: 1;
  margin: 0 0 16px;
  color: #4f5a66;
  font-size: 14px;
  line-height: 1.62;
}

.review-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding-top: 12px;
  border-top: 1px solid var(--border);
}

.review-meta strong {
  color: var(--text-primary);
  font-family: 'Poppins', sans-serif;
  font-size: 13px;
}

.review-meta a {
  flex-shrink: 0;
  color: var(--brand-primary);
  font-size: 12px;
  font-weight: 700;
}

.review-meta a:hover {
  color: var(--brand-primary-dark);
}

.reviews-carousel-button {
  position: absolute;
  top: 50%;
  z-index: 5;
  width: 42px;
  height: 42px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-primary);
  background: #ffffff;
  border: 1px solid var(--border);
  border-radius: 50%;
  box-shadow: var(--shadow-soft);
  cursor: pointer;
  transform: translateY(-50%);
}

.reviews-carousel-button:hover {
  color: #ffffff;
  background: var(--brand-primary);
  border-color: var(--brand-primary);
}

.reviews-carousel-prev {
  left: 4px;
}

.reviews-carousel-next {
  right: 4px;
}

.review-links {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 18px;
}

.review-links a {
  display: inline-flex;
  padding: 9px 15px;
  color: var(--brand-primary);
  background: #ffffff;
  border: 1px solid var(--brand-primary-muted);
  border-radius: 999px;
  font-size: 13px;
  font-weight: 600;
}

.review-links a:hover {
  color: #ffffff;
  background: var(--brand-primary);
  border-color: var(--brand-primary);
}

/* ========================================
   FAQ
======================================== */

.faq-list {
  width: 100%;
  max-width: none;
}

.faq-list details {
  margin-bottom: 12px;

  background: #ffffff;

  border: 1px solid var(--border);

  border-radius: 10px;

  overflow: hidden;
}

.faq-list summary {
  padding: 18px 20px;

  cursor: pointer;

  font-family: 'Poppins', sans-serif;

  font-weight: 600;
}

.faq-list summary::marker {
  color: var(--brand-primary);
}

.faq-list details p {
  margin: 0;

  padding: 0 20px 18px;

  color: var(--text-secondary);
}

#faq .section-heading {
  max-width: 760px;
  margin-left: auto;
  margin-right: auto;
  text-align: center;
}

#faq .section-heading p {
  max-width: 680px;
  margin-left: auto;
  margin-right: auto;
}

#faq .faq-list {
  width: 100%;
  max-width: none;
}

/* ========================================
   CONTACT
======================================== */

.contact-grid {
  display: grid;

  grid-template-columns:
    minmax(280px, 0.85fr)
    minmax(0, 1.15fr);

  gap: 70px;

  align-items: start;
}

.contact-details {
  display: flex;

  flex-direction: column;

  gap: 14px;
}

.contact-details > a {
  display: flex;

  align-items: center;

  gap: 14px;

  color: var(--text-primary);
}

.contact-icon {
  display: flex;

  width: 46px;

  height: 46px;

  align-items: center;

  justify-content: center;

  flex-shrink: 0;

  color: #ffffff;

  background: var(--brand-primary);

  border-radius: 50%;
}

.contact-details small {
  display: block;

  color: var(--text-secondary);

  font-size: 11px;

  text-transform: uppercase;
}

.contact-details strong {
  display: block;
}

.social-row {
  display: flex;

  gap: 10px;

  margin-top: 28px;
}

.social-row a {
  display: flex;

  width: 42px;

  height: 42px;

  align-items: center;

  justify-content: center;

  color: #ffffff;

  background: #263342;

  border-radius: 50%;
}

.social-row a:hover {
  color: #ffffff;

  background: var(--brand-primary);

  transform: translateY(-2px);
}

.contact-form-card {
  padding: 32px;

  background: #ffffff;

  border: 1px solid var(--border);

  border-radius: var(--radius-medium);

  box-shadow: var(--shadow-soft);
}

/* ========================================
   FOOTER
======================================== */

.site-footer {
  padding: 64px 0 24px;

  color: #eef1f5;

  background: #465466;
}

.footer-grid {
  display: grid;

  grid-template-columns: 1.6fr 1fr 1fr 1fr;

  gap: 42px;
}

.footer-brand img {
  width: auto;

  max-width: 220px;

  max-height: 64px;

  margin-bottom: 17px;
}

.footer-brand p {
  max-width: 350px;

  color: #d9dee5;
}

.site-footer h3 {
  color: #ffffff !important;

  font-size: 15px;
}

.footer-links {
  margin: 0;

  padding: 0;

  list-style: none;
}

.footer-links li {
  margin-bottom: 8px;
}

.footer-links a {
  color: #e1e5ea;
}

.footer-links a:hover {
  color: #ffffff;
}

.footer-bottom {
  display: flex;

  justify-content: space-between;

  gap: 20px;

  margin-top: 46px;

  padding-top: 20px;

  color: #c7cdd5;

  border-top: 1px solid rgba(255, 255, 255, 0.18);

  font-size: 12px;
}

/* ========================================
   RESPONSIVE
======================================== */

@media (max-width: 991.98px) {
  .home-hero {
    min-height: 650px;

    background-position: 62% center;
  }

  .about-grid,
  .relocation-grid,
  .contact-grid {
    grid-template-columns: 1fr;

    gap: 42px;
  }

  .about-photo {
    max-width: 420px;
  }

  .communities-home-box {
    grid-template-columns: 1fr;
  }

  .communities-home-action {
    text-align: left;
  }

  .review-grid {
    grid-template-columns: 1fr;
  }

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

@media (max-width: 767.98px) {
  :root {
    --header-height: 70px;
  }

  .home-hero {
    min-height: 620px;

    background-position: 66% center;
  }

  .home-hero-overlay {
    background: rgba(10, 20, 34, 0.7);
  }

  .home-hero-content {
    padding: 70px 0;
  }

  .home-hero h1 {
    font-size: 46px;
  }

  .hero-lead {
    font-size: 18px;
  }

  .page-section {
    padding: 68px 0;
  }

  .section-heading h2 {
    font-size: 34px;
  }

  .hero-actions,
  .about-actions {
    flex-direction: column;

    align-items: stretch;
  }

  .hero-primary-button,
  .hero-secondary-button,
  .site-button {
    width: 100%;
  }

  .form-row-custom,
  .video-grid {
    grid-template-columns: 1fr;
  }

  .communities-home-box {
    padding: 32px 25px;
  }

  .contact-form-card {
    padding: 24px;
  }

  .footer-grid {
    grid-template-columns: 1fr;
  }

  .footer-bottom {
    flex-direction: column;

    gap: 6px;
  }
}

@media (max-width: 575.98px) {
  .home-hero {
    min-height: 590px;
  }

  .home-hero h1 {
    font-size: 38px;
  }

  .hero-lead {
    font-size: 16px;
  }
}

/* ========================================
   YOUTUBE / MEDIA
======================================== */

.home-youtube-section {
  overflow: hidden;
}

/* Center the main section intro while keeping a readable line length. */
.home-youtube-section > .container > .section-heading {
  max-width: 780px;
  margin: 0 auto 48px;
  text-align: center;
}

.home-youtube-section > .container > .section-heading p {
  max-width: 680px;
  margin-left: auto;
  margin-right: auto;
}

/* Each playlist gets one centered heading + one full-width media rail. */
.youtube-collection {
  margin-bottom: 44px;
}

.youtube-collection:last-child {
  margin-bottom: 0;
}

.youtube-collection-heading {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0;
  width: 100%;
  max-width: 760px;
  margin: 0 auto 24px;
  text-align: center;
}

.youtube-collection-heading > div {
  width: 100%;
  max-width: 680px;
  margin: 0 auto;
}

.youtube-collection-heading h3 {
  margin: 5px 0 8px;
  font-size: 30px;
}

.youtube-collection-heading p {
  max-width: 620px;
  margin: 0 auto;
  color: var(--text-secondary);
}

.youtube-collection-heading .text-link {
  display: inline-block;
  margin: 13px auto 0;
}

.youtube-label {
  color: var(--brand-primary);
  font-family: 'Poppins', sans-serif;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

/* Full-width rail: headings stay contained, videos break out to viewport width. */
.youtube-carousel-wrap {
  position: relative;
  width: 100vw;
  margin-left: calc(50% - 50vw);
  padding: 0 clamp(24px, 3.5vw, 56px);
}

.youtube-carousel {
  display: flex;
  gap: 22px;
  width: 100%;
  padding: 4px 2px 18px;
  overflow-x: auto;
  overflow-y: hidden;
  scroll-snap-type: x mandatory;
  scroll-padding-left: 2px;
  scroll-behavior: smooth;
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
}

.youtube-carousel::-webkit-scrollbar {
  display: none;
}

/* Fixed card width means a wide monitor reveals more videos instead of giant cards. */
.youtube-video-card {
  flex: 0 0 clamp(300px, 22vw, 360px);
  min-width: 0;
  color: var(--text-primary);
  scroll-snap-align: start;
}

.youtube-video-link {
  display: block;
  color: inherit;
}

.youtube-video-card:hover {
  color: var(--brand-primary);
}

.youtube-thumbnail-wrap {
  position: relative;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  margin-bottom: 12px;
  background: #111111;
  border-radius: 13px;
  box-shadow: var(--shadow-soft);
}

.youtube-thumbnail-wrap img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 250ms ease;
}

.youtube-video-card:hover .youtube-thumbnail-wrap img {
  transform: scale(1.025);
}

.youtube-play-button {
  position: absolute;
  left: 50%;
  top: 50%;
  display: flex;
  width: 48px;
  height: 48px;
  align-items: center;
  justify-content: center;
  color: #ffffff;
  background: rgba(0, 0, 0, 0.72);
  border-radius: 50%;
  transform: translate(-50%, -50%);
}

.youtube-video-content {
  min-width: 0;
}

.youtube-video-card h4 {
  display: -webkit-box;
  margin: 0;
  overflow: hidden;
  color: inherit;
  font-size: 15px;
  line-height: 1.45;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.youtube-load-error {
  margin: 0;
  color: var(--text-secondary);
}

.youtube-carousel-button {
  position: absolute;
  top: 42%;
  z-index: 4;
  display: flex;
  width: 44px;
  height: 44px;
  align-items: center;
  justify-content: center;
  color: var(--text-primary);
  background: #ffffff;
  border: 1px solid var(--border);
  border-radius: 50%;
  box-shadow: var(--shadow-soft);
  cursor: pointer;
  transform: translateY(-50%);
}

.youtube-carousel-button:hover {
  color: #ffffff;
  background: var(--brand-primary);
  border-color: var(--brand-primary);
}

.youtube-carousel-prev {
  left: 12px;
}

.youtube-carousel-next {
  right: 12px;
}

@media (max-width: 991.98px) {
  .home-youtube-section > .container > .section-heading {
    margin-bottom: 40px;
  }

  .youtube-collection {
    margin-bottom: 38px;
  }

  .youtube-carousel-wrap {
    padding-left: 28px;
    padding-right: 28px;
  }

  .youtube-carousel-prev {
    left: 4px;
  }

  .youtube-carousel-next {
    right: 4px;
  }
}

@media (max-width: 767.98px) {
  .home-youtube-section > .container > .section-heading {
    margin-bottom: 34px;
  }

  .youtube-collection {
    margin-bottom: 32px;
  }

  .youtube-collection-heading {
    margin-bottom: 18px;
    padding: 0 10px;
  }

  .youtube-collection-heading h3 {
    font-size: 26px;
  }

  .youtube-carousel-wrap {
    padding-left: 18px;
    padding-right: 18px;
  }

  .youtube-video-card {
    flex: 0 0 min(86vw, 340px);
  }

  .youtube-carousel-button {
    display: none;
  }
}

/* ========================================
   MOBILE REVIEW CAROUSEL
======================================== */

.reviews-carousel-dots {
  display: none;
}

@media (max-width: 767.98px) {
  .reviews-carousel-home {
    padding-left: 18px;
    padding-right: 18px;
  }

  .reviews-carousel-track {
    gap: 14px;
  }

  .review-card-home {
    flex: 0 0 100%;
    width: 100%;
    min-width: 100%;

    padding: 20px;

    scroll-snap-align: center;
  }

  .reviews-carousel-viewport {
    width: 100%;

    padding-bottom: 8px;

    scroll-snap-type: x mandatory;
    scroll-behavior: smooth;
  }

  /*
   * Mobile uses swipe + autoplay instead
   * of floating arrow buttons.
   */
  .reviews-carousel-button {
    display: none;
  }

  .reviews-carousel-dots {
    display: flex;

    align-items: center;
    justify-content: center;

    gap: 8px;

    margin-top: 12px;
  }

  .reviews-carousel-dot {
    width: 7px;
    height: 7px;

    padding: 0;

    background: #cbd2da;

    border: 0;
    border-radius: 50%;

    cursor: pointer;

    transition:
      width 180ms ease,
      background 180ms ease;
  }

  .reviews-carousel-dot.is-active {
    width: 20px;

    background: var(--brand-primary);

    border-radius: 999px;
  }
}

/* ========================================
   WEEKLY MARKET SNAPSHOT
======================================== */

.home-market-section {
  background:
    radial-gradient(circle at 90% 10%, rgba(31, 106, 225, 0.08), transparent 28%),
    var(--background-soft);
}

.market-home-heading {
  max-width: none;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: end;
  gap: 36px;
}

.market-home-heading > div:first-child {
  max-width: 820px;
}

.market-home-heading-action {
  padding-bottom: 3px;
}

.home-market-snapshot {
  min-height: 300px;
}

.home-market-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 18px;
  padding: 13px 16px;
  color: var(--text-secondary);
  background: rgba(255, 255, 255, 0.82);
  border: 1px solid var(--border);
  border-radius: 10px;
  font-size: 12px;
  line-height: 1.5;
}

.home-market-meta span:first-child {
  color: var(--text-primary);
  font-weight: 700;
}

.home-market-card-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 18px;
}

.home-market-card,
.home-market-loading,
.home-market-error {
  min-height: 300px;
  padding: 23px;
  background: #ffffff;
  border: 1px solid var(--border);
  border-radius: var(--radius-medium);
  box-shadow: var(--shadow-soft);
}

.home-market-card {
  display: flex;
  flex-direction: column;
}

.home-market-card-topline {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 15px;
}

.home-market-card-date {
  color: var(--text-secondary);
  font-size: 10px;
  font-weight: 600;
  white-space: nowrap;
}

.home-market-card h3 {
  min-height: 54px;
  margin: 0 0 17px;
  color: var(--text-primary);
  font-size: 20px;
  font-weight: 700;
  line-height: 1.35;
}

.home-market-card-stats {
  display: grid;
  gap: 11px;
  margin-bottom: 16px;
}

.home-market-card-stats > div {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 14px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--border);
}

.home-market-card-stats span {
  color: var(--text-secondary);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.035em;
  line-height: 1.35;
  text-transform: uppercase;
}

.home-market-card-stats strong {
  color: var(--text-primary);
  font-family: 'Poppins', sans-serif;
  font-size: 16px;
  font-weight: 700;
  white-space: nowrap;
}

.home-market-context {
  margin: 0 0 15px;
  padding-left: 11px;
  color: var(--text-secondary);
  border-left: 3px solid #99a7b8;
  font-size: 11px;
  line-height: 1.6;
}

.home-market-context.is-tight {
  border-left-color: #e59d37;
}

.home-market-context.is-moderate {
  border-left-color: var(--brand-primary);
}

.home-market-context.is-higher {
  border-left-color: #40a472;
}

.home-market-card-link {
  display: inline-flex;
  align-items: center;
  align-self: flex-start;
  margin-top: auto;
  color: var(--brand-primary) !important;
  font-family: 'Poppins', sans-serif;
  font-size: 11px;
  font-weight: 700;
}

.home-market-card-link::after {
  content: '\2192';
  margin-left: 7px;
  transition: transform 180ms ease;
}

.home-market-card-link:hover::after {
  transform: translateX(3px);
}

.home-market-footnote {
  display: flex;
  align-items: flex-start;
  gap: 9px;
  margin-top: 18px;
  color: var(--text-secondary);
  font-size: 11px;
  line-height: 1.65;
}

.home-market-footnote i {
  padding-top: 3px;
  color: var(--brand-primary);
}

.home-market-loading,
.home-market-error {
  grid-column: 1 / -1;
  min-height: 120px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  color: var(--text-secondary);
  text-align: center;
}

.home-market-error strong,
.home-market-error span {
  display: block;
}

.market-freshness-badge {
  display: inline-flex;
  align-items: center;
  min-height: 23px;
  padding: 4px 8px;
  border-radius: 999px;
  font-size: 9px;
  font-weight: 800;
  letter-spacing: 0.05em;
  line-height: 1;
  text-transform: uppercase;
}

.market-freshness-badge.is-current {
  color: #1f6848;
  background: #e8f7ef;
}

.market-freshness-badge.is-older {
  color: #7c5918;
  background: #fff2ce;
}

@media (max-width: 1100px) {
  .home-market-card-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 800px) {
  .market-home-heading {
    grid-template-columns: 1fr;
    gap: 22px;
  }

  .market-home-heading-action {
    padding-bottom: 0;
  }

  .home-market-meta {
    display: grid;
    justify-content: stretch;
  }
}

@media (max-width: 620px) {
  .home-market-card-grid {
    grid-template-columns: 1fr;
  }

  .home-market-card {
    min-height: 0;
  }
}
