/*
 * What a merged school (ZŠ + MŠ) adds to skola.css, the stylesheet of the elementary
 * school's design (left unchanged next to this file):
 *   1 the bridge to the kindergarten skin (ms/skin.css) and the frame around its pages
 *   2 the labels that say which part a news item, an event or a person belongs to,
 *     and the filter of the news
 *   3 the two parts on the home page
 *   4 two buildings: addresses, the map, people of the kindergarten
 *   5 smaller screens
 */

/* ---------- 1 Bridge and frame ---------- */
:root {
    /* What the skin asks the site for (see the head of ms/skin.css). */
    --site-text-font: var(--font-text);
    --site-gutter: var(--gutter);
    --site-wrap: var(--wrap);
    --site-sticky-top: calc(var(--bar-h) + 1px);   /* the sticky bar and its line */
    --site-after-ms: var(--solid);                 /* the footer follows a kindergarten page */

    /* The kindergarten's colours wherever the two parts meet on a page of the school. */
    --ms: #FF9440;
    --ms-soft: #FFE8D2;
    --ms-ink: #8A3F06;
}
[data-theme="dark"] {
    --ms-soft: #43291A;
    --ms-ink: #FFC796;
}

[hidden] { display: none !important; }

/* The bar: two longer items than the school alone had, so Edookit leaves it sooner (it stays in the menu sheet and in the footer). */
@media (max-width: 1239.98px) { .bar-edookit { display: none; } }
.panel--ms { width: 600px; }
.pico--ms { border-color: transparent; background: var(--ms-soft); }
.pico--ms img { width: 28px; height: 28px; }

/* ---------- 2 Part labels and the filter ---------- */
.part { display: inline-flex; align-items: center; gap: 6px; font: 600 .8125rem/1.3 var(--font-text); letter-spacing: 0; color: var(--ink-2); white-space: nowrap; vertical-align: middle; }
.part::before { content: ""; flex: none; width: 8px; height: 8px; border-radius: 50%; background: var(--line-2); }
.part--zs::before { background: var(--blue-text); }
.part--ms::before { content: none; }
.part--ms img { width: 16px; height: 16px; margin-left: -4px; }
.meta .part { display: flex; margin-top: 5px; }
.next .part { margin-top: 10px; }
.album .part { display: flex; margin-top: 6px; }
.sec-head p .part { margin-right: 4px; }

/* a class of the kindergarten: its animal and its name, where a class of the school has a dot */
.cdot--ms::before { content: none; }
.cdot--ms img { width: 16px; height: 16px; margin-left: -4px; }
.feed li { grid-template-columns: 5.3em minmax(0, 1fr) auto; }

/* The filter of the news stands in the rail: everything, or one part (what belongs to the whole school stays). */
.pfilter { display: grid; gap: 2px; justify-items: start; }
.pfilter button { margin-left: -12px; padding: 7px 12px; border: 0; border-radius: 8px; background: none; color: var(--ink-2); font: 500 .9688rem/1.3 var(--font-text); text-align: left; cursor: pointer; transition: background-color .15s, color .15s; }
.pfilter button:hover { color: var(--ink); background: var(--tint); }
.pfilter button[aria-pressed="true"] { color: var(--ink); font-weight: 600; background: var(--tint); }

/* ---------- 3 The two parts on the home page ---------- */
.parts { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: clamp(16px, 2.2vw, 28px); align-items: stretch; padding-bottom: clamp(28px, 4.4vw, 60px); }

/* The school's block: the same anatomy as the kindergarten's next to it (a name, a
   sentence, four ways in, one button), drawn the way this design draws: one flat blue
   field, text on hairlines. */
