/* ==========================================================================
   ZÁKLADNÍ NASTAVENÍ A HLAVNÍ POSUVNÍK PROHLÍŽEČE
   ========================================================================== */
html, body {
    margin: 0;
    padding: 0;
    font-family: Arial, sans-serif;
    background-color: #f0f0f0;
    
    /* Povolí hlavní posuvník stránky, pokud se boční menu nevejdou na výšku monitoru */
    height: auto;
    min-height: 100vh;
    overflow-y: auto; 
}

/* ==========================================================================
   HORNÍ LIŠTY (Záhlaví, menu i vyhledávání jsou přirozenou součástí stránky)
   ========================================================================== */
.hlavicka {
    background: linear-gradient(180deg, #ff3333 0%, #990000 100%);
    color: white;
    padding: 15px 20px;
    text-align: center;
    border-bottom: 4px solid #fff;
}

.hlavicka h1 {
    margin: 0;
    font-size: 28px;
    letter-spacing: 1px;
}

.motto {
    margin: 5px 0 0 0;
    font-style: italic;
    font-size: 16px;
}

/* Hlavička - LOGO A TEXTY */
.logo-nadpis {
    display: flex;
    align-items: center;      
    justify-content: center;  
    gap: 20px;                
    width: 100%;              
    box-sizing: border-box;
}

.hlavicka-texty {
    display: flex;
    flex-direction: column;
    text-align: center;       
}

.hlavicka-logo {
    height: 80px; 
    width: auto;          
    object-fit: contain;
}

.hlavicka-texty h1 {
    margin: 0;
    padding: 0;
}

.hlavicka-texty .motto {
    margin: 5px 0 0 0;
    padding: 0;
}

/* ==========================================================================
   HORNÍ NAVIGAČNÍ LIŠTA (PLASTICKÁ TLAČÍTKA A ODDĚLENÉ POLOŽKY)
   ========================================================================== */
.horni-lista {
    background-color: #f4f4f4; /* Mírně šedé pozadí lišty pro odlišení bílých tlačítek */
    padding: 6px 15px;
    border-bottom: 2px solid #d0d0d0;
    width: 100%;
    box-sizing: border-box;
    box-shadow: inset 0 -2px 5px rgba(0,0,0,0.03);
}

.horni-lista .menu-radek-1, 
.horni-lista .menu-radek-2 {
    width: 100%;
    padding: 2px 0;
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 4px;
    box-sizing: border-box;
}

/* Základní styl pro tlačítka v horní liště */
.horni-lista a {
    color: #333333;
    text-decoration: none;
    padding: 6px 12px;
    font-size: 13px;
    font-weight: bold;
    background: linear-gradient(180deg, #ffffff 0%, #f1f1f1 100%); /* Plastický přechod tlačítka */
    border: 1px solid #cccccc;
    border-bottom-color: #bbb;
    border-radius: 4px;
    transition: all 0.15s ease-in-out;
    display: inline-flex;
    align-items: center;
    white-space: nowrap;
    box-shadow: 0 1px 2px rgba(0,0,0,0.05);
}

/* Hover efekt pro horní tlačítka */
.horni-lista a:hover {
    background: linear-gradient(180deg, #ffffff 0%, #e6e6e6 100%);
    color: #e31e24; /* Červený text při najetí */
    border-color: #b3b3b3;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    transform: translateY(-1px);
}

/* Aktivní tlačítko (Vybraná záložka) */
.horni-lista a.aktivni {
    background: linear-gradient(180deg, #e31e24 0%, #b30000 100%) !important;
    color: #ffffff !important;
    border-color: #990000 !important;
    box-shadow: inset 0 1px 3px rgba(0,0,0,0.3);
    text-shadow: 0 1px 2px rgba(0,0,0,0.4);
}

/* Pravá tlačítka (Přihlášení / Profil / Odhlášení) */
.menu-radek-1 div[style*="margin-left: auto"],
.menu-radek-2 div[style*="margin-left: auto"] {
    display: flex;
    align-items: center;
    gap: 6px;
}

/* ZPŘEHLEDNĚNÍ BAREVNÝCH TLAČÍTEK (Pošta, Profil, Správa apod.) */
.horni-lista a[style*="background-color"] {
    color: #ffffff !important;
    font-weight: bold !important;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.4); /* Stín pod textem pro perfektní čitelnost */
    border: 1px solid rgba(0, 0, 0, 0.2) !important;
    box-shadow: 0 1px 3px rgba(0,0,0,0.15);
}

.horni-lista a[style*="background-color"]:hover {
    filter: brightness(0.9);
    transform: translateY(-1px);
    box-shadow: 0 2px 5px rgba(0,0,0,0.2);
}

/* Na PC obrazovkách tlačítka skryjeme */
button.mobilni-menu-tlacitko,
button.levy-tlacitko,
button.pravy-tlacitko {
    display: none !important;
}

/* ==========================================================================
   ADMINISTRACE & TABULKA ČLÁNKŮ (PC Zobrazení & Soft Delete)
   ========================================================================== */
.admin-hlavicka-sekce {
    display: flex !important;
    flex-direction: row !important;
    justify-content: space-between !important;
    align-items: center !important;
    margin-bottom: 15px !important;
    gap: 15px !important;
    width: 100% !important;
}

.btn-novy-clanek {
    padding: 8px 15px;
    background: #007bff;
    color: #ffffff !important;
    text-decoration: none !important;
    border-radius: 3px;
    font-weight: bold;
    white-space: nowrap;
    display: inline-block;
}

.btn-novy-clanek:hover {
    background: #0056b3;
}

.tabulka-clanku {
    width: 100%;
    border-collapse: collapse;
    margin-top: 10px;
    font-size: 14px;
}

.tabulka-clanku th, 
.tabulka-clanku td {
    padding: 10px;
    border: 1px solid #ddd;
}

/* Zvýraznění řádku označeného ke smazání (Soft delete) */
.tabulka-clanku tr.ke-smazani {
    background-color: #ffe6e6 !important;
}

.stitek-ke-smazani {
    color: #dc3545;
    font-size: 11px;
    font-weight: bold;
    display: block;
    margin-top: 2px;
}

.tabulka-clanku td.col-akce {
    text-align: center !important;
    white-space: nowrap !important;
    display: table-cell !important;
}

/* Tlačítka akcí v tabulce */
.btn-akce-edit, 
.btn-akce-delete,
.btn-akce-definitivne,
.btn-akce-obnovit {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 4px !important;
    padding: 5px 8px !important;
    font-size: 11px !important;
    font-weight: bold !important;
    text-decoration: none !important;
    border-radius: 3px !important;
    margin: 2px !important;
    transition: background-color 0.2s ease, border-color 0.2s ease !important;
}

.btn-akce-edit {
    color: #0056b3 !important;
    background-color: #e7f0ff !important;
    border: 1px solid #b8daff !important;
}

.btn-akce-delete {
    color: #dc3545 !important;
    background-color: #ffe6e6 !important;
    border: 1px solid #f5c6cb !important;
}

.btn-akce-definitivne {
    color: #ffffff !important;
    background-color: #b02a37 !important;
    border: 1px solid #842029 !important;
}

.btn-akce-obnovit {
    color: #ffffff !important;
    background-color: #198754 !important;
    border: 1px solid #146c43 !important;
}

/* Hover efekty akčních tlačítek */
.btn-akce-edit:hover { background-color: #d0e2ff !important; }
.btn-akce-delete:hover { background-color: #f8d7da !important; }
.btn-akce-definitivne:hover { background-color: #842029 !important; }
.btn-akce-obnovit:hover { background-color: #146c43 !important; }

/* ==========================================================================
   MŘÍŽKA PRO KATEGORIE & VYHLEDÁVÁNÍ
   ========================================================================== */
.mrizka-galerii {
    display: grid;
    /* Změněno z 220px na 150px - vejde se více karet vedle sebe */
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 10px; /* Zmenšená mezera mezi kartami */
    margin-top: 15px;
}

.mrizka-karta {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    background: #fdfdfd;
    border: 1px solid #e0e0e0;
    border-top: 3px solid #b30000;
    border-radius: 5px;
    padding: 10px 8px; /* Zmenšené vnitřní odsazení (původně 20px 15px) */
    text-decoration: none;
    color: #333;
    transition: all 0.2s ease-in-out;
    box-shadow: 0 1px 3px rgba(0,0,0,0.05);
}
.mrizka-karta:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 10px rgba(0,0,0,0.1);
    background: #ffffff;
    border-color: #b30000;
}

.mrizka-karta-ikona {
    font-size: 26px; /* Zmenšená ikona složky (původně 38px) */
    margin-bottom: 4px;
}

.mrizka-karta-obsah h4 {
    margin: 0 0 3px 0;
    font-size: 15px; /* Kompaktnější písmo pro nadpis */
    color: #b30000;
}

.mrizka-karta-pocet {
    display: inline-block;
    font-size: 11px; /* Kompaktnější počet médií */
    color: #666;
    background: #f0f0f0;
    padding: 1px 6px;
    border-radius: 10px;
    margin-bottom: 4px;
}

.mrizka-karta-popis {
    font-size: 12px;
    color: #555;
    margin: 3px 0 0 0;
    line-height: 1.2;
}
/* ==========================================================================
   VYHLEDÁVÁNÍ V 1. ŘÁDKU HORNÍ LIŠTY
   ========================================================================== */
/* Formulář vyhledávání odtlačíme doprava */
.horni-lista .menu-radek-1 form,
.vyhledavani-lista form {
    margin-left: auto;
    display: flex;
    align-items: center;
    gap: 5px;
}

.horni-lista .menu-radek-1 input[type="text"],
.vyhledavani-lista input[type="text"] {
    padding: 5px 10px;
    font-size: 13px;
    border: 1px solid #ccc;
    border-radius: 4px;
    width: 170px;
    box-sizing: border-box;
}

.horni-lista .menu-radek-1 button,
.vyhledavani-lista button {
    padding: 5px 10px;
    background-color: #e31e24; 
    color: white;
    border: 1px solid #b31217;
    border-radius: 4px;
    cursor: pointer;
    font-weight: bold;
    font-size: 13px;
    white-space: nowrap;
    transition: background-color 0.15s ease;
}

.horni-lista .menu-radek-1 button:hover,
.vyhledavani-lista button:hover {
    background-color: #b31217;
}

/* ==========================================================================
   HLAVNÍ KONTEJNER A BOČNÍ PANELY (Zvýrazněné bloky a strukturované menu)
   ========================================================================== */
.hlavni-kontejner {
    max-width: 1400px;
    margin: 0 auto 20px auto;
    background: #f9f9f9; /* Jemné pozadí kontejneru pro odlišení bílých bloků */
    box-shadow: 0 0 10px rgba(0,0,0,0.1);
    display: flex;
    flex-direction: column;
    height: auto; 
    min-height: calc(100vh - 120px);
}

.telo-stranky {
    display: flex;
    flex-direction: row;
    align-items: flex-start;
    width: 100%;
}

.levy-panel, .pravy-panel {
    width: 260px;
    flex-shrink: 0;
    box-sizing: border-box;
    padding: 10px;
    height: auto;
    overflow: visible; 
}

/* Struktura jednotlivých bloků v panelu */
.levy-panel > div, .pravy-panel > div,
.sidebar-box, .widget-box {
    background-color: #ffffff;
    border: 1px solid #dcdcdc;
    border-radius: 4px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.04);
    margin-bottom: 15px;
    overflow: hidden;
}

/* Červené hlavičky bloků s jemným přechodem */
.levy-panel h3, .pravy-panel h3 {
    background: linear-gradient(180deg, #e31e24 0%, #b30000 100%);
    color: white;
    padding: 7px 12px;
    margin: 0;
    font-size: 14px;
    font-weight: bold;
    border-bottom: 1px solid #990000;
    letter-spacing: 0.5px;
}

/* Vertikální menu vlevo i vpravo - Plastické oddělené položky */
.vertikalni-menu a,
.levy-panel a, 
.pravy-panel a {
    display: block;
    padding: 8px 12px; 
    color: #333333;
    text-decoration: none;
    background-color: #fbfbfb; /* Jemný šedobílý podklad */
    border-bottom: 1px solid #e9ecef; /* Dělicí linka mezi tlačítky */
    font-size: 13px; 
    transition: all 0.2s ease-in-out;
    box-sizing: border-box;
}

/* Odstranění spodní linky u poslední položky bloku */
.vertikalni-menu a:last-child,
.levy-panel div a:last-child,
.pravy-panel div a:last-child {
    border-bottom: none;
}

/* Interaktivní efekt při najetí myší (Hover) */
.vertikalni-menu a:hover, 
.levy-panel a:hover, 
.pravy-panel a:hover {
    background-color: #f0f0f0;
    color: #d9534f; /* Hasičská červená při najetí */
    padding-left: 16px; /* Plynulé posunutí textu doprava */
}

/* Vybraná / Aktivní položka menu */
.vertikalni-menu a.aktivni,
.levy-panel a.aktivni,
.pravy-panel a.aktivni {
    background-color: #fff0f0;
    color: #cc0000;
    font-weight: bold; 
    border-left: 4px solid #cc0000; /* Výrazný červený proužek vlevo */
    padding-left: 12px;
}

/* ==========================================================================
   PROSTŘEDNÍ OBSAH ČLÁNKŮ
   ========================================================================== */
.obsah {
    flex: 1;
    display: flex;
    flex-direction: column; 
    padding: 20px;
    box-sizing: border-box;
    min-width: 0;
    max-height: 120vh; 
    overflow-y: auto; 
    background-color: #ffffff; /* Čistě bílý podklad pro hlavní obsah */
    border-left: 1px solid #e0e0e0;
    border-right: 1px solid #e0e0e0;
}

.obsah h2 {
    color: #990000;
    border-bottom: 2px solid #990000;
    padding-bottom: 5px;
    margin-top: 0;
}

/* Patička webu */
.paticka {
    text-align: center;
    padding: 15px;
    background: #333;
    color: #ccc;
    font-size: 13px;
    margin-top: auto;
    clear: both;
}

.login-odkaz a {
    color: #666;
    text-decoration: none;
    font-size: 13px;
}
.login-odkaz a:hover {
    color: red;
}

.text-clanku img {
    max-width: 100%;
    height: auto;
    display: block;
    margin: 15px 0;
    border-radius: 4px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.15);
}

/* Pozadí Lightboxu */
.lightbox {
    display: none; 
    position: fixed;
    z-index: 10000; 
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.85); 
    justify-content: center;
    align-items: center;
    cursor: zoom-out;
}

.lightbox-obsah {
    max-width: 90%;
    max-height: 90%;
    border: 3px solid white;
    background-color: white;
    box-shadow: 0 0 20px rgba(0,0,0,0.5);
    animation: zvetseni 0.25s ease-out; 
    cursor: default;
}

.lightbox-zavrit {
    position: absolute;
    top: 20px;
    right: 35px;
    color: #fff;
    font-size: 40px;
    font-weight: bold;
    cursor: pointer;
}

.lightbox-zavrit:hover {
    color: #bbb;
}

@keyframes zvetseni {
    from { transform: scale(0.8); opacity: 0; }
    to { transform: scale(1); opacity: 1; }
}

.vysledky-hledani-list {
    list-style: none;
    padding: 0;
}

.vysledky-hledani-list li {
    margin-bottom: 20px;
}

.vysledky-hledani-list a {
    text-decoration: none;
    color: #990000;
}

.vysledky-hledani-list a:hover h3 {
    text-decoration: underline;
}

.vysledky-hledani-list h3 {
    margin: 0 0 5px 0;
}

.vysledky-hledani-list p {
    margin: 0;
    color: #555;
    font-size: 14px;
    line-height: 1.5;
}
/* Odtlačení vyhledávání na konec 1. řádku */
.horni-lista .menu-radek-1 .vyhledavani-v-menu {
    margin-left: auto; /* Odtlačí formulář úplně doprava */
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

/* Úprava velikosti políčka */
.horni-lista .menu-radek-1 .vyhledavani-v-menu input[type="text"] {
    padding: 5px 10px;
    font-size: 13px;
    border: 1px solid #ccc;
    border-radius: 4px;
    width: 170px;
    box-sizing: border-box;
}

/* Úprava tlačítka Hledat */
.horni-lista .menu-radek-1 .vyhledavani-v-menu button {
    padding: 5px 10px;
    background-color: #e31e24; 
    color: white;
    border: 1px solid #b31217;
    border-radius: 4px;
    cursor: pointer;
    font-weight: bold;
    font-size: 13px;
    white-space: nowrap;
    transition: background-color 0.15s ease;
}

.horni-lista .menu-radek-1 .vyhledavani-v-menu button:hover {
    background-color: #b31217;
}
/* ==========================================================================
   STYLY PRO FOTOGALERII A VYTVOŘENÉ SLOŽKY
   ========================================================================== */
.tabulka-galerii {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-top: 20px;
}

.galerie-radek {
    display: grid;
    grid-template-columns: 1fr auto;
    background: #fdfdfd;
    border: 1px solid #e0e0e0;
    border-left: 5px solid #cc0000;
    border-radius: 4px;
    text-decoration: none;
    color: #333;
    transition: all 0.2s ease-in-out;
    box-shadow: 0 1px 3px rgba(0,0,0,0.05);
}

.galerie-radek:hover {
    background: #fff;
    border-color: #cc0000;
    transform: translateX(4px);
    box-shadow: 0 4px 8px rgba(0,0,0,0.1);
}

.galerie-radek-hlavni {
    padding: 15px;
}

.galerie-radek-nazev {
    font-size: 18px;
    font-weight: bold;
    color: #cc0000;
    margin: 0 0 5px 0;
    display: flex;
    align-items: center;
    gap: 8px;
}

.galerie-radek-popis {
    font-size: 14px;
    color: #555;
    margin: 0;
    font-style: italic;
}

.galerie-radek-boční {
    background: #f4f4f4;
    padding: 15px 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-left: 1px solid #eee;
    font-size: 14px;
    font-weight: bold;
    color: #666;
    min-width: 100px;
    text-align: center;
}

.galerie-radek:hover .galerie-radek-boční {
    background: #cc0000;
    color: #fff;
}

.clanek-fotogalerie {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 15px;
    margin-top: 20px;
    margin-bottom: 30px;
}

.galerie-item {
    overflow: hidden;
    border: 1px solid #ddd;
    border-radius: 4px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
    background: #fff;
    transition: transform 0.2s, box-shadow 0.2s;
    aspect-ratio: 4 / 3;
}

.galerie-item:hover {
    transform: scale(1.03);
    box-shadow: 0 5px 15px rgba(0,0,0,0.2);
}

.galerie-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.galerie-pocet-fotek {
    font-size: 14px;
    font-weight: normal;
    color: #777;
    margin-left: 5px;
}

#lightbox {
    display: none;
    position: fixed;
    z-index: 99999;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(0, 0, 0, 0.95);
    align-items: center;
    justify-content: center;
}

/* Oprava odkazů a obrázků v článcích */
.obsah-clanku a, 
main a, 
article a {
    display: inline !important;
    width: auto !important;
    white-space: normal !important;
}

main img[style*="float: right"], 
.obsah-clanku img[style*="float: right"] {
    margin-left: 15px !important;
    margin-bottom: 10px !important;
}

main img[style*="float: left"], 
.obsah-clanku img[style*="float: left"] {
    margin-right: 15px !important;
    margin-bottom: 10px !important;
}

/* Universal Hasičské tabulky */
.sdh-table-container {
    width: 100%;
    max-width: 600px; 
    margin: 20px auto;
    font-family: Arial, sans-serif;
    clear: both;
}

.sdh-list-table {
    width: 100%;
    border-collapse: collapse;
    border: 1px solid #ccc;
    background-color: #ffffff;
    margin-bottom: 30px; 
}

.sdh-list-table thead .top-bar td {
    background-color: #d32f2f;
    color: white;
    font-weight: bold;
    text-align: center;
    padding: 12px;
    font-size: 16px;
    text-transform: uppercase;
}

.sdh-list-table thead .sub-bar td {
    background-color: #f2f2f2;
    font-weight: bold;
    text-align: center;
    padding: 8px;
    border-bottom: 2px solid #d32f2f;
    color: #333;
    font-size: 13px;
}

.sdh-list-table td {
    padding: 10px 12px;
    border: 1px solid #eee;
    font-size: 14px;
    vertical-align: middle;
}

.sdh-list-table tbody td:first-child {
    font-weight: bold;
    color: #444;
}

.sdh-list-table tbody td:last-child {
    font-style: italic;
    color: #555;
}

.sdh-list-table.numbered tbody tr {
    counter-increment: sdh-counter;
}

.sdh-list-table.numbered tbody td:first-child::before {
    content: counter(sdh-counter);
    color: #888;
    font-weight: bold;
}

.sdh-list-table.numbered tbody td:first-child {
    width: 30px;
    text-align: center;
    background-color: transparent;
}

.sdh-list-table.highlight-first tbody tr:first-child {
    background-color: #fff4f4;
    font-weight: bold;
}

.sdh-list-table tbody tr:nth-child(even) {
    background-color: #f9f9f9;
}

.sdh-list-table tbody tr:hover {
    background-color: #f0f4ff;
}

.sdh-table-footer {
    text-align: center;
    font-style: italic;
    font-size: 12px;
    color: #666;
    margin-top: -15px;
    margin-bottom: 20px;
}

/* Rozcestník fotogalerie */
.sdh-gallery-title {
    text-align: center;
    font-family: Arial, sans-serif;
    font-size: 28px;
    font-weight: bold;
    margin-bottom: 25px;
}

.sdh-gallery-row {
    text-align: center;
    margin-bottom: 15px;
}

.sdh-gallery-row a {
    display: inline-block !important;
    position: relative;
    width: 200px !important;  
    height: 112px !important; 
    margin: 10px !important;
    border-radius: 4px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
    background-size: 100% 100%; 
    background-repeat: no-repeat;
    background-position: center top;
    vertical-align: middle;
    overflow: hidden;
    transition: transform 0.2s ease;
}

.sdh-gallery-row a.gal-zasahy  { background-image: url('../images/fotogalerie/zas1.jpg'); }
.sdh-gallery-row a.gal-sport    { background-image: url('../images/fotogalerie/sport.jpg'); }
.sdh-gallery-row a.gal-mimozasahove    { background-image: url('../images/fotogalerie/mimozasahove.jpg'); }
.sdh-gallery-row a.gal-technika { background-image: url('../images/fotogalerie/technika.jpg'); }
.sdh-gallery-row a.gal-akce     { background-image: url('../images/fotogalerie/akce.jpg'); }
.sdh-gallery-row a.gal-ostatni  { background-image: url('../images/fotogalerie/ostatni.jpg'); }

.sdh-gallery-row a img {
    position: absolute;
    top: 0;
    left: 0;
    width: 200px !important;  
    height: 112px !important; 
    border: 0;
    transition: opacity 0.25s ease;
    opacity: 1;
    z-index: 2;
}

.sdh-gallery-row a:hover {
    transform: scale(1.04);
}

.sdh-gallery-row a:hover img {
    opacity: 0;
}

/* Reset seznamů */
.text-clanku ul, .obsah-clanku ul {
    list-style-type: disc !important;
    margin: 15px 0 15px 20px !important;
    padding-left: 20px !important;
    display: block !important;
    background: none !important; 
    border: none !important;     
}

.text-clanku ol, .obsah-clanku ol {
    list-style-type: decimal !important;
    margin: 15px 0 15px 20px !important;
    padding-left: 20px !important;
    display: block !important;
    background: none !important;
    border: none !important;
}

.text-clanku li, .obsah-clanku li {
    display: list-item !important;
    margin: 0 0 5px 0 !important;    
    padding: 0 !important;            
    background: transparent !important; 
    border: none !important;          
    float: none !important;
    width: auto !important;
    height: auto !important;
    min-height: 0 !important;
}

.sdh-gallery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 15px;
  max-width: 500px;
  margin: 0 auto;
}

.gal-card {
  position: relative;
  display: block;
  overflow: hidden;
  border-radius: 6px;
  text-decoration: none;
  aspect-ratio: 200 / 112;
}

.gal-card img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  filter: brightness(0.6);
  transition: filter 0.3s ease;
}

.gal-title {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #e50914;
  font-weight: bold;
  font-size: 1.2rem;
  text-align: center;
  padding: 10px;
  text-transform: uppercase;
  text-shadow: 
    -1px -1px 0 #fff,  
     1px -1px 0 #fff,
    -1px  1px 0 #fff,
     1px  1px 0 #fff,
     0px  2px 4px rgba(0, 0, 0, 0.8);
  transition: transform 0.3s ease;
  transform: scale(1);
}

.gal-card:hover .gal-title {
  transform: scale(1.25);
}

.gal-card:hover img {
  filter: brightness(0.8);
}
/* Úplné zrušení ohraničení u tabulek a buněk v článcích */
.obsah table, 
.text-clanku table, 
.obsah td, 
.obsah th, 
.text-clanku td, 
.text-clanku th {
    border: none !important;
}
/* ==========================================================================
   MOBILNÍ ZOBRAZENÍ (Displeje do 768px)
   ========================================================================== */
@media screen and (max-width: 768px) {
    /* Stránkování */
    .strankovani {
        gap: 3px !important;
        flex-wrap: wrap !important;
        margin: 20px 0 !important;
    }

    .strankovani a {
        padding: 5px 8px !important;
        font-size: 13px !important;
    }

    /* Mobilní tlačítka menu */
    button.mobilni-menu-tlacitko,
    button.levy-tlacitko,
    button.pravy-tlacitko {
        display: block !important;
        visibility: visible !important;
        opacity: 1 !important;
        width: 100% !important;
        padding: 12px 15px !important;
        border: none !important;
        font-size: 16px !important;
        font-weight: bold !important;
        cursor: pointer !important;
        border-radius: 4px !important;
        text-align: center !important;
        margin: 5px 0 10px 0 !important;
        box-sizing: border-box !important;
        font-family: inherit !important;
    }

    button.mobilni-menu-tlacitko { background-color: #e31e24 !important; color: #ffffff !important; }
    button.levy-tlacitko { background-color: #333333 !important; color: #ffffff !important; }
    button.pravy-tlacitko { background-color: #444444 !important; color: #ffffff !important; }

    .mobilni-menu-obsah { display: none !important; width: 100% !important; }
    .mobilni-menu-obsah.zobrazeno { display: block !important; }

    .horni-lista .menu-radek-1, 
    .horni-lista .menu-radek-2,
    .horni-lista div[style*="margin-left: auto"] {
        display: flex !important;
        flex-direction: column !important;
        width: 100% !important;
        margin-left: 0 !important;
        gap: 4px !important;
    }

    .horni-lista a {
        display: block !important;
        width: 100% !important;
        text-align: center !important;
        box-sizing: border-box !important;
    }

    /* Rozložení stránky pod sebou na mobilu */
    .hlavni-kontejner { width: 100% !important; margin: 0 !important; box-shadow: none !important; }
    .telo-stranky { display: flex !important; flex-direction: column !important; width: 100% !important; }

    .levy-panel { order: 1 !important; }
    .pravy-panel { order: 2 !important; }
    .obsah { order: 3 !important; }

    .levy-panel, .pravy-panel, .obsah {
        width: 100% !important;
        min-width: 100% !important;
        padding: 0 10px !important;
        box-sizing: border-box !important;
    }

    .mobilni-panel-obsah { display: none !important; }
    .mobilni-panel-obsah.zobrazeno { display: block !important; }

    /* Mobilní úprava tabulky článků a akčních tlačítek */
    .tabulka-clanku, 
    .tabulka-clanku thead, 
    .tabulka-clanku tbody, 
    .tabulka-clanku th, 
    .tabulka-clanku td, 
    .tabulka-clanku tr {
        display: block !important;
        width: 100% !important;
        box-sizing: border-box !important;
    }

    .tabulka-clanku thead { display: none !important; }

    .tabulka-clanku tbody tr {
        margin-bottom: 15px !important;
        border: 1px solid #ccc !important;
        border-left: 4px solid #007bff !important;
        background: #fff !important;
        border-radius: 4px !important;
        padding: 10px !important;
        box-shadow: 0 2px 4px rgba(0,0,0,0.05) !important;
    }

    .tabulka-clanku tbody tr.ke-smazani {
        border-left: 4px solid #dc3545 !important;
        background: #fff0f0 !important;
    }

    .tabulka-clanku td {
        border: none !important;
        padding: 4px 0 !important;
        text-align: left !important;
    }

    .tabulka-clanku td.col-id,
    .tabulka-clanku td.col-autor {
        display: none !important;
    }

    .tabulka-clanku td.col-akce {
        margin-top: 10px !important;
        padding-top: 8px !important;
        border-top: 1px dashed #eee !important;
        display: flex !important;
        flex-wrap: wrap !important;
        gap: 6px !important;
    }

    .btn-akce-edit, 
    .btn-akce-delete,
    .btn-akce-definitivne,
    .btn-akce-obnovit {
        padding: 8px 10px !important;
        border-radius: 4px !important;
        text-align: center !important;
        flex: 1 1 calc(50% - 6px) !important;
        box-sizing: border-box !important;
        font-size: 12px !important;
        margin: 0 !important;
    }
    
}
/* ==========================================================================
   ČISTÉ NASTAVENÍ MENU (PC ZOBRAZENÍ)
   ========================================================================== */
.pouze-mobil {
    display: none !important;
}

.uzivatel-vpravo {
    margin-left: auto;
    display: inline-flex;
    align-items: center;
    gap: 5px;
}

.badge-zpravy {
    background-color: #dc3545;
    color: white;
    border-radius: 10px;
    padding: 2px 7px;
    font-size: 11px;
    font-weight: bold;
    line-height: 1;
    border: 1px solid white;
    margin-left: 4px;
}

/* ==========================================================================
   MOBILNÍ ZOBRAZENÍ (DO 768px)
   ========================================================================== */
@media screen and (max-width: 768px) {
    .pouze-mobil {
        display: block !important;
    }

    .sekce-nadpis-mobil {
        font-size: 12px;
        font-weight: bold;
        color: #0056b3;
        text-transform: uppercase;
        margin: 12px 0 6px 0;
        text-align: center;
        letter-spacing: 0.5px;
        background: #e7f0ff;
        padding: 5px;
        border-radius: 3px;
        border: 1px solid #b8daff;
    }

    .horni-lista .menu-radek-2 {
        border-top: 2px solid #007bff;
        margin-top: 10px;
        padding-top: 5px;
    }

    /* Zobrazení tlačítka profilu a odhlášení na mobilu vedle sebe */
    .uzivatel-vpravo {
        display: flex !important;
        width: 100% !important;
        margin-left: 0 !important;
        gap: 5px !important;
        margin-top: 6px;
    }

    .uzivatel-vpravo a {
        flex: 1 !important;
        text-align: center !important;
    }

    .mobilni-vyhledavani-container {
        padding: 8px 0;
        margin-top: 5px;
    }

    .vyhledavani-v-menu {
        display: flex !important;
        width: 100% !important;
        gap: 5px;
    }

    .vyhledavani-v-menu input[type="text"] {
        flex: 1;
        padding: 8px;
        border: 1px solid #ccc;
        border-radius: 4px;
    }

    .vyhledavani-v-menu button {
        padding: 8px 12px;
        background: #b30000;
        color: white;
        border: none;
        border-radius: 4px;
        font-weight: bold;
    }
}
/* Zarovnání vyhledávání doprava pro všechny obrazovky */
.mobilni-vyhledavani-container {
    display: flex;
    justify-content: flex-end;
    width: 100%;
    margin-top: 5px;
}

.vyhledavani-v-menu {
    display: inline-flex;
    gap: 5px;
}
/* Odtlačení bloku s profilem/přihlášením na úplný pravý okraj prvního řádku */
.menu-radek-1 .uzivatel-vpravo {
    margin-left: auto !important;
    display: inline-flex !important;
    align-items: center !important;
    gap: 6px !important;
}
/* Styl pro tlačítko/ikonku stažení originálu */
.tlacitko-stahnout-original {
    position: absolute;
    top: 8px;
    right: 8px;
    background: rgba(0, 0, 0, 0.6);
    color: white;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    font-size: 14px;
    z-index: 10;
    transition: background 0.2s, transform 0.2s;
    box-shadow: 0 2px 5px rgba(0,0,0,0.3);
}

.tlacitko-stahnout-original:hover {
    background: rgba(0, 123, 255, 0.9); /* Po najetí modrá barva */
    transform: scale(1.1);
}

/* Alternativa: Pokud chcete, aby byla ikonka skrytá a objevila se jen při najetí myší na fotku,
   odkomentujte následující dva řádky: */
/*
.galerie-item .tlacitko-stahnout-original { opacity: 0; transition: opacity 0.2s, background 0.2s; }
.galerie-item:hover .tlacitko-stahnout-original { opacity: 1; }
*/
/* Na mobilech (do 768px) vrátíme chování pod sebe, aby se to nerozbilo */
@media screen and (max-width: 768px) {
    .menu-radek-1 .uzivatel-vpravo {
        display: flex !important;
        width: 100% !important;
        margin-left: 0 !important;
        gap: 5px !important;
        margin-top: 4px;
    }

    .menu-radek-1 .uzivatel-vpravo a {
        flex: 1 !important;
        text-align: center !important;
    }
}