/* ==========================================================================
   Achal Pandey Portfolio CSS Stylesheet (4-Page Restructured Version)
   Theme: Obsidian Dark Mode, Cyberpunk Accents, Premium Glassmorphism
   No Hindi content, high-contrast, fully scrollable and responsive.
   ========================================================================== */

/* --------------------------------------------------------------------------
   1. Design System & CSS Variables
   -------------------------------------------------------------------------- */
:root {
  /* HSL Tailored Colors */
  --bg-color: #050608;
  --bg-rgb: 5, 6, 8;
  --card-bg: rgba(12, 14, 20, 0.45);
  
  --text-primary: #f8fafc;
  --text-secondary: #94a3b8;
  --text-muted: #64748b;
  
  /* Cyber Accents */
  --accent-cyan: #00f0ff;
  --accent-cyan-rgb: 0, 240, 255;
  --accent-purple: #bd00ff;
  --accent-purple-rgb: 189, 0, 255;
  --accent-pink: #ec4899;
  --accent-pink-rgb: 236, 72, 153;
  
  /* Fonts */
  --font-header: 'Outfit', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  --font-body: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  
  /* Layout Metrics */
  --navbar-height: 80px;
  --container-padding: 8%;
  --transition-smooth: all 0.5s cubic-bezier(0.25, 1, 0.5, 1);
  --transition-fast: all 0.25s cubic-bezier(0.25, 0.8, 0.25, 1);
}

/* --------------------------------------------------------------------------
   2. Reset & Document Defaults
   -------------------------------------------------------------------------- */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  scrollbar-width: thin;
  scrollbar-color: var(--accent-cyan) rgba(255, 255, 255, 0.03);
  background-color: var(--bg-color);
  overflow-x: hidden;
}

/* Custom Scrollbar */
::-webkit-scrollbar {
  width: 8px;
}
::-webkit-scrollbar-track {
  background: var(--bg-color);
}
::-webkit-scrollbar-thumb {
  background: rgba(var(--accent-cyan-rgb), 0.2);
  border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
  background: rgba(var(--accent-cyan-rgb), 0.7);
}

body {
  font-family: var(--font-body);
  color: var(--text-primary);
  background-color: var(--bg-color);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

a {
  color: inherit;
  text-decoration: none;
  transition: var(--transition-fast);
}

/* --------------------------------------------------------------------------
   3. Typography Utility Classes
   -------------------------------------------------------------------------- */
.main-title {
  font-family: var(--font-header);
  font-size: clamp(2.2rem, 6vw, 4.5rem);
  font-weight: 900;
  line-height: 1.1;
  letter-spacing: -0.03em;
  text-transform: uppercase;
}

.section-title {
  font-family: var(--font-header);
  font-size: clamp(1.8rem, 4vw, 3rem);
  font-weight: 800;
  line-height: 1.2;
  letter-spacing: -0.02em;
  text-transform: uppercase;
}

.subtitle {
  font-size: clamp(1rem, 1.4vw, 1.2rem);
  font-weight: 400;
  color: var(--text-secondary);
  max-width: 650px;
  margin: 1.5rem 0;
}

.body-text {
  font-size: clamp(0.95rem, 1.1vw, 1.05rem);
  color: var(--text-secondary);
  line-height: 1.7;
}

.eyebrow {
  display: block;
  font-family: var(--font-header);
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: 0.8rem;
}

/* Highlight Gradients */
.highlight-cyan {
  color: var(--accent-cyan);
  text-shadow: 0 0 20px rgba(var(--accent-cyan-rgb), 0.35);
}

.highlight-purple {
  color: var(--accent-purple);
  text-shadow: 0 0 20px rgba(var(--accent-purple-rgb), 0.35);
}

.highlight-pink {
  color: var(--accent-pink);
  text-shadow: 0 0 20px rgba(var(--accent-pink-rgb), 0.35);
}

/* --------------------------------------------------------------------------
   4. Sticky 3D Animation Header Engine
   -------------------------------------------------------------------------- */
.animation-scroll-wrapper {
  position: relative;
  width: 100%;
  background: var(--bg-color);
}

/* Keeps canvas fixed to viewport while user scrolls down the wrapper */
.sticky-canvas-container {
  position: sticky;
  top: 0;
  left: 0;
  width: 100%;
  height: 100vh;
  overflow: hidden;
  z-index: 2;
}

.sticky-canvas-container canvas {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.canvas-shade {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: radial-gradient(circle at 50% 50%, rgba(var(--bg-rgb), 0.05) 0%, rgba(var(--bg-rgb), 0.85) 85%);
  pointer-events: none;
  z-index: 1;
}

/* Fixed overlay for scrolling copy */
.animation-overlays {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100vh;
  z-index: 3;
  pointer-events: none;
}

.overlay-stage {
  position: absolute;
  top: 50%;
  width: 90%;
  max-width: 420px; /* Reduced width to prevent overlapping face/neck */
  padding: 2.2rem; /* More compact premium padding */
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  text-align: left;
  
  /* Glassmorphic Big Block panel styling */
  background: rgba(8, 9, 12, 0.72);
  backdrop-filter: blur(20px) saturate(125%);
  -webkit-backdrop-filter: blur(20px) saturate(125%);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 16px;
  box-shadow: 
    0 25px 50px 0 rgba(0, 0, 0, 0.6),
    inset 0 1px 1px 0 rgba(255, 255, 255, 0.05);
  transition: opacity 0.5s ease, transform 0.5s ease, visibility 0.5s;
}

.overlay-stage.align-left {
  left: 5%; /* Shift closer to screen edge to avoid center face */
  right: auto;
  transform: translate(-30px, -50%) scale(0.93);
}

.overlay-stage.align-left.active {
  opacity: 1;
  visibility: visible;
  transform: translate(0, -50%) scale(1);
  pointer-events: auto;
  animation: active-stage-glow 6s ease-in-out infinite;
}

.overlay-stage.align-right {
  right: 5%; /* Shift closer to screen edge to avoid center face */
  left: auto;
  transform: translate(30px, -50%) scale(0.93);
}

.overlay-stage.align-right.active {
  opacity: 1;
  visibility: visible;
  transform: translate(0, -50%) scale(1);
  pointer-events: auto;
  animation: active-stage-glow 6s ease-in-out infinite;
}

.overlay-stage.align-center-bottom {
  left: 50%;
  top: auto;
  bottom: 4%; /* Sits low at the bottom of the viewport to clear neck/chest */
  right: auto;
  transform: translate(-50%, 30px) scale(0.93);
}

.overlay-stage.align-center-bottom.active {
  opacity: 1;
  visibility: visible;
  transform: translate(-50%, 0) scale(1);
  pointer-events: auto;
  animation: active-stage-glow 6s ease-in-out infinite;
}

.overlay-stage.align-left-bottom {
  left: 5%; /* Shift closer to edge */
  top: auto;
  bottom: 4%; /* Sits low to clear neck/face */
  right: auto;
  transform: translate(-30px, 30px) scale(0.93);
}

.overlay-stage.align-left-bottom.active {
  opacity: 1;
  visibility: visible;
  transform: translate(0, 0) scale(1);
  pointer-events: auto;
  animation: active-stage-glow 6s ease-in-out infinite;
}

/* Constantly breathing cyberpunk neon color border lights */
@keyframes active-stage-glow {
  0%, 100% {
    border-color: rgba(0, 240, 255, 0.45);
    box-shadow: 
      0 25px 50px 0 rgba(0, 0, 0, 0.65),
      0 0 20px rgba(0, 240, 255, 0.25),
      inset 0 1px 1px 0 rgba(255, 255, 255, 0.05);
  }
  33% {
    border-color: rgba(189, 0, 255, 0.45);
    box-shadow: 
      0 25px 50px 0 rgba(0, 0, 0, 0.65),
      0 0 20px rgba(189, 0, 255, 0.25),
      inset 0 1px 1px 0 rgba(255, 255, 255, 0.05);
  }
  66% {
    border-color: rgba(236, 72, 153, 0.45);
    box-shadow: 
      0 25px 50px 0 rgba(0, 0, 0, 0.65),
      0 0 20px rgba(236, 72, 153, 0.25),
      inset 0 1px 1px 0 rgba(255, 255, 255, 0.05);
  }
}

/* Stats grid layout styled inside Stage 3 card */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1.25rem;
  width: 100%;
  margin-top: 1.25rem;
  border-top: 1px solid rgba(255, 255, 255, 0.05);
  padding-top: 1.25rem;
}

.stat-item {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
}

.stat-value {
  display: flex;
  align-items: baseline;
  line-height: 1;
}

.stat-number {
  font-family: var(--font-header);
  font-size: 1.8rem;
  font-weight: 900;
  color: var(--accent-cyan);
  line-height: 1;
}

.stat-plus {
  font-family: var(--font-header);
  font-size: 1.2rem;
  font-weight: 800;
  color: var(--accent-cyan);
}

.stat-desc {
  font-size: 0.72rem;
  font-weight: 600;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-top: 0.2rem;
  letter-spacing: 0.05em;
  line-height: 1.2;
}

/* Container page wrapper */
.scroll-wrapper {
  position: relative;
  width: 100%;
}

/* Shine Heading layout overlaying page top */
.shine-heading {
  font-family: var(--font-header);
  font-size: clamp(1.8rem, 5vw, 3.6rem); /* Sleeker title size */
  font-weight: 900;
  text-transform: uppercase;
  text-align: center;
  background: linear-gradient(90deg, #ffffff 0%, var(--accent-cyan) 25%, var(--accent-purple) 75%, #ffffff 100%);
  background-size: 200% auto;
  color: transparent;
  -webkit-background-clip: text;
  background-clip: text;
  animation: text-shine 5s linear infinite;
  padding: 6.5rem var(--container-padding) 0.5rem; /* Reduced bottom padding */
  letter-spacing: -0.03em;
  line-height: 1.1;
  width: 100%;
  max-width: 1300px;
  margin: 0 auto;
  position: absolute; /* Overlays the canvas animation and scrolls out naturally */
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  z-index: 10;
  text-shadow: 0 0 40px rgba(var(--accent-cyan-rgb), 0.05);
}

@keyframes text-shine {
  to { background-position: 200% center; }
}

/* Preloader styles */
#preloader {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background-color: var(--bg-color);
  z-index: 99999;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: opacity 0.8s cubic-bezier(0.77, 0, 0.175, 1), visibility 0.8s;
}

.preloader-content {
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.loader-ring {
  position: relative;
  width: 100px;
  height: 100px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 2rem;
}

.loader-circle {
  position: absolute;
  width: 100%;
  height: 100%;
  border: 2px solid rgba(255, 255, 255, 0.02);
  border-top: 2px solid var(--accent-cyan);
  border-radius: 50%;
  animation: spin 1s linear infinite;
  box-shadow: 0 0 15px rgba(var(--accent-cyan-rgb), 0.2);
}

.loader-percentage {
  font-family: var(--font-header);
  font-size: 1.6rem;
  font-weight: 800;
}

.loader-text {
  font-family: var(--font-header);
  font-size: 0.85rem;
  letter-spacing: 0.25em;
  text-transform: uppercase;
  color: var(--text-secondary);
  animation: pulse 1.8s ease-in-out infinite;
}

.loader-bar-container {
  width: 180px;
  height: 2px;
  background: rgba(255, 255, 255, 0.04);
  margin-top: 1.5rem;
  border-radius: 1px;
  overflow: hidden;
}

.loader-bar {
  width: 0%;
  height: 100%;
  background: linear-gradient(90deg, var(--accent-cyan), var(--accent-purple));
  box-shadow: 0 0 8px var(--accent-cyan);
}

@keyframes spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

@keyframes pulse {
  0%, 100% { opacity: 0.6; }
  50% { opacity: 1; text-shadow: 0 0 8px rgba(var(--accent-cyan-rgb), 0.3); }
}

/* --------------------------------------------------------------------------
   5. Standard Scrolling Page Content (Below Animation)
   -------------------------------------------------------------------------- */
.scrolling-page-content {
  position: relative;
  z-index: 5;
  background-color: var(--bg-color);
  width: 100%;
  box-shadow: 0 -20px 40px rgba(0, 0, 0, 0.6);
}

.content-section {
  padding: 8rem var(--container-padding);
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  border-bottom: 1px solid rgba(255, 255, 255, 0.03);
}

.content-section:last-of-type {
  border-bottom: none;
}

@media (max-width: 768px) {
  .content-section {
    padding: 5rem var(--container-padding);
  }
}

@media (max-width: 480px) {
  .content-section {
    padding: 3.5rem var(--container-padding);
  }
}

.section-header {
  width: 100%;
  max-width: 900px;
  text-align: center;
  margin-bottom: 4.5rem;
}

/* Glass panel */
.glass-card {
  background: var(--card-bg);
  backdrop-filter: blur(24px) saturate(120%);
  -webkit-backdrop-filter: blur(24px) saturate(120%);
  border: 1px solid rgba(255, 255, 255, 0.07);
  border-radius: 16px;
  padding: 3rem;
  box-shadow: 
    0 20px 45px 0 rgba(0, 0, 0, 0.5),
    inset 0 1px 1px 0 rgba(255, 255, 255, 0.04);
  transition: var(--transition-smooth);
}

.glass-card:hover {
  border-color: rgba(var(--accent-cyan-rgb), 0.25);
  box-shadow: 
    0 20px 50px 0 rgba(0, 0, 0, 0.6),
    0 0 30px 0 rgba(var(--accent-cyan-rgb), 0.04);
}

/* --------------------------------------------------------------------------
   6. Navigation Menu (Multi-page header support)
   -------------------------------------------------------------------------- */
#navbar {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: var(--navbar-height);
  padding: 0 var(--container-padding);
  display: flex;
  align-items: center;
  justify-content: space-between;
  z-index: 1000;
  background: linear-gradient(to bottom, rgba(var(--bg-rgb), 0.85) 0%, rgba(var(--bg-rgb), 0) 100%);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.02);
  transition: var(--transition-smooth);
}

