/* ===== RYAN HORVATH REALTOR - CUSTOM STYLING ===== */
/* Google Fonts Import */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800&family=DM+Serif+Display:ital@0;1&display=swap');

/* ===== GLOBAL BODY & BACKGROUND ===== */
body {
  font-family: 'Inter', -apple-system, sans-serif !important;
  background-color: #FFFAE2 !important;
  color: #2c2c2c !important;
}

/* ===== HEADINGS ===== */
h1, h2, h3, h4, h5, h6,
.elementor-heading-title,
.elementor-widget-heading .elementor-heading-title {
  font-family: 'DM Serif Display', serif !important;
  font-weight: 400 !important;
  color: #1a1a1a !important;
}

/* ===== HEADER / NAV ===== */
.header-wrapper,
#header,
.houzez-header-wrap,
header.header,
.header-section {
  background-color: #FFFAE2 !important;
  border-bottom: 1px solid rgba(58,107,74,0.08) !important;
}

.header-wrapper a,
.houzez-header-nav a,
.main-nav a,
header .nav a {
  color: #6b6b6b !important;
  font-family: 'Inter', sans-serif !important;
  font-size: 0.85rem !important;
  font-weight: 500 !important;
}
.header-wrapper a:hover,
.houzez-header-nav a:hover,
.main-nav a:hover,
header .nav a:hover {
  color: #3A6B4A !important;
}

/* ===== HERO SECTION ===== */
.elementor-element[data-element_type="container"]:first-child,
.hero-section {
  background-color: #FFFAE2 !important;
}

/* ===== BUTTONS ===== */
.elementor-button,
.btn-primary,
.houzez-btn,
a.btn,
button.btn,
.elementor-widget-button .elementor-button {
  background-color: #3A6B4A !important;
  color: #FFFAE2 !important;
  font-family: 'Inter', sans-serif !important;
  font-weight: 600 !important;
  border-radius: 6px !important;
  border: none !important;
  letter-spacing: 0.04em !important;
  transition: all 0.35s cubic-bezier(0.25, 0.46, 0.45, 0.94) !important;
}
.elementor-button:hover,
.btn-primary:hover,
.houzez-btn:hover,
a.btn:hover,
button.btn:hover,
.elementor-widget-button .elementor-button:hover {
  background-color: #2C5239 !important;
  color: #FFFAE2 !important;
  transform: translateY(-1px);
  box-shadow: 0 4px 20px rgba(58,107,74,0.25) !important;
}

/* ===== SECTION BACKGROUNDS ===== */
.elementor-section,
.elementor-top-section,
.elementor-479 > .e-con {
  background-color: #FFFAE2;
}

/* Green accent sections */
.elementor-section[data-settings*="background_background"],
.dark-section {
  background-color: #1E3A28 !important;
}

/* ===== LINKS ===== */
a {
  color: #3A6B4A;
  transition: all 0.35s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}
a:hover {
  color: #2C5239;
}

/* ===== BODY TEXT ===== */
p, .elementor-widget-text-editor,
.elementor-text-editor p {
  font-family: 'Inter', -apple-system, sans-serif !important;
  color: #6b6b6b !important;
  line-height: 1.75 !important;
}

/* ===== FEATURED PROPERTIES / LISTINGS ===== */
.property-card,
.item-listing-wrap,
.houzez-property-card {
  background: #FFFCEF !important;
  border-radius: 12px !important;
  border: 1px solid rgba(0,0,0,0.04) !important;
  transition: all 0.35s cubic-bezier(0.25, 0.46, 0.45, 0.94) !important;
}
.property-card:hover,
.item-listing-wrap:hover,
.houzez-property-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 40px rgba(0,0,0,0.08) !important;
}

.item-price,
.listing-price,
.property-price {
  font-family: 'DM Serif Display', serif !important;
  color: #1a1a1a !important;
}

