
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    background:
        radial-gradient(
            circle at 50% 0%,
            rgba(67, 15, 105, 0.18),
            transparent 38%
        ),
        #05050a;
    color: #ffffff;
    font-family:
        Arial,
        Helvetica,
        sans-serif;
    min-height: 100vh;
    overflow-x: hidden;
}

img {
    max-width: 100%;
}


/* =========================================
   TŁO
========================================= */

body::before {
    content: "";
    position: fixed;
    inset: 0;
    pointer-events: none;
    background:
        radial-gradient(
            circle at 20% 40%,
            rgba(92, 20, 130, 0.08),
            transparent 28%
        ),
        radial-gradient(
            circle at 80% 65%,
            rgba(60, 15, 100, 0.08),
            transparent 30%
        );
    z-index: -2;
}


/* =========================================
   NAV
========================================= */

.portfolio-nav {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 90px;

    display: flex;
    align-items: center;

    padding: 0 5vw;

    z-index: 50;

    border-bottom:
        1px solid
        rgba(255,255,255,0.045);

    background:
        rgba(5,5,10,0.42);

    backdrop-filter: blur(14px);
}

.portfolio-logo {
    display: flex;
    align-items: center;
    text-decoration: none;
    flex-shrink: 0;
}

.portfolio-logo img {
    width: 145px;
    height: auto;
    display: block;
}

.portfolio-nav nav {
    display: flex;
    gap: 30px;
    margin-left: auto;
    margin-right: 35px;
    min-width: 0;
}

.portfolio-nav nav a {
    color: #85858e;
    text-decoration: none;
    font-size: 9px;
    letter-spacing: 1.8px;
    text-transform: uppercase;
    transition:
        color 0.25s ease;
    white-space: nowrap;
}

.portfolio-nav nav a:hover {
    color: #ffffff;
}

.back-button {
    padding: 11px 16px;
    border:
        1px solid
        rgba(150, 65, 255, 0.35);
    border-radius: 7px;
    color: #ffffff;
    text-decoration: none;
    font-size: 8px;
    letter-spacing: 1.5px;
    background:
        rgba(95, 22, 135, 0.12);

    transition:
        border-color 0.25s ease,
        background 0.25s ease,
        box-shadow 0.25s ease;

    white-space: nowrap;
    flex-shrink: 0;
}

.back-button:hover {
    border-color:
        rgba(170, 70, 255, 0.75);

    background:
        rgba(115, 30, 165, 0.18);

    box-shadow:
        0 0 25px
        rgba(130, 35, 190, 0.15);
}


/* =========================================
   HERO
========================================= */

.portfolio-hero {
    position: relative;
    min-height: 670px;

    display: flex;
    align-items: center;
    justify-content: center;

    overflow: hidden;

    border-bottom:
        1px solid
        rgba(255,255,255,0.04);
}

.hero-content {
    position: relative;
    z-index: 5;

    width: min(900px, 88%);

    text-align: center;

    padding-top: 50px;
}

.eyebrow {
    color: #9b45ff;
    font-size: 10px;
    letter-spacing: 4px;
    font-weight: 600;
    margin-bottom: 20px;
    text-transform: uppercase;
}

.hero-content h1 {
    font-size: clamp(48px, 7vw, 88px);
    line-height: 0.92;
    letter-spacing: -4px;
    font-weight: 500;
}

.hero-content h1 span {
    display: block;
    color: #ffffff;

    text-shadow:
        0 0 45px
        rgba(132, 42, 190, 0.22);
}

.hero-content p {
    max-width: 520px;
    margin: 27px auto 0;

    color: #85858f;
    font-size: 11px;
    line-height: 1.8;
    letter-spacing: 0.4px;
}

.hero-glow {
    position: absolute;

    width: 650px;
    height: 400px;

    left: 50%;
    top: 50%;

    transform:
        translate(-50%, -50%);

    background:
        radial-gradient(
            ellipse,
            rgba(104, 22, 145, 0.2),
            transparent 68%
        );

    filter: blur(20px);
}

.hero-grid {
    position: absolute;
    inset: 0;

    opacity: 0.18;

    background-image:
        linear-gradient(
            rgba(140, 50, 190, 0.07) 1px,
            transparent 1px
        ),
        linear-gradient(
            90deg,
            rgba(140, 50, 190, 0.07) 1px,
            transparent 1px
        );

    background-size: 55px 55px;

    mask-image:
        linear-gradient(
            to bottom,
            transparent,
            black 30%,
            black 70%,
            transparent
        );
}


