/* 
   Design System pro KTK Software
   Barvy: ModrĂˇ #0E3B79, OranĹľovĂˇ #F7A920
*/

:root {
    --primarni: #0E3B79;
    --sekundarni: #F7A920;
    --sekundarni-hover: #e0961a;
    --text: #333333;
    --text-svetly: #666666;
    --pozadi: #ffffff;
    --pozadi-sekce: #f8fafc;
    --bila: #ffffff;
    --stin: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    --prechod: all 0.3s ease;
}

/* Grid System */
.grid { display: grid; gap: 30px; }
.grid-2 { grid-template-columns: repeat(2, 1fr); }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
@media (max-width: 991px) { .grid-3 { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 768px) { .grid-2, .grid-3 { grid-template-columns: 1fr; } }

/* Reference Detail Redesign */
.ref-header { margin-bottom: 50px; }
.ref-citation { 
    font-size: 1.4rem; 
    font-style: italic; 
    color: var(--primarni); 
    border-left: 4px solid var(--sekundarni); 
    padding-left: 30px; 
    margin: 30px 0; 
    line-height: 1.5;
}
.ref-info-grid { margin-bottom: 60px; }
.ref-info-card {
    background: var(--pozadi-sekce);
    padding: 35px;
    border-radius: 12px;
    border: 1px solid #e2e8f0;
    height: 100%;
}
.ref-info-label {
    text-transform: uppercase;
    font-size: 0.75rem;
    letter-spacing: 1px;
    color: #64748b;
    margin-bottom: 8px;
    font-weight: 700;
}
.ref-info-value {
    font-weight: 700;
    color: var(--primarni);
    font-size: 1.1rem;
    margin-bottom: 25px;
}
.ref-info-value:last-child { margin-bottom: 0; }

.ref-module-tags { display: flex; flex-wrap: wrap; gap: 8px; }
.ref-module-tag {
    font-size: 0.85rem;
    font-weight: 600;
    padding: 6px 14px;
    border-radius: 50px;
    background: #e2e8f0;
    color: var(--primarni);
    text-decoration: none;
    transition: var(--prechod);
}
.ref-module-tag:hover { background: var(--primarni); color: #fff; }



.clanek-obsah ul li, .modul-extra-obsah ul li, .texty ul li {
    margin-bottom: 10px;
}

/* Odkazy v textovém obsahu - pouze v odstavcích, seznamech apod. aby se nerozbila mapa/gridy */
.clanek-obsah p a, .clanek-obsah li a, .modul-extra-obsah p a, .modul-extra-obsah li a, .hlavni-obsah-stranky p a, .hlavni-obsah-stranky li a, .texty p a, .texty li a {
    color: #0056b3; /* Klasická modrá pro odkazy */
    text-decoration: underline;
    transition: all 0.2s;
}

.clanek-obsah p a:hover, .clanek-obsah li a:hover, .modul-extra-obsah p a:hover, .modul-extra-obsah li a:hover, .hlavni-obsah-stranky p a:hover, .hlavni-obsah-stranky li a:hover, .texty p a:hover, .texty li a:hover {
    color: var(--sekundarni);
    text-decoration: none;
}

.modul-seznam {
    line-height: 1.6;
}
.modul-seznam ul, 
.modul-seznam ul li {
    list-style: none !important;
    list-style-type: none !important;
    margin-left: 0 !important;
    padding-left: 0 !important;
}
.modul-seznam ul li {
    margin-bottom: 12px;
    position: relative;
    padding-left: 25px !important;
    line-height: 1.5;
}
.modul-nabizi-seznam ul li::before {
    content: "➤";
    position: absolute;
    left: 0;
    color: var(--primarni); /* Modrá */
    font-weight: bold;
}
.modul-prinese-seznam ul li::before {
    content: "★";
    position: absolute;
    left: 0;
    color: var(--sekundarni); /* Oranžová */
    font-weight: bold;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html,
body {
    overflow-x: hidden;
    width: 100%;
    position: relative;
    max-width: 100%;
    margin: 0;
    padding: 0;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    color: var(--text);
    line-height: 1.6;
    background-color: var(--pozadi);
}

body.noscroll {
    overflow: hidden !important;
}

main {
    padding-bottom: 200px;
}

h1,
h2,
h3,
h4 {
    color: var(--primarni);
    font-weight: 700;
    line-height: 1.2;
    margin-bottom: 1.5rem;
}

h1 {
    font-size: 3.5rem;
    margin-bottom: 2.5rem;
}

h2 {
    font-size: 2.2rem;
    margin-bottom: 2rem;
}

.highlight {
    color: var(--sekundarni);
    font-style: italic;
    font-family: inherit; /* Keeping Inter for now, but could be a serif font if loaded */
}

a {
    text-decoration: none;
    color: inherit;
    transition: var(--prechod);
}

ul {
    list-style: none;
}

img {
    max-width: 100%;
    margin-bottom: 30px;
    height: auto;
}

/* DrobeÄŤkovĂˇ navigace */
.drobecky {
    font-size: 0.9rem;
    color: #888;
    margin-bottom: 20px;
    padding-top: 20px;
}

.drobecky a {
    color: #888;
    text-decoration: none;
    border-bottom: 1px dotted #ccc;
    transition: var(--prechod);
}

.drobecky a:hover {
    color: var(--primarni);
    border-bottom-color: var(--primarni);
}

/* PomocnĂ© tĹ™Ă­dy */
.kontejner {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

.sekce {
    padding: 50px 0 100px 0;
}

.sekce-svetla {
    background-color: var(--pozadi-sekce);
}

.stred {
    text-align: center;
}

.flex {
    display: flex;
    gap: 20px;
}

.grid {
    display: grid;
    gap: 30px;
}

.grid-2 {
    grid-template-columns: repeat(2, 1fr);
}

.grid-3 {
    grid-template-columns: repeat(3, 1fr);
}

.grid-4 {
    grid-template-columns: repeat(4, 1fr);
}

@media (max-width: 992px) {

    .grid-3,
    .grid-4 {
        grid-template-columns: repeat(2, 1fr);
    }

    .grid-produkty-main {
        grid-template-columns: 1fr !important;
    }

    .mega-product-card-main,
    .flagship-premium {
        grid-row: auto !important;
    }

    .sekce {
        padding: 40px 0 80px 0;
    }
}

@media (max-width: 768px) {

    .grid-2,
    .grid-3,
    .grid-4 {
        grid-template-columns: 1fr;
    }

    .sekce {
        padding: 30px 0 60px 0;
    }

    .kontejner {
        padding: 0 15px;
    }

    .grid,
    [class*="grid-"] {
        gap: 20px !important;
    }

    .header-flex {
        display: flex;
        justify-content: space-between;
        align-items: center;
    }

    .logo img {
        height: 50px;
    }
}

/* TlaÄŤĂ­tka */
.tlacitko {
    display: inline-block;
    padding: 12px 30px;
    border-radius: 4px;
    font-weight: 600;
    text-transform: uppercase;
    font-size: 0.9rem;
    cursor: pointer;
    border: none;
    transition: var(--prechod);
}

.tlacitko-primarni {
    background-color: var(--primarni);
    color: var(--bila);
}

.tlacitko-primarni:hover {
    background-color: #082a56;
}

.tlacitko-sekundarni {
    background-color: var(--sekundarni);
    color: var(--bila);
}

.tlacitko-sekundarni:hover {
    background-color: var(--sekundarni-hover);
}

/* Speciální styly pro tlačítka vkládaná přes editor */
.btn-editor-orange, 
.btn-editor-orange-dark, 
.btn-editor-blue, 
.btn-editor-gray {
    display: inline-block !important;
    padding: 10px 25px !important;
    border-radius: 4px !important;
    font-weight: 600 !important;
    text-transform: uppercase !important;
    font-size: 0.9rem !important;
    text-decoration: none !important;
    transition: all 0.3s ease !important;
    margin: 10px 0 !important;
    border: none !important;
    text-align: center !important;
}

.btn-editor-orange {
    background-color: #F7A920 !important;
    color: #fff !important;
}
.btn-editor-orange:hover { background-color: #e0961a !important; transform: translateY(-2px) !important; box-shadow: 0 4px 12px rgba(247, 169, 32, 0.3) !important; }

.btn-editor-orange-dark {
    background-color: #F7A920 !important;
    color: #333 !important;
}
.btn-editor-orange-dark:hover { background-color: #e0961a !important; transform: translateY(-2px) !important; box-shadow: 0 4px 12px rgba(247, 169, 32, 0.3) !important; }

.btn-editor-blue {
    background-color: #0E3B79 !important;
    color: #fff !important;
}
.btn-editor-blue:hover { background-color: #082a56 !important; transform: translateY(-2px) !important; box-shadow: 0 4px 12px rgba(14, 59, 121, 0.3) !important; }

.btn-editor-gray {
    background-color: #f1f5f9 !important;
    color: #475569 !important;
    border: 1px solid #e2e8f0 !important;
}
.btn-editor-gray:hover { background-color: #e2e8f0 !important; transform: translateY(-2px) !important; }

/* HlaviÄŤka */
header {
    background: var(--bila);
    padding: 8px 0;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
    position: sticky;
    top: 0;
    z-index: 2000;
    /* ZvĂ˝Ĺˇeno pro jistotu */
}

.header-flex {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo a {
    display: flex;
    align-items: center;
}

.logo img {
    height: 55px;
    width: auto;
    display: block;
    margin-bottom: 0;
}

nav ul {
    display: flex;
    gap: 20px;
    align-items: center;
}

nav a {
    font-weight: 600;
    color: var(--primarni);
    font-size: 1rem;
    position: relative;
    padding-bottom: 3px;
    display: inline-flex;
    align-items: center;
}

nav a:hover {
    color: var(--sekundarni);
}

.search-menu-item a {
    color: var(--primarni);
    padding: 5px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 4px;
    transition: var(--prechod);
}

.search-menu-item a:hover {
    background: rgba(247, 169, 32, 0.1);
    color: var(--sekundarni);
}

.search-text-mobile {
    display: none;
}

@media (max-width: 992px) {
    .search-text-mobile {
        display: inline;
        margin-left: 10px;
    }
}

.mega-overlay {
    display: none;
}

/* Mega Menu Desktop */
@media (min-width: 993px) {
    nav ul li {
        position: static;
        /* Required for full-width absolute mega menu */
    }

    .has-mega-menu>a {
        display: flex;
        align-items: center;
        gap: 5px;
    }

    .has-mega-menu:hover>a {
        color: var(--sekundarni);
    }

    .has-mega-menu>a::after {
        content: 'ˇ';
        font-size: 1.2rem;
        line-height: 0;
        margin-top: 5px;
        font-weight: 700;
        transition: transform 0.3s ease;
    }

    .has-mega-menu:hover>a::after {
        transform: rotate(180deg);
        color: var(--sekundarni);
    }

    .mega-overlay {
        display: block;
        position: absolute;
        top: 100%;
        left: 0;
        width: 100%;
        background: #ffffff;
        box-shadow: 0 50px 30px rgba(0, 0, 0, 0.2);
        opacity: 0;
        visibility: hidden;
        transform: translateY(10px);
        transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
        padding: 3vh 0;
        border-top: 1px solid #f0f0f0;
        max-height: 75vh;
        overflow-y: auto;
    }

    .has-mega-menu:hover .mega-overlay {
        opacity: 1;
        visibility: visible;
        transform: translateY(0);
    }

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

    .mega-item {
        display: block;
        text-decoration: none;
        color: inherit;
        transition: var(--prechod);
    }



    .mega-item img {
        width: 100%;
        height: 120px;
        object-fit: contain;
        background: #fcfdfe;
        border-radius: 8px;
        margin-bottom: 15px;
        box-shadow: 0 4px 10px rgba(0, 0, 0, 0.05);
    }

    .mega-item h3 {
        font-size: 1.1rem;
        margin-bottom: 5px;
        color: var(--primarni);
    }

    .mega-item p {
        font-size: 0.85rem;
        color: var(--text-svetly);
        line-height: 1.4;
    }

    /* SpecifickĂ© pro moduly - 5 sloupcĹŻ moĹľnĂˇ? */
    .mega-grid-5 {
        grid-template-columns: repeat(5, 1fr);
    }

    .mega-grid-2 {
        grid-template-columns: repeat(2, 1fr);
    }

    .mega-column {
        display: flex !important;
        flex-direction: column !important;
        align-items: stretch !important; /* Vynutit roztažení do šířky */
    }

    .mega-column-image {
        margin-top: auto;
        padding-top: 15px;
        width: 100% !important;
        display: block !important;
        flex-shrink: 0 !important;
    }

    .mega-column-image a {
        display: block;
        width: 100%;
        aspect-ratio: 16 / 9;
        overflow: hidden;
        border-radius: 4px;
    }

    .mega-column-image img {
        width: 100% !important;
        height: 100% !important;
        object-fit: cover !important;
        object-position: center !important;
        filter: grayscale(0.1);
        transition: var(--prechod);
        display: block !important;
        margin-bottom: 0 !important;
    }

    .mega-column-image img:hover {
        filter: grayscale(0);
        transform: scale(1.02);
    }

    /* Karta v referencích hover efekt */
    .karta:hover img {
        filter: grayscale(0) !important;
        transform: scale(1.05);
    }

    .mega-column h4 {
        font-size: 0.9rem;
        text-transform: uppercase;
        letter-spacing: 1px;
        color: var(--sekundarni);
        margin-bottom: 15px;
        border-bottom: 1px solid #f0f0f0;
        padding-bottom: 5px;
        transition: border-color 0.3s ease;
    }

    /* Nadpisy, které jsou zároveň odkazy */
    .mega-column a h4,
    .mega-column h4:has(a) {
        border-bottom-color: var(--sekundarni) !important;
    }

    .mega-column a h4::after,
    .mega-column h4:has(a) h4::after, /* Fallback if nested */
    .mega-column h4 a::after {
        content: " →";
        display: inline-block;
        margin-left: 5px;
        transition: transform 0.3s ease;
    }

    /* Pro h4:has(a) musíme šipku přidat buď přímo k h4 nebo k a */
    .mega-column h4:has(a)::after {
        content: " →";
        display: inline-block;
        margin-left: 5px;
    }

    /* Zamezení duplicitní šipky u h4 a */
    .mega-column h4:has(a) a::after {
        content: none !important;
    }

    .mega-column a:hover h4 {
        border-bottom-color: var(--primarni) !important;
        color: var(--primarni) !important;
    }
    
    .mega-column a:hover h4::after,
    .mega-column h4:has(a):hover::after {
        transform: translateX(3px);
    }

    .mega-column ul li {
        margin-bottom: 8px;
    }

    .mega-column ul li a {
        font-size: 0.85rem;
        font-weight: 500;
        color: var(--text);
    }

    .mega-column ul li a:hover {
        color: var(--primarni);
    }

    /* VertikĂˇlnĂ­ oddÄ›lovaÄŤe pro sloupovĂ© menu */
    .mega-column-border {
        border-right: 1px solid #f0f0f0;
    }
    
    .mega-column-border > *:not(.mega-column-image) {
        padding-right: 20px;
    }

    .mega-column-border:last-child {
        border-right: none;
    }

    .mega-list {
        list-style: disc !important;
        padding-left: 20px !important;
        margin-top: 15px;
        display: block !important;
    }

    .mega-list li {
        margin-bottom: 8px;
        color: var(--sekundarni);
        display: list-item !important;
        /* Ensure vertical stacking */
        width: 100%;
        transition: color var(--prechod);
    }

    .mega-list li:hover {
        color: var(--primarni);
    }

    .mega-list li a {
        font-size: 0.95rem;
        font-weight: 500;
        color: var(--text);
        display: inline-block;
    }

    .mega-list li.no-bullet {
        list-style: none !important;
        margin-left: -20px;
    }

    /* Matice 2x2 pro Produkty */
    .mega-grid-products {
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 20px 30px;
    }

    .mega-product-card {
        background: #ffffff;
        padding: 2vh;
        border-radius: 12px;
        border: 1px solid #dcdcdc;
        display: flex;
        flex-direction: column;
        transition: all 0.3s ease;
    }

    .mega-product-card-main {
        grid-row: span 2;
        justify-content: center;
    }

    .mega-product-card:hover {
        border-color: var(--primarni);
        background: #fcfdfe;
        box-shadow: 0 10px 20px rgba(14, 59, 121, 0.05);
    }

    .mega-product-card h3 {
        font-size: clamp(1.4rem, 2.5vh, 2.2rem);
        margin-bottom: 0.5vh;
        color: var(--primarni);
        line-height: 1.1;
    }

    .mega-overlay p {
        font-weight: 400 !important;
        margin-bottom: 1vh;
    }

    .mega-product-card p {
        font-size: clamp(0.85rem, 1.4vh, 1rem);
        color: var(--text-svetly);
        max-width: 500px;
    }

    .mega-product-card img {
        width: 100%;
        height: clamp(100px, 15vh, 180px);
        object-fit: contain;
        background: #ffffff;
        border: none;
        border-radius: 8px;
        margin-bottom: 0;
    }

    /* Small version for QMS and SmartDocs */
    .mega-product-card-small h3 {
        font-size: clamp(1.1rem, 1.8vh, 1.3rem);
    }

    .mega-product-card-small p {
        font-size: clamp(0.75rem, 1.3vh, 0.85rem);
    }

    .mega-product-card-small img {
        height: clamp(80px, 12vh, 120px);
        max-width: 80%;
    }

    /* Kompaktní režim pro menší monitory / notebooky */
    @media (max-height: 850px) {
        .mega-overlay {
            padding: 2vh 0;
        }

        .mega-grid,
        .mega-grid-products,
        .grid-produkty-main {
            gap: 15px 30px;
        }

        .grid-produkty-main {
            grid-template-columns: 1fr !important;
        }

        .mega-column h4 {
            margin-bottom: 8px;
            padding-bottom: 3px;
        }

        .mega-list {
            margin-top: 5px;
        }

        .mega-list li {
            margin-bottom: 4px;
        }

        .mega-list li a {
            font-size: 0.85rem;
        }

        .mega-column-image {
            /* display: none; */ /* Ponecháme viditelné na přání uživatele */
            padding-top: 10px;
        }
    }

    /* Bottom row in Moduly and Služby */
    .mega-bottom-row {
        display: grid;
        grid-template-columns: repeat(4, 1fr);
        gap: 20px;
        margin-top: 30px;
        border-top: 1px solid #f0f0f0;
        padding-top: 20px;
        align-items: start;
        /* HornĂ­ hrana v jednĂ© rovinÄ› */
    }

    .mega-bottom-row img {
        width: 100%;
        height: auto;
        /* ZobrazenĂ­ celĂ©ho obrĂˇzku */
        max-height: 100px;
        object-fit: contain;
        border-radius: 4px;
        filter: grayscale(0.1);
        transition: var(--prechod);
    }

    .mega-bottom-row img:hover {
        filter: grayscale(0);
        transform: scale(1.02);
    }
}

.poptavka-link {
    background-color: var(--sekundarni);
    color: var(--bila) !important;
    padding: 7px 15px;
    border-radius: 4px;
    font-weight: 700;
}

.poptavka-link:hover {
    background-color: var(--sekundarni-hover);
    color: var(--bila) !important;
}

/* Hero sekce */
.hero {
    padding: 100px 0;
    background: linear-gradient(135deg, #f0f4f8 0%, #ffffff 100%);
    position: relative;
    overflow: hidden;
}

.perex, .modul-extra-obsah {
    font-size: 1.15rem;
    line-height: 1.6;
    color: var(--text);
    margin-bottom: 30px;
}

.noscroll {
    overflow: hidden !important;
}

.hero h1 {
    font-size: 4rem;
    margin-bottom: 30px;
}

@media (max-width: 768px) {
    .hero h1 {
        font-size: 2.2rem;
    }
}

/* Karty */
.karta {
    background: var(--bila);
    padding: 30px;
    border-radius: 8px;
    box-shadow: var(--stin);
    transition: var(--prechod);
    border-bottom: 4px solid transparent;
}

.karta:hover {
    border-bottom-color: var(--sekundarni);
}

.ikona-sekce {
    font-size: 2.5rem;
    color: var(--sekundarni);
    margin-bottom: 20px;
}

/* PatiÄŤka */
footer {
    background: var(--primarni);
    color: var(--bila);
    padding: 60px 0 20px 0;
}

footer h3 {
    color: var(--sekundarni);
    margin-bottom: 20px;
}

.footer-grid {
    display: grid;
    grid-template-columns: 1.5fr 1.2fr 1fr 1fr 1.2fr;
    gap: 30px;
}

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

@media (max-width: 992px) {
    .footer-grid {
        grid-template-columns: 1fr 1fr;
    }
}

@media (max-width: 768px) {
    .footer-grid {
        grid-template-columns: 1fr;
    }
}

.footer-bottom-nav {
    text-align: center;
    margin-top: 40px;
    padding-top: 20px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    font-size: 0.9rem;
}

.footer-bottom-nav a {
    color: var(--bila);
    opacity: 0.8;
    margin: 0 5px;
}

.footer-bottom-nav a:hover {
    opacity: 1;
    color: var(--sekundarni);
}

.footer-bottom-nav .poptavka-link-small {
    color: var(--sekundarni) !important;
    font-weight: 700;
    opacity: 1;
}

.footer-bottom-nav .gdpr-link {
    font-size: 0.75rem;
    opacity: 0.5;
}

.footer-info p {
    font-size: 0.95rem;
    opacity: 0.8;
    margin: 10px 0;
}

.footer-info a:hover {
    color: var(--sekundarni);
    text-decoration: underline;
}

.footer-nav ul li {
    margin-bottom: 8px;
}

.footer-nav a {
    font-size: 0.9rem;
    opacity: 0.8;
}

.footer-nav a:hover {
    opacity: 1;
    color: var(--sekundarni);
}

.copyright {
    margin-top: 50px;
    padding-top: 25px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    text-align: center;
    font-size: 0.85rem;
    opacity: 0.6;
}

/* FormulĂˇĹ™e */
.form-skupina {
    margin-bottom: 15px;
}

.form-skupina label {
    display: block;
    margin-bottom: 5px;
    font-weight: 600;
}

.form-input {
    width: 100%;
    padding: 12px;
    border: 1px solid #ddd;
    border-radius: 4px;
}

.password-toggle-container {
    position: relative;
    display: flex;
    align-items: center;
}

.password-toggle-icon {
    position: absolute;
    right: 12px;
    cursor: pointer;
    color: var(--text-svetly);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--prechod);
    background: none;
    border: none;
    padding: 0;
    z-index: 5;
}

.password-toggle-icon:hover {
    color: var(--primarni);
}

.password-toggle-icon svg {
    width: 20px;
    height: 20px;
}

/* Newsletter v patiÄŤce */
.newsletter-form {
    display: flex;
    gap: 10px;
}

.newsletter-form input {
    flex: 1;
}

/* Login sekce - modrĂ˝ pruh */
.login-lista {
    background: #012454;
    color: #ffffff;
    padding: 8px 0;
    font-size: 0.85rem;
}

.login-flex {
    display: flex;
    justify-content: flex-end;
    gap: 30px;
    align-items: center;
}

.login-flex a {
    color: var(--sekundarni);
    font-weight: 700;
    text-transform: uppercase;
}

.login-flex a:hover {
    color: #ffffff;
}

/* Carousel vylepĹˇenĂ­ */
.carousel {
    position: relative;
    width: 100%;
    margin-bottom: 30px;
    overflow: hidden;
    border-radius: 8px;
    box-shadow: var(--stin);
}

.carousel-inner {
    display: flex;
    transition: transform 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

.carousel-item {
    min-width: 100%;
    flex: 0 0 100%;
}

.carousel-item img {
    width: 100%;
    height: auto;
    display: block;
    object-fit: cover;
}

@media (max-width: 768px) {
    .carousel-item img {
        height: auto;
        object-fit: contain;
    }
}

/* OvlĂˇdacĂ­ prvky */
.carousel-control {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(0, 0, 0, 0.3);
    color: white;
    border: none;
    padding: 10px;
    cursor: pointer;
    font-size: 18px;
    transition: var(--prechod);
    z-index: 10;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.carousel-control:hover {
    background: var(--sekundarni);
}

.carousel-control.prev {
    left: 10px;
}

.carousel-control.next {
    right: 10px;
}

.carousel-dots {
    position: absolute;
    bottom: 10px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 8px;
    z-index: 10;
}

.dot {
    width: 10px;
    height: 10px;
    background: rgba(255, 255, 255, 0.5);
    border-radius: 50%;
    cursor: pointer;
    transition: var(--prechod);
}

.dot.active {
    background: var(--sekundarni);
    transform: scale(1.1);
}

/* Hamburger & MobilnĂ­ Menu */
.hamburger {
    display: none;
    align-items: center;
    gap: 8px;
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 0;
    z-index: 10000;
}

/* ResponzivnĂ­ aktuality */
.aktualita-karta {
    display: grid;
    grid-template-columns: 180px 1fr;
    gap: 30px;
    align-items: start;
}

@media (max-width: 768px) {
    .aktualita-karta {
        grid-template-columns: 1fr;
        gap: 15px;
    }

    .aktualita-karta .datum-box {
        border-right: none !important;
        border-bottom: 2px solid #eee;
        padding-right: 0 !important;
        padding-bottom: 8px;
        width: 100%;
        font-size: 1rem !important;
    }
}

.grid-1 {
    grid-template-columns: 1fr;
}

.hamburger-text {
    font-weight: 700;
    font-size: 0.75rem;
    color: var(--primarni);
    text-transform: uppercase;
}

.hamburger-icon {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    width: 24px;
    height: 18px;
}

.hamburger-icon span {
    width: 100%;
    height: 3px;
    background: var(--primarni);
    border-radius: 10px;
    transition: none;
}

.poptavka-mobil {
    display: none;
    background: var(--sekundarni);
    color: white !important;
    padding: 8px 12px;
    border-radius: 4px;
    font-weight: 700;
    font-size: 0.85rem;
    text-decoration: none;
    white-space: nowrap;
}

@media (max-width: 992px) {
    header {
        padding: 12px 0;
    }

    .header-flex {
        display: flex !important;
        justify-content: space-between !important;
        align-items: center !important;
        width: 100% !important;
        height: auto !important;
        padding: 0 15px !important;
    }

    .logo {
        flex: 0 0 auto;
        display: flex;
        align-items: center;
        height: 40px;
    }

    .logo img {
        height: 28px !important;
        width: auto !important;
        aspect-ratio: auto;
        object-fit: contain;
        margin-bottom: 0 !important;
        display: block;
    }

    .poptavka-mobil {
        flex: 0 0 auto;
        display: flex !important;
        justify-content: center;
        align-items: center;
        height: 34px;
        background: var(--sekundarni);
        color: white !important;
        padding: 0 10px;
        border-radius: 4px;
        font-weight: 700;
        font-size: 0.75rem;
        line-height: 1;
        text-transform: uppercase;
    }

    .hamburger {
        flex: 0 0 30%;
        /* FixnĂ­ ĹˇĂ­Ĺ™ka pro menu vpravo */
        display: flex !important;
        justify-content: flex-end;
        align-items: center;
        height: 40px !important;
        background: transparent !important;
        border: none !important;
    }

    /* VnitĹ™nĂ­ obal pro hit-arey */
    .hamburger-icon,
    .hamburger-text {
        pointer-events: none;
        /* Kliky propadnou na tlaÄŤĂ­tko */
    }

    .prihlaseni-text {
        display: none;
    }

    #hlavni-navigace {
        position: fixed;
        top: 92px;
        /* Pod vĂ˝Ĺˇku hlaviÄŤky (blue bar + white header) */
        right: 0;
        width: 75%;
        max-height: calc(100vh - 92px);
        background: #ffffff;
        transform: translateX(100%);
        transition: none;
        z-index: 2500;
        padding: 20px;
        display: block !important;
        visibility: hidden;
        overflow-y: auto;
        border-bottom-left-radius: 15px;
        box-shadow: -5px 5px 20px rgba(0, 0, 0, 0.1);
    }

    #hlavni-navigace.active {
        transform: translateX(0);
        visibility: visible;
    }

    #hlavni-navigace ul {
        flex-direction: column;
        align-items: flex-start;
        gap: 5px;
        display: flex !important;
    }

    #hlavni-navigace ul li {
        width: 100%;
        text-align: left;
    }

    #hlavni-navigace ul li a {
        font-size: 0.95rem;
        display: block;
        padding: 10px 0;
        border-bottom: 1px solid #f5f5f5;
        width: 100%;
        font-weight: 500;
    }

    /* V mobilnĂ­m menu schovĂˇme duplicitnĂ­ tlaÄŤĂ­tko poptĂˇvky */
    #hlavni-navigace ul li a.poptavka-link {
        display: none !important;
    }

    /* Animace Hamburgeru */
    .hamburger.open .hamburger-icon span:nth-child(1) {
        transform: translateY(7.5px) rotate(45deg);
    }

    .hamburger.open .hamburger-icon span:nth-child(2) {
        opacity: 0;
    }

    .hamburger.open .hamburger-icon span:nth-child(3) {
        transform: translateY(-7.5px) rotate(-45deg);
    }

    /* Redukce pĂ­sma na mobilu */
    h1 {
        font-size: 20px !important;
    }

    h2 {
        font-size: 1.6rem !important;
    }

    h3 {
        font-size: 1.3rem !important;
    }

    .hero-obsah p {
        font-size: 1rem !important;
    }

    .kpi-grid {
        grid-template-columns: 1fr !important;
    }
}

@media (max-width: 480px) {
    .header-flex {
        display: grid !important;
        grid-template-columns: 1fr 1.1fr 1fr !important;
        align-items: center;
    }

    .logo img {
        height: 25px !important;
    }

    .poptavka-mobil {
        padding: 8px 10px;
        font-size: 0.75rem;
        height: 35px;
    }

    .hamburger-text {
        font-size: 0.65rem;
    }

    .hamburger-icon {
        width: 20px;
        height: 14px;
    }

    h1 {
        font-size: 1.7rem !important;
    }
}

/* KPI Boxy */
.kpi-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
    margin: 40px 0;
}

.kpi-box {
    background: var(--bila);
    padding: 30px 20px;
    text-align: center;
    border-radius: 10px;
    box-shadow: var(--stin);
    border: 1px solid #edf2f7;
    transition: var(--prechod);
    display: block;
}

.kpi-box:hover {
    border-color: var(--sekundarni);
    background: #fffcf5;
}

.kpi-box .cislo {
    display: block;
    font-size: 2.5rem;
    font-weight: 800;
    color: var(--primarni);
    margin-bottom: 5px;
}

.kpi-box .label {
    display: block;
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--text-svetly);
    text-transform: uppercase;
    letter-spacing: 1px;
}

.kpi-box .ikona-kpi {
    font-size: 2rem;
    color: var(--sekundarni);
    margin-bottom: 15px;
    display: block;
}

/* Partneri grid */
.partneri-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 30px;
    margin-top: 40px;
}

.partneri-polozka {
    background: white;
    padding: 30px;
    border-radius: 8px;
    box-shadow: var(--stin);
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
}

.partneri-polozka img {
    height: 60px;
    width: auto;
    object-fit: contain;
    margin-bottom: 20px;
}

/* SluĹľby jako dlaĹľdice */
.seznam-sluzeb li {
    margin-bottom: 12px;
}

.seznam-sluzeb li a {
    display: block;
    background: #f8f9fa;
    padding: 15px;
    border-radius: 8px;
    text-decoration: none;
    color: var(--text);
    transition: var(--prechod);
    border-left: 4px solid transparent;
    font-size: 0.95rem;
    line-height: 1.5;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

.seznam-sluzeb li a:hover {
    background: #ffffff;
    box-shadow: var(--stin);
    border-left-color: var(--sekundarni);
}

.seznam-sluzeb li a strong {
    display: block;
    color: var(--primarni);
    font-size: 1rem;
    margin-bottom: 4px;
    font-weight: 700;
}

/* Galerie modulĹŻ */
.galerie-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 20px;
    margin-top: 30px;
    margin-bottom: 40px;
}

.galerie-item {
    position: relative;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: var(--stin);
    aspect-ratio: 16/9;
    cursor: pointer;
    transition: var(--prechod);
    background: #eee;
}

.galerie-item:hover {
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.15);
}

.galerie-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    margin-bottom: 0 !important;
    display: block;
}

