/* =========================================
   STYLE DLA PODSTRONY GALERIA
   ========================================= */

/* --- 1. PRZYCISKI FILTRÓW --- */
.gallery-filters {
    margin-bottom: 20px;
}

.filter-btn {
    background-color: #fff;
    border: 1px solid #e2e8f0;
    color: #0b2514;
    padding: 12px 24px;
    border-radius: 30px;
    font-weight: 700;
    font-size: 0.95rem;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 6px rgba(0,0,0,0.02);
}

/* Stan po najechaniu myszką */
.filter-btn:hover {
    background-color: #f8fafc;
    border-color: #cbd5e1;
    transform: translateY(-2px);
}

/* Stan aktywnego przycisku (Ten zielony!) */
.filter-btn.active {
    background-color: #4ade80;
    color: #0b2514;
    border-color: #4ade80;
    box-shadow: 0 8px 15px rgba(74, 222, 128, 0.3);
}

/* --- 2. SIATKA ZDJĘĆ (MASONRY) --- */
.masonry-grid {
    column-count: 3; /* Magia - dzieli na 3 kolumny */
    column-gap: 20px; /* Odstęp między kolumnami */
}

.grid-item {
    break-inside: avoid; /* Zapobiega ucinaniu zdjęcia w połowie przy łamaniu kolumny */
    margin-bottom: 20px; /* Odstęp między zdjęciami w pionie */
    border-radius: 24px;
    overflow: hidden;
    position: relative;
    cursor: pointer;
    transition: transform 0.4s ease, box-shadow 0.4s ease, opacity 0.4s ease;
}

/* Ukrywanie kafelków podczas filtrowania (wykorzystamy w JS) */
.grid-item.hide {
    display: none;
}

.grid-item img {
    width: 100%;
    display: block;
    height: auto; /* Zachowuje oryginalne proporcje (pion/poziom) */
    border-radius: 24px;
    transition: transform 0.6s ease;
}

/* Efekt po najechaniu myszką na zdjęcie */
.grid-item:hover {
    box-shadow: 0 20px 40px rgba(0,0,0,0.15);
    z-index: 2;
}

.grid-item:hover img {
    transform: scale(1.03); /* Delikatnie powiększa zdjęcie wewnątrz ramki */
}

/* --- 3. BOTTOM CTA (Zielony bąbel) --- */
.cta-box {
    box-shadow: 0 20px 50px rgba(74, 222, 128, 0.2);
    position: relative;
    overflow: hidden;
}

/* --- 4. RESPANSYWNOŚĆ (Ekrany mobilne) --- */
@media (max-width: 992px) {
    .masonry-grid {
        column-count: 2; /* Na tabletach zmniejszamy do 2 kolumn */
    }
}

@media (max-width: 768px) {
    .gallery-hero h1 {
        font-size: 2.5rem !important; /* Mniejszy tytuł na telefonach */
    }
    
    .masonry-grid {
        column-count: 1; /* Na telefonach wszystko w 1 kolumnie (jedno pod drugim) */
    }
    
    .cta-box {
        padding: 40px 20px !important;
        border-radius: 30px !important;
    }
    
    .cta-buttons {
        flex-direction: column;
    }
}

/* =========================================
   LIGHTBOX (Powiększanie Zdjęć)
   ========================================= */
#gallery-lightbox {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(11, 37, 20, 0.95); /* Ciemnozielone, półprzezroczyste tło */
    z-index: 9999;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 20px;
    
    /* Ukryte na start */
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

#gallery-lightbox.active {
    opacity: 1;
    visibility: visible;
}

#gallery-lightbox img {
    max-width: 90%;
    max-height: 90vh; /* 90% wysokości ekranu */
    border-radius: 12px;
    box-shadow: 0 10px 40px rgba(0,0,0,0.5);
    border: 3px solid #4ade80; /* Twój neonowy akcent wokół powiększonego zdjęcia */
    transform: scale(0.8);
    transition: transform 0.3s ease;
}

#gallery-lightbox.active img {
    transform: scale(1);
}

/* --- 3. BOTTOM CTA (Zielony bąbel) --- */
.cta-box {
    background-color: #4ade80; /* Główny neonowy zielony */
    border-radius: 50px;
    padding: 60px 40px;
    box-shadow: 0 20px 50px rgba(74, 222, 128, 0.2);
    position: relative;
    overflow: hidden;

    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
}

.cta-box h2 {
    color: #0b2514;
    font-size: 2.5rem;
    font-weight: 800;
    margin-bottom: 15px;
    
}

.cta-box p {
    color: #0b2514;
    font-size: 1.1rem;
    max-width: 600px;
    margin: 0 auto 30px auto;
    line-height: 1.6;
}

/* Przyciski w CTA */
.cta-buttons {
    display: flex;
    justify-content: center;
    gap: 20px;
    flex-wrap: wrap;
}

.cta-buttons a {
    padding: 15px 35px;
    border-radius: 30px;
    text-decoration: none;
    font-weight: 700;
    font-size: 1rem;
    transition: all 0.3s ease;
}

.btn-dark {
    background-color: #0b2514;
    color: #fff;
    border: 2px solid #0b2514;
}

.btn-dark:hover {
    background-color: transparent;
    color: #0b2514;
}

.btn-light {
    background-color: #fff;
    color: #0b2514;
    border: 2px solid #fff;
}

.btn-light:hover {
    background-color: transparent;
    color: #0b2514;
    border-color: #0b2514;
}