/* ============================================================================
   MGR Ventures - Premium Modern Styling
   A cutting-edge, 2025-level design system
   ============================================================================ */

/* ============================================================================
   Scroll Progress + Back To Top + Active Nav
   (UI-only enhancements, no feature behavior changes)
   ============================================================================ */

.scroll-progress {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 3px;
  z-index: 1100; /* above navbar */
  background: rgba(255, 255, 255, 0.08);
  backdrop-filter: blur(10px);
}

.scroll-progress-bar {
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, var(--accent-cyan), var(--accent-blue));
  box-shadow: 0 0 18px rgba(0, 212, 255, 0.45);
  transform-origin: left;
  transition: width 0.08s linear;
}

/* Active nav state (works with your existing underline animation) */
.navbar-nav .nav-link.active {
  color: var(--accent-cyan);
}

/* Make the focus bar show for the active section too (not just hover) */
.navbar-nav .nav-link.active::before {
  transform: translateX(-50%) scaleX(1);
}

.back-to-top {
  position: fixed;
  right: 18px;
  bottom: 18px;
  z-index: 1100;
  width: 46px;
  height: 46px;
  border-radius: 14px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  background: rgba(10, 14, 39, 0.65);
  backdrop-filter: blur(14px);
  color: var(--text-primary);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transform: translateY(10px);
  pointer-events: none;
  transition:
    opacity var(--transition-base),
    transform var(--transition-base);
}

.back-to-top.is-visible {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}

.back-to-top:hover {
  border-color: rgba(0, 212, 255, 0.35);
  box-shadow: 0 0 22px rgba(0, 212, 255, 0.18);
  transform: translateY(-2px);
}

.back-to-top i {
  font-size: 1.1rem;
}

@media (prefers-reduced-motion: reduce) {
  .scroll-progress-bar,
  .back-to-top {
    transition: none !important;
  }
}

/* ============================================================================
   Global Styles
   ============================================================================ */

/* CSS Custom Properties */
:root {
  /* Colors - Deep Navy & Electric Cyan Palette */
  --primary-dark: #0a0e27;
  --primary-navy: #141b2d;
  --secondary-dark: #1e2740;
  --accent-cyan: #00d4ff;
  --accent-blue: #0099ff;
  --accent-purple: #6366f1;

  /* Grays */
  --gray-50: #f8fafc;
  --gray-100: #f1f5f9;
  --gray-200: #e2e8f0;
  --gray-300: #cbd5e1;
  --gray-400: #94a3b8;
  --gray-500: #64748b;
  --gray-600: #475569;
  --gray-700: #334155;
  --gray-800: #1e293b;
  --gray-900: #0f172a;

  /* Semantic Colors */
  --text-primary: #ffffff;
  --text-secondary: #cbd5e1;
  --text-muted: #94a3b8;
  --bg-primary: #ffffff;
  --bg-secondary: #f8fafc;

  /* Typography */
  --font-primary:
    "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --font-weight-regular: 400;
  --font-weight-medium: 500;
  --font-weight-semibold: 600;
  --font-weight-bold: 700;
  --font-weight-extrabold: 800;

  /* Spacing */
  --section-padding: 120px;
  --container-padding: 24px;

  /* Border Radius */
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;
  --radius-xl: 24px;

  /* Shadows */
  --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
  --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
  --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
  --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1);
  --shadow-glow: 0 0 30px rgba(0, 212, 255, 0.3);

  /* Transitions */
  --transition-fast: 150ms cubic-bezier(0.4, 0, 0.2, 1);
  --transition-base: 300ms cubic-bezier(0.4, 0, 0.2, 1);
  --transition-slow: 500ms cubic-bezier(0.4, 0, 0.2, 1);
}

/* ============================================================================
   Base Styles
   ============================================================================ */

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

html {
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  font-family: var(--font-primary);
  font-size: 16px;
  line-height: 1.6;
  color: var(--gray-800);
  background: var(--bg-primary);
}

/* ============================================================================
   Accessibility — Skip Link (visible only on keyboard focus)
   ============================================================================ */

.visually-hidden-focusable {
  position: fixed;
  top: 12px;
  left: -9999px;
  background: var(--primary-dark);
  color: #fff;
  padding: 0.6rem 1rem;
  z-index: 3000;
  border-radius: 10px;
  text-decoration: none;
  font-weight: 600;
  transition: left 0.2s ease;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.35);
}

.visually-hidden-focusable:focus,
.visually-hidden-focusable:focus-visible {
  left: 12px;
  outline: 2px solid var(--accent-cyan);
  outline-offset: 2px;
}

/* One single overflow guard — the only one you need */
html,
body {
  overflow-x: clip;
}

a {
  text-decoration: none;
}

a:hover {
  text-decoration: none;
}

/* Inline text links (e.g. inside paragraphs) */
p a {
  color: var(--accent-cyan);
  transition: color var(--transition-fast);
}

p a:hover {
  color: var(--accent-blue);
}

::selection {
  background: var(--accent-cyan);
  color: var(--primary-dark);
}

/* ============================================================================
   Navigation
   ============================================================================ */

.navbar {
  padding: 1.5rem 0;
  transition: all var(--transition-base);
  background: transparent;
}

.navbar.scrolled {
  padding: 1rem 0;
  background: rgba(10, 14, 39, 0.95);
  backdrop-filter: blur(20px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  box-shadow: 0 4px 30px rgba(0, 0, 0, 0.1);
}

.navbar-brand {
  font-size: 1.5rem;
  font-weight: var(--font-weight-extrabold);
  letter-spacing: -0.5px;
}

.brand-logo {
  background: linear-gradient(135deg, var(--text-primary), var(--accent-cyan));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.navbar-nav .nav-link {
  color: var(--text-primary);
  font-weight: var(--font-weight-medium);
  font-size: 0.95rem;
  padding: 0.5rem 1.25rem;
  position: relative;
  transition: color var(--transition-fast);
}

.navbar-nav .nav-link::before {
  content: "";
  position: absolute;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%) scaleX(0);
  width: 22px;
  height: 2px;
  background: linear-gradient(90deg, var(--accent-cyan), var(--accent-blue));
  transition: transform var(--transition-base);
}

.navbar-nav .nav-link:hover {
  color: var(--accent-cyan);
}

.navbar-nav .nav-link:hover::before {
  transform: translateX(-50%) scaleX(1);
}

@media (max-width: 991px) {
  .navbar-collapse {
    background: rgba(10, 14, 39, 0.98);
    backdrop-filter: blur(20px);
    padding: 2rem;
    margin-top: 1rem;
    border-radius: var(--radius-lg);
    border: 1px solid rgba(255, 255, 255, 0.1);
  }

  /* Mobile underline sizing */
  .navbar-nav .nav-link::before {
    width: 100%;
  }
}

/* ============================================================================
   Hero Section
   ============================================================================ */

.hero-section {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  background: linear-gradient(
    135deg,
    var(--primary-dark) 0%,
    var(--primary-navy) 50%,
    var(--secondary-dark) 100%
  );
  overflow: hidden;
  width: 100%;
  max-width: 100vw;
}

.hero-background {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  overflow: hidden;
  z-index: 0;
}

.hero-logo {
  width: 550px;
  max-width: 550px;
  height: auto;
  display: block;
}

.grid-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-image:
    linear-gradient(rgba(0, 212, 255, 0.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(0, 212, 255, 0.03) 1px, transparent 1px);
  background-size: 50px 50px;
  opacity: 0.5;
}

.gradient-orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(80px);
  opacity: 0.3;
  animation: float 20s infinite ease-in-out;
}

