/* ==========================================================================
   WEBSITE-PROJECTS.CSS
   Page-specific layer for website-projects.html.
   Builds on css/our-work.css (shared Our Work components: filter pills,
   project cards, device mockup, process steps, final CTA) and the .svc-page
   tokens from service-modern.css. Scoped under .wp-page.
   Sections 8-9: filter pills above the project grid and the reusable
   project popup (#project-modal) built by js/website-projects.js.
   Loaded AFTER our-work.css.
   ========================================================================== */

/* --------------------------------------------------------------------------
   1. HERO — content · image · benefit list
   -------------------------------------------------------------------------- */
.wp-hero {
  position: relative;
  overflow: hidden;
  padding: 40px 0 34px;
  background: linear-gradient(180deg, #ffffff 0%, var(--cs-pale-2) 100%);
}

.wp-hero__grid {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(0, 0.95fr) minmax(0, 0.75fr);
  gap: 28px;
  align-items: center;
}

.wp-hero__title {
  font-family: var(--font-head);
  font-weight: 800;
  font-size: clamp(2rem, 4.1vw, 3.1rem);
  line-height: 1.1;
  letter-spacing: -0.02em;
  color: var(--cs-navy);
  margin: 4px 0 18px;
}

.wp-hero__title span {
  display: block;
  color: var(--accent2);
}

.wp-hero__text {
  font-size: 1rem;
  line-height: 1.72;
  color: var(--text2);
  margin: 0;
  max-width: 520px;
}

.wp-hero__visual {
  position: relative;
  border-radius: 22px;
  overflow: hidden;
  box-shadow: var(--cs-shadow-hover);
  aspect-ratio: 1 / 1;
  max-height: 380px;
  width: 100%;
  justify-self: center;
}

.wp-hero__img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
  object-position: center;
  transition: transform 0.7s var(--svc-ease);
}

.wp-hero__visual:hover .wp-hero__img {
  transform: scale(1.04);
}

.wp-hero__visual::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
  background: linear-gradient(200deg, rgba(255, 255, 255, 0.78) 0%, rgba(255, 255, 255, 0) 42%);
  pointer-events: none;
}

.wp-hero__hand {
  position: absolute;
  z-index: 2;
  top: 8%;
  right: 8%;
  font-size: clamp(1.4rem, 2.1vw, 1.9rem);
  color: var(--cs-navy);
  text-align: left;
  transform: rotate(-5deg);
}

/* benefit list */
.wp-hero__benefits {
  list-style: none;
  margin: 0;
  padding: 22px 20px;
  display: grid;
  gap: 18px;
  background: var(--cs-pale);
  border: 1px solid var(--cs-line);
  border-radius: 18px;
}

.wp-benefit {
  display: flex;
  align-items: center;
  gap: 14px;
}

.wp-benefit__icon {
  width: 44px;
  height: 44px;
  flex: none;
  display: grid;
  place-items: center;
  border-radius: 12px;
  background: #fff;
  color: var(--accent2);
  font-size: 1.25rem;
  box-shadow: 0 6px 16px rgba(6, 42, 107, 0.07);
}

.wp-benefit__icon i {
  display: inline-flex;
  line-height: 1;
}

.wp-benefit strong {
  display: block;
  font-family: var(--font-head);
  font-weight: 700;
  font-size: 0.92rem;
  color: var(--cs-navy);
  line-height: 1.3;
}

.wp-benefit span:last-child {
  font-size: 0.8rem;
  line-height: 1.45;
  color: var(--text2);
}

/* --------------------------------------------------------------------------
   2. FEATURED WEBSITE PROJECT
   -------------------------------------------------------------------------- */
.wp-featured {
  padding: 30px 0 10px;
}

.wp-featured__card {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.05fr) minmax(0, 0.42fr);
  align-items: center;
  background: linear-gradient(135deg, var(--cs-pale-2) 0%, var(--cs-pale) 100%);
  border: 1px solid var(--cs-line);
  border-radius: 24px;
  box-shadow: var(--cs-shadow);
  overflow: hidden;
}

.wp-featured__main {
  padding: 34px 20px 34px 38px;
  min-width: 0;
}

.wp-featured__client {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 2px 0 14px;
}

.wp-featured__client-name {
  font-family: var(--font-head);
  font-weight: 800;
  font-size: 1.15rem;
  color: var(--text);
}

