/*
 * Hamilton Green — Landing Page Styles
 * Palette: dark forest (#404E3B), light gray (#E6E6E6), muted teal (#6C8480),
 *           pale sage (#BAC8B1), muted sage (#7B9669)
 */

/* ===== Hero Section ===== */
.hg-hero {
  position: relative;
  min-height: 90vh;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  background-color: #404E3B;
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  overflow: hidden;
}

.hg-hero__overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    180deg,
    rgba(64, 78, 59, 0.85) 0%,
    rgba(64, 78, 59, 0.72) 50%,
    rgba(64, 78, 59, 0.90) 100%
  );
  z-index: 1;
}

.hg-hero__content {
  position: relative;
  z-index: 2;
  padding: 2rem;
  max-width: 800px;
}

.hg-hero__title {
  font-family: 'Cal Sans', 'Inter', system-ui, sans-serif;
  font-size: clamp(2.5rem, 6vw, 4.5rem);
  font-weight: 700;
  color: #ffffff;
  line-height: 1.1;
  margin-bottom: 1rem;
  letter-spacing: -0.02em;
  text-shadow: 0 2px 12px rgba(0,0,0,0.3);
}

.hg-hero__subtitle {
  font-size: clamp(1rem, 2vw, 1.3rem);
  color: #BAC8B1;
  margin-bottom: 2.5rem;
  line-height: 1.6;
  font-weight: 300;
  text-shadow: 0 1px 4px rgba(0,0,0,0.2);
}

.hg-hero__actions {
  display: flex;
  gap: 1rem;
  justify-content: center;
  flex-wrap: wrap;
}

/* ===== Buttons ===== */
.hg-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.85rem 2rem;
  border-radius: 8px;
  font-weight: 600;
  font-size: 1rem;
  text-decoration: none;
  transition: all 0.2s ease;
  border: 2px solid transparent;
  cursor: pointer;
}

.hg-btn--primary {
  background: #404E3B;
  color: #fff;
  border-color: #404E3B;
}

.hg-btn--primary:hover {
  background: #56654F;
  border-color: #56654F;
  color: #fff;
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(64, 78, 59, 0.3);
}

.hg-btn--outline {
  background: transparent;
  color: #fff;
  border-color: rgba(255,255,255,0.55);
}

.hg-btn--outline:hover {
  background: rgba(255,255,255,0.1);
  border-color: rgba(255,255,255,0.85);
  color: #fff;
}

.hg-btn--block {
  display: flex;
  width: 100%;
  justify-content: center;
}

/* ===== Sections ===== */
.hg-section {
  padding: 5rem 0;
}

.hg-section--alt {
  background: #E6E6E6;
}

.hg-section__title {
  text-align: center;
  font-size: clamp(1.75rem, 3vw, 2.5rem);
  font-weight: 700;
  margin-bottom: 0.75rem;
  color: #404E3B;
}

.hg-section__subtitle {
  text-align: center;
  font-size: 1.1rem;
  color: #5a5d5f;
  margin-bottom: 2.5rem;
  max-width: 600px;
  margin-left: auto;
  margin-right: auto;
}

/* ===== Horizontal Scroll Widget ===== */
.hg-scroll {
  display: flex;
  gap: 1.5rem;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  -webkit-overflow-scrolling: touch;
  padding-bottom: 0.5rem;
  scrollbar-width: thin;
  scrollbar-color: #BAC8B1 transparent;
}

.hg-scroll::-webkit-scrollbar {
  height: 6px;
}

.hg-scroll::-webkit-scrollbar-track {
  background: transparent;
}

.hg-scroll::-webkit-scrollbar-thumb {
  background: #BAC8B1;
  border-radius: 3px;
}

.hg-scroll::-webkit-scrollbar-thumb:hover {
  background: #6C8480;
}

.hg-scroll-all {
  text-align: center;
  margin-top: 2rem;
}

/* ===== Listing Cards (in scroll) ===== */
.hg-card {
  flex: 0 0 360px;
  scroll-snap-align: start;
  background: #fff;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 2px 8px rgba(0,0,0,0.05), 0 1px 2px rgba(0,0,0,0.04);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  border: 1px solid #BAC8B1;
}

.hg-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 24px rgba(0,0,0,0.08), 0 2px 8px rgba(0,0,0,0.04);
}

.hg-card__image {
  position: relative;
  aspect-ratio: 16/10;
  overflow: hidden;
  background: #E6E6E6;
}

.hg-card__image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.3s ease;
}

.hg-card:hover .hg-card__image img {
  transform: scale(1.03);
}

.hg-card__price {
  position: absolute;
  top: 1rem;
  right: 1rem;
  background: #404E3B;
  color: #fff;
  padding: 0.4rem 0.9rem;
  border-radius: 6px;
  font-weight: 700;
  font-size: 1.1rem;
  box-shadow: 0 2px 8px rgba(0,0,0,0.2);
}

.hg-card__body {
  padding: 1.5rem;
}

.hg-card__title {
  font-size: 1.1rem;
  font-weight: 700;
  margin-bottom: 0.5rem;
  color: #404E3B;
  line-height: 1.4;
}