.orb-1 {
  width: 500px;
  height: 500px;
  background: var(--accent-cyan);
  top: -10%;
  right: -10%;
  animation-delay: 0s;
}

.orb-2 {
  width: 400px;
  height: 400px;
  background: var(--accent-blue);
  bottom: -10%;
  left: -10%;
  animation-delay: 7s;
}

.orb-3 {
  width: 300px;
  height: 300px;
  background: var(--accent-purple);
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  animation-delay: 14s;
}

@keyframes float {
  0%,
  100% {
    transform: translate(0, 0) scale(1);
  }
  33% {
    transform: translate(30px, -30px) scale(1.1);
  }
  66% {
    transform: translate(-20px, 20px) scale(0.9);
  }
}

.hero-content-wrapper {
  position: relative;
  z-index: 2;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 1rem;
  background: rgba(0, 212, 255, 0.1);
  border: 1px solid rgba(0, 212, 255, 0.3);
  border-radius: 50px;
  color: var(--accent-cyan);
  font-size: 0.875rem;
  font-weight: var(--font-weight-semibold);
  margin-bottom: 2rem;
}

.hero-badge i {
  font-size: 1rem;
}

.hero-title {
  font-size: 4rem;
  font-weight: var(--font-weight-extrabold);
  line-height: 1.1;
  color: var(--text-primary);
  margin-bottom: 1.5rem;
  letter-spacing: -2px;
}

