/*
Theme Name: Szkolny Horyzont
Description: Pełnoszeroki motyw szkolny z kafelkami menu, nagłówkiem multimedialnym i aktualnościami.
Version: 1.6.0
Requires at least: 6.0
Requires PHP: 7.4
License: GNU General Public License v2 or later
Text Domain: szkolny-horyzont
*/
* { box-sizing: border-box; }
[hidden] { display: none !important; }
body { margin: 0; background: var(--background); color: var(--ink); font: var(--font-size)/1.6 var(--font); overflow-wrap: anywhere; }
h1, h2, h3, h4 { font-family: var(--heading-font); line-height: 1.15; }
a { color: var(--accent); text-underline-offset: .2em; }
a:hover { text-decoration-thickness: .14em; }
:focus-visible { outline: 3px solid currentColor; outline-offset: 4px; }
img, video { max-width: 100%; height: auto; }
input, button, select, textarea { font: inherit; max-width: 100%; }
button { cursor: pointer; }
.wrap { width: 100%; padding-inline: clamp(18px, 5vw, 100px); }
.screen-reader-text, .skip-link:not(:focus) {
    position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap;
}
.skip-link:focus { position: fixed; top: 1rem; left: 1rem; background: var(--surface); padding: .5rem 1rem; z-index: 20; }
.site-header { background: var(--surface); }
.masthead { min-height: 88px; display: flex; align-items: center; justify-content: space-between; gap: .75rem 2rem; padding-block: 1rem; }
.brand { display: flex; align-items: center; gap: .65rem; font-weight: 800; font-size: 1.2em; }
.brand a, .main-nav a, .quick-nav a { color: inherit; text-decoration: none; }
.brand a:hover, .main-nav a:hover, .quick-nav a:hover { text-decoration: underline; }
.brand img { display: block; width: auto; max-width: 110px; max-height: 52px; object-fit: contain; }
.main-nav ul, .quick-nav ul, .footer-bottom ul, .tiles { list-style: none; margin: 0; padding: 0; }
.main-nav ul, .quick-nav ul, .footer-bottom ul { display: flex; flex-wrap: wrap; gap: .35rem 1rem; }
.main-nav { border-block: 1px solid rgba(115,130,155,.25); padding-block: .35rem; }
.quick-nav a { display: inline-flex; align-items: center; min-height: 44px; font-size: .9em; font-weight: 700; }
.main-nav a { display: inline-flex; gap: .4rem; align-items: center; min-height: 44px; font-weight: 700; }
.main-nav [aria-expanded="true"], .main-nav [aria-current] { color: var(--accent); text-decoration: underline; }
.hero {
    position: relative; isolation: isolate; display: flex; flex-direction: column; justify-content: end;
    min-height: clamp(200px, 30.67vw, 413px); background: linear-gradient(125deg, var(--hero), #10182b);
    color: #fff;
}
.hero-image, .hero-slides, .hero-slide, .hero-slide img {
    position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; z-index: -2;
}
.hero:not(.hero-video)::before {
    content: ""; position: absolute; inset: 0; z-index: -1;
    background: linear-gradient(0deg, rgba(6,15,32,.87), rgba(6,15,32,.06) 80%);
}
.hero-copy { padding-block: clamp(19px, 4vw, 57px); }
.hero h1 { margin: 0; font-size: clamp(2.2rem, 6vw, 6rem); letter-spacing: -.035em; max-width: 19ch; }
.hero p { margin: .85rem 0 0; max-width: 55ch; font-size: clamp(1.05rem, 2vw, 1.4rem); }
.hero-video { min-height: 0; }
.hero-video video { display: block; width: 100%; max-height: min(48vh, 507px); background: #080e19; }
.hero-video .hero-copy { padding-block: 1rem; }
.hero-video h1 { font-size: clamp(2rem, 4vw, 4rem); }
.slide-controls { position: absolute; z-index: 1; top: 1rem; right: clamp(18px, 5vw, 100px); display: flex; align-items: center; gap: .6rem; padding: .3rem .5rem; border-radius: .6rem; background: #10182b; }
.slide-controls button { border: 0; border-radius: .35rem; min-width: 44px; min-height: 44px; background: #fff; color: #10182b; }
.tile-panel { background: var(--surface); padding-block: 1rem 1.25rem; border-bottom: 1px solid rgba(115,130,155,.3); }
.tile-panel h2 { margin: 0 0 .75rem; font-size: clamp(1.15rem, 2vw, 1.55rem); }
.parent-link { display: inline-block; margin-bottom: .75rem; }
.tiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 208px), 1fr)); gap: .55rem; }
.tile-link {
    display: flex; align-items: center; gap: .6rem; height: 100%; min-height: 56px;
    padding: .45rem .6rem; background: var(--background); border-radius: .55rem;
    color: var(--ink); font-size: .9em; font-weight: 700; line-height: 1.3;
    text-decoration: none;
}
.tile-link:hover { color: var(--accent); text-decoration: underline; }
.tile-photo, .tile-placeholder {
    flex: 0 0 auto; width: 40px; height: 40px; border-radius: .35rem;
}
.tile-photo { display: block; object-fit: cover; }
.tile-placeholder { display: grid; place-items: center; background: var(--hero); color: #fff; }
.tile-label { min-width: 0; }
@media (max-width: 490px) {
    .tiles { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .tile-link { gap: .4rem; padding-inline: .4rem; }
    .tile-photo, .tile-placeholder { width: 28px; height: 28px; }
}
.main-content { padding-block: clamp(2rem, 5vw, 5rem); min-height: 36vh; }
.section-title { margin: 0 0 1.5rem; font-size: clamp(1.8rem, 3.5vw, 3.2rem); }
.home-updates {
    display: grid; grid-template-columns: minmax(0, 2fr) minmax(0, 1fr);
    gap: clamp(1rem, 3vw, 2.5rem); align-items: start;
}
.home-updates .news-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: clamp(.65rem, 1.4vw, 1.25rem); }
.home-updates .news-title { padding: clamp(.75rem, 1.4vw, 1.2rem); font-size: clamp(1.05rem, 1.6vw, 1.35rem); }
.home-notices { min-width: 0; padding: clamp(1rem, 2vw, 1.75rem); background: var(--notices); border-radius: .85rem; }
.home-notices .section-title { margin-bottom: .85rem; font-size: clamp(1.4rem, 2.25vw, 2rem); }
.home-notices > :last-child, .notice-widget > :last-child { margin-bottom: 0; }
.notice-widget + .notice-widget { margin-top: 1rem; }
.home-updates + .entry-content { margin-top: 3rem; }
.news-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: clamp(1rem, 2.4vw, 2rem); }
.news-card { min-width: 0; border-radius: .85rem; background: var(--surface); box-shadow: 0 10px 24px rgba(17,35,65,.07); }
.news-card-link { display: block; height: 100%; color: inherit; text-decoration: none; border-radius: inherit; }
.news-card-link:hover .news-title { text-decoration: underline; }
.news-photo { display: block; width: 100%; aspect-ratio: 16/9; object-fit: cover; border-radius: .85rem .85rem 0 0; }
.news-title { margin: 0; padding: clamp(1rem, 2vw, 1.65rem); font-size: clamp(1.2rem, 2vw, 1.6rem); }
.entry-content time { color: var(--accent); font-size: .88em; font-weight: 700; }
.news-more, .pagination { margin-top: 2rem; }
.nav-links > * { display: inline-block; padding: .35rem .55rem; }
.entry-content { max-width: 78ch; margin-inline: auto; }
.news-grid + .entry-content, .news-more + .entry-content, .comments { margin-top: 3rem; }
.entry-content h1 { font-size: clamp(2rem, 4vw, 4rem); }
.entry-photo { display: block; margin-block: 1rem; border-radius: .65rem; }
figure { margin-inline: 0; }
.wp-block-table { overflow-x: auto; }
.entry-content iframe { max-width: 100%; }
.site-footer { background: var(--hero); color: #fff; padding-block: 2rem; }
.site-footer a { color: inherit; }
.footer-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 220px), 1fr)); gap: 1rem 2rem; margin-bottom: 2rem; }
.footer-bottom { display: flex; flex-wrap: wrap; justify-content: space-between; gap: .6rem 2rem; border-top: 1px solid rgba(255,255,255,.35); padding-top: 1rem; }
@media (max-width: 900px) {
    .home-updates { grid-template-columns: minmax(0, 1fr); }
    .masthead { align-items: flex-start; flex-direction: column; }
    .news-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 560px) {
    .news-grid, .home-updates .news-grid { grid-template-columns: minmax(0, 1fr); }
    .hero:has(.slide-controls) { min-height: 220px; }
    .hero:has(.slide-controls) .hero-copy { padding-top: 5rem; }
}
