/* FastroAI Documentation Custom Styles */

:root {
  /* FastroAI Brand Colors - Green accent to match landing page */
  --fastro-green: #10b981;               /* FastroAI brand green */
  --fastro-green-light: #34d399;         /* Lighter green variant */
  --fastro-green-dark: #047857;          /* Darker green variant */
  --md-primary-fg-color: #10b981;        
  --md-primary-fg-color--light: #34d399;  
  --md-primary-fg-color--dark: #047857;   
  --md-accent-fg-color: #10b981;          
  
  /* Consistent colors across modes */
  --fastro-primary: #10b981;
  --fastro-secondary: #34d399;
  --fastro-accent: #10b981;
  --fastro-success: #10b981;
  --fastro-warning: #f59e0b;
  --fastro-danger: #ef4444;
  
  /* Code and background colors for light mode */
  --code-bg: #f1f5f9;
  --border-color: #e2e8f0;
}

/* Dark mode color overrides - Pure black theme */
[data-md-color-scheme="slate"] {
  /* Green accent colors in dark mode */
  --md-primary-fg-color: #10b981;
  --md-primary-fg-color--light: #34d399;
  --md-primary-fg-color--dark: #047857;
  --md-accent-fg-color: #10b981;
  
  /* Consistent green across dark mode */
  --fastro-primary: #10b981;
  --fastro-secondary: #34d399;
  --fastro-accent: #10b981;
  
  /* Dark backgrounds - pure black theme */
  --code-bg: #1f2937;
  --border-color: #374151;
  
  /* Custom dark mode background - pure black */
  --md-default-bg-color: #000000;
  --md-default-fg-color: #e5e7eb;
  --md-code-bg-color: #1f2937;
  
  /* Header and navigation dark styling */
  --md-header-bg-color: #111827;
  --md-nav-bg-color: #111827;
  --md-footer-bg-color: #111827;
}

/* Soft dark mode color overrides - Warmer, softer dark theme with better contrast */
[data-md-color-scheme="soft-dark"] {
  /* Green accent colors in soft dark mode */
  --md-primary-fg-color: #10b981;
  --md-primary-fg-color--light: #34d399;
  --md-primary-fg-color--dark: #047857;
  --md-accent-fg-color: #10b981;
  
  /* Consistent green across soft dark mode */
  --fastro-primary: #10b981;
  --fastro-secondary: #34d399;
  --fastro-accent: #10b981;
  
  /* Soft dark backgrounds - warmer but with better contrast */
  --code-bg: #1e2a3a;
  --border-color: #3d4852;
  
  /* Custom soft dark mode background - warm dark blue-gray with good contrast */
  --md-default-bg-color: #0f1419;
  --md-default-fg-color: #f0f6fc;
  --md-code-bg-color: #1e2a3a;
  --md-code-fg-color: #e6edf3;
  
  /* Header and navigation soft dark styling */
  --md-header-bg-color: #1c2128;
  --md-nav-bg-color: #1c2128;
  --md-footer-bg-color: #1c2128;
  
  /* Text colors for better readability */
  --md-typeset-color: #f0f6fc;
  --md-typeset-a-color: #10b981;
}

/* Hero intro section - centered */
.hero-intro {
  text-align: center;
  margin-bottom: 2rem;
}

.hero-intro h1 {
  margin-bottom: 0.5rem;
}

.hero-intro p:first-of-type {
  font-size: 1.2rem;
  font-weight: 600;
  color: var(--fastro-green);
  margin-bottom: 0.5rem;
}

.hero-intro p:last-of-type {
  font-size: 1rem;
  margin-bottom: 1.5rem;
  opacity: 0.8;
}

/* CTA section - centered */
.cta-section {
  text-align: center;
  margin: 2rem 0;
}

.cta-section p {
  font-size: 1.1rem;
  font-weight: 600;
  margin-bottom: 1rem;
}

.cta-section small {
  display: block;
  margin-top: 1rem;
  opacity: 0.7;
}

/* Button spacing */
.md-button {
  margin: 0.25rem;
}

