/*
Theme Name: MapaMuzei.cz
Theme URI: https://mapamuzei.cz
Author: MapaMuzei.cz
Description: Samostatná WordPress šablona ve stylu MuseumsAtlas sladěná s identitou a logem MapaMuzei.cz (tmavě modrá #0b1e36 a oranžová #f37000). Obsahuje bleskové vyhledávání, interaktivní mapu ČR se shlukováním, přehledy krajů, kategorií, výstav, edukačních programů a detailní profil muzea.
Version: 1.0.1
Text Domain: mapamuzei
*/

:root {
    --mm-navy: #0b1e36;
    --mm-navy-hover: #153257;
    --mm-orange: #f37000;
    --mm-orange-hover: #d86200;
    --mm-orange-soft: #fff2e6;
    --mm-teal: #18646b;
    --mm-teal-soft: #e2f1ef;
    --mm-bg: #f6f4f0;
    --mm-surface: #ffffff;
    --mm-border: #e5e0d8;
    --mm-text: #0b1e36;
    --mm-muted: #5e6673;
    --mm-radius: 16px;
    --mm-shadow: 0 4px 20px rgba(11, 30, 54, 0.06);
}

*, *::before, *::after { box-sizing: border-box; }

body {
    margin: 0;
    background: var(--mm-bg);
    color: var(--mm-text);
    font-family: 'Inter', system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
}

a { color: var(--mm-navy); }

.mm-container {
    max-width: 1180px;
    margin: 0 auto;
    padding: 0 20px;
}

/* =========================================================================
   HLAVIČKA (HEADER) VE STYLU VZORU S LOGEM MAPAMUZEI.CZ
   ========================================================================= */
.mm-header {
    background: var(--mm-surface);
    border-bottom: 1px solid var(--mm-border);
    position: sticky;
    top: 0;
    z-index: 1000;
}

.mm-header-top {
    max-width: 1180px;
    margin: 0 auto;
    padding: 12px 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
}

.mm-brand {
    display: inline-flex;
    align-items: center;
    text-decoration: none;
    flex-shrink: 0;
}

.mm-brand img {
    height: 46px;
    width: auto;
    display: block;
}

/* Vyhledávací lišta uprostřed hlavičky */
.mm-search-wrap {
    flex: 1;
    max-width: 520px;
    position: relative;
}

.mm-search-form {
    display: flex;
    align-items: center;
    background: var(--mm-surface);
    border: 1.5px solid #d5cfc6;
    border-radius: 999px;
    padding: 4px 6px 4px 18px;
    transition: border-color .15s, box-shadow .15s;
}

.mm-search-form:focus-within {
    border-color: var(--mm-orange);
    box-shadow: 0 0 0 3px rgba(243, 112, 0, 0.15);
}

.mm-search-input {
    border: none;
    background: transparent;
    flex: 1;
    font-size: 0.95rem;
    color: var(--mm-text);
    outline: none;
    min-width: 0;
}

.mm-search-btn {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    border: none;
    background: var(--mm-orange);
    color: #fff;
    display: grid;
    place-items: center;
    cursor: pointer;
    flex-shrink: 0;
    transition: background .15s;
}

.mm-search-btn:hover { background: var(--mm-orange-hover); }

.mm-search-results {
    position: absolute;
    top: calc(100% + 8px);
    left: 0;
    right: 0;
    background: var(--mm-surface);
    border: 1px solid var(--mm-border);
    border-radius: 14px;
    box-shadow: 0 16px 40px rgba(11, 30, 54, 0.14);
    max-height: 380px;
    overflow-y: auto;
    z-index: 1200;
    display: none;
}

.mm-search-results.is-open { display: block; }

.mm-sr-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 11px 16px;
    text-decoration: none;
    border-bottom: 1px solid #f2efe9;
    gap: 12px;
}

