/* =========================================
   WAQARKOZI - Premium Commercial CSS System
   Enterprise-Grade Design Framework
   ========================================= */

/* --- Google Font Import --- */
@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@300;400;500;600;700;800;900&family=Inter:wght@400;500;600;700&display=swap');

/* --- Font Awesome Icons --- */
@import url('https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.4.0/css/all.min.css');

/* --- Design Tokens --- */
:root {
  --font-primary: 'Outfit', sans-serif;
  --font-secondary: 'Inter', sans-serif;

  /* Light Mode */
  --bg:             #f8fafc;
  --surface:        #ffffff;
  --surface-2:      #f1f5f9;
  --surface-3:      #e2e8f0;
  --text:           #0f172a;
  --text-muted:     #64748b;
  --text-light:     #94a3b8;
  --border:         #e2e8f0;
  --border-light:   #f1f5f9;

  --primary:        #3b82f6;
  --primary-light:  #60a5fa;
  --primary-dark:   #2563eb;
  --primary-glow:   rgba(59, 130, 246, 0.15);
  --secondary:      #8b5cf6;
  --secondary-light: #a78bfa;
  --accent:         #06b6d4;
  --success:        #10b981;
  --warning:        #f59e0b;
  --danger:         #ef4444;
  --info:           #0ea5e9;

  --gradient:       linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
  --gradient-text:  linear-gradient(135deg, #3b82f6 0%, #8b5cf6 50%, #06b6d4 100%);
  --gradient-success: linear-gradient(135deg, #10b981 0%, #059669 100%);
  --gradient-warning: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
  --gradient-danger: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);

  --shadow-sm:      0 1px 2px rgba(0,0,0,0.05), 0 1px 1px rgba(0,0,0,0.06);
  --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);
  --shadow-glow:    0 0 20px var(--primary-glow);
  --shadow-success:  0 4px 6px rgba(16, 185, 129, 0.15);
  --shadow-warning:  0 4px 6px rgba(245, 158, 11, 0.15);
  --shadow-danger:   0 4px 6px rgba(239, 68, 68, 0.15);

  --radius-sm:      0.5rem;
  --radius-md:      0.875rem;
  --radius-lg:      1.25rem;
  --radius-xl:      2rem;
  --radius-full:    9999px;

  --nav-h:          68px;
  --transition:     0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

[data-theme="dark"] {
  --bg:             #0f172a;
  --surface:        #1e293b;
  --surface-2:      #334155;
  --surface-3:      #475569;
  --text:           #f1f5f9;
  --text-muted:     #94a3b8;
  --text-light:     #64748b;
  --border:         #334155;
  --border-light:   #475569;

  --primary:        #60a5fa;
  --primary-light:  #93c5fd;
  --primary-dark:   #3b82f6;
  --primary-glow:   rgba(96, 165, 250, 0.2);
  --secondary:      #a78bfa;
  --secondary-light: #c4b5fd;
  --accent:         #22d3ee;

  --shadow-sm:      0 1px 2px rgba(0,0,0,0.4);
  --shadow-md:      0 4px 6px -1px rgba(0,0,0,0.5), 0 2px 4px -1px rgba(0,0,0,0.4);
  --shadow-lg:      0 10px 15px -3px rgba(0,0,0,0.6), 0 4px 6px -2px rgba(0,0,0,0.5);
  --shadow-xl:      0 20px 25px -5px rgba(0,0,0,0.7), 0 10px 10px -5px rgba(0,0,0,0.6);
  --shadow-glow:    0 0 30px var(--primary-glow);
}

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

html { scroll-behavior: smooth; }

body {
  font-family: var(--font-primary);
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  overflow-x: hidden;
  transition: background var(--transition), color var(--transition);
  font-feature-settings: 'kern' 1, 'liga' 1;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  position: relative;
}

/* Particle Background */
.particles-container {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: -1;
  pointer-events: none;
  overflow: hidden;
}

.particle {
  position: absolute;
  border-radius: 50%;
  background: radial-gradient(circle, var(--primary-glow) 0%, transparent 70%);
  animation: float-particle linear infinite;
  opacity: 0.3;
  filter: blur(8px);
}

@keyframes float-particle {
  0% {
    transform: translateY(0) translateX(0) scale(1);
    opacity: 0;
  }
  10% {
    opacity: 0.5;
  }
  90% {
    opacity: 0.5;
  }
  100% {
    transform: translateY(-100vh) translateX(100px) scale(1.5);
    opacity: 0;
  }
}

/* Animated Gradient Text */
.gradient-text-animated {
  background: linear-gradient(
    270deg,
    var(--primary),
    var(--secondary),
    var(--accent),
    var(--success),
    var(--warning),
    var(--primary)
  );
  background-size: 400% 400%;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  animation: gradient-shift 8s ease infinite;
  font-weight: 900;
}

@keyframes gradient-shift {
  0% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
  100% { background-position: 0% 50%; }
}

a { text-decoration: none; color: inherit; }
ul { list-style: none; }
img { max-width: 100%; display: block; }
button { font-family: inherit; }

/* --- Layout --- */
.container {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 1.25rem;
}
@media (min-width: 640px)  { .container { padding: 0 2rem; } }
@media (min-width: 1024px) { .container { padding: 0 2.5rem; } }

/* --- Utility --- */
.gradient-text {
  background: var(--gradient-text);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* =========================================
   NAVBAR
   ========================================= */
.navbar {
  position: sticky;
  top: 0;
  z-index: 200;
  height: var(--nav-h);
  background: rgba(255, 255, 255, 0.7);
  backdrop-filter: blur(12px) saturate(180%);
  -webkit-backdrop-filter: blur(12px) saturate(180%);
  border-bottom: 1px solid rgba(255, 255, 255, 0.125);
  transition: all var(--transition);
}

[data-theme="dark"] .navbar {
  background: rgba(15, 23, 42, 0.7);
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.nav-content {
  height: var(--nav-h);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

/* Logo */
.logo {
  font-size: 1.35rem;
  font-weight: 800;
  letter-spacing: -0.5px;
  display: flex;
  align-items: center;
  gap: 0.1rem;
  flex-shrink: 0;
}
.logo .logo-w { color: var(--text); }
.logo .logo-k { color: var(--primary); }
.logo .logo-tag {
  font-size: 0.6rem;
  font-weight: 600;
  background: var(--gradient);
  color: white;
  padding: 0.1rem 0.4rem;
  border-radius: var(--radius-full);
  margin-left: 0.4rem;
  letter-spacing: 0;
  vertical-align: middle;
}

/* Desktop Nav */
.nav-links {
  display: flex;
  align-items: center;
  gap: 0.25rem;
}
/* Mobile Navigation Improvements */
@media (max-width: 767px) {
  .nav-links {
    display: none;
    position: fixed;
    inset: var(--nav-h) 0 0 0;
    background: var(--surface);
    flex-direction: column;
    align-items: stretch;
    padding: 1.5rem;
    gap: 0.5rem;
    z-index: 199;
    border-top: 1px solid var(--border);
    overflow-y: auto;
    animation: slideDown 0.25s ease;
  }
  
  .nav-links.open {
    display: flex;
  }
  
  .nav-links a {
    padding: 1rem 1.25rem;
    font-size: 1.1rem;
    border-radius: var(--radius-md);
    border: 1px solid transparent;
    transition: all var(--transition);
  }
  
  .nav-links a:hover,
  .nav-links a.active {
    background: var(--primary-glow);
    border-color: var(--primary);
  }
  
  /* Larger touch targets for mobile */
  .filter-btn {
    padding: 0.75rem 1.25rem;
    font-size: 0.9rem;
    min-height: 48px; /* Touch-friendly size */
  }
  
  .tool-card {
    padding: 1.5rem;
    margin-bottom: 1rem;
  }
  
  .hero-title {
    font-size: clamp(1.8rem, 8vw, 2.5rem);
  }
  
  .hero-sub {
    font-size: clamp(0.95rem, 4vw, 1.1rem);
    padding: 0 0.5rem;
  }
  
  .hero-cta {
    flex-direction: column;
    width: 100%;
    padding: 0 1rem;
  }
  
  .btn {
    width: 100%;
    justify-content: center;
    padding: 1rem 1.5rem;
    font-size: 1rem;
  }
  
  .hero-stats {
    gap: 1.5rem;
    flex-wrap: wrap;
  }
  
  .stat-number {
    font-size: 1.5rem;
  }
  
  .stat-label {
    font-size: 0.75rem;
  }
  
  /* Improved social share for mobile */
  .social-share {
    flex-direction: column;
    padding: 1rem;
    gap: 1rem;
  }
  
  .share-text {
    font-size: 0.9rem;
    text-align: center;
  }
  
  .share-buttons {
    flex-wrap: wrap;
    justify-content: center;
  }
  
  .share-btn {
    width: 48px; /* Larger touch target */
    height: 48px;
  }
  
  /* Better search modal on mobile */
  .search-modal-content {
    max-width: calc(100% - 2rem);
    margin: 1rem;
  }
  
  #global-search {
    font-size: 1.1rem; /* Larger text input */
  }
  
  .search-result-item {
    padding: 1rem;
    min-height: 72px; /* Touch-friendly */
  }
  
  /* Enhanced AI chatbot for mobile */
  .ai-assistant {
    bottom: 6rem;
    right: 1rem;
    left: 1rem;
    width: auto;
    max-width: none;
  }
  
  .ai-trigger {
    bottom: 1rem;
    right: 1rem;
    width: 60px;
    height: 60px;
  }
  
  /* Breadcrumb mobile optimization */
  .breadcrumb {
    width: calc(100% - 2rem);
    margin: 0 1rem 1.5rem;
    padding: 0.625rem 1rem;
  }
  
  .breadcrumb-list {
    font-size: 0.8rem;
  }
}

/* Ultra-small screens */
@media (max-width: 375px) {
  .container {
    padding: 0 1rem;
  }
  
  .hero-title {
    font-size: 1.6rem;
  }
  
  .section-title {
    font-size: 1.4rem;
  }
  
  .tools-grid {
    grid-template-columns: 1fr;
    gap: 0.75rem;
  }
  
  .footer-grid {
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }
}

/* Tablet optimizations */
@media (min-width: 768px) and (max-width: 1024px) {
  .tools-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem;
  }
  
  .hero-stats {
    gap: 2rem;
  }
}

@keyframes slideDown {
  from { opacity: 0; transform: translateY(-10px); }
  to   { opacity: 1; transform: translateY(0); }
}

.nav-links a {
  padding: 0.5rem 0.875rem;
  border-radius: var(--radius-sm);
  font-weight: 500;
  font-size: 0.95rem;
  color: var(--text-muted);
  transition: color var(--transition), background var(--transition);
}
.nav-links a:hover,
.nav-links a.active {
  color: var(--primary);
  background: var(--primary-glow);
}
@media (max-width: 767px) {
  .nav-links a {
    padding: 0.875rem 1rem;
    font-size: 1.05rem;
    border-radius: var(--radius-md);
    border: 1px solid transparent;
  }
  .nav-links a:hover { border-color: var(--border); }
}

/* Nav Actions */
.nav-actions {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

#theme-toggle {
  width: 40px; height: 40px;
  border-radius: var(--radius-full);
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text-muted);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all var(--transition);
}
#theme-toggle:hover { border-color: var(--primary); color: var(--primary); }

/* Mobile Hamburger */
.hamburger {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 40px; height: 40px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background: none;
  cursor: pointer;
  padding: 0;
  flex-shrink: 0;
}
@media (max-width: 767px) { .hamburger { display: flex; } }

.hamburger span {
  display: block;
  width: 20px; height: 2px;
  background: var(--text);
  border-radius: 2px;
  margin: 0 auto;
  transition: all 0.3s ease;
  transform-origin: center;
}
.hamburger.open span:nth-child(1) { transform: rotate(45deg) translate(5px, 5px); }
.hamburger.open span:nth-child(2) { opacity: 0; }
.hamburger.open span:nth-child(3) { transform: rotate(-45deg) translate(5px, -5px); }

/* =========================================
   HERO SECTION
   ========================================= */
.hero-section {
  padding: 5rem 0 4rem;
  text-align: center;
  position: relative;
  overflow: hidden;
}
@media (max-width: 767px) { .hero-section { padding: 3rem 0 2.5rem; } }

/* Background blobs */
.hero-section::before,
.hero-section::after {
  content: '';
  position: absolute;
  border-radius: 50%;
  filter: blur(80px);
  pointer-events: none;
  z-index: 0;
}
.hero-section::before {
  width: 500px; height: 500px;
  top: -150px; left: -100px;
  background: radial-gradient(circle, rgba(79,70,229,0.15) 0%, transparent 70%);
}
.hero-section::after {
  width: 400px; height: 400px;
  bottom: -100px; right: -80px;
  background: radial-gradient(circle, rgba(124,58,237,0.12) 0%, transparent 70%);
}

.hero-section .container { position: relative; z-index: 1; }

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  background: var(--primary-glow);
  border: 1px solid rgba(99,102,241,0.3);
  color: var(--primary-light);
  font-size: 0.8rem;
  font-weight: 600;
  padding: 0.35rem 0.875rem;
  border-radius: var(--radius-full);
  margin-bottom: 1.5rem;
  animation: fadeInUp 0.6s ease both;
}