.zpart { display: flex; flex-direction: column; height: 100%; padding: clamp(22px, 2.6vw, 36px); border-radius: 20px; background: var(--blue); color: #fff; }
.zpart :focus-visible { outline-color: #fff; }
.zpart .label { color: rgba(255, 255, 255, .8); }
.zpart h2 { margin-top: 8px; font-size: clamp(1.75rem, 1.25rem + 1.7vw, 2.625rem); line-height: 1.06; letter-spacing: -.035em; }
.zpart-text { max-width: 34em; margin-top: 14px; color: rgba(255, 255, 255, .9); }
.zpart-ways { display: grid; align-content: start; flex: 1; margin: clamp(18px, 2.2vw, 26px) 0; }
.zpart-ways a { display: grid; grid-template-columns: auto auto minmax(0, 1fr) auto; align-items: center; gap: 12px; padding: 12px 0; border-top: 1px solid rgba(255, 255, 255, .26); color: #fff; text-decoration: none; }
.zpart-ways li:last-child a { border-bottom: 1px solid rgba(255, 255, 255, .26); }
.zpart-ways b { font-weight: 600; }
.zpart-ways small { font-size: .875rem; color: rgba(255, 255, 255, .78); text-align: right; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.zpart-ways .ico:last-child { width: 1.05em; height: 1.05em; opacity: .7; transition: transform .2s, opacity .2s; }
.zpart-ways a:hover .ico:last-child { opacity: 1; transform: translateX(3px); }
.zpart-foot { display: flex; flex-wrap: wrap; align-items: center; gap: 14px 24px; margin-top: auto; }
.zpart-link { display: inline-flex; align-items: center; gap: 8px; color: #fff; font-weight: 600; text-decoration: underline; text-decoration-color: rgba(255, 255, 255, .5); text-underline-offset: .25em; }
.zpart-link:hover { text-decoration-color: #fff; }
.zpart-link .ico { width: 1.1em; height: 1.1em; transition: transform .2s; }
.zpart-link:hover .ico { transform: translateX(3px); }

/* The block of the kindergarten ends with its flat shadow: the school's block is as tall as the two together. */
.parts [data-part="ms"] .ks-part { height: calc(100% - 7px); }

/* ---------- 4 Two buildings ---------- */
.place + .place { margin-top: 28px; }
.place h3 { display: flex; align-items: center; gap: 10px; margin-bottom: 4px; font: 600 1.125rem/1.3 var(--font-text); letter-spacing: 0; }
.place-mark { flex: none; width: 24px; height: 24px; }
.place-mark--zs { width: 10px; height: 10px; margin: 0 7px; border-radius: 50%; background: var(--blue-text); }
.place .facts > div:first-child { border-top: 0; }

.m-ms { fill: var(--ms); }
.m-label--ms + .m-pin .m-pin-eye { fill: var(--ms-ink); }

.avatar--ms { background: var(--ms-soft); }
.avatar--ms img { width: 30px; height: 30px; }
.avatar--ico { color: var(--ink-2); }

/* ---------- 5 Smaller screens ---------- */
@media (max-width: 1099.98px) {
    .panel--ms { width: auto; }
}
@media (max-width: 959.98px) {
    .pfilter { display: flex; flex-wrap: wrap; gap: 4px; }
    .pfilter button { margin-left: 0; }
    .pfilter button:first-child { margin-left: -12px; }
}
@media (max-width: 899.98px) {
    .parts { grid-template-columns: minmax(0, 1fr); }
}
/* The name of the merged school is longer than the school's alone: the bar tightens on a phone. */
@media (max-width: 479.98px) {
    .bar-in { gap: 8px; }
    .brand { gap: 9px; flex: 0 1 auto; min-width: 0; }
    .brand-text b { font-size: 1rem; white-space: nowrap; }
    .brand-text small { font-size: .6875rem; }
    .bar-tools { gap: 4px; }
    .menu-toggle { gap: 8px; padding: 0 11px 0 13px; }
    .zpart-ways small { display: none; }
    .zpart-ways a { grid-template-columns: auto minmax(0, 1fr) auto; }
}
@media (max-width: 379.98px) {
    .menu-toggle { padding: 0 11px; }
    .menu-toggle-label { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }
}
