/* ==============================================
   PREMIUM EDITORIAL CASE STUDY
   Designed for high-end, story-driven presentations
   ============================================== */

:root {
  --editorial-primary: #0f172a;
  --editorial-accent: #a855f7;
  --editorial-accent-glow: rgba(168, 85, 247, 0.4);
  --editorial-text: #64748b;
  --editorial-light: #f8fafc;
  --editorial-border: rgba(148, 163, 184, 0.12);
  --editorial-bg-gradient: linear-gradient(135deg, #0a0a0c 0%, #0f0f14 50%, #0a0a0c 100%);
}

html[data-theme="light"] {
  --editorial-primary: #0f172a;
  --editorial-light: #ffffff;
  --editorial-border: rgba(15, 23, 42, 0.08);
  --editorial-bg-gradient: linear-gradient(135deg, #ffffff 0%, #f8fafc 50%, #ffffff 100%);
}

html[data-theme="dark"] {
  --editorial-primary: #f8fafc;
  --editorial-light: #0a0a0c;
  --editorial-text: #94a3af;
  --editorial-border: rgba(248, 250, 252, 0.08);
  --editorial-bg-gradient: linear-gradient(135deg, #0a0a0c 0%, #12121a 50%, #0a0a0c 100%);
}

body.project-detail-page {
  background: var(--editorial-bg-gradient);
  color: var(--editorial-primary);
  overflow-x: hidden;
  scroll-behavior: smooth;
}

/* ==============================================
   HERO SECTION - Bold Introduction
   ============================================== */

.editorial-hero {
  min-height: 100vh;
  display: flex;
  align-items: center;
  padding: 0 0 0 80px;
  position: relative;
  background: var(--editorial-light);
}

.editorial-hero__container {
  max-width: 1800px;
  width: 100%;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1fr 1.2fr;
  gap: 0;
  align-items: center;
}

.editorial-hero__back {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: 'Space Grotesk', sans-serif;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--editorial-text);
  text-decoration: none;
  margin-bottom: 32px;
  transition: all 0.3s ease;
  opacity: 0;
  animation: fadeSlideUp 0.8s ease forwards 0.1s;
}

.editorial-hero__back:hover {
  color: var(--editorial-accent);
  transform: translateX(-4px);
}

.editorial-hero__back svg {
  width: 14px;
  height: 14px;
  transition: transform 0.3s ease;
}

.editorial-hero__back:hover svg {
  transform: translateX(-3px);
}

.editorial-hero__content {
  padding-right: 120px;
  position: relative;
}

.editorial-meta {
  display: flex;
  gap: 48px;
  margin-bottom: 48px;
  opacity: 0;
  animation: fadeSlideUp 0.8s ease forwards 0.2s;
}

.editorial-meta__item {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.editorial-meta__label {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--editorial-text);
}

.editorial-meta__value {
  font-family: 'DM Sans', sans-serif;
  font-size: 15px;
  font-weight: 600;
  color: var(--editorial-primary);
}

.editorial-hero__title {
  font-family: 'DM Sans', sans-serif;
  font-size: clamp(80px, 10vw, 140px);
  font-weight: 900;
  line-height: 0.88;
  letter-spacing: -0.06em;
  margin: 0 0 40px 0;
  color: var(--editorial-primary);
  opacity: 0;
  animation: fadeSlideUp 0.8s ease forwards 0.4s;
  text-shadow: 0 2px 40px rgba(0, 0, 0, 0.1);
}

.editorial-hero__subtitle {
  font-family: 'Space Grotesk', sans-serif;
  font-size: clamp(18px, 1.8vw, 22px);
  line-height: 1.6;
  color: var(--editorial-text);
  max-width: 560px;
  margin-bottom: 48px;
  opacity: 0;
  animation: fadeSlideUp 0.8s ease forwards 0.6s;
}

.editorial-hero__link {
  display: inline-flex;
  align-items: center;
  gap: 16px;
  font-family: 'DM Sans', sans-serif;
  font-size: 15px;
  font-weight: 700;
  color: var(--editorial-primary);
  text-decoration: none;
  padding: 18px 36px;
  border-radius: 50px;
  background: transparent;
  border: 2px solid var(--editorial-primary);
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  opacity: 0;
  animation: fadeSlideUp 0.8s ease forwards 0.8s;
  position: relative;
  overflow: hidden;
}

.editorial-hero__link::before {
  content: '';
  position: absolute;
  inset: 0;
  background: var(--editorial-accent);
  transform: translateX(-100%);
  transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  z-index: -1;
}

.editorial-hero__link:hover {
  border-color: var(--editorial-accent);
  color: white;
  transform: translateY(-2px);
  box-shadow: 0 10px 30px rgba(168, 85, 247, 0.3);
}

.editorial-hero__link:hover::before {
  transform: translateX(0);
}

.editorial-hero__link svg {
  width: 18px;
  height: 18px;
  transition: transform 0.3s ease;
  position: relative;
  z-index: 1;
}

.editorial-hero__link:hover svg {
  transform: translateX(4px);
}

.editorial-hero__visual {
  position: relative;
  height: 75vh;
  max-height: 700px;
  overflow: hidden;
  opacity: 0;
  animation: fadeIn 1.2s ease forwards 0.3s;
}

.editorial-hero__image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transform: scale(1.05);
  transition: transform 8s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.editorial-hero:hover .editorial-hero__image {
  transform: scale(1);
}

/* ==============================================
   CONTEXT SECTION - Problem & Approach
   ============================================== */

.editorial-context {
  padding: 240px 80px 200px;
  background: var(--editorial-light);
}

.editorial-context__container {
  max-width: 1400px;
  margin: 0 auto;
}

.editorial-context__intro {
  max-width: 900px;
  margin: 0 auto 120px;
  text-align: center;
}

.editorial-section-label {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--editorial-accent);
  margin-bottom: 24px;
  display: block;
}

.editorial-section-title {
  font-family: 'DM Sans', sans-serif;
  font-size: clamp(42px, 5vw, 72px);
  font-weight: 900;
  line-height: 1.05;
  letter-spacing: -0.04em;
  margin: 0 0 40px 0;
  color: #ffffff;
  text-shadow: 0 2px 30px rgba(0, 0, 0, 0.08);
}

.editorial-section-text {
  font-family: 'Space Grotesk', sans-serif;
  font-size: clamp(18px, 1.8vw, 22px);
  line-height: 1.7;
  color: var(--editorial-text);
}

.editorial-context__grid {
  display: grid;
  grid-template-columns: 0.9fr 1.1fr;
  gap: 120px;
  align-items: start;
  position: relative;
}

@media (min-width: 901px) {
  .editorial-context__text {
    position: sticky;
    top: 120px;
    align-self: start;
  }
}

.editorial-context__grid:nth-of-type(2) .editorial-context__text {
  transform: translateX(-60px);
  background: var(--editorial-light);
  padding: 60px;
  border-radius: 12px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.08);
  z-index: 2;
}

