/**
 * Styling pro diskografii
 * 
 * Obsahuje styly pro základní widget a načítá styly pro Light widget
 */

/* Načtení stylů pro Light widget */
@import url('diskografie-light.css');

/* Grid container */
.diskografie-container {
    width: 100%;
    box-sizing: border-box;
}

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

/* Album item */
.diskografie-item {
    position: relative;
    overflow: hidden;
    transition: all 0.3s ease;
    border-radius: 4px;
    background-color: #fff;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.diskografie-item:hover {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    transform: translateY(-2px);
}

/* Album image - OPRAVENÁ VERZE */
.diskografie-item-image {
    position: relative;
    overflow: hidden;
    width: 100%;
    padding-bottom: 100%; /* Square aspect ratio */
    background-color: #f5f5f5; /* Barva pozadí, pokud by obrázek nebyl vidět */
}

.diskografie-item-image img.diskografie-image {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: block; /* Zajistí, že obrázek se zobrazí jako blokový prvek */
    object-fit: cover; /* Zajistí, že obrázek vyplní celý prostor bez deformace */
    transition: transform 0.5s ease;
    max-width: none; /* Přepíše případné max-width omezení z témat */
    opacity: 1 !important; /* Zajistí, že obrázek nebude průhledný */
    visibility: visible !important; /* Zajistí, že obrázek bude viditelný */
}

/* Zajistí, že obrázky budou viditelné */
.diskografie-item-image img.diskografie-image.no-image {
    opacity: 0.7 !important;
}

/* Hover efekt pro obrázek */
.diskografie-item:hover .diskografie-item-image img {
    transform: scale(1.05);
}

