/*
 * Mustafa WP — published-work cards (template-parts/homepage/portfolio.php).
 * Shared by the front page and the About page.
 */
.mwp-home-work {
  background: var(--surface);
}

.mwp-home-work__head {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 28px;
  margin-block-end: 30px;
}

.mwp-home-work__head > div {
  max-width: 800px;
}

.mwp-home-work__head h2 {
  max-width: 24ch;
  margin: 10px 0 0;
  font-size: clamp(1.8rem, 3vw, 2.55rem);
  line-height: 1.3;
  text-wrap: balance;
}

.mwp-home-work__head p {
  max-width: 67ch;
  margin: 12px 0 0;
  color: var(--text-secondary);
  font-size: .92rem;
  line-height: 1.82;
}

.mwp-home-work__grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}

.mwp-home-work__card {
  display: flex;
  min-width: 0;
  flex-direction: column;
  overflow: hidden;
  border: 1px solid color-mix(in srgb, var(--primary) 9%, var(--border));
  border-radius: 18px;
  background: var(--surface);
  box-shadow: 0 9px 26px rgba(11, 18, 32, .035);
  transition: border-color var(--motion-duration-base) var(--motion-ease-standard), box-shadow var(--motion-duration-base) var(--motion-ease-standard);
}

.mwp-main:not(.is-scrolling) .mwp-home-work__card:hover {
  border-color: color-mix(in srgb, var(--primary) 28%, var(--border));
  box-shadow: 0 16px 38px rgba(11, 18, 32, .08);
}

.mwp-home-work__visual {
  display: block;
  color: inherit;
  text-decoration: none;
  background: var(--surface-sunken);
}

.mwp-home-work__bar {
  display: flex;
  align-items: center;
  gap: 5px;
  padding: 9px 12px;
  border-block-end: 1px solid var(--border);
  background: color-mix(in srgb, var(--surface-sunken) 70%, var(--surface));
}

.mwp-home-work__bar i {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: color-mix(in srgb, var(--text-secondary) 30%, transparent);
}

.mwp-home-work__bar em {
  margin-inline-start: auto;
  overflow: hidden;
  color: var(--text-primary);
  font-size: var(--font-size-xs);
  font-style: normal;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.mwp-home-work__preview {
  display: block;
  aspect-ratio: 16 / 10;
  overflow: hidden;
}

.mwp-home-work__preview img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: top center;
}

/* Logos and small images: show the whole image on a framed canvas. */
.mwp-home-work__preview.is-contain {
  display: grid;
  place-items: center;
  padding: clamp(18px, 3vw, 28px);
  background: color-mix(in srgb, var(--primary) 3%, var(--surface));
}

.mwp-home-work__preview.is-contain img {
  width: auto;
  max-width: 100%;
  height: auto;
  max-height: 100%;
  object-fit: contain;
  object-position: center;
}

.mwp-home-work__body {
  display: flex;
  flex: 1 1 auto;
  flex-direction: column;
  align-items: flex-start;
  gap: 10px;
  padding: 18px 20px 20px;
}

.mwp-home-work__type {
  color: var(--primary);
  font-size: var(--font-size-xs);
  font-weight: 850;
}

.mwp-home-work__body h3 {
  margin: 0;
  font-size: 1.05rem;
  line-height: 1.5;
}

.mwp-home-work__tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.mwp-home-work__tags span {
  padding: 3px 9px;
  border-radius: var(--radius-pill);
  background: var(--surface-sunken);
  color: var(--text-primary);
  font-size: var(--font-size-xs);
  font-weight: 700;
}

.mwp-home-work__link {
  display: inline-flex;
  min-height: 44px;
  align-items: center;
  gap: 7px;
  margin-block-start: auto;
  padding: 8px 14px;
  border: 1px solid color-mix(in srgb, var(--primary) 16%, var(--border));
  border-radius: var(--radius-pill);
  background: var(--primary-soft);
  color: var(--primary);
  font-size: var(--font-size-xs);
  font-weight: 850;
  text-decoration: none;
}

/* Client testimonial inside a card (inc/portfolio-data.php). Also defined in
 * portfolio.css, which the portfolio page loads instead of this file. */
.mwp-home-work .mwp-project-quote {
  align-self: stretch;
  margin: 2px 0 0;
  padding: 11px 13px;
  border-inline-start: 3px solid color-mix(in srgb, var(--primary) 45%, var(--border));
  border-radius: 10px;
  background: color-mix(in srgb, var(--primary) 4%, var(--surface));
}

.mwp-home-work .mwp-project-quote blockquote {
  margin: 0;
}

.mwp-home-work .mwp-project-quote p {
  margin: 0;
  color: var(--text-primary);
  font-size: var(--font-size-sm);
  line-height: 1.8;
}

.mwp-home-work .mwp-project-quote figcaption {
  margin-block-start: 6px;
  color: var(--text-secondary);
  font-size: var(--font-size-xs);
  font-weight: 700;
}

/* The row-head CTA pill used in the section head (also defined in home.css
 * for the front page; repeated here so the About page renders it). */
.mwp-home-work .mwp-row-head__cta {
  display: inline-flex;
  min-height: 44px;
  align-items: center;
  gap: 7px;
  padding: 8px 14px;
  border: 1px solid color-mix(in srgb, var(--primary) 15%, var(--border));
  border-radius: var(--radius-pill);
  background: color-mix(in srgb, var(--surface) 92%, transparent);
  color: var(--primary);
  font-size: var(--font-size-xs);
  font-weight: 850;
  text-decoration: none;
  white-space: nowrap;
}

@media (max-width: 1180px) {
  .mwp-home-work__grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 760px) {
  .mwp-home-work__head {
    flex-direction: column;
    align-items: flex-start;
    gap: 16px;
  }

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

/* Section eyebrow pill — matches the other homepage section labels. */
.mwp-home-work .mwp-eyebrow {
  display: inline-flex;
  min-height: 31px;
  align-items: center;
  padding: 5px 10px;
  border: 1px solid color-mix(in srgb, var(--primary) 16%, var(--border));
  border-radius: var(--radius-pill);
  background: color-mix(in srgb, var(--surface) 91%, transparent);
  color: var(--primary);
  font-size: var(--font-size-xs);
  font-weight: 850;
  line-height: 1.2;
}
