/* ==========================================================================
   Client corrections — pages 2–6 (loaded after pages.css)
   ========================================================================== */

/* ---------- Trusted partners (real logos) ---------------------------------- */

.partners__row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: clamp(32px, 6vw, 88px);
}
.partners__logo {
  height: 74px;
  width: auto;
  max-width: 220px;
  object-fit: contain;
  transition: transform 0.5s var(--ease-out);
}
.partners__logo:hover { transform: translateY(-3px); }

/* ---------- Event detail layout -------------------------------------------- */

.detail--wide .detail__head { max-width: 820px; margin-inline: auto; }

.event-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 320px;
  gap: clamp(40px, 5vw, 72px);
  align-items: start;
  margin-top: clamp(36px, 4vw, 52px);
}
.event-layout__main .prose { max-width: none; }
.event-layout__main .lead { font-size: 1.125rem; line-height: 1.8; color: var(--charcoal); }
.event-layout__side { position: sticky; top: calc(var(--nav-h) + 24px); display: grid; gap: 22px; }

.event-side {
  padding: 26px 26px 28px;
  background: var(--off-white);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
}
.event-side__title {
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--orange);
}
.event-side__sub {
  margin: 18px 0 10px;
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--muted);
}

.event-dl { margin: 18px 0 0; display: grid; gap: 14px; }
.event-dl > div { display: grid; gap: 3px; }
.event-dl dt { font-size: 0.6875rem; font-weight: 600; letter-spacing: 0.12em; text-transform: uppercase; color: var(--muted); }
.event-dl dd { margin: 0; font-size: 0.9375rem; line-height: 1.55; color: var(--charcoal); }
.event-dl dd a { color: var(--charcoal); }
.event-dl dd a:hover { color: var(--orange); }

.logo-row {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 12px;
}
.logo-row img {
  height: 48px;
  width: auto;
  max-width: 130px;
  object-fit: contain;
  padding: 8px 10px;
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: 10px;
}

.event-block { margin-top: clamp(40px, 4.5vw, 56px); }
.event-block__title {
  font-size: clamp(1.25rem, 2vw, 1.55rem);
  letter-spacing: -0.01em;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--line);
}
.event-block__sub {
  margin: 26px 0 14px;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--orange);
}

.people-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 22px;
}
.person {
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.person__photo {
  width: 100%;
  aspect-ratio: 1;
  object-fit: cover;
  object-position: 50% 20%;
  border-radius: var(--r-md);
  background: var(--off-white);
  border: 1px solid var(--line);
}
.person__photo--initials {
  display: grid;
  place-items: center;
  font-family: var(--font-display);
  font-size: 1.5rem;
  font-weight: 600;
  color: var(--orange);
  background: rgba(242, 107, 33, 0.09);
  border-color: rgba(242, 107, 33, 0.18);
}
.person figcaption { display: grid; gap: 2px; }
.person__name { font-family: var(--font-display); font-size: 0.9375rem; font-weight: 600; line-height: 1.3; }
.person__role { font-size: 0.8125rem; color: var(--charcoal); line-height: 1.4; }
.person__org { font-size: 0.8125rem; color: var(--muted); line-height: 1.4; }

.materials, .gallery {
  display: grid;
  gap: 16px;
  margin-top: 22px;
}
.materials { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.gallery { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.materials__item, .gallery__item {
  display: block;
  border-radius: var(--r-md);
  overflow: hidden;
  background: var(--off-white);
  border: 1px solid var(--line);
  transition: transform 0.5s var(--ease-out), box-shadow 0.5s var(--ease-out);
}
.materials__item:hover, .gallery__item:hover { transform: translateY(-4px); box-shadow: var(--shadow-md); }
.materials__item img { width: 100%; height: auto; display: block; }
.gallery__item img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; display: block; }

.placeholder code {
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 0.85em;
  padding: 2px 6px;
  border-radius: 5px;
  background: var(--white);
  border: 1px solid var(--line);
}

/* ---------- Article body (recovered WP posts) ------------------------------ */

.article-body { max-width: none; }
.article-body h2 {
  margin: 40px 0 0;
  font-size: clamp(1.25rem, 2vw, 1.55rem);
  line-height: 1.3;
  letter-spacing: -0.01em;
}
.article-body h3 { margin: 30px 0 0; font-size: 1.125rem; line-height: 1.35; }
.article-body p { margin-top: 18px; }
.article-body > p:first-child, .article-body > h2:first-child { margin-top: 0; }
.article-body ul, .article-body ol { margin: 18px 0 0; padding-left: 1.4em; color: var(--muted); font-size: 1.0625rem; line-height: 1.8; }
.article-body li + li { margin-top: 8px; }
.article-body strong { color: var(--charcoal); }
.article-body a { color: var(--orange); font-weight: 500; }
.article-body a:hover { text-decoration: underline; }
.article-body img {
  margin: 30px 0 0;
  width: 100%;
  height: auto;
  border-radius: var(--r-md);
  border: 1px solid var(--line);
}
.article-body blockquote {
  margin: 30px 0 0;
  padding: 20px 26px;
  border-left: 3px solid var(--orange);
  background: var(--off-white);
  border-radius: 0 var(--r-md) var(--r-md) 0;
  font-size: 1.0625rem;
  line-height: 1.75;
  color: var(--charcoal);
}
.article-body table { width: 100%; margin-top: 24px; border-collapse: collapse; font-size: 0.9375rem; }
.article-body th, .article-body td { padding: 10px 12px; border-bottom: 1px solid var(--line); text-align: left; vertical-align: top; }
.article-body th { font-weight: 600; color: var(--charcoal); }
.article-foot { margin-top: clamp(40px, 4.5vw, 56px); padding-top: 26px; border-top: 1px solid var(--line); }

.news-grid--3 { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 28px; }
.news-grid--3 .news-card__title { font-size: 1.0625rem; }

/* ---------- Contact page (old-site layout) --------------------------------- */

.page-hero--compact { min-height: 0; padding-block: calc(var(--nav-h) + 56px) 48px; }

.contact-map { position: relative; line-height: 0; background: var(--off-white); }
.contact-map iframe { width: 100%; height: 420px; border: 0; display: block; }
.contact-map__link {
  position: absolute;
  right: 20px; bottom: 20px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 16px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.9);
  border: 1px solid var(--line);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  box-shadow: var(--shadow-sm);
  font-size: 0.8125rem;
  font-weight: 600;
  line-height: 1;
  color: var(--charcoal);
  transition: color 0.3s var(--ease);
}
.contact-map__link:hover { color: var(--orange); }

.contact-details { position: relative; z-index: 2; margin-top: -72px; }

.contact-panel {
  max-width: 820px;
  margin-inline: auto;
  padding: clamp(28px, 3.5vw, 44px);
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  box-shadow: var(--shadow-lg);
  text-align: center;
}
.contact-panel__title { margin-top: 12px; font-size: clamp(1.4rem, 2.4vw, 1.9rem); letter-spacing: -0.015em; }

.contact-panel__list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 22px 32px;
  margin: 30px 0 0;
  padding: 0;
  list-style: none;
  text-align: left;
}
.contact-panel__list li { display: flex; gap: 14px; align-items: flex-start; }
.contact-panel__list li > span:last-child { display: grid; gap: 3px; font-size: 0.9375rem; line-height: 1.6; color: var(--charcoal); }
.contact-panel__list strong { font-size: 0.6875rem; font-weight: 600; letter-spacing: 0.14em; text-transform: uppercase; color: var(--muted); }
.contact-panel__list a:hover { color: var(--orange); }

