.quick-links-more {
    margin-top: 6px;
    padding-top: 3px;
    border-top: 1px solid var(--line);
}

.quick-links-more summary {
    padding-block: 6px;
    color: var(--green);
    font-size: 0.875rem;
    font-weight: 700;
    cursor: pointer;
}

.lower-heading {
    justify-content: flex-start;
    flex-wrap: wrap;
    gap: 6px 15px;
    margin-bottom: 13px;
}

.lower-heading h2 {
    display: flex;
    align-items: center;
    gap: 0.48em;
    min-width: 0;
    margin: 0;
    scroll-margin-block-start: 4rem;
}

.section-rule {
    flex: 1 1 20px;
    height: 1px;
    background: #9db19b;
}

.section-icon,
.school-card-icon { color: var(--green); }

.section-icon { flex: 0 0 0.95em; }
.section-icon svg { display: block; width: 0.95em; height: 0.95em; fill: currentColor; }

.schools {
    margin-top: 26px;
    padding: 0;
}

.schools::before { content: none; }
.schools .lower-heading { margin-bottom: clamp(16px, 2.2vw, 28px); }
.schools .lower-heading > .text-link { font-size: 0.9375rem; font-weight: 750; }
.school-cards { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }

.school-card {
    position: relative;
    isolation: isolate;
    display: flex;
    flex-direction: column;
    min-width: 0;
    min-height: clamp(178px, 15vw, 194px);
    padding: clamp(14px, 1.7vw, 23px);
    border-radius: 15px;
    background: linear-gradient(138deg, #fff 70%, #f2f6ee);
}

/* Artwork crop coordinates in the supplied 2172 × 724 composition. */
.school-card--liceum {
    --school-art-x: 499;
    --school-art-y: 399;
    --school-art-w: 229;
    --school-art-h: 221;
    --school-art-clip: polygon(18% 0, 100% 0, 100% 100%, 0 100%, 0 58%, 18% 43%);
}
.school-card--technikum {
    --school-art-x: 1133;
    --school-art-y: 337;
    --school-art-w: 294;
    --school-art-h: 283;
    --school-art-clip: polygon(23% 0, 100% 0, 100% 100%, 0 100%, 0 66%, 23% 54%);
}
.school-card--szkola-branzowa {
    --school-art-x: 1904;
    --school-art-y: 403;
    --school-art-w: 228;
    --school-art-h: 217;
}

.school-card:is(.school-card--liceum, .school-card--technikum, .school-card--szkola-branzowa)::before {
    content: "";
    position: absolute;
    inset: auto 0 0 auto;
    z-index: -1;
    width: min(50%, calc(var(--school-art-w) * 0.5px));
    aspect-ratio: var(--school-art-w) / var(--school-art-h);
    border-end-end-radius: 14px;
    background-image: url("assets/school-card-art.webp");
    background-position:
        calc(var(--school-art-x) / (2172 - var(--school-art-w)) * 100%)
        calc(var(--school-art-y) / (724 - var(--school-art-h)) * 100%);
    background-size: calc(2172 / var(--school-art-w) * 100%) calc(724 / var(--school-art-h) * 100%);
    background-repeat: no-repeat;
    clip-path: var(--school-art-clip, none);
    mask-image: linear-gradient(to right, transparent, #000 25%),
        linear-gradient(to bottom, transparent, #000 19%);
    mask-composite: intersect;
    pointer-events: none;
}

.school-card-kind {
    display: flex;
    align-items: center;
    gap: clamp(10px, 1.35vw, 18px);
    margin-bottom: 5px;
}
.school-card-kind .eyebrow { font-size: 0.8125rem; font-weight: 800; letter-spacing: 0; }
.school-card-icon { flex: 0 0 34px; width: 34px; height: 34px; }
.school-card-icon svg { width: 100%; height: 100%; }
.school-card h3 {
    margin: 0 0 8px;
    color: var(--ink);
    font-size: 1.25rem;
    font-weight: 800;
    line-height: 1.2;
    letter-spacing: -0.025em;
}
.school-card .school-description { max-width: 16.5rem; margin-bottom: 16px; }
.school-card .school-description p { font-size: 0.875rem; line-height: 1.4; }
.school-card > .text-link {
    align-self: flex-start;
    margin-top: auto;
    font-size: 0.9375rem;
    font-weight: 750;
}

.partners { padding-top: 25px; }

.partner-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(calc(100% / 6), 1fr));
    gap: 0;
    border: 1px solid var(--line);
    border-radius: 12px;
    background: #fff;
}

.partner-card {
    position: relative;
    min-width: 0;
    min-height: 98px;
    height: auto;
    padding: 8px 9px;
    border: 0;
    border-radius: 10px;
    background: #fff;
    color: #183e2d;
    text-align: center;
    overflow: visible;
}

.partner-card:not(:last-child)::after {
    content: "";
    position: absolute;
    inset: 22% 0 22% auto;
    border-inline-end: 1px solid #c5d1c4;
    pointer-events: none;
}

.partner-card:hover { box-shadow: inset 0 0 0 1px #9bb087; }

.partner-logo {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 76px;
    overflow: hidden;
}

.partner-logo img {
    width: auto;
    height: auto;
    max-width: min(100%, var(--partner-logo-width, 152px));
    max-height: var(--partner-logo-height, 64px);
    object-fit: contain;
    transform: translateX(var(--partner-logo-offset, 0%)) scale(var(--partner-logo-zoom, 1));
}

.partner-card--politechnika-warszawska { --partner-logo-width: 134px; }
.partner-card--cisco-networking-academy-partner { --partner-logo-height: 56px; }
.partner-card--perspektywy-2026 { --partner-logo-height: 61px; }
/* Compensate for whitespace within these two artwork files. */
.partner-card--passport-photo-online {
    --partner-logo-offset: 7%;
    --partner-logo-zoom: 1.24;
}
.partner-card--leony-2026-na-ramionach-olbrzymow {
    --partner-logo-height: 76px;
    --partner-logo-zoom: 1.16;
}

.location-contact {
    --contact-green: #0d5918;
    --contact-ink: #12351b;
    --contact-tile: #e1f1db;
    --contact-divider: #d5e7ce;
    --contact-outline: #91bb7e;
    --contact-button-ink: #fff;
    display: grid;
    grid-template-areas: "location-heading heading" "location card";
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    grid-template-rows: auto 1fr;
    gap: 16px clamp(10px, 2vw, 26px);
    margin-block: clamp(28px, 4vw, 44px) 28px;
    padding: 0;
    border: 0;
}

.contact-heading {
    grid-area: heading;
    margin: 0;
    padding-block-start: 8px;
}

.contact-heading .section-icon { color: var(--contact-green); }
.contact-heading .section-rule { background: var(--contact-outline); }
.contact-location-heading { grid-area: location-heading; }

.contact-card {
    grid-area: card;
    position: relative;
    isolation: isolate;
    display: grid;
    align-content: space-between;
    gap: clamp(12px, 1.3vw, 18px);
    width: auto;
    height: auto;
    min-width: 0;
    min-height: 0;
    padding: clamp(15px, 2.2vw, 28px);
    border: 1px solid var(--contact-outline);
    border-radius: 20px;
    background: #fff;
    color: var(--contact-ink);
}

.contact-detail {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
    align-items: start;
    gap: clamp(11px, 1.5vw, 20px);
}

.contact-card .contact-icon {
    display: grid;
    place-items: center;
    width: clamp(38px, 4.4vw, 57px);
    aspect-ratio: 1;
    margin: 0;
    border-radius: 11px;
    background: var(--contact-tile);
    color: var(--contact-green);
}
.contact-card .contact-icon svg { width: 61%; height: 61%; }

.contact-detail h3 {
    margin-bottom: 7px;
    color: var(--contact-ink);
    font-size: 1.375rem;
    font-weight: 800;
    line-height: 1.24;
    letter-spacing: -0.025em;
}

.contact-card address {
    color: var(--muted);
    font-size: 1.125rem;
    font-style: normal;
    line-height: 1.45;
}

.contact-map-link {
    display: inline-flex;
    align-items: center;
    gap: 0.5em;
    min-height: 32px;
    margin-top: 6px;
    color: var(--contact-green);
    font-weight: 750;
}
.contact-map-link svg { flex: 0 0 1.3em; width: 1.3em; height: 1.3em; }
.contact-map-link span:first-of-type,
.contact-phone strong { text-decoration: underline; text-underline-offset: 0.18em; }

.contact-phone {
    align-items: center;
    color: var(--contact-ink);
    font-size: 1.625rem;
    font-weight: 800;
    line-height: 1.25;
}

.contact-phone-label {
    padding-block: clamp(10px, 1.3vw, 17px);
    border-block: 1px solid var(--contact-divider);
}
.contact-phone strong { color: var(--contact-green); }
.contact-extra { overflow-wrap: anywhere; }
.contact-extra a { color: var(--contact-green); text-decoration: underline; text-underline-offset: 0.15em; }

.contact-social h3 {
    margin-bottom: 12px;
    color: var(--contact-ink);
    font-size: 1.375rem;
    font-weight: 800;
    line-height: 1.25;
}

.contact-social-links {
    display: flex;
    flex-wrap: wrap;
    gap: clamp(8px, 1.3vw, 18px);
}

.contact-social-links a {
    display: inline-flex;
    align-items: center;
    justify-content: flex-start;
    gap: 0.6em;
    max-width: 100%;
    min-width: min(100%, 11rem);
    min-height: 50px;
    padding: 0.52em clamp(12px, 1.5vw, 20px);
    border: 1px solid transparent;
    border-radius: 9px;
    background: var(--contact-green);
    color: var(--contact-button-ink);
    font-weight: 750;
}

.contact-social-links a:hover { text-decoration: underline; }
.contact-social-links span { min-width: 0; }
.contact-social-links svg {
    flex: 0 0 auto;
    width: clamp(24px, 1.65em, 34px);
    height: clamp(24px, 1.65em, 34px);
    fill: currentColor;
}
.contact-social-links .social-facebook svg {
    padding: 0.11em;
    border-radius: 50%;
    background: currentColor;
    fill: var(--contact-green);
}
.contact-social-links .social-youtube svg { transform: scale(1.14); }
.contact-social-links .social-youtube svg path[fill] { fill: var(--contact-green); }

.contact-map-frame {
    grid-area: location;
    position: relative;
    min-height: 245px;
    overflow: hidden;
    border: 1px solid var(--contact-outline);
    border-radius: 16px;
    background: var(--soft);
}
.contact-map-frame iframe {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    border: 0;
}

.contact-photo {
    position: absolute;
    z-index: -1;
    inset: auto 0 0 auto;
    width: min(88%, 25rem);
    max-height: 100%;
    aspect-ratio: 760 / 895;
    overflow: hidden;
    border-radius: inherit;
    filter: grayscale(1);
    opacity: 0.17;
    mask-image: linear-gradient(100deg, transparent, #000 48%);
    pointer-events: none;
}

.contact-photo img {
    position: absolute;
    inset: 0 0 0 auto;
    /* Keep only the right-hand photograph from the 1756 × 895 reference. */
    width: calc(100% * 1756 / 760);
    max-width: none;
    height: 100%;
    object-fit: cover;
    object-position: right center;
}

@media (max-width: 760px) {
    .location-contact {
        grid-template-areas: "heading" "card" "location-heading" "location";
        grid-template-columns: minmax(0, 1fr);
        grid-template-rows: auto;
        row-gap: 16px;
    }

    .contact-social-links a { min-width: 0; }
}

.site-footer {
    position: relative;
    margin-top: 42px;
    background: #183e2d;
    border-top: 0;
    color: #fff;
}

.footer-wave {
    position: absolute;
    bottom: 100%;
    left: 0;
    display: block;
    width: 100%;
    height: 42px;
    pointer-events: none;
}

.footer-inner { gap: clamp(20px, 4vw, 48px); min-height: 88px; padding-block: 14px; }
.site-footer .footer-brand { color: #fff; }
.footer-brand strong { color: inherit; font-size: 1.0625rem; font-weight: 800; }
.footer-brand span span { font-size: 0.9375rem; }
.footer-brand > img { width: 54px; height: 54px; border: 2px solid #f3f2df; border-radius: 50%; object-fit: cover; }
.site-footer nav { flex: 1 1 auto; min-width: 0; padding-inline-start: clamp(16px, 3vw, 38px); border-inline-start: 1px solid #d6bf68; }
.site-footer .footer-menu { width: 100%; flex-wrap: wrap; justify-content: space-between; gap: 8px 16px; }
.site-footer .footer-menu a { color: #fff; }
.back-to-top { transform: translateY(calc(0px - var(--footer-clearance, 0px))); }

@media (min-width: 901px) {
    .partner-card:nth-child(6n)::after { display: none; }
}

@media (max-width: 900px) {
    .partner-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
    .partner-card { min-height: 88px; }
    .partner-logo { height: 72px; }
}

@media (min-width: 481px) and (max-width: 900px) {
    .partner-card:nth-child(3n)::after { display: none; }
}

@media (max-width: 760px) {
    .school-cards { grid-template-columns: 1fr; }
    .site-footer nav { width: 100%; flex-basis: 100%; padding: 12px 0 0; border-inline-start: 0; border-top: 1px solid #d6bf68; }
}

@media (max-width: 480px) {
    .lower-heading .section-rule { display: none; }
    .lower-heading > .text-link { white-space: normal; }
    .partner-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .partner-card:nth-child(2n)::after { display: none; }
}