/* Opravy pro různé WordPress motivy */
.diskografie-item-image a {
    display: block;
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

/* Album title */
.diskografie-item-title {
    padding: 12px 10px;
    font-size: 16px;
    font-weight: 600;
    text-align: center;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.diskografie-item-title a {
    color: inherit;
    text-decoration: none;
}

/* Hover card */
.diskografie-hover-card {
    position: absolute;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease, transform 0.3s ease;
    z-index: 5;
    padding: 20px;
    overflow: auto;
    max-height: 100%;
    box-sizing: border-box;
}

/* Hover card positions */
.diskografie-position-overlay {
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.8);
}

.diskografie-position-top {
    bottom: 100%;
    left: 0;
    width: 100%;
    transform: translateY(10px);
}

.diskografie-position-bottom {
    top: 100%;
    left: 0;
    width: 100%;
    transform: translateY(-10px);
}

/* Item hover state */
.diskografie-item:hover .diskografie-hover-card {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

/* Card animations */
.diskografie-animation-fade {
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

.diskografie-animation-fade-scale {
    transform: scale(0.95);
    transition: opacity 0.3s ease, visibility 0.3s ease, transform 0.3s ease;
}

.diskografie-item:hover .diskografie-animation-fade-scale {
    transform: scale(1);
}

.diskografie-animation-slide-up {
    transform: translateY(20px);
    transition: opacity 0.3s ease, visibility 0.3s ease, transform 0.3s ease;
}

.diskografie-animation-slide-down {
    transform: translateY(-20px);
    transition: opacity 0.3s ease, visibility 0.3s ease, transform 0.3s ease;
}

.diskografie-animation-slide-left {
    transform: translateX(20px);
    transition: opacity 0.3s ease, visibility 0.3s ease, transform 0.3s ease;
}

.diskografie-animation-slide-right {
    transform: translateX(-20px);
    transition: opacity 0.3s ease, visibility 0.3s ease, transform 0.3s ease;
}

/* Hover card content styling */
.diskografie-card-title {
    margin: 0 0 12px 0;
    font-size: 18px;
    font-weight: 600;
    color: white;
}

.diskografie-description {
    margin-bottom: 12px;
    font-size: 14px;
    line-height: 1.4;
}

.diskografie-release-date,
.diskografie-performers,
.diskografie-awards {
    margin-bottom: 8px;
    font-size: 13px;
    line-height: 1.4;
}

.diskografie-label {
    font-weight: 600;
    display: inline-block;
    margin-right: 5px;
}

/* Award icons */
.diskografie-award-icons {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 5px;
}

.diskografie-award-icon {
    width: 30px;
    height: 30px;
    object-fit: contain;
    background-color: rgba(255, 255, 255, 0.9);
    border-radius: 4px;
    padding: 2px;
}

.diskografie-award-name {
    display: inline-block;
    padding: 3px 8px;
    margin-right: 5px;
    background-color: rgba(255, 255, 255, 0.2);
    border-radius: 3px;
    font-size: 12px;
}

/* Audio sample */
.diskografie-audio-sample {
    margin: 12px 0;
}

.diskografie-iframe-container {
    position: relative;
    padding-bottom: 56.25%; /* 16:9 aspect ratio */
    height: 0;
    overflow: hidden;
    max-width: 100%;
}

.diskografie-iframe-container iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: 0;
}

/* E-shop button */
.diskografie-eshop-link {
    margin-top: 15px;
}

.diskografie-eshop-button {
    display: inline-block;
    padding: 8px 16px;
    background-color: #0066cc;
    color: white;
    text-decoration: none;
    border-radius: 4px;
    font-size: 14px;
    font-weight: 500;
    text-align: center;
    transition: background-color 0.3s ease;
}

.diskografie-eshop-button:hover {
    background-color: #0055aa;
}

/* Mobile specific styling */
.diskografie-mobile-card-toggle {
    display: none;
    position: absolute;
    bottom: 10px;
    right: 10px;
    width: 30px;
    height: 30px;
    background: rgba(0, 0, 0, 0.7);
    border-radius: 50%;
    cursor: pointer;
    z-index: 10;
    align-items: center;
    justify-content: center;
}

.diskografie-mobile-toggle-icon {
    position: relative;
    width: 14px;
    height: 2px;
    background-color: white;
}

.diskografie-mobile-toggle-icon::before,
.diskografie-mobile-toggle-icon::after {
    content: '';
    position: absolute;
    width: 14px;
    height: 2px;
    background-color: white;
    transition: all 0.3s ease;
}

.diskografie-mobile-toggle-icon::before {
    transform: translateY(-5px);
}

.diskografie-mobile-toggle-icon::after {
    transform: translateY(5px);
}

.diskografie-mobile-card-toggle.active .diskografie-mobile-toggle-icon {
    background-color: transparent;
}

.diskografie-mobile-card-toggle.active .diskografie-mobile-toggle-icon::before {
    transform: rotate(45deg);
}

.diskografie-mobile-card-toggle.active .diskografie-mobile-toggle-icon::after {
    transform: rotate(-45deg);
}

.diskografie-mobile-card {
    display: none;
    padding: 15px;
    background-color: rgba(0, 0, 0, 0.85);
    color: white;
    overflow: auto;
    max-height: 300px;
    opacity: 0;
    visibility: hidden;
}

.diskografie-mobile-card.active {
    opacity: 1;
    visibility: visible;
}

/* Lazy loading */
.diskografie-image.lazyload,
.diskografie-image.lazyloading {
    opacity: 0;
}

.diskografie-image.lazyloaded {
    opacity: 1;
    transition: opacity 0.3s ease;
}

/* Responzivní design */
@media only screen and (max-width: 992px) {
    .diskografie-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media only screen and (max-width: 767px) {
    /* Skryjeme hover kartu na mobilech */
    .diskografie-hover-card {
        display: none;
    }
    
    /* Zobrazíme místo toho toggle tlačítko */
    .diskografie-mobile-card-toggle {
        display: flex;
    }
    
    /* Nastavení pro mobilní kartu */
    .diskografie-mobile-card {
        display: block;
        position: relative;
        max-height: 0;
        padding: 0 15px;
        overflow: hidden;
        transition: all 0.3s ease;
        opacity: 0;
    }
    
    /* Toggle */
    .diskografie-mobile-toggle {
        max-height: 0;
        overflow: hidden;
    }
    
    .diskografie-mobile-toggle.active {
        max-height: 500px;
        padding: 15px;
    }
    
    /* Accordion */
    .diskografie-mobile-accordion {
        max-height: 0;
        overflow: hidden;
    }
    
    .diskografie-mobile-accordion.active {
        max-height: 500px;
        padding: 15px;
        opacity: 1;
    }
}

@media only screen and (max-width: 575px) {
    .diskografie-grid {
        grid-template-columns: repeat(1, 1fr);
    }
}

/* Fallback image */
.diskografie-image.no-image {
    background-color: #f5f5f5;
    border: 1px solid #e0e0e0;
}

/* Přístupnost */
.diskografie-eshop-button:focus,
.diskografie-mobile-card-toggle:focus {
    outline: 2px solid #0066cc;
    outline-offset: 2px;
}

.diskografie-award-icon:focus {
    outline: 2px solid white;
}

/* Animace pro plynulejší přechody */
.diskografie-item,
.diskografie-item-image img,
.diskografie-hover-card,
.diskografie-mobile-card,
.diskografie-eshop-button {
    will-change: transform, opacity;
}

/* Opravy pro fotogalerii */
.diskografie-item-image a,
.diskografie-item-image img.diskografie-image {
    pointer-events: auto !important;
}

/* Zajištění, že obrázky se zobrazí správně i v tématech, které je modifikují */
.diskografie-item-image img.diskografie-image {
    opacity: 1 !important;
    visibility: visible !important;
    display: block !important;
    z-index: 1 !important;
}

/* Oprava pro průhledné hover efekty v některých tématech */
.diskografie-hover-card {
    background-color: rgba(0, 0, 0, 0.8) !important;
}

/* Zajištění, že tlačítko do e-shopu bude viditelné */
.diskografie-eshop-button {
    display: inline-block !important;
    opacity: 1 !important;
    visibility: visible !important;
}

/* Oprava pro nejčastější WordPress téma konflikty */
body .elementor .diskografie-item-image img.diskografie-image {
    height: 100% !important;
    width: 100% !important;
    max-width: none !important;
    position: absolute !important;
    top: 0 !important;
    left: 0 !important;
    object-fit: cover !important;
}