/* ==========================================================================
   KNIHOVNA AKCE - KOMPLETNÍ STYLING (V26 - INTEGRATED & FIXED)
   ========================================================================== */

/* 1. LAYOUT A KONTEJNERY */
.akce-container.lib-v9 {
    max-width: 1200px;
    margin: 2rem auto;
    font-family: sans-serif;
}

/* NOVÉ: Společná lišta pro taby a filtry */
.akce-top-bar {
    display: flex;
    justify-content: space-between; /* Taby vlevo, filtry vpravo */
    align-items: flex-end;
    gap: 20px;
    margin-bottom: 25px;
    border-bottom: 2px solid #007a8a; /* Linka pod celým záhlavím */
}

.akce-container .swiper-pagination {
    position: absolute;
    bottom: 0px !important;
    left: 0;
    width: 100%;
    display: flex;
    justify-content: center;
    gap: 5px;
}
.akce-swiper .swiper-slide {
    height: auto;
    display: flex;
    position: relative;
}

.akce-layout-grid {
    display: block; /* Změna z flex na block, protože filtry jsou už nahoře */
}

.akce-main-content {
    width: 100%;
    min-width: 0; 
    order: 1;
}

/* 2. TABY - FLAT DESIGN */
.akce-tabs-nav {
    display: flex;
    gap: 5px;
    margin-bottom: 0; /* Margin přešel na .akce-top-bar */
}

.tab-pane { display: none !important; }
.tab-pane.active { display: block !important; }

.tab-btn {
    padding: 10px 20px;
    border: 1px solid #007a8a;
    border-radius: 0;
    background: #fff;
    cursor: pointer;
    font-size: 14px;
    color: #007a8a;
    font-weight: bold;
    text-transform: uppercase;
    text-shadow: none !important;
    box-shadow: none !important;
    transition: background 0.2s ease, color 0.2s ease;
    position: relative;
    bottom: -2px; /* Zarovnání na linku */
}

.tab-btn:hover:not(.active) {
    background: #f0f0f0;
}

/* OPRAVA: Vynucená bílá barva při načtení */
.tab-btn.active {
    background: #007a8a !important;
    color: #fff !important; 
    border-color: #007a8a;
}

/* NOVÉ: STYL PRO FILTRY VPRAVO */
.akce-inline-filters {
    display: flex;
    gap: 15px;
    padding-bottom: 10px;
}

.akce-inline-filters .filter-group {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.akce-inline-filters label {
    font-weight: bold;
    color: #007a8a;
    font-size: 11px;
    text-transform: uppercase;
}

.akce-inline-filters select {
    padding: 8px 12px;
    border: 1px solid #ccc;
    background: #fff;
    font-size: 13px;
    color: #333;
    outline: none;
}

/* 3. KARTA AKCE */
.akce-card-item {
    cursor: pointer;
    background: #fff;
    display: flex;
    flex-direction: column;
    border: 1px solid #eee;
    margin-bottom: 20px;
    position: relative;
    overflow: hidden;
    height: 100%;
    width: 100%;
    transition: border-color 0.3s ease;
    /* FLAT DESIGN */
    box-shadow: none !important;
}

.akce-card-item:hover {
    border-color: #007a8a;
}

.card-img-box {
    position: relative;
    background: #000;
    line-height: 0;
    overflow: hidden;
    aspect-ratio: 1 / 1.414;
    flex-shrink: 0;
}

.card-img-box img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    display: block;
}

/* ŠTÍTKY (Badges) - FLAT */
.badges-container {
    position: absolute;
    top: 8px;
    left: 8px;
    display: flex;
    flex-direction: column;
    gap: 5px;
    z-index: 10;
}

.badge {
    background: #fff;
    color: #007a8a;
    border: 1px solid #007a8a;
    padding: 7px 15px !important; 
    font-size: 12px;
    font-weight: bold;
    text-transform: uppercase;
    border-radius: 25px;
    display: inline-block;
    line-height: 1; 
    text-shadow: none !important;
    box-shadow: none !important;
}

.badge-pro-koho {
    background: #333;
    color: #fff;
    border: none;
}

/* 4. INFO ČÁST POD PLAKÁTEM */
.card-info {
    padding: 15px 12px;
    /* OPRAVA: Jemné šedé pozadí viditelné ihned */
    background: #f9f9f9; 
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}