/* Lightbox pro zvÄ›tĹˇenĂ­ obrĂˇzkĹŻ */
.lightbox {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.95);
    z-index: 9999;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.lightbox.active {
    display: flex;
}

.lightbox img {
    max-width: 90%;
    max-height: 90vh;
    border-radius: 4px;
    box-shadow: 0 0 50px rgba(0, 0, 0, 0.5);
    margin-bottom: 0;
}

.lightbox-close {
    position: absolute;
    top: 20px;
    right: 30px;
    color: white;
    font-size: 40px;
    cursor: pointer;
    font-weight: bold;
    z-index: 10000;
}

/* Lightbox bez textu (např. galerie nebo lidé bez detailu) */
.lightbox:not(.with-text) .lightbox-container {
    background: transparent;
    box-shadow: none;
    max-width: none;
    width: auto;
    max-height: none;
}

.lightbox:not(.with-text) .lightbox-image-side {
    background: transparent;
    flex: 0 0 auto;
    padding: 0;
}

.lightbox:not(.with-text) .lightbox-image-side img {
    max-width: 95vw;
    max-height: 90vh;
    width: auto;
    height: auto;
    object-fit: contain;
    box-shadow: 0 0 50px rgba(0, 0, 0, 0.8);
    border-radius: 8px;
}