.wp-featured__title {
  font-family: var(--font-head);
  font-weight: 800;
  font-size: clamp(1.45rem, 2.4vw, 1.95rem);
  line-height: 1.18;
  color: var(--cs-navy);
  margin: 0 0 10px;
}

.wp-featured__meta {
  font-family: var(--font-head);
  font-weight: 600;
  font-size: 0.84rem;
  color: var(--accent);
  margin: 0 0 8px;
}

.wp-featured__meta span {
  color: var(--text3);
  font-weight: 500;
}

.wp-featured__desc {
  font-size: 0.92rem;
  line-height: 1.65;
  color: var(--text2);
  margin: 0 0 16px;
}

.wp-featured__services {
  list-style: none;
  margin: 0 0 18px;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 10px 22px;
}

.wp-featured__services li {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-head);
  font-weight: 700;
  font-size: 0.8rem;
  color: var(--cs-navy);
}

.wp-featured__services i {
  font-size: 1.3rem;
  line-height: 1;
  display: inline-flex;
  color: var(--accent2);
}

.wp-featured__subhead {
  font-family: var(--font-head);
  font-weight: 700;
  font-size: 0.74rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--accent);
  margin: 0 0 10px;
}

.wp-featured__highlights {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 7px 18px;
}

.wp-featured__highlights li {
  position: relative;
  padding-left: 22px;
  font-size: 0.84rem;
  line-height: 1.45;
  color: var(--text2);
}

.wp-featured__highlights li::before {
  content: "\f26a"; /* bootstrap-icons check-circle-fill */
  font-family: "bootstrap-icons";
  position: absolute;
  left: 0;
  top: 0.12em;
  font-size: 0.85rem;
  line-height: 1;
  color: var(--accent2);
}

.wp-featured__btns {
  margin-top: 24px;
}

.wp-featured__visual {
  padding: 30px 10px;
  min-width: 0;
}

.wp-devices {
  max-width: 520px;
  margin: 0 auto;
  padding-right: 72px;
}

.wp-featured__quote {
  align-self: stretch;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 30px 24px 30px 10px;
}

.wp-featured__quote-mark {
  font-size: 2.6rem;
  line-height: 1;
  color: rgba(28, 111, 208, 0.28);
  margin-bottom: 10px;
}

.wp-featured__hand {
  font-size: clamp(1.3rem, 1.8vw, 1.7rem);
  color: var(--cs-navy);
  transform: rotate(-5deg);
}

/* --------------------------------------------------------------------------
   3. PORTFOLIO CARDS (extends .cs-card from our-work.css)
   -------------------------------------------------------------------------- */
.wp-card__brand {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 12px;
}

.wp-card__name {
  font-family: var(--font-head);
  font-weight: 700;
  font-size: 1.02rem;
  line-height: 1.3;
  color: var(--text);
  margin: 0;
}

.wp-card__category {
  font-family: var(--font-head);
  font-weight: 700;
  font-size: 0.9rem;
  color: var(--accent);
  margin: 0 0 3px;
  line-height: 1.35;
}

/* --------------------------------------------------------------------------
   4. WHY CHOOSE OUR WEBSITES — pale rounded panel with four white cards
   -------------------------------------------------------------------------- */
.wp-why {
  padding: 10px 0 20px;
}

.wp-why__panel {
  background: linear-gradient(135deg, var(--cs-pale-2) 0%, var(--cs-pale) 100%);
  border: 1px solid var(--cs-line);
  border-radius: 24px;
  padding: 36px 34px 34px;
}

.wp-why__panel .svc-head {
  margin-bottom: 24px;
}

.wp-why__grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 18px;
}

.wp-why-card {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  background: #fff;
  border: 1px solid var(--cs-line);
  border-radius: 14px;
  padding: 22px 20px;
  box-shadow: 0 6px 20px rgba(6, 42, 107, 0.05);
  transition: opacity 0.7s var(--svc-ease), transform 0.35s var(--svc-ease), box-shadow 0.35s var(--svc-ease);
}

.wp-why-card:hover,
.wp-why-card[data-reveal].is-visible:hover {
  transform: translateY(-4px);
  box-shadow: var(--cs-shadow);
}

.wp-why-card__icon {
  flex: none;
  font-size: 1.9rem;
  line-height: 1;
  color: var(--accent2);
  display: inline-flex;
}

.wp-why-card__title {
  font-family: var(--font-head);
  font-weight: 700;
  font-size: 0.98rem;
  color: var(--cs-navy);
  margin: 2px 0 6px;
}