.hero-title {
  font-size: clamp(2.2rem, 6vw, 4.5rem);
  font-weight: 900;
  line-height: 1.08;
  letter-spacing: -1.5px;
  margin-bottom: 1.25rem;
  animation: fadeInUp 0.7s ease 0.1s both;
}

.hero-sub {
  font-size: clamp(1rem, 2.5vw, 1.25rem);
  color: var(--text-muted);
  max-width: 580px;
  margin: 0 auto 2.5rem;
  line-height: 1.7;
  animation: fadeInUp 0.7s ease 0.2s both;
}

.hero-cta {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 0.875rem;
  animation: fadeInUp 0.7s ease 0.3s both;
}

@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(20px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* Hero Stats */
.hero-stats {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 2.5rem;
  flex-wrap: wrap;
  margin-top: 3.5rem;
  padding-top: 2.5rem;
  border-top: 1px solid var(--border);
  animation: fadeInUp 0.7s ease 0.4s both;
}
.stat-item { text-align: center; }
.stat-number {
  font-size: 2rem;
  font-weight: 800;
  background: var(--gradient-text);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  line-height: 1.1;
}
.stat-label { font-size: 0.8rem; color: var(--text-muted); font-weight: 500; margin-top: 0.25rem; }

/* =========================================
   BUTTONS
   ========================================= */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.75rem 1.625rem;
  font-family: var(--font);
  font-size: 0.95rem;
  font-weight: 600;
  border-radius: var(--radius-full);
  border: none;
  cursor: pointer;
  transition: all var(--transition);
  white-space: nowrap;
  min-height: 48px; /* Touch-friendly */
  touch-action: manipulation; /* Better touch response */
  -webkit-tap-highlight-color: transparent; /* Remove blue highlight on tap */
}
.btn-primary {
  background: var(--gradient);
  color: white;
  box-shadow: 0 4px 20px var(--primary-glow);
}
.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 28px var(--primary-glow);
}
.btn-primary:active {
  transform: scale(0.98); /* Press effect */
}
.btn-ghost {
  background: var(--surface);
  color: var(--text);
  border: 1px solid var(--border);
}
.btn-ghost:hover {
  border-color: var(--primary);
  color: var(--primary);
  transform: translateY(-2px);
}
.btn-sm { padding: 0.5rem 1.125rem; font-size: 0.875rem; }

