/* Modern Web Application Styles - Injustitia Omnibus */
/* Based on 2024-2025 Design Trends */

/* Import Modern Fonts */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800&family=Montserrat:wght@400;600;700;800;900&family=JetBrains+Mono:wght@400;500;600&display=swap');

/* CSS Custom Properties - Modern Design System */
:root {
  /* Color Palette - Light Mode */
  --primary: #0f4c3a;
  --primary-light: #10b981;
  --primary-glow: #6ee7b7;
  --primary-dark: #065f46;
  --secondary: #dc2626;
  --accent: #f59e0b;
  --accent-blue: #3b82f6;
  --accent-dark: #d97706;

  /* Neutral Colors */
  --white: #ffffff;
  --gray-50: #f8fafc;
  --gray-100: #f1f5f9;
  --gray-200: #e2e8f0;
  --gray-300: #cbd5e1;
  --gray-400: #94a3b8;
  --gray-500: #64748b;
  --gray-600: #475569;
  --gray-700: #334155;
  --gray-800: #1e293b;
  --gray-900: #0f172a;

  /* Semantic Colors */
  --background: var(--white);
  --surface: var(--gray-50);
  --surface-elevated: var(--white);
  --text-primary: var(--gray-900);
  --text-secondary: var(--gray-600);
  --text-tertiary: var(--gray-500);
  --border: var(--gray-200);
  --border-light: var(--gray-100);

  /* Gradients */
  --gradient-primary: linear-gradient(135deg, #0f4c3a 0%, #10b981 50%, #6ee7b7 100%);
  --gradient-secondary: linear-gradient(135deg, #dc2626 0%, #ef4444 50%, #fca5a5 100%);
  --gradient-accent: linear-gradient(135deg, #f59e0b 0%, #fbbf24 50%, #fde047 100%);
  --gradient-blue: linear-gradient(135deg, #1e40af 0%, #3b82f6 50%, #60a5fa 100%);
  --gradient-purple: linear-gradient(135deg, #7c3aed 0%, #a855f7 50%, #c084fc 100%);
  --gradient-forest: linear-gradient(135deg, #0f4c3a 0%, #059669 50%, #10b981 100%);
  --gradient-glass: linear-gradient(135deg, rgba(255,255,255,0.1) 0%, rgba(255,255,255,0.05) 100%);

  /* Shadows */
  --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
  --shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.1), 0 1px 2px 0 rgba(0, 0, 0, 0.06);
  --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
  --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
  --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
  --shadow-2xl: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
  --shadow-glass: 0 8px 32px rgba(0, 0, 0, 0.1);
  --shadow-glow: 0 0 20px rgba(16, 185, 129, 0.3);
  --shadow-soft: 0 2px 15px rgba(0, 0, 0, 0.08);
  --shadow-hover: 0 10px 25px rgba(0, 0, 0, 0.12);

  /* Spacing Scale */
  --space-1: 0.25rem;
  --space-2: 0.5rem;
  --space-3: 0.75rem;
  --space-4: 1rem;
  --space-5: 1.25rem;
  --space-6: 1.5rem;
  --space-8: 2rem;
  --space-10: 2.5rem;
  --space-12: 3rem;
  --space-16: 4rem;
  --space-20: 5rem;
  --space-24: 6rem;
  --space-32: 8rem;

  /* Border Radius */
  --radius-sm: 0.25rem;
  --radius: 0.5rem;
  --radius-md: 0.75rem;
  --radius-lg: 1rem;
  --radius-xl: 1.5rem;
  --radius-2xl: 2rem;
  --radius-full: 9999px;
  --border-radius-xl: 1.25rem;

  /* Typography */
  --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --font-display: 'Montserrat', var(--font-sans);
  --font-mono: 'JetBrains Mono', 'Fira Code', monospace;

  /* Font Sizes */
  --text-xs: 0.75rem;
  --text-sm: 0.875rem;
  --text-base: 1rem;
  --text-lg: 1.125rem;
  --text-xl: 1.25rem;
  --text-2xl: 1.5rem;
  --text-3xl: 1.875rem;
  --text-4xl: 2.25rem;
  --text-5xl: 3rem;
  --text-6xl: 3.75rem;
  --text-7xl: 4.5rem;

  /* Line Heights */
  --leading-tight: 1.25;
  --leading-snug: 1.375;
  --leading-normal: 1.5;
  --leading-relaxed: 1.625;
  --leading-loose: 2;

  /* Transitions */
  --transition-fast: 150ms ease-out;
  --transition-base: 250ms ease-out;
  --transition-slow: 350ms ease-out;
  --transition-bounce: 350ms cubic-bezier(0.68, -0.55, 0.265, 1.55);

  /* Z-Index Scale */
  --z-dropdown: 1000;
  --z-sticky: 1020;
  --z-fixed: 1030;
  --z-modal-backdrop: 1040;
  --z-modal: 1050;
  --z-popover: 1060;
  --z-tooltip: 1070;
  --z-toast: 1080;

  /* Modern glass effects */
  --glass-bg: rgba(255, 255, 255, 0.8);
  --glass-bg-dark: rgba(15, 23, 42, 0.8);
  --backdrop-blur: blur(12px);
}

/* Dark Mode Variables */
[data-theme="dark"] {
  --background: var(--gray-900);
  --surface: var(--gray-800);
  --surface-elevated: var(--gray-700);
  --text-primary: var(--gray-50);
  --text-secondary: var(--gray-300);
  --text-tertiary: var(--gray-400);
  --border: var(--gray-700);
  --border-light: var(--gray-600);
  --shadow-glass: 0 8px 32px rgba(0, 0, 0, 0.3);
}

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

html {
  font-size: 16px;
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  font-family: var(--font-sans);
  font-size: var(--text-base);
  line-height: var(--leading-normal);
  color: var(--text-primary);
  background-color: var(--background);
  transition: background-color var(--transition-base), color var(--transition-base);
}

/* Typography */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-display);
  font-weight: 700;
  line-height: var(--leading-tight);
  letter-spacing: -0.025em;
  margin-bottom: var(--space-4);
}

h1 {
  font-size: var(--text-5xl);
  font-weight: 800;
  background: var(--gradient-primary);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

h2 {
  font-size: var(--text-4xl);
  font-weight: 700;
}

h3 {
  font-size: var(--text-3xl);
  font-weight: 600;
}

h4 {
  font-size: var(--text-2xl);
  font-weight: 600;
}

h5 {
  font-size: var(--text-xl);
  font-weight: 600;
}

h6 {
  font-size: var(--text-lg);
  font-weight: 600;
}

p {
  margin-bottom: var(--space-4);
  color: var(--text-secondary);
  line-height: var(--leading-relaxed);
}

a {
  color: var(--primary-light);
  text-decoration: none;
  transition: color var(--transition-fast);
}

a:hover {
  color: var(--primary);
  text-decoration: underline;
}

/* Glass Morphism Components */
.glass {
  background: rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid rgba(255, 255, 255, 0.2);
  box-shadow: var(--shadow-glass);
}

[data-theme="dark"] .glass {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.glass-card {
  background: rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: var(--radius-xl);
  padding: var(--space-8);
  transition: transform var(--transition-base), box-shadow var(--transition-base);
}

.glass-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-2xl), var(--shadow-glow);
}

/* Modern Navigation */
.navbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: var(--z-sticky);
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
  border-bottom: 1px solid rgba(229, 231, 235, 0.6);
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  padding: 1rem 0;
  font-family: var(--font-sans);
}

.navbar-scrolled {
  padding: 0.75rem 0;
  background: rgba(255, 255, 255, 0.98) !important;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.12) !important;
  border-bottom: 1px solid rgba(229, 231, 235, 0.8);
}

[data-theme="dark"] .navbar {
  background: rgba(15, 23, 42, 0.95);
  border-bottom-color: rgba(51, 65, 85, 0.6);
}

[data-theme="dark"] .navbar-scrolled {
  background: rgba(15, 23, 42, 0.98) !important;
  border-bottom-color: rgba(51, 65, 85, 0.8);
}

.navbar-container {
  max-width: 1400px;
  margin: 0 auto;
  padding: 0 var(--space-6);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.navbar-brand {
  font-family: var(--font-display);
  font-size: 1.75rem;
  font-weight: 800;
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-light) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  text-decoration: none;
  transition: all 0.3s ease;
  position: relative;
  padding: 0.5rem 0;
}

.navbar-brand:hover {
  transform: scale(1.05);
  filter: brightness(1.1);
}

.navbar-brand::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 0;
  height: 3px;
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-light) 100%);
  transition: width 0.3s ease;
  border-radius: 2px;
}

