/* =================================================================
   Main Stylesheet - Consolidated and Optimized for Antoon Diepstraten
   ================================================================= */

/* --- CSS Custom Properties (Variables) --- */
:root {
    /* Colors */
    --primary-color: #2c5aa0;
    --primary-hover: #1e3f73;
    --secondary-color: #6c757d;
    --success-color: #198754;
    --warning-color: #ffc107;
    --danger-color: #dc3545;
    --light-gray: #f8f9fa;
    --medium-gray: #e9ecef;
    --dark-gray: #495057;
    --white: #ffffff;
    --black: #212529;
    --text-color: #343a40;
    --text-muted: #6c757d;
    --border-color: #dee2e6;
    --light-blue-bg: #e6f7ff;
    --light-red-bg: #fff0f1;
    --light-red-border: #ffdfe2;
    --light-green-bg: #d1e7dd;
    --ai-banner-bg: #d4edda;
    --ai-banner-text: #155724;
    --ai-banner-border: #c3e6cb;
    --status-working-bg: #e0f7fa;
    --status-working-text: #00796b;
    --status-error-bg: #f8d7da;
    --status-error-text: #721c24;
    --stat-icon-bg: #e0f0ff;
    --blue-highlight: #007bff;
    --dark-blue-highlight: #0056b3;
    --link-color-old-header: #77aaff;
    --header-bg-color: #ffffff; /* Wit */
    --header-text-color: #343a40; /* Donkergrijs voor contrast op wit */
    --nav-icon-color-light-bg: #2c5aa0; /* Specifiek voor nav iconen op lichte achtergrond (primaire kleur) */


    /* Typography */
    --font-family-base: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    --font-family-serif: Georgia, serif;
    --font-family-monospace: 'Courier New', monospace;
    --font-size-base: 16px;
    --line-height-base: 1.6;

    /* Spacing */
    --spacing-xs: 0.25rem; /* 4px */
    --spacing-sm: 0.5rem;  /* 8px */
    --spacing-md: 1rem;    /* 16px */
    --spacing-lg: 1.5rem;  /* 24px */
    --spacing-xl: 2rem;    /* 32px */
    --spacing-xxl: 3rem;   /* 48px */
    --padding-card: 20px; /* Consistent padding voor kaarten */

    /* Shadows */
    --shadow-sm: 0 1px 3px rgba(0,0,0,0.1);
    --shadow-md: 0 4px 8px rgba(0,0,0,0.05);
    --shadow-lg: 0 10px 15px rgba(0,0,0,0.1);
    --shadow-heavy: 0 8px 32px rgba(0,0,0,0.3);
    --shadow-inset-light: inset 0 1px 3px rgba(255,255,255,0.8);
    --shadow-inset-dark: inset 0 1px 3px rgba(0,0,0,0.1);

    /* Border radius */
    --radius-xs: 3px;
    --radius-sm: 4px;
    --radius-md: 8px;
    --radius-lg: 15px;
    --radius-full: 50%;

    /* Transitions */
    --transition-fast: all 0.2s ease-in-out;
    --transition-medium: all 0.3s ease;
}

/* --- Global Reset & Base Styles --- */
*, *::before, *::after {
    box-sizing: border-box;
}

body {
    font-family: var(--font-family-base);
    font-size: var(--font-size-base);
    line-height: var(--line-height-base);
    color: var(--text-color);
    background-color: var(--light-gray);
    margin: 0;
    padding: 0;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* --- Headings --- */
h1 {
    color: var(--primary-color);
    font-size: 2.5rem;
    font-weight: 600;
    line-height: 1.2;
    margin: 0 0 var(--spacing-md) 0;
}

h2 {
    color: var(--black);
    font-size: 2rem;
    font-family: var(--font-family-serif);
    font-weight: 600;
    line-height: 1.2;
    margin: 0 0 var(--spacing-lg) 0;
    text-align: left;
}

h3 {
    margin: 0;
    color: var(--black);
    font-size: 1.5rem;
}

h4 {
    margin-top: var(--spacing-lg);
    margin-bottom: var(--spacing-sm);
    color: var(--black);
    font-size: 1.25rem;
}

p {
    margin: 0 0 var(--spacing-md) 0;
    color: var(--text-color);
    font-size: var(--font-size-base);
    font-family: var(--font-family-serif);
    font-weight: 400;
    line-height: var(--line-height-base);
    text-decoration: none;
    text-align: left;
}

hr {
    border: none;
    height: 1px;
    background-color: var(--border-color);
    margin: var(--spacing-xl) 0;
}

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

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

/* --- Buttons --- */
.button, .button-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: var(--spacing-sm) var(--spacing-lg);
    background: var(--primary-color);
    color: var(--white);
    border: none;
    border-radius: var(--radius-md);
    font-size: var(--font-size-base);
    font-weight: 500;
    text-decoration: none;
    cursor: pointer;
    transition: var(--transition-fast);
    min-height: 44px;
}

