/* Static page templates: about (template-about.php), contacts (template-contacts.php), reviews (template-reviews.php);
   realtors (agents.php, single-agent.php) and an office (single-branch.php). */

.ev-contacts__head h1,
.ev-reviews__head h1 { margin: 6px 0 0; }
.ev-reviews__note { margin: 0 0 16px; color: var(--ev-ink-3); font-size: 14px; }
.ev-contacts__intro { max-width: 720px; margin-top: 14px; color: var(--ev-ink-2); }

/* The page head is followed closely by its content, not by the 150 px section gap. */
.ev-main > .ev-section + .ev-offices,
.ev-main > .ev-section + .ev-agent__objects,
.ev-main > .ev-section + .ev-reviews__body { margin-top: 32px; }

/* Offices: cards + one map */
.ev-offices { display: grid; gap: 20px; }
.ev-offices__list { display: grid; gap: 14px; margin: 0; padding: 0; list-style: none; }
.ev-office {
  display: grid; gap: 10px; padding: 22px;
  background: var(--ev-surface); border-radius: var(--ev-radius-md); transition: box-shadow 0.2s ease;
}
/* Linked with the map (assets/js/offices.js): the card of the office in focus gets a yellow bar (active state). */
.ev-office.has-pin { cursor: pointer; }
.ev-office.is-active { box-shadow: inset 4px 0 0 var(--ev-yellow), var(--ev-shadow-md); }
.ev-office__name { margin: 0; font-size: 18px; font-weight: 700; }
.ev-office__name a { color: var(--ev-ink); text-decoration: none; }
.ev-office__name a:hover { text-decoration: underline; }
.ev-office__row { display: flex; align-items: flex-start; gap: 10px; margin: 0; color: var(--ev-ink-2); }
.ev-office__row .ev-icon { flex: none; margin-top: 2px; color: var(--ev-cypress-deep); }
.ev-office__row a { color: var(--ev-ink); font-weight: 700; text-decoration: none; }
.ev-office__row a:hover { text-decoration: underline; }
.ev-office__actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 4px; }
.ev-office__actions:empty { display: none; }
.ev-offices__map {
  min-height: 360px; border-radius: var(--ev-radius-md); overflow: hidden;
  background: var(--ev-cypress-wash);
}
.ev-offices__map .leaflet-popup-content { font: 500 14px/1.45 var(--ev-font); }

@media (min-width: 1024px) {
  .ev-offices { grid-template-columns: minmax(340px, 1fr) 1.4fr; align-items: start; gap: 28px; }
  .ev-offices__map { position: sticky; top: 100px; min-height: 0; height: min(640px, calc(100vh - 140px)); }
}

/* General contacts + form: the request-block card (forms.css .ev-leadblock__inner) */
.ev-contacts__general h2 { margin: 0 0 20px; }
.ev-contacts__lines { display: grid; gap: 0; margin: 0; padding: 0; list-style: none; }
.ev-contacts__lines li {
  display: flex; gap: 14px; align-items: flex-start; padding: 16px 0; border-bottom: 1px solid var(--ev-line);
}
.ev-contacts__lines .ev-icon {
  flex: none; width: 44px; height: 44px; padding: 12px; border-radius: 50%;
  background: var(--ev-cypress-wash); color: var(--ev-cypress-deep); box-sizing: border-box;
}
.ev-contacts__lines a { color: var(--ev-ink); font-weight: 700; text-decoration: none; }
.ev-contacts__lines a:hover { text-decoration: underline; }
.ev-contacts__label {
  display: block; margin-bottom: 2px;
  font-size: 12px; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase; color: var(--ev-ink-3);
}
.ev-social--light a {
  display: inline-flex; align-items: center; justify-content: center; width: 44px; height: 44px; border-radius: 50%;
  background: var(--ev-bg); color: var(--ev-ink);
}
.ev-social--light a:hover { background: var(--ev-yellow); color: var(--ev-ink-on-yellow); }
.ev-social--light a:focus-visible { outline: 2px solid var(--ev-ink); outline-offset: 2px; }

