/* Globale Stile */
body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    margin: 0;
    background-color: #e9ebee; /* <-- ETWAS DUNKLERES GRAU */
    color: #333;
}
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 2rem;
}

/* Header */
.main-header {
    background-color: #e9ebee; /* <-- GLEICHES GRAU WIE DER BODY */
    padding: 1rem 0;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
    margin-bottom: 2rem;
}
.main-header .logo-link {
    display: flex;
    align-items: center;
    text-decoration: none;
    color: #333;
}
.main-header .logo-link img {
    max-height: 150px;
    margin-right: 15px;
}
.main-header h1 {
    margin: 0;
    font-size: 1.8rem;
}

/* Breadcrumbs (Navigation) */
.breadcrumbs {
    margin-bottom: 2rem;
    font-size: 0.9rem;
    color: #666;
}
.breadcrumbs a {
    color: #007bff;
    text-decoration: none;
}
.breadcrumbs a:hover {
    text-decoration: underline;
}

/* Grid für Kategorien & Alben */
.grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 1.5rem;
}
.grid-item {
    background-color: #fff;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 4px 10px rgba(0,0,0,0.08);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    text-decoration: none;
    color: inherit;
    display: block;
}
.grid-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 15px rgba(0,0,0,0.12);
}
.grid-item-image {
    width: 100%;
    height: 200px;
    background-color: #eee;
    background-size: cover;
    background-position: center;
}
.grid-item-content {
    padding: 1rem;
}
.grid-item-content h3 {
    margin: 0 0 0.5rem 0;
}
.grid-item-content p {
    margin: 0;
    color: #666;
    font-size: 0.9rem;
}

/* Bildergitter im Album */
.gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 1rem;
}
.gallery-grid a {
    display: block;
    border-radius: 8px;
    overflow: hidden;
}
.gallery-grid img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.2s ease;
}
.gallery-grid a:hover img {
    transform: scale(1.05);
}

/* Footer */
.main-footer {
    text-align: center;
    margin-top: 3rem;
    padding: 2rem 0;
    color: #888;
    border-top: 1px solid #eee;
}

.sort-options {
    margin-bottom: 2rem;
    padding: 1rem;
    background-color: #fff;
    border-radius: 8px;
    text-align: center;
}
.sort-options a {
    text-decoration: none;
    color: #007bff;
    margin: 0 10px;
}
.sort-options a.active {
    font-weight: bold;
    color: #333;
    text-decoration: underline;
}

/* ======================================================= */
/* --- Spezial-Stile NUR für die Kategorie-Ansicht --- */
/* ======================================================= */

/* Wendet Flexbox-Zentrierung nur auf die Kategorie-Kacheln an */
.category-grid .grid-item {
    position: relative;
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 200px;
    background: none; /* Entfernt den weißen Hintergrund für die Kachel selbst */
}

/* Positioniert das Bild/den Farbverlauf als Hintergrund über die gesamte Kachel */
.category-grid .grid-item-image {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 1; /* Legt es hinter den Inhalt */
}

/* Formatiert den Inhalts-Block neu, damit er über dem Bild schwebt */
.category-grid .grid-item-content {
    position: relative;
    z-index: 2; /* Legt es vor das Bild */
    background: none; /* Entfernt den weißen Kasten */
    backdrop-filter: none;
    text-align: center;
}

/* Macht den Titel weiß und lesbar */
.category-grid .grid-item-content h3 {
    color: white;
    font-size: 1.6rem;
    text-shadow: 0 2px 5px rgba(0,0,0,0.7);
    margin: 0;
}

/* Blendet die Beschreibung aus, da sie stören würde */
.category-grid .grid-item-content p {
    display: none;
}

/* Stil für den Album-Zähler auf den Kategorie-Kacheln */
.category-grid .grid-item-content .album-count {
    display: block; /* Stellt sicher, dass es angezeigt wird */
    color: white;
    font-size: 0.9rem; /* Kleinere Schriftgröße */
    font-weight: normal;
    text-shadow: 0 1px 3px rgba(0,0,0,0.6); /* Leichter Schatten für Lesbarkeit */
    margin-top: 0.5rem; /* Etwas Abstand zum Titel */
    opacity: 0.85; /* Macht es etwas dezenter als den Titel */
}

/* Stil für die Meta-Infos (Bilder/Aufrufe) auf den Album-Kacheln */
.grid-item-content .album-meta {
    font-size: 0.85em; /* Kleinere Schrift */
    color: #6c757d;  /* Dezentes Grau */
    margin-top: 0.25rem; /* Wenig Abstand zum Titel */
}