/* Custom copy button styling */
.copy-button {
  position: absolute;
  top: 0.5rem;
  right: 0.5rem;
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 0.25rem;
  color: rgba(255, 255, 255, 0.8);
  padding: 0.25rem;
  cursor: pointer;
  transition: all 0.3s ease;
  z-index: 1;
  width: 28px;
  height: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.copy-button:hover {
  background: rgba(255, 255, 255, 0.2);
  color: white;
}

.copy-button svg {
  width: 14px;
  height: 14px;
}

/* Ensure code blocks have relative positioning for copy button */
pre {
  position: relative;
}

.hero-title {
  font-size: 3rem;
  font-weight: 700;
  margin-bottom: 1rem;
}

.hero-subtitle {
  font-size: 1.25rem;
  opacity: 0.9;
  margin-bottom: 2rem;
}

/* Feature cards grid */
.grid.cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 1.5rem;
  margin: 2rem 0;
}

.grid.cards .card {
  background: var(--md-default-bg-color);
  border: 1px solid var(--border-color);
  border-radius: 0.75rem;
  padding: 1.5rem;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
  overflow: hidden;
}

.grid.cards .card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: var(--fastro-green);
  opacity: 0;
  transition: opacity 0.3s ease;
}

.grid.cards .card:hover {
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
  transform: translateY(-4px);
  border-color: var(--fastro-primary);
}

.grid.cards .card:hover::before {
  opacity: 1;
}

/* Dark mode adjustments for cards */
[data-md-color-scheme="slate"] .grid.cards .card {
  background: rgba(30, 41, 59, 0.7);
  border-color: var(--border-color);
  backdrop-filter: blur(8px);
}

[data-md-color-scheme="slate"] .grid.cards .card:hover {
  background: rgba(30, 41, 59, 0.9);
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.3);
}

/* Soft dark mode adjustments for cards */
[data-md-color-scheme="soft-dark"] .grid.cards .card {
  background: rgba(45, 55, 72, 0.8);
  border-color: var(--border-color);
  backdrop-filter: blur(8px);
}

[data-md-color-scheme="soft-dark"] .grid.cards .card:hover {
  background: rgba(45, 55, 72, 0.95);
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.2);
}

/* Code block enhancements */
.highlight pre {
  background: var(--code-bg) !important;
  border: 1px solid var(--border-color);
  border-radius: 0.5rem;
  padding: 1rem;
  position: relative;
  overflow-x: auto;
}

.highlight .filename {
  background: var(--fastro-green);
  color: white;
  padding: 0.5rem 1rem;
  border-radius: 0.5rem 0.5rem 0 0;
  font-size: 0.875rem;
  font-weight: 500;
  font-family: 'Roboto Mono', monospace;
}

/* Improve code block appearance in dark mode */
[data-md-color-scheme="slate"] .highlight pre {
  background: var(--code-bg) !important;
  border-color: var(--border-color);
  box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.2);
}

/* Improve code block appearance in soft dark mode */
[data-md-color-scheme="soft-dark"] .highlight pre {
  background: var(--code-bg) !important;
  border-color: var(--border-color);
  box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.15);
}

/* Custom admonitions */
.admonition.commercial {
  border-color: var(--fastro-accent);
}

.admonition.commercial .admonition-title {
  background: var(--fastro-accent);
  color: white;
}

.admonition.commercial .admonition-title::before {
  content: "💼";
  margin-right: 0.5rem;
}

/* API endpoint styling */
.api-endpoint {
  background: #f1f5f9;
  border-left: 4px solid var(--fastro-primary);
  padding: 1rem;
  margin: 1rem 0;
  border-radius: 0 0.375rem 0.375rem 0;
}

.api-endpoint .method {
  display: inline-block;
  padding: 0.25rem 0.5rem;
  border-radius: 0.25rem;
  font-weight: 600;
  font-size: 0.75rem;
  text-transform: uppercase;
  margin-right: 0.5rem;
}

