/* =========================================================
   LOKALITY — HUB (přehled lokalit s přepínačem měst)
   Jednotná barva: --color-sport (tmavá navy)
   Přepínač měst z taxonomie „mesto"
   ========================================================= */

/* =========================================================
   SEKCE 1: HERO (eyebrow + nadpis + popis)
   ========================================================= */
.mts-lokhub-hero {
    position: relative;
    margin-top: 5.5rem;
    padding: 4rem 0;
    background-color: var(--color-mind);
    text-align: center;
    overflow: hidden;
    isolation: isolate;
    min-height: 50vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

/* Triskelion vodoznak v pozadí */
.mts-lokhub-hero::before {
    content: "";
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 45rem;
    height: 45rem;
    background-color: var(--color-sport, #4A90E2);
    opacity: 0.1;
    z-index: 1;
    -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 146.3 143'%3E%3Cpath d='M71.4,86.8c2,6.2,5.4,12.6,5.4,12.6c33.2-26.8,44-75.6-4-99.4C42.8,12.2,34.4,47.8,46,70l-0.1-0.1 c11.1-1.1,18.6,0.9,18.6,0.9C46.2,52.6,57,25.4,72.8,16.6h0.4C101.4,36,90.8,67.6,71.4,86.8z M104.4,75.8c21.8,1.6,44.2,20.6,41.8,51.8c-15.6,21.4-64.6,28.8-85.6-35.4c4-1.2,7.8-3,10.8-5.4 c3.2,11,26.8,60.2,61,35.8c-0.6-19.2-13.2-36-36.2-32.4C99.6,82.2,102.4,78.4,104.4,75.8z M70,80.6C30,66.6-2.8,87,0.2,128.8c10,14,45.6,25.4,66.4-5.2c-3.2-6.2-5-10-8.6-18.2 c-3.8,25.2-29.6,29-45.2,17.8C13.6,99.4,33,82.6,60.6,91.6C65.2,86,67.2,83.8,70,80.6z'/%3E%3C/svg%3E");
    mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 146.3 143'%3E%3Cpath d='M71.4,86.8c2,6.2,5.4,12.6,5.4,12.6c33.2-26.8,44-75.6-4-99.4C42.8,12.2,34.4,47.8,46,70l-0.1-0.1 c11.1-1.1,18.6,0.9,18.6,0.9C46.2,52.6,57,25.4,72.8,16.6h0.4C101.4,36,90.8,67.6,71.4,86.8z M104.4,75.8c21.8,1.6,44.2,20.6,41.8,51.8c-15.6,21.4-64.6,28.8-85.6-35.4c4-1.2,7.8-3,10.8-5.4 c3.2,11,26.8,60.2,61,35.8c-0.6-19.2-13.2-36-36.2-32.4C99.6,82.2,102.4,78.4,104.4,75.8z M70,80.6C30,66.6-2.8,87,0.2,128.8c10,14,45.6,25.4,66.4-5.2c-3.2-6.2-5-10-8.6-18.2 c-3.8,25.2-29.6,29-45.2,17.8C13.6,99.4,33,82.6,60.6,91.6C65.2,86,67.2,83.8,70,80.6z'/%3E%3C/svg%3E");
    -webkit-mask-repeat: no-repeat;
    mask-repeat: no-repeat;
    -webkit-mask-size: contain;
    mask-size: contain;
}

.mts-lokhub-hero-inner {
    max-width: 800px;
    margin: 0 auto;
    position: relative;
    z-index: 2;
}
.mts-lokhub-hero-eyebrow {
    display: block;
    font-family: var(--font-body);
    font-size: 0.875rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.2em;
    color: rgba(255, 255, 255, 0.7);
    margin-bottom: 1.25rem;
}
.mts-lokhub-hero-nadpis {
    font-family: var(--font-heading);
    font-size: var(--text-h1);
    font-weight: 900;
    line-height: 1.15;
    color: white;
    margin: 0 0 1.5rem 0;
}
.mts-lokhub-hero-perex {
    font-family: var(--font-body);
    font-size: var(--text-body-size);
    line-height: 1.7;
    color: rgba(255, 255, 255, 0.7);
}


/* =========================================================
   SEKCE 2: OBSAH (přepínač + karty)
   ========================================================= */
.mts-lokhub-obsah {
    position: relative;   /* kotva pro dekorativní tečky */
    overflow: hidden;     /* tečky přetékající přes okraj se ořízne */
    padding: 6rem 0;
    background-color: var(--color-bg);
}
/* Obsah nad tečkami (tečky mají z-index 0). */
.mts-lokhub-obsah > .container {
    position: relative;
    z-index: 1;
}


/* =========================================================
   PŘEPÍNAČ MĚST (pilulkový – jako Naše cesty / Ceník)
   ========================================================= */
.lokhub-prepinac {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    width: fit-content;
    gap: 0.5rem;
    margin: 0 auto 4rem auto;
    max-width: 100%;
}
.lokhub-prepinac-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.6rem;
    padding: 0.65rem 1.5rem;
    border: 1px solid color-mix(in srgb, var(--color-sport) 25%, transparent);
    background: transparent;
    border-radius: 99px;
    font-family: var(--font-body);
    font-size: 1.125rem;
    font-weight: 700;
	text-transform: uppercase;
    color: var(--color-sport);
    cursor: pointer;
    transition: background-color 0.3s ease, color 0.3s ease, border-color 0.3s ease;
}
/* Ikona pinu (lokalita) před názvem města. Přes mask dědí barvu textu,
   takže se sama přebarví z tmavé na bílou při aktivaci tlačítka. */
.lokhub-prepinac-btn::before {
    content: "";
    flex-shrink: 0;
    width: 1.05em;
    height: 1.05em;
    background-color: currentColor;
    -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M21 10c0 7-9 13-9 13s-9-6-9-13a9 9 0 0 1 18 0z'/%3E%3Ccircle cx='12' cy='10' r='3'/%3E%3C/svg%3E");
    mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M21 10c0 7-9 13-9 13s-9-6-9-13a9 9 0 0 1 18 0z'/%3E%3Ccircle cx='12' cy='10' r='3'/%3E%3C/svg%3E");
    -webkit-mask-repeat: no-repeat;
    mask-repeat: no-repeat;
    -webkit-mask-position: center;
    mask-position: center;
    -webkit-mask-size: contain;
    mask-size: contain;
}
.lokhub-prepinac-btn:hover {
    border-color: var(--color-mind);
}
.lokhub-prepinac-btn.is-active {
    background-color: var(--color-sport);
    border-color: var(--color-sport);
    color: white;
}


/* =========================================================
   2. PRUH: PŘEPÍNAČ TYPŮ (outline styl – jemnější, odlišný)
   ========================================================= */
.lokhub-prepinac-typy {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    width: fit-content;
    gap: 0.35rem;
    margin: -2.5rem auto 4rem auto;
    padding: 0.35rem;
    background-color: color-mix(in srgb, var(--color-sport) 10%, white);
    border-radius: 99px;
    max-width: 100%;
}
.lokhub-typ-btn {
    padding: 0.5rem 1.25rem;
    border: none;
    background: transparent;
    border-radius: 99px;
    font-family: var(--font-body);
    font-size: 1.125rem;
    font-weight: 600;
    color: var(--color-sport);
    cursor: pointer;
    transition: background-color 0.3s ease, color 0.3s ease;
}
.lokhub-typ-btn.is-active {
    background-color: var(--color-sport);
    color: white;
}


/* =========================================================
   HLÁŠKA: žádný výsledek
   ========================================================= */
.lokhub-prazdne {
    text-align: center;
    font-family: var(--font-body);
    font-size: 1rem;
    color: var(--color-slate, #6B7280);
    padding: 3rem 0;
}


/* =========================================================
   KARTY – filtrování (řídí JS podle města + typu)
   Náběhová animace jednotlivých karet po přefiltrování.
   ========================================================= */
.lokhub-karta.is-animating {
    animation: mts-lokhub-fade 2.5s ease forwards;
}
@keyframes mts-lokhub-fade {
    from {
        opacity: 0;
        transform: translateY(12px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.lokhub-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(320px, 100%), 1fr));
    gap: 2rem;
}


/* =========================================================
   KARTA (velká, obrázek na pozadí) – stejný vizuál jako cesty
   ========================================================= */
.lokhub-karta {
    position: relative;
    display: block;
    height: 480px;
    border-radius: 2rem;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    text-decoration: none;
    isolation: isolate;
}
/* Skrytá karta (odfiltrovaná JS) – přebije display:block výše */
.lokhub-karta[hidden] {
    display: none;
}

/* Obrázek na pozadí */
.lokhub-karta-img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    z-index: -2;
    transition: transform 0.7s ease;
}
.lokhub-karta:hover .lokhub-karta-img {
    transform: scale(1.08);
}

/* Tmavý gradient odspodu */
.lokhub-karta::after {
    content: "";
    position: absolute;
    inset: 0;
    z-index: -1;
    background: linear-gradient(
        to top,
        var(--color-sport) 0%,
        rgba(26, 43, 60, 0.5) 40%,
        rgba(26, 43, 60, 0.1) 100%
    );
}

/* Ikona v pravém horním rohu */
.lokhub-karta-ikona {
    position: absolute;
    top: 1.5rem;
    right: 1.5rem;
    width: 3rem;
    height: 3rem;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(8px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    color: white;
}
.lokhub-karta-ikona svg {
    width: 1.5rem;
    height: 1.5rem;
}
.lokhub-karta-ikona svg path {
    fill: white;
}

/* Obsah dole */
.lokhub-karta-telo {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    padding: 2rem;
    color: white;
}
.lokhub-karta-eyebrow {
    display: block;
    font-family: var(--font-body);
    font-size: var(--karta-eyebrow);
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.15em;
    color: #fff;
    margin-bottom: 0.75rem;
	text-decoration: none; /* Vypne klasické podtržení */
 	background-image: linear-gradient(to right, currentColor 0%, currentColor 50%, transparent 50%, transparent 100%); /* Vykreslí čáru jen na půlce */
 	background-position: bottom left; /* Umístí podtržení dolů */
	background-size: 75px 2px; /* 100% šířka podkladu, 2px tloušťka čáry */
	background-repeat: no-repeat;
	padding-bottom: 3px;
}
.lokhub-karta-nazev {
    font-family: var(--font-heading);
    font-size: var(--karta-nadpis);
    font-weight: 900;
    line-height: 1.15;
    color: white;
    margin: 0 0 1rem 0;
}
/* Řádek nadpisu + ikona „i" (ikona jen do 989px) */
.lokhub-karta-nadpis-radek {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    margin: 0 0 1rem 0;
}
.lokhub-karta-nadpis-radek .lokhub-karta-nazev {
    margin: 0;
}
/* Ikona „i" – na desktopu skrytá (funguje hover), do 989px viditelná */
.mts-info-toggle {
    display: none;
    flex-shrink: 0;
    width: 1.75rem;
    height: 1.75rem;
    padding: 0;
    align-items: center;
    justify-content: center;
    background-color: rgba(255, 255, 255, 0.15);
    border: 1px solid rgba(255, 255, 255, 0.4);
    border-radius: 50%;
    color: white;
    cursor: pointer;
    -webkit-tap-highlight-color: transparent;
    transition: background-color 0.3s ease;
}
.mts-info-toggle svg {
    width: 1rem;
    height: 1rem;
}
.mts-info-toggle:hover,
.mts-info-toggle[aria-expanded="true"] {
    background-color: var(--color-mind);
    border-color: var(--color-mind);
}
.lokhub-karta-popis {
    font-family: var(--font-body);
    font-size: var(--karta-popis);
    line-height: 1.6;
    color: rgba(255, 255, 255, 0.85);
    margin: 0 0 1.5rem 0;
    max-height: 0;
    opacity: 0;
    overflow: hidden;
    transition: max-height 3.5s ease, opacity 1.5s ease, margin 3.5s ease;
}
/* Hover rozbalení jen na zařízeních s myší (desktop). Na dotykových
   zařízeních (mobil/tablet) se popis odhaluje ikonou „i", ne hoverem. */
@media (hover: hover) {
    .lokhub-karta:hover .lokhub-karta-popis {
        max-height: 200px;
        opacity: 1;
    }
}
.lokhub-karta-tlacitko {
    display: inline-block;
    padding: 0.75rem 1.75rem;
    background-color: white;
    color: var(--color-mind);
    font-family: var(--font-body);
    font-weight: 900;
    font-size: var(--karta-button);
    text-transform: uppercase;
    letter-spacing: 0.1em;
    border-radius: 99px;
    transition: background-color 0.3s ease;
}
.lokhub-karta:hover .lokhub-karta-tlacitko {
    background-color: var(--color-mind);
	color: white;
}

/* Do 989px: popis se odhaluje ťuknutím na ikonu „i" (ne hoverem).
   Ikona viditelná, popis schovaný a rozbalí se přes třídu .mts-karta-info-open. */
@media (max-width: 989px) {
    .lokhub-karta.mts-karta-info-open .lokhub-karta-popis {
        max-height: 200px;
        opacity: 1;
    }
    .mts-info-toggle {
        display: inline-flex;
    }
}


/* === Responzivita === */
@media (max-width: 767px) {
    .mts-lokhub-obsah {
        padding: 4rem 0;
    }
    .lokhub-prepinac {
        display: flex;
        flex-direction: column;
        border-radius: 1.25rem;
		width: 100%;
    }
    .lokhub-prepinac-btn {
        width: 100%;
    }
    .lokhub-prepinac-typy {
        display: flex;
        flex-direction: column;
        border-radius: 1.25rem;
        width: 100%;
    }
    .lokhub-typ-btn {
        width: 100%;
    }
}
