/* Bilddatenbank - Main Stylesheet */

/* ==========================================
   CSS CUSTOM PROPERTIES (für einfache Anpassungen)
   ========================================== */
:root {
    /* Gallery Layout */
    --sidebar-width: 430px;
    --sidebar-padding: 1.5rem;
    --sidebar-content-padding: 1.5rem;
    --sidebar-section-spacing: 1.5rem;
    --gallery-gap: 1rem;
}

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

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    line-height: 1.6;
    margin: 0;
    padding: 0;
    background-color: #f5f5f5;
    color: #333;
}

a {
    color: #1e293b;
    text-decoration: none;
}

a:hover {
    text-decoration: underline;
}

/* Layout */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1rem;
}

.header {
    background: #1e293b;
    color: white;
    padding: 1rem 0;
}

.header a {
    color: white;
}

.header-inner {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    font-size: 1.5rem;
    font-weight: bold;
    color: #FF9900;
}

.nav {
    display: flex;
    gap: 1.5rem;
}

.nav a:hover {
    text-decoration: none;
    opacity: 0.8;
}

.main {
    padding: 2rem 0;
    min-height: calc(100vh - 160px);
}

.footer {
    background: #1e293b;
    color: #94a3b8;
    padding: 1.5rem 0;
    text-align: center;
    font-size: 0.875rem;
}

.footer a {
    color: #94a3b8;
}

.footer-links {
    margin-bottom: 0.5rem;
}

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

/* Cards */
.card {
    background: white;
    border-radius: 8px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    padding: 1.5rem;
    margin-bottom: 1rem;
}

.card-header {
    border-bottom: 1px solid #e5e7eb;
    margin: -1.5rem -1.5rem 1.5rem;
    padding: 1rem 1.5rem;
    font-weight: 600;
}

/* Forms */
.form-group {
    margin-bottom: 1rem;
}

.form-label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
}

.form-control {
    width: 100%;
    padding: 0.5rem 0.75rem;
    border: 1px solid #d1d5db;
    border-radius: 4px;
    font-size: 1rem;
}

.form-control:focus {
    outline: none;
    border-color: #FF9900;
    box-shadow: 0 0 0 3px rgba(255, 153, 0, 0.1);
}

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

/* Buttons */
.btn {
    display: inline-block;
    padding: 0.5rem 1rem;
    border: none;
    border-radius: 4px;
    font-size: 1rem;
    cursor: pointer;
    text-align: center;
}

.btn-primary {
    background: #FF9900;
    color: white;
}

.btn-primary:hover {
    background: #E68A00;
    text-decoration: none;
}

.btn-secondary {
    background: #6b7280;
    color: white;
}

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

.btn-sm {
    padding: 0.25rem 0.5rem;
    font-size: 0.875rem;
}

/* Alerts */
.alert {
    padding: 1rem;
    border-radius: 4px;
    margin-bottom: 1rem;
}

.alert-success {
    background: #d1fae5;
    color: #065f46;
    border: 1px solid #a7f3d0;
}

.alert-error {
    background: #fee2e2;
    color: #991b1b;
    border: 1px solid #fecaca;
}

.alert-info {
    background: #dbeafe;
    color: #CC7A00;
    border: 1px solid #93c5fd;
}

/* Tables */
.table {
    width: 100%;
    border-collapse: collapse;
}

.table th,
.table td {
    padding: 0.75rem;
    text-align: left;
    border-bottom: 1px solid #e5e7eb;
}

.table th {
    background: #f9fafb;
    font-weight: 600;
}

.table tr:hover {
    background: #f9fafb;
}

/* Media Grid */
.media-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 1rem;
}

.media-item {
    background: white;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.2);
    display: flex;
    flex-direction: column;
}

