/**
 * VIGOR Component & Utility Classes
 * 
 * Replaces inline styles with reusable, maintainable CSS classes.
 * Organized by category. All colors use CSS variables from style.css where possible.
 *
 * Categories:
 *   1. Spacing utilities
 *   2. Typography
 *   3. Text colors
 *   4. Backgrounds
 *   5. Layout utilities
 *   6. Page structure
 *   7. Info/alert boxes
 *   8. Badges & status indicators
 *   9. Tables
 *  10. Forms
 *  11. Accordion / details
 *  12. Cards & detail sections
 *  13. Address blocks (legal pages)
 *  14. Checkbox grids & chips (admin)
 *  15. Misc utilities
 */

/* ==========================================================================
   1. SPACING UTILITIES
   Consistent spacing scale: 0.5rem, 0.75rem, 1rem, 1.5rem, 2rem, 3rem
   ========================================================================== */

.mb-0  { margin-bottom: 0; }
.mb-1  { margin-bottom: 0.5rem; }
.mb-2  { margin-bottom: 0.75rem; }
.mb-3  { margin-bottom: 1rem; }
.mb-4  { margin-bottom: 1.5rem; }
.mb-5  { margin-bottom: 2rem; }
.mt-0  { margin-top: 0; }
.mt-3  { margin-top: 1rem; }
.mt-4  { margin-top: 1.5rem; }
.mt-5  { margin-top: 2rem; }
.ml-1  { margin-left: 0.5rem; }
.ml-2  { margin-left: 0.75rem; }
.mr-1  { margin-right: 0.5rem; }
.p-3   { padding: 1rem; }
.p-4   { padding: 1.5rem; }
.p-5   { padding: 2rem; }
.px-3  { padding-left: 1rem; padding-right: 1rem; }
.px-4  { padding-left: 1.5rem; padding-right: 1.5rem; }
.py-3  { padding-top: 1rem; padding-bottom: 1rem; }
.pl-4  { padding-left: 1.5rem; }

/* List utilities */
.list-spaced {
    margin-bottom: 1rem;
    padding-left: 1.5rem;
}

.list-spaced-lg {
    margin-bottom: 1.5rem;
    padding-left: 1.5rem;
}

/* ==========================================================================
   2. TYPOGRAPHY
   ========================================================================== */

.h1-page {
    font-size: 1.8rem;
    margin-bottom: 0.5rem;
}

.h2-section {
    font-size: 1.3rem;
    margin-bottom: 0.75rem;
}

.h3-subsection {
    font-size: 1.1rem;
    margin-bottom: 0.75rem;
}

.h4-label {
    font-size: 1.05rem;
    margin-bottom: 0.5rem;
}

.h4-content {
    font-size: 1rem;
    margin-bottom: 0.5rem;
}

.h5-small {
    font-size: 0.95rem;
    margin-top: 1rem;
    margin-bottom: 0.5rem;
}

.fw-semibold { font-weight: 600; }
.fw-medium   { font-weight: 500; }
.fs-sm       { font-size: 0.85rem; }
.fs-xs       { font-size: 0.8rem; }
.fs-mono     { font-family: 'Courier New', monospace; }
.text-center { text-align: center; }
.text-right  { text-align: right; }
.lh-relaxed  { line-height: 1.7; }
.lh-loose    { line-height: 1.8; }

/* ==========================================================================
   3. TEXT COLORS
   ========================================================================== */

