/* GenieHome v19.1 — targeted UI stabilization patch. */

/* ---------- Shared colour fixes on dark / gradient sections ---------- */
.ghb-hero,
.ghb-final-cta,
.gh-contact-cta,
[class*="hero"][style*="gradient"] {
  color: #fff;
}
.ghb-hero h1,.ghb-hero h2,.ghb-hero h3,.ghb-hero h4,
.ghb-final-cta h1,.ghb-final-cta h2,.ghb-final-cta h3,
.ghb-hero a:not(.ghb-search button),.ghb-final-cta a:not(.ghb-button) {
  color: #fff !important;
}
.ghb-hero p,.ghb-final-cta p { color: rgba(255,255,255,.84) !important; }

/* ---------- Home services: image and copy must never overlap ---------- */
.gh-services .gh-service-card {
  position: relative !important;
  display: flex !important;
  flex-direction: column !important;
  min-width: 0;
  overflow: hidden !important;
  background: #fff !important;
  border: 1px solid #e2e8f0 !important;
  border-radius: 18px !important;
  box-shadow: 0 12px 32px rgba(15,23,42,.08) !important;
}
.gh-services .gh-service-card::before,
.gh-services .gh-service-card::after { display:none !important; content:none !important; }
.gh-services .gh-service-card > img {
  position: static !important;
  inset: auto !important;
  z-index: auto !important;
  width: 100% !important;
  height: auto !important;
  aspect-ratio: 4 / 3 !important;
  object-fit: cover !important;
  opacity: 1 !important;
  filter: none !important;
  transform: none;
}
.gh-services .gh-service-card > div {
  position: static !important;
  inset: auto !important;
  z-index: auto !important;
  display: block !important;
  min-height: 112px;
  padding: 18px 18px 20px !important;
  background: #fff !important;
  color: #0f172a !important;
  transform: none !important;
}
.gh-services .gh-service-card h3 {
  display: block !important;
  margin: 0 0 7px !important;
  color: #0f172a !important;
  font-size: 17px !important;
  line-height: 1.35 !important;
  font-weight: 900 !important;
}
.gh-services .gh-service-card p {
  display: block !important;
  margin: 0 !important;
  color: #64748b !important;
  font-size: 13px !important;
  line-height: 1.55 !important;
}
.gh-services .gh-service-card:hover > img { transform: scale(1.025) !important; transition: transform .25s ease; }

/* Services archive cards: keep text readable above imagery. */
.ghs-service-card { overflow: hidden; }
.ghs-service-card .ghs-service-content,
.ghs-service-card [class*="content"] { position: relative; z-index: 3; }
.ghs-service-card h2,.ghs-service-card h3,.ghs-service-card p { text-shadow: none; }

/* ---------- Blog typography ---------- */
.ghb-hero { padding-top: 68px !important; padding-bottom: 68px !important; }
.ghb-hero .ghb-hero-content h3 {
  max-width: 760px;
  margin: 0;
  color: #fff !important;
  font-size: clamp(30px, 3.5vw, 46px) !important;
  line-height: 1.16 !important;
  letter-spacing: -.025em;
}
.ghb-hero-content > p { font-size: 16px !important; line-height: 1.7 !important; }
.ghb-section-heading h2,.ghb-section-heading h3 { font-size: clamp(25px, 3vw, 36px) !important; line-height: 1.22 !important; }
.ghb-featured-content h2,.ghb-featured-content h3 { font-size: clamp(23px, 2.4vw, 32px) !important; line-height: 1.28 !important; }
.ghb-card h2,.ghb-card h3,.ghb-post-card h2,.ghb-post-card h3 { font-size: 19px !important; line-height: 1.4 !important; }
.ghb-page p { font-size: 15px; }

/* ---------- Edit Property existing gallery ---------- */
.gb-upload { height:auto !important; min-height:220px; align-items:stretch !important; }
.gb-existing-gallery {
  position: relative !important;
  inset: auto !important;
  z-index: 2;
  width: 100% !important;
  display: grid !important;
  grid-template-columns: repeat(5, minmax(0, 1fr)) !important;
  gap: 12px !important;
  margin: 0 0 18px !important;
  padding: 0 !important;
  transform: none !important;
}
.gb-existing-item {
  position: relative !important;
  inset: auto !important;
  width: 100% !important;
  height: auto !important;
  min-height: 0 !important;
  aspect-ratio: 4 / 3 !important;
  margin: 0 !important;
  float: none !important;
  transform: none !important;
  border: 2px solid transparent !important;
  border-radius: 14px !important;
  overflow: hidden !important;
  background: #e2e8f0 !important;
  box-shadow: 0 5px 14px rgba(15,23,42,.10);
}
.gb-existing-item img {
  position: static !important;
  width: 100% !important;
  height: 100% !important;
  display: block !important;
  object-fit: cover !important;
  transform: none !important;
}
.gb-existing-item.main { border-color:#2563eb !important; }
.gb-existing-item.main::after { z-index:3; }
.gb-remove-existing { z-index:4; display:grid !important; place-items:center; padding:0 !important; }

/* ---------- Favorites: same reusable cards as Home / Archive ---------- */
.gh-fav-grid.gh-property-grid {
  display: grid !important;
  grid-template-columns: repeat(3,minmax(0,1fr)) !important;
  gap: 20px !important;
  align-items: stretch;
}
.gh-fav-grid .ghp-card { height:100%; background:#fff; }
.gh-account-panel .ghp-title { color:#173b7a; }
.gh-account-panel .ghp-footer { margin-top:auto; }
.gh-account-panel .ghp-body { min-height:190px; display:flex; flex-direction:column; }

@media (max-width: 1180px) {
  .gh-fav-grid.gh-property-grid { grid-template-columns: repeat(2,minmax(0,1fr)) !important; }
  .gb-existing-gallery { grid-template-columns: repeat(4,minmax(0,1fr)) !important; }
}
@media (max-width: 760px) {
  .gh-fav-grid.gh-property-grid { grid-template-columns: 1fr !important; }
  .gb-existing-gallery { grid-template-columns: repeat(2,minmax(0,1fr)) !important; }
  .ghb-hero { padding:48px 0 !important; }
  .ghb-hero .ghb-hero-content h3 { font-size:28px !important; }
}