.wp-why-card__text {
  font-size: 0.85rem;
  line-height: 1.55;
  color: var(--text2);
  margin: 0;
}

/* --------------------------------------------------------------------------
   5. PROCESS — the Website Process uses the white background from the design
   -------------------------------------------------------------------------- */
.wp-process .cs-step__num {
  font-size: 1rem;
}

/* --------------------------------------------------------------------------
   6. RESPONSIVE
   Satkar breakpoints: laptop 992–1199 · tablet 576–991 · mobile ≤575
   -------------------------------------------------------------------------- */
@media (max-width: 1199.98px) {
  .wp-hero__grid {
    grid-template-columns: minmax(0, 1.1fr) minmax(0, 0.9fr);
  }

  .wp-hero__benefits {
    grid-column: 1 / -1;
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }

  .wp-featured__card {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  }

  .wp-featured__quote {
    display: none;
  }

  .wp-featured__visual {
    padding-right: 30px;
  }

  .wp-why__grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 991.98px) {
  .wp-hero {
    padding-top: 30px;
  }

  .wp-hero__grid {
    grid-template-columns: 1fr;
  }

  .wp-hero__visual {
    order: -1;
    aspect-ratio: 16 / 9;
    max-height: none;
  }

  .wp-hero__benefits {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .wp-featured__card {
    grid-template-columns: 1fr;
  }

  .wp-featured__main {
    padding: 30px 28px 6px;
  }

  .wp-featured__visual {
    order: -1;
    padding: 30px 28px 0;
  }
}

@media (max-width: 575.98px) {
  .wp-hero__benefits {
    grid-template-columns: 1fr;
    padding: 18px 16px;
    gap: 14px;
  }

  .wp-featured__main {
    padding: 26px 20px 4px;
  }

  .wp-featured__visual {
    padding: 24px 20px 0;
  }

  .wp-devices {
    padding-right: 52px;
  }

  .wp-featured__highlights {
    grid-template-columns: 1fr;
  }

  .wp-featured__btns {
    flex-direction: column;
    align-items: stretch;
  }

  .wp-featured__btns .svc-btn {
    justify-content: center;
  }

  .wp-featured {
    padding-bottom: 0;
  }

  .wp-why__panel {
    padding: 28px 20px 22px;
    border-radius: 18px;
  }

  .wp-why__grid {
    grid-template-columns: 1fr;
  }
}

/* --------------------------------------------------------------------------
   7. REDUCED MOTION
   -------------------------------------------------------------------------- */
@media (prefers-reduced-motion: reduce) {
  .wp-hero__img,
  .wp-why-card {
    transition: none;
  }

  .wp-hero__visual:hover .wp-hero__img,
  .wp-why-card:hover,
  .wp-why-card[data-reveal].is-visible:hover {
    transform: none;
  }
}

/* --------------------------------------------------------------------------
   8. PROJECT LISTING — filter pills at the top of the grid + filter fade
   -------------------------------------------------------------------------- */
.cs-grid-section__filters {
  margin: 0 0 28px;
  padding-bottom: 22px;
  border-bottom: 1px solid var(--cs-line);
}

.cs-card.is-filtered-in {
  animation: wpFilterIn 0.42s var(--svc-ease) both;
}

@keyframes wpFilterIn {
  from {
    opacity: 0;
    transform: translateY(10px);
  }

  to {
    opacity: 1;
    transform: none;
  }
}

/* "View Project" is a <button> with the existing .cs-link look */
button.cs-link {
  background: none;
  border: 0;
  padding: 0;
  cursor: pointer;
  text-align: left;
}

button.cs-link:focus-visible {
  outline: 3px solid rgba(28, 111, 208, 0.35);
  outline-offset: 4px;
  border-radius: 4px;
}

/* --------------------------------------------------------------------------
   9. WEBSITE PROJECT MODAL (#project-modal, .wpm*)
   One reusable dialog filled by js/website-projects.js.
   Desktop: LEFT = preview · SEO Success (Toyo: preview · description),
            RIGHT = header · industry / type · description · highlights,
            footer (live website + CTA) across both.
   Desktop (≥992px): the left column stretches to the right column's
   height (no empty space) and js/website-projects.js (fitToViewport)
   scales the content down — never below 87%, to keep the text readable —
   so the whole popup shows without a scrollbar where it can. Otherwise
   .wpm__scroll's overflow-y: auto takes over (content is never clipped).
   Tablet / mobile scroll normally.
   The only per-project colour is --wpm-accent (small lines, icons,
   active thumbnail).
   -------------------------------------------------------------------------- */
html.wpm-lock,
html.wpm-lock body {
  overflow: hidden;
}

.wpm {
  --wpm-accent: #1c6fd0;
  --wpm-pad: 24px;
  position: fixed;
  inset: 0;
  z-index: 3000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
}

.wpm[hidden] {
  display: none;
}

.wpm__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(4, 27, 71, 0.55);
  -webkit-backdrop-filter: blur(6px);
  backdrop-filter: blur(6px);
  opacity: 0;
  transition: opacity 0.3s var(--svc-ease);
}

