/**
 * Research Domains, projects panel layout (dock mode)
 */

/* Override legacy loomka fslider fixed 520px height */
body.raben-site .fslider-vp {
  height: auto !important;
  min-height: clamp(22rem, 52vh, 36rem);
}

.fslide.fslide--showcase {
  height: 100% !important;
  min-height: clamp(22rem, 52vh, 36rem);
  overflow: hidden;
}

body.raben-site .fslider-hdr .fslider-label {
  display: none !important;
}

body.raben-site .fslider-label::before {
  content: none !important;
}

body.raben-dock-mode .raben-panel[data-raben-panel="projects"] {
  background:
    radial-gradient(ellipse 80% 60% at 12% 0%, rgba(196, 136, 10, 0.08), transparent 55%),
    radial-gradient(ellipse 60% 50% at 92% 100%, rgba(90, 122, 98, 0.1), transparent 50%),
    var(--raben-bg, #f4f2ed) !important;
}

/* Panel fills viewport; carousel area grows between header and footer */
body.raben-dock-mode .raben-panel[data-raben-panel="projects"] .fslider {
  flex: 1 1 auto;
  display: flex;
  flex-direction: column;
  width: 100%;
  min-height: 0;
  overflow: hidden;
}

body.raben-dock-mode .raben-panel[data-raben-panel="projects"] .fslider-hdr,
body.raben-dock-mode .raben-panel[data-raben-panel="projects"] .fslider-footer {
  flex-shrink: 0;
}

body.raben-dock-mode .raben-panel[data-raben-panel="projects"] .fslider-vp {
  flex: 1 1 auto;
  width: 100%;
  min-height: 0;
  height: auto !important;
  max-height: none !important;
  overflow: hidden;
  position: relative;
  container-type: inline-size;
  container-name: proj-vp;
  --fs-slide-w: 100cqw;
}

body.raben-dock-mode .raben-panel[data-raben-panel="projects"] .fslide.fslide--showcase {
  min-height: 0 !important;
}

body.raben-dock-mode .raben-panel[data-raben-panel="projects"] .fslider-track {
  display: flex;
  height: 100%;
  will-change: transform;
  transition: transform 0.55s cubic-bezier(0.25, 0.46, 0.45, 0.94);
  width: max-content;
}

/* Each slide = viewport column width (fixes 100%-of-track stretch bug) */
body.raben-dock-mode .raben-panel[data-raben-panel="projects"] .fslide.fslide--showcase {
  flex: 0 0 var(--fs-slide-w, 100cqw) !important;
  width: var(--fs-slide-w, 100cqw) !important;
  max-width: var(--fs-slide-w, 100cqw) !important;
  min-width: var(--fs-slide-w, 100cqw) !important;
  height: 100% !important;
  min-height: 0 !important;
  position: relative;
  overflow: hidden;
  box-sizing: border-box;
}

.fslide--showcase {
  background: transparent;
}

/* Hide legacy mosaic overlay markup if present */
.fslide--showcase .fslide-mosaic,
.fslide--showcase .fslide-content,
.fslide--showcase .fslide-ov1,
.fslide--showcase .fslide-ov2 {
  display: none !important;
}

.fslide--showcase .proj-showcase {
  --proj-accent: #5a7a62;
  --proj-accent-soft: rgba(90, 122, 98, 0.12);
  --proj-accent-border: rgba(90, 122, 98, 0.28);
  display: grid;
  grid-template-columns: minmax(0, 1.12fr) minmax(0, 0.88fr);
  gap: clamp(0.85rem, 2vw, 1.5rem);
  width: 100%;
  height: 100%;
  box-sizing: border-box;
  padding: clamp(0.5rem, 1.5vw, 1rem) clamp(3.25rem, 5vw, 4.5rem);
  align-items: stretch;
}

.proj-showcase-media {
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
  min-width: 0;
  min-height: 0;
  overflow: hidden;
}

.proj-hero {
  position: relative;
  flex: 1 1 0;
  min-height: 0;
  max-height: 100%;
  margin: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0.35rem;
  border-radius: 14px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.72);
  box-shadow: 0 16px 40px rgba(26, 26, 24, 0.08);
  background: rgba(255, 253, 250, 0.92);
  isolation: isolate;
}

.proj-hero img {
  position: relative;
  display: block;
  width: 100%;
  height: 100%;
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  object-position: center;
}

.proj-thumbs {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.65rem;
  flex: 0 0 auto;
  flex-shrink: 0;
  width: 100%;
  padding-top: 0.1rem;
}

.proj-thumb {
  position: relative;
  aspect-ratio: 16 / 10;
  border: none;
  padding: 0.2rem;
  border-radius: 8px;
  overflow: hidden;
  cursor: pointer;
  background: rgba(255, 253, 250, 0.95);
  border: 1px solid rgba(26, 26, 24, 0.1);
  box-shadow: 0 4px 14px rgba(26, 26, 24, 0.06);
  box-sizing: border-box;
}

.proj-thumb img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  object-position: center;
  display: block;
  border-radius: 4px;
  background: rgba(255, 253, 250, 0.95);
}

