/* Hamiyan Paydar site polish: text alignment + integrated home hero on mobile. */

/* ── Text alignment (audit #6, 2026-09-22) ─────────────────────────────────────────────────────
   This file used to force `text-align: justify !important` on every Zoho text block, card copy,
   the footer and even the home hero headings. Justified text in 300–500px columns opens "rivers"
   ("Buy,   Sell   &   Invest" on the hero), and Persian/Arabic get it worst: browsers justify them
   with spaces only (no kashida), so every short line gapes. The rule is gone. Zoho's own
   alignment classes apply again (.zptext-align-left maps to `start`, centred blocks stay centred),
   and body copy that has no alignment class of its own is set to `start` — right in RTL, left in
   LTR — explicitly, so nothing inherits a stray justify from an ancestor. */
.re-process-desc,
.dn-desc,
.z-card p,
.z-card__desc,
footer p {
  text-align: start;
  text-justify: auto;
}
/* The blog editor pastes style="text-align:justify" into excerpts and cards (blogs.html, the
   category and author pages). An inline style can only be overruled with !important. */
[style*="text-align:justify"],
[style*="text-align: justify"] {
  text-align: start !important;
}
/* The one place justification belongs: the body of a long-form English article, on a screen wide
   enough for a real measure, with hyphenation so the spacing stays even. html[lang] is "en-US" on
   the exports, which hyphens:auto needs to pick a dictionary. Persian and Arabic article bodies stay
   start-aligned for the kashida reason above, and phones stay start-aligned (the ≤900px block
   below), because a 350px column cannot be justified without rivers even with hyphens. */
@media (min-width: 901px) {
  html[lang^="en"] .theme-blog-single-post-content p {
    text-align: justify !important;
    text-justify: inter-word;
    -webkit-hyphens: auto;
    hyphens: auto;
  }
}

.zphero-slider-container .zpelem-heading {
  max-width: 42rem;
}

@media (max-width: 768px) {
  .zphero-slider-container .zpelem-heading {
    margin: 0 !important;
    padding: 0 !important;
  }

  /* Brand line: gold / bold */
  .zphero-slider-container h2.zpheading:has(b),
  .zphero-slider-container h2.zpheading:has([style*="135, 111, 34"]) {
    margin-bottom: 4px !important;
  }
  .zphero-slider-container h2.zpheading:has(b) span,
  .zphero-slider-container h2.zpheading:has(b) b,
  .zphero-slider-container h2.zpheading:has([style*="135, 111, 34"]) span {
    font-size: 16px !important;
    line-height: 1.5 !important;
    letter-spacing: 0.01em;
  }

  /* Main title: 40px inline */
  .zphero-slider-container h2.zpheading:has([style*="font-size:40px"]) {
    margin-top: 6px !important;
    margin-bottom: 8px !important;
  }
  .zphero-slider-container h2.zpheading:has([style*="font-size:40px"]) span {
    font-size: 20px !important;
    line-height: 1.4 !important;
    display: block;
  }

  /* Supporting line: 28px inline */
  .zphero-slider-container h2.zpheading:has([style*="font-size:28px"]) {
    margin-top: 4px !important;
  }
  .zphero-slider-container h2.zpheading:has([style*="font-size:28px"]) span {
    font-size: 14px !important;
    line-height: 1.9 !important;
    font-weight: 500 !important;
    color: #1d3a4d !important;
    display: block;
  }
}


/* ===== portal mobile edge + compact hero (16 Aug 2026) ===== */
@media (max-width: 900px) {
  :root { --dn-edge: max(8px, 2mm); }

  html, body {
    overflow-x: hidden !important;
    max-width: 100%;
  }
  body {
    padding-inline: var(--dn-edge);
    box-sizing: border-box;
  }

  .theme-header,
  .theme-header .zpcontainer,
  .theme-header .zpcontainer-fluid {
    padding-inline: var(--dn-edge) !important;
    box-sizing: border-box;
    max-width: 100%;
  }

  .theme-banner,
  .zphero-full-screen,
  .zphero-full-height,
  .hero-section,
  .zpsection.hero-section {
    width: 100% !important;
    max-width: 100% !important;
    min-height: 0 !important;
    height: auto !important;
    box-sizing: border-box;
    border-radius: 16px;
    overflow: hidden;
    margin-inline: 0;
  }
  .hero-section .zpcontainer,
  .zpsection.hero-section .zpcontainer,
  .hero-container,
  .zphero-slider-container {
    padding-inline: var(--dn-edge) !important;
    padding-top: 16px !important;
    padding-bottom: 16px !important;
    box-sizing: border-box;
  }

  img, video, iframe, table, figure, .zpimage, picture {
    max-width: 100% !important;
    box-sizing: border-box;
  }
  .theme-header img,
  .theme-logo img {
    max-height: 36px !important;
    width: auto !important;
  }
  .theme-footer-area img {
    max-width: min(180px, 100%) !important;
    max-height: 72px !important;
    height: auto !important;
    width: auto !important;
    object-fit: contain !important;
  }

  .zpimageheadingtext-container,
  .zpelem-imageheadingtext .zpimageheadingtext-container {
    display: flex !important;
    flex-direction: column !important;
    width: 100% !important;
    max-width: 100% !important;
    gap: 12px;
  }
  .zpimageheadingtext-container figure,
  .zpimageheadingtext-container img,
  .zpelem-imageheadingtext img {
    width: 100% !important;
    max-width: 100% !important;
    height: auto !important;
    border-radius: 12px;
    object-fit: cover;
  }

  .zpcontainer,
  .zpcontainer-fluid,
  .footer-container,
  .theme-content-area {
    max-width: 100% !important;
    box-sizing: border-box;
  }

  /* Only the FLOATING WhatsApp button (inline position:fixed on 68 exports): the old selector also
     caught every in-page wa.me link, and bottom/right shift any of them that is ever positioned.
     Logical inset for the same reason as the desktop rule at the end of this file (audit #10). */
  a[href*="wa.me"][style*="position:fixed"],
  a[href*="whatsapp"][style*="position:fixed"] {
    left: auto !important;
    right: auto !important;
    inset-inline-end: max(var(--dn-edge), env(safe-area-inset-right, 0px)) !important;
    bottom: max(12px, env(safe-area-inset-bottom, 0px)) !important;
  }

  .zphero-slider-container .zpheading,
  .zphero-slider-container .zpelem-heading,
  .zphero-slider-container p,
  .zpelem-text p,
  .zpelem-text {
    text-align: start !important;
    text-justify: auto !important;
  }

  #dnHybridListings {
    padding-left: var(--dn-edge) !important;
    padding-right: var(--dn-edge) !important;
  }
}

