/* =========================
  BANNER SECTION
=========================  */
.premium-banner {
  position: relative;
  width: 100%;
  height: clamp(400px, 55vh, 700px);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  background-color: #000;
}

/* Cinematic Background Animation */
.banner-bg-image {
  position: absolute;
  inset: -5%;
  background-image: url("../img/banner/portfolio.avif");
  background-size: cover;
  background-position: center;
  z-index: 0;
  animation: cinematicPan 25s linear infinite alternate;
}

/* Vignette / Spotlight Overlay */
.banner-overlay {
  position: absolute;
  inset: 0;
  background: radial-gradient(
    circle at center,
    rgba(15, 15, 15, 0.2) 0%,
    rgba(15, 15, 15, 0.8) 100%
  );
  z-index: 1;
}

/* Content Container */
.banner-content {
  position: relative;
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: 0 var(--space-4);
  max-width: 1000px;
  width: 100%;
}

/* --- ADVANCED GLASSMORPHISM BREADCRUMB --- */
.breadcrumb {
  background: linear-gradient(
    135deg,
    rgba(255, 255, 255, 0.08) 0%,
    rgba(255, 255, 255, 0.01) 100%
  );
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  padding: var(--space-1) var(--space-4);
  border-radius: var(--radius-pill);
  box-shadow:
    inset 0 0 0 1px rgba(255, 255, 255, 0.15),
    0 12px 40px rgba(0, 0, 0, 0.3);
  transform: translateY(20px);
  opacity: 0;
  animation: fadeUp 1s var(--premium-ease) forwards;
  margin-bottom: var(--space-3);
}

.breadcrumb ol {
  list-style: none;
  display: flex;
  align-items: center;
  gap: var(--space-2);
  margin-bottom: 0;
  padding-left: 0;
}

.breadcrumb li {
  font-size: var(--fs-xs);
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: rgba(255, 255, 255, 0.6);
  display: flex;
  align-items: center;
}

.breadcrumb a {
  color: var(--color-surface);
  text-decoration: none;
  font-weight: 500;
  transition: var(--transition);
  opacity: 0.8;
}

.breadcrumb a:hover {
  opacity: 1;
  color: var(--color-surface);
  text-shadow: 0 0 12px rgba(255, 255, 255, 0.5);
}

/* SVG Chevron Separator */
.breadcrumb .separator {
  opacity: 0.4;
  display: flex;
  align-items: center;
}

.breadcrumb .current {
  color: var(--color-yellow);
  font-weight: 600;
  opacity: 1;
}

/* --- TYPOGRAPHY --- */
.title-wrapper {
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
}

.page-title {
  font-size: var(--fs-xxl);
  color: var(--color-surface);
  font-weight: 500;
  letter-spacing: -0.03em;
  line-height: 1.1;
  text-shadow: 0 8px 32px rgba(0, 0, 0, 0.5);
  opacity: 0;
  transform: translateY(30px);
  animation: fadeUp 1s var(--premium-ease) 0.2s forwards;
  margin-bottom: 0;
}

.page-subtitle {
  font-size: var(--fs-lg);
  color: rgba(255, 255, 255, 0.75);
  max-width: 650px;
  margin: 0 auto;
  line-height: 1.6;
  font-weight: 400;
  text-shadow: 0 4px 16px rgba(0, 0, 0, 0.4);
  opacity: 0;
  transform: translateY(30px);
  animation: fadeUp 1s var(--premium-ease) 0.4s forwards;
}

/* --- GLOWING BRAND ACCENT LINE --- */
.brand-accent-line {
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 2px;
  z-index: 3;
  background: linear-gradient(
    90deg,
    var(--color-blue) 0%,
    var(--color-red) 33%,
    var(--color-yellow) 66%,
    var(--color-green) 100%
  );
}

/* Subtle glow beneath the line */
.brand-accent-glow {
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 12px;
  z-index: 2;
  filter: blur(8px);
  opacity: 0.6;
  background: linear-gradient(
    90deg,
    var(--color-blue) 0%,
    var(--color-red) 33%,
    var(--color-yellow) 66%,
    var(--color-green) 100%
  );
}

/* --- KEYFRAMES --- */
@keyframes fadeUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes cinematicPan {
  from {
    transform: scale(1);
  }

  to {
    transform: scale(1.08);
  }
}

