:root {
    /* Color Palette */
    --primary: #0ea5e9;
    --primary-dark: #0c4a6e;
    --primary-light: #bae6fd;
    --accent: #fcd34d;
    --accent-dark: #f59e0b;
    --text-main: #1e293b;
    --text-muted: #64748b;
    --bg-main: #f8fafc;
    --bg-surface: #ffffff;
    --bg-glass: rgba(255, 255, 255, 0.9);

    /* Spacing & Sizing */
    --section-padding: 100px 5%;
    --border-radius: 16px;
    --shadow-sm: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    --shadow-md: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 20px 25px -5px rgba(0, 0, 0, 0.1);

    /* Typography */
    --font-heading: 'Outfit', sans-serif;
    --font-body: 'Inter', sans-serif;

    /* ==========================================================================
   DESIGN SYSTEM & TOKENS
   ========================================================================== */
  /* Colors - Premium Palette */
  --royal-blue: #1e3a8a;
  --royal-blue-light: #3b82f6;
  --accent-gold: #fbbf24;
  --glass-bg: rgba(255, 255, 255, 0.7);
  --glass-border: rgba(255, 255, 255, 0.3);
  
  /* Backgrounds */
  --bg-gradient: linear-gradient(135deg, #f8fafc 0%, #e2e8f0 100%);
  --card-bg: #ffffff;
  
  /* Status Colors */
  --status-aangenomen: #10b981;
  --status-verworpen: #ef4444;
  --status-ingetrokken: #6b7280;
  --status-afgedaan: #8b5cf6;
  --status-aangehouden: #f59e0b;
  
  /* Shadows */
  --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    -webkit-font-smoothing: antialiased;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-body);
    color: var(--text-main);
    background-color: var(--bg-main);
    line-height: 1.6;
    overflow-x: hidden;
    width: 100%;
    position: relative;
}

html {
    overflow-x: hidden;
    width: 100%;
}

h1,
h2,
h3,
h4 {
    font-family: var(--font-heading);
    font-weight: 700;
    line-height: 1.2;
}

/* --- Layout Components --- */

header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1000;
    padding: 15px 5%;
    background: rgba(255, 255, 255, 0.95);
    box-shadow: var(--shadow-sm);
    transition: all 0.3s ease;
}

header.scrolled {
    padding: 10px 5%;
    background: var(--bg-surface);
    box-shadow: var(--shadow-md);
}

nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    max-width: 1400px;
    margin: 0 auto;
}

.logo {
    display: flex;
    align-items: center;
    gap: 15px;
    text-decoration: none;
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    cursor: pointer !important;
}

.logo:hover {
    transform: translateY(-2px) scale(1.01);
}

.logo:hover .main-name {
    color: var(--primary-dark);
}

.logo:hover .sub-name {
    color: var(--accent);
}

.side-logo-img {
    height: 48px;
    width: auto;
    object-fit: contain;
    pointer-events: none; /* Let the <a> tag handle events */
}

.logo-text {
    display: flex;
    flex-direction: column;
    gap: 0;
    line-height: 1;
    pointer-events: none;
}

.main-name {
    font-family: var(--font-heading);
    font-size: 1.45rem;
    font-weight: 800;
    color: var(--primary);
    letter-spacing: -0.5px;
    transition: color 0.3s;
}

.sub-name {
    font-family: var(--font-heading);
    font-size: 0.95rem;
    font-weight: 700;
    color: var(--accent-dark);
    text-transform: uppercase;
    letter-spacing: 2px;
}

.nav-links {
    display: flex;
    gap: 30px;
    list-style: none;
    margin-left: auto;
    margin-right: 30px;
}

.nav-links a {
    text-decoration: none;
    color: var(--text-main);
    font-weight: 700;
    font-size: 1.1rem;
    transition: color 0.3s;
}

.nav-links a:hover {
    color: var(--primary);
    text-decoration: underline;
}

.cta-button {
    background: var(--primary);
    color: white !important;
    padding: 12px 28px;
    border-radius: 100px;
    text-decoration: none;
    font-weight: 700;
    transition: transform 0.3s, background 0.3s;
    box-shadow: var(--shadow-md);
}

.cta-button:hover {
    background: var(--primary-dark);
    transform: translateY(-2px);
}

.hamburger {
    display: none;
    font-size: 1.8rem;
    color: var(--primary);
    cursor: pointer;
    z-index: 1001;
    transition: var(--transition);
}

.hamburger.active i::before {
    content: "\f00d";
    /* FontAwesome Xmark icon */
}

/* ==========================================================================
   DASHBOARD & MONITOR COMPONENTS (Glassmorphism)
   ========================================================================== */

.monitor-container {
    max-width: 1400px;
    margin: 40px auto;
    padding: 0 20px;
}

.glass-card {
    background: var(--glass-bg);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid var(--glass-border);
    border-radius: 24px;
    box-shadow: var(--shadow-xl);
    padding: 30px;
    margin-bottom: 30px;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.glass-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.15);
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 25px;
    margin-bottom: 40px;
}

.stat-item {
    text-align: center;
    padding: 20px;
}

.stat-value {
    font-size: 3rem;
    font-weight: 800;
    color: var(--royal-blue);
    display: block;
    line-height: 1;
}

.stat-label {
    text-transform: uppercase;
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--muted-text);
    letter-spacing: 1px;
    margin-top: 10px;
    display: block;
}

/* Charts */
.chart-container {
    position: relative;
    height: 350px;
    width: 100%;
}

/* Badges */
.badge-status {
    padding: 6px 14px;
    border-radius: 50px;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
}