.navbar-brand:hover::after {
  width: 100%;
}

.navbar-toggler {
  border: none;
  padding: 0.5rem;
  border-radius: 0.5rem;
  background: transparent;
  transition: all 0.3s ease;
}

.navbar-toggler:hover {
  background: rgba(15, 76, 58, 0.1);
}

.navbar-toggler:focus {
  box-shadow: 0 0 0 3px rgba(15, 76, 58, 0.2);
  outline: none;
}

.navbar-toggler-icon {
  background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 30 30'%3e%3cpath stroke='rgba(15, 76, 58, 0.8)' stroke-linecap='round' stroke-miterlimit='10' stroke-width='2' d='M4 7h22M4 15h22M4 23h22'/%3e%3c/svg%3e");
}

.navbar-nav {
  display: flex;
  list-style: none;
  gap: 0.5rem;
  align-items: center;
  margin: 0;
  padding: 0;
}

.nav-item {
  position: relative;
}

.nav-link {
  position: relative;
  font-weight: 600;
  font-size: 0.95rem;
  color: var(--text-secondary);
  text-decoration: none;
  padding: 0.75rem 1rem;
  border-radius: 0.75rem;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  display: flex;
  align-items: center;
  gap: 0.5rem;
  white-space: nowrap;
}

.nav-link:hover {
  color: var(--primary);
  background: rgba(15, 76, 58, 0.08);
  transform: translateY(-1px);
  text-decoration: none;
}

