@media (max-width: 991px) {
  #sp-header .logo { height: 80px !important; max-height: 80px; display: flex; align-items: center; }
  #sp-header .logo a { display: flex; align-items: center; }
  #sp-header .logo img.logo-image { max-height: 52px !important; width: auto !important; object-fit: contain; }
}

dialog.mdk-photo-dialog > button {
    display: grid !important;
    place-items: center;
    position: absolute;
    top: 5px;
    right: 5px;
    z-index: 2;
    width: 36px !important;
    min-width: 36px !important;
    height: 36px !important;
    padding: 0 !important;
    border: 2px solid white !important;
    border-radius: 50% !important;
    background: #25343a !important;
    color: white !important;
    font-size: 0 !important;
    cursor: pointer;
}
dialog.mdk-photo-dialog > button::after {
    content: "×";
    font: 26px/1 Arial, sans-serif;
    grid-area: 1 / 1;
}

/* Kursor powiększania zdjęć */
body .mdk-image-link, body .mdk-image-link img {
  cursor: url("data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20width%3D%2232%22%20height%3D%2232%22%20viewBox%3D%220%200%2032%2032%22%3E%3Cg%20stroke-linecap%3D%22round%22%3E%3Cpath%20d%3D%22m18%2018%209%209%22%20stroke%3D%22white%22%20stroke-width%3D%227%22%2F%3E%3Cpath%20d%3D%22m18%2018%209%209%22%20stroke%3D%22%2316445b%22%20stroke-width%3D%224%22%2F%3E%3Ccircle%20cx%3D%2212.5%22%20cy%3D%2212.5%22%20r%3D%229.5%22%20fill%3D%22white%22%20stroke%3D%22white%22%20stroke-width%3D%224%22%2F%3E%3Ccircle%20cx%3D%2212.5%22%20cy%3D%2212.5%22%20r%3D%229%22%20fill%3D%22%23edf9ff%22%20stroke%3D%22%2316445b%22%20stroke-width%3D%222.5%22%2F%3E%3Cpath%20d%3D%22M8.5%2012.5h8m-4-4v8%22%20stroke%3D%22%230075a8%22%20stroke-width%3D%222.2%22%2F%3E%3C%2Fg%3E%3C%2Fsvg%3E") 12 12, zoom-in !important;
}

/* Kursor na powiększonym zdjęciu */
dialog.mdk-photo-dialog[open], dialog.mdk-photo-dialog[open] img {
  cursor: url("data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20width%3D%2232%22%20height%3D%2232%22%20viewBox%3D%220%200%2032%2032%22%3E%3Cg%20stroke-linecap%3D%22round%22%3E%3Cpath%20d%3D%22m18%2018%209%209%22%20stroke%3D%22white%22%20stroke-width%3D%227%22%2F%3E%3Cpath%20d%3D%22m18%2018%209%209%22%20stroke%3D%22%2316445b%22%20stroke-width%3D%224%22%2F%3E%3Ccircle%20cx%3D%2212.5%22%20cy%3D%2212.5%22%20r%3D%229.5%22%20fill%3D%22white%22%20stroke%3D%22white%22%20stroke-width%3D%224%22%2F%3E%3Ccircle%20cx%3D%2212.5%22%20cy%3D%2212.5%22%20r%3D%229%22%20fill%3D%22%23edf9ff%22%20stroke%3D%22%2316445b%22%20stroke-width%3D%222.5%22%2F%3E%3Cpath%20d%3D%22M8.5%2012.5h8%22%20stroke%3D%22%230075a8%22%20stroke-width%3D%222.2%22%2F%3E%3C%2Fg%3E%3C%2Fsvg%3E") 12 12, zoom-out !important;
}