.badge-aangenomen { background: #d1fae5; color: #065f46; border: 1px solid #10b981; }
.badge-verworpen { background: #fee2e2; color: #991b1b; border: 1px solid #ef4444; }
.badge-ingetrokken { background: #f3f4f6; color: #374151; border: 1px solid #9ca3af; }

/* AI Insight Box */
.ai-insight-box {
    background: linear-gradient(135deg, #1e3a8a 0%, #3b82f6 100%);
    color: white;
    border-radius: 24px;
    padding: 35px;
    position: relative;
    overflow: hidden;
}

.ai-insight-box::after {
    content: 'AI';
    position: absolute;
    right: -20px;
    bottom: -20px;
    font-size: 120px;
    font-weight: 900;
    opacity: 0.1;
    transform: rotate(-15deg);
}

.ai-insight-title {
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 15px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.ai-insight-content {
    font-size: 1.1rem;
    line-height: 1.6;
    opacity: 0.95;
}

/* Table Enhancements */
.monitor-table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0 10px;
}

.monitor-table th {
    padding: 15px;
    text-align: left;
    color: var(--muted-text);
    font-weight: 600;
}

.monitor-table tr {
    background: white;
    box-shadow: var(--shadow-sm);
    transition: all 0.2s;
}

.monitor-table tr:hover {
    transform: scale(1.01);
    box-shadow: var(--shadow-md);
}

.monitor-table td {
    padding: 20px 15px;
}

.monitor-table td:first-child { border-top-left-radius: 12px; border-bottom-left-radius: 12px; }
.monitor-table td:last-child { border-top-right-radius: 12px; border-bottom-right-radius: 12px; }

/* Responsive Navigation */
@media (max-width: 1024px) {
    .nav-links {
        display: flex;
        position: fixed;
        top: 0;
        right: -100%;
        width: 100%;
        height: 100vh;
        background: var(--bg-surface);
        flex-direction: column;
        justify-content: center;
        align-items: center;
        gap: 30px;
        transition: 0.4s cubic-bezier(0.4, 0, 0.2, 1);
        z-index: 999;
        box-shadow: -10px 0 30px rgba(0, 0, 0, 0.1);
    }

    .nav-links.active {
        right: 0;
    }

    .nav-links a {
        font-size: 1.5rem;
    }

    .hamburger {
        display: block;
    }

    .cta-button {
        display: none;
        /* Hide main CTA on mobile header to save space, or move into menu */
    }
}

/* Specific Narrow Mobile Optimization (< 400px) */
@media (max-width: 400px) {
    header {
        padding: 8px 3% !important;
    }
    
    .logo {
        gap: 6px !important;
        max-width: 75%;
    }
    
    .side-logo-img {
        height: 30px !important;
    }
    
    .main-name {
        font-size: 1rem !important;
        letter-spacing: -0.2px !important;
    }
    
    .sub-name {
        font-size: 0.65rem !important;
        letter-spacing: 0.5px !important;
    }

    .hamburger {
        font-size: 1.4rem !important;
    }

    .hero {
        padding: 0 4% !important;
    }

    .hero-tagline {
        font-size: 0.6rem !important;
        padding: 2px 6px !important;
        letter-spacing: 0px !important;
        margin-bottom: 15px !important;
    }

    .hero h1 {
        font-size: 1.6rem !important;
        line-height: 1.1 !important;
        margin-bottom: 12px !important;
    }

    .hero p {
        font-size: 1rem !important;
        margin-bottom: 20px !important;
    }
}

/* Extra small screens (e.g. Xperia narrow mode) */
@media (max-width: 320px) {
    .hero-tagline {
        margin-left: 0;
        display: block;
        width: fit-content;
    }
    
    .hero h1 {
        font-size: 1.45rem !important;
    }
}

/* --- Hero Section --- */

.hero {
    position: relative;
    height: 100vh;
    display: flex;
    align-items: center;
    padding: 0 5%;
    overflow: hidden;
    background: var(--primary-dark);
}

.hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    /* Gradient: darker on the left for text contrast, lighter on the right for image clarity */
    background: linear-gradient(90deg, rgba(0, 0, 0, 0.3) 0%, rgba(0, 0, 0, 0.1) 60%, rgba(0, 0, 0, 0.05) 100%);
    z-index: 1;
}

.hero-img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0.92;
    transition: transform 0.8s ease-out;
}

.hero:hover .hero-img {
    transform: scale(1.05);
}

.hero-content {
    position: relative;
    z-index: 2;
    max-width: 800px;
    color: white;
}

.hero-tagline {
    display: inline-block;
    background: var(--accent);
    color: var(--primary-dark);
    padding: 6px 16px;
    border-radius: 4px;
    font-weight: 800;
    text-transform: uppercase;
    font-size: 0.85rem;
    margin-bottom: 24px;
    letter-spacing: 1px;
}

.hero h1 {
    font-size: clamp(1.8rem, 8vw, 5rem);
    /* Improved scaling for narrow/medium screens */
    margin-bottom: 24px;
    line-height: 1.1;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
}

.hero h1 span {
    color: var(--accent);
}

.hero p {
    font-size: 1.5rem;
    /* Larger for seniors */
    margin-bottom: 40px;
    opacity: 1;
    max-width: 700px;
    font-weight: 600;
}

/* --- Sections --- */

section {
    padding: var(--section-padding);
}

.section-title {
    text-align: center;
    margin-bottom: 60px;
}

.section-title h2 {
    font-size: 2.5rem;
    margin-bottom: 16px;
    color: var(--primary-dark);
}

.section-title .divider {
    width: 80px;
    height: 4px;
    background: var(--accent);
    margin: 0 auto;
    border-radius: 2px;
}

/* --- Points Grid --- */

.points-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
    max-width: 1200px;
    margin: 0 auto;
}

.point-card {
    background: var(--bg-surface);
    padding: 40px;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-sm);
    transition: all 0.3s ease;
    border-top: 5px solid var(--primary-light);
    display: flex;
    flex-direction: column;
}