.button:hover, .button-link:hover {
    background: var(--primary-hover);
    transform: translateY(-1px);
    text-decoration: none;
    box-shadow: var(--shadow-sm);
}

.button-small {
    padding: 5px 10px;
    font-size: 0.9em;
    min-height: auto;
}

.button-link-secondary {
    background-color: var(--secondary-color);
    color: var(--white);
    padding: 10px 15px;
    border-radius: 5px;
    display: inline-block;
    text-decoration: none;
}
.button-link-secondary:hover {
    background-color: #5a6268;
}



/* --- General Layout & Container (Gecorrigeerd) --- */
.container {
    width: 95%;
    max-width: 1200px;
    margin: var(--spacing-lg) auto;
    padding: var(--spacing-lg);
    background-color: var(--white);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-md);
}

/* --- Page Headers --- */
.page-header { /* Gebruikt op agenda.php, beheerindex.php (voor "Dashboard") */
    padding: var(--spacing-lg) 0;
    margin-bottom: var(--spacing-xl);
    border-bottom: 1px solid var(--border-color);
    display: flex;
    justify-content: space-between;
    align-items: center;
}
.page-header h1 {
    margin: 0;
}

/* Homepage Public Header */
.page-header-public {
    background-color: var(--header-bg-color); /* Wit */
    padding: var(--spacing-lg) var(--padding-card);
    margin-bottom: var(--spacing-xl);
    border-bottom: 2px solid var(--border-color);
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    align-items: center;
    border-radius: var(--radius-lg) var(--radius-lg) 0 0;
}
.page-header-public .header-content {
    flex-grow: 1;
    min-width: 250px;
}
.page-header-public .header-content h1 {
    margin: 0;
    color: var(--primary-color);
    font-size: 2.5rem;
}
.page-header-public .subtitle {
    color: var(--header-text-color); /* Donkergrijs */
    font-size: 1.1rem;
    font-style: italic;
    margin: 0;
}
.page-header-public .main-nav {
    flex-shrink: 0;
    margin-left: var(--spacing-md);
}


/* --- Main Navigation (Public) --- */
.main-nav {
    display: flex;
    gap: var(--spacing-sm);
    flex-wrap: wrap;
    justify-content: flex-end;
}

.nav-button {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 50px;
    height: 50px;
    background: var(--white);
    border: 2px solid var(--border-color);
    border-radius: var(--radius-md);
    color: var(--nav-icon-color-light-bg); /* Gebruik de nieuwe variabele */
    font-size: 1.2rem;
    transition: var(--transition-fast);
    text-decoration: none;
}

.nav-button:hover, .nav-button:focus {
    background: var(--primary-color);
    border-color: var(--primary-color);
    color: var(--white);
    text-decoration: none;
    transform: translateY(-2px);
}

.nav-button.nav-active {
    background: var(--primary-color);
    border-color: var(--primary-color);
    color: var(--white);
}

/* --- Dashboard Specific Styles --- */
.admin-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: var(--padding-card);
    background-color: #f0f0f0;
    border-bottom: 1px solid #ddd;
    margin-bottom: var(--padding-card);
}

.admin-header .logo {
    max-height: 50px;
    margin-right: 15px;
}

.admin-header h1 {
    margin: 0;
    font-size: 28px;
    color: #333;
}

.admin-header .user-info {
    display: flex;
    align-items: center;
    font-size: var(--font-size-base);
    color: #555;
}

.admin-header .user-info a {
    margin-left: 15px;
    color: var(--blue-highlight);
    text-decoration: none;
}

.admin-header .user-info a:hover {
    text-decoration: underline;
}

.admin-header .user-info i {
    margin-right: 5px;
    color: var(--blue-highlight);
}

/* Dashboard Grids & Cards */
.dashboard-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: var(--padding-card);
    padding: var(--padding-card);
}

