/* ==========================================================================
   1. ZMIENNE I KONFIGURACJA (:ROOT)
   ========================================================================== */
:root {
    --color-primary: #009fe3; 
    --color-secondary: #86bc25;
    --color-dark: #003057;
    --color-light-bg: #eef7fc;

    --font-main: 'Work Sans', sans-serif;
    --max-width-custom: 1440px;

    /* Zmienne dla overlay slidera */
    --overlay-r: 0;
    --overlay-g: 159;
    --overlay-b: 227;
    --hero-overlay-fade: 80%;
    --hero-overlay-opacity: 0.85;
}

/* ==========================================================================
   2. STYLE BAZOWE I RESET
   ========================================================================== */
body {
    font-family: var(--font-main);
    color: var(--color-dark);
    overflow-x: hidden;
    background-color: #fff;
    transition: background-color 0.3s, color 0.3s, font-size 0.3s, filter 0.3s;
}

a { text-decoration: none; color: inherit; transition: color 0.3s; }
a:hover { color: var(--color-primary); }

/* --- FOCUS INDICATOR (WCAG 2.2 SC 2.4.13) --- */
:focus-visible {
    outline: 3px solid #ffc107;
    outline-offset: 2px;
    box-shadow: 0 0 0 5px #000000;
    z-index: 9999;
    border-radius: 2px;
}

/* --- RESET DLA TINYMCE (Usunięcie outline przy edycji) --- */
.mce-content-body:focus-visible {
    outline: none !important;
    box-shadow: none !important;
    z-index: auto;
}

/* ==========================================================================
   3. GLOBALNE NARZĘDZIA (UTILITIES) I KOMPONENTY UI
   ========================================================================== */
.container-custom {
    max-width: var(--max-width-custom);
    margin-left: auto;
    margin-right: auto;
    padding-left: 0.75rem;
    padding-right: 0.75rem;
    width: 100%;
}

.section-title {
    text-align: center;
    font-weight: 700;
    margin-bottom: 2.5rem;
    font-size: 2em; /* em dla skalowania */
    color: var(--color-dark);
}

