/* ==========================================================================
   Web Experience Lab - Sterile White Laboratory & Creative Studio Gallery
   Glassmorphism × Neumorphism × Sci-Fi UI × White Cyberpunk Architecture
   ========================================================================== */

:root {
  /* Pristine Laboratory Base & Neutral Palette */
  --bg-lab: #f4f6fa;
  --bg-lab-pure: #ffffff;
  --bg-card: rgba(255, 255, 255, 0.76);
  --bg-card-hover: rgba(255, 255, 255, 0.92);
  --bg-panel: rgba(241, 245, 249, 0.65);
  
  /* High-Contrast Editorial Typography */
  --text-lead: #090d16;
  --text-main: #1e293b;
  --text-muted: #64748b;
  --text-dim: #94a3b8;
  
  /* Sci-Fi / High-Tech Accents */
  --accent-cyan: #0284c7;
  --accent-cyan-light: #38bdf8;
  --accent-cyan-glow: rgba(56, 189, 248, 0.35);
  --accent-blue: #2563eb;
  
  /* Borders & Glass Specular Highlights */
  --border-glass: rgba(255, 255, 255, 0.95);
  --border-subtle: rgba(203, 213, 225, 0.45);
  --border-active: rgba(2, 132, 199, 0.4);
  
  /* Neumorphic Shadows (Tactile Extrusion & Deboss) */
  --shadow-neumorph-card: 
    12px 18px 40px rgba(15, 23, 42, 0.05),
    -10px -10px 28px rgba(255, 255, 255, 0.95),
    inset 0 1px 0 rgba(255, 255, 255, 1);
    
  --shadow-neumorph-hover: 
    16px 26px 54px rgba(15, 23, 42, 0.09),
    -12px -12px 32px rgba(255, 255, 255, 1),
    0 0 0 1px rgba(2, 132, 199, 0.25),
    inset 0 1px 0 rgba(255, 255, 255, 1);
    
  --shadow-neumorph-pill: 
    3px 5px 12px rgba(15, 23, 42, 0.05),
    -3px -3px 8px rgba(255, 255, 255, 0.9);

  --shadow-neumorph-inset: 
    inset 2px 2px 5px rgba(148, 163, 184, 0.16),
    inset -2px -2px 6px rgba(255, 255, 255, 0.95);

  /* Fonts */
  --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  --font-display: 'Outfit', -apple-system, BlinkMacSystemFont, sans-serif;
  --font-mono: 'JetBrains Mono', monospace;

  --ease-smooth: cubic-bezier(0.16, 1, 0.3, 1);
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  font-family: var(--font-sans);
  background-color: var(--bg-lab);
  color: var(--text-main);
  min-height: 100%;
}

body {
  position: relative;
  min-height: 100vh;
  padding-bottom: 90px;
  overflow-x: hidden;
  background-color: var(--bg-lab);
  /* Precision Millimeter Technical Grid Background */
  background-image: 
    radial-gradient(rgba(148, 163, 184, 0.18) 1px, transparent 1px),
    linear-gradient(to right, rgba(226, 232, 240, 0.4) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(226, 232, 240, 0.4) 1px, transparent 1px);
  background-size: 28px 28px, 140px 140px, 140px 140px;
}

/* Background Canvas */
#gallery-canvas {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  z-index: 0;
  pointer-events: none;
}

/* Ambient Clean Laboratory Glows */
.ambient-glow {
  position: fixed;
  border-radius: 50%;
  filter: blur(140px);
  pointer-events: none;
  z-index: 0;
  opacity: 0.45;
}

.glow-primary {
  top: -10%;
  left: 20%;
  width: 700px;
  height: 600px;
  background: radial-gradient(circle, rgba(255, 255, 255, 0.9) 0%, rgba(240, 245, 255, 0.6) 50%, transparent 75%);
}

.glow-cyan {
  bottom: 5%;
  right: 15%;
  width: 650px;
  height: 550px;
  background: radial-gradient(circle, rgba(224, 242, 254, 0.6) 0%, rgba(240, 249, 255, 0.3) 50%, transparent 75%);
}

/* --------------------------------------------------------------------------
   Top Navigation Header (Clean Glassmorphism)
   -------------------------------------------------------------------------- */