.card, .dashboard-panel {
    background-color: var(--white);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-md);
    padding: var(--padding-card);
}

.card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
    border-bottom: 1px solid #eee;
    padding-bottom: 10px;
}

.card-header h3 {
    margin: 0;
    color: #333;
    font-size: 20px;
}

.card-header .total-count {
    font-size: 24px;
    font-weight: bold;
    color: var(--blue-highlight);
}

.card ul, .dashboard-panel ul {
    list-style-type: none;
    padding: 0;
    margin: 0;
}

.card ul li, .dashboard-panel ul li {
    padding: 8px 0;
    border-bottom: 1px dashed #eee;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.card ul li:last-child, .dashboard-panel ul li:last-child {
    border-bottom: none;
}

.card ul li a, .dashboard-panel ul li a {
    text-decoration: none;
    color: var(--blue-highlight);
    font-weight: bold;
}

.card ul li a:hover, .dashboard-panel ul li a:hover {
    text-decoration: underline;
}

.card ul li span, .dashboard-panel ul li span {
    color: #666;
    font-size: 14px;
}

.main-actions-bar {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    background-color: var(--white);
    padding: 12px;
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-sm);
    margin-bottom: 25px;
}
.main-actions-bar .button-link-secondary {
    font-size: 1.2rem;
    padding: 12px 15px;
}

.action-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: var(--padding-card);
}

.action-buttons .btn {
    background-color: var(--blue-highlight);
    color: var(--white);
    padding: 10px 15px;
    border-radius: 5px;
    text-decoration: none;
    font-size: var(--font-size-base);
    display: flex;
    align-items: center;
    gap: 8px;
    transition: var(--transition-fast);
}

.action-buttons .btn:hover {
    background-color: var(--dark-blue-highlight);
}

.action-buttons .btn.btn-secondary {
    background-color: var(--secondary-color);
}

.action-buttons .btn.btn-secondary:hover {
    background-color: #5a6268;
}

/* Stat Cards */
.stats-grid {
    display: grid;
    gap: 20px;
    margin-bottom: 25px;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
}

.stat-card {
    background-color: var(--white);
    padding: var(--padding-card);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-sm);
    display: flex;
    align-items: center;
    gap: 20px;
    transition: var(--transition-fast);
}
.stat-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 4px 8px rgba(0,0,0,0.1);
}

.stat-icon-wrapper {
    font-size: 1.8em;
    color: var(--white);
    background-color: var(--primary-color);
    height: 50px;
    width: 50px;
    border-radius: var(--radius-full);
    display: flex;
    justify-content: center;
    align-items: center;
    flex-shrink: 0;
}
.stat-content {
    display: flex;
    flex-direction: column;
}
.stat-number {
    font-size: 1.8em;
    font-weight: 700;
    color: #343a40;
}
.stat-label {
    font-size: 0.9em;
    color: #6c757d;
}