.point-card:hover {
    transform: translateY(-10px);
    box-shadow: var(--shadow-lg);
}

.point-icon {
    font-size: 2.5rem;
    margin-bottom: 20px;
    color: var(--primary);
}

.point-card h3 {
    font-size: 1.5rem;
    margin-bottom: 16px;
}

.point-card p {
    color: var(--text-muted);
}

/* --- Team Section --- */

.team-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 40px;
    max-width: 1200px;
    margin: 0 auto;
}

#team {
    background-color: #f7faf7;
    /* Very light green background to make photos pop */
}

.team-member {
    text-align: center;
}

.member-photo {
    width: 280px;
    height: 380px;
    border-radius: 16px;
    object-fit: cover;
    margin-bottom: 25px;
    border: 10px solid white;
    box-shadow: var(--shadow-lg);
    background-color: #f0f0f0;
    transition: all 0.4s cubic-bezier(0.165, 0.84, 0.44, 1);
    border-bottom: 15px solid var(--accent);
}

.team-member:hover .member-photo {
    transform: translateY(-15px);
    box-shadow: 0 30px 60px rgba(0, 0, 0, 0.15);
    border-bottom-color: var(--primary);
}

.team-member h4 {
    font-size: 1.5rem;
    /* Larger for better readability */
    color: var(--primary-dark);
    margin-bottom: 8px;
}

.team-member p {
    color: var(--primary-dark);
    font-weight: 600;
    font-size: 0.9rem;
}

.member-bio {
    margin-top: 10px;
    font-size: 0.9rem;
    color: var(--text-muted);
    font-weight: normal !important;
}

/* --- Contact & Footer --- */

.contact-section {
    background: var(--primary-dark);
    color: white;
    padding: 80px 5%;
}

.footer {
    background: var(--primary-dark);
    color: rgba(255, 255, 255, 0.6);
    padding: 40px 5%;
    text-align: center;
    font-size: 0.9rem;
}

.footer a {
    color: var(--accent);
    text-decoration: none;
}

/* --- Program Chapters & Accordion --- */

.program-intro p {
    font-size: 1.15rem;
    color: var(--text-main);
    line-height: 1.8;
}

.speerpunten-box {
    background: #f0f7f0 !important;
    padding: 45px !important;
    border-radius: var(--border-radius);
    border-left: 8px solid var(--primary);
    box-shadow: var(--shadow-sm);
    margin: 40px auto !important;
    max-width: 800px;
}

.speerpunten-box h3 {
    color: var(--primary-dark);
    margin-bottom: 25px;
    font-size: 1.6rem;
}

.speerpunten-list {
    list-style: none;
    padding: 0;
    display: grid;
    gap: 15px;
}

.speerpunten-list li {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    font-size: 1.1rem;
    color: var(--text-main);
}

.speerpunten-list i {
    color: var(--primary);
    margin-top: 5px;
}

.accordion {
    max-width: 1000px;
    margin: 40px auto;
}

.accordion-item {
    background: white;
    margin-bottom: 15px;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    border: 1px solid #edf2f7;
}

.accordion-header {
    width: 100%;
    padding: 24px 30px;
    background: white;
    display: flex;
    justify-content: space-between;
    align-items: center;
    cursor: pointer;
    border: none;
    outline: none;
    transition: background 0.3s;
    text-align: left;
}

.accordion-header:hover {
    background: #f7fafc;
}

.accordion-header h3 {
    margin: 0;
    font-size: 1.4rem;
    color: var(--primary-dark);
    font-family: var(--font-heading);
}

.accordion-icon {
    font-size: 1.2rem;
    color: var(--primary);
    transition: transform 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.program-content-img {
    width: 100%;
    max-height: 400px;
    object-fit: cover;
    border-radius: 8px;
    margin: 20px 0;
    box-shadow: var(--shadow-sm);
}

.atmosphere-section {
    position: relative;
    height: 500px;
    margin: 80px 0;
    overflow: hidden;
}

.atmosphere-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.atmosphere-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    padding: 60px 5%;
    background: linear-gradient(transparent, rgba(0, 0, 0, 0.7));
    color: white;
}

.atmosphere-overlay h2 {
    font-size: 2.5rem;
    margin-bottom: 10px;
}

.accordion-content {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.4s ease-out, padding 0.4s ease;
    padding: 0 30px;
}

.accordion-item.active .accordion-content {
    max-height: 2500px;
    /* Large enough for full content */
    padding: 20px 30px 40px;
}

.accordion-flex {
    display: flex;
    gap: 40px;
    align-items: flex-start;
}

.accordion-text {
    flex: 1;
}

.accordion-image-container {
    flex: 0 0 400px;
}

.accordion-image-container img {
    width: 100%;
    height: 300px;
    object-fit: cover;
    border-radius: 12px;
    box-shadow: var(--shadow-md);
    border: 4px solid white;
}

@media (max-width: 900px) {
    .accordion-flex {
        flex-direction: column;
    }

    .accordion-image-container {
        flex: none;
        width: 100%;
    }

    .accordion-image-container img {
        height: 200px;
    }
}

.accordion-content p {
    margin-bottom: 20px;
    color: var(--text-muted);
    font-size: 1.05rem;
}

