:root {
  /* --- Professional Fintech Palette --- */
  /* Primary & Accents */
  --primary: #2563eb;
  /* Royal Blue - Trust & Stability */
  --primary-dark: #1e40af;
  /* Deep Blue - Hover/Focus */
  --primary-light: #eff6ff;
  /* Soft Blue - Backgrounds */
  --secondary: #0f172a;
  /* Slate Black - Headings & Contrast */
  --success: #10b981;
  /* Emerald - Positive Actions */
  --warning: #f59e0b;
  /* Amber - Notices */
  --error: #ef4444;
  /* Red - Errors */

  /* Neutral Scale */
  --text-main: #1e293b;
  /* Dark Slate - Body Text */
  --text-muted: #64748b;
  /* Cool Gray - Secondary Text */
  --text-light: #94a3b8;
  /* Lighter Gray - Tertiary */

  /* Backgrounds & Surfaces */
  --background: #f8fafc;
  /* Off-white base */
  --surface: rgba(255, 255, 255, 0.85);
  /* Glassy White */
  --surface-hover: rgba(255, 255, 255, 0.95);
  --border: rgba(226, 232, 240, 0.8);

  /* Shadows & Glassmorphism */
  --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
  --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
  --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
  --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
  --glass-border: 1px solid rgba(255, 255, 255, 0.5);
  --glass-shadow: 0 8px 32px 0 rgba(31, 38, 135, 0.15);
  --backdrop-blur: blur(12px);

  /* Typography */
  --font-sans: 'Inter', system-ui, -apple-system, sans-serif;
  --font-heading: 'Outfit', 'Inter', sans-serif;

  /* Radii */
  --radius-sm: 0.375rem;
  --radius-md: 0.75rem;
  --radius-lg: 1.25rem;
  --radius-full: 9999px;

  /* Transitions */
  --transition-fast: 0.15s ease-out;
  --transition-base: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  --transition-smooth: 0.5s cubic-bezier(0.4, 0, 0.2, 1);

  --card-bg: #ffffff;
}

[data-theme="dark"] {
  --primary: #60a5fa;
  --primary-dark: #3b82f6;
  --primary-light: #1e293b;
  /* Changed from blue tint to Slate 800 for natural contrast */
  --secondary: #f8fafc;

  --text-main: #f1f5f9;
  --text-muted: #94a3b8;
  --text-light: #64748b;

  --background: #020617;
  /* Deeper black/slate base (Slate 950) */
  --surface: #0f172a;
  /* Slate 900 - Solid surface, less transparency */
  --surface-hover: #1e293b;
  /* Slate 800 */
  --border: #1e293b;
  /* Slate 800 */

  --card-bg: #0f172a;
  /* Match surface */

  --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.5);
  --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.5);
  --glass-border: 1px solid rgba(255, 255, 255, 0.05);
}

/* --- Resets & Base --- */
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  font-size: 16px;
}

body {
  font-family: var(--font-sans);
  background-color: var(--background);
  color: var(--text-main);
  line-height: 1.6;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

h1,
h2,
h3,
h4,
h5,
h6 {
  font-family: var(--font-heading);
  color: var(--secondary);
  line-height: 1.2;
  font-weight: 700;
  margin-bottom: 1rem;
}

a {
  text-decoration: none;
  color: inherit;
  transition: var(--transition-fast);
}

img {
  max-width: 100%;
  display: block;
  user-select: none;
}

ul {
  list-style: none;
}

/* --- Layout Utilities --- */
.container {
  width: 100%;
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 1.5rem;
}

section {
  padding: 6rem 0;
  position: relative;
  z-index: 1;
}

.bg-light {
  background-color: var(--primary-light);
}

/* --- Key Animations --- */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes fadeIn {
  from {
    opacity: 0;
  }

  to {
    opacity: 1;
  }
}

@keyframes float {

  0%,
  100% {
    transform: translateY(0);
  }

  50% {
    transform: translateY(-10px);
  }
}

@keyframes pulse-glow {
  0% {
    box-shadow: 0 0 0 0 rgba(37, 99, 235, 0.4);
  }

  70% {
    box-shadow: 0 0 0 15px rgba(37, 99, 235, 0);
  }

  100% {
    box-shadow: 0 0 0 0 rgba(37, 99, 235, 0);
  }
}

@keyframes morph {
  0% {
    border-radius: 60% 40% 30% 70% / 60% 30% 70% 40%;
  }

  50% {
    border-radius: 30% 60% 70% 40% / 50% 60% 30% 60%;
  }

  100% {
    border-radius: 60% 40% 30% 70% / 60% 30% 70% 40%;
  }
}

/* Utility Class for JS-triggered animations */
.animate-on-scroll {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.8s ease-out, transform 0.8s ease-out;
}

.animate-on-scroll.is-visible {
  opacity: 1;
  transform: translateY(0);
}

/* --- Buttons --- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.875rem 2rem;
  font-weight: 600;
  font-size: 1rem;
  border-radius: var(--radius-full);
  border: none;
  cursor: pointer;
  transition: var(--transition-base);
  position: relative;
  overflow: hidden;
  z-index: 1;
}

.btn::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(255, 255, 255, 0.2);
  transform: translateX(-100%) skewX(-15deg);
  transition: transform 0.4s ease;
  z-index: -1;
}

.btn:hover::after {
  transform: translateX(100%) skewX(-15deg);
}

.btn-primary {
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
  color: white;
  box-shadow: 0 4px 15px rgba(37, 99, 235, 0.3);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(37, 99, 235, 0.4);
}

.btn-outline {
  background: transparent;
  border: 2px solid var(--border);
  color: var(--secondary);
}

.btn-outline:hover {
  border-color: var(--primary);
  color: var(--primary);
  background: var(--surface);
  transform: translateY(-2px);
}

/* --- Components: Card / Glass Card --- */
.glass-card {
  background: var(--surface);
  backdrop-filter: var(--backdrop-blur);
  -webkit-backdrop-filter: var(--backdrop-blur);
  border: var(--glass-border);
  border-radius: var(--radius-lg);
  box-shadow: var(--glass-shadow);
  padding: 2rem;
  transition: var(--transition-base);
}

.glass-card:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-xl);
  background: var(--surface-hover);
  border-color: var(--primary);
}

/* --- Top Bar --- */
.top-bar {
  background: linear-gradient(90deg, #0f172a 0%, #172554 50%, #0f172a 100%);
  /* Deep Midnight Blue Gradient */
  color: rgba(255, 255, 255, 0.9);
  font-size: 0.75rem;
  padding: 0.6rem 0;
  position: relative;
  z-index: 1002;
  /* Ensure higher than navbar */
  letter-spacing: 1.5px;
  text-transform: uppercase;
  font-weight: 600;
  width: 100%;
  border-bottom: 1px solid rgba(56, 189, 248, 0.2);
  /* Cyan glow border */
  box-shadow: 0 4px 20px -5px rgba(37, 99, 235, 0.3);
  /* Subtle blue glow underneath */
}

/* Light Theme Adjustment: Make it vivid, not just "dark block" */
/* Light Theme Adjustment: Make it vivid, not just "dark block" */
/* Light Theme Adjustment: Make it vivid, not just "dark block" */
:root:not([data-theme="dark"]) .top-bar {
  background: #f8fafc;
  /* Little Gray */
  border-bottom: 1px solid rgba(0, 0, 0, 0.05);
  color: var(--text-muted);
  box-shadow: none;
  /* No pop up feel */
}

.top-bar-container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 1rem;
}

.top-left,
.top-right {
  display: flex;
  align-items: center;
  gap: clamp(1rem, 2vw, 2rem);
}

.top-bar a {
  color: inherit;
  display: flex;
  align-items: center;
  gap: 0.6rem;
  transition: all 0.3s ease;
  text-decoration: none;
  position: relative;
}

.top-bar a:hover {
  color: #38bdf8;
  /* Cyan hover */
  text-shadow: 0 0 8px rgba(56, 189, 248, 0.6);
  /* Neon glow */
  transform: translateY(-1px);
}

:root:not([data-theme="dark"]) .top-bar a:hover {
  color: var(--primary);
  text-shadow: none;
  /* Clean look for light mode */
}

:root:not([data-theme="dark"]) .top-divider {
  background-color: var(--border);
}

.top-divider {
  width: 1px;
  height: 14px;
  background-color: rgba(255, 255, 255, 0.3);
  display: inline-block;
  transform: skewX(-15deg);
}




/* --- Navbar --- */
.navbar {
  position: sticky;
  /* Changed from fixed to sticky so it sits below top bar */
  top: 0;
  left: 0;
  width: 100%;
  padding: 1rem 0;
  /* Normalized padding */
  background: rgba(255, 255, 255, 0.85);
  /* Slightly more opaque for better readability */
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  box-shadow: 0 1px 0 rgba(0, 0, 0, 0.02);
  /* Very subtle separator */
  z-index: 1000;
  transition: all 0.3s ease;
}

[data-theme="dark"] .navbar {
  border-bottom: 1px solid var(--border);
  background: rgba(2, 6, 23, 0.8);
  /* Slate 950 with blur */
}

.navbar.scrolled {
  padding: 0.85rem 0;
  /* Smooth transition size */
  background: rgba(255, 255, 255, 0.95);
  box-shadow: var(--shadow-md);
}

[data-theme="dark"] .navbar.scrolled {
  background: rgba(2, 6, 23, 0.95);
}

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

.logo {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  font-family: var(--font-heading);
  font-weight: 800;
  font-size: 1.5rem;
  color: var(--primary);
  letter-spacing: -0.02em;
}

.logo img {
  height: 60px;
  width: auto;
  border-radius: 4px;
}

.footer .logo img {
  height: 40px;
}

.nav-links {
  display: flex;
  gap: clamp(1.5rem, 3vw, 2.5rem);
  /* Responsive gap */
  align-items: center;
}

.nav-item {
  position: relative;
}

.nav-item>a {
  font-weight: 500;
  color: var(--text-main);
  font-size: 0.95rem;
  display: flex;
  align-items: center;
  gap: 6px;
  position: relative;
  padding: 0.5rem 0;
  white-space: nowrap;
}

/* Hover Underline Animation - Futuristic Gradient Line */
.nav-item>a::after {
  content: '';
  position: absolute;
  width: 100%;
  transform: scaleX(0);
  height: 2px;
  bottom: 0;
  left: 0;
  background: linear-gradient(90deg, var(--primary) 0%, #38bdf8 100%);
  /* Blue to Cyan gradient */
  box-shadow: 0 0 8px rgba(56, 189, 248, 0.5);
  /* Glow */
  transform-origin: bottom right;
  transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  border-radius: 2px;
}

.nav-item>a:hover::after {
  transform: scaleX(1);
  transform-origin: bottom left;
}

/* Specific buttons should not represent the underline */
.nav-item>a.btn::after {
  display: none;
}

.nav-item>a:hover {
  color: var(--primary);
}

/* Dropdown Menu */
.dropdown {
  position: absolute;
  top: 100%;
  left: 50%;
  transform: translateX(-50%) translateY(20px);
  background: var(--card-bg);
  min-width: 260px;
  padding: 0.5rem;
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-xl);
  opacity: 0;
  visibility: hidden;
  transition: all 0.2s ease;
  border: 1px solid var(--border);
  z-index: 1010;
}

.nav-item:hover .dropdown {
  opacity: 1;
  visibility: visible;
  transform: translateX(-50%) translateY(10px);
}

.dropdown-link {
  display: block;
  padding: 0.75rem 1rem;
  color: var(--text-main);
  font-size: 0.9rem;
  border-radius: var(--radius-sm);
  transition: 0.2s;
}

.dropdown-link:hover {
  background: var(--primary-light);
  color: var(--primary);
  transform: translateX(4px);
}

/* Mobile Toggle */
.mobile-toggle {
  display: none;
  font-size: 1.5rem;
  color: var(--text-main);
  cursor: pointer;
  width: 40px;
  height: 40px;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  transition: background 0.2s;
}

.mobile-toggle:hover {
  background: var(--primary-light);
  color: var(--primary);
}

/* --- New Header Classes --- */
.btn-signin {
  padding: 0.6rem 2rem;
  font-size: 0.95rem;
  min-width: 110px;
  background: var(--primary);
  /* Solid color instead of gradient for clarity, or just cleaner gradient */
  color: #ffffff !important;
  /* Force white text */
  box-shadow: 0 4px 10px rgba(37, 99, 235, 0.25);
  border: none;
}

.btn-signin:hover {
  background: var(--primary-dark);
  transform: translateY(-2px);
  box-shadow: 0 6px 15px rgba(37, 99, 235, 0.35);
}

/* Hide mobile header profile on desktop */
.mobile-header-profile {
  display: none !important;
}

/* Hide desktop profile item on mobile */
@media (max-width: 1024px) {
  .mobile-header-profile {
    display: flex !important;
  }

  .nav-links>.user-profile-item {
    display: none !important;
  }
}

.search-trigger {
  font-size: 1.1rem;
  color: var(--text-muted);
  padding: 0.5rem;
  transition: 0.2s;
}

.search-trigger:hover {
  color: var(--primary);
  transform: scale(1.1);
}

.theme-toggle-btn {
  width: 40px;
  height: 40px;
  padding: 0;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1rem;
  border: 1px solid var(--border);
  color: var(--secondary);
}

.mobile-theme-btn {
  display: none;
  /* Hidden on desktop */
}

@media (max-width: 1024px) {
  .mobile-theme-btn {
    display: flex;
  }
}

.theme-toggle-btn:hover {
  background: var(--primary-light);
  color: var(--primary);
  border-color: var(--primary-light);
}

[data-theme="dark"] .theme-toggle-btn:hover {
  background: rgba(255, 255, 255, 0.1);
  border-color: transparent;
}

/* --- Hero Section --- */
.hero {
  min-height: 90vh;
  /* Full viewport height feeling */
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding-top: 8rem;
  /* Account for fixed header */
  overflow: hidden;
}

