/*------------------------------GLOBAL-----------------------------*/
* {
    box-sizing: border-box;
    padding: 0;
    margin: 0;
}

html,
body {
    font-family: "Montserrat", sans-serif;
    background-color: #000;
    flex-direction: column;
    display: flex;
    color: #fff;
    height: 100%;
    scroll-behavior: smooth;
}

.hero,
.about,
.oferta,
.portfolio,
.kontakt {
    z-index: 1;
}

/*-------------------------------TŁO-------------------------------*/
.background {
    background: rgba(9, 7, 10, 1);
    overflow: hidden;
    position: fixed;
    height: 100%;
    width: 100%;
    z-index: 0;
    left: 0;
    top: 0;
}

.background video {
    object-fit: cover;
    height: 100%;
    width: 100%;
}

/*------------------------------TREŚĆ------------------------------*/
.content {
    flex-direction: column;
    flex: 1 0 auto;
    display: flex;
    min-height: 0;
}

/*-------------------------NAV I ELEMENTY--------------------------*/
.nav {
    background: rgba(9, 7, 10, 0.3);
    justify-content: center;
    align-items: center;
    position: relative;
    padding: 1rem 2%;
    flex-wrap: wrap;
    display: flex;
    width: 100%;
}

.logo {
    display: flex;
}

.logo img {
    max-height: 60px;
    object-fit: fill;
    height: 100%;
    width: auto;
}

.nav-toggle,
.hamburger {
    display: none;
}

.hamburger {
    justify-content: space-around;
    flex-direction: column;
    margin-left: auto;
    background: none;
    cursor: pointer;
    border: none;
    height: 24px;
    width: 30px;
    z-index: 2;
}

.hamburger span {
    background: #fff;
    border-radius: 2px;
    transition: 0.3s;
    height: 3px;
    width: 100%;
}

.nav-content {
    padding-left: 1rem;
}

.nav-content nav ul {
    justify-content: center;
    align-items: center;
    list-style: none;
    flex-wrap: wrap;
    display: flex;
    gap: 20px;
}

.nav-content nav ul li a {
    border: 1px solid rgba(255, 255, 255, 0.3);
    padding: 0.75rem 1.5rem;
    text-decoration: none;
    display: inline-block;
    transition: all 0.3s;
    text-align: center;
    border-radius: 8px;
    font-weight: bold;
    min-width: 140px;
    color: #fff;
}

.nav-content nav ul li a:hover {
    background: rgba(255, 255, 255, 0.3);
}

/*---------------------------INDEX.HTML----------------------------*/
.hero {
    justify-content: center;
    align-items: center;
    text-align: center;
    display: flex;
    padding: 2rem;
    flex: 1;
}

.hero-text {
    text-shadow: 1px 1px 2px #000, 0 0 1em #000, 0 0 0.2em #000;
    color: #fff;
}

.hero-text h1 {
    font-weight: normal;
}

.hero-button {
    background: rgba(0, 0, 0, 0.3);
    border: 2px solid #fff;
    display: inline-block;
    text-decoration: none;
    padding: 0.75rem 2rem;
    transition: all 0.3s;
    margin-top: 1.5rem;
    border-radius: 8px;
    font-weight: bold;
    text-shadow: none;
    color: #fff;
}

.hero-button:hover {
    background: rgba(124, 124, 124, 0.3);
    border-color: transparent;
}

/*---------------------------ABOUT.HTML----------------------------*/
.about {
    flex-direction: column;
    display: flex;
    flex: 1;
    padding-left: 2em;
    padding-right: 2em;
}

.card-about {
    background-color: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(6px);
    border-radius: 16px;
    padding: 2rem;
    max-width: 1100px;
    margin: 4rem auto;
    line-height: 1.7;
    position: relative;
}

/* Desktop: zdjęcie po lewej, tekst opływa */
.about-photo {
    float: left;
    width: 350px;
    height: 500px;
    object-fit: cover;
    border-radius: 16px;
    margin: 0 2rem 1.5rem 0;
}

.card-about h2 {
    text-shadow: 1px 1px 2px #000;
    margin-bottom: 1rem;
    font-size: 1.8rem;
}

.card-about p {
    font-size: 1rem;
    line-height: 1.7;
    margin-bottom: 1rem;
    text-align: justify;
}

.card-about em {
    font-weight: lighter;
}

.center {
    justify-content: center;
    align-items: center;
    display: flex;
}

/* ----------------------- Mobile ----------------------- */
@media (max-width: 1024px) {
    .about-photo {
        max-width: 350px;
        max-height: 550px;
        background-color: #000;
    }

    .card-about h2 {
        text-align: center;
    }
}

@media (max-width: 700px) {
    .about-photo {
        width: 40%;
        height: auto;
        object-fit: scale-down;
        border-radius: 12px;
        margin-top: 2rem;
    }

    .card-about {
        padding: 1.5rem;
    }

    .card-about p {
        font-size: 10px;
    }
}