.gallery-header {
  position: relative;
  z-index: 25;
  padding: 22px 48px;
  border-bottom: 1px solid rgba(226, 232, 240, 0.7);
  background: rgba(255, 255, 255, 0.82);
  backdrop-filter: blur(24px) saturate(180%);
  -webkit-backdrop-filter: blur(24px) saturate(180%);
  box-shadow: 0 4px 20px rgba(15, 23, 42, 0.03);
}

.header-inner {
  max-width: 1360px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
}

.header-squares-link {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 5px 12px;
  border-radius: 9999px;
  background: rgba(241, 245, 249, 0.85);
  border: 1px solid rgba(203, 213, 225, 0.8);
  color: #334155;
  font-family: var(--font-mono);
  font-size: 0.72rem;
  font-weight: 500;
  text-decoration: none;
  transition: all 0.2s ease;
  box-shadow: 0 1px 3px rgba(15, 23, 42, 0.04);
}

.header-squares-link:hover {
  background: #0f172a;
  color: #ffffff;
  border-color: #0f172a;
  transform: translateX(-1px);
}

.brand-badge {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  background: #ffffff;
  border: 1px solid rgba(203, 213, 225, 0.8);
  color: var(--accent-cyan);
  padding: 4px 10px;
  border-radius: 6px;
  box-shadow: var(--shadow-neumorph-pill);
}

.brand-title {
  font-family: var(--font-display);
  font-size: 1.28rem;
  font-weight: 700;
  letter-spacing: -0.015em;
  color: var(--text-lead);
}

.header-stats {
  display: flex;
  align-items: center;
  gap: 12px;
}

.stat-pill {
  display: flex;
  align-items: center;
  gap: 8px;
  background: rgba(255, 255, 255, 0.9);
  border: 1px solid rgba(226, 232, 240, 0.85);
  padding: 6px 14px;
  border-radius: 9999px;
  font-size: 0.78rem;
  font-family: var(--font-mono);
  font-weight: 500;
  color: var(--text-muted);
  box-shadow: var(--shadow-neumorph-pill);
}

.stat-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #0284c7;
  box-shadow: 0 0 10px rgba(2, 132, 199, 0.7);
  animation: pulse-cyan 2.4s infinite ease-in-out;
}

@keyframes pulse-cyan {
  0%, 100% { transform: scale(1); opacity: 1; }
  50% { transform: scale(1.35); opacity: 0.65; }
}

/* --------------------------------------------------------------------------
   Container & Hero Section
   -------------------------------------------------------------------------- */
.gallery-container {
  position: relative;
  z-index: 10;
  max-width: 1360px;
  margin: 0 auto;
  padding: 56px 48px;
}

.gallery-hero {
  text-align: center;
  max-width: 860px;
  margin: 0 auto 50px auto;
  position: relative;
}

.hero-badge-wrap {
  display: flex;
  justify-content: center;
  gap: 10px;
  margin-bottom: 22px;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 6px 16px;
  border-radius: 9999px;
  font-size: 0.74rem;
  font-family: var(--font-mono);
  font-weight: 600;
  letter-spacing: 0.08em;
  background: rgba(255, 255, 255, 0.95);
  border: 1px solid rgba(203, 213, 225, 0.75);
  color: var(--accent-cyan);
  box-shadow: var(--shadow-neumorph-pill);
}

.hero-heading {
  font-family: var(--font-display);
  font-size: 3.15rem;
  font-weight: 800;
  line-height: 1.22;
  letter-spacing: -0.03em;
  margin-bottom: 22px;
  color: var(--text-lead);
}