#navbar.scrolled {
  background: rgba(5, 6, 8, 0.8);
  backdrop-filter: blur(20px);
  border-bottom-color: rgba(255, 255, 255, 0.06);
}

.nav-logo {
  font-family: var(--font-header);
  font-size: 1.1rem;
  font-weight: 800;
  letter-spacing: 0.05em;
  display: flex;
  align-items: center;
  gap: 8px;
  position: relative;
  z-index: 1; /* Keep logo below slide-out nav drawer */
}

.logo-accent {
  color: var(--text-primary);
}

.logo-slash {
  color: var(--accent-cyan);
  font-weight: 400;
}

.logo-subtitle {
  font-size: 0.82rem;
  font-weight: 400;
  color: var(--text-muted);
  letter-spacing: 0.08em;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 2.2rem;
}

.nav-item {
  font-size: 0.88rem;
  font-weight: 500;
  color: var(--text-secondary);
  letter-spacing: 0.05em;
  position: relative;
  padding: 0.5rem 0;
}

.nav-item::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 0;
  height: 1px;
  background: var(--accent-cyan);
  box-shadow: 0 0 8px var(--accent-cyan);
  transition: var(--transition-fast);
}

.nav-item:hover, .nav-item.active {
  color: var(--text-primary);
}

.nav-item.active::after {
  width: 100%;
}

.cta-nav {
  background: linear-gradient(135deg, rgba(189, 0, 255, 0.12) 0%, rgba(236, 72, 153, 0.12) 100%);
  border: 1.5px solid var(--accent-pink);
  padding: 0.5rem 1.3rem;
  border-radius: 30px;
  position: relative;
  overflow: hidden; /* Clips the shimmering glint */
  box-shadow: 0 0 12px rgba(236, 72, 153, 0.2);
  animation: cta-glow-cycle 4s linear infinite;
  display: inline-block;
  color: var(--text-primary) !important;
  font-weight: 700;
  transition: var(--transition-fast);
}

.cta-nav::before {
  content: '';
  position: absolute;
  top: 0;
  left: -150%;
  width: 50%;
  height: 100%;
  background: linear-gradient(
    90deg,
    transparent,
    rgba(236, 72, 153, 0.55),
    rgba(189, 0, 255, 0.55),
    transparent
  );
  transform: skewX(-25deg);
  pointer-events: none;
  animation: cta-shimmer 4.5s ease-in-out infinite;
}

@keyframes cta-shimmer {
  0% { left: -150%; }
  35% { left: 150%; }
  100% { left: 150%; }
}

@keyframes cta-glow-cycle {
  0%, 100% {
    border-color: var(--accent-pink);
    box-shadow: 0 0 15px rgba(236, 72, 153, 0.4);
  }
  50% {
    border-color: var(--accent-purple);
    box-shadow: 0 0 15px rgba(189, 0, 255, 0.4);
  }
}

.cta-nav:hover {
  background: linear-gradient(135deg, rgba(189, 0, 255, 0.25) 0%, rgba(236, 72, 153, 0.25) 100%);
  border-color: #ffffff;
  box-shadow: 0 0 25px rgba(236, 72, 153, 0.65), 0 0 10px rgba(189, 0, 255, 0.45);
  transform: translateY(-1.5px) scale(1.05);
}

.cta-nav::after {
  display: none;
}

/* Mobile Toggle Menu */
.menu-toggle {
  display: none;
  flex-direction: column;
  justify-content: space-between;
  width: 44px;
  height: 44px;
  padding: 14px 10px;
  background: transparent;
  border: none;
  cursor: pointer;
  z-index: 1001;
  box-sizing: border-box;
}

.menu-toggle .bar {
  width: 100%;
  height: 2px;
  background-color: var(--text-primary);
  border-radius: 1px;
  transition: var(--transition-fast);
}