/* =========================================
   CASE STUDIES
========================================= */

.case-studies {
    width: min(1120px, 90%);
    margin: 0 auto;
    padding: 130px 0 150px;
}

.section-heading {
    margin-bottom: 80px;
    max-width: 620px;
}

.section-heading > span {
    color: #8840d6;
    font-size: 8px;
    letter-spacing: 3px;
    font-weight: 600;
}

.section-heading h2 {
    margin-top: 17px;

    font-size: clamp(42px, 6vw, 72px);
    line-height: 0.9;
    font-weight: 400;
    letter-spacing: -3px;
}

.section-heading h2 strong {
    color: #ffffff;
    font-weight: 600;
}

.section-heading p {
    margin-top: 24px;
    color: #777781;
    font-size: 10px;
    line-height: 1.8;
}


/* =========================================
   CASE
========================================= */

.case-study {
    margin-bottom: 150px;
    min-width: 0;
}

.case-main {
    display: grid;

    grid-template-columns:
        minmax(0, 1.25fr)
        minmax(0, 0.9fr);

    gap: 18px;
    align-items: stretch;

    min-width: 0;
}

.case-image {
    position: relative;

    min-height: 510px;

    overflow: hidden;

    border:
        1px solid
        rgba(255,255,255,0.07);

    border-radius: 16px;
    background: #08080e;

    min-width: 0;
}

.case-image img {
    width: 100%;
    height: 100%;

    object-fit: contain;

    display: block;

    opacity: 0.9;

    transition:
        transform 0.6s ease,
        opacity 0.6s ease;
}

.case-image:hover img {
    transform: scale(1.025);
    opacity: 1;
}

.case-image::after {
    content: "";

    position: absolute;
    inset: 0;

    background:
        linear-gradient(
            180deg,
            transparent 55%,
            rgba(5,5,10,0.55)
        );

    pointer-events: none;
}

.image-number {
    position: absolute;

    right: 20px;
    bottom: 17px;

    z-index: 3;

    color:
        rgba(255,255,255,0.55);

    font-size: 9px;
    letter-spacing: 2px;
}


/* =========================================
   CASE CONTENT
========================================= */

.case-content {
    min-height: 510px;

    padding: 42px 38px;

    border:
        1px solid
        rgba(255,255,255,0.07);

    border-radius: 16px;

    background:
        linear-gradient(
            145deg,
            rgba(18,13,25,0.9),
            rgba(8,8,13,0.92)
        );

    display: flex;
    flex-direction: column;
    justify-content: center;

    min-width: 0;
    overflow: hidden;
}

.case-label {
    color: #9143e6;
    font-size: 8px;
    letter-spacing: 2.5px;
    margin-bottom: 23px;
}

.case-content h3 {
    font-size: 32px;
    line-height: 0.95;
    font-weight: 500;
    letter-spacing: -1.5px;
    margin-bottom: 35px;

    overflow-wrap: break-word;
}

.case-content h3 span {
    display: block;
    color: #ffffff;
}

.case-block {
    padding: 18px 0;

    border-top:
        1px solid
        rgba(255,255,255,0.055);

    min-width: 0;
}

.case-title {
    color: #9345e5;
    font-size: 8px;
    letter-spacing: 2px;
    margin-bottom: 9px;
    font-weight: 600;
}

.case-block p {
    color: #85858d;
    font-size: 9px;
    line-height: 1.75;
    overflow-wrap: break-word;
}

.case-block p + p {
    margin-top: 10px;
}

.case-block ul {
    list-style: none;
}

.case-block li {
    position: relative;

    padding-left: 15px;
    margin-bottom: 9px;

    color: #85858d;

    font-size: 9px;
    line-height: 1.6;

    overflow-wrap: break-word;
}

.case-block li::before {
    content: "";

    position: absolute;

    left: 0;
    top: 5px;

    width: 4px;
    height: 4px;

    border-radius: 50%;

    background: #9b45ff;

    box-shadow:
        0 0 8px
        rgba(155,69,255,0.65);
}


/* =========================================
   DOLNA CZĘŚĆ CASE
========================================= */

.case-bottom {
    display: grid;

    grid-template-columns:
        0.7fr
        0.7fr
        0.7fr
        1.5fr;

    gap: 10px;

    margin-top: 10px;

    min-width: 0;
}

