:root {
    /* Modern Color System with improved contrast ratios */
    --primary-color: #1e40af;
    --primary-dark: #1e3a8a;
    --primary-light: #3b82f6;
    --primary-gradient: linear-gradient(135deg, #1e40af 0%, #3b82f6 100%);
    --secondary-color: #7c3aed;
    --secondary-gradient: linear-gradient(135deg, #7c3aed 0%, #a855f7 100%);
    --success-color: #16a34a;
    --danger-color: #dc2626;
    --warning-color: #ea580c;
    --info-color: #0891b2;
    
    /* Enhanced Text Colors */
    --text-primary: #111827;
    --text-secondary: #4b5563;
    --text-light: #6b7280;
    --text-accent: #1e40af;
    
    /* Advanced Background System */
    --bg-primary: #ffffff;
    --bg-secondary: #f9fafb;
    --bg-tertiary: #f3f4f6;
    --bg-accent: linear-gradient(135deg, #f8fafc 0%, #f1f5f9 100%);
    --bg-card: rgba(255, 255, 255, 0.8);
    --bg-glass: rgba(255, 255, 255, 0.1);
    
    /* Fluid Border Radius System */
    --border-color: #e5e7eb;
    --border-radius-xs: clamp(4px, 0.5vw, 6px);
    --border-radius-sm: clamp(6px, 1vw, 8px);
    --border-radius: clamp(8px, 1.5vw, 12px);
    --border-radius-lg: clamp(12px, 2vw, 16px);
    --border-radius-xl: clamp(16px, 3vw, 24px);
    --border-radius-full: 9999px;
    
    /* Modern Shadow System */
    --shadow-xs: 0 1px 2px 0 rgb(0 0 0 / 0.03);
    --shadow-sm: 0 1px 3px 0 rgb(0 0 0 / 0.05), 0 1px 2px 0 rgb(0 0 0 / 0.04);
    --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.08), 0 2px 4px -1px rgb(0 0 0 / 0.06);
    --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -2px rgb(0 0 0 / 0.06);
    --shadow-xl: 0 20px 25px -5px rgb(0 0 0 / 0.1), 0 10px 10px -5px rgb(0 0 0 / 0.04);
    --shadow-2xl: 0 25px 50px -12px rgb(0 0 0 / 0.25);
    --shadow-inner: inset 0 2px 4px 0 rgb(0 0 0 / 0.06);
    --shadow-glow: 0 0 20px rgb(30 64 175 / 0.15);
    
    /* Fluid Typography System */
    --font-size-xs: clamp(0.75rem, 0.8vw, 0.875rem);
    --font-size-sm: clamp(0.875rem, 0.9vw, 1rem);
    --font-size-base: clamp(1rem, 1.1vw, 1.125rem);
    --font-size-lg: clamp(1.125rem, 1.3vw, 1.25rem);
    --font-size-xl: clamp(1.25rem, 1.5vw, 1.5rem);
    --font-size-2xl: clamp(1.5rem, 2vw, 2rem);
    --font-size-3xl: clamp(1.875rem, 2.5vw, 2.5rem);
    --font-size-4xl: clamp(2.25rem, 3vw, 3rem);
    --font-size-5xl: clamp(3rem, 4vw, 4rem);
    
    /* Fluid Line Heights */
    --line-height-tight: 1.25;
    --line-height-base: clamp(1.4, 0.4vw + 1.4, 1.6);
    --line-height-relaxed: clamp(1.6, 0.2vw + 1.6, 1.8);
    --line-height-loose: clamp(1.8, 0.2vw + 1.8, 2);
    
    /* Fluid Spacing System */
    --space-xs: clamp(0.25rem, 0.5vw, 0.5rem);
    --space-sm: clamp(0.5rem, 1vw, 0.75rem);
    --space-md: clamp(0.75rem, 1.5vw, 1rem);
    --space-lg: clamp(1rem, 2vw, 1.5rem);
    --space-xl: clamp(1.5rem, 3vw, 2rem);
    --space-2xl: clamp(2rem, 4vw, 3rem);
    --space-3xl: clamp(3rem, 6vw, 4rem);
    --space-4xl: clamp(4rem, 8vw, 6rem);
    
    /* Container System */
    --container-xs: 320px;
    --container-sm: 640px;
    --container-md: 768px;
    --container-lg: 1024px;
    --container-xl: 1280px;
    --container-2xl: 1536px;
    --container-fluid: min(100% - 2rem, var(--container-2xl));
    
    /* Animation System */
    --duration-fast: 150ms;
    --duration-normal: 250ms;
    --duration-slow: 350ms;
    --ease-in: cubic-bezier(0.4, 0, 1, 1);
    --ease-out: cubic-bezier(0, 0, 0.2, 1);
    --ease-in-out: cubic-bezier(0.4, 0, 0.2, 1);
    --ease-bounce: cubic-bezier(0.68, -0.55, 0.265, 1.55);
}

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

html {
    scroll-behavior: smooth;
    font-size: 100%;
    overflow-x: hidden;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', system-ui, sans-serif;
    font-size: var(--font-size-base);
    line-height: var(--line-height-base);
    font-weight: 400;
    color: var(--text-primary);
    background: linear-gradient(135deg, #f8fafc 0%, #e2e8f0 50%, #f1f5f9 100%);
    min-height: 100vh;
    min-height: 100dvh; /* Dynamic viewport height */
    display: flex;
    flex-direction: column;
    font-feature-settings: 'kern' 1, 'liga' 1, 'calt' 1;
    text-rendering: optimizeLegibility;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    transition: 
        font-size var(--duration-normal) var(--ease-out),
        font-family var(--duration-normal) var(--ease-out),
        background var(--duration-normal) var(--ease-out);
}

/* Enhanced focus management for accessibility */
:focus {
    outline: 3px solid var(--primary-color);
    outline-offset: 2px;
    border-radius: var(--border-radius-sm);
}

:focus:not(:focus-visible) {
    outline: none;
}

:focus-visible {
    outline: 3px solid var(--primary-color);
    outline-offset: 2px;
}

/* Smooth scroll enhancement for reduced motion preferences */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
    
    html {
        scroll-behavior: auto;
    }
}

/* Fluid Font Size Classes */
body.font-small {
    --font-size-base: var(--font-size-sm);
}

body.font-normal {
    --font-size-base: clamp(1rem, 1.1vw, 1.125rem);
}

body.font-large {
    --font-size-base: var(--font-size-lg);
}

body.font-xlarge {
    --font-size-base: var(--font-size-xl);
}

body.font-xxlarge {
    --font-size-base: var(--font-size-2xl);
}

/* Easy Read Mode */
body.easy-read {
    font-family: 'Atkinson Hyperlegible', Arial, sans-serif;
    --line-height-base: 1.8;
    letter-spacing: 0.02em;
    word-spacing: 0.1em;
}

body.easy-read p,
body.easy-read li {
    max-width: 65ch;
    margin-bottom: 1.5rem;
}

body.easy-read .card {
    border: 3px solid var(--border-color);
}

/* Dyslexia-Friendly Font */
body.dyslexia-font {
    font-family: 'OpenDyslexic', Arial, sans-serif;
    letter-spacing: 0.1em;
    word-spacing: 0.16em;
    line-height: 2;
}

/* High Contrast Mode */
body.high-contrast {
    --primary-color: #000000;
    --text-primary: #000000;
    --bg-primary: #ffffff;
    --bg-secondary: #ffffff;
    --bg-tertiary: #ffffff;
    background: #ffffff !important;
}

body.high-contrast * {
    background-color: #ffffff !important;
    color: #000000 !important;
    border-color: #000000 !important;
}

body.high-contrast a {
    text-decoration: underline !important;
    font-weight: bold !important;
}

body.high-contrast .btn {
    border: 3px solid #000000 !important;
    font-weight: bold !important;
}

body.high-contrast .btn:hover,
body.high-contrast .btn:focus {
    background-color: #000000 !important;
    color: #ffffff !important;
}

/* Modern Floating Accessibility Widget */
.accessibility-widget {
    position: fixed;
    bottom: var(--space-lg);
    right: var(--space-lg);
    z-index: 9999;
    isolation: isolate;
}

.widget-toggle {
    width: clamp(56px, 8vw, 64px);
    height: clamp(56px, 8vw, 64px);
    border-radius: var(--border-radius-full);
    background: var(--primary-gradient);
    color: white;
    border: none;
    box-shadow: var(--shadow-xl), var(--shadow-glow);
    cursor: pointer;
    font-size: clamp(1.25rem, 2vw, 1.5rem);
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
    transition: 
        transform var(--duration-normal) var(--ease-out),
        box-shadow var(--duration-normal) var(--ease-out),
        filter var(--duration-normal) var(--ease-out);
    animation: float 3s ease-in-out infinite;
}

.widget-toggle::before {
    content: '';
    position: absolute;
    inset: 0;
    background: radial-gradient(circle at center, transparent 0%, rgba(255, 255, 255, 0.1) 100%);
    border-radius: inherit;
    opacity: 0;
    transition: opacity var(--duration-normal) var(--ease-out);
}

.widget-toggle:hover::before,
.widget-toggle:focus::before {
    opacity: 1;
}

@keyframes float {
    0%, 100% {
        transform: translateY(0) scale(1);
        box-shadow: var(--shadow-xl), var(--shadow-glow);
    }
    50% {
        transform: translateY(-4px) scale(1.02);
        box-shadow: var(--shadow-2xl), 0 0 30px rgb(30 64 175 / 0.25);
    }
}

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

.widget-toggle:active {
    transform: translateY(0) scale(0.98);
    transition-duration: var(--duration-fast);
}

.widget-panel {
    position: absolute;
    bottom: calc(100% + var(--space-md));
    right: 0;
    background: white;
    border: 1px solid rgba(30, 64, 175, 0.2);
    border-radius: var(--border-radius-xl);
    box-shadow: var(--shadow-2xl);
    padding: var(--space-xl);
    min-width: clamp(280px, 30vw, 380px);
    max-width: 90vw;
    opacity: 0;
    visibility: hidden;
    transform: translateY(var(--space-lg)) scale(0.9);
    transition: 
        opacity var(--duration-slow) var(--ease-out),
        visibility var(--duration-slow) var(--ease-out),
        transform var(--duration-slow) var(--ease-bounce);
    transform-origin: bottom right;
}

.accessibility-widget.open .widget-panel {
    opacity: 1;
    visibility: visible;
    transform: translateY(0) scale(1);
}

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

.widget-title {
    font-size: 1.125rem;
    font-weight: 600;
    margin-bottom: 1rem;
    padding-bottom: 0.75rem;
    border-bottom: 2px solid var(--border-color);
}

.widget-controls {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.widget-btn {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem;
    background: var(--bg-tertiary);
    border: 2px solid transparent;
    border-radius: var(--border-radius);
    cursor: pointer;
    transition: all 0.2s;
    font-size: 0.95rem;
}

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

.widget-btn.active {
    background: var(--primary-color);
    color: white;
}

.widget-btn i {
    font-size: 1.2rem;
    width: 24px;
}

/* UserWay-Style Sliding Accessibility Widget */
.widget-panel {
    position: fixed;
    top: 0;
    right: -320px;
    width: 320px;
    height: 100vh;
    background: white;
    box-shadow: -3px 0 15px rgba(0, 0, 0, 0.1);
    border-left: 1px solid #e0e6ed;
    transition: right 0.3s ease-in-out;
    z-index: 10000;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
}


.widget-header {
    background: #1e40af;
    color: white;
    padding: 1rem 1.25rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-shrink: 0;
    box-shadow: 0 2px 8px rgba(30, 64, 175, 0.15);
}

.widget-title {
    font-size: 1rem;
    font-weight: 500;
    margin: 0;
    color: white;
    opacity: 0.9;
}

.widget-close {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.15);
    border: none;
    color: white;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
    font-size: 1rem;
}

.widget-close:hover {
    background: rgba(255, 255, 255, 0.25);
    transform: scale(1.05);
}

.widget-controls {
    flex: 1;
    padding: 1.5rem 1rem;
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    overflow-y: auto;
}

/* Responsive Grid Layout */
.controls-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.75rem;
}

/* 3 columns on tablets and larger screens */
@media (min-width: 768px) {
    .controls-grid {
        grid-template-columns: 1fr 1fr 1fr;
    }
    
    /* Larger widget panel for tablets+ */
    .widget-panel {
        min-width: 380px;
        padding: 2rem;
    }
    
    /* Bigger buttons for tablets+ */
    .control-btn {
        height: 80px;
        padding: 0.75rem;
        font-size: 0.875rem;
        gap: 0.25rem;
    }
    
    /* Larger icons in buttons */
    .control-btn i {
        font-size: 1.5rem;
    }
    
    /* More padding in controls */
    .widget-controls {
        padding: 2rem 1.5rem;
        gap: 1rem;
    }
}

/* Control Buttons - Compact UserWay Style */
.control-btn {
    height: 64px;
    padding: 0.5rem;
    background: #f8f9fa;
    border: 1px solid #e0e6ed;
    border-radius: 8px;
    cursor: pointer;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.125rem;
    font-size: 0.75rem;
    font-weight: 500;
    color: #4a5568;
    transition: all 0.2s;
    text-align: center;
    position: relative;
    box-sizing: border-box;
}

.control-btn:hover {
    background: #e6f3ff;
    border-color: #0066ff;
    color: #0066ff;
    transform: translateY(-1px);
}

.control-btn.active {
    background: #0066ff;
    color: white;
    border-color: #0052cc;
}

.control-btn i {
    font-size: 1.25rem;
    line-height: 1;
    margin: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.btn-label {
    font-size: 0.75rem;
    line-height: 1.1;
    margin: 0;
    text-align: center;
    display: block;
    width: 100%;
}

/* Multi-level button indicators */
.level-indicator {
    position: absolute;
    bottom: 4px;
    right: 6px;
    display: flex;
    gap: 2px;
}

.level-indicator::before {
    content: '';
    width: 4px;
    height: 4px;
    border-radius: 50%;
    background: rgba(74, 85, 104, 0.3);
}

.multi-btn[data-level="1"] .level-indicator::before {
    background: #fbbf24;
    box-shadow: 6px 0 0 rgba(74, 85, 104, 0.3), 12px 0 0 rgba(74, 85, 104, 0.3);
}

.multi-btn[data-level="2"] .level-indicator::before {
    background: #f59e0b;
    box-shadow: 6px 0 0 #fbbf24, 12px 0 0 rgba(74, 85, 104, 0.3);
}

.multi-btn[data-level="3"] .level-indicator::before {
    background: #d97706;
    box-shadow: 6px 0 0 #f59e0b, 12px 0 0 #fbbf24;
}

.multi-btn.active[data-level="1"] .level-indicator::before {
    background: white;
    box-shadow: 6px 0 0 rgba(255, 255, 255, 0.3), 12px 0 0 rgba(255, 255, 255, 0.3);
}

.multi-btn.active[data-level="2"] .level-indicator::before {
    background: white;
    box-shadow: 6px 0 0 white, 12px 0 0 rgba(255, 255, 255, 0.3);
}

.multi-btn.active[data-level="3"] .level-indicator::before {
    background: white;
    box-shadow: 6px 0 0 white, 12px 0 0 white;
}

/* Text Alignment Section */
.alignment-section {
    margin-top: 1rem;
}

.section-title {
    font-size: 0.875rem;
    font-weight: 600;
    color: #4a5568;
    margin: 0 0 0.75rem 0;
    padding-bottom: 0.5rem;
    border-bottom: 1px solid #e0e6ed;
}

.alignment-buttons {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 0.5rem;
}

.align-btn {
    height: 48px;
    padding: 0;
    background: #f8f9fa;
    border: 1px solid #e0e6ed;
    border-radius: 6px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
    color: #4a5568;
    transition: all 0.2s;
    box-sizing: border-box;
}

.align-btn i {
    line-height: 1;
    margin: 0;
    display: flex;
    align-items: center;
    justify-content: center;
}

.align-btn:hover {
    background: #e6f3ff;
    border-color: #0066ff;
    color: #0066ff;
}

.align-btn.active {
    background: #0066ff;
    color: white;
    border-color: #0052cc;
}

/* Action Buttons */
.action-buttons {
    margin-top: 1rem;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.action-btn {
    width: 100%;
    height: 44px;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.875rem;
    font-weight: 500;
    transition: all 0.2s;
}

.print-btn {
    background: #16a34a;
    color: white;
}

.print-btn:hover {
    background: #15803d;
    transform: translateY(-1px);
}

.reset-btn {
    background: #dc2626;
    color: white;
}

.reset-btn:hover {
    background: #b91c1c;
    transform: translateY(-1px);
}

/* Responsive Design - No Overlay */
@media (max-width: 768px) {
    .widget-panel {
        width: 280px;
        right: -280px;
    }
    
    .widget-controls {
        padding: 1rem 0.75rem;
        gap: 1rem;
    }
    
    .control-btn {
        height: 56px;
        padding: 0.375rem;
        gap: 0.125rem;
    }
    
    .control-btn i {
        font-size: 1.1rem;
        line-height: 1;
        margin: 0;
    }
    
    .btn-label {
        font-size: 0.7rem;
        line-height: 1.1;
    }
    
    .align-btn {
        height: 44px;
    }
    
    .align-btn i {
        font-size: 0.9rem;
    }
}

@media (max-width: 480px) {
    .widget-panel {
        width: 260px;
        right: -260px;
    }
    
    .widget-header {
        padding: 0.875rem 1rem;
    }
    
    .widget-title {
        font-size: 1.125rem;
    }
    
    .widget-controls {
        padding: 1rem 0.75rem;
    }
    
    .control-btn {
        height: 52px;
        padding: 0.325rem;
        gap: 0.1rem;
    }
    
    .control-btn i {
        font-size: 1rem;
        line-height: 1;
        margin: 0;
    }
    
    .btn-label {
        font-size: 0.65rem;
        line-height: 1.1;
    }
    
    .align-btn {
        height: 40px;
    }
    
    .align-btn i {
        font-size: 0.875rem;
    }
}

@media (min-width: 769px) and (max-width: 1024px) {
    .widget-panel {
        width: 300px;
        right: -300px;
    }
}

/* Skip Link */
.skip-link {
    position: absolute;
    top: -40px;
    left: 0;
    background: var(--primary-color);
    color: white;
    padding: 0.5rem 1rem;
    text-decoration: none;
    z-index: 10000;
    border-radius: 0 0 var(--border-radius) 0;
}

.skip-link:focus {
    top: 0;
}

/* Compact Header */
/* Modern Glass Header */
header {
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(20px) saturate(180%);
    -webkit-backdrop-filter: blur(20px) saturate(180%);
    border-bottom: 1px solid rgba(255, 255, 255, 0.2);
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: var(--shadow-lg);
    transition: 
        background var(--duration-normal) var(--ease-out),
        box-shadow var(--duration-normal) var(--ease-out);
}

header::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, 
        rgba(255, 255, 255, 0.1) 0%,
        rgba(255, 255, 255, 0.05) 100%);
    pointer-events: none;
}

.compact-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 0;
}