.lightbox:not(.with-text) .lightbox-text-side {
    display: none;
}

/* Lightbox s textem */
.lightbox-container {
    display: flex;
    max-width: 1000px;
    width: 90%;
    max-height: 85vh;
    background: white;
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 30px 60px rgba(0, 0, 0, 0.5);
    position: relative;
    z-index: 10000;
}

.lightbox-image-side {
    flex: 0 0 45%;
    background: #f8fafc;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    padding: 0;
}

.lightbox-image-side img {
    width: 100%;
    height: 100%;
    aspect-ratio: auto;
    object-fit: cover;
    max-width: none;
    max-height: none;
    border-radius: 0;
    box-shadow: none;
    margin-bottom: 0 !important;
}

.lightbox-text-side {
    flex: 1;
    padding: 40px;
    overflow-y: auto;
    color: var(--text);
    text-align: left;
}

.lightbox-container.no-image .lightbox-image-side {
    display: none;
}

.lightbox-container.no-image .lightbox-text-side {
    flex: 0 0 100%;
}

.lightbox-name {
    margin-bottom: 5px;
    color: var(--primarni);
    font-size: 1.8rem;
}

.lightbox-role {
    color: var(--text-svetly);
    font-size: 1.1rem !important;
    margin-bottom: 20px;
    font-weight: 500;
}

