/* =========================================
   Strona pojedynczego zastosowania – premium
   ========================================= */

body.page-zastosowanie {
    --section-spacing: 80px;
    --ease-out-expo: cubic-bezier(0.16, 1, 0.3, 1);
    --ease-smooth: cubic-bezier(0.4, 0, 0.2, 1);
    font-family: var(--font-body, 'Inter', sans-serif);
    color: var(--text-dark, #1a1a1a);
    line-height: 1.7;
    overflow-x: hidden;
    background-color: #fff;
    -webkit-font-smoothing: antialiased;
}

body.page-zastosowanie:focus-visible,
body.page-zastosowanie a:focus-visible,
body.page-zastosowanie button:focus-visible {
    outline: 2px solid var(--primary-color);
    outline-offset: 2px;
}

body.page-zastosowanie .section-compact {
    padding: var(--section-spacing, 80px) 0;
}

/* 1. Hero – wideo z tytułem i krótkim opisem */
.zastosowanie-hero {
    position: relative;
    height: 55vh;
    min-height: 320px;
    width: 100%;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    padding-bottom: 60px;
    margin-bottom: 56px;
    color: #fff;
    overflow: hidden;
    z-index: 0;
}

.zastosowanie-hero-bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
}

.zastosowanie-hero .hero-video-bg {
    width: 100%;
    height: 100%;
    object-fit: cover;
    position: absolute;
    top: 0;
    left: 0;
    transform: scale(1.05);
}

.zastosowanie-hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(180deg, rgba(0,0,0,0.15) 0%, rgba(0,0,0,0.35) 50%, rgba(0,0,0,0.82) 100%);
    z-index: 0;
}

.zastosowanie-hero-content {
    position: relative;
    z-index: 1;
    width: 100%;
}

.zastosowanie-title {
    font-family: 'Inter', sans-serif;
    font-size: clamp(32px, 5vw, 52px);
    font-weight: 700;
    margin: 0 0 12px 0;
    line-height: 1.12;
    letter-spacing: -0.02em;
    max-width: 880px;
    opacity: 0;
    transform: translateY(16px);
    animation: heroReveal 0.7s var(--ease-out-expo) 0.15s forwards;
    text-shadow: 0 1px 24px rgba(0,0,0,0.2);
}

.zastosowanie-subtitle {
    font-family: 'Inter', sans-serif;
    font-size: 12px;
    font-weight: 500;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--primary-color);
    margin: 0 0 16px 0;
    opacity: 0;
    animation: heroReveal 0.6s var(--ease-out-expo) 0.25s forwards;
    transform: translateY(12px);
}

.zastosowanie-lead {
    font-family: 'Inter', sans-serif;
    font-size: 17px;
    font-weight: 400;
    line-height: 1.5;
    margin: 0;
    opacity: 0;
    transform: translateY(12px);
    max-width: 560px;
    animation: heroReveal 0.6s var(--ease-out-expo) 0.35s forwards;
    color: rgba(255,255,255,0.9);
}

@keyframes heroReveal {
    to { opacity: 1; transform: translateY(0); }
}

/* 2. Project block – w kontenerze (nie 100vw), niższy */
.zastosowanie-project-block {
    margin-bottom: var(--section-spacing, 80px);
}

.zastosowanie-project-block-inner {
    display: grid;
    grid-template-columns: 42% 1fr;
    overflow: hidden;
    border-radius: 15px;
    align-items: stretch;
}

