/*
Theme Name: SP4 – Klasy pływackie
Description: Motyw szkolny dla Szkoły Podstawowej nr 2 im. Otylii Jędrzejczak.
Version: 1.1.0
Requires at least: 6.4
Requires PHP: 7.4
Text Domain: sp2-plywanie
*/
:root {
    --ink: #092736;
    --navy: #073345;
    --teal: #006761;
    --muted: #38535f;
    --water: #d9f6f1;
    --pale: #f3fbfa;
    --line: #d2e7e6;
    --white: #fff;
}
*, *::before, *::after { box-sizing: border-box; }
body { margin: 0; background: var(--pale); color: var(--ink); font: 1rem/1.6 system-ui, -apple-system, "Segoe UI", sans-serif; }
a { color: var(--teal); text-underline-offset: .2em; }
a:focus-visible, button:focus-visible, input:focus-visible { outline: 3px solid #0067a1; outline-offset: 4px; }
img { max-width: 100%; height: auto; vertical-align: middle; }
h1, h2, h3 { line-height: 1.1; letter-spacing: -.042em; }
h1 { font-size: clamp(2.2rem, 5vw, 4.7rem); margin: 0 0 .28em; }
h2 { font-size: clamp(2rem, 4vw, 3.2rem); margin: 0; }
h3 { font-size: clamp(1.25rem, 1.9vw, 1.55rem); margin: .35rem 0 .65rem; }
p { margin: 0 0 1rem; }
.wrap { width: min(1240px, calc(100% - 72px)); margin-inline: auto; }
.skip { position: absolute; z-index: 99999; top: -8rem; left: 1rem; background: white; padding: .6rem 1rem; }
.skip:focus { top: 3rem; }
.site-header { background: white; border-bottom: 1px solid var(--line); }
.header-inner { min-height: 85px; display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; column-gap: 2rem; }
.brand { display: flex; gap: .75rem; align-items: center; color: var(--ink); text-decoration: none; line-height: 1.25; }
.brand-mark { display: grid; width: 46px; height: 46px; place-items: center; color: white; background: var(--navy); border-radius: 50%; font-size: 1.45rem; font-weight: 850; flex: none; }
.brand strong, .brand small { display: block; }
.brand small { color: var(--muted); font-size: .79rem; }
.custom-logo { max-width: 220px; max-height: 65px; width: auto; }
.site-nav ul { list-style: none; display: flex; align-items: center; flex-wrap: wrap; gap: .05rem 1.45rem; margin: 0; padding: 0; }
.site-nav .sub-menu { padding-left: 1rem; }
.site-nav a { display: inline-flex; align-items: center; min-height: 44px; color: var(--ink); font-size: .9rem; font-weight: 680; text-decoration: none; }
.site-nav a:hover, .site-nav .current-menu-item > a { text-decoration: underline; }
.hero { position: relative; isolation: isolate; overflow: hidden; background: var(--navy); color: white; }
.hero-grid { position: relative; display: flex; align-items: flex-end; justify-content: space-between; gap: 1.5rem; min-height: clamp(470px, 42vw, 680px); padding-block: 4.25rem 3.25rem; }
.hero-photo, .hero-shade { position: absolute; inset: 0; z-index: -1; }
.hero-photo img { width: 100%; height: 100%; object-fit: cover; object-position: center 57%; }
.hero-shade { background: linear-gradient(90deg, rgba(2, 24, 37, .95), rgba(2, 25, 39, .87) 25%, rgba(2, 26, 40, .54) 45%, transparent 76%), linear-gradient(0deg, rgba(0, 27, 44, .36), transparent 40%); }
.hero-label { margin-bottom: .85rem; color: #a9fff0; font-size: 1rem; font-weight: 780; }
.hero h1 { font-size: clamp(2.6rem, 4.6vw, 4.15rem); }
.hero h1 span { display: block; }
.hero-name { margin-bottom: 1.65rem; color: #ebfffc; font-size: clamp(1.15rem, 2.2vw, 1.7rem); line-height: 1.28; }
.hero .button { display: inline-flex; align-items: center; min-height: 48px; color: #073345; background: #b6f5e9; padding: .65rem 1.2rem; border-radius: 6px; font-size: .95rem; font-weight: 750; text-decoration: none; }
.hero .button:hover { background: white; }
.hero a:focus-visible, .hero button:focus-visible { outline-color: white; }
.hero-motion { flex: none; color: white; background: rgba(3, 32, 48, .85); border: 1px solid #c5eeec; border-radius: 6px; min-height: 44px; padding: .4rem .8rem; font: 650 .85rem/1.3 system-ui, sans-serif; cursor: pointer; }
.hero-motion:hover { background: var(--navy); }
@keyframes sp4-pool-pan {
    from { transform: scale(1); }
    to { transform: scale(1.095) translate(-1%, .7%); }
}
@media (prefers-reduced-motion: no-preference) {
    .hero.is-animated .hero-photo img { animation: sp4-pool-pan 22s ease-in-out infinite alternate; }
    .hero.is-paused .hero-photo img { animation-play-state: paused; }
}
@media (prefers-reduced-motion: reduce) {
    .hero-motion { display: none; }
}
.introduction { padding-top: 2rem; }
.news, .inner { padding-block: clamp(2.4rem, 5vw, 4.7rem); }
.section-head { display: flex; align-items: center; justify-content: space-between; gap: 1.25rem; flex-wrap: wrap; margin-bottom: 1.7rem; }
.news-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: clamp(.9rem, 2vw, 1.55rem); align-items: stretch; }
.card { background: white; border: 1px solid var(--line); border-radius: 14px; overflow: hidden; overflow-wrap: anywhere; }
.card-image { aspect-ratio: 1.76; overflow: hidden; background: var(--water); }
.card-image img { width: 100%; height: 100%; object-fit: cover; }
.card-copy { padding: 1.05rem 1.35rem 1.35rem; }
.card-copy time, .meta { font-size: .84rem; color: var(--teal); font-weight: 700; }
.card-copy h3 a { color: var(--ink); text-decoration: none; }
.card-copy h3 a:hover { color: var(--teal); text-decoration: underline; }
.card-copy p { margin: 0; color: var(--muted); font-size: .95rem; }
.search-form { display: flex; flex-wrap: wrap; gap: .4rem; }
.search-form input, .search-form button { min-height: 44px; padding: .45rem .7rem; font: inherit; border: 1px solid #9abfc3; border-radius: 6px; background: white; color: var(--ink); }
.search-form input { width: min(195px, 100%); }
.search-form button { cursor: pointer; font-weight: 650; }
.search-form button:hover { background: var(--water); }
.pagination { display: flex; flex-wrap: wrap; gap: .45rem; margin-top: 1.5rem; }
.pagination .nav-links { display: flex; flex-wrap: wrap; gap: .45rem; }
.page-numbers { padding: .35rem .65rem; border: 1px solid var(--line); border-radius: 5px; background: white; }
.page-numbers.current { color: white; background: var(--navy); }
.reading { max-width: 895px; margin-inline: auto; padding: clamp(1.1rem, 4vw, 3rem); background: white; border: 1px solid var(--line); border-radius: 15px; overflow-wrap: anywhere; }
.reading h1 { font-size: clamp(2rem, 4.5vw, 3.6rem); }
.reading h2 { font-size: 1.8rem; margin: 1.35em 0 .5em; }
.entry-content table { display: block; overflow: auto; max-width: 100%; border-collapse: collapse; }
.entry-content th, .entry-content td { padding: .45rem; border: 1px solid var(--line); }
.entry-image { margin: 1.2rem 0; }
.entry-image img { border-radius: 12px; }
.site-footer { background: var(--navy); color: white; }
.footer-inner { display: flex; justify-content: space-between; flex-wrap: wrap; align-items: baseline; gap: .8rem 2rem; padding-block: 1.5rem; }
.site-footer p { margin: 0; }
.site-footer a { color: white; }
.site-footer a:focus-visible { outline-color: white; }
.screen-reader-text { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
@media (max-width: 900px) {
    .wrap { width: calc(100% - 44px); }
    .header-inner { padding-block: .8rem; }
    .news-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 620px) {
    .wrap { width: calc(100% - 32px); }
    .header-inner { align-items: flex-start; flex-direction: column; gap: .45rem; }
    .site-nav ul { gap: 0 .95rem; }
    .news-grid { grid-template-columns: 1fr; }
    .hero-grid { min-height: 550px; flex-direction: column; align-items: flex-start; justify-content: flex-end; padding-block: 11rem 1.55rem; gap: 1rem; }
    .hero-photo img { object-position: 50% 45%; }
    .hero-shade { background: linear-gradient(0deg, rgba(2, 24, 37, .98) 4%, rgba(2, 25, 39, .87) 35%, rgba(2, 26, 40, .37) 66%, transparent 84%); }
}
