/**
 * CompoundIn home v2 — page-specific (hero, sections, featured carousel)
 * Requires cin_v2.css via _init_v2()
 */

/* —— Hero typography —— */
/* —— Hero slide (Figma) —— */
body.cin-bs4 .hero-slide-content h2 {
  color: var(--content-primary-inverse);
  font-family: var(--family-primary);
  font-size: clamp(1.75rem, 5vw + 1rem, var(--headings-5xl-bold-size));
  font-style: normal;
  font-weight: 700;
  line-height: 1.111;
  letter-spacing: var(--headings-5xl-bold-letter-spacing);
  margin-bottom: 1rem;
}

body.cin-bs4 .hero-slide-content .h5 {
  color: var(--content-primary-inverse);
  font-family: var(--family-secondary);
  font-size: var(--body-sm-semi-bold-size);
  font-style: normal;
  font-weight: 600;
  line-height: var(--body-xs-semi-bold-line-height);
  letter-spacing: var(--body-xs-semi-bold-letter-spacing);
}

body.cin-bs4 .hero-slide-content .lead {
  color: var(--content-primary-inverse);
  font-family: var(--family-secondary);
  font-size: var(--body-xl-regular-size);
  font-style: normal;
  font-weight: 400;
  line-height: var(--body-xl-regular-line-height);
  letter-spacing: var(--body-xl-regular-letter-spacing);
  text-align: center;
}

@media (max-width: 767.98px) {
  body.cin-bs4 .hero-slide-content h2 {
    margin-bottom: 0.65rem !important;
  }

  body.cin-bs4 .hero-slide-content .h5 {
    margin-bottom: 0.5rem !important;
  }

  body.cin-bs4 .hero-slide-content .lead {
    margin-bottom: 0.65rem !important;
  }
}

@media (min-width: 1200px) {
  body.cin-bs4 .hero-slide-content h2 {
    font-size: var(--headings-5xl-bold-size);
    line-height: var(--headings-5xl-bold-line-height);
  }
}

/* —— Hero slider —— */
/* —— Hero + Slick (md 550px — was 600px; closer to new-ui image band without inner pt) —— */
.hero-slider {
  position: relative;
  height: 450px;
  overflow: hidden;
  background: var(--cin-slate-900);
  padding-top: 0;
  isolation: isolate;
  box-sizing: border-box;
}

@media (min-width: 768px) {
  .hero-slider {
    height: 550px;
    padding-top: 0;
  }
}

.hero-slider .js-hero-slider,
.hero-slider .js-hero-slider.slick-slider {
  display: block;
  height: 100%;
  min-height: 450px;
  box-sizing: border-box;
}

@media (min-width: 768px) {
  .hero-slider .js-hero-slider,
  .hero-slider .js-hero-slider.slick-slider {
    min-height: 550px;
  }
}

.hero-slider .js-hero-slider .slick-list,
.hero-slider .js-hero-slider .slick-track {
  height: 100% !important;
  min-height: inherit;
}

.hero-slider .js-hero-slider .slick-slide {
  height: 100% !important;
  min-height: inherit;
}

.hero-slider .js-hero-slider .slick-slide > div {
  height: 100% !important;
  min-height: inherit;
}

.hero-slide-inner {
  min-height: 450px;
}

@media (min-width: 768px) {
  .hero-slide-inner {
    min-height: 0;
  }
}

.hero-slide-media {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
}

.hero-slide-media img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.hero-slide-gradient {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(
    to top,
    rgba(15, 23, 42, 0.9) 0%,
    rgba(15, 23, 42, 0.4) 50%,
    rgba(15, 23, 42, 0.2) 100%
  );
}

.hero-slide-content {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  padding-top: 5rem;
  /* Room above dot row + CTA on small screens (flex centers inside padding box) */
  padding-bottom: 0;
  box-sizing: border-box;
}

@media (max-width: 767.98px) {
  .hero-slide-content {
    padding-top: 3.5rem;
    padding-bottom: 5.75rem;
  }
}

@media (min-width: 768px) {
  .hero-slide-content {
    padding-top: 0;
  }
}

.hero-slide-cta {
  position: relative;
  z-index: 4;
}