.zastosowanie-project-panel--text {
    background-color: var(--primary-dark, #3a632b);
    color: #fff;
    padding: 32px 40px 32px;
    display: flex;
    flex-direction: column;
    border-radius: 15px 0 0 15px;
}

/* Te same style i wymiary co .zastosowanie-content-title / .zastosowanie-content-body (białe sekcje) */
.zastosowanie-project-title {
    font-family: 'Inter', sans-serif;
    font-size: 22px;
    font-weight: 600;
    line-height: 1.35;
    margin: 0 0 20px 0;
    letter-spacing: -0.01em;
    color: #fff;
}

.zastosowanie-project-desc {
    font-size: 15px;
    line-height: 1.75;
    margin: 0 0 20px 0;
    color: rgba(255, 255, 255, 0.95);
    flex: 1;
}

.zastosowanie-project-line {
    display: block;
    width: 50px;
    height: 2px;
    background: rgba(255,255,255,0.5);
    margin-bottom: 12px;
}

.zastosowanie-project-meta {
    font-size: 13px;
    font-weight: 500;
    margin-bottom: 4px;
    color: rgba(255, 255, 255, 0.9);
}

.zastosowanie-project-nav {
    display: flex;
    gap: 12px;
    margin-top: auto;
    justify-content: flex-end;
}

.zastosowanie-project-arrow {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: #fff;
    color: #1a1a1a;
    display: flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    transition: background 0.2s, color 0.2s, transform 0.2s;
}

.zastosowanie-project-arrow:hover {
    background: rgba(255,255,255,0.9);
    color: #111;
    transform: scale(1.05);
}

/* Zdjęcie – te same wymiary i styl co .zastosowanie-content-media (białe sekcje) */
.zastosowanie-project-panel--image {
    position: relative;
    overflow: hidden;
    border-radius: 0 15px 15px 0;
    aspect-ratio: 4 / 3;
    background: #f0f0f0;
}

.zastosowanie-project-panel--image img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
}

/* 2b. Spójne bloki treści – jeden układ (tekst | zdjęcie lub zdjęcie | tekst) */
.zastosowanie-content-section {
    /* section-compact daje padding */
    border-radius: 15px;
}

.zastosowanie-content-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 56px;
    align-items: start;
}

.zastosowanie-content-row--image-first .zastosowanie-content-media {
    order: -1;
}

.zastosowanie-content-title {
    font-family: 'Inter', sans-serif;
    font-size: 22px;
    font-weight: 600;
    color: #1a1a1a;
    margin: 0 0 20px 0;
    letter-spacing: -0.01em;
    line-height: 1.35;
}

.zastosowanie-content-body {
    font-size: 15px;
    line-height: 1.75;
    color: #555;
}

.zastosowanie-content-body .about-page-body {
    margin-bottom: 1em;
}

.zastosowanie-content-body .about-page-body:last-child {
    margin-bottom: 0;
}

.zastosowanie-content-media {
    border-radius: 8px;
    overflow: hidden;
    background: #f0f0f0;
    aspect-ratio: 4 / 3;
    width: 100%;
    min-height: 0;
}

.zastosowanie-content-media img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
}

/* Typografia – czytelna, przejrzysta */
.zastosowanie-section-title {
    font-family: 'Inter', sans-serif;
    font-size: 22px;
    font-weight: 600;
    color: #1a1a1a;
    margin: 0 0 20px 0;
    letter-spacing: -0.01em;
    line-height: 1.35;
}

.zastosowanie-section-title-center {
    text-align: center;
}

body.page-zastosowanie .bg-light {
    background-color: #fafafa;
}

/* Zalety – nagłówek w spójnym stylu */
.zastosowanie-content-section .features-section .section-heading {
    margin-top: 0;
}

/* 3. Polecane produkty – clean slider */
.zastosowanie-products-section {
    padding: var(--section-spacing, 80px) 0;
    background: #fafafa;
}

.zastosowanie-products-header {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    align-items: center;
    margin-bottom: 28px;
}

.zastosowanie-products-header .zastosowanie-section-title {
    grid-column: 2;
    text-align: center;
    margin-bottom: 0;
}

.zastosowanie-products-arrows {
    grid-column: 3;
    justify-self: end;
    display: flex;
    gap: 10px;
}

.zastosowanie-products-arrow {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    border: 1px solid #e5e5e5;
    background: #fff;
    color: #333;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: border-color 0.2s, background 0.2s, color 0.2s;
}

.zastosowanie-products-arrow:hover {
    border-color: var(--primary-color);
    background: var(--primary-color);
    color: #fff;
}

.zastosowanie-products-slider-wrap {
    overflow: hidden;
    margin: 0 -40px;
    padding: 0 40px;
}

.zastosowanie-products-slider {
    display: flex;
    gap: 24px;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    padding-bottom: 12px;
    margin-bottom: -12px;
    scrollbar-width: none;
}

.zastosowanie-products-slider::-webkit-scrollbar {
    display: none;
}

.zastosowanie-products-slider .product-card-link {
    flex: 0 0 300px;
    scroll-snap-align: start;
}