.method.post { background: #dcfce7; color: #166534; }
.method.get { background: #dbeafe; color: #1d4ed8; }
.method.put { background: #fef3c7; color: #92400e; }
.method.delete { background: #fecaca; color: #dc2626; }

/* Feature highlight boxes */
.feature-highlight {
  background: linear-gradient(135deg, #f0f9ff 0%, #e0f2fe 100%);
  border: 1px solid #0ea5e9;
  border-radius: 0.5rem;
  padding: 1.5rem;
  margin: 1.5rem 0;
}

.feature-highlight h3 {
  color: var(--fastro-primary);
  margin-top: 0;
}

/* Architecture diagrams */
.architecture-diagram {
  text-align: center;
  margin: 2rem 0;
}

.architecture-diagram svg {
  max-width: 100%;
  height: auto;
  border: 1px solid var(--border-color);
  border-radius: 0.5rem;
  background: white;
}

/* Table enhancements */
table {
  border-collapse: collapse;
  margin: 1.5rem 0;
  width: 100%;
}

table th {
  background: var(--fastro-primary);
  color: white;
  padding: 0.75rem;
  text-align: left;
}

table td {
  padding: 0.75rem;
  border-bottom: 1px solid var(--border-color);
}

table tr:hover {
  background: #f8fafc;
}

/* Status badges */
.status-badge {
  display: inline-block;
  padding: 0.25rem 0.5rem;
  border-radius: 9999px;
  font-size: 0.75rem;
  font-weight: 500;
  text-transform: uppercase;
}

.status-ready { background: #dcfce7; color: #166534; }
.status-beta { background: #fef3c7; color: #92400e; }
.status-planned { background: #f3f4f6; color: #374151; }

/* Quick start section */
.quick-start {
  background: #f8fafc;
  border: 2px solid var(--fastro-primary);
  border-radius: 0.75rem;
  padding: 2rem;
  margin: 2rem 0;
}

.quick-start h3 {
  color: var(--fastro-primary);
  margin-top: 0;
}

/* Pricing tier cards */
.tier-card {
  border: 2px solid var(--border-color);
  border-radius: 0.75rem;
  padding: 1.5rem;
  text-align: center;
  transition: all 0.3s ease;
}

.tier-card:hover {
  border-color: var(--fastro-primary);
  box-shadow: 0 4px 12px rgba(37, 99, 235, 0.15);
}

.tier-popular {
  border-color: var(--fastro-primary);
  background: linear-gradient(135deg, #f0f9ff 0%, #e0f2fe 100%);
  position: relative;
}

.tier-popular::before {
  content: "MOST POPULAR";
  position: absolute;
  top: -0.5rem;
  left: 50%;
  transform: translateX(-50%);
  background: var(--fastro-primary);
  color: white;
  padding: 0.25rem 1rem;
  border-radius: 9999px;
  font-size: 0.75rem;
  font-weight: 600;
}

/* Command line styling */
.command-line {
  background: #1a202c;
  color: #e2e8f0;
  padding: 1rem;
  border-radius: 0.375rem;
  font-family: 'Courier New', monospace;
  margin: 1rem 0;
}

.command-line .prompt {
  color: #68d391;
}

.command-line .command {
  color: #90cdf4;
}

/* Navigation enhancements */
.md-nav__item--active > .md-nav__link {
  color: var(--fastro-primary);
  font-weight: 600;
}

.md-nav__link:hover {
  color: var(--fastro-accent);
}

/* Button enhancements */
.md-button {
  border-radius: 0.5rem;
  text-decoration: none;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  font-weight: 500;
  letter-spacing: 0.025em;
  position: relative;
  overflow: hidden;
}

.md-button--primary {
  background: var(--fastro-green);
  border: none;
  color: white;
  box-shadow: 0 2px 8px rgba(16, 185, 129, 0.3);
}

.md-button--primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(16, 185, 129, 0.4);
  background: var(--fastro-green-dark);
}

/* Secondary button style */
.md-button:not(.md-button--primary) {
  border: 2px solid var(--fastro-primary);
  color: var(--fastro-primary);
  background: transparent;
}

.md-button:not(.md-button--primary):hover {
  background: var(--fastro-primary);
  color: white;
  transform: translateY(-1px);
}

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

/* Fade-in animation for content */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.animate-target {
  opacity: 0;
  transform: translateY(20px);
  transition: all 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

.animate-in {
  animation: fadeInUp 0.6s ease-out forwards;
}

/* Logo styling - Invert colors for white appearance on purple header */
.md-header__button.md-logo img,
.md-header__button.md-logo svg {
  height: 2rem;
  width: auto;
  filter: brightness(0) saturate(100%) invert(1) drop-shadow(0 2px 4px rgba(0, 0, 0, 0.1));
}

/* Keep favicon normal colors */
link[rel="icon"] {
  filter: none;
}

/* Footer improvements */
.md-footer {
  background: #1e293b;
}

/* Status indicators */
.status-badge {
  display: inline-flex;
  align-items: center;
  padding: 0.25rem 0.75rem;
  border-radius: 9999px;
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.status-ready { 
  background: rgba(16, 185, 129, 0.1); 
  color: #059669; 
  border: 1px solid rgba(16, 185, 129, 0.2);
}

.status-beta { 
  background: rgba(245, 158, 11, 0.1); 
  color: #d97706; 
  border: 1px solid rgba(245, 158, 11, 0.2);
}

.status-planned { 
  background: rgba(107, 114, 128, 0.1); 
  color: #6b7280; 
  border: 1px solid rgba(107, 114, 128, 0.2);
}

/* Improved table styling */
.md-typeset table:not([class]) {
  border: 1px solid var(--border-color);
  border-radius: 0.5rem;
  overflow: hidden;
  background: var(--md-default-bg-color);
}

.md-typeset table:not([class]) th {
  background: var(--fastro-green);
  color: white;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.025em;
  font-size: 0.875rem;
}

/* Responsive design improvements */
@media (max-width: 768px) {
  .hero-title {
    font-size: 2rem;
  }
  
  .hero-subtitle {
    font-size: 1rem;
  }
  
  .grid.cards {
    grid-template-columns: 1fr;
  }
  
  .md-button {
    width: 100%;
    text-align: center;
  }
}

/* Focus states for accessibility */
.md-button:focus {
  outline: 2px solid var(--fastro-accent);
  outline-offset: 2px;
}

.grid.cards .card:focus-within {
  outline: 2px solid var(--fastro-accent);
  outline-offset: 2px;
}

/* Custom scrollbar for webkit browsers */
::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}

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

::-webkit-scrollbar-thumb {
  background: var(--fastro-primary);
  border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
  background: var(--fastro-secondary);
}

/* Additional landing page-inspired styling */
[data-md-color-scheme="slate"] .md-header {
  background: rgba(17, 24, 39, 0.8);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid rgba(16, 185, 129, 0.2);
}

[data-md-color-scheme="slate"] .md-nav--primary .md-nav__title {
  background: rgba(17, 24, 39, 0.9);
  backdrop-filter: blur(8px);
}

[data-md-color-scheme="slate"] .md-tabs {
  background: rgba(17, 24, 39, 0.8);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid rgba(16, 185, 129, 0.1);
}

/* Glassmorphism effects for cards in dark mode */
[data-md-color-scheme="slate"] .grid.cards .card {
  background: rgba(17, 24, 39, 0.7);
  backdrop-filter: blur(8px);
  border: 1px solid rgba(16, 185, 129, 0.2);
}

[data-md-color-scheme="slate"] .grid.cards .card:hover {
  background: rgba(17, 24, 39, 0.9);
  border-color: var(--fastro-green);
  transform: translateY(-4px);
  box-shadow: 0 12px 32px rgba(16, 185, 129, 0.15);
}

/* Enhance code blocks with landing page styling */
[data-md-color-scheme="slate"] .highlight pre {
  background: rgba(31, 41, 55, 0.8) !important;
  backdrop-filter: blur(4px);
  border: 1px solid rgba(16, 185, 129, 0.1);
}

/* Pattern background like landing page */
[data-md-color-scheme="slate"] .md-content__inner::before {
  content: "";
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-image: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%2310b981' fill-opacity='0.03'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
  opacity: 0.5;
  z-index: -1;
  pointer-events: none;
}

/* Enhanced hover effects for navigation */
[data-md-color-scheme="slate"] .md-nav__link:hover {
  color: var(--fastro-green);
  transition: color 0.3s ease;
}

[data-md-color-scheme="slate"] .md-tabs__link:hover {
  color: var(--fastro-green);
  transition: color 0.3s ease;
}

/* Improved footer styling to match landing page */
[data-md-color-scheme="slate"] .md-footer {
  background: rgba(17, 24, 39, 0.9);
  backdrop-filter: blur(8px);
  border-top: 1px solid rgba(16, 185, 129, 0.1);
}

/* Enhanced search styling */
[data-md-color-scheme="slate"] .md-search__form {
  background: rgba(31, 41, 55, 0.8);
  backdrop-filter: blur(8px);
  border: 1px solid rgba(16, 185, 129, 0.2);
  border-radius: 0.5rem;
}

[data-md-color-scheme="slate"] .md-search__input {
  background: transparent;
  color: #e5e7eb;
}

[data-md-color-scheme="slate"] .md-search__input::placeholder {
  color: rgba(229, 231, 235, 0.6);
}

/* Copy dark mode approach for soft dark mode */
[data-md-color-scheme="soft-dark"] .md-header {
  background: rgba(28, 33, 40, 0.8);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid rgba(16, 185, 129, 0.2);
}

[data-md-color-scheme="soft-dark"] .md-nav--primary .md-nav__title {
  background: rgba(28, 33, 40, 0.9);
  backdrop-filter: blur(8px);
}

[data-md-color-scheme="soft-dark"] .md-tabs {
  background: rgba(28, 33, 40, 0.8);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid rgba(16, 185, 129, 0.1);
}

/* Glassmorphism effects for cards in soft dark mode */
[data-md-color-scheme="soft-dark"] .grid.cards .card {
  background: rgba(28, 33, 40, 0.7);
  border-color: var(--border-color);
  backdrop-filter: blur(8px);
}

[data-md-color-scheme="soft-dark"] .grid.cards .card:hover {
  background: rgba(28, 33, 40, 0.9);
  border-color: var(--fastro-green);
  transform: translateY(-4px);
  box-shadow: 0 12px 32px rgba(16, 185, 129, 0.15);
}

/* Pattern background like landing page */
[data-md-color-scheme="soft-dark"] .md-content__inner::before {
  content: "";
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-image: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%2310b981' fill-opacity='0.03'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
  opacity: 0.5;
  z-index: -1;
  pointer-events: none;
}

/* Enhanced hover effects for navigation */
[data-md-color-scheme="soft-dark"] .md-nav__link:hover {
  color: var(--fastro-green);
  transition: color 0.3s ease;
}

[data-md-color-scheme="soft-dark"] .md-tabs__link:hover {
  color: var(--fastro-green);
  transition: color 0.3s ease;
}

/* Improved footer styling to match landing page */
[data-md-color-scheme="soft-dark"] .md-footer {
  background: rgba(28, 33, 40, 0.9);
  backdrop-filter: blur(8px);
  border-top: 1px solid rgba(16, 185, 129, 0.1);
}

/* Enhanced search styling */
[data-md-color-scheme="soft-dark"] .md-search__form {
  background: rgba(30, 42, 58, 0.8);
  backdrop-filter: blur(8px);
  border: 1px solid rgba(16, 185, 129, 0.2);
  border-radius: 0.5rem;
}

[data-md-color-scheme="soft-dark"] .md-search__input {
  background: transparent;
  color: #e5e7eb;
}

[data-md-color-scheme="soft-dark"] .md-search__input::placeholder {
  color: rgba(229, 231, 235, 0.6);
}

/* Just copy the exact working dark mode sections we need */

/* Enhance code blocks with soft dark styling */
[data-md-color-scheme="soft-dark"] .highlight pre {
  background: rgba(30, 42, 58, 0.8) !important;
  backdrop-filter: blur(4px);
  border: 1px solid rgba(16, 185, 129, 0.1);
}

/* Fix admonitions in soft dark mode */
[data-md-color-scheme="soft-dark"] .admonition {
  background: rgba(30, 42, 58, 0.8) !important;
  color: #e6edf3 !important;
  border-left: 4px solid var(--fastro-green) !important;
}

[data-md-color-scheme="soft-dark"] .admonition .admonition-title {
  background: rgba(30, 42, 58, 0.9) !important;
  color: #f0f6fc !important;
  font-weight: 600;
}

[data-md-color-scheme="soft-dark"] .admonition.note {
  border-left-color: #58a6ff !important;
}

[data-md-color-scheme="soft-dark"] .admonition.note .admonition-title {
  background: rgba(88, 166, 255, 0.2) !important;
  color: #58a6ff !important;
}

/* Fix warning admonition to be orange */
[data-md-color-scheme="soft-dark"] .admonition.warning {
  border-left-color: #ffa657 !important;
}

[data-md-color-scheme="soft-dark"] .admonition.warning .admonition-title {
  background: rgba(255, 166, 87, 0.2) !important;
  color: #ffa657 !important;
}

/* Fix titles */
[data-md-color-scheme="soft-dark"] .md-typeset h1 {
  color: #f0f6fc !important;
}

[data-md-color-scheme="soft-dark"] .md-typeset h2,
[data-md-color-scheme="soft-dark"] .md-typeset h3,
[data-md-color-scheme="soft-dark"] .md-typeset h4 {
  color: var(--fastro-green) !important;
}

/* Fix table of contents */
[data-md-color-scheme="soft-dark"] .md-nav--secondary .md-nav__title {
  color: #f0f6fc !important;
}

[data-md-color-scheme="soft-dark"] .md-nav--secondary .md-nav__link {
  color: #c9d1d9 !important;
}

[data-md-color-scheme="soft-dark"] .md-nav--secondary .md-nav__link:hover {
  color: var(--fastro-green) !important;
}

[data-md-color-scheme="soft-dark"] .md-nav--secondary .md-nav__link--active {
  color: var(--fastro-green) !important;
  font-weight: 500;
}

/* Fix code blocks */
[data-md-color-scheme="soft-dark"] .highlight pre {
  background: #1e2a3a !important;
  color: #e6edf3 !important;
}

/* Fix all code syntax highlighting for soft dark mode */
[data-md-color-scheme="soft-dark"] .highlight .p,
[data-md-color-scheme="soft-dark"] .highlight .punctuation,
[data-md-color-scheme="soft-dark"] .highlight .token.punctuation {
  color: #e6edf3 !important; /* Brackets like { } */
}

[data-md-color-scheme="soft-dark"] .highlight .c,
[data-md-color-scheme="soft-dark"] .highlight .c1,
[data-md-color-scheme="soft-dark"] .highlight .cm,
[data-md-color-scheme="soft-dark"] .highlight .comment,
[data-md-color-scheme="soft-dark"] .highlight .token.comment {
  color: #8b949e !important; /* Comments should be visible gray */
}

[data-md-color-scheme="soft-dark"] .highlight .s,
[data-md-color-scheme="soft-dark"] .highlight .s1,
[data-md-color-scheme="soft-dark"] .highlight .s2,
[data-md-color-scheme="soft-dark"] .highlight .string,
[data-md-color-scheme="soft-dark"] .highlight .token.string {
  color: #a5d6ff !important; /* Strings */
}

[data-md-color-scheme="soft-dark"] .highlight .k,
[data-md-color-scheme="soft-dark"] .highlight .kn,
[data-md-color-scheme="soft-dark"] .highlight .keyword,
[data-md-color-scheme="soft-dark"] .highlight .token.keyword {
  color: #ff7b72 !important; /* Keywords */
}

/* Fallback for any remaining black text in code blocks */
[data-md-color-scheme="soft-dark"] .highlight * {
  color: #e6edf3 !important;
}

/* Re-apply specific colors after fallback */
[data-md-color-scheme="soft-dark"] .highlight .c,
[data-md-color-scheme="soft-dark"] .highlight .c1,
[data-md-color-scheme="soft-dark"] .highlight .cm,
[data-md-color-scheme="soft-dark"] .highlight .comment {
  color: #8b949e !important;
}

[data-md-color-scheme="soft-dark"] .highlight .s,
[data-md-color-scheme="soft-dark"] .highlight .s1,
[data-md-color-scheme="soft-dark"] .highlight .s2,
[data-md-color-scheme="soft-dark"] .highlight .string {
  color: #a5d6ff !important;
}

[data-md-color-scheme="soft-dark"] .highlight .k,
[data-md-color-scheme="soft-dark"] .highlight .keyword {
  color: #ff7b72 !important;
}

/* Target specific problem elements in soft dark mode */
[data-md-color-scheme="soft-dark"] .tabbed-label,
[data-md-color-scheme="soft-dark"] .tabbed-set > input:first-child + label,
[data-md-color-scheme="soft-dark"] .tabbed-set > input + label,
[data-md-color-scheme="soft-dark"] .tabbed-set label,
[data-md-color-scheme="soft-dark"] .md-tabs__link,
[data-md-color-scheme="soft-dark"] .md-button,
[data-md-color-scheme="soft-dark"] button {
  color: #e6edf3 !important;
}

/* Green titles and icons - apply to all themes */
.md-typeset h2:has(.twemoji), 
.md-typeset h3:has(.twemoji), 
.md-typeset h4:has(.twemoji) {
  color: var(--fastro-green) !important;
}

/* Force icons to be green - apply to all themes */
.md-typeset h2 .twemoji, 
.md-typeset h3 .twemoji, 
.md-typeset h4 .twemoji {
  color: var(--fastro-green) !important;
  filter: none !important;
}

/* Icons in grid cards */
.grid.cards .twemoji {
  color: var(--fastro-green) !important;
  filter: none !important;
}

/* Alternative approach for browsers that don't support :has() */
h2[id*="material-"], h3[id*="material-"], h4[id*="material-"] {
  color: var(--fastro-green) !important;
}

/* Ensure green for specific title classes */
.md-typeset h2 svg,
.md-typeset h3 svg,
.md-typeset h4 svg {
  fill: var(--fastro-green) !important;
}

/* Target Material Design icons specifically */
.md-typeset h2 img[alt*="material-"],
.md-typeset h3 img[alt*="material-"],
.md-typeset h4 img[alt*="material-"] {
  filter: hue-rotate(290deg) saturate(2) brightness(1.1) !important;
}

/* More specific targeting for emoji/icon elements */
.md-typeset h2 .twemoji[alt*="material-"],
.md-typeset h3 .twemoji[alt*="material-"],
.md-typeset h4 .twemoji[alt*="material-"] {
  filter: hue-rotate(290deg) saturate(2) brightness(1.1) !important;
}

/* Green text for headings containing icons */
.md-typeset h2[id*="material"],
.md-typeset h3[id*="material"],
.md-typeset h4[id*="material"] {
  color: var(--fastro-green) !important;
}

/* Make ALL headings in Learn section green */
article[data-md-component="main"] h2,
article[data-md-component="main"] h3,
article[data-md-component="main"] h4 {
  color: var(--fastro-green) !important;
}

/* Alternative selector for all headings */
.md-content h2,
.md-content h3,
.md-content h4 {
  color: var(--fastro-green) !important;
}

/* Responsive design */
@media (max-width: 768px) {
  .hero-title {
    font-size: 2rem;
  }
  
  .hero-subtitle {
    font-size: 1rem;
  }
  
  .grid.cards {
    grid-template-columns: 1fr;
  }
}