/* ZUŠ Štefana Baláža Nová Dubnica – verejný web */
@font-face { font-family: "Unbounded"; src: url("../fonts/unbounded.woff") format("woff"); font-weight: 200 900; font-display: swap; }
@font-face { font-family: "Source Sans 3"; src: url("../fonts/source-sans-3.woff") format("woff"); font-weight: 200 900; font-display: swap; }
@font-face { font-family: "Source Sans 3"; src: url("../fonts/source-sans-3-italic.woff") format("woff"); font-weight: 200 900; font-style: italic; font-display: swap; }

:root {
  --ink: #1B2340; --ink-2: #3A4058; --muted: #555B70; --line: #E4E6EE; --soft: #F6F7FA; --gray: #F4F5F8;
  --dark: #1B2340; --darker: #12182E; --blue: #2F5BD3;
  --head: "Unbounded", system-ui, sans-serif; --body: "Source Sans 3", system-ui, -apple-system, "Segoe UI", sans-serif;
  --r: 18px;
}
*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body { margin: 0; background: #fff; color: var(--ink); font-family: var(--body); font-size: 18px; line-height: 1.55; }
img { max-width: 100%; height: auto; display: block; }
a { color: var(--ink); text-decoration: none; }
a:hover { color: var(--blue); }
.prose a { color: var(--blue); text-decoration: underline; text-underline-offset: 3px; }
:focus-visible { outline: 3px solid var(--blue); outline-offset: 3px; border-radius: 4px; }
.wrap { max-width: 1200px; margin: 0 auto; padding-left: 24px; padding-right: 24px; }
.visually-hidden { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: absolute; left: 12px; top: -60px; background: var(--dark); color: #fff; padding: 10px 16px; border-radius: 10px; z-index: 100; font-weight: 700; }
.skip:focus { top: 12px; color: #fff; }
main:focus { outline: none; }
.muted { color: var(--muted); }
.hp { position: absolute; left: -9999px; }

/* Top bar + header */
.topbar { background: var(--dark); color: #fff; font-size: 15px; }
.topbar-in { display: flex; flex-wrap: nowrap; justify-content: space-between; align-items: flex-start; gap: 6px 16px; padding-top: 8px; padding-bottom: 8px; }
.topbar a { color: #fff; }
.topbar a:hover { color: #FCEFD9; }
.topbar-contacts, .topbar-social { display: flex; flex-wrap: wrap; gap: 6px 22px; }
.topbar-contacts { flex: 1 1 auto; min-width: 0; }
.topbar-social { flex: 0 0 auto; justify-content: flex-end; text-align: right; }
@media (max-width: 560px) { .topbar-in { flex-wrap: wrap; gap: 4px 16px; } .topbar-contacts, .topbar-social { flex-wrap: nowrap; gap: 16px; white-space: nowrap; } .topbar-contacts { flex: 0 1 auto; } .topbar-social { margin-left: auto; } }
.site-header { border-bottom: 1px solid var(--line); background: #fff; position: relative; z-index: 20; }
.header-in { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 16px 32px; padding-top: 16px; padding-bottom: 16px; }
.brand { display: flex; align-items: center; gap: 14px; color: var(--ink); }
.brand img { width: 48px; height: 48px; object-fit: contain; }
.brand-text { display: flex; flex-direction: column; line-height: 1.15; }
.brand-name { font-family: var(--head); font-weight: 700; font-size: 18px; }
.brand-sub { font-size: 15px; color: var(--muted); }
.nav-toggle { display: none; align-items: center; gap: 10px; min-height: 44px; padding: 0 14px; border: 2px solid var(--ink); border-radius: 999px; background: #fff; color: var(--ink); font: inherit; font-weight: 700; cursor: pointer; }
.nav-toggle-bars, .nav-toggle-bars::before, .nav-toggle-bars::after { display: block; width: 18px; height: 2px; background: currentColor; position: relative; }
.nav-toggle-bars::before, .nav-toggle-bars::after { content: ""; position: absolute; left: 0; }
.nav-toggle-bars::before { top: -6px; } .nav-toggle-bars::after { top: 6px; }
.main-nav > ul { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 4px 8px; }
.main-nav li { position: relative; display: flex; align-items: center; }
.main-nav > ul > li > a { display: inline-flex; align-items: center; min-height: 44px; padding: 0 10px; font-weight: 600; font-size: 17px; }
.main-nav a[aria-current="page"] { color: var(--blue); }
.sub-toggle { width: 32px; height: 44px; border: 0; background: transparent; color: var(--ink); cursor: pointer; margin-left: -6px; display: inline-flex; align-items: center; justify-content: center; }
.sub-toggle[aria-expanded="true"] svg { transform: rotate(180deg); }
.main-nav .sub { list-style: none; margin: 0; padding: 8px; position: absolute; top: 100%; left: 0; min-width: 260px; background: #fff; border: 1px solid var(--line); border-radius: 14px; box-shadow: 0 16px 40px rgba(18,24,46,.14); display: none; z-index: 30; }
.main-nav .sub a { display: block; padding: 10px 12px; border-radius: 8px; font-weight: 600; font-size: 16px; }
.main-nav .sub a:hover { background: var(--soft); }
.main-nav li.has-sub:hover > .sub, .main-nav li.has-sub.open > .sub, .main-nav li.has-sub:focus-within > .sub { display: block; }
@media (max-width: 900px) {
  .nav-toggle { display: inline-flex; }
  .main-nav { display: none; width: 100%; }
  .main-nav.open { display: block; }
  .main-nav > ul { flex-direction: column; gap: 0; border-top: 1px solid var(--line); padding-top: 8px; }
  .main-nav li { flex-wrap: wrap; }
  .main-nav > ul > li > a { flex: 1; }
  .main-nav .sub { position: static; box-shadow: none; border: 0; padding: 0 0 8px 16px; min-width: 0; width: 100%; }
  .main-nav li.has-sub:hover > .sub, .main-nav li.has-sub:focus-within > .sub { display: none; }
  .main-nav li.has-sub.open > .sub { display: block; }
}

.flash-wrap { padding-top: 16px; }
.flash { margin: 0 0 8px; padding: 14px 18px; border-radius: 12px; background: #E0F3EF; color: #0E6558; font-weight: 600; }
.flash-err { background: #FBE7ED; color: #9E2246; }

/* Typography */
h1, h2, h3, h4 { font-family: var(--head); font-weight: 700; line-height: 1.15; margin: 0; }
.h-page { font-size: clamp(30px, 4vw, 42px); margin: 0 0 16px; letter-spacing: -0.01em; }
.h-section { font-size: clamp(26px, 3vw, 32px); }
.h-sub { font-size: 22px; margin: 0 0 12px; }
.h-sub.small { font-size: 17px; margin-top: 28px; }
.lead { font-size: 20px; color: var(--ink-2); margin: 0 0 24px; }
.eyebrow { margin: 0 0 16px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; font-size: 14px; color: var(--muted); }
.section-sub { margin: 8px 0 32px; color: var(--ink-2); }
.prose { font-size: 19px; color: var(--ink-2); }
.prose h2 { font-size: 26px; margin: 1.6em 0 .5em; color: var(--ink); }
.prose h3 { font-size: 20px; margin: 1.4em 0 .4em; color: var(--ink); }
.prose p { margin: 0 0 1em; }
.prose ul, .prose ol { padding-left: 1.3em; margin: 0 0 1em; }
.prose img { border-radius: 14px; margin: 1em 0; }
.prose table { border-collapse: collapse; width: 100%; display: block; overflow-x: auto; }
.prose th, .prose td { border: 1px solid var(--line); padding: 8px 12px; text-align: left; }

/* Buttons */
.btn { display: inline-flex; align-items: center; gap: 8px; min-height: 52px; padding: 0 26px; border-radius: 999px; font: inherit; font-weight: 700; cursor: pointer; border: 2px solid transparent; text-decoration: none; }
.btn-dark { background: var(--dark); color: #fff; }
.btn-dark:hover { background: var(--blue); color: #fff; }
.btn-line { border-color: var(--ink); color: var(--ink); background: #fff; }
.btn-line:hover { border-color: var(--blue); color: var(--blue); }
.btn-light { background: #fff; color: var(--ink); }
.btn-light:hover { background: #FCEFD9; color: var(--ink); }
.btn-sm { min-height: 44px; padding: 0 16px; font-size: 15px; }
.btn .ext { font-size: 12px; color: #9E2246; }
.btn-row { display: flex; flex-wrap: wrap; gap: 12px; }

/* Hero */
.hero { padding-top: 64px; padding-bottom: clamp(40px, 6vw, 64px); display: flex; flex-wrap: wrap; gap: 48px; align-items: center; }
.hero-text { flex: 1 1 520px; min-width: 0; }
.hero h1 { font-size: clamp(36px, 5vw, 52px); line-height: 1.05; letter-spacing: -0.02em; margin: 0 0 24px; }
.hero .lead { max-width: 560px; margin-bottom: 32px; }
.hero-art { flex: 1 1 380px; min-width: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.ha { display: block; height: 150px; border-radius: 20px; background: #F1F2F6; background-size: cover; background-position: center; }
.ha-1 { grid-column: span 2; background-color: #2F5BD3; }
.ha-2 { border-radius: 999px; background-color: #C7365F; }
.ha-3 { border-radius: 999px; background-color: #E08A1E; }
.ha-5 { border-radius: 20px 20px 999px 20px; background-color: #6A3FB5; }
.ha-6 { grid-column: span 2; }
.ha-7 { background-color: #13806F; }
@media (max-width: 600px) { .ha { height: 90px; } }

/* Waves */
.wave { position: relative; margin-bottom: -1px; }
.wave-line { position: absolute; left: 0; top: -1px; width: 100%; height: 13px; display: block; z-index: 1; }
.wave-drip { position: absolute; top: 1px; margin-left: -15px; z-index: 0; }
.drop { position: absolute; top: 74px; width: 9px; height: 11px; margin-left: -4px; border-radius: 50% 50% 50% 50% / 60% 60% 40% 40%; z-index: 2; opacity: 0; pointer-events: none; animation: kvap 5s ease-in infinite; }
@keyframes kvap { 0% { opacity: 0; transform: translateY(-6px) scale(.3); } 10% { opacity: 1; } 40% { transform: translateY(3px) scale(1); } 55% { transform: translateY(7px) scale(1, 1.15); } 80% { opacity: 1; transform: translateY(95px) scale(.85, 1.25); } 90%, 100% { opacity: 0; transform: translateY(115px) scale(.7); } }
@media (prefers-reduced-motion: reduce) { .drop { animation: none; } html { scroll-behavior: auto; } }
.band-gray { background: var(--gray); }

/* Odbory */
.section-odbory { padding-bottom: clamp(56px, 8vw, 96px); }
.odb-wrap { container-type: inline-size; }
.odb { display: grid; gap: 16px; grid-template-columns: repeat(6, minmax(0, 1fr)); }
.odb > .odb-card { grid-column: span 2; }
.odb > .odb-card:nth-of-type(n+4) { grid-column: span 3; }
@container (max-width: 900px) { .odb { grid-template-columns: repeat(2, minmax(0, 1fr)); } .odb > .odb-card, .odb > .odb-card:nth-of-type(n+4) { grid-column: span 1; } .odb > .odb-card:last-of-type:nth-of-type(odd) { grid-column: 1 / -1; } }
@container (max-width: 560px) { .odb { grid-template-columns: minmax(0, 1fr); } .odb > .odb-card:last-of-type:nth-of-type(odd) { grid-column: auto; } }
.odb-card { text-align: left; font: inherit; color: var(--ink); background: #fff; border: 3px solid var(--line); border-radius: var(--r); padding: 22px; cursor: pointer; display: flex; flex-direction: column; gap: 14px; min-height: 230px; height: 100%; transition: border-color .2s, transform .2s; }
.odb-card:hover { border-color: var(--c); transform: translateY(-2px); }
.odb-card[aria-expanded="true"] { border-color: var(--c); }
.odb-code { display: inline-flex; align-items: center; justify-content: center; min-width: 56px; height: 56px; padding: 0 10px; border-radius: 14px; background: var(--c); color: #fff; font-family: var(--head); font-weight: 700; font-size: 18px; align-self: flex-start; }
.odb-code.big { min-width: 72px; height: 72px; font-size: 22px; margin-bottom: 18px; }
.odb-name { font-family: var(--head); font-weight: 700; font-size: 19px; line-height: 1.2; }
.odb-short { font-size: 16px; color: var(--ink-2); flex-grow: 1; }
.odb-cta { font-weight: 700; font-size: 16px; color: var(--c); }
.odb-card .cta-open, .odb-card[aria-expanded="true"] .cta-closed { display: none; }
.odb-card[aria-expanded="true"] .cta-open { display: inline; }
.odb-detail { margin-top: 20px; }
.odb > .odb-detail { grid-column: 1 / -1; margin-top: 4px; }
.odb-detail .odb-panel { position: relative; animation: odb-open .28s ease-out; }
.odb-detail .odb-panel::before { content: ""; position: absolute; top: -11px; left: var(--notch, 48px); width: 18px; height: 18px; background: #fff; border-top: 2px solid var(--c); border-left: 2px solid var(--c); border-top-left-radius: 4px; transform: rotate(45deg); transition: left .2s; }
@keyframes odb-open { from { opacity: 0; transform: translateY(-8px); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) { .odb-detail .odb-panel { animation: none; } .odb-detail .odb-panel::before { transition: none; } }
.odb-panel { background: #fff; border-radius: 22px; border: 2px solid var(--c); padding: clamp(24px, 4vw, 40px); display: flex; flex-wrap: wrap; gap: 32px 48px; }
.odb-panel-main { flex: 1 1 520px; min-width: 0; }
.odb-panel-code { margin: 0 0 8px; font-weight: 700; font-size: 14px; letter-spacing: .08em; text-transform: uppercase; color: var(--c); }
.odb-panel h3 { font-size: 28px; margin: 0 0 16px; }
.odb-panel-side { flex: 1 1 240px; min-width: 0; display: flex; flex-direction: column; gap: 12px; }
.side-link { display: flex; align-items: center; min-height: 52px; padding: 0 22px; border-radius: 14px; background: var(--soft); font-weight: 700; font: inherit; font-weight: 700; color: var(--ink); border: 0; cursor: pointer; text-align: left; }
.side-close { background: #fff; border: 2px solid #D5D8E2; }

/* About */
.about { padding-top: 8px; padding-bottom: clamp(56px, 8vw, 96px); display: flex; flex-wrap: wrap; gap: 32px 64px; }
.about .h-section { flex: 1 1 300px; line-height: 1.15; }
.about-text { flex: 2 1 520px; min-width: 0; }

/* Cards */
.section-news { padding-top: 24px; padding-bottom: clamp(56px, 8vw, 96px); }
.section-head { display: flex; flex-wrap: wrap; gap: 12px; justify-content: space-between; align-items: baseline; margin-bottom: 28px; }
.more { font-weight: 700; }
.cards-3 { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 20px; }
.card { position: relative; display: flex; flex-direction: column; border: 1px solid var(--line); border-radius: var(--r); overflow: hidden; background: #fff; transition: border-color .2s, transform .2s; }
.card:hover { border-color: #B9BECE; transform: translateY(-2px); }
.card-img { width: 100%; aspect-ratio: 16 / 10; object-fit: cover; }
.card-body { padding: 20px 22px 24px; display: flex; flex-direction: column; gap: 10px; }
.card-meta { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; font-size: 14px; color: var(--muted); margin: 0; }
.card-title { font-size: 19px; line-height: 1.25; }
.card-text { margin: 0; font-size: 16px; color: var(--ink-2); }
.stretched::after { content: ""; position: absolute; inset: 0; }
.badge { display: inline-block; font-weight: 700; padding: 3px 10px; border-radius: 999px; font-size: 14px; }

/* 2 % band */
.band-dark { background: var(--dark); color: #fff; }
.band-in { padding-bottom: 72px; display: flex; flex-wrap: wrap; gap: 24px 48px; align-items: center; justify-content: space-between; }
.band-in p { color: #D5D8E2; margin: 10px 0 0; }
.h-band { font-size: 28px; }

/* Contacts */
.contacts { padding-top: 16px; padding-bottom: clamp(56px, 8vw, 96px); display: flex; flex-wrap: wrap; gap: 40px 56px; }
.contacts-main { flex: 1 1 460px; min-width: 0; display: flex; flex-direction: column; gap: 24px; }
.contacts-name { margin: 0 0 4px; font-weight: 700; font-size: 20px; }
.contacts p { margin: 0; }
.person { display: flex; gap: 16px; align-items: center; }
.person img, .person-ph { width: 56px; height: 56px; border-radius: 999px; object-fit: cover; flex: none; }
.person-ph { display: flex; align-items: center; justify-content: center; background: #FCEFD9; font-family: var(--head); font-weight: 700; color: #8A4B06; }
.contact-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 16px; }
.contact-card { display: flex; flex-direction: column; gap: 2px; padding: 18px 20px; border-radius: 16px; background: var(--soft); color: var(--ink); min-width: 0; overflow-wrap: anywhere; }
.contact-card span { font-size: 14px; font-weight: 700; color: var(--muted); }
.contact-card strong { font-size: 20px; }
.contact-card.wide { grid-column: 1 / -1; }
.map { flex: 1 1 400px; min-width: 0; min-height: 320px; border-radius: 22px; background: #EDEEF3; display: flex; align-items: center; justify-content: center; padding: 24px; }
.map-link { display: flex; gap: 16px; align-items: center; color: var(--ink); font-size: 17px; }

/* Footer */
.site-footer { background: var(--darker); color: #D5D8E2; font-size: 16px; }
.site-footer a { color: #D5D8E2; }
.site-footer a:hover { color: #fff; }
.footer-grid { padding-top: 8px; padding-bottom: 32px; display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 32px; }
.footer-title { margin: 0 0 10px; color: #fff; font-family: var(--head); font-weight: 700; font-size: 18px; }
.footer-head { margin: 0 0 10px; color: #fff; font-weight: 700; }
.footer-grid p { margin: 0; }
.footer-links { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.footer-bottom { padding-top: 20px; padding-bottom: 32px; border-top: 1px solid #2A3150; font-size: 14px; }

/* Inner pages */
.crumbs { padding-top: 20px; font-size: 15px; color: var(--muted); }
.crumbs a { color: var(--muted); }
.page-wrap { padding-top: 32px; padding-bottom: 72px; }
.page-wrap.narrow { max-width: 860px; }
.page-hero-img { display: block; border-radius: 20px; margin: 8px 0 32px; width: auto; max-width: 100%; max-height: min(640px, 75vh); }
.back { margin-top: 40px; font-weight: 700; }
.dep-head { margin-bottom: 24px; }
.child-pages { list-style: none; padding: 0; margin: 32px 0 0; display: grid; gap: 10px; }
.child-pages a { display: block; padding: 16px 20px; border-radius: 14px; background: var(--soft); font-weight: 700; }
.chips { display: flex; flex-wrap: wrap; gap: 10px; margin: 8px 0 32px; }
.chip { display: inline-flex; align-items: center; min-height: 44px; padding: 0 18px; border-radius: 999px; font-weight: 700; font-size: 16px; border: 2px solid var(--c); color: var(--t, var(--ink)); background: #fff; }
.chip.is-on, .chip:hover { background: var(--c); color: #fff; }
.news-list { display: flex; flex-direction: column; gap: 16px; }
.news-row { position: relative; display: flex; flex-wrap: wrap; gap: 20px 32px; border: 1px solid var(--line); border-radius: var(--r); padding: 24px; }
.news-row > img, .news-ph { flex: 0 0 220px; height: 140px; border-radius: 12px; object-fit: cover; }
.news-row > div { flex: 1 1 420px; min-width: 0; display: flex; flex-direction: column; gap: 8px; }
.news-title { font-size: 22px; line-height: 1.2; }
.news-row:hover { border-color: #B9BECE; }
@media (max-width: 600px) { .news-row > img, .news-ph { flex-basis: 100%; height: 180px; } }
.empty { padding: 32px; border-radius: 18px; background: var(--soft); color: var(--ink-2); text-align: center; margin: 0; }
.pager { display: flex; gap: 8px; margin-top: 36px; flex-wrap: wrap; }
.pager a { display: inline-flex; align-items: center; justify-content: center; min-width: 44px; height: 44px; padding: 0 12px; border-radius: 12px; border: 1px solid #D5D8E2; font-weight: 700; }
.pager a.is-on { background: var(--dark); color: #fff; border-color: var(--dark); }

/* Documents */
.docs-layout { display: flex; flex-wrap: wrap; gap: 40px 56px; align-items: flex-start; }
.docs-main { flex: 999 1 640px; min-width: 0; }
.docs-side { flex: 1 0 312px; min-width: 0; background: var(--soft); border-radius: 18px; padding: 22px; position: sticky; top: 16px; }
.docs-side ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 4px; }
.docs-side a { display: flex; align-items: center; min-height: 44px; padding: 0 12px; border-radius: 10px; font-weight: 600; }
.docs-side a:hover { background: #fff; }
.side-title { margin: 0 0 10px; font-weight: 700; }
@media (max-width: 900px) { .docs-side { position: static; order: -1; } }
.field { display: flex; flex-direction: column; gap: 6px; margin-bottom: 20px; max-width: 560px; }
.field label { font-weight: 700; font-size: 16px; }
.field input, .field textarea, .field select { font: inherit; min-height: 52px; padding: 10px 16px; border: 2px solid #B9BECE; border-radius: 14px; color: var(--ink); background: #fff; }
.field textarea { min-height: 120px; }
.doc-cat { margin: 0 0 44px; scroll-margin-top: 16px; }
.doc-cat > .h-sub { color: var(--c, var(--ink)); }
.doc-list { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--line); }
.doc-row { position: relative; display: flex; flex-wrap: wrap; gap: 12px 20px; align-items: center; padding: 16px 4px; border-bottom: 1px solid var(--line); }
.doc-row:hover .doc-dl { border-color: var(--blue); color: var(--blue); }
.doc-ext { display: inline-flex; align-items: center; justify-content: center; width: 48px; height: 48px; border-radius: 12px; background: #FBE7ED; color: #9E2246; font-weight: 700; font-size: 13px; flex: none; }
.doc-info { flex: 1 1 260px; min-width: 0; display: flex; flex-direction: column; }
.doc-info a { font-weight: 700; }
.doc-info .muted { font-size: 15px; }
.doc-dl { display: inline-flex; align-items: center; min-height: 44px; padding: 0 18px; border-radius: 999px; border: 2px solid var(--ink); font-weight: 700; font-size: 16px; }
.year-box { border: 1px solid var(--line); border-radius: 18px; overflow: hidden; margin-top: 12px; }
.year-head { display: flex; flex-wrap: wrap; gap: 8px 16px; justify-content: space-between; align-items: center; padding: 16px 20px; background: var(--soft); }
.year-head h3 { font-size: 18px; }
.year-empty { margin: 0; padding: 16px 20px; color: var(--muted); }
.month-row { display: flex; flex-wrap: wrap; gap: 10px 16px; align-items: center; padding: 14px 20px; border-top: 1px solid var(--line); }
.month-label { min-width: 92px; font-family: var(--head); font-weight: 700; font-size: 16px; }
.month-name { flex: 1 1 140px; color: var(--muted); font-size: 15px; }
.month-files { display: flex; flex-wrap: wrap; gap: 8px; }
.more-months > summary, .archive-year > summary { cursor: pointer; font-weight: 700; color: var(--blue); padding: 14px 20px; border-top: 1px solid var(--line); list-style: none; }
.more-months > summary::-webkit-details-marker, .archive-year > summary::-webkit-details-marker { display: none; }
.archive-year { border: 1px solid var(--line); border-radius: 16px; margin-bottom: 10px; overflow: hidden; }
.archive-year > summary { border-top: 0; display: flex; flex-wrap: wrap; gap: 6px 14px; align-items: baseline; color: var(--ink); }
.archive-year > summary::after { content: "Rozbaliť ▼"; margin-left: auto; color: var(--blue); }
.archive-year[open] > summary::after { content: "Zbaliť ▲"; }
.ay-title { font-family: var(--head); font-size: 18px; }
.archive-year > p { margin: 0; padding: 0 20px 12px; }
.archive-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 8px; padding: 0 20px 20px; }
.archive-month { display: flex; flex-direction: column; gap: 4px; padding: 12px 14px; border-radius: 12px; background: var(--soft); font-size: 16px; }
.archive-month a { color: var(--blue); }

/* Gallery */
.album-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 20px; }
.album-cover { position: relative; aspect-ratio: 4 / 3; }
.album-cover img { width: 100%; height: 100%; object-fit: cover; }
.album-count { position: absolute; left: 12px; bottom: 12px; background: rgba(18,24,46,.82); color: #fff; font-size: 14px; font-weight: 700; padding: 3px 10px; border-radius: 999px; }
.media-grid { list-style: none; margin: 8px 0 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 12px; }
.media-item { position: relative; display: block; border-radius: 14px; overflow: hidden; aspect-ratio: 4 / 3; background: #EDEEF3; }
/* Fotky albumu: zarovnané riadky (každá fotka v pôvodnom pomere strán, riadok má rovnakú výšku) */
.media-grid[data-lightbox] { display: flex; flex-wrap: wrap; gap: 10px; }
.media-grid[data-lightbox] > li { --h: 240px; flex: calc(var(--r, 1.333) * 100) 1 calc(var(--r, 1.333) * var(--h)); min-width: 0; }
.media-grid[data-lightbox]::after { content: ""; flex: 1e6 1 0; }
.media-grid[data-lightbox] .media-item { aspect-ratio: var(--r, 1.333); border-radius: 12px; }
@media (max-width: 700px) { .media-grid[data-lightbox] > li { --h: 140px; } .media-grid[data-lightbox] { gap: 6px; } }
.media-item img { width: 100%; height: 100%; object-fit: cover; transition: transform .3s; }
.media-item:hover img { transform: scale(1.04); }
.media-item .play { position: absolute; left: 50%; top: 50%; width: 60px; height: 60px; margin: -30px 0 0 -30px; border-radius: 999px; background: #C7365F; display: flex; align-items: center; justify-content: center; }
.lightbox { position: fixed; inset: 0; z-index: 200; background: rgba(12,16,32,.95); display: flex; align-items: center; justify-content: center; gap: 12px; padding: 64px 12px 24px; }
.lightbox[hidden] { display: none; }
.lb-stage { margin: 0; flex: 1 1 auto; max-width: 1200px; height: 100%; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 12px; min-width: 0; }
.lb-media { flex: 1 1 auto; width: 100%; display: flex; align-items: center; justify-content: center; min-height: 0; }
.lb-media img { max-width: 100%; max-height: calc(100vh - 150px); object-fit: contain; border-radius: 8px; }
.lb-media iframe { width: 100%; max-width: 1100px; aspect-ratio: 16 / 9; border: 0; border-radius: 8px; }
.lb-cap { color: #fff; font-size: 16px; text-align: center; }
.lb-close, .lb-prev, .lb-next { flex: none; width: 52px; height: 52px; border-radius: 999px; border: 0; background: #fff; color: var(--ink); font-size: 28px; line-height: 1; cursor: pointer; display: flex; align-items: center; justify-content: center; }
.lb-close { position: absolute; top: 12px; right: 12px; }
@media (max-width: 600px) { .lb-prev, .lb-next { position: absolute; bottom: 16px; } .lb-prev { left: 16px; } .lb-next { right: 16px; } .lightbox { padding-bottom: 84px; } }

/* Popup */
.popup { position: fixed; inset: 0; z-index: 150; background: rgba(18,24,46,.6); display: flex; align-items: center; justify-content: center; padding: 20px; }
.popup[hidden] { display: none; }
.popup-box { position: relative; width: 100%; max-width: 480px; max-height: 90vh; overflow: auto; background: #fff; border-radius: 22px; padding: 30px; display: flex; flex-direction: column; gap: 14px; }
.popup-box h2 { font-size: 22px; padding-right: 48px; }
.popup-box img { border-radius: 12px; width: 100%; }
.popup-text { color: var(--ink-2); }
.popup-close { position: absolute; top: 12px; right: 12px; width: 44px; height: 44px; border-radius: 999px; border: 0; background: #F1F2F6; color: var(--ink); cursor: pointer; display: flex; align-items: center; justify-content: center; }
.popup-box p { margin: 0; }

.report-box { margin-top: 48px; padding: 28px; border-radius: 20px; background: var(--soft); }

/* Tabuľky dokumentov */
.doc-tools { display: flex; flex-wrap: wrap; gap: 12px 24px; align-items: flex-end; margin-bottom: 8px; }
.doc-tools .field { margin: 0; flex: 1 1 320px; }
.tbl-scroll { overflow-x: auto; border: 1px solid var(--line); border-radius: 16px; margin-top: 8px; }
.data-tbl { border-collapse: collapse; width: 100%; font-size: 16px; min-width: 760px; }
.data-tbl th { position: sticky; top: 0; background: var(--soft); text-align: left; font-weight: 700; padding: 12px 14px; border-bottom: 2px solid var(--line); vertical-align: bottom; }
.data-tbl td { padding: 10px 14px; border-bottom: 1px solid var(--line); vertical-align: top; }
.data-tbl tr:last-child td { border-bottom: 0; }
.data-tbl td.num { text-align: right; white-space: nowrap; font-variant-numeric: tabular-nums; }
.data-tbl tbody tr:hover { background: #FAFBFD; }
.none-chip { display: inline-flex; align-items: center; min-height: 44px; padding: 0 14px; border-radius: 999px; border: 2px dashed #D5D8E2; color: var(--muted); font-size: 15px; }
.none-text { color: var(--muted); font-size: 15px; }
.archive-month small { color: var(--muted); font-size: 13px; }

.archive-row { display: flex; flex-wrap: wrap; gap: 8px 16px; align-items: center; padding: 12px 20px; border-top: 1px solid var(--line); scroll-margin-top: 16px; }
.archive-row .ay-title { margin: 0; font-family: var(--head); font-weight: 400; font-size: 18px; }
.archive-row .muted { flex: 1 1 140px; font-size: 15px; }
.archive-more > summary { cursor: pointer; display: flex; align-items: center; min-height: 52px; padding: 0 20px; border-top: 1px solid var(--line); font-weight: 700; font-size: 15px; color: var(--blue); list-style: none; }
.archive-more > summary:hover { background: var(--soft); }
.archive-more > summary::-webkit-details-marker { display: none; }
.archive-more > summary::after { content: "▼"; margin-left: 8px; font-size: 12px; }
.archive-more[open] > summary::after { content: "▲"; }
.lead a { color: var(--blue); text-decoration: underline; text-underline-offset: 3px; }

/* Otvorený popis odboru – celé pozadie vo farbe odboru (mierne stmavené kvôli kontrastu bieleho textu) */
.odb-detail .odb-panel { --bg: var(--c); background: var(--bg); border-color: var(--bg); color: #fff; }
.odb-detail .odb-panel::before { background: var(--bg); border-color: var(--bg); }
.odb-detail .odb-panel h3, .odb-detail .odb-panel .prose, .odb-detail .odb-panel .prose h2, .odb-detail .odb-panel .prose h3 { color: #fff; }
.odb-detail .odb-panel .prose a { color: #fff; }
.odb-detail .odb-panel-code { color: rgba(255,255,255,.85); }
.odb-detail .side-link { background: rgba(255,255,255,.16); color: #fff; }
.odb-detail .side-link:hover { background: rgba(255,255,255,.28); }
.odb-detail .side-close { background: transparent; border: 2px solid rgba(255,255,255,.6); }
.odb-detail .side-close:hover { background: rgba(255,255,255,.12); }
.odb-detail a:focus-visible, .odb-detail button:focus-visible, .odb-detail:focus-visible { outline: 3px solid #fff; outline-offset: 3px; }

/* Kvet z log odborov v úvode */
.flower { --D: min(460px, 86vw); --d: calc(var(--D) * .4); --R: calc(var(--D) * .3); flex: 0 1 var(--D); position: relative; width: var(--D); max-width: 100%; aspect-ratio: 1; margin-inline: auto; }
.petal { --a: calc(var(--i) * 360deg / var(--n, 5) - 90deg); position: absolute; left: 50%; top: 50%; width: var(--d); height: var(--d); margin: calc(var(--d) / -2) 0 0 calc(var(--d) / -2); border-radius: 50%; transform: rotate(var(--a)) translate(var(--R)) rotate(calc(var(--a) * -1)); transition: transform .25s ease; z-index: 1; }
.petal:nth-child(even) { z-index: 2; }
.petal img { display: block; width: 100%; height: 100%; border-radius: 50%; box-shadow: 0 0 0 6px #fff, 0 8px 18px rgba(27,35,64,.18); }
@media (hover: hover) and (pointer: fine) { .petal:hover { transform: rotate(var(--a)) translate(var(--R)) rotate(calc(var(--a) * -1)) scale(1.08); z-index: 5; } }
.petal.is-on { transform: rotate(var(--a)) translate(var(--R)) rotate(calc(var(--a) * -1)) scale(1.08); z-index: 5; }
@media (prefers-reduced-motion: reduce) { .petal { transition: none; } }
.odb-logo { width: 64px; height: 64px; border-radius: 50%; align-self: flex-start; }
.odb-logo.big { width: 120px; height: 120px; margin-bottom: 18px; }
/* Variant: otvorený popis v sýtej farbe loga s tmavým textom (ako na logách) */
.pal-logo .odb-detail .odb-panel { --bg: var(--cl); color: #1F1A17; }
.pal-logo .odb-detail .odb-panel h3, .pal-logo .odb-detail .odb-panel .prose, .pal-logo .odb-detail .odb-panel .prose a, .pal-logo .odb-detail .odb-panel .prose h2, .pal-logo .odb-detail .odb-panel .prose h3 { color: #1F1A17; }
.pal-logo .odb-detail .odb-panel-code { color: rgba(31,26,23,.8); }
.pal-logo .odb-detail .side-link { background: rgba(255,255,255,.55); color: #1F1A17; }
.pal-logo .odb-detail .side-link:hover { background: rgba(255,255,255,.8); }
.pal-logo .odb-detail .side-close { background: transparent; border-color: #1F1A17; }
.pal-logo .odb-detail .odb-panel[data-dep="literarno-dramaticky-odbor"], .pal-logo .odb-detail .odb-panel[data-dep="literarno-dramaticky-odbor"] h3, .pal-logo .odb-detail .odb-panel[data-dep="literarno-dramaticky-odbor"] .prose, .pal-logo .odb-detail .odb-panel[data-dep="literarno-dramaticky-odbor"] .prose a, .pal-logo .odb-detail .odb-panel[data-dep="literarno-dramaticky-odbor"] .side-link { color: #fff; }
.pal-logo .odb-detail .odb-panel[data-dep="literarno-dramaticky-odbor"] .odb-panel-code { color: rgba(255,255,255,.85); }
.pal-logo .odb-detail .odb-panel[data-dep="literarno-dramaticky-odbor"] .side-link { background: rgba(255,255,255,.18); }
.pal-logo .odb-detail .odb-panel[data-dep="literarno-dramaticky-odbor"] .side-close { background: transparent; border-color: rgba(255,255,255,.7); }
.petal { cursor: default; }
.brand img.brand-mark { width: 56px; height: 56px; }
[data-hero-title] { transition: color .2s; }
[data-hero-title].is-dep { color: var(--hc); }

/* Ikony sociálnych sietí v hornom páse */
.topbar-social { align-items: center; }
.topbar .soc { display: inline-flex; align-items: center; justify-content: center; min-width: 24px; height: 24px; line-height: 0; }
.topbar .soc svg { display: block; }
@media (max-width: 560px) { .topbar-in { flex-wrap: nowrap; } .topbar-contacts { flex: 1 1 auto; min-width: 0; flex-wrap: wrap; gap: 4px 16px; white-space: normal; } .topbar-social { gap: 14px; } }

/* Karty odborov – veľmi jemný podklad vo farbe odboru */
.odb-card { background: color-mix(in srgb, var(--c) 4%, #fff); border-color: color-mix(in srgb, var(--c) 14%, #fff); }
.odb-card:hover, .odb-card[aria-expanded="true"] { border-color: var(--c); }