/* AI Helper Banner */
.ai-helper-banner {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: #e9f0f8;
    border: 1px solid #b8cde8;
    border-left: 5px solid var(--dark-blue-highlight);
    padding: 15px 20px;
    border-radius: var(--radius-md);
    margin-bottom: 25px;
    transition: opacity 0.5s;
}
.ai-helper-banner .ai-content { display: flex; align-items: center; gap: 15px; }
.ai-helper-banner i { font-size: 1.5rem; color: var(--dark-blue-highlight); }
.ai-helper-banner p { margin: 0; }
.ai-helper-banner a { color: var(--dark-blue-highlight); font-weight: bold; text-decoration: none; cursor: pointer; }
.ai-helper-banner a:hover { text-decoration: underline; }
.ai-helper-banner .close-btn { background: none; border: none; font-size: 1.5rem; color: #888; cursor: pointer; }
.ai-helper-banner .status-message { margin-left: 10px; font-weight: bold; }
.ai-helper-banner .success { color: var(--success-color); }
.ai-helper-banner .error { color: var(--danger-color); }
.ai-helper-banner .working { color: #555; }

/* --- Calendar Specific Styles --- */
.ai-planning-section {
    background-color: #f0f8ff;
    border: 1px solid #d1e7fd;
    border-left: 5px solid #0d6efd;
    padding: var(--padding-card);
    margin-bottom: 30px;
    border-radius: 5px;
}

.ai-planning-section h2 {
    margin-top: 0;
    color: #0a58ca;
    font-size: 22px;
}

.ai-planning-section ul {
    padding-left: 20px;
    margin: 0;
    list-style-type: none;
}

.ai-planning-section li {
    margin-bottom: 8px;
}

.status-bezig {
    font-weight: bold;
    color: var(--success-color);
}

.calendar-container {
    width: 100%;
}

.calendar-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: var(--padding-card) 0;
}

.calendar-header h2 {
    margin: 0;
    font-size: 24px;
    text-transform: capitalize;
}

.calendar-header .nav-links a {
    text-decoration: none;
    color: #333;
    font-size: 18px;
    padding: 5px 15px;
    border-radius: 5px;
    background-color: #f2f2f2;
}

.calendar-grid {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    border-top: 1px solid #ddd;
}

.calendar-day-header, .calendar-day {
    border-right: 1px solid #ddd;
    border-bottom: 1px solid #ddd;
    padding: 10px;
    min-height: 120px;
    box-sizing: border-box;
}

.calendar-day:nth-child(7n) {
    border-right: none;
}

.calendar-day-header {
    font-weight: bold;
    text-align: center;
    background-color: #f9f9f9;
    min-height: auto;
}

.calendar-day.not-in-month {
    background-color: #fafafa;
}

.day-number {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 14px;
    font-weight: bold;
    margin-bottom: 5px;
}

.day-total-time {
    font-size: 11px;
    font-weight: bold;
    background-color: var(--medium-gray);
    color: var(--dark-gray);
    padding: 2px 6px;
    border-radius: 10px;
}

.event, .exhibition-info, .workshop-info {
    font-size: 12px;
    margin-top: 5px;
    padding: 3px 5px;
    border-radius: var(--radius-xs);
    line-height: 1.4;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.event:hover, .exhibition-info:hover, .workshop-info:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0,0,0,0.1);
}

.event {
    background-color: var(--light-blue-bg);
}

.event-time {
    font-style: italic;
    color: #555;
}

.exhibition-info {
    font-weight: bold;
}

.calendar-day.exhibition-period {
    background-color: var(--light-red-bg);
}

.exhibition-info {
    background-color: var(--light-red-border);
    border-left: 3px solid var(--danger-color);
}

.workshop-info {
    background-color: var(--light-green-bg);
    border-left: 3px solid var(--success-color);
}

/* --- Form Styles --- */
fieldset {
    padding: .35em .75em .625em;
    margin: 0 2px;
    border: 1.77778px groove rgb(240, 240, 240);
    border-radius: 0;
    opacity: 1;
    background-image: none;
    color: #333333;
    font-size: var(--font-size-base);
    font-family: var(--font-family-serif);
    font-weight: 400;
    text-align: left;
    background-color: rgba(0,0,0,0);
}

.form-group {
    margin-bottom: var(--spacing-md);
}

.form-group label {
    display: block;
    margin-bottom: var(--spacing-xs);
    font-weight: bold;
}

.form-group input[type="text"],
.form-group input[type="email"],
.form-group input[type="password"],
.form-group input[type="number"],
.form-group input[type="url"],
.form-group textarea,
.form-group select,
.form-group input[type="file"] {
    width: 100%;
    padding: var(--spacing-sm);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    box-sizing: border-box;
}

.form-group textarea {
    min-height: 100px;
    resize: vertical;
}

.form-actions {
    margin-top: var(--spacing-lg);
}

.form-actions .button {
    margin-right: 10px;
}

/* --- Table Styles --- */
table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: var(--spacing-lg);
    background-color: var(--white);
    box-shadow: var(--shadow-sm);
}

table th, table td {
    border: 1px solid var(--border-color);
    padding: 12px 15px;
    text-align: left;
}

table th {
    background-color: var(--medium-gray);
    font-weight: bold;
}

table tr:nth-child(even) {
    background-color: #f9f9f9;
}

table tr:hover {
    background-color: #e9e9e9;
}

/* --- Message Styles --- */
.message {
    padding: 15px;
    margin-bottom: var(--spacing-lg);
    border-radius: var(--radius-sm);
    font-size: 1.1em;
}

.message.success {
    background-color: var(--ai-banner-bg);
    color: var(--ai-banner-text);
    border: 1px solid var(--ai-banner-border);
}

.message.error {
    background-color: var(--status-error-bg);
    color: var(--status-error-text);
    border: 1px solid #f5c6cb;
}

