/* Globale Stijlen i Paleta */
:root {
    --primary-color: #1c1c1c; 
    --secondary-color: #b7001a; /* Intensywna Czerwień */
    --text-color: #333;
    --light-bg: #f5f5f5; 
    --header-footer-bg: #140103; /* Tło nagłówka/stopki */
    --font-family: 'Inter', sans-serif;
    --light-text: #e0e0e0; /* Jasny kolor dla tekstu na ciemnym tle */
}

/* Reset en Podstawowe Style */
* { box-sizing: border-box; margin: 0; padding: 0; }

/* KLUCZOWA POPRAWKA JS: Blokowanie przewijania poziomego (i pionowego) gdy Lightbox jest aktywny */
/* Poprawka: Ogranicza przewijanie całego body. */
body.lightbox-active {
    overflow: hidden; 
}

body { 
    font-family: var(--font-family); 
    color: var(--text-color); 
    line-height: 1.6; 
    overflow-x: hidden; /* Domyślne ukrycie przewijania poziomego na głównej stronie */
}

a { text-decoration: none; color: var(--primary-color); }
.section-padding { padding: 60px 5%; }
h2, h3, h4 { color: var(--primary-color); position: relative; padding-bottom: 10px; }
h2::after { content: ''; display: block; width: 60px; height: 3px; background: var(--secondary-color); margin-top: 5px; }
h2, h3 { text-align: center; }
.services-grid h3::after, .projects-gallery h2::after { margin: 5px auto 0; }


/* ########### Header & Navigatie ########### */
.main-header {
    background-color: var(--header-footer-bg); 
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.5); 
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 5%; 
    position: sticky;
    top: 0;
    z-index: 1000;
}
.header-logo { height: 75px; width: auto; display: block; }
.main-nav { display: block; }
.nav-list { display: flex; list-style: none; }
.nav-link { color: white; padding: 10px 15px; font-weight: 600; transition: background-color 0.3s, color 0.3s; }
.nav-link:hover { background-color: var(--secondary-color); color: white; border-bottom: none; }


/* ########### Knoppen (CTA) ########### */
.primary-button, .secondary-button, .cta-button {
    display: inline-block;
    padding: 12px 25px;
    border-radius: 5px;
    font-weight: 700;
    text-transform: uppercase;
    transition: background-color 0.3s, transform 0.2s;
    margin: 5px;
}
.primary-button, .cta-button {
    background-color: var(--secondary-color); 
    color: white;
    border: 2px solid var(--secondary-color);
}
.primary-button:hover, .cta-button:hover { background-color: #8c0014; transform: translateY(-2px); }
.hero-actions .secondary-button {
    background-color: transparent;
    color: white; 
    border: 2px solid white; 
}
.hero-actions .secondary-button:hover { background-color: white; color: var(--primary-color); border: 2px solid white; }


/* ########### Hero Sectie ########### */
.hero-section {
    background: var(--header-footer-bg); 
    /* Używamy docelowego obrazka */
    background-image: url('hero-background.jpg'); 
    background-size: cover;
    background-position: center;
    min-height: 500px;
    display: flex;
    align-items: center;
    justify-content: flex-start;
    padding-left: 5%;
    position: relative;
}
.hero-section::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    /* KLUCZOWA ZMIANA: Zmniejszamy zaciemnienie z 0.85 na 0.7, aby obraz był bardziej widoczny */
    background: rgba(0, 0, 0, 0.7); 
    z-index: 1;
}
.hero-content { color: white; max-width: 600px; z-index: 2; }
.hero-content h2 { font-size: 3em; margin: 15px 0; line-height: 1.1; color: white; }
.hero-content h2::after { background: white; }


/* ########### Diensten Grid (4 Kolumny) ########### */
.service-icon {
    font-size: 3em; 
    color: var(--secondary-color); 
    margin-bottom: 15px; 
    display: block; 
}

.service-cards {
    display: grid;
    grid-template-columns: repeat(4, 1fr); 
    gap: 30px;
    margin-top: 30px;
}
.service-card {
    background-color: white;
    border: 1px solid #ddd;
    border-radius: 8px;
    padding: 25px;
    text-align: center;
    transition: transform 0.3s, box-shadow 0.3s, border-bottom 0.3s;
    height: 100%; 
}
.service-card:hover { transform: translateY(-5px); box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15); border-bottom: 4px solid var(--secondary-color); }
.service-card h4 { color: var(--secondary-color); margin-bottom: 15px; }


/* ########### Trust Bar (Cijfers) ########### */
.trust-bar {
    background-color: var(--light-bg);
    display: flex;
    justify-content: space-around;
    text-align: center;
    border-top: 1px solid #ddd;
    border-bottom: 1px solid #ddd;
    padding: 30px 5%; 
}
.icon-stat {
    font-size: 3em;
    color: var(--secondary-color); 
    display: block;
    margin-bottom: 5px;
}
.google-icon {
    color: #4285F4; 
}
.stat-number {
    font-size: 2.5em; 
    font-weight: 700;
    color: var(--primary-color); 
    display: block;
}
.stat-text {
    font-weight: 600;
    color: var(--text-color);
}
.trust-item {
    padding: 0 10px; 
}