.gradient-text {
  background: linear-gradient(135deg, var(--accent-cyan), var(--accent-blue));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero-subtitle {
  font-size: 1.25rem;
  line-height: 1.8;
  color: var(--text-secondary);
  margin-bottom: 2.5rem;
  max-width: 600px;
}

.hero-cta-group {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  margin-bottom: 3rem;
}

.btn-primary-glow {
  display: inline-flex;
  align-items: center;
  gap: 0.75rem;
  padding: 1rem 2rem;
  background: linear-gradient(135deg, var(--accent-cyan), var(--accent-blue));
  color: var(--primary-dark);
  font-weight: var(--font-weight-bold);
  border-radius: var(--radius-md);
  border: none;
  font-size: 1rem;
  text-decoration: none;
  transition: all var(--transition-base);
  box-shadow: 0 0 30px rgba(0, 212, 255, 0.4);
  position: relative;
  overflow: hidden;
}

.btn-primary-glow::before {
  content: "";
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(
    90deg,
    transparent,
    rgba(255, 255, 255, 0.3),
    transparent
  );
  transition: left 0.5s;
}

.btn-primary-glow:hover {
  transform: translateY(-2px);
  box-shadow: 0 0 40px rgba(0, 212, 255, 0.6);
  color: var(--primary-dark);
}

.btn-primary-glow:hover::before {
  left: 100%;
}

/* ── CTA text swap: absolute overlay so button never resizes ── */
.btn-primary-glow .cta-texts {
  position: relative;
  display: inline-block;
}

.btn-primary-glow .cta-text {
  display: block;
  white-space: nowrap;
  transition:
    opacity 0.42s cubic-bezier(0.4, 0, 0.2, 1),
    transform 0.42s cubic-bezier(0.4, 0, 0.2, 1),
    filter 0.42s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Default — visible, sizes the button */
.btn-primary-glow .cta-default {
  opacity: 1;
  transform: translateY(0);
  filter: blur(0px);
}

/* Hover text — absolutely placed over default, invisible at rest */
.btn-primary-glow .cta-hover {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  letter-spacing: 0.01em;
  opacity: 0;
  transform: translateY(6px);
  filter: blur(3px);
}

/* On hover / focus: swap */
.btn-primary-glow:hover .cta-default,
.btn-primary-glow:focus-visible .cta-default {
  opacity: 0;
  transform: translateY(-6px);
  filter: blur(3px);
}

.btn-primary-glow:hover .cta-hover,
.btn-primary-glow:focus-visible .cta-hover {
  opacity: 1;
  transform: translateY(0);
  filter: blur(0px);
}

.btn-outline-white {
  display: inline-flex;
  align-items: center;
  gap: 0.75rem;
  padding: 1rem 2rem;
  background: transparent;
  color: var(--text-primary);
  font-weight: var(--font-weight-bold);
  border: 2px solid rgba(255, 255, 255, 0.3);
  border-radius: var(--radius-md);
  font-size: 1rem;
  text-decoration: none;
  transition: all var(--transition-base);
}

.btn-outline-white:hover {
  background: rgba(255, 255, 255, 0.1);
  border-color: var(--accent-cyan);
  color: var(--accent-cyan);
  transform: translateY(-2px);
}

.hero-trust-line {
  margin-top: 3rem;
}

.trust-logos {
  display: flex;
  flex-wrap: wrap;
  gap: 2rem;
}

.trust-item {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  color: var(--text-secondary);
  font-size: 0.9rem;
  font-weight: var(--font-weight-medium);
}

.trust-item i {
  color: var(--accent-cyan);
  font-size: 1.25rem;
}

/* Hero Visual */
.hero-visual {
  position: relative;
  height: 600px;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Hero Logo Placeholder */
.hero-logo-container {
  position: relative;
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
}

.hero-logo-placeholder {
  position: relative;
  width: 400px;
  height: 400px;
  background: rgba(255, 255, 255, 0.03);
  backdrop-filter: blur(10px);
  border: 2px dashed rgba(0, 212, 255, 0.3);
  border-radius: var(--radius-xl);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 1.5rem;
  transition: all var(--transition-base);
}

.hero-logo-placeholder:hover {
  border-color: var(--accent-cyan);
  background: rgba(255, 255, 255, 0.05);
}

.hero-logo-placeholder .logo-glow {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 200px;
  height: 200px;
  background: var(--accent-cyan);
  filter: blur(80px);
  opacity: 0.15;
  transition: opacity var(--transition-base);
}

.hero-logo-placeholder:hover .logo-glow {
  opacity: 0.25;
}

.hero-logo-placeholder i {
  font-size: 5rem;
  color: var(--accent-cyan);
  opacity: 0.5;
}

.hero-logo-placeholder span {
  font-size: 1.25rem;
  color: var(--text-secondary);
  font-weight: var(--font-weight-medium);
  opacity: 0.7;
}

/* For when you add an actual logo image */
.hero-logo-placeholder img {
  max-width: 80%;
  max-height: 80%;
  object-fit: contain;
}

/* Hide placeholder content when image is present */
.hero-logo-placeholder.has-image {
  border-style: solid;
  border-color: rgba(255, 255, 255, 0.1);
}

.hero-logo-placeholder.has-image i,
.hero-logo-placeholder.has-image span {
  display: none;
}

/* Scroll Indicator */
.scroll-indicator {
  position: absolute;
  bottom: 40px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 2;
}

.mouse {
  width: 26px;
  height: 40px;
  border: 2px solid rgba(255, 255, 255, 0.5);
  border-radius: 20px;
  position: relative;
}

.mouse::before {
  content: "";
  width: 4px;
  height: 8px;
  background: var(--accent-cyan);
  position: absolute;
  top: 8px;
  left: 50%;
  transform: translateX(-50%);
  border-radius: 2px;
  animation: scroll 2s infinite;
}

@keyframes scroll {
  0% {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
  }
  100% {
    opacity: 0;
    transform: translateX(-50%) translateY(12px);
  }
}

/* =========================================================
   Brand Demonstration CTA Morph
   ========================================================= */

.brand-cta {
  position: relative;
  overflow: hidden;
}

.brand-cta .cta-text {
  display: inline-block;
  transition:
    transform 260ms cubic-bezier(0.2, 0.8, 0.2, 1),
    opacity 260ms ease;
}

.brand-cta .cta-hover {
  position: absolute;
  left: 50%;
  transform: translate(-50%, 12px);
  opacity: 0;
  white-space: nowrap;
}

.brand-cta:hover .cta-default,
.brand-cta:focus-visible .cta-default {
  transform: translateY(-12px);
  opacity: 0;
}

.brand-cta:hover .cta-hover,
.brand-cta:focus-visible .cta-hover {
  transform: translate(-50%, 0);
  opacity: 1;
}

/* ============================================================================
   Section Common Styles
   ============================================================================ */

section {
  padding: var(--section-padding) 0;
  position: relative;
}

.section-header {
  margin-bottom: 5rem;
}

.section-label {
  display: inline-block;
  padding: 0.5rem 1rem;
  background: linear-gradient(
    135deg,
    rgba(0, 212, 255, 0.1),
    rgba(0, 153, 255, 0.1)
  );
  border: 1px solid rgba(0, 212, 255, 0.2);
  border-radius: 50px;
  color: var(--accent-cyan);
  font-size: 0.875rem;
  font-weight: var(--font-weight-semibold);
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-bottom: 1rem;
}

.section-title {
  font-size: 3rem;
  font-weight: var(--font-weight-extrabold);
  line-height: 1.2;
  color: var(--gray-900);
  margin-bottom: 1rem;
  letter-spacing: -1px;
}

.section-desc {
  font-size: 1.125rem;
  color: var(--gray-600);
  max-width: 700px;
  margin: 0 auto;
  line-height: 1.7;
}

/* ============================================================================
   Services Section
   ============================================================================ */

.services-section {
  background: var(--bg-secondary);
}

.service-card {
  height: 100%;
  padding: 2.5rem;
  background: var(--bg-primary);
  border: 1px solid var(--gray-200);
  border-radius: var(--radius-lg);
  transition: all var(--transition-base);
  position: relative;
  overflow: hidden;
}

.service-card::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 4px;
  background: linear-gradient(90deg, var(--accent-cyan), var(--accent-blue));
  transform: scaleX(0);
  transform-origin: left;
  transition: transform var(--transition-base);
}

.service-card:hover {
  transform: translateY(-8px);
  box-shadow: var(--shadow-xl);
  border-color: var(--accent-cyan);
}

.service-card:hover::before {
  transform: scaleX(1);
}

.service-icon-wrapper {
  position: relative;
  width: 80px;
  height: 80px;
  margin-bottom: 1.5rem;
}

.icon-bg {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(135deg, var(--accent-cyan), var(--accent-blue));
  border-radius: var(--radius-md);
  opacity: 0.1;
  transition: opacity var(--transition-base);
}

.service-card:hover .icon-bg {
  opacity: 0.2;
}

.service-icon-wrapper i {
  position: relative;
  font-size: 2.5rem;
  background: linear-gradient(135deg, var(--accent-cyan), var(--accent-blue));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  display: flex;
  align-items: center;
  justify-content: center;
  height: 100%;
}

.service-card h3 {
  font-size: 1.5rem;
  font-weight: var(--font-weight-bold);
  color: var(--gray-900);
  margin-bottom: 1rem;
}

.service-card h3 a {
  color: inherit;
  text-decoration: none;
  transition: color var(--transition-base);
}

.service-card h3 a:hover {
  color: var(--accent-cyan);
}

.service-learn-more {
  color: var(--accent-cyan);
  text-decoration: none;
  font-weight: var(--font-weight-semibold);
  font-size: 0.9rem;
  display: inline-block;
  margin-bottom: 1rem;
  transition: color var(--transition-base);
}

.service-learn-more:hover {
  color: var(--accent-blue);
}

.service-card p {
  color: var(--gray-600);
  line-height: 1.7;
  margin-bottom: 1.5rem;
}

.service-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.service-tags span {
  padding: 0.35rem 0.75rem;
  background: var(--gray-100);
  color: var(--gray-700);
  font-size: 0.8rem;
  font-weight: var(--font-weight-medium);
  border-radius: 50px;
}

/* ============================================================================
   3D Carousel - Services Section
   ============================================================================ */

/* Dark theme override for the main services carousel section */
#services.services-section {
  background: linear-gradient(135deg, #0a0e1a 0%, #0b0f17 50%, #0d1220 100%);
  position: relative;
  overflow: hidden;
}

#services .section-label {
  color: var(--accent-cyan);
}

#services .section-title {
  color: #fff;
}

#services .section-desc {
  color: rgba(255, 255, 255, 0.65);
}

/* Grid overlay for depth */
.services-grid-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 0;
  overflow: hidden;
}

