/*
Theme Name: OSP Framework
Theme URI: https://osp-test.byledogwizdka.pl
Description: Nowoczesny motyw potomny GeneratePress dla jednostek OSP.
Author: OSP Dzierżysław
Version: 1.2.1
Template: generatepress
Text Domain: osp-framework
Requires at least: 6.4
Requires PHP: 8.1
*/

:root {
    --osp-red: #d71920;
    --osp-red-dark: #a80f15;
    --osp-dark: #0d1117;
    --osp-dark-soft: #151b23;
    --osp-light: #f5f7fa;
    --osp-white: #ffffff;
    --osp-text: #1b2430;
    --osp-muted: #647081;
    --osp-border: #e3e8ef;
    --osp-radius: 22px;
    --osp-shadow: 0 18px 50px rgba(13, 17, 23, 0.10);
    --osp-container: 1220px;
}

html {
    scroll-behavior: smooth;
}

body.home {
    margin: 0;
    color: var(--osp-text);
    background: var(--osp-white);
    font-family: Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

body.home *,
body.home *::before,
body.home *::after {
    box-sizing: border-box;
}

body.home a {
    color: inherit;
}

.osp-site {
    overflow: hidden;
}

.osp-container {
    width: min(calc(100% - 40px), var(--osp-container));
    margin-inline: auto;
}

.osp-section {
    padding: 104px 0;
}

.osp-section--light {
    background: var(--osp-light);
}

.osp-eyebrow {
    margin: 0 0 12px;
    color: var(--osp-red);
    font-size: 0.82rem;
    font-weight: 800;
    letter-spacing: 0.16em;
    text-transform: uppercase;
}

.osp-section-title {
    max-width: 780px;
    margin: 0;
    font-size: clamp(2.1rem, 4vw, 4rem);
    line-height: 1.02;
    letter-spacing: -0.045em;
}

.osp-section-lead {
    max-width: 720px;
    margin: 20px 0 0;
    color: var(--osp-muted);
    font-size: 1.08rem;
    line-height: 1.75;
}

.osp-button {
    display: inline-flex;
    min-height: 52px;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 0 24px;
    border: 1px solid transparent;
    border-radius: 999px;
    background: var(--osp-red);
    color: var(--osp-white);
    font-weight: 800;
    text-decoration: none;
    transition: transform .2s ease, background .2s ease, border-color .2s ease;
}

.osp-button:hover,
.osp-button:focus {
    transform: translateY(-2px);
    background: var(--osp-red-dark);
    color: var(--osp-white);
}

.osp-button--ghost {
    border-color: rgba(255,255,255,.45);
    background: rgba(255,255,255,.08);
    backdrop-filter: blur(10px);
}

.osp-button--ghost:hover,
.osp-button--ghost:focus {
    border-color: var(--osp-white);
    background: rgba(255,255,255,.16);
}

/* Header */
.osp-header {
    position: absolute;
    z-index: 20;
    top: 0;
    left: 0;
    width: 100%;
    color: var(--osp-white);
}

.osp-header__inner {
    display: flex;
    min-height: 92px;
    align-items: center;
    justify-content: space-between;
    gap: 28px;
}

.osp-brand {
    display: flex;
    align-items: center;
    gap: 14px;
    color: var(--osp-white);
    font-weight: 900;
    text-decoration: none;
}

.osp-brand__mark {
    display: block;
    width: 52px;
    height: 52px;
    overflow: hidden;
    border: 1px solid rgba(255,255,255,.3);
    border-radius: 16px;
    background: rgba(255,255,255,.12);
    backdrop-filter: blur(12px);
}

.osp-brand__mark img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.osp-brand__text {
    display: grid;
    line-height: 1.05;
}

.osp-brand__text small {
    margin-top: 5px;
    opacity: .72;
    font-size: .7rem;
    font-weight: 700;
    letter-spacing: .12em;
    text-transform: uppercase;
}

.osp-nav {
    display: flex;
    align-items: center;
    gap: 28px;
}

.osp-nav a {
    color: var(--osp-white);
    font-size: .93rem;
    font-weight: 750;
    text-decoration: none;
}

.osp-nav a:hover {
    color: #ffb1b4;
}

.osp-menu-toggle {
    display: none;
    width: 48px;
    height: 48px;
    border: 1px solid rgba(255,255,255,.3);
    border-radius: 14px;
    background: rgba(255,255,255,.1);
    color: white;
    font-size: 1.35rem;
}

/* Hero */
.osp-hero {
    position: relative;
    display: flex;
    min-height: min(880px, 94vh);
    align-items: center;
    isolation: isolate;
    color: var(--osp-white);
    background-color: var(--osp-dark);
    background-position: center;
    background-size: cover;
}

.osp-hero::before {
    position: absolute;
    z-index: -2;
    inset: 0;
    content: "";
    background:
        linear-gradient(90deg, rgba(6,9,13,.93) 0%, rgba(6,9,13,.72) 46%, rgba(6,9,13,.28) 100%),
        linear-gradient(0deg, rgba(6,9,13,.72), transparent 55%);
}

.osp-hero::after {
    position: absolute;
    z-index: -1;
    right: -12%;
    bottom: -45%;
    width: 650px;
    height: 650px;
    border-radius: 50%;
    content: "";
    background: rgba(215,25,32,.22);
    filter: blur(95px);
}

.osp-hero__content {
    max-width: 790px;
    padding: 150px 0 100px;
}

.osp-hero__badge {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 24px;
    padding: 9px 14px;
    border: 1px solid rgba(255,255,255,.25);
    border-radius: 999px;
    background: rgba(255,255,255,.1);
    font-size: .78rem;
    font-weight: 800;
    letter-spacing: .1em;
    text-transform: uppercase;
    backdrop-filter: blur(10px);
}

.osp-hero h1 {
    max-width: 850px;
    margin: 0;
    font-size: clamp(3.4rem, 8vw, 7.4rem);
    line-height: .88;
    letter-spacing: -.065em;
    text-transform: uppercase;
}

.osp-hero__lead {
    max-width: 650px;
    margin: 28px 0 0;
    color: rgba(255,255,255,.82);
    font-size: clamp(1.1rem, 2vw, 1.35rem);
    line-height: 1.65;
}

.osp-hero__actions {
    display: flex;
    flex-wrap: wrap;
    gap: 14px;
    margin-top: 38px;
}

.osp-hero__scroll {
    position: absolute;
    bottom: 32px;
    left: 50%;
    color: rgba(255,255,255,.75);
    font-size: .75rem;
    font-weight: 800;
    letter-spacing: .12em;
    text-transform: uppercase;
    transform: translateX(-50%);
}

/* Stats */
.osp-stats {
    position: relative;
    z-index: 5;
    margin-top: -58px;
}

.osp-stats__grid {
    display: grid;
    overflow: hidden;
    border: 1px solid rgba(255,255,255,.7);
    border-radius: var(--osp-radius);
    background: rgba(255,255,255,.94);
    box-shadow: var(--osp-shadow);
    grid-template-columns: repeat(4, 1fr);
    backdrop-filter: blur(18px);
}

.osp-stat {
    padding: 34px 30px;
    text-align: center;
}

.osp-stat + .osp-stat {
    border-left: 1px solid var(--osp-border);
}

.osp-stat strong {
    display: block;
    color: var(--osp-dark);
    font-size: clamp(2.1rem, 4vw, 3.25rem);
    line-height: 1;
    letter-spacing: -.05em;
}

.osp-stat span {
    display: block;
    margin-top: 10px;
    color: var(--osp-muted);
    font-size: .82rem;
    font-weight: 800;
    letter-spacing: .08em;
    text-transform: uppercase;
}

/* About */
.osp-about {
    display: grid;
    align-items: center;
    gap: 76px;
    grid-template-columns: 1.05fr .95fr;
}

.osp-about__media {
    position: relative;
    overflow: hidden;
    border-radius: var(--osp-radius);
    background: linear-gradient(135deg, #dce2e9, #aeb8c4);
    box-shadow: var(--osp-shadow);
}

.osp-about__media img {
    display: block;
    width: 100%;
    height: auto;
    object-fit: contain;
}

.osp-about__placeholder {
    display: grid;
    place-items: center;
    padding: 50px;
    color: #596779;
    font-weight: 800;
    text-align: center;
}

.osp-about__content p:not(.osp-eyebrow) {
    color: var(--osp-muted);
    font-size: 1.06rem;
    line-height: 1.8;
}

/* News */
.osp-news-grid {
    display: grid;
    gap: 26px;
    margin-top: 48px;
    grid-template-columns: repeat(3, 1fr);
}

.osp-card {
    overflow: hidden;
    border: 1px solid var(--osp-border);
    border-radius: var(--osp-radius);
    background: var(--osp-white);
    box-shadow: 0 10px 35px rgba(13,17,23,.06);
    transition: transform .25s ease, box-shadow .25s ease;
}

.osp-card:hover {
    transform: translateY(-6px);
    box-shadow: var(--osp-shadow);
}

.osp-card__image {
    display: block;
    aspect-ratio: 16 / 10;
    overflow: hidden;
    background: linear-gradient(135deg, #202a36, #7f8996);
}

.osp-card__image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform .45s ease;
}

.osp-card:hover .osp-card__image img {
    transform: scale(1.04);
}

.osp-card__body {
    padding: 28px;
}

.osp-card__date {
    color: var(--osp-red);
    font-size: .75rem;
    font-weight: 800;
    letter-spacing: .08em;
    text-transform: uppercase;
}

.osp-card h3 {
    margin: 12px 0 12px;
    font-size: 1.45rem;
    line-height: 1.2;
}

.osp-card p {
    color: var(--osp-muted);
    line-height: 1.7;
}

.osp-card__link {
    display: inline-flex;
    margin-top: 10px;
    color: var(--osp-dark);
    font-weight: 850;
    text-decoration: none;
}

/* Gallery */
.osp-gallery {
    display: grid;
    gap: 14px;
    margin-top: 48px;
    grid-template-columns: repeat(12, 1fr);
}

.osp-gallery__item {
    position: relative;
    min-height: 260px;
    overflow: hidden;
    border-radius: 18px;
    background: linear-gradient(135deg, #d6dde5, #9ba6b4);
}

.osp-gallery__item:nth-child(1),
.osp-gallery__item:nth-child(6) { grid-column: span 5; }
.osp-gallery__item:nth-child(2),
.osp-gallery__item:nth-child(5) { grid-column: span 4; }
.osp-gallery__item:nth-child(3),
.osp-gallery__item:nth-child(4) { grid-column: span 3; }

.osp-gallery__item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform .45s ease;
}

.osp-gallery__item:hover img {
    transform: scale(1.05);
}

.osp-gallery__placeholder {
    display: grid;
    height: 100%;
    min-height: 260px;
    place-items: center;
    padding: 20px;
    color: #5d6a79;
    font-weight: 800;
    text-align: center;
}

/* Recruitment */
.osp-recruitment {
    position: relative;
    overflow: hidden;
    border-radius: 34px;
    background: var(--osp-dark);
    color: var(--osp-white);
}

.osp-recruitment::before {
    position: absolute;
    top: -180px;
    right: -160px;
    width: 500px;
    height: 500px;
    border-radius: 50%;
    content: "";
    background: rgba(215,25,32,.34);
    filter: blur(80px);
}

.osp-recruitment__inner {
    position: relative;
    z-index: 1;
    padding: clamp(48px, 8vw, 96px);
}

.osp-recruitment .osp-section-title {
    max-width: 850px;
}

.osp-benefits {
    display: grid;
    gap: 16px;
    margin: 42px 0;
    grid-template-columns: repeat(4, 1fr);
}

.osp-benefit {
    padding: 22px;
    border: 1px solid rgba(255,255,255,.12);
    border-radius: 18px;
    background: rgba(255,255,255,.06);
}

.osp-benefit strong {
    display: block;
    margin-bottom: 7px;
}

.osp-benefit span {
    color: rgba(255,255,255,.67);
    font-size: .9rem;
    line-height: 1.55;
}

/* Contact */
.osp-contact {
    display: grid;
    gap: 54px;
    grid-template-columns: .82fr 1.18fr;
}

.osp-contact__details {
    display: grid;
    gap: 14px;
    margin-top: 34px;
}

.osp-contact__item {
    padding: 20px 22px;
    border: 1px solid var(--osp-border);
    border-radius: 18px;
    background: var(--osp-white);
}

.osp-contact__item small {
    display: block;
    margin-bottom: 4px;
    color: var(--osp-muted);
    font-size: .72rem;
    font-weight: 800;
    letter-spacing: .1em;
    text-transform: uppercase;
}

.osp-contact__map {
    min-height: 520px;
    overflow: hidden;
    border-radius: var(--osp-radius);
    background: #dfe5ec;
    box-shadow: var(--osp-shadow);
}

.osp-contact__map iframe {
    width: 100%;
    height: 100%;
    min-height: 520px;
    border: 0;
}

/* Footer */
.osp-footer {
    padding: 38px 0;
    background: #070a0e;
    color: rgba(255,255,255,.72);
}

.osp-footer__inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
}

.osp-footer a {
    color: var(--osp-white);
}

/* Animation */
.osp-reveal {
    opacity: 0;
    transform: translateY(24px);
    transition: opacity .7s ease, transform .7s ease;
}

.osp-reveal.is-visible {
    opacity: 1;
    transform: none;
}

@media (max-width: 1024px) {
    .osp-nav {
        position: absolute;
        top: 80px;
        right: 20px;
        left: 20px;
        display: none;
        padding: 22px;
        border: 1px solid rgba(255,255,255,.16);
        border-radius: 20px;
        background: rgba(8,11,16,.96);
        flex-direction: column;
        align-items: stretch;
    }

    .osp-nav.is-open {
        display: flex;
    }

    .osp-menu-toggle {
        display: block;
    }

    .osp-stats__grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .osp-stat:nth-child(3) {
        border-left: 0;
        border-top: 1px solid var(--osp-border);
    }

    .osp-stat:nth-child(4) {
        border-top: 1px solid var(--osp-border);
    }

    .osp-about,
    .osp-contact {
        grid-template-columns: 1fr;
    }

    .osp-news-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .osp-benefits {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 720px) {
    .osp-container {
        width: min(calc(100% - 28px), var(--osp-container));
    }

    .osp-section {
        padding: 74px 0;
    }

    .osp-header__inner {
        min-height: 76px;
    }

    .osp-brand__mark {
        width: 44px;
        height: 44px;
        border-radius: 13px;
    }

    .osp-brand__text small {
        display: none;
    }

    .osp-hero {
        min-height: 780px;
        background-position: 58% center;
    }

    .osp-hero::before {
        background: linear-gradient(90deg, rgba(6,9,13,.92), rgba(6,9,13,.64));
    }

    .osp-hero__content {
        padding-top: 130px;
    }

    .osp-hero h1 {
        font-size: clamp(3.1rem, 16vw, 5.3rem);
    }

    .osp-hero__actions {
        flex-direction: column;
        align-items: stretch;
    }

    .osp-stats {
        margin-top: -42px;
    }

    .osp-stats__grid,
    .osp-news-grid,
    .osp-benefits {
        grid-template-columns: 1fr;
    }

    .osp-stat + .osp-stat {
        border-top: 1px solid var(--osp-border);
        border-left: 0;
    }

    .osp-about__media,
    .osp-about__placeholder {
        min-height: 390px;
    }

    .osp-gallery {
        grid-template-columns: 1fr;
    }

    .osp-gallery__item,
    .osp-gallery__item:nth-child(n) {
        grid-column: auto;
    }

    .osp-footer__inner {
        align-items: flex-start;
        flex-direction: column;
    }
}


@media (max-width: 768px) {
    .osp-about__media {
        min-height: 0 !important;
        height: auto !important;
        aspect-ratio: auto !important;
        background: transparent !important;
    }

    .osp-about__media img {
        display: block !important;
        width: 100% !important;
        height: auto !important;
        object-fit: contain !important;
    }
}
