/* ==========================================================================
   1. STRUKTURA I BARWY FLAGI CZESKIEJ (Biel, Głęboki Niebieski, Czerwień)
   ========================================================================== */
:root {
  --bs-primary: #11457e;      /* Czeski niebieski */
  --bs-secondary: #d7141a;    /* Czeska czerwień */
  --bs-body-bg: #ffffff;      /* Wymuszenie czystej bieli tła strony */
}

/* Globalne ustawienie tła na białe */
body, section, .bg-light {
  background-color: #ffffff !important;
}

/* Kolorowanie elementów tekstowych i dekoracyjnych */
.text-primary { color: var(--bs-primary) !important; }
.text-secondary { color: var(--bs-secondary) !important; }

/* Aktywny link w menu z czeskim akcentem (niebieski tekst + czerwona linia pod spodem) */
.navbar-nav .nav-link.active-cz {
  color: var(--bs-primary) !important;
  font-weight: 700;
  border-bottom: 3px solid var(--bs-secondary);
}
.navbar-nav .nav-link:hover {
  color: var(--bs-secondary) !important;
}

/* Przyciski w barwach flagi */
.btn-primary {
  background-color: var(--bs-primary) !important;
  border-color: var(--bs-primary) !important;
  color: #ffffff !important;
}
.btn-primary:hover {
  background-color: var(--bs-secondary) !important;
  border-color: var(--bs-secondary) !important;
}
.btn-outline-dark {
  border-color: var(--bs-primary) !important;
  color: var(--bs-primary) !important;
}
.btn-outline-dark:hover {
  background-color: var(--bs-primary) !important;
  color: #ffffff !important;
}

/* Wyróżnienie sekcji News (Karty na białym tle mają teraz delikatną niebieską ramkę) */
.card {
  background-color: #ffffff !important;
  border: 1px solid rgba(17, 69, 126, 0.15) !important;
}
.card:hover {
  border-color: var(--bs-secondary) !important;
}

/* ==========================================================================
   2. POPRAWIONA I SPRAWDZONA DOSTĘPNOŚĆ (ACCESSIBILITY)
   ========================================================================== */

/* Powiększanie czcionki */
body.large-text { font-size: 1.3rem !important; }
body.large-text .nav-link, body.large-text p, body.large-text address { font-size: 1.25rem !important; }
body.large-text h1 { font-size: 3.2rem !important; }
body.large-text h2 { font-size: 2.4rem !important; }

/* Tryb Wysokiego Kontrastu (Czarno-Żółty) - Nadpisuje białe tło tylko po kliknięciu! */
body.high-contrast {
  background-color: #000000 !important;
  color: #ffff00 !important;
}
body.high-contrast header,
body.high-contrast section,
body.high-contrast footer,
body.high-contrast div,
body.high-contrast p,
body.high-contrast h1,
body.high-contrast h2,
body.high-contrast h3,
body.high-contrast span,
body.high-contrast ul,
body.high-contrast li,
body.high-contrast .card,
body.high-contrast .card-body,
body.high-contrast address {
  background-color: #000000 !important;
  color: #ffff00 !important;
  border-color: #ffff00 !important;
}
body.high-contrast a,
body.high-contrast button,
body.high-contrast .nav-link {
  color: #ffff00 !important;
  text-decoration: underline !important;
}
body.high-contrast a:hover,
body.high-contrast button:hover {
  background-color: #ffff00 !important;
  color: #000000 !important;
}
body.high-contrast .btn {
  border: 2px solid #ffff00 !important;
  background: transparent !important;
}
/* Efekty hover dla linków w niebieskiej stopce */
.footer-link-cz {
  transition: color 0.2s ease-in-out;
  color: var(--bs-body-bg) !important;
}
.footer-link-cz:hover {
  color: var(--bs-primary) !important; /* Zmiana na czeską czerwień przy najechaniu */
  text-decoration: underline !important;
}
footer {
  background: var(--bs-secondary) !important;
}
footer.btn:hover {
   background: var(--bs-body-bg) !important; /* Zmiana na czeską czerwień przy najechaniu */
}
/* Kolor linii pomocniczej wewnątrz stopki */
.border-secondary-subtle {
  border-color: rgba(215, 20, 26, 0.3) !important; /* Przeźroczysta czeska czerwień */
}
/* Styl dla aktywnego linku w menu */
.main-nav ul li a.active {
    color: #d71a1a;            /* Zmiana koloru tekstu na czerwony */
    font-weight: bold;         /* Pogrubienie tekstu */
    border-bottom: 2px solid #d71a1a; /* Dodanie podkreślenia pod tekstem */
}
.main-nav a.active {
    text-decoration: underline !important;
    color: red !important;
}
.navbar-nav .nav-link.active-cz {
    color: #d71a1a !important; /* Kolor czerwony */
    font-weight: bold !important;
    border-bottom: 2px solid #d71a1a;
}
html {
    scroll-behavior: smooth;
}
.bi .bi-telephone-fill {
  color: var(--bs-primary);
}
/* Kontener kafelka galerii */
.gallery-item {
    position: relative;
    overflow: hidden;
    border-radius: 8px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.08);
    height: 300px;         /* Stała wysokość kafelka */
    background-color: #fff; /* BIAŁE TŁO DLA MINIATUREK */
    cursor: pointer;
    border: 1px solid #eee; /* Delikatne obramowanie, aby białe zdjęcia nie zlały się z tłem */
}

