/* ========================================
   MOBILE & TABLET EXPERIENCE IMPROVEMENTS
   Non-destructive enhancements for better UX
   ======================================== */

/* ========================================
   1. FIX HERO SECTION BOUNCING ON MOBILE
   ======================================== */

/* Disable bouncing/infinite animations on mobile for hero */
@media (max-width: 992px) {
  /* Stop hero content from bouncing */
  .hero-section .hero-content,
  .hero-section .hero-title,
  .hero-section .hero-subtitle,
  .hero-section .hero-cta {
    animation: heroFadeIn 0.8s ease-out forwards !important;
    animation-iteration-count: 1 !important;
  }

  /* Simple fade in without bounce */
  @keyframes heroFadeIn {
    from {
      opacity: 0;
      transform: translateY(10px);
    }
    to {
      opacity: 1;
      transform: translateY(0);
    }
  }

  /* Prevent any spring/bounce effects */
  .hero-section * {
    animation-timing-function: ease-out !important;
  }
}

/* ========================================
   2. ADD LOGO TO MOBILE HEADER TOP LEFT
   ======================================== */

/* Show mobile logo in header on small screens */
@media (max-width: 992px) {
  /* DISABLED - Conflicting with mobile-navigation-fix.css
     The new mobile navigation properly handles logo positioning
  .main-header .navbar-header .mobile-logo {
    display: block !important;
    position: fixed;
    top: 10px;
    left: 15px;
    z-index: 10002;
    opacity: 1 !important;
    visibility: visible !important;
  }
  */

  .main-header .navbar-header .mobile-logo a {
    display: block;
  }

  .main-header .navbar-header .mobile-logo .header-logo-image--mobile {
    width: 50px;
    height: auto;
    display: block;
  }

  /* Hide desktop logo on mobile */
  .main-header .logo-outer {
    display: none;
  }

  /* Ensure logo stays visible when scrolling */
  .main-header.fixed-header .navbar-header .mobile-logo {
    opacity: 1 !important;
    visibility: visible !important;
  }

  /* Logo visible even when menu is open */
  body:has(.mobile-menu-overlay.active) .mobile-logo {
    z-index: 10002 !important;
    opacity: 1 !important;
    visibility: visible !important;
  }
}

/* ========================================
   3. FIX MOBILE MENU SCROLLING & CENTERING
   ======================================== */

@media (max-width: 992px) {
  /* Mobile menu overlay - ensure proper scrolling */
  .mobile-menu-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    overflow-y: auto !important;
    overflow-x: hidden;
    -webkit-overflow-scrolling: touch;
    overscroll-behavior: contain;
    z-index: 9999;
  }

  /* Mobile navigation container - centered and scrollable */
  .mobile-navigation {
    width: 100%;
    min-height: 100vh;
    display: flex !important;
    flex-direction: column !important;
    justify-content: center !important;
    align-items: center !important;
    padding: 80px 20px 40px 20px !important;
    position: relative;
  }

  /* Mobile menu list - centered with proper spacing */
  .mobile-menu-list {
    width: 100%;
    max-width: 400px;
    margin: 0 auto;
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 0.5rem !important;
    padding: 0 !important;
    list-style: none !important;
  }

  /* Mobile menu items - centered layout */
  .mobile-menu-item {
    width: 100%;
    max-width: 100%;
    display: flex !important;
    justify-content: center !important;
    align-items: center !important;
    padding: 0 !important;
    margin: 0 !important;
    list-style: none !important;
  }

  /* Mobile nav links - full width, centered text */
  .mobile-nav-link {
    width: 100%;
    display: flex !important;
    justify-content: center !important;
    align-items: center !important;
    padding: 1rem 2rem !important;
    text-align: center !important;
    font-size: 1.1rem !important;
    min-height: 48px !important;
    border-radius: 12px !important;
    transition: all 0.3s ease !important;
  }

  /* Close button positioning */
  .mobile-close-button {
    position: fixed !important;
    top: 15px !important;
    right: 15px !important;
    z-index: 10003 !important;
  }
}

/* Tablet specific adjustments */
@media (min-width: 768px) and (max-width: 992px) {
  .mobile-menu-list {
    max-width: 500px;
  }

  .mobile-nav-link {
    font-size: 1.2rem !important;
    padding: 1.25rem 2.5rem !important;
  }
}

/* ========================================
   4. SLOW DOWN SOCIAL CAROUSEL SPEED
   ======================================== */

/* Slow down the marquee animation significantly */
.company-design-area.partner .scroller {
  /* Override default fast speed */
  animation-duration: 40s !important; /* Much slower - was probably 10s or less */
}

/* Add smooth easing to carousel */
.company-design-area.partner .marquee {
  animation-timing-function: linear !important;
}

/* Slow down on mobile specifically */
@media (max-width: 992px) {
  .company-design-area.partner .scroller {
    animation-duration: 50s !important; /* Even slower on mobile for easier reading */
  }
}

/* ========================================
   5. ADD MANUAL SCROLL TO SOCIAL CAROUSEL
   ======================================== */

@media (max-width: 992px) {
  /* Make carousel container touch-scrollable on mobile */
  .company-design-area.partner .company-list {
    position: relative;
    width: 100%;
    overflow-x: auto !important;
    overflow-y: hidden;
    -webkit-overflow-scrolling: touch;
    scroll-behavior: smooth;
    cursor: -webkit-grab;
    cursor: grab;
  }

  .company-design-area.partner .company-list:active {
    cursor: -webkit-grabbing;
    cursor: grabbing;
  }

  /* Add scroll indicators */
  .company-design-area.partner .company-list::before,
  .company-design-area.partner .company-list::after {
    content: '';
    position: absolute;
    top: 0;
    bottom: 0;
    width: 40px;
    z-index: 2;
    pointer-events: none;
  }

  .company-design-area.partner .company-list::before {
    left: 0;
    background: linear-gradient(to right, rgba(255, 255, 255, 0.8), transparent);
  }

  .company-design-area.partner .company-list::after {
    right: 0;
    background: linear-gradient(to left, rgba(255, 255, 255, 0.8), transparent);
  }

  /* Allow manual scrolling while still having auto-scroll */
  .company-design-area.partner .scroller {
    display: flex !important;
    flex-wrap: nowrap !important;
    min-width: max-content;
    padding: 20px 0;
  }

  /* Ensure items are touchable and visible */
  .company-design-area.partner .social-icon-wrapper {
    flex-shrink: 0;
    -webkit-tap-highlight-color: transparent;
    touch-action: manipulation;
  }

  /* Add visual hint for scrollability */
  .company-design-area.partner .company-list {
    padding-bottom: 10px;
  }

  /* Custom scrollbar for better UX */
  .company-design-area.partner .company-list::-webkit-scrollbar {
    height: 6px;
  }

  .company-design-area.partner .company-list::-webkit-scrollbar-track {
    background: rgba(0, 0, 0, 0.05);
    border-radius: 3px;
  }

  .company-design-area.partner .company-list::-webkit-scrollbar-thumb {
    background: rgba(0, 174, 239, 0.3);
    border-radius: 3px;
  }

  .company-design-area.partner .company-list::-webkit-scrollbar-thumb:hover {
    background: rgba(0, 174, 239, 0.5);
  }
}

/* ========================================
   6. GENERAL MOBILE/TABLET OPTIMIZATIONS
   ======================================== */

@media (max-width: 992px) {
  /* Improve touch targets */
  button,
  a,
  .clickable {
    min-height: 44px;
    min-width: 44px;
    touch-action: manipulation;
    -webkit-tap-highlight-color: transparent;
  }

  /* Better spacing on mobile */
  .section-padding {
    padding: 60px 0 !important;
  }

  /* Improve hero section mobile layout */
  .hero-section {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
  }

  .hero-section .hero-container {
    padding: 20px 15px;
  }

  .hero-section .hero-title {
    font-size: clamp(1.8rem, 8vw, 2.5rem) !important;
    line-height: 1.2 !important;
    margin-bottom: 1rem !important;
  }

  .hero-section .hero-subtitle {
    font-size: clamp(1rem, 4vw, 1.2rem) !important;
    line-height: 1.5 !important;
    margin-bottom: 1.5rem !important;
  }

  /* Stack hero buttons on small screens */
  .hero-section .hero-cta {
    flex-direction: column !important;
    gap: 1rem !important;
    align-items: stretch !important;
  }

  .hero-section .hero-cta .btn {
    width: 100% !important;
    max-width: 300px !important;
    margin: 0 auto !important;
  }
}

/* Tablet specific (landscape phones and tablets) */
@media (min-width: 768px) and (max-width: 992px) {
  .hero-section .hero-title {
    font-size: clamp(2.5rem, 6vw, 3.5rem) !important;
  }

  .hero-section .hero-subtitle {
    font-size: clamp(1.2rem, 3vw, 1.5rem) !important;
  }

  /* Side by side buttons on tablet */
  .hero-section .hero-cta {
    flex-direction: row !important;
    justify-content: center !important;
  }

  .hero-section .hero-cta .btn {
    width: auto !important;
  }
}

/* ========================================
   7. PREVENT LAYOUT SHIFT & IMPROVE PERFORMANCE
   ======================================== */

@media (max-width: 992px) {
  /* Prevent layout shifts */
  img,
  video {
    max-width: 100%;
    height: auto;
    display: block;
  }

  /* GPU acceleration for smooth animations */
  .hero-section,
  .mobile-menu-overlay,
  .mobile-navigation {
    will-change: transform;
    transform: translateZ(0);
    -webkit-backface-visibility: hidden;
            backface-visibility: hidden;
  }

  /* Reduce motion for better performance */
  .hero-section .shape,
  .animated-shapes .shape {
    animation-duration: 30s !important;
  }
}

/* ========================================
   8. DARK MODE MOBILE IMPROVEMENTS
   ======================================== */

@media (max-width: 992px) {
  .theme-dark .company-design-area.partner .company-list::before {
    background: linear-gradient(to right, rgba(15, 23, 42, 0.9), transparent);
  }

  .theme-dark .company-design-area.partner .company-list::after {
    background: linear-gradient(to left, rgba(15, 23, 42, 0.9), transparent);
  }

  .theme-dark .company-design-area.partner .company-list::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.05);
  }

  .theme-dark .company-design-area.partner .company-list::-webkit-scrollbar-thumb {
    background: rgba(56, 189, 248, 0.3);
  }

  .theme-dark .company-design-area.partner .company-list::-webkit-scrollbar-thumb:hover {
    background: rgba(56, 189, 248, 0.5);
  }
}

/* ========================================
   MOBILE MENU OVERLAY - RESPONSIVE FIX
   Non-destructive fix to prevent overlay on desktop
   ======================================== */

/*
 * ISSUE: Mobile menu overlay was showing on desktop and covering the entire app
 * SOLUTION: Hide mobile menu overlay on desktop (≥992px), show only on mobile/tablet
 * APPROACH: Non-destructive media queries that override without breaking existing code
 */

/* ========================================
   1. DESKTOP: Hide Mobile Menu Completely
   ======================================== */

@media (min-width: 992px) {
  /* Hide mobile menu overlay entirely on desktop */
  .mobile-menu-overlay {
    display: none !important;
    opacity: 0 !important;
    pointer-events: none !important;
    visibility: hidden !important;
  }

  /* Hide mobile navigation on desktop */
  .mobile-navigation {
    display: none !important;
    opacity: 0 !important;
    pointer-events: none !important;
    visibility: hidden !important;
  }

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

  /* Hide mobile hamburger menu on desktop */
  .mobile-menu-container {
    display: none !important;
  }

  /* Ensure body doesn't get locked on desktop */
  body.menu-open {
    overflow: auto !important;
  }
}

/* ========================================
   2. MOBILE & TABLET: Proper Overlay Behavior
   ======================================== */

@media (max-width: 991px) {
  /* Mobile menu overlay - only visible when active */
  .mobile-menu-overlay {
    display: none; /* Hidden by default */
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    z-index: 9999;
    pointer-events: none;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
  }

  /* Show overlay when active */
  .mobile-menu-overlay.active {
    display: flex !important;
    opacity: 1 !important;
    visibility: visible !important;
    pointer-events: all !important;
  }

  /* Theme colors handled in themes/light-theme.css and themes/dark-theme.css */

  /* Mobile navigation - only visible when active */
  .mobile-navigation {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: opacity 0.5s ease, visibility 0.5s ease;
  }

  .mobile-navigation.active {
    opacity: 1 !important;
    visibility: visible !important;
    pointer-events: all !important;
  }

  /* Lock body scrolling when mobile menu is open */
  body.menu-open {
    overflow: hidden !important;
    position: fixed !important;
    width: 100% !important;
    height: 100% !important;
  }
}

/* ========================================
   3. TABLET SPECIFIC ADJUSTMENTS (768px - 991px)
   ======================================== */

@media (min-width: 768px) and (max-width: 991px) {
  /* Tablet: Menu overlay with partial width background layers */
  .mobile-menu-overlay.active .menu-background-layer {
    width: 60% !important; /* Partial overlay for tablet */
  }

  /* Tablet: Better spacing for menu items */
  .mobile-menu-list {
    max-width: 500px !important;
  }

  .mobile-nav-link {
    font-size: 1.2rem !important;
    padding: 1.25rem 2.5rem !important;
  }
}

