/* Katedry + Odkazy – sjednoceno se spolky/info (Outfit, shell 1000px, stejné tokeny) */
@import url("https://fonts.googleapis.com/css2?family=Inter:opsz,wght@14..32,400;14..32,500;14..32,600;14..32,700;14..32,800;14..32,900&family=Outfit:wght@600;700;800;900&display=swap");
/* theme.css + nav.css nalinkované v PHP – tady neimportovat, aby se HTML zdvojeně nenačetly */

/* ── Design tokeny (stejné názvy jako u spolky) ── */
:root {
    --bg: var(--pass-bg);
    --surface: var(--pass-surface);
    --surface-dim: var(--pass-surface-dim);
    --border: var(--pass-line);
    --border-strong: var(--pass-line-strong);
    --ink: var(--pass-ink);
    --ink-2: var(--pass-ink-2);
    --muted: var(--pass-muted);
    --muted-2: var(--pass-muted-2);
    --odk-pinned-ac: #475569;
    --radius-xl: 20px;
    --radius-lg: 16px;
    --radius-md: 12px;
    --radius-sm: 8px;
    --radius-xs: 6px;
    --shadow-xs: 0 1px 2px rgba(0, 0, 0, 0.04);
    --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.06), 0 1px 2px rgba(0, 0, 0, 0.04);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.06), 0 2px 4px -2px rgba(0, 0, 0, 0.04);
    --ease: cubic-bezier(0.16, 1, 0.3, 1);
}

html[data-theme="dark"] {
    --shadow-xs: 0 1px 2px rgba(0, 0, 0, 0.35);
    --shadow-sm: 0 2px 6px rgba(0, 0, 0, 0.4);
    --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.45);
}

html.pass-subhtml {
    overflow-x: hidden;
}

body.pass-subbody {
    margin: 0;
    min-height: 100dvh;
    padding-top: 56px;
    display: flex;
    flex-direction: column;
    font-family: "Inter", system-ui, -apple-system, sans-serif;
    color: var(--ink);
    background: var(--bg);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* Shell a sdílené se spolky */
.shell {
    max-width: 1000px;
    margin: 0 auto;
    padding: 0 20px 0;
    flex: 1 0 auto;
    width: 100%;
    box-sizing: border-box;
}

/* Hero – vlevo, stejně jako Spolky (ne centrovat) */
.pass-page-hero {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    text-align: left;
    padding: 28px 0 16px;
}

@media (max-width: 640px) {
    .pass-page-hero {
        padding: 20px 0 12px;
    }
}

.pass-page-hero .hero-h1 {
    margin: 0;
    font-family: "Outfit", "Inter", sans-serif;
    font-size: clamp(26px, 5vw, 36px);
    font-weight: 900;
    letter-spacing: -1px;
    line-height: 1.05;
    color: var(--ink);
}

.pass-page-hero .hero-p {
    margin: 8px 0 0;
    font-size: 14px;
    color: var(--muted);
    font-weight: 500;
    line-height: 1.5;
    max-width: 500px;
}

/* Vyhledávání – odstup od hero (ne „nalepeno“) */
main.shell .search-wrap {
    position: relative;
    margin: 20px 0 32px;
}

.search-icon {
    position: absolute;
    left: 18px;
    top: 50%;
    transform: translateY(-50%);
    width: 18px;
    height: 18px;
    color: var(--muted-2);
    pointer-events: none;
    transition: color 0.2s;
}

.search-wrap:focus-within .search-icon {
    color: var(--ink-2);
}

.search-icon svg {
    display: block;
    width: 100%;
    height: 100%;
    stroke: currentColor;
    fill: none;
}

.search-input {
    width: 100%;
    box-sizing: border-box;
    padding: 15px 18px 15px 48px;
    border: 1.5px solid var(--border);
    border-radius: var(--radius-md);
    background: var(--surface);
    font-size: 15px;
    font-family: inherit;
    color: var(--ink);
    box-shadow: var(--shadow-xs);
    transition: border-color 0.25s var(--ease), box-shadow 0.25s var(--ease);
}

.search-input:focus {
    outline: none;
    border-color: var(--border-strong);
    box-shadow: 0 0 0 4px rgba(100, 116, 139, 0.08), var(--shadow-sm);
}

.search-input::placeholder {
    color: var(--muted-2);
}

/* Sekce */
.sub-section {
    margin-bottom: 32px;
}

.sub-section .section-head {
    display: flex;
    align-items: baseline;
    gap: 10px;
    margin-bottom: 16px;
    padding-bottom: 12px;
    border-bottom: 2px solid var(--border);
}

.sub-section .section-title {
    margin: 0;
    font-family: "Outfit", "Inter", sans-serif;
    font-size: 21px;
    font-weight: 800;
    letter-spacing: -0.3px;
    color: var(--ink);
}

.sub-section .section-count {
    font-size: 12px;
    font-weight: 700;
    color: var(--muted);
    background: var(--surface-dim);
    padding: 2px 10px;
    border-radius: var(--radius-xs);
}

.hidden {
    display: none !important;
}

.empty-state {
    text-align: center;
    padding: 40px 20px;
    font-size: 14.5px;
    font-weight: 600;
    color: var(--muted);
    border: 2px dashed var(--border);
    border-radius: var(--radius-lg);
    background: var(--surface);
}

/* ── Katedry: seznam, rozbalovací karty (details) ── */
.kat-list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.kat-tile {
    min-width: 0;
}

/* Accordion = jedna katedra (--dcol dědí z <li style="--dcl: #hex z YAML">; tady nedefinovat, jinak by se potlačil věrný tón) */
.kat-d {
    margin: 0;
    border: 1.5px solid var(--border);
    border-radius: var(--radius-lg);
    background: var(--surface);
    box-shadow: var(--shadow-xs);
    transition: box-shadow 0.25s var(--ease), border-color 0.25s var(--ease);
    overflow: hidden;
}

.kat-d:hover {
    border-color: color-mix(in srgb, var(--dcol) 40%, var(--border));
    box-shadow: var(--shadow-sm);
}

.kat-d[open] {
    box-shadow: var(--shadow-md);
    border-color: var(--dcol);
}

/* Rozbalený obsah: animace výšky jen s JS (katedry.js) + třída na <html> */
html.katedry-accordion--active .kat-anim {
    height: 0;
    overflow: hidden;
    transition: height 0.7s cubic-bezier(0.32, 0.72, 0.2, 1);
    will-change: height;
}

html.katedry-accordion--active .kat-d--reduced .kat-anim,
html:not(.katedry-accordion--active) .kat-anim {
    height: auto;
    overflow: visible;
    will-change: auto;
    transition: none;
}

/* horní pruh: klikací */
.kat-sum {
    list-style: none;
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 0 12px;
    padding: 14px 16px 14px 0;
    cursor: pointer;
    -webkit-tap-highlight-color: transparent;
}

.kat-sum::-webkit-details-marker {
    display: none;
}

.kat-sum::marker {
    content: "";
    display: none;
}

/* Silný svislý proužek vlevo (jako v návrhu) */
.kat-stripe {
    align-self: stretch;
    width: 6px;
    min-height: 72px;
    margin-right: 4px;
    flex-shrink: 0;
    background: var(--dcol);
    border-radius: 0 3px 3px 0;
}

.kat-ava {
    width: 64px;
    height: 64px;
    flex-shrink: 0;
    border-radius: var(--radius-sm);
    border: none;
    background: transparent;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    font-family: "Outfit", "Inter", sans-serif;
    font-size: 13px;
    font-weight: 800;
    color: #fff;
}

.kat-ava .kat-ava-img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    padding: 0;
    display: block;
    box-sizing: border-box;
}