.hero.hero-page {
  min-height: 40vh;
  padding-top: 8rem;
  padding-bottom: 4rem;
}

.hero-content {
  position: relative;
  z-index: 2;
  max-width: 900px;
}

.hero-title {
  font-size: 4rem;
  letter-spacing: -0.04em;
  margin-bottom: 1.5rem;
  opacity: 0;
  /* JS Animation trigger */
  animation: fadeInUp 0.8s ease-out forwards;
}

.hero-title span {
  background: linear-gradient(135deg, var(--primary) 0%, #3b82f6 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  display: inline-block;
}

.hero-description {
  font-size: 1.25rem;
  color: var(--text-muted);
  margin: 0 auto 2.5rem;
  max-width: 650px;
  opacity: 0;
  animation: fadeInUp 0.8s ease-out 0.2s forwards;
}

.cta-group {
  display: flex;
  gap: 1rem;
  justify-content: center;
  opacity: 0;
  animation: fadeInUp 0.8s ease-out 0.4s forwards;
}

.hero-stats {
  margin-top: 5rem;
  display: flex;
  justify-content: center;
  gap: 4rem;
  border-top: 1px solid var(--border);
  padding-top: 2.5rem;
  opacity: 0;
  animation: fadeInUp 0.8s ease-out 0.6s forwards;
}

.stat-item h3 {
  font-size: 2.5rem;
  color: var(--secondary);
  margin-bottom: 0;
}

.stat-item p {
  color: var(--text-muted);
  font-size: 0.9rem;
  text-transform: uppercase;
  letter-spacing: 1px;
}

/* --- Background Animation --- */
/* --- Background Animation --- */
.bg-animation {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  z-index: -1;
  overflow: hidden;
  pointer-events: none;
  background-color: var(--background);
  /* Ensure base background is set */
}

/* Lilt / Float Animation */
@keyframes lilt {

  0%,
  100% {
    transform: translate(0, 0) rotate(0deg);
  }

  25% {
    transform: translate(10px, -15px) rotate(2deg);
  }

  50% {
    transform: translate(-5px, 10px) rotate(-1deg);
  }

  75% {
    transform: translate(-15px, -5px) rotate(1deg);
  }
}

.anim-shape {
  position: absolute;
  border-radius: 50%;
  filter: blur(90px);
  /* Increased blur for softer look */
  opacity: 0.6;
  opacity: 0.5;
  animation: morph 15s infinite alternate ease-in-out, lilt 20s infinite ease-in-out;
  /* Hardware acceleration for smoothness */
  will-change: transform, border-radius;
}

.shape-1 {
  top: -10%;
  left: -5%;
  width: 60vw;
  height: 60vw;
  background: radial-gradient(circle, rgba(37, 99, 235, 0.25), transparent 70%);
  animation-duration: 25s, 30s;
}

.shape-2 {
  bottom: 0%;
  right: -10%;
  width: 50vw;
  height: 50vw;
  background: radial-gradient(circle, rgba(96, 165, 250, 0.2), transparent 70%);
  animation-delay: -5s, -2s;
  animation-duration: 20s, 25s;
}

.shape-3 {
  top: 40%;
  left: 30%;
  width: 40vw;
  height: 40vw;
  background: radial-gradient(circle, rgba(16, 185, 129, 0.15), transparent 70%);
  animation-delay: -10s, -5s;
  animation-duration: 22s, 28s;
}

/* Dark mode adjustments for shapes */
[data-theme="dark"] .anim-shape {
  opacity: 0.3;
  filter: blur(100px);
}


/* --- Section Headers --- */
.section-header {
  text-align: center;
  margin-bottom: 4rem;
}

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

.section-subtitle {
  color: var(--text-muted);
  font-size: 1.1rem;
  max-width: 600px;
  margin: 0 auto;
}

/* --- Coming Soon / Under Progress --- */
.badge-coming-soon {
  display: inline-block;
  background-color: var(--warning);
  color: #fff;
  font-size: 0.65rem;
  font-weight: 700;
  padding: 0.15rem 0.5rem;
  border-radius: var(--radius-full);
  margin-left: 0.5rem;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  vertical-align: text-top;
  box-shadow: 0 2px 5px rgba(245, 158, 11, 0.3);
}

.coming-soon-card {
  position: relative;
  overflow: hidden;
}

.coming-soon-card::after {
  content: "Coming Soon";
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(15, 23, 42, 0.7);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  color: white;
  font-size: 1.2rem;
  opacity: 0;
  transition: all 0.3s ease;
  backdrop-filter: blur(2px);
  z-index: 10;
  border-radius: var(--radius-lg);
}

.coming-soon-card:hover::after {
  opacity: 1;
}

.coming-soon-page-content {
  text-align: center;
  padding: 4rem 1rem;
  min-height: 50vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
}

.coming-soon-icon {
  font-size: 4rem;
  color: var(--warning);
  margin-bottom: 1.5rem;
  animation: float 3s ease-in-out infinite;
}



.section-subtitle {
  font-size: 1.1rem;
  color: var(--text-muted);
  max-width: 600px;
  margin: 0 auto;
}

/* --- Services Grid (Key Features) --- */
.services-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 2rem;
  margin-top: 3rem;
}

.service-card {
  background: var(--card-bg);
  border: 1px solid var(--border);
  padding: 2rem;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  transition: var(--transition-base);
  text-align: center;
}

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

.service-card i {
  font-size: 2.5rem;
  color: var(--primary);
  margin-bottom: 1.5rem;
  display: inline-block;
  background: var(--primary-light);
  width: 70px;
  height: 70px;
  line-height: 70px;
  border-radius: 50%;
  transition: 0.3s;
}

.service-card:hover i {
  background: var(--primary);
  color: white;
  transform: rotateY(180deg);
}

.service-card h3 {
  font-size: 1.25rem;
  margin-bottom: 0.75rem;
  color: var(--secondary);
}

.service-card p {
  font-size: 0.95rem;
  color: var(--text-muted);
}

/* --- Features Grid --- */
.features-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 2rem;
  perspective: 1000px;
  /* Enable 3D perspective */
}

.feature-item {
  background: var(--card-bg);
  /* Changed from var(--surface) */
  /* Removed backdrop-filter */
  border: 1px solid var(--border);
  padding: 2.5rem;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-md);
  transition: transform 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275), box-shadow 0.4s ease;
  text-align: center;
  transform-style: preserve-3d;
}

.feature-item:hover {
  transform: translateY(-10px) rotateX(2deg) rotateY(2deg);
  box-shadow: var(--shadow-xl);
  border-color: var(--primary);
}

.feature-icon {
  width: 70px;
  height: 70px;
  margin: 0 auto 1.5rem;
  background: var(--primary-light);
  color: var(--primary);
  border-radius: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.75rem;
  transition: 0.3s;
}

.feature-item:hover .feature-icon {
  background: var(--primary);
  color: white;
  transform: scale(1.1) rotate(10deg);
}

.feature-title {
  font-size: 1.25rem;
  margin-bottom: 0.75rem;
}

/* --- Services / Icon Grid --- */
.category-group {
  margin-bottom: 4rem;
}

.category-header {
  font-size: 1.5rem;
  margin-bottom: 2rem;
  padding-bottom: 0.5rem;
  border-bottom: 2px solid var(--border);
  display: inline-block;
  color: var(--primary);
}

.icon-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  /* Adaptive columns */
  gap: 1.5rem;
}

.icon-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: 2rem 1rem;
  background: var(--card-bg);
  border-radius: var(--radius-md);
  border: 1px solid var(--border);
  transition: var(--transition-base);
  box-shadow: var(--shadow-sm);
  height: 100%;
}

.icon-card:hover {
  transform: translateY(-5px);
  border-color: var(--primary);
  box-shadow: 0 10px 30px -10px rgba(37, 99, 235, 0.25);
}

.icon-circle {
  width: 50px;
  height: 50px;
  margin-bottom: 1rem;
  color: var(--primary);
  background: var(--primary-light);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.25rem;
  transition: 0.3s;
}

.icon-card:hover .icon-circle {
  background: var(--primary);
  color: white;
  transform: scale(1.1);
}

.icon-card span {
  font-weight: 600;
  color: var(--secondary);
  font-size: 0.95rem;
}

/* --- Timeline --- */
.timeline {
  position: relative;
  max-width: 1000px;
  margin: 0 auto;
}

.timeline::before {
  content: '';
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  width: 2px;
  height: 100%;
  background: var(--border);
  z-index: 0;
}

.timeline-step {
  display: flex;
  justify-content: center;
  margin-bottom: 4rem;
  position: relative;
  z-index: 1;
}

.step-content {
  width: 45%;
  background: var(--card-bg);
  padding: 2rem;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-md);
  border: 1px solid var(--border);
  position: relative;
  transition: var(--transition-base);
}

.step-content:hover {
  box-shadow: var(--shadow-lg);
  border-color: var(--primary);
}

.step-number {
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  width: 70px;
  /* Increased from 50px */
  height: 70px;
  background: linear-gradient(135deg, var(--primary) 0%, #38bdf8 100%);
  /* Premium Gradient */
  color: white;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 2rem;
  /* Increased from 1.5rem */
  box-shadow: 0 0 0 8px var(--background), 0 10px 20px -5px rgba(37, 99, 235, 0.4);
  /* Depth + Contrast Ring */
  z-index: 2;
}

.step-left {
  justify-content: flex-start;
}

.step-right {
  justify-content: flex-end;
}

.step-left .step-content {
  margin-left: auto;
  margin-right: 55%;
}

.step-right .step-content {
  margin-right: auto;
  margin-left: 55%;
}

/* --- FAQ Accordion --- */
.accordion {
  max-width: 800px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.accordion-item {
  background: var(--card-bg);
  border-radius: var(--radius-md);
  border: 1px solid var(--border);
  overflow: hidden;
  transition: all 0.3s;
}

.accordion-item.active {
  border-color: var(--primary);
  box-shadow: var(--shadow-md);
}

.accordion-header {
  width: 100%;
  padding: 1.25rem 1.5rem;
  background: none;
  border: none;
  text-align: left;
  font-weight: 600;
  font-size: 1.05rem;
  color: var(--secondary);
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
  transition: 0.2s;
}

.accordion-header:hover {
  background: var(--primary-light);
  color: var(--primary);
}

.accordion-icon {
  transition: transform 0.3s;
  color: var(--text-muted);
}

.accordion-item.active .accordion-icon {
  transform: rotate(180deg);
  color: var(--primary);
}

.accordion-body {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.3s cubic-bezier(0, 1, 0, 1);
  padding: 0 1.5rem;
  color: var(--text-muted);
  line-height: 1.7;
}

.accordion-item.active .accordion-body {
  padding-bottom: 1.5rem;
  max-height: 200px;
  /* Adjust based on content approximation */
}

/* --- Footer --- */
.footer {
  background: var(--secondary);
  color: white;
  padding: 5rem 0 2rem;
  margin-top: auto;
}

[data-theme="dark"] .footer {
  background: #020617;
  /* Very dark slate for footer in dark mode */
  border-top: 1px solid var(--border);
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.5fr 1fr 1fr 1fr;
  gap: 3rem;
  margin-bottom: 4rem;
}

.footer-brand p {
  color: var(--text-muted);
  /* Will be lighter on dark bg */
  margin-top: 1rem;
  opacity: 0.8;
}

.footer-col h4 {
  color: white;
  margin-bottom: 1.5rem;
  font-size: 1.1rem;
}

.footer-links li {
  margin-bottom: 0.75rem;
}

.footer-links a {
  color: var(--text-muted);
  opacity: 0.8;
  transition: 0.2s;
}

.footer-links a:hover {
  color: white;
  opacity: 1;
  padding-left: 5px;
}

.copyright {
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  padding-top: 2rem;
  text-align: center;
  color: var(--text-muted);
  font-size: 0.85rem;
  opacity: 0.8;
  line-height: 1.8;
  letter-spacing: 0.5px;
  font-weight: 500;
}

/* --- Responsive Design --- */
@media (max-width: 1024px) {
  .hero-title {
    font-size: 3rem;
  }

  .footer-grid {
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width: 1024px) {
  .navbar {
    padding: 0.75rem 0;
  }

  .mobile-toggle {
    display: flex;
  }

  .nav-links {
    position: absolute;
    top: 100%;
    left: 0;
    width: 100%;
    background: rgba(255, 255, 255, 0.98);
    /* Less transparent for readability */
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
    flex-direction: column;
    padding: 1.5rem;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15);
    border-bottom: 1px solid var(--border);
    clip-path: circle(0% at 100% 0);
    transition: clip-path 0.5s ease-in-out;
    gap: 1rem;
    z-index: 1001;
    max-height: 80vh;
    /* Allow scrolling if menu is tall */
    overflow-y: auto;
    /* Enable vertical scroll */
  }

  [data-theme="dark"] .nav-links {
    background: rgba(2, 6, 23, 0.98);
    border-bottom: 1px solid var(--border);
  }

  .nav-links.active {
    clip-path: circle(150% at 100% 0);
  }

  .nav-item {
    width: 100%;
  }

  /* Refined dropdown for mobile */
  .nav-item .dropdown {
    display: none;
    position: static;
    visibility: visible;
    opacity: 1;
    transform: none;
    box-shadow: none;
    border: none;
    border-left: 2px solid var(--border);
    /* Visual indicator of hierarchy */
    padding-left: 1rem;
    margin: 0.5rem 0 0.5rem 0.5rem;
    background: transparent;
    width: calc(100% - 0.5rem);
  }

  .nav-item.active .dropdown {
    display: block;
    animation: fadeIn 0.3s ease;
  }

  .menu-active-bg {
    /* Helper class if we want to carry active state visually */
    background: var(--primary-light);
    color: var(--primary);
  }

  .nav-item:hover .dropdown {
    display: block;
    transform: none;
  }

  .top-bar {
    padding: 0.8rem 0;
  }

  .top-bar-container {
    justify-content: center;
  }

  .top-left,
  .top-right {
    gap: 1.5rem;
  }

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

  .hero-stats {
    flex-direction: column;
    gap: 2rem;
    align-items: center;
  }

  /* Reduce theme toggle size on mobile */
  .theme-toggle-btn {
    width: 30px;
    height: 30px;
    font-size: 0.85rem;
  }
}

@media (max-width: 768px) {

  /* Global adjustments */
  section {
    padding: 3rem 0;
  }

  .container {
    padding: 0 1.5rem;
    /* Increased from 1rem for better breathing room */
  }

  .top-bar {
    display: none;
  }

  .form-grid {
    grid-template-columns: 1fr;
  }

  /* Hero Adjustments */
  .hero.hero-page {
    padding-top: 6rem;
    padding-bottom: 2rem;
    min-height: 30vh;
  }

  .hero-title {
    font-size: 2.5rem;
    /* Slightly larger for impact, but controlled */
    line-height: 1.2;
  }

  .hero-description {
    font-size: 1.1rem;
    padding: 0 1rem;
    /* Prevent text touching edges visually */
  }

  .cta-group {
    flex-direction: column;
    width: 100%;
    max-width: 300px;
    /* Constrain width */
    margin: 0 auto;
    gap: 1rem;
  }

  .cta-group .btn {
    width: 100%;
    /* Full width buttons for easier tapping */
    justify-content: center;
  }

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

  .hero-stats {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1rem;
    margin-top: 2.5rem;
    padding-top: 1.5rem;
  }

  .stat-item h3 {
    font-size: 2rem;
  }

  .hero-stats {
    display: grid;
    /* 2x2 grid is often better than 1x3 or 3x1 on mobile for balance */
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
    margin-top: 3rem;
    padding-top: 2rem;
  }

  /* Make the last odd item span both columns if 3 items */
  .hero-stats .stat-item:last-child:nth-child(odd) {
    grid-column: span 2;
  }

  /* Timeline Adjustments */
  .timeline::before {
    left: 20px;
  }

  .timeline-step {
    flex-direction: column;
    align-items: flex-start;
    padding-left: 50px;
    margin-bottom: 2.5rem;
  }

  .step-number {
    left: 20px;
    transform: translateX(-50%);
  }

  .step-content {
    width: 100% !important;
    margin: 0 !important;
    text-align: left !important;
  }

  /* Grid Adjustments */
  .services-grid,
  .features-grid {
    grid-template-columns: 1fr !important;
    gap: 1.5rem;
    /* Increased gap */
  }

  /* Two columns for icons is often "professional" and space-efficient */
  .icon-grid {
    grid-template-columns: repeat(2, 1fr) !important;
    gap: 1rem;
  }

  .footer-grid {
    grid-template-columns: 1fr;
    text-align: center;
    gap: 2rem;
  }

  .footer-brand {
    display: flex;
    flex-direction: column;
    align-items: center;
  }

  .footer-links a {
    display: inline-block;
    padding: 0.5rem;
  }

  /* Mobile Dropdown Interaction */
  .nav-item .dropdown {
    display: none;
    position: static;
    visibility: visible;
    opacity: 1;
    transform: none;
    box-shadow: none;
    border: none;
    padding-left: 1rem;
    margin-top: 0.5rem;
    background: rgba(0, 0, 0, 0.02);
    width: 100%;
  }

  .nav-item.active .dropdown {
    display: block;
    animation: fadeIn 0.3s ease;
  }

  /* Ensure Sign In button is visible and nice */
  .btn-signin {
    width: 100%;
    margin-top: 0.5rem;
    text-align: center;
    justify-content: center;
  }

  /* Network Section */
  .network-features {
    grid-template-columns: 1fr;
  }

  /* Wizard / Progress */
  .wizard-progress {
    overflow-x: auto;
    justify-content: flex-start;
    padding-bottom: 1rem;
  }

  .progress-step {
    min-width: 70px;
  }

  .progress-step span {
    font-size: 0.75rem;
    display: none;
    /* Hide text on very small screens if needed, or keep */
  }
}

/* --- Dynamic Components (Injected via JS) --- */

/* Floating Back Button */
/* Floating Back Button removed */

/* Required Documents Section */
.docs-section {
  padding: 6rem 0;
  background: linear-gradient(to bottom, var(--background), var(--background));
  position: relative;
}

.docs-intro {
  text-align: center;
  margin-bottom: 3rem;
}

.docs-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 1.5rem;
  max-width: 1000px;
  margin: 0 auto;
}

.doc-card {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 2rem 1.5rem;
  text-align: center;
  transition: var(--transition-base);
  box-shadow: var(--shadow-sm);
  display: flex;
  flex-direction: column;
  align-items: center;
  height: 100%;
}

.doc-card:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-md);
  border-color: var(--primary);
}