.logo-section {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.logo-icon {
    font-size: 2.5rem;
    color: var(--primary-color);
}

.site-title {
    font-family: 'Poppins', sans-serif;
    font-size: 1.75rem;
    font-weight: 700;
    color: var(--primary-color);
    margin: 0;
}

.site-tagline {
    font-size: 0.875rem;
    color: var(--text-secondary);
    margin: 0;
}

/* Mobile Menu Toggle */
.mobile-menu-toggle {
    display: none;
    background: none;
    border: 2px solid var(--primary-color);
    border-radius: var(--border-radius);
    padding: 0.5rem;
    cursor: pointer;
}

.hamburger {
    display: block;
    width: 24px;
    height: 2px;
    background: var(--primary-color);
    position: relative;
    transition: all 0.3s;
}

.hamburger::before,
.hamburger::after {
    content: '';
    position: absolute;
    width: 24px;
    height: 2px;
    background: var(--primary-color);
    left: 0;
    transition: all 0.3s;
}

.hamburger::before {
    top: -8px;
}

.hamburger::after {
    top: 8px;
}

/* Navigation */
nav {
    border-top: 1px solid var(--border-color);
}

.nav-menu {
    list-style: none;
    display: flex;
    gap: 0.5rem;
    padding: 0.5rem 0;
    margin: 0;
    flex-wrap: wrap;
}

.nav-menu li {
    margin: 0;
}

.nav-menu a {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1.25rem;
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 600;
    border-radius: var(--border-radius-lg);
    background: rgba(30, 64, 175, 0.1);
    border: 1px solid rgba(30, 64, 175, 0.2);
    transition: 
        all var(--duration-normal) var(--ease-out),
        transform var(--duration-normal) var(--ease-bounce);
}

.nav-menu a i {
    font-size: 1.1rem;
    color: inherit;
}

.nav-menu a:hover,
.nav-menu a:focus {
    background: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
    transform: translateY(-2px) scale(1.02);
    box-shadow: var(--shadow-lg);
}

.nav-menu a.active {
    background: var(--primary-gradient);
    color: white;
    border-color: var(--primary-color);
    box-shadow: var(--shadow-md);
}

.nav-menu a:active {
    transform: translateY(0) scale(1);
    transition-duration: var(--duration-fast);
}

/* Compact Search */
.compact-search {
    background: linear-gradient(135deg, #f8fafc 0%, #e2e8f0 100%);
    padding: 1.5rem 0;
    border-bottom: 1px solid rgba(30, 64, 175, 0.1);
}

.search-wrapper {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.search-box {
    max-width: 600px;
    margin: 0 auto;
    width: 100%;
}

.search-box .form-control {
    border: 2px solid var(--border-color);
    padding: 0.625rem 1rem;
}

.search-box .btn {
    padding: 0.625rem 1.25rem;
}

.quick-filters {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.quick-filters .btn {
    font-size: 0.875rem;
}

/* Content Sections */
main {
    flex: 1;
    padding: 2rem 0;
}

.content-section {
    margin-bottom: 3rem;
    scroll-margin-top: 80px;
}

.section-header {
    margin-bottom: 1.5rem;
}

.section-title {
    font-family: 'Poppins', sans-serif;
    font-size: 1.875rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 0.5rem;
}

.section-description {
    color: var(--text-secondary);
    font-size: 1.0625rem;
    line-height: 1.6;
    margin-bottom: 0;
}

/* Info Callout */
.info-callout {
    background: var(--bg-tertiary);
    border-left: 4px solid var(--primary-color);
    padding: 1rem 1.5rem;
    border-radius: var(--border-radius);
    margin-bottom: 1.5rem;
    display: flex;
    align-items: start;
    gap: 1rem;
}

.info-callout i {
    font-size: 1.5rem;
    color: var(--primary-color);
    flex-shrink: 0;
}

.info-callout p {
    margin: 0;
}

/* Emergency Section */
.emergency-section {
    background: linear-gradient(135deg, #fee2e2, #fecaca);
    padding: 2rem;
    border-radius: var(--border-radius-lg);
    border: 2px solid #fca5a5;
}

.emergency-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 1.5rem;
    margin-bottom: 1.5rem;
}

/* Modern Card Styles with Clean White Background */
.card {
    background: white;
    border: 1px solid rgba(30, 64, 175, 0.15);
    border-radius: var(--border-radius-xl);
    overflow: hidden;
    position: relative;
    isolation: isolate;
    box-shadow: var(--shadow-md);
    transition: 
        transform var(--duration-normal) var(--ease-out),
        box-shadow var(--duration-normal) var(--ease-out),
        border-color var(--duration-normal) var(--ease-out);
    will-change: transform, box-shadow;
}

.card::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, 
        rgba(255, 255, 255, 0.1) 0%,
        rgba(255, 255, 255, 0.05) 50%,
        rgba(255, 255, 255, 0) 100%);
    border-radius: inherit;
    pointer-events: none;
    z-index: -1;
}

.card:hover {
    transform: translateY(clamp(-4px, -0.5vw, -8px)) scale(1.02);
    box-shadow: var(--shadow-2xl), var(--shadow-glow);
    border-color: var(--primary-color);
}

.card:focus-within {
    transform: translateY(clamp(-4px, -0.5vw, -8px)) scale(1.02);
    box-shadow: var(--shadow-2xl), 0 0 0 3px var(--primary-color);
}

.card-header {
    padding: var(--space-lg) var(--space-xl);
    font-weight: 600;
    background: linear-gradient(135deg, 
        var(--primary-color) 0%,
        var(--primary-light) 100%);
    color: white;
    border-bottom: none;
    position: relative;
    border-radius: var(--border-radius-lg) var(--border-radius-lg) 0 0;
}

.card-header::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, 
        rgba(255, 255, 255, 0.2) 0%,
        rgba(255, 255, 255, 0.6) 50%,
        rgba(255, 255, 255, 0.2) 100%);
}