/* Miniaturka - zdjęcie dopasowane, NIE UCIĘTE */
.gallery-img {
    width: 100%;
    height: 100%;
    object-fit: contain;   /* Gwarantuje pełną widoczność zdjęcia w pionie/poziomie */
    padding: 10px;         /* Estetyczny odstęp zdjęcia od krawędzi białego kafelka */
    transition: transform 0.4s ease;
}

/* Efekt najechania myszką */
.gallery-item:hover .gallery-img {
    transform: scale(1.03);
}

/* Warstwa najechania (Overlay) */
.gallery-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(17, 69, 126, 0.8); /* Granatowy kolor konsulatu */
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.gallery-item:hover .gallery-overlay {
    opacity: 1;
}

.overlay-text {
    color: #fff;
    font-weight: 600;
    font-size: 1rem;
    border: 2px solid #fff;
    padding: 8px 20px;
    border-radius: 50px;
}

/* --- SYSTEM LIGHTBOX / OKNO PODGLĄDU --- */
.custom-lightbox {
    display: none;
    position: fixed;
    z-index: 9999;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.95);
    align-items: center;
    justify-content: center;
}

.lightbox-content-wrapper {
    text-align: center;
    max-width: 80%;
    max-height: 80%;
}

.lightbox-img {
    max-width: 100%;
    max-height: 75vh;
    border-radius: 4px;
    box-shadow: 0 0 25px rgba(0,0,0,0.5);
}

.lightbox-caption {
    color: #eee;
    margin-top: 15px;
    font-size: 1.1rem;
    font-family: sans-serif;
}

/* Przyciski i nawigacja w podglądzie */
.lightbox-close {
    position: absolute;
    top: 20px;
    right: 35px;
    color: #fff;
    font-size: 45px;
    font-weight: 300;
    cursor: pointer;
    transition: color 0.2s;
    z-index: 10000;
}

.lightbox-close:hover {
    color: #d71a1a;
}

/* Stylizacja strzałek */
.lightbox-arrow {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(255, 255, 255, 0.1);
    color: white;
    border: none;
    font-size: 30px;
    padding: 15px 22px;
    cursor: pointer;
    border-radius: 50%;
    transition: background 0.2s, color 0.2s;
    z-index: 10000;
    user-select: none;
}

.lightbox-arrow:hover {
    background: #d71a1a;
    color: #fff;
}

.arrow-left { left: 30px; }
.arrow-right { right: 30px; }