.doc-icon {
  font-size: 2rem;
  color: var(--primary);
  margin-bottom: 1rem;
  background: var(--primary-light);
  width: 60px;
  height: 60px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.75rem;
  transition: 0.3s;
}

.doc-card:hover .doc-icon {
  transform: scale(1.1) rotate(10deg);
  background: var(--primary);
  color: white;
}

.doc-name {
  font-weight: 600;
  color: var(--secondary);
  line-height: 1.4;
}

/* Staggered Animation Delays */
.animate-on-scroll:nth-child(1) {
  transition-delay: 0.1s;
}

.animate-on-scroll:nth-child(2) {
  transition-delay: 0.2s;
}

.animate-on-scroll:nth-child(3) {
  transition-delay: 0.3s;
}

.animate-on-scroll:nth-child(4) {
  transition-delay: 0.4s;
}

.animate-on-scroll:nth-child(5) {
  transition-delay: 0.5s;
}

.animate-on-scroll:nth-child(6) {
  transition-delay: 0.6s;
}

/* Scroll To Top */
.scroll-top {
  position: fixed;
  bottom: 7.5rem;
  right: 2rem;
  width: 50px;
  height: 50px;
  background: var(--primary);
  color: white;
  border-radius: 50%;
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.25rem;
  box-shadow: var(--shadow-lg);
  opacity: 0;
  visibility: hidden;
  transform: translateY(20px);
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  z-index: 999;
}

.scroll-top.show {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.scroll-top:hover {
  background: var(--primary-dark);
  transform: translateY(-5px);
}

/* --- Fast Processing Highlight --- */
.processing-highlight {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1.5rem;
  background: var(--surface);
  backdrop-filter: blur(10px);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 2rem 3rem;
  margin: 4rem auto 0;
  max-width: 800px;
  box-shadow: var(--shadow-lg);
  text-align: left;
  position: relative;
  /* overflow: hidden; Removed to prevent clipping issues */
  transition: var(--transition-base);
}

/* Hover effect removed to stop "pop up" */
.processing-highlight:hover {
  box-shadow: var(--shadow-xl);
}

/* Blue line removed */


.processing-highlight i {
  color: var(--primary);
  font-size: 2.5rem;
  background: var(--primary-light);
  width: 70px;
  height: 70px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  flex-shrink: 0;
}

.processing-highlight div {
  font-size: 1.1rem;
  font-weight: 500;
  color: var(--secondary);
}

.processing-highlight div:first-child {
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--primary);
  margin-bottom: 0.25rem;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

/* --- Our Lending Network Section --- */
.network-section {
  padding: 6rem 0;
  background: linear-gradient(to bottom, var(--background), var(--primary-light));
  position: relative;
  overflow: hidden;
}

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

.network-description {
  max-width: 700px;
  margin: 0 auto 3rem;
  text-align: center;
  color: var(--text-muted);
  font-size: 1.1rem;
  line-height: 1.8;
}

.network-features {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 2rem;
  margin-bottom: 4rem;
}

.network-feature-card {
  background: var(--card-bg);
  padding: 2.5rem;
  border-radius: var(--radius-lg);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-md);
  text-align: center;
  transition: var(--transition-base);
}

.network-feature-card:hover {
  transform: translateY(-10px);
  box-shadow: var(--shadow-xl);
  border-color: var(--primary);
}

.network-feature-icon {
  width: 80px;
  height: 80px;
  background: var(--primary-light);
  color: var(--primary);
  font-size: 2rem;
  border-radius: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 1.5rem;
  transition: 0.3s;
}

.network-feature-card:hover .network-feature-icon {
  background: var(--primary);
  color: white;
  transform: rotate(10deg) scale(1.1);
}

.network-feature-text {
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--secondary);
}

/* Quote Container */
.quote-container {
  display: flex;
  justify-content: center;
  margin-top: 2rem;
}

.quote-box {
  background: var(--card-bg);
  padding: 2rem 4rem;
  border-radius: 50px;
  position: relative;
  box-shadow: var(--shadow-lg);
  border: 1px solid var(--primary-light);
  display: inline-block;
}

.quote-icon {
  position: absolute;
  top: -20px;
  left: 20px;
  font-size: 4rem;
  color: var(--primary);
  opacity: 0.2;
  font-family: serif;
  line-height: 1;
}

.quote-text {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--primary-dark);
  font-family: var(--font-heading);
  letter-spacing: -0.02em;
  margin: 0;
  position: relative;
  z-index: 1;
}

/* Responsive Adjustments */
@media (max-width: 768px) {
  .processing-highlight {
    flex-direction: column;
    text-align: center;
    padding: 2rem;
    gap: 1rem;
  }

  .processing-highlight::before {
    width: 100%;
    height: 5px;
    top: 0;
    left: 0;
  }

  .quote-box {
    padding: 1.5rem 2rem;
    border-radius: var(--radius-md);
  }

  .quote-text {
    font-size: 1.1rem;
  }

  .network-features {
    grid-template-columns: 1fr;
  }
}

/* --- Apply Now & Upload Section --- */
.apply-section {
  padding: 4rem 0;
  background: var(--background);
}

.apply-container {
  max-width: 900px;
  margin: 0 auto;
  background: var(--card-bg);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-xl);
  padding: 3rem;
  border: 1px solid var(--border);
}

@media (max-width: 768px) {
  .apply-container {
    padding: 1.5rem;
  }
}

[data-theme="dark"] .apply-container {
  background: var(--surface);
  border: 1px solid rgba(255, 255, 255, 0.05);
}

.form-title {
  font-size: 1.25rem;
  color: var(--primary);
  margin-bottom: 1.5rem;
  padding-bottom: 0.5rem;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.form-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 1.5rem;
  margin-bottom: 3rem;
}

.form-group label {
  display: block;
  font-size: 0.9rem;
  font-weight: 500;
  margin-bottom: 0.5rem;
  color: var(--text-main);
}

.form-group input,
.form-group textarea,
.form-group select {
  width: 100%;
  padding: 0.75rem 1rem;
  border-radius: var(--radius-md);
  border: 1px solid var(--border);
  background: var(--background);
  color: var(--text-main);
  transition: all 0.2s;
  font-family: var(--font-sans);
  font-size: 1rem;
  /* Ensure consistent font size */
}

.form-group textarea {
  min-height: 100px;
  resize: vertical;
}

.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

.upload-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 1.5rem;
  margin-top: 1.5rem;
}

.upload-item {
  background: var(--background);
  padding: 1.5rem;
  border-radius: var(--radius-md);
  border: 1px dashed var(--border);
  transition: all 0.2s;
}

.upload-item:hover {
  border-color: var(--primary);
  background: var(--primary-light);
}

[data-theme="dark"] .upload-item:hover {
  background: rgba(37, 99, 235, 0.1);
}

.upload-item label {
  display: block;
  font-size: 0.95rem;
  font-weight: 600;
  margin-bottom: 0.75rem;
  color: var(--text-main);
}

.upload-item input[type="file"] {
  font-size: 0.85rem;
  color: var(--text-muted);
}

.required {
  color: var(--error);
}

.form-note {
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-top: -1rem;
  margin-bottom: 1.5rem;
}

/* --- Process Steps Section --- */
.process-section {
  padding: 6rem 0;
  background: var(--surface);
  border-top: 1px solid var(--border);
}

.process-steps {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2rem;
  position: relative;
}

.step-card {
  background: var(--card-bg);
  padding: 2.5rem;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  text-align: center;
  transition: transform 0.3s;
  position: relative;
  border: 1px solid var(--border);
  z-index: 2;
}

.step-card:hover {
  transform: translateY(-10px);
  border-color: var(--primary-light);
}

.step-number {
  font-size: 4rem;
  font-weight: 900;
  color: var(--primary);
  /* Fallback */
  color: transparent;
  -webkit-text-stroke: 2px var(--primary-light);
  opacity: 0.3;
  position: absolute;
  top: 1rem;
  right: 1.5rem;
  z-index: -1;
  font-family: var(--font-heading);
}

/* Make steps responsive */
@media (max-width: 900px) {
  .process-steps {
    grid-template-columns: 1fr;
    gap: 3rem;
  }

  .step-number {
    font-size: 3rem;
    top: 0.5rem;
    right: 1rem;
  }
}

/* Wizard Styles */
.wizard-progress {
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 3rem;
  position: relative;
  max-width: 600px;
  margin-left: auto;
  margin-right: auto;
}

.progress-step {
  display: flex;
  flex-direction: column;
  align-items: center;
  position: relative;
  z-index: 2;
  min-width: 80px;
}

.step-icon {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background-color: var(--light-color);
  border: 2px solid var(--border-color);
  color: var(--text-color);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  margin-bottom: 0.5rem;
  transition: all 0.3s ease;
}

.progress-step span {
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--text-muted);
}

/* Active State */
.progress-step.active .step-icon {
  background-color: var(--primary);
  border-color: var(--primary);
  color: #fff;
  box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.2);
}

.progress-step.active span {
  color: var(--primary);
  font-weight: 700;
}

