/* =====================================================================
   AVENTRIX REALTY — SITEWIDE FIXES (2026-09-26)
   Loaded last on every public page (after style.css and page CSS).
   Additive only; no colour, font or design changes.
   ===================================================================== */

/* ---------- 1. Footer vs floating WhatsApp / Back-to-top ----------
   At the very end of every page the floating buttons (fixed, bottom-right)
   sat on top of the footer's last row: "Terms & Conditions" / "Sitemap"
   (measured at 320, 375, 390, 1024 and 1280px). The footer's bottom row
   now keeps a right-hand gutter the width of the floating buttons, so
   its links always stay clear of them. Button positions are unchanged. */

/* Phones / touch (html.is-mobile): buttons are 52px at right:18px */
html.is-mobile .premium-footer-bottom{
    padding-right:calc(18px + 52px + 14px + env(safe-area-inset-right, 0px));
}

/* Narrow desktop windows (no .is-mobile) ≤768px: same 52px buttons */
@media (max-width:768px){
    html:not(.is-mobile) .premium-footer-bottom{
        padding-right:calc(18px + 52px + 14px);
    }
}

/* Desktop: buttons are 56px at right:24px. Only needed while the
   footer container reaches the right-hand 104px of the window. */
@media (min-width:769px) and (max-width:1439px){
    html:not(.is-mobile) .premium-footer-bottom{
        padding-right:calc(24px + 56px + 16px);
    }
}