@media (max-width: 768px) {
  .menu-toggle {
    display: flex;
  }

  .nav-links {
    position: fixed;
    top: 0;
    right: -100%;
    width: 80vw;
    height: 100vh;
    background: rgba(5, 6, 8, 0.98);
    backdrop-filter: blur(25px);
    border-left: 1px solid rgba(255, 255, 255, 0.05);
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 3rem;
    z-index: 999;
    transition: right 0.5s cubic-bezier(0.77, 0, 0.175, 1);
  }

  .nav-links.open {
    right: 0;
  }

  .menu-toggle.open .bar:nth-child(1) {
    transform: translateY(7px) rotate(45deg);
  }

  .menu-toggle.open .bar:nth-child(2) {
    opacity: 0;
  }

  .menu-toggle.open .bar:nth-child(3) {
    transform: translateY(-7px) rotate(-45deg);
  }
}

/* --------------------------------------------------------------------------
   7. Home page - Summary Services Grid
   -------------------------------------------------------------------------- */
.services-summary-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1.8rem;
  width: 100%;
  max-width: 1200px;
}

.service-summary-card {
  padding: 2.2rem;
  display: flex;
  flex-direction: column;
}

.summary-card-num {
  font-family: var(--font-header);
  font-size: 2.2rem;
  font-weight: 800;
  color: rgba(255, 255, 255, 0.05);
  margin-bottom: 0.8rem;
  line-height: 1;
}

.service-summary-card h3 {
  font-family: var(--font-header);
  font-size: 1.25rem;
  font-weight: 700;
  margin-bottom: 0.6rem;
  color: var(--text-primary);
}

.service-summary-card p {
  font-size: 0.85rem;
  color: var(--text-secondary);
  line-height: 1.5;
}

.service-summary-card:hover {
  transform: translateY(-5px);
}

.service-summary-card:nth-child(1):hover { border-color: rgba(var(--accent-cyan-rgb), 0.3); }
.service-summary-card:nth-child(2):hover { border-color: rgba(var(--accent-purple-rgb), 0.3); }
.service-summary-card:nth-child(3):hover { border-color: rgba(var(--accent-pink-rgb), 0.3); }
.service-summary-card:nth-child(4):hover { border-color: rgba(var(--accent-cyan-rgb), 0.3); }

@media (max-width: 1024px) {
  .services-summary-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 600px) {
  .services-summary-grid {
    grid-template-columns: 1fr;
  }
}

/* --------------------------------------------------------------------------
   8. Home Page - Double-Row Infinite Marquee
   -------------------------------------------------------------------------- */
.marquee-wrapper {
  width: 100%;
  overflow: hidden;
  padding: 1.8rem 0;
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
  background: rgba(12, 14, 20, 0.45);
  border-top: 1px solid rgba(255, 255, 255, 0.05);
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.marquee-container {
  display: flex;
  overflow: hidden;
  user-select: none;
  width: 100%;
  mask-image: linear-gradient(to right, transparent, black 15%, black 85%, transparent);
  -webkit-mask-image: linear-gradient(to right, transparent, black 15%, black 85%, transparent);
}

.marquee-row {
  display: flex;
  flex-shrink: 0;
  align-items: center;
  justify-content: space-around;
  gap: 3.5rem;
  min-width: 100%;
  animation: marquee-left 35s linear infinite;
}

.marquee-row.reverse {
  animation: marquee-right 35s linear infinite;
}

.marquee-item {
  font-family: var(--font-header);
  font-size: 1.15rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--text-secondary);
  opacity: 1;
  transition: opacity 0.3s;
  display: flex;
  align-items: center;
  gap: 10px;
}

.marquee-item img {
  height: 70px;
  width: 180px;
  object-fit: contain;
  filter: brightness(0) invert(1);
  opacity: 0.5;
  transition: opacity 0.3s ease, filter 0.3s ease;
  display: block;
}

.marquee-item img:hover {
  transform: scale(1.06);
}

.marquee-item::before {
  content: '•';
  color: rgba(0, 0, 0, 0.15);
  font-size: 1.5rem;
}

.marquee-row.reverse .marquee-item::before {
  color: rgba(0, 0, 0, 0.15);
}

.marquee-item:hover {
  opacity: 1;
  color: var(--text-primary);
}

@keyframes marquee-left {
  0% { transform: translateX(0); }
  100% { transform: translateX(-100%); }
}

@keyframes marquee-right {
  0% { transform: translateX(-100%); }
  100% { transform: translateX(0); }
}

/* --------------------------------------------------------------------------
   9. Case Studies & Grid Layouts
   -------------------------------------------------------------------------- */
.case-studies-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 2.5rem;
  width: 100%;
  max-width: 1200px;
}

.case-card {
  display: flex;
  flex-direction: column;
  padding: 0;
  overflow: hidden;
}

.case-card-image {
  height: 260px;
  width: 100%;
  background: linear-gradient(135deg, rgba(var(--accent-cyan-rgb), 0.15), rgba(var(--accent-purple-rgb), 0.15));
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  overflow: hidden;
}

.case-card-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: top;
  transition: transform 0.6s cubic-bezier(0.25, 1, 0.5, 1);
  display: block;
}

.case-card:hover .case-card-image img {
  transform: scale(1.06);
}

.case-card:nth-child(even) .case-card-image {
  background: linear-gradient(135deg, rgba(var(--accent-purple-rgb), 0.15), rgba(var(--accent-pink-rgb), 0.15));
}

.case-card-image::after {
  content: 'CASE STUDY';
  font-family: var(--font-header);
  font-size: 1.8rem;
  font-weight: 900;
  letter-spacing: 0.1em;
  color: rgba(255, 255, 255, 0.03);
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  pointer-events: none;
}

.case-card-body {
  padding: 2.5rem;
}

.case-tag {
  font-family: var(--font-header);
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--accent-cyan);
  margin-bottom: 0.6rem;
  display: block;
}

.case-card:nth-child(even) .case-tag {
  color: var(--accent-pink);
}

.case-card h3 {
  font-family: var(--font-header);
  font-size: 1.6rem;
  font-weight: 800;
  margin-bottom: 0.8rem;
}

.case-card p {
  font-size: 0.92rem;
  color: var(--text-secondary);
  margin-bottom: 1.5rem;
}

.case-stats {
  display: flex;
  gap: 2rem;
  border-top: 1px solid rgba(255, 255, 255, 0.05);
  padding-top: 1.2rem;
}

.case-stat {
  display: flex;
  flex-direction: column;
}

.case-stat-num {
  font-family: var(--font-header);
  font-size: 1.4rem;
  font-weight: 800;
  color: var(--text-primary);
}

.case-stat-lbl {
  font-size: 0.72rem;
  color: var(--text-muted);
  text-transform: uppercase;
}

@media (max-width: 768px) {
  .case-studies-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem;
  }
  .case-card-image {
    height: 130px;
  }
  .case-card-image::after {
    font-size: 1.1rem;
  }
  .case-card-body {
    padding: 1.2rem;
  }
  .case-card h3 {
    font-size: 1.05rem;
    margin-bottom: 0.5rem;
  }
  .case-card p {
    font-size: 0.75rem;
    margin-bottom: 1rem;
    line-height: 1.4;
  }
  .case-stats {
    gap: 1rem;
    padding-top: 0.8rem;
  }
  .case-stat-num {
    font-size: 1rem;
  }
  .case-stat-lbl {
    font-size: 0.65rem;
  }
}

@media (max-width: 480px) {
  .case-studies-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 0.75rem;
  }
  .case-card-image {
    height: 100px;
  }
  .case-card-body {
    padding: 0.8rem;
  }
  .case-card h3 {
    font-size: 0.95rem;
  }
  .case-card p {
    font-size: 0.7rem;
    margin-bottom: 0.6rem;
  }
  .case-stats {
    display: none;
  }
}

/* Detailed Brand Case Highlight panel */
.brand-highlight-panel {
  width: 100%;
  max-width: 1200px;
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  gap: 4rem;
  align-items: center;
}

.highlight-info h3 {
  font-family: var(--font-header);
  font-size: 2.2rem;
  font-weight: 800;
  line-height: 1.2;
  margin-bottom: 1rem;
}

.highlight-info p {
  color: var(--text-secondary);
  font-size: 1rem;
  margin-bottom: 1.8rem;
}

.highlight-metrics-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 2rem;
}

.highlight-metric {
  border-left: 2px solid var(--accent-cyan);
  padding-left: 1.2rem;
}

.highlight-metric.pink {
  border-left-color: var(--accent-pink);
}

.highlight-metric-num {
  font-family: var(--font-header);
  font-size: 2.2rem;
  font-weight: 800;
  line-height: 1;
  color: var(--text-primary);
}

.highlight-metric-lbl {
  font-size: 0.8rem;
  color: var(--text-muted);
  text-transform: uppercase;
  margin-top: 0.3rem;
}

@media (max-width: 850px) {
  .brand-highlight-panel {
    grid-template-columns: 1fr;
    gap: 2.5rem;
  }
}

/* --------------------------------------------------------------------------
   10. MDs & Founders Testimonials Section
   -------------------------------------------------------------------------- */