.card-header h3 {
    margin: 0;
    font-size: var(--font-size-lg);
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: var(--space-sm);
    color: white;
    line-height: var(--line-height-tight);
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
}

.card-header h3 i {
    font-size: 1.2em;
    color: rgba(255, 255, 255, 0.9);
    transition: transform var(--duration-normal) var(--ease-bounce);
}

.card:hover .card-header h3 i {
    transform: scale(1.1) rotate(5deg);
}

.card-body {
    padding: var(--space-xl);
}

.contact-item {
    display: flex;
    align-items: center;
    gap: var(--space-md);
    padding: var(--space-sm) var(--space-md);
    margin: var(--space-xs) 0;
    background: white;
    border: 1px solid rgba(30, 64, 175, 0.2);
    border-radius: var(--border-radius-lg);
    box-shadow: var(--shadow-sm);
    transition: 
        transform var(--duration-normal) var(--ease-out),
        background var(--duration-normal) var(--ease-out),
        border-color var(--duration-normal) var(--ease-out),
        box-shadow var(--duration-normal) var(--ease-out);
    position: relative;
    overflow: hidden;
}

.contact-item::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 3px;
    background: var(--primary-gradient);
    transform: scaleY(0);
    transform-origin: bottom;
    transition: transform var(--duration-normal) var(--ease-out);
}