.nav-link.active {
  color: var(--primary);
  background: rgba(15, 76, 58, 0.12);
  font-weight: 700;
}

.nav-link::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-light) 100%);
  border-radius: 0.75rem;
  opacity: 0;
  transition: opacity 0.3s ease;
  z-index: -1;
}

.nav-link:hover::before {
  opacity: 0.1;
}

.nav-link::after {
  content: '';
  position: absolute;
  bottom: 0.25rem;
  left: 50%;
  width: 0;
  height: 2px;
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-light) 100%);
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  transform: translateX(-50%);
  border-radius: 1px;
}

.nav-link:hover::after,
.nav-link.active::after {
  width: 60%;
}

/* Modern Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
  padding: 0.625rem 1.5rem;
  font-family: var(--font-sans);
  font-size: var(--text-sm);
  font-weight: 600;
  line-height: 1;
  border: none;
  border-radius: 0.5rem;
  cursor: pointer;
  transition: all var(--transition-base);
  text-decoration: none;
  position: relative;
  overflow: hidden;
}

.btn::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.2), transparent);
  transition: left var(--transition-slow);
}

.btn:hover::before {
  left: 100%;
}

.btn::after {
  content: '';
  position: absolute;
  width: 100%;
  height: 100%;
  top: 0;
  left: -100%;
  background: linear-gradient(90deg, 
    rgba(255,255,255,0) 0%, 
    rgba(255,255,255,0.2) 50%, 
    rgba(255,255,255,0) 100%
  );
  transition: left 0.8s ease;
}

.btn:hover {
  transform: translateY(-2px);
}

.btn:hover::after {
  left: 100%;
}

.btn-primary {
  background: linear-gradient(135deg, var(--primary), var(--primary-dark));
  color: white;
  box-shadow: var(--shadow-md);
  border: none;
}

.btn-primary:hover {
  background: linear-gradient(135deg, var(--primary-dark), var(--primary));
  transform: translateY(-2px);
  box-shadow: var(--shadow-lg), var(--shadow-glow);
}

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

.btn-secondary:hover {
  background: var(--primary);
  color: white;
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

.btn-ghost {
  background: transparent;
  color: var(--text-secondary);
}

.btn-ghost:hover {
  background: var(--surface);
  color: var(--text-primary);
}

/* Modern Cards */
.card {
  background: var(--surface-elevated);
  border: 1px solid rgba(229, 231, 235, 0.7);
  border-radius: var(--border-radius-xl);
  padding: var(--space-8);
  box-shadow: var(--shadow);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  position: relative;
  overflow: hidden;
}

.card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--primary-light), var(--primary-dark));
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.4s ease;
}

.card:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-hover);
  border-color: var(--primary-light);
}

.card:hover::before {
  transform: scaleX(1);
}

.card-title {
  font-size: var(--text-xl);
  font-weight: 600;
  margin-bottom: var(--space-4);
  color: var(--text-primary);
}