.testimonials-slider-wrapper {
  position: relative;
  width: 100%;
  overflow: hidden;
  padding: 1rem 0;
}

.testimonials-slider {
  display: flex;
  gap: 2rem;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  padding: 1.5rem var(--container-padding);
  scrollbar-width: none; /* Hide standard scrollbar in Firefox */
  cursor: grab;
  user-select: none;
  scroll-behavior: smooth;
  -webkit-overflow-scrolling: touch; /* Smooth iOS scrolling */
}

.testimonials-slider::-webkit-scrollbar {
  display: none; /* Hide scrollbar in Chrome/Safari/Webkit */
}

.testimonials-slider:active {
  cursor: grabbing;
}

.testimonial-card {
  flex-shrink: 0;
  width: 420px;
  max-width: 90vw;
  scroll-snap-align: start;
  padding: 2.5rem;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  height: 320px; /* Equal height cards! */
}

.testimonial-text {
  font-size: 1rem;
  line-height: 1.7;
  color: var(--text-primary);
  font-style: italic;
  margin-bottom: 2rem;
  position: relative;
}

.testimonial-text::before {
  content: '"';
  position: absolute;
  top: -1.5rem;
  left: -1rem;
  font-size: 4rem;
  font-family: Georgia, serif;
  color: rgba(255, 255, 255, 0.05);
}

.testimonial-author {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: auto;
}

.author-avatar {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--accent-cyan), var(--accent-purple));
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-header);
  font-weight: 700;
  color: var(--bg-color);
  font-size: 0.95rem;
}

.testimonial-card:nth-child(even) .author-avatar {
  background: linear-gradient(135deg, var(--accent-purple), var(--accent-pink));
}

.author-meta h4 {
  font-family: var(--font-header);
  font-size: 0.95rem;
  font-weight: 700;
}

.author-meta p {
  font-size: 0.78rem;
  color: var(--text-muted);
}

@media (max-width: 850px) {
  .testimonials-grid {
    grid-template-columns: 1fr;
  }
}

/* --------------------------------------------------------------------------
   11. Expertise Page - Services Detailed Guide
   -------------------------------------------------------------------------- */
.services-detailed-guide {
  width: 100%;
  max-width: 1000px;
  display: flex;
  flex-direction: column;
  gap: 6rem;
}

.service-detailed-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4rem;
  align-items: flex-start;
}

.service-detailed-row:nth-child(even) {
  direction: rtl; /* Flip columns for alternate layouts */
}

.service-detailed-row:nth-child(even) * {
  direction: ltr; /* Reset text direction inside */
}

.detailed-info {
  display: flex;
  flex-direction: column;
}

.detailed-num {
  font-family: var(--font-header);
  font-size: 3rem;
  font-weight: 800;
  color: rgba(255, 255, 255, 0.03);
  margin-bottom: 0.5rem;
  line-height: 1;
}

.detailed-info h2 {
  font-family: var(--font-header);
  font-size: 2.2rem;
  font-weight: 800;
  margin-bottom: 0.5rem;
}

.detailed-info h3 {
  font-family: var(--font-header);
  font-size: 1rem;
  font-weight: 600;
  color: var(--accent-cyan);
  margin-bottom: 1.5rem;
}

.service-detailed-row:nth-child(even) .detailed-info h3 {
  color: var(--accent-pink);
}

.detailed-info p {
  color: var(--text-secondary);
  font-size: 0.95rem;
  margin-bottom: 1.5rem;
}

.detailed-bullets {
  list-style: none;
}

.detailed-bullets li {
  position: relative;
  padding-left: 1.5rem;
  margin-bottom: 0.8rem;
  font-size: 0.9rem;
  color: var(--text-secondary);
}

.detailed-bullets li::before {
  content: '';
  position: absolute;
  left: 0;
  top: 50%;
  transform: translateY(-50%);
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--accent-cyan);
  box-shadow: 0 0 6px var(--accent-cyan);
}

.service-detailed-row:nth-child(even) .detailed-bullets li::before {
  background: var(--accent-pink);
  box-shadow: 0 0 6px var(--accent-pink);
}

@media (max-width: 768px) {
  .service-detailed-row, .service-detailed-row:nth-child(even) {
    grid-template-columns: 1fr;
    gap: 2rem;
    direction: ltr;
  }
}

/* --------------------------------------------------------------------------
   12. About Page Timeline Milestones
   -------------------------------------------------------------------------- */
.timeline-scroller {
  width: 100%;
  max-width: 900px;
  position: relative;
  padding-left: 2.5rem;
  border-left: 2px solid rgba(255, 255, 255, 0.03);
}

.timeline-milestone {
  position: relative;
  padding-bottom: 4.5rem;
}

.timeline-milestone:last-child {
  padding-bottom: 0;
}

.timeline-node {
  position: absolute;
  left: -2.4rem;
  top: 0.2rem;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--accent-purple);
  box-shadow: 0 0 8px var(--accent-purple);
  border: 2px solid var(--bg-color);
}

.timeline-milestone:nth-child(even) .timeline-node {
  background: var(--accent-cyan);
  box-shadow: 0 0 8px var(--accent-cyan);
}

.milestone-meta {
  display: flex;
  align-items: center;
  gap: 15px;
  margin-bottom: 0.8rem;
}

.milestone-year {
  font-family: var(--font-header);
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--accent-purple);
  background: rgba(var(--accent-purple-rgb), 0.08);
  padding: 0.25rem 0.75rem;
  border-radius: 30px;
}

.timeline-milestone:nth-child(even) .milestone-year {
  color: var(--accent-cyan);
  background: rgba(var(--accent-cyan-rgb), 0.08);
}

.milestone-title {
  font-family: var(--font-header);
  font-size: 1.3rem;
  font-weight: 800;
}

.milestone-role {
  font-size: 0.85rem;
  color: var(--text-muted);
  font-weight: 500;
}

.milestone-desc {
  color: var(--text-secondary);
  font-size: 0.95rem;
  max-width: 700px;
}

/* --------------------------------------------------------------------------
   13. Book Call Page - Custom Interactive Calendar Widget
   -------------------------------------------------------------------------- */
.calendar-layout {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 3.5rem;
  width: 100%;
  max-width: 1100px;
}

.calendar-info h2 {
  font-family: var(--font-header);
  font-size: 2.2rem;
  font-weight: 800;
  margin-bottom: 1rem;
}

.calendar-info p {
  color: var(--text-secondary);
  font-size: 1rem;
  margin-bottom: 2rem;
}

.meeting-features {
  display: flex;
  flex-direction: column;
  gap: 2rem;
}

.meeting-feature-item {
  display: flex;
  align-items: center;
  gap: 15px;
}

.feature-icon-box {
  width: 36px;
  height: 36px;
  border-radius: 8px;
  background: rgba(var(--accent-cyan-rgb), 0.08);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--accent-cyan);
  font-weight: 700;
}

.feature-text {
  font-size: 0.92rem;
  color: var(--text-secondary);
}

/* Calendar Widget Box */
.calendar-widget-box {
  width: 100%;
  display: flex;
  flex-direction: column;
}

.calendar-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1.5rem;
}

.calendar-month-title {
  font-family: var(--font-header);
  font-weight: 700;
  font-size: 1.1rem;
}

.calendar-nav-btn {
  background: transparent;
  border: 1px solid rgba(255, 255, 255, 0.08);
  color: var(--text-primary);
  width: 32px;
  height: 32px;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}

.calendar-nav-btn:hover {
  background: rgba(255, 255, 255, 0.05);
}

.calendar-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 0.5rem;
  margin-bottom: 2rem;
}

.calendar-day-label {
  text-align: center;
  font-size: 0.72rem;
  font-weight: 600;
  text-transform: uppercase;
  color: var(--text-muted);
  padding: 0.5rem 0;
}

.calendar-day {
  aspect-ratio: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  font-size: 0.88rem;
  cursor: pointer;
  color: var(--text-muted);
  pointer-events: none;
  transition: var(--transition-fast);
}

.calendar-day.active-day {
  color: var(--text-primary);
  pointer-events: auto;
}

.calendar-day.active-day:hover {
  background: rgba(var(--accent-cyan-rgb), 0.15);
  color: var(--accent-cyan);
}

.calendar-day.selected-day {
  background: var(--accent-cyan);
  color: var(--bg-color);
  font-weight: 700;
  box-shadow: 0 0 15px rgba(var(--accent-cyan-rgb), 0.4);
}

/* Time Slot Picker */
.time-slots-container {
  display: none;
  flex-direction: column;
  margin-top: 1.5rem;
  border-top: 1px solid rgba(255, 255, 255, 0.05);
  padding-top: 1.5rem;
}

.time-slots-container.visible {
  display: flex;
}

.time-slots-header {
  font-family: var(--font-header);
  font-size: 0.95rem;
  font-weight: 700;
  margin-bottom: 1rem;
}

.slots-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.8rem;
}