.message.info {
    background-color: #d1ecf1;
    color: #0c5460;
    border: 1px solid #bee5eb;
}

/* --- Image Gallery Styles (Basic) --- */
.gallery {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: var(--spacing-lg);
    margin-bottom: var(--spacing-xl);
    padding: 0;
}

.gallery-item {
    display: block;
    background: var(--white);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    overflow: hidden;
    transition: var(--transition-fast);
    text-decoration: none;
    color: inherit;
    box-shadow: var(--shadow-sm);
}

.gallery-item:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
    text-decoration: none;
    border-color: var(--primary-color);
}

.gallery-item img {
    width: 100%;
    height: 200px;
    object-fit: cover;
    display: block;
    margin-bottom: 10px;
    background: var(--light-gray);
}

.gallery-item .titel {
    padding: var(--spacing-md);
    font-weight: 500;
    color: var(--text-color);
    text-align: center;
    border-top: 1px solid var(--border-color);
    background: var(--white);
}

/* --- Detail Pages (General, used by multiple detail views) --- */
.detail-header {
    display: flex;
    align-items: center;
    gap: var(--spacing-md);
    margin-bottom: var(--spacing-xl);
    padding-bottom: var(--spacing-lg);
    border-bottom: 1px solid var(--border-color);
}

.button-back {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 50px;
    height: 50px;
    background: var(--primary-color);
    color: var(--white);
    border-radius: var(--radius-md);
    text-decoration: none;
    transition: var(--transition-fast);
    font-size: 1.2rem;
}

.button-back:hover {
    background: var(--primary-hover);
    transform: translateY(-2px);
    text-decoration: none;
}

.detail-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: var(--spacing-xl);
    align-items: start;
}
.detail-grid-artwork {
    display: grid;
    grid-template-columns: 1fr;
    gap: var(--padding-card);
    margin-top: var(--padding-card);
}

.artwork-main-image {
    width: 100%;
    max-width: 100%;
    height: auto;
    display: block;
    border-radius: var(--radius-md);
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
    transition: var(--transition-fast);
}

.artwork-main-image:hover {
    transform: scale(1.02);
    box-shadow: var(--shadow-lg);
}

.lees-voor-container {
    display: flex;
    gap: var(--spacing-md);
    align-items: flex-start;
    margin-bottom: var(--spacing-lg);
}

.lees-voor-container p {
    flex: 1;
    margin: 0;
}

.meta-info {
    background: var(--light-gray);
    padding: var(--spacing-lg);
    border-radius: var(--radius-md);
    margin-bottom: var(--spacing-lg);
}

.meta-info p {
    margin: 0 0 var(--spacing-sm) 0;
}

.meta-info p:last-child {
    margin-bottom: 0;
}

.primary-action-button {
    background-color: var(--primary-color);
    color: var(--white);
}

.primary-action-button:hover {
    background-color: var(--primary-hover);
}

.danger-action-button {
    background-color: var(--danger-color);
    color: var(--white);
}

.danger-action-button:hover {
    background-color: #c02a37;
}

.sold-status-yes {
    color: #e74c3c;
    font-weight: bold;
}

.sold-status-no {
    color: #2ecc71;
    font-weight: bold;
}

.speak-button {
    padding: 8px 12px;
}

/* --- Documentation --- */
.documentation-section h3 {
    margin-bottom: var(--spacing-md);
    color: var(--primary-color);
    border-top: 1px solid var(--border-color);
    padding-top: var(--padding-card);
    margin-top: var(--padding-card);
}

.doc-thumbnail-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(80px, 1fr));
    gap: var(--spacing-md);
    list-style: none;
    padding: 0;
    margin: 0;
}

.doc-thumbnail {
    width: 100%;
    height: 80px;
    object-fit: cover;
    border-radius: var(--radius-sm);
    border: 1px solid var(--border-color);
    transition: var(--transition-fast);
}

.doc-thumbnail:hover {
    transform: scale(1.05);
    box-shadow: var(--shadow-md);
}

/* --- Music Page General --- */
.music-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: var(--spacing-xl);
    margin-bottom: var(--spacing-xl);
}

/* --- Footer --- */
footer {
    padding: var(--spacing-lg);
    margin-top: var(--spacing-xxl);
    color: var(--white);
    background-color: var(--black);
    text-align: center;
}

/* --- Utility Classes & Animations --- */
.text-center { text-align: center; }
.text-right { text-align: right; }
.hidden { display: none; }