/* ========================================
   4. MOBILE SPECIFIC (< 768px)
   ======================================== */

@media (max-width: 767px) {
  /* Mobile: Full width overlay */
  .mobile-menu-overlay.active .menu-background-layer {
    width: 100% !important;
  }

  /* Mobile: Compact menu items */
  .mobile-menu-list {
    max-width: 400px !important;
  }

  .mobile-nav-link {
    font-size: 1.1rem !important;
    padding: 1rem 2rem !important;
  }
}

/* ========================================
   5. THEME COMPATIBILITY
   ======================================== */

/* Theme colors moved to themes/light-theme.css and themes/dark-theme.css */
/* This keeps responsive behavior separate from theme styling */

/* ========================================
   6. ACCESSIBILITY & TOUCH IMPROVEMENTS
   ======================================== */

@media (max-width: 991px) {
  /* Ensure close button is always accessible */
  .mobile-close-button {
    position: fixed !important;
    top: 15px !important;
    right: 15px !important;
    z-index: 10003 !important;
    min-width: 44px !important;
    min-height: 44px !important;
    touch-action: manipulation;
    -webkit-tap-highlight-color: transparent;
  }

  /* Better touch targets for menu items */
  .mobile-nav-link {
    min-height: 48px !important;
    min-width: 48px !important;
    touch-action: manipulation;
    -webkit-tap-highlight-color: transparent;
  }

  /* Focus states for keyboard navigation */
  .mobile-nav-link:focus-visible {
    outline: 2px solid #0056b3;
    outline-offset: 2px;
  }

  .theme-dark .mobile-nav-link:focus-visible {
    outline-color: #38bdf8;
  }
}

/* ========================================
   7. ANIMATION PERFORMANCE
   ======================================== */

@media (max-width: 991px) {
  /* GPU acceleration for smooth animations */
  .mobile-menu-overlay,
  .mobile-navigation,
  .menu-background-layer {
    will-change: transform, opacity;
    transform: translateZ(0);
    -webkit-backface-visibility: hidden;
            backface-visibility: hidden;
  }

  /* Disable animations if user prefers reduced motion */
  @media (prefers-reduced-motion: reduce) {
    .mobile-menu-overlay,
    .mobile-navigation,
    .menu-background-layer {
      transition: none !important;
      animation: none !important;
    }
  }
}

/* ========================================
   8. DEBUGGING HELPERS (Remove in production)
   ======================================== */

/*
 * Uncomment to debug overlay visibility issues:
 *
 * .mobile-menu-overlay {
 *   border: 3px solid red !important;
 * }
 *
 * .mobile-menu-overlay.active {
 *   border: 3px solid green !important;
 * }
 */

/**
 * Enhanced Toast Notification Styles
 * Optimized for Framer Motion animations with beautiful gradients and effects
 */

/* Enhanced Toast Container */
.toast-container {
  pointer-events: none;
}

.enhanced-toast {
  pointer-events: auto;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  will-change: transform, opacity;
  -webkit-user-select: none;
     -moz-user-select: none;
          user-select: none;
}

/* Dark Theme Support */
.theme-dark .enhanced-toast {
  background: rgba(26, 26, 38, 0.98) !important;
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
}

/* Success Toast - Dark Theme */
.theme-dark .enhanced-toast[data-type="success"] {
  border-color: var(--success-color) !important;
  box-shadow: var(--card-shadow) !important;
}

.theme-dark .enhanced-toast[data-type="success"] strong {
  background: linear-gradient(135deg, var(--success-color), var(--success-border)) !important;
  -webkit-background-clip: text !important;
  -webkit-text-fill-color: transparent !important;
  background-clip: text !important;
}

.theme-dark .enhanced-toast[data-type="success"] .toast-message {
  color: var(--text-primary) !important;
}

/* Warning Toast - Dark Theme */
.theme-dark .enhanced-toast[data-type="warning"] {
  border-color: var(--warning-color) !important;
  box-shadow: var(--card-shadow) !important;
}

.theme-dark .enhanced-toast[data-type="warning"] strong {
  background: linear-gradient(135deg, var(--warning-color), var(--warning-border)) !important;
  -webkit-background-clip: text !important;
  -webkit-text-fill-color: transparent !important;
  background-clip: text !important;
}

.theme-dark .enhanced-toast[data-type="warning"] .toast-message {
  color: var(--text-primary) !important;
}

/* Error Toast - Dark Theme */
.theme-dark .enhanced-toast[data-type="error"] {
  border-color: var(--danger-color) !important;
  box-shadow: var(--card-shadow) !important;
}

.theme-dark .enhanced-toast[data-type="error"] strong {
  background: linear-gradient(135deg, var(--danger-color), var(--danger-border)) !important;
  -webkit-background-clip: text !important;
  -webkit-text-fill-color: transparent !important;
  background-clip: text !important;
}

.theme-dark .enhanced-toast[data-type="error"] .toast-message {
  color: var(--text-primary) !important;
}

/* Info Toast - Dark Theme */
.theme-dark .enhanced-toast[data-type="info"] {
  border-color: var(--info-color) !important;
  box-shadow: var(--card-shadow) !important;
}

.theme-dark .enhanced-toast[data-type="info"] strong {
  background: linear-gradient(135deg, var(--info-color), var(--info-border)) !important;
  -webkit-background-clip: text !important;
  -webkit-text-fill-color: transparent !important;
  background-clip: text !important;
}

.theme-dark .enhanced-toast[data-type="info"] .toast-message {
  color: var(--text-primary) !important;
}

/* Close button - Dark Theme */
.theme-dark .enhanced-toast button {
  color: var(--accent-primary) !important;
  transition: all 0.3s ease;
}

.theme-dark .enhanced-toast button:hover {
  color: var(--accent-hover) !important;
  text-shadow: none;
}

/* Light Theme Optimizations */
.enhanced-toast button {
  outline: none;
}

.enhanced-toast button:focus {
  outline: 2px solid rgba(0, 174, 239, 0.3);
  outline-offset: 2px;
}