/* =========================
  FILTER SECTION
========================= */
.projects-filter-section {
  position: sticky;
  top: 0;
  z-index: 30;
  padding: 12px 0;
  background:
    linear-gradient(180deg, rgba(5, 8, 18, 0.94), rgba(5, 8, 18, 0.82)),
    radial-gradient(
      circle at 14% 50%,
      rgba(66, 133, 244, 0.2),
      transparent 30%
    ),
    radial-gradient(circle at 86% 50%, rgba(52, 168, 83, 0.14), transparent 28%);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  border-top: 1px solid rgba(255, 255, 255, 0.06);
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.projects-filter-wrap {
  display: flex;
  justify-content: center;
  gap: 8px;
  overflow-x: auto;
  padding: 4px clamp(12px, 3vw, 34px);
  scrollbar-width: none;
}

.projects-filter-wrap::-webkit-scrollbar {
  display: none;
}

.project-filter {
  border: 0;
  white-space: nowrap;
  cursor: pointer;
  padding: 10px 17px;
  border-radius: var(--radius-pill, 999px);
  font-family: var(--font-family, inherit);
  font-size: 11px;
  font-weight: 850;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.72);
  background: rgba(255, 255, 255, 0.08);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.12),
    0 10px 28px rgba(0, 0, 0, 0.14);
  transition: 0.35s ease;
}

.project-filter:hover,
.project-filter.active {
  color: #fff;
  background: linear-gradient(
    90deg,
    var(--color-blue, #4285f4),
    var(--color-green, #34a853)
  );
  transform: translateY(-2px);
  box-shadow:
    0 16px 36px rgba(66, 133, 244, 0.26),
    0 8px 18px rgba(52, 168, 83, 0.18);
}

/* =========================
  FEATURED PROJECTS
========================= */
.featured-projects-section {
  padding: 0;
  margin: 0;
  background: #050812;
}

.featured-projects-section .container-fluid {
  padding-left: 0 !important;
  padding-right: 0 !important;
}

.projects-feature-grid {
  display: grid;
  grid-template-columns: 1.05fr 0.9fr 1.05fr;
  gap: 0;
  margin: 0;
  padding: 0;
  background: #050812;
}

.project-feature-card {
  position: relative;
  min-height: 620px;
  overflow: hidden;
  border-radius: 0;
  background: #050812;
  isolation: isolate;
}

.project-feature-card.tall {
  min-height: 720px;
}

.project-feature-card img,
.project-feature-card video {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
  border-radius: 0;
  transform: scale(1.01);
  transition:
    transform 1.15s cubic-bezier(0.16, 1, 0.3, 1),
    filter 0.55s ease;
}

.project-feature-card::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
  background:
    linear-gradient(180deg, rgba(0, 0, 0, 0.02) 0%, rgba(0, 0, 0, 0.7) 100%),
    radial-gradient(
      circle at 30% 20%,
      rgba(255, 255, 255, 0.13),
      transparent 32%
    );
  opacity: 0.92;
  transition: opacity 0.4s ease;
}

.project-feature-card::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 2;
  border: 1px solid rgba(255, 255, 255, 0.07);
  pointer-events: none;
}

.project-feature-card:hover img,
.project-feature-card:hover video {
  transform: scale(1.075);
  filter: saturate(1.12) contrast(1.05);
}

.project-glass-label {
  position: absolute;
  left: clamp(18px, 3vw, 38px);
  bottom: clamp(18px, 3vw, 38px);
  z-index: 3;
  padding: 10px 16px;
  border-radius: var(--radius-pill, 999px);
  background: rgba(255, 255, 255, 0.13);
  border: 1px solid rgba(255, 255, 255, 0.24);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  color: #fff;
  font-size: 11px;
  font-weight: 850;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  box-shadow: 0 16px 42px rgba(0, 0, 0, 0.24);
}

/* =========================
  DENSE VISUAL GALLERY
========================= */
.projects-gallery-section {
  padding: 0;
  margin: 0;
  background: #050812;
}

.projects-gallery-section .container-fluid {
  padding-left: 0 !important;
  padding-right: 0 !important;
}

.visual-gallery {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  grid-auto-rows: clamp(95px, 8vw, 128px);
  grid-auto-flow: dense;
  gap: 0;
  margin: 0;
  padding: 0;
  background: #050812;
}

.visual-card {
  position: relative;
  grid-column: span 3;
  grid-row: span 3;
  overflow: hidden;
  border-radius: 0;
  background: #050812;
  box-shadow: none;
  isolation: isolate;
  min-width: 0;
  transition:
    transform 0.48s cubic-bezier(0.16, 1, 0.3, 1),
    filter 0.35s ease;
}

.visual-card.large {
  grid-column: span 6;
  grid-row: span 4;
}

.visual-card.wide {
  grid-column: span 6;
  grid-row: span 3;
}