.media-item-info {
    padding: 0.75rem;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.media-item img {
    width: 100%;
    height: 150px;
    object-fit: cover;
}

.media-item-title {
    font-weight: 500;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Stats */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
}

.stat-card {
    background: white;
    border-radius: 8px;
    padding: 1.5rem;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.stat-value {
    font-size: 2rem;
    font-weight: bold;
    color: #1e293b;
}

.stat-label {
    color: #6b7280;
    font-size: 0.875rem;
}

/* Login */
.login-container {
    margin: 4rem auto;
    padding: 0 1rem;
}

/* Pagination */
.pagination {
    display: flex;
    gap: 0.5rem;
    justify-content: center;
    margin-top: 2rem;
}

.pagination a,
.pagination span {
    padding: 0.5rem 0.75rem;
    border: 1px solid #d1d5db;
    border-radius: 4px;
}

.pagination a:hover {
    background: #f3f4f6;
    text-decoration: none;
}

.pagination .active {
    background: #FF9900;
    color: white;
    border-color: #FF9900;
}

/* Sidebar */
.layout-with-sidebar {
    display: grid;
    grid-template-columns: 250px 1fr;
    gap: 2rem;
}

.layout-with-sidebar .content {
    min-width: 0;
}

.sidebar {
    background: white;
    border-radius: 8px;
    padding: 1rem;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    height: fit-content;
    position: sticky;
    top: 1rem;
    max-height: calc(100vh - 160px);
    overflow-y: auto;
}


.sidebar-nav a {
    display: block;
    padding: 0.5rem;
    border-radius: 4px;
    color: #374151;
}

.sidebar-nav a:hover {
    background: #f3f4f6;
    text-decoration: none;
}

.sidebar-nav a.active {
    background: #FF9900;
    color: white;
}

/* Utilities */
.text-center {
    text-align: center;
}

.text-right {
    text-align: right;
}

.mb-1 {
    margin-bottom: 0.5rem;
}

.mb-2 {
    margin-bottom: 1rem;
}

.mb-3 {
    margin-bottom: 1.5rem;
}

.mt-2 {
    margin-top: 1rem;
}

.d-flex {
    display: flex;
}

.justify-between {
    justify-content: space-between;
}

.align-center {
    align-items: center;
}

.gap-1 {
    gap: 0.5rem;
}

.text-muted {
    color: #6b7280;
}

.btn-block {
    display: block;
    width: 100%;
}

.list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.list li {
    padding: 0.25rem 0;
}

.row {
    display: flex;
    gap: 1.5rem;
}

.col-4 {
    flex: 0 0 33.333%;
}

.col-8 {
    flex: 0 0 66.666%;
}

.media-preview {
    text-align: center;
}

.media-preview img {
    max-width: 100%;
    max-height: 600px;
}

/* Public Layout */
.public-layout {
    background: #f1f5f9;
}

body.public-layout {
    background: #f1f5f9;
}

.public-header {
    background: #fff;
    border-bottom: 1px solid #e5e7eb;
    padding: 1rem 0;
}

.public-header-inner {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.public-logo {
    color: #FF9900;
    font-size: 1.5rem;
    font-weight: bold;
    color: #FF9900;
}

.public-logo:hover {
    text-decoration: none;
}

.public-nav {
    display: flex;
    gap: 2rem;
}

.public-nav a {
    color: #374151;
    font-weight: 500;
}

.public-nav a:hover {
    color: #1e293b;
    text-decoration: none;
}

.public-header-actions {
    display: flex;
    gap: 1rem;
    align-items: center;
}

.public-main {
    min-height: calc(100vh - 140px);
    padding: 1rem 0 2rem;
    padding-bottom: 120px; /* Space for fixed footer */
}

/* Footer styles moved to line ~1312 (consolidated) */


/* Hero Section */
.hero {
    text-align: center;
    padding: 3rem 0;
}

.hero h1 {
    font-size: 2.5rem;
    margin-bottom: 1rem;
    color: #FF9900;
}

/* Category Tabs */
.category-tabs {
    display: flex;
    justify-content: center;
    gap: 2rem;
    padding: 1rem 0;
    border-bottom: 1px solid #e5e7eb;
    margin-bottom: 2rem;
}

.category-tabs a {
    color: #6b7280;
    padding: 0.5rem 0;
    border-bottom: 2px solid transparent;
}

.category-tabs a:hover,
.category-tabs a.active {
    color: #1e293b;
    border-bottom-color: #FF9900;
    text-decoration: none;
}

/* Media Grid - Clean Version */
.media-grid-clean {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 1.5rem;
}

.media-card {
    position: relative;
    border-radius: 8px;
    overflow: hidden;
    aspect-ratio: 4/3;
    cursor: pointer;
}

.media-card img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.media-card:hover img {
    transform: scale(1.05);
}

.media-card-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 1rem;
    background: linear-gradient(transparent, rgba(0,0,0,0.7));
    color: white;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.media-card:hover .media-card-overlay {
    opacity: 1;
}

.media-card-title {
    font-weight: 500;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Detail View */
.media-detail-container {
    max-width: 1000px;
    margin: 0 auto;
}

.media-detail-image {
    text-align: center;
    margin-bottom: 2rem;
}

.media-detail-image img {
    max-width: 100%;
    max-height: 70vh;
    border-radius: 8px;
}

.media-detail-info {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 2rem;
}

.media-detail-meta {
    background: #f9fafb;
    padding: 1.5rem;
    border-radius: 8px;
}

.text-center {
    text-align: center;
}

/* ==========================================
   Public Gallery Components
   ========================================== */

/* Gallery Search Section */
.gallery-search-section {
    padding: 4rem 0;
    background: linear-gradient(135deg, #0f172a 0%, #1e293b 50%, #334155 100%);
    margin-bottom: 0;
    position: relative;
    overflow: hidden;
}

.gallery-search-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23ffffff' fill-opacity='0.02'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
    pointer-events: none;
}

.gallery-search-form {
    max-width: 700px;
    margin: 0 auto;
}

.gallery-search-input-wrapper {
    display: flex;
    background: white;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.gallery-search-input-wrapper:focus-within {
    transform: translateY(-2px);
    box-shadow: 0 15px 50px rgba(0, 0, 0, 0.4);
}

.gallery-search-icon {
    padding: 1rem;
    color: #6b7280;
    flex-shrink: 0;
}

.gallery-search-input {
    flex: 1;
    border: none;
    padding: 1rem 0;
    font-size: 1rem;
    outline: none;
}

.gallery-search-button {
    background: #FF9900;
    color: white;
    border: none;
    padding: 1rem 2rem;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s;
}

.gallery-search-button:hover {
    background: #E68A00;
}

/* Category Pills */
.gallery-category-pills {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 0.5rem;
    margin-top: 1.5rem;
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
}

.gallery-pill {
    background: rgba(255, 255, 255, 0.1);
    color: white;
    padding: 0.5rem 1rem;
    border-radius: 20px;
    font-size: 0.875rem;
    transition: all 0.2s;
    text-decoration: none;
}

.gallery-pill:hover {
    background: rgba(255, 255, 255, 0.2);
    text-decoration: none;
}

.gallery-pill.active {
    background: white;
    color: #FF9900;
}

/* Gallery Grid - Justified Row Layout */
.gallery-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
    padding: 0;
    margin: 0;
    background: transparent;
}

/* Prevent last row items from stretching too wide */
.gallery-grid::after {
    content: "";
    flex-grow: 999999999;
    min-width: 200px;
    height: 0;
}

.gallery-item {
    position: relative;
    border-radius: 0;
    overflow: hidden;
    background: transparent;
    transition: opacity 0.2s ease;
    height: 220px;
    min-width: 80px;
    max-width: 400px;
}

@media (max-width: 768px) {
    .gallery-item {
        height: 150px;
    }
}

@media (max-width: 480px) {
    .gallery-item {
        height: 100px;
    }
}

.gallery-item:hover {
    opacity: 0.9;
}

.gallery-item-link {
    display: block;
    text-decoration: none;
    height: 100%;
}

.gallery-item-image {
    position: relative;
    overflow: hidden;
    height: 100%;
}

.gallery-item-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.3s ease;
}

.gallery-item:hover .gallery-item-image img {
    transform: scale(1.05);
}

.gallery-item-placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #e5e7eb;
    color: #6b7280;
    font-size: 0.875rem;
}

/* Gallery Item Title Bar - permanent display at bottom */
.gallery-item-title-bar {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 0.5rem 0.75rem;
}

.gallery-item-title {
    display: block;
    font-size: 0.75rem;
    font-weight: 500;
    color: white;
    opacity: 0.8;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.8);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    line-height: 1.4;
}

.gallery-btn {
    background: rgba(255, 255, 255, 0.9);
    border: none;
    border-radius: 50%;
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s;
    color: #FF9900;
}

.gallery-btn:hover {
    background: white;
    transform: scale(1.1);
}

/* Gallery Empty State */
.gallery-empty {
    text-align: center;
    padding: 4rem 2rem;
    color: #6b7280;
}

/* Image Detail Page */
.image-detail {
    display: grid;
    grid-template-columns: 1fr 420px;
    gap: 2rem;
    padding: 0.75rem 2rem;
    padding-bottom: 120px;
    max-width: 1500px;
    margin: 0 auto;
    align-items: center;
    min-height: calc(100vh - 180px);
}

.image-detail-left-column {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}


/* Image Navigation - Fixed above footer */
.media-navigation-fixed {
    background: white;
    border-top: 1px solid #e5e7eb;
    padding: 0.75rem 1rem;
    position: fixed;
    bottom: 52px; /* Above fixed footer (footer height ~52px: 1rem padding * 2 + content) */
    left: 0;
    right: 0;
    z-index: 101; /* Above footer (z-index: 100) */
}

.media-navigation {
    display: flex;
    justify-content: space-between;
    align-items: center;
    max-width: 1400px;
    margin: 0 auto;
}

.media-navigation-center {
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: center;
    gap: 1.5rem;
}

.nav-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.625rem 1.25rem;
    border-radius: 6px;
    font-size: 0.9375rem;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.3s ease;
}

.nav-btn:not(.nav-disabled) {
    background: linear-gradient(135deg, #FF9900 0%, #E68A00 100%);
    color: white;
}

.nav-btn:not(.nav-disabled):hover {
    background: linear-gradient(135deg, #E68A00 0%, #CC7A00 100%);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(255, 153, 0, 0.4);
    text-decoration: none;
}

.nav-disabled {
    background: #e5e7eb;
    color: #9ca3af;
    cursor: not-allowed;
    opacity: 0.6;
}

.image-detail-main {
    background: #f3f4f6;
    border-radius: 8px;
    padding: 0.75rem;
    display: flex;
    align-items: center;
    justify-content: center;
}

.image-detail-preview {
    text-align: center;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
}

.image-detail-preview img {
    max-width: 100%;
    max-height: calc(100vh - 180px);
    border-radius: 6px;
    object-fit: contain;
    display: block;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
    margin: 0 auto;
}

.image-detail-sidebar {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    align-self: stretch; /* Stretch to fill available height */
    justify-content: center; /* Center content vertically */
    min-height: min(calc(100vh - 300px), 600px); /* Scale with window, max 600px */
    max-height: calc(100vh - 240px); /* Maximum height */
}

.image-detail-info {
    background: white;
    border-radius: 12px;
    padding: 1.5rem;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.08);
    display: flex;
    flex-direction: column;
    gap: 1rem;
    overflow-y: auto; /* Scrollable when content exceeds height */
    min-height: 200px; /* Minimum height before scroll activates */
    max-height: calc(100vh - 400px); /* Leave room for actions */
}

/* Area 1: Title/Headline */
.image-detail-section {
    padding-bottom: 0.75rem;
    border-bottom: 1px solid #e5e7eb;
}

.image-detail-section:last-child {
    border-bottom: none;
    padding-bottom: 0;
}

.image-detail-section-label {
    font-size: 0.625rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: #9ca3af;
    margin-bottom: 0.375rem;
}

.image-detail-title {
    font-size: 1.125rem;
    font-weight: 600;
    margin: 0;
    color: #1e293b;
    word-break: break-word;
    line-height: 1.4;
}

/* Area 2: Description */
.image-detail-description {
    color: #4b5563;
    margin: 0;
    line-height: 1.6;
    font-size: 0.875rem;
}

.image-detail-description.long-text {
    font-size: 0.8125rem;
}

/* Area 3+: Meta Grid */
.image-detail-meta-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.875rem 1.5rem;
}

.image-detail-meta {
    margin-bottom: 0.5rem;
}

.image-detail-label {
    display: block;
    font-size: 0.6875rem;
    font-weight: 600;
    text-transform: uppercase;
    color: #6b7280;
    margin-bottom: 0.25rem;
}

.image-detail-value {
    color: #1e293b;
    font-size: 0.8125rem;
}

/* Full width meta field (for areas 4/4a) */
.image-detail-meta-full {
    grid-column: 1 / -1;
    padding: 0.75rem 0;
    border-top: 1px solid #e5e7eb;
    margin-top: 0.5rem;
}

