/* --- GRUNDLEGENDE TYPOGRAFIE & LAYOUT --- */
body {
    font-family: 'Georgia', serif;
    line-height: 1.6;
    margin: 0;
    padding: 20px;
    background-color: #FFFFCC;
    color: #333;
}

.container {
    max-width: 1200px; /* Standardbreite, Album kann dies überschreiben */
    margin: 0 auto;
    background-color: white;
    padding: 30px;
    box-shadow: 0 0 20px rgba(0,0,0,0.1);
}

/* Header Styles */
header {
    text-align: center;
    border-bottom: 2px solid #8b4513;
    padding-bottom: 20px;
    margin-bottom: 30px;
}

h1 {
    color: #8b4513;
    font-size: 2.2em;
    margin-bottom: 10px;
}

.subtitle {
    font-style: italic;
    color: #666;
    font-size: 1.3em;
}

/* Footer */
.footer {
    text-align: center;
    margin-top: 40px;
    padding-top: 20px;
    border-top: 1px solid #ddd;
    color: #777;
}

.footer a {
    color: #777;
    text-decoration: none;
}

.footer a:hover {
    text-decoration: underline;
}

/* --- INHALTSELEMENTE (Global) --- */
.content-section, .intro {
    margin: 30px 0;
    padding: 20px;
    background-color: #fffaf0;
}

/* Intro Text zentriert (für Album genutzt) */
.intro.center {
    text-align: center;
}

.content-section h2 {
    color: #8b4513;
    font-size: 1.5em;
    margin-bottom: 15px;
}

.content-section p, .intro p {
    margin-bottom: 1em;
}

/* --- BILDER STYLES (Biografie & Co) --- */
.bio-image {
    float: right;
    margin: 0 0 20px 20px;
    max-width: 300px;
    border: 1px solid #ddd;
    padding: 5px;
    background-color: white;
}

.bio-image.left {
    float: left;
    margin: 0 20px 20px 0;
}

.bio-image.large {
    max-width: 537px;
}

.bio-image img {
    width: 100%;
    height: auto;
    display: block;
}

.bio-image p {
    font-size: 0.9em;
    font-style: italic;
    color: #666;
    margin-top: 10px;
    text-align: center;
}

/* --- ZITATE & TEXT --- */
.quote-section {
    font-style: italic;
    margin: 20px 0;
    padding: 15px;
    background-color: #fff;
    border-left: 4px solid #8b4513;
}

.emphasis {
    font-weight: bold;
}

/* --- ARCHIV ELEMENTE --- */
.contact-box {
    background-color: #f5f5f5;
    padding: 15px;
    margin: 20px 0;
    border-left: 4px solid #8b4513;
    text-align: center;
}

.contact-box table {
    width: auto;
    text-align: left; 
    display: inline-block;
    margin: 0 auto;
    border-collapse: separate;
}

.contact-box td {
    border: none;
    vertical-align: middle;
    padding: 5px;
}

.articles-section h2, .flyer-section h2 {
    color: #8b4513;
    margin-bottom: 20px;
    font-size: 1.5em;
}

.article-link {
    display: block;
    padding: 15px 20px;
    margin: 10px 0;
    background-color: #fffaf0;
    border-left: 4px solid #8b4513;
    color: #8b4513;
    text-decoration: none;
    font-weight: bold;
    transition: all 0.3s ease;
}

.article-link:hover {
    background-color: #8b4513;
    color: white;
    padding-left: 30px;
}

.flyer-section {
    margin: 40px 0;
    text-align: center;
}

.flyer-image {
    max-width: 400px;
    width: 100%;
    height: auto;
    border: 4px solid #8b4513;
    box-shadow: 0 4px 8px rgba(0,0,0,0.2);
    transition: all 0.3s ease;
}

.flyer-link:hover .flyer-image {
    border-color: #d4a017;
    transform: scale(1.02);
}

/* --- PUBLIKATIONEN (Tabellen & Filter) --- */
.controls {
    margin: 20px 0;
    padding: 15px;
    background-color: #f5f5f5;
    border-radius: 5px;
}

.controls label {
    font-weight: bold;
    margin-right: 10px;
}

.controls button {
    background-color: #8b4513;
    color: white;
    border: none;
    padding: 8px 16px;
    margin: 0 5px;
    border-radius: 3px;
    cursor: pointer;
    font-family: inherit;
}

.controls button:hover {
    background-color: #9c5530;
}

.controls button.active {
    background-color: #d4a017;
    font-weight: bold;
}

table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 30px;
}

th {
    background-color: #8b4513;
    color: white;
    padding: 15px;
    text-align: left;
    cursor: pointer;
    user-select: none;
}

th:hover {
    background-color: #9c5530;
}

th.sortable {
    position: relative;
    padding-right: 30px;
}

th.sortable::after {
    content: "↕";
    position: absolute;
    right: 10px;
    color: rgba(255,255,255,0.7);
    font-size: 0.8em;
}