.kat-ava .kat-av-fb {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    line-height: 1.1;
    padding: 0.1rem;
}

/* Text: název nahoře, kód dole (pořadí jako reference) */
.kat-headtxt {
    flex: 1;
    min-width: 0;
    text-align: left;
}

.kat-ttl {
    margin: 0 0 4px;
    font-size: 15px;
    font-weight: 700;
    line-height: 1.3;
    color: var(--ink);
}

.kat-abbrev {
    margin: 0;
    font-size: 12px;
    font-weight: 600;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--muted-2);
}

.kat-chev {
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    color: color-mix(in srgb, var(--dcol) 55%, var(--muted-2));
    border-radius: var(--radius-sm);
    transition: transform 0.25s var(--ease), color 0.2s;
}

.kat-d[open] .kat-chev {
    transform: rotate(180deg);
    color: var(--dcol);
}

.kat-sum:hover .kat-chev {
    color: var(--dcol);
}

/* Tělo karty (uvnitř .kat-anim) */
.kat-body {
    border-top: 1px solid var(--border);
    background: var(--bg);
    padding: 0 20px 18px;
    box-sizing: border-box;
}

html[data-theme="dark"] .kat-body {
    background: color-mix(in srgb, var(--surface) 88%, var(--bg));
}

.kat-fgrid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 12px 16px;
    padding: 16px 0 4px;
}

.kat-fld {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 2px 0;
}

.kat-flab {
    font-size: 10px;
    font-weight: 800;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--muted-2);
}

.kat-fval {
    font-size: 14px;
    font-weight: 500;
    line-height: 1.4;
    color: var(--ink);
    word-break: break-word;
    max-width: 100%;
}

a.kat-mail {
    font-weight: 600;
    text-decoration: none;
    color: #2563eb;
}

html[data-theme="dark"] a.kat-mail {
    color: #93c5fd;
}

a.kat-mail:hover {
    text-decoration: underline;
}