.time-slot {
  background: rgba(255, 255, 255, 0.015);
  border: 1px solid rgba(255, 255, 255, 0.04);
  color: var(--text-secondary);
  padding: 0.75rem 0;
  border-radius: 8px;
  cursor: pointer;
  font-size: 0.82rem;
  text-align: center;
  transition: var(--transition-fast);
}

.time-slot:hover {
  border-color: var(--accent-cyan);
  color: var(--accent-cyan);
  background: rgba(var(--accent-cyan-rgb), 0.02);
}

.time-slot.selected-slot {
  background: var(--accent-cyan);
  border-color: var(--accent-cyan);
  color: var(--bg-color);
  font-weight: 700;
}

/* Scheduler details submit form */
.booking-details-form {
  display: none;
  flex-direction: column;
  gap: 2rem;
  margin-top: 2rem;
}

.booking-details-form.visible {
  display: flex;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.form-group label {
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--text-secondary);
  text-transform: uppercase;
}

.form-group input {
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 8px;
  padding: 0.85rem 1rem;
  color: var(--text-primary);
  font-family: var(--font-body);
  font-size: 16px;
  outline: none;
  transition: var(--transition-fast);
}

.form-group input:focus {
  border-color: var(--accent-cyan);
  box-shadow: 0 0 10px rgba(var(--accent-cyan-rgb), 0.1);
  background: rgba(255, 255, 255, 0.04);
}

.btn-booking-submit {
  width: 100%;
  margin-top: 1rem;
}

/* Success Card */
.booking-success-box {
  display: none;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: 3rem 1.5rem;
}

.booking-success-box.visible {
  display: flex;
}

.success-check-icon {
  width: 60px;
  height: 60px;
  border-radius: 50%;
  background: rgba(var(--accent-cyan-rgb), 0.1);
  border: 2px solid var(--accent-cyan);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--accent-cyan);
  font-size: 1.8rem;
  font-weight: 800;
  margin-bottom: 1.5rem;
  box-shadow: 0 0 20px rgba(var(--accent-cyan-rgb), 0.2);
}

.booking-success-box h3 {
  font-family: var(--font-header);
  font-size: 1.6rem;
  margin-bottom: 0.6rem;
}

.booking-success-box p {
  color: var(--text-secondary);
  font-size: 0.92rem;
  margin-bottom: 1.5rem;
}

@media (max-width: 850px) {
  .calendar-layout {
    grid-template-columns: 1fr;
    gap: 3rem;
  }
}

/* --------------------------------------------------------------------------
   14. Shared Footer
   -------------------------------------------------------------------------- */
#shared-footer {
  width: 100%;
  background-color: #030405;
  border-top: 1px solid rgba(255, 255, 255, 0.04);
  padding: 6rem var(--container-padding) 3rem;
  display: flex;
  flex-direction: column;
  z-index: 5;
  position: relative;
}

.footer-top-grid {
  display: grid;
  grid-template-columns: 1.5fr 1fr 1.5fr;
  gap: 4rem;
  margin-bottom: 4rem;
  width: 100%;
}

.footer-brand h3 {
  font-family: var(--font-header);
  font-size: 1.25rem;
  font-weight: 800;
  letter-spacing: 0.05em;
  margin-bottom: 0.8rem;
}

.footer-brand p {
  color: var(--text-secondary);
  font-size: 0.88rem;
  max-width: 300px;
  line-height: 1.6;
}

.footer-links-col h4, .footer-blogs-col h4 {
  font-family: var(--font-header);
  font-size: 0.8rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--text-muted);
  margin-bottom: 1.2rem;
}

.footer-links-list {
  display: flex;
  flex-direction: column;
  gap: 0.8rem;
}

.footer-links-list a {
  font-size: 0.88rem;
  color: var(--text-secondary);
}

.footer-links-list a:hover {
  color: var(--accent-cyan);
  padding-left: 4px;
}

.footer-blogs-list {
  display: flex;
  flex-direction: column;
  gap: 2rem;
}

.blog-footer-item {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.blog-footer-item span {
  font-size: 0.72rem;
  color: var(--text-muted);
  text-transform: uppercase;
}

.blog-footer-item a {
  font-family: var(--font-header);
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--text-primary);
  line-height: 1.3;
}

.blog-footer-item a:hover {
  color: var(--accent-purple);
}

.footer-bottom-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-top: 1px solid rgba(255, 255, 255, 0.03);
  padding-top: 2rem;
  width: 100%;
}

.footer-social-row {
  display: flex;
  gap: 1.5rem;
}

.footer-social-row a {
  color: var(--text-muted);
  font-size: 0.88rem;
}

.footer-social-row a:hover {
  color: var(--accent-cyan);
}

.footer-quote-box {
  font-family: var(--font-header);
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  color: var(--text-muted);
  letter-spacing: 0.1em;
}

.copyright-text {
  font-size: 0.75rem;
  color: var(--text-muted);
}

@media (max-width: 850px) {
  .footer-top-grid {
    grid-template-columns: 1fr;
    gap: 3rem;
  }
}

@media (max-width: 500px) {
  .footer-bottom-bar {
    flex-direction: column;
    gap: 1.5rem;
    align-items: flex-start;
  }
}

/* --------------------------------------------------------------------------
   15. Shared Visual Elements (Common buttons and indicators)
   -------------------------------------------------------------------------- */
.scroll-cue {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  margin-top: 1.8rem;
  opacity: 0.6;
  animation: float-cue 2.5s ease-in-out infinite;
}

.cue-text {
  font-family: var(--font-header);
  font-size: 0.75rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
}

.cue-arrow {
  font-size: 1.2rem;
}

@keyframes float-cue {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(8px); }
}

.action-buttons {
  display: flex;
  gap: 1.5rem;
  margin-top: 2rem;
}

.btn {
  font-family: var(--font-header);
  font-size: 0.88rem;
  font-weight: 600;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  padding: 0.95rem 2.2rem;
  border-radius: 30px;
  cursor: pointer;
  position: relative;
  overflow: hidden;
  transition: var(--transition-smooth);
}

.btn-primary {
  background: var(--text-primary);
  color: var(--bg-color);
  border: 1px solid var(--text-primary);
}

.btn-primary:hover {
  background: transparent;
  color: var(--text-primary);
  border-color: var(--accent-cyan);
  box-shadow: 0 0 20px rgba(var(--accent-cyan-rgb), 0.3);
}

.btn-secondary {
  background: transparent;
  color: var(--text-primary);
  border: 1px solid rgba(255, 255, 255, 0.15);
}

.btn-secondary:hover {
  border-color: var(--accent-purple);
  box-shadow: 0 0 20px rgba(var(--accent-purple-rgb), 0.25);
  background: rgba(var(--accent-purple-rgb), 0.02);
}

/* --------------------------------------------------------------------------
   16. 3D Spatial Hotspots & Interactive Vector Lines
   -------------------------------------------------------------------------- */
.hotspot-svg {
  position: absolute;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  pointer-events: none;
  z-index: 8;
  display: block;
}

.hotspots-container {
  position: absolute;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  pointer-events: none;
  z-index: 9;
}

.spatial-hotspot {
  position: absolute;
  width: 0;
  height: 0;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.4s ease, visibility 0.4s ease;
  pointer-events: none;
}

.spatial-hotspot.active {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}

.hotspot-dot {
  width: 12px;
  height: 12px;
  background-color: var(--accent-cyan);
  border-radius: 50%;
  position: absolute;
  top: 0;
  left: 0;
  transform: translate(-50%, -50%);
  box-shadow: 0 0 15px var(--accent-cyan);
  animation: pulse-cyan 1.6s infinite;
}

.spatial-hotspot.pink .hotspot-dot {
  background-color: var(--accent-pink);
  box-shadow: 0 0 15px var(--accent-pink);
  animation: pulse-pink 1.6s infinite;
}

@keyframes pulse-cyan {
  0% { box-shadow: 0 0 0 0 rgba(0, 240, 255, 0.75); }
  70% { box-shadow: 0 0 0 10px rgba(0, 240, 255, 0); }
  100% { box-shadow: 0 0 0 0 rgba(0, 240, 255, 0); }
}

@keyframes pulse-pink {
  0% { box-shadow: 0 0 0 0 rgba(236, 72, 153, 0.75); }
  70% { box-shadow: 0 0 0 10px rgba(236, 72, 153, 0); }
  100% { box-shadow: 0 0 0 0 rgba(236, 72, 153, 0); }
}

.hotspot-label {
  position: absolute;
  width: 250px;
  padding: 1.25rem;
  border-radius: 12px;
  background: rgba(10, 12, 16, 0.75);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid rgba(255, 255, 255, 0.08);
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.6);
  transform: translate(-50%, -50%);
}

.hotspot-label h5 {
  font-family: var(--font-header);
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 0.3rem;
}

.hotspot-label p {
  font-size: 0.78rem;
  color: var(--text-secondary);
  line-height: 1.45;
}

@media (max-width: 600px) {
  .overlay-stage {
    padding: 1.75rem;
    width: 90%;
  }
  .overlay-stage.align-left {
    left: 5%;
  }
  .overlay-stage.align-right {
    right: 5%;
  }
  .overlay-stage.align-center-bottom {
    bottom: 5%;
  }
}

