/* Balanced public detail layouts; only this copy of the public site is affected. */
body.aznm:is([data-neomain-page="detail_property"],[data-neomain-page="detail_project"]) .hero {
  grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr); align-items: start;
  gap: clamp(16px, 2vw, 28px); padding: clamp(16px, 2vw, 28px); overflow: visible;
}
body.aznm:is([data-neomain-page="detail_property"],[data-neomain-page="detail_project"]) :is(.hero-left,.hero-right) { padding: 0; }
body.aznm:is([data-neomain-page="detail_property"],[data-neomain-page="detail_project"]) .hero-media { display: block; width: 100%; aspect-ratio: 4 / 3; height: auto; max-height: 480px; padding: 0; position: relative; cursor: zoom-in; }
body.aznm:is([data-neomain-page="detail_property"],[data-neomain-page="detail_project"]) .hero-media img { width: 100%; height: 100%; object-fit: cover; }
body.aznm:is([data-neomain-page="detail_property"],[data-neomain-page="detail_project"]) :is(.kv,.kv-grid) { margin-top: 18px; gap: 9px; }
body.aznm:is([data-neomain-page="detail_property"],[data-neomain-page="detail_project"]) :is(.kv .item,.kv-item) { padding: 11px 12px; border-radius: 14px; align-items: center; }
body.aznm:is([data-neomain-page="detail_property"],[data-neomain-page="detail_project"]) :is(.kv .val,.kv-val) { font-size: 14px; line-height: 1.45; overflow-wrap: anywhere; }
body.aznm:is([data-neomain-page="detail_property"],[data-neomain-page="detail_project"]) :is(.kv .label,.kv-label) { font-size: 11px; line-height: 1.45; }
body.aznm[data-neomain-page="detail_property"] .seller-actions { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 9px; margin-top: 18px; }
body.aznm[data-neomain-page="detail_property"] .seller-action-btn { min-width: 0; min-height: 44px; padding: 10px 12px; font-size: 12px; justify-content: center; text-align: center; }
body.aznm .detail-secondary { display: grid; grid-template-columns: minmax(0,1.05fr) minmax(0,1fr); gap: 18px; margin-top: 18px; align-items: start; }
body.aznm .detail-secondary > :is(section,.desc-box,.map-link) { min-width: 0; padding: 22px; background: var(--nm-glass,var(--az-glass)); border: 1px solid var(--nm-edge,var(--az-glass-edge)); border-radius: 22px; color: var(--az-text); }
body.aznm .detail-secondary .desc { background: none; border: none; padding: 0; margin: 0; box-shadow: none; }
body.aznm .detail-secondary .desc + .desc { margin-top: 20px; }
body.aznm .detail-secondary :is(.info-tags,.infra-tags) { gap: 8px; margin-top: 10px; }
body.aznm .detail-secondary .tag { line-height: 1.5; padding: 7px 10px; border: 0; background: var(--az-accent-soft); color: var(--az-text); }
body.aznm .detail-secondary .detail-extra-facts { margin: 0; }
body.aznm .project-secondary { grid-template-columns: repeat(3,minmax(0,1fr)); }
body.aznm .project-secondary > .desc-box { grid-column: 1 / -1; margin: 0; }