/* Completed State */
.progress-step.completed .step-icon {
  background-color: var(--success, #22c55e);
  border-color: var(--success, #22c55e);
  color: #fff;
  /* content: "\f00c"; we use text content logic or just style */
}

.progress-step.completed span {
  color: var(--success, #22c55e);
}

.progress-bar-line {
  flex-grow: 1;
  height: 3px;
  background-color: var(--border);
  margin: 0 -10px 25px -10px;
  z-index: 1;
}

/* Wizard Step / Form Actions */
.wizard-step {
  display: none;
}

.wizard-step.active {
  display: block;
  animation: fadeIn 0.5s ease-out;
}

.form-actions {
  display: flex;
  margin-top: 2rem;
  gap: 1rem;
}

.form-actions.right {
  justify-content: flex-end;
}

.form-actions.space-between {
  justify-content: space-between;
}

.btn-prev {
  background-color: var(--surface);
  color: var(--secondary);
  border: 1px solid var(--border);
}

.btn-prev:hover {
  background-color: var(--border);
}

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(10px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* File Upload Beautify */
.upload-item input[type="file"] {
  background: var(--surface);
  padding: 12px;
  border: 1px dashed var(--border);
  border-radius: var(--radius-md);
  width: 100%;
  cursor: pointer;
  transition: border-color 0.3s;
  color: var(--text-muted);
}

.upload-item input[type="file"]:hover {
  border-color: var(--primary);
}

/* --- Login Page Styles --- */
.login-section {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 85vh;
  /* Ideally fits in view */
  padding: 4rem 1rem;
  /* Add subtle float animation compatibility if needed */
}

.login-card {
  max-width: 420px;
  width: 100%;
  margin: 0 auto;
  padding: 3rem;
  background: rgba(255, 255, 255, 0.7);
  /* More transparent for glass effect */
  backdrop-filter: blur(15px);
  /* Stronger blur */
  -webkit-backdrop-filter: blur(15px);
  border: 1px solid rgba(255, 255, 255, 0.4);
  box-shadow: 0 8px 32px rgba(31, 38, 135, 0.1);
  /* Soft deep shadow */
  border-radius: 24px;
  /* More rounded */
  animation: fadeInUp 0.8s ease-out;
  /* Enter animation */
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.login-card:hover {
  box-shadow: 0 12px 40px rgba(31, 38, 135, 0.15);
  border-color: rgba(255, 255, 255, 0.6);
}

[data-theme="dark"] .login-card {
  background: rgba(15, 23, 42, 0.6);
  border-color: rgba(255, 255, 255, 0.05);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4);
}

.login-header {
  text-align: center;
  margin-bottom: 2.5rem;
}

.login-header h2 {
  font-size: 2.2rem;
  font-weight: 700;
  color: var(--secondary);
  margin-bottom: 0.75rem;
  background: linear-gradient(135deg, var(--secondary) 0%, var(--primary) 100%);
  background-clip: text;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

[data-theme="dark"] .login-header h2 {
  background: linear-gradient(135deg, #fff 0%, var(--primary-light) 100%);
  background-clip: text;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.login-header p {
  color: var(--text-muted);
  font-size: 0.95rem;
  line-height: 1.5;
}

.login-form .form-group {
  margin-bottom: 1.5rem;
}

.form-label {
  display: block;
  margin-bottom: 0.6rem;
  font-weight: 600;
  color: var(--secondary);
  font-size: 0.9rem;
  padding-left: 0.2rem;
}

.input-wrapper {
  position: relative;
  display: flex;
  align-items: center;
}

.form-input {
  width: 100%;
  padding: 1rem;
  /* Standard padding without icon */
  border: 2px solid transparent;
  background: rgba(255, 255, 255, 0.5);
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.02);
  border-radius: var(--radius-md);
  color: var(--text-main);
  font-size: 1rem;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  height: 54px;
  /* Fix height for consistency */
}

/* Light border when not focused */
.form-input:not(:focus) {
  border: 1px solid var(--border);
}

[data-theme="dark"] .form-input {
  background: rgba(255, 255, 255, 0.05);
  border-color: rgba(255, 255, 255, 0.1);
}

.toggle-password {
  position: absolute;
  right: 1rem;
  top: 50%;
  transform: translateY(-50%);
  cursor: pointer;
  color: var(--text-muted);
  transition: color 0.2s;
  z-index: 10;
}

.toggle-password:hover {
  color: var(--primary);
}

.input-wrapper input {
  padding-right: 2.5rem;
}

.form-input:focus {
  outline: none;
  background: rgba(255, 255, 255, 0.95);
  border-color: var(--primary);
  box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.25), 0 0 20px rgba(37, 99, 235, 0.15);
  transform: translateY(-1px);
}

[data-theme="dark"] .form-input:focus {
  background: rgba(15, 23, 42, 0.8);
  /* Keep it dark but slightly lighter than base */
  border-color: var(--primary);
  color: #fff;
}

.form-input::placeholder {
  color: var(--text-light);
  opacity: 0.7;
}

.forgot-wrapper {
  display: flex;
  justify-content: flex-end;
  margin-top: 0.75rem;
}

.forgot-link {
  font-size: 0.85rem;
  color: var(--text-muted);
  font-weight: 500;
  transition: color 0.2s;
}

.forgot-link:hover {
  color: var(--primary);
  text-decoration: none;
}

.btn-block {
  width: 100%;
  justify-content: center;
  padding: 1rem;
  font-size: 1.05rem;
  letter-spacing: 0.5px;
  margin-top: 0.5rem;
}

.divider {
  display: flex;
  align-items: center;
  text-align: center;
  margin: 2rem 0;
  color: var(--text-light);
  font-size: 0.85rem;
  position: relative;
}

.divider::before,
.divider::after {
  content: '';
  flex: 1;
  border-bottom: 1px solid var(--border);
  opacity: 0.6;
}

.divider span {
  padding: 0 1rem;
  font-weight: 500;
  text-transform: uppercase;
  font-size: 0.75rem;
  letter-spacing: 1px;
  color: var(--text-muted);
}

.btn-google {
  background: white;
  color: var(--secondary);
  border: 1px solid var(--border);
  width: 100%;
  justify-content: center;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  font-weight: 600;
  position: relative;
  overflow: hidden;
}

[data-theme="dark"] .btn-google {
  background: rgba(255, 255, 255, 0.05);
  color: white;
  border-color: rgba(255, 255, 255, 0.1);
}

.btn-google:hover {
  background: #fff;
  border-color: #cbd5e1;
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
}

[data-theme="dark"] .btn-google:hover {
  background: rgba(255, 255, 255, 0.1);
  border-color: rgba(255, 255, 255, 0.2);
}

.btn-google i {
  font-size: 1.1rem;
  margin-right: 0.5rem;
  /* Google colors via gradient or just simple brand color if icon is colored */
}

/* Specific Google Icon Color if generic icon used, or standard brand color */
.btn-google .fa-google {
  background: linear-gradient(45deg, #4285F4, #EA4335, #FBBC05, #34A853);
  background-clip: text;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.login-footer {
  text-align: center;
  margin-top: 2.5rem;
  font-size: 0.95rem;
  color: var(--text-muted);
  padding-top: 1.5rem;
  border-top: 1px solid var(--border);
}

.login-footer a {
  color: var(--primary);
  font-weight: 600;
  position: relative;
  display: inline-block;
}

.login-footer a::after {
  content: '';
  position: absolute;
  width: 100%;
  transform: scaleX(0);
  height: 1.5px;
  bottom: 0;
  left: 0;
  background-color: var(--primary);
  transform-origin: bottom right;
  transition: transform 0.25s ease-out;
}

.login-footer a:hover::after {
  transform: scaleX(1);
  transform-origin: bottom left;
}

.login-footer a:hover {
  text-decoration: none;
}

/* --- Form Enhancements & Selection Cards --- */
.form-select {
  width: 100%;
  padding: 0.875rem 1rem;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  background-color: var(--card-bg);
  color: var(--text-main);
  font-size: 1rem;
  font-family: var(--font-sans);
  transition: var(--transition-base);
  appearance: none;
  background-image: url('data:image/svg+xml,%3Csvg xmlns=\'http://www.w3.org/2000/svg\' fill=\'none\' viewBox=\'0 0 24 24\' stroke=\'%2364748b\'%3E%3Cpath stroke-linecap=\'round\' stroke-linejoin=\'round\' stroke-width=\'2\' d=\'M19 9l-7 7-7-7\'%3E%3C/path%3E%3C/svg%3E');
  background-repeat: no-repeat;
  background-position: right 1rem center;
  background-size: 1.25rem;
  cursor: pointer;
}

.form-select:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 4px var(--primary-light);
}

.selection-group,
.selection-grid-3 {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(100px, 1fr));
  gap: 1rem;
  margin-top: 0.5rem;
}

/* Hide actual radio buttons */
.selection-group input[type=\'radio\'] {
  display: none;
}

.selection-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 1.25rem 1rem;
  /* Reduced padding */
  background: var(--card-bg);
  border: 2px solid var(--border);
  border-radius: var(--radius-md);
  /* Slightly smaller radius for tighter look */
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
  overflow: hidden;
  height: 100%;
  /* Ensure equal height */
}

.selection-card:hover {
  border-color: var(--primary);
  background: var(--surface-hover);
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

.selection-icon {
  font-size: 2.5rem;
  color: var(--text-muted);
  margin-bottom: 1rem;
  transition: 0.3s;
}

.selection-title {
  font-weight: 600;
  font-size: 1.1rem;
  color: var(--secondary);
}

/* Checked State */
.selection-group input[type=\'radio\']:checked+.selection-card {
  border-color: var(--primary);
  background: var(--primary-light);
  box-shadow: var(--shadow-md);
}

.selection-group input[type=\'radio\']:checked+.selection-card .selection-icon {
  color: var(--primary);
  transform: scale(1.1);
}

.selection-group input[type=\'radio\']:checked+.selection-card .selection-title {
  color: var(--primary-dark);
}

/* Checkmark badge for selected state */
.selection-card::after {
  content: '\f058';
  /* FontAwesome check-circle */
  font-family: \'Font Awesome 6 Free\';
  font-weight: 900;
  position: absolute;
  top: 10px;
  right: 10px;
  font-size: 1.25rem;
  color: var(--primary);
  opacity: 0;
  transform: scale(0);
  transition: 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.selection-group input[type=\'radio\']:checked+.selection-card::after {
  opacity: 1;
  transform: scale(1);
}

/* --- Data Form Grid Layout --- */
/* Conflict removed - relying on auto-fit definition above */

.full-width {
  grid-column: 1 / -1;
}

@media (max-width: 768px) {
  .form-grid {
    grid-template-columns: 1fr;
  }

  .hero.hero-page {
    padding-top: 6rem;
    padding-bottom: 2rem;
    min-height: 30vh;
  }
}

/* --- Blog Page Styles --- */
.blog-hero {
  background: linear-gradient(135deg, rgba(37, 99, 235, 0.1) 0%, rgba(59, 130, 246, 0.05) 100%);
  position: relative;
  overflow: hidden;
}

.blog-section {
  padding: 4rem 0 8rem;
  position: relative;
}

.blog-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 2.5rem;
}

.blog-card {
  height: 100%;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  transition: var(--transition-base);
  background: var(--card-bg);
  /* Ensure card bg is set */
}

/* Specific adjustment for glass cards in blog to look cohesive */
.blog-card.glass-card {
  border: 1px solid var(--border);
  box-shadow: var(--shadow-md);
}

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

.blog-image {
  height: 240px;
  width: 100%;
  position: relative;
  overflow: hidden;
}

.blog-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

.blog-card:hover .blog-image img {
  transform: scale(1.1);
}

.blog-date {
  position: absolute;
  top: 1rem;
  right: 1rem;
  /* Move to right for better composition */
  background: rgba(255, 255, 255, 0.95);
  padding: 0.35rem 0.85rem;
  border-radius: var(--radius-full);
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--primary);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}

[data-theme="dark"] .blog-date {
  background: rgba(15, 23, 42, 0.9);
  color: var(--primary-light);
}

.blog-content {
  padding: 2rem;
  display: flex;
  flex-direction: column;
  flex-grow: 1;
}

.blog-category {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 1.2px;
  color: var(--primary);
  font-weight: 700;
  margin-bottom: 0.75rem;
}

.blog-title {
  font-size: 1.35rem;
  color: var(--secondary);
  margin-bottom: 1rem;
  line-height: 1.3;
  font-weight: 700;
  transition: color 0.2s;
}

.blog-card:hover .blog-title {
  color: var(--primary);
}

.blog-excerpt {
  color: var(--text-muted);
  font-size: 0.95rem;
  line-height: 1.6;
  margin-bottom: 2rem;
  flex-grow: 1;
  /* Push read more to bottom */
}

.read-more {
  color: var(--secondary);
  font-weight: 600;
  font-size: 0.95rem;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  margin-top: auto;
  /* Align to bottom */
  transition: var(--transition-fast);
}

.read-more:hover {
  color: var(--primary);
  gap: 0.75rem;
}

.company-details {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 1.5rem;
  /* Spacious gap for professional look */
  margin-top: 1rem;
  font-weight: 500;
  opacity: 0.9;
}

.company-details .separator {
  color: var(--primary);
  opacity: 0.5;
  font-size: 0.8em;
}

@media (min-width: 768px) {
  .copyright br.mobile-break {
    display: none;
  }
}

@media (max-width: 768px) {
  .company-details {
    flex-direction: column;
    gap: 0.5rem;
  }

  .company-details .separator {
    display: none;
  }
}

/* --- Mobile Comfort Improvements (Large Icons) --- */
@media (max-width: 768px) {

  /* 1. Services / Product Icons - Adjusted to be smaller per user request */
  .icon-circle {
    width: 50px;
    height: 50px;
    font-size: 1.25rem;
    margin-bottom: 0.5rem;
  }

  .icon-card {
    padding: 1rem 0.5rem;
  }

  .icon-grid {
    gap: 1rem !important;
    grid-template-columns: repeat(3, 1fr) !important;
    /* Force 3 columns for smaller compact look? Or keep 2? User said "small". */
  }

  /* 2. Why Choose Us Icons */
  .feature-icon {
    width: 80px;
    height: 80px;
    font-size: 2rem;
    border-radius: 25px;
    /* Slightly softer */
  }

  /* 3. How It Works Steps */
  .step-number {
    width: 65px;
    height: 65px;
    font-size: 1.75rem;
  }

  /* 4. Service Card Icons (Key Features) */
  .service-card i {
    width: 80px;
    height: 80px;
    line-height: 80px;
    font-size: 2.5rem;
  }

  /* 5. Network Icons */
  .network-feature-icon {
    width: 90px;
    height: 90px;
    font-size: 2.5rem;
    margin-bottom: 1.5rem;
  }

  /* 6. Processing Highlight */
  .processing-highlight i {
    width: 80px;
    height: 80px;
    font-size: 2.5rem;
  }

  /* 7. Document Icons */
  .doc-icon {
    width: 75px;
    height: 75px;
    font-size: 2rem;
  }

  /* 8. General Touch Targets */
  .btn {
    padding: 1rem 2rem;
    min-height: 50px;
  }

  /* 9. Selection Cards (Forms) */
  .selection-icon {
    font-size: 3rem;
    margin-bottom: 1.25rem;
  }

  .selection-card {
    padding: 1.5rem 1rem;
  }
}

/* --- Calculator Styles --- */
.calculator-section {
  padding: 4rem 0;
  min-height: 80vh;
}

.calc-container {
  background: var(--card-bg);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  border: 1px solid var(--border);
  padding: 2rem;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 3rem;
  align-items: start;
}

@media (max-width: 900px) {
  .calc-container {
    grid-template-columns: 1fr;
    gap: 2rem;
  }
}

.calc-inputs {
  background: var(--background);
  padding: 2rem;
  border-radius: var(--radius-md);
  border: 1px solid var(--border);
}

.input-group {
  margin-bottom: 1.5rem;
}

.input-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0.5rem;
}

.input-header label {
  font-weight: 600;
  color: var(--text-main);
  font-size: 0.95rem;
}

.input-wrapper {
  position: relative;
  display: flex;
  align-items: center;
}

.currency-symbol {
  position: absolute;
  left: 1rem;
  color: var(--text-muted);
  font-weight: 600;
}

.calc-input-number {
  width: 100%;
  padding: 0.75rem 1rem 0.75rem 2rem;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--card-bg);
  color: var(--text-main);
  font-weight: 600;
  font-size: 1rem;
  transition: var(--transition-base);
}

.calc-input-number:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

.calc-range {
  width: 100%;
  margin-top: 0.5rem;
  height: 6px;
  background: var(--border);
  border-radius: var(--radius-full);
  appearance: none;
  outline: none;
}

.calc-range::-webkit-slider-thumb {
  appearance: none;
  width: 18px;
  height: 18px;
  background: var(--primary);
  border-radius: 50%;
  cursor: pointer;
  transition: var(--transition-fast);
}

.calc-range::-webkit-slider-thumb:hover {
  transform: scale(1.1);
}

/* Results Side */
.calc-results {
  text-align: center;
  padding: 1rem;
}

.result-card {
  background: var(--primary-light);
  padding: 1.5rem;
  border-radius: var(--radius-md);
  margin-bottom: 2rem;
  border: 1px dashed var(--primary);
}

.result-value {
  font-size: 2.5rem;
  font-weight: 800;
  color: var(--primary-dark);
  margin: 0.5rem 0;
  font-family: var(--font-heading);
}

.result-label {
  color: var(--text-muted);
  font-size: 0.9rem;
  text-transform: uppercase;
  letter-spacing: 1px;
  font-weight: 600;
}

.breakdown-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
  margin-top: 1.5rem;
}

.breakdown-item h4 {
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-bottom: 0.25rem;
}

.breakdown-item p {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--secondary);
}