.accordion-content ul {
    margin-left: 20px;
    margin-bottom: 20px;
}

.accordion-content ul li {
    margin-bottom: 15px;
    color: var(--text-muted);
    position: relative;
    padding-left: 5px;
}

.accordion-content h4 {
    margin: 25px 0 15px;
    color: var(--primary);
    font-size: 1.2rem;
}

.accordion-content strong {
    color: var(--primary-dark);
}

/* --- News & Agenda Section --- */
.news-agenda-container {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 40px;
}

@media (max-width: 950px) {
    .news-agenda-container {
        grid-template-columns: 1fr;
    }
}

.news-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 30px;
}

.news-card {
    background: white;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: var(--shadow-md);
    transition: all 0.3s ease;
    border: 1px solid rgba(0, 0, 0, 0.05);
    display: flex;
    flex-direction: column;
}

.news-card:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-lg);
}

.news-image {
    width: 100%;
    height: 220px;
    object-fit: cover;
}

.news-body {
    padding: 25px;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
}

.news-date {
    font-size: 0.85rem;
    color: var(--text-muted);
    font-weight: 600;
    margin-bottom: 12px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.news-card h3 {
    margin-bottom: 15px;
    font-size: 1.25rem;
    color: var(--primary-dark);
    line-height: 1.3;
}

.news-card p {
    font-size: 0.95rem;
    line-height: 1.6;
    color: #555;
    margin-bottom: 25px;
}

.read-more {
    margin-top: auto;
    color: var(--primary);
    text-decoration: none;
    font-weight: 700;
    font-size: 0.9rem;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    transition: gap 0.2s ease, color 0.2s ease;
}

.news-card a img {
    display: block;
    cursor: pointer;
}

.news-card h3 a, .news-card h3 {
    cursor: pointer;
}


.read-more:hover {
    color: var(--primary-dark);
    gap: 12px;
}



/* Agenda Styles */
.agenda-list {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.agenda-item {
    display: flex;
    gap: 20px;
    padding: 20px;
    background: #fdfdfd;
    border-radius: 12px;
    border-left: 5px solid var(--accent);
    box-shadow: var(--shadow-sm);
    transition: all 0.3s ease;
}

.agenda-item:hover {
    background: #fff;
    box-shadow: var(--shadow-md);
}

.agenda-date {
    text-align: center;
    min-width: 60px;
    background: #f0f7f0;
    padding: 10px 5px;
    border-radius: 8px;
    height: fit-content;
}

.agenda-day {
    display: block;
    font-size: 1.6rem;
    font-weight: 900;
    color: var(--primary-dark);
    line-height: 1;
}

.agenda-month {
    display: block;
    font-size: 0.75rem;
    text-transform: uppercase;
    font-weight: 800;
    color: var(--secondary);
    margin-top: 4px;
}

.agenda-info {
    flex: 1;
}

.agenda-info h4 {
    margin-bottom: 8px;
    font-size: 1.1rem;
    color: var(--primary-dark);
}

.agenda-details {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    font-size: 0.85rem;
    color: #666;
}

.agenda-details span {
    display: flex;
    align-items: center;
    gap: 5px;
}

.agenda-details i {
    color: var(--accent);
}

/* --- Animations --- */

[data-reveal] {
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}

[data-reveal].active {
    opacity: 1;
    transform: translateY(0);
}

@media (max-width: 768px) {
    .hero h1 {
        font-size: 3rem;
    }

    section {
        padding: 60px 5%;
    }
}

/* --- AI Assistant Styles --- */
.ai-chat-toggle {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: auto;
    height: 70px;
    padding: 0 30px;
    background: var(--accent);
    color: var(--primary-dark);
    border-radius: 50px;
    display: flex;
    align-items: center;
    gap: 15px;
    font-size: 1.8rem;
    cursor: pointer;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
    z-index: 10000; /* Ensure stays on top */
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    border: 3px solid white;
}

.chat-toggle-text {
    font-size: 1.15rem;
    font-weight: 800;
    font-family: var(--font-heading);
    white-space: nowrap;
}

.ai-chat-toggle:hover {
    transform: scale(1.1) rotate(5deg);
    background: var(--accent);
}

.ai-chat-window {
    position: fixed;
    bottom: 110px;
    right: 30px;
    width: 520px;
    height: 750px;
    max-height: 80vh;
    background: white;
    border-radius: 20px;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.15);
    z-index: 1001;
    display: none;
    flex-direction: column;
    overflow: hidden;
    border: 1px solid rgba(0, 0, 0, 0.1);
    animation: chatSlideUp 0.4s ease-out;
}

@keyframes chatSlideUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.ai-chat-header {
    background: linear-gradient(135deg, var(--primary-dark) 0%, var(--primary) 100%);
    color: white;
    padding: 15px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.ai-chat-header h3 {
    font-size: 1.1rem;
    margin: 0;
    display: flex;
    align-items: center;
    gap: 10px;
}

.ai-chat-header span {
    font-size: 0.8rem;
    background: var(--accent);
    color: var(--primary-dark);
    padding: 2px 8px;
    border-radius: 20px;
    font-weight: 800;
    margin-left: 10px;
}

.ai-chat-messages {
    flex: 1;
    padding: 20px;
    overflow-y: auto;
    background: #f8faf8;
    display: flex;
    flex-direction: column;
    -webkit-overflow-scrolling: touch; /* Smooth iOS scrolling */
}

.chat-msg {
    max-width: 85%;
    padding: 14px 18px;
    border-radius: 18px;
    font-size: 1rem;
    /* Slightly larger for seniors */
    line-height: 1.5;
    position: relative;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.05);
}

.chat-msg.bot {
    align-self: flex-start;
    background: #ffffff;
    color: var(--text-main);
    border: 1px solid #e0e0e0;
    border-bottom-left-radius: 4px;
}

/* Bubble tail for bot */
.chat-msg.bot::before {
    content: '';
    position: absolute;
    left: -8px;
    bottom: 0;
    width: 0;
    height: 0;
    border-left: 10px solid transparent;
    border-right: 10px solid transparent;
    border-bottom: 10px solid #ffffff;
    filter: drop-shadow(-1px 1px 1px rgba(0, 0, 0, 0.05));
}

/* --- AI Chat Message Styling (Markdown Support) --- */
.chat-msg.bot p {
    margin: 0 0 12px 0;
}
.chat-msg.bot p:last-child {
    margin-bottom: 0;
}
.chat-msg.bot ul, .chat-msg.bot ol {
    margin: 8px 0 12px 20px;
}
.chat-msg.bot li {
    margin-bottom: 6px;
}
.chat-msg.bot strong {
    color: var(--primary-dark);
    font-weight: 700;
}
.chat-msg.bot h1, .chat-msg.bot h2, .chat-msg.bot h3 {
    font-size: 1.1rem;
    margin: 15px 0 10px 0;
    color: var(--primary-dark);
}

.chat-msg.user {
    align-self: flex-end;
    background: #e3f2fd;
    /* Light blue for user */
    color: #0d47a1;
    border: 1px solid #bbdefb;
    border-bottom-right-radius: 4px;
}

/* Bubble tail for user */
.chat-msg.user::after {
    content: '';
    position: absolute;
    right: -8px;
    bottom: 0;
    width: 0;
    height: 0;
    border-left: 10px solid transparent;
    border-right: 10px solid transparent;
    border-bottom: 10px solid #e3f2fd;
}

.ai-chat-input {
    padding: 15px;
    border-top: 1px solid #eee;
    display: flex;
    gap: 10px;
    background: white;
}

.ai-chat-input input {
    flex: 1;
    border: 1px solid #ddd;
    padding: 10px 15px;
    border-radius: 25px;
    outline: none;
    font-family: inherit;
    font-size: 16px; /* Prevents iOS Safari auto-zoom on focus */
    -webkit-appearance: none;
    appearance: none;
}

.ai-chat-input button {
    background: var(--secondary);
    color: var(--primary-dark);
    border: none;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
}

.ai-chat-input button:hover {
    background: var(--accent);
    transform: scale(1.05);
}

@media (max-width: 480px) {
    .ai-chat-window {
        width: calc(100% - 30px);
        bottom: 85px;
        right: 15px;
        height: 80vh;
        height: 80dvh; /* Modern Safari dynamic viewport height */
        border-radius: 12px;
    }

    .ai-chat-toggle {
        height: 60px;
        padding: 0 20px;
        bottom: 20px;
        right: 15px;
        gap: 10px;
    }

    .chat-suggestions {
        bottom: 95px !important;
        right: 10px !important;
        gap: 6px !important;
        max-width: 140px !important;
    }

    .suggestion-bubble {
        padding: 6px 10px !important;
        font-size: 0.7rem !important;
        white-space: normal !important;
        width: 100% !important;
        text-align: right;
    }

    /* Standardize Toolbars for all mobile/tablet */
    .accessibility-bar {
        right: 12px !important;
        left: auto !important;
        top: 90px !important; /* Positioned clearly under header on right */
        bottom: auto !important;
        transform: none !important;
        flex-direction: column !important;
        gap: 10px !important;
        padding: 8px !important;
        border-radius: 30px !important;
        z-index: 10001 !important;
    }

    .acc-btn {
        width: 40px !important;
        height: 40px !important;
        font-size: 1.1rem !important;
    }
}

/* Tablet (iPad) Fixes */
@media (min-width: 481px) and (max-width: 1024px) {
    .ai-chat-window {
        width: 420px;
        height: 60vh;
    }
    
    /* Keep bar on right to avoid logo collision */
    .accessibility-bar {
        right: 15px !important;
        left: auto !important;
    }
}

/* --- Suggestion Bubbles --- */
.chat-suggestions {
    position: fixed;
    bottom: 110px;
    right: 30px;
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 15px;
    z-index: 999;
    pointer-events: none;
    max-width: 250px; /* Constraint width */
}

.suggestion-bubble {
    background: var(--primary-dark);
    color: white;
    padding: 10px 18px;
    border-radius: 20px;
    font-size: 0.9rem;
    font-weight: 600;
    box-shadow: var(--shadow-md);
    cursor: pointer;
    pointer-events: auto;
    position: relative;
    animation: bubbleFloat 3s ease-in-out infinite;
    border: 2px solid white;
    white-space: normal; /* Changed from nowrap for mobile safety */
    max-width: 250px;
    text-align: right;
    transition: all 0.3s ease;
}

.suggestion-bubble:hover {
    background: var(--accent);
    color: var(--primary-dark);
    transform: scale(1.05); /* Removed translateX to avoid overflow */
    animation-play-state: paused;
}

.suggestion-bubble.fade-out {
    opacity: 0;
    transform: translateY(15px);
    pointer-events: none;
}

.suggestion-bubble::after {
    content: '';
    position: absolute;
    bottom: -10px;
    right: 25px;
    width: 0;
    height: 0;
    border-left: 8px solid transparent;
    border-right: 8px solid transparent;
    border-top: 10px solid var(--primary-dark);
    transition: border-top-color 0.3s;
}

.suggestion-bubble:hover::after {
    border-top-color: var(--accent);
}

.suggestion-bubble:nth-child(1) {
    animation-delay: 0s;
}

.suggestion-bubble:nth-child(2) {
    animation-delay: 0.5s;
}

.suggestion-bubble:nth-child(3) {
    animation-delay: 1s;
}

@keyframes bubbleFloat {

    0%,
    100% {
        transform: translateY(0);
    }

    50% {
        transform: translateY(-10px);
    }
}

/* About Us Section Styles */
#over-ons {
    background-color: #ffffff;
    padding: 100px 0;
}