.image-detail-meta-full .image-detail-value {
    word-wrap: break-word;
    white-space: pre-wrap;
}

.image-detail-tags {
    display: flex;
    flex-wrap: nowrap;
    gap: 0.5rem;
    overflow-x: auto;
    white-space: nowrap;
}

.image-detail-tag {
    background: #e5e7eb;
    color: #4b5563;
    padding: 0.25rem 0.75rem;
    border-radius: 4px;
    font-size: 0.875rem;
    text-decoration: none;
    transition: all 0.2s;
}

.image-detail-tag:hover {
    background: #d1d5db;
    text-decoration: none;
}

.image-detail-actions {
    background: white;
    border-radius: 8px;
    padding: 1rem;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    align-items: stretch;
    justify-content: center;
    flex: 0 0 auto; /* Don't grow, only take needed space */
    min-height: 80px; /* Minimum height for button */
}

.magnifier-row {
    display: flex;
    gap: 0.75rem;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
}

.btn-download {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.625rem 1.25rem;
    font-size: 0.9375rem;
    font-weight: 600;
    border-radius: 6px;
    transition: all 0.3s ease;
    border: none;
    cursor: pointer;
    text-decoration: none;
    width: 100%;
    max-width: 280px;
    margin: 0 auto;
}

.btn-magnifier {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.625rem 1.25rem;
    font-size: 0.9375rem;
    font-weight: 600;
    border-radius: 6px;
    transition: all 0.3s ease;
    border: none;
    cursor: pointer;
    text-decoration: none;
    flex-shrink: 0;
}