.chart-wrapper {
  position: relative;
  height: 250px;
  margin-top: 2rem;
}

/* Calculator Landing Page Styles */
.services-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 2rem;
  margin-top: 2rem;
}

.service-card {
  background: var(--card-bg);
  padding: 2rem;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  transition: var(--transition-base);
  border: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  height: 100%;
  text-decoration: none;
  color: var(--text-main);
}

.service-card:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-md);
  border-color: var(--primary);
}

.service-card .icon-box {
  width: 60px;
  height: 60px;
  background: var(--primary-light);
  color: var(--primary);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  margin-bottom: 1rem;
  transition: 0.3s;
}

.service-card:hover .icon-box {
  background: var(--primary);
  color: white;
  transform: rotate(10deg);
}

[data-theme="dark"] .service-card {
  background: var(--surface);
  border-color: rgba(255, 255, 255, 0.05);
}

/* --- Futuristic Calculator Styles (Glassmorphism & Neon) --- */

/* Global Calculator Theme Override */
/* Global Calculator Theme Override */

/* Base Futuristic Variables (Shared) */
body.calculator-page {
  --primary: #d946ef !important;
  --primary-light: rgba(217, 70, 239, 0.1) !important;
  --primary-dark: #c026d3 !important;
  min-height: 100vh;
}

/* --- Dark Mode (Default Futuristic) --- */
html[data-theme="dark"] body.calculator-page {
  --text-main: #ffffff !important;
  --text-muted: rgba(255, 255, 255, 0.7) !important;
  background: radial-gradient(circle at 10% 20%, rgb(40, 5, 59) 0%, rgb(18, 5, 41) 90%) !important;
  color: #fff !important;
}

html[data-theme="dark"] body.calculator-page .navbar {
  background: rgba(18, 5, 41, 0.8) !important;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05) !important;
}

html[data-theme="dark"] body.calculator-page .hero,
html[data-theme="dark"] body.calculator-page .hero-page {
  color: #fff !important;
}

/* --- Light Mode (White/Pink Futuristic) --- */
html:not([data-theme="dark"]) body.calculator-page {
  --text-main: #1e293b !important;
  --text-muted: #64748b !important;
  /* Soft Pink/White Gradient */
  background: radial-gradient(circle at 10% 20%, #fdf4ff 0%, #ffffff 90%) !important;
  color: #1e293b !important;
}

/* Light Mode Header correction */
html:not([data-theme="dark"]) body.calculator-page .navbar {
  background: rgba(255, 255, 255, 0.85) !important;
  border-bottom: 1px solid rgba(217, 70, 239, 0.1) !important;
}

html:not([data-theme="dark"]) body.calculator-page .hero,
html:not([data-theme="dark"]) body.calculator-page .hero-page {
  color: #1e293b !important;
  background: transparent !important;
}

/* Shared Header adjustments */
body.calculator-page .hero-title span {
  color: var(--primary) !important;
  text-shadow: 0 0 10px rgba(217, 70, 239, 0.3);
}

body.calculator-page .nav-item>a:hover {
  color: var(--primary) !important;
}

html:not([data-theme="dark"]) body.calculator-page .nav-item>a {
  color: #1e293b !important;
}

html[data-theme="dark"] body.calculator-page .nav-item>a {
  color: rgba(255, 255, 255, 0.9) !important;
}


/* Background Animation */
.calculator-section {
  background: transparent !important;
  position: relative;
  overflow: hidden;
  padding: 6rem 0;
}

.calculator-section::before {
  content: '';
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: radial-gradient(circle, rgba(124, 58, 237, 0.1) 0%, transparent 50%);
  animation: rotateBg 20s linear infinite;
  z-index: 0;
}

@keyframes rotateBg {
  0% {
    transform: rotate(0deg);
  }

  100% {
    transform: rotate(360deg);
  }
}

.calc-container {
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-radius: 24px;
  padding: 2rem;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 3rem;
  position: relative;
  z-index: 1;
  overflow: hidden;
}

/* Container Glass Styles */
html[data-theme="dark"] body.calculator-page .calc-container {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  box-shadow: 0 8px 32px 0 rgba(31, 38, 135, 0.37);
}

html:not([data-theme="dark"]) body.calculator-page .calc-container {
  background: rgba(255, 255, 255, 0.6);
  border: 1px solid rgba(255, 255, 255, 0.5);
  box-shadow: 0 8px 32px 0 rgba(217, 70, 239, 0.1);
  /* Pinkish shadow */
}

/* Neon Glow for Inputs */
.calc-input-number {
  font-family: 'Outfit', sans-serif;
  letter-spacing: 1px;
  transition: all 0.3s ease;
}

html[data-theme="dark"] body.calculator-page .calc-input-number {
  background: rgba(0, 0, 0, 0.2);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: #fff;
}

html:not([data-theme="dark"]) body.calculator-page .calc-input-number {
  background: rgba(255, 255, 255, 0.8);
  border: 1px solid rgba(217, 70, 239, 0.2);
  color: #1e293b;
}

.calc-input-number:focus {
  border-color: #d946ef;
  /* Fuchsia Neon */
  outline: none;
}

html[data-theme="dark"] body.calculator-page .calc-input-number:focus {
  background: rgba(0, 0, 0, 0.4);
  box-shadow: 0 0 15px rgba(217, 70, 239, 0.4);
}

html:not([data-theme="dark"]) body.calculator-page .calc-input-number:focus {
  background: #fff;
  box-shadow: 0 0 15px rgba(217, 70, 239, 0.2);
}

.input-header label {
  font-weight: 500;
  letter-spacing: 0.5px;
}

html[data-theme="dark"] body.calculator-page .input-header label {
  color: rgba(255, 255, 255, 0.8);
}

html:not([data-theme="dark"]) body.calculator-page .input-header label {
  color: #475569;
}

/* Currency Symbol Alignment */
.input-wrapper {
  position: relative;
  display: flex;
  align-items: center;
}

.input-wrapper .currency-symbol {
  position: absolute;
  left: 1rem;
  top: 50%;
  transform: translateY(-50%);
  color: #d946ef !important;
  font-weight: 500;
  pointer-events: none;
  z-index: 2;
  display: block !important;
}

.input-header .currency-symbol {
  display: none !important;
}

/* Adjust input padding (reset) */
.calc-input-number {
  padding-left: 2.5rem !important;
}

/* --- Futuristic Components (Theme Aware) --- */

/* Animated Range Slider */
.calc-range {
  -webkit-appearance: none;
  appearance: none;
  height: 6px;
  border-radius: 3px;
  margin-top: 1rem;
}

html[data-theme="dark"] body.calculator-page .calc-range {
  background: rgba(255, 255, 255, 0.1);
}

html:not([data-theme="dark"]) body.calculator-page .calc-range {
  background: rgba(0, 0, 0, 0.1);
}

.calc-range::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 24px;
  height: 24px;
  background: #d946ef;
  border: 2px solid #fff;
  border-radius: 50%;
  cursor: pointer;
  box-shadow: 0 0 10px #d946ef;
  transition: transform 0.2s;
}

.calc-range::-webkit-slider-thumb:hover {
  transform: scale(1.3);
  box-shadow: 0 0 20px #d946ef;
}

/* Result Card - Holographic Feel */
.result-card {
  backdrop-filter: blur(10px);
  border-radius: 20px;
}

html[data-theme="dark"] body.calculator-page .result-card {
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.1) 0%, rgba(255, 255, 255, 0.05) 100%);
  border: 1px solid rgba(255, 255, 255, 0.2);
  box-shadow: inset 0 0 20px rgba(255, 255, 255, 0.05);
}

html:not([data-theme="dark"]) body.calculator-page .result-card {
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.9) 0%, rgba(255, 255, 255, 0.6) 100%);
  border: 1px solid rgba(255, 255, 255, 0.8);
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
}

.result-value {
  background: linear-gradient(to right, #d946ef, #8b5cf6);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  text-shadow: 0 0 30px rgba(217, 70, 239, 0.3);
}

/* Breakdown Items */
html[data-theme="dark"] body.calculator-page .breakdown-item h4 {
  color: rgba(255, 255, 255, 0.6);
}

html:not([data-theme="dark"]) body.calculator-page .breakdown-item h4 {
  color: #64748b;
}

html[data-theme="dark"] body.calculator-page .breakdown-item p {
  color: #fff;
}

html:not([data-theme="dark"]) body.calculator-page .breakdown-item p {
  color: #1e293b;
}

.breakdown-item p {
  font-size: 1.2rem;
}

/* Chart Canvas */
.chart-wrapper canvas {
  filter: drop-shadow(0 0 10px rgba(0, 0, 0, 0.5));
}

/* Toggle Switch */
.toggle-wrapper {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-bottom: 1.5rem;
}

.toggle-switch {
  position: relative;
  display: inline-block;
  width: 50px;
  height: 26px;
}

.toggle-switch input {
  opacity: 0;
  width: 0;
  height: 0;
}

.slider {
  position: absolute;
  cursor: pointer;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  transition: .4s;
  border-radius: 34px;
}

html[data-theme="dark"] body.calculator-page .slider {
  background-color: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.2);
}

html:not([data-theme="dark"]) body.calculator-page .slider {
  background-color: rgba(0, 0, 0, 0.1);
  border: 1px solid rgba(0, 0, 0, 0.1);
}

.slider:before {
  position: absolute;
  content: "";
  height: 18px;
  width: 18px;
  left: 4px;
  bottom: 3px;
  background-color: white;
  transition: .4s;
  border-radius: 50%;
}

input:checked+.slider {
  background-color: #d946ef;
  box-shadow: 0 0 15px #d946ef;
  border-color: #d946ef;
}

input:checked+.slider:before {
  transform: translateX(24px);
}

/* Input Type Select */
select.calc-input {
  color: #d946ef !important;
}

option {
  color: #fff;
}

html[data-theme="dark"] body.calculator-page option {
  background: #1a1a2e;
}

html:not([data-theme="dark"]) body.calculator-page option {
  background: #fff;
  color: #1e293b;
}

