*,
*::before,
*::after {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    font-family: "Poppins", sans-serif;
    font-weight: 400;
    color: #111;
    background: #fff;
    overflow-x: hidden;
}

img {
    display: block;
    width: 100%;
    max-width: 100%;
}

a {
    color: inherit;
    text-decoration: none;
}

button {
    font: inherit;
}

:root {
    --green: #96a58e;
    --green-dark: #7e9076;
    --green-light: #b8c3b2;
    --pink: #f5bed3;
    --pink-light: #f9dce7;
    --gray: #f1f1f1;
    --black: #111;
    --white: #fff;
    --container: 84%;
}

.container {
    width: var(--container);
    margin-inline: auto;
}


/* =========================================================
   HEADER
   ========================================================= */

.header {
    position: relative;
    z-index: 100;
    width: 100%;
    background: #fff;
    border-bottom: .06rem solid rgba(0, 0, 0, .07);
    box-shadow: 0 .25rem .8rem rgba(0, 0, 0, .025);
}

.header__inner {
    height: clamp(5.5rem, 7vw, 7.5rem);
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.header__logo {
    width: clamp(6.5rem, 8vw, 8.5rem);
}

.header__logo img {
    width: 100%;
    height: auto;
}


/* =========================================================
   MENU
   ========================================================= */

.header__nav {
    display: flex;
    align-items: center;
    gap: clamp(2rem, 3.2vw, 4rem);
}

.header__nav a {
    padding: .55em 1.55em;
    font-size: clamp(.78rem, .9vw, 1rem);
    font-weight: 400;
    border-radius: 10rem;
    transition: background-color .2s ease, color .2s ease, transform .2s ease;
}

.header__nav a:hover {
    transform: translateY(-.1rem);
}


/* STRONA GŁÓWNA - ZIELONA */

.header__nav a:nth-child(1) {
    color: #fff;
    background: var(--green);
}

.header__nav a:nth-child(1):hover {
    background: var(--green-dark);
}


/* PORTFOLIO - RÓŻOWE */

.header__nav a:nth-child(2) {
    color: #111;
    background: var(--pink);
}

.header__nav a:nth-child(2):hover {
    background: #efa9c4;
}


/* KONTAKT */

.header__nav a:nth-child(3) {
    color: #111;
    background: transparent;
}

.header__nav a:nth-child(3):hover {
    background: var(--pink-light);
}


/* =========================================================
   PRZYCISK MENU MOBILE
   ========================================================= */

.header__btn {
    display: none;
}


/* =========================================================
   PORTFOLIO HERO
   ========================================================= */

.portfolio__hero {
    position: relative;
    width: 100%;
    min-height: clamp(8rem, 11vw, 11rem);
    display: flex;
    align-items: center;
    background:
        linear-gradient(
            90deg,
            rgba(255, 255, 255, .95) 0%,
            rgba(255, 255, 255, .9) 35%,
            rgba(255, 255, 255, .65) 60%,
            rgba(255, 255, 255, 0) 85%
        ),
        url("../img/backgrounds/portfolio.webp");
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
}

.portfolio__hero-inner {
    width: var(--container);
    margin-inline: auto;
}


/* =========================================================
   TYTUŁ
   ========================================================= */

.portfolio__title {
    width: fit-content;
    margin: 0;
    font-size: clamp(2rem, 2.8vw, 3rem);
    font-weight: 700;
    line-height: 1.1;
    color: #111;
}


/* =========================================================
   PORTFOLIO
   ========================================================= */

.portfolio {
    position: relative;
    width: 100%;
    min-height: calc(100vh - clamp(5.5rem, 7vw, 7.5rem));
    padding: clamp(1.5rem, 2.5vw, 2.5rem) 0 clamp(7rem, 9vw, 10rem);
    background: #fff;
}

.portfolio__inner {
    position: relative;
}


/* =========================================================
   FILTRY
   ========================================================= */

.portfolio__filters {
    width: 100%;
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: .8rem;
    margin-bottom: clamp(2rem, 3vw, 3rem);
}

.portfolio__filter {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: .6em 1.6em;
    border: 0;
    border-radius: 10rem;
    font-family: "Poppins", sans-serif;
    font-size: clamp(.8rem, .9vw, 1rem);
    font-weight: 400;
    color: var(--black);
    background: var(--pink-light);
    cursor: pointer;
    transition: transform .2s ease, background-color .2s ease, color .2s ease;
}

.portfolio__filter:hover {
    transform: translateY(-.1rem);
    background: var(--pink);
}

.portfolio__filter.active {
    color: #fff;
    background: var(--green);
}

.portfolio__filter.active:hover {
    background: var(--green-dark);
}


/* =========================================================
   GALERIA
   ========================================================= */

.portfolio__grid {
    width: 100%;
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: clamp(1rem, 1.5vw, 1.6rem);
}


/* =========================================================
   POJEDYNCZE ZDJĘCIE
   ========================================================= */

.portfolio__item {
    position: relative;
    width: 100%;
    aspect-ratio: .82;
    margin: 0;
    overflow: hidden;
    border-radius: .8rem;
    background: var(--gray);
    cursor: zoom-in;
    transition: transform .25s ease, box-shadow .25s ease;
}

.portfolio__item:focus-visible {
    outline: .2rem solid var(--green-dark);
    outline-offset: .2rem;
}

.portfolio__item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform .35s ease;
}