.card-content {
  color: var(--text-secondary);
  line-height: var(--leading-relaxed);
}

/* Hero Section */
.hero {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--gradient-primary);
  position: relative;
  overflow: hidden;
}

.hero::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 1000 1000"><defs><radialGradient id="a" cx="50%" cy="50%"><stop offset="0%" stop-color="rgba(255,255,255,0.1)"/><stop offset="100%" stop-color="rgba(255,255,255,0)"/></radialGradient></defs><circle cx="200" cy="200" r="100" fill="url(%23a)"/><circle cx="800" cy="300" r="150" fill="url(%23a)"/><circle cx="400" cy="700" r="120" fill="url(%23a)"/></svg>');
  animation: float 20s ease-in-out infinite;
}

.hero-content {
  text-align: center;
  color: white;
  z-index: 1;
  position: relative;
  max-width: 800px;
  padding: var(--space-8);
}

.hero-title {
  font-size: var(--text-6xl);
  font-weight: 900;
  margin-bottom: var(--space-6);
  text-shadow: 0 4px 8px rgba(0,0,0,0.3);
  animation: slideUp 1s ease-out;
}

.hero-subtitle {
  font-size: var(--text-xl);
  margin-bottom: var(--space-8);
  opacity: 0.9;
  animation: slideUp 1s ease-out 0.2s both;
}

.hero-section {
  position: relative;
  padding: 7rem 0;
  background-size: cover;
  background-position: center;
  overflow: hidden;
}

.hero-section::before {
  background-size: 15px 15px !important;
}

.hero-section::before {
  content: "";
  position: absolute;
  top: 0; left: 0;
  width: 100%; height: 100%;
  background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><defs><pattern id="resources-pattern" width="20" height="20" patternUnits="userSpaceOnUse"><circle cx="10" cy="10" r="1" fill="white" opacity="0.1"/></pattern></defs><rect width="100" height="100" fill="url(%23resources-pattern)"/></svg>') repeat;
  opacity: 0.3;
  z-index: 1;
}

.hero-section .hero-content {
  position: relative;
  z-index: 2;
}

.hero-content h1 {
  line-height: 1.2;
  margin-bottom: 1.5rem;
  text-shadow: 0 2px 10px rgba(0,0,0,0.15);
}

@keyframes float {
  0%, 100% { transform: translateY(0px) rotate(0deg); }
  50% { transform: translateY(-20px) rotate(180deg); }
}

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

/* Section Dividers */
.section-divider-wave {
  height: 3px;
  background-image: url("data:image/svg+xml,%3Csvg width='100' height='10' viewBox='0 0 100 10' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M0 10 C 30 0, 70 0, 100 10' stroke='%230f4c3a' fill='none'/%3E%3C/svg%3E");
  background-size: 100px 10px;
  background-repeat: repeat-x;
  border: none;
  margin: 4rem 0;
}

.section-divider-dots {
  height: 5px;
  background-image: radial-gradient(circle, var(--primary) 1px, transparent 1px);
  background-size: 20px 20px;
  border: none;
  margin: 4rem 0;
}

/* Animation Enhancements */
@keyframes fadeInUp {
  from {
    transform: translate3d(0, 30px, 0);
    opacity: 0;
  }
  to {
    transform: translate3d(0, 0, 0);
    opacity: 1;
  }
}

@keyframes fadeInDown {
  from {
    transform: translate3d(0, -30px, 0);
    opacity: 0;
  }
  to {
    transform: translate3d(0, 0, 0);
    opacity: 1;
  }
}

/* Footer Enhancement */
.site-footer {
  padding: 2rem 0;
  background: linear-gradient(to right, var(--primary-dark), var(--primary));
  color: white;
  text-align: center;
  position: relative;
  overflow: hidden;
}

.site-footer::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><defs><pattern id="footer-pattern" width="40" height="40" patternUnits="userSpaceOnUse"><circle cx="20" cy="20" r="1" fill="white" opacity="0.2"/></pattern></defs><rect width="100" height="100" fill="url(%23footer-pattern)"/></svg>') repeat;
  opacity: 0.2;
}

/* Blog Post Card Enhancement */
.blog-post-card {
  border-radius: var(--border-radius-xl);
  overflow: hidden;
  transition: all 0.3s ease;
}

.blog-post-card:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-hover);
}