.lightbox-bio {
    line-height: 1.8;
    margin-bottom: 30px;
    font-size: 1rem;
}

.lightbox-bio p {
    margin-bottom: 15px;
}

.lightbox-divider {
    border-top: 1px solid #eee;
    margin: 20px 0;
    height: 0;
}

.lightbox-contact {
    padding-top: 20px;
    border-top: 1px solid #eee;
    font-size: 0.95rem;
}

.lightbox-contact a {
    color: var(--primarni);
    font-weight: 600;
}

/* Pokud je to jen obrázek (legacy) */
.lightbox:not(.with-text) .lightbox-container {
    background: transparent;
    box-shadow: none;
    display: block;
    width: auto;
    max-width: 95vw;
}

.lightbox:not(.with-text) .lightbox-text-side {
    display: none;
}

.lightbox:not(.with-text) .lightbox-image-side {
    background: transparent;
    flex: none;
    width: 100%;
    overflow: visible;
}

.lightbox:not(.with-text) .lightbox-image-side img {
    max-height: 90vh;
    max-width: 90vw;
    width: auto;
    height: auto;
    object-fit: contain;
    border-radius: 10px;
    display: block;
    margin: 0 auto;
}

@media (max-width: 992px) {
    .lightbox {
        align-items: flex-start;
        overflow-y: auto;
        padding: 50px 10px;
        -webkit-overflow-scrolling: touch;
    }

    .lightbox-container {
        flex-direction: column;
        max-height: none;
        height: auto;
        width: 100%;
        border-radius: 12px;
    }

    .lightbox-image-side {
        flex: 0 0 auto;
        padding: 40px 20px 20px 20px;
        background: #f8fafc;
        display: flex;
        justify-content: center;
    }

    .lightbox-image-side img {
        width: 120px;
        height: 120px;
        border-radius: 50%;
        aspect-ratio: 1/1;
        object-fit: cover;
        box-shadow: 0 4px 12px rgba(0,0,0,0.1);
    }

    .lightbox-text-side {
        padding: 30px 20px;
        overflow-y: visible;
        height: auto;
    }

    .lightbox-name {
        font-size: 1.6rem;
        text-align: center;
    }

    .lightbox-role {
        font-size: 1rem !important;
        margin-bottom: 20px;
        text-align: center;
    }

    .lightbox-bio {
        font-size: 1rem;
        line-height: 1.6;
        margin-bottom: 30px;
    }

    .lightbox-bio p {
        margin-bottom: 15px;
    }

    .lightbox-contact {
        padding-top: 20px;
        font-size: 0.95rem;
        text-align: center;
    }

    .lightbox-close {
        top: 10px;
        right: 15px;
        font-size: 32px;
        background: rgba(0,0,0,0.5);
        width: 40px;
        height: 40px;
        display: flex;
        align-items: center;
        justify-content: center;
        border-radius: 50%;
    }

    /* Úprava ikon v textu medailonku na mobilu */
    .medailonek-text div[style*="float: right"] {
        float: none !important;
        margin: 0 auto 20px auto !important;
        display: flex !important;
    }
}
}