/* Mobile-first button improvements */
@media (max-width: 767px) {
  .btn {
    padding: 1rem 1.5rem;
    font-size: 1rem;
    min-height: 56px; /* Larger on mobile */
  }
  
  /* Add ripple effect for touch feedback */
  .btn {
    position: relative;
    overflow: hidden;
  }
  
  .btn::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.3);
    transform: translate(-50%, -50%);
    transition: width 0.6s, height 0.6s;
  }
  
  .btn:active::after {
    width: 300px;
    height: 300px;
  }
}

/* =========================================
   SECTION HEADERS
   ========================================= */
.section-header {
  text-align: center;
  margin-bottom: 3rem;
}
.section-label {
  display: inline-block;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--primary);
  margin-bottom: 0.75rem;
}
.section-title {
  font-size: clamp(1.75rem, 4vw, 2.75rem);
  font-weight: 800;
  letter-spacing: -0.75px;
  margin-bottom: 0.75rem;
}
.section-desc {
  color: var(--text-muted);
  font-size: 1rem;
  max-width: 540px;
  margin: 0 auto;
  line-height: 1.7;
}

/* Breadcrumb Navigation */
.breadcrumb {
  margin-bottom: 2rem;
  padding: 0.75rem 1.25rem;
  background: var(--surface-2);
  border-radius: var(--radius-full);
  border: 1px solid var(--border);
  display: inline-block;
}
.breadcrumb-list {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  list-style: none;
  margin: 0;
  padding: 0;
}
.breadcrumb-item {
  font-size: 0.875rem;
  color: var(--text-muted);
  transition: color var(--transition);
}
.breadcrumb-item a {
  color: var(--primary);
  font-weight: 600;
}
.breadcrumb-item a:hover {
  color: var(--primary-light);
  text-decoration: underline;
}
.breadcrumb-item.active {
  color: var(--text);
  font-weight: 600;
}
.breadcrumb-item + .breadcrumb-item::before {
  content: '/';
  color: var(--text-muted);
  margin-left: 0.5rem;
}

/* Social Share */
.social-share {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1rem;
  margin-bottom: 2.5rem;
  padding: 1rem 1.5rem;
  background: var(--surface-2);
  border-radius: var(--radius-lg);
  border: 1px solid var(--border);
  flex-wrap: wrap;
}
.share-text {
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--text-muted);
}
.share-buttons {
  display: flex;
  gap: 0.5rem;
  align-items: center;
}
.share-btn {
  width: 40px;
  height: 40px;
  border-radius: var(--radius-full);
  border: 2px solid var(--border);
  background: var(--surface);
  color: var(--text-muted);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all var(--transition);
  position: relative;
  overflow: hidden;
}
.share-btn::before {
  content: '';
  position: absolute;
  inset: 0;
  background: var(--gradient);
  opacity: 0;
  transition: opacity var(--transition);
  z-index: 0;
}
.share-btn:hover {
  transform: translateY(-3px) scale(1.1);
  border-color: transparent;
  box-shadow: 0 8px 20px var(--primary-glow);
}
.share-btn:hover::before {
  opacity: 0.15;
}
.share-btn svg {
  position: relative;
  z-index: 1;
  transition: transform var(--transition);
}
.share-btn:hover svg {
  transform: scale(1.15) rotate(5deg);
}
.share-btn.twitter:hover { color: #1DA1F2; }
.share-btn.facebook:hover { color: #1877F2; }
.share-btn.linkedin:hover { color: #0A66C2; }
.share-btn.whatsapp:hover { color: #25D366; }
.share-btn.copy-link:hover { color: var(--primary); }

@media (max-width: 767px) {
  .social-share {
    flex-direction: column;
    gap: 1rem;
  }
  .share-text {
    font-size: 0.85rem;
  }
  .share-btn {
    width: 36px;
    height: 36px;
  }
}

/* =========================================
   FEATURES SECTION
   ========================================= */
.features-section {
  padding: 5rem 0;
}
@media (max-width: 767px) { .features-section { padding: 3rem 0; } }

.features-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 1.25rem;
}

.feature-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 1.75rem;
  transition: all var(--transition);
  position: relative;
  overflow: hidden;
}
.feature-card:hover {
  border-color: var(--primary);
  box-shadow: var(--shadow-md), 0 0 0 1px var(--primary-glow);
  transform: translateY(-4px);
}
.feature-icon {
  width: 52px; height: 52px;
  border-radius: var(--radius-md);
  background: var(--primary-glow);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  margin-bottom: 1.25rem;
}
.feature-card h3 { font-size: 1.05rem; font-weight: 700; margin-bottom: 0.5rem; }
.feature-card p { color: var(--text-muted); font-size: 0.9rem; line-height: 1.65; }

/* =========================================
   TOOLS SECTION
   ========================================= */
.tools-section {
  padding: 4rem 0 5rem;
}
@media (max-width: 767px) { .tools-section { padding: 2.5rem 0 3.5rem; } }

/* Category Filter */
.tools-filter {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  justify-content: center;
  margin-bottom: 2.5rem;
}
.filter-btn {
  padding: 0.45rem 1rem;
  font-size: 0.85rem;
  font-weight: 600;
  border-radius: var(--radius-full);
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text-muted);
  cursor: pointer;
  transition: all var(--transition);
  font-family: var(--font);
}
.filter-btn:hover, .filter-btn.active {
  background: var(--gradient);
  color: white;
  border-color: transparent;
  box-shadow: 0 4px 12px var(--primary-glow);
}

/* Tools Grid */
.tools-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1rem;
}
@media (min-width: 480px)  { .tools-grid { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 768px)  { .tools-grid { grid-template-columns: repeat(3, 1fr); gap: 1.125rem; } }
@media (min-width: 1024px) { .tools-grid { grid-template-columns: repeat(4, 1fr); gap: 1.25rem; } }

.tool-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 1.25rem 1.375rem;
  display: flex;
  flex-direction: column;
  gap: 0.375rem;
  position: relative;
  overflow: hidden;
  transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  cursor: pointer;
  transform-style: preserve-3d;
  perspective: 1000px;
}
.tool-card::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, var(--primary-glow) 0%, var(--secondary-light) 100%);
  opacity: 0;
  transition: opacity 0.4s ease;
  z-index: 0;
}
.tool-card::after {
  content: '';
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: linear-gradient(
    45deg,
    transparent 30%,
    rgba(255, 255, 255, 0.1) 50%,
    transparent 70%
  );
  transform: rotate(45deg);
  transition: all 0.6s ease;
  opacity: 0;
  z-index: 1;
}
.tool-card:hover {
  border-color: var(--primary);
  transform: translateY(-8px) scale(1.02);
  box-shadow: 
    0 20px 40px rgba(0,0,0,0.2),
    0 0 0 1px var(--primary-glow),
    inset 0 0 20px var(--primary-glow);
  filter: brightness(1.05);
}
.tool-card:hover::before { opacity: 0.08; }
.tool-card:hover::after {
  opacity: 1;
  left: 100%;
  transition: all 0.8s ease;
}