.contact-item:hover::before {
    transform: scaleY(1);
    transform-origin: top;
}

.contact-item:hover {
    transform: translateX(var(--space-xs));
    background: rgba(30, 64, 175, 0.02);
    border-color: var(--primary-color);
    box-shadow: var(--shadow-md);
}

.contact-item i {
    color: var(--primary-color);
    width: clamp(18px, 2vw, 20px);
    height: clamp(18px, 2vw, 20px);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: clamp(14px, 1.5vw, 16px);
    transition: transform var(--duration-normal) var(--ease-bounce);
}

.contact-item:hover i {
    transform: scale(1.1) rotate(5deg);
}

.contact-item strong {
    min-width: clamp(70px, 8vw, 90px);
    font-weight: 500;
    color: var(--text-secondary);
    font-size: var(--font-size-sm);
}

/* Info Box */
.info-box {
    background: linear-gradient(135deg, 
        rgba(30, 64, 175, 0.05) 0%,
        rgba(59, 130, 246, 0.02) 100%);
    border: 1px solid rgba(30, 64, 175, 0.15);
    padding: var(--space-xl);
    border-radius: var(--border-radius-xl);
    margin-bottom: var(--space-xl);
    box-shadow: var(--shadow-sm);
}

.info-box h3 {
    font-size: 1.25rem;
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

/* Modern Services List */
.services-list {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: var(--space-sm);
}

.services-list li {
    padding: var(--space-md) var(--space-lg);
    padding-left: var(--space-2xl);
    position: relative;
    background: white;
    border: 1px solid rgba(22, 163, 74, 0.2);
    border-radius: var(--border-radius-lg);
    margin: 0;
    font-size: var(--font-size-sm);
    line-height: var(--line-height-relaxed);
    box-shadow: var(--shadow-sm);
    transition: 
        transform var(--duration-normal) var(--ease-out),
        background var(--duration-normal) var(--ease-out),
        border-color var(--duration-normal) var(--ease-out),
        box-shadow var(--duration-normal) var(--ease-out);
    overflow: hidden;
}

.services-list li::before {
    content: '';
    position: absolute;
    left: var(--space-md);
    top: 50%;
    width: clamp(14px, 1.5vw, 16px);
    height: clamp(14px, 1.5vw, 16px);
    background: var(--success-color);
    border-radius: var(--border-radius-full);
    transform: translateY(-50%) scale(0.8);
    transition: 
        transform var(--duration-normal) var(--ease-bounce),
        background var(--duration-normal) var(--ease-out);
    display: flex;
    align-items: center;
    justify-content: center;
}

.services-list li::after {
    content: '✓';
    position: absolute;
    left: var(--space-md);
    top: 50%;
    color: white;
    font-size: clamp(10px, 1vw, 11px);
    font-weight: bold;
    transform: translateY(-50%);
    z-index: 1;
}

.services-list li:hover {
    background: rgba(22, 163, 74, 0.05);
    border-color: rgba(22, 163, 74, 0.2);
    transform: translateX(var(--space-sm)) scale(1.01);
    box-shadow: var(--shadow-md);
}

.services-list li:hover::before {
    transform: translateY(-50%) scale(1.1);
    background: var(--primary-color);
}

.services-list li:focus {
    outline: 2px solid var(--primary-color);
    outline-offset: 2px;
}

/* Steps List */
.steps-list {
    counter-reset: steps;
    padding-left: 0;
}

.steps-list li {
    counter-increment: steps;
    position: relative;
    padding-left: 2.5rem;
    margin: 0.75rem 0;
}

.steps-list li::before {
    content: counter(steps);
    position: absolute;
    left: 0;
    top: 0;
    width: 1.75rem;
    height: 1.75rem;
    background: var(--primary-color);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    font-size: 0.875rem;
}

/* Cards Grid */
.cards-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 1.5rem;
}