/* Mobile Optimizations */
@media (max-width: 768px) {
  .enhanced-toast {
    min-width: 280px !important;
    max-width: calc(100vw - 32px) !important;
  }

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

/* Accessibility - Reduced Motion */
@media (prefers-reduced-motion: reduce) {
  .enhanced-toast {
    animation: none !important;
    transition: opacity 0.2s ease !important;
  }
}

/* High Contrast Mode Support */
@media (prefers-contrast: high) {
  .enhanced-toast {
    border-width: 3px !important;
  }

  .theme-dark .enhanced-toast {
    background: rgba(0, 0, 0, 0.95) !important;
  }
}

/* Print Styles - Hide toasts when printing */
@media print {
  .toast-container,
  .enhanced-toast {
    display: none !important;
  }
}

/* Focus visible for keyboard navigation */
.enhanced-toast button:focus-visible {
  outline: 2px solid currentColor;
  outline-offset: 2px;
}

/* Hover effects for interactive elements */
.enhanced-toast button {
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
}

/* Safari backdrop filter support */
@supports ((-webkit-backdrop-filter: blur(10px)) or (backdrop-filter: blur(10px))) or (-webkit-backdrop-filter: blur(10px)) {
  .enhanced-toast {
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
  }
}

/* Ultra-wide screen support */
@media (min-width: 2560px) {
  .enhanced-toast {
    min-width: 400px;
    font-size: 16px;
  }

  .theme-dark .enhanced-toast {
    border-width: 3px !important;
  }
}

/* 4K display support */
@media (min-width: 3840px) {
  .enhanced-toast {
    min-width: 480px;
    font-size: 18px;
  }

  .theme-dark .enhanced-toast {
    border-width: 4px !important;
    box-shadow: 0 12px 48px rgba(0, 255, 255, 0.5), 0 6px 16px rgba(0, 0, 0, 0.4) !important;
  }
}

/* ========================================
   MINDPAUSE BRAND STYLES
   Chrome Extension - Mindfulness & Breathing
   ======================================== */

/* ========================================
   1. BRAND COLOR VARIABLES
   ======================================== */

:root {
  /* MindPause Primary Palette */
  --mp-sage-green: #576b49;        /* Primary - Buttons, accents, headers */
  --mp-sage-green-rgb: 87, 107, 73;
  --mp-sage-green-light: #6a7f5a;  /* Lighter variant for hover */
  --mp-sage-green-dark: #455539;   /* Darker variant for active */

  /* MindPause Secondary Palette */
  --mp-warm-beige: #d1b78d;        /* Secondary - Borders, subtle accents */
  --mp-warm-beige-rgb: 209, 183, 141;
  --mp-warm-beige-light: #dcc9a6;  /* Lighter variant */
  --mp-warm-beige-dark: #c4a574;   /* Darker variant */

  /* MindPause Dark/Outline */
  --mp-dark-forest: #2c3829;       /* Text, dark mode backgrounds, outlines */
  --mp-dark-forest-rgb: 44, 56, 41;
  --mp-dark-forest-light: #3d4a38; /* Lighter variant */

  /* MindPause Supporting Colors */
  --mp-cream: #ecedf0;             /* Light backgrounds */
  --mp-soft-white: #f5f6f8;        /* Card backgrounds in light mode */
  --mp-text-dark: #2c3829;         /* Primary text */
  --mp-text-muted: #5a6b54;        /* Secondary text */

  /* MindPause Gradients */
  --mp-gradient-primary: linear-gradient(135deg, #576b49 0%, #6a7f5a 100%);
  --mp-gradient-secondary: linear-gradient(135deg, #d1b78d 0%, #c4a574 100%);
  --mp-gradient-hero: linear-gradient(135deg, #576b49 0%, #455539 50%, #2c3829 100%);

  /* MindPause Shadows */
  --mp-shadow-sm: 0 2px 8px rgba(87, 107, 73, 0.1);
  --mp-shadow-md: 0 4px 16px rgba(87, 107, 73, 0.15);
  --mp-shadow-lg: 0 8px 32px rgba(87, 107, 73, 0.2);
  --mp-shadow-glow: 0 0 20px rgba(87, 107, 73, 0.3);
}

/* ========================================
   2. MINDPAUSE PAGE LAYOUT
   ======================================== */

.mindpause-page {
  min-height: 100vh;
  padding: 6rem 0 4rem;
  background: var(--mp-soft-white);
}

.theme-dark .mindpause-page {
  background: var(--primary-bg);
}

/* ========================================
   3. MINDPAUSE CARDS
   ======================================== */

.mp-card {
  background: var(--mp-soft-white);
  border: 1px solid rgba(209, 183, 141, 0.3);
  border-radius: 1.25rem;
  padding: 2.5rem;
  box-shadow: var(--mp-shadow-sm);
  transition: all 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

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

.theme-dark .mp-card {
  background: var(--card-bg);
  border-color: var(--border-primary);
}

.theme-dark .mp-card:hover {
  box-shadow: 0 12px 40px rgba(87, 107, 73, 0.2);
}

/* Featured/Hero Card */
.mp-card-featured {
  background: var(--mp-gradient-primary);
  color: #ffffff;
  border: none;
  box-shadow: var(--mp-shadow-lg);
}

.mp-card-featured:hover {
  box-shadow: var(--mp-shadow-glow), var(--mp-shadow-lg);
}

/* ========================================
   4. MINDPAUSE BUTTONS
   ======================================== */

.mp-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
  padding: 1rem 2rem;
  border-radius: 50px;
  font-weight: 600;
  font-size: 1rem;
  text-decoration: none;
  transition: all 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94);
  cursor: pointer;
  border: 2px solid transparent;
}

/* Primary Button - Sage Green */
.mp-btn-primary {
  background: var(--mp-sage-green);
  color: #ffffff;
  border-color: var(--mp-sage-green);
  box-shadow: var(--mp-shadow-sm);
}

.mp-btn-primary:hover {
  background: var(--mp-sage-green-light);
  border-color: var(--mp-sage-green-light);
  box-shadow: var(--mp-shadow-md);
  transform: translateY(-2px);
  color: #ffffff;
}

.mp-btn-primary:active {
  background: var(--mp-sage-green-dark);
  border-color: var(--mp-sage-green-dark);
  transform: translateY(0);
}

/* Secondary Button - Warm Beige */
.mp-btn-secondary {
  background: var(--mp-warm-beige);
  color: var(--mp-dark-forest);
  border-color: var(--mp-warm-beige);
}

.mp-btn-secondary:hover {
  background: var(--mp-warm-beige-dark);
  border-color: var(--mp-warm-beige-dark);
  color: var(--mp-dark-forest);
}

/* Outline Button */
.mp-btn-outline {
  background: transparent;
  color: var(--mp-sage-green);
  border-color: var(--mp-sage-green);
}

.mp-btn-outline:hover {
  background: var(--mp-sage-green);
  color: #ffffff;
}

.theme-dark .mp-btn-outline {
  color: var(--mp-sage-green-light);
  border-color: var(--mp-sage-green-light);
}

.theme-dark .mp-btn-outline:hover {
  background: var(--mp-sage-green);
  color: #ffffff;
}

/* Large Button Variant */
.mp-btn-lg {
  padding: 1.25rem 3rem;
  font-size: 1.1rem;
}

/* Small Button Variant */
.mp-btn-sm {
  padding: 0.625rem 1.25rem;
  font-size: 0.875rem;
}

/* ========================================
   5. MINDPAUSE ICONS
   ======================================== */

.mp-icon {
  width: 80px;
  height: 80px;
  border-radius: 1rem;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2.5rem;
  transition: all 0.3s ease;
}

.mp-icon-primary {
  background: var(--mp-gradient-primary);
  color: #ffffff;
}

.mp-icon-secondary {
  background: rgba(209, 183, 141, 0.2);
  color: var(--mp-sage-green);
}

.mp-icon-outline {
  background: transparent;
  border: 2px solid var(--mp-warm-beige);
  color: var(--mp-sage-green);
}

.theme-dark .mp-icon-secondary {
  background: rgba(87, 107, 73, 0.2);
  color: var(--mp-sage-green-light);
}

/* ========================================
   6. MINDPAUSE TYPOGRAPHY
   ======================================== */

.mp-heading {
  color: var(--mp-dark-forest);
  font-weight: 700;
  line-height: 1.2;
}

.theme-dark .mp-heading {
  color: var(--text-primary);
}

.mp-heading-lg {
  font-size: 2.5rem;
}

.mp-heading-md {
  font-size: 1.75rem;
}

.mp-heading-sm {
  font-size: 1.25rem;
}

.mp-text {
  color: var(--mp-text-muted);
  line-height: 1.7;
}

.theme-dark .mp-text {
  color: var(--text-secondary);
}

.mp-text-accent {
  color: var(--mp-sage-green);
  font-weight: 600;
}

.theme-dark .mp-text-accent {
  color: var(--mp-sage-green-light);
}

/* ========================================
   7. MINDPAUSE STATS DISPLAY
   ======================================== */

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

.mp-stat-item {
  text-align: center;
  padding: 1.5rem;
  background: rgba(87, 107, 73, 0.05);
  border-radius: 1rem;
  border: 1px solid rgba(209, 183, 141, 0.3);
  transition: all 0.3s ease;
}

.mp-stat-item:hover {
  background: rgba(87, 107, 73, 0.1);
  transform: translateY(-2px);
}

.theme-dark .mp-stat-item {
  background: rgba(87, 107, 73, 0.1);
  border-color: var(--border-primary);
}

.theme-dark .mp-stat-item:hover {
  background: rgba(87, 107, 73, 0.15);
}

.mp-stat-value {
  font-size: 2.5rem;
  font-weight: 700;
  color: var(--mp-sage-green);
  line-height: 1;
  margin-bottom: 0.5rem;
}

.theme-dark .mp-stat-value {
  color: var(--mp-sage-green-light);
}

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

.theme-dark .mp-stat-label {
  color: var(--text-secondary);
}

/* ========================================
   8. MINDPAUSE UNINSTALL PAGE
   ======================================== */

.mp-uninstall-page {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 6rem 2rem 4rem;
  background: var(--mp-soft-white);
}

.theme-dark .mp-uninstall-page {
  background: var(--primary-bg);
}

.mp-uninstall-card {
  background: var(--mp-soft-white);
  border: 1px solid rgba(209, 183, 141, 0.3);
  border-radius: 1.5rem;
  padding: 3rem;
  max-width: 600px;
  width: 100%;
  text-align: center;
  box-shadow: var(--mp-shadow-lg);
}

.theme-dark .mp-uninstall-card {
  background: var(--card-bg);
  border-color: var(--border-primary);
}

.mp-uninstall-icon {
  font-size: 4rem;
  margin-bottom: 1.5rem;
  display: flex;
  justify-content: center;
}

.mp-uninstall-title {
  font-size: 2rem;
  font-weight: 700;
  color: var(--mp-dark-forest);
  margin-bottom: 0.75rem;
}

.theme-dark .mp-uninstall-title {
  color: var(--text-primary);
}

.mp-uninstall-subtitle {
  font-size: 1.1rem;
  color: var(--mp-text-muted);
  margin-bottom: 2rem;
}

.theme-dark .mp-uninstall-subtitle {
  color: var(--text-secondary);
}

.mp-journey-card {
  background: rgba(87, 107, 73, 0.05);
  border: 1px solid rgba(209, 183, 141, 0.3);
  border-radius: 1rem;
  padding: 2rem;
  margin: 2rem 0;
}

.theme-dark .mp-journey-card {
  background: rgba(87, 107, 73, 0.1);
  border-color: var(--border-primary);
}

.mp-journey-title {
  font-size: 1rem;
  font-weight: 600;
  color: var(--mp-sage-green);
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-bottom: 1.5rem;
}

.theme-dark .mp-journey-title {
  color: var(--mp-sage-green-light);
}

.mp-message {
  font-size: 1rem;
  color: var(--mp-text-muted);
  line-height: 1.7;
  margin: 1.5rem 0;
  font-style: italic;
}

.theme-dark .mp-message {
  color: var(--text-secondary);
}

.mp-actions {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  margin-top: 2rem;
}

.mp-feedback-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  color: var(--mp-sage-green);
  font-weight: 600;
  text-decoration: none;
  transition: all 0.3s ease;
}

.mp-feedback-link:hover {
  color: var(--mp-sage-green-light);
  gap: 0.75rem;
}

.theme-dark .mp-feedback-link {
  color: var(--mp-sage-green-light);
}

.theme-dark .mp-feedback-link:hover {
  color: var(--mp-warm-beige);
}

/* No Stats State */
.mp-no-stats-message {
  padding: 2rem;
  background: rgba(209, 183, 141, 0.1);
  border-radius: 1rem;
  margin: 2rem 0;
}

.theme-dark .mp-no-stats-message {
  background: rgba(209, 183, 141, 0.05);
}

.mp-no-stats-message p {
  color: var(--mp-text-muted);
  margin: 0;
  line-height: 1.7;
}

.theme-dark .mp-no-stats-message p {
  color: var(--text-secondary);
}

/* ========================================
   9. MINDPAUSE PRIVACY PAGE
   ======================================== */

.mp-privacy-page {
  padding: 6rem 0 4rem;
  min-height: 100vh;
}

.theme-dark .mp-privacy-page {
  background: var(--primary-bg);
}

.mp-privacy-header {
  text-align: center;
  margin-bottom: 3rem;
}

.mp-privacy-content {
  background: var(--mp-soft-white);
  border: 1px solid rgba(209, 183, 141, 0.3);
  border-radius: 1.25rem;
  padding: 3rem;
  box-shadow: var(--mp-shadow-sm);
}

.theme-dark .mp-privacy-content {
  background: var(--card-bg);
  border-color: var(--border-primary);
}

.mp-privacy-content section {
  margin-bottom: 2.5rem;
  padding-bottom: 2.5rem;
  border-bottom: 1px solid rgba(209, 183, 141, 0.2);
}

.mp-privacy-content section:last-child {
  margin-bottom: 0;
  padding-bottom: 0;
  border-bottom: none;
}

.theme-dark .mp-privacy-content section {
  border-bottom-color: var(--border-primary);
}

.mp-privacy-content h2 {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--mp-dark-forest);
  margin-bottom: 1rem;
}

.theme-dark .mp-privacy-content h2 {
  color: var(--text-primary);
}

.mp-privacy-content h3 {
  font-size: 1.15rem;
  font-weight: 600;
  color: var(--mp-sage-green);
  margin-bottom: 0.75rem;
  margin-top: 1.5rem;
}

.theme-dark .mp-privacy-content h3 {
  color: var(--mp-sage-green-light);
}

.mp-privacy-content p {
  color: var(--mp-text-muted);
  line-height: 1.7;
  margin-bottom: 1rem;
}

.theme-dark .mp-privacy-content p {
  color: var(--text-secondary);
}

.mp-privacy-content ul {
  list-style: none;
  padding-left: 0;
  margin-bottom: 1rem;
}

.mp-privacy-content ul li {
  position: relative;
  padding-left: 1.75rem;
  margin-bottom: 0.5rem;
  color: var(--mp-text-muted);
  line-height: 1.6;
}

.theme-dark .mp-privacy-content ul li {
  color: var(--text-secondary);
}

.mp-privacy-content ul li::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0.6rem;
  width: 8px;
  height: 8px;
  background: var(--mp-sage-green);
  border-radius: 50%;
}

.theme-dark .mp-privacy-content ul li::before {
  background: var(--mp-sage-green-light);
}

/* ========================================
   10. MINDPAUSE LEAF ICON (CSS)
   ======================================== */

.mp-leaf-icon {
  color: var(--mp-sage-green);
}

.theme-dark .mp-leaf-icon {
  color: var(--mp-sage-green-light);
}

/* Animated breathing effect for icons */
@keyframes mp-breathe {
  0%, 100% {
    transform: scale(1);
    opacity: 1;
  }
  50% {
    transform: scale(1.05);
    opacity: 0.9;
  }
}

.mp-breathing {
  animation: mp-breathe 4s ease-in-out infinite;
}

/* ========================================
   11. RESPONSIVE STYLES
   ======================================== */

@media (max-width: 768px) {
  .mindpause-page,
  .mp-uninstall-page,
  .mp-privacy-page {
    padding: 5rem 1rem 3rem;
  }

  .mp-card,
  .mp-uninstall-card,
  .mp-privacy-content {
    padding: 2rem 1.5rem;
  }

  .mp-stats-grid {
    grid-template-columns: repeat(3, 1fr);
    gap: 0.75rem;
  }

  .mp-stat-item {
    padding: 1rem 0.5rem;
  }

  .mp-stat-value {
    font-size: 1.75rem;
  }

  .mp-stat-label {
    font-size: 0.75rem;
  }

  .mp-uninstall-title {
    font-size: 1.5rem;
  }

  .mp-uninstall-subtitle {
    font-size: 1rem;
  }

  .mp-heading-lg {
    font-size: 2rem;
  }

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

  .mp-icon {
    width: 60px;
    height: 60px;
    font-size: 2rem;
  }
}

@media (max-width: 480px) {
  .mp-stats-grid {
    gap: 0.5rem;
  }

  .mp-stat-item {
    padding: 0.75rem 0.25rem;
  }

  .mp-stat-value {
    font-size: 1.5rem;
  }

  .mp-stat-label {
    font-size: 0.65rem;
    letter-spacing: 0;
  }

  .mp-uninstall-card {
    padding: 1.5rem;
  }

  .mp-journey-card {
    padding: 1.25rem;
  }

  .mp-privacy-content {
    padding: 1.5rem 1rem;
  }
}

/* ========================================
   12. MINDPAUSE LANDING PAGE
   ======================================== */

/* Hero Section */
.mp-hero-section {
  padding: 8rem 0 4rem;
  background: linear-gradient(180deg, var(--mp-soft-white) 0%, var(--mp-cream) 100%);
}

.theme-dark .mp-hero-section {
  background: linear-gradient(180deg, var(--primary-bg) 0%, var(--secondary-bg) 100%);
}

.mp-hero-logo {
  display: flex;
  justify-content: center;
}

.mp-hero-tagline {
  font-size: 1.5rem;
  font-weight: 600;
  color: var(--mp-sage-green);
  margin-bottom: 1.5rem;
}

.theme-dark .mp-hero-tagline {
  color: var(--mp-sage-green-light);
}

/* Features Section */
.mp-features-section {
  padding: 5rem 0;
  background: var(--mp-soft-white);
}

.theme-dark .mp-features-section {
  background: var(--secondary-bg);
}

.mp-feature-card {
  background: var(--mp-soft-white);
  border: 1px solid rgba(209, 183, 141, 0.2);
  border-radius: 1.25rem;
  padding: 2rem;
  height: 100%;
  transition: all 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.mp-feature-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--mp-shadow-md);
  border-color: var(--mp-warm-beige);
}

.theme-dark .mp-feature-card {
  background: var(--card-bg);
  border-color: var(--border-primary);
}

.theme-dark .mp-feature-card:hover {
  border-color: var(--mp-sage-green);
  box-shadow: 0 8px 24px rgba(87, 107, 73, 0.2);
}

.mp-feature-card .mp-icon {
  width: 60px;
  height: 60px;
  font-size: 1.75rem;
}

/* How It Works Section */
.mp-how-section {
  padding: 5rem 0;
  background: var(--mp-soft-white);
}

.theme-dark .mp-how-section {
  background: var(--primary-bg);
}

.mp-steps-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  grid-gap: 2rem;
  gap: 2rem;
}

.mp-step {
  text-align: center;
  padding: 1.5rem;
}

.mp-step-number {
  width: 50px;
  height: 50px;
  background: var(--mp-gradient-primary);
  color: #ffffff;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.25rem;
  font-weight: 700;
  margin: 0 auto 1rem;
  box-shadow: var(--mp-shadow-sm);
}

.mp-step h4 {
  margin-bottom: 0.75rem;
}

.mp-step p {
  font-size: 0.95rem;
  margin: 0;
}