.post-title {
  font-weight: 700;
  line-height: 1.3;
}

.post-tag {
  background: rgba(15, 76, 58, 0.1);
  color: var(--primary);
  border-radius: 20px;
  padding: 0.25rem 0.75rem;
  font-size: 0.8rem;
  transition: all 0.3s ease;
}

.post-tag:hover {
  background: var(--primary);
  color: white;
}

/* FAQ Accordion Enhancement */
.accordion-item {
  border-radius: 1rem !important;
  overflow: hidden;
  margin-bottom: 1rem;
  border: 1px solid rgba(229, 231, 235, 0.7) !important;
  transition: all 0.3s ease;
}

.accordion-item:hover {
  box-shadow: var(--shadow-soft);
}

.accordion-button {
  font-weight: 600;
  padding: 1.25rem;
}

.accordion-button:not(.collapsed) {
  background: var(--primary);
  color: white;
}

.accordion-button:focus {
  box-shadow: none;
  border-color: var(--primary);
}

/* Resource PDF Viewer Enhancement */
.pdf-viewer-container {
  border-radius: var(--border-radius-xl);
  overflow: hidden;
  transition: all 0.3s ease;
  border: 2px dashed rgba(229, 231, 235, 0.7);
  min-height: 700px !important;
  width: 100%;
}

.pdf-viewer-container:hover {
  border-color: var(--primary-light);
}

/* Enhanced PDF viewer sizing */
.pdf-viewer-container iframe {
  width: 100% !important;
  height: 100% !important;
  min-height: 700px !important;
  border: none;
  border-radius: var(--radius-lg);
}

/* PDF viewer responsive improvements */
@media (max-width: 1200px) {
  .pdf-viewer-container {
    min-height: 600px !important;
  }
  
  .pdf-viewer-container iframe {
    min-height: 600px !important;
  }
}

@media (max-width: 768px) {
  .pdf-viewer-container {
    min-height: 500px !important;
  }
  
  .pdf-viewer-container iframe {
    min-height: 500px !important;
  }
}

/* Enhanced document viewer improvements */
.pdf-viewer-container {
  position: relative;
  overflow: hidden;
}

.pdf-viewer-container iframe {
  transition: opacity 0.3s ease;
}

.pdf-viewer-container iframe.visible {
  opacity: 1;
}

.pdf-placeholder {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 100%;
  max-width: 400px;
}

/* Document list improvements for better mobile experience */
@media (max-width: 991.98px) {
  .col-lg-4 {
    margin-bottom: 2rem;
  }
  
  .pdf-viewer-container {
    min-height: 400px !important;
  }
  
  .pdf-viewer-container iframe {
    min-height: 400px !important;
  }
}

/* List Group Enhancement */
.list-group-item {
  border-radius: 0.75rem !important;
  margin-bottom: 0.5rem;
  border: 1px solid rgba(229, 231, 235, 0.7);
  transition: all 0.3s ease;
}

.list-group-item:hover {
  transform: translateX(5px);
  border-color: var(--primary-light);
}

.list-group-item.active {
  background: var(--primary);
  border-color: var(--primary);
  color: white;
}

/* Responsive Fixes */
@media (max-width: 768px) {
  .hero-content h1 {
    font-size: 2rem !important;
  }
  
  .hero-badges {
    flex-direction: column;
    align-items: center;
  }
  
  .navbar-nav {
    padding: 1rem;
    background: white;
    border-radius: 1rem;
    box-shadow: var(--shadow-soft);
    margin-top: 1rem;
  }
  
  .nav-link {
    padding: 0.75rem !important;
    margin: 0.25rem 0 !important;
  }
}

/* Theme Toggle Button */
.theme-toggle {
  width: 50px;
  height: 26px;
  background: #e2e8f0;
  border-radius: 50px;
  padding: 3px;
  cursor: pointer;
  transition: all 0.3s ease;
}

.theme-toggle-thumb {
  width: 20px;
  height: 20px;
  background: white;
  border-radius: 50%;
  box-shadow: 0 2px 5px rgba(0,0,0,0.1);
  transition: transform 0.3s ease;
}

[data-theme="dark"] .theme-toggle {
  background: var(--primary);
}

[data-theme="dark"] .theme-toggle-thumb {
  transform: translateX(24px);
}

