:root {
    --ms-navbar: #014a6e;
    --ms-primary: #015a8a;
    --ms-primary-dark: #013d5e;
    --ms-accent: #0284c7;
    --ms-success: #059669;
    --ms-light: #f8fafc;
    --ms-gray: #64748b;
}

html {
    background: var(--ms-navbar);
}

body {
    font-family: 'Segoe UI', system-ui, -apple-system, sans-serif;
    color: #1e293b;
    background-image: url(/images/bg_duo.jpg);
    background-size: 100% auto;
    background-repeat: no-repeat;
    background-position: top center;
}

/* Header */
.navbar {
    background: var(--ms-navbar);
    padding: 1rem 0;
}

.navbar-brand img {
    height: 40px;
}

.navbar .btn-outline-light:hover {
    background: rgba(255,255,255,0.1);
}

/* Hero */
.hero {
    background: linear-gradient(135deg, var(--ms-primary) 0%, var(--ms-primary-dark) 100%);
    color: white;
    padding: 5rem 0 4rem;
}

.hero h1 {
    font-size: 2.5rem;
    font-weight: 700;
    line-height: 1.2;
}

.hero .lead {
    font-size: 1.25rem;
    opacity: 0.9;
    max-width: 600px;
}

.btn-cta {
    background: var(--ms-success);
    border: none;
    padding: 0.875rem 2rem;
    font-weight: 600;
    font-size: 1.1rem;
    transition: all 0.2s;
}

.btn-cta:hover {
    background: #047857;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(5, 150, 105, 0.4);
}

.btn-secondary-cta {
    background: transparent;
    border: 2px solid rgba(255,255,255,0.5);
    padding: 0.875rem 2rem;
    font-weight: 600;
}

.btn-secondary-cta:hover {
    background: rgba(255,255,255,0.1);
    border-color: white;
}

/* Stats bar */
.stats-bar {
    background: white;
    border-radius: 12px;
    padding: 1.5rem 2rem;
    margin-top: -2rem;
    box-shadow: 0 4px 24px rgba(0,0,0,0.1);
}

.stat-item {
    text-align: center;
    padding: 0 1rem;
}

.stat-number {
    font-size: 2rem;
    font-weight: 700;
    color: var(--ms-primary);
}

.stat-label {
    font-size: 0.875rem;
    color: var(--ms-gray);
}

/* Section styling */
section,
main {
    padding: 5rem 0;
    background: #fff;
}

.section-title {
    font-size: 2rem;
    font-weight: 700;
    color: var(--ms-primary);
    margin-bottom: 1rem;
}

.section-subtitle {
    font-size: 1.125rem;
    color: var(--ms-gray);
    max-width: 600px;
    margin: 0 auto 3rem;
}

/* Features */
.feature-card {
    background: white;
    border-radius: 12px;
    padding: 2rem;
    height: 100%;
    border: 1px solid #e2e8f0;
    transition: all 0.2s;
}

.feature-card:hover {
    border-color: var(--ms-accent);
    box-shadow: 0 8px 24px rgba(59, 130, 246, 0.1);
}

.feature-icon {
    width: 56px;
    height: 56px;
    background: linear-gradient(135deg, var(--ms-accent) 0%, #0369a1 100%);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 1.25rem;
}

.feature-icon i {
    font-size: 1.5rem;
    color: white;
}

.feature-card h3 {
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--ms-primary);
    margin-bottom: 0.75rem;
}

.feature-card p {
    color: var(--ms-gray);
    margin-bottom: 0;
    font-size: 0.95rem;
    line-height: 1.6;
}

/* Accessibility highlight section */
.accessibility-section {
    background: var(--ms-light);
}

.accessibility-card {
    background: white;
    border-radius: 16px;
    padding: 2.5rem;
    box-shadow: 0 4px 24px rgba(0,0,0,0.06);
}

.accessibility-feature {
    display: flex;
    align-items: start;
    gap: 1rem;
    padding: 1rem 0;
    border-bottom: 1px solid #e2e8f0;
}

.accessibility-feature:last-child {
    border-bottom: none;
}

.accessibility-feature i {
    font-size: 1.5rem;
    color: var(--ms-success);
    flex-shrink: 0;
}