/* Reviews */
.ev-reviews__head { display: grid; gap: 20px; align-items: end; }
.ev-reviews__score {
  display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin: 0; padding: 18px 22px;
  background: var(--ev-surface); border-radius: var(--ev-radius-md); color: var(--ev-ink-2);
}
.ev-reviews__avg { font-size: 34px; font-weight: 800; color: var(--ev-ink); line-height: 1; }
.ev-stars { display: inline-flex; gap: 2px; margin: 0; color: var(--ev-cypress-deep); } /* Not yellow: yellow is for clickable things only (TQ). */
.ev-stars .ev-icon { fill: currentColor; stroke-width: 1; }
.ev-reviews__list { display: grid; gap: 16px; margin: 0; padding: 0; list-style: none; }
.ev-review {
  display: flex; flex-direction: column; gap: 12px; padding: 24px;
  background: var(--ev-surface); border-radius: var(--ev-radius-md);
}
.ev-review__title { margin: 0; font-size: 18px; font-weight: 700; line-height: 1.3; }
.ev-review__text { color: var(--ev-ink-2); line-height: 1.6; }
.ev-review__text p { margin: 0 0 10px; }
.ev-review__text p:last-child { margin-bottom: 0; }
.ev-review__meta {
  display: flex; flex-wrap: wrap; justify-content: space-between; gap: 6px 14px; margin: auto 0 0; padding-top: 14px;
  border-top: 1px solid var(--ev-line); font-size: 14px; color: var(--ev-ink-3);
}
.ev-review__author { font-weight: 700; color: var(--ev-ink); }
/* «Залишити відгук» */
.ev-reviews__side { display: flex; flex-wrap: wrap; align-items: center; gap: 14px; }
.ev-review-form { padding: 28px; }

@media (min-width: 768px) {
  .ev-reviews__list { grid-template-columns: repeat(2, 1fr); }
}
@media (min-width: 1024px) {
  .ev-reviews__head { grid-template-columns: 1fr auto; }
  .ev-reviews__list { grid-template-columns: repeat(3, 1fr); gap: 20px; }
}
.ev-review[hidden] { display: none; }
.ev-reviews__more { display: flex; justify-content: center; margin: 32px 0 0; }

/* About */
.ev-about-page__head h1 { margin: 6px 0 0; max-width: 900px; }
.ev-about-page__lead { max-width: 720px; margin-top: 16px; font-size: 18px; color: var(--ev-ink-2); line-height: 1.6; }
.ev-main > .ev-section + .ev-about-stats { margin-top: 40px; }
.ev-about-stats__list {
  display: grid; grid-template-columns: repeat(2, 1fr); gap: 24px; margin: 0; padding: 28px;
  background: var(--ev-surface); border-radius: var(--ev-radius-md);
}
.ev-about-stats__item { margin: 0; }
.ev-about-stats__value { font-size: var(--ev-fs-title); font-weight: 800; line-height: 1; color: var(--ev-cypress); }
.ev-about-stats__label { margin: 6px 0 0; font-size: 14px; color: var(--ev-ink-3); }
.ev-about-services { display: grid; gap: 16px; margin: 24px 0 0; padding: 0; list-style: none; }
.ev-about-service {
  display: grid; gap: 10px; align-content: start; padding: 24px;
  background: var(--ev-surface); border-radius: var(--ev-radius-md);
}
.ev-about-service > .ev-icon { color: var(--ev-cypress-deep); }
.ev-about-service__title { margin: 0; font-size: 20px; font-weight: 700; }
.ev-about-service__text { margin: 0; color: var(--ev-ink-2); line-height: 1.6; }
.ev-about-service__more { display: inline-flex; align-items: center; gap: 6px; color: var(--ev-ink); font-weight: 700; text-decoration: none; }
.ev-about-service__more:hover { text-decoration: underline; }
.ev-team { display: grid; grid-template-columns: repeat(2, 1fr); gap: 16px; margin: 24px 0 0; padding: 0; list-style: none; }
.ev-team__member { padding: 20px; background: var(--ev-surface); border-radius: var(--ev-radius-md); text-align: center; }
.ev-team__photo {
  display: block; width: 96px; height: 96px; margin: 0 auto 12px; border-radius: 50%; object-fit: cover;
  background: var(--ev-cypress-wash);
}
.ev-team__link { display: block; color: var(--ev-ink); text-decoration: none; }
.ev-team__link:hover .ev-team__name { text-decoration: underline; }
.ev-team__link:focus-visible { outline: 2px solid var(--ev-ink); outline-offset: 4px; border-radius: var(--ev-radius-sm); }
.ev-team__name { margin: 0; font-weight: 700; }
.ev-team__position { margin: 4px 0 0; font-size: 14px; color: var(--ev-ink-3); }
.ev-team__office { margin: 8px 0 0; font-size: 14px; color: var(--ev-ink-2); }
.ev-team__count { margin: 4px 0 0; font-size: 14px; font-weight: 700; color: var(--ev-ink); }