th.sort-asc::after {
    content: "↑";
    color: white;
}

th.sort-desc::after {
    content: "↓";
    color: white;
}

tbody tr {
    border-bottom: 1px solid #ddd;
}

tbody tr:nth-child(even) {
    background-color: #fafafa;
}

tr.hidden {
    display: none;
}

td {
    padding: 15px;
    vertical-align: top;
}

td[data-label="Titel & Beschreibung"] {
    display: flex;
    flex-direction: column;
    min-height: 250px;
}

.cover-img {
    width: 164px;
    height: 235px;
    object-fit: cover;
    border: 1px solid #ddd;
}

.title-strong {
    font-weight: bold;
    color: #8b4513;
}

.year-badge {
    display: inline-block;
    background-color: #8b4513;
    color: white;
    padding: 3px 8px;
    border-radius: 3px;
    font-size: 0.85em;
}

.lang-badge {
    display: block;
    background-color: #d4a017;
    color: white;
    padding: 2px 6px;
    border-radius: 3px;
    font-size: 0.8em;
    margin-left: 0;
    margin-bottom: 3px;
    width: fit-content;
}

.distribution-line {
    margin-top: auto;
    padding-top: 15px;
    color: #666;
    border-top: 1px solid #eee;
    font-weight: bold;
}

.distribution-line a {
    color: #87CEEB;
    text-decoration: none;
}

.distribution-line a:hover {
    text-decoration: underline;
}

/* --- ALBUM GALERIE STYLES --- */
.gallery {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 20px;
    margin: 40px 0;
}

.gallery-item {
    position: relative;
    overflow: hidden;
    border: 3px solid #8b4513;
    border-radius: 5px;
    transition: all 0.3s ease;
    background-color: #fafafa;
    cursor: pointer;
}

.gallery-item:hover {
    border-color: #d4a017;
    transform: translateY(-5px);
    box-shadow: 0 8px 16px rgba(0,0,0,0.2);
}

.gallery-item img {
    width: 100%;
    height: 250px;
    object-fit: cover;
    display: block;
}

.gallery-item-caption {
    padding: 10px;
    text-align: center;
    font-size: 0.9em;
    color: #8b4513;
    font-weight: bold;
    background-color: white;
}

/* --- LIGHTBOX STYLES --- */
.lightbox {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.95);
    z-index: 10000; /* Muss höher sein als nav-menu (1000) */
    justify-content: center;
    align-items: center;
}

.lightbox.active {
    display: flex;
}

.lightbox-content {
    position: relative;
    max-width: 90%;
    max-height: 85vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.lightbox-image {
    max-width: 100%;
    max-height: 65vh;
    object-fit: contain;
    border: 3px solid #d4a017;
}

.lightbox-caption {
    color: white;
    font-size: clamp(0.8em, 2vw, 1.2em);
    margin-top: 15px;
    text-align: center;
    background-color: rgba(139, 69, 19, 0.8);
    padding: 10px 20px;
    border-radius: 5px;
    max-width: 100%;
    word-wrap: break-word;
    overflow-wrap: break-word;
}

.lightbox-close {
    position: absolute;
    top: 20px;
    right: 30px;
    font-size: 40px;
    color: white;
    cursor: pointer;
    background: none;
    border: none;
    font-weight: bold;
    z-index: 10001;
}

.lightbox-close:hover {
    color: #d4a017;
}

.lightbox-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    font-size: 50px;
    color: white;
    cursor: pointer;
    background: rgba(139, 69, 19, 0.7);
    border: none;
    padding: 10px 20px;
    border-radius: 5px;
    user-select: none;
}

.lightbox-nav:hover {
    background: rgba(212, 160, 23, 0.9);
}

.lightbox-prev {
    left: 30px;
}

.lightbox-next {
    right: 30px;
}

.lightbox-counter {
    position: absolute;
    top: 20px;
    left: 30px;
    color: white;
    font-size: 18px;
    background-color: rgba(139, 69, 19, 0.8);
    padding: 8px 15px;
    border-radius: 5px;
}


/* --- NAVIGATION MENU STYLES --- */
.nav-menu {
    z-index: 1000;
}

.nav-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    cursor: pointer;
    text-decoration: none;
}

.nav-icon-box {
    position: relative;
    width: 55px;
    height: 55px;
    margin-bottom: 0.5rem;
    box-shadow: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    border: 1px solid rgba(0, 0, 0, 0.1);
    transition: border-color 0.3s ease;
    background-color: transparent;
}

.nav-item:hover .nav-icon-box {
    border-color: #991b1b;
}

.nav-icon-box img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.nav-item .hover-img {
    opacity: 0;
    transition: opacity 0.3s ease-in-out;
}

.nav-item .default-img {
    opacity: 1;
    transition: opacity 0.3s ease-in-out;
}

.nav-item:hover .hover-img {
    opacity: 1;
}

