/* S11 Głogów — dynamiczne Programy, projekty i inicjatywy v2.9 */

.spj-projects-section {
    position: relative;
    padding: clamp(2.5rem, 5vw, 4.375rem) 0;
    background: #f5f9f7;
}

.spj-projects-section::before {
    position: absolute;
    top: 0;
    right: 0;
    left: 0;
    height: 0.28rem;
    background: linear-gradient(90deg, #005a46 0 82%, #d6a63b 82% 100%);
    content: "";
}

.spj-projects-section__header {
    display: grid;
    grid-template-columns: minmax(0, 1.1fr) minmax(18rem, 0.9fr);
    gap: 2rem;
    align-items: end;
    margin-bottom: 2.4rem;
}

.spj-projects-section__header h2,
.spj-projects-group__header h3,
.spj-projects-sidebar h2,
.spj-projects-sidebar h3 {
    margin: 0;
    color: #002f25;
    font-family: Montserrat, Arial, sans-serif;
    line-height: 1.15;
}

.spj-projects-section__header h2 {
    margin-top: 0.45rem;
    font-size: clamp(2rem, 4vw, 3.3rem);
}

.spj-projects-section__header > p,
.spj-projects-group__header p {
    margin: 0;
    color: #405d53;
    line-height: 1.75;
}

.spj-projects-groups {
    display: grid;
    gap: 2.5rem;
}

.spj-projects-group {
    padding: clamp(1.25rem, 3vw, 2rem);
    border: 1px solid rgba(0, 90, 70, 0.15);
    border-radius: 1.25rem;
    background: rgba(255, 255, 255, 0.72);
    box-shadow: 0 1rem 2.5rem rgba(0, 47, 37, 0.06);
}

.spj-projects-group__header {
    display: grid;
    grid-template-columns: minmax(0, 0.7fr) minmax(18rem, 1.3fr);
    gap: 1.5rem;
    align-items: start;
    margin-bottom: 1.35rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid rgba(0, 90, 70, 0.12);
}

.spj-projects-group__header h3 {
    font-size: clamp(1.55rem, 3vw, 2.15rem);
}

.spj-projects-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 1rem;
    margin: 0;
    padding: 0;
    list-style: none;
}

.spj-project-card {
    display: flex;
    min-height: 100%;
    flex-direction: column;
    overflow: hidden;
    border: 1px solid rgba(0, 90, 70, 0.16);
    border-radius: 1rem;
    background: #fff;
    color: #002f25;
    text-decoration: none;
    transition: transform 180ms ease, border-color 180ms ease, box-shadow 180ms ease;
}

.spj-project-card:hover {
    transform: translateY(-0.2rem);
    border-color: #006b54;
    box-shadow: 0 1rem 2rem rgba(0, 47, 37, 0.12);
    color: #002f25;
    text-decoration: none;
}

.spj-project-card:focus-visible,
.spj-projects-sidebar__link:focus-visible {
    outline: 0.2rem solid #ffbf47;
    outline-offset: 0.2rem;
}

.spj-project-card__logo {
    display: grid;
    min-height: 8.5rem;
    place-items: center;
    padding: 1.25rem;
    border-bottom: 1px solid rgba(0, 90, 70, 0.1);
    background: #fff;
}

.spj-project-card__logo img {
    display: block;
    width: auto;
    max-width: 100%;
    height: auto;
    max-height: 6rem;
    object-fit: contain;
}

.spj-project-card__body {
    display: flex;
    flex: 1;
    flex-direction: column;
    gap: 0.55rem;
    padding: 1.1rem 1.15rem 0.75rem;
}

.spj-project-card__body strong {
    color: #005a46;
    font-size: 1.05rem;
    line-height: 1.4;
}

.spj-project-card__body span {
    color: #526c63;
    font-size: 0.92rem;
    line-height: 1.55;
}

.spj-project-card__action {
    display: flex;
    justify-content: space-between;
    gap: 0.75rem;
    padding: 0.8rem 1.15rem 1.05rem;
    color: #006b54;
    font-size: 0.9rem;
    font-weight: 700;
}

.spj-projects-sidebar {
    margin-top: 1.5rem;
    overflow: hidden;
    border: 1px solid rgba(0, 90, 70, 0.16);
    border-radius: 1rem;
    background: #fff;
    box-shadow: 0 0.8rem 2rem rgba(0, 47, 37, 0.08);
}