.tool-card-icon {
  font-size: 1.5rem;
  margin-bottom: 0.5rem;
  display: block;
  position: relative;
  z-index: 1;
  transition: transform 0.3s ease;
  animation: icon-bounce 2s ease-in-out infinite;
}
@keyframes icon-bounce {
  0%, 100% { transform: translateY(0) rotate(0deg); }
  50% { transform: translateY(-3px) rotate(5deg); }
}
.tool-card:hover .tool-card-icon {
  transform: scale(1.2) rotate(-10deg);
  animation: none;
}
.tool-card h3 {
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--text);
  position: relative;
  z-index: 1;
  line-height: 1.3;
  transition: color 0.3s ease;
}
.tool-card:hover h3 {
  color: var(--primary);
}
.tool-card p {
  font-size: 0.8rem;
  color: var(--text-muted);
  position: relative;
  z-index: 1;
  line-height: 1.5;
  flex: 1;
  transition: color 0.3s ease;
}
.tool-card:hover p {
  color: var(--text);
}
.tool-card-arrow {
  font-size: 0.75rem;
  color: var(--primary);
  font-weight: 600;
  margin-top: 0.75rem;
  display: flex;
  align-items: center;
  gap: 0.25rem;
  position: relative;
  z-index: 1;
  transition: all 0.3s ease;
}
.tool-card:hover .tool-card-arrow { 
  gap: 0.5rem;
  transform: translateX(5px);
}

/* Tool Category Tags */
.tool-tag {
  display: inline-block;
  font-size: 0.65rem;
  font-weight: 700;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  padding: 0.15rem 0.4rem;
  border-radius: var(--radius-full);
  background: var(--primary-glow);
  color: var(--primary-light);
  position: absolute;
  top: 0.75rem;
  right: 0.75rem;
  z-index: 1;
}

/* =========================================
   CTA BANNER
   ========================================= */
.cta-section {
  padding: 5rem 0;
}
@media (max-width: 767px) { .cta-section { padding: 3rem 0; } }

.cta-banner {
  background: var(--gradient);
  border-radius: var(--radius-xl);
  padding: 3.5rem 2rem;
  text-align: center;
  position: relative;
  overflow: hidden;
}
.cta-banner::before {
  content: '';
  position: absolute;
  inset: 0;
  background: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23ffffff' fill-opacity='0.05'%3E%3Ccircle cx='30' cy='30' r='2'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
}
.cta-banner * { position: relative; z-index: 1; }
.cta-banner h2 {
  font-size: clamp(1.75rem, 4vw, 2.75rem);
  font-weight: 800;
  color: white;
  margin-bottom: 0.875rem;
}
.cta-banner p {
  color: rgba(255,255,255,0.8);
  font-size: 1.05rem;
  margin-bottom: 2rem;
  max-width: 480px;
  margin-left: auto;
  margin-right: auto;
}
.btn-white {
  background: white;
  color: var(--primary);
  font-weight: 700;
}
.btn-white:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(0,0,0,0.2);
}
.btn-ghost-white {
  background: rgba(255,255,255,0.15);
  color: white;
  border: 1px solid rgba(255,255,255,0.3);
}
.btn-ghost-white:hover {
  background: rgba(255,255,255,0.25);
  transform: translateY(-2px);
}

/* =========================================
   FOOTER
   ========================================= */
.footer {
  background: var(--surface);
  border-top: 1px solid var(--border);
  padding: 4rem 0 2rem;
  margin-top: auto;
}
.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 2.5rem;
  margin-bottom: 3rem;
}
@media (max-width: 899px) {
  .footer-grid { grid-template-columns: 1fr 1fr; gap: 2rem; }
}
@media (max-width: 540px) {
  .footer-grid { grid-template-columns: 1fr; gap: 1.5rem; }
}

.footer-brand p {
  color: var(--text-muted);
  font-size: 0.9rem;
  line-height: 1.7;
  margin: 0.875rem 0 1.25rem;
  max-width: 280px;
}
.footer-social {
  display: flex; gap: 0.625rem;
}
.social-btn {
  width: 36px; height: 36px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background: none;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-size: 0.9rem;
  transition: all var(--transition);
  text-decoration: none;
}
.social-btn:hover { border-color: var(--primary); color: var(--primary); }

.footer-col h4 {
  font-size: 0.85rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--text);
  margin-bottom: 1rem;
}
.footer-col ul li { margin-bottom: 0.625rem; }
.footer-col ul a {
  font-size: 0.875rem;
  color: var(--text-muted);
  transition: color var(--transition);
}
.footer-col ul a:hover { color: var(--primary); }

.footer-bottom {
  padding-top: 1.5rem;
  border-top: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0.75rem;
}
.footer-bottom p { font-size: 0.85rem; color: var(--text-muted); }
.footer-legal { display: flex; gap: 1.25rem; }
.footer-legal a {
  font-size: 0.8rem;
  color: var(--text-muted);
  transition: color var(--transition);
}
.footer-legal a:hover { color: var(--primary); }

/* =========================================
   AD PLACEHOLDERS
   ========================================= */
.ad-placeholder {
  background: var(--surface-2);
  border: 1px dashed var(--border);
  color: var(--text-muted);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.8rem;
  border-radius: var(--radius-sm);
}
.header-ad { height: 70px; margin: 0.5rem 0; }
@media (max-width: 767px) { .header-ad { height: 50px; } }

/* =========================================
   TOOL PAGE LAYOUT
   ========================================= */
.main-content { flex: 1; padding-bottom: 3rem; }

.tool-wrapper {
  max-width: 860px;
  margin: 2rem auto;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-md);
}
@media (max-width: 767px) { .tool-wrapper { margin: 1rem auto; } }

.tool-header {
  background: var(--gradient);
  padding: 2rem 2rem 1.75rem;
  color: white;
  text-align: center;
}
@media (max-width: 767px) { .tool-header { padding: 1.5rem; } }

