/* Portfolio v0.7: full projects and linked individual zones. */

.catalog-card.portfolio-card-v07 { min-width: 0; }
.portfolio-card-v07__button {
  display: flex;
  flex-direction: column;
  width: 100%;
  height: 100%;
  padding: 0;
  overflow: hidden;
  text-align: left;
  border: 1px solid rgba(0, 0, 0, .12);
  border-radius: 16px;
  background: rgba(255,255,255,.58);
  color: inherit;
  cursor: pointer;
  box-shadow: 0 10px 28px rgba(0, 0, 0, .06);
  transition: transform .22s ease, box-shadow .22s ease, border-color .22s ease;
}
.portfolio-card-v07__button:hover,
.portfolio-card-v07__button:focus-visible { transform: translateY(-3px); border-color: rgba(181, 147, 87, .45); box-shadow: 0 18px 42px rgba(0, 0, 0, .12); }
.portfolio-card-v07__media { position: relative; display: block; width: 100%; aspect-ratio: 4 / 3; overflow: hidden; background: #fdf4e3; }
.portfolio-card-v07__media img { display: block; width: 100%; height: 100%; object-fit: cover; transition: transform .5s ease; }
.portfolio-card-v07__button:hover .portfolio-card-v07__media img { transform: scale(1.025); }
.portfolio-card-v07__media > span { position: absolute; left: 12px; bottom: 12px; padding: 7px 10px; border-radius: 999px; background: rgba(0, 0, 0, .78); color: #fff; font-size: 12px; }
.portfolio-card-v07__body { display: grid; gap: 8px; padding: 20px 20px 22px; }
.portfolio-card-v07__body small { color: #b59357; font-size: 12px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; }
.portfolio-card-v07__body strong { font-family: Georgia, "Times New Roman", serif; font-size: clamp(23px, 2vw, 30px); font-weight: 500; line-height: 1.05; }
.portfolio-card-v07__body > span { color: rgba(0, 0, 0, .58); font-size: 14px; }
.catalog-card--project .portfolio-card-v07__button { background: #000000; color: #fff; }
.catalog-card--project .portfolio-card-v07__body > span { color: rgba(255,255,255,.58); }
.catalog-card--project .portfolio-card-v07__media::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, transparent 60%, rgba(0,0,0,.2)); }

.catalog-grid.is-list { grid-template-columns: 1fr !important; }
.catalog-grid.is-list .portfolio-card-v07__button { display: grid; grid-template-columns: minmax(220px, 36%) 1fr; min-height: 230px; }
.catalog-grid.is-list .portfolio-card-v07__media { height: 100%; aspect-ratio: auto; }
.catalog-grid.is-list .portfolio-card-v07__body { align-content: center; padding: 36px; }

.catalog-filter-option,
.catalog-mobile-option { min-height: 42px; cursor: pointer; }
.catalog-filter-option input,
.catalog-mobile-option input { accent-color: #b59357; }
.catalog-filter-note { margin: 0; color: rgba(0, 0, 0, .55); font-size: 13px; line-height: 1.45; }
.catalog-categories button { white-space: nowrap; }

.catalog-project-info__facts { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.catalog-parent-project {
  width: 100%;
  min-height: 52px;
  margin: 22px 0 0;
  padding: 12px 18px;
  border: 1px solid rgba(181, 147, 87, .45);
  border-radius: 12px;
  background: rgba(181, 147, 87, .08);
  color: inherit;
  font-weight: 700;
  text-align: left;
  cursor: pointer;
}

.catalog-project-zones { margin-top: 30px; padding-top: 26px; border-top: 1px solid rgba(0, 0, 0, .12); }
.catalog-project-zones h3 { margin: 0 0 18px; font-family: Georgia, "Times New Roman", serif; font-size: 28px; font-weight: 500; }
#catalogProjectZones { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.catalog-project-zone-card { display: grid; grid-template-columns: 96px 1fr; gap: 14px; min-height: 104px; padding: 8px; border: 1px solid rgba(0, 0, 0, .12); border-radius: 12px; background: rgba(255,255,255,.48); color: inherit; text-align: left; cursor: pointer; }
.catalog-project-zone-card img { width: 96px; height: 88px; object-fit: cover; border-radius: 8px; }
.catalog-project-zone-card > span { display: flex; flex-direction: column; justify-content: center; min-width: 0; }
.catalog-project-zone-card small { margin-bottom: 5px; color: #b59357; font-size: 11px; font-weight: 700; text-transform: uppercase; }
.catalog-project-zone-card strong { overflow: hidden; font-family: Georgia, "Times New Roman", serif; font-size: 18px; font-weight: 500; text-overflow: ellipsis; white-space: nowrap; }
.catalog-project-zone-card em { margin-top: 5px; color: rgba(0, 0, 0, .55); font-size: 12px; font-style: normal; }

.catalog-project-info .media-modal__info-grid { display: grid !important; margin-top: 26px; }
.catalog-project-info .project-info-card p { line-height: 1.58; }
.catalog-project-info__actions { gap: 10px; }

@media (max-width: 980px) {
  #catalogProjectZones { grid-template-columns: 1fr; }
}

@media (max-width: 700px) {
  .catalog-grid.is-list .portfolio-card-v07__button { grid-template-columns: 132px 1fr; min-height: 160px; }
  .catalog-grid.is-list .portfolio-card-v07__body { padding: 18px; }
  .catalog-project-info__facts { grid-template-columns: 1fr 1fr; }
  .catalog-project-zone-card { grid-template-columns: 82px 1fr; }
  .catalog-project-zone-card img { width: 82px; height: 82px; }
}

@media (prefers-reduced-motion: reduce) {
  .portfolio-card-v07__button,
  .portfolio-card-v07__media img { transition: none; }
}

/* Visual QA hardening: portfolio cards and the project viewer. */
.portfolio-card-v07__button {
  border-radius: 4px;
  box-shadow: none;
}

.portfolio-card-v07__button:hover,
.portfolio-card-v07__button:focus-visible {
  transform: translateY(-2px);
  box-shadow: 0 12px 30px rgba(0, 0, 0, .1);
}

.portfolio-card-v07__media { flex: 0 0 auto; }
.portfolio-card-v07__media > span { border-radius: 4px; }
.portfolio-card-v07__body { padding: 18px 18px 20px; }
.portfolio-card-v07__body strong { font-size: clamp(21px, 1.8vw, 27px); }

@media (min-width: 1200px) {
  .catalog-page main > section.catalog-hero { padding-block: 32px 22px; }
  .catalog-page main > section.catalog-results-section { padding-block: 0 clamp(68px, 7vw, 100px); }
  .catalog-hero__layout { grid-template-columns: minmax(300px, 340px) minmax(0, 1fr); }
  .catalog-intro h1 { max-width: none; font-size: clamp(48px, 4vw, 58px); overflow-wrap: normal; word-break: normal; hyphens: none; }
}

.catalog-parent-project,
.catalog-project-zone-card,
.catalog-project-zone-card img { border-radius: 4px; }

body.catalog-project-open { overflow: hidden; }

.catalog-project-page__scroll { overflow: hidden; }

.catalog-project-page__topbar {
  min-height: 64px;
  padding-block: 8px;
}

.catalog-project-page__back { min-height: 44px; }

.catalog-project-page__layout {
  height: calc(100dvh - 64px);
  min-height: calc(100dvh - 64px);
  grid-template-columns: minmax(0, 1.28fr) minmax(380px, .72fr);
}

.catalog-project-gallery {
  gap: 10px;
  padding: clamp(14px, 1.8vw, 24px);
  background: #2e3e44;
}

.catalog-project-gallery__stage {
  min-height: 0;
  border: 1px solid rgba(253,244,227,.14);
  border-radius: 0;
  background: #2e3e44;
}

.catalog-project-gallery__stage > img { object-fit: contain; }
.catalog-project-gallery__stage[data-photo-state="loading"] > img,
.catalog-project-gallery__stage[data-photo-state="error"] > img { visibility: hidden; }
.catalog-project-gallery__status {
  position: absolute;
  inset: 0;
  display: grid;
  place-content: center;
  justify-items: center;
  gap: 16px;
  padding: 48px 64px;
  color: #fdf4e3;
  text-align: center;
  pointer-events: none;
}
.catalog-project-gallery__status[hidden],
.catalog-project-gallery__status button[hidden] { display: none; }
.catalog-project-gallery__status p { margin: 0; max-width: 28ch; font-size: 16px; line-height: 1.5; }
.catalog-project-gallery__status button {
  min-height: 44px;
  padding: 10px 18px;
  border: 1px solid #fdf4e3;
  border-radius: 4px;
  background: #fdf4e3;
  color: #2e3e44;
  font: inherit;
  cursor: pointer;
  pointer-events: auto;
}
.catalog-project-gallery__status button:hover { background: #fff; }
.catalog-project-gallery__status button:focus-visible { outline: 2px solid #fdf4e3; outline-offset: 4px; }
.catalog-project-gallery__nav,
.catalog-project-gallery__counter,
.catalog-project-gallery__thumbs button { border-radius: 4px; }

.catalog-project-info__scroll { padding: clamp(28px, 3vw, 44px) clamp(24px, 3vw, 40px) 24px; }
.catalog-project-info #catalogProjectTitle { margin-top: 8px; font-size: clamp(38px, 3.4vw, 52px); line-height: 1.02; }
.catalog-project-info__facts { margin-top: 22px; }
.catalog-project-info__actions { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); padding-inline: 20px; }
.catalog-project-info__actions a { font-size: 11px; }

@media (max-width: 980px) and (min-width: 768px) {
  .catalog-project-page__layout { grid-template-columns: minmax(0, 1fr) minmax(330px, .82fr); }
  .catalog-project-gallery { padding: 12px; }
  .catalog-project-info__scroll { padding: 26px 24px 20px; }
  .catalog-project-info #catalogProjectTitle { font-size: clamp(34px, 4.5vw, 44px); }
}

@media (max-width: 767px) {
  .catalog-page { padding-bottom: calc(82px + env(safe-area-inset-bottom)); }

  .catalog-grid .catalog-card.portfolio-card-v07 {
    height: auto !important;
    min-height: 0 !important;
  }

  .catalog-grid .portfolio-card-v07__button {
    display: flex;
    height: auto;
    min-height: 0;
  }

  .catalog-grid .portfolio-card-v07__media {
    display: block;
    flex: 0 0 auto;
    width: 100%;
    height: auto;
    min-height: 0;
    aspect-ratio: 4 / 3;
  }

  .catalog-grid .portfolio-card-v07__media img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
  }

  .catalog-grid .portfolio-card-v07__body {
    height: auto;
    min-height: 106px;
    padding: 14px 14px 16px;
  }

  .catalog-grid .portfolio-card-v07__body strong { font-size: 20px; }
  .catalog-chip,
  .catalog-filter-trigger,
  .catalog-sort select,
  .catalog-view-switch button { min-height: 44px; }

  .catalog-grid.is-list .portfolio-card-v07__button {
    display: grid;
    grid-template-columns: minmax(132px, 42%) minmax(0, 1fr);
    min-height: 154px;
  }

  .catalog-grid.is-list .portfolio-card-v07__media {
    height: 154px;
    min-height: 154px;
    aspect-ratio: auto;
  }

  .catalog-grid.is-list .portfolio-card-v07__body {
    min-height: 154px;
    padding: 17px 14px;
  }

  .catalog-project-page__scroll {
    height: 100dvh;
    overflow-y: auto;
  }

  .catalog-project-page__topbar {
    position: sticky;
    min-height: 60px;
  }

  .catalog-project-page__layout {
    display: block;
    height: auto;
    min-height: 0;
    overflow: visible;
  }

  .catalog-project-gallery { padding: 0 0 10px; }
  .catalog-project-gallery__stage { aspect-ratio: 4 / 3; border: 0; }
  .catalog-project-gallery__stage > img { object-fit: contain; }
  .catalog-project-gallery__nav { width: 44px; height: 44px; }
  .catalog-project-info { display: block; max-height: none; overflow: visible; }
  .catalog-project-info__scroll { overflow: visible; padding: 26px 18px 18px; }
  .catalog-project-info #catalogProjectTitle { font-size: clamp(34px, 10vw, 44px); }
  .catalog-project-info__actions {
    position: static;
    grid-template-columns: 1fr;
    gap: 8px;
    padding: 14px 18px calc(20px + env(safe-area-inset-bottom));
  }
  .catalog-project-info__actions a { min-height: 48px; font-size: 11px; }
}
