/* =========================================
   RESET I USTAWIENIA STRONY
   ========================================= */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    scroll-behavior: smooth;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    color: #e0e0e0;
    background-color: #121212;
    padding-top: 0;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

/* =========================================
   PASEK NAWIGACJI
   ========================================= */
.navbar {
    position: fixed;
    top: 20px; /* Pływa 20px od góry */
    left: 50%;
    transform: translateX(-50%); /* Idealne centrowanie */
    width: 95%;
    max-width: 1200px;
    height: 70px;
    background-color: rgba(25, 25, 25, 0.85); /* Półprzezroczyste ciemne tło */
    backdrop-filter: blur(12px); /* Nowoczesny efekt szkła (glassmorphism) */
    -webkit-backdrop-filter: blur(12px); /* Obsługa dla Safari */
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 30px;
    z-index: 1000;
    border-radius: 20px; /* Mocno zaokrąglone brzegi */
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3); /* Głęboki cień */
    border: 1px solid rgba(255, 255, 255, 0.1); /* Delikatna, jasna ramka */
}

.logo img {
    height: 40px;
    vertical-align: middle;
    border-radius: 5px;
}

.nav-links {
    list-style: none;
    display: flex;
    gap: 15px;
    margin: 0;
    padding: 0;
}

.nav-links a {
    text-decoration: none;
    color: #e0e0e0;
    font-weight: 500;
    font-size: 1rem;
    transition: all 0.3s ease;
    padding: 10px 15px;
    border-radius: 12px;
}

.nav-links a:hover,
.nav-links a.active {
    color: #fff;
    background-color: rgba(0, 128, 0, 0.8);
}

/* =========================================
   SEKCJA POWITALNA
   ========================================= */
.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;
}

/* =========================================
   GALERIA
   ========================================= */
.gallery-header {
    background-image: linear-gradient(rgba(0,0,0,0.6), rgba(0,0,0,0.6)), url(./images/tlo.jpg);
    background-size: cover;
    background-position: center;
    color: white;
    text-align: center;
    padding: 160px 20px 80px 20px;
    margin-bottom: 40px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.3);
}

.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: #1e1e1e;
    border-radius: 10px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.5);
    overflow: hidden;
    transition: transform 0.3s ease;
    display: flex;
    flex-direction: column;
}

.gallery-item:hover {
    transform: translateY(-5px);
}

.gallery-grid img,
.gallery-item video {
    width: 100%;
    height: 250px;
    object-fit: cover;
    display: block;
    cursor: pointer;
}

/* =========================================
   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;
}

/* =========================================
   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 {
    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;
}

/* =========================================
   WERSJA NA TELEFON
   ========================================= */
@media only screen and (max-width: 768px) {

    body {
        padding-top: 0;
        padding-bottom: 0;
    }

    .navbar {
        top: auto;
        bottom: 20px;
        height: 65px;
        padding: 0 10px;
        width: 92%;
        border-radius: 18px;
    }

    .logo {
        display: none;
    }

    .navbar nav {
        width: 100%;
    }

    .nav-links {
        width: 100%;
        justify-content: space-between;
        gap: 0;
    }

    .nav-links li {
        flex: 1;
        display: flex;
    }

    .nav-links a {
        font-size: 0.75rem;
        padding: 10px 2px;
        text-align: center;
        width: 100%;
        display: block;
    }

    .gallery-grid {
        grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
        gap: 10px;
    }

    .gallery-grid img,
    .gallery-item video {
        height: 150px;
    }

    .gallery-header {
        padding: 60px 20px;
    }

    .close {
        top: 15px;
        right: 15px;
        font-size: 30px;
        width: 40px;
        height: 40px;
        line-height: 40px;
    }

    .login-wrapper {
        height: auto;
        min-height: calc(100vh - 120px);
        padding: 15px;
        align-items: flex-start;
        margin-top: 30px;
    }

    .login-box {
        padding: 25px 20px;
        width: 100%;
        margin: 0;
    }

    .login-box h2 {
        font-size: 1.5rem;
    }

    .upload-container {
        margin: 20px 15px;
        padding: 25px 15px;
    }

    #drop-zone {
        padding: 30px 10px;
        font-size: 0.9rem;
    }
    .footer-bottom {
        padding-bottom: 110px;
    }
}

/* =========================================
   PANEL WGRYWANIA ZDJĘĆ
   ========================================= */
.upload-container {
    max-width: 500px;
    margin: 120px auto 40px auto;
    padding: 30px;
    background: #1e1e1e;
    border-radius: 10px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.5);
}

.upload-container h2, #status {
    text-align: center;
    margin-bottom: 20px;
    color: #ffffff;
}

#drop-zone {
    border: 2px dashed green;
    border-radius: 10px;
    padding: 50px 20px;
    text-align: center;
    background: #242424;
    cursor: pointer;
    transition: all 0.3s ease;
    color: #aaa;
    margin-bottom: 20px;
}

#drop-zone.dragover {
    background: #1a331a;
    border-color: #4CAF50;
    color: #4CAF50;
}

#status {
    text-align: center;
    margin-top: 15px;
    font-size: 1.1rem;
    color: #333;
}

/* =========================================
   PANEL LOGOWANIA
   ========================================= */
.login-wrapper {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    padding-top: 100px;
    padding-bottom: 50px;
}

.login-box {
    background: #1e1e1e;
    padding: 40px;
    border-radius: 10px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
    text-align: center;
    width: 100%;
    max-width: 400px;
}

.login-box h2 {
    color: #ffffff;
}

.login-box input {
    width: 100%;
    padding: 12px;
    margin: 10px 0 20px 0;
    border: 1px solid #444;
    background-color: #2c2c2c;
    color: #ffffff;
    border-radius: 5px;
    font-size: 1rem;
}

.login-box button {
    width: 100%;
    padding: 12px;
    background: green;
    color: white;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-size: 1.1rem;
    transition: 0.3s;
}

.login-box button:hover {
    background: darkgreen;
}

.error-msg {
    color: red;
    margin-bottom: 15px;
    font-weight: bold;
}

/* =========================================
   DODATKOWE ELEMENTY (Przyciski, komunikaty)
   ========================================= */
.back-button-container {
    text-align: center;
    margin-top: 30px;
}

.back-button {
    display: inline-block;
    padding: 10px 20px;
    background: #333;
    color: white;
    text-decoration: none;
    border-radius: 5px;
    transition: background 0.3s;
}

.back-button:hover {
    background: #555;
}

.empty-gallery-msg {
    text-align: center;
    width: 100%;
    grid-column: 1 / -1;
    color: #555;
    font-size: 1.1rem;
    padding: 20px;
}

#lokalizacja {
    background-color: #1a1a1a;
}