.tool-header h1 {
  font-size: clamp(1.4rem, 4vw, 2rem);
  font-weight: 800;
  margin-bottom: 0.375rem;
}
.tool-header p { font-size: 0.95rem; opacity: 0.85; }

.tool-interface {
  padding: 2rem;
  min-height: 200px;
}
@media (max-width: 767px) { .tool-interface { padding: 1.25rem; } }

/* Back link */
.back-link {
  display: inline-flex;
  align-items: center;
  gap: 0.375rem;
  font-size: 0.875rem;
  color: var(--text-muted);
  padding: 0.625rem 0;
  transition: color var(--transition);
  margin-bottom: 0.5rem;
}
.back-link:hover { color: var(--primary); }

/* =========================================
   FORM CONTROLS
   ========================================= */
.form-group { margin-bottom: 1.125rem; }

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

.form-control {
  width: 100%;
  padding: 0.75rem 1rem;
  font-family: var(--font);
  font-size: 0.95rem;
  color: var(--text);
  background: var(--bg);
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  outline: none;
  transition: border-color var(--transition), box-shadow var(--transition);
}
.form-control:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px var(--primary-glow);
}
textarea.form-control { resize: vertical; min-height: 120px; }

/* Result Box */
.result-box {
  background: var(--bg);
  border: 1.5px dashed var(--primary);
  border-radius: var(--radius-sm);
  padding: 1rem;
  margin-top: 1rem;
  min-height: 48px;
  word-break: break-all;
}

/* =========================================
   AI CHATBOT
   ========================================= */
.ai-trigger {
  position: fixed;
  bottom: 1.5rem;
  right: 1.5rem;
  width: 56px; height: 56px;
  border-radius: var(--radius-full);
  background: var(--gradient);
  color: white;
  border: none;
  font-size: 1.375rem;
  cursor: pointer;
  box-shadow: 0 6px 24px var(--primary-glow);
  z-index: 1000;
  transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1), box-shadow var(--transition);
  display: flex;
  align-items: center;
  justify-content: center;
}
.ai-trigger:hover {
  transform: scale(1.12);
  box-shadow: 0 10px 32px var(--primary-glow);
}

/* Search Trigger Button */
.search-trigger {
  position: fixed;
  bottom: 8.5rem;
  right: 1.5rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.75rem 1rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-full);
  color: var(--text-muted);
  font-size: 0.875rem;
  font-weight: 600;
  cursor: pointer;
  box-shadow: var(--shadow-md);
  z-index: 999;
  transition: all var(--transition);
}
.search-trigger:hover {
  border-color: var(--primary);
  color: var(--primary);
  box-shadow: var(--shadow-glow);
}
.search-trigger kbd {
  background: var(--surface-2);
  padding: 0.15rem 0.4rem;
  border-radius: var(--radius-sm);
  font-size: 0.75rem;
  font-family: inherit;
  border: 1px solid var(--border);
}
@media (max-width: 767px) {
  .search-trigger {
    bottom: 7.5rem;
    padding: 0.5rem 0.75rem;
  }
  .search-trigger span { display: none; }
}

/* Search Modal */
.search-modal {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.7);
  backdrop-filter: blur(4px);
  z-index: 2000;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding-top: 10vh;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease;
}
.search-modal.active {
  opacity: 1;
  pointer-events: all;
}

.search-modal-content {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  width: 100%;
  max-width: 640px;
  box-shadow: var(--shadow-xl);
  overflow: hidden;
  transform: translateY(-20px);
  transition: transform 0.2s ease;
}
.search-modal.active .search-modal-content {
  transform: translateY(0);
}

.search-header {
  display: flex;
  align-items: center;
  padding: 1rem 1.25rem;
  border-bottom: 1px solid var(--border);
  gap: 0.75rem;
}
.search-icon {
  color: var(--text-muted);
  flex-shrink: 0;
}
#global-search {
  flex: 1;
  border: none;
  outline: none;
  font-size: 1rem;
  font-family: var(--font-primary);
  color: var(--text);
  background: transparent;
}
.search-close-btn {
  background: var(--surface-2);
  border: none;
  color: var(--text-muted);
  width: 32px; height: 32px;
  border-radius: var(--radius-full);
  cursor: pointer;
  font-size: 1.25rem;
  line-height: 1;
  transition: all var(--transition);
  flex-shrink: 0;
}
.search-close-btn:hover {
  background: var(--danger);
  color: white;
}

