/**
 * Homepage Specific Styles
 */

/* ===== Homepage Container ===== */
.home {
  background: #fff;
}

/* ===== Grid Base ===== */
.home .grid {
  display: grid !important;
  gap: 24px;
}

/* ===== Recent Posts Grid (3 columns) ===== */
.home .posts {
  grid-template-columns: repeat(3, 1fr) !important;
}

section.home .grid.posts {
  grid-template-columns: repeat(3, 1fr) !important;
}

@media (max-width: 980px) {
  .home .posts,
  section.home .grid.posts {
    grid-template-columns: repeat(2, 1fr) !important;
  }
}

@media (max-width: 640px) {
  .home .posts,
  section.home .grid.posts {
    grid-template-columns: 1fr !important;
  }
}

/* ===== Lead Text ===== */
.lead-dark {
  font-size: 1.06rem;
  color: var(--muted);
  line-height: 1.7;
}

/* ===== Home Card Images ===== */
.home .imgwrap {
  aspect-ratio: 3/2;
}

/* ===== Neighborhoods Grid (2 columns) ===== */
.home .neighborhoods,
section.home .grid.neighborhoods {
  grid-template-columns: repeat(2, 1fr) !important;
}

@media (max-width: 640px) {
  .home .neighborhoods,
  section.home .grid.neighborhoods {
    grid-template-columns: 1fr !important;
  }
}

/* ===== Calendar Band ===== */
.home .cal-band {
  position: relative;
  border-radius: 22px;
  overflow: hidden;
  border: 1px solid rgba(255,255,255,.12);
  min-height: 508px;
}

.home .cal-band .bg {
  position: absolute;
  inset: 0;
  background: linear-gradient(120deg,rgba(11,26,43,.92),rgba(11,26,43,.82)), url('https://i.postimg.cc/Ghv37k0W/sunset-poets-knoll.png') center/cover no-repeat;
}

.home .cal-band .content {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  gap: 28px;
  padding: 28px;
  align-items: stretch;
}

.home .cal-band .content > div:first-child {
  text-align: left;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  align-items: flex-start;
}

.home .cal-band .content > aside {
  display: flex;
  align-items: stretch;
}

.home .cal-band h3 {
  color: #fff;
  margin: 0 0 6px;
  text-align: left;
}

.home .cal-band ul {
  list-style: none;
  padding: 0;
  margin: 0;
  text-align: left;
  width: 100%;
}

.home .cal-band li {
  margin-bottom: 8px;
  text-align: left;
}

.home .cal-band p,
.home .cal-band li,
.home .cal-band time {
  color: #e8f0ff;
  text-align: left;
}

.home .cal-band .btn--light {
  margin-top: 10px;
}

.home .mini-cal {
  background: rgba(255,255,255,.08);
  border: 1px solid rgba(255,255,255,.18);
  border-radius: 16px;
  padding: 12px;
  color: #fff;
  width: 100%;
  height: 100%;
  box-sizing: border-box;
  display: flex;
  flex-direction: column;
}

.home .mini-cal .hdr {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 8px;
}

.home .mini-cal .grid {
  --g: 7;
  display: grid;
  grid-template-columns: repeat(var(--g),1fr);
  gap: 6px;
  flex: 1;
  align-content: start;
}

.home .mini-cal .cell {
  aspect-ratio: 1/1;
  border: 1px solid rgba(255,255,255,.16);
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: .9rem;
}

.home .mini-cal .pill {
  background: #fff;
  color: #0b1d32;
  border-radius: 999px;
  padding: 2px 6px;
  font-weight: 700;
  font-size: .75rem;
}

/* Tablet and Mobile: Hide mini calendar, center event list */
@media (max-width: 1024px) {
  /* Change to single column layout */
  .home .cal-band .content {
    grid-template-columns: 1fr;
    justify-items: center;
  }
  
  /* Hide mini calendar completely on tablet and mobile */
  .home .mini-cal {
    display: none !important;
  }
  
  /* Center and limit width of event list for better readability */
  .home .cal-band .content > div:first-child {
    max-width: 600px;
    width: 100%;
  }
}