/* Karta týmu */
.karta-tym-link {
    transition: var(--prechod);
    cursor: pointer;
    border: 1px solid transparent;
}

.karta-tym-link:hover {
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.1);
    border-color: rgba(247, 169, 32, 0.3);
}

.karta-tym-link:hover h4 {
    color: var(--sekundarni) !important;
}

.member-contact-link {
    position: relative;
    z-index: 2;
}

.member-contact-link:hover {
    color: var(--sekundarni) !important;
    text-decoration: underline;
}

/* Aktuality - seznam */
.aktualita-flex {
    display: flex;
    gap: 30px;
    align-items: flex-start;
}

.aktualita-img-wrapper {
    flex-shrink: 0;
    overflow: hidden;
    border-radius: 50%;
    width: 100px;
    height: 100px;
    border: 2px solid #eee;
}

.aktualita-img-wrapper img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    margin-bottom: 0;
    transition: transform 0.4s ease;
}

.karta:hover .aktualita-img-wrapper img {
    transform: scale(1.15);
}

.aktualita-obsah {
    flex-grow: 1;
}

.aktualita-no-img {
    display: block;
    width: 100px;
    height: 100px;
    background: #ffffff;
    border: 2px solid #eeeeee;
    border-radius: 50%;
    box-sizing: border-box;
}