/* Mobile Navigation */
@media (max-width: 991.98px) {
  .navbar-nav {
    background: rgba(255, 255, 255, 0.98);
    backdrop-filter: blur(20px);
    border-radius: 1rem;
    padding: 1rem;
    margin-top: 1rem;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.1);
    border: 1px solid rgba(229, 231, 235, 0.6);
    flex-direction: column;
    gap: 0.25rem;
    width: 100%;
  }

  .nav-item {
    width: 100%;
  }

  .nav-link {
    width: 100%;
    justify-content: flex-start;
    padding: 1rem 1.25rem;
    border-radius: 0.75rem;
    font-size: 1rem;
  }

  .nav-link:hover {
    background: rgba(15, 76, 58, 0.1);
    transform: translateX(4px);
  }

  .navbar-collapse {
    margin-top: 1rem;
  }
}

/* Enhanced navbar animations */
@keyframes slideDown {
  from {
    opacity: 0;
    transform: translateY(-10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.navbar-collapse.show {
  animation: slideDown 0.3s ease-out;
}

/* Navbar brand animation */
.animated-brand {
  animation: fadeInDown 0.6s ease-out;
  transition: all 0.3s ease;
}

.animated-brand:hover {
  transform: scale(1.05) translateY(-2px);
  filter: brightness(1.1);
}

/* Navbar link animations */
.animated-nav {
  animation: fadeInUp 0.6s ease-out;
  animation-fill-mode: both;
}

.animated-nav:nth-child(1) { animation-delay: 0.1s; }
.animated-nav:nth-child(2) { animation-delay: 0.2s; }
.animated-nav:nth-child(3) { animation-delay: 0.3s; }
.animated-nav:nth-child(4) { animation-delay: 0.4s; }
.animated-nav:nth-child(5) { animation-delay: 0.5s; }
.animated-nav:nth-child(6) { animation-delay: 0.6s; }
.animated-nav:nth-child(7) { animation-delay: 0.7s; }
.animated-nav:nth-child(8) { animation-delay: 0.8s; }
.animated-nav:nth-child(9) { animation-delay: 0.9s; }

.animated-nav:hover {
  transform: translateY(-2px);
  color: var(--primary);
  background: rgba(15, 76, 58, 0.08);
}

.animated-nav.active {
  color: var(--primary);
  background: rgba(15, 76, 58, 0.12);
  font-weight: 700;
}

/* Enhanced navbar improvements */
.navbar {
  font-weight: 500;
}

.navbar-brand {
  letter-spacing: -0.025em;
}

.nav-link i {
  font-size: 0.9em;
  opacity: 0.8;
  transition: opacity 0.3s ease;
}

.nav-link:hover i {
  opacity: 1;
}

.nav-link.active i {
  opacity: 1;
  color: var(--primary);
}

/* Enhanced Hero Section Text Readability */
.hero-section {
  position: relative;
}

.hero-section::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(135deg, rgba(0, 0, 0, 0.4) 0%, rgba(0, 0, 0, 0.2) 50%, rgba(0, 0, 0, 0.4) 100%);
  z-index: 1;
}

.hero-content {
  position: relative;
  z-index: 2;
}

.hero-content h1 {
  color: #ffffff !important;
  text-shadow: 0 2px 8px rgba(0, 0, 0, 0.6);
  font-weight: 800;
  letter-spacing: -0.02em;
  margin-bottom: 1.5rem;
}

.hero-content .lead {
  color: #ffffff !important;
  text-shadow: 0 1px 4px rgba(0, 0, 0, 0.5);
  font-weight: 500;
  opacity: 0.95;
  margin-bottom: 2rem;
}

.hero-content p {
  color: #ffffff !important;
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.4);
  opacity: 0.9;
}

.hero-content a {
  color: #ffffff !important;
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.4);
  text-decoration: underline;
  font-weight: 600;
}

.hero-content a:hover {
  color: #f0f9ff !important;
  text-shadow: 0 2px 6px rgba(0, 0, 0, 0.6);
}

.hero-badges .badge {
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
  font-weight: 600;
  border: 1px solid rgba(255, 255, 255, 0.2);
}

.hero-icon {
  text-shadow: 0 2px 8px rgba(0, 0, 0, 0.4);
  filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.3));
}

/* Enhanced button styling for hero sections */
.hero-section .btn {
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
  font-weight: 600;
  border: 2px solid rgba(255, 255, 255, 0.3);
  backdrop-filter: blur(10px);
  background: rgba(255, 255, 255, 0.15);
  color: #ffffff;
  transition: all 0.3s ease;
}