/* ########### Projecten Sectie (GALERIA) ########### */
.projects-gallery {
    text-align: center; 
}
.gallery-container {
    display: grid;
    grid-template-columns: repeat(3, 1fr); /* 3 projekty w rzędzie na desktopie */
    gap: 30px;
    margin-top: 30px;
}
.project-card {
    background-color: white;
    border: 1px solid #ddd;
    border-radius: 8px;
    overflow: hidden; 
    padding-bottom: 20px;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.05);
}

.project-card:hover {
    cursor: pointer; /* WAŻNE: Wskazuje, że karta jest klikalna */
}

.image-wrapper {
    position: relative;
    cursor: pointer; 
    overflow: hidden;
    display: flex; /* Ustawia obrazy obok siebie */
    max-height: 200px;
}

.project-card img {
    width: 50%; /* Każde zdjęcie zajmuje połowę szerokości karty */
    height: 200px; /* Stała wysokość miniatury */
    display: block;
    object-fit: cover; /* Ważne, aby miniatury się nie zniekształcały */
    transition: transform 0.3s;
}

.project-card:hover img {
    transform: scale(1.05); /* Efekt lekkiego powiększenia przy najechaniu */
}

.zoom-icon {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 3em;
    color: white;
    background: rgba(0, 0, 0, 0.5);
    padding: 10px;
    border-radius: 50%;
    opacity: 0;
    transition: opacity 0.3s;
    pointer-events: none; 
}

.project-card:hover .zoom-icon {
    opacity: 1;
}

.project-card h4 {
    text-align: left;
    padding: 15px 15px 0;
    margin: 0;
    color: var(--secondary-color);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis; 
}
.project-card p {
    text-align: left;
    padding: 5px 15px 0;
    margin: 0;
    font-size: 0.95em;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
}
.gallery-button {
    margin: 40px auto 0;
}


/* ########### Contact Formulier ########### */
.contact-section {
    display: flex;
    gap: 40px;
    align-items: flex-start;
    background-color: var(--header-footer-bg); 
    color: var(--light-text); 
    padding: 60px 5%;
}
.contact-details {
    flex: 1; 
    min-width: 300px; 
}

.contact-details h2 {
    color: white; 
}

.contact-details p {
    margin-bottom: 15px; 
    font-size: 1.1em; 
}
.contact-details a {
    color: var(--light-text); 
    text-decoration: underline; 
}
.contact-details a:hover {
    color: var(--secondary-color);
}

.contact-form-container {
    flex: 1.5; 
    width: 100%; 
    max-width: 500px; 
}
.modern-form {
    display: flex;
    flex-direction: column;
    gap: 15px; 
}
.modern-form input,
.modern-form textarea {
    padding: 18px 15px; 
    border: 1px solid #ddd;
    border-radius: 5px;
    font-size: 1.1em; 
    width: 100%; 
    color: var(--primary-color);
}
.modern-form textarea {
    resize: vertical; 
}
.form-submit {
    width: 100%; 
    margin: 0; 
}

/* ########### Footer ########### */
.site-footer {
    background-color: var(--header-footer-bg); 
    color: var(--light-text); 
    padding: 40px 5% 15px;
}
.footer-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 30px;
}
.footer-col h4 {
    color: var(--secondary-color); 
}
.footer-col a {
    color: var(--light-text); 
}
.footer-col ul {
    list-style: none;
    padding: 0;
}
.footer-col ul li a:hover {
    color: var(--secondary-color);
}
.footer-bottom {
    margin-top: 20px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    padding-top: 15px;
    text-align: center;
    font-size: 0.9em;
}
.footer-bottom a {
    color: var(--light-text);
    margin-left: 15px;
}

/* ########################################## */
/* MEDIA QUERIES (RESPONSYWNOŚĆ) */
/* ########################################## */

/* Tabletten (max 1200px) - Zmniejszenie siatki usług i galerii */
@media (max-width: 1200px) {
    .service-cards {
        grid-template-columns: repeat(2, 1fr); 
    }
    .gallery-container {
        grid-template-columns: repeat(2, 1fr); 
    }
}

/* Tabletten (max 992px) */
@media (max-width: 992px) {
    /* Header/Navigatie */
    .main-header { flex-direction: column; align-items: flex-start; padding-bottom: 0; }
    .main-nav { margin-top: 5px; width: 100%; }
    .nav-list { justify-content: space-around; width: 100%; padding: 5px 0; }
    .nav-link { padding: 8px 10px; }
    .header-cta { width: 90%; margin: 10px auto; text-align: center; }
    /* Hero */
    .hero-section { min-height: 400px; padding-left: 3%; }
    .hero-content h2 { font-size: 2.5em; }
    /* Contact Section */
    .contact-section { 
        flex-direction: column; gap: 30px; align-items: center; text-align: center; 
    }
    .contact-details { 
        text-align: center; 
    }
    .contact-details, .contact-form-container { max-width: 90%; min-width: auto; }
}


