/* Music Archive Grid Widget Styles */

.music-archive-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
    width: 100%;
}

.archive-item {
    position: relative;
    background: #1a1a1a;
    border-radius: 0; /* Eckig! */
    overflow: hidden;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.archive-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
}

.archive-item-link {
    display: block;
    text-decoration: none;
    color: inherit;
}

.archive-item-image {
    position: relative;
    width: 100%;
    padding-top: 100%; /* 1:1 Aspect Ratio */
    overflow: hidden;
    background: #000;
}

.archive-item-image img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
    border-radius: 0; /* Eckig! */
}

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

.archive-item-placeholder {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #2c2c2c 0%, #1a1a1a 100%);
    color: #666;
    font-size: 14px;
    text-transform: uppercase;
    letter-spacing: 2px;
}

.archive-item-content {
    padding: 20px;
    background: #1a1a1a;
}

.archive-item-title {
    margin: 0 0 8px 0;
    font-size: 18px;
    font-weight: bold;
    color: #ff3333;
    text-transform: uppercase;
    letter-spacing: 1px;
    line-height: 1.3;
}

.archive-item-genre {
    margin: 0 0 10px 0;
    font-size: 13px;
    color: #999;
    text-transform: capitalize;
}

.archive-item-additional-term {
    margin: 0 0 10px 0;
    font-size: 12px;
    color: #666;
    font-style: italic;
}

.archive-item-description {
    margin: 0;
    font-size: 13px;
    color: #ccc;
    line-height: 1.5;
}

/* NEW Badge */
.new-badge {
    position: absolute;
    top: 0;
    right: 0;
    background: #ff3333;
    color: #fff;
    padding: 8px 20px;
    font-size: 12px;
    font-weight: bold;
    letter-spacing: 2px;
    z-index: 10;
    clip-path: polygon(0 0, 100% 0, 100% 100%, 15% 100%);
    box-shadow: 0 2px 10px rgba(255, 51, 51, 0.5);
}

/* Responsive Design */
@media (max-width: 1024px) {
    .music-archive-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .music-archive-grid {
        grid-template-columns: 1fr;
        gap: 15px;
    }
    
    .archive-item-content {
        padding: 15px;
    }
    
    .archive-item-title {
        font-size: 16px;
    }
    
    .archive-item-genre,
    .archive-item-description {
        font-size: 12px;
    }
    
    .new-badge {
        padding: 6px 15px;
        font-size: 11px;
    }
}

/* Dark Mode Enhancements */
.archive-item {
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
}

/* Hover States */
.archive-item-link:hover .archive-item-title {
    color: #ff5555;
}

/* Loading State */
.music-archive-grid.loading {
    opacity: 0.5;
    pointer-events: none;
}

/* Animation for grid items */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.archive-item {
    animation: fadeInUp 0.5s ease forwards;
}

.archive-item:nth-child(1) { animation-delay: 0.1s; }
.archive-item:nth-child(2) { animation-delay: 0.2s; }
.archive-item:nth-child(3) { animation-delay: 0.3s; }
.archive-item:nth-child(4) { animation-delay: 0.4s; }
.archive-item:nth-child(5) { animation-delay: 0.5s; }
.archive-item:nth-child(6) { animation-delay: 0.6s; }

/* Hover Overlay Styles */
.archive-item {
    position: relative;
}

.archive-item-link {
    position: relative;
    display: block;
}

/* Grid muss Overflow erlauben für Overlays */
.music-archive-grid {
    overflow: visible !important;
}

/* Auch Parent-Container müssen Overflow erlauben */
.music-archive-grid * {
    overflow: visible;
}

/* Stelle sicher dass Elementor Container nicht abschneidet */
.elementor-widget-container:has(.music-archive-grid) {
    overflow: visible !important;
}

.elementor-column:has(.music-archive-grid) {
    overflow: visible !important;
}

.elementor-section:has(.music-archive-grid) {
    overflow: visible !important;
}

/* Base Overlay Styles */
.archive-item-overlay {
    position: absolute;
    background: rgba(255, 255, 255, 0.98);
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease, transform 0.3s ease;
    padding: 15px;
    z-index: 1000;
    border-radius: 0; /* Eckig! */
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
    max-height: 300px;
    pointer-events: none;
}

.archive-item:hover .archive-item-overlay,
.archive-item-link:hover .archive-item-overlay {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
}

/* Info Badge in Ecke (wie Kode88 "i") */
.overlay-corner-badge {
    position: absolute;
    top: 0;
    right: 0;
    width: 0;
    height: 0;
    border-style: solid;
    border-width: 0 40px 40px 0;
    border-color: transparent #333 transparent transparent;
    z-index: 10;
}

/* Dreieck Badge - Text via ::after */
.overlay-corner-badge:not(.badge-square)::after {
    content: attr(data-badge-text);
    position: absolute;
    top: 8px;
    right: -32px;
    color: #fff;
    font-size: 16px;
    font-weight: bold;
    font-style: italic;
    font-family: Georgia, serif;
}

/* Quadrat Badge */
.overlay-corner-badge.badge-square {
    width: 35px;
    height: 35px;
    border: none;
    background: #333;
    display: flex;
    align-items: center;
    justify-content: center;
}

.overlay-corner-badge.badge-square::after {
    display: none;
}

.overlay-corner-badge.badge-square .badge-text {
    color: #fff;
    font-size: 16px;
    font-weight: bold;
    font-style: italic;
    font-family: Georgia, serif;
}

/* Position: Oberhalb (Standard - wie Kode88) */
.overlay-position-above .archive-item-overlay {
    bottom: 100%;
    left: 0;
    right: 0;
    margin-bottom: 10px;
    transform: translateY(10px);
}

.overlay-position-above .archive-item:hover .archive-item-overlay {
    transform: translateY(0);
}

/* Zusätzliche Sicherheit für oberhalb */
.overlay-position-above .archive-item {
    overflow: visible !important;
}

.overlay-position-above {
    padding-top: 0 !important;
}

/* Position: Über der Karte (vollflächig) */
.overlay-position-over .archive-item-overlay {
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    margin: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    transform: scale(0.95);
}

.overlay-position-over .archive-item:hover .archive-item-overlay {
    transform: scale(1);
}

/* Position: Unterhalb */
.overlay-position-below .archive-item-overlay {
    top: 100%;
    left: 0;
    right: 0;
    margin-top: 10px;
    transform: translateY(-10px);
}

.overlay-position-below .archive-item:hover .archive-item-overlay {
    transform: translateY(0);
}

.overlay-content {
    width: 100%;
    max-height: 100%;
    overflow-y: auto;
    text-align: left;
}

.overlay-field {
    margin-bottom: 15px;
}

.overlay-field:last-child {
    margin-bottom: 0;
}

.overlay-label {
    display: block;
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: #999;
    margin-bottom: 5px;
    font-weight: 600;
}

.overlay-value {
    font-size: 13px;
    line-height: 1.6;
    color: #333;
}

/* Scrollbar für Overlay Content */
.overlay-content::-webkit-scrollbar {
    width: 4px;
}

.overlay-content::-webkit-scrollbar-track {
    background: #f1f1f1;
}

.overlay-content::-webkit-scrollbar-thumb {
    background: #888;
    border-radius: 2px;
}

.overlay-content::-webkit-scrollbar-thumb:hover {
    background: #555;
}