/*-------------------------PORTFOLIO.HTML--------------------------*/
.side-panel {
    border: 1px solid rgba(255, 255, 255, 0.3);
    background: rgba(0, 0, 0, 1);
    transform: translateY(-50%);
    backdrop-filter: blur(1px);
    align-items: center;
    border-radius: 12px;
    padding: 1rem;
    padding-right: 0;
    position: fixed;
    display: flex;
    top: 50%;
    left: 2%;
    z-index: 2;
}

.side-panel label {
    padding-right: 0.5rem;
    justify-content: end;
    padding-left: 0.7rem;
}

.side-panel ul {
    flex-direction: column;
    list-style: none;
    display: flex;
    gap: 1rem;
}

.panel-handle svg path {
    fill: #AF1E22;
}

.side-panel {
    transition: left 0.4s;
    left: -14.5rem;
}

#panel-toggle:checked~.side-panel {
    max-height: 300px;
    padding-top: 1rem;
    left: 10px;
}

#panel-toggle:checked~.panel-handle svg path {
    fill: #AF1E22;
}

.side-panel ul li a {
    transition: color 0.3s;
    text-decoration: none;
    font-weight: bold;
    color: #fff;
}

.side-panel ul li a:hover {
    color: #aaa;
}

.portfolio-sections {
    display: flex;
    flex-direction: column;
    gap: 20rem;
}

.portfolio-sections section {
    justify-content: center;
    flex-direction: column;
    align-items: center;
    display: flex;
    gap: 1rem;
}

.portfolio-block {
    justify-content: center;
    scroll-margin-top: 10vh;
    align-items: start;
    flex-wrap: wrap;
    display: flex;
}

.portfolio-text {
    max-width: 20rem;
    flex: 1;
}

.portfolio-text h2 {
    text-shadow: 1px 1px 2px #000;
    margin-bottom: 1rem;
    font-size: 2rem;
    text-align: center;
}

.portfolio-text p {
    font-size: 1.1rem;
    line-height: 1.6;
    text-align: justify;
}

.portfolio-img {
    justify-content: center;
    align-items: center;
    display: flex;
    flex: 1;
    max-width: 600px;
    max-height: 400px;
    overflow: hidden;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.6);
    border-radius: 12px;
}

.portfolio-img img {
    max-width: 100%;
    height: auto;
}

.portfolio-content {
    padding: 5rem;
    padding-top: 0;
}

.portfolio-block iframe {
    width: 35rem;
    height: 19.688rem;
}

/*---------------------------OFERTA.HTML---------------------------*/
/* ===================== PODSTAWOWY UKŁAD ===================== */
.oferta {
    position: absolute;
    top: 80px; /* wysokość nav */
    bottom: 60px; /* wysokość footer */
    left: 0;
    right: 0;
    display: flex;
    justify-content: center;
    overflow: hidden;
}

.oferta-desktop {
    width: 100%;
    height: 100%;
    display: flex;
    overflow: hidden;
}

/* ===== MENU PO LEWEJ ===== */
.oferta-menu {
    width: 22%;
    min-width: 260px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 4rem;
    padding: 3rem;
    text-align: center;
    overflow: hidden;
}

.oferta-buttons {
    display: flex;
    flex-direction: column;
    gap: 0.5rem; /* mniejszy odstęp między pierwszym a drugim przyciskiem oferty */
}

/* większy odstęp przed Pobierz PDF */
.oferta-download {
    margin-top: 1.5rem; /* większy odstęp po drugim przycisku oferty */
}

.oferta-buttons .hero-button {
    width: 220px;
    height: 52px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    text-align: center;
}

/* ===== PRAWA STRONA – SLIDES ===== */
.oferta-display {
    width: 78%;
    height: 100%;
    overflow: hidden;
}

.oferta-slides {
    height: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2.5rem;
    padding: 3rem 2rem;
    overflow-y: auto; /* przewijanie */
    overflow-x: hidden;
}