/* ===== FOOTER ===== */
footer,
.footer-wrapper,
.footer-section,
#footer,
.site-footer {
  background-color: #1E3A28 !important;
  color: rgba(255,255,255,0.7) !important;
}
footer a,
.footer-wrapper a,
.site-footer a {
  color: rgba(255,255,255,0.7) !important;
}
footer a:hover,
.footer-wrapper a:hover,
.site-footer a:hover {
  color: #FFFAE2 !important;
}
footer h1, footer h2, footer h3, footer h4, footer h5, footer h6,
.footer-wrapper h1, .footer-wrapper h2, .footer-wrapper h3,
.footer-wrapper h4, .footer-wrapper h5, .footer-wrapper h6 {
  color: #FFFAE2 !important;
  font-family: 'DM Serif Display', serif !important;
}

/* ===== TESTIMONIALS ===== */
.testimonial-text,
blockquote {
  font-family: 'DM Serif Display', serif !important;
  font-style: italic !important;
  color: #2C5239 !important;
}

/* ===== CTA SECTION ===== */
.cta-section,
.elementor-section.cta {
  background-color: #3A6B4A !important;
}

/* ===== REMOVE PINK/OLD ACCENT COLORS ===== */
.elementor-section[style*="FFD6D6"],
.elementor-section[style*="ffd6d6"],
[style*="background-color: #FFD6D6"],
[style*="background-color: #ffd6d6"],
[style*="background: #FFD6D6"],
[style*="background: #ffd6d6"],
[style*="background-color: rgb(255, 214, 214)"] {
  background-color: #FFFAE2 !important;
}

/* ===== MISC CLEANUP ===== */
.elementor-icon {
  color: #3A6B4A !important;
}
.elementor-icon-box-icon {
  color: #3A6B4A !important;
}
.elementor-counter-number-wrapper {
  font-family: 'DM Serif Display', serif !important;
  color: #3A6B4A !important;
}
.section-label,
.elementor-widget-text-editor .section-label {
  color: #3A6B4A !important;
  font-family: 'Inter', sans-serif !important;
  font-weight: 600 !important;
  letter-spacing: 0.25em !important;
  text-transform: uppercase !important;
  font-size: 0.68rem !important;
}

/* ===== HIDE PAGE TITLE ON HOMEPAGE ===== */
.page-title-wrap,
.page-title-section,
body.home .page-title-wrap,
body.page .page-title-wrap,
h1.page-title,
.entry-title.page-title {
  display: none !important;
}

/* ===== HEADER LOGO BAR FIX ===== */
.header-media-wrap,
.logo-header,
.header-top-bar,
.houzez-header-one,
.header-top {
  background-color: #FFFAE2 !important;
}
.logo-header img,
.header-media-wrap img {
  max-height: 50px !important;
}

/* ===== CTA SECTION ===== */

/* ===== FOOTER FORCE DARK GREEN ===== */
footer,
.footer-wrapper,
.footer-section,
#footer,
.site-footer,
.footer-inner,
.footer-top-area,
.footer-bottom-area,
.footer-bottom,
.footer-top,
#footer-bottom,
footer.footer,
.footer-widget-area {
  background-color: #1E3A28 !important;
  color: rgba(255,255,255,0.7) !important;
}
footer *,
.footer-wrapper *,
#footer *,
.site-footer * {
  color: rgba(255,255,255,0.7) !important;
}
footer h1, footer h2, footer h3, footer h4, footer h5, footer h6,
#footer h1, #footer h2, #footer h3, #footer h4, #footer h5, #footer h6 {
  color: #FFFAE2 !important;
}
footer a:hover, #footer a:hover {
  color: #FFFAE2 !important;
}

/* ===== NEWSLETTER/SUBSCRIBE BAR ===== */
.footer-newsletter,
.newsletter-section {
  background-color: #2C5239 !important;
}

/* ===== FOOTER CONTAINERS DARK GREEN ===== */
footer.elementor .e-con,
footer.elementor .e-con.e-parent,
footer.elementor .e-con.e-child,
.elementor-location-footer .e-con,
.elementor-location-footer .e-con.e-parent,
.elementor-location-footer .e-con.e-child,
.elementor-445 .e-con {
  background-color: #1E3A28 !important;
}

/* Footer subscribe/newsletter bar */
.elementor-location-footer .elementor-element-66e8cecb {
  background-color: #2C5239 !important;
}

/* Header wrapper */
.houzez-header-wrap,
.header-default,
.houzez-header-one .logo-header {
  background-color: #FFFAE2 !important;
}

