/* Dark Mode Styles */
:root {
  /* Light mode colors (default) */
  --bg-primary: white;
  --bg-secondary: var(--neutral-50);
  --bg-tertiary: var(--neutral-100);
  --text-primary: var(--neutral-900);
  --text-secondary: var(--neutral-700);
  --text-tertiary: var(--neutral-600);
  --border-color: var(--neutral-200);
  --card-bg: white;
  --header-bg: linear-gradient(135deg, var(--primary-800) 0%, var(--primary-900) 100%);
  --footer-bg: linear-gradient(135deg, var(--primary-900) 0%, var(--primary-800) 100%);
}

/* Dark mode colors */
[data-theme="dark"] {
  --bg-primary: #0f172a;
  --bg-secondary: #1e293b;
  --bg-tertiary: #334155;
  --text-primary: #f8fafc;
  --text-secondary: #e2e8f0;
  --text-tertiary: #cbd5e1;
  --border-color: #475569;
  --card-bg: #1e293b;
  --header-bg: linear-gradient(135deg, #0f172a 0%, #1e293b 100%);
  --footer-bg: linear-gradient(135deg, #0f172a 0%, #1e293b 100%);
  
  /* Override specific colors for dark mode */
  --neutral-50: #1e293b;
  --neutral-100: #334155;
  --neutral-200: #475569;
  --neutral-600: #cbd5e1;
  --neutral-700: #e2e8f0;
  --neutral-800: #f1f5f9;
  --neutral-900: #f8fafc;
}

/* Apply dark mode styles */
[data-theme="dark"] body {
  background-color: var(--bg-primary);
  color: var(--text-primary);
}

[data-theme="dark"] .bg-white {
  background-color: var(--bg-primary) !important;
}

[data-theme="dark"] .bg-neutral-50 {
  background-color: var(--bg-secondary) !important;
}

[data-theme="dark"] .bg-neutral-100 {
  background-color: var(--bg-tertiary) !important;
}

/* Improved styling for primary-50 backgrounds (CTA sections) */
[data-theme="dark"] .bg-primary-50 {
  background: linear-gradient(135deg, 
    rgba(30, 41, 59, 0.95) 0%, 
    rgba(51, 65, 85, 0.9) 50%,
    rgba(71, 85, 105, 0.95) 100%) !important;
  position: relative;
}

[data-theme="dark"] .bg-primary-50::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(135deg, 
    rgba(15, 23, 42, 0.4) 0%, 
    rgba(30, 41, 59, 0.3) 50%,
    rgba(51, 65, 85, 0.4) 100%);
  pointer-events: none;
}

[data-theme="dark"] .bg-primary-50 * {
  position: relative;
  z-index: 1;
}

/* Ensure text in CTA sections remains readable */
[data-theme="dark"] .bg-primary-50 .text-neutral-900,
[data-theme="dark"] .bg-primary-50 .text-neutral-800,
[data-theme="dark"] .bg-primary-50 .text-neutral-700,
[data-theme="dark"] .bg-primary-50 .text-neutral-600 {
  color: var(--text-primary) !important;
}

[data-theme="dark"] .text-neutral-900 {
  color: var(--text-primary) !important;
}

[data-theme="dark"] .text-neutral-800 {
  color: var(--text-secondary) !important;
}

[data-theme="dark"] .text-neutral-700 {
  color: var(--text-secondary) !important;
}

[data-theme="dark"] .text-neutral-600 {
  color: var(--text-tertiary) !important;
}

[data-theme="dark"] .card {
  background-color: var(--card-bg) !important;
  border-color: var(--border-color) !important;
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.3), 0 2px 4px -2px rgba(0, 0, 0, 0.3) !important;
}

/* Enhanced styling for cards in CTA sections */
[data-theme="dark"] .bg-primary-50 .card {
  background: linear-gradient(135deg, 
    rgba(30, 41, 59, 0.8) 0%, 
    rgba(51, 65, 85, 0.7) 100%) !important;
  border: 1px solid rgba(148, 163, 184, 0.2) !important;
  backdrop-filter: blur(10px);
  box-shadow: 
    0 10px 15px -3px rgba(0, 0, 0, 0.4), 
    0 4px 6px -4px rgba(0, 0, 0, 0.4),
    inset 0 1px 0 rgba(255, 255, 255, 0.1) !important;
}