a.kat-webbtn {
    display: block;
    width: 100%;
    box-sizing: border-box;
    text-align: center;
    margin-top: 4px;
    padding: 12px 16px;
    font-size: 14px;
    font-weight: 800;
    font-family: "Inter", sans-serif;
    color: #fff;
    text-decoration: none;
    border-radius: var(--radius-md);
    background: var(--dcol);
    border: 1px solid var(--dcol);
    box-shadow: var(--shadow-xs);
    transition: opacity 0.15s ease, transform 0.1s ease;
}

a.kat-webbtn:hover {
    opacity: 0.94;
}

a.kat-webbtn:focus-visible {
    outline: 2px solid var(--ink-2);
    outline-offset: 2px;
}

.kat-chev svg {
    display: block;
}

/* ── Odkazy: grid dle spolky, karty v stylu .cc, seznam v panelu ── */
.odk-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 12px;
}

@media (max-width: 640px) {
    .odk-grid {
        grid-template-columns: 1fr;
    }
}

@media (min-width: 960px) {
    .odk-grid--pin {
        grid-template-columns: repeat(3, 1fr);
    }
}

/* Připnuté – tónování jemné (bez emoji), jako luxus karta */
.odk-pcard {
    --ac: var(--odk-pinned-ac);
    display: flex;
    flex-direction: column;
    gap: 8px;
    min-height: 0;
    padding: 16px 18px;
    border-radius: var(--radius-lg);
    border: 1.5px solid var(--border);
    background: var(--surface);
    text-align: left;
    text-decoration: none;
    color: inherit;
    position: relative;
    overflow: hidden;
    box-shadow: var(--shadow-xs);
    transition: border-color 0.3s var(--ease), box-shadow 0.3s var(--ease), transform 0.3s var(--ease);
}

.odk-pcard::before {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, color-mix(in srgb, var(--ac) 7%, transparent), transparent 60%);
    opacity: 0;
    transition: opacity 0.3s var(--ease);
    pointer-events: none;
}

.odk-pcard:hover::before {
    opacity: 1;
}

.odk-pcard:hover {
    border-color: color-mix(in srgb, var(--ac) 35%, var(--border));
    box-shadow: var(--shadow-md);
    transform: translateY(-2px);
}

.odk-pcard:focus-visible {
    outline: 2px solid var(--ac);
    outline-offset: 2px;
}

.odk-pcard-badge {
    display: inline-block;
    width: max-content;
    max-width: 100%;
    margin-bottom: 2px;
    font-size: 9px;
    font-weight: 800;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--ac);
    opacity: 0.9;
}

.odk-pcard-tit {
    margin: 0;
    font-size: 16px;
    font-weight: 800;
    line-height: 1.25;
    color: var(--ink);
    font-family: "Outfit", "Inter", sans-serif;
    letter-spacing: -0.3px;
}

.odk-pcard-desc {
    margin: 0;
    font-size: 13px;
    line-height: 1.5;
    color: var(--muted);
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
    flex: 1;
}

.odk-pcard-cta {
    display: block;
    margin-top: 4px;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: var(--muted-2);
    flex-shrink: 0;
}

/* Panel seznamu jako jeden box */
.odk-listwrap {
    list-style: none;
    margin: 0;
    padding: 0;
    border: 1.5px solid var(--border);
    border-radius: var(--radius-lg);
    background: var(--surface);
    box-shadow: var(--shadow-xs);
    overflow: hidden;
}

.odk-litem {
    list-style: none;
    border-bottom: 1px solid var(--border);
}

.odk-litem:last-child {
    border-bottom: none;
}

.odk-lnk {
    display: flex;
    flex-direction: column;
    gap: 0.1rem;
    padding: 12px 16px 12px 18px;
    text-decoration: none;
    color: inherit;
    line-height: 1.3;
    transition: background 0.15s ease;
}

@media (min-width: 700px) {
    .odk-lnk {
        flex-direction: row;
        flex-wrap: nowrap;
        align-items: baseline;
        justify-content: space-between;
        gap: 0.4rem 1.25rem;
    }
}

.odk-lnk:hover,
.odk-lnk:focus {
    background: var(--surface-dim);
    outline: none;
}

.odk-ttl {
    font-size: 0.9rem;
    font-weight: 700;
    color: var(--ink);
    min-width: 0;
    word-break: break-word;
}

@media (min-width: 700px) {
    .odk-ttl {
        max-width: 40%;
    }
}

.odk-ddesc {
    font-size: 0.8rem;
    line-height: 1.45;
    font-weight: 500;
    color: var(--muted);
    min-width: 0;
    flex: 1;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

@media (min-width: 700px) {
    .odk-ddesc {
        text-align: right;
        -webkit-line-clamp: 3;
    }
}

/* Patička: theme.css; zde jen shell/search na mobilu */
@media (max-width: 640px) {
    .shell {
        padding: 0 16px 0;
    }

    .search-input {
        padding: 13px 16px 13px 44px;
        font-size: 14px;
    }
}

@media (max-width: 380px) {
    .shell {
        padding: 0 12px 0;
    }
}