@media (max-width: 768px) {
    .aktualita-no-img {
        width: 60px;
        height: 60px;
    }
}

.aktualita-nadpis {
    margin-bottom: 5px;
    color: var(--primarni);
}

.aktualita-nadpis a {
    text-decoration: none;
    color: inherit;
}

.aktualita-datum {
    font-size: 0.85rem;
    color: #777;
    letter-spacing: 1.5px;
    margin-bottom: 15px;
}

.aktualita-cist-vice {
    display: inline-block;
    margin-top: 15px;
    font-weight: 600;
    color: var(--primarni);
}

/* Detail aktuality - obrĂˇzek */
.detail-img-wrapper {
    float: right;
    margin: 0 0 25px 30px;
    max-width: 50%;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
    transition: all 0.4s ease;
}

.detail-img-wrapper img {
    max-width: 100%;
    height: auto;
    display: block;
    margin-bottom: 0 !important;
    transition: transform 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

.detail-img-wrapper:hover {
    transform: translateY(-5px);
    box-shadow: 0 20px 40px rgba(0,0,0,0.15);
}

.detail-img-wrapper:hover img {
    transform: scale(1.1);
}

@media (max-width: 768px) {

    /* MobilnĂ­ layout aktualit:
       Row 1: Img | Nadpis
       Row 2: Img | Datum
       Row 3: Text (full width)
       Row 4: Link (full width)
    */
    .aktualita-flex {
        display: grid;
        grid-template-columns: auto 1fr;
        column-gap: 15px;
        row-gap: 5px;
    }

    .aktualita-img-wrapper {
        grid-row: 1 / span 2;
        /* ObrĂˇzek pĹ™es dva Ĺ™Ăˇdky (nadpis + datum) */
        grid-column: 1;
    }

    .aktualita-img-wrapper img {
        width: 60px;
        height: 60px;
    }

    .aktualita-obsah {
        display: contents;
        /* ZruĹˇĂ­ wrapper, dÄ›ti se stanou souÄŤĂˇstĂ­ gridu */
    }

    .aktualita-nadpis {
        grid-row: 1;
        grid-column: 2;
        margin-bottom: 0;
        align-self: end;
        /* Zarovnat s hornĂ­ hranou obrĂˇzku nebo dolĹŻ */
        font-size: 1.1rem !important;
        /* MenĹˇĂ­ pĂ­smo */
        line-height: 1.2;
    }

    .aktualita-datum {
        grid-row: 2;
        grid-column: 2;
        align-self: start;
        margin-bottom: 0;
        font-size: 0.75rem !important;
        line-height: 1.4;
    }

    .aktualita-obsah p {
        grid-row: 3;
        grid-column: 1 / span 2;
        /* PĹ™es celou ĹˇĂ­Ĺ™ku pod obrĂˇzkem */
        margin-top: 10px;
        margin-bottom: 0;
        font-size: 0.95rem !important;
    }

    .aktualita-cist-vice {
        grid-row: 4;
        grid-column: 1 / span 2;
        margin-top: 10px;
        font-size: 0.9rem;
    }

    /* Detail aktuality - mobil */
    .detail-img-wrapper {
        float: none;
        margin: 0 0 20px 0;
        max-width: 100%;
        width: 100%;
    }
}

/* Třídy pro zobrazení/skrytí podle zařízení */
.desktop-only {
    display: block;
}

.mobile-only {
    display: none;
}

@media (max-width: 768px) {
    .desktop-only {
        display: none !important;
    }

    .mobile-only {
        display: block !important;
    }
}



/* AktivnĂ­ zvĂ˝raznÄ›nĂ­ v menu */
nav a.nav-active::before {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 2px;
    background-color: var(--sekundarni);
    transition: none;
}

/* Dokumentace Page Styles */
.doc-category {
    margin-bottom: 4rem;
    background: #fff;
    border-radius: 12px;
    box-shadow: var(--stin);
    overflow: hidden;
    border: 1px solid #edf2f7;
}

.doc-category-title {
    background: var(--pozadi-sekce);
    padding: 25px 30px;
    margin-bottom: 0;
    font-size: 1.6rem;
    display: flex;
    align-items: center;
    gap: 15px;
    border-bottom: 2px solid var(--primarni);
}

.doc-category-title img {
    width: 36px;
    height: 36px;
    margin-bottom: 0;
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.1));
}