/* Mobile-specific optimizations */
@media (max-width: 640px) {
  /* Remove min-height on mobile for better space usage */
  .home .cal-band {
    min-height: auto;
  }
  
  /* Reduce padding on smaller screens */
  .home .cal-band .content {
    padding: 20px;
  }
}

/* ===== Testimonials (Exact from HTML) ===== */
#testimonials.section {
  padding: 64px 0 48px;
  overflow: visible;
}

.home .twrap {
  position: relative;
  overflow: visible;
}

.home .tcarousel {
  position: relative;
  max-width: 980px;
  margin: 40px auto 0;
  padding: 0 120px 96px;
  overflow: visible;
}

.home .tstage,
.home .twindow,
.home .ttrack {
  position: relative;
  overflow: visible;
}

.home .tslide {
  position: absolute;
  inset: 0;
  display: flex;
  justify-content: center;
  align-items: flex-start;
  opacity: 0;
  pointer-events: none;
  transition: opacity .35s ease;
}

.home .tslide.is-active {
  opacity: 1;
  pointer-events: auto;
}

.home .tcard {
  background: #fff;
  border: 1px solid #e9edf4;
  border-radius: 18px;
  box-shadow: 0 10px 22px rgba(17,24,39,.10);
  padding: 26px 28px 22px;
  max-width: 740px;
  width: 100%;
  position: relative;
}

.home .tcard::after {
  content: "";
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  bottom: -34px;
  width: 86%;
  height: 64px;
  border-radius: 50%;
  background: radial-gradient(ellipse at center,rgba(17,24,39,.20) 0%,rgba(17,24,39,.12) 40%,rgba(17,24,39,0) 70%);
  filter: blur(11px);
  z-index: -1;
  pointer-events: none;
}

.home .quote {
  font: 400 20px/1.55 ui-sans-serif,system-ui;
  color: var(--ink);
  margin: 6px 0 8px;
}

.home .who {
  color: var(--muted);
  font-size: 1rem;
}

/* Testimonial Navigation Buttons */
.home .tbtn {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  display: grid;
  place-items: center;
  width: 84px;
  height: 84px;
  border-radius: 999px;
  background: transparent;
  border: none;
  color: var(--ink);
  cursor: pointer;
  transition: transform .18s ease, color .18s ease, opacity .18s ease;
  z-index: 3;
}

.home .tbtn svg {
  width: 34px;
  height: 34px;
}

.home .tbtn:hover {
  transform: translateY(-50%) scale(1.18);
  color: #08172b;
}

.home .tbtn[disabled] {
  opacity: .35;
  cursor: not-allowed;
  transform: translateY(-50%);
}

#tprev {
  left: -100px;
}

#tnext {
  right: -100px;
}

@media (max-width: 640px) {
  #testimonials.section {
    padding: 48px 0;
  }
  
  .home .tcarousel {
    padding: 0 20px 90px;
  }

  .home .tcard {
    padding: 22px 20px;
    max-width: calc(100% - 80px) !important;
    margin: 0 auto;
  }

  .home .quote {
    font: 400 18px/1.55 ui-sans-serif,system-ui;
  }

  /* Show arrows on mobile portrait - smaller size */
  .home .tbtn {
    width: 50px !important;
    height: 50px !important;
    background: rgba(255, 255, 255, 0.95) !important;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15) !important;
  }

  .home .tbtn svg {
    width: 24px !important;
    height: 24px !important;
  }

  #tprev {
    left: -35px !important;
  }

  #tnext {
    right: -35px !important;
  }
  
  .home .tdot {
    width: 9px;
    height: 9px;
  }
}

/* ========================================
   TESTIMONIALS: LANDSCAPE ORIENTATION FIX
   ======================================== */

