/* Dark Mode Support */
:root {
  /* Light mode colors */
  --bg-primary: #fefefe;
  --bg-secondary: #f8fafc;
  --bg-surface: rgba(255, 255, 255, 0.95);
  --bg-card: rgba(255, 255, 255, 0.95);
  --text-primary: #1a1a1a;
  --text-secondary: #6b7280;
  --text-muted: #9ca3af;
  --border-color: rgba(255, 255, 255, 0.3);
  --shadow-color: rgba(41, 141, 179, 0.15);
  --shadow-color-hard: rgba(41, 141, 179, 0.25);
  
  /* Colors that remain consistent */
  --primary: #298DB3;
  --gold: #f6c844;
  --success: #22c55e;
  --gradient-primary: linear-gradient(135deg, #298DB3 0%, #3B6A94 100%);
  --gradient-gold: linear-gradient(135deg, #f6c844 0%, #f4b942 100%);
}

[data-theme="dark"] {
  /* Dark mode colors */
  --bg-primary: #0f172a;
  --bg-secondary: #1e293b;
  --bg-surface: rgba(30, 41, 59, 0.95);
  --bg-card: rgba(51, 65, 85, 0.95);
  --text-primary: #f8fafc;
  --text-secondary: #cbd5e1;
  --text-muted: #94a3b8;
  --border-color: rgba(51, 65, 85, 0.5);
  --shadow-color: rgba(0, 0, 0, 0.25);
  --shadow-color-hard: rgba(0, 0, 0, 0.35);
}

.dark-mode-toggle {
  position: fixed;
  bottom: 20px;
  right: 20px;
  z-index: 1001;
  background: var(--bg-surface);
  border: 1px solid var(--border-color);
  border-radius: 50%;
  width: 50px;
  height: 50px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.3s ease;
  backdrop-filter: blur(16px);
  box-shadow: 0 4px 12px var(--shadow-color);
}

.dark-mode-toggle:hover {
  transform: scale(1.1);
  box-shadow: 0 6px 20px var(--shadow-color-hard);
}

.dark-mode-toggle span {
  font-size: 1.5rem;
  transition: transform 0.3s ease;
}

@media (max-width: 768px) {
  .dark-mode-toggle {
    bottom: 10px;
    right: 10px;
    width: 45px;
    height: 45px;
  }
  
  .dark-mode-toggle span {
    font-size: 1.25rem;
  }
}

/* Basic dark mode styles for content */
[data-theme="dark"] body {
  background: linear-gradient(180deg, var(--bg-primary) 0%, var(--bg-secondary) 100%);
  color: var(--text-primary);
}

[data-theme="dark"] .app-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  color: var(--text-primary);
}

[data-theme="dark"] h1,
[data-theme="dark"] h2,
[data-theme="dark"] h3,
[data-theme="dark"] h4,
[data-theme="dark"] h5,
[data-theme="dark"] h6 {
  color: var(--text-primary);
}

[data-theme="dark"] p,
[data-theme="dark"] li {
  color: var(--text-secondary);
}

/* Footer dark mode */
[data-theme="dark"] footer {
  background: var(--bg-secondary);
  border-top: 1px solid var(--border-color);
  color: var(--text-secondary);
}

[data-theme="dark"] footer a {
  color: #60a5fa;
}

/* Fix page titles and app cards for consistent dark mode */
[data-theme="dark"] .page-title {
  color: var(--text-primary) !important;
}

[data-theme="dark"] .section-title {
  color: #60a5fa !important;
}

/* Override any hardcoded text colors in dark mode */
[data-theme="dark"] .app-card h3 {
  color: #60a5fa !important;
}

[data-theme="dark"] .app-card p,
[data-theme="dark"] .app-card li {
  color: var(--text-secondary) !important;
}

/* Original Yellow CTA Header Button */
.cta-header {
  background: var(--gradient-gold);
  color: #1a1a1a;
  border: 1px solid rgba(255, 255, 255, 0.2);
  padding: 0.5rem 1rem;
  border-radius: 0.5rem;
  font-weight: 600;
  text-decoration: none;
  margin-left: 1.5rem;
  font-size: 0.875rem;
  transition: all 0.3s ease;
  box-shadow: 0 2px 8px rgba(246, 200, 68, 0.3);
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
}

.cta-header:hover {
  background: transparent;
  color: var(--gold);
  border: 2px solid var(--gold);
  transform: translateY(-2px);
  box-shadow: 0 4px 16px rgba(246, 200, 68, 0.4);
}

/* Override for mobile nav */
.mobile-nav .cta-header {
  margin-left: 0;
  margin: 0.5rem 0;
}

/* Apple-style Footer */
footer {
  background: var(--bg-secondary);
  border-top: 1px solid rgba(210, 210, 215, 0.3);
  padding: 2.5rem 2rem 3rem 2rem;
  text-align: center;
  margin-top: 8rem;
  margin-bottom: 2rem;
  font-size: 12px;
  color: var(--text-primary);
  font-family: "SF Pro Text", -apple-system, BlinkMacSystemFont, sans-serif;
  line-height: 1.4;
}

.footer-content {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  justify-content: center;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.footer-content span {
  color: var(--text-secondary);
  font-size: 12px;
}

.footer-content a {
  color: var(--primary);
  text-decoration: none;
  font-size: 12px;
  transition: color 0.15s ease-in-out;
}

.footer-content a:hover {
  text-decoration: underline;
}

.footer-separator {
  color: var(--text-muted);
  margin: 0 0.5rem;
  font-size: 12px;
}

@media (max-width: 768px) {
  footer {
    padding: 1rem;
    font-size: 11px;
  }
  
  .footer-content {
    flex-direction: column;
    gap: 0.25rem;
  }
  
  .footer-content a {
    font-size: 11px;
  }
  
  .footer-separator {
    display: none;
  }
}