/* ULTIMO AGGIORNAMENTO: 2025-09-14T21:51 - TRASPARENZA HERO + Z-INDEX DROPDOWN */
:root {
  /* KnowLex Professional Blue Palette */
  --primary-gradient: linear-gradient(135deg, #1e40af 0%, #3b82f6 100%);
  --secondary-gradient: linear-gradient(135deg, #1d4ed8 0%, #2563eb 100%);
  --accent-gradient: linear-gradient(135deg, #0ea5e9 0%, #0284c7 100%);
  --dark-gradient: linear-gradient(135deg, #0c0c0c 0%, #1a1a1a 100%);
  
  --primary-color: #1e40af;
  --secondary-color: #3b82f6;
  --accent-color: #0ea5e9;
  --success-color: #10b981;
  --warning-color: #f59e0b;
  --text-light: #f8fafc;
  --text-dark: #0f172a;
  --text-muted: #64748b;
  
  /* Bootstrap compatibility - map our primary to Bootstrap's primary */
  --bs-primary: var(--primary-color);
  --bs-primary-rgb: 30, 64, 175;
  
  /* Premium Shadows with Blue Tints */
  --shadow-soft: 0 4px 6px -1px rgba(30, 64, 175, 0.1), 0 2px 4px -1px rgba(30, 64, 175, 0.06);
  --shadow-medium: 0 10px 15px -3px rgba(30, 64, 175, 0.1), 0 4px 6px -2px rgba(30, 64, 175, 0.05);
  --shadow-large: 0 20px 25px -5px rgba(30, 64, 175, 0.15), 0 10px 10px -5px rgba(30, 64, 175, 0.04);
  --shadow-xl: 0 25px 50px -12px rgba(30, 64, 175, 0.25);
  
  /* Glass Effect */
  --glass-bg: rgba(255, 255, 255, 0.1);
  --glass-border: rgba(255, 255, 255, 0.2);
  
  /* Light Theme Variables (Default) */
  --bg-primary: #ffffff;
  --bg-secondary: #f8fafc;
  --bg-tertiary: #f1f5f9;
  --text-primary: #0f172a;
  --text-secondary: #475569;
  --text-tertiary: #64748b;
  --border-primary: #e2e8f0;
  --border-secondary: #cbd5e1;
  --card-bg: #ffffff;
  --card-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.1), 0 1px 2px 0 rgba(0, 0, 0, 0.06);
  --navbar-bg: var(--primary-color);
  --footer-bg: #1f2937;
}

/* Dark Theme Variables */
[data-theme="dark"] {
  --bg-primary: #0f172a;
  --bg-secondary: #1e293b;
  --bg-tertiary: #334155;
  --text-primary: #f8fafc;        /* Very light for main text */
  --text-secondary: #e2e8f0;      /* Light gray for secondary text */
  --text-tertiary: #cbd5e1;       /* Medium light for muted text */
  --border-primary: #334155;
  --border-secondary: #475569;
  --card-bg: #1e293b;
  --card-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.3), 0 2px 4px -1px rgba(0, 0, 0, 0.2);
  --navbar-bg: #1e293b;
  --footer-bg: #0f172a;
  
  /* Dark theme specific gradients */
  --primary-gradient: linear-gradient(135deg, #1e40af 0%, #3b82f6 100%);
  --dark-hero-gradient: linear-gradient(135deg, #0f172a 0%, #1e293b 50%, #334155 100%);
  
  /* Dark theme glass effects */
  --glass-bg: rgba(255, 255, 255, 0.05);
  --glass-border: rgba(255, 255, 255, 0.1);
}

/* Theme Transition */
* {
  transition: background-color 0.3s ease, color 0.3s ease, border-color 0.3s ease, box-shadow 0.3s ease;
}

/* Premium Typography */
body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  line-height: 1.7;
  font-weight: 400;
  color: var(--text-primary);
  background-color: var(--bg-primary);
  overflow-x: hidden;
  transition: background-color 0.3s ease, color 0.3s ease;
}

/* FontAwesome Global Fix */
.fas, .far, .fab, .fal, .fad {
  font-family: 'Font Awesome 6 Free' !important;
  font-weight: 900 !important;
  display: inline-block !important;
  font-style: normal !important;
  font-variant: normal !important;
  text-rendering: auto !important;
  line-height: 1 !important;
}

.far {
  font-weight: 400 !important;
}

h1, h2, h3, h4, h5, h6 {
  font-family: 'Playfair Display', Georgia, serif;
  font-weight: 600;
  line-height: 1.2;
  letter-spacing: -0.02em;
}

/* KnowLex Brand Styling */
.brand-text {
  font-family: 'Playfair Display', serif;
  font-weight: 700;
  font-size: 1.5rem;
}

.brand-accent {
  background: var(--accent-gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  text-decoration: none !important;
  border-bottom: none !important;
}

/* Layout */
.main-content {
  padding-top: 80px;
  min-height: calc(100vh - 200px);
}

/* Navigation */
.navbar {
  background-color: var(--navbar-bg) !important;
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border-primary);
}

.navbar-brand {
  font-family: 'Playfair Display', serif;
  font-size: 1.5rem;
}

.navbar-nav .nav-link {
  color: var(--text-light) !important;
  transition: color 0.3s ease;
}

.navbar-nav .nav-link:hover {
  color: var(--accent-color) !important;
}

.dropdown-menu {
  background-color: var(--card-bg);
  border: 1px solid var(--border-primary);
  box-shadow: var(--card-shadow);
}

.dropdown-item {
  color: var(--text-primary);
}

.dropdown-item:hover {
  background-color: var(--bg-secondary);
  color: var(--text-primary);
}

/* Theme-Aware Article Detail Components */
.theme-aware-border {
  border-color: var(--border-primary) !important;
}

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

/* Stronger specificity for theme-aware text in cards */
.card .theme-aware-text {
  color: var(--text-primary) !important;
}

.card-body .theme-aware-text {
  color: var(--text-primary) !important;
}

p.theme-aware-text {
  color: var(--text-primary) !important;
}

/* Ensure dark mode text is properly visible */
[data-theme="dark"] .theme-aware-text {
  color: var(--text-primary) !important;
}

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

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

.theme-aware-link {
  color: var(--primary-color) !important;
}

.theme-aware-link:hover {
  color: var(--accent-color) !important;
}

/* Category footer styles removed - no longer needed */

.theme-aware-card {
  background-color: var(--card-bg) !important;
  border-color: var(--border-primary) !important;
  box-shadow: var(--card-shadow) !important;
}

.theme-aware-card-header {
  background-color: var(--bg-secondary) !important;
  border-bottom-color: var(--border-primary) !important;
}

.theme-aware-card-body {
  background-color: var(--card-bg) !important;
}

/* List-group styles removed - widget no longer used */

/* Modal theme-aware components */
.theme-aware-card .btn-close {
  filter: var(--bs-btn-close-white-filter, none);
}

[data-theme="dark"] .theme-aware-card .btn-close {
  filter: invert(1) grayscale(100%) brightness(200%);
}

/* All list-group CSS removed - widget eliminated */

/* Footer Theme-Aware Styles - Fixed Light Mode Contrast */
.footer-theme-aware {
  background: linear-gradient(135deg, #111827 0%, #1f2937 100%);
  color: var(--text-light);
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  position: relative;
  overflow: hidden;
}

.footer-theme-aware::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: 
    radial-gradient(circle at 20% 80%, rgba(59, 130, 246, 0.08) 0%, transparent 50%),
    radial-gradient(circle at 80% 20%, rgba(30, 64, 175, 0.08) 0%, transparent 50%);
  pointer-events: none;
}

.footer-theme-aware .container {
  position: relative;
  z-index: 2;
}

/* Footer Text Elements - Light Theme with High Contrast - ALL TEXT WHITE */
.footer-title {
  color: #ffffff !important;
  font-weight: 700;
  font-family: 'Playfair Display', serif;
  margin-bottom: 1rem;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.5);
}

.footer-heading {
  color: #ffffff !important;
  font-weight: 600;
  font-size: 1.1rem;
  margin-bottom: 1rem;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
}

.footer-text {
  color: #ffffff !important;  /* Changed from #e5e7eb to pure white */
  line-height: 1.6;
  font-size: 0.95rem;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
}

.footer-link {
  color: #ffffff !important;  /* Changed from #e5e7eb to pure white */
  text-decoration: none;
  transition: all 0.3s ease;
  display: inline-flex;
  align-items: center;
  padding: 0.25rem 0;
  font-size: 0.95rem;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
}

.footer-link:hover {
  color: #93c5fd !important;  /* Light blue on hover for better UX */
  text-decoration: none;
  transform: translateX(3px);
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.5);
}

.footer-link i {
  margin-right: 0.5rem;
  width: 16px;
  text-align: center;
  color: inherit;  /* Ensure icons inherit the white color */
}

.footer-divider {
  border: none;
  border-top: 1px solid rgba(255, 255, 255, 0.2);
  margin: 2rem 0 1.5rem 0;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.25), transparent);
  height: 1px;
}

.footer-copyright {
  color: #ffffff !important;  /* Changed from #d1d5db to pure white */
  font-size: 0.9rem;
  margin: 0;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
}

/* Comprehensive rule to ensure ALL footer text is white in light mode */
.footer-theme-aware,
.footer-theme-aware * {
  color: #ffffff !important;
}

/* Specific overrides for footer elements */
.footer-theme-aware h1,
.footer-theme-aware h2,
.footer-theme-aware h3,
.footer-theme-aware h4,
.footer-theme-aware h5,
.footer-theme-aware h6,
.footer-theme-aware p,
.footer-theme-aware span,
.footer-theme-aware a,
.footer-theme-aware li,
.footer-theme-aware div,
.footer-theme-aware i {
  color: #ffffff !important;
}

/* Footer links hover state - keep the blue hover effect */
.footer-theme-aware a:hover {
  color: #93c5fd !important;
}

/* Footer sempre con sfondo scuro - stesso stile per entrambi i temi */
[data-theme="dark"] .footer-theme-aware {
  background: linear-gradient(135deg, #0c0c0c 0%, #111827 100%);
  border-top-color: rgba(255, 255, 255, 0.05);
}

[data-theme="dark"] .footer-theme-aware::before {
  background: 
    radial-gradient(circle at 20% 80%, rgba(59, 130, 246, 0.1) 0%, transparent 50%),
    radial-gradient(circle at 80% 20%, rgba(30, 64, 175, 0.1) 0%, transparent 50%);
}

/* In modalità scura, usiamo colori leggermente più chiari */
[data-theme="dark"] .footer-title {
  color: #ffffff !important;
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.7);
}

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

[data-theme="dark"] .footer-text {
  color: #f3f4f6 !important;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.5);
}

[data-theme="dark"] .footer-link {
  color: #f3f4f6 !important;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.5);
}

[data-theme="dark"] .footer-link:hover {
  color: #bfdbfe !important;
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.7);
}

[data-theme="dark"] .footer-divider {
  border-top-color: rgba(255, 255, 255, 0.15);
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
}

[data-theme="dark"] .footer-copyright {
  color: #e5e7eb !important;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.5);
}

/* Footer Responsive Design */
@media (max-width: 991px) {
  .footer-theme-aware {
    padding: 3rem 0;
  }
  
  .footer-theme-aware .container {
    padding-left: 1.5rem;
    padding-right: 1.5rem;
  }
  
  .footer-theme-aware .row > div {
    margin-bottom: 2.5rem;
    text-align: center;
  }
  
  .footer-theme-aware .row > div:last-child {
    margin-bottom: 0;
  }
  
  .footer-title {
    font-size: 1.75rem;
    margin-bottom: 1.25rem;
  }
  
  .footer-heading {
    font-size: 1rem;
    margin-bottom: 1.25rem;
  }
  
  .footer-text {
    font-size: 0.9rem;
    max-width: 400px;
    margin: 0 auto;
    line-height: 1.7;
  }
  
  .footer-link {
    font-size: 0.9rem;
    justify-content: center;
    padding: 0.375rem 0;
  }
  
  .footer-divider {
    margin: 2.5rem 0 2rem 0;
  }
  
  .footer-copyright {
    text-align: center;
    margin-bottom: 0.75rem;
  }
}

@media (max-width: 576px) {
  .footer-theme-aware {
    padding: 2.5rem 0;
  }
  
  .footer-title {
    font-size: 1.5rem;
  }
  
  .footer-heading {
    font-size: 0.95rem;
  }
  
  .footer-text {
    font-size: 0.85rem;
  }
  
  .footer-link {
    font-size: 0.85rem;
  }
  
  .footer-copyright {
    font-size: 0.8rem;
  }
}

/* Footer List Styling */
.footer-theme-aware ul.list-unstyled {
  margin: 0;
  padding: 0;
}

.footer-theme-aware ul.list-unstyled li {
  margin: 0.375rem 0;
}

.footer-theme-aware ul.list-unstyled li:first-child {
  margin-top: 0;
}

.footer-theme-aware ul.list-unstyled li:last-child {
  margin-bottom: 0;
}

/* Footer Link Hover Animation */
.footer-link:hover i {
  transform: translateX(2px);
  transition: transform 0.3s ease;
}

/* Incredible Hero Section */
.hero-section-stunning {
  background: 
    var(--primary-gradient),
    radial-gradient(circle at 20% 80%, rgba(30, 64, 175, 0.4) 0%, transparent 50%),
    radial-gradient(circle at 80% 20%, rgba(59, 130, 246, 0.3) 0%, transparent 50%),
    radial-gradient(circle at 40% 40%, rgba(14, 165, 233, 0.2) 0%, transparent 50%);
  min-height: 100vh;
  display: flex;
  align-items: center;
  position: relative;
  overflow: hidden;
}

/* Legal Pattern Background Layer */
.hero-section-stunning::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  opacity: 0.06;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='180' height='180' viewBox='0 0 180 180'%3E%3Cg fill='none' stroke='%23ffffff' stroke-width='1.2'%3E%3C!-- Bilancia ---%3E%3Cg transform='translate(20,20)'%3E%3Cline x1='12' y1='8' x2='12' y2='28'/%3E%3Cline x1='5' y1='28' x2='19' y2='28'/%3E%3Ccircle cx='8' cy='12' r='5'/%3E%3Ccircle cx='16' cy='12' r='5'/%3E%3Cline x1='8' y1='17' x2='8' y2='12'/%3E%3Cline x1='16' y1='17' x2='16' y2='12'/%3E%3Cline x1='8' y1='12' x2='12' y2='8'/%3E%3Cline x1='16' y1='12' x2='12' y2='8'/%3E%3C/g%3E%3C!-- Libro ---%3E%3Cg transform='translate(130,20)'%3E%3Crect x='5' y='8' width='15' height='20'/%3E%3Cline x1='8' y1='13' x2='17' y2='13'/%3E%3Cline x1='8' y1='16' x2='17' y2='16'/%3E%3Cline x1='8' y1='19' x2='15' y2='19'/%3E%3Cline x1='12.5' y1='8' x2='12.5' y2='28'/%3E%3C/g%3E%3C!-- Simbolo § ---%3E%3Cg transform='translate(20,130)'%3E%3Ccircle cx='10' cy='10' r='4'/%3E%3Ccircle cx='14' cy='18' r='4'/%3E%3Cline x1='8.5' y1='15' x2='15.5' y2='13'/%3E%3C/g%3E%3C!-- Martelletto ---%3E%3Cg transform='translate(130,130)'%3E%3Crect x='8' y='10' width='10' height='5'/%3E%3Cline x1='13' y1='15' x2='13' y2='25'/%3E%3Cline x1='10' y1='25' x2='16' y2='25'/%3E%3C/g%3E%3C!-- Documento ---%3E%3Cg transform='translate(75,30)'%3E%3Crect x='6' y='6' width='12' height='16'/%3E%3Cline x1='8' y1='10' x2='16' y2='10'/%3E%3Cline x1='8' y1='13' x2='16' y2='13'/%3E%3Cline x1='8' y1='16' x2='14' y2='16'/%3E%3Cpolyline points='15,6 15,9 18,9'/%3E%3C/g%3E%3C!-- Esagono ---%3E%3Cg transform='translate(75,120)'%3E%3Cpolygon points='12,6 16,9 16,15 12,18 8,15 8,9'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
  background-repeat: repeat;
  animation: legalPatternShift 25s linear infinite;
  z-index: 1;
}

/* Geometric Shapes Layer */
.hero-section-stunning::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  opacity: 0.08;
  z-index: 2;
  background-image: 
    radial-gradient(circle at 15% 25%, rgba(255, 255, 255, 0.1) 0%, transparent 2%),
    radial-gradient(circle at 85% 75%, rgba(255, 255, 255, 0.08) 0%, transparent 2%),
    radial-gradient(circle at 70% 15%, rgba(255, 255, 255, 0.06) 0%, transparent 1.5%),
    radial-gradient(circle at 30% 85%, rgba(255, 255, 255, 0.1) 0%, transparent 2.5%),
    radial-gradient(circle at 50% 50%, rgba(255, 255, 255, 0.05) 0%, transparent 1.8%),
    linear-gradient(45deg, transparent 49%, rgba(255, 255, 255, 0.03) 50%, transparent 51%),
    linear-gradient(135deg, transparent 49%, rgba(255, 255, 255, 0.03) 50%, transparent 51%);
  background-size: 
    100px 100px,
    120px 120px,
    80px 80px,
    140px 140px,
    60px 60px,
    200px 200px,
    180px 180px;
  animation: geometricFloat 20s ease-in-out infinite;
}

/* Dark theme hero section */
[data-theme="dark"] .hero-section-stunning {
  background: 
    var(--dark-hero-gradient),
    var(--primary-gradient),
    radial-gradient(circle at 20% 80%, rgba(30, 64, 175, 0.6) 0%, transparent 50%),
    radial-gradient(circle at 80% 20%, rgba(59, 130, 246, 0.4) 0%, transparent 50%),
    radial-gradient(circle at 40% 40%, rgba(14, 165, 233, 0.3) 0%, transparent 50%);
}

