/* Sports field and track lighting: homepage video feature, project pages and project summaries */

.cwec-sr-only {
  position: absolute !important;
  width: 1px; height: 1px;
  margin: -1px; padding: 0; border: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

/* Buttons (match the existing red brand buttons) */
.cwec-btn-row { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 28px; }
.cwec-btn-row--center { justify-content: center; }
#page-container a.cwec-btn {
  display: inline-block;
  padding: 12px 22px;
  border: 3px solid #ce2026;
  border-radius: 3px;
  background: #ce2026;
  color: #fff !important;
  font-size: 16px;
  font-weight: 600;
  line-height: 1.4;
  letter-spacing: 1px;
  text-transform: uppercase;
  text-decoration: none;
  text-align: center;
  transition: color .3s ease, background-color .3s ease, border-color .3s ease;
}
#page-container a.cwec-btn:hover, #page-container a.cwec-btn:focus-visible { background: #fff; border-color: #fff; color: #ce2026 !important; }
a.cwec-btn--outline { background: transparent; font-weight: 500; }
#page-container a.cwec-btn--outline:hover, #page-container a.cwec-btn--outline:focus-visible { background: #ce2026; border-color: #ce2026; color: #fff !important; }
#page-container .cwec-on-light a.cwec-btn:hover, #page-container .cwec-on-light a.cwec-btn:focus-visible { background: #111; border-color: #111; color: #fff !important; }
a.cwec-btn:focus-visible, .cwec-vf button:focus-visible { outline: 3px solid #fff; outline-offset: 3px; }
.cwec-on-light a.cwec-btn:focus-visible { outline-color: #111; }

/* ---------- Homepage video feature ---------- */
.cwec-vf {
  position: relative;
  background: #000;
  color: #fff;
  overflow: hidden;
}
.cwec-vf__media {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  background: #000;
}
.cwec-vf__poster,
.cwec-vf__poster img,
.cwec-vf__video {
  position: absolute;
  inset: 0;
  display: block;
  width: 100%;
  height: 100%;
  max-width: none;
  object-fit: contain;        /* never crop the track */
  object-position: center;
}
.cwec-vf__video { opacity: 0; transition: opacity .6s ease; }
.cwec-vf.is-playing .cwec-vf__video { opacity: 1; }
.cwec-vf__video[hidden] { display: none; }

.cwec-vf__play,
.cwec-vf__toggle {
  position: absolute;
  z-index: 3;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  border: 2px solid rgba(255,255,255,.85);
  border-radius: 50%;
  background: rgba(0,0,0,.55);
  color: #fff;
  cursor: pointer;
  transition: background-color .3s ease, border-color .3s ease;
}
.cwec-vf__play[hidden], .cwec-vf__toggle[hidden] { display: none; }
.cwec-vf__play:hover, .cwec-vf__toggle:hover { background: #ce2026; border-color: #ce2026; }
.cwec-vf__play {
  top: 50%; left: 50%;
  width: 72px; height: 72px;
  transform: translate(-50%, -50%);
}
.cwec-vf__toggle { left: 20px; bottom: 20px; width: 46px; height: 46px; }
.cwec-vf__play svg { width: 28px; height: 28px; margin-left: 4px; }
.cwec-vf__toggle svg { width: 18px; height: 18px; }
.cwec-vf svg { fill: currentColor; display: block; }
.cwec-vf__toggle .cwec-icon-play { display: none; margin-left: 2px; }
.cwec-vf__toggle[aria-pressed="true"] .cwec-icon-play { display: block; }
.cwec-vf__toggle[aria-pressed="true"] .cwec-icon-pause { display: none; }

.cwec-vf__content {
  position: relative;
  z-index: 2;
  padding: 36px 8% 48px;
  background: #0b0b0b;
}
.cwec-vf__content h2 {
  margin: 0 0 14px;
  padding: 0;
  color: #fff;
  font-size: 28px;
  font-weight: 300;
  line-height: 1.3;
  letter-spacing: 1px;
}
.cwec-vf__content h2 strong { font-weight: 700; }
.cwec-vf__content p {
  margin: 0;
  padding: 0;
  color: #e6e6e6;
  font-size: 17px;
  font-weight: 300;
  line-height: 1.8;
}

@media (min-width: 981px) {
  .cwec-vf {
    height: min(56.25vw, 80vh, 780px);
    min-height: 480px;
  }
  .cwec-vf__media { position: absolute; inset: 0; height: 100%; aspect-ratio: auto; }
  .cwec-vf__poster img, .cwec-vf__video { object-position: left center; }
  .cwec-vf__media::after {      /* scrim behind the text only; track stays clear */
    content: "";
    position: absolute;
    inset: 0;
    z-index: 1;
    background: linear-gradient(90deg, rgba(0,0,0,0) 48%, rgba(0,0,0,.78) 68%, rgba(0,0,0,.94) 100%);
    pointer-events: none;
  }
  .cwec-vf__content {
    position: absolute;
    top: 50%;
    right: 5%;
    width: min(440px, 34%);
    padding: 0;
    background: none;
    transform: translateY(-50%);
  }
  .cwec-vf__content h2 { font-size: 40px; }
  .cwec-vf__content p { font-size: 18px; }
  .cwec-vf .cwec-btn-row { flex-direction: column; align-items: stretch; }
}
@media (max-width: 479px) {
  .cwec-vf .cwec-btn-row { flex-direction: column; }
  .cwec-vf__play { width: 60px; height: 60px; }
}
@media (prefers-reduced-motion: reduce) {
  .cwec-vf__video, a.cwec-btn, .cwec-vf button { transition: none; }
}

/* ---------- Project pages ---------- */
.cwec-project-hero--plain.et_pb_section.et_pb_section_0 {
  background-image: linear-gradient(135deg, #111111 0%, #1b273d 100%) !important;
}
.cwec-project-overview .et_pb_row { padding-bottom: 0 !important; }
.cwec-project-overview .cwec-intro { max-width: 860px; margin: 0 0 36px; color: #444; }
.cwec-project-overview h2 { padding-bottom: 14px; }
.cwec-scope { max-width: 860px; margin: 0; padding: 0 0 0 0 !important; list-style: none !important; }
.cwec-scope li {
  position: relative;
  padding: 12px 0 12px 30px;
  border-bottom: 1px solid #e5e5e5;
  color: #444;
  line-height: 1.6;
}
.cwec-scope li::before {
  content: "";
  position: absolute;
  left: 2px; top: 1.3em;
  width: 12px;
  border-bottom: 2px solid #ce2026;
}
.cwec-project-overview.et_pb_section { padding-bottom: 54px; }
.cwec-project-media.et_pb_section { padding-top: 0; padding-bottom: 0; }
.cwec-project-media .et_pb_row { padding-top: 0 !important; }
.cwec-media-video { background: #000; margin-bottom: 20px; }
.cwec-media-video video { display: block; width: 100%; height: auto; aspect-ratio: 16 / 9; background: #000; }
.cwec-media-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 20px; }
.cwec-media-grid .et_pb_gallery_image { margin: 0; background: #000; }
.cwec-media-grid .et_pb_gallery_image a { display: block; position: relative; }
.cwec-media-grid img { display: block; width: 100%; height: auto; aspect-ratio: 3 / 2; object-fit: cover; }
@media (max-width: 767px) { .cwec-media-grid { grid-template-columns: 1fr; } }

/* ---------- Project summaries (service page) ---------- */
.cwec-summaries { margin-top: 60px; text-align: left; }
.cwec-summaries > h2 { padding-bottom: 20px; }
.cwec-summary {
  display: flex;
  gap: 24px;
  align-items: flex-start;
  padding: 24px 0;
  border-top: 1px solid #e5e5e5;
}
.cwec-summary__thumb { flex: 0 0 220px; display: block; background: #000; }
.cwec-summary__thumb img { display: block; width: 100%; height: auto; }
.cwec-summary__body { flex: 1 1 auto; min-width: 0; }
.cwec-summary h3 { margin: 0; padding: 0 0 8px; font-size: 22px; line-height: 1.3; }
#page-container .cwec-summary h3 a { color: #111 !important; text-decoration: none; }
#page-container .cwec-summary h3 a:hover { color: #ce2026 !important; }
.cwec-summary p { margin: 0; padding: 0 0 8px; text-align: left; }
.cwec-summary__more { color: #ce2026; font-weight: 600; letter-spacing: 1px; text-transform: uppercase; font-size: 14px; }
.cwec-summaries .cwec-btn-row { padding-top: 12px; border-top: 1px solid #e5e5e5; padding-top: 28px; margin-top: 0; }
@media (max-width: 600px) {
  .cwec-summary { flex-direction: column; }
  .cwec-summary__thumb { flex-basis: auto; width: 100%; }
}

/* ---------- Plain brand panel for project cards awaiting photography ---------- */
.et_portfolio_image.cwec-tile {
  display: block !important;
  aspect-ratio: 400 / 284;
  background: linear-gradient(135deg, #111111 0%, #1b273d 100%);
}
.cwec-media-row.et_pb_row { padding-top: 24px !important; }

/* ---------- Single-photo project gallery: wide crop held on the lit field, full frame opens on click ---------- */
.cwec-media-grid--single { grid-template-columns: 1fr; }
.cwec-media-grid--single img { aspect-ratio: 16 / 9; object-position: 50% 100%; }
@media (max-width: 767px) { .cwec-media-grid--single img { aspect-ratio: 4 / 3; } }
.cwec-media-full { margin: 0; padding: 14px 0 0; }
#page-container .cwec-media-full a { color: #ce2026; font-weight: 600; font-size: 14px; letter-spacing: 1px; text-transform: uppercase; }
#page-container .cwec-media-full a:hover, #page-container .cwec-media-full a:focus-visible { color: #111; }