.text-muted     { color: #6c757d; }
.text-secondary { color: #868e96; }
.text-body      { color: var(--gu-dunkelgrau); }
.text-dark      { color: var(--text-color); }
.text-success   { color: var(--success-color); }
.text-danger    { color: var(--danger-color); }
.text-warning   { color: #856404; }
.text-link      { color: var(--primary-color); }
.text-white     { color: #fff; }

/* ==========================================================================
   4. BACKGROUNDS
   ========================================================================== */

.bg-light      { background-color: var(--light-bg); }
.bg-white      { background-color: #fff; }
.bg-info-light { background: #e8f4fd; }
.bg-warn-light { background-color: #fff3cd; }
.bg-gradient-blue    { background: linear-gradient(135deg, #e8f4fd 0%, #f0f7ff 100%); }
.bg-gradient-neutral { background: linear-gradient(135deg, var(--light-bg) 0%, var(--gu-sandgrau) 100%); }

/* ==========================================================================
   5. LAYOUT UTILITIES
   ========================================================================== */

.d-none    { display: none; }
.d-block   { display: block; }
.d-flex    { display: flex; }
.d-grid    { display: grid; }
.d-inline  { display: inline-block; }
.flex-col  { flex-direction: column; }
.flex-wrap { flex-wrap: wrap; }
.items-center   { align-items: center; }
.items-start    { align-items: flex-start; }
.justify-between { justify-content: space-between; }
.gap-1 { gap: 4px; }
.gap-2 { gap: 8px; }
.gap-3 { gap: 10px; }
.gap-4 { gap: 1rem; }
.w-full { width: 100%; }
.max-w-prose { max-width: 860px; margin-left: auto; margin-right: auto; }
.max-w-page  { max-width: 900px; margin-left: auto; margin-right: auto; }
.rounded    { border-radius: 6px; }
.rounded-lg { border-radius: 8px; }

/* ==========================================================================
   6. PAGE STRUCTURE
   ========================================================================== */

.page-container {
    max-width: 860px;
    margin: 2rem auto;
    padding: 0 1rem;
}

.page-container-wide {
    max-width: 900px;
    margin: 2rem auto;
    padding: 0 1rem;
}

.page-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
    padding-bottom: 15px;
    border-bottom: 2px solid var(--gu-sandgrau);
}

.page-header h1 {
    margin: 0;
    font-size: 24px;
    color: var(--text-color);
}

.header-actions {
    display: flex;
    gap: 10px;
    align-items: center;
}

.section {
    margin-bottom: 2rem;
}

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

.section-divider {
    margin: 2rem 0;
    border: none;
    border-top: 1px solid var(--border-color);
}

.section-divider-sm {
    margin: 1.5rem 0;
    border: none;
    border-top: 1px solid var(--border-color);
}

/* ==========================================================================
   7. INFO / ALERT BOXES
   Contextual boxes with left border accent or full background
   ========================================================================== */

.box {
    border-radius: 8px;
    padding: 1.25rem 1.5rem;
    margin-bottom: 1rem;
}

.box-info {
    background: #e8f4fd;
    border: 1px solid #b8d4e8;
}

.box-info-accent {
    background: var(--light-bg);
    border-left: 4px solid var(--primary-color);
    border-radius: 6px;
    padding: 1.25rem 1.5rem;
    margin-bottom: 1rem;
}

.box-info-gradient {
    background: linear-gradient(135deg, #e8f4fd 0%, #f0f7ff 100%);
    border-left: 4px solid var(--primary-color);
    border-radius: 6px;
    padding: 1.5rem;
    margin-bottom: 2rem;
}

.box-warning {
    background-color: #fff3cd;
    border: 1px solid #ffc107;
    border-radius: 8px;
    padding: 2rem;
}

.box-warning-accent {
    background: #fff;
    border-left: 4px solid #ffc107;
    border-radius: 4px;
    padding: 1rem;
    margin-top: 1rem;
}

.box-neutral {
    background: var(--light-bg);
    border: 1px solid var(--gu-sandgrau);
    border-radius: 8px;
    padding: 1.25rem 1.5rem;
    margin-bottom: 1rem;
}

.box-success {
    background: #eafaf1;
    border-left: 3px solid #27ae60;
    border-radius: 0 8px 8px 0;
    padding: 12px 16px;
}

.box-embed {
    background-color: var(--light-bg);
    border: 2px solid var(--primary-color);
    border-radius: 8px;
    padding: 2rem;
    margin: 2rem 0;
}

/* ==========================================================================
   8. BADGES & STATUS INDICATORS
   ========================================================================== */

.badge {
    display: inline-block;
    padding: 4px 12px;
    border-radius: 12px;
    font-size: 0.85rem;
    font-weight: 500;
    line-height: 1.4;
}

.badge-success { background: #28a745; color: #fff; }
.badge-warning { background: #ffc107; color: #333; }
.badge-danger  { background: #dc3545; color: #fff; }
.badge-info    { background: var(--primary-color); color: #fff; }
.badge-muted   { background: #6c757d; color: #fff; }

.badge-sm {
    padding: 2px 8px;
    font-size: 0.75rem;
}

/* Status dot indicators */
.status-dot {
    display: inline-block;
    width: 10px;
    height: 10px;
    border-radius: 50%;
    margin-right: 6px;
    vertical-align: middle;
}

.status-dot-green  { background: #28a745; }
.status-dot-blue   { background: #007bff; }
.status-dot-yellow { background: #ffc107; }
.status-dot-orange { background: #fd7e14; }
.status-dot-red    { background: #dc3545; }

/* ==========================================================================
   9. TABLES
   ========================================================================== */

.info-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.95rem;
}

.info-table td {
    padding: 6px 0;
}

.info-table .label-cell {
    padding: 6px 12px 6px 0;
    font-weight: 600;
    width: 200px;
    vertical-align: top;
}

.data-table {
    width: 100%;
    border-collapse: collapse;
}

.data-table th {
    padding: 10px 12px;
    text-align: left;
    font-size: 0.9rem;
    color: var(--gu-dunkelgrau);
    border-bottom: 2px solid var(--border-color);
}

.data-table td {
    padding: 10px 12px;
    border-bottom: 1px solid var(--gu-sandgrau);
}

.data-table tr:last-child td {
    border-bottom: none;
}

/* ==========================================================================
   10. FORMS
   ========================================================================== */

.form-control {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    font-size: 14px;
    font-family: inherit;
    background: white;
    transition: border-color 0.2s, box-shadow 0.2s;
}

.form-control:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(0, 97, 143, 0.15);
    outline: none;
}

.form-control-required {
    border-left: 3px solid var(--primary-color);
}

.form-label {
    display: block;
    margin-bottom: 6px;
    font-weight: 600;
    color: var(--gu-dunkelgrau);
    font-size: 14px;
}

.form-hint {
    display: block;
    margin-top: 5px;
    color: #6c757d;
    font-size: 12px;
}

.form-group {
    margin-bottom: 1.5rem;
}

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

/* ==========================================================================
   11. ACCORDION / DETAILS (FAQ sections)
   ========================================================================== */

.accordion-item {
    border: 1px solid var(--gu-sandgrau);
    border-radius: 8px;
    margin-bottom: 0.75rem;
    padding: 1rem 1.25rem;
}

.accordion-item summary {
    cursor: pointer;
    font-weight: 600;
    font-size: 0.95rem;
}

.accordion-item .accordion-body {
    margin-top: 0.75rem;
    color: var(--gu-dunkelgrau);
    line-height: 1.7;
}

/* ==========================================================================
   12. CARDS & DETAIL SECTIONS
   ========================================================================== */

.detail-card {
    background: var(--light-bg);
    padding: 16px;
    border-radius: 8px;
    margin-bottom: 24px;
    border: 1px solid var(--gu-sandgrau);
}

/* Project-specific metadata group (LEVEL, ViFoNet, etc.) */
.project-metadata-group {
    border: 2px solid var(--primary-color, #4a6fa5);
    border-radius: 12px;
    padding: 0;
    margin: 32px 0;
    overflow: hidden;
}
.project-metadata-group .project-group-header {
    background: var(--primary-color, #4a6fa5);
    color: #fff;
    padding: 12px 20px;
    display: flex;
    align-items: center;
    gap: 10px;
}
.project-metadata-group .project-group-header h2 {
    margin: 0;
    font-size: 1.1rem;
    font-weight: 600;
}
.project-metadata-group .project-group-header .project-badge {
    background: rgba(255,255,255,0.2);
    padding: 2px 10px;
    border-radius: 12px;
    font-size: 0.8rem;
    font-weight: 500;
}
.project-metadata-group .project-group-body {
    padding: 8px 16px 16px;
    background: #f8fafd;
}
.project-metadata-group .detail-card {
    background: #fff;
    border: 1px solid #dde4ee;
}

.detail-card-white {
    background: white;
}

.detail-field {
    margin-bottom: 12px;
}

.detail-field-label {
    font-weight: 600;
    color: var(--gu-dunkelgrau);
    font-size: 14px;
    margin-bottom: 4px;
}

.detail-field-value {
    color: #212529;
}

/* User group grid (access-info page) */
.usergroup-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    gap: 10px;
    margin-bottom: 0.5rem;
}

.usergroup-item {
    padding: 10px 14px;
    background: var(--light-bg);
    border-radius: 6px;
    border: 1px solid var(--gu-sandgrau);
    font-size: 0.93rem;
}

.usergroup-item-active {
    background: #e8f4fd;
    border-color: var(--primary-color);
}

/* ==========================================================================
   13. ADDRESS BLOCKS (legal pages)
   ========================================================================== */

.address-block {
    font-style: normal;
    line-height: 1.8;
    margin-bottom: 1.5rem;
}

/* ==========================================================================
   14. CHECKBOX GRIDS & CHIPS (admin edit forms)
   ========================================================================== */

.checkbox-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 8px;
    max-height: 300px;
    overflow-y: auto;
    padding: 12px;
    background: var(--light-bg);
    border-radius: 8px;
}

.checkbox-item {
    display: flex;
    gap: 8px;
    align-items: center;
    padding: 8px 10px;
    background: white;
    border: 1px solid var(--gu-sandgrau);
    border-radius: 6px;
    cursor: pointer;
    transition: border-color 0.15s, background 0.15s;
}

.checkbox-item:hover {
    border-color: var(--primary-color);
    background: var(--light-bg);
}

.checkbox-item.selected {
    border-color: var(--primary-color);
    background: #e8f4fd;
}

.chip-group {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.chip {
    padding: 8px 14px;
    background: white;
    border: 2px solid var(--gu-sandgrau);
    border-radius: 20px;
    cursor: pointer;
    transition: border-color 0.15s, background 0.15s;
    font-size: 14px;
}

.chip:hover {
    border-color: var(--primary-color);
}

.chip.selected {
    border-color: var(--primary-color);
    background: #e8f4fd;
}

/* ==========================================================================
   15. MISC UTILITIES
   ========================================================================== */

.cursor-pointer { cursor: pointer; }
.opacity-50     { opacity: 0.5; }
.opacity-70     { opacity: 0.7; }
.no-style-list  { list-style: none; padding-left: 0; }
.border-bottom  { border-bottom: 1px solid var(--gu-sandgrau); }
.v-top          { vertical-align: top; }
.v-mid          { vertical-align: middle; }
.float-right    { float: right; }
.overflow-auto  { overflow: auto; }

/* DSGVO notice (profile page) */
/* Embed container (learning-unit page) */
.embed-container {
    margin: 2rem 0;
}

/* Content notice boxes (item-detail placeholders) */
.content-notice {
    padding: 2rem;
    text-align: center;
    border-radius: 8px;
}

.content-notice-gradient {
    background: linear-gradient(135deg, #e8f4fd 0%, #f0f7ff 100%);
}

.content-notice-neutral {
    background: linear-gradient(135deg, var(--light-bg) 0%, var(--gu-sandgrau) 100%);
}

.content-notice-muted {
    background: var(--light-bg);
    color: #6c757d;
}

.content-notice .notice-icon {
    font-size: 3rem;
    margin-bottom: 1rem;
}

.content-notice .notice-icon-lg {
    font-size: 4rem;
    margin-bottom: 1rem;
}

/* Access denied explanation boxes */
.access-reason-box {
    margin: 1rem 0;
    padding: 12px 16px;
    border-radius: 0 8px 8px 0;
    font-size: 0.95rem;
}

.access-reason-box-warning {
    background: #fef9e7;
    border-left: 3px solid #f39c12;
}

.access-reason-box-success {
    background: #eafaf1;
    border-left: 3px solid #27ae60;
}

.access-reason-box .reason-label {
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.access-reason-box-warning .reason-label {
    color: #e67e22;
}

.access-reason-box-success .reason-label {
    color: #27ae60;
}

/* Access denied card — blue gradient with white inner card */
.access-denied-card {
    border: none;
    padding: 0;
    background: none;
}

/* Empty state styling */
.empty-state {
    text-align: center;
    padding: 40px;
    color: #6c757d;
}

.empty-state-icon {
    font-size: 3rem;
    color: var(--gu-sandgrau);
}

.empty-state-icon-sm {
    font-size: 1.5rem;
}

/* Text truncation */
.text-truncate {
    max-width: 300px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* Debug / system info box */
.debug-info-box {
    margin-top: 20px;
    padding: 12px;
    background: var(--light-bg);
    border-radius: 6px;
    font-size: 12px;
    color: #6c757d;
}

/* Admin form section heading (blue underlined) */
.form-section-heading {
    margin: 20px 0 15px 0;
    padding-bottom: 8px;
    border-bottom: 2px solid var(--gu-sandgrau);
    color: var(--primary-color);
}

.form-section-heading-lg {
    margin: 30px 0 15px 0;
    padding-bottom: 8px;
    border-bottom: 2px solid var(--gu-sandgrau);
    color: var(--primary-color);
}

.embed-container iframe {
    width: 100%;
    aspect-ratio: 16/9;
    border: none;
    border-radius: 8px;
}

/* Footer note (legal pages timestamp line) */
.footer-note {
    color: #6c757d;
    font-size: 0.9rem;
}

.footer-note-right {
    color: #adb5bd;
    font-size: 0.85rem;
    text-align: right;
}

/* Buttons — override removed; base .btn + .btn-primary in style.css is sufficient.
   Only keep the rounded corners and font-weight enhancement. */
.btn-primary,
.btn-secondary {
    border-radius: 6px;
    font-weight: 500;
}

/* Ordered list with relaxed spacing (registration steps etc.) */
.list-steps {
    padding-left: 1.5rem;
    color: var(--gu-dunkelgrau);
    line-height: 1.8;
}

/* Contact section */
.box-contact {
    background: var(--light-bg);
    border-radius: 8px;
    margin-bottom: 2rem;
    padding: 1.5rem;
}

.data-table .label-cell {
    font-weight: 500;
}

/* Login page specific */
.login-body {
    background: var(--light-bg);
    padding: 20px;
}

/* Dev banner links */
.dev-banner-link {
    color: #000;
    text-decoration: underline;
}

/* Nav brand link */
.nav-brand-link {
    color: white;
    text-decoration: none;
}

/* Summary heading inline */
.summary-heading {
    display: inline;
}

/* Code/monospace styling */
.font-mono {
    font-family: 'Courier New', monospace;
}
.code-preview {
    background: var(--light-bg);
    padding: 10px;
    font-size: 12px;
    overflow: auto;
    max-height: 350px;
    margin: 0;
}

/* Table column widths */
.th-icon    { width: 40px; }
.th-actions { width: 120px; }

/* Login divider spacing */
.login-divider-mt {
    margin-top: 20px;
}

/* Small button text */
.btn-text-sm {
    font-size: 13px;
}

/* Text sizing */
.text-lg { font-size: 1.1rem; }

/* Narrow page container */
.page-container-narrow {
    max-width: 600px;
}

/* Border & padding utilities */
.pt-4 { padding-top: 1rem; }
.border-top { border-top: 1px solid var(--gu-sandgrau); }

/* ==========================================================================
   16. ITEM CARD COMPONENT
   ========================================================================== */

.item-card {
    display: flex;
    flex-direction: column;
    background: white;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
    overflow: hidden;
    transition: transform 0.2s, box-shadow 0.2s;
}

.item-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 24px rgba(0,0,0,0.12);
}

.card-image {
    position: relative;
    aspect-ratio: 16/9;
    background: #f0f0f0;
    overflow: hidden;
}

.card-image img { width: 100%; height: 100%; object-fit: cover; }

.card-image-logo {
    background: linear-gradient(135deg, var(--gu-sandgrau) 0%, #d5d4cf 100%);
}
.card-image-logo img {
    object-fit: contain !important;
    padding: 1rem;
}

.card-image-placeholder {
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, var(--gu-sandgrau) 0%, #d5d4cf 100%);
}

.placeholder-icon { font-size: 3rem; opacity: 0.5; }

.duration-badge {
    position: absolute;
    bottom: 8px;
    right: 8px;
    background: rgba(0,0,0,0.8);
    color: white;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 0.85rem;
    font-weight: 500;
}

.card-content {
    padding: 16px;
    display: flex;
    flex-direction: column;
    gap: 8px;
    flex: 1;
}

.card-badges { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }

.type-badge {
    display: inline-block;
    padding: 4px 10px;
    border-radius: 12px;
    font-size: 0.75rem;
    font-weight: 600;
    color: white;
    width: fit-content;
}

.materials-badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 4px 8px;
    border-radius: 12px;
    font-size: 0.75rem;
    font-weight: 600;
    background: #e9d5ff;
    color: #6b21a8;
}

.card-title { margin: 0; font-size: 1.1rem; line-height: 1.3; }
.card-title a { color: var(--text-color); text-decoration: none; }
.card-title a:hover { color: var(--primary-color); }
.card-description { color: var(--gu-dunkelgrau); font-size: 0.9rem; line-height: 1.5; margin: 0; }

.card-actions { display: flex; gap: 8px; align-items: center; margin-top: auto; }
.card-actions .btn { display: inline-flex; align-items: center; }

/* ==========================================================================
   17. ITEM ROW COMPONENT (list view)
   ========================================================================== */

.item-row {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 12px 16px;
    background: white;
    border-radius: 8px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.06);
    transition: background 0.2s;
}

.item-row:hover { background: var(--light-bg); }

.row-image {
    width: 80px;
    height: 45px;
    border-radius: 4px;
    overflow: hidden;
    flex-shrink: 0;
    background: var(--gu-sandgrau);
}

.row-image img { width: 100%; height: 100%; object-fit: cover; }

.row-image-logo {
    background: #f8f9fa;
    padding: 4px;
}

.row-image-logo img { object-fit: contain; }

.row-image-placeholder {
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
}

.row-content { flex: 1; min-width: 0; }
.row-main { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }

.row-id {
    color: #6c757d;
    font-size: 0.8rem;
    font-family: monospace;
    min-width: 30px;
}

.row-mvp-id {
    color: #6c757d;
    font-size: 0.8rem;
    font-family: monospace;
    max-width: 100px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.row-title {
    font-weight: 600;
    color: var(--text-color);
    text-decoration: none;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.row-title:hover { color: var(--primary-color); }

.row-meta {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-top: 4px;
    flex-wrap: wrap;
}

.type-badge-sm { padding: 2px 8px; font-size: 0.7rem; }
.meta-item { color: #6c757d; font-size: 0.85rem; }

/* ==========================================================================
   18. VIEW TOGGLE (card/list switch)
   ========================================================================== */

.view-toggle {
    display: inline-flex;
    gap: 4px;
    background: var(--gu-sandgrau);
    padding: 4px;
    border-radius: 6px;
}

.toggle-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border: none;
    background: transparent;
    color: #6c757d;
    cursor: pointer;
    border-radius: 4px;
    transition: all 0.2s;
}

.toggle-btn:hover { color: var(--gu-dunkelgrau); background: rgba(255,255,255,0.5); }

.toggle-btn.active {
    background: white;
    color: var(--primary-color);
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

/* Card view container */
.items-container.view-cards {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 24px;
}

.items-container.view-cards .item-row { display: none; }
.items-container.view-cards .item-card { display: flex; }

/* List view container */
.items-container.view-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.items-container.view-list .item-card { display: none; }
.items-container.view-list .item-row { display: flex; }

@media (max-width: 768px) {
    .items-container.view-cards { grid-template-columns: 1fr; }
}

/* ── Project funding notice ──────────────────────────────────────────── */
.project-citation-card {
    margin-top: 24px;
}

.project-citation-card h3 {
    margin-bottom: 8px;
}

.citation-intro {
    color: #555;
    margin-bottom: 20px;
}

.citation-entries {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.citation-entry h4 {
    font-size: 0.9rem;
    font-weight: 600;
    margin: 0 0 6px;
    color: #374151;
}

.citation-text {
    margin: 0;
    padding: 10px 14px;
    background: #f3f4f6;
    border-left: 3px solid #9ca3af;
    border-radius: 0 4px 4px 0;
    font-size: 0.82rem;
    line-height: 1.6;
    color: #374151;
    font-style: normal;
}
.project-funding-notice {
    width: 100%;
    background: #f8f9fa;
    border-top: 3px solid #003399;
    padding: 24px;
    margin-top: 32px;
}

.project-funding-content {
    max-width: 900px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.project-funding-content h3 {
    margin: 0;
    font-size: 1.1rem;
    font-weight: 600;
    color: #1f2937;
}

.funding-logos {
    display: flex;
    align-items: center;
    gap: 24px;
    flex-wrap: wrap;
}

.funding-logo {
    display: block;
    height: 70px;
    width: auto;
    object-fit: contain;
}

.funding-logo--eu           { height: 60px; }
.funding-logo--bmbf         { height: 140px; }
.funding-logo--lernen-digital { height: 80px; }

.funding-disclaimer {
    margin: 0;
    font-size: 0.78rem;
    line-height: 1.55;
    color: #555;
    max-width: 900px;
}

.project-citation-card h3 {
    margin: 0 0 1rem;
    font-size: 1.1rem;
    font-weight: 600;
    color: #1f2937;
}

.citation-intro {
    margin: 0 0 1rem;
    font-size: 0.95rem;
    line-height: 1.5;
    color: #374151;
}

.citation-entries {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.citation-entry {
    padding-bottom: 1rem;
    border-bottom: 1px solid #e5e7eb;
}

.citation-entry:last-child {
    border-bottom: none;
    padding-bottom: 0;
}

.citation-entry h4 {
    margin: 0 0 0.75rem;
    font-size: 0.95rem;
    font-weight: 600;
    color: #1f2937;
}

.citation-text {
    margin: 0;
    padding: 0.75rem 1rem;
    background: #f3f4f6;
    border-left: 3px solid #003399;
    font-size: 0.85rem;
    line-height: 1.55;
    color: #4b5563;
    font-style: normal;
}

@media (max-width: 640px) {
    .project-funding-notice {
        padding: 16px;
        margin-top: 24px;
    }

    .funding-logos {
        gap: 16px;
    }

    .funding-logo--eu           { height: 48px; }
    .funding-logo--bmbf         { height: 100px; }
    .funding-logo--lernen-digital { height: 56px; }
}