/* Dark theme pattern adjustments */
[data-theme="dark"] .hero-section-stunning::before {
  opacity: 0.1;
}

[data-theme="dark"] .hero-section-stunning::after {
  opacity: 0.12;
}

/* Dark theme title accent */
[data-theme="dark"] .title-accent {
  background: linear-gradient(135deg, #60a5fa 0%, #3b82f6 50%, #2563eb 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.5);
  filter: drop-shadow(0 1px 2px rgba(0, 0, 0, 0.4));
  text-decoration: none !important;
  border-bottom: none !important;
}


/* Floating Background Elements */
.hero-bg-elements {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  overflow: hidden;
  pointer-events: none;
}

/* Revolutionary Legal Universe Background */
.legal-universe-bg {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  overflow: hidden;
  pointer-events: none;
}

/* Animated Legal Matrix */
.legal-matrix {
  position: absolute;
  width: 100%;
  height: 100%;
}

.matrix-line {
  position: absolute;
  background: linear-gradient(90deg, transparent, rgba(30, 64, 175, 0.3), transparent);
  height: 1px;
  animation: matrixFlow 8s linear infinite;
}

.line-1 { top: 20%; width: 60%; animation-delay: 0s; }
.line-2 { top: 40%; width: 80%; animation-delay: 1.6s; }
.line-3 { top: 60%; width: 70%; animation-delay: 3.2s; }
.line-4 { top: 80%; width: 90%; animation-delay: 4.8s; }
.line-5 { top: 30%; width: 50%; animation-delay: 6.4s; }

/* Flowing Legal Articles */
.article-flow {
  position: absolute;
  width: 100%;
  height: 100%;
}

.flowing-article {
  position: absolute;
  color: rgba(30, 64, 175, 0.4);
  font-family: 'Inter', sans-serif;
  font-weight: 600;
  font-size: 0.9rem;
  animation: articleFlow 12s linear infinite;
  opacity: 0;
}

.flowing-article:nth-child(1) { top: 15%; animation-delay: 0s; }
.flowing-article:nth-child(2) { top: 25%; animation-delay: 1.5s; }
.flowing-article:nth-child(3) { top: 35%; animation-delay: 3s; }
.flowing-article:nth-child(4) { top: 45%; animation-delay: 4.5s; }
.flowing-article:nth-child(5) { top: 55%; animation-delay: 6s; }
.flowing-article:nth-child(6) { top: 65%; animation-delay: 7.5s; }
.flowing-article:nth-child(7) { top: 75%; animation-delay: 9s; }
.flowing-article:nth-child(8) { top: 85%; animation-delay: 10.5s; }

/* Digital Legal Particles */
.legal-particles {
  position: absolute;
  width: 100%;
  height: 100%;
}

.particle {
  position: absolute;
  font-size: 1.5rem;
  color: rgba(30, 64, 175, 0.2);
  animation: particleFloat 6s ease-in-out infinite;
}

.p-1 { top: 10%; left: 80%; animation-delay: 0s; }
.p-2 { top: 30%; left: 90%; animation-delay: 1s; }
.p-3 { top: 50%; left: 85%; animation-delay: 2s; }
.p-4 { top: 70%; left: 95%; animation-delay: 3s; }
.p-5 { top: 20%; left: 75%; animation-delay: 4s; }
.p-6 { top: 60%; left: 88%; animation-delay: 5s; }

/* Geometric Legal Framework */
.legal-geometry {
  position: absolute;
  width: 100%;
  height: 100%;
}

.geo-shape {
  position: absolute;
  border: 2px solid rgba(30, 64, 175, 0.1);
  animation: geoRotate 20s linear infinite;
}

.hexagon-1 {
  width: 80px;
  height: 80px;
  top: 15%;
  left: 10%;
  clip-path: polygon(25% 0%, 75% 0%, 100% 50%, 75% 100%, 25% 100%, 0% 50%);
  background: rgba(30, 64, 175, 0.05);
}

.triangle-1 {
  width: 60px;
  height: 60px;
  top: 60%;
  left: 5%;
  clip-path: polygon(50% 0%, 0% 100%, 100% 100%);
  background: rgba(59, 130, 246, 0.05);
}

.circle-1 {
  width: 70px;
  height: 70px;
  top: 80%;
  right: 15%;
  border-radius: 50%;
  background: rgba(96, 165, 250, 0.05);
}

.square-1 {
  width: 50px;
  height: 50px;
  top: 30%;
  right: 5%;
  background: rgba(147, 197, 253, 0.05);
  transform: rotate(45deg);
}

/* Hero Content Styling */
.hero-content {
  position: relative;
  z-index: 10;
}

.hero-badge {
  display: inline-block;
  margin-bottom: 2rem;
}

.badge-content {
  display: inline-flex;
  align-items: center;
  padding: 0.75rem 1.5rem;
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
  border-radius: 50px;
  color: var(--text-light);
  font-weight: 600;
  font-size: 0.9rem;
  backdrop-filter: blur(10px);
  box-shadow: var(--shadow-soft);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.hero-title {
  font-size: clamp(3rem, 8vw, 6rem);
  font-weight: 800;
  line-height: 0.9;
  margin-bottom: 2rem;
}

.title-line-1 {
  display: block;
  color: var(--text-light);
  opacity: 0.9;
}

.title-line-2 {
  display: block;
  background: linear-gradient(135deg, #ffffff 0%, #e2e8f0 50%, #64748b 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.title-accent {
  background: linear-gradient(135deg, #ffffff 0%, #f1f5f9 50%, #e2e8f0 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  position: relative;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
  filter: drop-shadow(0 1px 2px rgba(0, 0, 0, 0.2));
  text-decoration: none !important;
  border-bottom: none !important;
}

.hero-subtitle {
  font-size: 1.25rem;
  line-height: 1.6;
  color: rgba(255, 255, 255, 0.9);
  max-width: 600px;
}

/* Hero Buttons */
.btn-primary-gradient {
  background: var(--accent-gradient);
  border: none;
  color: white;
  font-weight: 600;
  padding: 1rem 2rem;
  border-radius: 50px;
  box-shadow: var(--shadow-large);
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
}

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

.btn-primary-gradient:hover::before {
  left: 100%;
}

.btn-primary-gradient:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-xl);
}

.btn-outline-light-custom {
  background: var(--glass-bg);
  border: 2px solid var(--glass-border);
  color: white;
  font-weight: 600;
  padding: 1rem 2rem;
  border-radius: 50px;
  backdrop-filter: blur(10px);
  transition: all 0.3s ease;
}

.btn-outline-light-custom:hover {
  background: rgba(255, 255, 255, 0.1);
  border-color: rgba(255, 255, 255, 0.3);
  transform: translateY(-2px);
  color: white;
}

/* Improved Hero Button */
.btn-hero-primary {
  background: var(--accent-gradient);
  border: none;
  color: white;
  font-weight: 600;
  padding: 1.25rem 2.5rem;
  border-radius: 50px;
  box-shadow: var(--shadow-large);
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
  overflow: hidden;
  display: inline-flex;
  align-items: center;
  gap: 0.75rem;
  font-size: 1.1rem;
  text-decoration: none;
}

.btn-hero-primary::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(135deg, rgba(255,255,255,0.2) 0%, rgba(255,255,255,0.1) 100%);
  opacity: 0;
  transition: opacity 0.3s ease;
}

.btn-hero-primary:hover::before {
  opacity: 1;
}

.btn-hero-primary:hover {
  transform: translateY(-3px) scale(1.02);
  box-shadow: var(--shadow-xl);
  color: white;
}

.btn-hero-primary .btn-icon {
  transition: transform 0.3s ease;
  font-size: 1rem;
}

.btn-hero-primary:hover .btn-icon {
  transform: translateX(4px);
}

/* Hero Stats */
.hero-stats {
  margin-top: 4rem;
}

.stat-item {
  text-align: center;
}

.stat-number {
  font-size: 2rem;
  font-weight: 700;
  color: white;
  display: block;
  margin-bottom: 0.5rem;
}

.stat-label {
  font-size: 0.9rem;
  color: rgba(255, 255, 255, 0.7);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

/* Premium Cards Design */
.category-card {
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  border: none;
  background: linear-gradient(145deg, #ffffff 0%, #f8fafc 100%);
  box-shadow: 
    0 4px 6px -1px rgba(0, 0, 0, 0.1),
    0 2px 4px -1px rgba(0, 0, 0, 0.06),
    inset 0 1px 0 rgba(255, 255, 255, 0.1);
  position: relative;
  overflow: hidden;
}

.category-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.4), transparent);
  transition: left 0.6s;
}

.category-card:hover::before {
  left: 100%;
}

.category-card:hover {
  transform: translateY(-8px) scale(1.02);
  box-shadow: 
    0 20px 25px -5px rgba(0, 0, 0, 0.15),
    0 10px 10px -5px rgba(0, 0, 0, 0.04),
    0 0 0 1px rgba(59, 130, 246, 0.1);
}

.article-card {
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  border: none;
  background: linear-gradient(145deg, #ffffff 0%, #f8fafc 100%);
  box-shadow: 
    0 4px 6px -1px rgba(0, 0, 0, 0.1),
    0 2px 4px -1px rgba(0, 0, 0, 0.06);
  position: relative;
  overflow: hidden;
}

.article-card::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, #3b82f6, #1e40af, #1e3a8a);
  transform: scaleX(0);
  transition: transform 0.4s ease;
}

.article-card:hover {
  transform: translateY(-6px);
  box-shadow: 
    0 20px 25px -5px rgba(0, 0, 0, 0.15),
    0 10px 10px -5px rgba(0, 0, 0, 0.04);
}

.article-card:hover::after {
  transform: scaleX(1);
}

/* Article Content */
.article-content {
  font-size: 1.1rem;
  line-height: 1.8;
}

.article-content p {
  margin-bottom: 1.5rem;
}

/* Article Images */
.article-image img {
  max-height: 400px;
  object-fit: cover;
  width: 100%;
}

.card-img-top {
  height: 200px;
  object-fit: cover;
}

/* Hero Image */
.hero-image {
  height: 300px;
  background: linear-gradient(45deg, rgba(255,255,255,0.1), rgba(255,255,255,0.2));
  border-radius: 15px;
  backdrop-filter: blur(10px);
}

/* Hero Carousel - Enhanced Size */
.hero-carousel {
  height: 450px;
  border-radius: 20px;
  overflow: hidden;
  box-shadow: 0 25px 60px rgba(0, 0, 0, 0.3), 0 0 0 1px rgba(255, 255, 255, 0.1);
  position: relative;
  background: linear-gradient(135deg, #1e3a8a 0%, #3b82f6 100%);
}

.carousel-container {
  position: relative;
  height: 100%;
}

.carousel-slide {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
  transition: opacity 0.8s ease-in-out;
  cursor: pointer;
  z-index: 1;
}

.carousel-slide.active {
  opacity: 1;
  z-index: 2;
}

.carousel-image {
  width: 100%;
  height: 450px;
  object-fit: cover;
  border-radius: 20px;
  display: block;
  max-width: 100%;
  transition: transform 0.8s cubic-bezier(0.4, 0, 0.2, 1);
}

.carousel-overlay {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  background: 
    linear-gradient(transparent, rgba(0,0,0,0.8)),
    linear-gradient(135deg, rgba(59, 130, 246, 0.1) 0%, rgba(30, 58, 138, 0.1) 100%);
  padding: 3rem 2rem 1.5rem;
  border-radius: 0 0 20px 20px;
  backdrop-filter: blur(10px);
}

.carousel-overlay h6 {
  text-shadow: 2px 2px 4px rgba(0,0,0,0.8);
  font-weight: 600;
  letter-spacing: 0.5px;
}

.carousel-slide:hover .carousel-image {
  transform: scale(1.05);
  transition: transform 0.3s ease;
}

/* Carousel Navigation Arrows */
.carousel-controls {
  position: absolute;
  top: 50%;
  left: 0;
  right: 0;
  pointer-events: none;
  z-index: 10;
}

.carousel-arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: 
    linear-gradient(145deg, rgba(255,255,255,0.95) 0%, rgba(248,250,252,0.9) 100%);
  border: none;
  color: #1e40af;
  width: 60px;
  height: 60px;
  border-radius: 50%;
  font-size: 20px;
  cursor: pointer;
  pointer-events: all;
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  display: flex;
  align-items: center;
  justify-content: center;
  backdrop-filter: blur(15px);
  opacity: 0.7;
  visibility: visible;
  box-shadow: 
    0 10px 15px -3px rgba(0, 0, 0, 0.1),
    0 4px 6px -2px rgba(0, 0, 0, 0.05),
    0 0 0 1px rgba(59, 130, 246, 0.1);
}

.carousel-arrow.left {
  left: 15px;
}

.carousel-arrow.right {
  right: 15px;
}

.hero-carousel:hover .carousel-arrow {
  opacity: 1;
  visibility: visible;
}

.carousel-arrow:hover {
  background: 
    linear-gradient(145deg, #ffffff 0%, #f1f5f9 100%);
  color: #1e3a8a;
  transform: translateY(-50%) scale(1.15);
  box-shadow: 
    0 20px 25px -5px rgba(0, 0, 0, 0.15),
    0 10px 10px -5px rgba(0, 0, 0, 0.04),
    0 0 0 1px rgba(59, 130, 246, 0.2);
}

/* Premium Progress Bar */
.carousel-progress {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 6px;
  background: rgba(255,255,255,0.2);
  z-index: 10;
  overflow: hidden;
}

.carousel-progress::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.1), transparent);
  animation: shimmer 2s infinite;
}

.carousel-progress-bar {
  height: 100%;
  background: 
    linear-gradient(90deg, 
      #1e40af 0%, 
      #3b82f6 25%, 
      #60a5fa 50%, 
      #93c5fd 75%, 
      #ffffff 100%);
  width: 0%;
  transition: none;
  position: relative;
  box-shadow: 
    0 0 10px rgba(30, 64, 175, 0.6),
    0 0 20px rgba(30, 64, 175, 0.4);
}

.carousel-progress-bar.animating {
  transition: width 5s linear;
  width: 100%;
}

@keyframes shimmer {
  0% { transform: translateX(-100%); }
  100% { transform: translateX(100%); }
}

/* Premium Carousel Indicators */
.indicator-dots .dot {
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: 
    linear-gradient(145deg, rgba(255,255,255,0.3) 0%, rgba(255,255,255,0.1) 100%);
  margin: 0 8px;
  cursor: pointer;
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
  border: 2px solid rgba(255,255,255,0.2);
  backdrop-filter: blur(10px);
  box-shadow: 
    0 2px 4px rgba(0,0,0,0.1),
    inset 0 1px 0 rgba(255,255,255,0.2);
}

.indicator-dots .dot::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 6px;
  height: 6px;
  background: rgba(255,255,255,0.6);
  border-radius: 50%;
  transform: translate(-50%, -50%) scale(0);
  transition: transform 0.3s ease;
}

.indicator-dots .dot:hover {
  background: 
    linear-gradient(145deg, rgba(255,255,255,0.5) 0%, rgba(255,255,255,0.3) 100%);
  transform: scale(1.15);
  border-color: rgba(255,255,255,0.4);
  box-shadow: 
    0 4px 8px rgba(0,0,0,0.15),
    inset 0 1px 0 rgba(255,255,255,0.3);
}

.indicator-dots .dot:hover::before {
  transform: translate(-50%, -50%) scale(1);
}