.hero-heading .lab-title-highlight,
.hero-heading .neutral-highlight {
  position: relative;
  display: inline-block;
  color: var(--text-lead);
  background: linear-gradient(180deg, #0f172a 30%, #334155 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.hero-subtext {
  font-size: 1.05rem;
  color: var(--text-muted);
  line-height: 1.85;
  font-weight: 400;
}

/* --------------------------------------------------------------------------
   Category Filter Bar (Neumorphic Sculpted Pill)
   -------------------------------------------------------------------------- */
.gallery-filter-bar {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin: 0 auto 48px auto;
  padding: 6px 8px;
  background: var(--bg-panel);
  border: 1px solid rgba(255, 255, 255, 0.95);
  border-radius: 9999px;
  width: fit-content;
  box-shadow: var(--shadow-neumorph-inset);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
}

.mobile-consult-btn,
.filter-divider {
  display: none;
}

.filter-scroll-track {
  display: flex;
  align-items: center;
  gap: 8px;
}

.filter-btn {
  background: transparent;
  border: 1px solid transparent;
  color: var(--text-muted);
  font-family: var(--font-sans);
  font-size: 0.82rem;
  font-weight: 500;
  padding: 7px 18px;
  border-radius: 9999px;
  cursor: pointer;
  transition: all 0.22s var(--ease-smooth);
  display: flex;
  align-items: center;
  gap: 6px;
}

.filter-btn:hover {
  color: var(--text-lead);
  background: rgba(255, 255, 255, 0.6);
}

.filter-btn.active {
  background: #ffffff;
  border-color: rgba(226, 232, 240, 0.9);
  color: var(--text-lead);
  font-weight: 600;
  box-shadow: var(--shadow-neumorph-pill);
}

.filter-count {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  color: var(--text-dim);
}

/* --------------------------------------------------------------------------
   Cards Grid & Card Architecture (Glassmorphism + Neumorphism + Sci-Fi Reticles)
   -------------------------------------------------------------------------- */
.cards-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 36px;
}

.lab-card {
  background: var(--bg-card);
  backdrop-filter: blur(28px) saturate(180%);
  -webkit-backdrop-filter: blur(28px) saturate(180%);
  border: 1px solid var(--border-glass);
  border-radius: 22px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: transform 0.35s var(--ease-smooth), border-color 0.3s ease, box-shadow 0.35s var(--ease-smooth);
  box-shadow: var(--shadow-neumorph-card);
  position: relative;
}

.lab-card:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow-neumorph-hover);
  background: var(--bg-card-hover);
}

.lab-card.is-hidden {
  display: none !important;
}

/* Precision Sci-Fi Corner Brackets on Card [ ┌ ┐ └ ┘ ] */
.card-corner {
  position: absolute;
  width: 10px;
  height: 10px;
  border: 1.5px solid #94a3b8;
  z-index: 5;
  pointer-events: none;
  opacity: 0.65;
  transition: opacity 0.3s ease, border-color 0.3s ease;
}

.lab-card:hover .card-corner {
  opacity: 1;
  border-color: #0284c7;
}

.cc-tl { top: 12px; left: 12px; border-right: none; border-bottom: none; }
.cc-tr { top: 12px; right: 12px; border-left: none; border-bottom: none; }
.cc-bl { bottom: 12px; left: 12px; border-right: none; border-top: none; }
.cc-br { bottom: 12px; right: 12px; border-left: none; border-top: none; }

/* --------------------------------------------------------------------------
   Card Media Visual Header Area
   -------------------------------------------------------------------------- */
.card-media {
  height: 220px;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  background: linear-gradient(135deg, rgba(248, 250, 252, 0.95) 0%, rgba(241, 245, 249, 0.75) 100%);
  border-bottom: 1px solid rgba(226, 232, 240, 0.7);
}

/* Card Media Header Badges */
.card-id {
  position: absolute;
  top: 16px;
  left: 20px;
  font-family: var(--font-mono);
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  color: var(--text-muted);
  background: rgba(255, 255, 255, 0.9);
  padding: 4px 10px;
  border-radius: 6px;
  border: 1px solid rgba(226, 232, 240, 0.8);
  box-shadow: 0 2px 8px rgba(15, 23, 42, 0.04);
  z-index: 4;
}

.card-category-badge {
  position: absolute;
  top: 16px;
  right: 20px;
  font-family: var(--font-mono);
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  color: var(--accent-cyan);
  background: rgba(255, 255, 255, 0.9);
  border: 1px solid rgba(186, 230, 253, 0.9);
  padding: 4px 11px;
  border-radius: 9999px;
  box-shadow: 0 2px 8px rgba(2, 132, 199, 0.08);
  z-index: 4;
}

/* Subtle Technical Coordinate Watermark */
.card-coord-tag {
  position: absolute;
  bottom: 10px;
  left: 20px;
  font-family: var(--font-mono);
  font-size: 0.65rem;
  color: #94a3b8;
  letter-spacing: 0.06em;
  pointer-events: none;
  z-index: 4;
}

.media-visual {
  position: relative;
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.4s var(--ease-smooth);
}

.lab-card:hover .media-visual {
  transform: scale(1.035);
}