[data-theme="dark"] .bg-primary-50 .card:hover {
  background: linear-gradient(135deg, 
    rgba(30, 41, 59, 0.9) 0%, 
    rgba(51, 65, 85, 0.8) 100%) !important;
  border-color: rgba(148, 163, 184, 0.3) !important;
  transform: translateY(-2px);
  box-shadow: 
    0 20px 25px -5px rgba(0, 0, 0, 0.5), 
    0 8px 10px -6px rgba(0, 0, 0, 0.5),
    inset 0 1px 0 rgba(255, 255, 255, 0.15) !important;
}

[data-theme="dark"] .header {
  background: var(--header-bg) !important;
  border-bottom-color: rgba(255, 255, 255, 0.1) !important;
}

[data-theme="dark"] .footer {
  background: var(--footer-bg) !important;
}

[data-theme="dark"] .dropdown-menu {
  background-color: var(--card-bg) !important;
  border-color: var(--border-color) !important;
  box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.3), 0 8px 10px -6px rgba(0, 0, 0, 0.3) !important;
}

[data-theme="dark"] .dropdown-item {
  color: var(--text-secondary) !important;
  border-bottom-color: var(--border-color) !important;
}

[data-theme="dark"] .dropdown-item:hover {
  background-color: var(--bg-tertiary) !important;
  color: var(--text-primary) !important;
}

[data-theme="dark"] .mobile-menu {
  background-color: var(--bg-secondary) !important;
  border-top-color: rgba(255, 255, 255, 0.1) !important;
}

[data-theme="dark"] .mobile-nav-link {
  border-bottom-color: rgba(255, 255, 255, 0.1) !important;
}

[data-theme="dark"] .mobile-dropdown-items {
  background-color: rgba(0, 0, 0, 0.3) !important;
}

/* Dark mode toggle button */
.dark-mode-toggle {
  background: none;
  border: none;
  color: rgba(255, 255, 255, 0.9);
  font-size: 1.25rem;
  cursor: pointer;
  padding: var(--space-2);
  border-radius: var(--radius-md);
  transition: all var(--transition-fast);
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
}

.dark-mode-toggle:hover {
  background-color: rgba(255, 255, 255, 0.1);
  color: white;
}

.dark-mode-toggle i {
  transition: transform var(--transition-normal);
}

.dark-mode-toggle:hover i {
  transform: rotate(15deg);
}

/* Mobile dark mode toggle */
.mobile-dark-mode-toggle {
  display: block;
  color: rgba(255, 255, 255, 0.9);
  padding: var(--space-3) var(--space-4);
  text-decoration: none;
  transition: all var(--transition-fast);
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  cursor: pointer;
  background: none;
  border-left: none;
  border-right: none;
  border-top: none;
  width: 100%;
  text-align: left;
  font-size: 1rem;
}

.mobile-dark-mode-toggle:hover {
  background-color: rgba(255, 255, 255, 0.1);
  color: white;
}

.mobile-dark-mode-toggle i {
  margin-right: var(--space-2);
  width: 20px;
}

/* Smooth transitions for theme switching */
* {
  transition: background-color var(--transition-normal), 
              color var(--transition-normal), 
              border-color var(--transition-normal),
              box-shadow var(--transition-normal);
}

/* Ensure images don't get affected by dark mode */
[data-theme="dark"] img {
  opacity: 0.9;
}

[data-theme="dark"] .team-image,
[data-theme="dark"] .gallery-image {
  opacity: 1;
}

/* Dark mode specific button styles */
[data-theme="dark"] .btn-outline {
  border-color: var(--primary-400);
  color: var(--primary-400);
}

[data-theme="dark"] .btn-outline:hover {
  background-color: var(--primary-400);
  color: var(--bg-primary);
}