/* Tabs */
.tab-buttons {
    display: flex;
    gap: 0.5rem;
    border-bottom: 2px solid var(--border-color);
    margin-bottom: 1.5rem;
    flex-wrap: wrap;
}

.tab-btn {
    padding: 0.75rem 1.25rem;
    background: none;
    border: none;
    border-bottom: 3px solid transparent;
    cursor: pointer;
    font-weight: 600;
    transition: all 0.2s;
    margin-bottom: -2px;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.tab-btn:hover {
    background: var(--bg-tertiary);
}

.tab-btn.active {
    color: var(--primary-color);
    border-bottom-color: var(--primary-color);
}

/* Footer */
footer {
    background: var(--bg-tertiary);
    border-top: 2px solid var(--border-color);
    padding: 2.5rem 0 1rem;
    margin-top: 3rem;
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
    margin-bottom: 1.5rem;
}

.footer-section h3 {
    font-size: 1.125rem;
    font-weight: 600;
    margin-bottom: 0.75rem;
    color: var(--text-primary);
}

.footer-links {
    list-style: none;
    padding: 0;
}

.footer-links li {
    margin: 0.5rem 0;
}

.footer-links a {
    color: var(--text-secondary);
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    transition: all 0.2s;
}

.footer-links a:hover {
    color: var(--primary-color);
    transform: translateX(3px);
}

.disclaimer {
    font-size: 0.875rem;
    color: var(--text-light);
    background: var(--bg-primary);
    padding: 0.75rem;
    border-radius: var(--border-radius);
    margin-top: 0.5rem;
}

.footer-bottom {
    text-align: center;
    padding-top: 1rem;
    border-top: 1px solid var(--border-color);
    color: var(--text-light);
    font-size: 0.875rem;
}

/* Back to Top */
#back-to-top {
    position: fixed;
    bottom: 20px;
    left: 20px;
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: var(--shadow-lg);
    transition: all 0.3s;
    z-index: 40;
}