.wpm__dialog {
  position: relative;
  width: 100%;
  max-width: 1440px;
  max-height: calc(100vh - 32px);
  max-height: calc(100dvh - 32px);
  display: flex;
  flex-direction: column;
  background: #fff;
  border-radius: 22px;
  box-shadow: 0 30px 80px rgba(4, 27, 71, 0.35);
  opacity: 0;
  transform: translateY(18px) scale(0.985);
  transition: opacity 0.3s var(--svc-ease), transform 0.4s var(--svc-ease);
}

.wpm__dialog:focus {
  outline: none;
}

.wpm.is-open .wpm__backdrop {
  opacity: 1;
}

.wpm.is-open .wpm__dialog {
  opacity: 1;
  transform: none;
}

.wpm__close {
  position: absolute;
  top: 12px;
  right: 12px;
  z-index: 2;
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  border: 1px solid var(--cs-line);
  border-radius: 50%;
  background: #fff;
  color: var(--cs-navy);
  font-size: 0.95rem;
  line-height: 1;
  cursor: pointer;
  box-shadow: 0 6px 18px rgba(6, 42, 107, 0.14);
  transition: transform 0.25s var(--svc-ease), color 0.25s var(--svc-ease);
}

.wpm__close i {
  display: inline-flex;
}

.wpm__close:hover {
  color: var(--accent2);
  transform: rotate(90deg);
}

.wpm__close:focus-visible {
  outline: 3px solid rgba(28, 111, 208, 0.45);
  outline-offset: 2px;
}

.wpm__scroll {
  overflow-y: auto;
  overflow-x: hidden;
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
  border-radius: inherit;
  padding: var(--wpm-pad);
}

/* desktop: two equal columns, footer across both */
.wpm__grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.25fr);
  gap: 14px 28px;
  align-items: start;
}

.wpm__col,
.wpm__left,
.wpm__body {
  display: flex;
  flex-direction: column;
  gap: 14px;
  min-width: 0;
}

.wpm__left[hidden],
.wpm__body[hidden],
.wpm__seo-note[hidden],
.wpm__tags[hidden] {
  display: none;
}

.wpm__foot {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.45fr);
  align-items: stretch;
  gap: 16px 28px;
}

/* ---- head ---- */
.wpm__head {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 0 20px;
  padding-right: 44px;
}

.wpm__head-text {
  min-width: 0;
}

.wpm__eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-head);
  font-weight: 700;
  font-size: 0.8rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--cs-navy);
}

.wpm__eyebrow::before {
  content: "";
  width: 28px;
  height: 10px;
  background: var(--wpm-accent);
  flex-shrink: 0;
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 32 10' fill='none' stroke='%23000' stroke-width='1.25' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M1 5h29M26 1l4 4-4 4'/%3E%3C/svg%3E") no-repeat left center / contain;
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 32 10' fill='none' stroke='%23000' stroke-width='1.25' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M1 5h29M26 1l4 4-4 4'/%3E%3C/svg%3E") no-repeat left center / contain;
}

.wpm__title {
  font-family: var(--font-head);
  font-weight: 800;
  font-size: clamp(1.6rem, 2.4vw, 2.2rem);
  line-height: 1.08;
  letter-spacing: -0.02em;
  color: var(--cs-navy);
  margin: 6px 0 4px;
  overflow-wrap: anywhere;
}

.wpm__subtitle {
  font-family: var(--font-head);
  font-weight: 700;
  font-size: 1.05rem;
  color: var(--text2);
  margin: 0 0 4px;
}

