/*
=================================================================
             STYLE DLA PODSTRONY Z GALERIĄ
=================================================================
*/

/* Zmiana wyglądu nagłówka na podstronie */
.sub_page .hero_area {
    min-height: auto;
    background: linear-gradient(to top right, #212a63, #0f054c);
}

.sub_page .hero_area .hero_bg_box {
    display: none;
}

/* Zmniejszenie menu TYLKO na podstronie */
.sub_page .custom_nav-container .navbar-nav .nav-item .nav-link {
    padding: 5px 12px;
    font-size: 0.85rem;
}


/* Style dla galerii z filtrowaniem */
.filterable_gallery_section {
    background-color: #f8f9fa;
    min-height: 65vh; /* ZMIANA: Nadaje sekcji minimalną wysokość */
    display: flex; /* ZMIANA: Umożliwia centrowanie zawartości */
    align-items: center; /* ZMIANA: Centruje zawartość w pionie */
}

.gallery-filters h3 {
    color: #00204a;
    font-weight: 700;
    text-transform: uppercase;
    margin-bottom: 20px;
    border-left: 4px solid #00a9d9;
    padding-left: 15px;
}

.gallery-filters ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.gallery-filters .filter-item {
    padding: 12px 20px;
    margin-bottom: 8px;
    background-color: #ffffff;
    color: #333;
    border-radius: 5px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-weight: 600;
    box-shadow: 0 2px 5px rgba(0,0,0,0.05);
}

.gallery-filters .filter-item:hover {
    background-color: #e9ecef;
}

.gallery-filters .filter-item.active {
    background-color: #00204a;
    color: #ffffff;
    box-shadow: 0 4px 10px rgba(0, 32, 74, 0.3);
}

.filterable-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
}

.filterable-grid .grid-item {
    overflow: hidden;
    border-radius: 5px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
}

.filterable-grid .grid-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.2s ease-in-out;
}

.filterable-grid .grid-item img.clickable-img:hover {
    transform: scale(1.05);
}

/* Responsywność Galerii */
@media (max-width: 991px) {
    .gallery-filters {
        margin-bottom: 40px;
    }
    .filterable-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 576px) {
    .filterable-grid {
        grid-template-columns: 1fr;
    }
}

/* Style dla Lightboxa */
.clickable-img {
    cursor: pointer;
}

.lightbox-wrapper {
    display: none;
    position: fixed;
    z-index: 1050;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 32, 74, 0.95);
    justify-content: center;
    align-items: center;
}

.lightbox-image {
    display: block;
    max-width: 90vw;
    max-height: 85vh;
    animation: lightboxZoom 0.5s;
    box-shadow: 0 10px 30px rgba(0,0,0,0.5);
}

@keyframes lightboxZoom {
    from { transform: scale(0.8); opacity: 0; }
    to { transform: scale(1); opacity: 1; }
}

.lightbox-close-btn {
    position: absolute;
    top: 15px;
    right: 35px;
    color: #fff;
    font-size: 40px;
    font-weight: bold;
    cursor: pointer;
    transition: 0.3s;
    opacity: 0.8;
}

.lightbox-close-btn:hover {
    opacity: 1;
}

.lightbox-prev,
.lightbox-next {
    cursor: pointer;
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    padding: 16px;
    color: white;
    font-weight: bold;
    font-size: 24px;
    transition: 0.3s;
    user-select: none;
    opacity: 0.6;
}

.lightbox-prev:hover,
.lightbox-next:hover {
    opacity: 1;
    background-color: rgba(0,0,0,0.2);
}

.lightbox-prev {
    left: 10px;
    border-radius: 3px 0 0 3px;
}

.lightbox-next {
    right: 10px;
    border-radius: 0 3px 3px 0;
}
/* =========================================
    Style dla Tytułów Podstron
   ========================================= */

.subpage_title_section {
    display: flex;
    align-items: center;
    justify-content: center;
    /* Ustawia padding, aby tytuł był ładnie wyśrodkowany w pionie, pod nawigacją */
    padding: 140px 0; 
    color: #ffffff;
}

.subpage_title_section h1 {
    font-size: 3.5rem;
    font-weight: bold;
    text-transform: uppercase;
}

/* Kolor dla wyróżnionego tekstu w tytule */
.subpage_title_section h1 span {
    color: #00a9d9;
}
/* =======================================================
   STYLE DLA NOWEGO WYGLĄDU GALERII (WERSJA Z KOLOREM TŁA)
   ======================================================= */

/* Ustawienie jednolitego koloru tła dla całego obszaru nagłówka */
.hero_area {
    background-color: #212a63;
}

/* Uproszczony nagłówek dla podstron, bez stałej wysokości */
.hero_area_short {
    min-height: auto;
    height: auto;
    display: block; /* Zmienione na block dla prostszego układu */
}

/* Kontener dla tytułu - dodajemy padding, aby go odsunąć od nawigacji i dolnej krawędzi */
.page-title-box {
    padding: 40px 0;
}

/* Styl dla tytułu na dużych ekranach (bez zmian) */
.page-title-box h1 {
  color: #ffffff;
  font-size: 3.5rem;
  font-weight: 700;
  text-transform: uppercase;
  margin: 0;
}

/* --- DODATKOWE REGUŁY DLA MNIEJSZYCH EKRANÓW --- */

/* Dla tabletów i mniejszych ekranów desktopowych (poniżej 992px) */
@media (max-width: 991.98px) {
  .page-title-box h1 {
    font-size: 2.8rem; /* Zmniejszamy czcionkę, aby się zmieściła */
  }
}

/* Dla telefonów komórkowych (poniżej 768px) */
@media (max-width: 767.98px) {
  .page-title-box h1 {
    font-size: 2.2rem; /* Jeszcze bardziej zmniejszamy czcionkę */
  }
}
/* Styl dla "okruszków" (breadcrumbs) */
.breadcrumb-box {
    color: #ffffff;
    opacity: 0.8;
    margin-top: 10px;
}
.breadcrumb-box a {
    color: #ffffff;
    text-decoration: none;
    transition: all 0.2s ease;
}
.breadcrumb-box a:hover {
    color: #00a9d9;
    text-decoration: underline;
}

/* Panel z opisem i filtrami w lewej kolumnie - BEZ ZMIAN */
.gallery-intro-panel {
    background-color: #f8f8f9;
    padding: 30px;
    border-radius: 5px;
}

.gallery-intro-panel .panel-title {
    color: #00204a;
    font-weight: 700;
    text-transform: uppercase;
    border-left: 4px solid #00a9d9;
    padding-left: 15px;
    margin-bottom: 20px;
}

.gallery-intro-panel .panel-description {
    color: #555;
    line-height: 1.7;
    margin-bottom: 30px;
}

/* Zmodyfikowany wygląd filtrów - BEZ ZMIAN */
.gallery-intro-panel .gallery-filters ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.gallery-intro-panel .gallery-filters .filter-item {
    padding: 10px 15px;
    margin-bottom: 5px;
    background-color: transparent;
    color: #333;
    border-radius: 5px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-weight: 600;
    border: 1px solid #e0e0e0;
}

.gallery-intro-panel .gallery-filters .filter-item:hover {
    background-color: #e9ecef;
    border-color: #ccc;
}

.gallery-intro-panel .gallery-filters .filter-item.active {
    background-color: #00204a;
    color: #ffffff;
    border-color: #00204a;
    box-shadow: none;
}