.mm-sr-item:last-child { border-bottom: none; }
.mm-sr-item:hover { background: var(--mm-orange-soft); }
.mm-sr-title { font-weight: 600; color: var(--mm-navy); display: block; }
.mm-sr-meta { font-size: 0.82rem; color: var(--mm-muted); }
.mm-sr-tag { font-size: 0.75rem; font-weight: 600; background: #eef2f6; color: var(--mm-navy); padding: 3px 8px; border-radius: 6px; white-space: nowrap; }

.mm-header-cta {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 9px 16px;
    border-radius: 10px;
    border: 1.5px solid var(--mm-navy);
    color: var(--mm-navy);
    text-decoration: none;
    font-weight: 600;
    font-size: 0.9rem;
    white-space: nowrap;
    transition: .15s;
}

.mm-header-cta:hover {
    background: var(--mm-navy);
    color: #fff;
}

/* Druhý řádek hlavičky – horizontální navigace s ikonami (jako na vzoru) */
.mm-nav-bar {
    border-top: 1px solid #f0ece4;
    background: var(--mm-surface);
}

.mm-nav {
    max-width: 1180px;
    margin: 0 auto;
    padding: 0 20px;
    display: flex;
    align-items: center;
    gap: 6px;
    overflow-x: auto;
    scrollbar-width: none;
}

.mm-nav::-webkit-scrollbar { display: none; }

.mm-nav a {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 14px;
    text-decoration: none;
    color: var(--mm-navy);
    font-weight: 600;
    font-size: 0.92rem;
    border-bottom: 2.5px solid transparent;
    white-space: nowrap;
    transition: .15s;
}

.mm-nav a:hover, .mm-nav a.is-active {
    color: var(--mm-orange);
    border-bottom-color: var(--mm-orange);
}

.mm-badge-new {
    background: var(--mm-orange);
    color: #fff;
    font-size: 0.68rem;
    font-weight: 800;
    text-transform: uppercase;
    padding: 2px 7px;
    border-radius: 999px;
    letter-spacing: 0.03em;
}

/* =========================================================================
   HERO MAPA NA ÚVODNÍ STRANĚ (PRESNĚ PODLE PŘILOŽENÉHO VZORU)
   ========================================================================= */
.mm-hero-map-sec {
    padding: 24px 20px 10px;
    max-width: 1180px;
    margin: 0 auto;
}

.mm-hero-map-box {
    position: relative;
    height: 500px;
    border-radius: 22px;
    overflow: hidden;
    border: 1px solid var(--mm-border);
    box-shadow: var(--mm-shadow);
    background: #e9e6df;
}

#mm-front-map {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
}

.mm-hero-overlay-card {
    position: absolute;
    left: 28px;
    bottom: 28px;
    z-index: 500;
    background: var(--mm-surface);
    border-radius: 20px;
    padding: 28px 30px;
    max-width: 390px;
    box-shadow: 0 16px 40px rgba(11, 30, 54, 0.16);
    border: 1px solid rgba(229, 224, 216, 0.8);
}

.mm-hero-overlay-card h1 {
    margin: 0 0 10px 0;
    font-size: 1.85rem;
    line-height: 1.18;
    font-weight: 800;
    color: var(--mm-navy);
}

.mm-hero-overlay-card p {
    margin: 0 0 20px 0;
    color: var(--mm-muted);
    font-size: 0.98rem;
    line-height: 1.5;
}

.mm-btn-primary {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 9px;
    background: var(--mm-orange);
    color: #fff;
    padding: 13px 22px;
    border-radius: 12px;
    text-decoration: none;
    font-weight: 700;
    font-size: 0.98rem;
    border: none;
    cursor: pointer;
    transition: background .15s, transform .1s;
}

.mm-btn-primary:hover {
    background: var(--mm-orange-hover);
    color: #fff;
}

.mm-btn-secondary {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    background: var(--mm-surface);
    color: var(--mm-navy);
    padding: 10px 16px;
    border-radius: 10px;
    text-decoration: none;
    font-weight: 600;
    font-size: 0.9rem;
    border: 1px solid var(--mm-border);
    cursor: pointer;
    transition: .15s;
}

.mm-btn-secondary:hover { background: #f0ece4; }

/* Shluky markerů na mapě v barvách loga */
.mm-cluster-pin {
    background: var(--mm-orange);
    color: #fff;
    border: 2.5px solid #fff;
    border-radius: 50%;
    font-weight: 800;
    font-size: 13px;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 12px rgba(11, 30, 54, 0.28);
}

.mm-single-pin {
    background: var(--mm-navy);
    color: #fff;
    border: 2px solid #fff;
    border-radius: 50%;
    width: 28px;
    height: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 3px 10px rgba(11, 30, 54, 0.3);
}

/* =========================================================================
   SEKCE NA ÚVODNÍ STRANĚ (KATEGORIE, KRAJE, KARTY MUZEÍ, VÝSTAVY)
   ========================================================================= */
.mm-section {
    max-width: 1180px;
    margin: 36px auto;
    padding: 0 20px;
}

.mm-sec-head {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    margin-bottom: 18px;
    gap: 12px;
}

.mm-sec-head h2 {
    margin: 0;
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--mm-navy);
}

.mm-sec-head a {
    color: var(--mm-orange);
    font-weight: 700;
    text-decoration: none;
    font-size: 0.95rem;
}

.mm-sec-head a:hover { text-decoration: underline; }

/* Čipy kategorií a krajů */
.mm-pill-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(185px, 1fr));
    gap: 12px;
}

.mm-cat-card {
    background: var(--mm-surface);
    border: 1px solid var(--mm-border);
    border-radius: 14px;
    padding: 14px 16px;
    text-decoration: none;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    transition: .15s;
}

.mm-cat-card:hover {
    border-color: var(--mm-orange);
    transform: translateY(-2px);
    box-shadow: var(--mm-shadow);
}

.mm-cat-name {
    font-weight: 700;
    color: var(--mm-navy);
    font-size: 0.95rem;
}

.mm-cat-count {
    background: var(--mm-orange-soft);
    color: var(--mm-orange);
    font-weight: 700;
    font-size: 0.8rem;
    padding: 3px 9px;
    border-radius: 999px;
}