.visual-card.portrait {
  grid-column: span 3;
  grid-row: span 5;
}

.visual-card.small {
  grid-column: span 3;
  grid-row: span 2;
}

.visual-card.square {
  grid-column: span 3;
  grid-row: span 3;
}

.visual-card.ultra-wide {
  grid-column: span 9;
  grid-row: span 3;
}

.visual-card.hero-tile {
  grid-column: span 6;
  grid-row: span 5;
}

.visual-card img,
.visual-card video {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
  border-radius: 0;
  transform: scale(1.01);
  transition:
    transform 1s cubic-bezier(0.16, 1, 0.3, 1),
    filter 0.55s ease;
}

.visual-card::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
  opacity: 0;
  background:
    linear-gradient(180deg, transparent 8%, rgba(0, 0, 0, 0.74) 100%),
    radial-gradient(
      circle at 20% 18%,
      rgba(66, 133, 244, 0.28),
      transparent 34%
    );
  transition: opacity 0.4s ease;
}

.visual-card::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 2;
  border: 1px solid rgba(255, 255, 255, 0.065);
  pointer-events: none;
}

.visual-card:hover {
  z-index: 5;
  /* transform: scale(1.014); */
}

.visual-card:hover img,
.visual-card:hover video {
  transform: scale(1.08);
  filter: saturate(1.12) contrast(1.05);
}

.visual-card:hover::before {
  opacity: 1;
}

.visual-overlay {
  position: absolute;
  left: clamp(12px, 2vw, 24px);
  right: clamp(12px, 2vw, 24px);
  bottom: clamp(12px, 2vw, 24px);
  z-index: 3;
  display: flex;
  align-items: center;
  justify-content: space-between;
  opacity: 0;
  transform: translateY(14px);
  transition: 0.42s cubic-bezier(0.16, 1, 0.3, 1);
}

.visual-overlay span {
  display: inline-flex;
  padding: 8px 14px;
  border-radius: var(--radius-pill, 999px);
  color: #fff;
  font-size: 10px;
  font-weight: 900;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  background: rgba(255, 255, 255, 0.13);
  border: 1px solid rgba(255, 255, 255, 0.23);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.24);
}

.visual-card:hover .visual-overlay {
  opacity: 1;
  transform: translateY(0);
}

/* Filter hide state */
.project-item.is-hidden {
  display: none !important;
}

/* =========================
  CLOSING CTA
========================= */
.projects-closing {
  padding: 0;
  margin: 0;
  background: #050812;
}

.projects-closing .container-fluid {
  padding-left: 0 !important;
  padding-right: 0 !important;
}

.projects-closing-card {
  position: relative;
  min-height: clamp(520px, 62vw, 760px);
  overflow: hidden;
  border-radius: 0;
  background: #050812;
  box-shadow: none;
  isolation: isolate;
}

.projects-closing-card img,
.projects-closing-card video {
  width: 100%;
  height: 100%;
  position: absolute;
  inset: 0;
  display: block;
  object-fit: cover;
  border-radius: 0;
  transform: scale(1.01);
}

.projects-closing-card::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
  background:
    linear-gradient(90deg, rgba(5, 8, 18, 0.92), rgba(5, 8, 18, 0.18)),
    radial-gradient(
      circle at 18% 55%,
      rgba(234, 67, 53, 0.24),
      transparent 34%
    ),
    radial-gradient(
      circle at 42% 22%,
      rgba(66, 133, 244, 0.22),
      transparent 30%
    );
}

.projects-closing-content {
  position: relative;
  z-index: 2;
  min-height: inherit;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: flex-end;
  padding: clamp(32px, 7vw, 96px);
  max-width: 780px;
}