.search-results {
  max-height: 420px;
  overflow-y: auto;
  padding: 0.75rem;
}
.search-hint {
  padding: 1.5rem;
  text-align: center;
  color: var(--text-muted);
}
.search-hint p {
  font-size: 0.95rem;
  margin-bottom: 1rem;
}
.search-result-item {
  display: flex;
  align-items: center;
  gap: 0.875rem;
  padding: 0.875rem 1rem;
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: all var(--transition);
  text-decoration: none;
  color: var(--text);
  margin-bottom: 0.25rem;
}
.search-result-item:hover {
  background: var(--surface-2);
  border-color: var(--primary);
}
.search-result-item.active {
  background: var(--primary-glow);
  border-color: var(--primary);
}
.search-result-icon {
  font-size: 1.25rem;
  flex-shrink: 0;
}
.search-result-info {
  flex: 1;
  min-width: 0;
}
.search-result-title {
  font-weight: 600;
  font-size: 0.95rem;
  color: var(--text);
  margin-bottom: 0.15rem;
}
.search-result-desc {
  font-size: 0.8rem;
  color: var(--text-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.search-result-tag {
  font-size: 0.7rem;
  padding: 0.15rem 0.5rem;
  border-radius: var(--radius-full);
  background: var(--primary-glow);
  color: var(--primary-light);
  font-weight: 600;
  flex-shrink: 0;
}

.search-footer {
  display: flex;
  justify-content: space-between;
  padding: 0.75rem 1.25rem;
  border-top: 1px solid var(--border);
  background: var(--surface-2);
  font-size: 0.75rem;
  color: var(--text-muted);
}
.shortcut-hint {
  display: flex;
  align-items: center;
  gap: 0.25rem;
}
.shortcut-hint kbd {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 0.1rem 0.4rem;
  font-size: 0.7rem;
  font-family: inherit;
}

/* AI Chatbot Styles (existing) */

.ai-assistant {
  position: fixed;
  bottom: 5.5rem;
  right: 1.5rem;
  width: 340px;
  max-width: calc(100vw - 2rem);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  z-index: 1000;
  transform: scale(0.95) translateY(10px);
  opacity: 0;
  pointer-events: none;
  transform-origin: bottom right;
  transition: transform 0.25s cubic-bezier(0.34, 1.56, 0.64, 1), opacity 0.2s ease;
  height: 420px;
}
.ai-assistant.active {
  transform: scale(1) translateY(0);
  opacity: 1;
  pointer-events: all;
}

.ai-chat-header {
  background: var(--gradient);
  padding: 0.875rem 1rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  color: white;
  font-weight: 700;
  flex-shrink: 0;
}
.ai-chat-header button {
  background: rgba(255,255,255,0.2);
  border: none;
  color: white;
  width: 28px; height: 28px;
  border-radius: var(--radius-full);
  cursor: pointer;
  font-size: 1rem;
  line-height: 1;
  transition: background var(--transition);
}
.ai-chat-header button:hover { background: rgba(255,255,255,0.3); }

.ai-chat-body {
  flex: 1;
  overflow-y: auto;
  padding: 1rem;
  display: flex;
  flex-direction: column;
  gap: 0.625rem;
}

.ai-msg, .user-msg {
  padding: 0.625rem 0.875rem;
  border-radius: var(--radius-md);
  font-size: 0.875rem;
  line-height: 1.55;
  max-width: 85%;
}
.ai-msg { background: var(--surface-2); border: 1px solid var(--border); align-self: flex-start; }
.user-msg { background: var(--gradient); color: white; align-self: flex-end; }

.ai-chat-input {
  padding: 0.75rem;
  border-top: 1px solid var(--border);
  display: flex;
  gap: 0.5rem;
  flex-shrink: 0;
}
.ai-chat-input input {
  flex: 1;
  padding: 0.5rem 0.75rem;
  font-family: var(--font);
  font-size: 0.875rem;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text);
  outline: none;
  transition: border-color var(--transition);
}
.ai-chat-input input:focus { border-color: var(--primary); }
.ai-chat-input button {
  background: var(--gradient);
  color: white;
  border: none;
  padding: 0.5rem 0.875rem;
  border-radius: var(--radius-sm);
  font-family: var(--font);
  font-weight: 600;
  font-size: 0.875rem;
  cursor: pointer;
  transition: opacity var(--transition);
}
.ai-chat-input button:hover { opacity: 0.85; }

/* =========================================
   SKIP LINK (Accessibility)
   ========================================= */
.skip-link {
  position: absolute;
  top: -100%;
  left: 1rem;
  background: var(--primary);
  color: white;
  padding: 0.5rem 1rem;
  border-radius: var(--radius-sm);
  font-weight: 600;
  z-index: 9999;
  transition: top 0.2s;
}
.skip-link:focus { top: 1rem; }

/* =========================================
   BLOG STYLES
   ========================================= */
.blog-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.25rem;
}
@media (min-width: 640px)  { .blog-grid { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1024px) { .blog-grid { grid-template-columns: repeat(3, 1fr); } }

.blog-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 1.5rem;
  transition: all var(--transition);
  display: flex;
  flex-direction: column;
}
.blog-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-md); border-color: var(--primary); }
.blog-card h3 { font-size: 1.05rem; font-weight: 700; margin-bottom: 0.5rem; }
.blog-card p { color: var(--text-muted); font-size: 0.875rem; flex: 1; line-height: 1.65; margin-bottom: 1rem; }
.blog-card a { color: var(--primary); font-weight: 600; font-size: 0.875rem; }

/* --- Advanced Components --- */
.badge {
  display: inline-flex;
  align-items: center;
  padding: 0.25rem 0.75rem;
  font-size: 0.75rem;
  font-weight: 600;
  border-radius: var(--radius-full);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.badge-primary {
  background: var(--primary);
  color: white;
}

.badge-success {
  background: var(--success);
  color: white;
}

.badge-warning {
  background: var(--warning);
  color: white;
}

.badge-danger {
  background: var(--danger);
  color: white;
}

.badge-secondary {
  background: var(--secondary);
  color: white;
}

.alert {
  padding: 1rem 1.25rem;
  border-radius: var(--radius-md);
  border: 1px solid;
  margin-bottom: 1rem;
}

.alert-success {
  background: rgba(16, 185, 129, 0.1);
  border-color: var(--success);
  color: var(--success);
}

.alert-warning {
  background: rgba(245, 158, 11, 0.1);
  border-color: var(--warning);
  color: var(--warning);
}

.alert-danger {
  background: rgba(239, 68, 68, 0.1);
  border-color: var(--danger);
  color: var(--danger);
}

.alert-info {
  background: rgba(14, 165, 233, 0.1);
  border-color: var(--info);
  color: var(--info);
}

.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
  box-shadow: var(--shadow-sm);
  transition: all var(--transition);
}

.card:hover {
  box-shadow: var(--shadow-md);
  transform: translateY(-2px);
}

.card-header {
  border-bottom: 1px solid var(--border);
  padding-bottom: 1rem;
  margin-bottom: 1rem;
}

.card-footer {
  border-top: 1px solid var(--border);
  padding-top: 1rem;
  margin-top: 1rem;
}

.progress {
  width: 100%;
  height: 0.5rem;
  background: var(--surface-2);
  border-radius: var(--radius-full);
  overflow: hidden;
}

.progress-bar {
  height: 100%;
  background: var(--gradient);
  border-radius: var(--radius-full);
  transition: width 0.3s ease;
}

.skeleton {
  background: linear-gradient(90deg, var(--surface-2) 25%, var(--surface-3) 50%, var(--surface-2) 75%);
  background-size: 200% 100%;
  animation: skeleton-loading 1.5s infinite;
}