.btn-download {
    background: linear-gradient(135deg, #FF9900 0%, #E68A00 100%);
    color: white;
}

.btn-download:hover {
    background: linear-gradient(135deg, #E68A00 0%, #CC7A00 100%);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(255, 153, 0, 0.4);
    text-decoration: none;
    color: white;
}

.btn-magnifier {
    background: #f3f4f6;
    color: #374151;
}

.btn-magnifier.active {
    background: linear-gradient(135deg, #FF9900 0%, #E68A00 100%);
    color: white;
}

.btn-magnifier:hover {
    background: #e5e7eb;
    transform: translateY(-2px);
}

.btn-magnifier.active:hover {
    background: linear-gradient(135deg, #E68A00 0%, #CC7A00 100%);
    box-shadow: 0 4px 12px rgba(255, 153, 0, 0.4);
}

.btn-download:disabled,
.btn-magnifier:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

.image-detail-actions .btn-primary {
    background: linear-gradient(135deg, #FF9900 0%, #E68A00 100%);
    border: none;
    font-weight: 600;
    transition: all 0.3s ease;
}

.image-detail-actions .btn-primary:hover {
    background: linear-gradient(135deg, #E68A00 0%, #CC7A00 100%);
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(255, 153, 0, 0.3);
}

.btn-block {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
}

.btn-lg {
    padding: 1rem 1.5rem;
    font-size: 1rem;
}

/* Public Layout Specific */
.public-layout {
    background: #f1f5f9;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

.public-header {
    background: #1e293b;
    color: white;
    padding: 0.75rem 0;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 100;
}

.public-header .container {
    padding: 0 1.5rem;
}

.public-header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1.5rem;
}

.public-logo-nav {
    display: flex;
    align-items: center;
    gap: 1.5rem;
}

/* Startseite Link - positioned over filter column */
.public-nav-link-home {
    position: fixed;
    left: calc(380px / 2);
    transform: translateX(-50%);
    top: 18px;
    color: rgba(255, 255, 255, 0.8);
    text-decoration: none;
    font-size: 0.875rem;
    transition: color 0.2s;
    z-index: 101;
}

.public-nav-link-home:hover {
    color: #FF9900;
    text-decoration: none;
}

.public-nav-link {
    color: rgba(255, 255, 255, 0.8);
    text-decoration: none;
    font-size: 0.875rem;
    transition: color 0.2s;
}

.public-nav-link:hover {
    color: white;
}

/* Public Search Bar */
.public-search {
    flex: 1;
    max-width: 500px;
    display: flex;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 6px;
    overflow: hidden;
}

.public-search-input {
    flex: 1;
    background: transparent;
    border: none;
    padding: 0.6rem 1rem;
    color: white;
    font-size: 0.875rem;
    outline: none;
}

.public-search-input::placeholder {
    color: rgba(255, 255, 255, 0.5);
}

.public-search-btn {
    background: transparent;
    border: none;
    padding: 0.6rem 1rem;
    color: rgba(255, 255, 255, 0.7);
    cursor: pointer;
    display: flex;
    align-items: center;
}

.public-search-btn:hover {
    color: white;
}

.public-search-clear {
    text-decoration: none;
}

.public-search-clear:hover {
    color: #ef4444;
}

.public-logo {
    color: #FF9900;
    font-size: 1.25rem;
    font-weight: bold;
    color: white;
    text-decoration: none;
}

.public-nav {
    display: flex;
    gap: 1.5rem;
    flex: 1;
    justify-content: center;
}

.public-nav a {
    color: rgba(255, 255, 255, 0.8);
    text-decoration: none;
    font-size: 0.875rem;
    transition: color 0.2s;
}

.public-nav a:hover {
    color: white;
}

.public-header-actions {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.public-header-actions a {
    color: rgba(255, 255, 255, 0.8);
    text-decoration: none;
    font-size: 0.875rem;
}

.public-header-actions a:hover {
    color: white;
}

.public-main {
    flex: 1;
    background: #f1f5f9;
    padding-top: 60px; /* Space for fixed header */
}

/* Modern button styles for public area */
.public-layout .btn-primary {
    background: linear-gradient(135deg, #FF9900 0%, #E68A00 100%);
    border: none;
    padding: 0.625rem 1.25rem;
    border-radius: 8px;
    font-weight: 500;
    transition: all 0.2s ease;
}

.public-layout .btn-primary:hover {
    background: linear-gradient(135deg, #E68A00 0%, #CC7A00 100%);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(255, 153, 0, 0.3);
}

.public-footer {
    background: rgba(30, 41, 59, 0.9);
    backdrop-filter: blur(10px);
    color: rgba(255, 255, 255, 0.7);
    padding: 1rem 2rem;
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 100;
}

.public-footer-inner {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.public-footer-links {
    display: flex;
    gap: 1.5rem;
}

.public-footer-links a {
    color: rgba(255, 255, 255, 0.7);
    text-decoration: none;
    font-size: 0.875rem;
    transition: color 0.2s;
}

.public-footer-links a:hover {
    color: white;
}

/* ==========================================
   Homepage - Category Cards
   ========================================== */

.homepage-hero {
    background: linear-gradient(135deg, #0f172a 0%, #1e293b 100%);
    color: white;
    padding: 1rem 0;
    text-align: center;
}

.homepage-hero h1 {
    font-size: 1.5rem;
    font-weight: 700;
    margin: 0 0 0.25rem;
}

.homepage-hero p {
    font-size: 0.875rem;
    color: rgba(255, 255, 255, 0.7);
    margin: 0;
}

/* Slideshow */
.slideshow-container {
    position: relative;
    max-width: 1200px;
    margin: 0 auto;
    overflow: hidden;
    background: #000;
}

.slideshow {
    position: relative;
    width: 100%;
    padding-bottom: 56.25%; /* 16:9 aspect ratio */
}

.slide {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    transition: opacity 0.5s ease-in-out;
}

.slide.active {
    opacity: 1;
}

.slide a {
    display: block;
    width: 100%;
    height: 100%;
    text-decoration: none;
}

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

.slide-caption {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(transparent, rgba(0, 0, 0, 0.7));
    color: white;
    padding: 2rem 1rem 1rem;
    font-size: 0.9rem;
}

.slide-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(0, 0, 0, 0.5);
    color: white;
    border: none;
    padding: 1rem 0.75rem;
    cursor: pointer;
    font-size: 1.25rem;
    transition: background 0.3s;
}

.slide-btn:hover {
    background: rgba(0, 0, 0, 0.8);
}

.slide-prev {
    left: 0;
    border-radius: 0 4px 4px 0;
}

.slide-next {
    right: 0;
    border-radius: 4px 0 0 4px;
}

.slide-dots {
    position: absolute;
    bottom: 1rem;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 0.5rem;
}

.dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.5);
    cursor: pointer;
    transition: background 0.3s;
}

.dot.active,
.dot:hover {
    background: white;
}

@media (max-width: 768px) {
    .slideshow {
        padding-bottom: 56.25%; /* Keep 16:9 ratio on mobile */
    }
}

.homepage-section {
    padding: 2rem 0;
}

.section-title {
    font-size: 1.5rem;
    font-weight: 600;
    margin: 0 0 1.5rem;
    color: #1e293b;
}

.category-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1.5rem;
}

@media (max-width: 1200px) {
    .category-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (max-width: 768px) {
    .category-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 480px) {
    .category-grid {
        grid-template-columns: 1fr;
    }
}

.category-card {
    display: block;
    text-decoration: none;
    border-radius: 8px;
    overflow: hidden;
    background: #f3f4f6;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.3);
}

.category-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 16px 40px rgba(0, 0, 0, 0.25);
    text-decoration: none;
}

.category-card-image {
    position: relative;
    aspect-ratio: 16/10;
    overflow: hidden;
}

.category-card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.category-card:hover .category-card-image img {
    transform: scale(1.05);
}

.category-card-placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #e5e7eb 0%, #d1d5db 100%);
    color: #6b7280;
    font-size: 0.875rem;
}

.category-card-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.7) 0%, transparent 50%);
    padding: 1rem;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.category-card-date {
    color: white;
    font-size: 0.75rem;
    font-weight: 500;
    background: rgba(0, 0, 0, 0.3);
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
    align-self: flex-start;
}

.category-card-info {
    color: white;
}

.category-card-name {
    display: block;
    font-size: 0.875rem;
    font-weight: 600;
    margin-bottom: 0.25rem;
}

.category-card-count {
    display: block;
    font-size: 0.75rem;
    opacity: 0.8;
}

/* ==========================================
   Category Detail - Gallery with Sidebar
   ========================================== */

.gallery-page {
    display: flex;
    background: transparent;
    padding: 1rem 0.5rem 1rem;
    gap: var(--gallery-gap);
    align-items: flex-start;
}

/* UPDATED: 2025-12-12 Sidebar fixed für stabiles Scrollen */
.gallery-sidebar {
    position: fixed;
    top: 70px;
    left: 0;
    width: 380px;
    height: calc(100vh - 120px);
    max-height: calc(100vh - 120px);
    background: #f1f5f9;
    padding: 1rem;
    color: #1e293b;
    overflow-y: auto;
    z-index: 50;
}

.gallery-page {
    display: block;
}

.gallery-main {
    margin-left: 400px;
}

/* Tablet: Sidebar schmaler */
@media (min-width: 769px) and (max-width: 1366px) {
    .gallery-sidebar {
        width: 300px;
    }
    .gallery-main {
        margin-left: 320px;
    }
    /* Startseite Link als normaler Textlink im Header-Flow */
    .public-nav-link-home {
        position: static;
        transform: none;
        color: rgba(255, 255, 255, 0.6);
        font-size: 0.8rem;
        font-weight: 400;
        margin-left: 1rem;
        margin-right: auto;
    }
    .public-nav-link-home:hover {
        color: rgba(255, 255, 255, 0.9);
    }
    /* Header-Suchleiste ECHT zentriert auf Seitenbreite */
    .public-header-inner {
        position: relative;
    }
    .public-search {
        position: absolute;
        left: 50%;
        transform: translateX(-50%);
        width: 300px;
        max-width: 300px;
    }
    /* Gallery Header kompakter */
    .gallery-header {
        margin-bottom: 0.5rem;
        padding-bottom: 0.5rem;
    }
}

/* Mobile: Sidebar nicht fixed, normale Darstellung */
@media (max-width: 768px) {
    /* WICHTIG: public-main braucht padding-top für fixed header */
    .public-main {
        padding-top: 120px; /* Header + Search-Bar Höhe */
    }
    .gallery-sidebar {
        position: relative;
        top: auto;
        left: auto;
        width: 100%;
        height: auto;
        max-height: none;
        z-index: auto;
    }
    .gallery-page {
        display: flex;
        flex-direction: column;
    }
    .gallery-main {
        margin-left: 0;
    }
    /* Wenn Sidebar versteckt, zusätzliches padding */
    .gallery-main.sidebar-hidden {
        padding-top: 0.5rem;
    }
    /* Gallery Header immer sichtbar - auch bei versteckter Sidebar */
    .gallery-header {
        position: relative;
        z-index: 10;
        background: #f1f5f9;
        padding: 0.5rem;
        margin: 0;
        border-bottom: 1px solid #e5e7eb;
    }
    /* Search Bar kompakt und umgebrochen */
    .gallery-search-bar {
        display: flex;
        flex-wrap: wrap;
        gap: 0.5rem;
        align-items: center;
    }
    /* Filter Toggle Button kompakter */
    .filter-toggle-btn {
        flex: 0 0 auto;
        padding: 0.4rem 0.75rem;
        font-size: 0.75rem;
    }
    /* Sort Group kompakter */
    .gallery-sort-group {
        flex: 0 0 auto;
    }
    .sort-label {
        display: none;
    }
    .gallery-sort-select {
        font-size: 0.75rem;
        padding: 0.4rem 0.5rem;
    }
    /* Suchfeld auf eigene Zeile */
    .gallery-search-wrapper {
        flex: 1 1 100%;
        order: 10;
        max-width: none;
        margin-left: 0;
    }
    /* Pagination kompakt */
    .pagination-inline {
        flex: 0 0 auto;
        margin: 0;
    }
}

/* Sidebar hidden state */
.gallery-sidebar.hidden {
    display: none;
}

.gallery-sidebar.hidden + .gallery-main,
.gallery-page:not(:has(.gallery-sidebar:not(.hidden))) .gallery-main {
    margin-left: 0;
}

.filter-toggle-btn {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    background: white;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    color: #1e293b;
    font-size: 0.875rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
}

.filter-toggle-btn:hover {
    background: #f9fafb;
    border-color: #d1d5db;
}

.filter-toggle-btn svg {
    width: 18px;
    height: 18px;
}

.gallery-main {
    flex: 1;
    padding: 0.5rem;
    overflow-y: auto;
    background: transparent;
    border-radius: 0;
    box-shadow: none;
}

/* Tablet only (768px - 1024px) */
@media (min-width: 769px) and (max-width: 1024px) {
    .gallery-page {
        flex-direction: row; /* Keep sidebar on left */
    }

    .gallery-sidebar {
        width: 180px; /* Narrower on tablet */
        position: sticky;
        top: -0.5rem;
    }

    /* Überschriften verkleinern auf Tablet */
    h1 {
        font-size: 1.5rem;
    }

    h2 {
        font-size: 1.25rem;
    }

    .gallery-title {
        font-size: 1.5rem;
    }

    .page-title {
        font-size: 1.5rem;
    }

    /* Buttons kompakter - KEIN Umbruch in sich selbst */
    .btn {
        white-space: nowrap; /* NO text wrapping inside buttons */
        font-size: 0.8125rem;
        padding: 0.5rem 0.75rem;
    }

    .btn-sm {
        font-size: 0.75rem;
        padding: 0.375rem 0.625rem;
    }

    /* Filter/Sort Container flexibel */
    .gallery-filters,
    .gallery-controls {
        flex-wrap: wrap;
        gap: 0.5rem;
    }

    .gallery-header {
        flex-wrap: wrap;
        gap: 0.5rem;
    }

    /* Gallery search kompakter */
    .gallery-search-wrapper {
        flex: 1 1 auto;
        min-width: 200px;
        max-width: 300px;
    }

    .gallery-search-input-small {
        font-size: 0.8125rem;
        padding: 0.375rem 0.625rem;
    }

    /* Pagination kompakter */
    .pagination select,
    .pagination-select {
        font-size: 0.8125rem;
        padding: 0.25rem 0.5rem;
    }

    /* Detail-Ansicht: Navigation kompakter auf Tablet */
    .media-navigation-center {
        display: flex;
        gap: 0.5rem;
    }

    .media-navigation {
        justify-content: space-between;
        gap: 0.5rem;
    }

    /* Keyboard Toggle auf Tablet verstecken, Lupe kompakter */
    #keyboardNavToggleWrapper {
        display: none;
    }

    .magnifier-row {
        display: flex;
    }

    /* Lupe kompakter: nur Icon */
    .btn-magnifier span {
        display: none;
    }

    .btn-magnifier {
        padding: 0.5rem 0.75rem;
    }

    /* Magnifier Zoom Control kompakter */
    .magnifier-zoom-control {
        padding: 0.5rem 0.75rem;
        gap: 0.5rem;
    }

    .magnifier-zoom-control label {
        display: none;
    }

    .magnifier-zoom-control input[type="range"] {
        width: 80px;
    }

    /* Nav Buttons kompakter */
    .nav-btn span {
        display: none;
    }

    .nav-btn {
        padding: 0.5rem 0.75rem;
    }

    /* Footer für Tablet anpassen */
    .public-footer {
        position: relative; /* Nicht fixed auf Tablet */
        display: block;
        visibility: visible;
    }

    .public-footer-links {
        display: flex; /* Sicherstellen dass Links sichtbar sind */
        flex-wrap: wrap;
        gap: 1rem;
        justify-content: center;
        visibility: visible;
    }

    .public-footer-links a {
        display: inline-block;
        font-size: 0.8125rem;
        visibility: visible;
    }
}

/* Mobile only (< 768px) */
@media (max-width: 768px) {
    .gallery-page {
        flex-direction: column;
    }

    .gallery-sidebar {
        width: 100%;
        position: relative; /* Not sticky - scrolls with page */
        top: auto;
        max-height: none;
        height: auto;
        margin-bottom: 1rem;
    }

    /* Gallery images - don't crop on mobile */
    .gallery-item-image img {
        object-fit: contain; /* Show full image without cropping */
        background: #f3f4f6; /* Light background for letterboxing */
    }

    .gallery-item {
        height: auto; /* Let height adjust to content */
        min-height: 150px;
    }

    /* Buttons anpassen für Smartphone */
    .btn {
        padding: 0.4rem 0.75rem;
        font-size: 0.875rem;
    }

    .btn-sm {
        padding: 0.25rem 0.5rem;
        font-size: 0.8125rem;
    }

    /* Public Header anpassen für Smartphone */
    .public-header {
        padding: 0.75rem 0;
    }

    /* Startseite Link auf Mobile ausblenden (Sidebar nicht sichtbar) */
    .public-nav-link-home {
        display: none;
    }

    .public-header-inner {
        flex-wrap: wrap;
        gap: 0.5rem;
        align-items: center;
    }

    .public-logo {
        flex: 0 0 auto;
        font-size: 1rem;
    }

    .public-search {
        flex: 1 1 100%;
        order: 3;
        margin-top: 0.5rem;
    }

    .public-header-actions {
        flex: 0 1 auto;
        flex-wrap: wrap;
        gap: 0.5rem;
        justify-content: flex-end;
        font-size: 0.875rem;
    }

    .public-header-actions span {
        max-width: 120px;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
    }

    .public-header-actions .btn {
        padding: 0.25rem 0.5rem;
        font-size: 0.8125rem;
    }

    /* Footer für Smartphone anpassen */
    .public-footer {
        position: relative; /* Not fixed on mobile */
        padding: 1.5rem 0;
        display: block;
        visibility: visible;
    }

    .public-footer-inner {
        display: flex;
        flex-direction: column;
        gap: 1rem;
        text-align: center;
        visibility: visible;
    }

    .public-footer-links {
        display: flex; /* Sicherstellen dass Links sichtbar sind */
        flex-direction: column;
        gap: 0.75rem;
        width: 100%;
        visibility: visible;
    }

    .public-footer-links a {
        display: block;
        padding: 0.5rem;
        font-size: 0.875rem;
        visibility: visible;
    }
}

/* Sidebar Components */
.sidebar-content {
    background: white;
    border-radius: 12px;
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.2);
    padding: var(--sidebar-content-padding);
    display: flex;
    flex-direction: column;
    height: 100%;
    overflow: hidden;
}

.sidebar-section {
    margin-bottom: var(--sidebar-section-spacing);
    padding-bottom: var(--sidebar-section-spacing);
    border-bottom: 1px solid #e5e7eb;
}

.sidebar-section:last-child {
    border-bottom: none;
    margin-bottom: 0;
    padding-bottom: 0;
}

.sidebar-title {
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    color: #64748b;
    margin: 0 0 0.75rem;
    letter-spacing: 0.05em;
}

.sidebar-select {
    width: 100%;
    padding: 0.5rem 0.75rem;
    border: 1px solid #e5e7eb;
    border-radius: 6px;
    font-size: 0.875rem;
    background: white;
    color: #374151;
}

.sidebar-select:focus {
    outline: none;
    border-color: #FF9900;
    box-shadow: 0 0 0 3px rgba(255, 153, 0, 0.1);
}

.sidebar-input {
    width: 100%;
    padding: 0.5rem 0.75rem;
    border: 1px solid #e5e7eb;
    border-radius: 6px;
    font-size: 0.875rem;
    background: white;
    color: #374151;
    display: block;
}

.sidebar-input:focus {
    outline: none;
    border-color: #FF9900;
    box-shadow: 0 0 0 3px rgba(255, 153, 0, 0.1);
}

.sidebar-input::placeholder {
    color: #94a3b8;
}

.sidebar-list {
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
    max-height: 150px;
    overflow-y: auto;
}

.sidebar-checkbox {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.875rem;
    color: #374151;
    cursor: pointer;
}

.sidebar-checkbox input {
    margin: 0;
    accent-color: #FF9900;
}

.sidebar-checkbox span:first-of-type {
    flex: 1;
}

.sidebar-count {
    font-size: 0.75rem;
    color: #94a3b8;
}

/* Sidebar Categories Section - Takes available space */
.sidebar-section-categories {
    flex: 1;
    display: flex;
    flex-direction: column;
    min-height: 0;
    overflow: hidden;
}

/* Sidebar Tree Wrapper */
.sidebar-tree-wrapper {
    flex: 1;
    display: flex;
    position: relative;
    min-height: 0;
}

/* Sidebar Tree */
.sidebar-tree {
    flex: 1;
    overflow-y: scroll;
    padding-right: 12px;
    scrollbar-width: none;
    -ms-overflow-style: none;
}

.sidebar-tree::-webkit-scrollbar {
    display: none;
}

/* Custom Scrollbar */
.custom-scrollbar {
    width: 8px;
    background: #e2e8f0;
    border-radius: 4px;
    position: relative;
    flex-shrink: 0;
}

.custom-scrollbar-thumb {
    width: 100%;
    background: #94a3b8;
    border-radius: 4px;
    position: absolute;
    top: 0;
    cursor: pointer;
    min-height: 30px;
    transition: background 0.15s;
}

.custom-scrollbar-thumb:hover {
    background: #64748b;
}


.sidebar-tree-item {
    display: flex;
    align-items: center;
    padding: 8px 12px;
    color: #374151;
    text-decoration: none;
    font-size: 0.8125rem;
    border-radius: 6px;
    transition: all 0.15s ease;
    margin-bottom: 2px;
}

.sidebar-tree-item:hover {
    background: #f1f5f9;
    color: #1e293b;
}

.sidebar-tree-item.active {
    background: #FF9900;
    color: white;
}

.sidebar-tree-item.active .sidebar-count {
    color: rgba(255, 255, 255, 0.8);
}

.sidebar-tree-item.disabled {
    color: #9ca3af;
    cursor: default;
}

.sidebar-tree-item.disabled:hover {
    background: transparent;
    color: #9ca3af;
}

.sidebar-tree-name {
    flex: 1;
    min-width: 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Category Toggle Icon (for collapsible categories) */
.category-toggle-icon {
    margin-right: 6px;
    transition: transform 0.2s ease;
    cursor: pointer;
    flex-shrink: 0;
}

.category-toggle-icon.collapsed {
    transform: rotate(-90deg);
}

.sidebar-tree-item-wrapper {
    transition: opacity 0.2s ease;
}

.sidebar-tree-item-wrapper.hidden {
    display: none;
}

/* Year Group (collapsible) */
.sidebar-year-group {
    margin-bottom: 8px;
}

.sidebar-year-toggle {
    display: flex;
    align-items: center;
    padding: 8px 12px;
    color: #1e293b;
    font-weight: 600;
    font-size: 0.875rem;
    cursor: pointer;
    border-radius: 6px;
    transition: background 0.15s;
    user-select: none;
}

.sidebar-year-toggle:hover {
    background: #f1f5f9;
}

.sidebar-year-toggle svg {
    transition: transform 0.2s;
    margin-right: 6px;
}

.sidebar-year-toggle.collapsed svg {
    transform: rotate(-90deg);
}

.sidebar-year-content {
    margin-left: 12px;
}

.sidebar-year-content.collapsed {
    display: none;
}

/* Page Breadcrumb */
.page-breadcrumb {
    background: #f1f5f9;
    padding: 0.25rem 0 0.25rem 0;
}

.page-breadcrumb .container {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.875rem;
    margin: 0;
    padding: 0 1rem 0 1.5rem;
    max-width: none;
}

.page-breadcrumb a {
    color: #1e293b;
    text-decoration: none;
}

.page-breadcrumb a:hover {
    text-decoration: underline;
}

.breadcrumb-separator {
    color: #9ca3af;
}

.breadcrumb-current {
    color: #374151;
    font-weight: 500;
}

/* Gallery Header */
.gallery-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid #e5e7eb;
}

.gallery-search-bar {
    display: flex;
    align-items: center;
    gap: 1rem;
    width: 100%;
    justify-content: flex-start;
}

.gallery-search-bar .pagination-inline {
    margin: 0 auto;
}

.gallery-sort-group {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.sort-label {
    font-size: 0.875rem;
    color: #64748b;
    white-space: nowrap;
}

.gallery-sort-select {
    padding: 0.5rem 0.75rem;
    border: 1px solid #e5e7eb;
    border-radius: 6px;
    background: white;
    font-size: 0.875rem;
    color: #374151;
    cursor: pointer;
}

.gallery-sort-select:focus {
    outline: none;
    border-color: #FF9900;
}

.gallery-search-wrapper {
    display: flex;
    position: relative;
    max-width: 300px;
    margin-left: auto;
}

.gallery-search-wrapper .gallery-search-input-small {
    flex: 1;
    padding-right: 40px;
    border-radius: 6px 0 0 6px;
    border-right: none;
}

.gallery-search-btn {
    padding: 0.5rem 0.75rem;
    border: 1px solid #e5e7eb;
    border-left: none;
    border-radius: 0 6px 6px 0;
    background: #f3f4f6;
    color: #9ca3af;
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
}

.gallery-search-btn:hover {
    background: #e5e7eb;
}

.gallery-search-btn.active {
    background: #FF9900;
    border-color: #FF9900;
    color: white;
}

.gallery-search-btn.active:hover {
    background: #FF9900;
}

.gallery-tabs {
    display: flex;
    gap: 0.5rem;
}

.gallery-tab {
    color: #6b7280;
    text-decoration: none;
    font-size: 0.75rem;
    font-weight: 500;
    padding: 0.4rem 0.8rem;
    border-radius: 4px;
    background: #f3f4f6;
    border: 1px solid #e5e7eb;
}

.gallery-tab:hover {
    color: #374151;
    text-decoration: none;
    background: #e5e7eb;
}

.gallery-tab.active {
    color: white;
    background: #FF9900;
    border-color: #FF9900;
}

.gallery-search-input-small {
    padding: 0.5rem 1rem;
    border: 1px solid #d1d5db;
    border-radius: 6px;
    font-size: 0.875rem;
    width: 250px;
}

/* Gallery Info */
.gallery-info {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 1.5rem;
    gap: 2rem;
}

.gallery-info h1 {
    font-size: 1.5rem;
    font-weight: 600;
    margin: 0 0 0.5rem 0;
    color: #1e293b;
}

.category-description {
    font-size: 0.9375rem;
    color: #64748b;
    margin: 0;
    line-height: 1.6;
    max-width: 800px;
}

.gallery-count {
    font-size: 0.875rem;
    color: #6b7280;
}

.gallery-info-right {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.gallery-perpage-select {
    padding: 0.375rem 0.75rem;
    background: white;
    border: 1px solid #e5e7eb;
    border-radius: 6px;
    color: #374151;
    font-size: 0.8125rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
}

.gallery-perpage-select:hover {
    border-color: #FF9900;
}

.gallery-perpage-select:focus {
    outline: none;
    border-color: #FF9900;
    box-shadow: 0 0 0 3px rgba(255, 153, 0, 0.1);
}

/* Gallery Masonry Grid */
.gallery-masonry {
    column-count: 5;
    column-gap: 0.75rem;
}

@media (max-width: 1400px) {
    .gallery-masonry {
        column-count: 4;
    }
}

@media (max-width: 1100px) {
    .gallery-masonry {
        column-count: 3;
    }
}

@media (max-width: 768px) {
    .gallery-masonry {
        column-count: 2;
    }
}

.gallery-item-wrapper {
    break-inside: avoid;
    margin-bottom: 0.75rem;
}

.gallery-masonry .gallery-item {
    display: block;
    text-decoration: none;
    border-radius: 4px;
    overflow: hidden;
    background: #f3f4f6;
}

.gallery-masonry .gallery-item-image {
    position: relative;
}

.gallery-masonry .gallery-item-image img {
    width: 100%;
    height: auto;
    display: block;
    transition: transform 0.3s ease;
}

.gallery-masonry .gallery-item:hover .gallery-item-image img {
    transform: none;
}

.gallery-masonry .gallery-item-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.3);
    opacity: 0;
    transition: opacity 0.3s ease;
    display: flex;
    align-items: flex-start;
    justify-content: flex-end;
    padding: 0.5rem;
}

.gallery-masonry .gallery-item:hover .gallery-item-overlay {
    opacity: 1;
}

.gallery-masonry .gallery-item-actions .gallery-btn {
    width: 28px;
    height: 28px;
    background: rgba(255, 255, 255, 0.9);
    border: none;
    border-radius: 4px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
}

.text-muted {
    color: #6b7280;
}

/* Search Results Page */
.search-results-page {
    padding: 2rem 0;
}

.search-results-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
}

.search-results-header h1 {
    font-size: 1.5rem;
    font-weight: 600;
    margin: 0;
    color: #FF9900;
}

.search-results-count {
    font-size: 0.875rem;
    color: #6b7280;
}

.search-results-empty {
    text-align: center;
    padding: 4rem 2rem;
    color: #6b7280;
}

.search-results-empty a {
    color: #FF9900;
}

/* Status Toggle Buttons */
.status-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 22px;
    height: 22px;
    border-radius: 6px;
    border: none;
    cursor: pointer;
    transition: all 0.2s;
    padding: 0;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
}