/* ===== CTA SECTION - Green Background via Pseudo-Element ===== */
.elementor-element[data-id="1d9db1c2"] {
  position: relative !important;
  overflow: hidden !important;
}
.elementor-element[data-id="1d9db1c2"]::before {
  content: '' !important;
  position: absolute !important;
  top: 0 !important;
  left: 0 !important;
  right: 0 !important;
  bottom: 0 !important;
  background-color: #3A6B4A !important;
  z-index: 0 !important;
}
.elementor-element[data-id="1d9db1c2"] > .e-con-inner,
.elementor-element[data-id="1d9db1c2"] > * {
  position: relative !important;
  z-index: 1 !important;
}
.elementor-element[data-id="1d9db1c2"] .elementor-heading-title,
.elementor-element[data-id="1d9db1c2"] .elementor-widget-text-editor,
.elementor-element[data-id="1d9db1c2"] .elementor-widget-text-editor p,
.elementor-element[data-id="1d9db1c2"] p,
.elementor-element[data-id="1d9db1c2"] span,
.elementor-element[data-id="1d9db1c2"] h1,
.elementor-element[data-id="1d9db1c2"] h2,
.elementor-element[data-id="1d9db1c2"] h3 {
  color: #FFFAE2 !important;
}
.elementor-element[data-id="1d9db1c2"] .elementor-button {
  background-color: #FFFAE2 !important;
  color: #3A6B4A !important;
}


/* ===== HIDE SHOWCASE IDX ICON BARS SITE-WIDE ===== */
.sidx-actions, .sidx-reaction-action, .sidx-reactions { display: none !important; }

/* ===== UNIFORM THUMBNAIL HEIGHTS ===== */
.sidx-widget .sidx-thumbnail,
.sidx-hotsheet .sidx-thumbnail,
.sidx-container .sidx-thumbnail { height: 190px !important; overflow: hidden !important; position: relative !important; }
.sidx-widget .sidx-thumbnail img,
.sidx-hotsheet .sidx-thumbnail img,
.sidx-container .sidx-thumbnail img { width: 100% !important; height: 190px !important; object-fit: cover !important; }


/* Hide Showcase IDX Searches/Save Search buttons */
.sidx-header-link-searches,
.sidx-save-search-pill { display: none !important; }

/* Fix Showcase IDX Open House box sizing on listing detail */
.sidx-open-houses {
  padding: 16px 20px !important;
  border-radius: 8px !important;
}
.sidx-open-houses .sidx-title {
  font-size: 18px !important;
  font-weight: 700 !important;
  margin-bottom: 6px !important;
}
.sidx-open-houses .sidx-open-house-date {
  font-size: 14px !important;
  color: rgba(255, 255, 255, 0.85) !important;
}

/* Fix town guide Let's Talk button hover - don't turn white */
.rh-town-page .rh-cta-btn:hover {
  background: #2c5239 !important;
  color: #fffae2 !important;
}

/* HIDE_BLOG_TOWNGUIDE_V1 — hide Blog & Town Guide from all nav and footer areas */
.nav-links a[href*="/blog"], .nav-links a[href*="/town-guide"],
.sw-mobile-panel a[href*="/blog"], .sw-mobile-panel a[href*="/town-guide"],
.rh-mobile-menu a[href*="/blog"], .rh-mobile-menu a[href*="/town-guide"],
.rh-footer-links li:has(a[href*="/blog"]), .rh-footer-links li:has(a[href*="/town-guide"]),
.hv-unifoot-links li:has(a[href*="/blog"]), .hv-unifoot-links li:has(a[href*="/town-guide"]) {
  display: none !important;
}

/* SW_MOBILE_PALETTE_V1 — fix site-wide mobile hamburger to use approved palette */
.sw-mobile-panel {
  background: #FFFAE2 !important;
}
.sw-mobile-panel a {
  color: #2C5239 !important;
  font-family: 'Inter', -apple-system, sans-serif !important;
  border-bottom: 1px solid #F0E8C8 !important;
}
.sw-mobile-panel a:hover {
  color: #1E3A28 !important;
}
.sw-mobile-panel a.sw-cta {
  background: #2C5239 !important;
  color: #FFFAE2 !important;
  border: none !important;
  border-radius: 6px !important;
  font-weight: 600 !important;
}
.sw-mobile-panel a.sw-cta:hover {
  background: #1E3A28 !important;
}
.sw-mobile-close {
  color: #2C5239 !important;
}
.sw-hamburger span {
  background: #2C5239 !important;
}