/* Tytuł pracowni muzycznych */
body:is(.itemid-504, .itemid-505, .itemid-506, .itemid-507, .itemid-508, .itemid-509, .itemid-510).view-article .article-details-top .article-header h1 {
    text-transform: uppercase;
    font-weight: 750;
    color: #176b91;
}
@supports (background-clip: text) or (-webkit-background-clip: text) {
    body:is(.itemid-504, .itemid-505, .itemid-506, .itemid-507, .itemid-508, .itemid-509, .itemid-510).view-article .article-details-top .article-header h1 {
        width: fit-content;
        max-width: 100%;
        background-image: linear-gradient(90deg, #008dd2 0%, #8048a5 50%, #e81851 100%);
        background-size: 114% 100%;
        -webkit-background-clip: text;
        background-clip: text;
        color: transparent;
        animation: mdk-music-title 9s ease-in-out infinite alternate;
    }
}
@keyframes mdk-music-title {
    from { background-position: 0% 50%; }
    to { background-position: 100% 50%; }
}
@media (prefers-reduced-motion: reduce) {
    body:is(.itemid-504, .itemid-505, .itemid-506, .itemid-507, .itemid-508, .itemid-509, .itemid-510).view-article .article-details-top .article-header h1 { animation: none; }
}
@media (forced-colors: active) {
    body:is(.itemid-504, .itemid-505, .itemid-506, .itemid-507, .itemid-508, .itemid-509, .itemid-510).view-article .article-details-top .article-header h1 { animation: none; background: none; color: CanvasText; }
}

body:is(.itemid-504, .itemid-505, .itemid-506, .itemid-507, .itemid-508, .itemid-509, .itemid-510).view-article .article-details-top .article-info > .published,
body:is(.itemid-504, .itemid-505, .itemid-506, .itemid-507, .itemid-508, .itemid-509, .itemid-510).view-article .article-details-top .article-info:has(> .published:only-child) {
    display: none;
}

body:is(.itemid-504, .itemid-505, .itemid-506, .itemid-507, .itemid-508, .itemid-509, .itemid-510).view-article .mdk-article-grid .article-details-content-header { display:grid; align-content:center; }
body:is(.itemid-504, .itemid-505, .itemid-506, .itemid-507, .itemid-508, .itemid-509, .itemid-510).view-article .article-details-top .article-info:has(.published) { display:none; }
body:is(.itemid-504, .itemid-505, .itemid-506, .itemid-507, .itemid-508, .itemid-509, .itemid-510).view-article .article-details-top .article-header h1 { font-size:clamp(1.875rem, 4.12vw, 2.25rem); line-height:1.15; }

body:is(.itemid-511, .itemid-512, .itemid-513) .mdk-plan-heading h1::after { content:""; display:block !important; width:100%; height:1px; margin-top:.55rem; border-radius:2px; background:#008cca; transform-origin:left center; animation:mdk-plan-underline 1.2s ease-out both; }
@keyframes mdk-plan-underline { from { transform:scaleX(0); } to { transform:scaleX(1); } }
@media (prefers-reduced-motion: reduce) { body:is(.itemid-511, .itemid-512, .itemid-513) .mdk-plan-heading h1::after { animation:none; } }

/* Tytuł planu zajęć w barwach MDK */
@supports (background-clip: text) or (-webkit-background-clip: text) {
    body:is(.itemid-511, .itemid-512, .itemid-513) #sp-component .article-details .article-header.mdk-plan-heading h1[itemprop="headline"] {
        background-image: linear-gradient(100deg, #0078aa 0%, #0078aa 51%, #456fa5 59%, #925186 72%, #d52258 84%, #e81851 92%, #c92257 100%);
        background-size: 110% 100%;
        background-clip: text;
        -webkit-background-clip: text;
        color: transparent !important;
        -webkit-text-fill-color: transparent;
        animation: mdk-plan-title-colour 7s ease-in-out infinite alternate;
    }
}
@keyframes mdk-plan-title-colour {
    from { background-position: 0% 50%; }
    to { background-position: 100% 50%; }
}
@media (prefers-reduced-motion: reduce) {
    body:is(.itemid-511, .itemid-512, .itemid-513) #sp-component .article-details .article-header.mdk-plan-heading h1[itemprop="headline"] { animation: none; }
}
@media (forced-colors: active) {
    body:is(.itemid-511, .itemid-512, .itemid-513) #sp-component .article-details .article-header.mdk-plan-heading h1[itemprop="headline"] { background: none; color: CanvasText !important; -webkit-text-fill-color: CanvasText; animation: none; }
}

.offcanvas-menu .menu-parent > .mod-menu__heading { position:relative; cursor:pointer; }
.offcanvas-menu .menu-parent > .mod-menu__heading > .menu-toggler { position:absolute; inset:0 !important; width:100% !important; height:100% !important; transform:none !important; display:flex; align-items:center; justify-content:flex-end; cursor:pointer; }

.offcanvas-menu .menu-parent > .mod-menu__heading > .menu-toggler::after { position:absolute !important; left:auto !important; right:2px !important; top:50% !important; bottom:auto !important; margin:0 !important; line-height:1; translate:0 -50%; }

/* Odsłonięcie tytułu planu ferii przy otwarciu strony */
body:is(.itemid-511, .itemid-512, .itemid-513) #sp-component .article-details .article-header.mdk-plan-heading h1[itemprop="headline"] {
    animation: mdk-plan-title-colour 7s ease-in-out infinite alternate,
               mdk-winter-title-reveal 1.2s ease-out both;
}
@keyframes mdk-winter-title-reveal {
    from { clip-path: inset(0 100% 0 0); }
    to { clip-path: inset(0 0 0 0); }
}
@media (prefers-reduced-motion: reduce), (forced-colors: active) {
    body:is(.itemid-511, .itemid-512, .itemid-513) #sp-component .article-details .article-header.mdk-plan-heading h1[itemprop="headline"] { animation: none; }
}

@media (prefers-reduced-motion: no-preference) {
    body:is(.itemid-511, .itemid-512, .itemid-513) #sp-component .mdk-plan-body {
        animation: mdk-winter-body-appear 1.2s ease-in-out .6s both !important;
    }
}
@keyframes mdk-winter-body-appear {
    from { clip-path: inset(0 0 100% 0); }
    to { clip-path: inset(0 0 0 0); }
}