/* ---------- 2. Human-readable sitemap (sitemap.html) ---------- */
.sitemap-section .sitemap-grid{
    display:grid;
    grid-template-columns:repeat(3, minmax(0, 1fr));
    gap:28px 40px;
    text-align:left;
}
.sitemap-section .sitemap-dynamic{ margin-top:36px; grid-template-columns:2fr 1fr; }
.sitemap-section h2{ font-size:18px; margin:0 0 10px; }
.sitemap-section ul{ list-style:none; padding:0; margin:0 0 22px; }
.sitemap-section li{ margin:0 0 8px; line-height:1.5; }
.sitemap-section a{ color:#0F3B2E; text-decoration:underline; text-underline-offset:3px; }
@media (max-width:768px){
    .sitemap-section .sitemap-grid,
    .sitemap-section .sitemap-dynamic{ grid-template-columns:1fr; gap:6px; }
}

/* ---------- 3. Page heroes (.list-hero) on phones (2026-10-14) ----------
   .list-hero .container has no horizontal padding, and .container is
   full-width on phones, so the hero subtitle ran edge-to-edge (text
   touching the screen edge at 375/390px) on Services, Free Valuation,
   List With Us, NRI Services, Enquiry, Insights, Professional Fees and
   the Property Tools pages. Adds a side gutter only; typography and
   hero heights are unchanged. */
html.is-mobile .list-hero .container{ padding-left:20px; padding-right:20px; }
@media (max-width:768px){
    html:not(.is-mobile) .list-hero .container{ padding-left:20px; padding-right:20px; }
}


/* ---------- Mobile property listing cards: compact image, content and actions ----------
   Scoped to the Properties listing page so homepage cards and detail pages remain unchanged. */
@media (max-width: 640px) {
  body[data-page-key="properties"] .property-card {
    border-radius: 18px;
  }
  body[data-page-key="properties"] .property-card .property-image-wrap {
    height: 210px !important;
    aspect-ratio: 16 / 9 !important;
  }
  body[data-page-key="properties"] .property-card .property-image-wrap img {
    width: 100% !important;
    height: 100% !important;
    object-fit: cover !important;
  }
  body[data-page-key="properties"] .property-card .property-location {
    padding: 14px 18px 0 !important;
    font-size: 11px !important;
    line-height: 1.45 !important;
    letter-spacing: .45px !important;
  }
  body[data-page-key="properties"] .property-card h3 {
    padding: 7px 18px 0 !important;
    margin: 0 0 8px !important;
    font-size: 21px !important;
    line-height: 1.28 !important;
    display: -webkit-box !important;
    -webkit-box-orient: vertical !important;
    -webkit-line-clamp: 3 !important;
    line-clamp: 3 !important;
    overflow: hidden !important;
  }
  body[data-page-key="properties"] .property-card .content > p,
  body[data-page-key="properties"] .property-card p {
    padding: 0 18px !important;
    margin: 0 0 12px !important;
    height: auto !important;
    max-height: 4.5em !important;
    font-size: 14px !important;
    line-height: 1.5 !important;
    display: -webkit-box !important;
    -webkit-box-orient: vertical !important;
    -webkit-line-clamp: 3 !important;
    line-clamp: 3 !important;
    overflow: hidden !important;
  }
  body[data-page-key="properties"] .property-card .property-footer {
    padding: 0 18px 18px !important;
    gap: 10px !important;
  }
  body[data-page-key="properties"] .property-card .property-footer-top {
    gap: 8px !important;
    row-gap: 8px !important;
  }
  body[data-page-key="properties"] .property-card .property-price {
    font-size: 19px !important;
    line-height: 1.25 !important;
  }
  body[data-page-key="properties"] .property-card .property-icon-actions {
    gap: 7px !important;
  }
  body[data-page-key="properties"] .property-card .property-icon-actions .icon-action-btn {
    width: 38px !important;
    height: 38px !important;
    border-radius: 10px !important;
    font-size: 14px !important;
  }
  body[data-page-key="properties"] .property-card .property-footer .view-details-btn {
    min-height: 42px !important;
    padding: 8px 14px !important;
    font-size: 13px !important;
  }
}

/* FINAL override: the Properties page sale badge must be tiny and anchored top-right.
   This file loads after property-cards.css, so these declarations win the cascade.
   Deliberately scoped to properties.html; homepage badges are untouched. */
body[data-page-key="properties"] #nearMeWidget .property-card .property-image-wrap,
body[data-page-key="properties"] #sfResultsGrid .property-card .property-image-wrap,
body[data-page-key="properties"] .near-me-section .property-card .property-image-wrap {
  position: relative !important;
}
body[data-page-key="properties"] #nearMeWidget .property-card .property-badge,
body[data-page-key="properties"] #sfResultsGrid .property-card .property-badge,
body[data-page-key="properties"] .near-me-section .property-card .property-badge {
  position: absolute !important;
  top: 8px !important;
  right: 8px !important;
  bottom: auto !important;
  left: auto !important;
  transform: none !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  width: auto !important;
  min-width: 0 !important;
  max-width: 90px !important;
  height: 26px !important;
  min-height: 26px !important;
  padding: 0 8px !important;
  margin: 0 !important;
  font-size: 10px !important;
  line-height: 1 !important;
  font-weight: 600 !important;
  letter-spacing: 0 !important;
  white-space: nowrap !important;
  box-sizing: border-box !important;
  border-radius: 4px !important;
  flex: 0 0 auto !important;
  z-index: 5 !important;
}


/* Mobile founder bio: apply after all page styles so the text is truly justified.
   Scoped to Gnanasekaran's page; the Sanjay Gandhi profile is not affected. */
@media (max-width: 768px) {
  html.is-mobile body[data-page-key="gnanasekaran"] .profile-container [data-realtor-about],
  html.is-mobile body[data-page-key="gnanasekaran"] .profile-container [data-cms-section],
  html.is-mobile body[data-page-key="gnanasekaran"] .profile-container [data-realtor-about] p,
  html.is-mobile body[data-page-key="gnanasekaran"] .profile-container [data-cms-section] p {
    text-align: justify !important;
    text-align-last: auto !important;
    text-justify: inter-word !important;
    word-spacing: normal !important;
    letter-spacing: normal !important;
    line-height: 1.7 !important;
  }
}