@media (min-width: 901px) {
  .layout-split-reverse .editorial-hero__content {
    position: sticky;
    top: 120px;
    align-self: start;
  }
}

html[data-theme="dark"] .editorial-context__grid:nth-of-type(2) .editorial-context__text {
  background: rgba(15, 15, 20, 0.8);
  backdrop-filter: blur(20px);
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.4);
}

.editorial-context__text h3 {
  font-family: 'DM Sans', sans-serif;
  font-size: clamp(28px, 3vw, 36px);
  font-weight: 700;
  line-height: 1.3;
  margin: 0 0 24px 0;
  color: var(--editorial-primary);
}

.editorial-context__text p {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 17px;
  line-height: 1.8;
  color: var(--editorial-text);
  margin: 0 0 24px 0;
}

.editorial-context__text ul {
  list-style: none;
  padding: 0;
  margin: 32px 0 0 0;
}

.editorial-context__text li {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 16px;
  line-height: 1.7;
  color: var(--editorial-text);
  padding-left: 32px;
  margin-bottom: 16px;
  position: relative;
}

.editorial-context__text li::before {
  content: '';
  position: absolute;
  left: 0;
  top: 10px;
  width: 16px;
  height: 2px;
  background: var(--editorial-accent);
}

.editorial-context__visual {
  position: sticky;
  top: 120px;
}

.editorial-context__image {
  width: 100%;
  aspect-ratio: 3 / 4;
  object-fit: cover;
  border-radius: 8px;
}

/* ==============================================
   SHOWCASE SECTION - Visual Moments
   ============================================== */

.editorial-showcase {
  padding: 0;
  background: var(--editorial-light);
}

.editorial-showcase__full {
  width: 100%;
  height: 65vh;
  max-height: 650px;
  position: relative;
  overflow: hidden;
  margin-bottom: 2px;
}