/* CTA Section */
.mp-cta-section {
  padding: 5rem 0;
  background: var(--mp-soft-white);
}

.theme-dark .mp-cta-section {
  background: var(--secondary-bg);
}

.mp-cta-card {
  background: var(--mp-gradient-hero);
  border-radius: 1.5rem;
  padding: 4rem 3rem;
  text-align: center;
  box-shadow: var(--mp-shadow-lg);
}

.mp-cta-title {
  font-size: 2rem;
  font-weight: 700;
  color: #ffffff;
  margin-bottom: 1rem;
}

.mp-cta-text {
  font-size: 1.1rem;
  color: rgba(255, 255, 255, 0.9);
  max-width: 600px;
  margin: 0 auto 2rem;
  line-height: 1.7;
}

/* Footer Section */
.mp-footer-section {
  padding: 2rem 0;
  background: var(--mp-soft-white);
  border-top: 1px solid rgba(209, 183, 141, 0.2);
}

.theme-dark .mp-footer-section {
  background: var(--primary-bg);
  border-top-color: var(--border-primary);
}

.mp-footer-links {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 1rem;
  flex-wrap: wrap;
  margin-bottom: 1rem;
}

.mp-footer-link {
  color: var(--mp-text-muted);
  text-decoration: none;
  font-size: 0.95rem;
  transition: color 0.3s ease;
}

.mp-footer-link:hover {
  color: var(--mp-sage-green);
}

.theme-dark .mp-footer-link {
  color: var(--text-secondary);
}

.theme-dark .mp-footer-link:hover {
  color: var(--mp-sage-green-light);
}

.mp-footer-divider {
  color: var(--mp-warm-beige);
  opacity: 0.5;
}

.mp-footer-copyright {
  text-align: center;
  font-size: 0.875rem;
  color: var(--mp-text-muted);
  margin: 0;
}

.theme-dark .mp-footer-copyright {
  color: var(--text-secondary);
}

/* ========================================
   13. LANDING PAGE RESPONSIVE
   ======================================== */

@media (max-width: 992px) {
  .mp-steps-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 1.5rem;
  }

  .mp-hero-section {
    padding: 6rem 0 3rem;
  }

  .mp-cta-card {
    padding: 3rem 2rem;
  }

  .mp-cta-title {
    font-size: 1.75rem;
  }
}

@media (max-width: 768px) {
  .mp-hero-tagline {
    font-size: 1.25rem;
  }

  .mp-features-section,
  .mp-how-section,
  .mp-cta-section {
    padding: 3rem 0;
  }

  .mp-steps-grid {
    grid-template-columns: 1fr;
    gap: 1rem;
  }

  .mp-step {
    display: flex;
    align-items: flex-start;
    text-align: left;
    gap: 1rem;
    padding: 1rem;
    background: var(--mp-soft-white);
    border-radius: 1rem;
    border: 1px solid rgba(209, 183, 141, 0.2);
  }

  .theme-dark .mp-step {
    background: var(--card-bg);
    border-color: var(--border-primary);
  }

  .mp-step-number {
    margin: 0;
    flex-shrink: 0;
    width: 40px;
    height: 40px;
    font-size: 1rem;
  }

  .mp-step-content {
    flex: 1 1;
  }

  .mp-cta-card {
    padding: 2.5rem 1.5rem;
    border-radius: 1rem;
  }

  .mp-cta-title {
    font-size: 1.5rem;
  }

  .mp-cta-text {
    font-size: 1rem;
  }

  .mp-hero-actions {
    flex-direction: column;
    width: 100%;
  }

  .mp-hero-actions .mp-btn {
    width: 100%;
  }
}

@media (max-width: 480px) {
  .mp-hero-section {
    padding: 5rem 0 2rem;
  }

  .mp-hero-logo img {
    width: 80px;
    height: 80px;
  }

  .mp-feature-card {
    padding: 1.5rem;
  }

  .mp-feature-card .mp-icon {
    width: 50px;
    height: 50px;
    font-size: 1.5rem;
  }

  .mp-footer-links {
    flex-direction: column;
    gap: 0.5rem;
  }

  .mp-footer-divider {
    display: none;
  }
}

/* Layout Critical CSS - Extracted from inline <style> in layout.tsx for caching */

/* Critical CSS - Performance optimized */
* {
  font-display: swap;
  box-sizing: border-box;
}

/* System font stack for instant rendering */
body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  margin: 0;
  padding: 0;
  line-height: 1.6;
  color: var(--text-primary, #333);
  background: var(--body-background, #f0f1f3);
  overscroll-behavior: none;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* Mobile-first touch optimizations */
* {
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
}

/* Optimize loading states */
.loading-placeholder {
  background: linear-gradient(90deg, #f0f0f0 25%, transparent 37%, #f0f0f0 63%);
  background-size: 400% 100%;
  animation: shimmer 1.5s ease-in-out infinite;
}

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

/* Hero skeleton optimization with faster mobile loading */
.hero-skeleton {
  will-change: opacity;
  opacity: 0;
  animation: fadeIn 0.15s ease-out forwards;
}

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

/* Aggressive mobile-first animations */
@media (max-width: 768px) {
  *, *::before, *::after {
    animation-duration: 0.15s !important;
    transition-duration: 0.15s !important;
  }

  .hero-skeleton {
    animation-duration: 0.1s !important;
  }
}

/* Reduce motion for accessibility and performance */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }

  .hero-skeleton {
    animation: none !important;
    opacity: 1;
  }
}

/* Mobile-optimized image loading */
img {
  max-width: 100%;
  height: auto;
  font-style: italic;
  background-repeat: no-repeat;
  background-size: cover;
  shape-margin: 0.75rem;
  content-visibility: auto;
  contain-intrinsic-size: 0 400px;
}

/* Mobile performance optimizations */
@media (max-width: 768px) {
  body {
    text-rendering: optimizeSpeed;
    -webkit-backface-visibility: hidden;
  }

  /* Simplify animations on mobile */
  .loading-placeholder {
    animation: none;
    background: #f0f0f0;
  }
}

/* Mobile LavaLamp enhanced animations */
@media (max-width: 768px) {
  .mobile-cloud {
    animation: mobileCloudFloat 20s ease-in-out infinite;
    will-change: transform;
    transition: transform 0.1s ease-out;
  }

  .mobile-cloud:nth-child(2) {
    animation-delay: -6s;
    animation-duration: 22s;
  }

  .mobile-cloud:nth-child(3) {
    animation-delay: -12s;
    animation-duration: 18s;
  }

  .mobile-cloud:nth-child(4) {
    animation-delay: -3s;
    animation-duration: 25s;
  }

  .mobile-cloud:nth-child(5) {
    animation-delay: -15s;
    animation-duration: 21s;
  }
}

@keyframes mobileCloudFloat {
  0%, 100% {
    transform: translateY(0px) translateX(0px) scale(1);
    opacity: 0.9;
  }
  25% {
    transform: translateY(-3px) translateX(1px) scale(1.02);
    opacity: 0.95;
  }
  50% {
    transform: translateY(-5px) translateX(-0.5px) scale(1.01);
    opacity: 1;
  }
  75% {
    transform: translateY(-2px) translateX(0.5px) scale(1.015);
    opacity: 0.92;
  }
}

/* Scroll-triggered fade animations */
.scroll-fade-in {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.8s cubic-bezier(0.25, 0.46, 0.45, 0.94),
              transform 0.8s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.scroll-fade-in.visible {
  opacity: 1;
  transform: translateY(0);
}

/* Hero section fade-in on page load */
.hero-fade-in {
  animation: heroFadeIn 1.2s ease-out forwards;
}

@keyframes heroFadeIn {
  0% {
    opacity: 0;
    transform: translateY(20px) scale(0.98);
  }
  60% {
    opacity: 0.8;
    transform: translateY(5px) scale(0.99);
  }
  100% {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

/* Smooth scroll behavior */
html {
  scroll-behavior: smooth;
}

/* Parallax performance optimization */
.parallax-element {
  will-change: transform;
  -webkit-backface-visibility: hidden;
          backface-visibility: hidden;
  perspective: 1000px;
}

/* ========================================
   ULTRA-WIDE & LARGE DISPLAY SUPPORT
   ======================================== */

/* Ultra-wide monitors - 21:9 and 32:9 aspect ratios (2560px+) */
@media (min-width: 2560px) {
  body {
    font-size: 18px;
  }

  .main-hero-area {
    width: 100vw !important;
    max-width: none !important;
    padding-left: clamp(2rem, 5vw, 8rem);
    padding-right: clamp(2rem, 5vw, 8rem);
  }

  #lavaLamp {
    width: 100vw !important;
    min-width: 100vw !important;
    height: 100vh !important;
  }

  .hero-content {
    max-width: 1600px;
    margin: 0 auto;
  }

  .container {
    max-width: 1600px;
    margin: 0 auto;
    padding-left: 2rem;
    padding-right: 2rem;
  }

  h1 {
    font-size: clamp(3.5rem, 5vw, 6rem);
  }

  h2 {
    font-size: clamp(2.5rem, 4vw, 4.5rem);
  }

  p {
    font-size: clamp(1.2rem, 2vw, 1.5rem);
  }

  .section-padding {
    padding: clamp(100px, 12vh, 160px) 0;
  }

  .card,
  .service-item,
  .project-item {
    font-size: 1.2rem;
  }
}

/* Extreme ultra-wide monitors (3440px+) */
@media (min-width: 3440px) {
  body {
    font-size: 20px;
  }

  .container {
    max-width: 1800px;
  }

  .hero-content {
    max-width: 1800px;
  }

  .row {
    margin-left: auto;
    margin-right: auto;
    max-width: 1800px;
  }

  h1 {
    font-size: clamp(4rem, 6vw, 7rem);
  }

  .section-padding {
    padding: clamp(120px, 14vh, 180px) 0;
  }

  /* Optimize grid layouts for ultra-wide */
  .col-lg-4 {
    flex: 0 0 25% !important;
    max-width: 25% !important;
  }

  .col-lg-6 {
    flex: 0 0 33.333333% !important;
    max-width: 33.333333% !important;
  }
}

/* Super ultra-wide (5120px+) - 32:9 and dual 4K */
@media (min-width: 5120px) {
  body {
    font-size: 22px;
  }

  .container {
    max-width: 2400px;
  }

  .hero-content {
    max-width: 2400px;
  }

  h1 {
    font-size: clamp(5rem, 7vw, 8rem);
  }

  h2 {
    font-size: clamp(3rem, 5vw, 5.5rem);
  }

  .section-padding {
    padding: clamp(140px, 16vh, 200px) 0;
  }

  /* Further optimize grid for extreme widths */
  .col-lg-4 {
    flex: 0 0 20% !important;
    max-width: 20% !important;
  }

  .col-lg-3 {
    flex: 0 0 16.666667% !important;
    max-width: 16.666667% !important;
  }

  .col-lg-6 {
    flex: 0 0 25% !important;
    max-width: 25% !important;
  }
}

/* 8K displays (7680px+) */
@media (min-width: 7680px) {
  body {
    font-size: 24px;
  }

  .container {
    max-width: 3200px;
  }

  .hero-content {
    max-width: 3200px;
  }

  h1 {
    font-size: clamp(6rem, 8vw, 10rem);
  }

  .section-padding {
    padding: clamp(160px, 18vh, 240px) 0;
  }
}

/* Large TV displays - Optimize for couch viewing distance (10ft+) */
@media (min-width: 1920px) and (min-height: 1080px) {
  /* Increase text size for better readability from distance */
  body {
    font-size: 19px;
    line-height: 1.8;
  }

  .hero-content h1 {
    font-size: clamp(4rem, 6vw, 7rem);
    line-height: 1.2;
    margin-bottom: 2rem;
  }

  .hero-content p {
    font-size: clamp(1.5rem, 2.5vw, 2rem);
    line-height: 1.7;
  }

  .btn,
  .theme-btn {
    font-size: 1.3rem;
    padding: 18px 40px;
    min-height: 60px;
  }

  .section-title h2 {
    font-size: clamp(3rem, 4vw, 4.5rem);
  }

  .section-title p {
    font-size: clamp(1.3rem, 2vw, 1.8rem);
  }

  /* Increase spacing for better visual hierarchy */
  .section-padding {
    padding: clamp(100px, 12vh, 150px) 0;
  }

  /* Larger cards for better visibility */
  .card,
  .service-item,
  .project-item {
    padding: 2.5rem;
    font-size: 1.25rem;
  }

  /* Bigger icons for TV viewing */
  i {
    font-size: 1.5em;
  }

  /* Navigation optimization for TV */
  .nav-link {
    font-size: 1.2rem;
    padding: 1rem 1.5rem;
  }

  .main-header {
    min-height: 80px;
  }
}

/* 4K TV displays (3840x2160) */
@media (min-width: 3840px) and (min-height: 2160px) {
  body {
    font-size: 24px;
    line-height: 2;
  }

  .hero-content h1 {
    font-size: clamp(6rem, 8vw, 10rem);
    margin-bottom: 3rem;
  }

  .hero-content p {
    font-size: clamp(2rem, 3vw, 3rem);
  }

  .btn,
  .theme-btn {
    font-size: 1.8rem;
    padding: 24px 60px;
    min-height: 80px;
    border-radius: 16px;
  }

  .section-title h2 {
    font-size: clamp(4rem, 6vw, 6rem);
    margin-bottom: 2rem;
  }

  .card,
  .service-item,
  .project-item {
    padding: 3.5rem;
    font-size: 1.5rem;
    border-radius: 20px;
  }

  i {
    font-size: 2em;
  }

  .nav-link {
    font-size: 1.5rem;
    padding: 1.5rem 2rem;
  }

  .main-header {
    min-height: 100px;
  }

  .section-padding {
    padding: clamp(140px, 16vh, 200px) 0;
  }
}

/* Ensure SVG backgrounds scale properly on all large displays */
@media (min-width: 2560px) {
  #lavaLamp svg {
    width: 100vw !important;
    height: 100vh !important;
    min-width: 100vw !important;
    min-height: 100vh !important;
  }

  .lava-container {
    width: 100% !important;
    height: 100% !important;
  }

  /* Ensure theme backgrounds extend full width */
  .theme-dark::before {
    width: 100vw !important;
    background-size: 80px 80px;
  }
}

/* Header smooth transition improvements */
.main-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  width: 100%;
  z-index: 1000;
  transition: background-color 0.35s ease, backdrop-filter 0.35s ease, -webkit-backdrop-filter 0.35s ease, box-shadow 0.35s ease, border-color 0.35s ease;
  background-color: transparent;
  backdrop-filter: blur(0px);
  -webkit-backdrop-filter: blur(0px);
  box-shadow: none;
  border-bottom: 1px solid transparent;
}

.main-header.fixed-header {
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}

/* Navigation - White background in light mode */
nav.main-menu.navbar-expand-lg {
  background-color: var(--nav-bg, #f0f1f3) !important;
  border-radius: 50px;
  padding: 0.5rem 1.5rem;
}

/* Navigation links - Dark text in light mode - MUST BE VISIBLE */
.nav-link-click,
.navigation li a,
nav.main-menu a,
.navbar-nav a {
  color: var(--text-primary) !important;
  font-weight: 500 !important;
  transition: all 0.3s ease !important;
  text-decoration: none !important;
}

.nav-link-click:hover,
.navigation li a:hover,
nav.main-menu a:hover,
.navbar-nav a:hover {
  color: var(--primary-color) !important;
}

/* Dark mode navigation - keep dark */
.theme-dark nav.main-menu.navbar-expand-lg {
  background-color: var(--secondary-bg) !important;
}

/* Dark mode navigation links - white text */
.theme-dark .nav-link-click,
.theme-dark .navigation li a,
.theme-dark nav.main-menu a,
.theme-dark .navbar-nav a {
  color: var(--text-primary) !important;
  font-weight: 500 !important;
}

.theme-dark .nav-link-click:hover,
.theme-dark .navigation li a:hover,
.theme-dark nav.main-menu a:hover,
.theme-dark .navbar-nav a:hover {
  color: var(--accent-primary) !important;
}

/* Hero container - transparent in dark mode to show video */
.theme-dark .hero-container {
  background: transparent !important;
}

/* NewsletterShowcase - Dark mode theming */
.theme-dark .newsletter-showcase-area {
  background: var(--primary-bg) !important;
  color: var(--text-primary) !important;
}

.theme-dark .newsletter-showcase-area .portfolio-box {
  background: var(--card-bg) !important;
  border: 1px solid var(--border-primary);
}

.theme-dark .newsletter-showcase-area .bg-white {
  background: var(--card-bg) !important;
  color: var(--text-primary) !important;
}

.theme-dark .newsletter-showcase-area .newsletter-type-card {
  background: var(--card-bg) !important;
  border-color: var(--border-primary) !important;
  color: var(--text-primary) !important;
}

.theme-dark .newsletter-showcase-area .newsletter-type-card.border-2 {
  background: var(--secondary-bg) !important;
  border-color: var(--accent-primary) !important;
}

.theme-dark .newsletter-showcase-area h5,
.theme-dark .newsletter-showcase-area h6 {
  color: var(--text-primary) !important;
}

.theme-dark .newsletter-showcase-area .small {
  color: var(--text-secondary) !important;
}

/* About section - Dark mode theming */
.theme-dark .about-area,
.theme-dark .about-text {
  background: var(--primary-bg) !important;
  color: var(--text-primary) !important;
}

.theme-dark .about-text h2,
.theme-dark .about-text h3 {
  color: var(--text-primary) !important;
}

.theme-dark .about-text p,
.theme-dark .about-text li,
.theme-dark .about-text span {
  color: var(--text-secondary) !important;
}

.theme-dark .about-text strong {
  color: var(--text-primary) !important;
}

.theme-dark .about-text .subtitle {
  color: var(--text-secondary) !important;
  opacity: 0.8;
}

/* Theme Toggle Button Styles */
.theme-toggle-btn {
  position: relative;
  width: 44px;
  height: 44px;
  border: none;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.1);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  flex-shrink: 0;
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

.theme-toggle-btn:hover {
  background: rgba(255, 255, 255, 0.2);
  transform: scale(1.05);
}

.theme-toggle-icon {
  font-size: 18px;
  color: var(--text-primary) !important;
  transition: all 0.3s ease;
  line-height: 1;
  display: flex;
  align-items: center;
  justify-content: center;
}

.theme-toggle-mobile .mobile-nav-link {
  cursor: pointer;
  border-radius: 10px;
  transition: all 400ms cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

/* Smooth theme transitions - targeted instead of wildcard for performance */
body,
.main-header,
.card,
.service-item,
.project-item,
section,
footer,
.form-control,
.btn,
.theme-btn,
.dropdown-menu,
.alert,
.table,
.modal-content,
nav.main-menu.navbar-expand-lg {
  transition: background-color 0.3s ease, color 0.3s ease, border-color 0.3s ease, box-shadow 0.3s ease;
}

/* Navbar auth container styles */
.navbar-auth {
  display: flex !important;
  align-items: center !important;
  justify-content: flex-end;
  gap: 0.5rem;
  height: 60px;
  flex-shrink: 0;
}

/* Specific smooth transitions for theme changes */
.main-header, .navbar-auth, .theme-toggle-btn, .btn, .card, .service-item, .project-item {
  transition: all 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

/* Modern Dark Theme - Industry Standard */
.theme-dark {
  --primary-bg: #0f172a;
  --secondary-bg: #1e293b;
  --card-bg: #1e293b;
  --elevated-bg: #334155;
  --text-primary: #e2e8f0;
  --text-secondary: #94a3b8;
  --text-tertiary: #64748b;
  --accent-primary: #38bdf8;
  --accent-secondary: #60a5fa;
  --accent-hover: #0ea5e9;
  --success: #4ade80;
  --warning: #fbbf24;
  --error: #f87171;
  --info: #38bdf8;
  --border-primary: #334155;
  --border-secondary: #475569;
  --border-accent: #38bdf8;
}

.theme-dark body {
  background: var(--primary-bg);
  color: var(--text-primary);
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
}

/* Dark theme header */
.theme-dark .main-header {
  background-color: rgba(15, 23, 42, 0.95) !important;
  border-bottom: 1px solid var(--border-primary);
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.3);
}

.theme-dark .main-header.fixed-header {
  background-color: rgba(15, 23, 42, 0.98) !important;
  -webkit-backdrop-filter: blur(12px);
          backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border-secondary);
}

/* Dark theme mobile menu - keep text white over blue gradient */
.theme-dark .mobile-menu-overlay .mobile-nav-link,
.theme-dark .mobile-menu-overlay .link-text,
.theme-dark .mobile-menu-overlay .sign-out-btn {
  color: #fff !important;
  text-shadow: none;
}

.theme-dark .mobile-menu-overlay .mobile-nav-link:hover .link-text {
  color: #FFD700 !important;
  text-shadow:
    0 0 8px rgba(255, 215, 0, 0.5),
    0 2px 6px rgba(255, 215, 0, 0.3);
}

/* Dark theme buttons */
.theme-dark .btn-primary {
  background: var(--accent-primary);
  border: 1px solid transparent;
  color: var(--primary-bg);
  text-shadow: none;
  font-weight: 600;
  box-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.3);
}

.theme-dark .btn-primary:hover {
  background: var(--accent-hover);
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.3);
  transform: translateY(-1px);
}

