.archive-header { padding: 42px 0 0; }
.archive-header h1 { margin: 0; font-size: clamp(2rem, 4vw, 3rem); }
.post-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 22px; }
.post-grid.cols-1 { grid-template-columns: 1fr; }
.post-grid.cols-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.post-grid.cols-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.post-card { display: flex; flex-direction: column; overflow: hidden; border: 1px solid var(--pc-border); border-radius: 18px; background: var(--pc-paper); box-shadow: var(--pc-shadow); }
.post-card__image { overflow: hidden; aspect-ratio: 16 / 10; background: #eee; }
.post-card__image img { width: 100%; height: 100%; object-fit: cover; }
.post-card__body { padding: 20px; }
.post-card__date { color: var(--pc-muted); font-size: .88rem; font-weight: 800; }
.post-card__title { margin: 8px 0 10px; font-size: 1.25rem; line-height: 1.22; }
.post-card__title a { color: var(--pc-text); text-decoration: none; }
.home-hero { padding: 74px 0; background: linear-gradient(135deg, #fff5d1, #e7f3e8); }
.home-hero h1 { margin: 0; font-size: clamp(2.4rem, 5vw, 4.5rem); line-height: 1; }
.home-notice { display: inline-flex; margin-top: 22px; padding: 14px 20px; border-radius: 18px; color: var(--pc-text); background: #fff; font-weight: 900; box-shadow: var(--pc-shadow); }
.home-posts { padding: 44px 0; }

/* Kategorie wpisów — indywidualny widok szkoły. */
.category-school-section {
    position: relative;
    min-height: 100%;
    overflow: hidden;
    background: var(--category-section-bg, #fffaf0);
    isolation: isolate;
}

.category-corner-decoration {
    position: absolute;
    z-index: 0;
    width: min(var(--category-corner-size, 150px), 18vw);
    height: auto;
    opacity: var(--category-corner-opacity, .7);
    object-fit: contain;
    pointer-events: none;
    user-select: none;
}
.category-corner-decoration--top-left { top: 26px; left: 22px; }
.category-corner-decoration--top-right { top: 26px; right: 22px; }
.category-corner-decoration--bottom-left { bottom: 28px; left: 22px; }
.category-corner-decoration--bottom-right { right: 22px; bottom: 28px; }

.category-header {
    position: relative;
    z-index: 2;
    padding: 34px 0 42px;
    text-align: center;
}
.category-header__inner {
    display: flex;
    flex-direction: column;
    align-items: center;
}
.category-header__icon {
    width: var(--category-icon-size, 50px);
    height: var(--category-icon-size, 50px);
    margin-bottom: 7px;
    object-fit: contain;
}
.category-header .category-header__title {
    max-width: 980px;
    margin: 0;
    color: var(--category-title-color, #173f37);
    font-family: "Baloo 2", var(--font-heading);
    font-size: clamp(2.55rem, 4.5vw, 4.35rem);
    font-weight: var(--category-title-weight, 600);
    line-height: 1.04;
    letter-spacing: -.018em;
    text-wrap: balance;
}
.category-header__accent {
    display: block;
    width: min(430px, 62vw);
    height: 7px;
    margin: 9px auto 0;
    border-radius: 50% 45% 55% 40%;
    background: var(--category-accent, #f3bd2f);
    clip-path: polygon(0 45%, 8% 26%, 18% 40%, 30% 18%, 45% 35%, 58% 12%, 74% 30%, 88% 15%, 100% 48%, 91% 72%, 76% 60%, 62% 83%, 46% 65%, 31% 88%, 16% 67%, 4% 82%);
}
.category-header__description {
    max-width: 760px;
    margin-top: 5px;
    color: #4c5552;
    font-size: 1.06rem;
    line-height: 1.55;
}
.category-header__description p { margin: 0; }

.category-year-switcher {
    display: grid;
    grid-template-columns: 44px minmax(0, 1fr) 44px;
    width: min(100%, 650px);
    align-items: center;
    gap: 12px;
    margin-top: 20px;
}
.category-year-switcher__viewport {
    min-width: 0;
    overflow: hidden;
    border-radius: 999px;
    background: transparent;
    isolation: isolate;
}
.category-year-tabs {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 10px;
    background: transparent;
    will-change: transform, opacity;
}
.category-year-tabs.is-moving-left {
    animation: category-years-out-left .15s ease both;
}
.category-year-tabs.is-moving-right {
    animation: category-years-out-right .15s ease both;
}
.category-year-tabs.is-entering-left {
    animation: category-years-in-left .22s ease both;
}
.category-year-tabs.is-entering-right {
    animation: category-years-in-right .22s ease both;
}
.category-year-tabs__link {
    display: none;
    min-height: 44px;
    align-items: center;
    justify-content: center;
    padding: 8px 16px;
    border: 1px solid rgba(31, 78, 62, .11);
    border-radius: 999px;
    background: rgba(255, 253, 246, .97);
    color: #344b44;
    font-size: .96rem;
    font-weight: 700;
    white-space: nowrap;
    text-decoration: none;
    box-shadow: 0 7px 18px rgba(38, 62, 54, .075);
    transition: transform .18s ease, color .18s ease, box-shadow .18s ease, background-color .18s ease;
}
.category-year-tabs__link.is-visible { display: inline-flex; }
.category-year-tabs__link:hover,
.category-year-tabs__link:focus-visible {
    transform: translateY(-2px);
    color: #163e31;
    text-decoration: none;
    box-shadow: 0 10px 24px rgba(38, 62, 54, .13);
}
.category-year-tabs__link.is-active {
    border-color: #174d3b;
    background: #174d3b;
    color: #fff;
    box-shadow: inset 0 -3px 0 var(--category-accent, #f3bd2f), 0 10px 23px rgba(23, 77, 59, .2);
}
.category-year-switcher__arrow {
    display: inline-flex;
    width: 44px;
    height: 44px;
    align-items: center;
    justify-content: center;
    padding: 0;
    border: 1px solid rgba(31, 78, 62, .12);
    border-radius: 50%;
    background: rgba(255, 253, 246, .97);
    color: #174d3b;
    font: inherit;
    font-size: 1.75rem;
    line-height: 1;
    cursor: pointer;
    box-shadow: 0 7px 18px rgba(38, 62, 54, .075);
    transition: transform .18s ease, background-color .18s ease, box-shadow .18s ease, opacity .18s ease;
}
.category-year-switcher__arrow:hover,
.category-year-switcher__arrow:focus-visible {
    transform: translateY(-2px);
    background: #fff;
    box-shadow: 0 10px 24px rgba(38, 62, 54, .13);
}
.category-year-switcher__arrow:disabled {
    opacity: .32;
    cursor: default;
    transform: none;
    box-shadow: none;
}
@keyframes category-years-out-left {
    to { opacity: 0; transform: translateX(-28px); }
}
@keyframes category-years-out-right {
    to { opacity: 0; transform: translateX(28px); }
}
@keyframes category-years-in-left {
    from { opacity: 0; transform: translateX(28px); }
    to { opacity: 1; transform: translateX(0); }
}
@keyframes category-years-in-right {
    from { opacity: 0; transform: translateX(-28px); }
    to { opacity: 1; transform: translateX(0); }
}

.category-content {
    position: relative;
    z-index: 2;
    padding-top: 38px;
    padding-bottom: 58px;
}
.category-content-decorations {
    position: absolute;
    z-index: 0;
    inset: 0;
    overflow: visible;
    pointer-events: none;
}
.category-content-decoration {
    position: absolute;
    left: var(--decor-x, 50%);
    top: var(--decor-y, 50%);
    width: var(--decor-size, 60px);
    max-width: 14vw;
    height: auto;
    opacity: var(--category-content-decor-opacity, .65);
    transform: translate(-50%, -50%) rotate(-2deg);
    object-fit: contain;
    user-select: none;
}
.category-content-decoration:nth-child(even) {
    transform: translate(-50%, -50%) rotate(3deg);
}

.category-post-grid {
    position: relative;
    z-index: 2;
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 28px;
}
.category-post-card {
    display: flex;
    min-width: 0;
    flex-direction: column;
    overflow: hidden;
    border: 1px solid var(--pc-border);
    border-radius: 18px;
    background: var(--pc-paper);
    box-shadow: 0 12px 30px rgba(34, 63, 55, .11);
    transition: transform .22s ease, box-shadow .22s ease;
}
.category-post-card:hover,
.category-post-card:focus-within {
    transform: translateY(-4px);
    box-shadow: 0 18px 38px rgba(34, 63, 55, .14);
}
.category-post-card__image {
    position: relative;
    display: block;
    overflow: hidden;
    aspect-ratio: 16 / 10;
    background: #e8ece8;
}
.category-post-card__image img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform .35s ease;
}
.category-post-card:hover .category-post-card__image img,
.category-post-card:focus-within .category-post-card__image img { transform: scale(1.035); }
.category-post-card__placeholder {
    display: block;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, #edf2ed, #dfe8df);
}
.category-post-card__date {
    position: absolute;
    z-index: 2;
    top: 12px;
    right: 12px;
    padding: 7px 11px;
    border-radius: 999px;
    background: rgba(255, 255, 255, .94);
    color: #324b43;
    font-size: .78rem;
    font-weight: 800;
    box-shadow: 0 5px 14px rgba(25, 48, 40, .12);
}
.category-post-card__body {
    display: flex;
    min-height: 150px;
    flex: 1;
    flex-direction: column;
    padding: 22px 24px 26px;
}
.category-post-card__title {
    margin: 0 0 24px;
    font-size: clamp(1.18rem, 1.7vw, 1.42rem);
    line-height: 1.28;
}
.category-post-card__title a { color: var(--pc-text); text-decoration: none; }
.category-post-card__title a:hover,
.category-post-card__title a:focus-visible {
    color: #2e7448;
    text-decoration: underline;
    text-decoration-thickness: 2px;
    text-underline-offset: 4px;
}
.category-post-card__more {
    display: inline-flex;
    min-width: 170px;
    min-height: 44px;
    align-items: center;
    justify-content: center;
    align-self: flex-start;
    gap: 11px;
    margin-top: auto;
    padding: 9px 18px 8px;
    border: 1px solid #e2ad24;
    border-bottom-width: 3px;
    border-radius: 14px;
    background: linear-gradient(180deg, #ffdc72 0%, #f7c43f 100%);
    color: #173e32;
    font-size: .98rem;
    font-weight: 800;
    line-height: 1;
    letter-spacing: .01em;
    text-decoration: none;
    box-shadow: 0 8px 18px rgba(222, 164, 24, .20);
    transition: transform .2s ease, box-shadow .2s ease, background .2s ease, border-color .2s ease;
}
.category-post-card__more-arrow {
    display: inline-block;
    font-size: 1.12em;
    line-height: 1;
    transition: transform .2s ease;
}
.category-post-card__more:hover,
.category-post-card__more:focus-visible {
    transform: translateY(-2px);
    border-color: #d69d12;
    background: linear-gradient(180deg, #ffe58d 0%, #f8c640 100%);
    color: #102f26;
    text-decoration: none;
    box-shadow: 0 12px 25px rgba(222, 164, 24, .28);
}
.category-post-card__more:hover .category-post-card__more-arrow,
.category-post-card__more:focus-visible .category-post-card__more-arrow {
    transform: translateX(4px);
}
.category-post-card__more:active {
    transform: translateY(1px);
    border-bottom-width: 1px;
    box-shadow: 0 5px 12px rgba(222, 164, 24, .18);
}


.category-content .navigation.pagination {
    position: relative;
    z-index: 2;
    margin-top: 38px;
}
.category-content .navigation.pagination .screen-reader-text {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}
.category-content .nav-links {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    gap: 9px;
}
.category-content .page-numbers {
    display: inline-flex;
    min-width: 44px;
    min-height: 44px;
    align-items: center;
    justify-content: center;
    padding: 8px 14px;
    border: 1px solid rgba(46, 116, 72, .24);
    border-radius: 999px;
    background: #fffdf7;
    color: #245b39;
    font-weight: 800;
    line-height: 1;
    text-decoration: none;
    box-shadow: 0 7px 18px rgba(34, 63, 55, .07);
    transition: transform .18s ease, background-color .18s ease, border-color .18s ease, box-shadow .18s ease;
}
.category-content a.page-numbers:hover,
.category-content a.page-numbers:focus-visible {
    transform: translateY(-2px);
    border-color: #2e7448;
    background: #edf6ef;
    color: #183f28;
    text-decoration: none;
    box-shadow: 0 10px 24px rgba(34, 63, 55, .12);
}
.category-content .page-numbers.current {
    border-color: #2e7448;
    background: #2e7448;
    color: #fff;
    box-shadow: 0 9px 22px rgba(46, 116, 72, .22);
}
.category-content .page-numbers.dots {
    min-width: 28px;
    padding-inline: 4px;
    border-color: transparent;
    background: transparent;
    box-shadow: none;
}
.category-content .page-numbers.prev,
.category-content .page-numbers.next { padding-inline: 18px; }

@media (max-width: 980px) {
    .category-post-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .category-corner-decoration { width: min(var(--category-corner-size, 150px), 22vw); }
    .category-content-decoration { max-width: 12vw; }
}

@media (max-width: 620px) {
    .category-header { padding: 28px 0 32px; }
    .category-header__icon { width: 42px; height: 42px; }
    .category-header .category-header__title { font-size: clamp(2.1rem, 11vw, 3rem); }
    .category-header__description { font-size: .98rem; }
    .category-year-switcher { grid-template-columns: 40px minmax(0, 1fr) 40px; gap: 7px; }
    .category-year-switcher__arrow { width: 40px; height: 40px; }
    .category-year-tabs { grid-template-columns: 1fr; gap: 0; }
    .category-year-tabs__link { min-height: 40px; padding: 7px 12px; font-size: .9rem; }
    .category-post-grid { grid-template-columns: 1fr; gap: 20px; }
    .category-post-card__body { min-height: 130px; padding: 20px; }
    .category-corner-decoration {
        width: min(var(--category-corner-size, 150px), 30vw);
        opacity: calc(var(--category-corner-opacity, .7) * .7);
    }
    .category-corner-decoration--top-left,
    .category-corner-decoration--bottom-left { left: -12px; }
    .category-corner-decoration--top-right,
    .category-corner-decoration--bottom-right { right: -12px; }
    .category-content-decoration {
        width: calc(var(--decor-size, 60px) * .72);
        max-width: 18vw;
        opacity: calc(var(--category-content-decor-opacity, .65) * .72);
    }
    .category-content .navigation.pagination { margin-top: 28px; }
    .category-content .nav-links { gap: 7px; }
    .category-content .page-numbers { min-width: 40px; min-height: 40px; padding: 7px 11px; }
}

@media (prefers-reduced-motion: reduce) {
    .category-year-tabs__link,
    .category-post-card,
    .category-post-card__image img,
    .category-post-card__more,
    .category-content .page-numbers { transition: none; }
}