.editorial-showcase__full img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.6s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.editorial-showcase__full:hover img {
  transform: scale(1.05);
}

.editorial-showcase__split {
  display: grid;
  grid-template-columns: 1.3fr 0.7fr;
  gap: 2px;
  margin-bottom: 2px;
}

.editorial-showcase__split-item {
  position: relative;
  overflow: hidden;
  height: 55vh;
  max-height: 550px;
}

.editorial-showcase__split-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.6s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.editorial-showcase__split-item:hover img {
  transform: scale(1.08);
}

.editorial-showcase__offset {
  padding: 0 80px 160px;
  margin-top: 120px;
}

.editorial-showcase__offset-grid {
  max-width: 1600px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1fr 1.4fr;
  gap: 60px;
  align-items: center;
}

.editorial-showcase__offset-content {
  padding-right: 40px;
}

.editorial-showcase__offset-content h3 {
  font-family: 'DM Sans', sans-serif;
  font-size: clamp(32px, 4vw, 48px);
  font-weight: 700;
  line-height: 1.2;
  margin: 0 0 24px 0;
  color: var(--editorial-primary);
}

.editorial-showcase__offset-content p {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 17px;
  line-height: 1.8;
  color: var(--editorial-text);
}

.editorial-showcase__offset-image {
  width: 100%;
  aspect-ratio: 16 / 10;
  object-fit: cover;
  border-radius: 8px;
}

/* ==============================================
   RESULT SECTION - Outcomes & Impact
   ============================================== */