.doc-table-header {
    display: grid;
    grid-template-columns: 3fr 5fr 2fr;
    padding: 15px 30px;
    background: var(--primarni);
    color: #fff;
    font-weight: 600;
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.doc-body {
    background: white;
}

.doc-item {
    display: grid;
    grid-template-columns: 3fr 5fr 2fr;
    padding: 18px 30px;
    border-bottom: 1px solid #f1f5f9;
    align-items: center;
    transition: var(--prechod);
}

.doc-item:last-child {
    border-bottom: none;
}

.doc-item:hover {
    background: #f8fafc;
}

.doc-item-title {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.doc-item-title a {
    color: var(--primarni);
    font-weight: 600;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    line-height: 1.3;
}

.doc-item-title a:hover {
    color: var(--sekundarni);
    transform: translateX(3px);
}

.doc-item-title a::before {
    content: "PDF";
    font-size: 9px;
    background: #e74c3c;
    color: white;
    padding: 2px 6px;
    border-radius: 4px;
    font-weight: 800;
    flex-shrink: 0;
}

.doc-item-desc {
    color: var(--text);
    font-size: 0.95rem;
    line-height: 1.5;
}

.doc-item-date {
    color: var(--text-svetly);
    font-size: 0.9rem;
    text-align: right;
    font-variant-numeric: tabular-nums;
}

.doc-divider {
    grid-column: span 3;
    padding: 12px 30px;
    background: #f8fafc;
    font-weight: 700;
    font-size: 0.8rem;
    color: var(--primarni);
    text-transform: uppercase;
    border-bottom: 1px solid #f1f5f9;
}

@media (max-width: 992px) {
    .doc-table-header {
        grid-template-columns: 1fr 1fr;
    }

    .col-date-header {
        display: none;
    }

    .doc-item {
        grid-template-columns: 1fr 1fr;
        gap: 15px;
    }

    .doc-item-date {
        grid-column: span 2;
        text-align: left;
        margin-top: 5px;
        padding-top: 10px;
        border-top: 1px dotted #e2e8f0;
    }
}

@media (max-width: 768px) {
    .doc-category-title {
        padding: 20px;
        font-size: 1.3rem;
    }

    .doc-table-header {
        display: none;
    }

    .doc-item {
        grid-template-columns: 1fr;
        gap: 12px;
        padding: 20px;
    }

    .doc-item-date {
        grid-column: 1;
        display: flex;
        justify-content: space-between;
        align-items: center;
        background: #f8fafc;
        margin: 5px -20px -20px -20px;
        padding: 12px 20px;
        border-top: 1px solid #edf2f7;
    }

    .doc-item-date::before {
        content: "Aktualizace";
        font-weight: 600;
        color: var(--text);
        font-size: 0.8rem;
        text-transform: uppercase;
    }
}

/* --- Inteligentní vyhledávání (Search Overlay) --- */
.search-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    z-index: 99999;
    display: none;
    opacity: 0;
    transition: opacity 0.3s ease;
    padding: 10vh 20px;
    box-sizing: border-box;
    overflow-y: auto;
}

.search-overlay.active {
    display: block;
    opacity: 1;
}

.search-container {
    max-width: 800px;
    margin: 0 auto;
    position: relative;
    transform: translateY(20px);
    transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.search-overlay.active .search-container {
    transform: translateY(0);
}

.search-close {
    position: fixed;
    top: 30px;
    right: 30px;
    background: white;
    box-shadow: 0 4px 10px rgba(0,0,0,0.1);
    border: none;
    cursor: pointer;
    color: var(--primarni);
    padding: 10px;
    opacity: 0.7;
    transition: opacity 0.2s;
    border-radius: 50%;
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.search-close:hover {
    opacity: 1;
    transform: scale(1.1);
}

.search-input-wrapper {
    position: relative;
    border-bottom: 3px solid var(--primarni);
    padding-bottom: 5px;
    margin-bottom: 40px;
}

#searchInput {
    width: 100%;
    background: transparent;
    border: none;
    font-size: clamp(1.5rem, 4vw, 2.5rem);
    color: var(--primarni);
    font-weight: 700;
    padding: 10px 50px 10px 0;
    outline: none;
}

#searchInput::placeholder {
    color: #cbd5e1;
    font-size: 0.65em;
    font-weight: 500;
}

.search-input-icon {
    position: absolute;
    right: 10px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--primarni);
    opacity: 0.5;
}

/* Výsledky */
.search-results {
    display: grid;
    gap: 15px;
    padding-bottom: 50px;
}

.search-result-item {
    display: flex;
    align-items: center;
    gap: 20px;
    background: white;
    padding: 20px;
    border-radius: 12px;
    text-decoration: none;
    color: inherit;
    border: 1px solid #f1f5f9;
    transition: all 0.2s ease;
    animation: fadeInSlide 0.3s ease forwards;
}