.services-grid {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-image:
    linear-gradient(rgba(0, 212, 255, 0.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(0, 212, 255, 0.03) 1px, transparent 1px);
  background-size: 60px 60px;
}

/* Carousel container */
.services-carousel-container {
  position: relative;
  height: 520px;
  perspective: 1200px;
  margin: 50px auto 100px;
  max-width: 100%;
}

.carousel-3d {
  position: absolute;
  width: 100%;
  height: 100%;
  transform-style: preserve-3d;
  transition: transform 0.8s cubic-bezier(0.4, 0.0, 0.2, 1);
}

/* Individual 3D cards */
.service-card-3d {
  position: absolute;
  width: 270px;
  height: 380px;
  left: 50%;
  top: 50%;
  margin-left: -135px;
  margin-top: -190px;
  padding: 28px 24px;
  background: linear-gradient(
    135deg,
    rgba(255, 255, 255, 0.07),
    rgba(255, 255, 255, 0.02)
  );
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: var(--radius-lg);
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  backface-visibility: hidden;
  cursor: pointer;
  transition:
    background 0.4s ease,
    box-shadow 0.4s ease;
  box-shadow:
    0 20px 40px rgba(0, 0, 0, 0.4),
    inset 0 0 20px rgba(255, 255, 255, 0.03);
}

/* Glow border on hover */
.service-card-3d::before {
  content: '';
  position: absolute;
  top: -2px;
  left: -2px;
  right: -2px;
  bottom: -2px;
  background: linear-gradient(
    135deg,
    var(--accent-cyan),
    var(--accent-blue),
    var(--accent-purple),
    var(--accent-cyan)
  );
  border-radius: calc(var(--radius-lg) + 2px);
  z-index: -1;
  opacity: 0;
  transition: opacity 0.4s ease;
}

.service-card-3d:hover::before {
  opacity: 1;
}

/* Card positions — 6 cards, 60deg apart */
.service-card-3d:nth-child(1) { transform: rotateY(0deg) translateZ(340px); }
.service-card-3d:nth-child(2) { transform: rotateY(60deg) translateZ(340px); }
.service-card-3d:nth-child(3) { transform: rotateY(120deg) translateZ(340px); }
.service-card-3d:nth-child(4) { transform: rotateY(180deg) translateZ(340px); }
.service-card-3d:nth-child(5) { transform: rotateY(240deg) translateZ(340px); }
.service-card-3d:nth-child(6) { transform: rotateY(300deg) translateZ(340px); }

.service-card-3d:hover {
  background: linear-gradient(
    135deg,
    rgba(255, 255, 255, 0.12),
    rgba(255, 255, 255, 0.04)
  );
  box-shadow:
    0 30px 60px rgba(0, 212, 255, 0.25),
    inset 0 0 30px rgba(255, 255, 255, 0.06);
}

/* Card number */
.service-number {
  position: absolute;
  top: 16px;
  right: 16px;
  font-family: 'Inter', sans-serif;
  font-size: 2.2rem;
  font-weight: 800;
  background: linear-gradient(135deg, var(--accent-cyan), var(--accent-blue));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  opacity: 0.25;
  line-height: 1;
}

/* Card icon */
.service-icon-3d {
  width: 60px;
  height: 60px;
  background: linear-gradient(135deg, var(--accent-cyan), var(--accent-blue));
  border-radius: var(--radius-md);
  margin: 0 auto 18px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 26px;
  color: #fff;
  box-shadow: 0 8px 24px rgba(0, 212, 255, 0.3);
  transition: transform 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.service-card-3d:hover .service-icon-3d {
  transform: scale(1.1) rotate(5deg);
}

/* Card title */
.service-title-3d {
  color: #fff;
  font-size: 1.15rem;
  font-weight: var(--font-weight-bold);
  margin-bottom: 10px;
  line-height: 1.3;
}

/* Card description */
.service-desc-3d {
  color: rgba(255, 255, 255, 0.7);
  line-height: 1.55;
  text-align: center;
  font-weight: 400;
  font-size: 0.85rem;
  flex: 1;
  margin-bottom: 10px;
}

/* Card link */
.service-link-3d {
  color: var(--accent-cyan);
  text-decoration: none;
  font-weight: var(--font-weight-semibold);
  font-size: 0.82rem;
  margin-bottom: 14px;
  transition: color var(--transition-fast);
  display: inline-block;
}

.service-link-3d:hover {
  color: #fff;
}

/* Card tags */
.service-tags-3d {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  justify-content: center;
}

.service-tags-3d span {
  padding: 3px 10px;
  background: rgba(0, 212, 255, 0.1);
  color: rgba(255, 255, 255, 0.7);
  font-size: 0.7rem;
  font-weight: var(--font-weight-medium);
  border-radius: 50px;
  border: 1px solid rgba(0, 212, 255, 0.15);
}

/* Carousel controls */
.carousel-controls {
  position: absolute;
  bottom: -50px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 16px;
  z-index: 10;
}

.carousel-btn {
  width: 50px;
  height: 50px;
  background: rgba(255, 255, 255, 0.05);
  backdrop-filter: blur(10px);
  border: 2px solid rgba(255, 255, 255, 0.15);
  border-radius: 50%;
  color: #fff;
  font-size: 20px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s ease;
  padding: 0;
  line-height: 1;
}

.carousel-btn:hover {
  background: linear-gradient(135deg, var(--accent-cyan), var(--accent-blue));
  border-color: transparent;
  transform: scale(1.1);
  box-shadow: 0 10px 30px rgba(0, 212, 255, 0.4);
}

.carousel-btn:active {
  transform: scale(0.95);
}

/* Carousel indicators */
.carousel-indicators {
  position: absolute;
  bottom: -88px;
  left: 50%;
  transform: translateX(-125%);
  display: flex;
  gap: 10px;
  z-index: 10;
}

.indicator {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.15);
  cursor: pointer;
  transition: all 0.3s ease;
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.indicator.active {
  background: var(--accent-cyan);
  box-shadow: 0 0 14px rgba(0, 212, 255, 0.6);
  transform: scale(1.25);
}

.indicator:hover {
  background: rgba(0, 212, 255, 0.5);
  transform: scale(1.15);
}

/* ============================================================================
   Partner Callout Section (SavorySuite routing)
   ============================================================================ */

.partner-section {
  padding: 72px 0;
  background: var(--bg-primary);
}

.partner-callout {
  position: relative;
  padding: 2.75rem;
  border-radius: var(--radius-xl);
  border: 1px solid rgba(0, 212, 255, 0.18);
  background: linear-gradient(
    135deg,
    rgba(0, 212, 255, 0.08),
    rgba(0, 153, 255, 0.05)
  );
  box-shadow: var(--shadow-lg);
  overflow: hidden;
}

.partner-callout > * {
  position: relative;
  z-index: 2;
}

.partner-callout::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  height: 4px;
  width: 100%;
  background: linear-gradient(90deg, var(--accent-cyan), var(--accent-blue));
}

.partner-callout::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
  background-image: url("assets/images/SavorySuiteLogoNoBG.png");
  background-repeat: no-repeat;
  background-position: right 1.5rem center;
  background-size: min(420px, 46%);
  opacity: 0.1;
  pointer-events: none;
}

@media (max-width: 768px) {
  .partner-callout::after {
    background-position: center 1.25rem;
    background-size: min(340px, 70%);
    opacity: 0.08;
  }
}