.editorial-result {
  padding: 240px 80px;
  background: linear-gradient(135deg, #0a0a0c 0%, #0f0f14 50%, #0a0a0c 100%);
  color: var(--editorial-light);
  position: relative;
  overflow: hidden;
}

.editorial-result::before {
  content: '';
  position: absolute;
  top: 0;
  left: 50%;
  width: 800px;
  height: 800px;
  background: radial-gradient(circle, rgba(168, 85, 247, 0.15) 0%, transparent 70%);
  transform: translate(-50%, -30%);
  pointer-events: none;
}

html[data-theme="dark"] .editorial-result {
  background: linear-gradient(135deg, #0a0a0c 0%, #12121a 50%, #0a0a0c 100%);
}

html[data-theme="light"] .editorial-result {
  background: linear-gradient(135deg, #0f172a 0%, #1e293b 50%, #0f172a 100%);
}

.editorial-result__container {
  max-width: 1400px;
  margin: 0 auto;
}

.editorial-result__header {
  max-width: 800px;
  margin-bottom: 100px;
}

.editorial-result__header .editorial-section-label {
  color: rgba(168, 85, 247, 0.8);
}

.editorial-result__header .editorial-section-title {
  color: #ffffff;
}

.editorial-result__header .editorial-section-text {
  color: rgba(255, 255, 255, 0.7);
}

html[data-theme="dark"] .editorial-result__header .editorial-section-text {
  color: rgba(248, 250, 252, 0.7);
}

.editorial-result__metrics {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 60px;
  margin-bottom: 120px;
}

.editorial-metric {
  padding: 48px 0;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
}

html[data-theme="dark"] .editorial-metric {
  border-top-color: rgba(248, 250, 252, 0.1);
}

.editorial-metric__value {
  font-family: 'DM Sans', sans-serif;
  font-size: clamp(64px, 7vw, 96px);
  font-weight: 900;
  line-height: 1;
  letter-spacing: -0.03em;
  background: linear-gradient(135deg, #a855f7 0%, #d946ef 50%, #a855f7 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  margin-bottom: 20px;
  filter: drop-shadow(0 0 30px var(--editorial-accent-glow));
  animation: pulseGlow 3s ease-in-out infinite;
}

.editorial-metric__label {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 15px;
  font-weight: 500;
  letter-spacing: 0.02em;
  color: rgba(255, 255, 255, 0.6);
}

html[data-theme="dark"] .editorial-metric__label {
  color: rgba(248, 250, 252, 0.6);
}

.editorial-result__quote {
  max-width: 900px;
  padding: 60px 0;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

html[data-theme="dark"] .editorial-result__quote {
  border-color: rgba(248, 250, 252, 0.1);
}

.editorial-quote__text {
  font-family: 'DM Sans', sans-serif;
  font-size: clamp(24px, 2.8vw, 36px);
  font-weight: 500;
  line-height: 1.5;
  color: #ffffff;
  margin-bottom: 32px;
}

.editorial-quote__author {
  display: flex;
  align-items: center;
  gap: 16px;
}

.editorial-quote__avatar {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid rgba(168, 85, 247, 0.3);
}

.editorial-quote__info {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.editorial-quote__name {
  font-family: 'DM Sans', sans-serif;
  font-size: 16px;
  font-weight: 700;
  color: #ffffff;
}

.editorial-quote__title {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 14px;
  color: rgba(255, 255, 255, 0.6);
}

html[data-theme="dark"] .editorial-quote__title {
  color: rgba(248, 250, 252, 0.6);
}

/* ==============================================
   NEXT PROJECT
   ============================================== */

.editorial-next {
  padding: 120px 80px;
  background: var(--editorial-light);
}

.editorial-next__container {
  max-width: 1600px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1fr 1.6fr;
  gap: 80px;
  align-items: center;
}

.editorial-next__content h3 {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: #ffffff;
  margin-bottom: 16px;
}

.editorial-next__title {
  font-family: 'DM Sans', sans-serif;
  font-size: clamp(48px, 6vw, 72px);
  font-weight: 800;
  line-height: 1;
  letter-spacing: -0.03em;
  margin: 0 0 32px 0;
  color: #ffffff;
}

.editorial-next__link {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  font-family: 'DM Sans', sans-serif;
  font-size: 15px;
  font-weight: 600;
  color: #ffffff;
  text-decoration: none;
  padding: 16px 0;
  border-bottom: 2px solid var(--editorial-accent);
  transition: all 0.3s ease;
}

.editorial-next__link:hover {
  color: var(--editorial-accent);
  transform: translateX(4px);
}

.editorial-next__visual {
  position: relative;
  aspect-ratio: 16 / 10;
  overflow: hidden;
  border-radius: 8px;
}

.editorial-next__image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.8s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.editorial-next__visual:hover .editorial-next__image {
  transform: scale(1.05);
}

/* ==============================================
   ANIMATIONS
   ============================================== */

@keyframes fadeSlideUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

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

@keyframes pulseGlow {
  0%, 100% {
    filter: drop-shadow(0 0 30px var(--editorial-accent-glow));
  }
  50% {
    filter: drop-shadow(0 0 50px rgba(168, 85, 247, 0.6));
  }
}

/* Scroll Reveal Animations */
.reveal {
  opacity: 0;
  transform: translateY(50px);
  transition: opacity 0.8s ease, transform 0.8s ease;
}

.reveal.active {
  opacity: 1;
  transform: translateY(0);
}

body.project-detail-page .reveal,
body.project-detail-page .reveal.active {
  transform: none;
}

/* ==============================================
   RESPONSIVE
   ============================================== */

@media (max-width: 1200px) {
  .editorial-hero {
    padding: 120px 60px;
  }

  .editorial-hero__container {
    grid-template-columns: 1fr;
    gap: 60px;
  }

  .editorial-hero__content {
    padding-right: 0;
  }

  .editorial-hero__visual {
    height: 60vh;
  }

  .editorial-context,
  .editorial-result,
  .editorial-next,
  .editorial-showcase__offset {
    padding-left: 60px;
    padding-right: 60px;
  }

  .editorial-context__grid,
  .editorial-showcase__offset-grid,
  .editorial-next__container {
    grid-template-columns: 1fr;
    gap: 60px;
  }

  .editorial-context__visual {
    position: relative;
    top: 0;
  }

  .editorial-result__metrics {
    grid-template-columns: 1fr;
    gap: 40px;
  }
}

@media (max-width: 768px) {
  .editorial-hero {
    padding: 100px 32px;
  }

  .editorial-hero__back {
    font-size: 12px;
    margin-bottom: 24px;
  }

  .editorial-hero__back svg {
    width: 12px;
    height: 12px;
  }

  .editorial-meta {
    flex-direction: column;
    gap: 24px;
  }

  .editorial-context,
  .editorial-result,
  .editorial-next,
  .editorial-showcase__offset {
    padding: 100px 32px;
  }

  .editorial-showcase__split {
    grid-template-columns: 1fr;
  }

  .editorial-showcase__split-item {
    height: 50vh;
  }

  .editorial-result__metrics {
    gap: 32px;
  }

  .editorial-metric {
    padding: 32px 0;
  }
}

/* ==============================================
   LAYOUT VARIATIONS - Unique Per Project
   ============================================== */

/* LAYOUT: Centered Hero - Arjuna */
.layout-centered .editorial-hero__container {
  grid-template-columns: 1fr;
  text-align: center;
  gap: 80px;
}

.layout-centered .editorial-hero__content {
  max-width: 900px;
  margin: 0 auto;
  padding-right: 0;
}

.layout-centered .editorial-meta {
  justify-content: center;
}

.layout-centered .editorial-hero__visual {
  height: 60vh;
  max-height: 600px;
  border-radius: 12px;
  overflow: hidden;
  max-width: 1400px;
  margin: 0 auto;
}

/* LAYOUT: Split Reverse - Bima */
.layout-split-reverse .editorial-hero__container {
  grid-template-columns: 1.2fr 1fr;
}

.layout-split-reverse .editorial-hero__visual {
  order: -1;
  height: 100vh;
  max-height: none;
  margin-left: -80px;
}

.layout-split-reverse .editorial-hero__content {
  padding-left: 80px;
  padding-right: 0;
}

.layout-split-reverse .editorial-showcase__split {
  grid-template-columns: 0.7fr 1.3fr;
}

/* LAYOUT: Immersive - Mandala */
.layout-immersive .editorial-hero {
  padding: 0;
  background: var(--editorial-primary);
  color: var(--editorial-light);
}

.layout-immersive .editorial-hero__container {
  position: relative;
  min-height: 100vh;
  grid-template-columns: 1fr;
  align-content: center;
}

.layout-immersive .editorial-hero__visual {
  position: absolute;
  inset: 0;
  height: 100%;
  max-height: none;
  z-index: 1;
}

.layout-immersive .editorial-hero__visual::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(to right, rgba(0,0,0,0.8) 0%, rgba(0,0,0,0.3) 100%);
  z-index: 1;
}

.layout-immersive .editorial-hero__image {
  transform: scale(1);
}

.layout-immersive .editorial-hero__content {
  position: relative;
  z-index: 2;
  padding: 120px 80px;
  max-width: 800px;
}

.layout-immersive .editorial-hero__title,
.layout-immersive .editorial-hero__subtitle,
.layout-immersive .editorial-meta__label,
.layout-immersive .editorial-meta__value {
  color: var(--editorial-light);
}

.layout-immersive .editorial-hero__link {
  color: var(--editorial-light);
  border-bottom-color: var(--editorial-accent);
}

/* LAYOUT: Minimal - Lumina */
.layout-minimal .editorial-hero {
  min-height: 85vh;
  background: var(--editorial-light);
}

.layout-minimal .editorial-hero__title {
  font-size: clamp(100px, 12vw, 180px);
  font-weight: 900;
  letter-spacing: -0.05em;
}

.layout-minimal .editorial-hero__visual {
  height: 50vh;
  max-height: 500px;
  border-radius: 16px;
}

.layout-minimal .editorial-showcase__full {
  height: 50vh;
  max-height: 500px;
  margin-bottom: 40px;
}

.layout-minimal .editorial-context__grid {
  gap: 140px;
}

/* LAYOUT: Dynamic - Apex */
.layout-dynamic .editorial-hero__container {
  grid-template-columns: 0.85fr 1.15fr;
  gap: 120px;
}

.layout-dynamic .editorial-hero__visual {
  height: 85vh;
  max-height: 750px;
  transform: translateY(-60px);
  border-radius: 20px;
  box-shadow: 0 40px 100px rgba(0,0,0,0.2);
}

.layout-dynamic .editorial-hero__content {
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.layout-dynamic .editorial-showcase__split {
  grid-template-columns: 1fr 1fr;
  gap: 40px;
  padding: 0 80px;
  margin-bottom: 40px;
}

.layout-dynamic .editorial-showcase__split-item {
  border-radius: 12px;
  height: 60vh;
  max-height: 600px;
}

/* LAYOUT: Editorial Grid - Echo */
.layout-grid .editorial-hero {
  padding: 80px;
}

.layout-grid .editorial-hero__container {
  display: flex;
  flex-direction: column;
  gap: 60px;
}

.layout-grid .editorial-hero__content {
  padding-right: 0;
  max-width: 1200px;
}

.layout-grid .editorial-hero__title {
  font-size: clamp(90px, 11vw, 160px);
}

.layout-grid .editorial-hero__visual {
  display: none;
}

.layout-grid .editorial-showcase {
  margin-top: -40px;
}

.layout-grid .editorial-showcase__grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  grid-auto-rows: minmax(250px, auto);
  gap: 20px;
  padding: 0 80px 80px;
  align-items: start;
}

.layout-grid .editorial-showcase__grid-item {
  aspect-ratio: 4 / 5;
  overflow: hidden;
  border-radius: 8px;
}

.layout-grid .editorial-showcase__grid-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.8s ease;
}

.layout-grid .editorial-showcase__grid-item:hover img {
  transform: scale(1.08);
}

.layout-grid .editorial-showcase__grid-item:first-child {
  grid-column: span 2;
  grid-row: 1;
  height: 592px;
  aspect-ratio: auto;
}

/* Item 2 stays in row 1, column 3 automatically */
/* Items 3 and 4 go to row 2, columns 1 and 2, next to item 5 in column 3 */
.layout-grid .editorial-showcase__grid-item:nth-child(3) {
  grid-column: 1;
  grid-row: 2;
}

.layout-grid .editorial-showcase__grid-item:nth-child(4) {
  grid-column: 2;
  grid-row: 2;
}

/* Apply grid layout to layout-dynamic and layout-immersive */
.layout-dynamic .editorial-showcase__grid,
.layout-immersive .editorial-showcase__grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  grid-auto-rows: minmax(250px, auto);
  gap: 20px;
  padding: 0 80px 80px;
  align-items: start;
}

.layout-dynamic .editorial-showcase__grid-item,
.layout-immersive .editorial-showcase__grid-item {
  aspect-ratio: 4 / 5;
  overflow: hidden;
  border-radius: 8px;
}

.layout-dynamic .editorial-showcase__grid-item img,
.layout-immersive .editorial-showcase__grid-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.8s ease;
}

.layout-dynamic .editorial-showcase__grid-item:hover img,
.layout-immersive .editorial-showcase__grid-item:hover img {
  transform: scale(1.08);
}

.layout-dynamic .editorial-showcase__grid-item:first-child,
.layout-immersive .editorial-showcase__grid-item:first-child {
  grid-column: span 2;
  grid-row: 1;
  height: 592px;
  aspect-ratio: auto;
}

.layout-dynamic .editorial-showcase__grid-item:nth-child(3),
.layout-immersive .editorial-showcase__grid-item:nth-child(3) {
  grid-column: 1;
  grid-row: 2;
}

.layout-dynamic .editorial-showcase__grid-item:nth-child(4),
.layout-immersive .editorial-showcase__grid-item:nth-child(4) {
  grid-column: 2;
  grid-row: 2;
}

/* Responsive adjustments for layout variations */
@media (max-width: 1200px) {
  .layout-split-reverse .editorial-hero__visual,
  .layout-dynamic .editorial-hero__visual {
    margin-left: 0;
    transform: translateY(0);
  }

  .layout-split-reverse .editorial-hero__content,
  .layout-dynamic .editorial-hero__content {
    padding-left: 0;
  }

  .layout-grid .editorial-showcase__grid {
    grid-template-columns: repeat(2, 1fr);
    padding: 0 60px 60px;
  }

  .layout-dynamic .editorial-showcase__grid,
  .layout-immersive .editorial-showcase__grid {
    grid-template-columns: repeat(2, 1fr);
    padding: 0 60px 60px;
  }

  .layout-dynamic .editorial-showcase__split {
    padding: 0 60px;
  }
}

@media (max-width: 768px) {
  .layout-centered .editorial-hero__visual,
  .layout-minimal .editorial-hero__visual,
  .layout-dynamic .editorial-showcase__split-item {
    height: 50vh;
  }

  .layout-immersive .editorial-hero__content {
    padding: 80px 32px;
  }

  .layout-grid .editorial-showcase__grid {
    grid-template-columns: 1fr;
    gap: 12px;
    padding: 0 32px 40px;
  }

  .layout-grid .editorial-showcase__grid-item:first-child {
    grid-column: span 1;
    grid-row: span 1;
  }

  .layout-dynamic .editorial-showcase__grid,
  .layout-immersive .editorial-showcase__grid {
    grid-template-columns: 1fr;
    gap: 12px;
    padding: 0 32px 40px;
  }

  .layout-dynamic .editorial-showcase__grid-item:first-child,
  .layout-immersive .editorial-showcase__grid-item:first-child {
    grid-column: span 1;
    grid-row: span 1;
    height: auto;
  }

  .layout-dynamic .editorial-showcase__split {
    padding: 0 32px;
    gap: 20px;
  }
}