.about-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    display: grid;
    grid-template-columns: 1fr 1.2fr;
    gap: 80px;
    align-items: center;
}

.about-text {
    max-width: 500px;
}

.about-logo-container {
    background: #f8f9fa;
    width: 120px;
    height: 120px;
    border-radius: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 30px;
    box-shadow: var(--shadow-sm);
}

.about-logo {
    max-width: 80px;
    filter: drop-shadow(0 4px 8px rgba(0, 0, 0, 0.1));
}

.about-gallery {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    grid-template-rows: repeat(5, 120px);
    gap: 15px;
}

.gallery-item {
    position: relative;
    overflow: hidden;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-sm);
    transition: var(--transition);
}

.gallery-item:hover {
    transform: scale(1.03);
    box-shadow: var(--shadow-md);
    z-index: 2;
}

.gallery-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

/* Specific Grid Layout - Optimized for 10 items */
.gi-1 {
    grid-column: 1 / 3;
    grid-row: 1 / 3;
}

.gi-2 {
    grid-column: 3 / 4;
    grid-row: 1 / 2;
}

.gi-7 {
    grid-column: 3 / 4;
    grid-row: 2 / 3;
}

.gi-5 {
    grid-column: 1 / 2;
    grid-row: 3 / 4;
}

.gi-8 {
    grid-column: 2 / 3;
    grid-row: 3 / 4;
}