.contact-panel__social {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px;
  margin-top: 30px;
  padding-top: 26px;
  border-top: 1px solid var(--line);
}
.contact-panel__social a {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 9px 16px;
  border-radius: 999px;
  border: 1px solid var(--line-strong);
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--charcoal);
  transition: border-color 0.3s var(--ease), color 0.3s var(--ease), transform 0.3s var(--ease-out);
}
.contact-panel__social a:hover { border-color: var(--orange); color: var(--orange); transform: translateY(-2px); }
.contact-panel__social a[aria-disabled="true"] { opacity: 0.45; cursor: not-allowed; }
.contact-panel__social a[aria-disabled="true"]:hover { border-color: var(--line-strong); color: var(--charcoal); transform: none; }

.contact__grid--even { grid-template-columns: 1fr 1fr; }

.hours { margin-top: 30px; }
.hours__table {
  width: 100%;
  border-collapse: collapse;
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  overflow: hidden;
  font-size: 0.9375rem;
}
.hours__table th, .hours__table td { padding: 14px 18px; text-align: left; border-bottom: 1px solid var(--line); }
.hours__table thead th {
  font-size: 0.6875rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted);
  background: var(--off-white);
}
.hours__table tbody th { font-weight: 600; color: var(--charcoal); }
.hours__table tbody td { color: var(--muted); font-variant-numeric: tabular-nums; }
.hours__table tr:last-child th, .hours__table tr:last-child td { border-bottom: 0; }

/* ---------- Jobs ------------------------------------------------------------- */

.jobs { display: grid; gap: 16px; }
.jobs__title { display: flex; align-items: center; gap: 12px; font-size: 1.25rem; letter-spacing: -0.01em; margin-bottom: 6px; }
.jobs__count {
  display: inline-grid;
  place-items: center;
  min-width: 28px; height: 28px;
  padding-inline: 8px;
  border-radius: 999px;
  background: var(--orange);
  color: var(--white);
  font-size: 0.8125rem;
  font-weight: 700;
}
.job-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 24px 26px;
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  box-shadow: var(--shadow-sm);
  transition: transform 0.5s var(--ease-out), box-shadow 0.5s var(--ease-out);
}
.job-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-md); }
.job-card:hover .service__arrow { background: var(--orange); border-color: var(--orange); color: var(--white); transform: translateX(4px); }
.job-card__title { font-size: 1.0625rem; letter-spacing: -0.005em; }
.job-card__summary { margin-top: 8px; font-size: 0.9375rem; line-height: 1.65; color: var(--muted); }