/* Mobile: compact glass pill — stays above dots, lighter than btn-lg */
@media (max-width: 767.98px) {
  a.hero-slide-cta.btn {
    padding: 0.4rem 1.2rem !important;
    font-size: 0.8125rem !important;
    font-weight: 600;
    line-height: 1.35;
    border-radius: 9999px !important;
    background: rgba(16, 185, 129, 0.4) !important;
    border: 1px solid rgba(255, 255, 255, 0.5) !important;
    color: #fff !important;
    box-shadow: 0 2px 16px rgba(0, 0, 0, 0.22);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    text-decoration: none !important;
    letter-spacing: 0.02em;
  }

  a.hero-slide-cta.btn:active {
    transform: scale(0.98);
  }

  a.hero-slide-cta.btn:hover,
  a.hero-slide-cta.btn:focus {
    background: rgba(5, 150, 105, 0.65) !important;
    border-color: rgba(255, 255, 255, 0.85) !important;
    color: #fff !important;
  }

  a.hero-slide-cta.btn:focus {
    outline: none;
    box-shadow:
      0 2px 16px rgba(0, 0, 0, 0.22),
      0 0 0 3px rgba(255, 255, 255, 0.35);
  }
}

/* Desktop: keep solid CTA, clearer depth */
@media (min-width: 768px) {
  a.hero-slide-cta.btn {
    box-shadow: 0 4px 22px rgba(5, 150, 105, 0.38);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    text-decoration: none !important;
  }

  a.hero-slide-cta.btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 28px rgba(5, 150, 105, 0.48);
    color: #fff !important;
  }
}

.hero-arrow {
align-items: center;
background: rgba(0, 0, 0, 0.3);
border-radius: 999px;
border: none;
color: #fff;
cursor: pointer;
display: none;
justify-content: center;
padding: 0.2rem 0.3rem;
position: absolute;
top: 50%;
transform: translateY(-50%);
z-index: 10;
}

@media (min-width: 768px) {
  .hero-arrow {
    display: flex;
  }
}

.hero-arrow:hover {
  background: var(--cin-emerald);
}

.hero-arrow.prev {
  left: 1rem;
}

.hero-arrow.next {
  right: 1rem;
}

.hero-slider .slick-dots {
  bottom: 14px;
  z-index: 6;
}

@media (min-width: 768px) {
  .hero-slider .slick-dots {
    bottom: 57px;
  }
}

.hero-slider .slick-dots li button:before {
  display: none;
}

.hero-slider .slick-dots li {
  margin: 0 4px;
}

.hero-slider .slick-dots li button {
  width: 12px;
  height: 12px;
  padding: 0;
}

.hero-slider .slick-dots li button .dot-inner {
  display: block;
  width: 12px;
  height: 12px;
  border-radius: 9999px;
  background: rgba(255, 255, 255, 0.5);
}

.hero-slider .slick-dots li.slick-active button .dot-inner {
  background: var(--cin-emerald);
}

.text-cin-emerald {
  color: var(--cin-emerald) !important;
}


/* Search strip overlap on hero */
@media (min-width: 768px) {
  .cin-search-wrap {
    margin-top: -3rem;
  }
}

/* —— Featured listings carousel —— */
/* Slick carousel: equal-height slides */
.js-listings-slider .slick-track {
  display: flex !important;
}

.js-listings-slider .slick-slide {
  height: auto !important;
  display: flex !important;
  flex-direction: column;
}

.js-listings-slider .slick-slide > div {
  flex: 1;
  display: flex;
  flex-direction: column;
}

.js-listings-slider .slick-slide .px-2 {
  flex: 1;
  display: flex;
  flex-direction: column;
}

.js-listings-slider .slick-slide .cin-compound-card {
  height: 100% !important;
  display: flex;
  flex-direction: column;
}

/* Mobile: Slick owns horizontal swipe — cover image only in homepage featured slider */
@media (max-width: 767.98px) {
  .cin-featured-compounds-slider [data-cin-card-carousel] .carousel-indicators,
  .cin-featured-compounds-slider [data-cin-card-carousel] .carousel-control-prev,
  .cin-featured-compounds-slider [data-cin-card-carousel] .carousel-control-next {
    display: none !important;
  }

  .cin-featured-compounds-slider [data-cin-card-carousel] .carousel-inner {
    display: block;
  }

  .cin-featured-compounds-slider [data-cin-card-carousel] .carousel-item:not(:first-child) {
    display: none !important;
  }

  .cin-featured-compounds-slider [data-cin-card-carousel] .carousel-item:first-child {
    display: block !important;
    float: none;
    margin-right: 0;
    transform: none;
  }
}

/* Listings slick */
.cin-listings-wrap {
  position: relative;
  margin-left: -16px;
  margin-right: -16px;
  padding-left: 16px;
  padding-right: 16px;
}