.gi-3 {
    grid-column: 3 / 4;
    grid-row: 3 / 4;
}

.gi-9 {
    grid-column: 1 / 2;
    grid-row: 4 / 5;
}

.gi-6 {
    grid-column: 2 / 4;
    grid-row: 4 / 5;
}

.gi-10 {
    grid-column: 1 / 2;
    grid-row: 5 / 6;
}

.gi-4 {
    grid-column: 2 / 4;
    grid-row: 5 / 6;
}

@media (max-width: 980px) {
    .about-container {
        grid-template-columns: 1fr;
        gap: 40px;
    }

    .about-text {
        max-width: 100%;
        text-align: center;
    }

    .about-logo-container {
        margin: 0 auto 30px;
    }

    .about-gallery {
        max-width: 600px;
        margin: 0 auto;
    }
}

@media (max-width: 480px) {
    .about-gallery {
        grid-template-columns: repeat(2, 1fr);
        grid-template-rows: auto;
    }

    .gi-1,
    .gi-2,
    .gi-3,
    .gi-4,
    .gi-5,
    .gi-6,
    .gi-7,
    .gi-8,
    .gi-9,
    .gi-10 {
        grid-column: auto;
        grid-row: auto;
        height: 150px;
    }
}

/* --- Wijk-Navigator --- */
.wijk-section {
    background-color: #f0f7f0;
    padding: 100px 5%;
}

.wijk-container {
    max-width: 1200px;
    margin: 0 auto;
}

.wijk-selectors {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    justify-content: center;
    margin-bottom: 50px;
}

.wijk-btn {
    padding: 12px 24px;
    background: white;
    border: 2px solid var(--primary-light);
    color: var(--primary-dark);
    border-radius: 100px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 1rem;
    box-shadow: var(--shadow-sm);
}

.wijk-btn:hover {
    background: var(--primary-light);
    color: white;
    transform: translateY(-2px);
}

.wijk-btn.active {
    background: var(--primary);
    color: white;
    border-color: var(--primary);
    box-shadow: var(--shadow-md);
}

.wijk-display {
    background: white;
    border-radius: var(--border-radius);
    padding: 60px;
    min-height: 400px;
    box-shadow: var(--shadow-lg);
    display: flex;
    gap: 60px;
    align-items: center;
    transition: opacity 0.3s ease, transform 0.3s ease;
    border-bottom: 8px solid var(--accent);
    position: relative;
    overflow: hidden;
}

.wijk-display::after {
    content: '\f279';
    font-family: 'Font Awesome 6 Free';
    font-weight: 900;
    position: absolute;
    top: -40px;
    right: -40px;
    font-size: 300px;
    color: var(--primary);
    opacity: 0.03;
    pointer-events: none;
    z-index: 0;
}

.wijk-info {
    flex: 1;
}

.wijk-info h3 {
    font-size: 2.2rem;
    color: var(--primary-dark);
    margin-bottom: 25px;
}

.wijk-info ul {
    list-style: none;
    margin-bottom: 40px;
}

.wijk-info li {
    font-size: 1.15rem;
    margin-bottom: 18px;
    color: var(--text-main);
    display: flex;
    align-items: flex-start;
    gap: 15px;
    line-height: 1.6;
}

.wijk-info i {
    color: var(--primary);
    margin-top: 5px;
    font-size: 1.4rem;
}

.wijk-image-container {
    flex: 0 0 450px;
}

.wijk-image {
    width: 100%;
    height: 350px;
    object-fit: cover;
    border-radius: 16px;
    box-shadow: var(--shadow-md);
    border: 8px solid white;
    outline: 1px solid #eee;
}