.theme-dark .btn-outline-light {
  border: 1px solid var(--border-accent);
  color: var(--accent-primary);
  text-shadow: none;
  background: transparent;
}

.theme-dark .btn-outline-light:hover {
  background: rgba(56, 189, 248, 0.1);
  border-color: var(--accent-hover);
  color: var(--accent-hover);
  text-shadow: none;
  box-shadow: 0 0 0 3px rgba(56, 189, 248, 0.1);
}

/* Dark theme theme toggle */
.theme-dark .theme-toggle-btn {
  background: rgba(56, 189, 248, 0.1);
  border: 1px solid var(--border-secondary);
  box-shadow: none;
  width: 40px !important;
  height: 40px !important;
}

.theme-dark .theme-toggle-btn:hover {
  background: rgba(56, 189, 248, 0.2);
  border-color: var(--border-accent);
  box-shadow: 0 0 0 3px rgba(56, 189, 248, 0.1);
}

.theme-dark .theme-toggle-icon {
  color: var(--accent-primary);
  text-shadow: none;
  font-size: 18px;
  line-height: 1;
  display: flex;
  align-items: center;
  justify-content: center;
}

.theme-dark .theme-toggle-btn:hover .theme-toggle-icon {
  color: var(--accent-hover);
  text-shadow: none;
}

/* Dark theme cards and sections */
.theme-dark .card,
.theme-dark .service-item,
.theme-dark .project-item {
  background: var(--card-bg);
  border: 1px solid var(--border-primary);
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.3);
  color: var(--text-primary);
}

.theme-dark .card:hover,
.theme-dark .service-item:hover,
.theme-dark .project-item:hover {
  border-color: var(--border-secondary);
  box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.4);
  transform: translateY(-2px);
}

/* Dark theme text elements */
.theme-dark h1, .theme-dark h2, .theme-dark h3,
.theme-dark h4, .theme-dark h5, .theme-dark h6 {
  color: var(--text-primary);
  text-shadow: none;
}

.theme-dark p {
  color: var(--text-secondary);
}

/* Dark theme hero section */
.theme-dark .main-hero-area {
  background: var(--primary-bg);
  color: var(--text-primary);
}

.theme-dark .hero-content h1 {
  color: var(--text-primary);
  text-shadow: none;
}

.theme-dark .hero-content h2 {
  color: var(--text-primary) !important;
  text-shadow: none;
}

.theme-dark .hero-content h3 {
  color: var(--text-primary) !important;
}

.theme-dark .hero-content p {
  color: var(--text-secondary);
}

/* Dark theme sections */
.theme-dark section {
  color: var(--text-primary);
}

.theme-dark .section-title {
  color: var(--text-primary);
  text-shadow: none;
}

/* Dark theme forms */
.theme-dark .form-control {
  background: var(--card-bg);
  border: 1px solid var(--border-primary);
  color: var(--text-primary);
}

.theme-dark .form-control:focus {
  background: var(--card-bg);
  border-color: var(--accent-primary);
  box-shadow: 0 0 0 3px rgba(56, 189, 248, 0.1);
  color: var(--text-primary);
  outline: none;
}

/* Dark theme footer */
.theme-dark footer {
  background: var(--secondary-bg);
  border-top: 1px solid var(--border-primary);
  box-shadow: none;
}

/* Dark theme animations - Subtle, no neon effects */
@keyframes subtlePulse {
  0%, 100% {
    opacity: 1;
  }
  50% {
    opacity: 0.9;
  }
}

.theme-dark .subtle-pulse {
  animation: subtlePulse 3s ease-in-out infinite;
}

/* Dark theme page-specific styles */
.theme-dark .subscription-page,
.theme-dark .account-page,
.theme-dark .auth-page {
  background: var(--primary-bg);
  color: var(--text-primary);
  min-height: 100vh;
}

.theme-dark .subscription-card,
.theme-dark .account-card {
  background: var(--card-bg);
  border: 1px solid var(--border-primary);
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.3);
  border-radius: 12px;
}

.theme-dark .subscription-card:hover,
.theme-dark .account-card:hover {
  border-color: var(--border-secondary);
  box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.4);
  transform: translateY(-2px);
}

.theme-dark .pricing-card {
  background: var(--card-bg);
  border: 1px solid var(--border-primary);
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.3);
}

.theme-dark .pricing-card.featured {
  border-color: var(--accent-primary);
  box-shadow: 0 0 0 2px var(--accent-primary), 0 10px 15px -3px rgba(0, 0, 0, 0.4);
}

/* Dark theme table styles */
.theme-dark .table {
  background: var(--card-bg);
  color: var(--text-primary);
  border: 1px solid var(--border-primary);
}

.theme-dark .table th {
  background: var(--secondary-bg);
  color: var(--text-primary);
  border-color: var(--border-primary);
  text-shadow: none;
  font-weight: 600;
}

.theme-dark .table td {
  border-color: var(--border-primary);
  color: var(--text-secondary);
}