.nav-item:hover .default-img {
    opacity: 0;
}

.nav-text {
    font-size: 0.875rem;
    font-weight: 700;
    text-align: center;
    line-height: 1.25;
    color: #3399CC;
    transition: color 0.3s ease;
}

.nav-item:hover .nav-text {
    color: #8B0000;
}

.nav-icon-box.active {
    background-color: white;
    border-color: #991b1b;
}

.nav-text.active {
    color: #8B0000;
}

/* --- RESPONSIVE LAYOUT (Media Queries) --- */

/* Desktop: Sticky sidebar on the left */
@media screen and (min-width: 569px) {
    .nav-menu {
        position: fixed;
        left: 0;
        top: 0;
        height: 95vh;
        width: 130px;
        background-color: rgba(255, 255, 204, 0.95);
        padding: 20px 0;
        overflow-y: auto;
        border-right: 2px solid #ffffff;
        box-shadow: 2px 0 10px rgba(0,0,0,0.1);
    }
    
    .nav-menu-grid {
        display: flex;
        flex-direction: column;
        gap: 10px;
        align-items: center;
	padding-bottom: 60px; 
    }
    
    body {
        padding-left: 130px;
    }

    /* Album spezifisch: Breiterer Container */
    .container.album-width {
        max-width: 1400px;
    }

    /* Table Specific Desktop */
    table td:first-child,
    table th:first-child {
        width: 180px;
        min-width: 180px;
    }
}

/* Mobile & Tablet */
@media screen and (max-width: 568px) {
    /* Navigation Mobile */
    .nav-menu {
        position: fixed;
        bottom: 0;
        left: 0;
        right: 0;
        background-color: rgba(255, 255, 204, 0.90);
        padding: 15px 10px;
        border-bottom: 2px solid #ffffff;
        box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    }
    
    .nav-menu-grid {
        display: grid;
        grid-template-columns: repeat(4, 1fr);
        gap: 5px;
        max-width: 400px;
        margin: 0 auto;
    }

    body {
        padding-bottom: 120px;
        padding-left: 0;
    }

    .bio-image, .bio-image.left, .bio-image.large {
        float: none;
        margin: 20px auto;
        max-width: 100%;
        display: block;
    }

    /* Mobile Table Styles (Card View) */
    table { border: 0; }
    thead { display: none; }
    
    tbody tr {
        display: block;
        margin-bottom: 20px;
        border: 1px solid #ddd;
        padding: 10px;
        background-color: #fafafa;
    }
    
    td {
        display: block;
        text-align: left;
        padding: 10px 0;
        position: relative;
    }
    
    td:before {
        content: attr(data-label);
        font-weight: bold;
        display: block;
        margin-bottom: 5px;
        color: #8b4513;
    }
    
    td[data-label="Cover"]:before,
    td[data-label="Titel & Beschreibung"]:before {
        content: none;
    }

    td[data-label="Cover"] {
        text-align: center;
    }

    td[data-label="Cover"] .cover-img {
        display: block;
        margin: 0 auto;
        width: auto;
        max-width: 164px;
        height: auto;
    }

    td[data-label="Jahr"],
    td[data-label="Medium"],
    td[data-label="Sprache"] {
        display: inline-block;
        width: auto;
        padding: 5px 10px 5px 0;
        border: none;
    }

    td[data-label="Jahr"]:before,
    td[data-label="Medium"]:before,
    td[data-label="Sprache"]:before {
        display: inline;
        margin-right: 5px;
    }

    td[data-label="Titel & Beschreibung"] {
        border-bottom: 1px solid #ddd;
        margin-bottom: 10px;
        display: flex !important;
        flex-direction: column;
        min-height: auto;
    }

    /* Mobile Gallery */
    .gallery {
        grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
        gap: 15px;
    }

    .gallery-item img {
        height: 200px;
    }

    /* Mobile Lightbox Controls */
    .lightbox-nav {
        font-size: 35px;
        padding: 8px 15px;
    }

    .lightbox-prev {
        left: 10px;
    }

    .lightbox-next {
        right: 10px;
    }

    .lightbox-close {
        top: 10px;
        right: 15px;
        font-size: 35px;
    }

    .lightbox-counter {
        top: 10px;
        left: 15px;
        font-size: 14px;
    }
}



/* --- ARCHIV FOTOS --- */
.archive-photos {
    display: flex;
    justify-content: center;
    align-items: flex-start;
    gap: 20px;
    margin-bottom: 25px;
}

.archive-photo {
    height: 300px;
    width: auto;
    border: 2px solid #8b4513;
    box-shadow: 0 2px 8px rgba(0,0,0,0.15);
}

/* Mobile Version für Archiv Fotos */
@media screen and (max-width: 768px) {
    .archive-photos {
        flex-direction: column;
        align-items: center;
        gap: 15px;
    }
    
    .archive-photo {
        height: auto;
        width: 100%;
        max-width: 100%;
    }
}