/* --- Mega Menu (Desktop 3-Column Layout) --- */
@media (min-width: 769px) {
  .mega-dropdown {
    width: min(750px, calc(100vw - 2rem)) !important;
    /* Right-anchored so it never overflows the viewport */
    left: auto !important;
    right: 0 !important;
    transform: translateX(0) translateY(20px) !important;
    display: grid;
    grid-template-columns: repeat(3, 1fr) !important;
    gap: 1.5rem;
    padding: 1.5rem !important;
    max-height: 80vh;
    overflow-y: auto;
  }

  .nav-item:hover .mega-dropdown {
    transform: translateX(0) translateY(10px) !important;
    opacity: 1 !important;
    visibility: visible !important;
  }

  .mega-column {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
  }

  .mega-header {
    font-size: 0.85rem;
    font-weight: 700;
    color: var(--primary);
    margin-bottom: 0.75rem;
    padding-bottom: 0.4rem;
    border-bottom: 1px solid rgba(0, 0, 0, 0.08);
    display: flex;
    align-items: center;
    gap: 0.5rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
  }

  .dropdown-link {
    padding: 0.35rem 0.8rem;
    /* Compact padding */
    font-size: 0.85rem;
    /* Smaller font */
  }

  /* Dark Mode Adjustments */
  [data-theme="dark"] .mega-header {
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    color: #d946ef;
    /* Neon Pink to match theme */
  }

  .view-all-link {
    font-weight: 600;
    color: var(--primary) !important;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    margin-top: 0.5rem;
    padding: 0.5rem 0.8rem !important;
    background: var(--primary-light);
    border-radius: 6px;
    justify-content: center;
  }

  .view-all-link:hover {
    background: var(--primary);
    color: #fff !important;
  }

  .divider {
    height: 1px;
    background: rgba(0, 0, 0, 0.08);
    margin: 1rem 0;
  }

  [data-theme="dark"] .divider {
    background: rgba(255, 255, 255, 0.1);
  }
}

/* --- Mega Menu Mobile Fixes --- */
@media (max-width: 768px) {
  .mega-column {
    margin-bottom: 1.5rem;
    padding-left: 1rem;
    border-left: 2px solid rgba(0, 0, 0, 0.05);
  }

  .mega-header {
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--text-muted);
    margin-bottom: 0.8rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
  }

  [data-theme="dark"] .mega-header {
    color: rgba(255, 255, 255, 0.6);
  }

  .view-all-link {
    font-weight: 600;
    color: var(--primary);
    display: block;
    margin-top: 1rem;
  }
}

/* --- Mobile Optimization (Latest) --- */
@media (max-width: 768px) {

  /* 1. Layout & Spacing */
  .calculator-section {
    padding: 3rem 0 !important;
  }

  .container {
    padding-left: 1.5rem;
    padding-right: 1.5rem;
  }

  /* 2. Calculator Container (Stacking) */
  .calc-container {
    grid-template-columns: 1fr !important;
    gap: 2rem !important;
    padding: 1.5rem !important;
    border-radius: 20px !important;
  }

  /* 3. Typography */
  .hero-title {
    font-size: 2.5rem !important;
    line-height: 1.2;
  }

  .hero-title span {
    display: block;
  }

  .hero-description {
    font-size: 1.15rem !important;
  }

  .section-title {
    font-size: 2.2rem !important;
  }

  /* 4. Inputs (Touch Friendly) */
  .calc-input-number,
  select.calc-input,
  .toggle-switch {
    font-size: 18px !important;
    /* Larger for better touch */
    padding: 1rem !important;
  }

  .calc-input-number {
    padding-left: 2.5rem !important;
    /* Prevent overlap with Rupee symbol */
  }

  .input-header label {
    font-size: 0.95rem !important;
  }

  .input-group {
    margin-bottom: 1.5rem;
  }

  /* 5. Result Cards */
  .result-card {
    padding: 1.5rem !important;
    margin-top: 1rem;
  }

  .result-value {
    font-size: 2.5rem !important;
  }

  .breakdown-item h4 {
    font-size: 0.9rem !important;
  }

  .breakdown-item p {
    font-size: 1.2rem !important;
  }

  /* 6. View All Calculators Grid */
  .services-grid {
    display: grid !important;
    grid-template-columns: 1fr !important;
    /* Force Single Column */
    gap: 1.5rem !important;
  }

  .service-card {
    padding: 1.5rem !important;
    min-height: auto !important;
  }

  .icon-box {
    width: 60px !important;
    height: 60px !important;
    line-height: 60px !important;
    font-size: 1.5rem !important;
  }

  /* 7. Navbar Adjustments */
  .navbar {
    padding: 0.8rem 0 !important;
  }

  .logo {
    font-size: 1.2rem !important;
  }

  .logo img {
    height: 30px !important;
    /* Smaller logo */
  }

  .mobile-toggle {
    font-size: 1.5rem !important;
  }
}

@media (max-width: 480px) {
  .hero-title {
    font-size: 2.2rem !important;
  }

  .calc-container {
    padding: 1rem !important;
  }

  .result-value {
    font-size: 2rem !important;
  }
}

/* --- Ultra Pro Design Additions --- */

/* Modern Gradient Text */
.text-gradient {
  background: linear-gradient(135deg, var(--primary) 0%, #3b82f6 50%, #06b6d4 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  display: inline-block;
}

/* Glassmorphism Card Enhanced */
.glass-panel {
  background: rgba(255, 255, 255, 0.7);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid rgba(255, 255, 255, 0.5);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.05);
  border-radius: var(--radius-lg);
}

[data-theme="dark"] .glass-panel {
  background: rgba(15, 23, 42, 0.6);
  border: 1px solid rgba(255, 255, 255, 0.05);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
}

/* Floating Input Group */
.form-group-modern {
  position: relative;
  margin-bottom: 1.5rem;
}

.form-group-modern input,
.form-group-modern select,
.form-group-modern textarea {
  width: 100%;
  padding: 1rem 1.25rem;
  font-size: 1rem;
  background: rgba(255, 255, 255, 0.5);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  transition: all 0.3s ease;
  color: var(--text-main);
  outline: none;
}

[data-theme="dark"] .form-group-modern input,
[data-theme="dark"] .form-group-modern select,
[data-theme="dark"] .form-group-modern textarea {
  background: rgba(15, 23, 42, 0.5);
}

.form-group-modern label {
  position: absolute;
  left: 1rem;
  top: 1rem;
  padding: 0 0.5rem;
  color: var(--text-muted);
  cursor: text;
  transition: all 0.3s ease;
  background: transparent;
  border-radius: 4px;
  pointer-events: none;
}

.form-group-modern input:focus,
.form-group-modern input:not(:placeholder-shown),
.form-group-modern select:focus,
.form-group-modern select:not([value=""]),
.form-group-modern textarea:focus,
.form-group-modern textarea:not(:placeholder-shown) {
  border-color: var(--primary);
  background: var(--surface);
  box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.1);
}

.form-group-modern input:focus~label,
.form-group-modern input:not(:placeholder-shown)~label,
.form-group-modern select:focus~label,
.form-group-modern select:not([value=""])~label,
.form-group-modern textarea:focus~label,
.form-group-modern textarea:not(:placeholder-shown)~label {
  top: -0.6rem;
  left: 0.8rem;
  font-size: 0.8rem;
  color: var(--primary);
  background: var(--card-bg);
  font-weight: 600;
  z-index: 2;
}

/* Feature Cards Grid */
.features-grid-pro {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 2rem;
  padding: 2rem 0;
}

.feature-card-pro {
  padding: 2.5rem 2rem;
  text-align: center;
  transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  position: relative;
  overflow: hidden;
  z-index: 1;
}

.feature-card-pro::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(135deg, rgba(37, 99, 235, 0.05) 0%, rgba(59, 130, 246, 0.1) 100%);
  opacity: 0;
  z-index: -1;
  transition: opacity 0.4s ease;
}

.feature-card-pro:hover {
  transform: translateY(-10px);
}

.feature-card-pro:hover::before {
  opacity: 1;
}

.feature-icon-wrapper {
  width: 80px;
  height: 80px;
  margin: 0 auto 1.5rem;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--primary-light) 0%, rgba(255, 255, 255, 0.8) 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2rem;
  color: var(--primary);
  box-shadow: 0 10px 20px rgba(37, 99, 235, 0.15);
  transition: transform 0.4s ease;
}

.feature-card-pro:hover .feature-icon-wrapper {
  transform: scale(1.1) rotate(5deg);
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
  color: white;
  box-shadow: 0 15px 30px rgba(37, 99, 235, 0.3);
}

/* Hero Badge */
.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 1rem;
  background: rgba(37, 99, 235, 0.1);
  border: 1px solid rgba(37, 99, 235, 0.2);
  border-radius: 50px;
  color: var(--primary);
  font-size: 0.9rem;
  font-weight: 600;
  margin-bottom: 1.5rem;
  backdrop-filter: blur(4px);
}

[data-theme="dark"] .hero-badge {
  background: rgba(59, 130, 246, 0.15);
  color: #60a5fa;
  border-color: rgba(59, 130, 246, 0.3);
}

/* Custom Scrollbar */
::-webkit-scrollbar {
  width: 8px;
}

::-webkit-scrollbar-track {
  background: transparent;
}

::-webkit-scrollbar-thumb {
  background: rgba(156, 163, 175, 0.5);
  border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
  background: rgba(107, 114, 128, 0.8);
}

/* Mobile Fixes - NATIVE APP FEEL */
@media (max-width: 768px) {
  .hero-page {
    padding-top: 5rem;
    padding-bottom: 2rem;
    min-height: calc(100svh - 65px - env(safe-area-inset-bottom));
    display: flex;
    flex-direction: column;
    justify-content: center;
  }

  .hero-title {
    font-size: 1.4rem !important;
    line-height: 1.2;
    margin-bottom: 0.5rem;
  }

  .hero-description {
    font-size: 0.85rem !important;
    line-height: 1.4;
    margin-bottom: 1.5rem;
  }

  .glass-panel {
    padding: 1rem !important;
    /* Compact padding */
    border-radius: 12px;
  }

  /* 2-Column Grid for Features on Mobile */
  .features-grid-pro {
    grid-template-columns: repeat(2, 1fr) !important;
    gap: 0.5rem !important;
    /* Compact gap */
    padding: 1rem 0;
  }

  .feature-card-pro {
    padding: 1rem 0.5rem;
    /* Very compact card */
    margin-bottom: 0;
    border-radius: var(--radius-md);
  }

  .feature-icon-wrapper {
    width: 36px;
    /* Tiny icons */
    height: 36px;
    font-size: 1rem;
    margin-bottom: 0.5rem;
  }

  .feature-card-pro h3 {
    font-size: 0.85rem;
    /* Small header */
    margin-bottom: 0.25rem;
  }

  .feature-card-pro p {
    font-size: 0.75rem !important;
    /* Tiny text */
    line-height: 1.2;
  }

  /* Form Compactness */
  .form-group-modern {
    margin-bottom: 0.8rem;
  }

  .form-group-modern input,
  .form-group-modern select,
  .form-group-modern textarea {
    padding: 0.6rem 0.8rem;
    /* Compact inputs */
    font-size: 0.85rem;
    /* Smaller font size */
    height: auto;
    border-radius: var(--radius-sm);
  }

  .form-group-modern label {
    font-size: 0.8rem;
    top: 0.6rem;
    left: 0.8rem;
  }

  .form-group-modern input:focus~label,
  .form-group-modern input:not(:placeholder-shown)~label {
    top: -0.5rem;
    left: 0.5rem;
    font-size: 0.7rem;
  }

  .btn {
    padding: 0.6rem 1rem !important;
    /* Compact button */
    font-size: 0.85rem !important;
    width: 100%;
    /* Full width buttons for ease */
  }

  .section-details {
    padding: 2rem 0 !important;
  }
}

/* --- Mobile Header Refinements --- */

/* Mobile Contact Info (Hidden on Desktop) */
.mobile-contact-info {
  display: none;
  margin-top: auto;
  /* Push to bottom if flex container has height */
  padding-top: 1.5rem;
  border-top: 1px solid var(--border);
  margin-bottom: 50px;
  /* Space for bottom safe area */
}

.mobile-contact-group {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.mobile-contact-link {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  color: var(--text-muted);
  font-size: 0.95rem;
  transition: 0.2s;
  padding: 0.5rem 0;
}

.mobile-contact-link i {
  color: var(--primary);
  font-size: 1.1rem;
  width: 20px;
  text-align: center;
}

.mobile-contact-link:hover {
  color: var(--primary);
  transform: translateX(5px);
}

@media (max-width: 1024px) {

  /* Show mobile contact info */
  .mobile-contact-info {
    display: block;
  }

  /* Bigger Logo on Mobile */
  .logo img {
    height: 40px !important;
    /* Increased from 30px */
  }

  .logo {
    font-size: 1.4rem !important;
    /* Slightly larger text */
  }

  /* Refined Mobile Menu Background */
  .nav-links {
    background: rgba(255, 255, 255, 0.95);
    /* Better opacity */
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.1);
    padding-bottom: 2rem;
  }

  [data-theme="dark"] .nav-links {
    background: rgba(2, 6, 23, 0.95);
    border-right: 1px solid var(--border);
    /* Visual Edge */
  }

  /* Log In Button - Full Width & Modern */
  .nav-item .btn-signin {
    width: 100%;
    display: flex;
    justify-content: center;
    margin-top: 1rem;
    padding: 0.8rem;
    font-size: 1rem;
    box-shadow: 0 4px 15px rgba(37, 99, 235, 0.3);
  }
}

/* --- Mobile Bottom Navigation (Native App Feel) --- */
.bottom-nav {
  display: none;
  position: fixed;
  bottom: 0;
  left: 0;
  width: 100%;
  background: rgba(255, 255, 255, 0.9);
  backdrop-filter: blur(15px);
  -webkit-backdrop-filter: blur(15px);
  border-top: 1px solid var(--border);
  box-shadow: 0 -4px 15px rgba(0, 0, 0, 0.05);
  z-index: 2000;
  padding-bottom: env(safe-area-inset-bottom);
}