@media (max-width: 1024px) {
    .wijk-display {
        flex-direction: column-reverse;
        padding: 40px;
        gap: 30px;
    }
    
    .wijk-image-container {
        flex: none;
        width: 100%;
    }

    .wijk-image {
        height: 250px;
    }

    .wijk-info h3 {
        font-size: 1.8rem;
    }
}

@media (max-width: 600px) {
    .wijk-section {
        padding: 60px 4%;
    }

    .wijk-selectors {
        gap: 8px;
        margin-bottom: 30px;
    }

    .wijk-btn {
        padding: 8px 16px;
        font-size: 0.85rem;
    }

    .wijk-display {
        padding: 30px 20px;
        min-height: auto;
    }

    .wijk-info h3 {
        font-size: 1.6rem;
        margin-bottom: 20px;
    }

    .wijk-info li {
        font-size: 1rem;
        margin-bottom: 12px;
        gap: 10px;
    }

    .wijk-info i {
        font-size: 1.1rem;
    }

    .chat-suggestions {
        bottom: 110px !important;
        right: 15px !important;
        gap: 6px !important;
        max-width: 150px;
    }

    .suggestion-bubble {
        padding: 6px 10px !important;
        font-size: 0.65rem !important;
        white-space: normal !important;
        text-align: right;
        line-height: 1.2;
    }
}

/* --- Wijk-Map --- */
.wijk-map-container {
    flex: 0 0 450px;
    height: 400px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.schiedam-map {
    width: 100%;
    height: 100%;
    filter: drop-shadow(0 10px 20px rgba(0,0,0,0.08));
}

.schiedam-map path {
    fill: #f2f5f2;
    stroke: #ffffff;
    stroke-width: 1.5;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    cursor: pointer;
}

.schiedam-map path:hover {
    fill: #dceddc !important;
}

.schiedam-map path.active {
    fill: var(--primary) !important;
    stroke: var(--accent);
    stroke-width: 4;
    filter: drop-shadow(0 0 8px rgba(0,0,0,0.2));
}

.map-label {
    font-family: 'Outfit', sans-serif;
    font-size: 13px; /* Slightly larger */
    font-weight: 800; /* Bolder */
    fill: var(--primary-dark);
    pointer-events: none;
    text-transform: uppercase;
    opacity: 0.9;
    text-shadow: 0 1px 2px rgba(255,255,255,0.8);
}

path.active + .map-label,
.map-label.active-label {
    fill: white !important;
    font-size: 14px;
    text-shadow: 0 1px 4px rgba(0,0,0,0.5);
}

@media (max-width: 1024px) {
    .wijk-map-container {
        flex: none;
        width: 100%;
        height: 300px;
    }
}

/* --- Raadswerk / Dossier Section --- */
.results-section {
    padding: 100px 5%;
    background-color: white;
}

.results-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
    margin-top: 50px;
}

.result-card {
    background: #fdfdfd;
    border: 1px solid #eee;
    padding: 40px;
    border-radius: var(--border-radius);
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
    position: relative;
    border-top: 5px solid var(--primary);
}

.result-card:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-xl);
    border-top-color: var(--accent);
}

.result-badge {
    position: absolute;
    top: 20px;
    right: 20px;
    padding: 6px 14px;
    border-radius: 6px;
    font-size: 0.7rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.8px;
    box-shadow: var(--shadow-sm);
}

