/* =========================================
   1. RESET I USTAWIENIA STRONY
   ========================================= */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    color: #333;
    padding-top: 80px; /* Odstęp na pasek nawigacji */
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

/* =========================================
   2. PASEK NAWIGACJI (NAVBAR)
   ========================================= */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 80px;
    background-color: #242424;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 50px;
    z-index: 1000;
}

.logo img {
    height: 40px;
    vertical-align: middle;
}

.nav-links {
    list-style: none;
    display: flex;
    gap: 30px;
}

.nav-links a {
    text-decoration: none;
    color: white;
    font-weight: 500;
    font-size: 1.1rem;
    transition: color 0.3s ease;
}

.nav-links a:hover,
.nav-links a.active {
    color: green;
}

/* =========================================
   3. SEKCJA POWITALNA (HERO)
   ========================================= */
.hero {
    height: 80vh;
    background-image: linear-gradient(rgba(0,0,0,0.5), rgba(0,0,0,0.5)), url(./images/tlo.jpg);
    background-size: cover;
    background-position: center;
    display: flex;
    justify-content: center;
    align-items: center;
    text-align: center;
    color: white;
}

.hero h1 {
    font-size: 3rem;
    margin-bottom: 20px;
}

.cta-button {
    padding: 15px 30px;
    background-color: green;
    color: white;
    border: none;
    font-size: 1.2rem;
    cursor: pointer;
    border-radius: 5px;
    transition: background 0.3s;
    text-decoration: none;
}

.cta-button:hover {
    background-color: darkgreen;
}

.content-section {
    padding: 60px 50px;
    text-align: center;
}

/* =========================================
   4. STYLE KART (GALERIA)
   ========================================= */
.gallery-header {
    background-color: #333;
    color: white;
    text-align: center;
    padding: 40px 20px;
    margin-bottom: 40px;
}

.gallery-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px 60px 20px;
    width: 100%;
}

.category-title {
    font-size: 2rem;
    border-bottom: 3px solid green;
    display: inline-block;
    margin: 40px 0 20px 0;
    padding-bottom: 5px;
}

.gallery-grid {
    display: grid;
    /* Automatyczne kolumny, minimum 280px szerokości */
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 20px;
}

.gallery-item {
    background: white;
    border-radius: 10px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
    overflow: hidden;
    transition: transform 0.3s ease;
    display: flex;
    flex-direction: column;
}

.gallery-item:hover {
    transform: translateY(-5px);
}

/* --- TO JEST KLUCZ DO RÓWNYCH KAFELKÓW --- */
/* Ustawiamy dokładnie to samo dla IMG (zdjęcia) i VIDEO (filmy) */
.gallery-grid img,
.gallery-item video {
    width: 100%;
    height: 250px;     /* Stała wysokość na komputerze */
    object-fit: cover; /* Wypełnia cały kafelek, przycinając nadmiar */
    display: block;
    cursor: pointer;   /* Łapka przy najechaniu */
}

/* =========================================
   5. MAPA I STOPKA
   ========================================= */
.map-container {
    margin-top: 30px;
    width: 100%;
    height: 400px;
    overflow: hidden;
    border-radius: 10px;
}

.map-container iframe {
    width: 100%;
    height: 100%;
    border: 0;
}

.site-footer {
    background-color: #242424;
    color: #ffffff;
    padding-top: 40px;
    margin-top: auto;
}

.footer-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    display: flex;
    flex-wrap: wrap;
    justify-content: space-around;
    gap: 30px;
    padding-bottom: 30px;
}

.footer-column h3 {
    color: green;
    border-bottom: 2px solid green;
    display: inline-block;
    padding-bottom: 10px;
    margin-bottom: 20px;
}

.footer-column a {
    color: #ffffff;
    text-decoration: none;
}

.footer-column a:hover {
    color: green;
}

.footer-links {
    list-style: none;
}

.footer-bottom {
    background-color: #1a1a1a;
    text-align: center;
    padding: 15px 20px;
    color: #888;
    border-top: 1px solid #333;
}

/* =========================================
   6. MODAL (POWIĘKSZONE ZDJĘCIE)
   ========================================= */
.modal {
    display: none;
    position: fixed;
    z-index: 2000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0,0,0,0.95);
}

.modal-content {
    /* Centrowanie idealne */
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);

    display: block;
    width: auto;
    max-width: 95vw;
    max-height: 90vh;
    object-fit: contain;
    box-shadow: 0 0 20px rgba(255,255,255,0.1);
}

.close {
    position: absolute;
    top: 20px;
    right: 30px;
    color: #f1f1f1;
    font-size: 40px;
    font-weight: bold;
    cursor: pointer;
    background: rgba(0,0,0,0.5);
    width: 50px;
    height: 50px;
    text-align: center;
    line-height: 50px;
    border-radius: 50%;
    z-index: 2001;
}

.close:hover {
    color: green;
}

/* =========================================
   7. WERSJA NA TELEFON (MEDIA QUERIES)
   ========================================= */
@media only screen and (max-width: 768px) {

    body { padding-top: 60px; }
    .navbar { height: 60px; padding: 0 15px; }
    .logo img { height: 30px; }

    .nav-links { gap: 15px; }
    .nav-links a { font-size: 0.9rem; }
    .nav-links li:first-child { display: none; }

    /* Siatka galerii na telefonie */
    .gallery-grid {
        grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
        gap: 10px;
    }

    /* RÓWNE KAFELKI NA TELEFONIE (zdjęcia i wideo) */
    .gallery-grid img,
    .gallery-item video {
        height: 150px; /* Stała wysokość kafelka */
    }

    /* Poprawki modala */
    .close {
        top: 15px;
        right: 15px;
        font-size: 30px;
        width: 40px;
        height: 40px;
        line-height: 40px;
    }
}