.partner-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.45rem 0.9rem;
  border-radius: 999px;
  border: 1px solid rgba(0, 212, 255, 0.22);
  background: rgba(255, 255, 255, 0.6);
  color: var(--primary-dark);
  font-weight: var(--font-weight-semibold);
  font-size: 0.9rem;
  margin-bottom: 1.25rem;
}

.partner-badge i {
  color: var(--accent-blue);
  font-size: 1.1rem;
}

.partner-title {
  font-size: 2.25rem;
  font-weight: var(--font-weight-extrabold);
  letter-spacing: -0.5px;
  margin-bottom: 0.75rem;
  color: var(--gray-900);
}

.partner-desc {
  margin: 0;
  color: var(--gray-700);
  font-size: 1.05rem;
  line-height: 1.75;
  max-width: 64ch;
}

.partner-desc a {
  font-weight: var(--font-weight-bold);
  color: var(--accent-blue);
  text-decoration: none;
}

.partner-desc a:hover {
  color: var(--accent-cyan);
}

.partner-btn {
  width: 100%;
  justify-content: center;
}

.partner-note {
  margin-top: 0.75rem;
  font-size: 0.9rem;
  color: var(--gray-600);
}

@media (min-width: 992px) {
  .partner-btn {
    width: auto;
  }
}

@media (max-width: 576px) {
  .partner-callout {
    padding: 2rem;
  }
  .partner-title {
    font-size: 1.85rem;
  }
}

/* ============================================================================
   Process Section
   ============================================================================ */

.process-section {
  background: var(--bg-primary);
}

.process-timeline {
  max-width: 1000px;
  margin: 0 auto;
}

.timeline-item {
  display: flex;
  gap: 3rem;
  margin-bottom: 4rem;
  position: relative;
}

.timeline-item:nth-child(even) {
  flex-direction: row-reverse;
}

.timeline-item:not(:last-child) .timeline-connector {
  position: absolute;
  left: 50%;
  top: 100px;
  transform: translateX(-50%);
  width: 2px;
  height: calc(100% + 2rem);
  background: linear-gradient(180deg, var(--accent-cyan), transparent);
  z-index: 1;
}

.timeline-content {
  flex: 1;
  padding: 2.5rem;
  background: var(--bg-secondary);
  border: 1px solid var(--gray-200);
  border-radius: var(--radius-lg);
  position: relative;
  z-index: 2;
}

.timeline-number {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 80px;
  height: 80px;
  background: linear-gradient(135deg, var(--accent-cyan), var(--accent-blue));
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2rem;
  font-weight: var(--font-weight-extrabold);
  color: var(--primary-dark);
  box-shadow: var(--shadow-glow);
}

.timeline-item:nth-child(odd) .timeline-number {
  right: -40px;
}

.timeline-item:nth-child(even) .timeline-number {
  left: -40px;
}

.timeline-content h3 {
  font-size: 1.75rem;
  font-weight: var(--font-weight-bold);
  color: var(--gray-900);
  margin-bottom: 1rem;
}

.timeline-content p {
  color: var(--gray-600);
  line-height: 1.7;
}

/* ============================================================================
   Case Studies Section
   ============================================================================ */

.case-studies-section {
  background: var(--bg-secondary);
}

.case-study-card {
  height: 100%;
  padding: 2.5rem;
  background: var(--bg-primary);
  border: 1px solid var(--gray-200);
  border-radius: var(--radius-lg);
  transition: all var(--transition-base);
}

.case-study-card:not(.coming-soon):hover {
  transform: translateY(-8px);
  box-shadow: var(--shadow-xl);
}

.case-study-header {
  margin-bottom: 1.5rem;
}

.case-badge {
  display: inline-block;
  padding: 0.35rem 0.75rem;
  background: linear-gradient(
    135deg,
    rgba(0, 212, 255, 0.1),
    rgba(0, 153, 255, 0.1)
  );
  border: 1px solid rgba(0, 212, 255, 0.3);
  color: var(--accent-cyan);
  font-size: 0.75rem;
  font-weight: var(--font-weight-semibold);
  border-radius: 50px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 1rem;
}

.case-study-card h3 {
  font-size: 1.75rem;
  font-weight: var(--font-weight-bold);
  color: var(--gray-900);
}

.case-study-card p {
  color: var(--gray-600);
  line-height: 1.7;
  margin-bottom: 1.5rem;
}

.case-study-card p a {
  color: var(--accent-cyan);
  text-decoration: none;
  font-weight: var(--font-weight-medium);
  transition: color var(--transition-base);
}

.case-study-card p a:hover {
  color: var(--accent-blue);
}

.case-metrics {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
  margin: 2rem 0;
  padding: 2rem;
  background: var(--gray-50);
  border-radius: var(--radius-md);
}

.metric {
  text-align: center;
}

.metric-value {
  font-size: 2rem;
  font-weight: var(--font-weight-extrabold);
  background: linear-gradient(135deg, var(--accent-cyan), var(--accent-blue));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  margin-bottom: 0.5rem;
}

.metric-label {
  font-size: 0.875rem;
  color: var(--gray-600);
  font-weight: var(--font-weight-medium);
}

.tech-stack {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  justify-content: center;
}

.tech-badge {
  padding: 0.35rem 0.75rem;
  background: var(--gray-100);
  color: var(--gray-700);
  font-size: 0.8rem;
  font-weight: var(--font-weight-medium);
  border-radius: 50px;
}

/* Coming Soon Card */
.case-study-card.coming-soon {
  background: linear-gradient(
    135deg,
    rgba(0, 212, 255, 0.05),
    rgba(0, 153, 255, 0.05)
  );
  border: 2px dashed var(--accent-cyan);
  display: flex;
  align-items: center;
  justify-content: center;
}

.coming-soon-content {
  text-align: center;
}

.coming-soon-content i {
  font-size: 4rem;
  color: var(--accent-cyan);
  margin-bottom: 1.5rem;
  opacity: 0.5;
}

.coming-soon-content h3 {
  font-size: 1.75rem;
  margin-bottom: 1rem;
}

.btn-primary-sm {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.75rem 1.5rem;
  background: linear-gradient(135deg, var(--accent-cyan), var(--accent-blue));
  color: var(--primary-dark);
  font-weight: var(--font-weight-bold);
  border-radius: var(--radius-md);
  border: none;
  font-size: 0.9rem;
  text-decoration: none;
  transition: all var(--transition-base);
  margin-top: 1rem;
}

.btn-primary-sm:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-glow);
  color: var(--primary-dark);
}

/* ============================================================================
   About Section
   ============================================================================ */

.about-section {
  background: var(--bg-primary);
}

.about-image {
  position: relative;
  height: 600px;
}

.image-placeholder {
  width: 100%;
  height: 100%;
  background: linear-gradient(135deg, var(--primary-dark), var(--primary-navy));
  border-radius: var(--radius-xl);
  display: flex;
  /* align-items: center; */
  justify-content: center;
  overflow: hidden;
}