.badge-motie { background: #e8f5e9; color: #1b5e20; }
.badge-vraag { background: #e3f2fd; color: #0d47a1; }
.badge-result { background: #fff9c4; color: #f57f17; }

.result-date {
    font-size: 0.85rem;
    font-weight: 600;
    color: #aaa;
    margin-bottom: 12px;
}

.result-card h3 {
    font-size: 1.35rem;
    color: var(--primary-dark);
    margin-bottom: 18px;
    line-height: 1.4;
}

.result-card p {
    font-size: 1.05rem;
    color: var(--text-main);
    line-height: 1.7;
    margin-bottom: 25px;
    flex-grow: 1;
}

.result-link {
    font-weight: 700;
    color: var(--primary);
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 0.95rem;
    transition: gap 0.2s;
}

.result-link:hover {
    gap: 15px;
    color: var(--primary-dark);
}

@media (max-width: 768px) {
    .results-grid {
        grid-template-columns: 1fr;
    }
    
    .result-card {
        padding: 30px;
    }
}

/* --- Accessibility Toolbar --- */
.accessibility-bar {
    position: fixed;
    top: 50%;
    right: 20px;
    transform: translateY(-50%);
    background: white;
    padding: 15px 10px;
    border-radius: 50px;
    box-shadow: 0 10px 40px rgba(0,0,0,0.15);
    display: flex;
    flex-direction: column;
    gap: 15px;
    z-index: 10000;
    border: 2px solid var(--primary);
    transition: all 0.3s ease;
}

.acc-btn {
    width: 45px;
    height: 45px;
    border-radius: 50%;
    border: none;
    background: #f8f9fa;
    color: var(--primary);
    cursor: pointer;
    font-size: 1.2rem;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
}

.acc-btn:hover {
    background: var(--primary);
    color: white;
    transform: scale(1.1);
}

.acc-btn::after {
    content: attr(data-tooltip);
    position: absolute;
    right: 55px;
    background: var(--primary-dark);
    color: white;
    padding: 6px 14px;
    border-radius: 6px;
    font-size: 0.85rem;
    font-weight: 700;
    white-space: nowrap;
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: all 0.25s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    box-shadow: 0 5px 20px rgba(0,0,0,0.3);
    top: 50%;
    transform: translateY(-50%) translateX(10px);
}

.acc-btn::before {
    content: '';
    position: absolute;
    right: 48px;
    top: 50%;
    transform: translateY(-50%);
    border-left: 8px solid var(--primary-dark);
    border-top: 8px solid transparent;
    border-bottom: 8px solid transparent;
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: all 0.2s ease;
}

.acc-btn:hover::after,
.acc-btn:hover::before {
    opacity: 1;
    visibility: visible;
}

/* --- High Contrast Mode --- */
body.high-contrast,
body.high-contrast header,
body.high-contrast main,
body.high-contrast nav,
body.high-contrast footer,
body.high-contrast section,
body.high-contrast div,
body.high-contrast .speerpunten-box,
body.high-contrast .accordion-item {
    background: #000 !important;
    background-color: #000 !important;
    color: yellow !important;
    border-color: yellow !important;
}

body.high-contrast h1, 
body.high-contrast h2, 
body.high-contrast h3, 
body.high-contrast h4,
body.high-contrast p,
body.high-contrast span,
body.high-contrast li,
body.high-contrast a,
body.high-contrast i {
    color: yellow !important;
    background: transparent !important;
    border-color: yellow !important;
}

body.high-contrast .acc-btn,
body.high-contrast .cta-button,
body.high-contrast .wijk-btn.active,
body.high-contrast .result-card .cta-button {
    background: yellow !important;
    color: #000 !important;
    border: 3px solid #fff !important;
}

body.high-contrast .acc-btn i {
    color: #000 !important;
}

body.high-contrast .main-name { color: #fff !important; }
body.high-contrast .sub-name { color: yellow !important; }

body.high-contrast i.fa-check,
body.high-contrast .accordion-icon,
body.high-contrast .nav-links a {
    color: yellow !important;
    opacity: 1 !important;
}

body.high-contrast .schiedam-map { background: #000 !important; }
body.high-contrast .schiedam-map path {
    fill: #000 !important;
    stroke: yellow !important;
    stroke-width: 2 !important;
}
body.high-contrast .schiedam-map path.active {
    fill: yellow !important;
    stroke: #fff !important;
}

html.font-large { font-size: 1.2rem !important; }
html.font-xlarge { font-size: 1.45rem !important; }

/* Results Actions & Portal Call-to-Action */
.results-actions {
    margin-top: 30px;
    margin-bottom: 40px;
    display: flex;
    justify-content: center;
    gap: 20px;
}

.results-actions .cta-button {
    font-size: 1rem;
    padding: 14px 28px;
    box-shadow: var(--shadow-md);
    display: flex;
    align-items: center;
    gap: 12px;
}

.results-actions i {
    color: var(--accent);
}

@media (max-width: 480px) {
    .results-actions {
        flex-direction: column;
        padding: 0 10%;
    }
}

/* ==========================================================================
   GLOBALE MOBIEL / SAFARI FIXES
   ========================================================================== */

/* Voorkom iOS Safari zoom bij focus op inputs/selects (min 16px) */
input[type="text"],
input[type="search"],
input[type="email"],
input[type="password"],
select,
textarea {
    font-size: 16px !important;
}

/* iOS Safe Area padding (notch, home-indicator) */
@supports (padding: max(0px)) {
    header,
    .nav-fixed,
    .dash-nav {
        padding-left: max(5%, env(safe-area-inset-left));
        padding-right: max(5%, env(safe-area-inset-right));
    }
    footer {
        padding-bottom: max(40px, env(safe-area-inset-bottom));
    }
    #mobileFilterToggle {
        bottom: max(20px, env(safe-area-inset-bottom));
    }
}

/* Schakel hover-effecten uit op touch-apparaten (betere performance) */
@media (hover: none) {
    .glass-card:hover,
    .premium-card:hover,
    .point-card:hover,
    .result-card:hover,
    .news-card:hover,
    .step-card:hover {
        transform: none !important;
        box-shadow: var(--shadow-sm) !important;
    }
    .tool-link:hover {
        transform: none !important;
    }
}

/* Touch target minimum grootte (Apple HIG: 44pt) */
button,
a,
[role="button"],
.filter-option,
.wijk-btn,
.cta-button,
.pdf-btn,
.filter-toggle-btn {
    min-height: 44px;
}

/* Verwijder tap-highlight op iOS */
a,
button,
[role="button"] {
    -webkit-tap-highlight-color: transparent;
}

/* Smooth scrolling voor Safari iOS */
html {
    -webkit-overflow-scrolling: touch;
}

/* Backdrop-filter fallback: als browser het niet ondersteunt, toon solid wit */
@supports not ((-webkit-backdrop-filter: blur(1px)) or (backdrop-filter: blur(1px))) {
    .glass-card {
        background: rgba(255, 255, 255, 0.97) !important;
    }
    .premium-sidebar {
        background: rgba(255, 255, 255, 0.98) !important;
    }
}

/* Charts responsivity op kleine schermen */
@media (max-width: 500px) {
    .chart-container {
        height: 250px !important;
    }
}

/* Monitor-tabel responsive */
@media (max-width: 768px) {
    .monitor-table {
        font-size: 0.8rem;
    }
    .monitor-table td,
    .monitor-table th {
        padding: 12px 8px;
    }
}

/* Mobiele stats-grid */
@media (max-width: 480px) {
    .stats-grid {
        grid-template-columns: 1fr 1fr !important;
        gap: 12px;
    }
    .stat-value {
        font-size: 2rem;
    }
    .monitor-container {
        padding: 0 12px;
        margin: 20px auto;
    }
}