/* Ukrycie strzałek na małych ekranach telefonów, by nie zasłaniały zdjęcia */
@media (max-width: 576px) {
    .lightbox-arrow {
        padding: 10px 15px;
        font-size: 20px;
    }
    .arrow-left { left: 10px; }
    .arrow-right { right: 10px; }
    .lightbox-content-wrapper { max-width: 95%; }
}

.lightbox-bg-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.95); /* Przeniesione przyciemnienie tła */
    z-index: 9998; /* Pod zdjęciem i strzałkami */
}

/* Upewniamy się, że treść i strzałki są nad nowym tłem */
.lightbox-content-wrapper, .lightbox-arrow, .lightbox-close {
    position: relative;
    z-index: 9999;
}
.news-card {
    background: #fff; border-radius: 8px; overflow: hidden;
    box-shadow: 0 4px 15px rgba(0,0,0,0.05);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    display: flex; flex-direction: column; height: 100%;
}
.news-card:hover { transform: translateY(-5px); box-shadow: 0 10px 25px rgba(17,69,126,0.1); }
.news-thumb { height: 220px; overflow: hidden; position: relative; }
.news-thumb img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.5s ease; }
.news-card:hover .news-thumb img { transform: scale(1.06); }
.news-badge { position: absolute; top: 15px; left: 15px; background: #11457e; color: #fff; padding: 4px 12px; font-size: 0.75rem; border-radius: 50px; }
.news-body { padding: 20px; display: flex; flex-direction: column; flex-grow: 1; }
.news-meta { font-size: 0.8rem; color: #d71a1a; font-weight: 600; }
.news-title { font-size: 1.15rem; color: #11457e; font-weight: 600; margin-bottom: 10px; }
.news-excerpt { font-size: 0.9rem; color: #555; flex-grow: 1; }
.news-btn { color: #d71a1a; text-decoration: none; font-weight: 600; }
.news-card:hover .news-btn { color: #11457e; }
/* Nowoczesne karty aktualności */
.custom-news-card {
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    background-color: #ffffff;
    border-radius: 8px !important;
    overflow: hidden;
}

/* Efekt uniesienia kafelka po najechaniu myszką */
.custom-news-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 10px 25px rgba(17, 69, 126, 0.12) !important;
}

/* Kontener obrazka - pilnuje równych proporcji bez ucinania layoutu */
.news-img-container {
    height: 220px;
    overflow: hidden;
    background-color: #f8f9fa;
}

/* Zdjęcie idealnie dopasowane w kafelku */
.news-card-img {
    width: 100%;
    height: 100%;
    object-fit: cover; /* W przypadku bloga/newsów dążymy do wypełnienia całej góry */
    transition: transform 0.5s ease;
}

.custom-news-card:hover .news-card-img {
    transform: scale(1.05); /* Delikatny zoom zdjęcia wewnątrz karty */
}

/* Stylowanie przycisku "Czytaj więcej" */
.transition-btn {
    transition: all 0.2s ease-in-out;
    border-color: #d71a1a;
    color: #d71a1a;
}

.transition-btn:hover {
    background-color: #d71a1a !important;
    border-color: #d71a1a !important;
    color: #fff !important;
}
/* Wyrównanie wysokości kafelków galerii */
.gallery-item {
    position: relative;
    overflow: hidden;
    cursor: pointer;
    border-radius: 8px;
    height: 100%; /* Każdy kafelek będzie miał dokładnie 250px wysokości */
    width: 100%;
}

.gallery-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}


/* Efekt najechania myszką (zoom) */
.gallery-item:hover .gallery-img {
    transform: scale(1.05);
}

/* Styl nakładki (overlay) */
.gallery-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(17, 69, 126, 0.7); /* Kolor nawiązujący do Twojego nagłówka */
    opacity: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: opacity 0.3s ease;
}

.gallery-item:hover .gallery-overlay {
    opacity: 1;
}

.overlay-text {
    color: #fff;
    font-weight: bold;
}