.hero-section .btn:hover {
  background: rgba(255, 255, 255, 0.25);
  border-color: rgba(255, 255, 255, 0.5);
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.3);
  color: #ffffff;
}

/* Specific improvements for different gradient backgrounds */
.hero-section[style*="gradient-primary"] .hero-content h1,
.hero-section[style*="gradient-forest"] .hero-content h1 {
  background: linear-gradient(135deg, #ffffff 0%, #f0f9ff 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  text-shadow: none;
  filter: drop-shadow(0 2px 8px rgba(0, 0, 0, 0.6));
}

/* Additional text readability improvements */
.hero-content .text-white {
  color: #ffffff !important;
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.5);
}

.hero-content .opacity-75 {
  opacity: 0.95 !important;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.4);
}

/* Enhanced badge styling for better contrast */
.hero-badges .badge {
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.3);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

.hero-badges .badge.bg-danger {
  background: rgba(220, 38, 38, 0.9) !important;
}

.hero-badges .badge.bg-warning {
  background: rgba(245, 158, 11, 0.9) !important;
}

.hero-badges .badge.bg-info {
  background: rgba(59, 130, 246, 0.9) !important;
}

.hero-badges .badge.bg-success {
  background: rgba(34, 197, 94, 0.9) !important;
}

/* Mobile responsiveness for hero text */
@media (max-width: 768px) {
  .hero-content h1 {
    font-size: 2.5rem !important;
    line-height: 1.2;
  }
  
  .hero-content .lead {
    font-size: 1.1rem !important;
    line-height: 1.4;
  }
  
  .hero-badges {
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
  }
  
  .hero-badges .badge {
    font-size: 0.9rem !important;
    padding: 0.5rem 1rem !important;
  }
}

/* Ensure all hero text is readable */
.hero-section .hero-content * {
  color: inherit;
}

.hero-section .hero-content strong {
  font-weight: 700;
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.6);
}

/* High contrast mode support */
@media (prefers-contrast: high) {
  .hero-content h1,
  .hero-content .lead,
  .hero-content p {
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.8) !important;
  }
  
  .hero-badges .badge {
    border: 2px solid rgba(255, 255, 255, 0.8) !important;
  }
}

/* Improved mobile navbar */
@media (max-width: 991.98px) {
  .navbar-nav {
    background: rgba(255, 255, 255, 0.98);
    backdrop-filter: blur(20px);
    border-radius: 1rem;
    padding: 1.5rem;
    margin-top: 1rem;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.15);
    border: 1px solid rgba(229, 231, 235, 0.6);
    flex-direction: column;
    gap: 0.5rem;
    width: 100%;
  }

  .nav-item {
    width: 100%;
  }

  .nav-link {
    width: 100%;
    justify-content: flex-start;
    padding: 1.25rem 1.5rem;
    border-radius: 0.75rem;
    font-size: 1.1rem;
    font-weight: 600;
  }

  .nav-link:hover {
    background: rgba(15, 76, 58, 0.1);
    transform: translateX(6px);
  }

  .nav-link.active {
    background: rgba(15, 76, 58, 0.15);
    transform: translateX(6px);
  }

  .navbar-collapse {
    margin-top: 1rem;
  }

  .navbar-toggler {
    padding: 0.75rem;
    border-radius: 0.75rem;
  }

  .navbar-toggler:hover {
    background: rgba(15, 76, 58, 0.1);
  }
}

/* Dark mode improvements */
[data-theme="dark"] .navbar-nav {
  background: rgba(15, 23, 42, 0.98);
  border-color: rgba(51, 65, 85, 0.6);
}

[data-theme="dark"] .nav-link:hover {
  background: rgba(15, 76, 58, 0.15);
}

[data-theme="dark"] .nav-link.active {
  background: rgba(15, 76, 58, 0.2);
}

/* Smooth scroll offset for fixed navbar */
html {
  scroll-padding-top: 100px;
}

/* Navbar shadow improvements */
.navbar-scrolled {
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.12), 0 2px 8px rgba(0, 0, 0, 0.08) !important;
}

[data-theme="dark"] .navbar-scrolled {
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3), 0 2px 8px rgba(0, 0, 0, 0.2) !important;
}