.oferta-slides img {
    width: 100%;
    max-width: 1000px;
    height: auto;
    display: block;
    border-radius: 12px;
    animation: fadeIn 0.35s ease-in-out;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(8px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* =================== TABLET =================== */
@media (max-width: 1024px) {
    .oferta-menu {
        width: 30%;
        min-width: 220px;
        padding: 2rem;
        gap: 3rem;
    }

    .oferta-display {
        width: 70%;
    }

    .oferta-slides {
        padding: 2rem 1.5rem;
    }

    .oferta-slides img {
        max-width: 90%;
    }
}

/* =================== MOBILE =================== */
@media (max-width: 700px) {
    /* cała oferta w kolumnie */
    .oferta {
        position: relative;
        flex-direction: column;
        align-items: center;
        top: 0;
        bottom: auto;
        padding-top: 1rem;
    }

    /* slajdy od razu pod navbarem */
    .oferta-display {
        width: 100%;
        order: 1; /* slajdy jako pierwsze */
        display: flex;
        justify-content: center;
        overflow-y: auto; /* przewijanie wewnętrzne */
        max-height: 60vh; /* ograniczenie wysokości */
        padding: 1rem;
        gap: 1rem;
    }

    .oferta-slides {
        flex-direction: row;
        flex-wrap: wrap;
        justify-content: center;
        gap: 1rem;
        padding: 0;
    }

    .oferta-slides img {
        width: 100%;
        max-width: 300px; /* maksymalna szerokość slajdu w mobilce */
        height: auto;
        border-radius: 8px;
    }

    /* przyciski pod slajdami, obok siebie */
    .oferta-menu {
        width: 100%;
        order: 2; /* przyciski po slajdach */
        flex-direction: row;
        justify-content: center;
        flex-wrap: wrap;
        gap: 0.5rem;
        padding: 1rem;
    }

    .oferta-buttons {
        flex-direction: row;
        gap: 0.5rem;
        flex-wrap: wrap;
        justify-content: center;
        width: 100%;
    }

    /* wszystkie przyciski mają takie same wymiary */
    .oferta-buttons .hero-button,
    .oferta-download {
        width: 160px;
        height: 48px;
        font-size: 0.85rem;
        display: flex;
        align-items: center;
        justify-content: center;
        padding: 0 1rem;
    }
}

/* Podświetlenie wybranego przycisku w ofercie */
.oferta-select.active {
    color: #fff;
    border-color: #AF1E22;
}


/*--------------------------KONTAKT.HTML---------------------------*/
.kontakt {
    flex-direction: column;
    display: flex;
    flex: 1;
}

.kontakt-container {
    justify-content: center;
    align-items: stretch;
    padding: 4rem 2rem;
    max-width: 1100px;
    flex-wrap: wrap;
    margin: 0 auto;
    display: flex;
    gap: 2rem;
}

.card {
    background-color: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(6px);
    border-radius: 16px;
    padding: 2rem;
    width: 100%;
}

.kontakt-form h2,
.kontakt-info h2 {
    text-shadow: 1px 1px 2px #000;
    margin-bottom: 1rem;
    font-size: 1.8rem;
}

.kontakt-form form {
    flex-direction: column;
    display: flex;
    gap: 1rem;
}

.kontakt-form input,
.kontakt-form textarea {
    border: 1px solid rgba(255, 255, 255, 0.3);
    background: rgba(255, 255, 255, 0.1);
    border-radius: 6px;
    padding: 0.75rem;
    color: white;
}

.kontakt-form button {
    background-color: rgba(255, 255, 255, 0.3);
    transition: background-color 0.3s ease;
    border-radius: 6px;
    font-weight: bold;
    padding: 0.75rem;
    cursor: pointer;
    color: white;
    border: none;
}

.kontakt-form button:hover {
    background-color: rgba(255, 255, 255, 0.5);
}

.kontakt-info p,
.kontakt-info a {
    align-items: center;
    font-size: 1rem;
    line-height: 2;
    display: flex;
    gap: 0.5rem;
}

.kontakt-info a {
    justify-content: center;
    text-decoration: none;
    color: white;
}

.kontakt-info a:hover {
    text-decoration: underline;
}

span {
    justify-content: center;
    align-items: center;
    display: flex;
    height: 32px;
    width: 32px;
}

.popup.hidden {
    display: none;
}

.popup-content {
    background-color: white;
    padding: 20px 30px;
    border-radius: 8px;
    max-width: 400px;
    text-align: center;
}

/*-----------------------------FOOTER------------------------------*/
footer {
    background: rgba(9, 7, 10, 0.3);
    backdrop-filter: blur(4px);
    text-align: center;
    margin-top: auto;
    flex-shrink: 0;
    width: 100%;
    padding: 1%;
}

/*--------------------------WIDOK MOBILNY--------------------------*/
@media (max-width: 1024px) {
    .hamburger {
        position: absolute;
        margin-top: 16px;
        display: flex;
        z-index: 2;
        right: 2%;
        top: 1rem;
    }

    .nav-content {
        transition: max-height 0.4s, padding-top 0.4s;
        overflow: hidden;
        max-height: 0;
        width: 100%;
    }

    .nav-toggle:checked~.nav-content {
        max-height: 300px;
        padding-top: 1rem;
    }

    .nav-content nav ul {
        grid-template-columns: repeat(2, 1fr);
        width: max-content;
        margin: 0 auto;
        display: grid;
        gap: 0.5rem;
    }

    .nav-content nav ul li a {
        width: 100%;
    }

    .hero-text h1 {
        white-space: nowrap;
        font-size: 1.5em;
    }

    .oferta-desktop {
        display: none;
    }

    .oferta-mobile {
        display: flex;
        flex-direction: column;
        justify-content: center;
        align-items: center;
        text-align: center;
        width: 80%;
        height: 100%;
        gap: 5rem;
        padding: 5rem;
    }

    .oferta {
        align-items: center;
    }

    .portfolio-block {
        scroll-margin-top: -10vh;
    }

    .portfolio-block iframe {
        width: 17.5rem;
        height: 9.844rem;
    }

    .portfolio-content {
        padding: 0;
    }

    .portfolio-img {
        flex: none;
        max-width: 80vw;
        max-height: 40vh;
    }

    .portfolio-sections {
        gap: 5rem;
    }

    .portfolio-text {
        flex: none;
    }

    .kontakt-form h2 {
        text-align: center;
    }

    .kontakt-container {
        max-width: 100%;
    }
}