.see-more-link {
    display: block;
    text-align: center;
    margin-top: 2rem;
    font-weight: 600;
    color: var(--color-primary, #000);
    transition: color 0.3s;
    text-decoration: underline;
}

.see-more-link:hover {
    color: var(--color-dark);
}

/* Nadpisanie Bootstrapa - Primary Color */
.text-primary {
    color: var(--color-primary) !important;
}

.btn-primary {
    background-color: var(--color-primary) !important;
    border-color: var(--color-primary) !important;
}

.btn-primary:hover, .btn-primary:focus {
    background-color: #0081b8 !important; /* Ciemniejszy odcień */
    border-color: #0081b8 !important;
}

.btn-primary:focus {
    box-shadow: 0 0 0 0.25rem rgba(0, 159, 227, 0.5) !important;
}

/* Paginacja (Globalna) */
.pagination { margin-top: 40px; }
.page-link { color: var(--color-primary); border: none; margin: 0 5px; border-radius: 5px; font-weight: 600; padding: 10px 15px; }
.page-link:hover { background-color: #eef7fc; color: var(--color-primary); }
.page-item.active .page-link { background-color: var(--color-primary); color: white; }
.page-item.disabled .page-link { color: #6c757d; background: transparent; }

/* ==========================================================================
   4. NAGŁÓWEK STRONY (HEADER & NAVBAR)
   ========================================================================== */

/* --- TOP BAR --- */
.top-bar {
    background-color: var(--color-primary);
    color: white;
    padding: 8px 0;
    font-size: 0.9em; 
}
.top-bar a:hover {
    color: #ffffff;
    opacity: 0.8;
    text-decoration: underline;
}
.top-icons-wrapper {
    display: flex;
    align-items: center;
    gap: 15px;
}
.icon-uniform {
    width: 20px;
    height: 20px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 1.1em;
    color: white;
    object-fit: contain;
    vertical-align: middle;
}
a.icon-uniform:hover { 
    color: white; 
    opacity: 0.8; 
    text-decoration: none;
}

/* --- NAVBAR --- */
.navbar {
    background: #dcf2fd; 
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
    padding: 10px 0;
    z-index: 100;
    transition: all 0.4s ease;
}

.navbar.is-sticky {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    padding: 5px 0;
    box-shadow: 0 5px 20px rgba(0,0,0,0.1);
    animation: slideDown 0.3s ease; 
}

@keyframes slideDown {
    from { transform: translateY(-100%); }
    to { transform: translateY(0); }
}

.navbar-brand img { 
    max-height: 80px; 
    transition: max-height 0.4s ease;
}
.navbar.is-sticky .navbar-brand img {
    max-height: 50px;
}

.nav-link {
    font-weight: 600;
    color: var(--color-dark) !important;
    padding: 10px 15px !important;
    text-transform: uppercase;
    font-size: 0.95em; 
}
.nav-link:hover, .nav-link.active { color: var(--color-primary) !important; }

/* --- HAMBURGER (TOGGLER) --- */
.navbar-toggler {
    border: 1px solid transparent;
    padding: 0.5rem 0.75rem;
    transition: all 0.3s ease;
}
.navbar-toggler i {
    font-size: 1.75rem;
    color: var(--mosir-dark, #003057); 
    transition: color 0.3s ease;
}
.navbar-toggler:hover, .navbar-toggler:focus {
    box-shadow: none;
    border-color: var(--mosir-primary, #009fe3);
}
.navbar-toggler:hover i, .navbar-toggler:focus i {
    color: var(--mosir-primary, #009fe3);
}

/* --- OFFCANVAS & DROPDOWN (RESPONSYWNOŚĆ) --- */
.offcanvas {
    z-index: 11000 !important;
}

/* --- DLA DESKTOPU (>= 992px) --- */
@media (min-width: 992px) {
    .offcanvas {
        position: static !important;
        z-index: auto !important;
        background: transparent;
        width: auto;
        height: auto;
        visibility: visible !important;
        transform: none !important;
        display: flex;
        flex-direction: row;
        align-items: center;
        box-shadow: none !important;
        border: none;
        flex-grow: 0 !important;
        margin-left: auto;
    }
    .offcanvas-header { display: none; }
    .offcanvas-body { 
        padding: 0; 
        overflow: visible; 
        display: flex;
        align-items: center;
    }
    .navbar-nav { flex-direction: row; }

    .dropdown-menu {
        margin-top: 0;
        box-shadow: 0 5px 15px rgba(0,0,0,0.1);
        border: none;
        border-radius: 0 0 5px 5px;
    }
    /* Zagnieżdżone menu - wysuwanie w bok */
    .dropdown-menu .dropdown-submenu { position: relative; }
    .dropdown-menu .dropdown-submenu > .dropdown-menu {
        top: 0; left: 100%; margin-top: -5px; display: none; border-radius: 5px;
        position: absolute;
    }
    .navbar-nav .dropdown:hover > .dropdown-menu { display: block; animation: fadeIn 0.2s; }
    .dropdown-menu .dropdown-submenu:hover > .dropdown-menu { display: block; animation: fadeIn 0.2s; }

    .dropdown-item.dropdown-toggle::after { 
        position: absolute; 
        right: 6px; 
        top: 50%; 
        transform: translateY(-50%) rotate(-90deg); 
    }
    .dropdown-item.dropdown-toggle{ padding-right:1.2rem; } 
}

/* --- DLA MOBILA (< 992px) --- */
@media (max-width: 991.98px) {
    .dropdown-menu .dropdown-submenu .dropdown-menu {
        position: static !important;
        float: none;
        width: auto;
        margin-top: 0;
        background-color: transparent;
        border: 0;
        box-shadow: none;
        padding-left: 20px;
        display: none;
    }
    .dropdown-menu .dropdown-submenu .dropdown-menu.show { display: block; }
    .dropdown-item.dropdown-toggle::after { transform: rotate(0deg); margin-left: 10px; }
    .dropdown-item.dropdown-toggle.show::after { transform: rotate(180deg); }

    /* Poprawka zawijania tekstu w menu mobilnym */
    .offcanvas-body .nav-link,
    .offcanvas-body .dropdown-item {
        white-space: normal !important;
        word-wrap: break-word;
        overflow-wrap: break-word;
        max-width: 100%;
        line-height: 1.4;
    }
}
@keyframes fadeIn { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: translateY(0); } }

/* --- BREADCRUMBS --- */
.breadcrumb-section {
    background-color: #f8f9fa;
    padding: 15px 0;
    border-bottom: 1px solid #e9ecef;
    margin-bottom: 40px;
}
.breadcrumb { margin-bottom: 0; font-size: 0.9em; }
.breadcrumb-item a { color: var(--color-primary); text-decoration: none; font-weight: 500; }
.breadcrumb-item a:hover { text-decoration: underline; }
.breadcrumb-item.active { color: #6c757d; }
.breadcrumb-item + .breadcrumb-item::before { 
    content: "\f054"; 
    font-family: "Font Awesome 6 Free"; 
    font-weight: 900; 
    font-size: 0.7em; 
    vertical-align: middle; 
    padding-top: 0.35em;
}

@media (max-width: 768px) {
    .breadcrumb-section { padding: 10px 0; margin-bottom: 20px; }
    .breadcrumb {
        display: flex;
        flex-wrap: nowrap;
        overflow-x: auto;
        white-space: nowrap;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: none;
        padding-bottom: 5px;
    }
    .breadcrumb-item { flex-shrink: 0; }
    .breadcrumb::-webkit-scrollbar { display: none; }
}

/* ==========================================================================
   5. HERO SLIDER
   ========================================================================== */
.hero-slider {
    width: 100%;
    height: 600px;
    position: relative;
}
.swiper-slide {
    background-size: cover;
    background-position: center;
    display: flex;
    align-items: center;
    justify-content: flex-end;
    position: relative;
}

/* Overlay & Warianty */
.hero-overlay {
    z-index: 1;
    position: absolute;
    top: 0; left: 0; width: 100%; height: 100%;
    background: linear-gradient(90deg, 
        rgba(0, 0, 0, 0) 0%, 
        rgba(0, 0, 0, 0) calc(var(--hero-overlay-fade) - 30%), 
        rgba(var(--overlay-r), var(--overlay-g), var(--overlay-b), var(--hero-overlay-opacity)) var(--hero-overlay-fade)
        );
    pointer-events: none;
}
.hero-overlay.overlay-blue { --overlay-r: 0; --overlay-g: 159; --overlay-b: 227; }
.hero-overlay.overlay-green { --overlay-r: 134; --overlay-g: 188; --overlay-b: 37; }
.hero-overlay.overlay-orange { --overlay-r: 255; --overlay-g: 161; --overlay-b: 1; }
.hero-overlay.overlay-red { --overlay-r: 220; --overlay-g: 53; --overlay-b: 69; }

/* Treść Slajdu */
.slide-content {
    position: relative;
    z-index: 2;
    color: white;
    text-align: right;
    max-width: 600px;
    margin-right: 2%;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.3);
    margin-left: auto;
}
.slide-title { font-size: 3.5em; font-weight: 700; margin-bottom: 0.5rem; line-height: 1.1; }
.slide-subtitle { font-size: 1.5em; }

/* Przycisk Pauza/Start */
.slider-play-btn {
    position: absolute;
    bottom: 30px; 
    right: 20px;  
    z-index: 10;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background-color: rgba(255, 255, 255, 0.8);
    border: 2px solid var(--color-primary);
    color: var(--color-primary);
    font-size: 1rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}
.slider-play-btn:hover, .slider-play-btn:focus-visible {
    background-color: var(--color-primary);
    color: white;
    transform: scale(1.1);
}

/* Pagination Dots */
.swiper-pagination-bullet {
    width: 12px !important; height: 12px !important;
    background: #fff !important; opacity: 0.5 !important;
    margin: 0 8px !important; transition: all 0.3s ease;
    position: relative; vertical-align: middle;
}
.swiper-pagination-bullet::after {
    content: ''; position: absolute;
    top: -6px; left: -6px; right: -6px; bottom: -6px;
    background: transparent;
}
.swiper-pagination-bullet-active {
    opacity: 1 !important; background: #fff !important;
    transform: scale(1.4); box-shadow: 0 0 10px rgba(0,0,0,0.3);
}
.swiper-pagination-bullet:focus-visible {
    opacity: 1 !important; outline: 3px solid #ffc107 !important; outline-offset: 4px;
}

@media (max-width: 768px) {
    .hero-slider { height: 400px; }
    .hero-overlay {
        background: linear-gradient(0deg, 
            rgba(var(--overlay-r), var(--overlay-g), var(--overlay-b), 0.9) 0%, 
            transparent 100%);
    }
    .slide-content { margin-left: 0; margin-right: 0; text-align: center; width: 100%; padding: 20px; bottom: 0; }
    .slide-title { font-size: 2em; }
}

/* ==========================================================================
   6. MODUŁY TREŚCI (SEKCJE STRONY GŁÓWNEJ I LISTY)
   ========================================================================== */

/* --- SKRÓTY (SHORTCUTS) --- */
.shortcuts-section { padding: 40px 0; }
.shortcut-btn {
    background-color: #e3f2fd; 
    color: var(--color-dark);
    border-radius: 50px;
    padding: 15px 20px;
    text-align: center;
    font-weight: 600;
    transition: 0.3s;
    display: flex; align-items: center; justify-content: center; height: 100%;
    box-shadow: 0 2px 5px rgba(0,0,0,0.05);
}
.shortcut-btn:nth-child(even) { background-color: #fff3e0; }
.shortcut-btn:hover { background-color: var(--color-primary); color: white; transform: translateY(-3px); }

/* --- AKTUALNOŚCI (NEWS) --- */
.news-section { padding: 60px 0; }
/* Stara karta (legacy) */
.news-card { border: none; box-shadow: 0 5px 15px rgba(0,0,0,0.05); transition: 0.3s; background: white; height: 100%; display: flex; flex-direction: column;}
.news-card:hover { transform: translateY(-5px); }
.news-img { height: 200px; object-fit: cover; width: 100%; }
.news-body { padding: 20px; flex-grow: 1; display: flex; flex-direction: column; }
.news-date { color: var(--color-primary); font-size: 0.85em; font-weight: 600; margin-bottom: 10px; }
.news-title { font-size: 1.1em; font-weight: 700; margin-bottom: 10px; }
.news-excerpt { font-size: 0.9em; color: #666; margin-bottom: 0; }

/* 1. Układ Standardowy (Zdjęcie po lewej) */
.news-list-standard { display: flex; flex-direction: column; gap: 30px; }
.news-item-standard {
    display: flex; flex-direction: column;
    background: #fff; border-radius: 8px; overflow: hidden;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    border: 1px solid #e9ecef; position: relative;
}
@media (min-width: 768px) {
    .news-item-standard { flex-direction: row; min-height: 220px; }
}
.news-item-standard:hover {
    transform: translateY(-3px); box-shadow: 0 8px 20px rgba(0,0,0,0.1);
    border-color: var(--color-primary);
}
.news-std-img-link {
    display: block; overflow: hidden; flex-shrink: 0; position: relative;
}
.news-std-img {
    width: 100%; height: 100%; object-fit: cover; object-position: center;
    display: block; transition: transform 0.5s ease;
}
@media (max-width: 767.98px) {
    .news-std-img-link { width: 100%; height: 200px; }
}
@media (min-width: 768px) {
    .news-std-img-link { width: 35%; height: auto; min-height: 100%; }
    .news-std-img { position: absolute; top: 0; left: 0; }
}
.news-item-standard:hover .news-std-img { transform: scale(1.05); }
.news-std-content { padding: 25px; display: flex; flex-direction: column; justify-content: center; flex-grow: 1; }
.news-std-date { font-size: 0.85em; color: #6c757d; font-weight: 600; margin-bottom: 10px; display: flex; align-items: center; gap: 8px; }
.news-std-date i { color: var(--color-primary); }
.news-std-title { font-size: 1.25em; font-weight: 700; margin-bottom: 12px; line-height: 1.3; }
.news-std-title a { color: var(--color-dark); text-decoration: none; transition: color 0.3s; }
.news-std-title a:hover { color: var(--color-primary); text-decoration: underline; }
.news-std-excerpt { font-size: 0.95em; color: #495057; margin-bottom: 0; line-height: 1.6; }

/* 2. Układ Prosty (Bez zdjęcia) */
.news-list-simple { display: flex; flex-direction: column; border-top: 1px solid #e9ecef; }
.news-item-simple {
    display: grid; grid-template-columns: 100px 1fr; gap: 20px;
    padding: 20px 0; border-bottom: 1px solid #e9ecef; align-items: center;
    transition: background-color 0.3s ease, padding 0.3s ease;
}
@media (max-width: 576px) { .news-item-simple { grid-template-columns: 1fr; gap: 5px; } }
.news-item-simple:hover { background-color: #f8f9fa; padding-left: 10px; padding-right: 10px; border-radius: 4px; }

.news-simple-date {
    font-weight: 700; color: var(--color-primary); font-size: 0.95em; text-align: center;
    background: var(--color-light-bg); padding: 8px; border-radius: 4px; line-height: 1.2;
    display: flex; flex-direction: column;
}
.news-simple-date .day { font-size: 1.4em; display: block; }
.news-simple-date .year { font-size: 0.8em; font-weight: 400; color: #6c757d; }
@media (max-width: 576px) {
    .news-simple-date { flex-direction: row; align-items: center; gap: 5px; background: transparent; padding: 0; text-align: left; }
    .news-simple-date .day { font-size: 1em; }
}
.news-simple-title { margin: 0; font-size: 1.1em; font-weight: 600; line-height: 1.4; }
.news-simple-title a { color: var(--color-dark); display: block; }
.news-simple-title a:hover { color: var(--color-primary); text-decoration: underline; }
.news-simple-arrow { margin-left: auto; color: #adb5bd; opacity: 0; transition: opacity 0.3s, transform 0.3s; }
.news-item-simple:hover .news-simple-arrow { opacity: 1; transform: translateX(5px); color: var(--color-primary); }

/* --- KALENDARZ IMPREZ (HOME & FULL VIEW) --- */

/* Kafelki na głównej (Home) */
.events-section { background-color: var(--color-light-bg); padding: 80px 0; }
.event-item {
    text-align: center; padding: 20px;
    height: 100%; border-radius: 8px; border: 1px solid transparent;
    transition: transform 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94), box-shadow 0.3s ease, border-color 0.3s ease;
}
.event-item:hover {
    transform: scale(1.05); box-shadow: 0 15px 30px rgba(0,0,0,0.1);
    border-color: var(--color-primary); z-index: 2; position: relative;
}
.event-date { font-size: 3em; font-weight: 800; color: var(--color-primary); margin-bottom: 0; line-height: 1; }
.event-desc { margin-top: 15px; font-size: 0.95em; line-height: 1.4; color: #333; }

/* Kolorowanie cykliczne */
.events-section .row > div:nth-child(3n+1) .event-date { color: #0197d4; }
.events-section .row > div:nth-child(3n+1) .event-item:hover { border-color: #0197d4; }
.events-section .row > div:nth-child(3n+2) .event-date { color: #7ab01e; }
.events-section .row > div:nth-child(3n+2) .event-item:hover { border-color: #7ab01e; }
.events-section .row > div:nth-child(3n+3) .event-date { color: #ffa101; }
.events-section .row > div:nth-child(3n+3) .event-item:hover { border-color: #ffa101; }

/* Pełny Widok (Lista harmonogramu) */
.calendar-wrapper { position: relative; max-width: 1000px; margin: 0 auto; }
.calendar-month-header {
    background-color: var(--color-light-bg); color: var(--color-dark);
    padding: 15px 20px; font-weight: 700; font-size: 1.2em;
    border-left: 5px solid var(--color-primary);
    margin-top: 40px; margin-bottom: 20px; border-radius: 0 5px 5px 0;
    text-transform: uppercase; letter-spacing: 0.05em;
    position: sticky; top: 80px; z-index: 10;
}
.calendar-row {
    display: flex; background: #fff; border-bottom: 1px solid #e9ecef;
    padding: 20px 15px; transition: background-color 0.2s; align-items: center;
}
.calendar-row:hover { background-color: #fcfcfc; }
.calendar-month-group .calendar-row:last-child { border-bottom: none; }
.calendar-date-col {
    flex-shrink: 0; width: 80px; text-align: center; margin-right: 25px;
    display: flex; flex-direction: column; justify-content: center;
    border-right: 1px solid #e9ecef; padding-right: 15px;
}
.calendar-day { font-size: 1.8em; font-weight: 700; color: var(--color-primary); line-height: 1; }
.calendar-month-short { font-size: 0.85em; text-transform: uppercase; font-weight: 600; color: #6c757d; }
.calendar-info-col { flex-grow: 1; display: flex; flex-direction: column; gap: 8px; }
.calendar-title { font-size: 1.15em; font-weight: 600; color: var(--color-dark); margin: 0; }
.calendar-meta-wrapper { display: flex; flex-wrap: wrap; gap: 20px; font-size: 0.9em; color: #555; margin-top: 4px; }
.calendar-meta-item { display: flex; align-items: center; gap: 6px; }
.calendar-meta-item i { color: var(--color-primary); font-size: 0.9em; width: 16px; text-align: center; }
.calendar-meta-item a { text-decoration: none; color: inherit; border-bottom: 1px dotted #ccc; }
.calendar-meta-item a:hover { color: var(--color-primary); border-bottom-color: var(--color-primary); }

@media (max-width: 768px) {
    .calendar-row { align-items: flex-start; }
    .calendar-meta-wrapper { flex-direction: column; gap: 8px; }
}
@media (max-width: 576px) {
    .calendar-row { padding: 15px 10px; }
    .calendar-date-col { width: 60px; margin-right: 15px; padding-right: 10px; }
    .calendar-day { font-size: 1.5em; }
    .calendar-title { font-size: 1.05em; }
}

/* --- OBIEKTY (FACILITIES) --- */
.facilities-section { padding: 80px 0; }
.facility-card {
    display: block; position: relative; height: 300px;
    border-radius: 8px; overflow: hidden;
    text-decoration: none !important;
    background-color: var(--mosir-dark);
    box-shadow: 0 5px 15px rgba(0, 48, 87, 0.08);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    border: 1px solid rgba(0,0,0,0.05);
    margin-bottom: 20px;
}
.facility-card:hover {
    transform: translateY(-5px); box-shadow: 0 15px 30px rgba(0, 48, 87, 0.15);
    border-color: var(--mosir-primary);
}
.facility-bg {
    position: absolute; top: 0; left: 0; width: 100%; height: 100%;
    background-size: cover; background-position: center; transition: transform 0.6s ease;
}
.facility-card:hover .facility-bg { transform: scale(1.08); }

.facility-placeholder {
    background: linear-gradient(135deg, var(--mosir-light-bg) 0%, #dbebf6 100%);
    display: flex; align-items: center; justify-content: center;
    color: var(--mosir-primary); font-size: 4rem; transition: all 0.4s ease;
}
.facility-card:hover .facility-placeholder {
    background: linear-gradient(135deg, var(--mosir-primary) 0%, var(--mosir-dark) 100%);
    color: #fff;
}
.facility-overlay {
    position: absolute; bottom: 0; left: 0; width: 100%;
    padding: 20px 25px;
    background: linear-gradient(to top, rgba(0, 48, 87, 0.95) 0%, rgba(0, 48, 87, 0.5) 50%, rgba(0, 48, 87, 0) 100%);
    z-index: 2; display: flex; flex-direction: column; justify-content: flex-end; min-height: 30%;
}
.facility-title {
    color: #fff; font-size: 1.35rem; font-weight: 700; margin: 0; line-height: 1.3;
    text-shadow: 0 2px 4px rgba(0,0,0,0.3); position: relative; padding-bottom: 10px;
}
.facility-title::after {
    content: ''; position: absolute; bottom: 0; left: 0;
    width: 40px; height: 3px; background-color: var(--mosir-secondary);
    transition: width 0.3s ease;
}
.facility-card:hover .facility-title::after { width: 70px; }

/* --- GALERIA ZDJĘĆ --- */
.gallery-section { margin-top: 3rem; margin-bottom: 3rem; }
.gallery-grid {
    display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 15px;
}
.gallery-item {
    display: block; overflow: hidden; border-radius: 8px; position: relative;
    aspect-ratio: 4/3; transition: transform 0.3s;
}
.gallery-item:focus-visible {
    outline: 4px solid #ffc107; outline-offset: 2px; z-index: 5;
}
.gallery-item:hover { transform: scale(1.02); box-shadow: 0 5px 15px rgba(0,0,0,0.1); }
.gallery-item img { width: 100%; height: 100%; object-fit: cover; display: block; }

.gallery-icon {
    position: absolute; top: 0; left: 0; width: 100%; height: 100%;
    background: rgba(0, 159, 227, 0.6); display: flex; align-items: center; justify-content: center;
    opacity: 0; transition: opacity 0.3s ease;
}
.gallery-icon i { color: white; font-size: 2rem; }
.gallery-item:hover .gallery-icon, .gallery-item:focus .gallery-icon { opacity: 1; }


/* ==========================================================================
   7. SZCZEGÓŁY ARTYKUŁU I PODSTRONY
   ========================================================================== */
.article-header { text-align: center; margin-bottom: 3rem; }
.article-cover-img {
    width: 100%; aspect-ratio: 4/3; object-fit: cover; object-position: center; max-height: 600px;
}
@media (min-width: 992px) { .article-cover-img { aspect-ratio: 16/9; } }
.article-meta { color: #666; font-size: 0.9em; margin-bottom: 0.5rem; font-weight: 500; }
.article-content { max-width: 800px; margin: 0 auto; font-size: 1.05em; line-height: 1.8; }
.article-content-100 { max-width: 100%; margin: 0 auto; font-size: 1.05em; line-height: 1.8; }
.article-lead { font-weight: 500; font-size: 1.2em; margin-bottom: 2rem; color: var(--color-dark); }
.article-content h2 { margin-top: 2rem; margin-bottom: 1rem; color: var(--color-dark); font-weight: 700; }
.article-content ul { margin-bottom: 1.5rem; padding-left: 1.5rem; }
.article-content p { margin-bottom: 1.5rem; }
.article-content .cms-editor-content img {max-width:100%; height:auto !important;}

/* Załączniki */
.attachments-section { margin-top: 3rem; margin-bottom: 3rem; padding: 20px; background-color: #f8f9fa; border-radius: 10px; }
.attachments-list { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 15px; }
.attachment-box {
    display: flex; align-items: center; background: white; padding: 15px;
    border-radius: 8px; border: 1px solid #e9ecef; text-decoration: none; transition: 0.3s;
}
.attachment-box:hover { border-color: var(--color-primary); transform: translateX(5px); color: var(--color-primary); }
.attachment-icon { font-size: 2rem; margin-right: 15px; color: var(--color-primary); }
.attachment-info { display: flex; flex-direction: column; }
.attachment-name { font-weight: 600; font-size: 1.05em; }
.attachment-meta { font-size: 0.85em; color: #666; margin-top: 2px; }

/* Nawigacja Artykułu */
.article-navigation {
    margin-top: 4rem; padding-top: 2rem; border-top: 1px solid #e9ecef;
    display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 15px;
}
.nav-btn-group { display: flex; gap: 10px; flex-wrap: wrap; }
.btn-nav-article {
    display: inline-flex; align-items: center; padding: 10px 20px;
    border-radius: 50px; font-weight: 600; font-size: 0.9em; transition: 0.3s; text-decoration: none;
}
.btn-nav-primary { background-color: var(--color-primary); color: white; border: 1px solid var(--color-primary); }
.btn-nav-primary:hover { background-color: #0081b8; color: white; }
.btn-nav-outline { background-color: transparent; border: 1px solid #ced4da; color: var(--color-dark); }
.btn-nav-outline:hover { border-color: var(--color-dark); background-color: #f8f9fa; color: var(--color-dark); }

.related-articles-section { background-color: var(--color-light-bg); padding: 60px 0; margin-top: 60px; }

/* --- SIDEBAR MENU (LAYOUT BOCZNY) --- */
.sidebar-layout .article-content{ max-width:100% !important; }
@media (min-width: 768px) { .sidebar-layout main .col-md-4 { flex: 0 0 auto; width: 50% !important; } }
@media (min-width: 992px) { .sidebar-layout main .col-lg-3 { flex: 0 0 auto; width: 33.33333333% !important; } }
.subpage-container { padding-top: 3rem; padding-bottom: 5rem; }

.side-menu-card { background: transparent; border: none; box-shadow: none; position: sticky; top: 100px; }
.side-menu-header { font-size: 1em; text-transform: uppercase; letter-spacing: 1px; color: #6c757d; font-weight: 700; margin-bottom: 1rem; padding-left: 5px; }
.side-menu-list { list-style: none; padding: 0; margin: 0; }
.side-menu-item { margin-bottom: 10px; }

.side-menu-link {
    display: flex; justify-content: space-between; align-items: center;
    background-color: var(--color-dark); color: #fff;
    text-decoration: none; font-weight: 600; font-size: 1em; line-height: 1.2;
    min-height: 60px; padding-left: 20px; padding-right: 0;
    border-radius: 4px; overflow: hidden; transition: all 0.3s ease; border-left: 5px solid transparent;
}
.side-menu-link::after {
    content: '\f061'; font-family: "Font Awesome 6 Free"; font-weight: 900;
    display: flex; align-items: center; justify-content: center;
    width: 60px; height: 60px; background-color: var(--color-primary); color: #fff;
    flex-shrink: 0; margin-left: 15px; transition: background-color 0.3s ease, transform 0.3s ease;
}
.side-menu-link:hover { background-color: #004070; color: #fff; padding-left: 25px; }
.side-menu-link:hover::after { background-color: var(--color-secondary); }
.side-menu-link.active { background-color: var(--color-primary); border-left-color: var(--color-secondary); }
.side-menu-link.active::after { background-color: var(--color-secondary); content: '\f058'; }

.content-header { margin-bottom: 2rem; padding-bottom: 1rem; border-bottom: 2px solid #f1f3f5; }
.content-title { font-weight: 700; color: var(--color-dark); margin-bottom: 0.5rem; }
.content-body { line-height: 1.8; color: #495057; font-size: 1.05rem; }

/* --- KONTAKT --- */
.contact-card {
    background: #fff; padding: 30px; border-radius: 12px;
    box-shadow: 0 5px 20px rgba(0,0,0,0.05); border: 1px solid #eef2f5;
    transition: transform 0.3s ease;
}
.contact-card:hover { transform: translateY(-2px); box-shadow: 0 10px 25px rgba(0,0,0,0.08); }
.contact-item { display: flex; align-items: flex-start; margin-bottom: 25px; }
.contact-item:last-child { margin-bottom: 0; }
.contact-icon-box {
    width: 45px; height: 45px; background-color: var(--color-light-bg); border-radius: 10px;
    display: flex; align-items: center; justify-content: center; margin-right: 20px;
    flex-shrink: 0; color: var(--color-primary); font-size: 1.2rem; transition: 0.3s;
}
.contact-item:hover .contact-icon-box { background-color: var(--color-primary); color: white; }
.contact-details { flex-grow: 1; }
.contact-link { text-decoration: none; transition: color 0.3s; }
.contact-link:hover { color: var(--color-secondary) !important; text-decoration: underline; }
.btn-facebook { background-color: #1877F2; color: white; border: 1px solid #1877F2; font-weight: 600; }
.btn-facebook:hover { background-color: #155db5; color: white; transform: translateY(-2px); box-shadow: 0 4px 10px rgba(24, 119, 242, 0.3); }
#ibanNumber { cursor: text; letter-spacing: 0.5px; color: var(--color-dark); }
.map-container iframe { transition: filter 0.3s; }
.map-container:hover iframe { filter: saturate(1.1); }

/* --- BŁĄD 404 --- */
.error-section { padding: 80px 0; text-align: center; }
.error-code {
    font-size: 8rem; font-weight: 800; color: var(--color-primary);
    line-height: 1; margin-bottom: 20px; text-shadow: 4px 4px 0 rgba(0,0,0,0.05);
}
.error-heading { font-size: 2rem; font-weight: 700; margin-bottom: 20px; color: var(--color-dark); }
.error-text { font-size: 1.1em; color: #6c757d; max-width: 600px; margin: 0 auto 40px; }

/* ==========================================================================
   8. STOPKA (FOOTER)
   ========================================================================== */
footer { 
    background-color: #eef4f8; 
    padding: 60px 0 20px; 
    font-size: 0.9em; 
    color: #495057; 
}
.footer-logo { max-width: 150px; margin-bottom: 20px; }
.footer-heading { font-weight: 700; margin-bottom: 15px; color: var(--color-dark); text-transform: uppercase; font-size: 1em;}
.footer-links ul { list-style: none; padding: 0; }
.footer-links li { margin-bottom: 10px; }
.footer-partners { display: flex; flex-wrap: wrap; gap: 15px; align-items: center; }
.footer-partners img { max-width: 100%; height: auto; }
.copyright { margin-top: 40px; border-top: 1px solid #d1d9e0; padding-top: 20px; text-align: center; color: #6c757d; }

/* ==========================================================================
   9. DOSTĘPNOŚĆ (ACCESSIBILITY WIDGET & TOOLS)
   ========================================================================== */
#accessibility-widget {
    position: fixed; top: 20%; right: -300px; width: 300px;
    background: white; box-shadow: -2px 0 10px rgba(0,0,0,0.1);
    z-index: 9999; transition: right 0.4s ease-in-out;
    border-radius: 10px 0 0 10px; border: 2px solid var(--color-dark); border-right: none;
}
#accessibility-widget.active { right: 0; }
.tooltip { z-index: 10000 !important; }
.acc-toggle-btn {
    position: absolute; left: -50px; top: 0; width: 50px; height: 50px;
    background: var(--color-dark); color: white; border: none;
    border-radius: 10px 0 0 10px; font-size: 1.5rem; cursor: pointer;
    display: flex; align-items: center; justify-content: center;
}
.acc-toggle-btn:focus { outline: 3px solid #ffc107; }
.acc-content { padding: 20px; }
.acc-header { font-weight: 700; margin-bottom: 15px; border-bottom: 1px solid #ddd; padding-bottom: 10px; display: flex; justify-content: space-between; align-items: center;}
.acc-tools button { width: 42px; height: 42px; display: flex; align-items: center; justify-content: center; font-weight: bold; }

/* Klasy pomocnicze widgetu */
body.font-smaller { font-size: 0.85rem; }
body.font-big { font-size: 1.2rem; }
body.font-bigger { font-size: 1.4rem; }
body.spacing-p-wide p { margin-bottom: 2em !important; }
body.spacing-ln-wide { line-height: 2 !important; }
body.spacing-w-wide { word-spacing: 0.16em !important; }
body.spacing-l-wide { letter-spacing: 0.12em !important; }

/* ==========================================================================
   10. TRYBY KONTRASTU I MOTYWY (WCAG)
   ========================================================================== */

/* --- GLOBALNY KONTRAST (body.contrast_ver) --- */
body.contrast_ver { background-color: #000 !important; color: #ffc107 !important; }
body.contrast_ver a { color: #ffff00 !important; text-decoration: underline; }

/* Reset kolorów dla kontenerów */
body.contrast_ver .top-bar, 
body.contrast_ver .navbar, 
body.contrast_ver footer,
body.contrast_ver .news-card,
body.contrast_ver #accessibility-widget,
body.contrast_ver .btn-outline-dark,
body.contrast_ver .event-item,
body.contrast_ver .events-section,
body.contrast_ver .shortcut-btn,
body.contrast_ver .breadcrumb-section,
body.contrast_ver .page-link,
body.contrast_ver .attachment-box,
body.contrast_ver .nav-btn-group .btn {
    background-color: #000 !important;
    color: #ffc107 !important;
    border-color: #ffc107 !important;
    box-shadow: none !important;
}

/* Wymuszenie żółtego tekstu */
body.contrast_ver .section-title,
body.contrast_ver .news-excerpt,
body.contrast_ver .footer-heading,
body.contrast_ver .slide-title, 
body.contrast_ver .slide-subtitle,
body.contrast_ver .news-title a,
body.contrast_ver .breadcrumb-item,
body.contrast_ver .breadcrumb-item.active,
body.contrast_ver .article-content h2,
body.contrast_ver .article-content h3,
body.contrast_ver .article-meta,
body.contrast_ver .attachment-info span,
body.contrast_ver .event-desc {
    color: #ffc107 !important;
}

/* --- Elementy Specyficzne w Kontraście --- */

/* Navbar & Toggler */
body.contrast_ver .navbar-toggler { border: 2px solid #ffc107 !important; background-color: #000 !important; }
body.contrast_ver .navbar-toggler i { color: #ffc107 !important; }
body.contrast_ver .navbar-toggler:hover, body.contrast_ver .navbar-toggler:focus { background-color: #ffc107 !important; }
body.contrast_ver .navbar-toggler:hover i, body.contrast_ver .navbar-toggler:focus i { color: #000 !important; }
body.contrast_ver .offcanvas { background-color: #000; color: #ffc107; }
body.contrast_ver .offcanvas .btn-close { filter: invert(1) grayscale(100%) brightness(200%); opacity: 1; }

/* Dropdown Menu */
body.contrast_ver .dropdown-menu { background-color: #000 !important; border: 2px solid #ffc107 !important; }
body.contrast_ver .dropdown-item { color: #ffc107 !important; }
body.contrast_ver .dropdown-item:hover, body.contrast_ver .dropdown-item:focus { background-color: #333 !important; color: #fff !important; }

/* Breadcrumbs */
body.contrast_ver .breadcrumb-item + .breadcrumb-item::before { color:#fff;}

/* Slider */
body.contrast_ver .swiper-pagination-bullet { background: #000 !important; border: 1px solid #ffc107 !important; opacity: 1 !important; }
body.contrast_ver .swiper-pagination-bullet-active { background: #ffc107 !important; }
body.contrast_ver .slider-play-btn { background-color: #000; border-color: #ffc107; color: #ffc107; }
body.contrast_ver img { filter: grayscale(100%) contrast(120%); opacity: 0.8; }
body.contrast_ver .hero-overlay { background: linear-gradient(90deg, rgba(0,0,0,1) 0%, rgba(0,0,0,0.7) 100%); }

/* Listy Aktualności */
body.contrast_ver .news-item-standard { background: #000; border: 1px solid #ffc107; }
body.contrast_ver .news-std-title a, body.contrast_ver .news-std-excerpt, body.contrast_ver .news-std-date { color: #ffc107 !important; }

body.contrast_ver .news-list-simple { border-color: #ffc107; }
body.contrast_ver .news-item-simple { border-bottom-color: #ffc107; background: transparent; }
body.contrast_ver .news-item-simple:hover { background: #333; }
body.contrast_ver .news-simple-date { background: #000; color: #ffc107; border: 1px solid #ffc107; }
body.contrast_ver .news-simple-date .year { color: #ffc107; }
body.contrast_ver .news-simple-title a { color: #ffc107 !important; }
body.contrast_ver .news-simple-arrow { color: #ffc107; opacity: 1; }

/* Kalendarz Imprez */
body.contrast_ver .events-section .row > div .event-date { color: #ffc107 !important; }
body.contrast_ver .events-section .row > div .event-item:hover { border-color: #ffc107 !important; }

body.contrast_ver .calendar-month-header { background-color: #000; color: #ffc107; border-left-color: #ffc107; border-bottom: 1px solid #ffc107; }
body.contrast_ver .calendar-row { background-color: #000; border-bottom-color: #ffc107; }
body.contrast_ver .calendar-row:hover { background-color: #222; }
body.contrast_ver .calendar-date-col { border-right-color: #ffc107; }
body.contrast_ver .calendar-day { color: #ffc107; }
body.contrast_ver .calendar-month-short { color: #ffff00; }
body.contrast_ver .calendar-title { color: #ffc107; }
body.contrast_ver .calendar-meta-item { color: #fff; }
body.contrast_ver .calendar-meta-item i { color: #ffc107; }
body.contrast_ver .calendar-meta-item a { color: #ffff00; border-bottom-color: #ffff00; }

/* Obiekty / Facilities */
body.contrast_ver .facility-card { border: 2px solid #ffc107; background: #000; }
body.contrast_ver .facility-placeholder { background: #000; color: #ffc107; border-bottom: 1px solid #ffc107; }
body.contrast_ver .facility-card:hover .facility-placeholder { background: #222; }
body.contrast_ver .facility-overlay { background: #000; border-top: 1px solid #ffc107; }
body.contrast_ver .facility-title { color: #ffc107; text-decoration: underline; text-shadow: none; }
body.contrast_ver .facility-title::after { display: none; }

/* Galeria */
body.contrast_ver .gallery-item { border: 2px solid #ffc107; }
body.contrast_ver .gallery-icon { background: rgba(0, 0, 0, 0.8); }
body.contrast_ver .gallery-icon i { color: #ffc107; }

/* Nawigacja Artykułu */
body.contrast_ver .btn-nav-primary, body.contrast_ver .btn-nav-outline { background-color: #000 !important; color: #ffc107 !important; border: 2px solid #ffc107 !important; }
body.contrast_ver .btn-nav-primary:hover, body.contrast_ver .btn-nav-outline:hover { background-color: #ffc107 !important; color: #000 !important; }

/* Side Menu */
body.contrast_ver .side-menu-link { background-color: #000; border: 2px solid #ffc107; color: #ffc107; }
body.contrast_ver .side-menu-link::after { background-color: #ffc107; color: #000; }
body.contrast_ver .side-menu-link:hover, body.contrast_ver .side-menu-link.active { background-color: #222; border-color: #fff; }
body.contrast_ver .side-menu-link.active::after { background-color: #fff; }

/* Kontakt */
body.contrast_ver .contact-card { background: #000; border: 2px solid #ffc107; }
body.contrast_ver .contact-icon-box { background: #222; color: #ffc107; border: 1px solid #ffc107; }
body.contrast_ver .contact-item:hover .contact-icon-box { background: #ffc107; color: #000; }
body.contrast_ver .contact-link { color: #ffff00 !important; }
body.contrast_ver .btn-facebook { background: #000; border-color: #ffc107; color: #ffc107; }
body.contrast_ver #ibanNumber { background: #000 !important; color: #ffc107 !important; border-color: #ffc107; }
body.contrast_ver .contact-card h2, body.contrast_ver .contact-card h3 { color: #ffc107 !important; }

/* Widget Dostępności */
body.contrast_ver .page-item.active .page-link { background-color: #ffc107 !important; color: #000 !important; }
body.contrast_ver .acc-toggle-btn { background-color: #ffc107; color: #000; }
body.contrast_ver .acc-header .btn-close{ filter: invert(1) grayscale(100%) brightness(200%);opacity: 1; }

/* Error Page */
body.contrast_ver .error-code { color: #ffc107; text-shadow: none; }
body.contrast_ver .error-heading { color: #ffc107; }
body.contrast_ver .error-text { color: #ffc107; }

/* --- INNE TRYBY --- */
body.grayscale-mode { filter: grayscale(100%); }
body.links-underline a { text-decoration: underline !important; text-decoration-thickness: 2px !important; text-underline-offset: 3px; }