@keyframes skeleton-loading {
  0% { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

.loading {
  display: inline-block;
  width: 20px;
  height: 20px;
  border: 2px solid var(--border);
  border-radius: 50%;
  border-top-color: var(--primary);
  animation: spin 1s ease-in-out infinite;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

.tooltip {
  position: relative;
  cursor: help;
}

.tooltip::after {
  content: attr(data-tooltip);
  position: absolute;
  bottom: 100%;
  left: 50%;
  transform: translateX(-50%);
  background: var(--text);
  color: var(--surface);
  padding: 0.5rem 0.75rem;
  border-radius: var(--radius-sm);
  font-size: 0.875rem;
  white-space: nowrap;
  opacity: 0;
  pointer-events: none;
  transition: opacity var(--transition);
  z-index: 1000;
}

.tooltip:hover::after {
  opacity: 1;
}

/* --- Enhanced Tool Page Styles --- */
.tool-content {
  padding: 2rem;
  max-width: 1000px;
  margin: 0 auto;
}

.tool-section {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 2rem;
  margin-bottom: 2rem;
  box-shadow: var(--shadow-sm);
}

.tool-section h3 {
  font-size: 1.25rem;
  font-weight: 700;
  margin-bottom: 1.5rem;
  color: var(--text);
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.tool-section h3 i {
  color: var(--primary);
  font-size: 1rem;
}

.input-group {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  margin-bottom: 1rem;
}

.input-group label {
  font-weight: 600;
  color: var(--text);
  font-size: 0.875rem;
}

.input-group input,
.input-group select,
.input-group textarea {
  padding: 0.75rem 1rem;
  border: 2px solid var(--border);
  border-radius: var(--radius-md);
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-secondary);
  font-size: 0.95rem;
  transition: all var(--transition);
}

.input-group input:focus,
.input-group select:focus,
.input-group textarea:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px var(--primary-glow);
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.75rem 1.5rem;
  font-family: var(--font-primary);
  font-size: 0.875rem;
  font-weight: 600;
  border-radius: var(--radius-md);
  border: none;
  cursor: pointer;
  transition: all var(--transition);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.btn-primary {
  background: var(--gradient);
  color: white;
  box-shadow: var(--shadow-md);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-lg);
}

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

.btn-secondary:hover {
  border-color: var(--primary);
  color: var(--primary);
}

.btn-success {
  background: var(--gradient-success);
  color: white;
}

.btn-warning {
  background: var(--gradient-warning);
  color: white;
}

.btn-danger {
  background: var(--gradient-danger);
  color: white;
}

.btn-sm {
  padding: 0.5rem 1rem;
  font-size: 0.75rem;
}

.btn-lg {
  padding: 1rem 2rem;
  font-size: 1rem;
}

.results-section {
  background: var(--surface-2);
  border: 2px dashed var(--border);
  border-radius: var(--radius-lg);
  padding: 2rem;
  margin-top: 2rem;
  min-height: 100px;
}

.result {
  font-family: var(--font-secondary);
  line-height: 1.6;
}

.result.success {
  color: var(--success);
  font-weight: 600;
}

.result.error {
  color: var(--danger);
  font-weight: 600;
}

/* --- Utility Classes --- */
.text-center { text-align: center; }
.text-left { text-align: left; }
.text-right { text-align: right; }

.text-primary { color: var(--primary); }
.text-success { color: var(--success); }
.text-warning { color: var(--warning); }
.text-danger { color: var(--danger); }
.text-muted { color: var(--text-muted); }

.bg-primary { background: var(--primary); }
.bg-success { background: var(--success); }
.bg-warning { background: var(--warning); }
.bg-danger { background: var(--danger); }

.d-flex { display: flex; }
.d-block { display: block; }
.d-none { display: none; }

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

.w-100 { width: 100%; }
.h-100 { height: 100%; }

.mt-1 { margin-top: 0.25rem; }
.mt-2 { margin-top: 0.5rem; }
.mt-3 { margin-top: 1rem; }
.mt-4 { margin-top: 1.5rem; }
.mt-5 { margin-top: 2rem; }

.mb-1 { margin-bottom: 0.25rem; }
.mb-2 { margin-bottom: 0.5rem; }
.mb-3 { margin-bottom: 1rem; }
.mb-4 { margin-bottom: 1.5rem; }
.mb-5 { margin-bottom: 2rem; }

.p-1 { padding: 0.25rem; }
.p-2 { padding: 0.5rem; }
.p-3 { padding: 1rem; }
.p-4 { padding: 1.5rem; }
.p-5 { padding: 2rem; }

/* --- Responsive Grid --- */
.grid {
  display: grid;
  gap: 1rem;
}

.grid-cols-1 { grid-template-columns: repeat(1, 1fr); }
.grid-cols-2 { grid-template-columns: repeat(2, 1fr); }
.grid-cols-3 { grid-template-columns: repeat(3, 1fr); }
.grid-cols-4 { grid-template-columns: repeat(4, 1fr); }

@media (max-width: 768px) {
  .grid-cols-2,
  .grid-cols-3,
  .grid-cols-4 {
    grid-template-columns: 1fr;
  }
}

/* --- Animations --- */
.fade-in {
  animation: fadeIn 0.5s ease-in;
}

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

.slide-up {
  animation: slideUp 0.5s ease-out;
}

@keyframes slideUp {
  from { transform: translateY(20px); opacity: 0; }
  to { transform: translateY(0); opacity: 1; }
}

.pulse {
  animation: pulse 2s infinite;
}

@keyframes pulse {
  0% { transform: scale(1); }
  50% { transform: scale(1.05); }
  100% { transform: scale(1); }
}

/* =========================================
   SCROLL ANIMATIONS
   ========================================= */
.reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.55s ease, transform 0.55s ease;
}
.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}

/* Touch-friendly interactions */
@media (max-width: 767px) {
  /* Make all interactive elements larger */
  a, button, input, select, textarea {
    min-height: 48px;
    touch-action: manipulation;
    -webkit-tap-highlight-color: rgba(79, 70, 229, 0.2);
  }
  
  /* Improve text readability on mobile */
  p {
    line-height: 1.8;
    margin-bottom: 1rem;
  }
  
  h1, h2, h3, h4, h5, h6 {
    line-height: 1.3;
    margin-bottom: 0.75rem;
  }
  
  /* Better form controls */
  .form-control {
    font-size: 16px; /* Prevents zoom on iPhone */
    padding: 1rem;
  }
  
  /* Tool cards easier to tap */
  .tool-card {
    margin-bottom: 0.75rem;
  }
  
  /* Filter buttons more visible */
  .filter-btn {
    margin: 0.25rem;
    white-space: nowrap;
  }
  
  /* Search improvements */
  #global-search {
    padding: 1rem;
  }
  
  /* AI chatbot easier to use */
  .ai-chat-body {
    padding: 1rem;
  }
  
  .ai-msg, .user-msg {
    padding: 0.875rem 1rem;
    max-width: 90%;
  }
  
  /* Toast notifications full width on small screens */
  .toast {
    left: 1rem;
    right: 1rem;
    bottom: 1rem;
    max-width: none;
  }
}

/* High contrast mode support */
@media (prefers-contrast: high) {
  .tool-card {
    border-width: 2px;
  }
  
  .btn {
    border: 2px solid currentColor;
  }
}

/* Reduced motion support */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
  
  .particles-container {
    display: none;
  }
}

/* Print styles */
@media print {
  .navbar, .ai-assistant, .search-trigger, .share-buttons, .particles-container {
    display: none !important;
  }
  
  body {
    background: white;
    color: black;
  }
  
  .tool-card {
    break-inside: avoid;
    page-break-inside: avoid;
  }
}

/* =========================================
   PSYCHOLOGICAL DESIGN SECTIONS
   Engagement & Trust Building Elements
   ========================================= */

/* Social Proof Section */
.social-proof-section {
  padding: 3rem 0;
  background: var(--gradient);
  background-attachment: fixed;
  position: relative;
  overflow: hidden;
}

.social-proof-section::before {
  content: '';
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.3);
  z-index: 0;
}

.social-proof-section .container {
  position: relative;
  z-index: 1;
}

.logos-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 1.5rem;
}

.logo-item {
  background: rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(10px);
  padding: 1.5rem;
  border-radius: 0.75rem;
  text-align: center;
  font-weight: 600;
  color: white;
  transition: all 0.3s ease;
  border: 1px solid rgba(255, 255, 255, 0.2);
}

.logo-item:hover {
  background: rgba(255, 255, 255, 0.15);
  transform: translateY(-4px);
  border-color: rgba(255, 255, 255, 0.4);
}

/* Problems Section */
.problems-section {
  padding: 4rem 0;
  background: linear-gradient(180deg, var(--bg-color) 0%, rgba(79, 70, 229, 0.02) 100%);
}

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

.problem-card {
  background: var(--surface);
  padding: 2rem;
  border-radius: 1rem;
  border: 2px solid var(--border);
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
}

.problem-card::before {
  content: '';
  position: absolute;
  top: 0;
  right: 0;
  width: 100px;
  height: 100px;
  background: var(--primary-glow);
  border-radius: 50%;
  opacity: 0;
  transition: opacity 0.3s ease;
}

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

.problem-card:hover::before {
  opacity: 1;
}