/* --------------------------------------------------------------------------
   17. 3D Animated CSS Icons
   -------------------------------------------------------------------------- */
.scene3d {
  position: relative;
  width: 120px;
  height: 120px;
  perspective: 800px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* 3D Wireframe Cube */
.cube3d {
  position: relative;
  width: 50px;
  height: 50px;
  transform-style: preserve-3d;
  animation: rotateCube 10s linear infinite;
}

.cube-face {
  position: absolute;
  width: 50px;
  height: 50px;
  border: 1.5px solid var(--accent-cyan);
  background: rgba(0, 240, 255, 0.03);
  box-shadow: inset 0 0 10px rgba(0, 240, 255, 0.15), 0 0 8px rgba(0, 240, 255, 0.05);
}

.cube-face.front  { transform: rotateY(0deg) translateZ(25px); }
.cube-face.back   { transform: rotateY(180deg) translateZ(25px); }
.cube-face.right  { transform: rotateY(90deg) translateZ(25px); border-color: var(--accent-purple); box-shadow: inset 0 0 10px rgba(189, 0, 255, 0.15); }
.cube-face.left   { transform: rotateY(-90deg) translateZ(25px); border-color: var(--accent-purple); box-shadow: inset 0 0 10px rgba(189, 0, 255, 0.15); }
.cube-face.top    { transform: rotateX(90deg) translateZ(25px); }
.cube-face.bottom { transform: rotateX(-90deg) translateZ(25px); }

@keyframes rotateCube {
  0% { transform: rotateX(0deg) rotateY(0deg) rotateZ(0deg); }
  100% { transform: rotateX(360deg) rotateY(360deg) rotateZ(360deg); }
}

/* 3D Nested Gyroscope */
.gyro3d {
  position: relative;
  width: 80px;
  height: 80px;
  transform-style: preserve-3d;
  display: flex;
  align-items: center;
  justify-content: center;
}

.gyro-ring {
  position: absolute;
  border-radius: 50%;
  border: 1.5px dashed var(--accent-pink);
  box-shadow: 0 0 10px rgba(236, 72, 153, 0.15);
}

.gyro-ring.ring-outer {
  width: 80px;
  height: 80px;
  animation: rotateRingOuter 7s linear infinite;
}

.gyro-ring.ring-mid {
  width: 60px;
  height: 60px;
  border-style: solid;
  border-color: var(--accent-purple);
  box-shadow: 0 0 10px rgba(189, 0, 255, 0.15);
  animation: rotateRingInner 5s linear reverse infinite;
}

.gyro-ring.ring-inner {
  width: 40px;
  height: 40px;
  border-color: var(--accent-cyan);
  box-shadow: 0 0 10px rgba(0, 240, 255, 0.15);
  animation: rotateRingOuter 3s linear infinite;
}

.gyro-core {
  position: absolute;
  width: 12px;
  height: 12px;
  background: var(--accent-pink);
  border-radius: 50%;
  box-shadow: 0 0 15px var(--accent-pink);
  animation: pulseCore 1.5s ease-in-out infinite alternate;
}

@keyframes rotateRingOuter {
  0% { transform: rotateX(45deg) rotateY(0deg); }
  100% { transform: rotateX(45deg) rotateY(360deg); }
}

@keyframes rotateRingInner {
  0% { transform: rotateX(-45deg) rotateY(360deg); }
  100% { transform: rotateX(-45deg) rotateY(0deg); }
}

@keyframes pulseCore {
  0% { transform: scale(0.85); box-shadow: 0 0 8px var(--accent-pink); }
  100% { transform: scale(1.15); box-shadow: 0 0 20px var(--accent-pink); }
}

/* 3D Stacked Perspectives */
.deck3d {
  position: relative;
  width: 70px;
  height: 50px;
  transform-style: preserve-3d;
  transform: rotateX(60deg) rotateZ(-35deg);
}

.deck-plane {
  position: absolute;
  width: 70px;
  height: 50px;
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.02);
  border: 1.5px solid rgba(255, 255, 255, 0.08);
  box-shadow: 0 0 12px rgba(0, 0, 0, 0.4);
}

.deck-plane.plane-bottom {
  border-color: rgba(189, 0, 255, 0.25);
  background: rgba(189, 0, 255, 0.04);
  animation: floatPlane 3s ease-in-out infinite alternate;
}

.deck-plane.plane-mid {
  border-color: rgba(0, 240, 255, 0.35);
  background: rgba(0, 240, 255, 0.06);
  animation: floatPlaneMid 3s ease-in-out infinite alternate;
}

.deck-plane.plane-top {
  border-color: rgba(236, 72, 153, 0.45);
  background: rgba(236, 72, 153, 0.09);
  animation: floatPlaneTop 3s ease-in-out infinite alternate;
  display: flex;
  align-items: center;
  justify-content: center;
}

.deck-plane.plane-top::after {
  content: '⚡';
  font-size: 1rem;
  color: var(--accent-pink);
  text-shadow: 0 0 8px var(--accent-pink);
}

@keyframes floatPlane {
  0% { transform: translateZ(0px); opacity: 0.5; }
  100% { transform: translateZ(20px); opacity: 0.8; }
}

@keyframes floatPlaneMid {
  0% { transform: translateZ(10px); }
  100% { transform: translateZ(30px); }
}

@keyframes floatPlaneTop {
  0% { transform: translateZ(20px); opacity: 0.8; }
  100% { transform: translateZ(40px); opacity: 1; }
}

/* 3D Floating Orbits */
.orbits3d {
  position: relative;
  width: 70px;
  height: 70px;
  transform-style: preserve-3d;
  transform: rotateX(65deg) rotateY(10deg);
  display: flex;
  align-items: center;
  justify-content: center;
}

.orbit-ring {
  position: absolute;
  width: 70px;
  height: 70px;
  border: 1.5px solid rgba(0, 240, 255, 0.2);
  border-radius: 50%;
  box-shadow: 0 0 10px rgba(0, 240, 255, 0.08);
}

.orbit-sat {
  position: absolute;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--accent-cyan);
  box-shadow: 0 0 10px var(--accent-cyan);
}

.orbit-sat.sat-1 {
  left: 32px;
  top: -3px;
  animation: orbitMotion1 3s linear infinite;
}

.orbit-sat.sat-2 {
  left: -3px;
  top: 32px;
  background: var(--accent-purple);
  box-shadow: 0 0 10px var(--accent-purple);
  animation: orbitMotion1 3s linear -1s infinite;
}

.orbit-sat.sat-3 {
  left: 32px;
  top: 67px;
  background: var(--accent-pink);
  box-shadow: 0 0 10px var(--accent-pink);
  animation: orbitMotion1 3s linear -2s infinite;
}

.orbit-center {
  position: absolute;
  width: 18px;
  height: 18px;
  background: rgba(189, 0, 255, 0.2);
  border: 1.5px solid var(--accent-purple);
  border-radius: 50%;
  box-shadow: 0 0 12px var(--accent-purple);
  transform: rotateX(-65deg);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.55rem;
  font-weight: 900;
  color: var(--accent-cyan);
  text-shadow: 0 0 4px var(--accent-cyan);
}

@keyframes orbitMotion1 {
  0% { transform: rotate(0deg) translate(35px) rotate(0deg); }
  100% { transform: rotate(360deg) translate(35px) rotate(-360deg); }
}

/* ==========================================================================
   10. Interactive Components (ROI Calculator, FAQ Accordion, Timeline)
   ========================================================================== */

/* ROI Calculator Styles */
.roi-calc-section {
  width: 100%;
  max-width: 1100px;
  margin: 0 auto;
}

.roi-calc-container {
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  gap: 3rem;
  align-items: start;
}

@media (max-width: 900px) {
  .roi-calc-container {
    grid-template-columns: 1fr;
    gap: 2rem;
  }
}

.roi-inputs-card, .roi-results-card {
  padding: 2.5rem;
  border-radius: 16px;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}

.roi-inputs-card {
  background: rgba(12, 14, 20, 0.45);
  border: 1px solid rgba(255, 255, 255, 0.05);
}

.roi-results-card {
  background: linear-gradient(135deg, rgba(var(--accent-cyan-rgb), 0.05), rgba(var(--accent-purple-rgb), 0.05));
  border: 1px solid rgba(0, 240, 255, 0.15);
  box-shadow: 0 8px 32px 0 rgba(0, 240, 255, 0.03);
  position: relative;
  overflow: hidden;
}

.roi-results-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 4px;
  background: linear-gradient(90deg, var(--accent-cyan), var(--accent-purple));
}

.roi-input-group {
  margin-bottom: 2rem;
}

.roi-input-group:last-child {
  margin-bottom: 0;
}

.roi-input-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0.8rem;
}

.roi-input-header label {
  font-family: var(--font-header);
  font-size: 0.95rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-primary);
}