.spj-projects-sidebar__heading {
    padding: 1.2rem 1.2rem 1rem;
    border-top: 0.25rem solid #d6a63b;
    background: #005a46;
}

.spj-projects-sidebar__eyebrow {
    display: block;
    margin-bottom: 0.25rem;
    color: #f5d980;
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.spj-projects-sidebar__heading h2 {
    color: #fff;
    font-size: 1.45rem;
}

.spj-projects-sidebar__group {
    padding: 1rem 1rem 0.3rem;
}

.spj-projects-sidebar__group + .spj-projects-sidebar__group {
    border-top: 1px solid rgba(0, 90, 70, 0.12);
}

.spj-projects-sidebar__group h3 {
    margin-bottom: 0.45rem;
    color: #006b54;
    font-size: 1.1rem;
}

.spj-projects-sidebar__description {
    margin: 0 0 0.75rem;
    color: #526c63;
    font-size: 0.9rem;
    line-height: 1.5;
}

.spj-projects-sidebar__list {
    display: grid;
    gap: 0.65rem;
    margin: 0;
    padding: 0 0 0.8rem;
    list-style: none;
}

.spj-projects-sidebar__link {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 0.7rem;
    padding: 0.8rem;
    border: 1px solid rgba(0, 90, 70, 0.12);
    border-radius: 0.75rem;
    color: #002f25;
    text-align: center;
    text-decoration: none;
}

.spj-projects-sidebar__link:hover {
    border-color: #006b54;
    background: #f5f9f7;
    color: #002f25;
    text-decoration: none;
}

.spj-projects-sidebar__logo {
    display: block;
    width: 100%;
    height: auto;
    min-height: 0;
    padding: 0.5rem;
    border-radius: 0.6rem;
    background: #fff;
    text-align: center;
}

.spj-projects-sidebar__logo img {
    display: block;
    width: auto;
    max-width: 100%;
    height: auto;
    max-height: none;
    margin: 0 auto;
    object-fit: initial;
}

.spj-projects-sidebar__text {
    display: grid;
    gap: 0.25rem;
    min-width: 0;
    text-align: center;
}

.spj-projects-sidebar__text strong {
    display: block;
    color: #005a46;
    line-height: 1.35;
}

.spj-projects-sidebar__text span {
    display: block;
    overflow: visible;
    color: #5f746c;
    font-size: 0.82rem;
    line-height: 1.45;
    text-overflow: clip;
}

.spj-projects-sidebar__arrow {
    display: inline-flex;
    align-items: center;
    align-self: center;
    gap: 0.35rem;
    padding-top: 0.15rem;
    border-bottom: 1px solid rgba(0, 107, 84, 0.35);
    color: #006b54;
    font-size: 0.82rem;
    font-weight: 700;
}

@media (max-width: 1100px) {
    .spj-projects-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

@media (max-width: 800px) {
    .spj-projects-section__header,
    .spj-projects-group__header { grid-template-columns: 1fr; gap: 0.8rem; }
    .spj-projects-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 520px) {
    .spj-projects-grid { grid-template-columns: 1fr; }
    .spj-project-card { min-height: auto; }
}

@media (prefers-reduced-motion: reduce) {
    .spj-project-card { transition: none; }
    .spj-project-card:hover { transform: none; }
}

@media print {
    .spj-projects-section { padding: 1rem 0; background: #fff; }
    .spj-projects-section::before,
    .spj-project-card__action { display: none; }
    .spj-projects-group { box-shadow: none; break-inside: avoid; }
    .spj-project-card { box-shadow: none; break-inside: avoid; }
    .spj-projects-sidebar { box-shadow: none; }
}

@media (forced-colors: active) {
    .spj-project-card,
    .spj-projects-group,
    .spj-projects-sidebar,
    .spj-projects-sidebar__link { border: 1px solid CanvasText; }
    .spj-project-card:focus-visible,
    .spj-projects-sidebar__link:focus-visible { outline: 0.2rem solid Highlight; }
}


/* S11: typografia modułu — maksymalna waga 700. */
.spj-projects-section :is(h2, h3, strong),
.spj-projects-sidebar :is(h2, h3, strong),
.spj-project-card__action {
    font-family: Montserrat, Arial, sans-serif;
    font-weight: 700;
}