@keyframes fadeInSlide {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

.search-result-item:hover {
    border-color: var(--primarni);
    box-shadow: 0 10px 20px rgba(14, 59, 121, 0.05);
    background: #fcfdfe;
}

/* Podbarvení ikon podle kategorií */
.search-result-icon {
    width: 52px;
    height: 52px;
    background: #f8fafc;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #94a3b8;
    flex-shrink: 0;
    border: 1px solid #e2e8f0;
    transition: all 0.2s ease;
}

.search-result-item[data-category="Produkt"] .search-result-icon {
    background: #eff6ff; 
    color: var(--primarni);
    border-color: #dbeafe;
}

.search-result-item[data-category="Služba"] .search-result-icon {
    background: #f0fdf4;
    color: #16a34a;
    border-color: #dcfce7;
}

.search-result-item[data-category="Modul"] .search-result-icon {
    background: #fff7ed;
    color: #ea580c;
    border-color: #ffedd5;
}

/* Hover efekty pro ikony */
.search-result-item:hover .search-result-icon {
    transform: scale(1.05);
}

.search-result-item[data-category="Produkt"]:hover .search-result-icon {
    background: var(--primarni);
    color: white;
}

.search-result-item[data-category="Služba"]:hover .search-result-icon {
    background: #16a34a;
    color: white;
}

.search-result-item[data-category="Modul"]:hover .search-result-icon {
    background: #ea580c;
    color: white;
}

.search-result-content {
    flex-grow: 1;
}

.search-result-category {
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    color: #64748b;
    font-weight: 700;
    margin-bottom: 4px;
}

/* Speciální barvy pro štítky vpravo */
.search-result-relevance {
    font-size: 0.7rem;
    font-weight: 800;
    color: #475569;
    background: #f1f5f9;
    padding: 4px 12px;
    border-radius: 20px;
    white-space: nowrap;
    border: 1px solid #e2e8f0;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.search-result-item[data-category="Produkt"] .search-result-relevance {
    background: var(--primarni);
    color: white;
    border-color: var(--primarni);
}

.search-result-item[data-category="Služba"] .search-result-relevance {
    background: #f0fdf4;
    color: #16a34a;
    border-color: #bbf7d0;
}

.search-result-item[data-category="Modul"] .search-result-relevance {
    background: #fff7ed;
    color: #ea580c;
    border-color: #fed7aa;
}

/* Fulltext / Level 3 styling */
.search-result-item.level-3 {
    opacity: 0.85;
    background: #fafafa;
    border-style: dashed;
}

.search-result-item.level-3 .search-result-title {
    font-size: 1rem;
    color: #475569;
}

.search-result-item.level-3 .search-result-desc {
    font-size: 0.8rem;
    color: #64748b;
}

.search-result-item.level-3 .search-result-relevance {
    background: #f1f5f9;
    color: #94a3b8;
    border-color: #e2e8f0;
    font-weight: 600;
}

.search-results-separator {
    margin: 30px 0 15px;
    padding-bottom: 5px;
    border-bottom: 1px solid #e2e8f0;
    font-size: 0.75rem;
    font-weight: 700;
    color: #94a3b8;
    text-transform: uppercase;
    letter-spacing: 2px;
}

/* Prázdný stav */
.search-empty {
    text-align: center;
    padding: 60px 20px;
}

.search-empty h3 {
    color: var(--primarni);
    margin-bottom: 15px;
    font-size: 1.5rem;
}

.search-empty p {
    color: var(--text-svetly);
    margin-bottom: 30px;
}

.suggested-links {
    display: flex;
    gap: 12px;
    justify-content: center;
    flex-wrap: wrap;
}

.suggested-link {
    background: #f8fafc;
    padding: 10px 20px;
    border-radius: 25px;
    font-size: 0.9rem;
    color: var(--primarni);
    text-decoration: none;
    border: 1px solid #e2e8f0;
    font-weight: 600;
    transition: all 0.2s ease;
}

.suggested-link:hover {
    background: var(--primarni);
    color: white;
    border-color: var(--primarni);
    transform: translateY(-2px);
}

@media (max-width: 768px) {
    .search-overlay {
        padding: 50px 15px;
    }
    
    .search-close {
        top: 15px;
        right: 15px;
        width: 40px;
        height: 40px;
    }

    .search-result-item {
        padding: 15px;
        gap: 15px;
    }
    
    .search-result-icon {
        width: 44px;
        height: 44px;
    }
    
    .search-result-desc {
        display: -webkit-box;
        -webkit-line-clamp: 2;
        line-clamp: 2; /* Přidáno standardní property pro kompatibilitu */
        -webkit-box-orient: vertical;
        overflow: hidden;
    }
    
    .search-result-relevance {
        display: none;
    }
}

/* Loader spinner */
.loader-spinner {
    width: 24px;
    height: 24px;
    border: 3px solid #cbd5e1;
    border-bottom-color: var(--primarni);
    border-radius: 50%;
    display: inline-block;
    box-sizing: border-box;
    animation: rotation 1s linear infinite;
}

@keyframes rotation {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* --- Infinite Logo Marquee --- */
.logo-marquee {
    overflow: hidden;
    padding: 30px 0;
    background: transparent;
    white-space: nowrap;
    position: relative;
    width: 100%;
}

.logo-marquee:before,
.logo-marquee:after {
    content: "";
    position: absolute;
    top: 0;
    width: 150px;
    height: 100%;
    z-index: 2;
    pointer-events: none;
}

.logo-marquee:before {
    left: 0;
    background: linear-gradient(to right, white, transparent);
}

.logo-marquee:after {
    right: 0;
    background: linear-gradient(to left, white, transparent);
}

.logo-marquee-content {
    display: inline-block;
    animation: marquee-infinite 30s linear infinite;
}

.logo-marquee-content img {
    height: 45px;
    width: auto;
    margin: 0 45px;
    filter: grayscale(1);
    opacity: 0.6;
    transition: all 0.4s ease;
    vertical-align: middle;
}

.logo-marquee-content img:hover {
    filter: grayscale(0) saturate(1.2);
    opacity: 1;
    transform: scale(1.08);
}

@keyframes marquee-infinite {
    from {
        transform: translateX(0);
    }
    to {
        transform: translateX(-50%);
    }
}

/* Modulové štítky (Pills) - sjednocené z mapy modulů */
.modul-pill {
    display: inline-block;
    padding: 6px 15px;
    color: #ffffff !important;
    text-decoration: none !important;
    font-size: 0.9rem;
    font-weight: 600;
    border-radius: 4px;
    line-height: 1.3;
    transition: all 0.2s ease;
    border: none;
    cursor: pointer;
}

.modul-pill:hover {
    filter: brightness(1.1);
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(0,0,0,0.15);
}

.modul-pills-container {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

/* --- GLOBÁLNÍ STYLY PRO SDÍLENÍ --- */
.blog-share-wrapper {
    display: flex;
    align-items: center;
    gap: 10px;
}
.blog-share-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: #f1f5f9;
    color: #64748b;
    text-decoration: none;
    transition: all 0.3s;
    border: none;
    cursor: pointer;
}
.blog-share-btn:hover {
    transform: translateY(-2px);
    color: #fff;
}
.blog-share-btn.li:hover { background: #0077b5; }
.blog-share-btn.fb:hover { background: #1877f2; }
.blog-share-btn.wa:hover { background: #25D366; }
.blog-share-btn.email:hover { background: #ea4335; }
.blog-share-btn.copy:hover { background: var(--primarni); }
.blog-share-btn svg { width: 16px; height: 16px; }

.copy-toast {
    position: fixed;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%) translateY(100px);
    background: #334155;
    color: white;
    padding: 10px 20px;
    border-radius: 50px;
    font-size: 0.9rem;
    font-weight: bold;
    opacity: 0;
    transition: all 0.3s;
    z-index: 99999;
}
.copy-toast.show {
    transform: translateX(-50%) translateY(0);
    opacity: 1;
}

/* Specifické pro hero sekce - upraveno na relativní pro moduly */
.top-share-wrapper {
    display: flex;
    justify-content: flex-end;
    margin-bottom: 25px;
    position: relative;
    z-index: 5;
}

/* Odrážky pro obsahové stránky */
.clanek-obsah ul:not([class*="modul-"]), 
.hlavni-obsah-stranky ul, 
.texty ul, 
.modul-extra-obsah ul:not(.modul-seznam) {
    list-style-type: disc !important;
    padding-left: 30px !important;
    margin-bottom: 20px !important;
    display: block !important;
}

/* Odrážky pro obsahové stránky - vynecháváme moduly s vlastními ikonami */
.clanek-obsah ul:not([class*="modul-"]) li, 
.hlavni-obsah-stranky ul li, 
.texty ul li,
.modul-extra-obsah ul:not(.modul-seznam) li {
    display: list-item !important;
    list-style-type: disc !important;
    margin-bottom: 8px !important;
}

.clanek-obsah ol, .hlavni-obsah-stranky ol, .texty ol, .modul-extra-obsah ol {
    list-style-type: decimal !important;
    padding-left: 30px !important;
    margin-bottom: 20px !important;
    display: block !important;
}

.clanek-obsah ol li, .hlavni-obsah-stranky ol li, .texty ol li, .modul-extra-obsah ol li {
    display: list-item !important;
    list-style-type: decimal !important;
    margin-bottom: 8px !important;
}

/* FIX PRO MODUL SEZNAMY - Vynucení skrytí teček a nulového odsazení (přebíjí globální content pravidla) */
.clanek-obsah .modul-seznam ul {
    list-style-type: none !important;
    padding-left: 0 !important;
}
.clanek-obsah .modul-seznam ul li {
    display: block !important;
    list-style-type: none !important;
    padding-left: 25px !important;
}