.image-placeholder i {
  font-size: 8rem;
  color: rgba(0, 212, 255, 0.2);
}

.image-decoration {
  position: absolute;
  bottom: 2rem;
  right: 2rem;
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(10px);
  padding: 1.5rem;
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-xl);
}

.deco-card {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.deco-card i {
  font-size: 2rem;
  color: var(--accent-cyan);
}

.deco-title {
  font-weight: var(--font-weight-bold);
  color: var(--gray-900);
}

.deco-subtitle {
  font-size: 0.875rem;
  color: var(--gray-600);
}

.about-content {
  padding-left: 3rem;
}

.about-content .section-label {
  margin-bottom: 1.5rem;
}

.about-content .section-title {
  margin-bottom: 2rem;
}

.about-content p {
  color: var(--gray-600);
  line-height: 1.8;
  margin-bottom: 1.5rem;
}

.about-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2rem;
  margin-top: 3rem;
}

.stat-box {
  text-align: center;
  padding: 2rem;
  background: var(--gray-50);
  border-radius: var(--radius-md);
}

.stat-number {
  font-size: 2.5rem;
  font-weight: var(--font-weight-extrabold);
  background: linear-gradient(135deg, var(--accent-cyan), var(--accent-blue));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  margin-bottom: 0.5rem;
}

.stat-label {
  font-size: 0.95rem;
  color: var(--gray-600);
  font-weight: var(--font-weight-medium);
}

/* ============================================================================
   Contact Section
   ============================================================================ */

.contact-section {
  background: var(--bg-secondary);
}

.contact-form-wrapper {
  padding: 3rem;
  background: var(--bg-primary);
  border: 1px solid var(--gray-200);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
}

.form-group {
  margin-bottom: 0;
}

.form-group label {
  display: block;
  font-weight: var(--font-weight-semibold);
  color: var(--gray-900);
  margin-bottom: 0.5rem;
  font-size: 0.95rem;
}

.form-control {
  width: 100%;
  padding: 0.875rem 1rem;
  border: 2px solid var(--gray-200);
  border-radius: var(--radius-sm);
  font-size: 1rem;
  font-family: var(--font-primary);
  transition: all var(--transition-fast);
  background: var(--bg-primary);
}

.form-control:focus {
  outline: none;
  border-color: var(--accent-cyan);
  box-shadow: 0 0 0 4px rgba(0, 212, 255, 0.1);
}

.form-control.is-invalid {
  border-color: #ef4444;
}

.invalid-feedback {
  display: none;
  color: #ef4444;
  font-size: 0.875rem;
  margin-top: 0.25rem;
}

.form-control.is-invalid ~ .invalid-feedback {
  display: block;
}

.contact-info-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2rem;
  margin-top: 4rem;
}

.contact-info-item {
  display: flex;
  align-items: flex-start;
  gap: 1rem;
  padding: 2rem;
  background: var(--bg-primary);
  border: 1px solid var(--gray-200);
  border-radius: var(--radius-md);
}