.status-btn:hover {
    transform: scale(1.1);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.15);
}

.status-btn .status-icon {
    font-size: 14px;
    font-weight: bold;
    line-height: 22px;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.status-btn.status-active {
    background: #10b981;
    color: white;
}

.status-btn.status-active:hover {
    background: #059669;
}

.status-btn.status-inactive {
    background: #ef4444;
    color: white;
}

.status-btn.status-inactive:hover {
    background: #dc2626;
}

.status-btn.status-highlight {
    background: #f59e0b;
    color: white;
}

.status-btn.status-highlight:hover {
    background: #d97706;
}

.status-btn.status-no-highlight {
    background: #e5e7eb;
    color: #6b7280;
}

.status-btn.status-no-highlight:hover {
    background: #d1d5db;
}

/* Admin Search Wrapper */
.admin-search-wrapper {
    position: relative;
    display: flex;
    align-items: center;
    max-width: 250px;
}

.admin-search-wrapper input {
    padding-right: 36px;
    width: 100%;
}

.admin-search-btn {
    position: absolute;
    right: 4px;
    width: 28px;
    height: 28px;
    border: none;
    background: #e5e7eb;
    border-radius: 4px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #6b7280;
    transition: all 0.2s;
}

.admin-search-btn:hover {
    background: #d1d5db;
    color: #374151;
}

.admin-search-btn.active {
    background: #FF9900;
    color: white;
}

.admin-search-btn.active:hover {
    background: #FF9900;
}

/* Sort Links in Table Headers */
.sort-link {
    color: #374151;
    text-decoration: none;
    white-space: nowrap;
}

.sort-link:hover {
    color: #FF9900;
}

.sort-link.active {
    color: #FF9900;
    font-weight: 600;
}

/* Delete Confirmation Modal */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(30, 41, 59, 0.95);
    backdrop-filter: blur(3px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
}

.modal-content {
    background: white;
    border-radius: 12px;
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
    max-width: 400px;
    width: 90%;
    animation: modalSlideIn 0.2s ease-out;
}

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

.modal-header {
    padding: 20px 24px 0;
}

.modal-header h3 {
    margin: 0;
    font-size: 1.125rem;
    font-weight: 600;
    color: #111827;
}

.modal-body {
    padding: 16px 24px;
}

.modal-body p {
    margin: 0;
    color: #374151;
    line-height: 1.5;
}

.modal-footer {
    padding: 16px 24px 20px;
    display: flex;
    gap: 12px;
    justify-content: flex-end;
}

/* Bulk Actions Bar */
.admin-bulk-actions {
    background: #f0f9ff;
    border: 1px solid #bae6fd;
    border-radius: 8px;
    padding: 12px 16px;
    margin-bottom: 16px;
}

/* Inactive row styling */
.row-inactive {
    opacity: 0.6;
    background: #f9fafb;
}

/* Danger button */
.btn-danger {
    background: #ef4444;
    color: white;
}

.btn-danger:hover {
    background: #dc2626;
}

/* Preview Image Grid (Category Form) */
.preview-image-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
    gap: 0.75rem;
    max-height: 300px;
    overflow-y: auto;
    padding: 0.5rem;
    background: #ffffff;
    border-radius: 8px;
}