.indicator-dots .dot.active {
  background: 
    linear-gradient(145deg, #ffffff 0%, #f1f5f9 100%);
  transform: scale(1.3);
  border-color: rgba(59, 130, 246, 0.3);
  box-shadow: 
    0 6px 12px rgba(0,0,0,0.2),
    0 0 0 3px rgba(59, 130, 246, 0.2),
    inset 0 1px 0 rgba(255,255,255,0.4);
}

.indicator-dots .dot.active::before {
  background: #3b82f6;
  transform: translate(-50%, -50%) scale(1);
}

/* Placeholder Images */
.placeholder-image {
  background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
  border: 2px dashed #dee2e6;
}

/* Article List Thumbnails */
.article-list-thumb {
  object-fit: cover;
  min-height: 150px;
}

.placeholder-image-list {
  background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
  border: 2px dashed #dee2e6;
  min-height: 150px;
}

/* Image Gallery */
.image-gallery {
  border-top: 1px solid #e9ecef;
  padding-top: 2rem;
}

.gallery-thumb {
  height: 200px;
  object-fit: cover;
  cursor: pointer;
  transition: all 0.3s ease;
}

.gallery-thumb:hover {
  transform: scale(1.05);
  box-shadow: 0 8px 25px rgba(0,0,0,0.15) !important;
}

.gallery-item {
  text-align: center;
}

/* Breadcrumbs */
.breadcrumb {
  background: none;
  padding: 0;
  margin-bottom: 1rem;
}

.breadcrumb-item + .breadcrumb-item::before {
  content: '›';
  font-weight: bold;
}

/* Badges */
.badge {
  font-weight: 500;
  padding: 0.5em 1em;
}

/* Social Share */
.social-share a {
  font-size: 1.2rem;
  transition: all 0.2s ease;
}

.social-share a:hover {
  transform: scale(1.2);
}

/* Pagination */
.pagination {
  justify-content: center;
}

.page-link {
  color: var(--bs-primary);
  border-color: var(--bs-primary);
}

.page-link:hover {
  background-color: var(--bs-primary);
  border-color: var(--bs-primary);
  color: white;
}

.page-item.active .page-link {
  background-color: var(--bs-primary);
  border-color: var(--bs-primary);
}

/* Sidebar */
.sidebar .card {
  border: none;
  box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.sidebar .card-header {
  background: linear-gradient(135deg, var(--bs-primary), #1e3a5f);
  color: white;
  border: none;
}

/* List Groups */
.list-group-item-action:hover {
  background-color: rgba(var(--bs-primary-rgb), 0.1);
  color: var(--bs-primary);
}

/* Responsive Design */

/* Mobile First - Small screens */
@media (max-width: 576px) {
  /* Enhanced Hero Section Mobile */
  .hero-section-stunning {
    min-height: 100vh;
    padding: 1rem 0;
    text-align: center;
  }
  
  .hero-content {
    order: 1;
    margin-bottom: 2rem;
  }
  
  .hero-title {
    font-size: clamp(2rem, 8vw, 3rem);
    line-height: 1.1;
    margin-bottom: 1.5rem;
    text-align: center;
  }
  
  .hero-subtitle {
    font-size: 1rem;
    line-height: 1.5;
    margin-bottom: 2rem;
    padding: 0 1rem;
    text-align: center;
  }
  
  .hero-badge {
    margin-bottom: 1.5rem;
    display: flex;
    justify-content: center;
  }
  
  .badge-content {
    padding: 0.5rem 1rem;
    font-size: 0.8rem;
  }
  
  .hero-actions {
    justify-content: center !important;
    margin-bottom: 2rem;
  }
  
  /* Enhanced Hero Carousel Mobile */
  .hero-carousel {
    height: 280px;
    margin-top: 0;
    position: relative;
    border-radius: 1rem;
    overflow: hidden;
    order: 2;
  }
  
  .carousel-image {
    height: 280px;
    object-fit: cover;
  }
  
  .carousel-overlay {
    padding: 1.5rem 1rem 1rem;
    background: linear-gradient(transparent, rgba(0,0,0,0.8));
  }
  
  .carousel-overlay h6 {
    font-size: 0.9rem;
    margin-bottom: 0;
  }
  
  /* Mobile Swipe Indicator */
  .hero-carousel::before {
    content: 'Scorri per altre immagini';
    position: absolute;
    top: 1rem;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(0, 0, 0, 0.6);
    color: white;
    padding: 0.5rem 1rem;
    border-radius: 1rem;
    font-size: 0.8rem;
    z-index: 10;
    opacity: 0;
    animation: swipeHint 3s ease-in-out 1s;
  }
  
  @keyframes swipeHint {
    0%, 90%, 100% { opacity: 0; }
    20%, 70% { opacity: 1; }
  }
  
  /* Enhanced Mobile Navigation */
  .navbar-brand {
    font-size: 1.25rem;
    flex: 1;
  }
  
  .navbar-toggler {
    border: none;
    padding: 0.25rem 0.5rem;
    font-size: 1rem;
  }
  
  .navbar-toggler:focus {
    box-shadow: 0 0 0 0.25rem rgba(255, 255, 255, 0.25);
  }
  
  .theme-toggle {
    padding: 0.4rem 0.8rem;
    font-size: 0.8rem;
    min-width: 44px;
    min-height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
  }
  
  /* Mobile Menu Improvements */
  .navbar-collapse {
    margin-top: 1rem;
    background: var(--navbar-bg);
    border-radius: 0.5rem;
    padding: 1rem;
    margin-left: -1rem;
    margin-right: -1rem;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
  }
  
  .navbar-nav .nav-link {
    padding: 0.75rem 1rem;
    margin: 0.25rem 0;
    border-radius: 0.5rem;
    transition: all 0.3s ease;
  }
  
  .navbar-nav .nav-link:hover,
  .navbar-nav .nav-link:focus {
    background-color: rgba(255, 255, 255, 0.1);
    color: var(--text-light) !important;
  }
  
  .navbar-nav .nav-link.active-indicator {
    background-color: rgba(255, 255, 255, 0.15);
    font-weight: 600;
  }
  
  /* Mobile Dropdown Improvements */
  .dropdown-menu {
    background-color: var(--card-bg);
    border: 1px solid var(--border-primary);
    border-radius: 0.5rem;
    padding: 0.5rem;
    margin-top: 0.5rem;
    box-shadow: var(--card-shadow);
  }
  
  .dropdown-item {
    padding: 0.75rem 1rem;
    margin: 0.25rem 0;
    border-radius: 0.375rem;
    color: var(--text-primary);
    display: flex;
    align-items: center;
  }
  
  .dropdown-item:hover,
  .dropdown-item:focus {
    background-color: var(--bg-secondary);
    color: var(--text-primary);
  }
  
  .dropdown-divider {
    margin: 0.75rem 0;
    opacity: 0.3;
  }
  
  /* Main Content Mobile */
  .main-content {
    padding-top: 70px;
  }
  
  /* Enhanced Cards Mobile */
  .category-card,
  .article-card {
    margin-bottom: 1.5rem;
    border-radius: 1rem;
    overflow: hidden;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
  }
  
  .card-body {
    padding: 1.5rem;
  }
  
  .card-title {
    font-size: 1.1rem;
    line-height: 1.3;
    margin-bottom: 0.75rem;
  }
  
  .card-text {
    font-size: 0.9rem;
    line-height: 1.5;
    margin-bottom: 1rem;
  }
  
  /* Category Cards Mobile Specific */
  .category-card .card-body {
    text-align: center;
    padding: 2rem 1rem;
  }
  
  .category-card i {
    font-size: 2.5rem;
    margin-bottom: 1rem;
    display: block;
  }
  
  .category-card .btn {
    width: 100%;
    padding: 0.75rem;
  }
  
  /* Typography Mobile */
  h1 {
    font-size: 1.75rem;
  }
  
  h2 {
    font-size: 1.5rem;
  }
  
  h3 {
    font-size: 1.25rem;
  }
  
  .lead {
    font-size: 1rem;
  }
  
  /* Buttons Mobile */
  .btn-lg {
    padding: 0.75rem 1.5rem;
    font-size: 1rem;
  }
  
  .btn-hero-primary {
    padding: 1rem 2rem;
    font-size: 1rem;
  }
  
  /* Gallery Mobile */
  .gallery-thumb {
    height: 150px;
  }
  
  /* Social Share Mobile */
  .social-share a {
    font-size: 1.1rem;
    margin: 0 0.5rem;
  }
  
  /* Mobile Sections Spacing */
  section {
    padding: 3rem 0;
  }
  
  .bg-light {
    padding: 2rem 0;
  }
  
  .container {
    padding-left: 1.5rem;
    padding-right: 1.5rem;
  }
  
  /* Mobile Headings */
  .section-title {
    margin-bottom: 2rem;
    text-align: center;
  }
  
  .section-subtitle {
    margin-bottom: 3rem;
    text-align: center;
    padding: 0 1rem;
  }
  
  /* Mobile Footer */
  footer .container {
    padding: 3rem 1.5rem 2rem;
  }
  
  footer .row > div {
    margin-bottom: 2.5rem;
    text-align: center;
  }
  
  footer h5,
  footer h6 {
    margin-bottom: 1.5rem;
  }
  
  /* Carousel Mobile Enhancements */
  .carousel-arrow {
    width: 45px;
    height: 45px;
    font-size: 16px;
  }
  
  .carousel-arrow.left {
    left: 10px;
  }
  
  .carousel-arrow.right {
    right: 10px;
  }
  
  .indicator-dots .dot {
    width: 12px;
    height: 12px;
    margin: 0 6px;
  }
  
  /* Article List Mobile */
  .article-list-thumb {
    min-height: 120px;
  }
  
  .placeholder-image-list {
    min-height: 120px;
  }
  
  /* Article Detail Mobile */
  .article-content {
    font-size: 1rem;
    line-height: 1.7;
  }
  
  .breadcrumb {
    font-size: 0.9rem;
  }
  
  /* Modal Mobile */
  .modal-dialog {
    margin: 1rem;
  }
  
  /* Theme Toggle Mobile Specific */
  .theme-toggle i {
    font-size: 0.9rem;
  }
  
  /* Touch-friendly interactions */
  .btn,
  .card,
  .carousel-slide {
    touch-action: manipulation;
  }
  
  /* Better tap targets for mobile */
  .nav-link,
  .dropdown-item,
  .btn {
    min-height: 44px;
    display: flex;
    align-items: center;
  }
  
  /* Mobile-optimized interactions */
  .category-card:hover,
  .article-card:hover {
    transform: none;
  }
  
  .category-card:active,
  .article-card:active {
    transform: scale(0.98);
    transition: transform 0.1s ease;
  }
  
  /* Performance optimizations */
  .hero-section-stunning {
    will-change: auto;
  }
  
  .carousel-slide {
    will-change: opacity;
  }
  
  .floating-element {
    will-change: transform;
  }
  
  /* Reduce motion for accessibility */
  @media (prefers-reduced-motion: reduce) {
    .hero-carousel::before {
      animation: none;
    }
    
    .floating-element {
      animation: none;
    }
    
    .carousel-slide {
      transition: none;
    }
    
    * {
      transition-duration: 0.1s !important;
      animation-duration: 0.1s !important;
    }
  }
  
  /* Mobile dropdown improvements */
  .dropdown-menu {
    font-size: 0.9rem;
  }
  
  .dropdown-item {
    padding: 0.75rem 1rem;
  }
}

/* Tablet and small desktop */
@media (min-width: 577px) and (max-width: 768px) {
  .hero-title {
    font-size: clamp(2.5rem, 6vw, 4rem);
  }
  
  .hero-carousel {
    height: 350px;
  }
  
  .carousel-image {
    height: 350px;
  }
  
  .main-content {
    padding-top: 75px;
  }
}

/* Medium screens */
@media (min-width: 769px) and (max-width: 991px) {
  .hero-carousel {
    height: 400px;
  }
  
  .carousel-image {
    height: 400px;
  }
}

/* Footer */
footer {
  margin-top: auto;
}

/* Utilities */
.text-muted {
  color: #6c757d !important;
}

/* Button Styles */
.btn-primary {
  background-color: var(--bs-primary);
  border-color: var(--bs-primary);
}

.btn-primary:hover {
  background-color: #1e3a5f;
  border-color: #1e3a5f;
}

.btn-outline-primary {
  color: var(--bs-primary);
  border-color: var(--bs-primary);
}

.btn-outline-primary:hover {
  background-color: var(--bs-primary);
  border-color: var(--bs-primary);
  color: white;
}

/* Fix Diritto Commerciale icon to match button color */
.category-card .text-primary {
  color: var(--bs-primary) !important;
}

/* Alternative: Specific targeting for Diritto Commerciale icon */
.category-card .fa-building.text-primary {
  color: var(--bs-primary) !important;
}

/* Premium Entrance Animations */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(40px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes slideInLeft {
  from {
    opacity: 0;
    transform: translateX(-50px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

@keyframes slideInRight {
  from {
    opacity: 0;
    transform: translateX(50px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

@keyframes scaleIn {
  from {
    opacity: 0;
    transform: scale(0.9);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}

/* Apply animations with staggered timing */
.hero-section .display-4 {
  animation: slideInLeft 0.8s ease 0.2s backwards;
}

.hero-section .lead {
  animation: slideInLeft 0.8s ease 0.4s backwards;
}

.hero-section .btn {
  animation: fadeInUp 0.6s ease 0.6s backwards;
}

.hero-carousel {
  animation: slideInRight 0.8s ease 0.3s backwards;
}

.category-card {
  animation: fadeInUp 0.6s ease forwards;
}

.category-card:nth-child(1) { animation-delay: 0.1s; }
.category-card:nth-child(2) { animation-delay: 0.2s; }
.category-card:nth-child(3) { animation-delay: 0.3s; }

.article-card {
  animation: scaleIn 0.6s ease forwards;
}

.article-card:nth-child(1) { animation-delay: 0.1s; }
.article-card:nth-child(2) { animation-delay: 0.2s; }
.article-card:nth-child(3) { animation-delay: 0.3s; }
.article-card:nth-child(4) { animation-delay: 0.4s; }
.article-card:nth-child(5) { animation-delay: 0.5s; }
.article-card:nth-child(6) { animation-delay: 0.6s; }

/* Keyframe Animations */
@keyframes heroShimmer {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.8; }
}

/* Clean Hero Section */
.clean-hero-section {
  background: var(--hero-bg, linear-gradient(135deg, #1e40af 0%, #3b82f6 50%, #60a5fa 100%));
  min-height: 100vh;
  position: relative;
}

/* Theme-aware hero background */
[data-theme="dark"] .clean-hero-section {
  --hero-bg: linear-gradient(135deg, #0f172a 0%, #1e293b 50%, #334155 100%);
}

/* Enhanced Beautiful Navbar */
.enhanced-navbar {
  background: var(--navbar-bg, linear-gradient(135deg, #1e40af 0%, #3b82f6 50%, #60a5fa 100%));
  backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--navbar-border, rgba(255, 255, 255, 0.1));
  box-shadow: 0 4px 20px var(--navbar-shadow, rgba(30, 64, 175, 0.1));
  z-index: 9999 !important; /* ALTISSIMO per navbar e dropdown */
  transition: all 0.3s ease;
}

[data-theme="dark"] .enhanced-navbar {
  --navbar-bg: linear-gradient(135deg, #0f172a 0%, #1e293b 50%, #334155 100%);
  --navbar-border: rgba(148, 163, 184, 0.2);
  --navbar-shadow: rgba(0, 0, 0, 0.3);
}

.navbar-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 1rem;
}

.navbar-content {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1.5rem 0;
  min-height: 80px;
}

/* Enhanced Brand Section */
.navbar-brand-section {
  display: flex;
  align-items: center;
}

.enhanced-brand {
  display: flex;
  align-items: center;
  gap: 1rem;
  text-decoration: none;
  transition: all 0.3s ease;
}

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

.brand-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 50px;
  height: 50px;
  background: var(--brand-icon-bg, rgba(255, 255, 255, 0.15));
  border-radius: 12px;
  color: var(--brand-icon-color, #ffffff);
  font-size: 1.5rem;
  backdrop-filter: blur(10px);
  border: 1px solid var(--brand-icon-border, rgba(255, 255, 255, 0.2));
  box-shadow: 0 4px 15px var(--brand-icon-shadow, rgba(0, 0, 0, 0.1));
  transition: all 0.3s ease;
}

[data-theme="dark"] .brand-icon {
  --brand-icon-bg: rgba(59, 130, 246, 0.2);
  --brand-icon-color: #60a5fa;
  --brand-icon-border: rgba(59, 130, 246, 0.3);
  --brand-icon-shadow: rgba(59, 130, 246, 0.2);
}

.enhanced-brand:hover .brand-icon {
  background: var(--brand-icon-hover, rgba(255, 255, 255, 0.25));
  box-shadow: 0 8px 25px var(--brand-icon-hover-shadow, rgba(0, 0, 0, 0.15));
}

[data-theme="dark"] .enhanced-brand:hover .brand-icon {
  --brand-icon-hover: rgba(59, 130, 246, 0.3);
  --brand-icon-hover-shadow: rgba(59, 130, 246, 0.3);
}

.brand-text-container {
  display: flex;
  flex-direction: column;
}

.brand-main {
  color: var(--brand-main-color, #ffffff);
  font-family: 'Montserrat', sans-serif;
  font-size: 1.8rem;
  font-weight: 800;
  line-height: 1;
}

.brand-accent {
  background: linear-gradient(135deg, #60a5fa, #93c5fd);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  font-family: 'Montserrat', sans-serif;
  font-size: 1.8rem;
  font-weight: 800;
}

[data-theme="dark"] .brand-main {
  --brand-main-color: #f1f5f9;
}

.brand-tagline {
  color: var(--brand-tagline-color, rgba(255, 255, 255, 0.7));
  font-size: 0.75rem;
  font-weight: 500;
  letter-spacing: 1px;
  text-transform: uppercase;
  margin-top: 0.2rem;
}

[data-theme="dark"] .brand-tagline {
  --brand-tagline-color: rgba(148, 163, 184, 0.8);
}

/* Desktop Navigation Links */
.navbar-links-desktop {
  display: none;
  align-items: center;
  gap: 0.5rem;
}

@media (min-width: 992px) {
  .navbar-links-desktop {
    display: flex;
  }
}

.nav-link-enhanced {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.75rem 1.25rem;
  color: var(--nav-link-color, rgba(255, 255, 255, 0.9));
  text-decoration: none;
  border-radius: 10px;
  font-weight: 600;
  font-size: 0.95rem;
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
}

[data-theme="dark"] .nav-link-enhanced {
  --nav-link-color: rgba(241, 245, 249, 0.9);
}

.nav-link-enhanced:hover,
.nav-link-enhanced.active {
  background: var(--nav-link-hover-bg, rgba(255, 255, 255, 0.15));
  color: var(--nav-link-hover-color, #ffffff);
  transform: translateY(-2px);
  box-shadow: 0 4px 15px var(--nav-link-hover-shadow, rgba(0, 0, 0, 0.1));
}

[data-theme="dark"] .nav-link-enhanced:hover,
[data-theme="dark"] .nav-link-enhanced.active {
  --nav-link-hover-bg: rgba(59, 130, 246, 0.2);
  --nav-link-hover-color: #60a5fa;
  --nav-link-hover-shadow: rgba(59, 130, 246, 0.2);
}

.nav-link-enhanced i {
  font-size: 1rem;
  opacity: 0.8;
}

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

/* Dropdown Styles */
.nav-dropdown {
  position: relative;
}

.dropdown-trigger {
  cursor: pointer;
}

.dropdown-arrow {
  font-size: 0.7rem !important;
  transition: transform 0.3s ease;
  margin-left: 0.3rem;
}

.nav-dropdown:hover .dropdown-arrow {
  transform: rotate(180deg);
}

.dropdown-menu-enhanced {
  position: absolute;
  top: 100%;
  left: 0;
  min-width: 250px;
  background: var(--dropdown-bg, rgba(255, 255, 255, 0.98)); /* PIÙ OPACO per leggibilità */
  backdrop-filter: blur(20px);
  border-radius: 12px;
  box-shadow: 0 10px 30px var(--dropdown-shadow, rgba(0, 0, 0, 0.1));
  border: 1px solid var(--dropdown-border, rgba(255, 255, 255, 0.2));
  opacity: 0;
  visibility: hidden;
  transform: translateY(-10px);
  transition: all 0.3s ease;
  z-index: 10000 !important; /* ALTISSIMO per andare sopra hero box */
  margin-top: 0.5rem;
}

[data-theme="dark"] .dropdown-menu-enhanced {
  --dropdown-bg: rgba(30, 41, 59, 0.98); /* PIÙ OPACO per leggibilità */
  --dropdown-shadow: rgba(0, 0, 0, 0.4); /* OMBRA PIÙ FORTE */
  --dropdown-border: rgba(148, 163, 184, 0.3); /* BORDO PIÙ VISIBILE */
}

.nav-dropdown:hover .dropdown-menu-enhanced {
  opacity: 1 !important;
  visibility: visible !important;
  transform: translateY(0) !important;
  display: block !important;
}

.dropdown-item-enhanced {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.875rem 1.25rem;
  color: var(--dropdown-item-color, #374151);
  text-decoration: none;
  border-radius: 8px;
  margin: 0.25rem;
  transition: all 0.3s ease;
  font-weight: 500;
}

[data-theme="dark"] .dropdown-item-enhanced {
  --dropdown-item-color: #e2e8f0;
}

.dropdown-item-enhanced:hover {
  background: var(--dropdown-item-hover, #f3f4f6);
  color: var(--dropdown-item-hover-color, #1f2937);
  transform: translateX(5px);
}

[data-theme="dark"] .dropdown-item-enhanced:hover {
  --dropdown-item-hover: rgba(59, 130, 246, 0.1);
  --dropdown-item-hover-color: #60a5fa;
}

.dropdown-item-enhanced i {
  width: 20px;
  text-align: center;
  opacity: 0.7;
}

.dropdown-item-enhanced:hover i {
  opacity: 1;
}

/* Navbar Actions */
.navbar-actions {
  display: flex;
  align-items: center;
  gap: 1rem;
}

/* Enhanced Theme Toggle */
.theme-toggle-enhanced {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.75rem 1rem;
  background: var(--theme-toggle-bg, rgba(255, 255, 255, 0.1));
  border: 1px solid var(--theme-toggle-border, rgba(255, 255, 255, 0.2));
  border-radius: 10px;
  color: var(--theme-toggle-color, rgba(255, 255, 255, 0.9));
  cursor: pointer;
  font-weight: 600;
  font-size: 0.9rem;
  transition: all 0.3s ease;
  backdrop-filter: blur(10px);
}

[data-theme="dark"] .theme-toggle-enhanced {
  --theme-toggle-bg: rgba(59, 130, 246, 0.1);
  --theme-toggle-border: rgba(59, 130, 246, 0.3);
  --theme-toggle-color: rgba(241, 245, 249, 0.9);
}

.theme-toggle-enhanced:hover {
  background: var(--theme-toggle-hover, rgba(255, 255, 255, 0.2));
  transform: translateY(-2px);
  box-shadow: 0 4px 15px var(--theme-toggle-shadow, rgba(0, 0, 0, 0.1));
}

[data-theme="dark"] .theme-toggle-enhanced:hover {
  --theme-toggle-hover: rgba(59, 130, 246, 0.2);
  --theme-toggle-shadow: rgba(59, 130, 246, 0.2);
}

.toggle-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
}

/* Mobile Menu Button */
.mobile-menu-btn {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  width: 40px;
  height: 40px;
  background: var(--mobile-btn-bg, rgba(255, 255, 255, 0.1));
  border: 1px solid var(--mobile-btn-border, rgba(255, 255, 255, 0.2));
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.3s ease;
  backdrop-filter: blur(10px);
}

[data-theme="dark"] .mobile-menu-btn {
  --mobile-btn-bg: rgba(59, 130, 246, 0.1);
  --mobile-btn-border: rgba(59, 130, 246, 0.3);
}

.mobile-menu-btn:hover {
  background: var(--mobile-btn-hover, rgba(255, 255, 255, 0.2));
  transform: translateY(-2px);
}

[data-theme="dark"] .mobile-menu-btn:hover {
  --mobile-btn-hover: rgba(59, 130, 246, 0.2);
}

.hamburger-line {
  width: 20px;
  height: 2px;
  background: var(--hamburger-color, #ffffff);
  margin: 2px 0;
  transition: all 0.3s ease;
  border-radius: 1px;
}

[data-theme="dark"] .hamburger-line {
  --hamburger-color: #f1f5f9;
}

/* Mobile Menu Overlay */
.mobile-menu-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: var(--mobile-overlay-bg, rgba(0, 0, 0, 0.8));
  backdrop-filter: blur(10px);
  z-index: 9999;
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s ease;
}

[data-theme="dark"] .mobile-menu-overlay {
  --mobile-overlay-bg: rgba(0, 0, 0, 0.9);
}

.mobile-menu-overlay.active {
  opacity: 1;
  visibility: visible;
}

.mobile-menu-content {
  position: absolute;
  top: 0;
  right: -100%;
  width: 320px;
  height: 100%;
  background: var(--mobile-menu-bg, #ffffff);
  box-shadow: -10px 0 30px var(--mobile-menu-shadow, rgba(0, 0, 0, 0.2));
  transition: right 0.3s ease;
  overflow-y: auto;
}

[data-theme="dark"] .mobile-menu-content {
  --mobile-menu-bg: #1e293b;
  --mobile-menu-shadow: rgba(0, 0, 0, 0.5);
}

.mobile-menu-overlay.active .mobile-menu-content {
  right: 0;
}

/* ========================================
   FIX MOBILE MENU - FORZIAMO IL FUNZIONAMENTO
   ======================================== */

/* ========================================
   MOBILE MENU SISTEMATO - LAYOUT PERFETTO
   ======================================== */

@media (max-width: 991px) {
  /* Pulsante hamburger perfetto */
  .mobile-menu-btn {
    display: flex !important;
    flex-direction: column !important;
    justify-content: center !important;
    align-items: center !important;
    width: 44px !important;
    height: 44px !important;
    background: rgba(255, 255, 255, 0.1) !important;
    border: 1px solid rgba(255, 255, 255, 0.2) !important;
    border-radius: 8px !important;
    backdrop-filter: blur(15px) !important;
    cursor: pointer !important;
    transition: all 0.3s ease !important;
    z-index: 10001 !important;
    position: relative !important;
  }
  
  .mobile-menu-btn:hover {
    background: rgba(255, 255, 255, 0.2) !important;
    border-color: rgba(255, 255, 255, 0.4) !important;
    transform: translateY(-1px) !important;
  }
  
  /* Linee hamburger perfette */
  .hamburger-line {
    display: block !important;
    width: 22px !important;
    height: 2px !important;
    background: #ffffff !important;
    margin: 2px 0 !important;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1) !important;
    border-radius: 2px !important;
    transform-origin: center !important;
  }
  
  /* Animazione X hamburger */
  .mobile-menu-btn.active .hamburger-line:nth-child(1) {
    transform: rotate(45deg) translate(5px, 5px) !important;
    background: #ff6b6b !important;
  }
  
  .mobile-menu-btn.active .hamburger-line:nth-child(2) {
    opacity: 0 !important;
    transform: scale(0) !important;
  }
  
  .mobile-menu-btn.active .hamburger-line:nth-child(3) {
    transform: rotate(-45deg) translate(7px, -6px) !important;
    background: #ff6b6b !important;
  }
  
  /* Overlay fullscreen perfetto - INDIPENDENTE DA NAVBAR */
  .mobile-menu-overlay {
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    right: 0 !important;
    bottom: 0 !important;
    width: 100vw !important;
    height: 100vh !important;
    z-index: 15000 !important; /* SOPRA NAVBAR */
    background: rgba(0, 0, 0, 0.85) !important;
    backdrop-filter: blur(10px) !important;
    opacity: 0 !important;
    visibility: hidden !important;
    pointer-events: none !important;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1) !important;
    margin: 0 !important;
    padding: 0 !important;
    transform: none !important;
    /* FORCE FULLSCREEN */
    min-width: 100vw !important;
    min-height: 100vh !important;
    max-width: none !important;
    max-height: none !important;
  }
  
  .mobile-menu-overlay.active {
    opacity: 1 !important;
    visibility: visible !important;
    pointer-events: all !important;
  }
  
  /* Menu content slide perfetto */
  .mobile-menu-content {
    position: fixed !important;
    top: 0 !important;
    right: -100% !important;
    width: 320px !important;
    max-width: 85vw !important;
    height: 100% !important;
    background: #ffffff !important;
    box-shadow: -10px 0 30px rgba(0, 0, 0, 0.3) !important;
    transition: right 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94) !important;
    overflow-y: auto !important;
    -webkit-overflow-scrolling: touch !important;
    display: flex !important;
    flex-direction: column !important;
  }
  
  .mobile-menu-overlay.active .mobile-menu-content {
    right: 0 !important;
  }
  
  /* Header del menu mobile */
  .mobile-menu-header {
    display: flex !important;
    justify-content: space-between !important;
    align-items: center !important;
    padding: 1.5rem !important;
    border-bottom: 1px solid #e5e7eb !important;
    background: #f9fafb !important;
    min-height: 70px !important;
  }
  
  .mobile-menu-header h3 {
    color: #111827 !important;
    font-size: 1.2rem !important;
    font-weight: 700 !important;
    margin: 0 !important;
    font-family: 'Montserrat', sans-serif !important;
  }
  
  /* Pulsante chiusura */
  .mobile-menu-close {
    width: 40px !important;
    height: 40px !important;
    border: none !important;
    background: #f3f4f6 !important;
    border-radius: 8px !important;
    color: #6b7280 !important;
    cursor: pointer !important;
    transition: all 0.2s ease !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    font-size: 1.2rem !important;
  }
  
  .mobile-menu-close i {
    font-family: 'Font Awesome 6 Free' !important;
    font-weight: 900 !important;
    display: inline-block !important;
    opacity: 1 !important;
  }
  
  .mobile-menu-close:hover {
    background: #e5e7eb !important;
    color: #374151 !important;
    transform: scale(1.05) !important;
  }
  
  /* Links del menu mobile */
  .mobile-menu-links {
    flex: 1 !important;
    padding: 1rem 0 !important;
  }
  
  .mobile-nav-link {
    display: flex !important;
    align-items: center !important;
    gap: 1rem !important;
    padding: 1rem 1.5rem !important;
    color: #374151 !important;
    text-decoration: none !important;
    font-weight: 500 !important;
    font-size: 1rem !important;
    transition: all 0.2s ease !important;
    border-left: 3px solid transparent !important;
    font-family: 'Inter', sans-serif !important;
  }
  
  .mobile-nav-link:hover {
    background: #f9fafb !important;
    color: #1f2937 !important;
    border-left-color: #3b82f6 !important;
    transform: translateX(5px) !important;
  }
  
  .mobile-nav-link i {
    width: 20px !important;
    min-width: 20px !important;
    text-align: center !important;
    color: #6b7280 !important;
    font-size: 1.2rem !important;
    display: inline-block !important;
    font-family: 'Font Awesome 6 Free' !important;
    font-weight: 900 !important;
    font-style: normal !important;
    font-variant: normal !important;
    text-rendering: auto !important;
    line-height: 1 !important;
    opacity: 1 !important;
    visibility: visible !important;
  }
  
  .mobile-nav-link:hover i {
    color: #3b82f6 !important;
  }
  
  /* Icone specifiche per essere sicuri */
  .mobile-nav-link .fa-home,
  .mobile-nav-link .fa-newspaper,
  .mobile-nav-link .fa-building,
  .mobile-nav-link .fa-users,
  .mobile-nav-link .fa-briefcase,
  .mobile-nav-link .fa-gavel,
  .mobile-nav-link .fa-info-circle {
    display: inline-block !important;
    font-family: 'Font Awesome 6 Free' !important;
    font-weight: 900 !important;
    color: #6b7280 !important;
    opacity: 1 !important;
  }
  
  /* Sottosezioni del menu */
  .mobile-nav-section h4 {
    color: #9ca3af !important;
    font-size: 0.8rem !important;
    font-weight: 700 !important;
    text-transform: uppercase !important;
    letter-spacing: 1px !important;
    margin: 1.5rem 1.5rem 0.5rem 1.5rem !important;
    font-family: 'Inter', sans-serif !important;
  }
  
  .mobile-nav-link.sub-link {
    padding-left: 3rem !important;
    font-size: 0.9rem !important;
    color: #6b7280 !important;
  }
  
  .mobile-nav-link.sub-link:hover {
    color: #374151 !important;
  }
  
  /* Footer del menu mobile */
  .mobile-menu-footer {
    padding: 1.5rem !important;
    border-top: 1px solid #e5e7eb !important;
    background: #f9fafb !important;
    margin-top: auto !important;
  }
  
  .theme-toggle-mobile {
    display: flex !important;
    align-items: center !important;
    gap: 0.75rem !important;
    width: 100% !important;
    padding: 0.875rem 1rem !important;
    background: #ffffff !important;
    border: 1px solid #d1d5db !important;
    border-radius: 8px !important;
    color: #374151 !important;
    font-weight: 600 !important;
    cursor: pointer !important;
    transition: all 0.2s ease !important;
    font-family: 'Inter', sans-serif !important;
  }
  
  .theme-toggle-mobile:hover {
    background: #f3f4f6 !important;
    border-color: #9ca3af !important;
  }
  
  .theme-toggle-mobile i {
    font-family: 'Font Awesome 6 Free' !important;
    font-weight: 900 !important;
    display: inline-block !important;
    opacity: 1 !important;
    color: inherit !important;
  }
  
  /* Tema scuro per il menu */
  [data-theme="dark"] .mobile-menu-content {
    background: #1e293b !important;
  }
  
  [data-theme="dark"] .mobile-menu-header {
    background: #0f172a !important;
    border-bottom-color: #374151 !important;
  }
  
  [data-theme="dark"] .mobile-menu-header h3 {
    color: #f1f5f9 !important;
  }
  
  [data-theme="dark"] .mobile-menu-close {
    background: #374151 !important;
    color: #9ca3af !important;
  }
  
  [data-theme="dark"] .mobile-menu-close:hover {
    background: #4b5563 !important;
    color: #d1d5db !important;
  }
  
  [data-theme="dark"] .mobile-nav-link {
    color: #e2e8f0 !important;
  }
  
  [data-theme="dark"] .mobile-nav-link:hover {
    background: rgba(59, 130, 246, 0.1) !important;
    color: #60a5fa !important;
    border-left-color: #60a5fa !important;
  }
  
  [data-theme="dark"] .mobile-nav-link i {
    color: #9ca3af !important;
  }
  
  [data-theme="dark"] .mobile-nav-link:hover i {
    color: #60a5fa !important;
  }
  
  [data-theme="dark"] .mobile-nav-section h4 {
    color: #9ca3af !important;
  }
  
  [data-theme="dark"] .mobile-menu-footer {
    background: #0f172a !important;
    border-top-color: #374151 !important;
  }
  
  [data-theme="dark"] .theme-toggle-mobile {
    background: #1e293b !important;
    border-color: #475569 !important;
    color: #e2e8f0 !important;
  }
  
  [data-theme="dark"] .theme-toggle-mobile:hover {
    background: #334155 !important;
    border-color: #64748b !important;
  }
  
  /* PREVENIRE INTERFERENZE NAVBAR CON MOBILE MENU */
  .enhanced-navbar {
    overflow: visible !important; /* Permetti al dropdown di uscire */
  }
  
  /* Quando il menu mobile è attivo, nascondi scroll del body */
  body.mobile-menu-active {
    overflow: hidden !important;
    position: fixed !important;
    width: 100% !important;
  }
  
  /* Assicuriamoci che il menu mobile non erediti stili dalla navbar */
  .mobile-menu-overlay,
  .mobile-menu-overlay * {
    box-sizing: border-box !important;
    font-family: inherit !important;
  }
  
  /* Reset completo per il menu mobile */
  .mobile-menu-overlay {
    all: unset !important;
    /* Poi ri-applichiamo solo i nostri stili */
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    right: 0 !important;
    bottom: 0 !important;
    width: 100vw !important;
    height: 100vh !important;
    z-index: 15000 !important;
    background: rgba(0, 0, 0, 0.85) !important;
    backdrop-filter: blur(10px) !important;
    opacity: 0 !important;
    visibility: hidden !important;
    pointer-events: none !important;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1) !important;
  }
}

.mobile-menu-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1.5rem;
  border-bottom: 1px solid var(--mobile-border, #e5e7eb);
}

[data-theme="dark"] .mobile-menu-header {
  --mobile-border: #374151;
}

.mobile-menu-header h3 {
  color: var(--mobile-title-color, #111827);
  font-size: 1.2rem;
  font-weight: 700;
  margin: 0;
}

[data-theme="dark"] .mobile-menu-header h3 {
  --mobile-title-color: #f1f5f9;
}

.mobile-menu-close {
  width: 36px;
  height: 36px;
  border: none;
  background: var(--mobile-close-bg, #f3f4f6);
  border-radius: 8px;
  color: var(--mobile-close-color, #6b7280);
  cursor: pointer;
  transition: all 0.3s ease;
  display: flex;
  align-items: center;
  justify-content: center;
}

[data-theme="dark"] .mobile-menu-close {
  --mobile-close-bg: #374151;
  --mobile-close-color: #9ca3af;
}

.mobile-menu-close:hover {
  background: var(--mobile-close-hover, #e5e7eb);
  color: var(--mobile-close-hover-color, #374151);
}

[data-theme="dark"] .mobile-menu-close:hover {
  --mobile-close-hover: #4b5563;
  --mobile-close-hover-color: #d1d5db;
}

.mobile-menu-links {
  padding: 1rem 0;
}

.mobile-nav-link {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 1rem 1.5rem;
  color: var(--mobile-link-color, #374151);
  text-decoration: none;
  font-weight: 600;
  transition: all 0.3s ease;
  border-left: 3px solid transparent;
}

[data-theme="dark"] .mobile-nav-link {
  --mobile-link-color: #e2e8f0;
}

.mobile-nav-link:hover {
  background: var(--mobile-link-hover, #f9fafb);
  color: var(--mobile-link-hover-color, #1f2937);
  border-left-color: var(--mobile-accent, #3b82f6);
}

[data-theme="dark"] .mobile-nav-link:hover {
  --mobile-link-hover: rgba(59, 130, 246, 0.1);
  --mobile-link-hover-color: #60a5fa;
  --mobile-accent: #60a5fa;
}

.mobile-nav-link.sub-link {
  padding-left: 3rem;
  font-size: 0.9rem;
  font-weight: 500;
}

.mobile-nav-section h4 {
  color: var(--mobile-section-color, #6b7280);
  font-size: 0.8rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1px;
  margin: 1.5rem 1.5rem 0.5rem 1.5rem;
}

[data-theme="dark"] .mobile-nav-section h4 {
  --mobile-section-color: #9ca3af;
}

.mobile-menu-footer {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  padding: 1.5rem;
  border-top: 1px solid var(--mobile-border, #e5e7eb);
  background: var(--mobile-footer-bg, #f9fafb);
}

[data-theme="dark"] .mobile-menu-footer {
  --mobile-footer-bg: #0f172a;
}

.theme-toggle-mobile {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  width: 100%;
  padding: 0.875rem 1rem;
  background: var(--mobile-theme-bg, #ffffff);
  border: 1px solid var(--mobile-theme-border, #d1d5db);
  border-radius: 8px;
  color: var(--mobile-theme-color, #374151);
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
}

[data-theme="dark"] .theme-toggle-mobile {
  --mobile-theme-bg: #1e293b;
  --mobile-theme-border: #475569;
  --mobile-theme-color: #e2e8f0;
}

.theme-toggle-mobile:hover {
  background: var(--mobile-theme-hover, #f3f4f6);
  border-color: var(--mobile-theme-border-hover, #9ca3af);
}

[data-theme="dark"] .theme-toggle-mobile:hover {
  --mobile-theme-hover: #334155;
  --mobile-theme-border-hover: #64748b;
}

/* Clean hero without graphics */

/* Hero Content */
.hero-content-center {
  padding: 2rem 0;
  color: var(--hero-text, white);
  background: transparent !important; /* COMPLETAMENTE TRASPARENTE per mostrare immagine */
  box-shadow: none !important; /* NESSUNA OMBRA */
  border: none !important; /* NESSUN BORDO */
}

[data-theme="dark"] .hero-content-center {
  --hero-text: #f1f5f9;
  background: transparent !important; /* COMPLETAMENTE TRASPARENTE per mostrare immagine */
  box-shadow: none !important; /* NESSUNA OMBRA */
  border: none !important; /* NESSUN BORDO */
}

.hero-main-title {
  font-family: 'Montserrat', sans-serif;
  font-size: clamp(2.5rem, 6vw, 4.5rem);
  font-weight: 900;
  line-height: 1.1;
  margin-bottom: 2rem;
  color: #ffffff !important; /* BIANCO per contrasto sull'immagine */
  text-shadow: 
    0 3px 6px rgba(0, 0, 0, 0.8),
    0 1px 3px rgba(0, 0, 0, 1),
    0 0 15px rgba(0, 0, 0, 0.6) !important; /* TRIPLA OMBRA per visibilità */
}

.brand-highlight {
  background: linear-gradient(135deg, #fbbf24, #f59e0b, #eab308) !important; /* GIALLO/ORO per contrasto sull'immagine */
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  position: relative;
  font-family: 'Montserrat', sans-serif !important;
  font-weight: 900 !important; /* PIÙ PESANTE */
  text-shadow: 
    0 3px 6px rgba(0, 0, 0, 0.8),
    0 1px 3px rgba(0, 0, 0, 1),
    0 0 15px rgba(0, 0, 0, 0.6) !important; /* TRIPLA OMBRA per visibilità */
  filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.8)) !important; /* OMBRA AGGIUNTIVA */
}

[data-theme="dark"] .brand-highlight {
  background: linear-gradient(135deg, #fbbf24, #f59e0b, #eab308) !important; /* STESSO GIALLO/ORO per entrambi i temi */
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  text-shadow: 
    0 3px 6px rgba(0, 0, 0, 0.9),
    0 1px 3px rgba(0, 0, 0, 1),
    0 0 15px rgba(0, 0, 0, 0.7) !important; /* TRIPLA OMBRA più forte per dark */
  filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.9)) !important; /* OMBRA AGGIUNTIVA più forte */
}

.hero-subtitle {
  font-size: clamp(1.1rem, 3vw, 1.4rem);
  line-height: 1.6;
  color: #ffffff !important; /* BIANCO per contrasto sull'immagine */
  margin-bottom: 3rem;
  max-width: 600px;
  margin-left: auto;
  margin-right: auto;
  font-weight: 600;
  text-shadow: 
    0 2px 4px rgba(0, 0, 0, 0.8),
    0 1px 2px rgba(0, 0, 0, 0.9),
    0 0 10px rgba(0, 0, 0, 0.5) !important; /* TRIPLA OMBRA per visibilità */
}

[data-theme="dark"] .hero-subtitle {
  color: #ffffff !important; /* BIANCO anche in tema scuro */
  text-shadow: 
    0 3px 6px rgba(0, 0, 0, 0.9),
    0 1px 3px rgba(0, 0, 0, 1),
    0 0 15px rgba(0, 0, 0, 0.7) !important; /* OMBRA PIÙ FORTE per dark */
}

.hero-cta {
  margin-top: 2rem;
}

.btn-explore {
  display: inline-flex;
  align-items: center;
  padding: 1rem 2rem;
  background: var(--btn-bg, rgba(255, 255, 255, 0.15));
  color: var(--btn-text, white);
  text-decoration: none;
  border: 2px solid var(--btn-border, rgba(255, 255, 255, 0.3));
  border-radius: 50px;
  font-weight: 600;
  font-size: 1.1rem;
  backdrop-filter: blur(10px);
  transition: all 0.3s ease;
}

[data-theme="dark"] .btn-explore {
  --btn-bg: rgba(59, 130, 246, 0.2);
  --btn-text: #f1f5f9;
  --btn-border: rgba(59, 130, 246, 0.4);
}

.btn-explore:hover {
  background: var(--btn-hover-bg, rgba(255, 255, 255, 0.25));
  color: var(--btn-text, white);
  border-color: var(--btn-hover-border, rgba(255, 255, 255, 0.5));
  transform: translateY(-2px);
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
}

[data-theme="dark"] .btn-explore:hover {
  --btn-hover-bg: rgba(59, 130, 246, 0.3);
  --btn-hover-border: rgba(59, 130, 246, 0.6);
}

/* Clean Responsive Design */
@media (max-width: 768px) {
  .hero-content-center {
    padding: 1rem 0;
    background: transparent !important; /* COMPLETAMENTE TRASPARENTE anche su mobile */
    box-shadow: none !important; /* NESSUNA OMBRA */
    border: none !important; /* NESSUN BORDO */
  }
  
  .hero-main-title {
    font-size: clamp(2rem, 8vw, 3rem);
    margin-bottom: 1.5rem;
  }
  
  .hero-subtitle {
    font-size: clamp(1rem, 4vw, 1.2rem);
    margin-bottom: 2rem;
  }
  
  .btn-explore {
    padding: 0.875rem 1.5rem;
    font-size: 1rem;
  }
}

/* Simple Clean Visual Design */
.hero-visual-simple {
  position: relative;
  width: 100%;
  height: 500px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2rem;
}

/* Clean Legal Categories Grid */
.legal-categories-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.5rem;
  width: 100%;
  max-width: 400px;
}

.category-box {
  position: relative;
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.1), rgba(255, 255, 255, 0.05));
  backdrop-filter: blur(15px);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 16px;
  padding: 1.5rem;
  text-align: center;
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  overflow: hidden;
}

.category-box:hover {
  transform: translateY(-5px);
  box-shadow: 0 15px 35px rgba(0, 0, 0, 0.2);
  border-color: rgba(96, 165, 250, 0.5);
}

.category-icon {
  font-size: 2.5rem;
  margin-bottom: 1rem;
  color: #60a5fa;
  transition: transform 0.3s ease;
}

.category-box:hover .category-icon {
  transform: scale(1.1);
}

.category-title {
  font-size: 0.9rem;
  font-weight: 700;
  color: rgba(255, 255, 255, 0.9);
  margin-bottom: 0.5rem;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.category-articles {
  font-size: 0.7rem;
  color: rgba(255, 255, 255, 0.6);
  font-weight: 500;
}

.category-glow {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(135deg, rgba(96, 165, 250, 0.1), transparent);
  opacity: 0;
  transition: opacity 0.3s ease;
  border-radius: 16px;
}

.category-box:hover .category-glow {
  opacity: 1;
}

/* Central Symbol */
.central-symbol {
  position: relative;
  width: 120px;
  height: 120px;
}

.symbol-container {
  position: relative;
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, rgba(251, 191, 36, 0.2), rgba(251, 191, 36, 0.1));
  border: 2px solid rgba(251, 191, 36, 0.3);
  border-radius: 50%;
  backdrop-filter: blur(20px);
}

.symbol-icon {
  font-size: 2.5rem;
  color: #fbbf24;
  margin-bottom: 0.5rem;
  animation: gentleGlow 3s ease-in-out infinite alternate;
}

.symbol-text {
  font-size: 0.6rem;
  font-weight: 900;
  color: rgba(251, 191, 36, 0.9);
  letter-spacing: 1px;
  text-transform: uppercase;
}

.symbol-rings {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
}

.ring {
  position: absolute;
  border: 1px solid rgba(251, 191, 36, 0.3);
  border-radius: 50%;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
}

.ring-1 {
  width: 140px;
  height: 140px;
  animation: ringExpand 4s ease-in-out infinite;
  animation-delay: 0s;
}

.ring-2 {
  width: 160px;
  height: 160px;
  animation: ringExpand 4s ease-in-out infinite;
  animation-delay: 1.3s;
}

.ring-3 {
  width: 180px;
  height: 180px;
  animation: ringExpand 4s ease-in-out infinite;
  animation-delay: 2.6s;
}

/* Legal Stats Visual */
.legal-stats-visual {
  display: flex;
  gap: 2rem;
  align-items: center;
  flex-wrap: wrap;
  justify-content: center;
}

.stat-visual {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
}

.stat-bar {
  width: 80px;
  height: 6px;
  background: rgba(255, 255, 255, 0.2);
  border-radius: 3px;
  overflow: hidden;
  position: relative;
}

.stat-fill {
  height: 100%;
  background: linear-gradient(90deg, #60a5fa, #3b82f6);
  border-radius: 3px;
  width: 0%;
  transition: width 2s ease-out;
  animation: statFillAnimation 3s ease-out 1s forwards;
}

.civil .stat-fill,
.stat-visual:nth-child(1) .stat-fill {
  animation: statFill85 3s ease-out 1s forwards;
}

.penal .stat-fill,
.stat-visual:nth-child(2) .stat-fill {
  animation: statFill95 3s ease-out 1.5s forwards;
}

.constitutional .stat-fill,
.stat-visual:nth-child(3) .stat-fill {
  animation: statFill78 3s ease-out 2s forwards;
}

.stat-text {
  font-size: 0.7rem;
  color: rgba(255, 255, 255, 0.7);
  font-weight: 600;
  text-align: center;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

/* Animation Keyframes */
@keyframes matrixFlow {
  0% { left: -100%; opacity: 0; }
  50% { opacity: 1; }
  100% { left: 100%; opacity: 0; }
}

@keyframes articleFlow {
  0% { left: -200px; opacity: 0; }
  20% { opacity: 1; }
  80% { opacity: 1; }
  100% { left: 100%; opacity: 0; }
}

@keyframes particleFloat {
  0%, 100% { transform: translateY(0px); opacity: 0.2; }
  50% { transform: translateY(-20px); opacity: 0.6; }
}

@keyframes geoRotate {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

@keyframes badgePulse {
  0%, 100% { transform: scale(1); opacity: 1; }
  50% { transform: scale(1.2); opacity: 0.7; }
}

@keyframes gentleGlow {
  from { 
    text-shadow: 0 0 20px rgba(251, 191, 36, 0.5);
    transform: scale(1);
  }
  to { 
    text-shadow: 0 0 30px rgba(251, 191, 36, 0.8);
    transform: scale(1.05);
  }
}

@keyframes ringExpand {
  0% { 
    transform: translate(-50%, -50%) scale(0.8); 
    opacity: 0.8; 
  }
  50% { 
    opacity: 0.4; 
  }
  100% { 
    transform: translate(-50%, -50%) scale(1.2); 
    opacity: 0; 
  }
}

@keyframes statFill85 {
  from { width: 0%; }
  to { width: 85%; }
}

@keyframes statFill95 {
  from { width: 0%; }
  to { width: 95%; }
}

@keyframes statFill78 {
  from { width: 0%; }
  to { width: 78%; }
}

/* Nuove animazioni per elementi legali */
@keyframes legalTextFlow {
  0%, 90%, 100% { opacity: 0; transform: translateY(20px); }
  10%, 80% { opacity: 0.8; transform: translateY(0); }
}

@keyframes symbolFloat {
  0%, 100% { opacity: 0; transform: translateY(0) rotate(0deg); }
  20%, 80% { opacity: 0.7; }
  50% { opacity: 0.7; transform: translateY(-10px) rotate(5deg); }
}

@keyframes documentFloat {
  0%, 90%, 100% { opacity: 0; transform: rotate(0deg) scale(1); }
  30%, 70% { opacity: 0.6; transform: rotate(2deg) scale(1.02); }
}

@keyframes codeLineFlow {
  0%, 95%, 100% { opacity: 0; transform: scaleX(0); }
  20%, 75% { opacity: 0.5; transform: scaleX(1); }
}

@keyframes svgFloat {
  0%, 85%, 100% { opacity: 0; transform: scale(1) rotate(0deg); }
  25%, 65% { opacity: 0.6; transform: scale(1.1) rotate(5deg); }
}

@keyframes gridShift {
  0% { transform: translate(0, 0); }
  100% { transform: translate(50px, 50px); }
}

@keyframes legalPatternShift {
  0% { 
    transform: translateX(0) translateY(0);
    opacity: 0.06;
  }
  25% { 
    transform: translateX(-8px) translateY(-4px);
    opacity: 0.08;
  }
  50% { 
    transform: translateX(-4px) translateY(-8px);
    opacity: 0.06;
  }
  75% { 
    transform: translateX(-12px) translateY(-2px);
    opacity: 0.09;
  }
  100% { 
    transform: translateX(0) translateY(0);
    opacity: 0.06;
  }
}

@keyframes geometricFloat {
  0%, 100% { 
    transform: translateY(0px) rotate(0deg);
    opacity: 0.08;
  }
  33% { 
    transform: translateY(-3px) rotate(1deg);
    opacity: 0.1;
  }
  66% { 
    transform: translateY(-1px) rotate(-1deg);
    opacity: 0.06;
  }
}

/* Dark Theme Adjustments */
[data-theme="dark"] .badge-text {
  color: rgba(96, 165, 250, 0.9);
}

[data-theme="dark"] .hero-badge-new {
  background: linear-gradient(135deg, rgba(96, 165, 250, 0.15), rgba(59, 130, 246, 0.15));
  border-color: rgba(96, 165, 250, 0.3);
}

[data-theme="dark"] .flowing-article {
  color: rgba(96, 165, 250, 0.5);
}

[data-theme="dark"] .particle {
  color: rgba(96, 165, 250, 0.3);
}

[data-theme="dark"] .category-box {
  background: linear-gradient(135deg, rgba(30, 41, 59, 0.3), rgba(30, 41, 59, 0.1));
  border-color: rgba(96, 165, 250, 0.2);
}

[data-theme="dark"] .category-box:hover {
  border-color: rgba(96, 165, 250, 0.6);
  background: linear-gradient(135deg, rgba(30, 41, 59, 0.4), rgba(30, 41, 59, 0.2));
}

[data-theme="dark"] .symbol-container {
  background: linear-gradient(135deg, rgba(251, 191, 36, 0.15), rgba(251, 191, 36, 0.08));
  border-color: rgba(251, 191, 36, 0.4);
}

/* Legal Code Lines Styles */
.legal-code-lines {
  position: absolute;
  width: 100%;
  height: 100%;
  z-index: 1; /* Dietro a tutto */
}

.code-line {
  position: absolute;
  height: 2px;
  background: linear-gradient(90deg, 
    transparent, 
    rgba(30, 64, 175, 0.3), 
    rgba(59, 130, 246, 0.3), 
    transparent
  );
  border-radius: 1px;
  opacity: 0;
  animation: codeLineFlow 20s ease-in-out infinite;
}

[data-theme="dark"] .code-line {
  background: linear-gradient(90deg, 
    transparent, 
    rgba(96, 165, 250, 0.4), 
    rgba(147, 197, 253, 0.4), 
    transparent
  );
}

/* Legal SVG Elements Styles */
.legal-svg-elements {
  position: absolute;
  width: 100%;
  height: 100%;
  z-index: 4; /* Sopra i simboli */
}

.legal-svg {
  position: absolute;
  color: rgba(30, 64, 175, 0.6);
  opacity: 0;
  animation: svgFloat 16s ease-in-out infinite;
  background: rgba(255, 255, 255, 0.6);
  padding: 0.8rem;
  border-radius: 50%;
  border: 1px solid rgba(30, 64, 175, 0.2);
  backdrop-filter: blur(6px);
  box-shadow: 0 4px 12px rgba(30, 64, 175, 0.1);
}

[data-theme="dark"] .legal-svg {
  color: rgba(96, 165, 250, 0.7);
  background: rgba(30, 41, 59, 0.4);
  border-color: rgba(96, 165, 250, 0.3);
}

/* Responsive Design for Simple Layout */
@media (max-width: 991px) {
  .hero-visual-simple {
    height: 400px;
    gap: 1.5rem;
  }
  
  .legal-categories-grid {
    max-width: 320px;
    gap: 1rem;
  }
  
  .category-box {
    padding: 1rem;
  }
  
  .category-icon {
    font-size: 2rem;
  }
  
  .central-symbol {
    width: 100px;
    height: 100px;
  }
  
  .symbol-icon {
    font-size: 2rem;
  }
  
  .legal-stats-visual {
    gap: 1.5rem;
  }
}

@media (max-width: 576px) {
  .hero-visual-simple {
    height: 350px;
    gap: 1rem;
  }
  
  .legal-categories-grid {
    grid-template-columns: 1fr;
    max-width: 250px;
  }
  
  .category-box {
    padding: 0.75rem;
  }
  
  .category-icon {
    font-size: 1.8rem;
    margin-bottom: 0.5rem;
  }
  
  .category-title {
    font-size: 0.8rem;
  }
  
  .category-articles {
    font-size: 0.6rem;
  }
  
  .central-symbol {
    width: 80px;
    height: 80px;
  }
  
  .symbol-icon {
    font-size: 1.5rem;
  }
  
  .symbol-text {
    font-size: 0.5rem;
  }
  
  .legal-stats-visual {
    gap: 1rem;
  }
  
  .stat-bar {
    width: 60px;
    height: 4px;
  }
  
  .stat-text {
    font-size: 0.6rem;
  }
}

/* Clean, simple design completed */

/* ========================================
   EMERGENZA TESTO HERO - REGOLE DI FORZA MASSIMA
   Aggiornato: 2025-09-15 16:33
   ======================================== */

/* MODALITÀ CHIARA - FORZA ASSOLUTA */
html body section.clean-hero-section .container .hero-content-center h1.hero-main-title {
  color: #1e293b !important;
  text-shadow: 0 2px 4px rgba(255, 255, 255, 0.9), 0 1px 2px rgba(255, 255, 255, 1) !important;
}

html body section.clean-hero-section .container .hero-content-center p.hero-subtitle {
  color: #334155 !important;
  text-shadow: 0 2px 4px rgba(255, 255, 255, 0.9), 0 1px 2px rgba(255, 255, 255, 1) !important;
}

html body section.clean-hero-section .container .hero-content-center span.brand-highlight {
  color: #1e40af !important;
  background: none !important;
  -webkit-background-clip: unset !important;
  -webkit-text-fill-color: #1e40af !important;
  text-shadow: 0 2px 4px rgba(255, 255, 255, 0.9) !important;
}

/* MODALITÀ SCURA - FORZA ASSOLUTA */
html[data-theme="dark"] body section.clean-hero-section .container .hero-content-center h1.hero-main-title {
  color: #ffffff !important;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.9), 0 1px 2px rgba(0, 0, 0, 1) !important;
}

html[data-theme="dark"] body section.clean-hero-section .container .hero-content-center p.hero-subtitle {
  color: #ffffff !important;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.9), 0 1px 2px rgba(0, 0, 0, 1) !important;
}

html[data-theme="dark"] body section.clean-hero-section .container .hero-content-center span.brand-highlight {
  background: linear-gradient(135deg, #3b82f6, #60a5fa) !important;
  -webkit-background-clip: text !important;
  -webkit-text-fill-color: transparent !important;
  color: transparent !important;
}

/* DEBUG REGOLE ESTREME - RIMUOVERE DOPO TEST */
/* Modalità chiara - debug */
* .hero-main-title {
  color: #1e293b !important;
}

* .hero-subtitle {
  color: #334155 !important;
}

* .brand-highlight {
  color: #1e40af !important;
  -webkit-text-fill-color: #1e40af !important;
}

/* Modalità scura - debug */
[data-theme="dark"] * .hero-main-title {
  color: #ffffff !important;
}

[data-theme="dark"] * .hero-subtitle {
  color: #ffffff !important;
}

[data-theme="dark"] * .brand-highlight {
  background: linear-gradient(135deg, #3b82f6, #60a5fa) !important;
  -webkit-background-clip: text !important;
  -webkit-text-fill-color: transparent !important;
}

/* ========================================
   HERO BACKGROUND SEMPLIFICATO - ANTI SOVRAPPOSIZIONE
   ======================================== */

/* SEZIONE HERO - Priorità Z-INDEX corretta */
.clean-hero-section {
  position: relative !important;
  z-index: 1 !important; /* BASE LAYER */
  overflow: visible !important;
}

/* ========================================
   REGOLE FORZA MASSIMA PER TESTO HERO - MODALITÀ CHIARA
   ======================================== */

/* TITOLO PRINCIPALE - MODALITÀ CHIARA - MASSIMA SPECIFICITA' */
.clean-hero-section .hero-content-center .hero-main-title,
.clean-hero-section .hero-content-center h1.hero-main-title,
section.clean-hero-section .hero-content-center .hero-main-title {
  color: #1e293b !important;
  text-shadow: 
    0 2px 4px rgba(255, 255, 255, 0.9),
    0 1px 2px rgba(255, 255, 255, 1),
    0 0 10px rgba(255, 255, 255, 0.6) !important;
  font-weight: 900 !important;
  font-family: 'Montserrat', sans-serif !important;
}

/* SOTTOTITOLO - MODALITÀ CHIARA - MASSIMA SPECIFICITA' */
.clean-hero-section .hero-content-center .hero-subtitle,
.clean-hero-section .hero-content-center p.hero-subtitle,
section.clean-hero-section .hero-content-center .hero-subtitle {
  color: #334155 !important;
  text-shadow: 
    0 2px 4px rgba(255, 255, 255, 0.9),
    0 1px 2px rgba(255, 255, 255, 1),
    0 0 10px rgba(255, 255, 255, 0.6) !important;
  font-weight: 600 !important;
  font-family: 'Inter', sans-serif !important;
}

/* BRAND HIGHLIGHT - MODALITÀ CHIARA - MASSIMA SPECIFICITA' */
.clean-hero-section .hero-content-center .brand-highlight,
.clean-hero-section .hero-content-center span.brand-highlight,
section.clean-hero-section .hero-content-center .brand-highlight {
  color: #1e40af !important;
  background: none !important;
  -webkit-background-clip: unset !important;
  -webkit-text-fill-color: unset !important;
  background-clip: unset !important;
  text-shadow: 
    0 2px 4px rgba(255, 255, 255, 0.9),
    0 1px 2px rgba(255, 255, 255, 1) !important;
}

/* ========================================
   REGOLE FORZA MASSIMA PER TESTO HERO - MODALITÀ SCURA
   ======================================== */

/* TITOLO PRINCIPALE - MODALITÀ SCURA - MASSIMA SPECIFICITA' */
[data-theme="dark"] .clean-hero-section .hero-content-center .hero-main-title,
[data-theme="dark"] .clean-hero-section .hero-content-center h1.hero-main-title,
[data-theme="dark"] section.clean-hero-section .hero-content-center .hero-main-title {
  color: #ffffff !important;
  text-shadow: 
    0 2px 4px rgba(0, 0, 0, 0.9),
    0 1px 2px rgba(0, 0, 0, 1),
    0 0 10px rgba(0, 0, 0, 0.6) !important;
  font-weight: 900 !important;
  font-family: 'Montserrat', sans-serif !important;
}

/* SOTTOTITOLO - MODALITÀ SCURA - MASSIMA SPECIFICITA' */
[data-theme="dark"] .clean-hero-section .hero-content-center .hero-subtitle,
[data-theme="dark"] .clean-hero-section .hero-content-center p.hero-subtitle,
[data-theme="dark"] section.clean-hero-section .hero-content-center .hero-subtitle {
  color: #ffffff !important;
  text-shadow: 
    0 2px 4px rgba(0, 0, 0, 0.9),
    0 1px 2px rgba(0, 0, 0, 1),
    0 0 10px rgba(0, 0, 0, 0.6) !important;
  font-weight: 600 !important;
  font-family: 'Inter', sans-serif !important;
}

/* BRAND HIGHLIGHT - MODALITÀ SCURA - MASSIMA SPECIFICITA' */
[data-theme="dark"] .clean-hero-section .hero-content-center .brand-highlight,
[data-theme="dark"] .clean-hero-section .hero-content-center span.brand-highlight,
[data-theme="dark"] section.clean-hero-section .hero-content-center .brand-highlight {
  background: linear-gradient(135deg, #3b82f6, #60a5fa) !important;
  -webkit-background-clip: text !important;
  -webkit-text-fill-color: transparent !important;
  background-clip: text !important;
  color: transparent !important;
}

/* Background con immagine statica - ZERO sovrapposizioni */
.hero-background-clean {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: url('../images/hero-background.jpg.png') center center/cover no-repeat !important;
  background-size: cover !important;
  background-position: center center !important;
  background-repeat: no-repeat !important;
  overflow: hidden;
  pointer-events: none;
  z-index: 3 !important; /* SOPRA container ma sotto contenuto */
  opacity: 1 !important; /* COMPLETAMENTE OPACA */
}

/* Versione dark theme - SOLO IMMAGINE */
[data-theme="dark"] .hero-background-clean {
  background: url('../images/hero-background.jpg.png') center center/cover no-repeat !important;
  background-size: cover !important;
  background-position: center center !important;
  background-repeat: no-repeat !important;
  opacity: 1 !important; /* COMPLETAMENTE OPACA */
}

/* Fallback senza immagine (nel caso l'immagine non si carichi) */
.hero-background-clean::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(135deg, #1e40af 0%, #3b82f6 50%, #60a5fa 100%);
  opacity: 0.02; /* MOLTO MENO OPACO per non interferire */
  z-index: -1;
}

/* Backup - Background semplificato e sicuro */
.hero-background-simple {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  overflow: hidden;
  pointer-events: none;
  z-index: 1; /* Molto basso */
}

/* Pattern di sfondo semplice */
.simple-pattern {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: 
    radial-gradient(circle at 20% 80%, rgba(59, 130, 246, 0.03) 0%, transparent 50%),
    radial-gradient(circle at 80% 20%, rgba(30, 64, 175, 0.04) 0%, transparent 50%);
  opacity: 0.5;
}

[data-theme="dark"] .simple-pattern {
  background: 
    radial-gradient(circle at 20% 80%, rgba(96, 165, 250, 0.05) 0%, transparent 50%),
    radial-gradient(circle at 80% 20%, rgba(59, 130, 246, 0.06) 0%, transparent 50%);
}

/* Decorazioni minimali */
.minimal-decorations {
  position: absolute;
  width: 100%;
  height: 100%;
  z-index: 2;
}

.decoration-symbol {
  position: absolute;
  font-size: 1.5rem;
  color: rgba(59, 130, 246, 0.4);
  opacity: 0;
  animation: gentleFloat 8s ease-in-out infinite;
  text-shadow: 0 2px 8px rgba(59, 130, 246, 0.2);
  user-select: none;
  pointer-events: none;
}

[data-theme="dark"] .decoration-symbol {
  color: rgba(96, 165, 250, 0.5);
  text-shadow: 0 2px 8px rgba(96, 165, 250, 0.3);
}

/* PRIORITÀ NORMALE AL CONTENUTO - SOTTO NAVBAR */
.clean-hero-section .container {
  position: relative;
  z-index: 4 !important; /* SOPRA IL BACKGROUND */
}

.clean-hero-section .hero-content-center {
  position: relative;
  z-index: 5 !important; /* SOPRA IL BACKGROUND */
  background: transparent !important; /* COMPLETAMENTE TRASPARENTE per mostrare immagine */
  border-radius: 20px;
  backdrop-filter: none; /* NESSUN BLUR per vedere chiaramente l'immagine */
  padding: 3rem 2rem;
  margin: 2rem 0;
  box-shadow: none; /* NESSUNA OMBRA per non coprire l'immagine */
  border: none !important; /* NESSUN BORDO */
}

[data-theme="dark"] .clean-hero-section .hero-content-center {
  background: transparent !important; /* COMPLETAMENTE TRASPARENTE per mostrare immagine */
  box-shadow: none; /* NESSUNA OMBRA */
  border: none !important; /* NESSUN BORDO */
}

/* Tutti i testi dentro la hero hanno priorità normale E SHADOW per leggibilità */
.clean-hero-section .hero-content-center * {
  position: relative;
  z-index: 10 !important; /* SOPRA IL BACKGROUND ma sotto navbar */
}

/* Font e stili corretti per hero - MODALITÀ CHIARA */
.clean-hero-section .hero-content-center h1,
.clean-hero-section .hero-content-center h2,
.clean-hero-section .hero-content-center h3,
.hero-main-title {
  font-family: 'Montserrat', sans-serif !important;
  font-weight: 900 !important;
  color: #1e293b !important; /* SCURO per contrasto su sfondo chiaro */
  text-shadow: 
    0 2px 4px rgba(255, 255, 255, 0.8),
    0 1px 2px rgba(255, 255, 255, 0.9),
    0 0 10px rgba(255, 255, 255, 0.5) !important; /* OMBRA BIANCA per leggibilità */
  line-height: 1.2 !important;
}

/* Font e stili corretti per hero - MODALITÀ SCURA */
[data-theme="dark"] .clean-hero-section .hero-content-center h1,
[data-theme="dark"] .clean-hero-section .hero-content-center h2,
[data-theme="dark"] .clean-hero-section .hero-content-center h3,
[data-theme="dark"] .hero-main-title {
  font-family: 'Montserrat', sans-serif !important;
  font-weight: 900 !important;
  color: #ffffff !important; /* BIANCO per contrasto su sfondo scuro */
  text-shadow: 
    0 2px 4px rgba(0, 0, 0, 0.8),
    0 1px 2px rgba(0, 0, 0, 0.9),
    0 0 10px rgba(0, 0, 0, 0.5) !important; /* OMBRA SCURA per leggibilità */
  line-height: 1.2 !important;
}

/* Paragrafi e sottotitoli - MODALITÀ CHIARA */
.clean-hero-section .hero-content-center p,
.hero-subtitle {
  font-family: 'Inter', sans-serif !important;
  font-weight: 600 !important;
  color: #334155 !important; /* GRIGIO SCURO per contrasto su sfondo chiaro */
  text-shadow: 
    0 2px 4px rgba(255, 255, 255, 0.8),
    0 1px 2px rgba(255, 255, 255, 0.9),
    0 0 10px rgba(255, 255, 255, 0.5) !important; /* OMBRA BIANCA per leggibilità */
  line-height: 1.6 !important;
  font-size: 1.1rem !important;
}

/* Paragrafi e sottotitoli - MODALITÀ SCURA */
[data-theme="dark"] .clean-hero-section .hero-content-center p,
[data-theme="dark"] .hero-subtitle {
  font-family: 'Inter', sans-serif !important;
  font-weight: 600 !important;
  color: #ffffff !important; /* BIANCO per contrasto su sfondo scuro */
  text-shadow: 
    0 2px 4px rgba(0, 0, 0, 0.8),
    0 1px 2px rgba(0, 0, 0, 0.9),
    0 0 10px rgba(0, 0, 0, 0.5) !important; /* OMBRA SCURA per leggibilità */
  line-height: 1.6 !important;
  font-size: 1.1rem !important;
}

/* Brand highlight - MODALITÀ CHIARA */
.brand-highlight {
  font-family: 'Montserrat', sans-serif !important;
  font-weight: 800 !important;
  color: #1e40af !important; /* BLU SCURO per modalità chiara */
  text-shadow: 
    0 2px 4px rgba(255, 255, 255, 0.8),
    0 1px 2px rgba(255, 255, 255, 0.9) !important;
}

/* Brand highlight - MODALITÀ SCURA */
[data-theme="dark"] .brand-highlight {
  font-family: 'Montserrat', sans-serif !important;
  font-weight: 800 !important;
  background: linear-gradient(135deg, #3b82f6, #60a5fa) !important;
  -webkit-background-clip: text !important;
  -webkit-text-fill-color: transparent !important;
  background-clip: text !important;
}

/* Bottoni con massima visibilità senza sfondo dietro */
.clean-hero-section .btn-explore {
  position: relative;
  z-index: 53 !important; /* SOPRA TUTTO NELLA HERO */
  background: rgba(59, 130, 246, 1) !important; /* COMPLETAMENTE OPACO per massima visibilità */
  color: white !important;
  border: 3px solid rgba(255, 255, 255, 0.9) !important; /* BORDO MOLTO VISIBILE */
  backdrop-filter: blur(5px) !important; /* LEGGERO BLUR */
  box-shadow: 
    0 8px 25px rgba(59, 130, 246, 0.6),
    0 4px 15px rgba(0, 0, 0, 0.4),
    0 0 0 4px rgba(255, 255, 255, 0.3) !important; /* OMBRA TRIPLA con outline */
  text-shadow: 
    0 1px 3px rgba(0, 0, 0, 0.8),
    0 0 10px rgba(0, 0, 0, 0.5) !important; /* TESTO MOLTO LEGGIBILE */
}

.clean-hero-section .btn-explore:hover {
  background: rgba(30, 64, 175, 0.95) !important;
  border-color: rgba(255, 255, 255, 0.8) !important;
  transform: translateY(-2px);
  box-shadow: 
    0 12px 30px rgba(59, 130, 246, 0.5),
    0 4px 12px rgba(0, 0, 0, 0.3) !important; /* OMBRA PIÙ FORTE */
}

/* Animazione semplice e delicata */
@keyframes gentleFloat {
  0%, 100% { 
    opacity: 0; 
    transform: translateY(0);
  }
  25%, 75% { 
    opacity: 0.6; 
  }
  50% { 
    opacity: 0.6; 
    transform: translateY(-8px);
  }
}

/* Regole responsive per immagine di sfondo */
@media (max-width: 1200px) {
  .hero-background-clean {
    background: url('../images/hero-background.jpg.png') center center/cover no-repeat;
  }
  
  [data-theme="dark"] .hero-background-clean {
    background: url('../images/hero-background.jpg.png') center center/cover no-repeat;
  }
}

@media (max-width: 768px) {
  .hero-background-clean {
    background: url('../images/hero-background.jpg.png') center center/cover no-repeat;
    background-position: center center;
  }
  
  [data-theme="dark"] .hero-background-clean {
    background: url('../images/hero-background.jpg.png') center center/cover no-repeat;
    background-position: center center;
  }
  
  /* SFONDO COMPLETAMENTE TRASPARENTE ANCHE SU MOBILE per mostrare immagine */
  .clean-hero-section .hero-content-center {
    background: transparent !important; /* COMPLETAMENTE TRASPARENTE anche su mobile */
    backdrop-filter: none !important; /* NESSUN BLUR per vedere l'immagine */
    padding: 2rem 1rem;
    box-shadow: none !important; /* NESSUNA OMBRA */
    border: none !important; /* NESSUN BORDO */
  }
  
  /* FONT MOBILE - MODALITÀ CHIARA */
  .clean-hero-section .hero-content-center h1,
  .hero-main-title {
    font-family: 'Montserrat', sans-serif !important;
    font-weight: 700 !important;
    color: #ffffff !important; /* BIANCO SENZA OMBRE */
    text-shadow: none !important; /* NESSUNA OMBRA */
    line-height: 1.2 !important;
  }
  
  .clean-hero-section .hero-content-center p,
  .hero-subtitle {
    font-family: 'Inter', sans-serif !important;
    font-weight: 400 !important;
    color: #ffffff !important; /* BIANCO SENZA OMBRE */
    text-shadow: none !important; /* NESSUNA OMBRA */
    line-height: 1.5 !important;
    font-size: 1rem !important;
  }
  
  /* BRAND HIGHLIGHT MOBILE - MODALITÀ CHIARA */
  .brand-highlight {
    color: #ffffff !important; /* BIANCO SENZA OMBRE */
    background: none !important;
    -webkit-background-clip: unset !important;
    -webkit-text-fill-color: #ffffff !important;
    background-clip: unset !important;
    font-family: 'Montserrat', sans-serif !important;
    font-weight: 700 !important;
    text-shadow: none !important; /* NESSUNA OMBRA */
  }
  
  /* BRAND HIGHLIGHT MOBILE - MODALITÀ SCURA */
  [data-theme="dark"] .brand-highlight {
    background: linear-gradient(135deg, #3b82f6, #60a5fa) !important;
    -webkit-background-clip: text !important;
    -webkit-text-fill-color: transparent !important;
    background-clip: text !important;
    font-family: 'Montserrat', sans-serif !important;
    font-weight: 800 !important;
  }
  
  /* TEMA SCURO MOBILE - COMPLETAMENTE TRASPARENTE per mostrare immagine */
  [data-theme="dark"] .clean-hero-section .hero-content-center {
    background: transparent !important; /* COMPLETAMENTE TRASPARENTE per mostrare immagine */
    border: none !important; /* NESSUN BORDO */
    box-shadow: none !important; /* NESSUNA OMBRA */
  }
  
  [data-theme="dark"] .clean-hero-section .hero-content-center h1,
  [data-theme="dark"] .hero-main-title {
    color: #ffffff !important; /* BIANCO PURO senza ombre */
    text-shadow: none !important; /* NESSUNA OMBRA */
  }
  
  [data-theme="dark"] .clean-hero-section .hero-content-center p,
  [data-theme="dark"] .hero-subtitle {
    color: #ffffff !important; /* BIANCO PURO senza ombre */
    text-shadow: none !important; /* NESSUNA OMBRA */
  }
  
  /* BOTTONE VISIBILE SU MOBILE */
  .btn-explore {
    background: #3b82f6 !important; /* COLORE SOLIDO */
    color: white !important;
    border: 2px solid #1e40af !important;
    box-shadow: 0 8px 20px rgba(59, 130, 246, 0.3) !important;
    text-shadow: none !important;
    font-weight: 600 !important;
  }
}

/* Sezione Retina rimossa - usa immagine standard */

/* ========================================
   SISTEMA ANTI-SOVRAPPOSIZIONE
   ======================================== */

/* Zone dedicate per evitare sovrapposizioni */
.zone-top-left {
  position: absolute;
  top: 0;
  left: 0;
  width: 25%;
  height: 25%;
  pointer-events: none;
}

.zone-top-right {
  position: absolute;
  top: 0;
  right: 0;
  width: 25%;
  height: 25%;
  pointer-events: none;
}

.zone-bottom-left {
  position: absolute;
  bottom: 0;
  left: 0;
  width: 25%;
  height: 25%;
  pointer-events: none;
}

.zone-bottom-right {
  position: absolute;
  bottom: 0;
  right: 0;
  width: 25%;
  height: 25%;
  pointer-events: none;
}

/* Elementi text occupano angoli esterni */
.legal-article-text:nth-child(1) { /* Top-left text */}
.legal-article-text:nth-child(2) { /* Top-right text */}
.legal-article-text:nth-child(3) { /* Bottom-left text */}
.legal-article-text:nth-child(4) { /* Bottom-right text */}

/* Simboli occupano posizioni intermedie */
.legal-symbol:nth-child(1) { /* Top-right intermediate */}
.legal-symbol:nth-child(2) { /* Bottom-left intermediate */}
.legal-symbol:nth-child(3) { /* Top-far-right */}
.legal-symbol:nth-child(4) { /* Bottom-far-right */}

/* SVG occupano angoli estremi */
.legal-svg:nth-child(1) { /* Top-far-right */}
.legal-svg:nth-child(2) { /* Bottom-far-left */}

/* Documenti in colonna destra */
.doc-1, .doc-2, .doc-3 {
  /* Tutti in zona destra per non sovrapporsi */
}

/* Code lines in zona centrale-esterna */
.code-line:nth-child(1) { /* Top-center */}
.code-line:nth-child(2) { /* Bottom-center */}
.code-line:nth-child(3) { /* Bottom-center-right */}

/* ========================================
   REGOLE DI DISTANZIAMENTO
   ======================================== */

/* Margini di sicurezza per tutti gli elementi decorativi */
.legal-article-text {
  margin: 0.5rem;
}

.legal-symbol {
  margin: 1rem;
}

.legal-svg {
  margin: 0.8rem;
}

.document-shape {
  margin: 0.6rem;
}

.code-line {
  margin: 0.3rem 0;
}

/* Regole responsive per evitare sovrapposizioni */

/* ========================================
   DEBUG E MIGLIORAMENTI MOBILI
   ======================================== */

/* Assicuriamoci che il menu mobile funzioni SEMPRE */
@media (max-width: 991px) {
  .mobile-menu-btn {
    display: flex !important;
    background: rgba(255, 255, 255, 0.2) !important;
    border: 2px solid rgba(255, 255, 255, 0.4) !important;
    backdrop-filter: blur(10px) !important;
    cursor: pointer !important;
    z-index: 10001 !important;
  }
  
  .mobile-menu-btn:hover {
    background: rgba(255, 255, 255, 0.3) !important;
    border-color: rgba(255, 255, 255, 0.6) !important;
    transform: scale(1.05) !important;
  }
  
  .mobile-menu-overlay {
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    width: 100% !important;
    height: 100% !important;
    z-index: 15000 !important; /* SOPRA TUTTO */
    background: rgba(0, 0, 0, 0.8) !important;
    backdrop-filter: blur(8px) !important;
    opacity: 0 !important;
    visibility: hidden !important;
    transition: all 0.3s ease !important;
  }
  
  .mobile-menu-overlay.active {
    opacity: 1 !important;
    visibility: visible !important;
  }
  
  .mobile-menu-content {
    position: absolute !important;
    top: 0 !important;
    right: -100% !important;
    width: 320px !important;
    height: 100% !important;
    background: var(--mobile-menu-bg, #ffffff) !important;
    transition: right 0.3s cubic-bezier(0.4, 0, 0.2, 1) !important;
    box-shadow: -10px 0 30px rgba(0, 0, 0, 0.3) !important;
    overflow-y: auto !important;
  }
  
  .mobile-menu-overlay.active .mobile-menu-content {
    right: 0 !important;
  }
}

/* ========================================
   REGOLA SUPER-FORTE PER FORZARE TRASPARENZA HERO
   ======================================== */

/* FORZA LA TRASPARENZA SU TUTTI GLI ELEMENTI HERO CON MASSIMA SPECIFICITA */
.clean-hero-section .hero-content-center,
.clean-hero-section .hero-content-center.text-center,
.hero-content-center,
.hero-content-center.text-center,
section.clean-hero-section .hero-content-center,
section.clean-hero-section div.hero-content-center,
div.hero-content-center {
  background: transparent !important;
  background-color: transparent !important;
  background-image: none !important;
  box-shadow: none !important;
  border: none !important;
  border-radius: 0 !important;
  backdrop-filter: none !important;
  -webkit-backdrop-filter: none !important;
}

/* TEMA SCURO - STESSA REGOLA SUPER-FORTE */
[data-theme="dark"] .clean-hero-section .hero-content-center,
[data-theme="dark"] .clean-hero-section .hero-content-center.text-center,
[data-theme="dark"] .hero-content-center,
[data-theme="dark"] .hero-content-center.text-center,
[data-theme="dark"] section.clean-hero-section .hero-content-center,
[data-theme="dark"] section.clean-hero-section div.hero-content-center,
[data-theme="dark"] div.hero-content-center {
  background: transparent !important;
  background-color: transparent !important;
  background-image: none !important;
  box-shadow: none !important;
  border: none !important;
  border-radius: 0 !important;
  backdrop-filter: none !important;
  -webkit-backdrop-filter: none !important;
}

/* MOBILE - STESSA REGOLA SUPER-FORTE */
@media (max-width: 991px) {
  .clean-hero-section .hero-content-center,
  .clean-hero-section .hero-content-center.text-center,
  .hero-content-center,
  .hero-content-center.text-center,
  section.clean-hero-section .hero-content-center,
  section.clean-hero-section div.hero-content-center,
  div.hero-content-center {
    background: transparent !important;
    background-color: transparent !important;
    background-image: none !important;
    box-shadow: none !important;
    border: none !important;
    border-radius: 0 !important;
    backdrop-filter: none !important;
    -webkit-backdrop-filter: none !important;
  }

  [data-theme="dark"] .clean-hero-section .hero-content-center,
  [data-theme="dark"] .clean-hero-section .hero-content-center.text-center,
  [data-theme="dark"] .hero-content-center,
  [data-theme="dark"] .hero-content-center.text-center,
  [data-theme="dark"] section.clean-hero-section .hero-content-center,
  [data-theme="dark"] section.clean-hero-section div.hero-content-center,
  [data-theme="dark"] div.hero-content-center {
    background: transparent !important;
    background-color: transparent !important;
    background-image: none !important;
    box-shadow: none !important;
    border: none !important;
    border-radius: 0 !important;
    backdrop-filter: none !important;
    -webkit-backdrop-filter: none !important;
  }
}

/* Miglioramenti font per assicurarci che sia tutto corretto */
.hero-main-title {
  font-family: 'Montserrat', 'Arial Black', sans-serif !important;
  font-weight: 900 !important; /* PIU PESANTE */
  color: #ffffff !important; /* BIANCO per contrasto */
  text-shadow: 
    0 3px 6px rgba(0, 0, 0, 0.8),
    0 1px 3px rgba(0, 0, 0, 1),
    0 0 15px rgba(0, 0, 0, 0.6) !important; /* TRIPLA OMBRA */
  font-display: swap;
}

.hero-subtitle {
  font-family: 'Inter', 'Helvetica Neue', Arial, sans-serif !important;
  font-weight: 600 !important; /* PIU PESANTE */
  color: #ffffff !important; /* BIANCO per contrasto */
  text-shadow: 
    0 2px 4px rgba(0, 0, 0, 0.8),
    0 1px 2px rgba(0, 0, 0, 0.9),
    0 0 10px rgba(0, 0, 0, 0.5) !important; /* TRIPLA OMBRA */
  font-display: swap;
}

.brand-highlight {
  font-family: 'Montserrat', 'Arial Black', sans-serif !important;
  font-weight: 800 !important;
  font-display: swap;
}

/* Debug console per JavaScript */
.debug-navbar {
  position: fixed;
  bottom: 10px;
  left: 10px;
  background: rgba(0, 0, 0, 0.8);
  color: white;
  padding: 10px;
  border-radius: 5px;
  font-family: monospace;
  font-size: 12px;
  z-index: 20000;
  display: none;
}

.debug-navbar.show {
  display: block;
}
@media (max-width: 1200px) {
  .legal-hero-background {
    opacity: 0.4; /* Riduci ancora di più l'opacità */
  }
  
  .doc-2 {
    display: none; /* Nascondi il secondo documento */
  }
  
  .legal-article-text:nth-child(4) {
    display: none; /* Nascondi il quarto testo */
  }
}

@media (max-width: 991px) {
  .legal-hero-background {
    opacity: 0.3; /* Ancora meno visibile su tablet */
  }
  
  .legal-symbol:nth-child(2) {
    display: none; /* Nascondi il secondo simbolo */
  }
  
  .legal-svg {
    display: none; /* Nascondi tutti gli SVG su tablet */
  }
  
  .legal-article-text:nth-child(3) {
    display: none; /* Nascondi il terzo testo */
  }
}

@media (max-width: 768px) {
  .legal-hero-background {
    opacity: 0.2; /* Molto poco visibile su mobile */
  }
  
  .floating-legal-symbols {
    display: none; /* Nascondi tutti i simboli su mobile */
  }
  
  .legal-article-text {
    font-size: 0.7rem; /* Testo ancora più piccolo */
    max-width: 150px; /* Larghezza ridotta */
  }
  
  .legal-article-text:nth-child(n+3) {
    display: none; /* Mantieni solo i primi 2 testi */
  }
}

/* Floating Legal Articles - CORRECTED POSITIONING */
.floating-legal-articles {
  position: absolute;
  width: 100%;
  height: 100%;
  z-index: 2; /* Sotto il contenuto principale */
}

.legal-article-text {
  position: absolute;
  color: #1e3a8a;
  font-family: 'Playfair Display', serif;
  font-size: 0.9rem; /* Ridotta dimensione */
  font-weight: 600;
  opacity: 0;
  animation: legalTextFlow 15s ease-in-out infinite;
  transform: translateY(20px);
  backdrop-filter: blur(8px);
  text-shadow: 0 2px 4px rgba(30, 58, 138, 0.3);
  background: linear-gradient(135deg, 
    rgba(255, 255, 255, 0.85) 0%, 
    rgba(248, 250, 252, 0.8) 100%); /* Meno opaco */
  padding: 0.5rem 1rem; /* Padding ridotto */
  border-radius: 8px;
  border: 1px solid rgba(30, 58, 138, 0.15);
  box-shadow: 
    0 4px 16px rgba(30, 58, 138, 0.1),
    0 1px 4px rgba(0, 0, 0, 0.05);
  max-width: 200px; /* Larghezza massima per evitare sovrapposizioni */
  font-size: 0.8rem; /* Testo più piccolo */
}

[data-theme="dark"] .legal-article-text {
  color: rgba(96, 165, 250, 0.9); /* Molto più visibile */
  text-shadow: 0 3px 12px rgba(96, 165, 250, 0.4);
  background: rgba(30, 41, 59, 0.3);
  border-color: rgba(96, 165, 250, 0.4);
}

/* Floating Legal Symbols - CORRECTED */
.floating-legal-symbols {
  position: absolute;
  width: 100%;
  height: 100%;
  z-index: 3; /* Sopra i testi ma sotto il contenuto */
}

.legal-symbol {
  position: absolute;
  font-size: 1.8rem; /* Ridotta dimensione */
  color: #1e40af;
  opacity: 0;
  animation: symbolFloat 12s ease-in-out infinite;
  filter: drop-shadow(0 3px 10px rgba(30, 64, 175, 0.2)); /* Ombra ridotta */
  background: linear-gradient(135deg, 
    rgba(255, 255, 255, 0.8) 0%, 
    rgba(248, 250, 252, 0.75) 100%); /* Meno opaco */
  padding: 0.8rem; /* Padding ridotto */
  border-radius: 50%;
  border: 2px solid rgba(30, 64, 175, 0.2); /* Bordo più sottile */
  box-shadow: 
    0 6px 20px rgba(30, 64, 175, 0.1),
    0 2px 6px rgba(0, 0, 0, 0.05);
}

[data-theme="dark"] .legal-symbol {
  color: rgba(96, 165, 250, 0.8); /* Molto più visibile */
  filter: drop-shadow(0 4px 16px rgba(96, 165, 250, 0.3));
  background: rgba(30, 41, 59, 0.2);
  border-color: rgba(96, 165, 250, 0.5);
}

/* Legal Grid Pattern */
.legal-grid-pattern {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  opacity: 0.08;
  background-image: 
    linear-gradient(rgba(30, 64, 175, 0.15) 1px, transparent 1px),
    linear-gradient(90deg, rgba(30, 64, 175, 0.15) 1px, transparent 1px);
  background-size: 50px 50px;
  animation: gridShift 20s linear infinite;
}

[data-theme="dark"] .legal-grid-pattern {
  background-image: 
    linear-gradient(rgba(96, 165, 250, 0.3) 1px, transparent 1px),
    linear-gradient(90deg, rgba(96, 165, 250, 0.3) 1px, transparent 1px);
  opacity: 0.15; /* Più visibile */
}

/* Document Shapes */
.document-shapes {
  position: absolute;
  width: 100%;
  height: 100%;
}

.document-shape {
  position: absolute;
  background: linear-gradient(135deg, 
    rgba(255, 255, 255, 0.7) 0%, 
    rgba(248, 250, 252, 0.65) 50%, 
    rgba(241, 245, 249, 0.7) 100%); /* Meno opaco */
  border: 1px solid rgba(30, 64, 175, 0.15); /* Bordo più sottile */
  border-radius: 12px; /* Bordo meno arrotondato */
  opacity: 0;
  animation: documentFloat 18s ease-in-out infinite;
  backdrop-filter: blur(4px); /* Blur ridotto */
  box-shadow: 
    0 6px 20px rgba(30, 64, 175, 0.08),
    0 2px 6px rgba(0, 0, 0, 0.04);
  z-index: 2; /* Stesso livello dei testi */
}

[data-theme="dark"] .document-shape {
  background: linear-gradient(135deg, 
    rgba(96, 165, 250, 0.2) 0%, 
    rgba(96, 165, 250, 0.1) 50%, 
    rgba(96, 165, 250, 0.2) 100%); /* Più visibile */
  border-color: rgba(96, 165, 250, 0.5);
  box-shadow: 0 8px 32px rgba(96, 165, 250, 0.2);
}

/* Document Shape Positions & Sizes - Ridistribuite */
.doc-1 {
  top: 5%;
  left: 75%;
  width: 80px;
  height: 110px;
  animation-delay: 1s;
  transform: rotate(-12deg);
}

.doc-2 {
  bottom: 25%;
  right: 75%;
  width: 70px;
  height: 100px;
  animation-delay: 7s;
  transform: rotate(15deg);
}

.doc-3 {
  bottom: 5%;
  left: 75%;
  width: 60px;
  height: 90px;
  animation-delay: 13s;
  transform: rotate(-10deg);
}

/* ========================================
   ANIMATION KEYFRAMES
   ======================================== */

@keyframes legalTextFlow {
  0%, 15%, 85%, 100% { 
    opacity: 0;
    transform: translateY(20px) scale(0.95);
  }
  20%, 80% { 
    opacity: 1; /* Sempre completamente visibile */
    transform: translateY(0) scale(1);
  }
  50% {
    opacity: 1; /* Rimane visibile anche al centro */
    transform: translateY(-5px) scale(1.02);
  }
}

@keyframes symbolFloat {
  0%, 10%, 90%, 100% { 
    opacity: 0;
    transform: translateY(15px) rotate(0deg) scale(0.9);
  }
  15%, 85% { 
    opacity: 1; /* Sempre completamente visibile */
    transform: translateY(0) rotate(0deg) scale(1);
  }
  50% {
    opacity: 1; /* Rimane visibile */
    transform: translateY(-8px) rotate(5deg) scale(1.05);
  }
}

@keyframes gridShift {
  0% { 
    transform: translate(0, 0);
  }
  25% { 
    transform: translate(-2px, -2px);
  }
  50% { 
    transform: translate(-4px, 0);
  }
  75% { 
    transform: translate(-2px, -4px);
  }
  100% { 
    transform: translate(0, 0);
  }
}

@keyframes documentFloat {
  0%, 5%, 95%, 100% { 
    opacity: 0;
    transform: translateY(30px) scale(0.8);
  }
  10%, 90% { 
    opacity: 1; /* Molto più visibile */
    transform: translateY(0) scale(1);
  }
  50% {
    opacity: 0.9; /* Rimane ben visibile */
    transform: translateY(-10px) scale(1.05);
  }
}

/* ========================================
   RESPONSIVE ADJUSTMENTS
   ======================================== */

@media (max-width: 768px) {
  .legal-hero-background {
    opacity: 0.4;
  }
  
  /* Nascondi completamente i testi su mobile per evitare sovrapposizioni */
  .legal-article-text {
    display: none !important;
  }
  
  .legal-symbol {
    font-size: 1.5rem;
    /* Forza posizionamento sicuro su mobile */
    top: 5% !important;
    bottom: auto !important;
    left: auto !important;
    right: 5% !important;
  }
  
  .legal-symbol:nth-child(2) {
    top: auto !important;
    bottom: 5% !important;
    left: 5% !important;
    right: auto !important;
  }
  
  .legal-symbol:nth-child(3),
  .legal-symbol:nth-child(4) {
    display: none; /* Mostra solo 2 simboli su mobile */
  }
  
  .document-shape {
    width: 40px !important;
    height: 60px !important;
  }
  
  .legal-grid-pattern {
    background-size: 30px 30px;
    opacity: 0.02;
  }
  
  .legal-svg {
    display: none; /* Nascondi SVG su mobile per pulizia */
  }
  
  .code-line {
    display: none; /* Nascondi linee su mobile */
  }
  
  /* Aumenta il padding del contenuto su mobile */
  .hero-content-center {
    padding: 2rem 1rem !important;
    background: transparent !important; /* COMPLETAMENTE TRASPARENTE */
  }
  
  [data-theme="dark"] .hero-content-center {
    background: transparent !important; /* COMPLETAMENTE TRASPARENTE */
  }
}

@media (max-width: 480px) {
  .legal-hero-background {
    opacity: 0.25; /* Ancora più sottile su schermi piccoli */
  }
  
  /* Su schermi molto piccoli mostra solo elementi essenziali */
  .legal-symbol {
    font-size: 1rem;
    padding: 0.5rem !important;
  }
  
  .legal-symbol:nth-child(1) {
    top: 3% !important;
    right: 3% !important;
  }
  
  .legal-symbol:nth-child(2) {
    bottom: 3% !important;
    left: 3% !important;
  }
  
  .document-shape {
    width: 30px !important;
    height: 40px !important;
  }
  
  /* Massima priorità al contenuto */
  .hero-content-center {
    padding: 1.5rem 0.75rem !important;
    margin: 1rem !important;
    background: transparent !important; /* COMPLETAMENTE TRASPARENTE */
    box-shadow: none !important; /* NESSUNA OMBRA */
  }
  
  [data-theme="dark"] .hero-content-center {
    background: transparent !important; /* COMPLETAMENTE TRASPARENTE */
    box-shadow: none !important; /* NESSUNA OMBRA */
  }
}

/* ========================================
   ADVANCED SVG LEGAL ELEMENTS
   ======================================== */

.legal-svg-elements {
  position: absolute;
  width: 100%;
  height: 100%;
}

.legal-svg {
  position: absolute;
  color: #1e40af; /* Blu navy elegante */
  opacity: 0;
  animation: svgFloat 16s ease-in-out infinite;
  filter: drop-shadow(0 8px 24px rgba(30, 64, 175, 0.25));
  background: linear-gradient(135deg, 
    rgba(255, 255, 255, 0.95) 0%, 
    rgba(248, 250, 252, 0.9) 100%); /* Sfondo bianco premium */
  padding: 1.2rem;
  border-radius: 16px;
  border: 2px solid rgba(30, 64, 175, 0.3);
  backdrop-filter: blur(12px);
  box-shadow: 
    0 16px 48px rgba(30, 64, 175, 0.15),
    0 6px 16px rgba(0, 0, 0, 0.1),
    inset 0 2px 0 rgba(255, 255, 255, 0.9);
}

[data-theme="dark"] .legal-svg {
  color: rgba(96, 165, 250, 0.9); /* Molto più visibile */
  filter: drop-shadow(0 6px 24px rgba(96, 165, 250, 0.4));
  background: rgba(30, 41, 59, 0.3);
  border-color: rgba(96, 165, 250, 0.6);
}

/* Legal Code Lines */
.legal-code-lines {
  position: absolute;
  width: 100%;
  height: 100%;
}

.code-line {
  position: absolute;
  height: 4px;
  background: linear-gradient(
    90deg, 
    transparent 0%, 
    rgba(30, 64, 175, 0.3) 20%, 
    rgba(30, 64, 175, 0.6) 50%, /* Blu elegante */
    rgba(30, 64, 175, 0.3) 80%, 
    transparent 100%
  );
  opacity: 0;
  animation: codeLineFlow 12s ease-in-out infinite;
  border-radius: 4px;
  box-shadow: 
    0 4px 12px rgba(30, 64, 175, 0.2),
    0 1px 3px rgba(0, 0, 0, 0.1);
}

[data-theme="dark"] .code-line {
  background: linear-gradient(
    90deg, 
    transparent 0%, 
    rgba(96, 165, 250, 0.5) 20%, 
    rgba(96, 165, 250, 0.8) 50%, /* Più visibile */
    rgba(96, 165, 250, 0.5) 80%, 
    transparent 100%
  );
  box-shadow: 0 2px 8px rgba(96, 165, 250, 0.4);
}

/* ========================================
   ADDITIONAL ANIMATION KEYFRAMES
   ======================================== */

@keyframes svgFloat {
  0%, 8%, 92%, 100% { 
    opacity: 0;
    transform: translateY(25px) rotate(-3deg) scale(0.85);
  }
  12%, 88% { 
    opacity: 1; /* Sempre completamente visibile */
    transform: translateY(0) rotate(0deg) scale(1);
  }
  50% {
    opacity: 1; /* Rimane completamente visibile */
    transform: translateY(-12px) rotate(2deg) scale(1.08);
  }
}

@keyframes codeLineFlow {
  0%, 12%, 88%, 100% { 
    opacity: 0;
    transform: scaleX(0) translateY(5px);
  }
  16%, 84% { 
    opacity: 1; /* Sempre completamente visibile */
    transform: scaleX(1) translateY(0);
  }
  50% {
    opacity: 1; /* Rimane completamente visibile */
    transform: scaleX(1.1) translateY(-2px);
  }
}

/* ========================================
   ENHANCED RESPONSIVE DESIGN
   ======================================== */

@media (max-width: 768px) {
  .legal-svg {
    transform: scale(0.7);
  }
  
  .code-line {
    width: 80px !important;
    opacity: 0.5;
  }
  
  .legal-svg-elements {
    opacity: 0.6;
  }
}

@media (max-width: 480px) {
  .legal-svg {
    transform: scale(0.5);
  }
  
  .code-line {
    width: 60px !important;
    display: none; /* Hide on very small screens */
  }
  
  .legal-svg-elements {
    opacity: 0.4;
  }
}

/* ========================================
   LIGHT MODE PREMIUM ENHANCEMENTS
   ======================================== */

/* Subtle shimmer effect for light mode elements */
.legal-article-text::before,
.legal-symbol::before,
.document-shape::before,
.legal-svg::before {
  content: '';
  position: absolute;
  top: -2px;
  left: -2px;
  right: -2px;
  bottom: -2px;
  background: linear-gradient(
    45deg,
    transparent 30%,
    rgba(30, 64, 175, 0.1) 50%,
    transparent 70%
  );
  border-radius: inherit;
  opacity: 0;
  animation: lightModeShimmer 6s ease-in-out infinite;
  z-index: -1;
}

[data-theme="dark"] .legal-article-text::before,
[data-theme="dark"] .legal-symbol::before,
[data-theme="dark"] .document-shape::before,
[data-theme="dark"] .legal-svg::before {
  display: none; /* Nascondi shimmer nel tema dark */
}

/* Subtle floating particles for light mode */
.legal-hero-background::after {
  content: '';
  position: absolute;
  width: 100%;
  height: 100%;
  background-image: 
    radial-gradient(circle at 20% 30%, rgba(30, 64, 175, 0.03) 0%, transparent 1%),
    radial-gradient(circle at 70% 60%, rgba(30, 64, 175, 0.05) 0%, transparent 1%),
    radial-gradient(circle at 40% 80%, rgba(30, 64, 175, 0.04) 0%, transparent 1%),
    radial-gradient(circle at 90% 20%, rgba(30, 64, 175, 0.03) 0%, transparent 1%),
    radial-gradient(circle at 15% 70%, rgba(30, 64, 175, 0.06) 0%, transparent 1%);
  background-size: 
    300px 300px,
    250px 250px,
    200px 200px,
    350px 350px,
    180px 180px;
  animation: lightModeFloatingParticles 20s ease-in-out infinite;
  opacity: 0.6;
  z-index: 2;
  pointer-events: none;
}

[data-theme="dark"] .legal-hero-background::after {
  display: none; /* Nascondi particles nel tema dark */
}

/* ========================================
   LIGHT MODE ANIMATIONS
   ======================================== */

@keyframes lightModeShimmer {
  0%, 90%, 100% { 
    opacity: 0; 
    transform: translateX(-100%); 
  }
  45%, 55% { 
    opacity: 1; 
    transform: translateX(100%); 
  }
}

@keyframes lightModeFloatingParticles {
  0%, 100% { 
    transform: translate(0, 0) rotate(0deg); 
    opacity: 0.6; 
  }
  33% { 
    transform: translate(-10px, -5px) rotate(1deg); 
    opacity: 0.8; 
  }
  66% { 
    transform: translate(5px, -8px) rotate(-1deg); 
    opacity: 0.4; 
  }
}

/* Performance Optimization */
@media (prefers-reduced-motion: reduce) {
  .legal-article-text,
  .legal-symbol,
  .document-shape,
  .legal-svg,
  .code-line {
    animation: none;
    opacity: 0.7 !important;
  }
  
  .legal-grid-pattern {
    animation: none;
  }
  
  .legal-article-text::before,
  .legal-symbol::before,
  .document-shape::before,
  .legal-svg::before {
    animation: none;
    opacity: 0 !important;
  }
  
  .legal-hero-background::after {
    animation: none;
  }
}

/* Theme-Aware Card Styles */
.card {
  background-color: var(--card-bg);
  border: 1px solid var(--border-primary);
  box-shadow: var(--card-shadow);
}

.category-card {
  background: var(--card-bg);
  border: 1px solid var(--border-primary);
}

[data-theme="dark"] .category-card {
  background: linear-gradient(145deg, var(--card-bg) 0%, var(--bg-tertiary) 100%);
}

[data-theme="dark"] .category-card::before {
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.1), transparent);
}

.article-card {
  background: var(--card-bg);
  border: 1px solid var(--border-primary);
}

[data-theme="dark"] .article-card {
  background: linear-gradient(145deg, var(--card-bg) 0%, var(--bg-tertiary) 100%);
}

/* Theme-Aware Section Backgrounds */
.bg-light {
  background-color: var(--bg-secondary) !important;
}

/* Theme-Aware Text Colors */
.text-dark {
  color: var(--text-primary) !important;
}

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

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

.text-tertiary {
  color: var(--text-tertiary) !important;
}

.text-muted {
  color: var(--text-tertiary) !important;
}

/* Link Colors */
a {
  color: var(--primary-color);
  text-decoration: none;
}

a:hover {
  color: var(--secondary-color);
}

/* Footer Links */
footer a {
  color: var(--text-secondary);
  transition: color 0.3s ease;
}

footer a:hover {
  color: var(--text-light);
}

/* Small Text */
small {
  color: var(--text-tertiary);
}

/* Lead Text */
.lead {
  color: var(--text-secondary);
}

/* Card Titles */
.card-title {
  color: var(--text-primary);
}

.card-title a {
  color: var(--text-primary) !important;
  transition: color 0.3s ease;
}

.card-title a:hover {
  color: var(--primary-color) !important;
}

/* Article Links */
.article-link {
  color: var(--text-primary) !important;
  transition: color 0.3s ease;
}

.article-link:hover {
  color: var(--primary-color) !important;
}

/* Badge Contrast */
.badge {
  color: white !important;
}

/* Icon Colors */
.text-primary i,
.text-secondary i,
.text-tertiary i {
  color: inherit;
}

/* Theme-Aware Footer */
footer {
  background-color: var(--footer-bg) !important;
}

/* Breadcrumb Theme Support */
.breadcrumb-item a {
  color: var(--text-secondary);
  text-decoration: none;
}

.breadcrumb-item a:hover {
  color: var(--primary-color);
}

.breadcrumb-item.active {
  color: var(--text-tertiary);
}

/* Modal Theme Support */
.modal-content {
  background-color: var(--card-bg);
  border: 1px solid var(--border-primary);
}

.modal-header {
  border-bottom: 1px solid var(--border-primary);
}

.modal-title {
  color: var(--text-primary);
}

/* Form Theme Support */
.form-control {
  background-color: var(--bg-primary);
  border-color: var(--border-primary);
  color: var(--text-primary);
}

.form-control:focus {
  background-color: var(--bg-primary);
  border-color: var(--primary-color);
  color: var(--text-primary);
  box-shadow: 0 0 0 0.2rem rgba(30, 64, 175, 0.25);
}

/* Placeholder Image Theme Support */
.placeholder-image,
.placeholder-image-list {
  background: var(--bg-tertiary);
  border: 2px dashed var(--border-secondary);
  color: var(--text-tertiary);
}

/* Theme Toggle Button Styles */
.theme-toggle {
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
  color: var(--text-light);
  border-radius: 50px;
  padding: 0.5rem 1rem;
  transition: all 0.3s ease;
  backdrop-filter: blur(10px);
  display: flex;
  align-items: center;
  gap: 0.5rem;
  cursor: pointer;
  font-size: 0.9rem;
  font-weight: 500;
}

.theme-toggle:hover {
  background: rgba(255, 255, 255, 0.15);
  border-color: rgba(255, 255, 255, 0.3);
  transform: translateY(-1px);
  color: var(--text-light);
}

.theme-toggle i {
  font-size: 1rem;
  transition: transform 0.3s ease;
}

.theme-toggle:hover i {
  transform: rotate(180deg);
}

/* Dark theme carousel arrows */
[data-theme="dark"] .carousel-arrow {
  background: linear-gradient(145deg, rgba(30, 41, 59, 0.95) 0%, rgba(51, 65, 85, 0.9) 100%);
  color: var(--text-light);
  border: 1px solid var(--border-primary);
}

[data-theme="dark"] .carousel-arrow:hover {
  background: linear-gradient(145deg, var(--bg-tertiary) 0%, var(--bg-secondary) 100%);
  color: var(--text-light);
}

/* Print Styles */
@media print {
  .navbar,
  .sidebar,
  footer,
  .social-share,
  .theme-toggle {
    display: none !important;
  }
  
  .main-content {
    padding-top: 0;
  }
  
  body {
    background: white !important;
    color: black !important;
  }
  
  .card {
    border: 1px solid #ddd !important;
    background: white !important;
  }
}