.stat-card,
.result-card {
    min-height: 105px;

    padding: 18px;

    border:
        1px solid
        rgba(255,255,255,0.055);

    border-radius: 12px;

    background:
        rgba(10,9,15,0.8);

    min-width: 0;
    overflow: hidden;
}

.stat-card {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.stat-card strong {
    color: #9c45f0;

    font-size: 18px;
    font-weight: 500;
    letter-spacing: -0.5px;

    overflow-wrap: anywhere;
}

.stat-card span {
    color: #676771;

    font-size: 7px;
    letter-spacing: 1.5px;
    line-height: 1.5;

    overflow-wrap: anywhere;
}

.result-card {
    display: flex;
    flex-direction: column;
    justify-content: space-between;

    background:
        radial-gradient(
            circle at 75% 35%,
            rgba(104,26,143,0.16),
            transparent 45%
        ),
        rgba(12,9,16,0.9);
}

.result-card span {
    color: #676771;

    font-size: 7px;
    letter-spacing: 1.5px;
    line-height: 1.5;
}

.result-card strong {
    color: #9c45f0;

    font-size: 18px;
    font-weight: 500;
    letter-spacing: -0.5px;

    overflow-wrap: anywhere;
}


/* =========================================
   DRUGA REALIZACJA
========================================= */

.case-study-second .case-main {
    grid-template-columns:
        minmax(0, 0.9fr)
        minmax(0, 1.25fr);
}

.case-study-second .case-content {
    order: 1;
}

.case-gallery {
    display: grid;

    grid-template-columns:
        minmax(0, 1fr)
        minmax(0, 1fr);

    gap: 14px;

    min-height: 510px;

    min-width: 0;
}

.gallery-main,
.gallery-small {
    overflow: hidden;

    border:
        1px solid
        rgba(255,255,255,0.07);

    border-radius: 16px;

    background: #08080e;

    min-width: 0;
    min-height: 0;
}

.gallery-main img,
.gallery-small img {
    width: 100%;
    height: 100%;

    object-fit: contain;

    display: block;

    opacity: 0.9;

    transition:
        transform 0.6s ease,
        opacity 0.6s ease;
}

.gallery-main:hover img,
.gallery-small:hover img {
    transform: scale(1.025);
    opacity: 1;
}


/* =========================================
   O MNIE
========================================= */

.about-section {
    width: min(1120px, 90%);
    margin: 0 auto;

    padding: 80px 0 150px;

    border-top:
        1px solid
        rgba(255,255,255,0.045);
}

.about-label {
    color: #8840d6;

    font-size: 8px;
    letter-spacing: 3px;

    margin-bottom: 60px;
}

.about-grid {
    display: grid;

    grid-template-columns:
        minmax(0, 1.1fr)
        minmax(0, 0.9fr);

    gap: 100px;

    min-width: 0;
}

.about-grid h2 {
    font-size: clamp(38px, 5vw, 64px);
    line-height: 0.94;
    letter-spacing: -3px;
    font-weight: 400;

    overflow-wrap: break-word;
}

.about-grid h2 span {
    display: block;
    color: #ffffff;
}

.about-text {
    padding-top: 10px;
    min-width: 0;
}

.about-text p {
    color: #85858d;

    font-size: 10px;
    line-height: 1.9;

    margin-bottom: 22px;
}


/* =========================================
   KONTAKT
========================================= */

.portfolio-contact {
    position: relative;

    width: min(1120px, 90%);

    min-height: 390px;

    margin: 0 auto 100px;

    display: flex;
    align-items: center;

    overflow: hidden;

    border:
        1px solid
        rgba(255,255,255,0.07);

    border-radius: 18px;

    background:
        radial-gradient(
            circle at 75% 50%,
            rgba(110,30,145,0.18),
            transparent 38%
        ),
        linear-gradient(
            135deg,
            #0c0911,
            #08070c
        );
}

.contact-grid {
    position: absolute;
    inset: 0;

    opacity: 0.25;

    background-image:
        linear-gradient(
            rgba(145,60,190,0.08) 1px,
            transparent 1px
        ),
        linear-gradient(
            90deg,
            rgba(145,60,190,0.08) 1px,
            transparent 1px
        );

    background-size: 42px 42px;
}

.contact-content {
    position: relative;
    z-index: 2;

    padding: 55px;

    min-width: 0;
}

.contact-content h2 {
    font-size: clamp(34px, 5vw, 60px);
    line-height: 0.95;
    letter-spacing: -2.5px;
    font-weight: 400;

    overflow-wrap: break-word;
}

.contact-content h2 span {
    display: block;
    color: #ffffff;
}

.contact-content p {
    margin-top: 22px;

    max-width: 420px;

    color: #7d7d87;

    font-size: 10px;
    line-height: 1.8;
}

.contact-button {
    display: inline-block;

    margin-top: 30px;

    padding: 13px 19px;

    border:
        1px solid
        rgba(155,69,255,0.5);

    border-radius: 7px;

    color: #ffffff;

    background:
        rgba(100,30,140,0.13);

    text-decoration: none;

    font-size: 8px;
    letter-spacing: 1.7px;

    transition:
        background 0.25s ease,
        border-color 0.25s ease,
        box-shadow 0.25s ease;
}

.contact-button:hover {
    background:
        rgba(120,35,165,0.23);

    border-color:
        rgba(175,80,255,0.8);

    box-shadow:
        0 0 30px
        rgba(130,40,180,0.15);
}


/* =========================================
   FOOTER
========================================= */

.portfolio-footer {
    width: min(1120px, 90%);

    margin: 0 auto;

    padding: 35px 0 45px;

    display: flex;
    align-items: center;

    gap: 25px;

    border-top:
        1px solid
        rgba(255,255,255,0.045);

    color: #55555e;

    font-size: 7px;
    letter-spacing: 2px;

    min-width: 0;
}

.portfolio-footer span:first-child {
    color: #8d8d96;
}

.portfolio-footer a {
    margin-left: auto;

    color: #65656f;

    text-decoration: none;

    transition:
        color 0.25s ease;
}

.portfolio-footer a:hover {
    color: #ffffff;
}


/* =========================================
   LIGHTBOX
========================================= */

.image-lightbox {
    position: fixed;
    inset: 0;

    z-index: 9999;

    display: flex;
    align-items: center;
    justify-content: center;

    padding: 50px;

    background:
        rgba(3, 3, 8, 0.94);

    opacity: 0;
    visibility: hidden;
    pointer-events: none;

    transition:
        opacity 0.25s ease,
        visibility 0.25s ease;
}

.image-lightbox.active {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
}

.image-lightbox img {
    max-width: 92vw;
    max-height: 90vh;

    width: auto;
    height: auto;

    object-fit: contain;

    border-radius: 10px;

    box-shadow:
        0 0 60px rgba(0,0,0,0.65);

    transform: scale(0.96);

    transition:
        transform 0.3s ease;
}

.image-lightbox.active img {
    transform: scale(1);
}

.lightbox-close {
    position: absolute;

    top: 25px;
    right: 30px;

    width: 44px;
    height: 44px;

    border:
        1px solid
        rgba(255,255,255,0.2);

    border-radius: 50%;

    background:
        rgba(10,10,16,0.8);

    color: white;

    font-size: 30px;
    font-weight: 300;
    line-height: 1;

    cursor: pointer;

    z-index: 2;

    transition:
        background 0.2s ease,
        border-color 0.2s ease,
        transform 0.2s ease;
}

.lightbox-close:hover {
    background:
        rgba(255,255,255,0.1);

    border-color:
        rgba(255,255,255,0.4);

    transform: scale(1.05);
}

.case-study img {
    cursor: zoom-in;
}

body.lightbox-open {
    overflow: hidden;
}


/* =========================================
   TRZECIA REALIZACJA
========================================= */

.case-study-third .case-main {
    grid-template-columns:
        minmax(0, 0.9fr)
        minmax(0, 1.25fr);
}

.case-study-third .case-content {
    order: 1;
}


/* =========================================
   MAŁA GALERIA — 5 ZDJĘĆ
========================================= */

.case-gallery-third {
    display: grid;

    grid-template-columns:
        repeat(3, minmax(0, 1fr));

    grid-template-rows:
        170px 170px;

    gap: 12px;

    align-content: start;

    min-width: 0;
}

.third-image {
    overflow: hidden;

    min-width: 0;
    min-height: 0;

    border:
        1px solid
        rgba(255,255,255,0.07);

    border-radius: 14px;

    background: #08080e;
}

.third-image img {
    width: 100%;
    height: 100%;

    display: block;

    object-fit: contain;

    opacity: 0.9;

    cursor: zoom-in;

    transition:
        transform 0.4s ease,
        opacity 0.3s ease;
}

.third-image:hover img {
    transform: scale(1.03);
    opacity: 1;
}


/* =========================================
   OPINIA KLIENTA
========================================= */

.case-review {
    margin-top: 24px;

    padding-top: 20px;

    border-top:
        1px solid
        rgba(255,255,255,0.08);

    min-width: 0;
}

.review-image {
    margin-top: 12px;

    width: 100%;
    max-height: 180px;

    overflow: hidden;

    border:
        1px solid
        rgba(255,255,255,0.07);

    border-radius: 12px;

    background: #08080e;
}

.review-image img {
    width: 100%;
    height: 180px;

    display: block;

    object-fit: contain;

    cursor: zoom-in;

    opacity: 0.92;

    transition:
        transform 0.4s ease,
        opacity 0.3s ease;
}

.review-image:hover img {
    transform: scale(1.02);
    opacity: 1;
}

h2 span {
    color: #4da3ff;
}


/* =========================================
   REALIZACJA 01 — MNIEJSZE KAFELKI
========================================= */

.case-study:first-of-type .case-main {
    height: 430px;
}

.case-study:first-of-type .case-image,
.case-study:first-of-type .case-content {
    min-height: 430px;
    height: 430px;
}


/* =========================================
   REALIZACJA 01 — 3 ZDJĘCIA
========================================= */

.realization-one-gallery {
    display: grid;

    grid-template-columns:
        minmax(0, 1.35fr)
        minmax(0, 0.65fr);

    grid-template-rows:
        minmax(0, 1fr)
        minmax(0, 1fr);

    gap: 10px;

    padding: 10px;

    min-height: 430px;
    height: 430px;

    min-width: 0;
}

.realization-one-photo {
    position: relative;

    min-width: 0;
    min-height: 0;

    overflow: hidden;

    border:
        1px solid
        rgba(255,255,255,0.07);

    border-radius: 12px;

    background: #08080e;
}

.realization-one-photo:first-child {
    grid-row: 1 / 3;
}

.realization-one-photo img {
    width: 100%;
    height: 100%;

    display: block;

    object-fit: contain;

    opacity: 0.9;

    cursor: zoom-in;

    transition:
        transform 0.4s ease,
        opacity 0.3s ease;
}

.realization-one-photo:hover img {
    transform: scale(1.025);
    opacity: 1;
}


/* =========================================
   REALIZACJA 04
========================================= */

.case-study-fourth .case-main {
    grid-template-columns:
        minmax(0, 1.25fr)
        minmax(0, 0.9fr);

    align-items: stretch;
}


/* =========================================
   GALERIA — 14 ZDJĘĆ
========================================= */

.case-gallery-fourth {
    display: grid;

    grid-template-columns:
        repeat(4, minmax(0, 1fr));

    grid-template-rows:
        repeat(4, 115px);

    gap: 10px;

    min-width: 0;
}

.fourth-image {
    min-width: 0;
    min-height: 0;

    overflow: hidden;

    border:
        1px solid
        rgba(255,255,255,0.07);

    border-radius: 12px;

    background: #08080e;
}

.fourth-image-main {
    grid-column: span 2;
    grid-row: span 2;
}

.fourth-image img {
    width: 100%;
    height: 100%;

    display: block;

    object-fit: contain;

    opacity: 0.9;

    cursor: zoom-in;

    transition:
        transform 0.4s ease,
        opacity 0.3s ease;
}

.fourth-image:hover img {
    transform: scale(1.025);
    opacity: 1;
}


/* =========================================
   REALIZACJA 04 — DOLNE KAFELKI
========================================= */

.case-study-fourth .case-bottom {
    margin-top: 10px;
}


/* =========================================
   RESPONSIVE
========================================= */


/* =========================
   LAPTOP
========================= */

@media (max-width: 1100px) {

    .portfolio-nav {
        padding-left: 30px;
        padding-right: 30px;
    }

    .portfolio-nav nav {
        gap: 20px;
        margin-right: 20px;
    }

    .case-studies,
    .about-section,
    .portfolio-contact,
    .portfolio-footer {
        width: 92%;
    }

    .case-main,
    .case-study-second .case-main,
    .case-study-third .case-main,
    .case-study-fourth .case-main {
        grid-template-columns:
            minmax(0, 1fr)
            minmax(0, 1fr);
    }

    .case-content {
        padding-left: 28px;
        padding-right: 28px;
    }

    .about-grid {
        gap: 55px;
    }

    .case-gallery-fourth {
        grid-template-columns:
            repeat(4, minmax(0, 1fr));
    }

    .case-bottom {
        grid-template-columns:
            repeat(4, minmax(0, 1fr));
    }

    .stat-card strong,
    .result-card strong {
        font-size: 15px;
        overflow-wrap: anywhere;
    }
}


/* =========================
   TABLET / MAŁY LAPTOP
========================= */

@media (max-width: 850px) {

    .portfolio-nav {
        height: 75px;
        padding: 0 22px;
    }

    .portfolio-logo img {
        width: 120px;
    }

    .portfolio-nav nav {
        display: none;
    }

    .back-button {
        margin-left: auto;
        flex-shrink: 0;
    }

    .portfolio-hero {
        min-height: 570px;
    }

    .case-main,
    .case-study-second .case-main,
    .case-study-third .case-main,
    .case-study-fourth .case-main {
        grid-template-columns: 1fr;
        gap: 12px;
    }

    .case-image,
    .case-content,
    .case-gallery {
        min-height: 0;
    }

    .case-image {
        height: 400px;
    }

    .case-content {
        min-height: 430px;
    }

    .case-gallery {
        min-height: 0;
        height: 400px;
    }

    /* REALIZACJA 01 */

    .case-study:first-of-type .case-main {
        height: auto;
    }

    .case-study:first-of-type .case-image,
    .case-study:first-of-type .case-content {
        height: auto;
        min-height: 0;
    }

    .realization-one-gallery {
        height: 400px;
        min-height: 400px;
    }

    /* REALIZACJA 03 */

    .case-gallery-third {
        grid-template-columns:
            repeat(2, minmax(0, 1fr));

        grid-template-rows:
            repeat(3, 180px);

        width: 100%;
    }

    /* REALIZACJA 04 */

    .case-gallery-fourth {
        grid-template-columns:
            repeat(3, minmax(0, 1fr));

        grid-template-rows:
            repeat(5, 120px);

        width: 100%;
    }

    .fourth-image-main {
        grid-column: span 2;
        grid-row: span 2;
    }

    /* DOLNE KAFELKI */

    .case-bottom {
        grid-template-columns:
            repeat(2, minmax(0, 1fr));
    }

    .result-card {
        grid-column: span 2;
    }

    .about-grid {
        grid-template-columns: 1fr;
        gap: 40px;
    }
}


/* =========================
   TELEFON
========================= */

@media (max-width: 520px) {

    .portfolio-nav {
        height: 70px;
        padding: 0 18px;
    }

    .portfolio-logo img {
        width: 105px;
    }

    .back-button {
        padding: 9px 12px;
        font-size: 7px;
        letter-spacing: 1px;
    }

    .portfolio-hero {
        min-height: 500px;
    }

    .hero-content {
        width: 90%;
        padding-top: 30px;
    }

    .hero-content h1 {
        font-size: 48px;
        letter-spacing: -2px;
    }

    .hero-content p {
        max-width: 100%;
        font-size: 10px;
    }

    .case-studies {
        width: 92%;

        padding-top: 90px;
        padding-bottom: 100px;
    }

    .section-heading {
        margin-bottom: 55px;
    }

    .section-heading h2 {
        font-size: 44px;
        letter-spacing: -2px;
    }

    .case-main,
    .case-study-second .case-main,
    .case-study-third .case-main,
    .case-study-fourth .case-main {
        grid-template-columns: 1fr;
        gap: 12px;
    }

    /* WSZYSTKIE TREŚCI */

    .case-content {
        min-height: auto;
        padding: 30px 22px;
    }

    .case-content h3 {
        font-size: 27px;
        margin-bottom: 25px;
    }

    .case-block {
        padding: 15px 0;
    }

    /* REALIZACJA 01 */

    .realization-one-gallery {
        width: 100%;

        height: 300px;
        min-height: 300px;

        grid-template-columns:
            minmax(0, 1.3fr)
            minmax(0, 0.7fr);

        grid-template-rows:
            minmax(0, 1fr)
            minmax(0, 1fr);
    }

    /* REALIZACJA 02 */

    .case-gallery {
        grid-template-columns: 1fr;

        height: auto;
        min-height: 0;
    }

    .gallery-main {
        height: 300px;
    }

    .gallery-small {
        height: 220px;
    }

    /* REALIZACJA 03 */

    .case-gallery-third {
        grid-template-columns:
            minmax(0, 1fr)
            minmax(0, 1fr);

        grid-template-rows:
            repeat(3, 145px);

        gap: 8px;
    }

    /* REALIZACJA 04 */

    .case-gallery-fourth {
        grid-template-columns:
            minmax(0, 1fr)
            minmax(0, 1fr);

        grid-template-rows:
            repeat(7, 145px);

        gap: 8px;
    }

    .fourth-image-main {
        grid-column: span 2;
        grid-row: span 2;
    }

    /* DOLNE KAFELKI */

    .case-bottom {
        grid-template-columns:
            minmax(0, 1fr)
            minmax(0, 1fr);

        gap: 8px;
    }

    .stat-card,
    .result-card {
        min-height: 100px;
        padding: 15px;
    }

    .stat-card strong,
    .result-card strong {
        font-size: 14px;
        line-height: 1.15;
    }

    .stat-card span,
    .result-card span {
        font-size: 6px;
    }

    .result-card {
        grid-column: span 2;
    }

    /* OPINIA — ZOSTAJE */

    .case-review {
        margin-top: 20px;
        padding-top: 18px;
    }

    .review-image {
        width: 100%;
        max-height: 150px;
    }

    .review-image img {
        width: 100%;
        height: 150px;
        object-fit: contain;
    }

    /* O MNIE */

    .about-section {
        width: 92%;
        padding: 60px 0 100px;
    }

    .about-grid h2 {
        font-size: 42px;
    }

    /* KONTAKT */

    .portfolio-contact {
        width: 92%;
        min-height: 350px;
        margin-bottom: 70px;
    }

    .contact-content {
        padding: 30px 24px;
    }

    .contact-content h2 {
        font-size: 38px;
    }

    /* FOOTER */

    .portfolio-footer {
        width: 92%;

        flex-wrap: wrap;
        gap: 15px;
    }

    .portfolio-footer a {
        width: 100%;
        margin-left: 0;
    }

    /* LIGHTBOX */

    .image-lightbox {
        padding: 20px;
    }

    .image-lightbox img {
        max-width: 94vw;
        max-height: 82vh;
    }

    .lightbox-close {
        top: 15px;
        right: 15px;
    }
}


/* =========================
   BARDZO MAŁY TELEFON
========================= */

@media (max-width: 380px) {

    .portfolio-nav {
        padding: 0 14px;
    }

    .portfolio-logo img {
        width: 95px;
    }

    .back-button {
        padding: 8px 10px;
        font-size: 6px;
    }

    .hero-content {
        width: 92%;
    }

    .hero-content h1 {
        font-size: 40px;
    }

    .section-heading h2 {
        font-size: 38px;
    }

    .case-content {
        padding-left: 18px;
        padding-right: 18px;
    }

    .case-content h3 {
        font-size: 24px;
    }

    .case-block p,
    .case-block li {
        font-size: 8px;
    }

    /* REALIZACJA 01 */

    .realization-one-gallery {
        height: 250px;
        min-height: 250px;
    }

    /* REALIZACJA 02 */

    .gallery-main {
        height: 250px;
    }

    .gallery-small {
        height: 190px;
    }

    /* REALIZACJA 03 */

    .case-gallery-third {
        grid-template-rows:
            repeat(3, 120px);
    }

    /* REALIZACJA 04 */

    .case-gallery-fourth {
        grid-template-rows:
            repeat(7, 120px);
    }

    /* OPINIA */

    .review-image {
        max-height: 130px;
    }

    .review-image img {
        height: 130px;
    }

    /* DOLNE KAFELKI */

    .stat-card,
    .result-card {
        padding: 12px;
    }

    .stat-card strong,
    .result-card strong {
        font-size: 12px;
    }

    .stat-card span,
    .result-card span {
        font-size: 5px;
    }

    /* LIGHTBOX */

    .image-lightbox {
        padding: 12px;
    }

    .lightbox-close {
        width: 38px;
        height: 38px;

        top: 12px;
        right: 12px;

        font-size: 25px;
    }
}