[data-theme="dark"] .bottom-nav {
  background: rgba(15, 23, 42, 0.9);
}

.bottom-nav-item {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 0.6rem 0;
  color: var(--text-muted);
  font-size: 0.75rem;
  font-weight: 500;
  transition: all 0.2s ease;
  position: relative;
}

.bottom-nav-item i {
  font-size: 1.25rem;
  margin-bottom: 0.25rem;
  transition: transform 0.2s ease;
}

.bottom-nav-item.active {
  color: var(--primary);
}

.bottom-nav-item.active i {
  transform: translateY(-2px);
}

.bottom-nav-item:hover {
  color: var(--primary);
}

/* Base Top padding adjustments for mobile */
@media (max-width: 768px) {
  .top-bar {
    display: none !important;
    /* Hide top bar on mobile for native feel */
  }

  .navbar .nav-links {
    display: none !important;
    /* Hide hamburger menu links on mobile since we have bottom nav */
  }

  .mobile-toggle,
  #theme-toggle {
    display: none !important;
    /* Hide hamburger icon and desktop theme toggle completely */
  }

  body {
    padding-bottom: calc(65px + env(safe-area-inset-bottom)) !important;
    /* Add space for bottom nav */
  }

  .bottom-nav {
    display: flex;
    /* Show bottom nav on mobile */
  }

  .scroll-top {
    bottom: calc(80px + env(safe-area-inset-bottom));
    /* Move FAB up */
  }

  /* Additional cleanup for native look */
  .footer {
    padding-bottom: calc(40px + env(safe-area-inset-bottom));
  }
}

/* =========================================
   MOBILE NATIVE VIEW STYLES
========================================= */

/* Desktop view wrapper default */
.desktop-view {
  display: block;
}

/* Mobile view wrapper default */
.mobile-view {
  display: none;
}

@media (max-width: 768px) {
  .desktop-view {
    display: none !important;
  }

  /* Hide desktop navbar ONLY inside .desktop-view when on mobile app layout (like index.html)
     Other pages without .desktop-view wrapper (loans, calculators) should retain their responsive navbar */
  .desktop-view .top-bar,
  .desktop-view .navbar {
    display: none !important;
  }

  /* Previously hid the top bar on calculators, now removed to allow the responsive navbar to show */

  .mobile-view {
    display: block !important;
    background: var(--background);
    min-height: 100vh;
    padding-bottom: 2rem;
  }

  /* App Top Bar */
  .app-top-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.25rem 1.5rem 0.5rem;
    background: var(--surface);
    position: sticky;
    top: 0;
    z-index: 100;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--border);
  }

  .app-logo {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-family: var(--font-heading);
    font-weight: 700;
    font-size: 1.25rem;
    color: var(--primary);
  }

  .app-logo img {
    height: 32px;
    width: auto;
  }

  .app-icon-btn {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: var(--primary-light);
    color: var(--primary);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.1rem;
    border: none;
  }

  /* Greeting */
  .app-greeting {
    padding: 1.5rem 1.5rem 0.5rem;
  }

  .app-greeting h1 {
    font-size: 1.75rem;
    margin-bottom: 0.25rem;
    color: var(--secondary);
  }

  .app-greeting p {
    color: var(--text-muted);
    font-size: 0.95rem;
  }

  /* Primary Banner */
  .app-primary-banner {
    margin: 1rem 1.5rem;
    padding: 1.5rem;
    background: linear-gradient(135deg, var(--primary) 0%, #1e40af 100%);
    border-radius: 1.25rem;
    color: white;
    position: relative;
    overflow: hidden;
    box-shadow: 0 10px 25px -5px rgba(37, 99, 235, 0.4);
    display: flex;
    justify-content: space-between;
    align-items: center;
  }

  .app-primary-banner::after {
    content: '';
    position: absolute;
    top: -50%;
    right: -20%;
    width: 200px;
    height: 200px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    z-index: 1;
  }

  .banner-content {
    position: relative;
    z-index: 2;
    flex: 1;
  }

  .banner-content h2 {
    color: white;
    font-size: 1.25rem;
    margin-bottom: 0.25rem;
  }

  .banner-content p {
    font-size: 0.85rem;
    opacity: 0.9;
    margin-bottom: 1rem;
    line-height: 1.4;
  }

  .app-btn-banner {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    background: white;
    color: var(--primary);
    padding: 0.5rem 1rem;
    border-radius: 2rem;
    font-size: 0.85rem;
    font-weight: 600;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
  }

  .banner-icon {
    font-size: 3.5rem;
    opacity: 0.2;
    position: absolute;
    right: 10px;
    bottom: -10px;
    z-index: 1;
  }

  /* App Sections */
  .app-section {
    padding: 1.5rem 0;
  }

  .app-section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 1.5rem;
    margin-bottom: 1.25rem;
  }

  .app-section-header h3 {
    font-size: 1.15rem;
    margin: 0;
    color: var(--text-main);
  }

  .app-view-all {
    font-size: 0.85rem;
    color: var(--primary);
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 4px;
  }

  /* App Grid */
  .app-grid {
    display: flex;
    padding: 0 1.5rem;
    justify-content: space-between;
    gap: 0.5rem;
  }

  .app-grid-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
    flex: 1;
    text-align: center;
  }

  .app-icon {
    width: 3.5rem;
    height: 3.5rem;
    border-radius: 1rem;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
    background: var(--surface);
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.03);
    border: 1px solid var(--border);
  }

  .app-grid-item span {
    font-size: 0.75rem;
    font-weight: 500;
    color: var(--text-main);
  }

  /* Colors for icons */
  .light-blue {
    background: #eff6ff;
    color: #3b82f6;
    border-color: #dbeafe;
  }

  .light-purple {
    background: #faf5ff;
    color: #a855f7;
    border-color: #f3e8ff;
  }

  .light-orange {
    background: #fff7ed;
    color: #f97316;
    border-color: #ffedd5;
  }

  .light-teal {
    background: #f0fdfa;
    color: #14b8a6;
    border-color: #ccfbf1;
  }

  .light-yellow {
    background: #fefce8;
    color: #eab308;
    border-color: #fef08a;
  }

  .light-slate {
    background: #f1f5f9;
    color: #64748b;
    border-color: #e2e8f0;
  }

  .light-pink {
    background: #fdf2f8;
    color: #ec4899;
    border-color: #fce7f3;
  }

  .light-green {
    background: #f0fdf4;
    color: #22c55e;
    border-color: #dcfce7;
  }

  [data-theme="dark"] .light-blue {
    background: rgba(59, 130, 246, 0.15);
    border-color: transparent;
  }

  [data-theme="dark"] .light-purple {
    background: rgba(168, 85, 247, 0.15);
    border-color: transparent;
  }

  [data-theme="dark"] .light-orange {
    background: rgba(249, 115, 22, 0.15);
    border-color: transparent;
  }

  [data-theme="dark"] .light-teal {
    background: rgba(20, 184, 166, 0.15);
    border-color: transparent;
  }

  [data-theme="dark"] .light-yellow {
    background: rgba(234, 179, 8, 0.15);
    border-color: transparent;
  }

  [data-theme="dark"] .light-slate {
    background: rgba(100, 116, 139, 0.15);
    border-color: transparent;
  }

  [data-theme="dark"] .light-pink {
    background: rgba(236, 72, 153, 0.15);
    border-color: transparent;
  }

  [data-theme="dark"] .light-green {
    background: rgba(34, 197, 94, 0.15);
    border-color: transparent;
  }


  /* Horizontal Scroll */
  .app-h-scroll {
    display: flex;
    overflow-x: auto;
    padding: 0 1.5rem 1rem 1.5rem;
    gap: 1rem;
    scrollbar-width: none;
    /* Firefox */
  }

  .app-h-scroll::-webkit-scrollbar {
    display: none;
    /* Chrome */
  }

  .app-card-small {
    min-width: 140px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 1rem;
    padding: 1.25rem;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.02);
  }

  .card-icon {
    font-size: 1.5rem;
    margin-bottom: 0.75rem;
  }

  .app-card-small h4 {
    font-size: 0.95rem;
    margin-bottom: 0.25rem;
    color: var(--text-main);
  }

  .app-card-small p {
    font-size: 0.75rem;
    color: var(--text-muted);
  }

  /* App Steps */
  .app-steps {
    padding: 0 1.5rem;
    display: flex;
    flex-direction: column;
    gap: 1rem;
  }

  .app-step {
    display: flex;
    align-items: center;
    gap: 1rem;
    background: var(--surface);
    padding: 1rem;
    border-radius: 1rem;
    border: 1px solid var(--border);
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.02);
  }

  .step-num {
    width: 2.5rem;
    height: 2.5rem;
    background: var(--primary-light);
    color: var(--primary);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 1.1rem;
  }

  [data-theme="dark"] .step-num {
    background: rgba(59, 130, 246, 0.15);
  }

  .step-text h4 {
    font-size: 0.95rem;
    margin-bottom: 0.1rem;
    color: var(--text-main);
  }

  .step-text p {
    font-size: 0.8rem;
    color: var(--text-muted);
  }

  /* Footer Info */
  .app-info-footer {
    text-align: center;
    padding: 2rem 1.5rem;
    color: var(--text-muted);
    font-size: 0.85rem;
  }

  .app-info-footer a {
    color: var(--primary);
    font-weight: 500;
  }

  .app-meta {
    margin-top: 0.5rem;
    font-size: 0.75rem;
    opacity: 0.6;
  }
}




/* App Top-Bar Mobile Adjustments */
.app-top-bar .dropdown {
  top: 40px !important;
  left: auto !important;
  right: 1.5rem !important;
  transform: none !important;
  min-width: 140px !important;
}

.app-top-bar .nav-item:hover .dropdown,
.app-top-bar .nav-item.active .dropdown {
  transform: none !important;
}

/* --- MOBILE NAV SHIM VISIBILITY FIX --- */
.mobile-nav-shim .user-profile-item {
  display: flex !important;
  width: auto !important;
  visibility: visible !important;
  opacity: 1 !important;
  color: var(--primary) !important;
  z-index: 9999 !important;
}

.mobile-nav-shim .user-profile-item>a.profile-link {
  display: flex !important;
  visibility: visible !important;
  opacity: 1 !important;
  color: var(--primary) !important;
}

.mobile-nav-shim .user-profile-item i {
  color: var(--primary) !important;
  opacity: 1 !important;
  display: inline-block !important;
}

/* MOBILE NATIVE VIEW STYLES=========================================*/

/* Desktop view wrapper default */
.desktop-view {
  display: block;
}

/* Mobile view wrapper default */
.mobile-view {
  display: none;
}