.projects-closing-content span {
  color: var(--color-yellow, #fbbc05);
  font-size: 11px;
  font-weight: 900;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  margin-bottom: 16px;
}

.projects-closing-content h2 {
  color: #fff;
  font-size: clamp(3.5rem, 9vw, 9rem);
  line-height: 0.88;
  letter-spacing: -0.08em;
  margin-bottom: 30px;
}

.projects-closing-content h2::after {
  display: none;
}

/* =========================
  RESPONSIVE
========================= */
@media (max-width: 1199px) {
  .project-feature-card {
    min-height: 560px;
  }

  .project-feature-card.tall {
    min-height: 620px;
  }

  .visual-card,
  .visual-card.portrait,
  .visual-card.small,
  .visual-card.square {
    grid-column: span 4;
  }

  .visual-card.large,
  .visual-card.wide,
  .visual-card.hero-tile {
    grid-column: span 8;
  }

  .visual-card.ultra-wide {
    grid-column: span 12;
  }
}

@media (max-width: 991px) {
  .projects-feature-grid {
    grid-template-columns: 1fr;
  }

  .project-feature-card,
  .project-feature-card.tall {
    min-height: 520px;
  }

  .visual-gallery {
    grid-template-columns: repeat(6, 1fr);
    grid-auto-rows: 112px;
  }

  .visual-card,
  .visual-card.portrait,
  .visual-card.small,
  .visual-card.square {
    grid-column: span 3;
    grid-row: span 3;
  }

  .visual-card.large,
  .visual-card.wide,
  .visual-card.hero-tile,
  .visual-card.ultra-wide {
    grid-column: span 6;
    grid-row: span 3;
  }
}

@media (max-width: 600px) {
  .projects-filter-section {
    top: auto;
  }

  .projects-filter-wrap {
    padding-inline: 12px;
  }

  .project-feature-card,
  .project-feature-card.tall {
    min-height: 440px;
  }

  .visual-gallery {
    grid-template-columns: repeat(2, 1fr);
    grid-auto-rows: 210px;
  }

  .visual-card,
  .visual-card.large,
  .visual-card.wide,
  .visual-card.portrait,
  .visual-card.small,
  .visual-card.square,
  .visual-card.hero-tile,
  .visual-card.ultra-wide {
    grid-column: span 1;
    grid-row: span 1;
  }

  .visual-card.large,
  .visual-card.wide,
  .visual-card.hero-tile,
  .visual-card.ultra-wide {
    grid-column: span 2;
  }

  .visual-card.portrait {
    grid-row: span 2;
  }

  .visual-overlay {
    opacity: 1;
    transform: none;
  }

  .projects-closing-card {
    min-height: 560px;
  }

  .projects-closing-card::after {
    background:
      linear-gradient(180deg, rgba(5, 8, 18, 0.1), rgba(5, 8, 18, 0.94)),
      radial-gradient(
        circle at 30% 70%,
        rgba(66, 133, 244, 0.24),
        transparent 40%
      );
  }

  .projects-closing-content {
    justify-content: flex-end;
    padding-bottom: 110px;
  }

  .projects-closing-content h2 {
    font-size: clamp(3rem, 17vw, 5.5rem);
  }
}

/* =========================
  MEDIA GRID INDICATORS
========================= */
.project-item {
  cursor: pointer;
}

.play-indicator {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 56px;
  height: 56px;
  background: rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border: 1px solid rgba(255, 255, 255, 0.25);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 3;
  pointer-events: none;
  transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

.visual-card:hover .play-indicator {
  background: var(--color-blue, #4285f4);
  border-color: transparent;
  transform: translate(-50%, -50%) scale(1.15);
  box-shadow: 0 10px 25px rgba(66, 133, 244, 0.4);
}

/* =========================
  LIGHTBOX MODAL
========================= */
.media-modal {
  position: fixed;
  inset: 0;
  z-index: 99999;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  visibility: hidden;
  transition:
    opacity 0.4s ease,
    visibility 0.4s ease;
}

.media-modal.is-open {
  opacity: 1;
  visibility: visible;
}

.media-modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(5, 8, 18, 0.95);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}

.media-modal-content {
  position: relative;
  z-index: 100000;
  width: 100%;
  max-width: 95vw;
  max-height: 90vh;
  display: flex;
  align-items: center;
  justify-content: center;
  transform: scale(0.95) translateY(20px);
  transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

.media-modal.is-open .media-modal-content {
  transform: scale(1) translateY(0);
}

.media-modal-close {
  position: absolute;
  top: -45px;
  right: 0;
  background: rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 50%;
  color: #fff;
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  padding: 0;
  transition: all 0.3s ease;
  z-index: 2;
}

.media-modal-close:hover {
  background: var(--color-yellow, #fbbc05);
  color: #000;
  transform: rotate(90deg);
}

.media-modal-body {
  width: 100%;
  height: 100%;
  display: flex;
  justify-content: center;
  align-items: center;
}

.media-modal-body img,
.media-modal-body video {
  max-width: 100%;
  max-height: 90vh;
  object-fit: contain; /* Prevents cropping, maintains perfect aspect ratio */
  border-radius: 4px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.6);
}

/* Modal Responsive Adjustments */
@media (max-width: 768px) {
  .media-modal-close {
    top: -50px;
    right: 10px;
    width: 36px;
    height: 36px;
  }
  .media-modal-content {
    max-width: 100vw;
    max-height: 85vh;
  }
  .media-modal-body img,
  .media-modal-body video {
    border-radius: 0;
    max-height: 85vh;
  }
}

/* =========================
  GRID VIDEO STYLES
========================= */
.visual-card video {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
  border-radius: 0;
  transform: scale(1.01);
  transition:
    transform 1s cubic-bezier(0.16, 1, 0.3, 1),
    filter 0.55s ease;
  pointer-events: none; /* Prevents video controls from showing on hover */
}

.visual-card:hover video {
  transform: scale(1.08);
  filter: saturate(1.12) contrast(1.05);
}

/* Modal Enhancements for Slider */
.media-modal-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 50%;
  color: #fff;
  width: 50px;
  height: 50px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  z-index: 100001;
  transition: all 0.3s ease;
}

.media-modal-nav:hover {
  background: var(--color-blue, #4285f4);
  border-color: transparent;
  transform: translateY(-50%) scale(1.1);
}

.prev-nav {
  left: clamp(10px, 3vw, 40px);
}
.next-nav {
  right: clamp(10px, 3vw, 40px);
}

/* Swipe & Drag Styles */
.media-modal-content {
  cursor: grab;
}
.media-modal-content:active {
  cursor: grabbing;
}
.media-modal-body img,
.media-modal-body video {
  pointer-events: none; /* Prevents image/video ghost dragging */
  user-select: none;
}

/* Mobile Adjustments for Arrows */
@media (max-width: 768px) {
  .media-modal-nav {
    width: 40px;
    height: 40px;
    background: rgba(0, 0, 0, 0.5); /* Higher contrast on mobile */
    border: none;
  }
  .prev-nav {
    left: 10px;
  }
  .next-nav {
    right: 10px;
  }
}

/* =========================
  GRID & RESPONSIVENESS
========================= */
.visual-gallery {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  grid-auto-rows: clamp(95px, 8vw, 128px);
  grid-auto-flow: dense; /* Crucial: This sucks small client logos into gaps */
  gap: 0;
  margin: 0;
  padding: 0;
  background: #050812;
}

/* Base Video/Image styles */
.visual-card video,
.visual-card img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
  transition:
    transform 0.6s cubic-bezier(0.16, 1, 0.3, 1),
    filter 0.5s ease;
  pointer-events: none; /* Stops video play UI from popping up */
}

/* Client Logo Styling (White Background, contained) */
.client-logo-card {
  background: #ffffff !important;
}
.client-logo-card img {
  object-fit: contain !important;
  padding: 15%; /* Gives breathing room to logos */
  filter: grayscale(10%) contrast(1.1);
}

.visual-card:hover video,
.visual-card:hover img {
  transform: scale(1.08);
}

/* 
  Spans Math:
  portrait (9:16) = spans 3 col x 5 row
  wide (16:9) = spans 6 col x 3 row
  small/square (Logos) = spans 3 col x 2 or 3 row (Perfect for plugging gaps)
*/
.visual-card {
  grid-column: span 3;
  grid-row: span 3;
}
.visual-card.small {
  grid-column: span 3;
  grid-row: span 2;
}
.visual-card.square {
  grid-column: span 3;
  grid-row: span 3;
}
.visual-card.portrait {
  grid-column: span 3;
  grid-row: span 5;
}
.visual-card.wide {
  grid-column: span 6;
  grid-row: span 3;
}
.visual-card.large {
  grid-column: span 6;
  grid-row: span 4;
}

/* Tablets */
@media (max-width: 991px) {
  .visual-gallery {
    grid-template-columns: repeat(6, 1fr);
  }
  .visual-card,
  .visual-card.portrait,
  .visual-card.small,
  .visual-card.square {
    grid-column: span 3;
  }
  .visual-card.large,
  .visual-card.wide {
    grid-column: span 6;
  }
}

/* Mobile Devices */
@media (max-width: 600px) {
  .visual-gallery {
    grid-template-columns: repeat(2, 1fr);
    grid-auto-rows: clamp(120px, 35vw, 180px); /* Taller base row for mobile */
  }

  /* Portraits take 1 column, but 2 rows (Creates exact 9:16 vertical feel) */
  .visual-card.portrait {
    grid-column: span 1;
    grid-row: span 2;
  }

  /* Wides take full width (2 cols), 1 row (Creates exact 16:9 landscape feel) */
  .visual-card.large,
  .visual-card.wide {
    grid-column: span 2;
    grid-row: span 1;
  }

  /* Logos & standard squares take 1 col, 1 row */
  .visual-card,
  .visual-card.small,
  .visual-card.square {
    grid-column: span 1;
    grid-row: span 1;
  }
}