.loader-small-white {
    border: 3px solid #f3f3f3;
    border-top: 3px solid var(--white);
    border-radius: var(--radius-full);
    width: 14px;
    height: 14px;
    animation: spin 1s linear infinite;
    display: inline-block;
    vertical-align: middle;
    margin-right: 5px;
}

.loader {
    border: 5px solid #f3f3f3;
    border-top: 5px solid #3498db;
    border-radius: 50%;
    width: 50px;
    height: 50px;
    animation: spin 2s linear infinite;
    margin: 20px auto;
}

.loader-small {
    border: 3px solid rgba(255,255,255,0.3);
    border-top: 3px solid var(--white);
    border-radius: var(--radius-full);
    width: 20px;
    height: 20px;
    animation: spin 1s linear infinite;
    display: inline-block;
    vertical-align: middle;
    margin-left: 5px;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.3; }
}

@keyframes bounce {
    0% { height: 5px; }
    100% { height: 18px; }
}

/* --- Responsive Design --- */
/* Mobile First: Stijlen gedefinieerd zonder media queries zijn de basis voor mobiel.
   Media queries breiden deze stijlen uit voor grotere schermen. */

/* Tablet & Smaller Desktop Screens (>= 768px) */
@media (min-width: 768px) {
    .container {
        width: 80%;
        padding: var(--spacing-lg) 0;
    }
    
    /* Dashboard specific */
    .dashboard-grid.stats-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    .dashboard-grid.detail-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    .full-width-card {
        grid-column: 1 / -1;
    }

    /* Page Header Public responsive */
    .page-header-public {
        flex-direction: row;
        text-align: left;
    }
    .page-header-public .header-content {
        flex-grow: 1;
        min-width: auto;
    }
    .page-header-public .main-nav {
        margin-left: var(--spacing-xl);
    }
    
    .filter-search-forms {
        flex-direction: row;
    }
    
    .filter-container {
        justify-content: flex-start;
    }
    
    .gallery { /* Swiper container, op grotere schermen */
        /* Zorg dat de Swiper een gedefinieerde maximale breedte heeft zodat de slides centraal blijven */
        max-width: calc(3 * 320px + 2 * var(--spacing-md) + 2 * var(--spacing-xl)); /* Max 3 slides + gaps + paddings */
        margin-left: auto; /* Centreer de galerij */
        margin-right: auto;
    }
    .swiper-slide {
        width: 320px; /* Behoud vaste breedte op grotere schermen */
    }
    
    .detail-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: var(--spacing-xl);
    }
    .detail-grid-artwork {
        grid-template-columns: 1fr 1fr;
        gap: 40px;
    }
    
    .music-grid {
        grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
        gap: var(--spacing-xl);
    }
    
    .lees-voor-container {
        flex-direction: row;
    }
}

/* Larger Desktop Screens (>= 1200px) */
@media (min-width: 1200px) {
    .container {
        max-width: 1400px;
    }
    .dashboard-grid.stats-grid {
        grid-template-columns: repeat(4, 1fr);
    }
    .dashboard-grid.detail-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

/* Smaller Mobile Screens (<= 480px) */
@media (max-width: 480px) {
    h1 {
        font-size: 2rem;
    }
    h2 {
        font-size: 1.75rem;
    }

    .header-content h1 {
        font-size: 1.75rem;
    }
    
    .subtitle {
        font-size: 1rem;
    }
    
    .gallery { /* Volle breedte op zeer kleine schermen */
        grid-template-columns: 1fr;
        max-width: 100%; /* Zorg dat het flexibel blijft */
    }
    .swiper-slide { /* Slides nemen volle breedte op zeer kleine schermen */
        width: 90%; /* Geef een percentage breedte */
        height: auto; /* Laat de hoogte zich aanpassen aan de inhoud */
    }
    .swiper-slide img {
        height: auto; /* Laat afbeelding de hoogte bepalen */
        max-height: 180px; /* Maximale hoogte voor kleinere schermen */
        object-fit: contain; /* Gebruik contain voor kleinere schermen om hele afbeelding te zien */
    }
    .swiper-slide .titel-slider {
        font-size: 0.9em; /* Kleinere titel op mobiel */
    }
    
    .nav-button {
        width: 45px;
        height: 45px;
        font-size: 1rem;
    }
    
    .zoek-container form {
        flex-direction: column;
    }
    
    .filter-container {
        flex-direction: column;
        align-items: stretch;
    }
    
    .form-group {
        width: 100%;
    }
    
    .form-group select {
        width: 100%;
    }
}

/* Specific breakpoint for music-card on small screens (<= 600px) */
@media (max-width: 600px) {
    .music-card {
        margin: 10px;
        padding: 15px;
    }
    
    .cassette-controls {
        flex-direction: column;
        gap: 10px;
    }
    
    .progress-container {
        margin: 0;
        order: -1;
    }
}


/* --- Print Styles --- */
@media print {
    .nav-button,
    .button-link,
    .button-back,
    .load-more-ajax-container,
    .cassette-controls {
        display: none !important;
    }
    
    .container {
        box-shadow: none;
        margin: 0;
        padding: var(--spacing-md);
    }
    
    .gallery-item,
    .music-card {
        break-inside: avoid;
        box-shadow: none;
        border: 1px solid #000;
    }
}

/* --- Focus Styles for Accessibility --- */
:focus-visible {
    outline: 2px solid var(--primary-color);
    outline-offset: 2px;
}

/* --- Reduced Motion --- */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
    
    .spool.playing {
        animation: none;
    }
}