.roi-input-val {
  font-family: var(--font-header);
  font-size: 1.15rem;
  font-weight: 800;
  color: var(--accent-cyan);
  background: rgba(0, 240, 255, 0.06);
  padding: 2px 10px;
  border-radius: 4px;
  border: 1px solid rgba(0, 240, 255, 0.15);
}

/* Custom Range Slider */
.roi-slider {
  -webkit-appearance: none;
  width: 100%;
  height: 6px;
  border-radius: 3px;
  background: rgba(255, 255, 255, 0.1);
  outline: none;
  transition: background 0.3s;
}

.roi-slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: var(--accent-cyan);
  cursor: pointer;
  box-shadow: 0 0 10px var(--accent-cyan);
  transition: transform 0.1s, background-color 0.2s;
}

.roi-slider::-webkit-slider-thumb:hover {
  transform: scale(1.2);
}

.roi-slider::-moz-range-thumb {
  width: 18px;
  height: 18px;
  border: none;
  border-radius: 50%;
  background: var(--accent-cyan);
  cursor: pointer;
  box-shadow: 0 0 10px var(--accent-cyan);
  transition: transform 0.1s;
}

.roi-slider::-moz-range-thumb:hover {
  transform: scale(1.2);
}

.roi-results-title {
  font-family: var(--font-header);
  font-size: 1.25rem;
  font-weight: 800;
  text-transform: uppercase;
  margin-bottom: 2rem;
  letter-spacing: 0.05em;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  padding-bottom: 0.8rem;
}

.roi-metric-highlight {
  margin-bottom: 2.2rem;
}

.roi-metric-label {
  font-size: 0.85rem;
  text-transform: uppercase;
  color: var(--text-secondary);
  letter-spacing: 0.1em;
  margin-bottom: 0.4rem;
}

.roi-metric-num {
  font-family: var(--font-header);
  font-size: 2.6rem;
  font-weight: 900;
  color: var(--accent-pink);
  text-shadow: 0 0 20px rgba(236, 72, 153, 0.25);
  line-height: 1.1;
}

.roi-metric-num.cyan {
  color: var(--accent-cyan);
  text-shadow: 0 0 20px rgba(0, 240, 255, 0.25);
}

.roi-results-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.5rem;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
  padding-top: 1.5rem;
}

.roi-submetric-num {
  font-family: var(--font-header);
  font-size: 1.35rem;
  font-weight: 800;
  color: var(--text-primary);
  margin-top: 0.2rem;
}

/* FAQ Section Accordion Styles */
.faq-section {
  width: 100%;
  max-width: 850px;
  margin: 0 auto;
}

.faq-accordion {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  width: 100%;
}

.faq-item {
  background: rgba(12, 14, 20, 0.4);
  border: 1px solid rgba(255, 255, 255, 0.05);
  border-radius: 12px;
  overflow: hidden;
  transition: var(--transition-fast);
}

.faq-item:hover {
  border-color: rgba(var(--accent-cyan-rgb), 0.25);
  background: rgba(12, 14, 20, 0.55);
}

.faq-item.active {
  border-color: rgba(var(--accent-cyan-rgb), 0.4);
  background: rgba(12, 14, 20, 0.6);
  box-shadow: 0 4px 20px rgba(0, 240, 255, 0.03);
}

.faq-question {
  width: 100%;
  padding: 1.5rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: transparent;
  border: none;
  cursor: pointer;
  text-align: left;
  font-family: var(--font-header);
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--text-primary);
  outline: none;
  transition: var(--transition-fast);
}

.faq-question:hover {
  color: var(--accent-cyan);
}

.faq-icon {
  font-size: 1.25rem;
  font-weight: 400;
  color: var(--text-muted);
  transition: transform 0.3s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
}

.faq-item.active .faq-icon {
  transform: rotate(45deg);
  color: var(--accent-cyan);
}

.faq-answer {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.35s cubic-bezier(0.25, 1, 0.5, 1);
  padding: 0 1.5rem;
}

.faq-answer p {
  padding-bottom: 1.5rem;
  font-size: 0.9rem;
  color: var(--text-secondary);
  line-height: 1.6;
}

/* Stepped Timeline Styles */
.timeline-section {
  width: 100%;
  max-width: 900px;
  margin: 0 auto;
  position: relative;
  padding: 2rem 0;
}

.timeline-container {
  position: relative;
  width: 100%;
}

.timeline-container::before {
  content: '';
  position: absolute;
  top: 0;
  left: 50%;
  width: 2px;
  height: 100%;
  background: linear-gradient(180deg, rgba(var(--accent-cyan-rgb), 0.1) 0%, var(--accent-cyan) 15%, var(--accent-purple) 85%, rgba(var(--accent-purple-rgb), 0.1) 100%);
  transform: translateX(-50%);
}

@media (max-width: 768px) {
  .timeline-container::before {
    left: 20px;
    transform: none;
  }
}

.timeline-step {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 3.5rem;
  position: relative;
  width: 100%;
}

.timeline-step:last-child {
  margin-bottom: 0;
}

.timeline-step-left {
  flex-direction: row-reverse;
}

@media (max-width: 768px) {
  .timeline-step, .timeline-step-left {
    flex-direction: row;
    padding-left: 45px;
    margin-bottom: 2.5rem;
  }
}

.timeline-content-wrapper {
  width: 44%;
}

@media (max-width: 768px) {
  .timeline-content-wrapper {
    width: 100%;
  }
}

.timeline-card {
  padding: 1.8rem;
  background: rgba(12, 14, 20, 0.45);
  border: 1px solid rgba(255, 255, 255, 0.05);
  border-radius: 12px;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  transition: var(--transition-smooth);
}

.timeline-card:hover {
  transform: translateY(-5px);
  border-color: rgba(var(--accent-cyan-rgb), 0.25);
  box-shadow: 0 6px 20px rgba(0, 240, 255, 0.02);
}

.timeline-step-left .timeline-card:hover {
  border-color: rgba(var(--accent-purple-rgb), 0.25);
  box-shadow: 0 6px 20px rgba(189, 0, 255, 0.02);
}

.timeline-phase {
  font-family: var(--font-header);
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--accent-cyan);
  margin-bottom: 0.5rem;
}

.timeline-step-left .timeline-phase {
  color: var(--accent-purple);
}

.timeline-card h3 {
  font-family: var(--font-header);
  font-size: 1.15rem;
  font-weight: 700;
  margin-bottom: 0.6rem;
  color: var(--text-primary);
}

.timeline-card p {
  font-size: 0.85rem;
  color: var(--text-secondary);
  line-height: 1.5;
}

.timeline-step .timeline-node {
  position: absolute;
  left: 50%;
  top: 15px;
  transform: translateX(-50%);
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: var(--bg-color);
  border: 3px solid var(--accent-cyan);
  box-shadow: 0 0 10px var(--accent-cyan);
  z-index: 2;
  transition: transform 0.3s ease;
}

.timeline-step-left .timeline-node {
  border-color: var(--accent-purple);
  box-shadow: 0 0 10px var(--accent-purple);
}

.timeline-step:hover .timeline-node {
  transform: translateX(-50%) scale(1.3);
}

@media (max-width: 768px) {
  .timeline-step .timeline-node {
    left: 20px;
    top: 20px;
    transform: translate(-50%, -50%);
  }
  .timeline-step:hover .timeline-node {
    transform: translate(-50%, -50%) scale(1.3);
  }
}


/* Case Title Link Styling */
.case-title-link {
  color: var(--text-primary);
  text-decoration: none;
  transition: var(--transition-fast);
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.case-title-link:hover {
  color: var(--accent-cyan);
}

.link-arrow {
  font-size: 0.85em;
  opacity: 0.7;
  transition: transform 0.2s ease;
}

.case-title-link:hover .link-arrow {
  transform: translate(2px, -2px);
  opacity: 1;
}

/* Fix case card link wrapper size to resolve image box alignment */
.case-card-image a {
  display: block;
  width: 100% !important;
  height: 100% !important;
  flex-shrink: 0;
}

/* Subpage Case grid overrides for desktop & 2-column mobile */
.subpage-cases-grid {
  max-width: 1000px;
  width: 100%;
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 2.5rem;
}

@media (max-width: 768px) {
  .subpage-cases-grid {
    grid-template-columns: repeat(2, 1fr) !important;
    gap: 1rem !important;
  }
  .subpage-cases-grid .glass-card {
    border-radius: 8px !important;
  }
  .subpage-cases-grid .glass-card > div:nth-child(2) {
    height: 120px !important;
  }
  .subpage-cases-grid .glass-card > div:nth-child(3) {
    padding: 1rem !important;
  }
  .subpage-cases-grid .glass-card h3 {
    font-size: 0.95rem !important;
    margin-bottom: 0.4rem !important;
  }
  .subpage-cases-grid .glass-card p {
    font-size: 0.72rem !important;
    line-height: 1.4 !important;
  }
  .subpage-cases-grid .card-browser-bar {
    padding: 0.4rem 0.75rem !important;
  }
  .subpage-cases-grid .card-browser-bar span {
    font-size: 0.65rem !important;
  }
}

@media (max-width: 500px) {
  .subpage-cases-grid {
    grid-template-columns: 1fr !important;
    gap: 1.5rem !important;
  }
  .subpage-cases-grid .glass-card > div:nth-child(2) {
    height: auto !important;
    aspect-ratio: 16/9 !important;
  }
}

@media (max-width: 768px) {
  #navbar {
    display: flex !important;
    justify-content: space-between !important;
    align-items: center !important;
    padding: 0 var(--container-padding) !important;
  }
  
  /* Hide the subtitle details on mobile to prevent header overflow */
  .logo-subtitle, .logo-slash {
    display: none !important;
  }
  
  .nav-logo {
    font-size: 1.05rem !important;
  }
  
  .menu-toggle {
    margin-right: auto; /* aligns logo to the right, menu to the left */
  }
}