/* SIDX_MOBILE_SEARCH_V3 — aggressive mobile /listings/ overhaul */
@media (max-width: 768px) {
  /* === NUKE ALL DEAD SPACE === */
  #main-wrap {
    padding-top: 0 !important;
    margin-top: 0 !important;
  }
  body.hv-uni-on #main-wrap,
  body #main-wrap {
    padding-top: 0 !important;
  }
  /* Houzez theme content area */
  .main-wrap,
  #main-wrap,
  .site-content,
  .entry-content,
  article,
  .hentry {
    padding-top: 0 !important;
    margin-top: 0 !important;
  }
  nav.hv-uni {
    padding: 2px 10px !important;
    min-height: auto !important;
  }
  .page-wrap,
  .page-wrap > .container,
  .entry-content,
  .container {
    padding: 0 !important;
    margin: 0 !important;
    width: 100% !important;
    max-width: 100% !important;
  }
  .sidx-container,
  #sidx-main-container,
  .sidx-main-app-body,
  .sidx-search,
  .sidx-large-screen,
  .sidx-small-screen,
  .css-13azwyo {
    padding: 0 !important;
    margin: 0 !important;
  }

  /* === HIDE SHOWCASEIDX SEARCH FORM (both layouts) === */
  .sidx-search-grid__form,
  .sidx-searchform,
  .sidx-basic {
    display: none !important;
  }

  /* === HIDE MAP EVERYWHERE (nuclear) === */
  .sidx-search-grid__map,
  .sidx-map-container,
  .sidx-listings-map,
  .sidx-map-default-border,
  .sidx-listings-map-controls,
  [class*="sidx-map"],
  [class*="leaflet"],
  .leaflet-container {
    display: none !important;
    height: 0 !important;
    min-height: 0 !important;
    max-height: 0 !important;
    overflow: hidden !important;
    visibility: hidden !important;
    opacity: 0 !important;
    position: absolute !important;
    pointer-events: none !important;
  }

  /* Hide Map toggle button (mobile small-screen) */
  [class*="toggle-map"],
  [class*="map-toggle"],
  .sidx-fa-map,
  .sidx-icon.sidx-fa.sidx-fa-map,
  a[href*="map"],
  button[class*="map"],
  div[class*="map-button"],
  .sidx-search-grid__results ~ div:last-child {
    display: none !important;
  }

  /* Nuke the gap - target EVERYTHING between nav and results */
  body.hv-uni-on .sidx-container,
  body .sidx-container {
    margin-top: 0 !important;
    padding-top: 0 !important;
  }
  
  /* Force hide any green-bordered box */
  .sidx-search-grid > div:not(.sidx-search-grid__results):not(.sidx-search-grid__form) {
    display: none !important;
  }

  /* === HIDE SORT / PILLS / SECONDARY CONTROLS === */
  .sidx-search-filters,
  .sidx-search-pill-links,
  .sidx-sort-menu,
  .sidx-sort-pill,
  .sidx-secondary-pill,
  .sidx-reset-search-pill,
  .sidx-share-search-pill,
  .sidx-save-search-pill,
  .sidx-header-link-searches {
    display: none !important;
  }



  /* === GRID → BLOCK, NO GAPS === */
  .sidx-search-grid {
    display: block !important;
    padding: 0 !important;
    margin: 0 !important;
    gap: 0 !important;
  }

  /* === RESULTS FULL WIDTH === */
  .sidx-search-grid__results {
    width: 100% !important;
    padding: 0 !important;
    margin: 0 !important;
  }

  /* === CUSTOM MOBILE SEARCH BAR === */
  .rh-mobile-searchbar {
    position: sticky;
    top: 0;
    z-index: 1000;
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 12px;
    background: #FFFAE2;
    border-bottom: 1px solid #F0E8C8;
    box-shadow: 0 1px 4px rgba(0,0,0,0.06);
    font-family: 'Inter', -apple-system, sans-serif;
  }
  .rh-mobile-searchbar__location {
    flex: 1;
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 10px 12px;
    background: #fff;
    border: 1px solid #F0E8C8;
    border-radius: 8px;
    color: #2c2c2c;
    font-size: 14px;
    font-family: 'Inter', -apple-system, sans-serif;
    cursor: pointer;
    min-height: 40px;
    overflow: hidden;
  }
  .rh-mobile-searchbar__location svg { flex-shrink: 0; color: #3A6B4A; }
  .rh-mobile-searchbar__location span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .rh-mobile-searchbar__filter-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 10px 16px;
    background: #2C5239;
    color: #FFFAE2;
    border: none;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    font-family: 'Inter', -apple-system, sans-serif;
    cursor: pointer;
    white-space: nowrap;
    min-height: 40px;
  }
  .rh-mobile-searchbar__filter-btn:active { background: #1E3A28; }

  /* === FILTER OVERLAY === */
  .rh-mobile-filter-overlay {
    display: none;
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    z-index: 10000;
    background: #FFFAE2;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
  }
  .rh-mobile-filter-overlay.rh-open { display: flex; flex-direction: column; }
  .rh-mobile-filter-overlay__header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 16px;
    background: #FFFAE2;
    border-bottom: 1px solid #F0E8C8;
    position: sticky;
    top: 0;
    z-index: 1;
  }
  .rh-mobile-filter-overlay__title { font-family: 'DM Serif Display', serif; font-size: 1.25rem; color: #1a1a1a; }
  .rh-mobile-filter-overlay__close { background: none; border: none; color: #2C5239; font-size: 28px; cursor: pointer; padding: 4px 8px; line-height: 1; }
  .rh-mobile-filter-overlay__body { flex: 1; padding: 16px; overflow-y: auto; }
  /* Show search form ONLY inside overlay */
  .rh-mobile-filter-overlay .sidx-search-grid__form,
  .rh-mobile-filter-overlay .sidx-searchform,
  .rh-mobile-filter-overlay .sidx-basic {
    display: block !important;
  }
  .rh-mobile-filter-overlay .sidx-basic {
    flex-wrap: wrap !important;
    gap: 10px !important;
    width: 100% !important;
    display: flex !important;
  }
  .rh-mobile-filter-overlay .sidx-locations-field-wrapper {
    flex: 1 1 100% !important;
    min-width: 100% !important;
  }
  .rh-mobile-filter-overlay .sidx-range,
  .rh-mobile-filter-overlay .sidx-beds-and-baths,
  .rh-mobile-filter-overlay .sidx-streamlined-search {
    flex: 1 1 45% !important;
    min-width: 0 !important;
  }
  .rh-mobile-filter-overlay .sidx-field {
    padding: 10px 12px !important;
    font-size: 14px !important;
    border: 1px solid #F0E8C8 !important;
    border-radius: 8px !important;
    background: #fff !important;
    text-align: center !important;
  }
  .rh-mobile-filter-overlay .sidx-save-search-pill { display: none !important; }
  .rh-mobile-filter-overlay__apply {
    display: block;
    width: calc(100% - 32px);
    margin: 16px;
    padding: 14px;
    background: #2C5239;
    color: #FFFAE2;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 600;
    font-family: 'Inter', -apple-system, sans-serif;
    cursor: pointer;
    text-align: center;
  }
  .rh-mobile-filter-overlay__apply:active { background: #1E3A28; }
}

/* Desktop: hide mobile-only elements */
.rh-mobile-searchbar,
.rh-mobile-filter-overlay {
  display: none !important;
}
@media (max-width: 768px) {
  .rh-mobile-searchbar { display: flex !important; }
  .rh-mobile-filter-overlay.rh-open { display: flex !important; }
}

/* MOBILE_SCROLL_FIX_V1 — override smooth scroll so anchor offsets work on iOS */
@media (max-width: 768px) {
  html {
    scroll-behavior: auto !important;
  }
  section#buyers {
    scroll-margin-top: 120px !important;
  }
  section#premium-listing-services {
    scroll-margin-top: 120px !important;
  }
}