* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Poppins', sans-serif;
}

/* TŁO */
body {
    background: url('roof.jpg') center/cover no-repeat fixed;
    color: white;
}

/* HEADER */
header {
    background: white;
    padding: 20px 0;
    
}

/* ✅ GŁÓWNY UKŁAD HEADERA (logo | kontakt | menu) */
.container {
    width: 80%;
    margin: 0 auto;

    display: grid;
    grid-template-columns: auto 1fr auto; /* logo | kontakt | menu */
    align-items: center;
    gap: 20px;
}

.logo {
    width: 250px;
    height: 100px;
    object-fit: contain;
    display: block;
}

/* KONTAKT */
.header-info {
    text-align: center;
    color: black;
    font-size: 14px;
    line-height: 1.35;
    white-space: nowrap; /* nie łam numeru/email */
}

/* MENU */
nav ul {
    display: flex;
    list-style: none;
    gap: 20px;            /* zamiast marginów na li */
    justify-content: flex-end;
    flex-wrap: wrap;      /* gdy mało miejsca, nie znika */
}

nav ul li {
    margin: 0;            /* wyłączamy stare marginesy */
}

nav ul li a {
    color: black;
    text-decoration: none;
    font-size: 16px;
}

/* MAIN */
main {
    width: 80%;
    margin: 50px auto;
    text-align: center;

    display: flex;
    flex-direction: column;
    gap: 60px; /* STAŁY ODSTĘP MIĘDZY SEKCJAMI */
}

/* SEKCJE */
section {
    margin-bottom: 0; /* odstępy robi gap */
    padding: 50px;
    background: rgba(255,255,255,0.75);
    color: black;
    border-radius: 15px;
}

/* INFO BOX */
.info-box {
    max-width: 350px;
    margin-left: auto;
    font-size: 125%;
}

/* OFERTA */
.offer-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 20px;
    margin-top: 30px;
}

.offer-box {
    background: #e6f0ff;
    padding: 20px;
    border-radius: 10px;

    outline: 1px solid rgba(0,0,0,0.08);
    outline-offset: -1px;
}

.offer-box h3 {
    color: #004d99;
    margin-bottom: 10px;
}

.offer-box ul {
    list-style: none;
}

.offer-box ul li {
    font-size: 15px;
    color: #333;
    padding: 5px 0;
}

/* REALIZACJE + PRZED I PO */
.projects-container {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 20px;
    margin-top: 30px;
}

.project {
    width: 300px;
    background: white;
    padding: 15px;
    border-radius: 10px;
    box-shadow: 0 4px 10px rgba(0,0,0,0.1);
}

.project img {
    width: 100%;
    height: auto;
    border-radius: 6px;
}

.project p {
    margin-top: 10px;
    font-size: 15px;
    color: #333;
}

/* PODZIAŁ REALIZACJE / PRZED I PO */
.projects-divider {
    margin: 70px auto 40px;
    max-width: 200px;
    border: none;
    height: 2px;
    background: linear-gradient(to right, transparent, #ccc, transparent);
}

.projects-subtitle {
    font-size: 26px;
    font-weight: 600;
    margin-bottom: 10px;
}

.projects-subdesc {
    font-size: 16px;
    color: #555;
    margin-bottom: 10px;
}

/* OPINIE */
#reviews a {
    color: #004d99;
    text-decoration: none;
    font-weight: 500;
}

/* FOOTER */
footer {
    background: #2c3e50;
    color: white;
    text-align: center;
    padding: 15px;
}

/* RESPONSYWNOŚĆ */
@media (max-width: 1024px) {
    .container {
        width: 90%;
        grid-template-columns: 1fr; /* wszystko w kolumnie */
        text-align: center;
        justify-items: center;
    }

    nav ul {
        justify-content: center;
    }

    main {
        width: 90%;
    }
}

@media (max-width: 768px) {
    main {
        width: 95%;
        gap: 50px;
    }

    section {
        padding: 30px;
    }

    .projects-container {
        flex-direction: column;
        align-items: center;
    }

    .header-info {
        white-space: normal; /* na telefonie może się łamać */
    }
}

/* PRZED I PO: 4 kafle w rzędzie (desktop), jak realizacje ale gęściej */
.before-after-grid{
    display: grid;
    grid-template-columns: repeat(4, minmax(220px, 1fr)); /* 4 na szerokości */
    gap: 20px;
    margin-top: 30px;
}

/* Nadpisujemy width z .project (bo tam masz 300px i to blokuje 4 w rzędzie) */
.before-after-grid .project{
    width: auto;
}

/* ✅ Oddzielenie porównań: po każdej parze (czyli po 2 kaflach) większa przerwa */
.before-after-grid{
    column-gap: 50px; /* większa przerwa między parami w jednym rzędzie */
}

/* Zaznaczamy start drugiej pary w rzędzie (3 i 4 element) subtelną "kreską" */
.before-after-grid .project:nth-child(4n+3){
    position: relative;
}
.before-after-grid .project:nth-child(4n+3)::before{
    content: "";
    position: absolute;
    left: -25px;
    top: 10px;
    bottom: 10px;
    width: 1px;
    background: rgba(0,0,0,0.12);
}

/* Tablet: 2 w rzędzie */
@media (max-width: 1100px){
    .before-after-grid{
        grid-template-columns: repeat(2, minmax(220px, 1fr));
        column-gap: 40px;
    }
    /* separator pionowy ma sens tylko gdy są 4 w rzędzie */
    .before-after-grid .project:nth-child(4n+3)::before{
        display: none;
    }
}

/* Telefon: 1 w kolumnie */
@media (max-width: 600px){
    .before-after-grid{
        grid-template-columns: 1fr;
        column-gap: 20px;
    }
}