@media (max-width: 768px),
(orientation: landscape) and (max-height: 500px) {
  .desktop-view {
    display: none !important;
  }

  .desktop-view .top-bar,
  .desktop-view .navbar {
    display: none !important;
  }

  /* Removed hidden top bar for calculators to allow new mobile profile icon */

  .mobile-view {
    display: block !important;
    background: var(--background);
    min-height: 100vh;
    padding-bottom: 2rem;
  }

  /* App Top Bar */
  .app-top-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.25rem 1.5rem 0.5rem;
    background: var(--surface);
    position: sticky;
    top: 0;
    z-index: 100;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--border);
  }

  .app-logo {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-family: var(--font-heading);
    font-weight: 700;
    font-size: 1.25rem;
    color: var(--primary);
  }

  .app-logo img {
    height: 32px;
    width: auto;
  }

  .app-icon-btn {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: var(--primary-light);
    color: var(--primary);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.1rem;
    border: none;
  }

  /* Greeting */
  .app-greeting {
    padding: 1.5rem 1.5rem 0.5rem;
  }

  .app-greeting h1 {
    font-size: 1.75rem;
    margin-bottom: 0.25rem;
    color: var(--secondary);
  }

  .app-greeting p {
    color: var(--text-muted);
    font-size: 0.95rem;
  }

  /* Primary Banner */
  .app-primary-banner {
    margin: 1rem 1.5rem;
    padding: 1.5rem;
    background: linear-gradient(135deg, var(--primary) 0%, #1e40af 100%);
    border-radius: 1.25rem;
    color: white;
    position: relative;
    overflow: hidden;
    box-shadow: 0 10px 25px -5px rgba(37, 99, 235, 0.4);
    display: flex;
    justify-content: space-between;
    align-items: center;
  }

  .app-primary-banner::after {
    content: '';
    position: absolute;
    top: -50%;
    right: -20%;
    width: 200px;
    height: 200px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    z-index: 1;
  }

  .banner-content {
    position: relative;
    z-index: 2;
    flex: 1;
  }

  .banner-content h2 {
    color: white;
    font-size: 1.25rem;
    margin-bottom: 0.25rem;
  }

  .banner-content p {
    font-size: 0.85rem;
    opacity: 0.9;
    margin-bottom: 1rem;
    line-height: 1.4;
  }

  .app-btn-banner {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    background: white;
    color: var(--primary);
    padding: 0.5rem 1rem;
    border-radius: 2rem;
    font-size: 0.85rem;
    font-weight: 600;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
  }

  .banner-icon {
    font-size: 3.5rem;
    opacity: 0.2;
    position: absolute;
    right: 10px;
    bottom: -10px;
    z-index: 1;
  }

  /* App Sections */
  .app-section {
    padding: 1.5rem 0;
  }

  .app-section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 1.5rem;
    margin-bottom: 1.25rem;
  }

  .app-section-header h3 {
    font-size: 1.15rem;
    margin: 0;
    color: var(--text-main);
  }

  .app-view-all {
    font-size: 0.85rem;
    color: var(--primary);
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 4px;
  }

  /* App Grid */
  .app-grid {
    display: flex;
    padding: 0 1.5rem;
    justify-content: space-between;
    gap: 0.5rem;
  }

  .app-grid-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
    flex: 1;
    text-align: center;
  }

  .app-icon {
    width: 3.5rem;
    height: 3.5rem;
    border-radius: 1rem;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
    background: var(--surface);
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.03);
    border: 1px solid var(--border);
  }

  .app-grid-item span {
    font-size: 0.75rem;
    font-weight: 500;
    color: var(--text-main);
  }

  /* Colors for icons */
  .light-blue {
    background: #eff6ff;
    color: #3b82f6;
    border-color: #dbeafe;
  }

  .light-purple {
    background: #faf5ff;
    color: #a855f7;
    border-color: #f3e8ff;
  }

  .light-orange {
    background: #fff7ed;
    color: #f97316;
    border-color: #ffedd5;
  }

  .light-teal {
    background: #f0fdfa;
    color: #14b8a6;
    border-color: #ccfbf1;
  }

  .light-yellow {
    background: #fefce8;
    color: #eab308;
    border-color: #fef08a;
  }

  .light-slate {
    background: #f1f5f9;
    color: #64748b;
    border-color: #e2e8f0;
  }

  .light-pink {
    background: #fdf2f8;
    color: #ec4899;
    border-color: #fce7f3;
  }

  .light-green {
    background: #f0fdf4;
    color: #22c55e;
    border-color: #dcfce7;
  }

  [data-theme="dark"] .light-blue {
    background: rgba(59, 130, 246, 0.15);
    border-color: transparent;
  }

  [data-theme="dark"] .light-purple {
    background: rgba(168, 85, 247, 0.15);
    border-color: transparent;
  }

  [data-theme="dark"] .light-orange {
    background: rgba(249, 115, 22, 0.15);
    border-color: transparent;
  }

  [data-theme="dark"] .light-teal {
    background: rgba(20, 184, 166, 0.15);
    border-color: transparent;
  }

  [data-theme="dark"] .light-yellow {
    background: rgba(234, 179, 8, 0.15);
    border-color: transparent;
  }

  [data-theme="dark"] .light-slate {
    background: rgba(100, 116, 139, 0.15);
    border-color: transparent;
  }

  [data-theme="dark"] .light-pink {
    background: rgba(236, 72, 153, 0.15);
    border-color: transparent;
  }

  [data-theme="dark"] .light-green {
    background: rgba(34, 197, 94, 0.15);
    border-color: transparent;
  }


  /* Horizontal Scroll */
  .app-h-scroll {
    display: flex;
    overflow-x: auto;
    padding: 0 1.5rem 1rem 1.5rem;
    gap: 1rem;
    scrollbar-width: none;
    /* Firefox */
  }

  .app-h-scroll::-webkit-scrollbar {
    display: none;
    /* Chrome */
  }

  .app-card-small {
    min-width: 140px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 1rem;
    padding: 1.25rem;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.02);
  }

  .card-icon {
    font-size: 1.5rem;
    margin-bottom: 0.75rem;
  }

  .app-card-small h4 {
    font-size: 0.95rem;
    margin-bottom: 0.25rem;
    color: var(--text-main);
  }

  .app-card-small p {
    font-size: 0.75rem;
    color: var(--text-muted);
  }

  /* App Steps */
  .app-steps {
    padding: 0 1.5rem;
    display: flex;
    flex-direction: column;
    gap: 1rem;
  }

  .app-step {
    display: flex;
    align-items: center;
    gap: 1rem;
    background: var(--surface);
    padding: 1rem;
    border-radius: 1rem;
    border: 1px solid var(--border);
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.02);
  }

  .step-num {
    width: 2.5rem;
    height: 2.5rem;
    background: var(--primary-light);
    color: var(--primary);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 1.1rem;
  }

  [data-theme="dark"] .step-num {
    background: rgba(59, 130, 246, 0.15);
  }

  .step-text h4 {
    font-size: 0.95rem;
    margin-bottom: 0.1rem;
    color: var(--text-main);
  }

  .step-text p {
    font-size: 0.8rem;
    color: var(--text-muted);
  }

  /* Footer Info */
  .app-info-footer {
    text-align: center;
    padding: 2rem 1.5rem;
    color: var(--text-muted);
    font-size: 0.85rem;
  }

  .app-info-footer a {
    color: var(--primary);
    font-weight: 500;
  }

  .app-meta {
    margin-top: 0.5rem;
    font-size: 0.75rem;
    opacity: 0.6;
  }
}

/* ============================================
   LANDSCAPE MODE â€” Mobile App Layout Optimizations
   ============================================ */
@media (orientation: landscape) and (max-height: 500px) {

  /* Compact Top Bar */
  .app-top-bar {
    padding: 0.5rem 1.5rem !important;
  }

  .app-logo img {
    height: 26px !important;
  }

  .app-logo {
    font-size: 1.05rem !important;
  }

  /* Compact Greeting */
  .app-greeting {
    padding: 0.75rem 1.5rem 0.25rem !important;
  }

  .app-greeting h1 {
    font-size: 1.25rem !important;
    margin-bottom: 0.1rem !important;
  }

  .app-greeting p {
    font-size: 0.8rem !important;
  }

  /* Landscape Banner â€” horizontal and compact */
  .app-primary-banner {
    margin: 0.5rem 1.5rem !important;
    padding: 1rem 1.25rem !important;
    flex-direction: row !important;
    align-items: center !important;
    border-radius: 1rem !important;
  }

  .banner-content h2 {
    font-size: 1.05rem !important;
    margin-bottom: 0.15rem !important;
  }

  .banner-content p {
    font-size: 0.78rem !important;
    margin-bottom: 0.5rem !important;
  }

  .app-btn-banner {
    padding: 0.4rem 0.85rem !important;
    font-size: 0.78rem !important;
  }

  .banner-icon {
    font-size: 2.5rem !important;
  }

  /* Compact Sections */
  .app-section {
    padding: 0.75rem 0 !important;
  }

  .app-section-header {
    margin-bottom: 0.75rem !important;
  }

  .app-section-header h3 {
    font-size: 1rem !important;
  }

  /* Loan Segments â€” 3 columns in landscape */
  .app-section>div[style*="grid-template-columns: repeat(2"] {
    grid-template-columns: repeat(3, 1fr) !important;
    gap: 0.75rem !important;
  }

  /* Calculator Grid compact */
  .app-section>div[style*="grid-template-columns: repeat(3"] {
    gap: 0.75rem 0.5rem !important;
  }

  .app-card-small {
    min-width: 120px !important;
    padding: 0.75rem !important;
    border-radius: 0.75rem !important;
  }

  .app-card-small h4 {
    font-size: 0.82rem !important;
    margin-bottom: 0.15rem !important;
  }

  .app-card-small p {
    font-size: 0.7rem !important;
  }

  .card-icon {
    font-size: 1.25rem !important;
    margin-bottom: 0.5rem !important;
  }

  .app-icon {
    width: 2.5rem !important;
    height: 2.5rem !important;
    font-size: 1rem !important;
    border-radius: 0.75rem !important;
  }

  /* Horizontal Scroll compact */
  .app-h-scroll {
    padding: 0 1.5rem 0.5rem 1.5rem !important;
    gap: 0.75rem !important;
  }

  /* How It Works Steps â€” 2-column grid in landscape */
  .app-steps {
    display: grid !important;
    grid-template-columns: 1fr 1fr !important;
    gap: 0.75rem !important;
  }

  .app-step {
    padding: 0.75rem !important;
    border-radius: 0.75rem !important;
    gap: 0.75rem !important;
  }

  .step-num {
    width: 2rem !important;
    height: 2rem !important;
    font-size: 0.95rem !important;
  }

  .step-text h4 {
    font-size: 0.85rem !important;
    margin-bottom: 0.05rem !important;
  }

  .step-text p {
    font-size: 0.72rem !important;
  }

  /* Footer compact */
  .app-info-footer {
    padding: 1rem !important;
    font-size: 0.75rem !important;
  }

  /* Fix body padding and scrolling */
  body.has-mobile-app {
    padding-bottom: 0.5rem !important;
  }

  /* Ensure proper content flow */
  .mobile-view {
    min-height: auto !important;
    padding-bottom: 1rem !important;
  }

  /* Profile dropdown positioning fix for landscape */
  .mobile-nav-shim .dropdown {
    top: 50px !important;
  }

  /* Footer padding for mobile bottom nav space */
  .footer {
    padding-bottom: calc(65px + env(safe-area-inset-bottom, 0px)) !important;
  }
}

/* ============================================
   FOOTER â€” Full redesign (mobile-first)
   ============================================ */

.footer {
  background: linear-gradient(160deg, #0f172a 0%, #1e3a5f 60%, #0f172a 100%);
  color: rgba(255, 255, 255, 0.85);
  /* Base padding â€” overridden by mobile rule above */
  padding: 3rem 0 2rem;
}

.footer-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 1.5rem;
}

/* ---- Brand Row ---- */
.footer-brand-row {
  margin-bottom: 2rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  padding-bottom: 1.5rem;
}

.footer-logo {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  font-family: var(--font-heading);
  font-weight: 800;
  font-size: 1.4rem;
  color: #fff;
  margin-bottom: 0.75rem;
  text-decoration: none;
}

.footer-logo img {
  height: 36px;
  width: auto;
  border-radius: 6px;
}

.footer-tagline {
  font-size: 0.85rem;
  color: rgba(255, 255, 255, 0.55);
  line-height: 1.6;
  max-width: 480px;
  margin: 0;
}

/* ---- Links Grid ---- */
.footer-links-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2rem 1.5rem;
  margin-bottom: 2rem;
}

/* Third column hidden on mobile, shown on desktop */
.footer-col-tools {
  display: none;
}

.footer-col h4 {
  font-size: 0.78rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: rgba(255, 255, 255, 0.45);
  margin-bottom: 0.9rem;
}

.footer-col ul {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
}

.footer-col ul li a {
  font-size: 0.875rem;
  color: rgba(255, 255, 255, 0.72);
  text-decoration: none;
  transition: color 0.2s ease, transform 0.2s ease;
  display: inline-block;
}

.footer-col ul li a:hover {
  color: #60a5fa;
  transform: translateX(3px);
}

/* ---- Copyright ---- */
.footer-copy {
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  padding-top: 1.25rem;
  text-align: center;
}

.footer-copy p {
  font-size: 0.8rem;
  color: rgba(255, 255, 255, 0.4);
  margin: 0 0 0.3rem;
  line-height: 1.5;
}

.footer-reg {
  font-size: 0.72rem !important;
  color: rgba(255, 255, 255, 0.25) !important;
}

/* ---- Desktop overrides ---- */
@media (min-width: 768px) {
  .footer-links-grid {
    grid-template-columns: 1fr 1fr 1fr;
  }

  .footer-col-tools {
    display: block;
  }

  .footer-brand-row {
    display: flex;
    align-items: flex-start;
    gap: 2rem;
    justify-content: space-between;
  }

  .footer-copy {
    text-align: left;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.5rem;
  }

  .footer-reg {
    margin: 0 !important;
  }
}

/* ---- Legacy mini-footer kept for backward compat ---- */
.app-info-footer {
  text-align: center;
  padding: 1.5rem 1rem;
  padding-bottom: calc(1.5rem + env(safe-area-inset-bottom, 0px));
  color: var(--text-muted);
  font-size: 0.8rem;
}

.app-info-footer p {
  margin-bottom: 0.4rem;
}

.app-info-footer a {
  color: var(--primary);
  font-weight: 500;
  text-decoration: underline;
  text-underline-offset: 2px;
}

.app-meta {
  font-size: 0.72rem;
  color: var(--text-light);
  letter-spacing: 0.02em;
}

/* ============================================
   PROFILE DROPDOWN IN APP TOP BAR â€” FIXED
   ============================================ */

/* Ensure the header doesn't clip the dropdown */
.app-top-bar {
  overflow: visible !important;
}

/* Profile item is the positioning anchor */
.mobile-nav-shim .user-profile-item {
  position: relative !important;
  display: flex !important;
  width: auto !important;
  visibility: visible !important;
  opacity: 1 !important;
  color: var(--primary) !important;
  z-index: 9999 !important;
}

.mobile-nav-shim .user-profile-item>a.profile-link {
  display: flex !important;
  visibility: visible !important;
  opacity: 1 !important;
  color: var(--primary) !important;
}

.mobile-nav-shim .user-profile-item i {
  color: var(--primary) !important;
  opacity: 1 !important;
  display: inline-block !important;
}

/* Dropdown floats fixed below the header icon â€” never pushes header layout */
.mobile-nav-shim .dropdown {
  position: fixed !important;
  top: 70px !important;
  right: 1rem !important;
  left: auto !important;
  transform: none !important;
  width: 170px !important;
  max-width: 170px !important;
  min-width: 150px !important;
  opacity: 0;
  visibility: hidden;
  display: block !important;
  pointer-events: none !important;
  z-index: 99999 !important;
  background: var(--card-bg) !important;
  border-radius: var(--radius-md) !important;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15) !important;
  border: 1px solid var(--border) !important;
  padding: 0.4rem !important;
  transition: opacity 0.2s ease, visibility 0.2s ease !important;
}

/* Show on hover (web/desktop view) */
.mobile-nav-shim .user-profile-item:hover .dropdown {
  opacity: 1 !important;
  visibility: visible !important;
  pointer-events: auto !important;
}

/* Show when JS adds .active class on tap/click */
.mobile-nav-shim .user-profile-item.active .dropdown {
  opacity: 1 !important;
  visibility: visible !important;
  pointer-events: auto !important;
}

/* ============================================
   MOBILE HEADER PROFILE — Show only on mobile in main navbar
   ============================================ */

/* On desktop: hide the profile icon next to the hamburger menu, since it's already in the main nav */
@media (min-width: 1025px) {
  .mobile-header-profile {
    display: none !important;
  }
}

/* On mobile: ensure it shows */
@media (max-width: 1024px) {
  .mobile-header-profile {
    display: flex !important;
  }
}