/* Clients/Examples */
.examples-section {
    background: var(--ms-primary);
    color: white;
}

.example-img {
    border-radius: 8px;
    box-shadow: 0 8px 32px rgba(0,0,0,0.3);
    width: 100%;
    height: auto;
    aspect-ratio: 4 / 3;
}

/* Contact section */
.contact-section {
    background: var(--ms-light);
}

.contact-card {
    background: white;
    border-radius: 12px;
    padding: 2rem;
    text-align: center;
    height: 100%;
    border: 1px solid #e2e8f0;
    transition: all 0.2s;
}

.contact-card:hover {
    border-color: var(--ms-accent);
}

.contact-card i {
    font-size: 2.5rem;
    color: var(--ms-accent);
    margin-bottom: 1rem;
}

.contact-card h3 {
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--ms-primary);
}

.contact-card a {
    color: var(--ms-accent);
    text-decoration: none;
    font-weight: 600;
}

.contact-card a:hover {
    text-decoration: underline;
}

/* Footer */
footer {
    background: var(--ms-navbar);
    color: rgba(255,255,255,0.8);
    padding: 3rem 0 2rem;
}

footer a {
    color: rgba(255,255,255,0.8);
    text-decoration: none;
}

footer a:hover {
    color: white;
}

.footer-logo {
    width: 120px;
    height: auto;
    opacity: 0.9;
}

/* Client logos */
.clients-section {
    background: #f8fafc;
    border-top: 1px solid #e2e8f0;
}

.client-logos {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    align-items: center;
    gap: 2rem;
}

.client-logos img {
    height: 60px;
    width: 100px;
    object-fit: contain;
    filter: grayscale(100%);
    opacity: 0.6;
    background: #fff;
    padding: 0.5rem;
    border-radius: 8px;
    animation: logo-highlight 45s infinite;
    animation-delay: calc(var(--i, 0) * 3s);
}

.client-logos img:hover {
    filter: none;
    opacity: 1;
}

@keyframes logo-highlight {
    0%, 6.67% { opacity: 0.6; filter: grayscale(100%); }
    0.5%, 6.17% { opacity: 1; filter: none; }
}

/* Carousel improvements */
.carousel-inner {
    aspect-ratio: 4 / 3;
}

.carousel-control-prev,
.carousel-control-next {
    width: 10%;
}

.carousel-indicators button {
    width: 10px;
    height: 10px;
    border-radius: 50%;
}

/* FAQ accordion */
.accordion-item {
    scroll-margin-top: 100px;
}

.accordion-button:not(.collapsed) {
    background-color: var(--ms-light) !important;
    color: var(--ms-primary) !important;
    box-shadow: none !important;
}

.accordion-button:not(.collapsed)::after {
    filter: none;
}

.accordion-button:focus {
    box-shadow: 0 0 0 0.25rem rgba(5, 150, 105, 0.25) !important;
    border-color: var(--ms-success) !important;
}

/* Focus states voor toetsenbordnavigatie */
a:focus-visible,
button:focus-visible,
.btn:focus-visible,
.feature-card:focus-within {
    outline: 3px solid var(--ms-accent);
    outline-offset: 2px;
}

.navbar a:focus-visible {
    outline-color: white;
}

.skip-link {
    position: absolute;
    top: -40px;
    left: 0;
    background: var(--ms-primary);
    color: white;
    padding: 8px 16px;
    z-index: 9999;
    transition: top 0.2s;
}

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

/* Accessibility toggle button */
button.accessibility-toggle {
    position: fixed;
    bottom: 16px;
    right: 16px;
    z-index: 1050;
    background: #fff;
    border: 2px solid #333;
    border-radius: 50%;
    width: 52px;
    height: 52px;
    padding: 0;
    cursor: pointer;
    box-shadow: 0 2px 8px rgba(0,0,0,0.2);
    color: #333;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
}

.accessibility-toggle:hover,
.accessibility-toggle:focus {
    background: #333;
    color: #fff;
    outline: 3px solid var(--ms-accent);
    outline-offset: 2px;
}

button.accessibility-toggle i.bi {
    font-size: 24px;
    line-height: 1 !important;
}