.preview-image-item {
    position: relative;
    cursor: pointer;
}

.preview-image-item input {
    position: absolute;
    top: 4px;
    left: 4px;
    z-index: 2;
}

.preview-image-thumb {
    position: relative;
    aspect-ratio: 3/2;
    border-radius: 6px;
    overflow: hidden;
    border: 2px solid #e5e7eb;
    transition: all 0.2s ease;
    background: #ffffff;
}

.preview-image-item input:checked + .preview-image-thumb {
    border: 5px solid #FF9900;
    box-shadow:
        0 0 0 3px #ffffff,
        0 0 20px 0 rgba(255, 153, 0, 0.8),
        0 0 30px 0 rgba(255, 153, 0, 0.5),
        inset 0 0 15px rgba(255, 153, 0, 0.25);
    transform: scale(1.05);
    filter: brightness(1.1);
    z-index: 10;
}

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

.preview-image-placeholder {
    width: 100%;
    height: 100%;
    background: #e5e7eb;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.75rem;
    color: #6b7280;
}

.preview-image-badge {
    position: absolute;
    bottom: 2px;
    right: 2px;
    background: rgba(0,0,0,0.7);
    color: white;
    font-size: 0.6rem;
    padding: 2px 4px;
    border-radius: 3px;
}

.preview-image-item.portrait .preview-image-thumb {
    opacity: 0.6;
}