.portfolio__item:hover {
    transform: translateY(-.2rem);
    box-shadow: 0 .7rem 1.5rem rgba(0, 0, 0, .08);
}

.portfolio__item:hover img {
    transform: scale(1.04);
}


/* =========================================================
   UKRYWANIE ZDJĘĆ
   ========================================================= */

.portfolio__item--hidden {
    display: none;
}

.portfolio__lightbox {
    position: fixed;
    max-width: min(92vw, 72rem);
    max-height: 92vh;
    max-height: 92dvh;
    padding: 0;
    overflow: visible;
    border: 0;
    background: transparent;
}

.portfolio__lightbox::backdrop {
    background: rgba(17, 17, 17, .68);
    -webkit-backdrop-filter: blur(.5rem);
    backdrop-filter: blur(.5rem);
}

.portfolio__lightbox-image {
    width: auto;
    max-width: 92vw;
    max-height: 92vh;
    max-height: 92dvh;
    object-fit: contain;
    border-radius: .5rem;
    box-shadow: 0 1rem 3rem rgba(0, 0, 0, .3);
}

.portfolio__lightbox-close {
    position: absolute;
    z-index: 1;
    top: -.9rem;
    right: -.9rem;
    display: grid;
    width: 2.5rem;
    aspect-ratio: 1;
    place-items: center;
    padding: 0;
    border: .12rem solid rgba(255, 255, 255, .8);
    border-radius: 50%;
    color: #111;
    background: #fff;
    font-size: 1.7rem;
    line-height: 1;
    cursor: pointer;
}


/* =========================================================
   FOOTER
   ========================================================= */

.footer {
    position: relative;
    width: 100%;
    min-height: clamp(15rem, 19vw, 20rem);
    padding: 2.5rem 5% 3rem;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--gray);
}

.footer__inner {
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: .55rem;
}

.footer__logo {
    display: block;
    width: clamp(10rem, 12vw, 14rem);
}

.footer__logo img {
    width: 100%;
    height: auto;
    object-fit: contain;
}

.footer__socials {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: .8rem;
    min-height: 1.5rem;
}

.footer__socials a {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 1.5rem;
    height: 1.5rem;
    transition: transform .2s ease, opacity .2s ease;
}

.footer__socials a:hover {
    transform: translateY(-.1rem);
    opacity: .75;
}

.footer__socials a img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.footer__contact {
    display: flex;
    align-items: center;
    font-style: normal;
    justify-content: center;
    flex-wrap: wrap;
    gap: .8rem clamp(1.5rem, 3vw, 3rem);
    margin-top: .8rem;
}

.footer__contact-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    font-weight: 300;
    gap: .15rem;
    font-size: clamp(.7rem, .78vw, .85rem);
    font-weight: 300;
}

.footer__contact-title {
    font-weight: 500;
}

.footer__copyright {
    margin: .7rem 0 0;
    color: #777;
    font-size: clamp(.62rem, .7vw, .75rem);
    font-weight: 300;
    text-align: center;
}


/* =========================================================
   MNIEJSZY DESKTOP
   ========================================================= */

