/* =========================================
   ZMIENNE I BAZOWY RESET
========================================= */
:root {
    --bg-color: #f8f9fa;
    --text-color: #212529;
    --accent-color: #0d6efd;
    --menu-bg: #212529;
    --gap: 20px;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: system-ui, -apple-system, sans-serif;
    background-color: var(--bg-color);
    color: var(--text-color);
    overflow-x: hidden;
}

/* =========================================
   NAWIGACJA (MENU I PRZYCISK)
========================================= */
.menu-btn {
    position: fixed;
    top: 20px;
    left: 20px;
    z-index: 1000;
    background: #fff;
    border: none;
    border-radius: 50%;
    width: 50px;
    height: 50px;
    cursor: pointer;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.3s;
}

.menu-btn:hover {
    background: #e9ecef;
}

.side-menu {
    position: fixed;
    top: 0;
    left: -300px;
    width: 300px;
    height: 100vh;
    background-color: var(--menu-bg);
    z-index: 999;
    padding-top: 80px;
    transition: transform 0.3s ease-in-out;
}

.side-menu.active {
    transform: translateX(300px);
}

.side-menu ul {
    list-style: none;
}

.side-menu a {
    display: block;
    padding: 15px 30px;
    color: #fff;
    text-decoration: none;
    font-size: 1.2rem;
    transition: background 0.2s;
}

.side-menu a:hover {
    background: rgba(255, 255, 255, 0.1);
}

/* =========================================
   PŁYWAJĄCY NUMER TELEFONU (NA DOLE)
========================================= */
.phone-overlay {
    position: fixed;
    bottom: 20px; 
    left: 50%;    
    transform: translateX(-50%); 
    
    /* Przezroczyste tło */
    background: rgba(33, 37, 41, 0.55); 
    
    /* NOWOŚĆ (Opcjonalnie): Efekt "oszronionego szkła" (rozmywa zdjęcia pod spodem) */
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    
    color: #ffffff;
    padding: 12px 24px;
    border-radius: 30px; 
    font-size: 15px;
    font-weight: 500;
    box-shadow: 0 4px 10px rgba(0,0,0,0.2); 
    z-index: 990; 
    transition: transform 0.3s ease, opacity 0.3s ease;
}

.phone-overlay a {
    color: #ffffff;
    text-decoration: none;
    font-weight: bold;
}

.phone-overlay:active {
    /* Przy kliknięciu musimy zachować centrowanie (translateX) dodając efekt wciśnięcia (scale) */
    transform: translateX(-50%) scale(0.95);
}

/* Ukrywanie telefonu, gdy menu jest wysunięte */
body:has(.side-menu.active) .phone-overlay {
    opacity: 0;
    pointer-events: none;
}

/* =========================================
   SIATKA GŁÓWNA (GALERIA)
========================================= */
.gallery-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: var(--gap);
    
    /* Przywrócono standardowy odstęp z góry (var(--gap)), zostawiono 80px z dołu na telefon */
    padding: var(--gap) var(--gap) 80px var(--gap); 
    
    max-width: 1400px;
    margin: 0 auto;
}

@media (min-width: 768px) {
    .gallery-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (min-width: 1200px) {
    .gallery-grid {
        grid-template-columns: repeat(4, 1fr);
    }
}

.photo-item {
    display: flex;
    flex-direction: column;
    background: #fff;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
    cursor: pointer;
    transition: transform 0.2s;
}

.photo-item img {
    width: 100%;
    height: auto;
    display: block;
}

.photo-item figcaption {
    padding: 15px;
    text-align: center;
    font-weight: 500;
    font-size: 1rem;
    background: #fff;
    border-top: 1px solid #eee;
}

@media (min-width: 768px) {
    .photo-item:hover {
        transform: scale(1.02);
    }
}

/* =========================================
   BANER ROZDZIELAJĄCY W GALERII
========================================= */
.banner {
    grid-column: 1 / -1; 
    background-color: var(--accent-color);
    color: #fff;
    padding: 40px 20px;
    text-align: center;
    border-radius: 8px;
    margin: 20px 0;
}

.banner h2 {
    margin-bottom: 10px;
    font-size: 1.5rem;
}

/* =========================================
   LIGHTBOX (PREZENTACJA ZDJĘĆ)
========================================= */
.lightbox {
    display: none;
    position: fixed;
    top: 0; left: 0; width: 100%; height: 100%;
    background-color: rgba(0, 0, 0, 0.85);
    z-index: 2000;
    padding-top: 5vh;
    justify-content: center;
    align-items: center;
}

.lightbox.active {
    display: flex;
}

.lightbox-content {
    position: relative;
    max-width: 90%;
    max-height: 85vh;
    display: flex;
    flex-direction: column;
    align-items: center;
}

#lightbox-img {
    max-width: 100%;
    max-height: 75vh;
    object-fit: contain;
    box-shadow: 0 4px 15px rgba(0,0,0,0.5);
}

.lightbox-caption {
    color: #fff;
    margin-top: 15px;
    font-size: 1.2rem;
    text-align: center;
}

.lightbox-prev, .lightbox-next, .lightbox-close {
    position: absolute;
    background: rgba(255, 255, 255, 0.1);
    color: white;
    border: none;
    cursor: pointer;
    font-size: 2.5rem;
    padding: 15px 25px;
    transition: background 0.3s;
    display: flex;
    align-items: center;
    justify-content: center;
}

.lightbox-prev:hover, .lightbox-next:hover, .lightbox-close:hover {
    background: rgba(255, 255, 255, 0.3);
}

.lightbox-prev { left: 20px; top: 50%; transform: translateY(-50%); }
.lightbox-next { right: 20px; top: 50%; transform: translateY(-50%); }
.lightbox-close { top: 20px; right: 30px; font-size: 3rem; background: transparent; padding: 0; }

/* =========================================
   BLOKADY I RESPONSOWNOŚĆ MOBILNA
========================================= */
@media (max-width: 767px) {
    .lightbox {
        display: none !important;
    }
    
    .photo-item {
        cursor: default;
    }
    
    .banner h2 {
        font-size: 1rem;
        margin-bottom: 5px;
    }
    
    .banner p {
        font-size: 0.9rem;
    }

    .photo-item figcaption {
        font-size: 0.7rem;
        padding: 10px;
    }

    .side-menu a {
        font-size: 1.1rem;
        padding: 12px 20px;
    }
}