#back-to-top:hover {
    transform: translateY(-3px);
}

#back-to-top[hidden] {
    display: none;
}

/* Mobile Responsive */
@media (max-width: 768px) {
    .compact-header {
        flex-wrap: wrap;
    }
    
    .mobile-menu-toggle {
        display: block;
    }
    
    .nav-menu {
        position: fixed;
        top: 0;
        left: -100%;
        width: 280px;
        height: 100vh;
        background: var(--bg-primary);
        flex-direction: column;
        padding: 2rem 1rem;
        box-shadow: var(--shadow-lg);
        transition: left 0.3s;
        z-index: 1001;
        overflow-y: auto;
    }
    
    .nav-menu.active {
        left: 0;
    }
    
    .nav-menu a {
        padding: 0.75rem 1rem;
        border-bottom: 1px solid var(--border-color);
    }
    
    .nav-menu a span {
        flex: 1;
    }
    
    .cards-grid {
        grid-template-columns: 1fr;
    }
    
    .emergency-cards {
        grid-template-columns: 1fr;
    }
    
    .widget-panel {
        right: -10px;
        left: -10px;
        min-width: auto;
    }
    
    .section-title {
        font-size: 1.5rem;
    }
    
    .site-title {
        font-size: 1.5rem;
    }
    
    #back-to-top {
        bottom: 90px;
    }
}

/* Print Styles */
@media print {
    .accessibility-widget,
    .search-container,
    #back-to-top,
    .mobile-menu-toggle,
    nav {
        display: none !important;
    }
    
    .card {
        break-inside: avoid;
        page-break-inside: avoid;
    }
    
    body {
        font-size: 12pt;
    }
    
    a {
        text-decoration: underline;
    }
    
    a[href^="http"]:after {
        content: " (" attr(href) ")";
        font-size: 0.8em;
    }
}

/* Utility Classes */
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

.container {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 0 1rem;
}

/* Print-specific classes */
.no-print-temp {
    display: none !important;
}

body.printing {
    overflow: visible !important;
}

.print-section-btn {
    opacity: 0.7;
    transition: all 0.2s;
}

.print-section-btn:hover {
    opacity: 1;
    transform: translateY(-1px);
}

@media screen {
    .print-only {
        display: none !important;
    }
}

@media print {
    .screen-only {
        display: none !important;
    }
    
    .no-print-temp {
        display: none !important;
    }
}