.cin-listing-arrow {
align-items: center;
background: #fff;
border-radius: 9999px;
border: 1px solid #f1f5f9;
color: var(--cin-slate-600);
cursor: pointer;
display: flex;
height: 40px;
justify-content: center;
outline: 1px solid #dedede;
position: absolute;
top: 50%;
transform: translateY(-50%);
width: 40px;
z-index: 10;
}

.cin-listing-arrow:hover {
  color: var(--cin-emerald);
  border-color: var(--cin-emerald);
}

.cin-listing-arrow.prev {
  left: -4px;
}

.cin-listing-arrow.next {
  right: -4px;
}

@media (max-width: 767px) {
  .cin-listing-arrow {
    display: none;
  }
}

/* —— Home sections —— */
.patterned-background {
  background-image: repeating-linear-gradient(
    45deg,
    transparent,
    transparent 8px,
    rgba(148, 163, 184, 0.12) 8px,
    rgba(148, 163, 184, 0.12) 9px
  );
}
.cin-ad-box {border-radius: 0.75rem;height: 150px;}
.cin-ad-box-img {object-fit: fill;object-position: center;}
.cin-map-box {border-radius: 0.75rem;height: 256px;}

@media (min-width: 768px) {
  .cin-ad-box {height: 200px;}
  .cin-map-box {height: 510px;}
}

/* How it works — segmented pills */
.cin-how-pills {
  background: linear-gradient(180deg, #f8fafc 0%, #f1f5f9 100%);
  border: 1px solid #e2e8f0;
  border-radius: 9999px;
  padding: 5px;
  gap: 6px;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.9),
    0 1px 2px rgba(15, 23, 42, 0.05),
    0 4px 12px rgba(15, 23, 42, 0.04);
}

.cin-how-pill {
  position: relative;
  border: none;
  border-radius: 9999px;
  padding: 0.55rem 1.35rem;
  font-size: 0.875rem;
  font-weight: 600;
  letter-spacing: 0.01em;
  color: #64748b;
  background: transparent;
  cursor: pointer;
  user-select: none;
  -webkit-tap-highlight-color: transparent;
  transition:
    color 0.22s ease,
    background 0.22s ease,
    box-shadow 0.22s ease,
    transform 0.15s ease;
  line-height: 1.35;
  white-space: nowrap;
  -webkit-font-smoothing: antialiased;
}

button.cin-how-pill {
  cursor: pointer;
}

@media (max-width: 575.98px) {
  .cin-how-pill {
    padding: 0.5rem 0.85rem;
    font-size: 0.8125rem;
  }
}

.cin-how-pill:hover:not(.cin-how-pill--active) {
  color: #334155;
  background: rgba(255, 255, 255, 0.75);
}

.cin-how-pill:active:not(.cin-how-pill--active) {
  transform: scale(0.98);
}

.cin-how-pill:focus {
  outline: none;
}

.cin-how-pill:focus-visible {
  box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.45);
}