/* Realtors list */
.ev-people__head h1 { margin: 0; }
.ev-people__lead { max-width: 720px; margin: 14px 0 0; color: var(--ev-ink-2); }
.ev-people__office { color: var(--ev-ink); text-decoration: none; }
.ev-people__office:hover { text-decoration: underline; }

/* Realtor page: profile + contact column, then the realtor's properties */
.ev-agent__layout { margin-top: 24px; }
.ev-agent__profile {
  display: grid; gap: 20px; align-content: start; align-self: start; padding: 24px;
  background: var(--ev-surface); border-radius: var(--ev-radius-md);
}
.ev-agent__photo { display: block; width: 140px; height: 140px; border-radius: 50%; object-fit: cover; background: var(--ev-cypress-wash); }
.ev-agent__name { margin: 4px 0 0; }
.ev-agent__office { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 8px; margin: 12px 0 0; color: var(--ev-ink-2); }
.ev-agent__office .ev-icon { color: var(--ev-cypress-deep); }
.ev-agent__office a { color: var(--ev-ink); font-weight: 700; text-decoration: none; }
.ev-agent__office a:hover { text-decoration: underline; }
.ev-agent__count { margin: 8px 0 0; }
.ev-agent__count a { color: var(--ev-ink); font-weight: 700; }
.ev-agent__messengers { margin-top: 14px; }
.ev-agent__bio { padding-top: 20px; border-top: 1px solid var(--ev-line); color: var(--ev-ink-2); }
.ev-agent__aside { display: grid; gap: 14px; }
.ev-agent__objects .ev-pagination { margin-top: 28px; }
.ev-about-page__row { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 16px; }
.ev-about-page__row h2 { margin: 0; }
.ev-about-offices { display: grid; gap: 12px; margin: 24px 0 0; padding: 0; list-style: none; }
.ev-about-offices li { display: flex; gap: 10px; align-items: flex-start; padding: 18px 20px; background: var(--ev-surface); border-radius: var(--ev-radius-md); color: var(--ev-ink-2); }
.ev-about-offices .ev-icon { flex: none; margin-top: 2px; color: var(--ev-cypress-deep); }
.ev-about-offices strong { color: var(--ev-ink); }

@media (min-width: 768px) {
  .ev-agent__profile { grid-template-columns: 140px minmax(0, 1fr); column-gap: 28px; padding: 32px; }
  .ev-agent__bio { grid-column: 1 / -1; }
  .ev-about-stats__list { grid-template-columns: repeat(4, 1fr); padding: 36px; }
  .ev-about-services { grid-template-columns: repeat(2, 1fr); }
  .ev-team { grid-template-columns: repeat(3, 1fr); }
  .ev-about-offices { grid-template-columns: repeat(2, 1fr); }
}
@media (min-width: 1024px) {
  .ev-about-services { grid-template-columns: repeat(4, 1fr); }
  .ev-team { grid-template-columns: repeat(4, 1fr); gap: 20px; }
  .ev-about-offices { grid-template-columns: repeat(3, 1fr); }
}