/* Toast Notification - Centered */
.toast-notification {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: #10b981;
    color: white;
    padding: 1.25rem 2rem;
    border-radius: 8px;
    font-size: 1.1rem;
    font-weight: 500;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.25);
    z-index: 10000;
    animation: toastIn 0.3s ease;
    pointer-events: none;
}

.toast-notification.toast-error {
    background: #ef4444;
}

.toast-notification.toast-success {
    background: #10b981;
}

.toast-notification.fade-out {
    animation: toastOut 0.3s ease forwards;
}

@keyframes toastIn {
    from {
        opacity: 0;
        transform: translate(-50%, -50%) scale(0.9);
    }
    to {
        opacity: 1;
        transform: translate(-50%, -50%) scale(1);
    }
}

@keyframes toastOut {
    from {
        opacity: 1;
        transform: translate(-50%, -50%) scale(1);
    }
    to {
        opacity: 0;
        transform: translate(-50%, -50%) scale(0.9);
    }
}

/* Pagination */
.pagination {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.75rem 0;
    margin-top: 0;
    margin-bottom: 0.75rem;
}

.pagination-btn {
    padding: 0.375rem 0.75rem;
    background: white;
    border: 1px solid #e5e7eb;
    border-radius: 6px;
    color: #FF9900;
    text-decoration: none;
    font-size: 0.8125rem;
    font-weight: 500;
    transition: all 0.2s;
    cursor: pointer;
}

.pagination-btn:hover:not(.disabled) {
    background: #f8fafc;
    border-color: #FF9900;
    color: #FF9900;
}

.pagination-btn.disabled {
    opacity: 0.5;
    cursor: not-allowed;
    color: #9ca3af;
}

.pagination-info {
    color: #64748b;
    font-size: 0.8125rem;
    font-weight: 500;
}

.pagination-inline {
    padding: 0;
    margin: 0;
}

.pagination-select {
    padding: 0.375rem 0.75rem;
    background: white;
    border: 1px solid #e5e7eb;
    border-radius: 6px;
    color: #FF9900;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    font-size: 0.8125rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
}

.pagination-select option {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    font-size: 0.8125rem;
    font-weight: 500;
    color: #1e293b;
    padding: 0.5rem;
}

.pagination-select:hover {
    border-color: #FF9900;
}

.pagination-select:focus {
    outline: none;
    border-color: #FF9900;
    box-shadow: 0 0 0 3px rgba(255, 153, 0, 0.1);
}

/* ========== Magnifier Styles ========== */

/* Magnifier Lens (circular zoom that follows cursor) */
.magnifier-lens {
    position: absolute;
    width: 300px;
    height: 300px;
    border: none;
    border-radius: 50%;
    cursor: none;
    pointer-events: none;
    z-index: 100;
    box-shadow: 0 8px 16px -2px rgba(0, 0, 0, 0.2), 0 4px 8px -2px rgba(0, 0, 0, 0.15);
    background-color: white;
}

/* Magnifier Overlay (shown while loading original) */
.magnifier-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border-radius: 50%;
    background-color: transparent;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 1;
    transition: opacity 0.3s ease;
    pointer-events: none;
}

.magnifier-overlay-content {
    text-align: center;
    color: white;
    background-color: transparent;
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.9), 0 0 8px rgba(0, 0, 0, 0.7);
}

.magnifier-overlay-text {
    font-size: 18px;
    font-weight: bold;
    margin-bottom: 4px;
    letter-spacing: 1px;
}

.magnifier-overlay-subtext {
    font-size: 13px;
    opacity: 0.9;
    font-weight: normal;
}

.magnifier-overlay-error .magnifier-overlay-text {
    font-size: 24px;
    margin-bottom: 8px;
}

/* Spinner Animation */
.magnifier-spinner {
    width: 40px;
    height: 40px;
    margin: 0 auto 12px;
    border: 3px solid rgba(255, 255, 255, 0.3);
    border-top-color: #ffffff;
    border-radius: 50%;
    animation: magnifier-spin 0.8s linear infinite;
}

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

/* Static overlay for oversized files (no spinner, no fade-out) */
.magnifier-overlay-static .magnifier-spinner {
    display: none;
}

.magnifier-overlay-static .magnifier-overlay-subtext {
    color: #fbbf24; /* Amber warning color */
    font-weight: 500;
}

/* Magnifier Controls Wrapper (below image) */
.magnifier-controls-wrapper {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    padding: 0.75rem 0;
}

.magnifier-toggle {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    background: #FF9900;
    color: white;
    border: none;
    border-radius: 6px;
    font-size: 0.875rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
}

.magnifier-toggle:hover {
    background: #FF9900;
}

.magnifier-toggle svg {
    flex-shrink: 0;
}

.magnifier-zoom-control {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    padding: 0.625rem 1rem;
    background: #f8f9fa;
    border-radius: 6px;
    flex: 1;
    min-width: 200px;
}

.magnifier-zoom-control label {
    font-size: 0.875rem;
    color: #64748b;
    font-weight: 500;
    margin: 0;
}

.magnifier-zoom-control input[type="range"] {
    width: 120px;
    height: 6px;
    background: #cbd5e1;
    border-radius: 3px;
    outline: none;
    -webkit-appearance: none;
}

.magnifier-zoom-control input[type="range"]::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 16px;
    height: 16px;
    background: #FF9900;
    border-radius: 50%;
    cursor: pointer;
    transition: all 0.2s;
}

.magnifier-zoom-control input[type="range"]::-webkit-slider-thumb:hover {
    background: #FF9900;
    transform: scale(1.1);
}

.magnifier-zoom-control input[type="range"]::-moz-range-thumb {
    width: 16px;
    height: 16px;
    background: #FF9900;
    border: none;
    border-radius: 50%;
    cursor: pointer;
    transition: all 0.2s;
}

.magnifier-zoom-control input[type="range"]::-moz-range-thumb:hover {
    background: #FF9900;
    transform: scale(1.1);
}

