/* ------------------------------- */
/* ZÁKLADNÍ NASTAVENÍ */
/* ------------------------------- */

.medioteka-body {
    background-color: #0d1117;
    color: #e5e7eb;
    font-family: system-ui, sans-serif;
    margin: 0;
    padding: 0;
}

/* Odsazení shora */
.medioteka-container {
    max-width: 1400px;
    margin: 40px auto 0 auto;
    padding: 0 20px;
    padding-top: 30px;
    padding-bottom: 10px;
    /* menší mezera k tlačítku */
}

/* ------------------------------- */
/* NADPIS & PODNADPIS */
/* ------------------------------- */

/* MUSÍ být maximálně specifické, jinak to přepíše Tailwind/style.css */
html body.medioteka-body .medioteka-container .medioteka-title {
    font-size: 2.5rem !important;
    font-weight: 600 !important;
    text-align: center;
    margin-bottom: 10px;
    color: #4dabf7 !important;
}

html body.medioteka-body .medioteka-container .medioteka-subtitle {
    text-align: center;
    color: #94a3b8;
    margin-bottom: 25px;
}

/* ------------------------------- */
/* VYHLEDÁVÁNÍ */
/* ------------------------------- */

.medioteka-search {
    width: 100%;
    max-width: 420px;
    margin: 0 auto 35px auto;
    display: block;
    padding: 12px 18px;
    border-radius: 10px;
    border: none;
    background: #1e2633;
    color: white;
    font-size: 16px;
}

.medioteka-search::placeholder {
    color: #64748b;
}

/* ------------------------------- */
/* GRID – 4 sloupce */
/* ------------------------------- */

.medioteka-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 22px;
}

/* ------------------------------- */
/* KARTA */
/* ------------------------------- */

.medioteka-card {
    background: #1a1f27;
    padding: 20px;
    border-radius: 14px;
    border: 1px solid #2c3440;
    transition: 0.2s ease;
    cursor: pointer;
}

.medioteka-card:hover {
    transform: translateY(-4px);
    border-color: #4dabf7;
}

.medioteka-card-icon {
    margin-bottom: 12px;
}

.medioteka-card-title {
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 8px;
    color: #f1f5f9;
}

.medioteka-card-desc {
    font-size: 0.9rem;
    color: #94a3b8;
    margin-bottom: 12px;
}

.medioteka-card-tag {
    font-size: 0.75rem;
    font-weight: bold;
    color: #4dabf7;
}

/* ------------------------------- */
/* MODAL */
/* ------------------------------- */

.medioteka-modal {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.65);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 200;
}

.hidden {
    display: none;
}

.medioteka-modal-content {
    background: #1f242b;
    padding: 25px;
    border-radius: 12px;
    width: 80%;
    max-width: 900px;
    animation: fadeIn 0.2s ease-out;
}

.medioteka-modal-close {
    font-size: 26px;
    color: #94a3b8;
    cursor: pointer;
    float: right;
}

/* ------------------------------- */
/* FADE ANIMACE */
/* ------------------------------- */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: scale(0.96);
    }

    to {
        opacity: 1;
        transform: scale(1);
    }
}

/* ------------------------------- */
/* SPODNÍ TLAČÍTKO */
/* ------------------------------- */

.medioteka-back {
    margin-top: 55px;
    text-align: center;
    margin-bottom: 65px;
}

.medioteka-back-btn {
    padding: 12px 28px;
    background: #1e293b;
    border-radius: 8px;
    color: #cbd5e1;
    border: 1px solid #334155;
    text-decoration: none;
    font-size: 1rem;
    transition: 0.2s;
    margin-top: 50px;
    margin-bottom: 70px;
}

.medioteka-back-btn:hover {
    background: #334155;
    border-color: #475569;
}

/* ------------------------------- */
/* RESPONZIVITA */
/* ------------------------------- */

@media (max-width: 1200px) {
    .medioteka-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (max-width: 900px) {
    .medioteka-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 600px) {
    .medioteka-grid {
        grid-template-columns: repeat(1, 1fr);
    }
}

/* === FIX PRO MEDIOTÉKU (přebití globálního CSS) === */

/* Titulek */
.medioteka-container .medioteka-title {
    font-size: 2.4rem !important;
    font-weight: 600 !important;
    color: #a8c7ff !important;
    margin-top: 10px !important;
    margin-bottom: 14px !important;
    text-shadow: 0 0 10px rgba(96, 165, 250, 0.25) !important;
}

/* Podnadpis */
.medioteka-container .medioteka-subtitle {
    margin-top: 5px !important;
    margin-bottom: 28px !important;
}

/* Vyhledávání – posun blíž k titulkům */
.medioteka-search {
    margin-top: 0 !important;
    margin-bottom: 38px !important;
}

/* Spodní tlačítko – více místa */
.medioteka-back {
    margin-top: 60px !important;
    margin-bottom: 40px !important;
}

/* TAGY */
.medioteka-card-tags {
    margin-top: 14px;
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.tag {
    font-size: 11px;
    background: #24314a;
    padding: 4px 8px;
    border-radius: 6px;
    color: #bcd0ea;
    border: 1px solid #334155;
    text-transform: uppercase;
    letter-spacing: 0.3px;
}

.tag.type {
    background: rgba(59, 130, 246, 0.35);
    border-color: #3b82f6;
    color: #dbeafe;
    font-weight: 600;
}

.medioteka-card-tags {
    margin-top: 12px;
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.medioteka-tag {
    background: #1e293b;
    padding: 4px 8px;
    border-radius: 6px;
    font-size: 11px;
    opacity: 0.8;
}

.medioteka-audio {
    width: 90%;
    max-width: 480px;
    margin: 20px auto;
    display: block;
}