.wpm__tagline {
  font-family: var(--font-head);
  font-weight: 600;
  font-size: clamp(1.05rem, 1.5vw, 1.2rem);
  line-height: 1.35;
  color: var(--cs-navy);
  margin: 0;
}

.wpm__intro {
  font-size: 0.98rem;
  line-height: 1.55;
  color: var(--text2);
  margin: 5px 0 0;
}

.wpm__subtitle[hidden],
.wpm__tagline[hidden],
.wpm__intro[hidden],
.wpm__logo[hidden] {
  display: none;
}

.wpm__logo {
  grid-row: 1;
  grid-column: 2;
  align-self: start;
}

.wpm__logo img {
  display: block;
  width: auto;
  max-width: 150px;
  height: auto;
  max-height: 72px;
  object-fit: contain;
}

.wpm__tags {
  grid-column: 1 / -1;
  list-style: none;
  margin: 10px 0 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.wpm-tone--blue {
  --tone: #1c6fd0;
  --tone-bg: #eaf3fe;
}

.wpm-tone--green {
  --tone: #1f7a36;
  --tone-bg: #e9f7ee;
}

.wpm-tone--pink {
  --tone: #b3175a;
  --tone-bg: #fdecf4;
}

.wpm-tag {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  border-radius: 999px;
  background: var(--tone-bg);
  color: var(--tone);
  font-family: var(--font-head);
  font-weight: 600;
  font-size: 0.88rem;
  line-height: 1.2;
}

.wpm-tag i {
  display: inline-flex;
  font-size: 0.82rem;
}

.wpm__seo-note {
  grid-column: 1 / -1;
  margin-top: 10px;
}

.wpm-seo-note {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  margin: 0;
  padding: 8px 12px;
  border-radius: 12px;
  background: #eef9f1;
  border: 1px solid rgba(31, 122, 54, 0.18);
  font-size: 0.92rem;
  line-height: 1.5;
  color: var(--text);
}

.wpm-seo-note > i {
  display: inline-flex;
  color: #1f7a36;
  font-size: 1rem;
  margin-top: 2px;
}

.wpm-seo-note strong {
  color: #1f7a36;
}

/* ---- shared section heading ---- */
.wpm-sec {
  min-width: 0;
}

.wpm-sec__title {
  display: flex;
  align-items: center;
  gap: 9px;
  font-family: var(--font-head);
  font-weight: 700;
  font-size: 1.12rem;
  line-height: 1.3;
  color: var(--cs-navy);
  margin: 0 0 8px;
}

.wpm-sec__title i {
  display: inline-flex;
  color: var(--wpm-accent);
  font-size: 1.05rem;
}

.wpm-sec p {
  font-size: 0.98rem;
  line-height: 1.55;
  color: var(--text2);
  margin: 0;
}

/* ---- gallery: main preview + thumbnails ---- */
.wpm-shot {
  margin: 0;
  border-radius: 12px;
  overflow: hidden;
  background: #0d1b33;
  padding: 0 7px 7px;
  box-shadow: 0 14px 34px rgba(6, 42, 107, 0.18);
}

.wpm-shot__bar {
  display: flex;
  gap: 6px;
  padding: 8px 5px;
}

.wpm-shot__bar span {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.28);
}

.wpm-shot__screen {
  border-radius: 6px;
  overflow: hidden;
  /* aspect-ratio: 16 / 9; */
  background: #f4f7fb;
}

.wpm-shot__screen img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: top center;
}

/* the active thumbnail already names the screenshot on desktop */
.wpm-shot__caption {
  display: none;
  font-size: 0.75rem;
  color: rgba(255, 255, 255, 0.75);
  padding: 8px 4px 0;
}

.wpm-thumbs {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
  margin-top: 8px;
}

.wpm-thumb {
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 0;
  padding: 3px;
  border: 1.5px solid var(--cs-line);
  border-radius: 9px;
  background: #fff;
  cursor: pointer;
  text-align: left;
  transition: border-color 0.25s var(--svc-ease), box-shadow 0.25s var(--svc-ease), transform 0.25s var(--svc-ease);
}

.wpm-thumb img {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 16 / 10;
  object-fit: cover;
  object-position: top center;
  border-radius: 6px;
}