.theme-dark .table-striped tbody tr:nth-of-type(odd) {
  background: rgba(51, 65, 85, 0.3);
}

/* Dark theme alerts */
.theme-dark .alert {
  background: var(--card-bg);
  border: 1px solid var(--border-primary);
  color: var(--text-primary);
}

.theme-dark .alert-success {
  border-color: var(--success);
  background: rgba(74, 222, 128, 0.1);
  color: var(--success);
}

.theme-dark .alert-danger {
  border-color: var(--error);
  background: rgba(248, 113, 113, 0.1);
  color: var(--error);
}

.theme-dark .alert-warning {
  border-color: var(--warning);
  background: rgba(251, 191, 36, 0.1);
  color: var(--warning);
}

/* Dark theme FAQ styles */
.theme-dark .faq-section {
  background: var(--primary-bg);
  color: var(--text-primary);
}
.theme-dark .faq-contact-card {
  background: var(--card-bg);
  border: 1px solid var(--border-primary);
  border-radius: 12px;
  padding: 2rem;
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.3);
  transition: all 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}
.theme-dark .faq-contact-card:hover {
  border-color: var(--border-secondary);
  box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.4);
  transform: translateY(-2px);
}
.theme-dark .faq-contact-card h2 {
  color: var(--text-primary);
  text-shadow: none;
}
.theme-dark .faq-contact-card p {
  color: var(--text-secondary);
}
.theme-dark .faq-contact-card a {
  color: var(--accent-primary);
  text-shadow: none;
  text-decoration: none;
  transition: all 0.3s ease;
}
.theme-dark .faq-contact-card a:hover {
  color: var(--accent-hover);
  text-shadow: none;
}
.theme-dark .faq-accordion .accordion-item {
  background: var(--card-bg);
  border: 1px solid var(--border-primary);
  border-radius: 8px;
  margin-bottom: 1rem;
  overflow: hidden;
  transition: all 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}
.theme-dark .faq-accordion .accordion-item:hover {
  border-color: var(--border-secondary);
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.2);
}
.theme-dark .faq-button {
  background: var(--card-bg) !important;
  border: none !important;
  color: var(--text-primary) !important;
  font-weight: 600;
  font-size: 1.1rem;
  text-shadow: none;
  padding: 1.5rem;
  transition: all 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94);
  box-shadow: none !important;
}
.theme-dark .faq-button:not(.collapsed) {
  background: var(--secondary-bg) !important;
  color: var(--accent-primary) !important;
  text-shadow: none;
}
.theme-dark .faq-button:hover {
  background: var(--elevated-bg) !important;
  color: var(--accent-primary) !important;
  text-shadow: none;
  transform: none;
}
.theme-dark .faq-button::after {
  background-image: none !important;
  content: '+';
  font-size: 1.5rem;
  color: var(--accent-primary);
  text-shadow: none;
  transition: all 0.3s ease;
  transform: rotate(0deg);
}
.theme-dark .faq-button:not(.collapsed)::after {
  content: '\2212';
  color: var(--accent-primary);
  text-shadow: none;
  transform: rotate(180deg);
}
.theme-dark .faq-answer {
  background: var(--secondary-bg) !important;
  border-top: 1px solid var(--border-primary) !important;
  color: var(--text-secondary);
  padding: 1.5rem;
  font-size: 1rem;
  line-height: 1.7;
}
.theme-dark .faq-answer p {
  margin: 0;
  color: var(--text-secondary);
}

/* Light theme FAQ styles */
.faq-section {
  background: var(--primary-bg);
  color: var(--text-primary);
}
.faq-contact-card {
  background: var(--card-bg);
  border: 2px solid var(--border-color);
  border-radius: 15px;
  padding: 2rem;
  box-shadow: var(--card-shadow);
  transition: all 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}
.faq-contact-card:hover {
  border-color: var(--primary-color);
  box-shadow: var(--shadow-primary-md);
  transform: translateY(-5px);
}
.faq-contact-card h2 {
  color: var(--heading-color);
  font-weight: 700;
}
.faq-contact-card p {
  color: var(--text-secondary);
}
.faq-contact-card a {
  color: var(--primary-color);
  text-decoration: none;
  transition: all 0.3s ease;
}
.faq-contact-card a:hover {
  color: var(--primary-color-hover);
}
.faq-accordion .accordion-item {
  background: var(--card-bg);
  border: 2px solid var(--border-color);
  border-radius: 10px;
  margin-bottom: 1rem;
  overflow: hidden;
  transition: all 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}
.faq-accordion .accordion-item:hover {
  border-color: var(--primary-color);
  box-shadow: var(--shadow-primary-xs);
}
.faq-button {
  background: var(--card-bg) !important;
  border: none !important;
  color: var(--heading-color) !important;
  font-weight: 600;
  font-size: 1.1rem;
  padding: 1.5rem;
  transition: all 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94);
  box-shadow: none !important;
}
.faq-button:not(.collapsed) {
  background: var(--secondary-bg) !important;
  color: var(--primary-color) !important;
}
.faq-button:hover {
  background: var(--secondary-bg) !important;
  color: var(--primary-color) !important;
  transform: translateX(5px);
}
.faq-button::after {
  background-image: none !important;
  content: '+';
  font-size: 1.5rem;
  color: var(--primary-color);
  transition: all 0.3s ease;
  transform: rotate(0deg);
}
.faq-button:not(.collapsed)::after {
  content: '\2212';
  color: var(--primary-color);
  transform: rotate(180deg);
}
.faq-answer {
  background: var(--secondary-bg) !important;
  border-top: 1px solid var(--border-color) !important;
  color: var(--text-secondary);
  padding: 1.5rem;
  font-size: 1rem;
  line-height: 1.7;
}
.faq-answer p {
  margin: 0;
  color: var(--text-secondary);
}

/* Mobile & Tablet dark theme fixes - Extended to cover all small screens */
@media (max-width: 992px) {
  /* Root level fixes */
  html.theme-dark {
    background: var(--primary-bg) !important;
  }

  .theme-dark {
    background: var(--primary-bg) !important;
    color: var(--text-primary) !important;
    min-height: 100vh;
  }

  .theme-dark body {
    background: var(--primary-bg) !important;
    color: var(--text-primary) !important;
  }

  /* Main content wrappers */
  .theme-dark main,
  .theme-dark section,
  .theme-dark article,
  .theme-dark aside,
  .theme-dark nav:not(.mobile-navigation) {
    background: var(--primary-bg) !important;
    color: var(--text-primary) !important;
  }

  /* Container fixes */
  .theme-dark .container,
  .theme-dark .container-fluid,
  .theme-dark .row,
  .theme-dark .col,
  .theme-dark [class*="col-"] {
    background: transparent !important;
    color: var(--text-primary) !important;
  }

  .theme-dark .section-padding {
    background: var(--primary-bg) !important;
    color: var(--text-primary) !important;
  }

  /* Ensure all content areas are visible */
  .theme-dark .content-area,
  .theme-dark .page-content,
  .theme-dark .main-content {
    background: var(--primary-bg) !important;
    color: var(--text-primary) !important;
  }

  /* Force visibility and proper colors on ALL text elements */
  .theme-dark h1,
  .theme-dark h2,
  .theme-dark h3,
  .theme-dark h4,
  .theme-dark h5,
  .theme-dark h6 {
    color: var(--text-primary) !important;
    text-shadow: none !important;
    opacity: 1 !important;
    visibility: visible !important;
  }

  .theme-dark p:not(.mobile-menu-overlay *),
  .theme-dark span:not(.hamburger-line):not(.mobile-menu-overlay *),
  .theme-dark div:not(.mobile-menu-overlay):not(.mobile-menu-overlay *):not(.mobile-close-button):not(.animated-hamburger):not(.mobile-menu-theme-toggle):not(.mobile-menu-theme-toggle *),
  .theme-dark li:not(.mobile-menu-overlay *),
  .theme-dark a:not(.theme-btn):not(.btn):not(.mobile-menu-overlay *),
  .theme-dark label:not(.mobile-menu-overlay *),
  .theme-dark small:not(.mobile-menu-overlay *),
  .theme-dark strong:not(.mobile-menu-overlay *),
  .theme-dark em:not(.mobile-menu-overlay *),
  .theme-dark b:not(.mobile-menu-overlay *),
  .theme-dark i:not([class*="ri-"]):not(.mobile-menu-overlay *) {
    color: var(--text-primary) !important;
    opacity: 1 !important;
    visibility: visible !important;
  }

  /* Ensure cards and service items are visible with proper contrast */
  .theme-dark .card,
  .theme-dark .service-item,
  .theme-dark .project-item,
  .theme-dark .team-member-card,
  .theme-dark .feature-card,
  .theme-dark .info-card {
    background: var(--card-bg) !important;
    color: var(--text-primary) !important;
    border: 1px solid var(--border-primary) !important;
    opacity: 1 !important;
    visibility: visible !important;
  }

  /* Ensure all card content is visible */
  .theme-dark .card *,
  .theme-dark .service-item *,
  .theme-dark .project-item * {
    color: var(--text-primary) !important;
    opacity: 1 !important;
    visibility: visible !important;
  }

  .theme-dark .card h1,
  .theme-dark .card h2,
  .theme-dark .card h3,
  .theme-dark .card h4,
  .theme-dark .card h5,
  .theme-dark .card h6,
  .theme-dark .service-item h1,
  .theme-dark .service-item h2,
  .theme-dark .service-item h3,
  .theme-dark .service-item h4,
  .theme-dark .project-item h1,
  .theme-dark .project-item h2,
  .theme-dark .project-item h3 {
    color: var(--text-primary) !important;
    text-shadow: none !important;
  }

  /* Ensure icons are visible */
  .theme-dark i,
  .theme-dark svg:not(#lavaLamp):not(#lavaLamp *) {
    color: var(--accent-primary) !important;
    fill: var(--accent-primary) !important;
    opacity: 1 !important;
    visibility: visible !important;
  }

  /* Ensure primary action buttons are visible with proper styling */
  .theme-dark .theme-btn,
  .theme-dark .btn-primary {
    background: var(--accent-primary) !important;
    border: 1px solid transparent !important;
    color: var(--primary-bg) !important;
    opacity: 1 !important;
    visibility: visible !important;
    box-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.3) !important;
  }

  .theme-dark .btn-outline-primary,
  .theme-dark .btn-outline-light {
    background: transparent !important;
    border: 1px solid var(--border-accent) !important;
    color: var(--accent-primary) !important;
    opacity: 1 !important;
    visibility: visible !important;
  }

  .theme-dark .btn-outline-primary:hover,
  .theme-dark .btn-outline-light:hover {
    background: rgba(56, 189, 248, 0.1) !important;
  }

  .theme-dark .btn-secondary,
  .theme-dark .btn-outline-secondary {
    background: var(--secondary-bg) !important;
    border: 1px solid var(--border-primary) !important;
    color: var(--text-primary) !important;
    opacity: 1 !important;
    visibility: visible !important;
  }

  .theme-dark .btn-danger {
    background: var(--error) !important;
    border: 1px solid transparent !important;
    color: #fff !important;
    opacity: 1 !important;
    visibility: visible !important;
  }

  .theme-dark .btn-success {
    background: var(--success) !important;
    border: 1px solid transparent !important;
    color: var(--primary-bg) !important;
    opacity: 1 !important;
    visibility: visible !important;
  }

  /* Generic button fallback - subtle, not aggressively colored */
  .theme-dark button:not(.animated-hamburger):not(.mobile-close-button):not(.theme-toggle-btn):not(.btn):not(.theme-btn):not(.sign-out-btn):not(.mobile-nav-link):not(.faq-button) {
    opacity: 1 !important;
    visibility: visible !important;
  }

  /* Ensure images are visible */
  .theme-dark img {
    opacity: 1 !important;
    visibility: visible !important;
  }

  /* Lists and list items */
  .theme-dark ul,
  .theme-dark ol,
  .theme-dark dl {
    color: var(--text-primary) !important;
  }

  .theme-dark ul:not(.mobile-menu-list) li:not(.mobile-menu-item):not(.user-info-mobile-item):not(.mobile-menu-separator):not(.mobile-action-item):not(.theme-toggle-mobile),
  .theme-dark ol li,
  .theme-dark dl dt,
  .theme-dark dl dd {
    color: var(--text-primary) !important;
    opacity: 1 !important;
    visibility: visible !important;
  }

  /* Forms */
  .theme-dark input,
  .theme-dark textarea,
  .theme-dark select,
  .theme-dark .form-control {
    background: var(--card-bg) !important;
    color: var(--text-primary) !important;
    border: 1px solid var(--border-primary) !important;
    opacity: 1 !important;
    visibility: visible !important;
  }

  .theme-dark input::placeholder,
  .theme-dark textarea::placeholder {
    color: var(--text-secondary) !important;
    opacity: 0.7 !important;
  }

  /* Override any elements with inline dark styles */
  .theme-dark [style*="color: rgb(0, 0, 0)"],
  .theme-dark [style*="color: #000"],
  .theme-dark [style*="color: black"],
  .theme-dark [style*="color: rgb(51, 51, 51)"],
  .theme-dark [style*="color: #333"] {
    color: var(--text-primary) !important;
  }

  /* Override any elements with dark backgrounds */
  .theme-dark [style*="background: rgb(0, 0, 0)"],
  .theme-dark [style*="background: #000"],
  .theme-dark [style*="background: black"],
  .theme-dark [style*="background-color: rgb(0, 0, 0)"],
  .theme-dark [style*="background-color: #000"],
  .theme-dark [style*="background-color: black"] {
    background: var(--card-bg) !important;
  }

  /* Nuclear option - force visibility on everything except specific exceptions */
  .theme-dark *:not(#lavaLamp):not(#lavaLamp *):not(.mobile-menu-overlay):not(.optimized-preloader):not(.optimized-preloader *) {
    visibility: visible !important;
  }

  /* Ensure proper z-index stacking */
  .theme-dark section {
    position: relative;
    z-index: 10;
  }

  .theme-dark .container {
    position: relative;
    z-index: 11;
  }

  .theme-dark .card,
  .theme-dark .service-item,
  .theme-dark .project-item {
    position: relative;
    z-index: 12;
  }
}