/* Mřížka karet muzeí */
.mm-cards-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(270px, 1fr));
    gap: 20px;
}

.mm-museum-card {
    background: var(--mm-surface);
    border: 1px solid var(--mm-border);
    border-radius: var(--mm-radius);
    overflow: hidden;
    text-decoration: none;
    display: flex;
    flex-direction: column;
    transition: .18s;
}

.mm-museum-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 12px 28px rgba(11, 30, 54, 0.1);
    border-color: #d4cdc2;
}

.mm-card-thumb {
    height: 175px;
    background: linear-gradient(135deg, #0b1e36 0%, #1c3b63 100%);
    position: relative;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
}

.mm-card-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.mm-card-placeholder {
    color: rgba(255,255,255,0.75);
    text-align: center;
}

.mm-card-body {
    padding: 16px 18px;
    display: flex;
    flex-direction: column;
    flex: 1;
}

.mm-card-meta {
    font-size: 0.82rem;
    color: var(--mm-muted);
    margin: 0 0 6px 0;
    display: flex;
    align-items: center;
    gap: 6px;
}

.mm-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--mm-orange);
    display: inline-block;
}

.mm-card-body h3 {
    margin: 0 0 10px 0;
    font-size: 1.08rem;
    line-height: 1.35;
    color: var(--mm-navy);
}

.mm-card-badges {
    margin-top: auto;
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.mm-mini-badge {
    background: #f4f1ea;
    color: var(--mm-navy);
    font-size: 0.8rem;
    font-weight: 600;
    padding: 4px 10px;
    border-radius: 7px;
}

/* Karty výstav */
.mm-exh-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
    gap: 16px;
}

.mm-exh-card {
    background: var(--mm-surface);
    border: 1px solid var(--mm-border);
    border-left: 4px solid var(--mm-orange);
    border-radius: 14px;
    padding: 18px 20px;
}

.mm-exh-date {
    font-size: 0.78rem;
    font-weight: 800;
    text-transform: uppercase;
    color: var(--mm-orange);
    margin: 0 0 4px 0;
}

.mm-exh-card h3 {
    margin: 0 0 6px 0;
    font-size: 1.08rem;
}

.mm-exh-card h3 a {
    color: var(--mm-navy);
    text-decoration: none;
}

.mm-exh-card h3 a:hover { text-decoration: underline; }

.mm-exh-museum {
    font-size: 0.86rem;
    font-weight: 600;
    color: var(--mm-teal);
    margin: 0 0 8px 0;
}

.mm-exh-desc {
    margin: 0;
    font-size: 0.92rem;
    color: var(--mm-muted);
}

/* =========================================================================
   FILTRAČNÍ LIŠTA PRO ARCHIVY A VELKOU MAPU
   ========================================================================= */
.mm-filter-bar {
    background: var(--mm-surface);
    border: 1px solid var(--mm-border);
    border-radius: 16px;
    padding: 16px 20px;
    margin-bottom: 24px;
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    align-items: center;
}

.mm-filter-bar select, .mm-filter-bar input[type="text"] {
    padding: 9px 14px;
    border-radius: 10px;
    border: 1px solid #d5cfc6;
    font-size: 0.92rem;
    color: var(--mm-navy);
    background: #fff;
}

/* =========================================================================
   PATIČKA (FOOTER)
   ========================================================================= */
.mm-footer {
    background: var(--mm-navy);
    color: #e2e8f0;
    margin-top: 64px;
    padding: 48px 20px 28px;
}

.mm-footer-inner {
    max-width: 1180px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1fr;
    gap: 32px;
}

@media (max-width: 820px) {
    .mm-footer-inner { grid-template-columns: 1fr 1fr; }
    .mm-header-cta { display: none; }
    .mm-hero-overlay-card { left: 14px; right: 14px; bottom: 14px; max-width: none; padding: 20px; }
    .mm-hero-map-box { height: 460px; }
}

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

.mm-footer-logo {
    background: #fff;
    padding: 8px 14px;
    border-radius: 12px;
    display: inline-block;
    margin-bottom: 14px;
}

.mm-footer-logo img {
    height: 38px;
    width: auto;
    display: block;
}

.mm-footer h4 {
    color: #fff;
    margin: 0 0 12px 0;
    font-size: 1rem;
}

.mm-footer ul {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.mm-footer a {
    color: #cbd5e1;
    text-decoration: none;
    font-size: 0.92rem;
}

.mm-footer a:hover { color: var(--mm-orange); }

.mm-footer-bottom {
    max-width: 1180px;
    margin: 32px auto 0;
    padding-top: 20px;
    border-top: 1px solid rgba(255,255,255,0.12);
    font-size: 0.85rem;
    color: #94a3b8;
    display: flex;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 10px;
}

/* Čistý světlý vzhled mapových dlaždic OpenStreetMap bez API klíče */
.mm-osm-tiles { filter: saturate(0.25) brightness(1.04) contrast(0.95); }