body.aznm[data-neomain-page="detail_project"] .action-stack { margin-top: 18px; }
body.aznm[data-neomain-page="detail_project"] .project-plans { margin-top: 16px; }
body.aznm[data-neomain-page="detail_project"] .project-plans h3 { font-size: 14px; margin: 0 0 10px; }
body.aznm[data-neomain-page="detail_project"] .plans-grid { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 9px; }
body.aznm[data-neomain-page="detail_project"] .plan-thumb { width: 100%; height: 105px; padding: 6px; background: var(--az-raised); border: 1px solid var(--az-glass-edge); border-radius: 14px; overflow: hidden; cursor: zoom-in; }
body.aznm[data-neomain-page="detail_project"] .plan-thumb img { width: 100%; height: 100%; object-fit: contain; }
body.aznm[data-neomain-page="detail_project"] .project-photo-thumbs { display: flex; gap: 8px; overflow-x: auto; margin-top: 10px; padding-bottom: 4px; }
body.aznm[data-neomain-page="detail_project"] .project-photo-thumbs button { flex: 0 0 76px; height: 62px; padding: 0; border: 1px solid var(--az-glass-edge); border-radius: 12px; overflow: hidden; cursor: zoom-in; }
body.aznm[data-neomain-page="detail_project"] .project-photo-thumbs img { width: 100%; height: 100%; object-fit: cover; }
body.aznm[data-neomain-page="detail_project"] .project-gallery-hint { position: absolute; bottom: 12px; inset-inline-start: 12px; display: inline-flex; align-items: center; gap: 7px; color: white; background: rgb(8 18 28 / .6); padding: 8px 12px; border-radius: 12px; font-size: 12px; backdrop-filter: blur(10px); }
body.aznm[data-neomain-page="detail_project"] .classification-title { margin: 24px 0 12px; text-align: start; font-size: 20px; }
body.aznm[data-neomain-page="detail_project"] .classification-grid {
  display: grid; grid-template-columns: repeat(auto-fill,minmax(min(240px,100%),1fr));
  gap: 12px; width: 100%; max-width: 1156px; justify-content: start; align-items: start;
}
body.aznm[data-neomain-page="detail_project"] .classification-grid .card {
  width: 100%; max-width: 280px; padding: 16px !important; min-width: 0; box-shadow: none;
}
body.aznm[data-neomain-page="classification"] .classification-head { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 16px; margin-bottom: 22px; }
body.aznm[data-neomain-page="classification"] .classification-head .page-title { margin: 0; text-align: start; }
body.aznm[data-neomain-page="classification"] .classification-head .subnote { margin: 6px 0 0; }
body.aznm[data-neomain-page="classification"] .classification-head > .btn { margin-inline-start: auto; min-height: 42px; padding: 10px 16px; border-radius: 14px; flex-shrink: 0; }
/* Project field tiles use consistent padding, baseline and wrapping. */
body.aznm:is([data-neomain-page="projects"],[data-neomain-page="company_detail"]) .card-params { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 8px; padding: 0; border: 0; background: none; }
body.aznm:is([data-neomain-page="projects"],[data-neomain-page="company_detail"]) .card-param { display: flex; flex-direction: column; align-items: center; justify-content: center; min-width: 0; min-height: 66px; padding: 10px 12px; gap: 5px; text-align: center; border: 0; border-radius: 14px; background: var(--nm-inset,var(--az-raised)); }
body.aznm:is([data-neomain-page="projects"],[data-neomain-page="company_detail"]) .card-param-label { margin: 0; color: var(--az-muted); font-size: 11px; line-height: 1.4; }
body.aznm:is([data-neomain-page="projects"],[data-neomain-page="company_detail"]) .card-param-value { max-width: 100%; white-space: normal; overflow-wrap: anywhere; font-size: 13px; line-height: 1.45; color: var(--az-text); }
body.aznm:is([data-neomain-page="projects"],[data-neomain-page="company_detail"]) .card-location { display: flex; align-items: center; gap: 7px; color: var(--az-muted); }
body.aznm:is([data-neomain-page="projects"],[data-neomain-page="company_detail"]) .card-location i { color: var(--az-accent-text); }
/* Company information and portfolio share the first row in equal proportions. */
body.aznm[data-neomain-page="company_detail"] .company-page-heading { display: flex; justify-content: space-between; align-items: center; gap: 18px; margin-bottom: 18px; }
body.aznm[data-neomain-page="company_detail"] .company-page-heading .subnote { margin-bottom: 0; }
body.aznm[data-neomain-page="company_detail"] .company-back { flex-shrink: 0; }
body.aznm[data-neomain-page="company_detail"] .company-overview { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 18px; align-items: stretch; }
body.aznm[data-neomain-page="company_detail"] .company-information { display: block; margin: 0; padding: 24px; min-width: 0; height: 100%; }
body.aznm[data-neomain-page="company_detail"] .hero-top { display: flex; flex-wrap: nowrap; gap: 14px; margin-bottom: 18px; padding-bottom: 0; border: 0; }
body.aznm[data-neomain-page="company_detail"] .hero-avatar { flex: 0 0 68px; width: 68px; height: 68px; }
body.aznm[data-neomain-page="company_detail"] .hero-name { font-size: clamp(20px,2vw,28px); line-height: 1.25; overflow-wrap: anywhere; }
body.aznm[data-neomain-page="company_detail"] .hero-top .public-fav-heart { margin-inline-start: auto; flex-shrink: 0; }
body.aznm[data-neomain-page="company_detail"] .hero-info { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 9px; margin: 0; }
body.aznm[data-neomain-page="company_detail"] .hero-info-item { display: flex; align-items: center; gap: 9px; padding: 11px 12px; border: 0; border-radius: 14px; min-width: 0; background: var(--nm-inset,var(--az-raised)); }
body.aznm[data-neomain-page="company_detail"] .hero-info-value { font-size: 13px; line-height: 1.5; overflow-wrap: anywhere; }
body.aznm[data-neomain-page="company_detail"] .hero-info-value small { font-size: 10px; font-weight: 400; color: var(--az-muted); }
body.aznm[data-neomain-page="company_detail"] .hero-desc { margin-top: 16px; padding: 18px; border: 0; line-height: 1.7; font-size: 13px; background: var(--nm-inset,var(--az-raised)); border-radius: 16px; overflow-wrap: anywhere; }
body.aznm[data-neomain-page="company_detail"] .hero-desc-title { padding: 0; margin-bottom: 8px; font-size: 12px; }
body.aznm[data-neomain-page="company_detail"] .company-portfolio { display: flex; flex-direction: column; padding: 18px; border: 1px solid var(--nm-edge,var(--az-glass-edge)); border-radius: var(--nm-radius,26px); background: var(--nm-glass,var(--az-glass)); box-shadow: var(--nm-shadow); min-width: 0; min-height: 400px; }
body.aznm[data-neomain-page="company_detail"] .company-portfolio-top { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 2px 4px 15px; }
body.aznm[data-neomain-page="company_detail"] .company-portfolio-top h2 { font-size: 16px; margin: 0; }
body.aznm[data-neomain-page="company_detail"] .portfolio-count { font-size: 11px; white-space: nowrap; color: var(--az-muted); }
body.aznm[data-neomain-page="company_detail"] .company-portfolio-media { position: relative; min-height: 310px; flex: 1; overflow: hidden; border-radius: 18px; background: var(--az-raised); }
body.aznm[data-neomain-page="company_detail"] .company-portfolio-slide { position: absolute; inset: 0; margin: 0; }
body.aznm[data-neomain-page="company_detail"] .company-portfolio-slide[hidden] { display: none; }
body.aznm[data-neomain-page="company_detail"] .company-portfolio-slide img { width: 100%; height: 100%; object-fit: cover; }
body.aznm[data-neomain-page="company_detail"] .company-portfolio-slide figcaption { position: absolute; bottom: 0; inset-inline: 0; padding: 50px 18px 18px; padding-inline-end: 60px; color: white; background: linear-gradient(transparent,rgb(0 0 0 / .7)); font-size: 15px; }
body.aznm[data-neomain-page="company_detail"] :is(.portfolio-prev,.portfolio-next,.portfolio-pause) { position: absolute; top: 50%; z-index: 2; display: grid; place-items: center; width: 36px; height: 36px; border-radius: 50%; color: var(--az-text); border: 1px solid var(--az-glass-edge); background: var(--az-glass-solid,var(--az-surface)); backdrop-filter: blur(14px); cursor: pointer; }
body.aznm[data-neomain-page="company_detail"] .portfolio-prev { left: 10px; }
body.aznm[data-neomain-page="company_detail"] .portfolio-next { right: 10px; }
body.aznm[data-neomain-page="company_detail"] .portfolio-pause { top: auto; bottom: 12px; right: 12px; }
body.aznm[data-neomain-page="company_detail"] .company-project-heart { position: absolute; top: auto !important; bottom: 12px; left: auto !important; right: 12px; z-index: 8; width: 40px; height: 40px; }
body.aznm[data-neomain-page="company_detail"] .card-price-overlay { padding-inline-end: 64px; }
body.aznm[data-neomain-page="company_detail"] .posts-container { display: grid; grid-template-columns: repeat(auto-fill,minmax(min(310px,100%),1fr)); justify-content: start; gap: 20px; }
body.aznm[data-neomain-page="company_detail"] .post-item { width: 100%; max-width: none; margin: 0; border-radius: 24px; overflow: hidden; }
body.aznm[data-neomain-page="company_detail"] .post-item .image-container { height: 235px; }
body.aznm[data-neomain-page="company_detail"] .post-item .details-section { padding: 18px; }
body.aznm[data-neomain-page="company_detail"] .post-item .details-section p { font-size: 13px; line-height: 1.65; margin: 0 0 8px; }
body.aznm[data-neomain-page="company_detail"] .post-item .post-actions { padding: 0 18px 18px; }
body.aznm[data-neomain-page="company_detail"] .post-details-modal-content { width: min(720px,calc(100vw - 32px)); max-height: min(88dvh,950px); padding: 26px; }
body.aznm[data-neomain-page="company_detail"] .post-details-modal-content .description { width: 100%; }
body.aznm[data-neomain-page="company_detail"] .post-details-modal-content .main-image { max-height: 350px; object-fit: contain; background: var(--az-raised); }
body.aznm[data-neomain-page="company_detail"] .share-modal-content { width: min(480px,calc(100vw - 32px)); display: grid; grid-template-columns: repeat(4,minmax(0,1fr)); gap: 12px; padding: 26px; }
body.aznm[data-neomain-page="company_detail"] .share-modal-content h3 { grid-column: 1/-1; margin: 0 0 8px; }
body.aznm[data-neomain-page="company_detail"] .share-option { width: 100%; min-height: 58px; display: grid; place-items: center; background: var(--az-accent-soft); color: var(--az-accent-text); border-radius: 16px; font-size: 24px; }
body.aznm[data-neomain-page="company_detail"] .neo-comment-edit { width: 100%; min-height: 76px; padding: 12px; border-radius: 12px; border: 1px solid var(--az-glass-edge); background: var(--az-raised); color: var(--az-text); font: inherit; }
/* Native dialog keeps gallery focus and Escape handling within the current page. */
body.aznm .neo-gallery-dialog { width: min(1080px,calc(100vw - 32px)); max-height: 92dvh; padding: 18px; background: var(--az-surface); color: var(--az-text); border: 1px solid var(--az-glass-edge); border-radius: 24px; box-shadow: var(--az-glass-shadow); overflow: auto; }
body.aznm .neo-gallery-dialog::backdrop { background: rgb(5 12 19 / .8); backdrop-filter: blur(8px); }
body.aznm .neo-gallery-head { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-bottom: 12px; }
body.aznm .neo-gallery-head button,body.aznm .neo-gallery-stage > button { display: grid; place-items: center; width: 40px; height: 40px; padding: 0; flex-shrink: 0; border: 1px solid var(--az-glass-edge); background: var(--az-glass-solid,var(--az-raised)); color: var(--az-text); border-radius: 50%; cursor: pointer; }
body.aznm .neo-gallery-stage { position: relative; width: 100%; }
body.aznm .neo-gallery-stage > img { display: block; width: 100%; height: min(62dvh,650px); object-fit: contain; border-radius: 16px; background: var(--az-raised); }
body.aznm .neo-gallery-stage > button { position: absolute; top: 50%; z-index: 1; transform: translateY(-50%); left: 10px; }
body.aznm .neo-gallery-stage > button:last-child { left: auto; right: 10px; }
body.aznm .neo-gallery-stage > button[hidden] { display: none; }
body.aznm .neo-gallery-foot { display: flex; align-items: center; gap: 18px; margin-top: 12px; }
body.aznm #projectGalleryCount { color: var(--az-muted); font-size: 12px; flex-shrink: 0; }
body.aznm #projectGalleryThumbs { display: flex; gap: 8px; overflow-x: auto; padding: 3px; }
body.aznm #projectGalleryThumbs button { flex: 0 0 64px; width: 64px; height: 50px; border: 2px solid transparent; padding: 0; border-radius: 10px; overflow: hidden; background: var(--az-raised); cursor: pointer; }
body.aznm #projectGalleryThumbs button[aria-pressed="true"] { border-color: var(--az-accent); }
body.aznm #projectGalleryThumbs img { width: 100%; height: 100%; object-fit: cover; }
@media(max-width:1000px) {
  body.aznm .project-secondary { grid-template-columns: repeat(2,minmax(0,1fr)); }
  body.aznm[data-neomain-page="company_detail"] .company-information { padding: 18px; }
  body.aznm[data-neomain-page="company_detail"] .hero-top { flex-wrap: wrap; }
  body.aznm[data-neomain-page="company_detail"] .hero-avatar { width: 52px; height: 52px; flex-basis: 52px; }
}
@media(max-width:760px) {
  body.aznm:is([data-neomain-page="detail_property"],[data-neomain-page="detail_project"]) .hero,
  body.aznm .detail-secondary,body.aznm .project-secondary,
  body.aznm[data-neomain-page="company_detail"] .company-overview { grid-template-columns: minmax(0,1fr); }
  body.aznm[data-neomain-page="company_detail"] .company-page-heading { flex-wrap: wrap; }
  body.aznm[data-neomain-page="company_detail"] .company-back { margin-inline-start: auto; }
  body.aznm[data-neomain-page="company_detail"] .company-portfolio { min-height: 360px; }
  body.aznm[data-neomain-page="company_detail"] .company-portfolio-media { min-height: 290px; }
  body.aznm[data-neomain-page="company_detail"] .post-details-modal-content { padding: 20px; }
  body.aznm .detail-secondary > :is(section,.desc-box,.map-link) { padding: 18px; }
}
@media(prefers-reduced-motion:reduce) { body.aznm .company-portfolio-slide { animation: none; transition: none; } }
body.aznm[data-neomain-page="detail_project"] .classification-card { background: var(--nm-glass,var(--az-glass)); border: 1px solid var(--nm-edge,var(--az-glass-edge)); border-radius: 20px; }
body.aznm[data-neomain-page="detail_project"] .classification-area { font-size: 20px; font-weight: 600; margin-bottom: 7px; }
body.aznm[data-neomain-page="detail_project"] .classification-count { font-size: 12px; color: var(--az-muted); margin-bottom: 14px; }
body.aznm[data-neomain-page="detail_project"] .classification-price-range { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 10px; font-size: 12px; line-height: 1.5; padding: 12px; border-radius: 13px; background: var(--az-accent-soft); }
body.aznm[data-neomain-page="detail_project"] .classification-price-range strong { display: block; color: var(--az-text); font-size: 15px; }
body.aznm[data-neomain-page="detail_project"] .classification-open { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 10px 0 0; margin-top: 8px; color: var(--az-accent-text); font-size: 13px; text-decoration: none; }