/* Enhanced button styling in CTA sections */
[data-theme="dark"] .bg-primary-50 .btn-outline {
  border: 2px solid rgba(148, 163, 184, 0.6);
  color: var(--text-primary);
  background: rgba(30, 41, 59, 0.6);
  backdrop-filter: blur(8px);
}

[data-theme="dark"] .bg-primary-50 .btn-outline:hover {
  background: rgba(148, 163, 184, 0.9);
  color: var(--bg-primary);
  border-color: rgba(148, 163, 184, 0.9);
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

[data-theme="dark"] .bg-primary-50 .btn-primary {
  background: linear-gradient(135deg, var(--primary-600) 0%, var(--primary-700) 100%);
  color: white;
  border: none;
}

[data-theme="dark"] .bg-primary-50 .btn-primary:hover {
  background: linear-gradient(135deg, var(--primary-700) 0%, var(--primary-800) 100%);
  color: white;
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

[data-theme="dark"] .bg-primary-50 .btn-secondary {
  background: linear-gradient(135deg, var(--secondary-600) 0%, var(--secondary-700) 100%);
  color: white;
  border: none;
}

[data-theme="dark"] .bg-primary-50 .btn-secondary:hover {
  background: linear-gradient(135deg, var(--secondary-700) 0%, var(--secondary-800) 100%);
  color: white;
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

/* Dark mode form elements */
[data-theme="dark"] input,
[data-theme="dark"] textarea,
[data-theme="dark"] select {
  background-color: var(--bg-tertiary);
  border-color: var(--border-color);
  color: var(--text-primary);
}

[data-theme="dark"] input:focus,
[data-theme="dark"] textarea:focus,
[data-theme="dark"] select:focus {
  border-color: var(--primary-400);
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

/* ===== COLORFUL ICON BACKGROUNDS IN DARK MODE ===== */
/* Keep vibrant, colorful icon backgrounds that look great in dark mode */

/* Primary Blue Icons - Enhanced for dark mode */
[data-theme="dark"] .bg-primary-100 {
  background: linear-gradient(135deg, 
    rgba(59, 130, 246, 0.9) 0%, 
    rgba(37, 99, 235, 1) 100%) !important;
  border: 1px solid rgba(59, 130, 246, 0.3);
  box-shadow: 
    0 4px 12px rgba(59, 130, 246, 0.3),
    inset 0 1px 0 rgba(255, 255, 255, 0.2);
}

/* Secondary Orange Icons - Enhanced for dark mode */
[data-theme="dark"] .bg-secondary-100 {
  background: linear-gradient(135deg, 
    rgba(249, 115, 22, 0.9) 0%, 
    rgba(234, 88, 12, 1) 100%) !important;
  border: 1px solid rgba(249, 115, 22, 0.3);
  box-shadow: 
    0 4px 12px rgba(249, 115, 22, 0.3),
    inset 0 1px 0 rgba(255, 255, 255, 0.2);
}

/* Success Green Icons - Enhanced for dark mode */
[data-theme="dark"] .bg-success-100 {
  background: linear-gradient(135deg, 
    rgba(34, 197, 94, 0.9) 0%, 
    rgba(22, 163, 74, 1) 100%) !important;
  border: 1px solid rgba(34, 197, 94, 0.3);
  box-shadow: 
    0 4px 12px rgba(34, 197, 94, 0.3),
    inset 0 1px 0 rgba(255, 255, 255, 0.2);
}

/* Warning Yellow Icons - Enhanced for dark mode */
[data-theme="dark"] .bg-warning-100 {
  background: linear-gradient(135deg, 
    rgba(245, 158, 11, 0.9) 0%, 
    rgba(217, 119, 6, 1) 100%) !important;
  border: 1px solid rgba(245, 158, 11, 0.3);
  box-shadow: 
    0 4px 12px rgba(245, 158, 11, 0.3),
    inset 0 1px 0 rgba(255, 255, 255, 0.2);
}

/* Error Red Icons - Enhanced for dark mode */
[data-theme="dark"] .bg-error-100 {
  background: linear-gradient(135deg, 
    rgba(239, 68, 68, 0.9) 0%, 
    rgba(220, 38, 38, 1) 100%) !important;
  border: 1px solid rgba(239, 68, 68, 0.3);
  box-shadow: 
    0 4px 12px rgba(239, 68, 68, 0.3),
    inset 0 1px 0 rgba(255, 255, 255, 0.2);
}

/* Neutral Gray Icons - Enhanced for dark mode */
[data-theme="dark"] .bg-neutral-200 {
  background: linear-gradient(135deg, 
    rgba(148, 163, 184, 0.9) 0%, 
    rgba(100, 116, 139, 1) 100%) !important;
  border: 1px solid rgba(148, 163, 184, 0.3);
  box-shadow: 
    0 4px 12px rgba(148, 163, 184, 0.3),
    inset 0 1px 0 rgba(255, 255, 255, 0.2);
}

/* ===== VIBRANT ICON TEXT COLORS ===== */
/* Keep icons bright and colorful */

[data-theme="dark"] .text-primary-600 {
  color: #ffffff !important;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
}

[data-theme="dark"] .text-secondary-600 {
  color: #ffffff !important;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
}

[data-theme="dark"] .text-success-600 {
  color: #ffffff !important;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
}

[data-theme="dark"] .text-warning-600 {
  color: #ffffff !important;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
}

[data-theme="dark"] .text-error-600 {
  color: #ffffff !important;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
}

[data-theme="dark"] .text-neutral-600 {
  color: #ffffff !important;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
}

/* ===== ENHANCED HOVER EFFECTS FOR ICON CONTAINERS ===== */
[data-theme="dark"] .bg-primary-100:hover {
  background: linear-gradient(135deg, 
    rgba(59, 130, 246, 1) 0%, 
    rgba(37, 99, 235, 1) 100%) !important;
  transform: translateY(-2px);
  box-shadow: 
    0 8px 20px rgba(59, 130, 246, 0.4),
    inset 0 1px 0 rgba(255, 255, 255, 0.3);
}

[data-theme="dark"] .bg-secondary-100:hover {
  background: linear-gradient(135deg, 
    rgba(249, 115, 22, 1) 0%, 
    rgba(234, 88, 12, 1) 100%) !important;
  transform: translateY(-2px);
  box-shadow: 
    0 8px 20px rgba(249, 115, 22, 0.4),
    inset 0 1px 0 rgba(255, 255, 255, 0.3);
}

[data-theme="dark"] .bg-success-100:hover {
  background: linear-gradient(135deg, 
    rgba(34, 197, 94, 1) 0%, 
    rgba(22, 163, 74, 1) 100%) !important;
  transform: translateY(-2px);
  box-shadow: 
    0 8px 20px rgba(34, 197, 94, 0.4),
    inset 0 1px 0 rgba(255, 255, 255, 0.3);
}

[data-theme="dark"] .bg-warning-100:hover {
  background: linear-gradient(135deg, 
    rgba(245, 158, 11, 1) 0%, 
    rgba(217, 119, 6, 1) 100%) !important;
  transform: translateY(-2px);
  box-shadow: 
    0 8px 20px rgba(245, 158, 11, 0.4),
    inset 0 1px 0 rgba(255, 255, 255, 0.3);
}

[data-theme="dark"] .bg-error-100:hover {
  background: linear-gradient(135deg, 
    rgba(239, 68, 68, 1) 0%, 
    rgba(220, 38, 38, 1) 100%) !important;
  transform: translateY(-2px);
  box-shadow: 
    0 8px 20px rgba(239, 68, 68, 0.4),
    inset 0 1px 0 rgba(255, 255, 255, 0.3);
}

[data-theme="dark"] .bg-neutral-200:hover {
  background: linear-gradient(135deg, 
    rgba(148, 163, 184, 1) 0%, 
    rgba(100, 116, 139, 1) 100%) !important;
  transform: translateY(-2px);
  box-shadow: 
    0 8px 20px rgba(148, 163, 184, 0.4),
    inset 0 1px 0 rgba(255, 255, 255, 0.3);
}

/* ===== SPECIAL HANDLING FOR CTA SECTIONS ===== */
/* In CTA sections, make icons even more vibrant to stand out */
[data-theme="dark"] .bg-primary-50 .bg-primary-100,
[data-theme="dark"] .bg-primary-50 .bg-secondary-100,
[data-theme="dark"] .bg-primary-50 .bg-success-100,
[data-theme="dark"] .bg-primary-50 .bg-warning-100,
[data-theme="dark"] .bg-primary-50 .bg-error-100,
[data-theme="dark"] .bg-primary-50 .bg-neutral-200 {
  border: 2px solid rgba(255, 255, 255, 0.2) !important;
  box-shadow: 
    0 6px 16px rgba(0, 0, 0, 0.3),
    0 2px 8px rgba(0, 0, 0, 0.2),
    inset 0 1px 0 rgba(255, 255, 255, 0.25) !important;
}

[data-theme="dark"] .bg-primary-50 .text-primary-600,
[data-theme="dark"] .bg-primary-50 .text-secondary-600,
[data-theme="dark"] .bg-primary-50 .text-success-600,
[data-theme="dark"] .bg-primary-50 .text-warning-600,
[data-theme="dark"] .bg-primary-50 .text-error-600,
[data-theme="dark"] .bg-primary-50 .text-neutral-600 {
  color: #ffffff !important;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.4);
}

/* Enhanced link styling in CTA sections */
[data-theme="dark"] .bg-primary-50 a {
  color: rgba(148, 163, 184, 0.9);
  transition: all var(--transition-fast);
}

[data-theme="dark"] .bg-primary-50 a:hover {
  color: var(--text-primary);
  text-decoration: underline;
}

/* Ensure proper contrast for all text elements in CTA sections */
[data-theme="dark"] .bg-primary-50 h1,
[data-theme="dark"] .bg-primary-50 h2,
[data-theme="dark"] .bg-primary-50 h3,
[data-theme="dark"] .bg-primary-50 h4,
[data-theme="dark"] .bg-primary-50 h5,
[data-theme="dark"] .bg-primary-50 h6 {
  color: var(--text-primary) !important;
}

[data-theme="dark"] .bg-primary-50 p {
  color: var(--text-secondary) !important;
}

/* ===== ICON GLOW EFFECTS FOR EXTRA VISUAL APPEAL ===== */
[data-theme="dark"] .card:hover .bg-primary-100 {
  box-shadow: 
    0 0 20px rgba(59, 130, 246, 0.6),
    0 8px 20px rgba(59, 130, 246, 0.4),
    inset 0 1px 0 rgba(255, 255, 255, 0.3) !important;
}

[data-theme="dark"] .card:hover .bg-secondary-100 {
  box-shadow: 
    0 0 20px rgba(249, 115, 22, 0.6),
    0 8px 20px rgba(249, 115, 22, 0.4),
    inset 0 1px 0 rgba(255, 255, 255, 0.3) !important;
}

[data-theme="dark"] .card:hover .bg-success-100 {
  box-shadow: 
    0 0 20px rgba(34, 197, 94, 0.6),
    0 8px 20px rgba(34, 197, 94, 0.4),
    inset 0 1px 0 rgba(255, 255, 255, 0.3) !important;
}

[data-theme="dark"] .card:hover .bg-warning-100 {
  box-shadow: 
    0 0 20px rgba(245, 158, 11, 0.6),
    0 8px 20px rgba(245, 158, 11, 0.4),
    inset 0 1px 0 rgba(255, 255, 255, 0.3) !important;
}

[data-theme="dark"] .card:hover .bg-error-100 {
  box-shadow: 
    0 0 20px rgba(239, 68, 68, 0.6),
    0 8px 20px rgba(239, 68, 68, 0.4),
    inset 0 1px 0 rgba(255, 255, 255, 0.3) !important;
}

[data-theme="dark"] .card:hover .bg-neutral-200 {
  box-shadow: 
    0 0 20px rgba(148, 163, 184, 0.6),
    0 8px 20px rgba(148, 163, 184, 0.4),
    inset 0 1px 0 rgba(255, 255, 255, 0.3) !important;
}