.problem-icon {
  font-size: 2.5rem;
  margin-bottom: 1rem;
  display: block;
}

.problem-card h3 {
  font-size: 1.25rem;
  margin-bottom: 0.5rem;
  font-weight: 700;
}

.problem-card p {
  color: var(--text-secondary);
  margin-bottom: 1rem;
  font-size: 0.95rem;
}

.solution {
  display: inline-block;
  background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
  color: white;
  padding: 0.5rem 1rem;
  border-radius: 0.5rem;
  font-weight: 600;
  font-size: 0.9rem;
}

/* Testimonials Section */
.testimonials-section {
  padding: 4rem 0;
  background: var(--bg-color);
}

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

.testimonial-card {
  background: var(--surface);
  padding: 2rem;
  border-radius: 1rem;
  border: 1px solid var(--border-color);
  transition: all 0.3s ease;
  box-shadow: var(--shadow-sm);
}

.testimonial-card:hover {
  box-shadow: var(--shadow-lg);
  transform: translateY(-6px);
  border-color: var(--primary-color);
}

.stars {
  font-size: 1.2rem;
  margin-bottom: 1rem;
  display: block;
}

.testimonial-card p {
  font-size: 1rem;
  line-height: 1.6;
  margin-bottom: 1.5rem;
  font-style: italic;
  color: var(--text-secondary);
}

.testimonial-author {
  font-size: 0.9rem;
  color: var(--text-secondary);
  border-top: 1px solid var(--border-color);
  padding-top: 1rem;
}

.testimonial-author strong {
  color: var(--text-primary);
  display: block;
  margin-bottom: 0.25rem;
}

/* Feature Showcase */
.feature-showcase {
  padding: 4rem 0;
  background: linear-gradient(180deg, rgba(79, 70, 229, 0.05) 0%, var(--bg-color) 100%);
}

.showcase-cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 2rem;
  margin-top: 2rem;
}

.showcase-card {
  background: var(--surface);
  padding: 2rem;
  border-radius: 1rem;
  border: 2px solid var(--border-color);
  cursor: pointer;
  transition: all 0.3s ease;
  text-align: center;
  position: relative;
  overflow: hidden;
}

.showcase-card::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
  opacity: 0;
  transition: opacity 0.3s ease;
  z-index: -1;
}

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

.showcase-card.active,
.showcase-card:hover {
  color: white;
}

.showcase-card.active::after,
.showcase-card:hover::after {
  opacity: 1;
}

.showcase-icon {
  font-size: 3rem;
  margin-bottom: 1rem;
  display: block;
  transition: transform 0.3s ease;
}

.showcase-card:hover .showcase-icon {
  transform: scale(1.1) rotateZ(5deg);
}

.showcase-card h3 {
  font-size: 1.25rem;
  margin-bottom: 0.5rem;
  font-weight: 700;
}

.showcase-card p {
  font-size: 0.9rem;
  opacity: 0.9;
}

/* FAQ Section */
.faq-section {
  padding: 4rem 0;
  background: var(--bg-color);
}

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

.faq-item {
  background: var(--surface);
  border: 1px solid var(--border-color);
  border-radius: 0.75rem;
  overflow: hidden;
  transition: all 0.3s ease;
}

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

.faq-question {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1.5rem;
  cursor: pointer;
  background: var(--surface);
  transition: all 0.3s ease;
  user-select: none;
  font-weight: 600;
  font-size: 1rem;
}

.faq-item:hover .faq-question {
  background: rgba(79, 70, 229, 0.05);
}

.faq-toggle {
  font-size: 1.5rem;
  transition: transform 0.3s ease;
  color: var(--primary-color);
}

.faq-item.open .faq-toggle {
  transform: rotate(45deg);
}

.faq-answer {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.3s ease;
  background: rgba(79, 70, 229, 0.02);
}

.faq-item.open .faq-answer {
  max-height: 1000px;
}

.faq-answer p {
  padding: 1.5rem;
  color: var(--text-secondary);
  line-height: 1.6;
  margin: 0;
}

/* Final CTA Section */
.final-cta-section {
  padding: 4rem 0;
  background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
  position: relative;
  overflow: hidden;
}

.final-cta-section::before {
  content: '';
  position: absolute;
  inset: 0;
  background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><circle cx="20" cy="20" r="2" fill="rgba(255,255,255,0.1)"/><circle cx="80" cy="80" r="2" fill="rgba(255,255,255,0.1)"/><circle cx="80" cy="20" r="1.5" fill="rgba(255,255,255,0.05)"/><circle cx="20" cy="80" r="1.5" fill="rgba(255,255,255,0.05)"/></svg>');
  opacity: 0.5;
}

.final-cta-section .container {
  position: relative;
  z-index: 1;
}

.final-cta-box {
  text-align: center;
  color: white;
  animation: slideUpFade 0.8s ease forwards;
}

@keyframes slideUpFade {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.final-cta-box h2 {
  font-size: 2.5rem;
  font-weight: 800;
  margin-bottom: 1rem;
  letter-spacing: -0.5px;
}

.final-cta-box p {
  font-size: 1.25rem;
  margin-bottom: 2rem;
  opacity: 0.95;
  max-width: 500px;
  margin-left: auto;
  margin-right: auto;
}

.cta-buttons {
  display: flex;
  gap: 1rem;
  justify-content: center;
  flex-wrap: wrap;
  margin-bottom: 2rem;
}

.btn-lg {
  padding: 1rem 2rem;
  font-size: 1.1rem;
  font-weight: 600;
}

.btn-ghost-white {
  background: transparent;
  color: white;
  border: 2px solid white;
}

.btn-ghost-white:hover {
  background: rgba(255, 255, 255, 0.1);
  transform: translateY(-2px);
}

.cta-badge {
  display: inline-block;
  background: rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(10px);
  padding: 1rem 2rem;
  border-radius: 50px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  color: white;
  font-size: 0.95rem;
  animation: pulse 2s infinite;
}

@keyframes pulse {
  0%, 100% {
    opacity: 1;
  }
  50% {
    opacity: 0.7;
  }
}

/* =========================================
   RESPONSIVE UTILITIES
   ========================================= */
@media (max-width: 480px) {
  .hero-stats { gap: 1.5rem; }
  .stat-number { font-size: 1.5rem; }
  .cta-banner { padding: 2.5rem 1.25rem; }
  .cta-banner h2 { font-size: 1.625rem; }
  .tools-filter { gap: 0.375rem; }
  .filter-btn { padding: 0.375rem 0.75rem; font-size: 0.8rem; }
  
  /* Mobile responsive - Psychological sections */
  .problems-grid { grid-template-columns: 1fr; }
  .testimonials-grid { grid-template-columns: 1fr; }
  .showcase-cards { grid-template-columns: 1fr; }
  .faq-grid { grid-template-columns: 1fr; }
  .logos-grid { grid-template-columns: repeat(2, 1fr); }
  
  .final-cta-box h2 {
    font-size: 1.75rem;
  }
  
  .final-cta-box p {
    font-size: 1rem;
  }
  
  .cta-buttons {
    flex-direction: column;
  }
  
  .btn-lg {
    width: 100%;
  }
}