/* Keep project classifications near the gallery while retaining full photo detail in the lightbox. */
body.aznm[data-neomain-page="detail_project"] .hero-media { aspect-ratio: 16 / 10; max-height: 340px; }
body.aznm[data-neomain-page="detail_project"] .plan-thumb { height: 85px; }
body.aznm[data-neomain-page="company_detail"] .company-page-heading > div { flex: 1; min-width: 0; }
body.aznm[data-neomain-page="company_detail"] .company-back { width: auto; max-width: 100%; }
body.aznm[data-neomain-page="company_detail"] .tabs { padding: 0; background: transparent; border: 0; box-shadow: none; }
body.aznm[data-neomain-page="company_detail"] .tabbar { background: transparent; border: 0; box-shadow: none; padding: 0; }

/* The map action stays next to its location; one classification never expands across the page. */
body.aznm[data-neomain-page="detail_project"] .project-map-action {
  display: inline-flex; width: fit-content; max-width: 100%; min-height: 36px;
  align-items: center; justify-content: flex-start; gap: 7px; margin: 9px 0 0;
  padding: 8px 11px; border: 1px solid var(--az-glass-edge); border-radius: 11px;
  background: var(--az-accent-soft); color: var(--az-accent-text);
  font: 500 12px/1.4 var(--az-font); text-align: start; white-space: normal;
  overflow-wrap: anywhere; cursor: pointer;
}
body.aznm[data-neomain-page="detail_project"] .project-map-action i { width: auto; flex: 0 0 auto; color: inherit; }
body.aznm[data-neomain-page="detail_project"] .project-map-action:hover { border-color: var(--az-accent); background: var(--az-raised); }
body.aznm[data-neomain-page="detail_project"] .project-map-action:focus-visible { outline: 2px solid var(--az-accent); outline-offset: 3px; }