.accessibility-panel {
    position: fixed;
    bottom: 80px;
    right: 16px;
    z-index: 1050;
    background: #fff;
    border: 1px solid #ddd;
    border-radius: 8px;
    padding: 16px;
    width: 280px;
    box-shadow: 0 4px 16px rgba(0,0,0,0.15);
    display: none;
}

.accessibility-panel.show {
    display: block;
}

.accessibility-panel h6 {
    margin: 0 0 12px;
    padding-bottom: 8px;
    border-bottom: 1px solid #eee;
    color: #333;
}

.accessibility-option {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 0;
}

.accessibility-option label {
    margin: 0;
    cursor: pointer;
    color: #333;
}

/* High Contrast Mode */
body.high-contrast {
    background: #fff !important;
}

body.high-contrast * {
    border-color: #000 !important;
}

body.high-contrast a {
    color: #000 !important;
    text-decoration: underline !important;
}

body.high-contrast a:hover,
body.high-contrast a:focus {
    background-color: #ffff00 !important;
    outline: 3px solid #000 !important;
}

body.high-contrast .navbar,
body.high-contrast .hero,
body.high-contrast .examples-section,
body.high-contrast footer {
    background: #000 !important;
    color: #fff !important;
}

body.high-contrast .navbar a,
body.high-contrast .hero *,
body.high-contrast .examples-section *,
body.high-contrast footer * {
    color: #fff !important;
}

body.high-contrast .stats-bar,
body.high-contrast .feature-card,
body.high-contrast .accessibility-card,
body.high-contrast .contact-card,
body.high-contrast .accordion-item {
    background: #fff !important;
    border: 2px solid #000 !important;
}

body.high-contrast .feature-icon {
    background: #000 !important;
}

body.high-contrast .btn {
    background: #000 !important;
    color: #fff !important;
    border: 2px solid #000 !important;
}

body.high-contrast .text-muted {
    color: #333 !important;
}

/* Large Text Mode */
body.large-text {
    font-size: 1.25rem !important;
}

body.large-text h1 { font-size: 2.75rem !important; }
body.large-text h2 { font-size: 2.25rem !important; }
body.large-text h3 { font-size: 1.75rem !important; }
body.large-text p, body.large-text li { line-height: 1.8 !important; }

/* Dyslexic Font Mode */
@font-face {
    font-family: 'OpenDyslexic';
    src: url('https://cdn.jsdelivr.net/npm/open-dyslexic@1.0.3/woff/OpenDyslexic-Regular.woff') format('woff');
    font-weight: normal;
    font-style: normal;
}

body.dyslexic-font,
body.dyslexic-font * {
    font-family: 'OpenDyslexic', Arial, sans-serif !important;
    line-height: 1.8 !important;
    word-spacing: 0.2em !important;
    letter-spacing: 0.05em !important;
}

body.dyslexic-font button.accessibility-toggle,
body.dyslexic-font .accessibility-panel,
body.dyslexic-font .accessibility-panel * {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Arial, sans-serif !important;
    word-spacing: 0 !important;
    letter-spacing: 0 !important;
}

/* TTS Controls - Full widget */
.tts-widget {
    position: fixed;
    bottom: 80px;
    left: 16px;
    z-index: 1050;
    background: #fff;
    padding: 8px 12px;
    border-radius: 8px;
    box-shadow: 0 2px 12px rgba(0,0,0,0.15);
}

.tts-widget.d-none {
    display: none !important;
}

.tts-widget .btn {
    padding: 0.5rem 0.75rem;
}

.tts-widget .tts-btn-text {
    display: none;
}

@media (min-width: 576px) {
    .tts-widget .tts-btn-text {
        display: inline;
    }
}

/* TTS Speaking highlight */
.tts-speaking {
    background-color: rgba(2, 132, 199, 0.15) !important;
    outline: 2px solid var(--ms-accent) !important;
    outline-offset: 2px;
    border-radius: 4px;
}

body.high-contrast .tts-speaking {
    background-color: #ffff00 !important;
    outline-color: #000 !important;
}

/* Responsive */
@media (max-width: 768px) {
    .hero h1 {
        font-size: 2rem;
    }

    .hero {
        padding: 3rem 0 2rem;
    }

    .stats-bar {
        margin-top: 2rem;
    }

    .stat-item {
        padding: 0.5rem 0;
    }

    section {
        padding: 3rem 0;
    }
}