/* Telefoons (max 576px) */
@media (max-width: 576px) {
    
    /* Header/Navigatie */
    .main-header { flex-direction: column; justify-content: center; align-items: center; padding: 10px 0; }
    .header-logo { height: 60px; margin-bottom: 5px; }
    .main-nav { display: block; width: 100%; margin: 0; }
    .nav-list { justify-content: space-around; padding: 5px 0; }
    .nav-link { padding: 5px 8px; font-size: 0.9em; }
    .header-cta { display: none; }
    
    /* Hero */
    .hero-section { min-height: 350px; text-align: center; justify-content: center; align-items: center; padding: 40px 5%; }
    .hero-content h2 { font-size: 1.8em; line-height: 1.2; margin-bottom: 10px; }
    .hero-actions { display: flex; flex-direction: column; width: 100%; margin-top: 20px; }
    .primary-button, .secondary-button { width: 100%; text-align: center; margin: 5px 0; }

    /* Usługi - 1 kolumna na smartfonie */
    .service-cards { 
        grid-template-columns: 1fr;
        gap: 20px;
    }
    /* Galeria - 1 kolumna na smartfonie */
    .gallery-container {
        grid-template-columns: 1fr;
    }
    .project-card img {
        height: 150px; /* Zmniejszenie wysokości na mobile */
    }

    /* Trust Bar (Behoudt eerdere fixes) */
    .trust-bar { flex-direction: column; align-items: center; padding: 40px 5%; }
    .trust-item { width: 100%; padding: 15px 0; border-bottom: 1px solid #ddd; }
    .trust-item:last-child { border-bottom: none; }
    .stat-number { font-size: 2em; }
    .icon-stat { font-size: 2.5em; }
    
    /* Contact Sectie Mobile */
    .contact-section {
        flex-direction: column;
        gap: 30px;
        padding: 40px 5%;
        text-align: left; 
        align-items: stretch; 
    }
    .contact-details, .contact-form-container {
        max-width: 100%; 
    }
    .contact-details p {
        margin-bottom: 15px; 
    }
    .modern-form input,
    .modern-form textarea,
    .form-submit {
        width: 100%; 
    }

    /* Footer */
    .footer-grid { grid-template-columns: 1fr; text-align: center; }
}

/* ########################################## */
/* LIGHTBOX STYLES (POPRAWIONY) */
/* ########################################## */

.lightbox {
    display: none !important; 
    position: fixed;
    z-index: 9999; 
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto; 
    background-color: rgba(0,0,0,0.95);
    align-items: center; 
    justify-content: center; 
    flex-direction: column;
    padding: 20px;
}

.lightbox-active {
    display: flex !important; 
}

.lightbox-content-container {
    max-width: 90%;
    max-height: 90%;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.lightbox-images {
    /* DEFAULT: Obrazy obok siebie */
    display: flex;
    gap: 15px;
    max-width: 100%; 
    max-height: 80vh; 
    margin-bottom: 15px;
    align-items: center;
    justify-content: center;
}

.lightbox-images img {
    /* KLUCZOWA ZMIANA DLA DESKTOPU: 40vw, aby zostawić większy margines */
    max-width: 40vw; 
    max-height: 80vh; 
    width: auto;
    height: auto;
    object-fit: contain; 
    border: 3px solid white;
}

.lightbox-caption {
    color: white;
    text-align: center;
    background-color: rgba(0,0,0,0.5);
    padding: 10px 20px;
    border-radius: 5px;
    max-width: 90%;
}

.lightbox-caption h4 {
    color: var(--secondary-color);
}

.close-btn {
    position: absolute;
    top: 20px;
    right: 40px;
    color: white;
    font-size: 40px;
    font-weight: bold;
    cursor: pointer;
}

.close-btn:hover {
    color: var(--secondary-color);
}

/* ########################################## */
/* RESPONSIVE LIGHTBOX DLA MOBILNYCH WIDOKÓW */
/* ########################################## */

@media (max-width: 768px) {
    
    .lightbox {
        overflow-y: scroll;
        padding-top: 60px; 
    }

    .lightbox-content-container {
        width: 100%; 
        max-width: 100%;
    }

    .lightbox-images {
        flex-direction: row; 
        gap: 10px; 
        max-height: none; 
        padding: 0 10px; 
        flex-shrink: 1; 
        flex-wrap: nowrap;
    }

    .lightbox-images img {
        /* Wymuś 50% szerokości, uwzględniając gap */
        max-width: calc(50% - 5px); 
        width: calc(50% - 5px);
        min-width: 0; 
        height: auto; 
        max-height: 40vh; 
        object-fit: contain; 
    }

    .close-btn {
        top: 10px;
        right: 15px;
        font-size: 30px;
    }
    
    .lightbox-caption {
        padding: 10px;
        margin-top: 20px;
        margin-bottom: 20px; 
    }
}