/* Shared Heritage Italy palette. Photo treatment is display-only. */
:root {
  --heritage: #254b3d;
  --forest: #254b3d;
  --forest-dark: #18352c;
  --terracotta: #a45739;
  --terracotta-soft: #c77356;
  --brand-clay-wash: #f3e9e2;
  --brand-photo-filter: sepia(.10) saturate(.94) contrast(1.025) brightness(1.01);
}
::selection { background: var(--terracotta); color: #fff; }
.site-header .brand, .site-header .main-nav a { color: var(--heritage); }
.site-header .brand em, .footer-brand em, .intro h1 em { color: var(--terracotta); }
.site-header .main-nav a:is(:hover, .is-active), .site-header .lang-switch a.language-active {
  color: var(--terracotta);
}
.site-header .main-nav a:is(:hover, .is-active) { text-decoration: underline; text-underline-offset: 6px; }
.eyebrow, .detail-description-heading { color: var(--terracotta); }
.hero-content .eyebrow, .mini-map-link .eyebrow { color: inherit; }
.solid-link, .hero-search button, .reset, .btn-primary {
  background: var(--heritage); border-color: var(--heritage); color: #fff;
  transition: background-color .18s, border-color .18s;
}
.solid-link:hover, .hero-search button:hover, .reset:hover, .btn-primary:hover {
  background: var(--terracotta); border-color: var(--terracotta); color: #fff;
}
.text-link, .back-link, .agency-badge, .description-toggle { color: var(--heritage); }
.text-link:hover, .back-link:hover, .agency-badge:hover, .description-toggle:hover { color: var(--terracotta); }
.listing-card:hover, .business-tile:hover { border-color: var(--terracotta); }
.listing-card .photo-label { background: #fffdf8ee; color: var(--heritage); }
.listing-card .card-photo-count { background: #fffdf8ee; color: var(--heritage); }
.tags span { color: var(--heritage); background: #e6ecdf; }
.listing-pagination .page-number.is-current, .agency-page .listing-pagination [aria-current="page"] {
  background: var(--heritage); border-color: var(--heritage); color: #fff;
}
.listing-pagination button:not(:disabled):hover { border-color: var(--terracotta); }
.listing-pagination .page-number.is-current:hover { background: var(--heritage); }
.intro-stats strong, .collection-stats strong, .collection-heading h2, .content-page h1 { color: var(--heritage); }
.intro-stats span { color: var(--terracotta); }
.business-callout { border-top: 3px solid var(--terracotta); }
.closing-section > .eyebrow { color: var(--terracotta); }
.atlas-card.selected { border-color: var(--terracotta); box-shadow: inset 3px 0 var(--terracotta); }
.atlas-card .atlas-kind, .atlas-card .locate-property, .atlas-card .map-agency { color: var(--heritage); }
.atlas-price-pin { color: var(--heritage); border-color: var(--heritage); }
.atlas-popup a { color: var(--terracotta); }

/* Listing text stays black; brand colours are reserved for the surrounding UI. */
.listing-card h3, .listing-card .asking, .listing-card .facts,
.detail-layout h1, .detail-layout .asking, .detail-layout .facts,
.detail-layout .place, .detail-description, .detail-description *,
.atlas-card h2, .atlas-card-body > strong, .atlas-facts,
.atlas-popup strong, .atlas-popup p { color: #111; }
.detail-description-heading { color: var(--terracotta); }

/* Only property photographs receive the tone, never logos or map tiles. */
.listing-photo img, .gallery-hero img, .gallery-thumbnails img,
.gallery-dialog > img, .atlas-photo img, .atlas-popup > img {
  filter: var(--brand-photo-filter);
}
html[data-photo-tone="original"] :is(.listing-photo img, .gallery-hero img,
  .gallery-thumbnails img, .gallery-dialog > img, .atlas-photo img, .atlas-popup > img) { filter: none; }
.photo-tone-control { display: inline-flex; align-items: center; gap: 5px; flex-wrap: wrap; }
.photo-tone-control > span { color: var(--heritage); margin-right: 5px; font: 11px Manrope, Arial, sans-serif; }
.photo-tone-control button {
  padding: 6px 10px; border: 1px solid #d5d9cc; background: #fffdf8;
  color: var(--heritage); font: 11px Manrope, Arial, sans-serif; cursor: pointer;
}
.photo-tone-control button[aria-pressed="true"] { background: var(--brand-clay-wash); border-color: var(--terracotta); color: #813d26; }
.photo-tone-control button:focus-visible { outline: 2px solid var(--heritage); outline-offset: 3px; }
#property-gallery > .photo-tone-control { margin: 2px 0 14px; }
.gallery-dialog header { display: grid; grid-template-columns: minmax(0,1fr) auto auto; gap: 16px; }
.gallery-dialog .gallery-title { max-width: 100%; }
.gallery-dialog .photo-tone-control > span { color: #f7f5ef; }
.gallery-dialog .photo-tone-control button { color: #f7f5ef; background: transparent; border-color: #9ca99b; padding: 6px 10px; }
.gallery-dialog .photo-tone-control button[aria-pressed="true"] { background: var(--terracotta); border-color: var(--terracotta); color: #fff; }
@media(max-width:700px) {
  .gallery-dialog header { grid-template-columns: minmax(0,1fr) auto; gap: 10px; }
  .gallery-dialog .gallery-title { grid-column: 1 / -1; }
  .gallery-dialog > img { height: min(62vh,calc(92dvh - 200px)); }
}
@media(prefers-reduced-motion:reduce) {
  .solid-link, .hero-search button, .reset, .btn-primary { transition: none; }
}

/* Property enquiry links use the temporary contact destination. */
.listing-contact-row{position:relative;z-index:2;display:flex;align-items:center;justify-content:space-between;gap:10px;border-top:1px solid var(--line);padding-top:12px;margin-top:auto}
.listing-card .listing-contact-row .agency-badge{flex:1;min-width:0;min-height:30px;border:0;padding:0;margin:0}
.listing-contact-row .agency-mark{max-width:105px;max-height:30px}
.listing-contact-row .agency-wordmark{overflow-wrap:anywhere}
.contact-agent-link{position:relative;z-index:2;color:var(--heritage);font:600 11px/1.4 Manrope,Arial,sans-serif;white-space:nowrap;text-decoration:underline;text-underline-offset:4px;padding:8px 0;display:inline-block}
.contact-agent-link:hover{color:var(--terracotta)}
.contact-agent-link:focus-visible{outline:2px solid var(--terracotta);outline-offset:4px}
.agency-profile-actions{display:flex;align-items:center;flex-wrap:wrap;gap:18px;margin-top:20px}
.atlas-card .contact-agent-link{display:block;width:fit-content;padding:8px 0;margin-top:2px}
.atlas-popup .contact-agent-link{display:block;margin-top:8px}
@media(min-width:801px){.cards>.listing-card .listing-contact-row{padding-top:8px;gap:7px}.cards>.listing-card .listing-contact-row .agency-mark{max-width:90px;max-height:24px}.cards>.listing-card .contact-agent-link{font-size:9px}}

/* Keep long property descriptions readable without changing their wording. */
.detail-description{white-space:normal}
.detail-description p{margin:0 0 1.15em;font:inherit;line-height:inherit;white-space:pre-line;max-width:none;color:#111}
.detail-description p:last-child{margin-bottom:0}
.detail-description.description-collapsible:not(.description-expanded){display:block;-webkit-line-clamp:unset;-webkit-box-orient:unset;max-height:15.2em;overflow:hidden}
.detail-description.description-expanded{max-height:none}

/* Photo treatment preview: five styles, each adjustable from light to strong. */
.photo-tone-control{display:grid;gap:9px;padding:12px 14px;border:1px solid var(--line);background:#fffdf8;max-width:100%;width:fit-content}
.photo-style-row{display:flex;align-items:center;justify-content:space-between;gap:16px;font:11px Manrope,Arial,sans-serif;color:var(--heritage)}
.photo-style-row select{min-width:145px;max-width:100%;padding:7px 10px;background:#f7f5ef;border:1px solid #d5d9cc;color:var(--heritage);font:inherit;cursor:pointer}
.photo-strength-row{display:flex;align-items:center;gap:9px;font:11px Manrope,Arial,sans-serif;color:var(--heritage)}
.photo-strength-row input{width:130px;max-width:30vw;margin:0;accent-color:var(--terracotta);cursor:pointer}
.photo-strength-row input:disabled{opacity:.35;cursor:default}
.photo-strength-end{font-size:10px;color:#6c756a}
.photo-strength-row output{min-width:32px;text-align:right;font-variant-numeric:tabular-nums;color:var(--terracotta)}
.photo-style-row select:focus-visible,.photo-strength-row input:focus-visible{outline:2px solid var(--terracotta);outline-offset:3px}
.gallery-dialog .photo-tone-control{background:#18352c;border-color:#768a80;padding:8px 12px}
.gallery-dialog .photo-style-row,.gallery-dialog .photo-strength-row,.gallery-dialog .photo-strength-end{color:#f7f5ef}
.gallery-dialog .photo-style-row select{background:#f7f5ef;color:#254b3d}
.gallery-dialog .photo-strength-row output{color:#e7b49b}
.gallery-dialog > img{height:min(62vh,calc(92dvh - 200px))}
@media(max-width:700px){.gallery-dialog .photo-tone-control{padding:8px 10px}.gallery-dialog > img{height:min(58vh,calc(92dvh - 240px))}.photo-strength-row{gap:7px}.photo-strength-row input{width:110px;max-width:27vw}.photo-style-row select{min-width:130px}}

@media(min-width:701px){.gallery-hero img{max-height:max(280px,calc(100dvh - 280px))}}