.info-icon {
  width: 50px;
  height: 50px;
  background: linear-gradient(
    135deg,
    rgba(0, 212, 255, 0.1),
    rgba(0, 153, 255, 0.1)
  );
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.info-icon i {
  font-size: 1.5rem;
  color: var(--accent-cyan);
}

.info-content h4 {
  font-size: 1rem;
  font-weight: var(--font-weight-bold);
  color: var(--gray-900);
  margin-bottom: 0.25rem;
}

.info-content a,
.info-content p {
  color: var(--gray-600);
  text-decoration: none;
  transition: color var(--transition-fast);
  margin: 0;
}

.info-content a:hover {
  color: var(--accent-cyan);
}

/* Form Messages */
.alert {
  padding: 1rem 1.5rem;
  border-radius: var(--radius-md);
  margin-top: 1rem;
}

.alert-success {
  background: #d1fae5;
  color: #065f46;
  border: 1px solid #6ee7b7;
}

.alert-danger {
  background: #fee2e2;
  color: #991b1b;
  border: 1px solid #fca5a5;
}

/* ============================================================================
   Footer
   ============================================================================ */

.footer {
  padding: 3rem 0;
  background: var(--primary-dark);
  color: var(--text-primary);
}

.footer-content {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.footer-brand {
  font-size: 1.5rem;
  font-weight: var(--font-weight-extrabold);
  background: linear-gradient(135deg, var(--text-primary), var(--accent-cyan));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  margin-bottom: 0.5rem;
}

.footer-left p {
  color: var(--text-secondary);
  margin: 0;
}

.footer-right {
  display: flex;
  gap: 2rem;
}

.footer-link {
  color: var(--text-secondary);
  text-decoration: none;
  transition: color var(--transition-fast);
}

.footer-link:hover {
  color: var(--accent-cyan);
}

/* ============================================================================
   Responsive Design
   ============================================================================ */

@media (max-width: 1199px) {
  .hero-title {
    font-size: 3.5rem;
  }

  .section-title {
    font-size: 2.5rem;
  }

  .hero-logo {
    width: 500px;
    max-width: 500px;

    transform: translateX(7%);
  }
}

@media (max-width: 991px) {
  :root {
    --section-padding: 80px;
  }

  /* Fix: prevent fixed-top navbar from covering hero content on mobile */
  .hero-section {
    padding-top: 110px;
  }

  .hero-title {
    font-size: 2.75rem;
  }

  .hero-logo {
    width: 700px;
    max-width: 700px;
    transform: translateY(-100%);
  }

  .hero-subtitle {
    font-size: 1.125rem;
  }

  .hero-visual {
    height: 400px;
    margin-top: 3rem;
  }

  .hero-logo-placeholder {
    width: 300px;
    height: 300px;
  }

  .hero-logo-placeholder i {
    font-size: 4rem;
  }

  .hero-logo-placeholder span {
    font-size: 1rem;
  }

  .section-title {
    font-size: 2.25rem;
  }

  .timeline-item,
  .timeline-item:nth-child(even) {
    flex-direction: column;
  }

  .timeline-item .timeline-number,
  .timeline-item:nth-child(even) .timeline-number {
    position: relative;
    top: auto;
    right: auto;
    left: auto;
    transform: none;
    margin-bottom: 1.5rem;
  }

  .timeline-item:not(:last-child) .timeline-connector {
    display: none;
  }

  .about-content {
    padding-left: 0;
    margin-top: 3rem;
  }

  .contact-info-grid {
    grid-template-columns: 1fr;
  }

  .footer-content {
    flex-direction: column;
    gap: 2rem;
    text-align: center;
  }
}

@media (max-width: 767px) {
  .hero-title {
    font-size: 2.25rem;
  }

  .hero-section .container[style] {
    padding-top: 88px !important;
    padding-bottom: 32px !important;
  }

  .hero-subtitle {
    font-size: 1rem;
  }

  .hero-logo {
    transform: translateY(-50%);
  }

  .hero-cta-group {
    flex-direction: column;
  }

  .btn-primary-glow,
  .btn-outline-white {
    width: 100%;
    justify-content: center;
  }

  .trust-logos {
    flex-direction: row;
    gap: 1rem;
    flex-wrap: nowrap;
  }

  .hero-logo-placeholder {
    width: 250px;
    height: 250px;
  }

  .hero-logo-placeholder i {
    font-size: 3rem;
  }

  .hero-logo-placeholder span {
    font-size: 0.9rem;
  }

  .section-title {
    font-size: 2rem;
  }

  .case-metrics {
    grid-template-columns: 1fr;
    gap: 1rem;
  }

  .about-stats {
    grid-template-columns: 1fr;
  }

  .contact-form-wrapper {
    padding: 2rem;
  }
}

@media (max-width: 700px) {
  .hero-logo {
    width: 550px;
    max-width: 90%;
    transform: translateY(-100%);
  }
}

@media (max-width: 450px) {
  .hero-logo {
    width: 550px;
    max-width: 90%;
    height: auto;
    display: block;
    transform: translateY(-155%);
  }
  .trust-logos {
    transform: translateY(-40%);
  }
}
/* ============================================================================
   Utility Classes
   ============================================================================ */

.w-100 {
  width: 100%;
}
.text-center {
  text-align: center;
}
.d-none {
  display: none;
}
.d-flex {
  display: flex;
}
.align-items-center {
  align-items: center;
}
.justify-content-center {
  justify-content: center;
}

/* ============================================================================
   Animation Fixes - Ensure all animated content is visible
   ============================================================================ */

/* 
 * AOS animations work by starting elements at opacity: 0 and transformed positions,
 * then animating them to visible state. We keep this behavior intact.
 */

/* Ensure floating cards in hero are visible (GSAP animated) */
.float-card {
  opacity: 1;
}

/* Navbar - ensure it's always visible with proper background */
.navbar {
  background: rgba(10, 14, 39, 0.95) !important;
  backdrop-filter: blur(20px);
}

.navbar.scrolled {
  background: rgba(10, 14, 39, 0.98) !important;
}

/* ============================================================================
   Tech Stack Logos Section - Badge Morph Effect
   ============================================================================ */

.tech-logos-section {
  padding: 80px 0;
  background: var(--primary-dark);
  overflow: hidden;
}

.tech-logos-wrapper {
  text-align: center;
  margin-bottom: 3rem;
}

.tech-logos-wrapper .section-label {
  margin-bottom: 1rem;
}

.tech-logos-wrapper h3 {
  color: var(--text-primary);
  font-size: 1.5rem;
  margin-bottom: 2rem;
}

/* Tech Category Rows */
.tech-category-row {
  margin-bottom: 2rem;
  text-align: center;
}

.tech-category-label {
  font-size: 0.9rem;
  font-weight: var(--font-weight-semibold);
  color: var(--accent-cyan);
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-bottom: 1rem;
  display: inline-block;
  padding-bottom: 0.5rem;
  border-bottom: 2px solid var(--accent-cyan);
}

/* Tech Stack Badge Container */
.tech-stack-large {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.75rem;
  max-width: 900px;
  margin: 0 auto;
}

/* Base Badge Styles */
.badge-large {
  background-color: rgba(0, 212, 255, 0.1);
  color: var(--accent-cyan);
  padding: 0.6rem 1.2rem;
  border-radius: 25px;
  font-size: 0.9rem;
  font-weight: var(--font-weight-medium);
  border: 1px solid rgba(0, 212, 255, 0.3);
  transition: all 0.3s ease;
  cursor: default;
  position: relative;
  overflow: hidden;
  min-width: 80px;
  text-align: center;
}

.badge-large:hover {
  background-color: var(--accent-cyan);
  color: var(--primary-dark);
  transform: translateY(-2px);
  box-shadow: 0 4px 15px rgba(0, 212, 255, 0.4);
}

/* ============================================================================
   Tech Icon Morph Effect - Hover reveals icon
   ============================================================================ */

/* When badge is morphable (has icon mapping) */
.badge-large.tech-badge-morphable {
  min-width: 100px;
  min-height: 42px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

/* Text wrapper - visible by default */
.badge-large .badge-text {
  display: inline-block;
  transition:
    opacity 0.3s ease,
    transform 0.3s ease;
}

/* Icon wrapper - hidden by default */
.badge-large .badge-icon {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  opacity: 0;
  transition:
    opacity 0.3s ease,
    transform 0.3s ease;
  display: flex;
  align-items: center;
  justify-content: center;
}

.badge-large .badge-icon i {
  font-size: 1.5rem;
  color: var(--primary-dark);
}

.badge-large .badge-icon svg {
  width: 1.5rem;
  height: 1.5rem;
}

/* Hover state - show icon, hide text */
.badge-large.tech-badge-morphable:hover .badge-text {
  opacity: 0;
  transform: scale(0.8);
}

.badge-large.tech-badge-morphable:hover .badge-icon {
  opacity: 1;
  transform: translate(-50%, -50%) scale(1.1);
}

/* Focus state for accessibility */
.badge-large.tech-badge-morphable:focus {
  outline: 2px solid var(--accent-cyan);
  outline-offset: 2px;
}

.badge-large.tech-badge-morphable:focus .badge-text {
  opacity: 0;
  transform: scale(0.8);
}

.badge-large.tech-badge-morphable:focus .badge-icon {
  opacity: 1;
  transform: translate(-50%, -50%) scale(1.1);
}

/* Responsive adjustments */
@media (max-width: 767px) {
  .tech-logos-section {
    padding: 60px 0;
  }

  .tech-category-row {
    margin-bottom: 1.5rem;
  }

  .badge-large {
    padding: 0.5rem 1rem;
    font-size: 0.8rem;
    min-width: 70px;
  }

  .badge-large.tech-badge-morphable {
    min-width: 85px;
    min-height: 38px;
  }

  .badge-large .badge-icon i {
    font-size: 1.25rem;
  }

  .badge-large .badge-icon svg {
    width: 1.25rem;
    height: 1.25rem;
  }
}

/* ================================
   Floating Theme Button - Hero De-emphasis
   (JS toggles body.hero-active while #home is in view)
================================ */
body.hero-active .theme-switcher-btn {
  opacity: 0.62;
  filter: saturate(0.85) contrast(0.95);
  transform: translateY(0);
  box-shadow: 0 0 14px rgba(0, 212, 255, 0.18);
}

/* Still allow intent (hover/focus) to “wake it up” */
body.hero-active .theme-switcher-btn:hover {
  opacity: 1;
  filter: none;
  transform: translateY(-3px);
  box-shadow: 0 0 40px rgba(0, 212, 255, 0.6);
}

body.hero-active .theme-switcher-btn:focus-visible {
  opacity: 1;
  filter: none;
  transform: translateY(-2px);
  box-shadow: 0 0 40px rgba(0, 212, 255, 0.6);
  outline: 2px solid rgba(0, 212, 255, 0.75);
  outline-offset: 3px;
}

/* Optional: keep it slightly calmer on mobile while hero is visible */
@media (max-width: 767px) {
  body.hero-active .theme-switcher-btn {
    opacity: 0.55;
    box-shadow: 0 0 12px rgba(0, 212, 255, 0.14);
  }
}

/* ================================
   Theme Switcher Floating Button
================================ */
.theme-switcher-btn {
  position: fixed;
  bottom: 28px;
  right: 28px;
  z-index: 2000;
  border: none;
  padding: 14px 18px;
  border-radius: 999px;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--primary-dark);
  background: linear-gradient(135deg, var(--accent-cyan), var(--accent-blue));
  box-shadow: 0 0 25px rgba(0, 212, 255, 0.35);
  transition: all var(--transition-base);
  cursor: pointer;
  font-size: 0.9rem;
}

.theme-switcher-btn i {
  font-size: 1.1rem;
}

.theme-switcher-btn:hover {
  transform: translateY(-3px);
  box-shadow: 0 0 40px rgba(0, 212, 255, 0.6);
}

/* When hero is visible, reduce competition with the hero CTA */
body.hero-active .theme-switcher-btn {
  opacity: 0.35;
  transform: scale(0.88);
  box-shadow: 0 0 0 rgba(0, 0, 0, 0);
  filter: saturate(0.75);
}

/* Keep hover feeling consistent even while dimmed */
body.hero-active .theme-switcher-btn:hover {
  transform: scale(0.88) translateY(-3px);
  box-shadow: 0 0 18px rgba(0, 212, 255, 0.2);
}

/* After hero scrolls away, restore full prominence */
body:not(.hero-active) .theme-switcher-btn {
  opacity: 1;
  transform: scale(1);
  filter: none;
}

/* Adjust position when back-to-top is visible */
@media (min-width: 768px) {
  .back-to-top.is-visible ~ .theme-switcher-btn {
    bottom: 80px;
  }
}

/* ================================
   Theme Panel
================================ */
.theme-panel {
  background: rgba(10, 14, 39, 0.96);
  backdrop-filter: blur(25px);
}

.theme-panel .offcanvas-header {
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.theme-panel .offcanvas-title {
  color: var(--accent-cyan);
  font-weight: 600;
  font-size: 1.25rem;
}

.theme-list {
  display: flex;
  flex-direction: column;
  gap: 14px;
  margin-top: 20px;
}

.theme-list a {
  color: white;
  text-decoration: none;
  padding: 14px 16px;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  transition: all 0.25s;
  font-weight: 500;
}

.theme-list a:hover {
  background: rgba(0, 212, 255, 0.15);
  border-color: var(--accent-cyan);
  transform: translateX(6px);
}

/* ================================
   Page Transition
================================ */
.page-transition {
  position: fixed;
  inset: 0;
  pointer-events: none;
  opacity: 0;
  z-index: 5000;
  background:
    radial-gradient(
      circle at 30% 20%,
      rgba(255, 255, 255, 0.05),
      transparent 50%
    ),
    linear-gradient(180deg, rgba(0, 0, 0, 0), rgba(0, 0, 0, 0.65));
  backdrop-filter: blur(0px);
  transition:
    opacity 0.35s ease,
    backdrop-filter 0.45s ease;
}

body.is-transitioning .page-transition {
  opacity: 1;
  backdrop-filter: blur(6px);
}

/* ============================================================================
   3D Carousel - Responsive
   ============================================================================ */

@media (max-width: 991px) {
  .services-carousel-container {
    height: 420px;
    margin: 30px auto 90px;
    perspective: 800px;
  }

  .service-card-3d {
    width: 220px;
    height: 340px;
    margin-left: -110px;
    margin-top: -170px;
    padding: 22px 18px;
  }

  .service-card-3d:nth-child(1) { transform: rotateY(0deg) translateZ(220px); }
  .service-card-3d:nth-child(2) { transform: rotateY(60deg) translateZ(220px); }
  .service-card-3d:nth-child(3) { transform: rotateY(120deg) translateZ(220px); }
  .service-card-3d:nth-child(4) { transform: rotateY(180deg) translateZ(220px); }
  .service-card-3d:nth-child(5) { transform: rotateY(240deg) translateZ(220px); }
  .service-card-3d:nth-child(6) { transform: rotateY(300deg) translateZ(220px); }

  .service-icon-3d {
    width: 48px;
    height: 48px;
    font-size: 22px;
  }

  .service-title-3d {
    font-size: 1rem;
    margin-bottom: 8px;
  }

  .service-desc-3d {
    font-size: 0.75rem;
    line-height: 1.45;
  }

  .service-number {
    font-size: 1.6rem;
    top: 12px;
    right: 12px;
  }

  .carousel-btn {
    width: 44px;
    height: 44px;
    font-size: 18px;
  }

  .carousel-controls {
    bottom: -44px;
  }

  .carousel-indicators {
    bottom: -78px;
  }
}

@media (max-width: 576px) {
  .services-carousel-container {
    height: 370px;
    perspective: 600px;
    margin: 20px auto 85px;
  }

  .service-card-3d {
    width: 185px;
    height: 300px;
    margin-left: -92px;
    margin-top: -150px;
    padding: 18px 14px;
  }

  .service-card-3d:nth-child(1) { transform: rotateY(0deg) translateZ(155px); }
  .service-card-3d:nth-child(2) { transform: rotateY(60deg) translateZ(155px); }
  .service-card-3d:nth-child(3) { transform: rotateY(120deg) translateZ(155px); }
  .service-card-3d:nth-child(4) { transform: rotateY(180deg) translateZ(155px); }
  .service-card-3d:nth-child(5) { transform: rotateY(240deg) translateZ(155px); }
  .service-card-3d:nth-child(6) { transform: rotateY(300deg) translateZ(155px); }

  .service-icon-3d {
    width: 42px;
    height: 42px;
    font-size: 20px;
    margin-bottom: 12px;
  }

  .service-title-3d {
    font-size: 0.88rem;
    margin-bottom: 6px;
  }

  .service-desc-3d {
    font-size: 0.68rem;
    line-height: 1.35;
  }

  .service-number {
    font-size: 1.3rem;
  }

  .service-link-3d {
    font-size: 0.72rem;
    margin-bottom: 10px;
  }

  .service-tags-3d span {
    font-size: 0.6rem;
    padding: 2px 7px;
  }

  .carousel-btn {
    width: 40px;
    height: 40px;
    font-size: 16px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .carousel-3d {
    transition: none;
  }
}