.job-meta { display: flex; flex-wrap: wrap; gap: 8px; margin: 14px 0 0; padding: 0; list-style: none; }
.job-meta li {
  padding: 5px 12px;
  border-radius: 999px;
  background: var(--off-white);
  border: 1px solid var(--line);
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--muted);
}
.detail__head .job-meta { justify-content: center; margin-top: 22px; }

/* ---------- Visitor counter ------------------------------------------------- */

.counter { display: flex; gap: 6px; }
.counter span {
  display: grid;
  place-items: center;
  width: 30px; height: 36px;
  border-radius: 7px;
  background: rgba(255, 255, 255, 0.07);
  border: 1px solid rgba(255, 255, 255, 0.09);
  font-size: 0.9375rem;
  font-weight: 600;
  color: var(--white);
  font-variant-numeric: tabular-nums;
}
.counter--live span { border-color: rgba(242, 107, 33, 0.45); }

/* ---------- Responsive ------------------------------------------------------- */

@media (max-width: 1024px) {
  .event-layout { grid-template-columns: 1fr; }
  .event-layout__side { position: static; grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .people-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .news-grid--3 { grid-template-columns: 1fr; }
  .contact__grid--even { grid-template-columns: 1fr; }
}

@media (max-width: 768px) {
  .partners__logo { height: 54px; max-width: 150px; }
  .event-layout__side { grid-template-columns: 1fr; }
  .people-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
  .materials, .gallery { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
  .contact-map iframe { height: 300px; }
  .contact-details { margin-top: -40px; }
  .contact-panel__list { grid-template-columns: 1fr; }
  .hours__table th, .hours__table td { padding: 12px 12px; font-size: 0.875rem; }
  .job-card { flex-direction: column; align-items: flex-start; }
}

/* ---------- Company video ---------------------------------------------------- */

/* The poster is the video's own 16:9 thumbnail — show all of it, not a 4:3 crop.
   The player stays in its column; it does not expand or move when playing. */
.welcome__video img { aspect-ratio: 16 / 9; object-position: 50% 50%; }
.welcome__video.is-playing .welcome__player { object-fit: contain; }

/* ---------- Event card: no rules at all ------------------------------------ */

/* Drop the hairline between title and description. */
.event-card__desc { border-top: 0; padding-top: 0; margin-top: 12px; }

/* Solid card colour from the lower third of the photo up — the title, badge and
   image edge are all well inside flat charcoal at every card width. */
.event-card__media::after {
  height: 78%;
  background: linear-gradient(180deg,
    rgba(17, 17, 17, 0)    0%,
    rgba(17, 17, 17, 0.40) 28%,
    rgba(17, 17, 17, 0.86) 52%,
    var(--charcoal)        70%,
    var(--charcoal)        100%);
}

/* Badge is a flex child of the card body — stop it stretching to full width. */
.event-card__flag { align-self: flex-start; }
.event-card__body { margin-top: -60px; }

/* ---------- Event card: hover leak fix + refinement ------------------------ */

/* ROOT CAUSE: on hover the photo scales to 1.05 and its bottom edge spilled
   out of the media box, below the gradient, as a bright strip behind the
   title. Clip the media box so the scaled image can never leave it. */
.event-card__media { overflow: hidden; }

/* Belt and braces: the body is solid card colour, so nothing behind it can
   ever show through — the fade lives entirely on the media box above. */
.event-card__body { background: var(--charcoal); }

/* Refinement */
.event-card {
  border-radius: 24px;
  box-shadow: 0 1px 2px rgba(17, 17, 17, 0.06), inset 0 1px 0 rgba(255, 255, 255, 0.06);
}
.event-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 36px 70px -32px rgba(17, 17, 17, 0.55), inset 0 1px 0 rgba(255, 255, 255, 0.08);
}
.event-card__flag {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 5px 11px;
  letter-spacing: 0.16em;
}
.event-card__flag::before {
  content: "";
  width: 6px; height: 6px;
  border-radius: 50%;
  background: var(--white);
  box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.22);
}
.event-card__title { font-size: 1.0625rem; letter-spacing: -0.01em; }
.event-card__desc { margin-top: 12px; color: rgba(255, 255, 255, 0.62); }

/* Orange accent slides in along the bottom on hover — same language as the
   service cards' top bar, so the two card families feel related. */
.event-card::after {
  content: "";
  position: absolute;
  left: 0; right: 0; bottom: 0;
  height: 3px;
  background: var(--orange);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.55s var(--ease-out);
}
.event-card:hover::after { transform: scaleX(1); }

.event-card { position: relative; }

/* ---------- Event card: photo in full, text below --------------------------- */

/* The text no longer overlaps the photo, so the photo needs no heavy shading.
   Keep only a short, soft dissolve at the join so the edge isn't a hard cut. */
.event-card__media::after {
  height: 26%;
  background: linear-gradient(180deg,
    rgba(17, 17, 17, 0)    0%,
    rgba(17, 17, 17, 0.35) 55%,
    var(--charcoal)        100%);
}
.event-card__body {
  margin-top: 0;
  padding: 20px 24px 26px;
}
.event-card__flag { margin-bottom: 12px; }