/* Loading States */
.loading {
    opacity: 0.6;
    pointer-events: none;
}

.spinner {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid rgba(0, 0, 0, 0.1);
    border-radius: 50%;
    border-top-color: var(--primary-color);
    animation: spin 1s ease-in-out infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* Print header styles */
.print-header {
    text-align: center;
    padding: 1rem;
    border-bottom: 2px solid var(--border-color);
    margin-bottom: 2rem;
}

.print-header h1 {
    font-size: 1.5rem;
    margin-bottom: 0.5rem;
}

.print-header p {
    margin: 0.25rem 0;
    color: var(--text-secondary);
}

/* Enhanced Accessibility Features */

/* Highlight Links */
.highlight-links a {
    background: #ffeb3b !important;
    padding: 2px 4px !important;
    border-radius: 3px !important;
    box-shadow: 0 2px 4px rgba(0,0,0,0.2) !important;
    text-decoration: underline !important;
    font-weight: bold !important;
}

/* Hide Images */
.hide-images img,
.hide-images .bi,
.hide-images i,
.hide-images svg,
.hide-images picture,
.hide-images video {
    visibility: hidden !important;
}

/* Larger Cursor */
.larger-cursor,
.larger-cursor * {
    cursor: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" width="32" height="32" viewBox="0 0 32 32"><path d="M2 2l8 18 4-4 18-8z" fill="black"/></svg>'), auto !important;
}

/* Progressive Text Spacing */
.letter-spacing-1 {
    letter-spacing: 0.05em !important;
    word-spacing: 0.08em !important;
}

.letter-spacing-2 {
    letter-spacing: 0.1em !important;
    word-spacing: 0.15em !important;
}

.letter-spacing-3 {
    letter-spacing: 0.2em !important;
    word-spacing: 0.25em !important;
}

.letter-spacing-1 p, .letter-spacing-1 div, .letter-spacing-1 span,
.letter-spacing-2 p, .letter-spacing-2 div, .letter-spacing-2 span,
.letter-spacing-3 p, .letter-spacing-3 div, .letter-spacing-3 span {
    letter-spacing: inherit !important;
    word-spacing: inherit !important;
}

/* Progressive Line Height */
.line-height-1,
.line-height-1 * {
    line-height: 1.8 !important;
}

.line-height-2,
.line-height-2 * {
    line-height: 2.2 !important;
}

.line-height-3,
.line-height-3 * {
    line-height: 2.8 !important;
}

/* Text Alignment */
.text-align-left,
.text-align-left p,
.text-align-left div,
.text-align-left span,
.text-align-left h1,
.text-align-left h2,
.text-align-left h3,
.text-align-left h4,
.text-align-left h5,
.text-align-left h6 {
    text-align: left !important;
}

.text-align-center,
.text-align-center p,
.text-align-center div,
.text-align-center span,
.text-align-center h1,
.text-align-center h2,
.text-align-center h3,
.text-align-center h4,
.text-align-center h5,
.text-align-center h6 {
    text-align: center !important;
}

.text-align-right,
.text-align-right p,
.text-align-right div,
.text-align-right span,
.text-align-right h1,
.text-align-right h2,
.text-align-right h3,
.text-align-right h4,
.text-align-right h5,
.text-align-right h6 {
    text-align: right !important;
}

.text-align-justify,
.text-align-justify p,
.text-align-justify div,
.text-align-justify span {
    text-align: justify !important;
}

/* Disable Animations */
.disable-animations,
.disable-animations *,
.disable-animations *::before,
.disable-animations *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
}

/* Larger cursor for all interactive elements */
.larger-cursor button,
.larger-cursor a,
.larger-cursor input,
.larger-cursor select,
.larger-cursor textarea,
.larger-cursor [role="button"],
.larger-cursor [onclick] {
    cursor: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" width="48" height="48" viewBox="0 0 32 32"><path d="M2 2l8 18 4-4 18-8z" fill="black" stroke="white" stroke-width="1"/></svg>'), pointer !important;
}

/* Active navigation link highlighting */
.nav-menu a.active {
    background: var(--primary-color) !important;
    color: white !important;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(var(--primary-rgb), 0.3);
}

.nav-menu a.active i {
    color: white !important;
}

/* Smooth transition for active state */
.nav-menu a {
    transition: all 0.3s ease;
}

/* Mobile active state */
@media (max-width: 768px) {
    .nav-menu a.active {
        background: var(--primary-color) !important;
        color: white !important;
        box-shadow: inset 4px 0 0 rgba(255, 255, 255, 0.3);
        transform: none;
    }
}
/* Pulsating heart effect */
@keyframes heartbeat {
    0% {
        transform: scale(1);
    }
    14% {
        transform: scale(1.3);
    }
    28% {
        transform: scale(1);
    }
    42% {
        transform: scale(1.3);
    }
    70% {
        transform: scale(1);
    }
}

.pulsating-heart {
    display: inline-block;
    animation: heartbeat 1.5s ease-in-out infinite;
    color: #e91e63;
}

.footer-made-with {
    text-align: center;
    font-size: 1.2rem;
    font-weight: 600;
    color: var(--text-secondary);
    margin-top: 1.5rem;
    padding: 1.5rem 2rem;
    border-top: 1px solid var(--border-color);
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    background-color: var(--bg-secondary);
    transition: all 0.3s ease;
    letter-spacing: 0.5px;
    line-height: 1.8;
}

.footer-made-with:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.12);
}

/* ========================================
   MODERN CONTAINER QUERIES & RESPONSIVE ENHANCEMENTS
   ======================================== */

/* Container queries for component-based responsive design */
@container (min-width: 400px) {
    .card {
        padding: var(--space-xl);
    }
    
    .card-header {
        padding: var(--space-xl) var(--space-2xl);
    }
    
    .card-body {
        padding: var(--space-2xl);
    }
}