/* Mobile landscape: Better arrow positioning and smaller text box */
@media (max-height: 500px) and (orientation: landscape) {
  #testimonials.section {
    padding: 40px 0 32px !important;
  }
  
  .home .tcarousel {
    max-width: 700px !important;
    padding: 0 100px 60px !important;
    margin: 24px auto 0 !important;
  }
  
  .home .tcard {
    max-width: 700px !important;
    padding: 20px 24px 18px !important;
  }
  
  .home .quote {
    font-size: 16px !important;
    line-height: 1.5 !important;
    margin: 4px 0 6px !important;
  }
  
  .home .who {
    font-size: 0.9rem !important;
  }
  
  /* Arrow buttons: More horizontal spacing */
  .home .tbtn {
    width: 60px !important;
    height: 60px !important;
  }
  
  .home .tbtn svg {
    width: 28px !important;
    height: 28px !important;
  }
  
  #tprev {
    left: -80px !important;
  }
  
  #tnext {
    right: -80px !important;
  }
  
  .home .tdots {
    margin-top: 12px !important;
  }
}

/* Tablet landscape: Moderate adjustments */
@media (max-height: 700px) and (min-width: 768px) and (orientation: landscape) {
  #testimonials.section {
    padding: 48px 0 40px !important;
  }
  
  .home .tcarousel {
    max-width: 800px !important;
    padding: 0 80px 80px !important;
  }
  
  .home .tcard {
    max-width: 800px !important;
    padding: 24px 26px 20px !important;
  }
  
  .home .quote {
    font-size: 18px !important;
    line-height: 1.5 !important;
  }
  
  #tprev {
    left: -70px !important;
  }
  
  #tnext {
    right: -70px !important;
  }
}

/* Testimonial Dots */
.home .tdots {
  display: flex;
  gap: 8px;
  justify-content: center;
  margin-top: 18px;
  position: relative;
  z-index: 1;
}

.home .tdot {
  width: 10px;
  height: 10px;
  aspect-ratio: 1/1;
  border-radius: 50%;
  background: #c8d2e0;
  border: 0;
  padding: 0;
  line-height: 0;
  display: inline-block;
  appearance: none;
  -webkit-appearance: none;
  cursor: pointer;
}

.home .tdot.is-active {
  background: var(--ink);
}

/* ===== Sellers Section ===== */
.home .sellers,
section.home .grid.sellers {
  grid-template-columns: repeat(3, 1fr) !important;
}

@media (max-width: 980px) {
  .home .sellers,
  section.home .grid.sellers {
    grid-template-columns: repeat(2, 1fr) !important;
  }
}

@media (max-width: 640px) {
  .home .sellers,
  section.home .grid.sellers {
    grid-template-columns: 1fr !important;
  }
}

/* ===== About Section ===== */
.home .about {
  display: grid;
  grid-template-columns: 420px 1fr;
  gap: 72px;
  align-items: center;
}

.home .about .portrait {
  width: 100%;
  aspect-ratio: 3/4;
  border-radius: 16px;
  overflow: hidden;
  background: #f2f4f7;
}

.home #about h2 {
  margin-bottom: 18px;
}

/* Consistent paragraph formatting */
.home #about p {
  margin: 0 0 20px;
  line-height: 1.75;
}

/* Ensure consistent text formatting on mobile */
@media (max-width: 640px) {
  .home #about p {
    margin: 0 0 16px;
    line-height: 1.75;
  }
}

.home #about p.intro {
  margin: 0 0 20px;
  line-height: 1.75;
}

.home #about ul {
  margin: 14px 0 8px 18px;
  line-height: 1.75;
}

.home #about ul li {
  margin: 0 0 6px;
}

.home .btn-row {
  margin-top: 26px;
  display: flex;
  flex-wrap: wrap;
  gap: 22px;
}

@media (max-width: 1200px) {
  .home .about {
    gap: 56px;
  }
}

@media (max-width: 1024px) {
  .home .about {
    grid-template-columns: 360px 1fr;
    gap: 36px;
  }
}

@media (max-width: 900px) {
  .home .about {
    grid-template-columns: 1fr;
  }
  
  .home .about .portrait {
    max-width: 520px;
    margin-inline: auto;
  }
}