/* --------------------------------------------------------------------------
   Visual Diagrams (Clean Sterile White / Blueprint Styling)
   -------------------------------------------------------------------------- */

/* 1. Torus Wireframe Diagram */
.torus-diagram {
  position: relative;
  width: 140px;
  height: 140px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.torus-crosshair {
  position: absolute;
  width: 100%;
  height: 100%;
  background: 
    linear-gradient(to right, transparent calc(50% - 0.5px), rgba(148, 163, 184, 0.4) 50%, transparent calc(50% + 0.5px)),
    linear-gradient(to bottom, transparent calc(50% - 0.5px), rgba(148, 163, 184, 0.4) 50%, transparent calc(50% + 0.5px));
}

.torus-ring {
  position: absolute;
  border-radius: 50%;
  border: 1.5px solid #64748b;
  transition: border-color 0.3s ease;
}

.tr-1 { width: 120px; height: 120px; border-style: solid; animation: rotate-axis 20s linear infinite; }
.tr-2 { width: 85px; height: 85px; border-style: dashed; border-color: #0284c7; animation: rotate-axis 14s linear infinite reverse; }
.tr-3 { width: 50px; height: 50px; border-style: solid; border-color: #94a3b8; }

.torus-center-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #0284c7;
  box-shadow: 0 0 8px rgba(2, 132, 199, 0.8);
}

@keyframes rotate-axis {
  0% { transform: rotate(0deg) rotateX(60deg); }
  100% { transform: rotate(360deg) rotateX(60deg); }
}

/* 2. Modular Cubes to Logo Diagram */
.cubes-diagram {
  position: relative;
  width: 140px;
  height: 140px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.cube-grid-hint {
  position: absolute;
  width: 110px;
  height: 110px;
  border: 1px dashed rgba(148, 163, 184, 0.5);
  border-radius: 12px;
  transform: rotate(45deg);
}

.preview-logo-img {
  width: 72px;
  height: 72px;
  object-fit: contain;
  filter: drop-shadow(0 6px 14px rgba(15, 23, 42, 0.12));
  z-index: 2;
  transition: transform 0.35s ease;
}

.cube-particle-float {
  position: absolute;
  width: 9px;
  height: 9px;
  background: #ffffff;
  border: 1.5px solid #0284c7;
  border-radius: 2px;
  box-shadow: 0 2px 6px rgba(2, 132, 199, 0.2);
}

.cp-1 { top: 22px; left: 16px; transform: rotate(15deg); }
.cp-2 { bottom: 22px; right: 18px; transform: rotate(-25deg); }
.cp-3 { top: 26px; right: 20px; transform: rotate(40deg); }
.cp-4 { bottom: 26px; left: 24px; transform: rotate(-10deg); }

/* 3. Neural Synapse Point Cloud Diagram */
.brain-diagram {
  position: relative;
  width: 140px;
  height: 140px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.neural-cluster {
  position: absolute;
  width: 96px;
  height: 74px;
  border-radius: 50% 50% 45% 45%;
  border: 1.5px dotted #64748b;
  box-shadow: inset 0 0 16px rgba(2, 132, 199, 0.08);
}

.synapse-node {
  position: absolute;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: #0284c7;
  box-shadow: 0 0 8px rgba(2, 132, 199, 0.8);
}

.sn-1 { top: 38%; left: 32%; }
.sn-2 { top: 48%; left: 52%; }
.sn-3 { top: 62%; left: 40%; }
.sn-4 { top: 42%; left: 68%; }
.sn-5 { top: 58%; left: 64%; }

/* 4. Keplerian Solar Orbit Diagram */
.solar-diagram {
  position: relative;
  width: 150px;
  height: 150px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.kepler-ellipse {
  position: absolute;
  border-radius: 50%;
  border: 1.5px solid #64748b;
  transform: rotateX(65deg);
}

.ke-1 { width: 130px; height: 130px; border-color: rgba(100, 116, 139, 0.4); }
.ke-2 { width: 95px; height: 95px; border-color: #0284c7; }
.ke-3 { width: 60px; height: 60px; border-color: rgba(100, 116, 139, 0.6); }

.sun-core-dot {
  position: absolute;
  width: 11px;
  height: 11px;
  border-radius: 50%;
  background: #f59e0b;
  box-shadow: 0 0 12px rgba(245, 158, 11, 0.8);
}

.planet-marker-dot {
  position: absolute;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #0284c7;
  box-shadow: 0 0 8px rgba(2, 132, 199, 0.8);
  top: 14px;
  right: 32px;
}

/* --------------------------------------------------------------------------
   Card Body Content Area
   -------------------------------------------------------------------------- */
.card-body {
  padding: 28px 28px 26px 28px;
  display: flex;
  flex-direction: column;
  flex-grow: 1;
}

.tag-row {
  display: flex;
  gap: 7px;
  flex-wrap: wrap;
  margin-bottom: 14px;
}

.genre-tag {
  font-family: var(--font-sans);
  font-size: 0.72rem;
  font-weight: 500;
  padding: 4px 10px;
  border-radius: 6px;
  background: rgba(241, 245, 249, 0.9);
  border: 1px solid rgba(226, 232, 240, 0.95);
  color: var(--text-muted);
}

.tag-tech {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  font-weight: 600;
  padding: 4px 9px;
  border-radius: 6px;
  background: rgba(224, 242, 254, 0.8);
  border: 1px solid rgba(186, 230, 253, 0.95);
  color: #0369a1;
}

.card-title {
  font-family: var(--font-display);
  font-size: 1.38rem;
  font-weight: 700;
  line-height: 1.35;
  margin-bottom: 10px;
  color: var(--text-lead);
}

.card-desc {
  font-size: 0.92rem;
  color: var(--text-muted);
  line-height: 1.7;
  margin-bottom: 22px;
  flex-grow: 1;
}

/* Technical Specification Placard Box (Tactile Neumorphic Inset) */
.genre-elements-box {
  background: rgba(241, 245, 249, 0.55);
  border: 1px solid rgba(226, 232, 240, 0.85);
  border-radius: 10px;
  padding: 14px 16px;
  margin-bottom: 22px;
  box-shadow: var(--shadow-neumorph-inset);
}

.genre-elements-title {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--text-muted);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  margin-bottom: 8px;
}

.genre-elements-list {
  font-size: 0.82rem;
  color: var(--text-main);
  line-height: 1.58;
  margin: 0;
  padding-left: 18px;
}

.genre-elements-list li {
  margin-bottom: 4px;
}

.genre-elements-list strong {
  color: var(--text-lead);
  font-weight: 600;
}

/* --------------------------------------------------------------------------
   Card Footer & Action Button (Crisp Tactile Launch Button)
   -------------------------------------------------------------------------- */
.card-footer {
  padding-top: 18px;
  border-top: 1px solid rgba(226, 232, 240, 0.75);
  display: flex;
  align-items: center;
}

.launch-btn {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 20px;
  border-radius: 10px;
  text-decoration: none;
  font-size: 0.88rem;
  font-weight: 600;
  background: #0f172a;
  border: 1px solid #0f172a;
  color: #ffffff;
  box-shadow: 0 4px 14px rgba(15, 23, 42, 0.12);
  transition: all 0.25s var(--ease-smooth);
}

.launch-btn:hover {
  background: #0284c7;
  border-color: #0284c7;
  color: #ffffff;
  box-shadow: 0 6px 20px rgba(2, 132, 199, 0.35);
  transform: translateY(-1.5px);
}

.btn-arrow {
  font-size: 1.05rem;
  transition: transform 0.2s ease;
}

.launch-btn:hover .btn-arrow {
  transform: translateX(4px);
}

/* --------------------------------------------------------------------------
   Responsive Design
   -------------------------------------------------------------------------- */
/* --------------------------------------------------------------------------
   Back to Top Floating Button
   -------------------------------------------------------------------------- */
.back-to-top-btn {
  position: fixed;
  right: 28px;
  bottom: 28px;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.94);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid rgba(203, 213, 225, 0.85);
  color: #0f172a;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 1px;
  box-shadow: 0 4px 18px rgba(15, 23, 42, 0.12), 0 1px 3px rgba(15, 23, 42, 0.05);
  cursor: pointer;
  z-index: 95;
  opacity: 0;
  visibility: hidden;
  transform: translateY(14px) scale(0.9);
  transition: opacity 0.25s ease, transform 0.25s var(--ease-smooth), visibility 0.25s, background 0.2s, box-shadow 0.2s;
  padding: 0;
  outline: none;
  -webkit-tap-highlight-color: transparent;
}

.back-to-top-btn.is-visible {
  opacity: 1;
  visibility: visible;
  transform: translateY(0) scale(1);
}

.back-to-top-btn:hover {
  background: #ffffff;
  color: #0284c7;
  border-color: #0284c7;
  box-shadow: 0 8px 24px rgba(2, 132, 199, 0.22);
  transform: translateY(-2px) scale(1.04);
}

.back-to-top-btn:active {
  transform: translateY(0) scale(0.94);
}

.btt-label {
  font-family: var(--font-mono);
  font-size: 0.56rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  line-height: 1;
}

/* --------------------------------------------------------------------------
   Responsive Design
   -------------------------------------------------------------------------- */
@media (max-width: 1024px) {
  .cards-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 768px) {
  .gallery-header {
    padding: 14px 18px;
  }
  .brand {
    gap: 8px;
    flex-wrap: wrap;
  }
  .brand-title {
    font-size: 1.15rem;
  }
  .brand-badge {
    display: none;
  }
  .header-squares-link {
    padding: 4px 10px;
    font-size: 0.68rem;
  }
  .header-stats {
    display: none;
  }
  .gallery-container {
    padding: 28px 18px calc(96px + env(safe-area-inset-bottom, 0px)) 18px;
  }
  .gallery-hero {
    margin-bottom: 24px;
  }
  .hero-heading {
    font-size: 2.1rem;
    line-height: 1.25;
  }
  .hero-subtext {
    font-size: 0.92rem;
    line-height: 1.7;
    margin-bottom: 0;
  }

  /* Fixed Bottom Control Dock for Mobile (Thumb-Friendly Zone) */
  .gallery-filter-bar {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    width: 100%;
    max-width: 100%;
    margin: 0;
    padding: 10px 14px calc(10px + env(safe-area-inset-bottom, 0px)) 14px;
    border-radius: 20px 20px 0 0;
    border: none;
    border-top: 1px solid rgba(226, 232, 240, 0.9);
    background: rgba(255, 255, 255, 0.94);
    backdrop-filter: blur(24px) saturate(180%);
    -webkit-backdrop-filter: blur(24px) saturate(180%);
    box-shadow: 0 -4px 24px rgba(15, 23, 42, 0.08);
    z-index: 100;
    display: flex;
    align-items: center;
    gap: 10px;
    justify-content: flex-start;
    box-sizing: border-box;
  }

  /* Consult CTA Button in Mobile Bottom Dock */
  .mobile-consult-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 7px 14px;
    border-radius: 9999px;
    background: linear-gradient(135deg, #FF5E1E 0%, #EA580C 100%);
    color: #ffffff;
    font-family: var(--font-sans);
    font-size: 0.76rem;
    font-weight: 700;
    text-decoration: none;
    flex-shrink: 0;
    box-shadow: 0 3px 10px rgba(255, 94, 30, 0.32);
    transition: transform 0.15s ease, box-shadow 0.15s ease;
    -webkit-tap-highlight-color: transparent;
  }

  .mobile-consult-btn:active {
    transform: scale(0.94);
    box-shadow: 0 1px 4px rgba(255, 94, 30, 0.2);
  }

  .filter-divider {
    display: block;
    width: 1px;
    height: 22px;
    background: #cbd5e1;
    flex-shrink: 0;
  }

  .filter-scroll-track {
    display: flex;
    align-items: center;
    gap: 6px;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    flex: 1;
    scrollbar-width: none; /* Hide scrollbar on Firefox */
    -ms-overflow-style: none; /* IE/Edge */
    padding: 2px 0;
  }

  .filter-scroll-track::-webkit-scrollbar {
    display: none; /* Hide scrollbar on iOS/Android WebKit */
  }

  .filter-btn {
    white-space: nowrap;
    flex-shrink: 0;
    padding: 7px 13px;
    font-size: 0.74rem;
    border-radius: 9999px;
  }

  /* Back to Top Position on Mobile (Above Bottom Bar) */
  .back-to-top-btn {
    right: 16px;
    bottom: calc(72px + env(safe-area-inset-bottom, 0px));
    width: 44px;
    height: 44px;
    box-shadow: 0 4px 18px rgba(15, 23, 42, 0.15);
  }

  .card-media {
    height: 180px;
  }
  .card-body {
    padding: 22px 20px;
  }
}