@container (min-width: 600px) {
    .services-list {
        display: grid;
        grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
        gap: var(--space-md);
    }
    
    .contact-item {
        padding: var(--space-md) var(--space-lg);
    }
}

/* Advanced micro-animations for enhanced UX */
@keyframes shimmer {
    0% {
        background-position: -200px 0;
    }
    100% {
        background-position: calc(200px + 100%) 0;
    }
}

@keyframes slideInFromLeft {
    0% {
        opacity: 0;
        transform: translateX(-30px);
    }
    100% {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes slideInFromRight {
    0% {
        opacity: 0;
        transform: translateX(30px);
    }
    100% {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes fadeInUp {
    0% {
        opacity: 0;
        transform: translateY(20px);
    }
    100% {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes scaleIn {
    0% {
        opacity: 0;
        transform: scale(0.9);
    }
    100% {
        opacity: 1;
        transform: scale(1);
    }
}

/* Stagger animations for lists */
.services-list li {
    animation: slideInFromLeft 0.6s var(--ease-out) both;
}

.services-list li:nth-child(1) { animation-delay: 0.1s; }
.services-list li:nth-child(2) { animation-delay: 0.2s; }
.services-list li:nth-child(3) { animation-delay: 0.3s; }
.services-list li:nth-child(4) { animation-delay: 0.4s; }
.services-list li:nth-child(5) { animation-delay: 0.5s; }
.services-list li:nth-child(n+6) { animation-delay: 0.6s; }

.contact-item {
    animation: slideInFromRight 0.6s var(--ease-out) both;
}

.contact-item:nth-child(1) { animation-delay: 0.1s; }
.contact-item:nth-child(2) { animation-delay: 0.2s; }
.contact-item:nth-child(3) { animation-delay: 0.3s; }
.contact-item:nth-child(4) { animation-delay: 0.4s; }
.contact-item:nth-child(n+5) { animation-delay: 0.5s; }

/* Card entrance animation */
.card {
    animation: scaleIn 0.8s var(--ease-out) both;
}

/* Loading shimmer effect for better perceived performance */
.loading-shimmer {
    background: linear-gradient(90deg, 
        rgba(255, 255, 255, 0) 0%, 
        rgba(255, 255, 255, 0.2) 20%, 
        rgba(255, 255, 255, 0.5) 60%, 
        rgba(255, 255, 255, 0) 100%);
    background-size: 200px 100%;
    animation: shimmer 2s infinite linear;
}

/* Enhanced focus states with modern ring style */
.modern-focus:focus-visible {
    outline: none;
    box-shadow: 
        0 0 0 2px var(--bg-primary),
        0 0 0 4px var(--primary-color),
        var(--shadow-lg);
    transform: scale(1.02);
}

/* Fluid grid system using CSS Grid and clamp */
.fluid-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(clamp(250px, 30vw, 350px), 1fr));
    gap: clamp(1rem, 3vw, 2rem);
    margin: var(--space-2xl) 0;
}

/* Modern aspect ratio containers */
.aspect-ratio-16-9 {
    aspect-ratio: 16/9;
}

.aspect-ratio-4-3 {
    aspect-ratio: 4/3;
}

.aspect-ratio-1-1 {
    aspect-ratio: 1/1;
}

/* Advanced hover effects for interactive elements */
.interactive-hover {
    position: relative;
    overflow: hidden;
    isolation: isolate;
}

.interactive-hover::before {
    content: '';
    position: absolute;
    inset: 0;
    background: var(--primary-gradient);
    opacity: 0;
    transition: opacity var(--duration-normal) var(--ease-out);
    z-index: -1;
}

.interactive-hover:hover::before {
    opacity: 0.05;
}

/* Smooth scroll snap for better navigation */
.scroll-snap-y {
    scroll-snap-type: y mandatory;
    overflow-y: auto;
}

.scroll-snap-item {
    scroll-snap-align: start;
    scroll-snap-stop: always;
}

/* Modern backdrop blur support with fallbacks */
@supports (backdrop-filter: blur(10px)) {
    .glass-effect {
        backdrop-filter: blur(10px) saturate(150%);
        -webkit-backdrop-filter: blur(10px) saturate(150%);
        background: rgba(255, 255, 255, 0.8);
    }
}

@supports not (backdrop-filter: blur(10px)) {
    .glass-effect {
        background: rgba(255, 255, 255, 0.95);
    }
}

/* Enhanced print optimization */
@media print {
    .card {
        break-inside: avoid;
        box-shadow: none;
        border: 1px solid #ccc;
    }
    
    .services-list {
        break-inside: avoid;
    }
    
    .contact-item {
        break-inside: avoid;
        margin-bottom: 8px;
    }
}

/* High DPI display optimization */
@media (-webkit-min-device-pixel-ratio: 2), (min-resolution: 192dpi) {
    .card {
        border-width: 0.5px;
    }
    
    .contact-item {
        border-width: 0.5px;
    }
}

/* Dark mode preparation (for future implementation) */
@media (prefers-color-scheme: dark) {
    :root {
        --bg-primary: #0f172a;
        --bg-secondary: #1e293b;
        --bg-tertiary: #334155;
        --text-primary: #f8fafc;
        --text-secondary: #cbd5e1;
        --border-color: #475569;
    }
    
    .card {
        background: rgba(30, 41, 59, 0.8);
        border-color: var(--border-color);
    }
}

/* Accessibility: Honor user preferences */
@media (prefers-reduced-motion: reduce) {
    .services-list li,
    .contact-item,
    .card {
        animation: none;
    }
    
    .widget-toggle {
        animation: none;
    }
}

@media (prefers-contrast: high) {
    .card {
        border-width: 2px;
        border-color: var(--text-primary);
    }
    
    .contact-item {
        border-width: 2px;
        border-color: var(--primary-color);
    }
}