.theme-dark,
.theme-dark div,
.theme-dark span,
.theme-dark p,
.theme-dark li,
.theme-dark td,
.theme-dark th,
.theme-dark label,
.theme-dark a:not(.theme-btn):not(.btn) {
  color: var(--text-primary) !important;
}

.theme-dark h1,
.theme-dark h2,
.theme-dark h3,
.theme-dark h4,
.theme-dark h5,
.theme-dark h6 {
  color: var(--text-primary) !important;
  text-shadow: none;
}

/* Override any dark text that might appear */
.theme-dark .text-dark,
.theme-dark .text-black,
.theme-dark [style*="color: #333"],
.theme-dark [style*="color: #000"],
.theme-dark [style*="color: black"] {
  color: var(--text-primary) !important;
}

/* Ensure navigation items are visible */
.theme-dark .nav-link,
.theme-dark .navbar-nav .nav-link,
.theme-dark .dropdown-item {
  color: var(--text-primary) !important;
}

.theme-dark .nav-link:hover,
.theme-dark .navbar-nav .nav-link:hover,
.theme-dark .dropdown-item:hover {
  color: var(--accent-primary) !important;
}

/* Fix any Bootstrap default dark text */
.theme-dark .text-muted {
  color: var(--text-secondary) !important;
}

.theme-dark .text-secondary {
  color: var(--text-secondary) !important;
}

/* Ensure form inputs have proper contrast */
.theme-dark input,
.theme-dark textarea,
.theme-dark select {
  background: var(--card-bg) !important;
  color: var(--text-primary) !important;
  border: 1px solid var(--border-primary) !important;
}

.theme-dark input::placeholder,
.theme-dark textarea::placeholder {
  color: var(--text-secondary) !important;
}

/* Card and container backgrounds */
.theme-dark .card,
.theme-dark .service-item,
.theme-dark .subscription-card {
  background: var(--card-bg) !important;
  color: var(--text-primary) !important;
}

/* Menu and dropdown fixes */
.theme-dark .dropdown-menu,
.theme-dark .mobile-menu-overlay {
  background: var(--card-bg) !important;
  border: 1px solid var(--border-primary) !important;
}

.theme-dark .dropdown-menu .dropdown-item {
  background: transparent !important;
  color: var(--text-primary) !important;
}

.theme-dark .dropdown-menu .dropdown-item:hover {
  background: var(--secondary-bg) !important;
  color: var(--accent-primary) !important;
}

/* Enhanced mobile dark theme components */
.theme-dark .mobile-close-button {
  background: rgba(56, 189, 248, 0.1) !important;
  border: 1px solid var(--border-secondary) !important;
  color: var(--text-primary) !important;
}

.theme-dark .mobile-close-button:hover {
  background: rgba(56, 189, 248, 0.2) !important;
  border-color: var(--accent-primary) !important;
  color: var(--accent-primary) !important;
  box-shadow: 0 0 0 3px rgba(56, 189, 248, 0.1) !important;
}

.theme-dark .close-icon {
  color: var(--text-primary) !important;
  text-shadow: none;
}

.theme-dark .mobile-close-button:hover .close-icon {
  color: var(--accent-primary) !important;
  text-shadow: none;
}

.theme-dark .animated-hamburger {
  background: rgba(56, 189, 248, 0.1) !important;
  border: 1px solid var(--border-secondary) !important;
}

.theme-dark .animated-hamburger:hover {
  background: rgba(56, 189, 248, 0.2) !important;
  border-color: var(--accent-primary) !important;
  box-shadow: 0 0 0 3px rgba(56, 189, 248, 0.1) !important;
}

.theme-dark .hamburger-line {
  background-color: var(--text-primary) !important;
  box-shadow: none;
}

.theme-dark .menu-background-layer {
  background: var(--card-bg) !important;
  border: 1px solid var(--border-primary) !important;
}

/* List and menu items */
.theme-dark ul,
.theme-dark ol,
.theme-dark .list-group {
  background: transparent !important;
}

.theme-dark .list-group-item {
  background: var(--card-bg) !important;
  color: var(--text-primary) !important;
  border-color: var(--border-primary) !important;
}

/* Footer and bottom sections */
.theme-dark footer,
.theme-dark .footer-section {
  background: var(--secondary-bg) !important;
  color: var(--text-primary) !important;
}

/* Page content areas */
.theme-dark .page-content,
.theme-dark .content-wrapper,
.theme-dark .main-content {
  background: var(--primary-bg) !important;
  color: var(--text-primary) !important;
}

/* Modal and popup fixes */
.theme-dark .modal-content,
.theme-dark .popover,
.theme-dark .tooltip-inner {
  background: var(--card-bg) !important;
  color: var(--text-primary) !important;
  border: 1px solid var(--border-primary) !important;
}

/* Table enhancements */
.theme-dark table tbody tr {
  background: var(--card-bg) !important;
}

.theme-dark table tbody tr:nth-child(even) {
  background: var(--secondary-bg) !important;
}

/* Optimized Preloader Styles for Smooth Performance */
.optimized-preloader {
  transform: translateZ(0);
  -webkit-backface-visibility: hidden;
          backface-visibility: hidden;
  perspective: 1000px;
  will-change: transform;
  contain: layout style paint;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  background: #000;
  isolation: isolate;
}

.optimized-preloader svg {
  transform: translateZ(0);
  -webkit-backface-visibility: hidden;
          backface-visibility: hidden;
  will-change: d, transform;
  shape-rendering: geometricPrecision;
  vector-effect: non-scaling-stroke;
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
}

.optimized-text {
  transform: translateZ(0);
  -webkit-backface-visibility: hidden;
          backface-visibility: hidden;
  will-change: transform, opacity;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  font-size: clamp(16px, 4vw, 24px);
  font-weight: 300;
  letter-spacing: clamp(8px, 2vw, 15px);
  text-transform: uppercase;
  color: #ffffff;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  white-space: nowrap;
  -webkit-user-select: none;
     -moz-user-select: none;
          user-select: none;
  pointer-events: none;
}

.optimized-text span {
  display: inline-block;
  transform: translateZ(0);
  -webkit-backface-visibility: hidden;
          backface-visibility: hidden;
  will-change: transform, opacity;
  transition: transform 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

/* Mobile-specific optimizations */
@media (max-width: 768px) {
  .optimized-preloader {
    will-change: transform;
    -webkit-touch-callout: none;
    -webkit-user-select: none;
    -moz-user-select: none;
         user-select: none;
  }

  .optimized-text {
    font-size: clamp(14px, 5vw, 20px);
    letter-spacing: clamp(6px, 3vw, 12px);
  }
}

/* Low-end device optimizations */
@media (max-width: 480px) and (-webkit-max-device-pixel-ratio: 1.5), (max-width: 480px) and (max-resolution: 1.5dppx) {
  .optimized-preloader svg {
    shape-rendering: optimizeSpeed;
  }

  .optimized-text {
    font-weight: 400;
    letter-spacing: 8px;
  }
}

/* High refresh rate display optimization */
@media (-webkit-min-device-pixel-ratio: 1.25), (min-resolution: 120dpi) {
  .optimized-preloader {
    -webkit-backface-visibility: hidden;
    backface-visibility: hidden;
  }
}

/* Reduced motion preferences */
@media (prefers-reduced-motion: reduce) {
  .optimized-preloader,
  .optimized-preloader svg,
  .optimized-text,
  .optimized-text span {
    animation: none !important;
    transition: none !important;
    will-change: auto !important;
  }
}

/* Battery optimization for low power mode */
@media (prefers-reduced-motion: reduce), (update: slow) {
  .optimized-preloader {
    transform: none !important;
    will-change: auto !important;
  }
}

/* ========================================
   COMPREHENSIVE THEME STANDARDIZATION
   ======================================== */

/* Standardized Buttons - Both Themes */
.theme-btn {
  background: linear-gradient(135deg, #007bff, #0056b3);
  border: none;
  color: #ffffff;
  padding: 12px 30px;
  border-radius: 8px;
  font-weight: 600;
  box-shadow: 0 4px 15px rgba(0, 123, 255, 0.3);
  transition: all 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.theme-btn:hover {
  background: linear-gradient(135deg, #0056b3, #004085);
  box-shadow: 0 6px 20px rgba(0, 123, 255, 0.4);
  transform: translateY(-2px);
}

.theme-dark .theme-btn {
  background: var(--accent-primary) !important;
  border: 1px solid transparent !important;
  color: var(--primary-bg) !important;
  box-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.3) !important;
}

.theme-dark .theme-btn:hover {
  background: var(--accent-hover) !important;
  border-color: transparent !important;
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.3) !important;
}

/* Standardized Section Titles */
.section-title h2,
.section-title h3,
.section-heading {
  color: #2c3e50;
  margin-bottom: 1.5rem;
}

.theme-dark .section-title h2,
.theme-dark .section-title h3,
.theme-dark .section-heading {
  color: var(--text-primary) !important;
  text-shadow: none;
}

/* Standardized Section Descriptions */
.section-title p,
.section-description,
.section-subtitle {
  color: #666666;
  font-size: 1.1rem;
}

.theme-dark .section-title p,
.theme-dark .section-description,
.theme-dark .section-subtitle {
  color: var(--text-secondary) !important;
}

/* Standardized Icon transitions - only color for theme switching */
i {
  transition: color 0.3s ease;
}

.theme-dark i:not(.close-icon):not(.hamburger-line) {
  color: var(--accent-primary);
  text-shadow: none;
}

/* Standardized Hover States */
.theme-dark .service-item:hover i,
.theme-dark .project-item:hover i,
.theme-dark .card:hover i {
  color: var(--accent-hover) !important;
  text-shadow: none;
}

/* Standardized Background Sections */
.bg-light {
  background: var(--secondary-bg, #e8e9ec) !important;
}

.theme-dark .bg-light {
  background: var(--secondary-bg) !important;
}

.bg-white {
  background: var(--card-bg, #f5f6f8) !important;
}

.theme-dark .bg-white {
  background: var(--card-bg) !important;
}

/* Standardized Borders */
.border,
.card-border,
.section-border {
  border: 1px solid #e9ecef !important;
}

.theme-dark .border,
.theme-dark .card-border,
.theme-dark .section-border {
  border: 1px solid var(--border-primary) !important;
}

/* Standardized Shadows */
.shadow-sm {
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1) !important;
}

.theme-dark .shadow-sm {
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.2) !important;
}

.shadow {
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15) !important;
}

.theme-dark .shadow {
  box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.3) !important;
}

/* Standardized Text Colors */
.text-primary {
  color: #007bff !important;
}

.theme-dark .text-primary {
  color: var(--accent-primary) !important;
}

.text-secondary {
  color: #666666 !important;
}

.theme-dark .text-secondary {
  color: var(--text-secondary) !important;
}

/* Dark theme subtle grid background */
.theme-dark::before {
  display: none;
}

/* Dark theme optimizations for ultra-wide and large displays */
@media (min-width: 2560px) {

  .theme-dark .main-header {
    border-bottom-width: 3px;
  }

  .theme-dark .card,
  .theme-dark .service-item,
  .theme-dark .project-item {
    border-width: 1px;
  }

  .theme-dark .theme-btn {
    border-width: 1px;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.3) !important;
  }

  .theme-dark h1,
  .theme-dark h2 {
    text-shadow: none;
  }
}

@media (min-width: 3840px) {

  .theme-dark .main-header {
    border-bottom-width: 4px;
  }

  .theme-dark .card,
  .theme-dark .service-item,
  .theme-dark .project-item {
    border-width: 1px;
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.4);
  }

  .theme-dark h1,
  .theme-dark h2 {
    text-shadow: none;
  }
}

/* Low-end device optimizations */
@media (max-device-width: 480px) and (max-device-pixel-ratio: 1.5) {
  * {
    animation: none !important;
    transition: none !important;
  }

  .hero-skeleton {
    opacity: 1 !important;
    animation: none !important;
  }

  .mobile-cloud {
    animation: none !important;
  }

  .theme-dark::before {
    display: none;
  }
}