/* Mobile Bottom Navigation Bar */
.mobile-bottom-nav {
  display: none;
}

.mobile-services-menu {
  display: none;
}

@media (max-width: 768px) {
  .mobile-bottom-nav {
    display: flex;
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    height: calc(65px + env(safe-area-inset-bottom, 0px));
    min-height: 65px;
    background: rgba(5, 6, 8, 0.85);
    backdrop-filter: blur(25px);
    -webkit-backdrop-filter: blur(25px);
    border-top: 1px solid rgba(255, 255, 255, 0.05);
    justify-content: space-around;
    align-items: center;
    z-index: 1000;
    padding-bottom: env(safe-area-inset-bottom, 0px);
    box-shadow: 0 -10px 30px rgba(0, 0, 0, 0.5);
    box-sizing: border-box;
  }
  
  /* Prevent content blocking by bottom nav */
  body {
    padding-bottom: calc(80px + env(safe-area-inset-bottom, 0px)) !important;
  }

  .mobile-nav-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    color: var(--text-muted);
    text-decoration: none;
    font-size: 0.65rem;
    font-family: var(--font-header);
    font-weight: 500;
    gap: 3px;
    width: 25%;
    height: 100%;
    transition: var(--transition-fast);
  }

  .mobile-nav-item .nav-icon {
    width: 18px;
    height: 18px;
    stroke: var(--text-muted);
    transition: var(--transition-fast);
  }

  .mobile-nav-item:hover, .mobile-nav-item.active {
    color: var(--text-primary);
  }

  .mobile-nav-item.active .nav-icon {
    stroke: var(--accent-cyan);
    filter: drop-shadow(0 0 5px rgba(0, 240, 255, 0.3));
  }

  .mobile-nav-item:nth-child(2).active .nav-icon {
    stroke: var(--accent-purple);
    filter: drop-shadow(0 0 5px rgba(189, 0, 255, 0.3));
  }

  .mobile-nav-item:nth-child(3).active .nav-icon {
    stroke: var(--accent-pink);
    filter: drop-shadow(0 0 5px rgba(236, 72, 153, 0.3));
  }
  
  .mobile-nav-item:nth-child(4).active .nav-icon {
    stroke: var(--accent-cyan);
    filter: drop-shadow(0 0 5px rgba(0, 240, 255, 0.3));
  }
  
  /* Mobile services submenu inside nav-links drawer */
  .mobile-services-menu {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1.1rem;
    margin-top: 1.2rem;
    padding-top: 1.2rem;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
    width: 80%;
  }
  
  .mobile-menu-title {
    font-family: var(--font-header);
    font-size: 0.72rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--accent-cyan);
    margin-bottom: 0.4rem;
  }
  
  .mobile-nav-sub-item {
    font-size: 0.9rem;
    color: var(--text-secondary);
    text-decoration: none;
    transition: var(--transition-fast);
    padding: 0.75rem 1rem;
    min-height: 44px;
    display: block;
  }
  
  .mobile-nav-sub-item:hover, .mobile-nav-sub-item.active {
    color: var(--text-primary);
  }
  
  .mobile-nav-sub-item.active {
    color: var(--accent-pink) !important;
  }

  /* Support vertical scroll in nav drawer */
  .nav-links {
    overflow-y: auto !important;
    padding: 6rem 0 calc(65px + env(safe-area-inset-bottom, 0px)) !important;
    left: auto !important;
    right: -100% !important;
  }
  
  .nav-links.open {
    right: 0 !important;
  }
}

@media (max-width: 768px) {
  .case-studies-grid {
    grid-template-columns: repeat(2, 1fr) !important;
    gap: 1rem !important;
  }
  .case-card-image {
    height: 125px !important;
  }
  .case-card-image::after {
    font-size: 1rem !important;
  }
  .case-card-body {
    padding: 1rem !important;
  }
  .case-card h3 {
    font-size: 0.98rem !important;
    margin-bottom: 0.4rem !important;
  }
  .case-card p {
    font-size: 0.72rem !important;
    margin-bottom: 0.8rem !important;
    line-height: 1.4 !important;
  }
  .case-stats {
    gap: 0.8rem !important;
    padding-top: 0.6rem !important;
  }
  .case-stat-num {
    font-size: 0.95rem !important;
  }
  .case-stat-lbl {
    font-size: 0.62rem !important;
  }
}

@media (max-width: 480px) {
  .case-studies-grid {
    grid-template-columns: repeat(2, 1fr) !important;
    gap: 0.75rem !important;
  }
  .case-card-image {
    height: 95px !important;
  }
  .case-card-body {
    padding: 0.75rem !important;
  }
  .case-card h3 {
    font-size: 0.88rem !important;
  }
  .case-card p {
    font-size: 0.68rem !important;
    margin-bottom: 0.4rem !important;
  }
  .case-stats {
    display: none !important;
  }
}

@media (max-width: 768px) {
  /* Ensure correct z-indexing and clickable toggles in mobile drawer */
  .nav-links {
    z-index: 1010 !important;
  }
  
  .menu-toggle {
    z-index: 1020 !important;
  }

  .glass-card {
    padding: 1.5rem !important;
  }
  
  /* Fix CTA button text clipping and alignment inside mobile drawer */
  .nav-links .cta-nav {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    height: auto !important;
    padding: 0.65rem 1.6rem !important;
    line-height: 1.2 !important;
    overflow: visible !important;
  }
}
/* --------------------------------------------------------------------------
   Swapped Portfolio Grid: Desktop 2 Cols (4 Rows) & Mobile 4 Cols (2 Rows)
   -------------------------------------------------------------------------- */
@media (max-width: 1024px) {
  .case-studies-grid {
    grid-template-columns: repeat(2, 1fr) !important;
    gap: 1.8rem !important;
  }
  .case-card-image {
    height: 220px !important;
  }
  .case-card-body {
    padding: 2rem !important;
  }
  .case-card h3 {
    font-size: 1.4rem !important;
  }
}

@media (max-width: 768px) {
  .case-studies-grid {
    grid-template-columns: repeat(2, 1fr) !important;
    gap: 0.8rem !important;
  }
  .case-card-image {
    height: 120px !important;
  }
  .case-card-image::after {
    display: none !important;
  }
  .case-card-body {
    padding: 0.5rem !important;
  }
  .case-card h3 {
    font-size: 0.72rem !important;
    margin-bottom: 0 !important;
    font-weight: 700 !important;
    line-height: 1.25 !important;
  }
  .case-title-link {
    gap: 0 !important;
  }
  .link-arrow {
    display: none !important;
  }
  /* Hide details for dense 4x2 mobile grid */
  .case-card p,
  .case-tag,
  .case-stats {
    display: none !important;
  }
}

@media (max-width: 480px) {
  .case-studies-grid {
    grid-template-columns: repeat(2, 1fr) !important;
    gap: 0.6rem !important;
  }
  .case-card-image {
    height: 100px !important;
  }
  .case-card-body {
    padding: 0.4rem !important;
  }
  .case-card h3 {
    font-size: 0.65rem !important;
  }
  .roi-metric-num {
    font-size: clamp(1.2rem, 5vw, 1.4rem) !important;
  }
  .roi-metric-label {
    font-size: 0.55rem;
  }
  .roi-submetric-num {
    font-size: 0.85rem !important;
  }
  .roi-input-header label {
    font-size: 0.55rem;
    letter-spacing: 0;
    max-width: 65%;
    line-height: 1.1;
  }
  .roi-input-val {
    font-size: 0.65rem;
    padding: 2px 4px;
  }
  .roi-slider::-webkit-slider-thumb {
    width: 16px;
    height: 16px;
  }
  .roi-slider::-moz-range-thumb {
    width: 16px;
    height: 16px;
  }
  .roi-calc-container {
    grid-template-columns: 1fr 1fr !important;
    gap: 0.5rem !important;
  }
  .roi-inputs-card, .roi-results-card {
    padding: 0.8rem;
  }
  .roi-input-group {
    margin-bottom: 0.8rem;
  }
  .roi-input-header {
    margin-bottom: 0.2rem;
  }
  .roi-results-title {
    font-size: 0.9rem !important;
    margin-bottom: 0.5rem;
  }
  .roi-metric-highlight {
    margin-bottom: 0.6rem;
  }
}
