/**
 * Modern A-Z Listing Styles
 */

.mazl-container {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif;
    margin: 20px 0;
}

/* Navigation: kompletter A-Z Streifen, inaktive Buchstaben dezent ausgegraut */
.mazl-navigation {
    display: flex;
    flex-wrap: wrap;
    gap: 2px;
    margin-bottom: 40px;
    padding: 6px 4px;
    border-top: 1px solid #e9e9e9;
    border-bottom: 1px solid #e9e9e9;
    justify-content: center;
}

.mazl-nav-letter {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 26px;
    height: 30px;
    padding: 0 3px;
    font-size: 0.85rem;
    font-weight: 600;
    border-radius: 6px;
    text-decoration: none;
    line-height: 1;
    transition: background-color 0.18s ease, color 0.18s ease;
}

a.mazl-nav-letter.is-active {
    color: var(--mazl-primary, #0073aa);
}

a.mazl-nav-letter.is-active:hover,
a.mazl-nav-letter.is-active:focus-visible {
    background-color: rgba(0, 115, 170, 0.12); /* Fallback für ältere Browser */
    background-color: color-mix(in srgb, var(--mazl-primary, #0073aa) 12%, transparent);
    color: var(--mazl-primary, #0073aa);
    outline: none;
}

a.mazl-nav-letter.is-active:focus-visible {
    box-shadow: 0 0 0 2px var(--mazl-primary, #0073aa);
}

span.mazl-nav-letter.is-disabled {
    color: #d8d8d8;
    font-weight: 500;
    cursor: default;
    user-select: none;
}

/* Letter Section */
.mazl-letter-section {
    margin-bottom: 50px;
    scroll-margin-top: 32px;
}

.mazl-letter-heading {
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: 20px;
    padding-bottom: 8px;
    border-bottom: 2px solid var(--mazl-primary, #0073aa);
    color: #222;
}

/* Grid Layout */
.mazl-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 25px;
}

/* Card Style */
.mazl-card {
    background: #fff;
    border: 1px solid #eee;
    border-radius: 12px;
    overflow: hidden;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    display: flex;
    flex-direction: column;
    box-shadow: 0 4px 6px rgba(0,0,0,0.05);
}

.mazl-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(0,0,0,0.1);
}

.mazl-thumbnail {
    position: relative;
    height: 180px;
    overflow: hidden;
}

.mazl-thumbnail img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

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

/* Badge Style */
.mazl-badge {
    position: absolute;
    top: 15px;
    right: 15px;
    background: #ff4757;
    color: #fff;
    padding: 4px 10px;
    font-size: 0.75rem;
    font-weight: bold;
    border-radius: 4px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.2);
}

.mazl-badge-inline {
    display: inline-block;
    position: static;
    margin: 15px 15px 0 15px;
}

/* Content Style */
.mazl-content {
    padding: 20px;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
}

.mazl-title {
    margin: 0 0 10px 0;
    font-size: 1.25rem;
    line-height: 1.4;
}

.mazl-title a {
    text-decoration: none;
    color: #222;
    transition: color 0.3s ease;
}

.mazl-title a:hover {
    color: var(--mazl-primary, #0073aa);
}

.mazl-excerpt {
    font-size: 0.9rem;
    color: #666;
    line-height: 1.6;
}

/* Date Heading */
.mazl-date-heading {
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: 20px;
    padding-bottom: 8px;
    border-bottom: 2px solid var(--mazl-primary, #0073aa);
    color: #222;
}

/* Date Info */
.mazl-date-info {
    font-size: 0.85rem;
    color: #999;
    margin-bottom: 8px;
}

/* Responsive */
@media (max-width: 600px) {
    .mazl-grid {
        grid-template-columns: 1fr;
    }
    .mazl-letter-heading,
    .mazl-date-heading {
        font-size: 1.6rem;
    }
    .mazl-nav-letter {
        min-width: 24px;
        height: 28px;
        font-size: 0.8rem;
    }
}

/* Reduzierte Bewegung respektieren */
@media (prefers-reduced-motion: reduce) {
    .mazl-card,
    .mazl-thumbnail img,
    .mazl-nav-letter {
        transition: none;
    }
    .mazl-card:hover {
        transform: none;
    }
}