/* --- Legacy Header & Navigation (retained for compatibility if still in use on any pages) --- */
/* AANBEVOLEN: Update de HTML van pagina's die deze gebruiken en verwijder deze sectie uiteindelijk. */
header {
    background: #333;
    color: #fff;
    padding-top: 20px;
    min-height: 70px;
    border-bottom: var(--link-color-old-header) 3px solid;
}

header a {
    color: #fff;
    text-decoration: none;
    text-transform: uppercase;
    font-size: 16px;
}

header ul {
    padding: 0;
    list-style: none;
}

header li {
    display: inline;
    padding: 0 20px 0 20px;
}

header #branding {
    float: left;
}

header #branding h1 {
    margin: 0;
}

header nav {
    float: right;
    margin-top: 10px;
}

header .highlight, header .current a {
    color: var(--link-color-old-header);
    font-weight: bold;
}

header a:hover {
    color: #cccccc;
    font-weight: bold;
}

/* --- Muziek Beheer specifieke stijlen (opgeschoond) --- */
.top-nav-buttons {
    margin-bottom: var(--spacing-lg);
    display: flex;
    gap: var(--spacing-sm);
    flex-wrap: wrap;
}

.music-form-card {
    background: var(--white);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-sm);
    padding: var(--padding-card);
    margin-bottom: var(--spacing-lg);
}

/* Algemene styling voor alerts */
.alert {
    padding: var(--spacing-sm) var(--spacing-md);
    border: 1px solid transparent;
    border-radius: var(--radius-sm);
    margin-bottom: var(--spacing-md);
}
.alert.success {
    background-color: var(--ai-banner-bg);
    color: var(--ai-banner-text);
    border-color: var(--ai-banner-border);
}
.alert.error {
    background-color: var(--status-error-bg);
    color: var(--status-error-text);
    border-color: #f5c6cb;
}

/* Formulier rasters */
.form-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: var(--spacing-md);
}

/* Formulier elementen algemeen */
.form-group label {
    font-weight: bold;
    margin-bottom: var(--spacing-xs);
    display: block;
}
.form-group input[type="text"],
.form-group input[type="url"],
.form-group input[type="date"],
.form-group input[type="time"],
.form-group input[type="file"],
.form-group select,
.form-group textarea,
.search-form input[type="text"] {
    width: 100%;
    padding: var(--spacing-sm);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    box-sizing: border-box;
}

/* Zoekformulier */
.search-form {
    display: flex;
    gap: var(--spacing-sm);
    margin-bottom: var(--spacing-lg);
    flex-wrap: wrap;
}
.search-form input[type="text"] {
    flex-grow: 1;
    min-width: 150px;
}

/* Music Card specifieke header */
.music-card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: var(--spacing-md);
}
.music-card-header h4 {
    margin: 0;
    font-size: 1.2em;
}
.type-badge {
    background: var(--medium-gray);
    color: var(--dark-gray);
    padding: 3px 8px;
    border-radius: var(--radius-sm);
    font-size: 0.8em;
}

/* Card Acties */
.card-actions {
    display: flex;
    gap: var(--spacing-sm);
    margin-top: var(--spacing-md);
}

