/* Projects, area and case-study layout for the new Bournemouth pages.
   Additive only. Do not replace css/style.css. Existing pages do not
   load this file, so live pages stay untouched. */

.content-section { padding: 80px 0; background: var(--surface); }
.content-section.alt { background: var(--pale-bg); }
.photo-stack { display: flex; flex-direction: column; gap: 24px; }
.photo-stack img { width: 100%; border-radius: 6px; box-shadow: var(--shadow-lg); }
.photo-stack figcaption { font-size: 0.88rem; color: var(--text-m); margin-top: 10px; }

.facts { margin: 32px 0; display: grid; grid-template-columns: 1fr 1fr; gap: 0; border-top: 1px solid var(--border); }
.facts div { display: flex; flex-direction: column; gap: 2px; padding: 14px 16px 14px 0; border-bottom: 1px solid var(--border); }
.facts dt { font-family: var(--ff-head); font-size: 0.75rem; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; color: var(--sky); }
.facts dd { font-family: var(--ff-head); font-weight: 600; color: var(--text-h); }

.comment-space {
  margin: 36px 0;
  padding: 24px 28px;
  border: 1px dashed var(--border);
  border-radius: 6px;
  background: var(--pale-bg);
}
.comment-space blockquote { margin: 8px 0 0; }
.comment-placeholder-text { color: var(--text-m); font-style: italic; max-width: none; }
.comment-space cite {
  display: block; margin-top: 10px;
  font-family: var(--ff-head); font-style: normal; font-weight: 700;
  color: var(--text-h); font-size: 0.92rem;
}
.comment-note { font-size: 0.8rem; color: var(--text-m); margin-top: 12px; max-width: none; }

.more-links { margin-top: 28px; font-size: 0.95rem; max-width: none; }
.more-links a { color: var(--sky); font-weight: 600; }

.project-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 28px; margin-top: 36px; }
.project-card {
  display: flex; flex-direction: column;
  background: var(--surface); border-radius: 6px; overflow: hidden;
  box-shadow: var(--shadow-md); color: inherit;
  transition: transform var(--transition), box-shadow var(--transition);
}
.project-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-lg); }
.project-card.is-highlighted { outline: 3px solid var(--sky); outline-offset: 2px; }
.project-card img { width: 100%; height: 220px; object-fit: cover; }
.project-card-body { padding: 22px 22px 24px; }
.project-card-body .sec-label { margin-bottom: 10px; }
.project-card-body h3 { margin-bottom: 8px; }
.project-card-body p { font-size: 0.95rem; color: var(--text-m); }
.project-card-link {
  display: inline-block; margin-top: 14px;
  font-family: var(--ff-head); font-weight: 700; font-size: 0.88rem;
  color: var(--sky); letter-spacing: 0.03em;
}

.service-links { display: flex; flex-direction: column; gap: 14px; margin-top: 16px; }
.service-links a, .service-links .is-waiting {
  display: block; padding: 16px 18px;
  border: 1px solid var(--border); border-radius: 6px;
  font-family: var(--ff-head); font-weight: 700; color: var(--text-h);
}
.service-links a:hover { border-color: var(--sky); color: var(--sky); }
.service-links .is-waiting { color: var(--text-m); font-weight: 600; }
.service-links .is-waiting em { display: block; font-style: normal; font-weight: 400; font-family: var(--ff-body); font-size: 0.9rem; margin-top: 4px; }

.faq-list { display: flex; flex-direction: column; gap: 28px; margin-top: 12px; }
.faq-list h3 { margin-bottom: 8px; }
.faq-block h2 { margin-bottom: 28px; }

#projects-map {
  position: relative;
  width: 100%;
  aspect-ratio: 1180 / 480;
  margin-top: 28px;
  border-radius: 6px;
  box-shadow: var(--shadow-md);
  background: #dce6ef;
  overflow: hidden;
}
#projects-map > img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  pointer-events: none;
  border-radius: 6px;
}
.map-pin {
  position: absolute;
  transform: translate(-50%, -100%);
  background: none;
  border: 0;
  padding: 0;
  cursor: pointer;
  z-index: 2;
  filter: drop-shadow(0 2px 4px rgba(0,0,0,0.35));
}
.map-pin::before {
  content: "";
  position: absolute;
  inset: -12px -14px -8px -14px;
}
.map-pin svg { display: block; position: relative; }
.map-pin:hover, .map-pin:focus, .map-pin.is-open { z-index: 3; outline: none; }
.map-popup {
  display: none;
  position: absolute;
  left: 50%;
  bottom: calc(100% + 8px);
  transform: translateX(-50%);
  background: #fff;
  color: var(--text-h);
  padding: 10px 14px;
  border-radius: 6px;
  box-shadow: var(--shadow-md);
  white-space: nowrap;
  font-family: var(--ff-body);
  font-size: 0.92rem;
  line-height: 1.35;
  pointer-events: none;
}
.map-popup strong { display: block; font-family: var(--ff-head); font-weight: 700; }
.map-popup span { color: var(--text-m); font-size: 0.85rem; }
.map-pin:hover .map-popup,
.map-pin:focus .map-popup,
.map-pin.is-open .map-popup { display: block; }
.map-popup::after {
  content: "";
  position: absolute;
  left: 50%;
  bottom: -6px;
  transform: translateX(-50%);
  border: 6px solid transparent;
  border-top-color: #fff;
  border-bottom-width: 0;
}
.map-attribution {
  position: absolute;
  right: 8px;
  bottom: 6px;
  margin: 0;
  font-size: 0.68rem;
  color: #333;
  background: rgba(255,255,255,0.75);
  padding: 1px 6px;
  border-radius: 2px;
  z-index: 1;
}
.map-hint { margin-top: 14px; font-size: 0.9rem; color: var(--text-m); }

@media (max-width: 900px) {
  .project-grid { grid-template-columns: 1fr; }
  .facts { grid-template-columns: 1fr; }
  .rg-2-start { grid-template-columns: 1fr; gap: 36px; }
}

@media (max-width: 768px) {
  .content-section { padding: 56px 0; }
  .comment-space { padding: 20px 16px; }
}

/* On phones the map is too short for a label above the pin, so flip it below
   and let it extend past the map edge. Tablet and up keep the label above.
   width: max-content stops the label shrinking to a tall, skinny column. */
@media (max-width: 600px) {
  #projects-map { overflow: visible; }
  .map-popup {
    bottom: auto;
    top: calc(100% + 8px);
    width: max-content;
    max-width: min(280px, calc(100vw - 48px));
    white-space: normal;
    text-align: center;
  }
  .map-popup::after {
    bottom: auto;
    top: -6px;
    border-top-color: transparent;
    border-bottom-color: #fff;
    border-top-width: 0;
    border-bottom-width: 6px;
  }
}