.hg-card__address {
  font-size: 0.9rem;
  color: #5a5d5f;
  margin-bottom: 1rem;
  display: flex;
  align-items: flex-start;
  gap: 0.4rem;
  line-height: 1.4;
}

.hg-card__address i {
  margin-top: 0.2rem;
  flex-shrink: 0;
  color: #6C8480;
}

.hg-card__details {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
  margin-bottom: 1rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid #BAC8B1;
}

.hg-detail {
  font-size: 0.85rem;
  color: #5a5d5f;
  display: flex;
  align-items: center;
  gap: 0.35rem;
}

.hg-detail i {
  font-size: 0.8rem;
  color: #6C8480;
}

.hg-detail--available {
  color: #404E3B;
  font-weight: 600;
}

.hg-card__desc {
  font-size: 0.9rem;
  color: #5a5d5f;
  line-height: 1.6;
  margin-bottom: 1.25rem;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* ===== Features Grid — 2×2 ===== */
.hg-features--2x2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2rem;
  margin-top: 2rem;
  max-width: 900px;
  margin-left: auto;
  margin-right: auto;
}

.hg-feature {
  text-align: center;
  padding: 2.5rem 2rem;
  border-radius: 12px;
  background: #fff;
  border: 1px solid #BAC8B1;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.hg-feature:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 16px rgba(64, 78, 59, 0.06);
}

.hg-feature i {
  font-size: 2rem;
  color: #6C8480;
  margin-bottom: 1rem;
  display: inline-block;
}

.hg-feature h3 {
  font-size: 1.1rem;
  font-weight: 700;
  margin-bottom: 0.5rem;
  color: #404E3B;
}

.hg-feature p {
  font-size: 0.9rem;
  color: #5a5d5f;
  line-height: 1.6;
}

/* ===== CTA Section ===== */
.hg-cta {
  text-align: center;
  background: #E6E6E6;
}

/* ===== Map ===== */
.hg-map-wrapper {
  margin: 0 auto;
  max-width: 900px;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 2px 12px rgba(0,0,0,0.06);
  border: 1px solid #BAC8B1;
}

.hg-map {
  width: 100%;
  height: 400px;
  background: #E6E6E6;
}

.hg-map__note {
  text-align: center;
  margin-top: 0.75rem;
  font-size: 0.85rem;
  color: #5a5d5f;
}

.hg-map__note i {
  color: #6C8480;
  margin-right: 0.35rem;
}

/* Map marker — custom Leaflet divIcon */
.hg-map-marker {
  background: none !important;
  border: none !important;
  text-align: center;
}

.hg-map-marker__pin {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border-radius: 50% 50% 50% 0;
  background: #404E3B;
  color: #fff;
  font-size: 0.8rem;
  transform: rotate(-45deg);
  box-shadow: 0 2px 6px rgba(0,0,0,0.25);
}

.hg-map-marker__pin i {
  transform: rotate(45deg);
}

.hg-map-marker--moody .hg-map-marker__pin {
  background: #6C8480;
}

.hg-map-marker__label {
  font-size: 0.75rem;
  font-weight: 700;
  color: #404E3B;
  background: rgba(255,255,255,0.9);
  padding: 0.15rem 0.5rem;
  border-radius: 4px;
  margin-top: 0.15rem;
  white-space: nowrap;
  display: inline-block;
  border: 1px solid #BAC8B1;
}

/* ===== Equal Housing Opportunity ===== */
.hg-eho {
  background: #fff;
  padding: 3rem 0;
  border-top: 1px solid #E6E6E6;
}

.hg-eho__content {
  display: flex;
  align-items: flex-start;
  gap: 1.25rem;
  max-width: 760px;
  margin: 0 auto;
}

.hg-eho__logo {
  flex-shrink: 0;
  margin-top: 0.15rem;
}

.hg-eho__text {
  font-size: 0.8rem;
  color: #5a5d5f;
  line-height: 1.6;
}

.hg-eho__text p {
  margin: 0 0 0.5rem;
}

.hg-eho__text p:last-child {
  margin-bottom: 0;
}

.hg-eho__text strong {
  color: #404E3B;
}

/* ===== Empty State ===== */
.hg-empty {
  text-align: center;
  padding: 3rem;
  background: #fff;
  border-radius: 12px;
  border: 1px solid #BAC8B1;
  color: #5a5d5f;
}

/* ===== Responsive Tweaks ===== */
@media (max-width: 768px) {
  .hg-hero {
    min-height: 70vh;
  }

  .hg-hero__actions {
    flex-direction: column;
    align-items: center;
  }

  .hg-section {
    padding: 3rem 0;
  }

  /* Mobile: one card per viewport, paginated snap */
  .hg-scroll {
    scroll-snap-type: x mandatory;
    gap: 1rem;
    padding: 0 calc((100vw - 340px) / 2);
    scroll-padding: 0 calc((100vw - 340px) / 2);
  }

  .hg-card {
    flex: 0 0 85vw;
    max-width: 400px;
    scroll-snap-align: center;
  }

  .hg-features--2x2 {
    grid-template-columns: 1fr;
    max-width: 400px;
    margin-left: auto;
    margin-right: auto;
  }
}