.no-results {
    text-align: center;
    color: var(--text-muted);
    padding: var(--padding-card);
    font-style: italic;
}

/* Overriding en/of consolideren van music-card en cassette player stijlen */
.music-card {
    background: linear-gradient(145deg, #f0f0f0, #d0d0d0);
    border-radius: var(--radius-lg);
    padding: var(--padding-card);
    margin: var(--spacing-lg) auto;
    max-width: 450px;
    box-shadow:
        var(--shadow-heavy),
        var(--shadow-inset-light);
    border: 2px solid #bbb;
}

/* Cassette Player - Aangepast om correct te schalen zonder transform: scale() */
.cassette-player {
    background: linear-gradient(145deg, #2c3e50, #34495e);
    border-radius: 12px;
    padding: 15px;
    margin: 15px auto;
    max-width: 250px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.3);
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: stretch;
    box-sizing: border-box;
}

.cassette-body {
    background: linear-gradient(145deg, #ecf0f1, #bdc3c7);
    border-radius: var(--radius-md);
    padding: 10px;
    margin-bottom: 5px;
}

.cassette-window {
    display: flex;
    gap: 15px;
    flex-grow: 1;
    justify-content: space-around;
    align-items: center;
    padding: var(--spacing-md);
    background: linear-gradient(145deg, #1a1a1a, #2a2a2a);
    border-radius: 6px;
    box-shadow:
        inset 0 2px 8px rgba(0,0,0,0.6),
        0 1px 2px rgba(255,255,255,0.3);
    border: 1px solid #333;
    position: relative;
    margin-top: var(--spacing-md);
}

.spool-container {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 35px;
    height: 35px;
    position: relative;
}

.spool {
    width: 100%;
    height: 100%;
    border-radius: var(--radius-full);
    background: radial-gradient(circle at 30% 30%, #d4af37, #b8860b, #8b6914);
    box-shadow:
        0 2px 8px rgba(0,0,0,0.4),
        inset 0 1px 3px rgba(255,255,255,0.3),
        inset 0 -1px 3px rgba(0,0,0,0.3);
    border: 2px solid #cd853f;
    position: relative;
    transition: transform 0.1s ease;
}

.spool::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 8px;
    height: 8px;
}

.cassette-controls {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 15px;
    background: #2c3e50;
    padding: 15px;
    border-radius: var(--radius-md);
    box-shadow:
        inset 0 2px 6px rgba(0,0,0,0.6),
        0 1px 3px rgba(255,255,255,0.1);
    border: 1px solid #333;
}

.play-pause-btn {
    background: #e74c3c;
    color: var(--white);
    border: none;
    border-radius: var(--radius-full);
    width: 40px;
    height: 40px;
    cursor: pointer;
    font-size: 16px;
    transition: var(--transition-medium);
    display: flex;
    justify-content: center;
    align-items: center;
}

.play-pause-btn:hover {
    background: #c0392b;
    transform: scale(1.1);
}

.progress-container {
    flex: 1;
    height: 6px;
    background: #34495e;
    border-radius: 3px;
    overflow: hidden;
}

.progress-bar {
    height: 100%;
    background: linear-gradient(90deg, #e74c3c, #f39c12);
    width: 0%;
    transition: width 0.1s linear;
}

.time-display {
    color: #ecf0f1;
    font-family: var(--font-family-monospace);
    font-size: 13px;
    min-width: 55px;
    text-align: right;
}

.equalizer {
    display: flex;
    gap: 2px;
    align-items: flex-end;
    height: 20px;
    min-width: 15px;
}

.eq-bar {
    width: 2px;
    background: #27ae60;
    border-radius: 2px;
    animation: equalizer 1s ease-in-out infinite;
    animation-play-state: paused;
}

@keyframes equalizer {
    0%, 100% { height: 3px; }
    50% { height: 15px; }
}

.youtube-container {
    position: relative;
    width: 100%;
    padding-bottom: 56.25%;
    height: 0;
    border-radius: var(--radius-md);
    overflow: hidden;
    margin-top: var(--spacing-md);
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.youtube-container iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: 0;
}

.songtekst {
    margin-top: var(--spacing-md);
    padding: var(--spacing-sm);
    background: var(--light-gray);
    border-left: 4px solid var(--blue-highlight);
    border-radius: var(--radius-sm);
    font-style: italic;
    color: #555;
    max-height: 150px;
    overflow-y: auto;
}