.wpm-thumb__label {
  font-size: 0.76rem;
  font-weight: 600;
  color: var(--text2);
  padding: 0 2px 1px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.wpm-thumb:hover {
  transform: translateY(-2px);
}

.wpm-thumb.is-active {
  border-color: var(--wpm-accent);
  box-shadow: 0 6px 16px color-mix(in srgb, var(--wpm-accent) 22%, transparent);
}

.wpm-thumb:focus-visible {
  outline: 3px solid rgba(28, 111, 208, 0.45);
  outline-offset: 2px;
}

/* ---- meta (Industry / Project Type) ---- */
.wpm-meta {
  display: grid;
  grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr);
  gap: 14px;
  padding: 10px 0;
  border-top: 1px solid var(--cs-line);
  border-bottom: 1px solid var(--cs-line);
}

.wpm-meta__item {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  min-width: 0;
}

.wpm-meta__icon {
  flex: 0 0 auto;
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  border-radius: 9px;
  background: var(--cs-pale);
  color: var(--accent2);
  font-size: 1rem;
}

.wpm-meta__icon i {
  display: inline-flex;
}

.wpm-meta dl {
  margin: 0;
  min-width: 0;
}

.wpm-meta dt {
  font-family: var(--font-head);
  font-weight: 700;
  font-size: 1rem;
  color: var(--cs-navy);
}

.wpm-meta dd {
  margin: 1px 0 0;
  font-size: 0.94rem;
  line-height: 1.45;
  color: var(--text2);
}

/* ---- website highlights ---- */
.wpm-highlights {
  background: var(--cs-pale-2);
  border: 1px solid var(--cs-line);
  border-radius: 14px;
  padding: 12px;
}

.wpm-highlights__grid {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.wpm-highlight {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  min-width: 0;
  padding: 8px 11px;
  border-radius: 10px;
  background: #fff;
  border: 1px solid var(--cs-line);
}

.wpm-highlight__icon {
  flex: 0 0 auto;
  display: inline-flex;
  font-size: 1.15rem;
  color: var(--accent2);
  margin-top: 1px;
}

.wpm-highlight__icon i {
  display: inline-flex;
}

.wpm-highlight__title {
  font-family: var(--font-head);
  font-weight: 700;
  font-size: 0.96rem;
  line-height: 1.3;
  color: var(--cs-navy);
  margin: 0 0 2px;
}

.wpm-sec .wpm-highlight__text {
  font-size: 0.9rem;
  line-height: 1.45;
}

/* ---- SEO success ---- */
.wpm-seo {
  border: 1px solid var(--cs-line);
  border-radius: 14px;
  padding: 14px;
}

.wpm-sec .wpm-seo__desc {
  margin-bottom: 8px;
}

.wpm-seo__wrap {
  overflow-x: auto;
}

.wpm-seo__table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.92rem;
}

.wpm-seo__table th {
  font-family: var(--font-head);
  font-weight: 700;
  color: var(--cs-navy);
  text-align: left;
  padding: 6px 10px;
  background: var(--cs-pale);
}

.wpm-seo__table th:last-child,
.wpm-seo__pos {
  text-align: center;
  white-space: nowrap;
  width: 1%;
}

.wpm-seo__table td {
  padding: 6px 10px;
  vertical-align: middle;
  border-bottom: 1px solid var(--cs-line);
  color: var(--text);
  overflow-wrap: anywhere;
}

.wpm-seo__table td.wpm-seo__pos {
  font-family: var(--font-head);
  font-weight: 800;
  color: #1f7a36;
}

/* ---- footer: live website + CTA ---- */
.wpm-live {
  display: flex;
  align-items: center;
  gap: 14px;
  min-width: 0;
  padding: 12px 18px;
  border-radius: 14px;
  background: var(--cs-pale);
  border: 1px solid var(--cs-line);
  color: var(--cs-navy);
  text-decoration: none;
  transition: transform 0.25s var(--svc-ease), box-shadow 0.25s var(--svc-ease);
}

.wpm-live[hidden] {
  display: none;
}

.wpm-live:hover {
  transform: translateY(-2px);
  box-shadow: var(--cs-shadow);
  color: var(--cs-navy);
}

.wpm-live:focus-visible {
  outline: 3px solid rgba(28, 111, 208, 0.45);
  outline-offset: 2px;
}

.wpm-live__icon {
  flex: 0 0 auto;
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--accent2) 0%, var(--accent) 100%);
  color: #fff;
  font-size: 1.1rem;
}

.wpm-live__icon i,
.wpm-live__ext {
  display: inline-flex;
}

