/* ==========================================================================
   KOMPLETNY I NAPRAWIONY PLIK STYLÓW (style.css)
   ========================================================================== */

/* Reset podstawowych styli */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

body {
    color: #333;
    line-height: 1.6;
    background-color: #f9f9f9;
}

.container {
    width: 85%;
    max-width: 1100px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Nawigacja */
.navbar {
    background: #222;
    color: #fff;
    padding: 20px 0;
    position: sticky;
    top: 0;
    z-index: 100;
}

.navbar-flex {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    font-size: 24px;
    font-weight: bold;
    text-transform: uppercase;
}

.logo span {
    color: #ffcc00;
}

.nav-links {
    list-style: none;
    display: flex;
}

.nav-links li {
    margin-left: 20px;
}

.nav-links a {
    color: #fff;
    text-decoration: none;
    font-weight: 600;
    transition: color 0.3s;
}

.nav-links a:hover {
    color: #ffcc00;
}

/* Sekcja Główna (Hero) */
.hero {
    background: linear-gradient(rgba(0,0,0,0.7), rgba(0,0,0,0.7)), url('https://unsplash.com') no-repeat center center/cover;
    height: 70vh;
    color: #fff;
    display: flex;
    align-items: center;
    text-align: center;
}

.hero-content h1 {
    font-size: 45px;
    margin-bottom: 20px;
}

.hero-content p {
    font-size: 18px;
    margin-bottom: 30px;
}

.btn {
    display: inline-block;
    background: #ffcc00;
    color: #222;
    padding: 12px 30px;
    text-decoration: none;
    font-weight: bold;
    border-radius: 5px;
    transition: background 0.3s;
}

.btn:hover {
    background: #e6b800;
}

/* Sekcje ogólne */
.section {
    padding: 60px 0;
}

.section h2 {
    text-align: center;
    font-size: 32px;
    margin-bottom: 40px;
    position: relative;
}

.section h2::after {
    content: '';
    display: block;
    width: 60px;
    height: 4px;
    background: #ffcc00;
    margin: 10px auto 0 auto;
}

.bg-light {
    background-color: #f1f1f1;
}

/* Siatka Usług (Strona Główna) */
.grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 30px;
}

.card {
    background: #fff;
    padding: 30px;
    border-radius: 8px;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
    border-top: 5px solid #ffcc00;
}

.card h3 {
    margin-bottom: 15px;
}

/* ==========================================================================
   SEKCJA GALERII (Realizacje & Podstrony projektów)
   ========================================================================== */
.gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
}

.gallery-item {
    position: relative;
    overflow: hidden;
    border-radius: 8px;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
    height: 200px; /* Sztywna wysokość kafelka */
    width: 100%;
}

/* Link wewnątrz kafelka musi idealnie wypełniać cały obszar */
.gallery-item a, 
.project-link {
    text-decoration: none;
    color: inherit;
    display: block;
    width: 100%;
    height: 100%;
}

/* Obrazek wewnątrz linku – wymuszamy poprawne proporcje i kadrowanie */
.gallery-item a img,
.gallery-item img {
    width: 100% !important;
    height: 100% !important;
    object-fit: cover !important; /* Inteligentne przycinanie bez zniekształceń */
    display: block;
    transition: transform 0.3s ease;
}

/* Efekt najechania myszką na obrazek */
.gallery-item:hover a img,
.gallery-item:hover img {
    transform: scale(1.1);
}

.gallery-desc {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: rgba(0, 0, 0, 0.7);
    color: #fff;
    padding: 10px;
    font-size: 14px;
    text-align: center;
    font-weight: bold;
    z-index: 2;
}

/* ==========================================================================
   SEKCJA FORMULARZA WYCENY
   ========================================================================== */
.quote-form {
    max-width: 650px;
    margin: 0 auto;
    background: #fff;
    padding: 40px;
    border-radius: 8px;
    box-shadow: 0 4px 10px rgba(0,0,0,0.05);
    border-top: 5px solid #ffcc00;
}

.form-group {
    margin-bottom: 20px;
    display: flex;
    flex-direction: column;
}

.form-group label {
    margin-bottom: 8px;
    font-weight: 600;
    font-size: 14px;
    color: #444;
}

.form-group input,
.form-group textarea {
    padding: 12px;
    border: 1px solid #ccc;
    border-radius: 4px;
    font-size: 16px;
    transition: border-color 0.3s;
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: #ffcc00;
}

.form-group-row {
    display: flex;
    gap: 20px;
}

.form-group-row .form-group {
    flex: 1;
}

.btn-block {
    display: block;
    width: 100%;
    border: none;
    cursor: pointer;
    font-size: 16px;
    padding: 15px;
}

/* Kontakt */
.text-center {
    text-align: center;
}

.contact-info {
    margin-top: 30px;
    font-size: 20px;
}

.contact-info p {
    margin: 10px 0;
}

/* Stopka */
.footer {
    background: #222;
    color: #fff;
    text-align: center;
    padding: 20px 0;
    font-size: 14px;
}

/* Responsywność dla urządzeń mobilnych */
@media(max-width: 768px) {
    .navbar-flex {
        flex-direction: column;
    }
    .nav-links {
        margin-top: 15px;
    }
    .hero-content h1 {
        font-size: 32px;
    }
    .form-group-row {
        flex-direction: column;
        gap: 0;
    }
    .quote-form {
        padding: 20px;
    }
}
/* Nowy, bezpieczny Lightbox pop-up */
.custom-lightbox {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 9999; /* Maksymalna wysokość warstwy, nad menu */
}

/* Wyświetlenie okna po kliknięciu w link z # */
.custom-lightbox:target {
    display: flex;
    justify-content: center;
    align-items: center;
}

/* Ciemne tło, które po kliknięciu zamyka okno */
.lightbox-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.85);
    cursor: pointer;
}

/* Kontener trzymający duże zdjęcie i krzyżyk */
.lightbox-wrapper {
    position: relative;
    max-width: 90%;
    max-height: 85vh;
    z-index: 10000;
}

.lightbox-wrapper img {
    display: block;
    max-width: 100%;
    max-height: 85vh;
    width: auto;
    height: auto;
    border: 4px solid #fff;
    border-radius: 4px;
    box-shadow: 0 5px 25px rgba(0,0,0,0.5);
}

/* Przycisk zamknij (Krzyżyk) */
.lightbox-close-btn {
    position: absolute;
    top: -45px;
    right: 0;
    color: #fff;
    font-size: 42px;
    text-decoration: none;
    font-weight: bold;
    line-height: 1;
    transition: color 0.2s;
}

.lightbox-close-btn:hover {
    color: #ffcc00; /* Zmiana koloru na maszynowy żółty przy najechaniu */
}
/* POPRAWKA: Wymuszenie idealnych proporcji dla głównego kafelka projektu */
.project-link .gallery-item img {
    width: 100% !important;
    height: 100% !important;
    object-fit: cover !important; /* Kadruje zdjęcie do boksu 200/230px bez rozciągania */
    display: block;
}

#mapa-obszaru {
    width: 100%;
    max-width: 800px;
    height: 420px;
    margin: 24px auto 0;
    border: 3px solid #ffcc00;
    border-radius: 8px;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.12);
    z-index: 1;
}

@media (max-width: 768px) {
    #mapa-obszaru {
        height: 320px;
    }
}