/* r290 SEO: crawlable index of every clean URL. Plain list of links, sits at the
   end of the page; the detail/listing pages build their cards in JavaScript, so
   without this block there is no <a href> path to a listing in the raw HTML. */
.dn-seo-index{max-width:1200px;margin:32px auto 0;padding:20px 16px;border-top:1px solid rgba(0,0,0,.08)}
.dn-seo-index h2{margin:0 0 10px;font-size:16px;font-weight:700;letter-spacing:.02em;text-transform:uppercase;opacity:.75}
.dn-seo-index ul{display:flex;flex-wrap:wrap;gap:8px 18px;margin:0;padding:0;list-style:none}
.dn-seo-index a{font-size:14px;text-decoration:none;opacity:.85}
.dn-seo-index a:hover{text-decoration:underline;opacity:1}

/* ── Floating buttons stay together in RTL (audit #10, 2026-09-22) ──────────────────────────────
   The floating WhatsApp button is written into 68 exports with an inline physical `right:20px`,
   while the "Contact" pill (js/dn-portal-shell-v2.js + css/dn-enquiry.css) flipped to the LEFT on
   /fa/ and /ar/ — the pair split into opposite corners. Both now use the logical inline-end edge:
   bottom-right together in English, bottom-left together in Persian and Arabic, the mirror image
   an RTL reader expects. `right/left:auto` first clears the inline style; the logical declaration
   after it wins for whichever physical side it maps to. This file is linked in <head>, so the
   button never paints on the wrong side first. The ≤900px block above does the same on phones
   (there the bottom bar of css/dn-enquiry.css replaces both buttons whenever it is mounted). */
@media (min-width: 901px) {
  a[href*="wa.me"][style*="position:fixed"],
  a[href*="whatsapp"][style*="position:fixed"] {
    left: auto !important;
    right: auto !important;
    inset-inline-end: 20px !important;
  }
}

/* SEO 2026-10-28: crawlable lists in the raw HTML of the two client-rendered pages (_redesign/build-crawl-blocks.py).
   /propertiesstatic: section under the listing app; /agents: the list inside the grid until the script draws the cards. */
.dn-crawl{max-width:1200px;margin:28px auto 0;padding:24px 16px;border-top:1px solid rgba(0,0,0,.08)}
.dn-crawl ul{display:flex;flex-wrap:wrap;gap:8px 20px;margin:0;padding:0;list-style:none}
.dn-crawl ul+ul{margin-top:12px}
.dn-crawl a{font-size:14px;text-decoration:none}
.dn-crawl a:hover{text-decoration:underline}
.dn-crawl-team{grid-column:1/-1;padding:8px 0}
.dn-crawl-team ul{display:flex;flex-wrap:wrap;gap:6px 18px;margin:0;padding:0;list-style:none}
.dn-crawl-team a{font-size:14px;text-decoration:none}
.dn-crawl-team a:hover{text-decoration:underline}

/* SEO 2026-10-28: the Areas page map starts on demand (communities.html + fa + ar). The placeholder fills the map box
   (same size as the map, so nothing moves when it opens); the button is the site's ink-and-bone one. */
.dn-map-gate{display:flex;align-items:center;justify-content:center;width:100%;height:100%;min-height:inherit;background:#eaf2f3}
.dn-map-gate button{appearance:none;border:1px solid #131313;background:#131313;color:#e3edf8;border-radius:999px;padding:0 26px;height:44px;font:700 14px/1 var(--dn26-font,inherit);cursor:pointer}
.dn-map-gate button:hover,.dn-map-gate button:focus-visible{background:#2a2a2a}
.dn-map-opening .dn-map-gate button{opacity:.6;cursor:progress}
html[data-theme="dark"] .dn-map-gate{background:#1c2122}
html[data-theme="dark"] .dn-map-gate button{background:#e3edf8;color:#131313;border-color:#e3edf8}