body:is(.itemid-511, .itemid-512, .itemid-513) #sp-component .mdk-plan-heading {
    position: relative;
    padding-bottom: calc(.55rem + 1px);
}
body:is(.itemid-511, .itemid-512, .itemid-513) #sp-component .article-details .article-header.mdk-plan-heading h1[itemprop="headline"] {
    width: fit-content;
    max-width: 100%;
}
body:is(.itemid-511, .itemid-512, .itemid-513) #sp-component .mdk-plan-heading h1::after { display:none !important; }
body:is(.itemid-511, .itemid-512, .itemid-513) #sp-component .article-header.mdk-plan-heading::after {
    content:""; display:block !important; position:absolute; inset:auto 0 0; width:100%; height:1px;
    background:#008cca; transform-origin:left center; animation:mdk-plan-underline 1.2s ease-out both;
}
@media (prefers-reduced-motion: reduce) {
    body:is(.itemid-511, .itemid-512, .itemid-513) #sp-component .article-header.mdk-plan-heading::after { animation:none; }
}

/* Typografia treści planów; tabele mają osobne formatowanie. */
body:is(.itemid-511, .itemid-512, .itemid-513) #sp-component .mdk-plan-body :is(p, div, span, font, a, li, ul, ol, strong, b, em, i, u, small, blockquote, dd, dt, label):not(table, table *):not(:has(table)):not([class*="icon"]):not(.fa):not([class^="fa-"]) {
    font-family: Figtree, sans-serif !important;
    font-size: 17px !important;
}
body:is(.itemid-511, .itemid-512, .itemid-513) #sp-component .mdk-plan-body :is(h2, h3, h4, h5, h6):not(table, table *):not(:has(table)),
body:is(.itemid-511, .itemid-512, .itemid-513) #sp-component .mdk-plan-body :is(h2, h3, h4, h5, h6) :is(p, div, span, font, a, li, ul, ol, strong, b, em, i, u, small, blockquote, dd, dt, label):not(table, table *):not(:has(table)):not([class*="icon"]):not(.fa):not([class^="fa-"]) {
    font-family: Figtree, sans-serif !important;
    font-size: 24px !important;
}

/* Odstępy między akapitami planów */
body:is(.itemid-511, .itemid-512, .itemid-513) #sp-component .mdk-plan-body p:not(table p):not(:has(table)) { margin-block: 0 0.75rem !important; }