.cin-how-pill[data-how-pill="renters"].cin-how-pill--active {
  color: #fff;
  background: linear-gradient(165deg, #34d399 0%, #059669 55%, #047857 100%);
  box-shadow:
    0 2px 8px rgba(5, 150, 105, 0.35),
    inset 0 1px 0 rgba(255, 255, 255, 0.2);
}

.cin-how-pill[data-how-pill="owners"].cin-how-pill--active {
  color: #fff;
  background: linear-gradient(165deg, #64748b 0%, #334155 50%, #1e293b 100%);
  box-shadow:
    0 2px 8px rgba(30, 41, 59, 0.35),
    inset 0 1px 0 rgba(255, 255, 255, 0.12);
}

.how-panel {
  display: none;
}

.how-panel.is-active {
  display: flex;
  flex-wrap: wrap;
}

.cin-step-num {
  font-size: 6rem;
  font-weight: 700;
  line-height: 1;
  color: #ecfdf5;
  position: absolute;
  top: -2rem;
  left: 50%;
  transform: translateX(-50%);
  z-index: 0;
  pointer-events: none;
}

.cin-step-num-blue {
  color: #eff6ff;
}

/* City tiles: img out of flow so row stretch + min-height give uniform boxes (BS4 row align-items-stretch). */
.cin-city-section .row {
  align-items: stretch;
}

.cin-city-section .row > [class*="col-"] {
  display: flex;
  flex-direction: column;
}

/* Match new-ui grid: auto-rows-[250px] — fixed tile height, no flex growth. */
.cin-city-tile {
  position: relative;
  border-radius: 1rem;
  overflow: hidden;
  cursor: pointer;
  height: 250px;
  min-height: 250px;
  flex: 0 0 auto;
  width: 100%;
  display: block;
}

/* Hidden until card hover (matches new-ui group-hover). No backdrop-filter while hidden — avoids visible “ghost” with opacity:0. */
.cin-city-tile .cin-city-arrow-btn {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transform: translateY(1rem);
  background: transparent;
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
  transition: opacity 0.3s ease, transform 0.3s ease, visibility 0.3s ease,
    background 0.3s ease, backdrop-filter 0.3s ease, -webkit-backdrop-filter 0.3s ease;
}

.cin-city-tile:hover .cin-city-arrow-btn {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  transform: translateY(0);
  background: rgba(255, 255, 255, 0.2);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}

/* Primary input can’t hover (e.g. phone) — keep control visible. */
@media (hover: none) {
  .cin-city-tile .cin-city-arrow-btn {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
    transform: none;
    background: rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
  }
}

.cin-city-tile img {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.7s ease;
  z-index: 0;
}

.cin-city-tile:hover img {
  transform: scale(1.1);
}

.cin-city-overlay {
  position: absolute;
  inset: 0;
  z-index: 1;
  background: linear-gradient(to top, rgba(15, 23, 42, 0.8), rgba(15, 23, 42, 0.2), transparent);
}

.cin-city-tile > .position-absolute {
  z-index: 2;
}

.cin-owner-section {
  background-color: #1e2a4a !important; /* Extremely deep dark navy */
  color: #fff !important;
}

/* Fix global h2 specificity overriding title color, font, and size */
.cin-owner-section h2 {
  color: #fff !important;
  font-family: var(--family-primary) !important;
  font-size: clamp(2.25rem, 5vw + 1rem, 3.5rem) !important; /* Huge bold display title */
  font-weight: 700 !important;
  line-height: 1.15 !important;
  letter-spacing: -1.5px !important;
}

.cin-owner-section h2 .text-success {
  color: var(--cin-emerald) !important;
}

/* Refine lead subtitle contrast & hierarchy */
.cin-owner-section .lead {
  color: #94a3b8 !important; /* Beautiful slate gray with excellent contrast & hierarchy */
  font-size: 1.125rem !important;
  font-family: var(--family-secondary) !important;
  line-height: 1.6 !important;
}

/* Soften borders and round borders on icon boxes to match Figma */
.cin-owner-section .border-white-50 {
  border-color: rgba(255, 255, 255, 0.08) !important;
}

.cin-owner-section div.rounded-lg {
  border-radius: 0.75rem !important;
}

/* Feature item text styling */
.cin-owner-section h4 {
  color: #fff !important;
  font-family: var(--family-secondary) !important;
  font-size: 1rem !important;
  font-weight: 600 !important;
  margin-bottom: 0.25rem !important;
}

.cin-owner-section p.small.text-white-50 {
  color: #94a3b8 !important;
  font-family: var(--family-secondary) !important;
}

/* Stat card formatting */
.cin-stat-card {
  background: #111827 !important; /* Deeper card background */
  border: 1px solid rgba(255, 255, 255, 0.08) !important;
  border-radius: 1.5rem !important;
}

.cin-stat-card .display-3 {
  font-family: var(--family-primary) !important;
  font-size: 4.5rem !important;
  font-weight: 700 !important;
  letter-spacing: -1.5px !important;
}

.cin-stat-card p.h5 {
  color: var(--cin-emerald) !important;
  font-family: var(--family-secondary) !important;
  font-size: 1.125rem !important;
  font-weight: 600 !important;
  letter-spacing: -0.2px !important;
}

.cin-stat-card hr.border-secondary {
  border-color: rgba(255, 255, 255, 0.08) !important;
}

.cin-stat-card div[style*="background:rgba(30,41,59,0.5)"] {
  background-color: rgba(255, 255, 255, 0.03) !important;
  border-color: rgba(255, 255, 255, 0.06) !important;
  border-radius: 0.75rem !important;
}

.cin-testimonial-bg {
  background: rgba(16, 185, 129, 0.08);
}

.cin-lead-split-left {
  background: #059669;
  color: #fff;
}
.cin-value-icon {
  width: 3.5rem;
  height: 3.5rem;
}