.zastosowanie-products-slider .product-card-new {
    width: 100%;
    min-height: 320px;
    background: #fff;
    border: 1px solid rgba(0, 0, 0, 0.06);
    border-radius: 8px;
    overflow: hidden;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.zastosowanie-products-slider .product-card-link:hover .product-card-new {
    border-color: rgba(0, 0, 0, 0.1);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.06);
}

/* 4. Realizacje – 1:1 jak zrzut: header + filtry + karty tekst|zdjęcie */
.zastosowanie-projects-wrap {
    padding: var(--section-spacing, 80px) 0;
    background: #fff;
}

.zastosowanie-projects-header {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    align-items: flex-start;
    gap: 24px;
    margin-bottom: 48px;
}

.zastosowanie-projects-header-left {
    max-width: 640px;
}

.zastosowanie-projects-title {
    font-family: 'Inter', sans-serif;
    font-size: clamp(24px, 3vw, 32px);
    font-weight: 700;
    line-height: 1.25;
    color: #1a1a1a;
    margin: 0;
    letter-spacing: -0.02em;
}

.zastosowanie-projects-filters {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.zastosowanie-filter-btn {
    padding: 10px 20px;
    border-radius: 999px;
    border: 1px solid #e0e0e0;
    background: #f5f5f5;
    color: #555;
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    transition: background 0.2s, color 0.2s, border-color 0.2s;
}

.zastosowanie-filter-btn:hover {
    background: #eee;
    color: #333;
}

.zastosowanie-filter-btn.is-active {
    background: var(--primary-color);
    border-color: var(--primary-color);
    color: #fff;
}

.zastosowanie-projects-list {
    display: flex;
    flex-direction: column;
}

.zastosowanie-project-card-row {
    width: 100vw;
    max-width: 100vw;
    margin-left: calc(50% - 50vw);
    padding: calc(var(--section-spacing, 80px) * 0.6) 0;
    box-sizing: border-box;
}

.zastosowanie-project-card-row--green {
    background-color: rgba(74, 124, 55, 0.06);
}

.zastosowanie-project-card-row:not(.zastosowanie-project-card-row--green) {
    background-color: #fff;
}

/* Karty przeznaczeń – te same proporcje i wymiary co .zastosowanie-content-row (1fr 1fr, gap 56px, aspect-ratio 4/3) */
.zastosowanie-project-card {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 56px;
    align-items: start;
}

.zastosowanie-project-card--image-left .zastosowanie-project-card-media {
    order: -1;
}

.zastosowanie-project-card-cat {
    display: block;
    font-size: 13px;
    font-weight: 500;
    color: var(--primary-color);
    margin-bottom: 14px;
    letter-spacing: 0.02em;
}

.zastosowanie-project-card-title {
    font-family: 'Inter', sans-serif;
    font-size: 22px;
    font-weight: 600;
    line-height: 1.35;
    color: #1a1a1a;
    margin: 0 0 20px 0;
    letter-spacing: -0.01em;
}

.zastosowanie-project-card-desc {
    font-size: 15px;
    line-height: 1.75;
    color: #555;
    margin: 0 0 20px 0;
}

.zastosowanie-project-card-media {
    border-radius: 8px;
    overflow: hidden;
    background: #f0f0f0;
    aspect-ratio: 4 / 3;
    width: 100%;
    min-height: 0;
}

.zastosowanie-project-card-media img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
}

/* Contact form – odstęp */
body.page-zastosowanie .contact-form-section {
    padding: var(--section-spacing, 80px) 0;
}

/* Animacje wejścia – subtelne, clean */
body.page-zastosowanie .fade-in-up {
    opacity: 0;
    transform: translateY(18px);
    transition: opacity 0.5s var(--ease-out-expo), transform 0.5s var(--ease-out-expo);
}

body.page-zastosowanie .fade-in-up.visible {
    opacity: 1;
    transform: translateY(0);
}

/* Tytuły sekcji – bez akcentu, clean */
.zastosowanie-intro .zastosowanie-section-title,
.zastosowanie-body .zastosowanie-section-title,
.zastosowanie-cta .zastosowanie-section-title {
    padding-left: 0;
    border-left: none;
}

html {
    scroll-behavior: smooth;
}