/* ========================================
   NAVIGATION VISIBILITY OVERRIDES
   (Highest priority - must come last)
   ======================================== */

/* Force navigation links to be visible in light mode - HIGHEST PRIORITY */
html body .main-header .main-menu .navigation li a,
html body .main-header .main-menu a,
html body .nav-link-click,
html body .navigation li a,
html body nav.main-menu a,
html body .navbar-nav a {
  color: #2c3e50 !important;
}

html body .main-header .main-menu .navigation li a:hover,
html body .main-header .main-menu a:hover,
html body .nav-link-click:hover,
html body .navigation li a:hover {
  color: #007bff !important;
}

/* Dark mode overrides */
html body.theme-dark .main-header .main-menu .navigation li a,
html body.theme-dark .main-header .main-menu a,
html body.theme-dark .nav-link-click,
html body.theme-dark .navigation li a,
html body.theme-dark nav.main-menu a,
html body.theme-dark .navbar-nav a {
  color: #e2e8f0 !important;
}

html body.theme-dark .nav-link-click:hover,
html body.theme-dark .navigation li a:hover {
  color: #38bdf8 !important;
}

/* Theme toggle icon visibility */
html body .theme-toggle-icon {
  color: #2c3e50 !important;
}

html body.theme-dark .theme-toggle-icon {
  color: #38bdf8 !important;
}

/* ========================================
   MOBILE UX POLISH — Session s92
   Non-destructive overrides for smooth mobile experience
   Addresses: header glitch, animation jolt, footer layout,
   hamburger menu fullscreen, theme consistency
   ======================================== */

/* ========================================
   1. SMOOTH STICKY HEADER — No jump on scroll
   Root cause: style.css has body:has(header.fixed-header)
   that adds padding-top:120px when scrollY>50, causing
   hero content to jump down 120px. Also, header-inner
   padding changes from --spacing-md to --spacing-sm.
   Fix: Neutralize body padding jump + lock header padding.
   ======================================== */

/* Prevent the 120px body padding jump when fixed-header
   class is added on scroll. Individual pages already
   handle their own padding-top for the fixed header. */
body:has(header.fixed-header) {
  padding-top: 0 !important;
}

/* Lock header-inner to consistent padding on ALL screen sizes
   so the header never changes height when isFixed triggers */
.header-inner {
  padding: 12px 0 !important;
  transition: none !important;
}

.fixed-header .header-inner {
  padding: 12px 0 !important;
}

/* Smooth background/shadow transition only — no padding/height changes */
.main-header {
  transition: background-color 0.4s ease, box-shadow 0.4s ease, border-color 0.4s ease, backdrop-filter 0.4s ease, -webkit-backdrop-filter 0.4s ease !important;
}

@media (max-width: 991px) {
  /* Tighter padding on mobile */
  .header-inner {
    padding: 8px 0 !important;
  }

  .fixed-header .header-inner {
    padding: 8px 0 !important;
  }

  /* When scrolled on mobile, use solid background instead of blur
     (blur is expensive on mobile and can cause jank) */
  .main-header.fixed-header {
    background-color: var(--card-bg-translucent) !important;
    backdrop-filter: none !important;
    -webkit-backdrop-filter: none !important;
    box-shadow: 0 1px 8px rgba(0, 0, 0, 0.08);
  }

  .theme-dark .main-header.fixed-header {
    background-color: rgba(15, 23, 42, 0.97) !important;
    backdrop-filter: none !important;
    -webkit-backdrop-filter: none !important;
    box-shadow: 0 1px 8px rgba(0, 0, 0, 0.3);
  }

  /* Ensure nav pill fits mobile without overflow */
  nav.main-menu.navbar-expand-lg {
    padding: 0.35rem 0.75rem !important;
    border-radius: 40px;
  }
}

/* ========================================
   2. REDUCE ANIMATION JOLT ON MOBILE
   Framer Motion whileInView with translateY(40px)
   causes visible jolting as sections enter viewport.
   Reduce movement distance and duration on mobile.
   ======================================== */

@media (max-width: 991px) {
  /* Reduce will-change usage to free up compositor layers on mobile.
     The actual distance/duration reduction is handled in the
     SlideUp and CardReveal components via isMobile checks. */
  .hero-section *,
  .about-area-seamless *,
  .projects-section-enhanced *,
  .support-section-enhanced *,
  .faq-section-enhanced *,
  .contact-section-enhanced * {
    will-change: auto !important;
  }
}

/* ========================================
   3. FOOTER — Horizontal nav on mobile
   Currently stacks vertically at ≤480px.
   Switch to horizontal wrapping layout.
   ======================================== */

@media (max-width: 480px) {
  .footer-menu {
    flex-direction: row !important;
    flex-wrap: wrap !important;
    justify-content: center !important;
    gap: 0.25rem 0.75rem !important;
    text-align: center;
  }

  .footer-menu a {
    font-size: 0.85rem;
    padding: 0.25rem 0;
  }
}

@media (max-width: 767px) {
  /* Tighten footer spacing on mobile */
  .footer-enhanced {
    padding: 2.5rem 0 1.5rem !important;
  }

  .footer-bottom {
    margin-top: 2rem !important;
    padding-top: 1.5rem !important;
  }

  .footer-bottom .row {
    gap: 0.75rem;
  }

  /* Footer tagline and copyright — compact */
  .footer-tagline {
    font-size: 0.85rem;
    margin-top: 0.5rem !important;
  }

  .copyright-text p {
    font-size: 0.85rem;
    margin-bottom: 0;
  }
}

/* ========================================
   4. HAMBURGER MENU — Fullscreen, themed, consistent
   The mobile menu needs to:
   - Cover the entire screen including over the navbar
   - Have proper theme-consistent colors
   - Work well in both light and dark mode
   - Space items evenly
   ======================================== */

@media (max-width: 991px) {
  /* Ensure overlay sits above everything including the navbar */
  .mobile-menu-overlay {
    z-index: 10000 !important;
  }

  .mobile-menu-overlay.active {
    display: flex !important;
    opacity: 1 !important;
    visibility: visible !important;
    pointer-events: all !important;
  }

  /* Background layers should cover full screen on all mobile sizes */
  .mobile-menu-overlay.active .menu-background-layer {
    width: 100% !important;
  }

  /* Navigation container — centered, full height, proper padding */
  .mobile-navigation {
    width: 100% !important;
    height: 100% !important;
    display: flex !important;
    flex-direction: column !important;
    justify-content: center !important;
    align-items: center !important;
    padding: 80px 24px 40px !important;
    z-index: 15 !important;
  }

  /* Menu list — centered with even spacing */
  .mobile-menu-list {
    width: 100% !important;
    max-width: 320px !important;
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    gap: 4px !important;
    padding: 0 !important;
    margin: 0 auto !important;
    list-style: none !important;
    position: relative !important;
    top: auto !important;
    left: auto !important;
    transform: none !important;
  }

  /* Menu items — consistent width and centering */
  .mobile-menu-item {
    width: 100% !important;
    display: flex !important;
    justify-content: center !important;
    padding: 0 !important;
    margin: 0 !important;
    opacity: 1 !important;
    transform: none !important;
  }

  .mobile-navigation.active .mobile-menu-item {
    opacity: 1 !important;
    transform: none !important;
  }

  /* Nav links — full width, padded, rounded */
  .mobile-nav-link {
    width: 100% !important;
    display: flex !important;
    justify-content: center !important;
    align-items: center !important;
    padding: 14px 24px !important;
    font-size: 1.1rem !important;
    font-weight: 500 !important;
    text-decoration: none !important;
    border-radius: 12px !important;
    transition: background-color 0.2s ease, color 0.2s ease !important;
    min-height: 48px !important;
    border: none !important;
    background: none !important;
    cursor: pointer !important;
  }

  /* Close button — always top-right, above everything */
  .mobile-close-button {
    position: fixed !important;
    top: 16px !important;
    right: 16px !important;
    z-index: 10005 !important;
    width: 48px !important;
    height: 48px !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    border-radius: 50% !important;
    font-size: 1.75rem !important;
    line-height: 1 !important;
    border: 1px solid rgba(255, 255, 255, 0.2) !important;
    background: rgba(255, 255, 255, 0.1) !important;
    color: #fff !important;
    transition: all 0.2s ease !important;
  }

  .mobile-close-button:hover {
    background: rgba(255, 255, 255, 0.2) !important;
    transform: scale(1.05);
  }

  /* Theme toggle position in mobile menu */
  .mobile-menu-theme-toggle {
    position: fixed !important;
    top: 16px !important;
    left: 16px !important;
    z-index: 10005 !important;
  }

  /* User info mobile — compact, centered */
  .user-info-mobile-item {
    width: 100% !important;
    display: flex !important;
    justify-content: center !important;
    margin-bottom: 8px !important;
  }

  .user-info-mobile {
    text-decoration: none !important;
  }

  .user-info-mobile-content {
    display: flex !important;
    align-items: center !important;
    gap: 12px !important;
    padding: 12px 20px !important;
    border-radius: 16px !important;
    background: rgba(255, 255, 255, 0.1) !important;
    -webkit-backdrop-filter: blur(4px) !important;
            backdrop-filter: blur(4px) !important;
  }

  .user-avatar-mobile {
    width: 38px !important;
    height: 38px !important;
    border-radius: 50% !important;
    background: rgba(255, 255, 255, 0.2) !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    font-size: 0.85rem !important;
    font-weight: 600 !important;
    color: #fff !important;
    flex-shrink: 0 !important;
  }

  .user-details-mobile {
    display: flex !important;
    flex-direction: column !important;
  }

  .user-email-mobile {
    color: rgba(255, 255, 255, 0.9) !important;
    font-size: 0.85rem !important;
    font-weight: 500 !important;
  }

  /* Separator in menu */
  .mobile-menu-separator {
    width: 60% !important;
    margin: 8px auto !important;
    padding: 0 !important;
    list-style: none !important;
  }

  .mobile-menu-separator hr {
    border-top: 1px solid rgba(255, 255, 255, 0.15) !important;
    margin: 0 !important;
    opacity: 1 !important;
  }

  /* Sign out / action buttons — styled subtly */
  .sign-out-btn {
    color: rgba(255, 255, 255, 0.7) !important;
    font-size: 0.95rem !important;
  }

  .sign-out-btn:hover {
    color: #fff !important;
    background: rgba(255, 255, 255, 0.1) !important;
  }
}

/* Tablet — slightly wider menu */
@media (min-width: 768px) and (max-width: 991px) {
  .mobile-menu-list {
    max-width: 400px !important;
  }

  .mobile-nav-link {
    font-size: 1.25rem !important;
    padding: 16px 28px !important;
  }
}

/* ========================================
   5. LIGHT MODE — Menu theme consistency
   The blue gradient background needs white text and
   proper contrast in light mode.
   ======================================== */

/* Light mode mobile menu — white text on blue gradient */
.mobile-menu-overlay .mobile-nav-link {
  color: #fff !important;
}

.mobile-menu-overlay .mobile-nav-link:hover,
.mobile-menu-overlay .mobile-nav-link:focus {
  background: rgba(255, 255, 255, 0.15) !important;
  color: #fff !important;
}

.mobile-menu-overlay .link-text {
  color: #fff !important;
}

/* Light mode — close button and toggle on blue background */
.mobile-menu-overlay .close-icon {
  color: #fff !important;
}

/* ========================================
   6. DARK MODE — Menu refinements
   Dark mode uses dark card background via layout-critical.css
   (.theme-dark .menu-background-layer). Ensure text is
   properly themed.
   ======================================== */

.theme-dark .mobile-menu-overlay .mobile-nav-link {
  color: var(--text-primary, #e2e8f0) !important;
}

.theme-dark .mobile-menu-overlay .mobile-nav-link:hover,
.theme-dark .mobile-menu-overlay .mobile-nav-link:focus {
  background: rgba(56, 189, 248, 0.1) !important;
  color: var(--accent-primary, #38bdf8) !important;
}

.theme-dark .mobile-close-button {
  border-color: var(--border-color, #334155) !important;
  background: rgba(255, 255, 255, 0.05) !important;
  color: var(--text-primary, #e2e8f0) !important;
}

.theme-dark .mobile-close-button:hover {
  background: rgba(56, 189, 248, 0.1) !important;
  border-color: var(--accent-primary, #38bdf8) !important;
  color: var(--accent-primary, #38bdf8) !important;
}

.theme-dark .user-info-mobile-content {
  background: rgba(255, 255, 255, 0.05) !important;
}

.theme-dark .user-avatar-mobile {
  background: rgba(56, 189, 248, 0.15) !important;
  color: var(--accent-primary, #38bdf8) !important;
}

.theme-dark .user-email-mobile {
  color: var(--text-secondary, #94a3b8) !important;
}

.theme-dark .sign-out-btn {
  color: var(--text-secondary, #94a3b8) !important;
}

.theme-dark .sign-out-btn:hover {
  color: var(--text-primary, #e2e8f0) !important;
  background: rgba(255, 255, 255, 0.05) !important;
}

.theme-dark .mobile-menu-separator hr {
  border-color: var(--border-color, #334155) !important;
}

