/* Project gallery page */
.mf-project-page {
  font-family: "Outfit", sans-serif;
  color: var(--mf-text, #243044);
  overflow-x: hidden;
  background:
    radial-gradient(900px 420px at 12% -8%, rgba(47,107,255,0.14), transparent 60%),
    radial-gradient(700px 360px at 100% 35%, rgba(90,112,150,0.12), transparent 55%),
    #f4f7fb;
}

.mf-project-page h1,
.mf-project-page h2,
.mf-project-page h3 {
  font-family: "Plus Jakarta Sans", sans-serif;
  font-weight: 700;
  color: var(--mf-ink, #121820);
  margin: 0;
  letter-spacing: -0.01em;
  line-height: 1.15;
}

.mf-proj-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: center;
  margin: 0 0 36px;
}

.mf-proj-filter {
  appearance: none;
  border: 1px solid rgba(47,107,255,0.18);
  background: #fff;
  color: #121820;
  font-family: "Outfit", sans-serif;
  font-size: 0.88rem;
  font-weight: 700;
  padding: 10px 18px;
  border-radius: 999px;
  cursor: pointer;
  transition: background 0.25s ease, color 0.25s ease, transform 0.25s ease, box-shadow 0.25s ease;
}

.mf-proj-filter:hover {
  transform: translateY(-2px);
  background: #e7eef8;
}

.mf-proj-filter.is-active {
  color: #fff;
  border-color: transparent;
  background: linear-gradient(135deg, #2f6bff, #1d4ed8);
  box-shadow: 0 10px 22px rgba(47,107,255,0.28);
}

.mf-proj-featured {
  display: grid;
  grid-template-columns: 1.4fr 1fr;
  gap: 16px;
  margin-bottom: 16px;
}

.mf-proj-featured__main,
.mf-proj-featured__side a,
.mf-proj-card {
  position: relative;
  display: block;
  overflow: hidden;
  border-radius: 22px;
  text-decoration: none !important;
  box-shadow: 0 14px 32px rgba(18,24,32,0.1);
}

.mf-proj-featured__main {
  min-height: 420px;
  background: center/cover no-repeat;
}

.mf-proj-featured__side {
  display: grid;
  gap: 16px;
}

.mf-proj-featured__side a {
  min-height: 202px;
  background: center/cover no-repeat;
}

.mf-proj-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  align-items: start;
}

.mf-proj-card {
  aspect-ratio: 4 / 3;
  background: center/cover no-repeat #121820;
  transition: transform 0.35s cubic-bezier(0.22,1,0.36,1), box-shadow 0.35s ease;
}

.mf-proj-card.is-landscape { aspect-ratio: 4 / 3; }
.mf-proj-card.is-portrait { aspect-ratio: 3 / 4; }
.mf-proj-card.is-square { aspect-ratio: 1 / 1; }

.mf-proj-card.is-hidden { display: none; }

.mf-proj-card--video {
  background: #121820;
}

.mf-proj-card--video video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.mf-proj-play {
  position: absolute;
  top: 50%;
  left: 50%;
  z-index: 2;
  width: 56px;
  height: 56px;
  margin: -28px 0 0 -28px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: rgba(37, 211, 102, 0.95);
  color: #fff;
  font-size: 20px;
  box-shadow: 0 10px 24px rgba(0,0,0,0.25);
  transition: transform 0.25s ease;
}

.mf-proj-card--video:hover .mf-proj-play {
  transform: scale(1.08);
}

.mf-proj-orient {
  position: absolute;
  top: 14px;
  left: 14px;
  z-index: 2;
  padding: 5px 10px;
  border-radius: 999px;
  background: rgba(255,255,255,0.92);
  color: #121820;
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.mf-video-popup {
  position: relative;
  width: min(920px, 92vw);
  margin: 40px auto;
  background: #000;
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 24px 60px rgba(0,0,0,0.45);
}

.mf-video-popup video {
  display: block;
  width: 100%;
  max-height: 80vh;
  background: #000;
}

.mf-proj-card:hover,
.mf-proj-featured__main:hover,
.mf-proj-featured__side a:hover {
  transform: translateY(-6px);
  box-shadow: 0 22px 44px rgba(47,107,255,0.18);
}

.mf-proj-card::after,
.mf-proj-featured__main::after,
.mf-proj-featured__side a::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(0deg, rgba(18,24,32,0.88) 0%, transparent 55%);
  opacity: 0.85;
  transition: opacity 0.3s ease;
}

.mf-proj-card:hover::after,
.mf-proj-featured__main:hover::after,
.mf-proj-featured__side a:hover::after { opacity: 1; }

.mf-proj-meta {
  position: absolute;
  left: 16px;
  right: 16px;
  bottom: 16px;
  z-index: 1;
  color: #fff;
}

.mf-proj-meta small {
  display: inline-block;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: #dbeafe;
  margin-bottom: 6px;
}

.mf-proj-meta strong {
  display: block;
  font-family: "Plus Jakarta Sans", sans-serif;
  font-size: 1.15rem;
  font-weight: 700;
  line-height: 1.25;
}

.mf-proj-zoom {
  position: absolute;
  top: 14px;
  right: 14px;
  z-index: 2;
  width: 40px;
  height: 40px;
  border-radius: 12px;
  display: grid;
  place-items: center;
  background: rgba(255,255,255,0.92);
  color: #121820;
  opacity: 0;
  transform: translateY(-6px);
  transition: opacity 0.25s ease, transform 0.25s ease;
}

.mf-proj-card:hover .mf-proj-zoom,
.mf-proj-featured__main:hover .mf-proj-zoom,
.mf-proj-featured__side a:hover .mf-proj-zoom {
  opacity: 1;
  transform: translateY(0);
}

.mf-proj-empty {
  display: none;
  text-align: center;
  padding: 40px 20px;
  color: #5c6b80;
  font-weight: 600;
}

.mf-proj-empty.is-show { display: block; }

@media (max-width: 991px) {
  .mf-proj-featured { grid-template-columns: 1fr; }
  .mf-proj-featured__main { min-height: 280px; }
  .mf-proj-grid { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 767px) {
  .mf-proj-grid { grid-template-columns: 1fr; }
  .mf-proj-featured__side a { min-height: 180px; }
}

/* Motion-style arrangement gallery */
.mf-gal__modes {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 6px;
  width: fit-content;
  max-width: 100%;
  margin: 0 auto 18px;
  padding: 5px;
  border-radius: 999px;
  background: #fff;
  box-shadow: 0 10px 28px rgba(18,24,32,0.06);
}

.mf-gal__mode {
  appearance: none;
  border: 0;
  background: transparent;
  color: #3d4d66;
  font-family: "Outfit", sans-serif;
  font-size: 0.86rem;
  font-weight: 700;
  letter-spacing: 0.01em;
  padding: 9px 16px;
  border-radius: 999px;
  cursor: pointer;
}

.mf-gal__mode.is-active {
  color: #fff;
  background: #121820;
}

.mf-gal__stage {
  position: relative;
  height: min(64vh, 620px);
  min-height: 420px;
  border-radius: 28px;
  background:
    radial-gradient(520px 240px at 50% 42%, rgba(255,255,255,0.85), transparent 70%),
    linear-gradient(180deg, #f7f4ef 0%, #efe8df 100%);
  overflow: hidden;
  perspective: 1400px;
  touch-action: pan-y;
  cursor: grab;
  user-select: none;
}

.mf-gal__stage:focus-visible {
  outline: 2px solid #2f6bff;
  outline-offset: 3px;
}

.mf-gal__stage.is-dragging { cursor: grabbing; }

.mf-gal.is-grid .mf-gal__stage {
  height: auto;
  min-height: 0;
  overflow: visible;
  perspective: none;
  cursor: default;
  background: transparent;
}

.mf-gal__stage::before,
.mf-gal__stage::after {
  content: "";
  position: absolute;
  top: 0;
  bottom: 0;
  width: 84px;
  z-index: 4;
  pointer-events: none;
}

.mf-gal__stage::before {
  left: 0;
  background: linear-gradient(90deg, #f3eee8, rgba(243,238,232,0));
}

.mf-gal__stage::after {
  right: 0;
  background: linear-gradient(270deg, #efe8df, rgba(239,232,223,0));
}

.mf-gal.is-grid .mf-gal__stage::before,
.mf-gal.is-grid .mf-gal__stage::after { display: none; }

.mf-gal__hint {
  position: absolute;
  left: 50%;
  bottom: 16px;
  z-index: 5;
  margin: 0;
  transform: translateX(-50%);
  padding: 6px 12px;
  border-radius: 999px;
  background: rgba(255,255,255,0.82);
  color: #3d4d66;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  pointer-events: none;
}

.mf-gal.is-grid .mf-gal__hint,
.mf-gal.is-hint-gone .mf-gal__hint { display: none; }

.mf-gal__track {
  position: absolute;
  inset: 0;
  margin: 0;
  padding: 0;
  list-style: none;
  transform-style: preserve-3d;
}

.mf-gal.is-barrel .mf-gal__track,
.mf-gal.is-helix .mf-gal__track {
  transform: rotateX(10deg);
}

.mf-gal.is-grid .mf-gal__track {
  position: relative;
  inset: auto;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  transform: none;
}

.mf-gal__item {
  position: absolute;
  left: 50%;
  top: 46%;
  width: 340px;
  height: 230px;
  margin: 0;
  border-radius: 18px;
  overflow: hidden;
  background: #121820;
  box-shadow: 0 18px 40px rgba(18,24,32,0.16);
  transform-origin: center center;
  cursor: pointer;
}

.mf-gal.is-grid .mf-gal__item {
  position: relative;
  left: auto;
  top: auto;
  width: auto;
  height: auto;
  aspect-ratio: 4 / 3;
  transform: none !important;
  opacity: 1 !important;
  visibility: visible !important;
}

.mf-gal__item.is-out { display: none; }

.mf-gal__item img,
.mf-gal__item video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  pointer-events: none;
}

.mf-gal__shade {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent 48%, rgba(28,24,20,0.78));
  opacity: 0;
  pointer-events: none;
}

.mf-gal.is-grid .mf-gal__shade { opacity: 1; }

.mf-gal__cap {
  position: absolute;
  left: 14px;
  right: 14px;
  bottom: 14px;
  z-index: 1;
  color: #fff;
  opacity: 0;
  pointer-events: none;
}

.mf-gal.is-grid .mf-gal__cap { opacity: 1; }

.mf-gal__cap small {
  display: block;
  margin-bottom: 4px;
  color: #dbeafe;
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.mf-gal__cap strong {
  display: block;
  font-family: "Plus Jakarta Sans", sans-serif;
  font-size: 1.02rem;
  font-weight: 700;
  line-height: 1.25;
}

.mf-gal__play {
  position: absolute;
  top: 50%;
  left: 50%;
  z-index: 2;
  width: 52px;
  height: 52px;
  margin: -26px 0 0 -26px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: rgba(37, 211, 102, 0.95);
  color: #fff;
  font-size: 18px;
  pointer-events: none;
}

.mf-gal__meta {
  min-height: 92px;
  margin-top: 22px;
  text-align: center;
}

.mf-gal.is-grid .mf-gal__meta { display: none; }

.mf-gal__kicker {
  margin: 0 0 6px;
  color: #2f6bff;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.mf-gal__name {
  margin: 0;
  font-family: "Plus Jakarta Sans", sans-serif;
  font-size: clamp(1.4rem, 2vw, 1.85rem);
  font-weight: 800;
  letter-spacing: -0.03em;
  color: #121820;
}

.mf-gal__count {
  margin: 8px 0 0;
  color: #5c6b80;
  font-size: 0.86rem;
  font-weight: 600;
}

.mf-gal__controls {
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 12px;
  align-items: center;
  margin-top: 8px;
}

.mf-gal.is-grid .mf-gal__controls { display: none; }

.mf-gal__arrow,
.mf-gal-detail__nav,
.mf-gal-detail__close {
  appearance: none;
  border: 0;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: #fff;
  color: #121820;
  box-shadow: 0 8px 20px rgba(18,24,32,0.08);
  cursor: pointer;
  font-size: 20px;
}

.mf-gal__arrow:disabled,
.mf-gal-detail__nav:disabled {
  opacity: 0.35;
  cursor: default;
}

.mf-gal__strip {
  display: flex;
  justify-content: center;
  gap: 8px;
  min-height: 54px;
  overflow: hidden;
}

.mf-gal__thumb {
  appearance: none;
  width: 72px;
  height: 52px;
  padding: 0;
  border: 2px solid transparent;
  border-radius: 10px;
  overflow: hidden;
  background: #121820 center/cover no-repeat;
  cursor: pointer;
  opacity: 0.72;
}

.mf-gal__thumb.is-active {
  border-color: #2f6bff;
  opacity: 1;
}

.mf-gal__thumb video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  pointer-events: none;
}

.mf-gal-detail {
  position: fixed;
  inset: 0;
  z-index: 4000;
  display: grid;
  grid-template-columns: auto minmax(0, 960px) auto;
  gap: 18px;
  align-items: center;
  justify-content: center;
  padding: 28px;
}

.mf-gal-detail[hidden] { display: none; }

.mf-gal-detail__backdrop {
  position: absolute;
  inset: 0;
  border: 0;
  background: rgba(28, 24, 20, 0.78);
  cursor: pointer;
}

.mf-gal-detail__frame {
  position: relative;
  z-index: 1;
  width: min(960px, 86vw);
  margin: 0;
  border-radius: 22px;
  overflow: hidden;
  background: #1c1916;
  box-shadow: 0 30px 80px rgba(0,0,0,0.45);
}

.mf-gal.is-empty .mf-gal__stage,
.mf-gal.is-empty .mf-gal__meta,
.mf-gal.is-empty .mf-gal__controls { display: none; }

.mf-gal-detail__frame img[hidden],
.mf-gal-detail__frame video[hidden] { display: none; }

.mf-gal-detail__frame img,
.mf-gal-detail__frame video {
  display: block;
  width: 100%;
  min-height: 42vh;
  max-height: 72vh;
  object-fit: contain;
  background: #111;
}

.mf-gal-detail__frame figcaption {
  padding: 16px 20px 18px;
}

.mf-gal-detail__frame small {
  display: block;
  margin-bottom: 4px;
  color: #dbeafe;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.mf-gal-detail__frame strong {
  color: #f4f7fb;
  font-family: "Plus Jakarta Sans", sans-serif;
  font-size: 1.25rem;
  font-weight: 700;
}

.mf-gal-detail__close,
.mf-gal-detail__nav { position: relative; z-index: 1; }

.mf-gal-detail__close {
  position: absolute;
  top: 18px;
  right: 18px;
  z-index: 2;
}

html.mf-motion .mf-gal__stage {
  animation: mfGalIn 0.6s cubic-bezier(0.22, 1, 0.36, 1) both;
}

@keyframes mfGalIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

@media (max-width: 991px) {
  .mf-gal.is-grid .mf-gal__track { grid-template-columns: 1fr 1fr; }
  .mf-gal__item { width: 260px; height: 176px; }
  .mf-gal__stage { min-height: 360px; }
}

@media (max-width: 767px) {
  .mf-gal.is-grid .mf-gal__track { grid-template-columns: 1fr; }
  .mf-gal__item { width: 220px; height: 150px; }
  .mf-gal__stage { height: 52vh; min-height: 300px; }
  .mf-gal__thumb { width: 48px; height: 36px; }
  .mf-gal-detail {
    grid-template-columns: 1fr;
    padding: 64px 16px 24px;
  }
  .mf-gal-detail__nav.is-prev { order: 2; justify-self: start; }
  .mf-gal-detail__nav.is-next { order: 3; justify-self: end; }
  .mf-gal-detail__frame { order: 1; width: 100%; }
}