#magnifierZoomValue {
    font-size: 0.875rem;
    color: #374151;
    font-weight: 600;
    min-width: 40px;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .magnifier-controls-wrapper {
        flex-direction: column;
        align-items: stretch;
        gap: 0.5rem;
    }

    .magnifier-toggle,
    .magnifier-zoom-control {
        width: 100%;
        justify-content: center;
    }

    .magnifier-lens {
        width: 240px;
        height: 240px;
    }
}

/* ============================================
   Responsive Height Adjustments for Image Detail
   ============================================ */

/* Large screens - Full space */
@media (min-height: 1000px) {
    .image-detail-sidebar {
        min-height: calc(100vh - 300px);
    }

    .image-detail-info {
        min-height: 400px;
        max-height: calc(100vh - 360px);
    }
}

/* Medium screens - Scale down */
@media (max-height: 900px) {
    .image-detail-sidebar {
        min-height: calc(100vh - 280px);
    }

    .image-detail-info {
        min-height: 250px;
        max-height: calc(100vh - 340px);
    }
}

/* Smaller screens - More aggressive scaling */
@media (max-height: 800px) {
    .image-detail-sidebar {
        min-height: calc(100vh - 260px);
    }

    .image-detail-info {
        min-height: 200px;
        max-height: calc(100vh - 320px);
    }

    .image-detail-preview img {
        max-height: calc(100vh - 200px);
    }
}

/* Very small screens - Minimal heights, prioritize scroll */
@media (max-height: 700px) {
    .image-detail-sidebar {
        min-height: calc(100vh - 240px);
    }

    .image-detail-info {
        min-height: 180px;
        max-height: calc(100vh - 300px);
        padding: 0.75rem; /* Reduce padding */
    }

    .image-detail-preview img {
        max-height: calc(100vh - 180px);
    }

    /* Reduce font sizes for compact display */
    .image-detail-title {
        font-size: 1rem;
        margin-bottom: 0.5rem;
    }

    .image-detail-description {
        font-size: 0.8125rem;
        margin-bottom: 0.5rem;
    }

    .image-detail-label {
        font-size: 0.625rem;
    }

    .image-detail-value {
        font-size: 0.75rem;
    }

    .image-detail-meta {
        margin-bottom: 0.375rem;
    }

    .image-detail-meta-grid {
        gap: 0.5rem 0.75rem;
    }
}

/* Extra compact for very small heights */
@media (max-height: 600px) {
    .image-detail-info {
        min-height: 150px;
        padding: 0.5rem;
    }

    .image-detail-actions {
        padding: 0.75rem;
        min-height: 60px;
    }

    .image-detail-title {
        font-size: 0.9375rem;
    }

    .image-detail-description {
        font-size: 0.75rem;
        line-height: 1.4;
    }
}

/* ============================================
   Responsive Layout for Image Detail Page
   ============================================ */

/* Tablet & Mobile - Stack Layout */
@media (max-width: 768px) {
    .image-detail {
        grid-template-columns: 1fr; /* Stack layout - single column */
        padding-bottom: 120px; /* More space for stacked navigation */
        align-items: start; /* Reset alignment on mobile */
    }

    .image-detail-sidebar {
        min-height: auto; /* Remove fixed height on mobile */
        max-height: none;
        align-self: stretch; /* Full width */
        justify-content: flex-start; /* Start from top on mobile */
    }

    .image-detail-info {
        overflow-y: visible; /* No scroll needed on mobile */
        max-height: none;
        min-height: auto;
    }

    .image-detail-preview img {
        max-height: 60vh; /* Smaller images on mobile */
        max-width: 100%; /* Full width on mobile */
    }

    /* Simplify navigation on mobile */
    .media-navigation {
        flex-wrap: wrap;
        gap: 0.5rem;
    }

    .media-navigation-center {
        order: 3; /* Move center controls to bottom */
        width: 100%;
        justify-content: center;
        margin-top: 0.5rem;
        flex-direction: column;
        gap: 0.5rem;
    }

    /* Keyboard Toggle und Lupe auf Mobile verstecken */
    #keyboardNavToggleWrapper,
    .magnifier-row,
    .btn-magnifier,
    .magnifier-zoom-control {
        display: none;
    }

    .nav-btn {
        padding: 0.5rem 1rem;
        font-size: 0.875rem;
    }

    .nav-btn span {
        display: inline;
    }
}

/* Very small mobile devices */
@media (max-width: 480px) {
    .image-detail-preview img {
        max-height: 50vh;
    }

    .nav-btn {
        padding: 0.5rem 0.75rem;
        font-size: 0.8125rem;
    }

    /* Show only icons on very small screens */
    .nav-btn span {
        display: none;
    }

    .image-detail-title {
        font-size: 1rem;
    }

    .image-detail-meta-grid {
        grid-template-columns: 1fr; /* Single column on small mobile */
    }
}

/* ============================================
   Terminkalender Tabelle
   ============================================ */

.terminkalender-container {
    padding: 2rem 0;
}

.terminkalender-container .page-title {
    font-size: 1.75rem;
    color: #1e3a5f;
    margin-bottom: 1rem;
}

.terminkalender-container .page-description {
    color: #64748b;
    font-size: 1rem;
    line-height: 1.6;
    margin-bottom: 1.5rem;
}

.terminkalender-table {
    width: 100%;
    border-collapse: collapse;
    background: white;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.terminkalender-table thead {
    background: #f8fafc;
}

.terminkalender-table th {
    padding: 1rem;
    text-align: left;
    font-weight: 600;
    color: #1e3a5f;
    border-bottom: 2px solid #e2e8f0;
}

.terminkalender-table td {
    padding: 0.875rem 1rem;
    border-bottom: 1px solid #e5e7eb;
    vertical-align: middle;
}

.terminkalender-table tbody tr:hover {
    background: #f8fafc;
}

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

.terminkalender-pagination-top {
    text-align: right;
    margin-bottom: 1rem;
    font-size: 0.875rem;
    color: #64748b;
}

.terminkalender-pagination-top a {
    color: #c00;
    text-decoration: none;
    margin: 0 0.125rem;
}

.terminkalender-pagination-top a:hover {
    text-decoration: underline;
}

.terminkalender-pagination-top .current-page {
    color: #333;
    font-weight: 600;
    margin: 0 0.125rem;
}

.terminkalender-pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 1rem;
    margin-top: 1.5rem;
    padding: 1rem 0;
}

.terminkalender-pagination .pagination-btn {
    display: inline-block;
    padding: 0.5rem 1rem;
    background: linear-gradient(135deg, #FF9900 0%, #E68A00 100%);
    color: white;
    text-decoration: none;
    border-radius: 4px;
    font-size: 0.875rem;
    transition: background 0.2s;
}

.terminkalender-pagination .pagination-btn:hover {
    background: linear-gradient(135deg, #E68A00 0%, #CC7A00 100%);
}

.terminkalender-pagination .pagination-info {
    color: #64748b;
    font-size: 0.875rem;
}

.terminkalender-table .col-date {
    width: 100px;
    color: #333;
    font-size: 0.9375rem;
}

.terminkalender-table .col-description a {
    color: #333;
    text-decoration: none;
    transition: color 0.2s;
}

.terminkalender-table .col-description a:hover {
    color: #FF9900;
}

.terminkalender-table .col-count {
    width: 100px;
    text-align: right;
    color: #333;
    font-size: 0.9375rem;
}

/* Responsive Terminkalender */
@media (max-width: 768px) {
    .terminkalender-table th,
    .terminkalender-table td {
        padding: 0.75rem 0.5rem;
    }

    .terminkalender-table .col-date {
        width: 80px;
        font-size: 0.8125rem;
    }

    .terminkalender-table .col-count {
        width: 70px;
        font-size: 0.8125rem;
    }

    .terminkalender-pagination-top {
        font-size: 0.8125rem;
    }
}

/* ============================================
   Social Links (Footer)
   ============================================ */

.public-footer .social-links {
    display: flex;
    gap: 0.75rem;
    margin-right: 1rem;
}

.public-footer .social-link {
    color: rgba(255, 255, 255, 0.7);
    transition: color 0.2s;
    display: flex;
    align-items: center;
}

.public-footer .social-link:hover {
    color: #FF9900;
}

.public-footer .social-link svg {
    width: 18px;
    height: 18px;
}