@media (max-width: 80rem) {

    :root {
        --container: 88%;
    }

    .portfolio__grid {
        grid-template-columns: repeat(4, minmax(0, 1fr));
    }

}


/* =========================================================
   TABLET
   ========================================================= */

@media (max-width: 60rem) {

    .header__nav {
        gap: 1.2rem;
    }

    .portfolio__grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }

}


/* =========================================================
   TELEFON
   ========================================================= */

@media (max-width: 48rem) {

    :root {
        --container: 88%;
    }

    .header__inner {
        height: 5rem;
    }

    .header__logo {
        width: 6rem;
    }

    .header__btn {
        display: block;
        position: relative;
        width: 2.2rem;
        aspect-ratio: 1;
        padding: 0;
        border: 0;
        background: transparent;
        cursor: pointer;
    }

    .header__btn span,
    .header__btn span::before,
    .header__btn span::after {
        display: block;
        width: 100%;
        height: .12rem;
        background: #111;
    }

    .header__btn span {
        position: relative;
    }

    .header__btn span::before,
    .header__btn span::after {
        content: "";
        position: absolute;
        left: 0;
    }

    .header__btn span::before {
        top: -.5rem;
    }

    .header__btn span::after {
        top: .5rem;
    }

    .header__nav {
        position: absolute;
        z-index: 100;
        top: 100%;
        left: 0;
        width: 100%;
        display: flex;
        flex-direction: column;
        align-items: stretch;
        gap: .4rem;
        padding: 1.3rem 6%;
        background: rgba(255, 255, 255, .98);
        border-top: .06rem solid rgba(0, 0, 0, .05);
        box-shadow: 0 .8rem 1.5rem rgba(0, 0, 0, .08);
        opacity: 0;
        visibility: hidden;
        transform: translateY(-1rem);
        transition: opacity .25s ease, visibility .25s ease, transform .25s ease;
    }

    .header__nav.active {
        opacity: 1;
        visibility: visible;
        transform: translateY(0);
    }

    .header__nav a {
        width: 100%;
        padding: .75em 1em;
        font-size: .9rem;
        text-align: center;
    }

    .header__nav a:hover {
        transform: none;
    }

    .portfolio__hero {
        min-height: 8rem;
        background-position: center, 65% center;
        background-image:
            linear-gradient(
                90deg,
                rgba(255, 255, 255, .97) 0%,
                rgba(255, 255, 255, .94) 45%,
                rgba(255, 255, 255, .78) 75%,
                rgba(255, 255, 255, .35) 100%
            ),
            url("../img/backgrounds/portfolio.webp");
    }

    .portfolio__title {
        font-size: 1.9rem;
    }

    .portfolio {
        min-height: calc(100svh - 5rem);
        padding: 2rem 0 5rem;
    }

    .portfolio__filters {
        gap: .6rem;
        margin-bottom: 2rem;
    }

    .portfolio__filter {
        padding: .55em 1.25em;
        font-size: .78rem;
    }

    .portfolio__grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 1rem;
    }

    .portfolio__item {
        border-radius: .75rem;
    }

    .footer {
        min-height: 14rem;
        padding: 2.5rem 6%;
    }

    .footer__logo {
        width: 10rem;
    }

    .footer__socials {
        margin-top: .2rem;
    }

    .footer__contact {
        flex-direction: column;
        gap: .65rem;
        margin-top: .8rem;
    }

    .footer__contact-item {
        font-size: .75rem;
    }

}


/* =========================================================
   MAŁY TELEFON
   ========================================================= */

@media (max-width: 30rem) {

    .portfolio__hero {
        min-height: 7rem;
    }

    .portfolio {
        padding: 1.5rem 0 4rem;
    }

    .portfolio__title {
        font-size: 1.7rem;
    }

    .portfolio__filters {
        gap: .45rem;
    }

    .portfolio__filter {
        padding: .5em 1em;
        font-size: .72rem;
    }

    .portfolio__grid {
        gap: .75rem;
    }

    .portfolio__item {
        border-radius: .65rem;
    }

    .footer {
        min-height: 13rem;
        padding: 2rem 6%;
    }

    .footer__logo {
        width: 9rem;
    }

    .footer__socials a {
        width: 1.4rem;
        height: 1.4rem;
    }

}