/* Responsywność – równe odstępy skalują się z --section-spacing */
@media (max-width: 1200px) {
    body.page-zastosowanie {
        --section-spacing: 64px;
    }
}

@media (max-width: 992px) {
    body.page-zastosowanie {
        --section-spacing: 56px;
    }

    .zastosowanie-project-block-inner {
        grid-template-columns: 1fr;
    }

    .zastosowanie-project-panel--text {
        padding: 32px 28px 28px;
        border-radius: 15px 15px 0 0;
    }

    .zastosowanie-project-panel--image {
        aspect-ratio: 16 / 10;
        border-radius: 0 0 15px 15px;
    }

    .zastosowanie-content-row {
        grid-template-columns: 1fr;
        gap: 32px;
    }

    .zastosowanie-content-row--image-first .zastosowanie-content-media {
        order: 0;
    }

    .zastosowanie-hero {
        height: 50vh;
        padding-bottom: 40px;
        margin-bottom: 48px;
    }

    .zastosowanie-title {
        font-size: clamp(28px, 5vw, 42px);
    }

    .zastosowanie-lead {
        font-size: 16px;
    }

    .zastosowanie-products-slider .product-card-link {
        flex: 0 0 260px;
    }

    .zastosowanie-products-slider-wrap {
        margin: 0 -20px;
        padding: 0 20px;
    }

    .zastosowanie-content-media {
        aspect-ratio: 16 / 10;
    }

    .zastosowanie-projects-header {
        flex-direction: column;
        margin-bottom: 40px;
    }

    .zastosowanie-projects-filters {
        width: 100%;
    }

    .zastosowanie-project-card {
        grid-template-columns: 1fr;
        gap: 32px;
    }

    .zastosowanie-project-card-media {
        order: -1;
        aspect-ratio: 16 / 10;
    }
}

@media (max-width: 768px) {
    body.page-zastosowanie {
        --section-spacing: 48px;
    }

    .zastosowanie-hero {
        height: 45vh;
        min-height: 280px;
        padding-bottom: 32px;
        margin-bottom: 40px;
    }

    .zastosowanie-title {
        font-size: 28px;
    }

    .zastosowanie-subtitle {
        font-size: 11px;
    }

    .zastosowanie-lead {
        font-size: 15px;
    }

    .zastosowanie-project-panel--text {
        padding: 32px 24px 28px;
    }

    .zastosowanie-project-panel--image {
        aspect-ratio: 16 / 10;
    }

    .zastosowanie-section-title {
        font-size: 20px;
        margin-bottom: 20px;
    }

    .zastosowanie-content-row {
        gap: 24px;
    }

    .zastosowanie-content-media {
        aspect-ratio: 16 / 10;
    }

    .zastosowanie-products-header {
        grid-template-columns: 1fr;
        gap: 16px;
        margin-bottom: 32px;
    }

    .zastosowanie-products-header .zastosowanie-section-title {
        grid-column: 1;
        text-align: center;
    }

    .zastosowanie-products-arrows {
        grid-column: 1;
        justify-self: center;
    }

    .zastosowanie-products-section {
        padding: var(--section-spacing, 48px) 0;
    }

    .zastosowanie-products-slider .product-card-link {
        flex: 0 0 240px;
    }

    .zastosowanie-projects-title {
        font-size: 22px;
    }

    .zastosowanie-project-card {
        gap: 24px;
    }
}

@media (max-width: 480px) {
    body.page-zastosowanie {
        --section-spacing: 40px;
    }

    .zastosowanie-hero {
        min-height: 260px;
        padding-bottom: 28px;
        margin-bottom: 32px;
    }

    .zastosowanie-title {
        font-size: 24px;
    }

    .zastosowanie-project-panel--text {
        padding: 28px 20px 24px;
    }

    .zastosowanie-project-title {
        font-size: 20px;
    }

    .zastosowanie-project-panel--image {
        aspect-ratio: 16 / 10;
    }

    .zastosowanie-project-arrow {
        width: 44px;
        height: 44px;
    }

    .zastosowanie-projects-title {
        font-size: 20px;
    }

    .zastosowanie-project-card-title {
        font-size: 20px;
    }

    .zastosowanie-filter-btn {
        padding: 8px 16px;
        font-size: 12px;
    }
}