.card-info h3 {
    margin: 0 0 12px 0;
    font-size: 1.25rem;
    color: #222;
    line-height: 1.25;
    font-weight: bold;
    text-shadow: none !important;
    min-height: 3.1rem;
}

.meta {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 6px;
    color: #444;
    font-size: 1.15rem;
    text-shadow: none !important;
}

.card-info > .meta:first-of-type { margin-top: 0px; }

.meta-icon {
    width: 18px;
    height: 18px;
    flex-shrink: 0;
}

.meta-icon svg {
    width: 100%;
    height: 100%;
    fill: #007a8a;
}

.meta-time, .meta-date {
    font-weight: 700;
    color: #007a8a;
}

/* 5. MODÁLNÍ OKNO */
#lib-overlay-v9 {
    position: fixed;
    top: 0; left: 0; width: 100%; height: 100%;
    background: rgba(0,0,0,0.85);
    display: none;
    z-index: 999999;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

#lib-modal-v9 {
    background: #fff;
    width: 100%;
    max-width: 1100px;
    max-height: 90vh;
    overflow-y: auto;
    position: relative;
    border-radius: 0;
    box-shadow: none !important;
}

.modal-split { display: flex; flex-wrap: wrap; }
.modal-left { flex: 1; min-width: 350px; background: #f9f9f9; }
.modal-left img { width: 100%; height: auto; display: block; object-fit: contain; }
.modal-right { flex: 1.2; padding: 20px; min-width: 350px; }

.modal-right h2 {
    margin-top: 0;
    font-size: 2.1rem;
    color: #222;
    border-bottom: 3px solid #007a8a;
    padding-bottom: 15px;
    margin-bottom: 25px;
    text-shadow: none !important;
}

.m-info-section {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 2px;
    font-size: 1.40rem;
    color: #333;
    line-height: 1.2;
}

.m-info-section:last-of-type {
    align-items: flex-start; 
}

.modal-icon {
    flex: 0 0 28px;
    height: 28px;
    display: flex;
    justify-content: center;
    align-items: center;
}

.modal-icon svg {
    width: 20px;
    height: 20px;
    fill: #007a8a;
}

.modal-action-zone {
    margin-top: 35px;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.btn-link-simple {
    color: #007a8a;
    text-decoration: underline;
    font-weight: bold;
    font-size: 1.1rem;
    text-shadow: none !important;
    text-align: center;
}

.btn-secondary, .btn-close-style {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 50px;
    border: none;
    cursor: pointer;
    font-weight: bold;
    text-transform: uppercase;
    font-size: 14px;
    text-decoration: none;
    text-shadow: none !important;
    box-shadow: none !important;
}

.btn-close-style { background: #007a8a; color: #fff !important; }
.btn-secondary { background: #eee; color: #333 !important; }

.modal-text {
    margin-top: 20px;
    border-top: 3px solid #007a8a;
    padding-top: 25px;
    line-height: 1.65;
    color: #333;
    font-size: 1.35rem;
    text-shadow: none !important;
}

/* 6. RESPONZIVITA - MOBILNÍ ZOBRAZENÍ */
@media (max-width: 850px) {
    .akce-top-bar {
        flex-direction: column;
        align-items: flex-start;
        gap: 15px;
        border-bottom: none;
		margin-bottom:5px;
    }
    
    .akce-tabs-nav {
        width: 100%;
        border-bottom: 2px solid #007a8a;
    }

    .akce-inline-filters {
        width: 100%;
        display: grid;
        grid-template-columns: 1fr 1fr;
    }

    .akce-card-item {
        display: flex !important;
        flex-direction: row !important;
        height: 160px !important;
        margin-bottom: 15px;
    }

    .card-img-box {
        width: 113px !important;
        height: 100% !important;
    }

    .card-info {
        background: #f9f9f9 !important;
    }
}
/* Styl pro odkaz na lokaci v modálu */
.modal-location-link {
    color: #007a8a;
    text-decoration: none;
    font-weight: bold;
    border-bottom: 1px solid transparent;
    transition: border-color 0.2s ease;
}

.modal-location-link:hover {
    border-bottom-color: #007a8a;
    color: #005f6b;
}

/* Ikona lokace v modálu by měla mít pevnou barvu */
.modal-icon svg {
    fill: #007a8a;
}
/* Styl pro tlačítko map v modálu */
.btn-maps-link:hover {
    background-color: #007a8a !important;
    color: #ffffff !important;
}