.proj-thumb.is-active::after {
  content: "";
  position: absolute;
  inset: 0;
  box-shadow: inset 0 0 0 2px var(--proj-accent);
  pointer-events: none;
}

.proj-card {
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  align-self: center;
  position: relative;
  z-index: 4;
  width: 100%;
  height: fit-content;
  max-height: none;
  min-width: 0;
  overflow: visible;
  padding: clamp(0.9rem, 1.8vw, 1.25rem);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.62);
  backdrop-filter: blur(16px) saturate(1.25);
  -webkit-backdrop-filter: blur(16px) saturate(1.25);
  border: 1px solid rgba(255, 255, 255, 0.82);
  box-shadow: 0 16px 40px rgba(26, 26, 24, 0.07);
}

.proj-dev {
  margin: 0 0 0.35rem;
  font-family: "Noto Serif Devanagari", serif;
  font-size: 1rem;
  font-weight: 500;
  color: var(--proj-accent) !important;
}

.proj-focus {
  margin: 0 0 0.85rem;
  padding-top: 0.65rem;
  border-top: 1px solid rgba(26, 26, 24, 0.08);
}

.proj-focus-label {
  margin: 0 0 0.5rem;
  font-family: var(--raben-ui, "Inter", sans-serif);
  font-size: 0.58rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--proj-accent) !important;
}

.proj-highlights {
  display: block;
  margin: 0;
  padding: 0 0 0 1rem;
  list-style: none;
}

.proj-highlights li {
  position: relative;
  margin: 0 0 0.35rem;
  padding: 0;
  border: none;
  border-radius: 0;
  background: none;
  font-family: var(--raben-ui, "Inter", sans-serif);
  font-size: 0.72rem;
  line-height: 1.45;
  color: var(--raben-ink-soft) !important;
}

.proj-highlights li::before {
  content: "";
  position: absolute;
  left: -0.85rem;
  top: 0.55em;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--proj-accent);
}

.proj-status,
.proj-tag {
  display: none !important;
}

.proj-title {
  margin: 0 0 0.4rem;
  font-family: var(--raben-display, "Cormorant Garamond", serif);
  font-size: clamp(1.55rem, 2.8vw, 2.2rem);
  font-weight: 400;
  line-height: 1.08;
  letter-spacing: -0.02em;
  color: var(--raben-ink, #1a1a18) !important;
  text-shadow: none !important;
}

.proj-sub {
  margin: 0 0 0.6rem;
  font-family: var(--raben-display, "Cormorant Garamond", serif);
  font-style: italic;
  font-size: clamp(0.9rem, 1.5vw, 1rem);
  line-height: 1.45;
  color: var(--raben-ink-soft, #4a4844) !important;
}

.proj-desc {
  margin: 0 0 0.65rem;
  font-family: var(--raben-ui, "Inter", sans-serif);
  font-size: clamp(0.76rem, 1.2vw, 0.86rem);
  line-height: 1.6;
  color: var(--raben-ink-soft, #4a4844) !important;
}

.proj-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem 0.75rem;
  margin-top: 0;
  position: relative;
  z-index: 5;
}

.proj-count {
  flex: 1 1 100%;
  font-family: var(--raben-ui, "Inter", sans-serif);
  font-size: 0.52rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--raben-ink-soft) !important;
  opacity: 0.75;
}

.proj-cta {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.58rem 1rem;
  border-radius: 999px;
  border: 1px solid var(--proj-accent-border);
  background: var(--proj-accent-soft);
  color: var(--raben-ink) !important;
  font-family: var(--raben-ui, "Inter", sans-serif);
  font-size: 0.66rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  cursor: pointer;
  position: relative;
  z-index: 6;
  pointer-events: auto;
}

.proj-cta--anna {
  background: rgba(196, 136, 10, 0.18);
  border-color: rgba(196, 136, 10, 0.45);
}

.proj-cta--ghost {
  background: rgba(255, 255, 255, 0.55);
}

.proj-cta-icon {
  width: 1.55rem;
  height: 1.55rem;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: rgba(255, 255, 255, 0.65);
  border: 1px solid var(--proj-accent-border);
  flex-shrink: 0;
}

.proj-cta-icon svg {
  display: block;
}

body.raben-site .fslider-hdr .fslider-htitle span {
  color: var(--raben-accent) !important;
}

/* Arrows sit inside padded slide area */
body.raben-dock-mode .raben-panel[data-raben-panel="projects"] .fslider-arr {
  z-index: 30;
}

@media (max-width: 960px) {
  .fslide--showcase .proj-showcase {
    grid-template-columns: 1fr;
    padding: 0.5rem clamp(2.75rem, 4vw, 3.25rem) 0.75rem;
    overflow-y: auto;
  }

  .proj-hero {
    min-height: clamp(11rem, 34vw, 15rem);
  }

  body.raben-dock-mode .raben-panel[data-raben-panel="projects"] .fslide.fslide--showcase {
    height: auto !important;
    overflow-y: auto;
  }
}