.wpm-live__text {
  display: flex;
  flex-direction: column;
  flex: 1 1 auto;
  min-width: 0;
}

.wpm-live__text strong {
  font-family: var(--font-head);
  font-size: 1.05rem;
}

.wpm-live__text strong i {
  font-size: 0.78rem;
  vertical-align: middle;
}

.wpm-live__text span {
  font-size: 0.96rem;
  color: var(--accent2);
  overflow-wrap: anywhere;
}

.wpm-live__ext {
  color: var(--accent2);
}

/* CTA text + button centred in their box (they stack when space is tight) */
.wpm-cta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 10px 18px;
  padding: 12px 18px;
  border-radius: 14px;
  background: var(--cs-pale-2);
  border: 1px solid var(--cs-line);
  text-align: center;
}

.wpm-cta__text {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  margin: 0;
  font-family: var(--font-head);
  font-weight: 700;
  font-size: 1.06rem;
  color: var(--cs-navy);
}

.wpm-cta__text i {
  display: inline-flex;
  color: var(--accent2);
  font-size: 1.15rem;
}

/* ---- desktop: preview height follows the viewport height ---- */
@media (min-width: 992px) {
  /* .wpm-shot__screen {
    aspect-ratio: auto;
    height: clamp(160px, 24vh, 330px);
  } */

  .wpm-thumb img {
    aspect-ratio: auto;
    height: clamp(44px, 7vh, 72px);
  }
}

/* ---- desktop: no empty space in the left column ---- */
@media (min-width: 992px) {
  .wpm__grid {
    align-items: stretch;
  }

  .wpm__left {
    flex: 1 1 auto;
  }

  /* last left section (SEO Success, or the description when a project has
     no SEO Success) grows to the bottom of the column */
  .wpm__left > .wpm-sec:last-child {
    flex: 1 1 auto;
    display: flex;
    flex-direction: column;
  }

  .wpm__left > .wpm-seo .wpm-seo__wrap {
    flex: 1 1 auto;
  }

  .wpm__left > .wpm-seo .wpm-seo__table {
    height: 100%;
  }

  .wpm-highlights__grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .wpm__left > .wpm-desc {
    background: var(--cs-pale-2);
    border: 1px solid var(--cs-line);
    border-radius: 14px;
    padding: 14px 16px;
  }
}

/* ---- responsive ---- */
/* tablet / mobile: one column —
   header · preview · SEO Success · industry / type · description · highlights · live · CTA
   (Toyo: header · preview · description · industry / type · highlights · live · CTA) */
@media (max-width: 991.98px) {
  .wpm__grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .wpm__col {
    display: contents;
  }

  .wpm__head {
    order: 1;
  }

  .wpm__left {
    order: 2;
  }

  .wpm__body {
    order: 3;
  }

  .wpm__foot {
    order: 4;
  }

  .wpm-shot__caption {
    display: block;
  }
}

@media (max-width: 767.98px) {
  .wpm {
    --wpm-pad: 20px;
    padding: 12px 10px;
  }

  .wpm__dialog {
    max-height: calc(100vh - 24px);
    max-height: calc(100dvh - 24px);
    border-radius: 18px;
  }

  .wpm__close {
    top: 10px;
    right: 10px;
  }

  .wpm__foot {
    grid-template-columns: minmax(0, 1fr);
  }
}

@media (max-width: 575.98px) {
  .wpm {
    --wpm-pad: 16px;
  }

  .wpm__head {
    grid-template-columns: minmax(0, 1fr);
  }

  .wpm__logo {
    grid-row: auto;
    grid-column: 1;
    margin-top: 10px;
  }

  .wpm-thumbs {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .wpm-meta,
  .wpm-highlights__grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .wpm-cta {
    flex-direction: column;
  }

  .wpm-cta__btn {
    width: 100%;
    justify-content: center;
  }
}

@media (max-width: 374.98px) {
  .wpm {
    --wpm-pad: 14px;
    padding: 8px 6px;
  }

  .wpm-seo__table th,
  .wpm-seo__table td {
    padding: 5px 6px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .cs-card.is-filtered-in {
    animation: none;
  }

  .wpm__backdrop,
  .wpm__dialog,
  .wpm__close,
  .wpm-thumb,
  .wpm-live {
    transition: none;
  }

  .wpm__dialog,
  .wpm__close:hover,
  .wpm-thumb:hover,
  .wpm-live:hover {
    transform: none;
  }
}
