/* =======================================================
   1. RESET, ZMIENNE I STYLE GLOBALNE
   ======================================================= */
:root {
    /* Paleta kolorów */
    --bg-color: #121212;
    --bg-dark-secondary: #1f1f1f;
    --bg-charcoal: #36454F; /* Antracyt */
    --text-gray: #888;
    --text-white: #e0e0e0;
    --accent-yellow: #fecf09;
    --accent-green: #4caf50;
    --tile-bg: #2a2a2a;
    
    /* Wymiary */
    --sidebar-width: 400px;
    --tab-width: 50px;
    
    /* Efekty */
    --shadow-std: 0 4px 15px rgba(0,0,0,0.1);
    --shadow-hover: 0 0 25px rgba(255,255,0,0.5);
    --glass-bg: rgba(40, 40, 40, 0.85);
}

* { margin: 0; padding: 0; box-sizing: border-box; }

html, body { overflow-x: hidden; }

body {
    font-family: 'Poppins', sans-serif;
    background: linear-gradient(rgba(0,0,0,0.7), rgba(0,0,0,0.2)), url('/images_web/tlo.jpg') center/cover fixed no-repeat;
    color: var(--text-white);
}

a {
    color: var(--accent-yellow);
    text-decoration: none;
    transition: all 0.3s ease-in-out;
}
a:hover { color: var(--text-white); }

h1 { color: var(--accent-yellow); margin: 25px 0 15px; }
h2, h3, h4 { color: var(--accent-green); margin: 25px 0 15px; }
p, ul, li, tr, th { line-height: 1.6; }

/* --- Elementy formularzy globalne --- */
fieldset {
    border: 2px solid #ddd;
    padding: 15px;
    border-radius: 10px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}
legend {
    font-size: 2rem;
    font-weight: bold;
    padding: 0 10px;
    color: #ddd;
}

/* =======================================================
   2. KOMPONENTY UI (Preloader, Nav, Footer, Buttons)
   ======================================================= */

/* --- PRELOADER --- */
#preloader {
    position: fixed; top: 0; left: 0; width: 100%; height: 100%;
    background-color: var(--bg-color);
    z-index: 99999;
    display: flex; flex-direction: column; justify-content: center; align-items: center;
    transition: opacity 0.5s ease-out, visibility 0.5s ease-out;
}
#preloader.loaded { opacity: 0; visibility: hidden; }

.preloader-logo {
    width: 150px; margin-bottom: 20px;
    animation: pulse-logo 2s infinite ease-in-out;
}

.loader-ring { display: inline-block; position: relative; width: 80px; height: 80px; }
.loader-ring div {
    box-sizing: border-box; display: block; position: absolute;
    width: 64px; height: 64px; margin: 8px;
    border: 4px solid var(--accent-yellow); border-radius: 50%;
    animation: loader-ring 1.2s cubic-bezier(0.5, 0, 0.5, 1) infinite;
    border-color: var(--accent-yellow) transparent transparent transparent;
}
.loader-ring div:nth-child(1) { animation-delay: -0.45s; }
.loader-ring div:nth-child(2) { animation-delay: -0.3s; }
.loader-ring div:nth-child(3) { animation-delay: -0.15s; }

/* --- NAWIGACJA --- */
nav {
    background-color: var(--bg-dark-secondary);
    padding: 15px 20px; text-align: center;
    border-bottom: 1px solid #333;
    display: flex; justify-content: center; align-items: center;
    position: relative; flex-wrap: wrap;
}
nav ul {
    list-style: none; display: inline-flex; gap: 20px;
    flex-wrap: wrap; justify-content: center;
    transition: all 0.3s ease-in-out; padding: 0; margin: 0;
}
nav ul li { transition: background-color 0.3s; }
nav a {
    color: var(--text-gray); font-weight: 300; font-size: 14px;
    text-transform: uppercase; padding-bottom: 5px; position: relative;
}
nav a:hover, nav a.active { color: var(--text-white); }
nav a.active { border-bottom: 2px solid var(--accent-yellow); }

.premium-link { color: var(--accent-yellow) !important; }
.premium-link.active { border-bottom: 2px solid var(--accent-green); }
.premium-link:hover { color: var(--text-white) !important; }
.premium-star { color: var(--accent-yellow); font-size: 0.8em; margin-left: 5px; }

/* Hamburger Menu */
.hamburger {
    display: none; background: none; border: none; cursor: pointer;
    padding: 10px; z-index: 40; position: absolute; right: 20px;
}
.hamburger span {
    display: block; width: 25px; height: 2px;
    background-color: var(--text-white); margin: 5px 0;
    transition: all 0.3s ease-in-out;
}
.hamburger.open span:nth-child(1) { transform: rotate(-45deg) translate(-5px, 6px); }
.hamburger.open span:nth-child(2) { opacity: 0; }
.hamburger.open span:nth-child(3) { transform: rotate(45deg) translate(-5px, -6px); }

/* --- STOPKA --- */
footer {
    background-color: #1a1a1a; padding: 20px 0;
    border-top: 1px solid #333; font-size: 12px; color: #666;
    position: relative; margin-top: 50px; overflow: hidden;
}
.footer-content {
    max-width: 1500px; margin: 0 auto;
    display: flex; justify-content: space-between; align-items: center;
    padding: 0 20px; position: relative; z-index: 2;
}
.footer-deco-left, .footer-deco-right {
    position: fixed; transition: opacity 1.5s ease-out; opacity: 0; z-index: 1; bottom: 0;
}
.footer-deco-left { left: 30px; height: 80%; }
.footer-deco-right { right: 30px; margin-bottom: 50px; height: 50%; }
.footer-deco-active { opacity: 0.3 !important; }

/* =======================================================
   3. STRONA GŁÓWNA & UKŁAD (Hero, Grid, Text Boxes)
   ======================================================= */
.container { max-width: 1500px; margin: 0 auto; }

/* Hero Section */
.hero {
    position: relative; max-width: 1500px; margin: 0 auto;
    display: flex; align-items: center; justify-content: space-between;
    padding: 0 20px; min-height: 400px;
}
.hero-left { flex: 1; z-index: 2; }
.hero-right { flex: 1; position: relative; margin-left: -50px; }

.site-logo {
    display: inline-flex; align-items: center; color: var(--text-white);
    margin-bottom: 20px; transition: opacity 0.3s;
}
.site-logo:hover { opacity: 0.9; }

.logo-icon-box {
    border-top: 3px solid var(--accent-green); padding-top: 5px; margin-right: 15px;
}
.logo-icon-box2 { display: none; }
.logo-img { height: 200px; width: auto; display: block; }

.logo-text {
    font-size: 32px; line-height: 1; text-transform: uppercase;
    font-weight: 800; color: white;
}
.logo-text span { display: block; color: var(--text-white); }
.main-tram-img {
    width: 100%; max-width: 600px; display: block;
    border-bottom: 4px solid var(--accent-green); margin-top: 10px;
}

/* Wireframes */
.wireframe-tram, .wireframe-tram_typi, .wireframe-tram_gt3 {
    position: absolute; width: 800px; opacity: 0.5; z-index: 0;
    pointer-events: none; filter: invert(1);
}
.wireframe-tram { top: -150px; right: -300px; }
.wireframe-tram_typi { top: 600px; right: -300px; }
.wireframe-tram_gt3 { top: -150px; right: 1000px; }

/* --- Text Boxes - Zoptymalizowane --- */
[class^="text-box"] {
    position: relative; z-index: 2;
    background: var(--glass-bg);
    padding: 30px; backdrop-filter: blur(5px);
    transition: opacity 0.5s ease;
}

[class^="text-box"] h2, [class^="text-box"] h3 {
    margin-bottom: 15px; color: #ddd; font-weight: 400;
}
.text-box h2, .text-box2 h2 { font-size: 18px; }
[class^="text-box"]:not(.text-box):not(.text-box2):not(.text-box3) h2 { font-size: 24px; }

[class^="text-box"] p, [class^="text-box"] li, [class^="text-box"] span, [class^="text-box"] th, [class^="text-box"] tr {
    line-height: 1.6; text-align: justify; margin-bottom: 20px;
}

[class^="text-box"] li {
    margin-left: 30px; margin-bottom: 5px;
}


.text-box, .text-box3, .text-box5, .text-box7 {
    border-left: 4px solid var(--accent-yellow);
    border-bottom: 4px solid var(--accent-yellow);
}
.text-box2, .text-box4, .text-box4a, .text-box6 {
    border-right: 4px solid var(--accent-green);
    border-top: 4px solid var(--accent-green);
}
.text-box2 { border-top: none; border-bottom: 4px solid var(--accent-green); }

.text-box, .text-box2 { max-width: 800px; }

.text-box3 {
    display: none; opacity: 0;
    box-shadow: 0 4px 20px rgba(0,0,0,0.1);
    flex-direction: column; order: 99;
}
body.tabor_details-mode .text-box3,
body.zajezdnie_details-mode .text-box3 {
    display: flex !important; flex: 1; order: 2;
    animation: slideInRight 0.6s ease forwards;
}
.text-box3 hr {
    border: 0; height: 1px; background: #ccc; margin: 10px 0 20px 0;
}

.text-box4, .text-box4a, .text-box5 {
    box-shadow: 0 4px 20px rgba(0,0,0,0.1);
    opacity: 0; transform: translateY(60px);
    animation: revealUp 0.8s ease-out 0.1s forwards;
}

.text-box4 { width: 100%; display: flex; margin: 20px 0 30px; gap: 30px; align-items: center; }
.text-box4a { width: 100%; display: block !important; margin: 20px 0 30px; }

.text-box6, .text-box7 {
    box-shadow: var(--shadow-std);
    opacity: 0;
}
.text-box6 {
    width: 35%; flex-shrink: 0;
    display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 15px;
    transform: translateX(-50vw); animation: slideIn 0.5s forwards;
}
.text-box7 {
    width: 60%; flex-shrink: 0; padding: 15px 25px;
    transform: translateX(50vw); animation: slideInRight 0.5s forwards;
}

.text-box4.visible, .text-box4a.visible, .text-box5.visible {
    opacity: 1; transform: translateY(0);
}

/* Main Content */
.main-content {
    max-width: 1500px; margin: 0 auto; padding: 10px 20px;
    background-color: rgba(30, 30, 30, 0.6);
    min-height: calc(100vh - 170px);
    border-radius: 8px;
    box-shadow: 0 0 15px rgba(0, 0, 0, 0.5);
    position: relative; z-index: 50;
}

/* Grid / Tiles General */
.grid-container {
    max-width: 1500px; margin: 50px auto;
    display: grid; grid-template-columns: repeat(4, 1fr);
    gap: 20px; padding: 0 20px; z-index: 10;
}
.tile {
    background-color: #222; height: 200px;
    position: relative; overflow: hidden;
    border: 1px solid #333; border-radius: 4px;
    z-index: 100; opacity: 0; transform: translateY(30px);
    transition: opacity 0.6s ease-out, transform 0.6s ease-out, box-shadow 0.3s;
}
.tile.is-visible { opacity: 1 !important; transform: translateY(0); }

.tile-img {
    width: 100%; height: 100%; object-fit: cover;
    opacity: 0.6; transition: opacity 0.3s;
}
.tile:hover .tile-img { opacity: 1; }
.tile.is-visible:not(:hover) .tile-img { opacity: 0.6; }

.tile-title {
    position: absolute; top: 20px; left: 20px;
    font-size: 24px; text-transform: uppercase; font-weight: 300;
    z-index: 2; padding-left: 10px;
    border-left: 3px solid var(--accent-yellow);
    line-height: 1; color: white; pointer-events: none;
}

/* --- Panele Boczne (Sidebar) --- */
.sidebar-wrapper {
    position: fixed; top: 0; bottom: 0; z-index: 100; pointer-events: none;
}
.sidebar-wrapper.left { left: 0; }
.sidebar-wrapper.right { right: 0; }

.sidebar {
    position: absolute; top: 0; bottom: 0;
    width: var(--sidebar-width);
    background: rgba(30,30,30,0.95);
    overflow-y: auto; overflow-x: hidden;
    box-shadow: 0 0 20px rgba(0,0,0,.7);
    transition: transform .4s ease; pointer-events: auto;
}
.left-sidebar { left: 0; transform: translateX(calc(-1 * var(--sidebar-width))); }
.left-sidebar.open { transform: translateX(0); }
.right-sidebar { right: 0; transform: translateX(var(--sidebar-width)); }
.right-sidebar.open { transform: translateX(0); }

.sidebar-tab {
    position: absolute; top: 200px; width: var(--tab-width); height: 200px;
    display: flex; align-items: center; justify-content: center;
    cursor: pointer; pointer-events: auto;
    box-shadow: 2px 2px 6px rgba(0,0,0,.6); transition: transform .4s ease;
}
.sidebar-tab .tab-text { white-space: nowrap; }

.left-tab { left: 0; background: var(--accent-yellow); color: #000; border-radius: 0 20px 20px 0; }
.right-tab { right: 0; background: var(--accent-green); color: #000; border-radius: 20px 0 0 20px; }

.left-sidebar.open + .left-tab { transform: translateX(var(--sidebar-width)); }
.right-sidebar.open + .right-tab { transform: translateX(calc(-1 * var(--sidebar-width))); }
.sidebar-content { padding: 20px; }
.photo-list img { width: 100%; display: block; margin-bottom: 10px; cursor: pointer; transition: opacity 0.2s; }
.photo-list img:hover { opacity: 0.8; }

/* =======================================================
   4. MODUŁY SPECYFICZNE (Gazety, Historia, Tabor, etc.)
   ======================================================= */

/* --- Wspólne kontenery modułów --- */
.gazety_container, .historia_container, .zajezdnie_container, .tabor_container {
    display: flex; flex-wrap: wrap; width: 95%; max-width: 2000px;
    margin: 0 auto; gap: 1%;
    align-items: flex-start; transition: padding 0.3s ease;
}
.zajezdnie_container, .tabor_container { width: 90%; gap: 2%; padding-top: 5vh; }
.gazety_container .main-header, .gazety_container .logo-container, .gazety_container .main-nav,
.historia_container .main-header, .historia_container .logo-container, .historia_container .main-nav { display: none !important; }

/* --- INTRO BOXES --- */
.gazety_intro-box, .pocztowki_intro-box {
    width: 100%; background-color: #ffffff; padding: 30px;
    margin: 20px 0 30px; border-radius: 10px;
    box-shadow: var(--shadow-std); display: flex; gap: 30px; align-items: center;
    order: 0; opacity: 0; transform: translateY(60px);
    animation: revealUp 0.8s ease-out 0.1s forwards;
}
.gazety_intro-text, .pocztowki_intro-text {
    flex-basis: 65%; flex-grow: 1; font-size: 1.1rem; line-height: 1.7;
}
.gazety_intro-image-container, .pocztowki_intro-image-container, .historia_intro-image-container {
    flex-basis: 35%; flex-shrink: 0; text-align: center; max-width: 500px;
}
.gazety_intro-image-container img, .pocztowki_intro-image-container img, .historia_intro-image-container img {
    width: 100%; height: auto; border-radius: 5px; box-shadow: 0 2px 10px rgba(0,0,0,0.2);
}

/* --- GAZETY --- */
.gazety_search-fieldset {
    border: 2px solid var(--accent-yellow); padding: 20px;
    border-radius: 8px; margin-bottom: 30px; width: 100%; order: 1; transition: all 0.3s ease;
}
.gazety_search-content-wrapper { display: none; }
body.gazety_access-granted .gazety_search-content-wrapper { display: block; }
.gazety_search-input-wrapper { display: flex; align-items: center; gap: 10px; margin-bottom: 15px; }

#gazety_searchInput {
    width: 100%; padding: 12px; font-size: 1.1rem; border: 1px solid #ccc;
    border-radius: 5px; transition: border-color 0.3s;
}
#gazety_searchInput:focus { border-color: #FFD700; outline: none; box-shadow: 0 0 5px rgba(255, 215, 0, 0.5); }

#gazety_clearSearchBtn {
    padding: 12px; font-size: 1.1rem; border: none; border-radius: 5px;
    background-color: #f44336; color: white; cursor: pointer; white-space: nowrap;
}
#gazety_clearSearchBtn:hover { background-color: #d32f2f; }
.gazety_status-message { font-style: italic; color: #888; min-width: 120px; text-align: right; }
#gazety_searchResults { margin-top: 20px; min-height: 50px; }

/* Kafelki Roczników, Historia, Pocztówki */
.gazety_tile, .historia_tile, .gazety_article-tile, .pocztowki_tile {
    border-radius: 10px; cursor: pointer;
    box-shadow: 0 4px 10px rgba(0,0,0,0.2);
    position: relative; overflow: hidden; margin-bottom: 1vh;
    transition: transform 0.3s, box-shadow 0.3s, background-color 0.3s, color 0.3s;
}

.gazety_tile, .historia_tile {
    width: 9%; height: 10vw; max-height: 150px; max-width: 150px;
    min-width: 70px; min-height: 70px;
    background-color: var(--bg-charcoal); color: white;
    text-align: center; display: flex; flex-direction: column;
    justify-content: center; align-items: center; font-weight: bold;
    opacity: 0; transform: translateY(20px);
    animation: revealUp 0.8s forwards;
}
.historia_tile { width: 18%; max-width: 250px; }

.gazety_tile:hover, .historia_tile:hover {
    transform: scale(1.05); box-shadow: var(--shadow-hover); color: #FFD700;
}
.gazety_tile:hover .gazety_tile-count { color: #FFD700; }
.gazety_tile-year { font-size: 1.8rem; line-height: 1; }
.gazety_tile-count { margin-top: 5px; font-size: 0.9rem; color: #ccc; }
.historia_tile-range, .historia_tile-year { font-size: 1.6rem; line-height: 1; padding: 5px; }

.gazety_article-tile, .pocztowki_tile {
    aspect-ratio: 1 / 1; box-shadow: 0 2px 5px rgba(0,0,0,0.2);
}
.gazety_article-tile.reveal { opacity: 0; animation: revealUp 0.6s ease-out forwards; }
.pocztowki_tile {
    opacity: 0; transform: translateY(20px); animation: revealUp 0.5s forwards;
    border: none !important; padding: 0 !important; background: none !important;
}

.gazety_article-tile img, .pocztowki_tile img {
    width: 100%; height: 100%; object-fit: cover; display: block;
    position: absolute; top: 0; left: 0; z-index: 1;
}
.gazety_article-tile::before, .pocztowki_tile::before {
    content: ''; position: absolute; top: 0; left: 0; right: 0; bottom: 0;
    background-color: rgba(0,0,0,0.4); z-index: 2; transition: background-color 0.3s;
}
.gazety_article-tile:hover, .pocztowki_tile:hover {
    transform: scale(1.05); box-shadow: var(--shadow-hover);
}
.gazety_article-tile:hover::before, .pocztowki_tile:hover::before { background-color: rgba(0,0,0,0.05); }

.gazety_article-info, .pocztowki_info {
    position: absolute; bottom: 0; left: 0; right: 0; padding: 5px;
    background: linear-gradient(to top, rgba(0,0,0,0.8), transparent);
    color: white; z-index: 3; text-align: left;
}
.gazety_article-date, .pocztowki_date { font-size: 0.8rem; font-weight: bold; }
.gazety_article-journal, .pocztowki_city { font-size: 0.7rem; font-style: italic; opacity: 0.8; }

.gazety_fieldset_container, .historia_fieldset_container {
    width: 100%; display: flex; flex-direction: column; gap: 30px;
    transition: transform 0.7s ease-in-out, opacity 0.7s ease-in-out;
    position: relative; order: 2;
}

.gazety_tiles-wrapper, .historia_tiles-wrapper, .gazety_gallery-grid {
    display: flex; flex-wrap: wrap; gap: 1%; margin-top: 10px; justify-content: center;
}
.gazety_gallery-grid, .pocztowki_gallery-grid {
    display: grid; grid-template-columns: repeat(10, 1fr); gap: 10px; margin-bottom: 10px;
}
.pocztowki_gallery-grid { grid-template-columns: repeat(6, 1fr); margin-top: 30px; max-width: 1400px; padding: 0 10px; }

/* Detale Gazet i Historii (Przełączanie widoków) */
body.gazety_details-mode .gazety_fieldset_container,
body.historia_details-mode .historia_fieldset_container {
    position: absolute; transform: translateX(-100vw); opacity: 0; pointer-events: none;
}
body.gazety_details-mode .gazety_search-fieldset { display: none; }

.gazety_active-tile-wrapper { display: none; }
#gazety_articlesFieldset { padding: 15px; border-radius: 8px; box-shadow: 0 2px 5px rgba(0,0,0,0.1); width: 100%; }
.gazety_articles-panel { display: none; opacity: 0; width: 100%; order: 3; }
body.gazety_details-mode .gazety_articles-panel,
body.gazety_search-mode .gazety_articles-panel { display: block !important; opacity: 1; }

.gazety_close-btn, .historia_close-btn, .historia_nav-btn {
    display: inline-block; padding: 8px 18px; background-color: var(--bg-charcoal);
    color: white; text-decoration: none; border-radius: 5px; cursor: pointer;
    transition: background 0.3s, color 0.3s; font-size: 1rem; margin-left: 15px; white-space: nowrap;
}
.gazety_close-btn:hover, .historia_close-btn:hover, .historia_nav-btn:hover {
    background-color: #FFD700; color: var(--bg-charcoal);
}

/* --- HISTORIA (Szczegóły) --- */
#historia_textDisplay { font-size: 1.1rem; line-height: 1.8; display: block; transition: font-size 0.2s ease-in-out; }
#historia_textDisplay li{ margin-left: 30px;}
.historia_text-vsmall #historia_textDisplay { font-size: 0.8rem; }
.historia_text-small #historia_textDisplay { font-size: 1.0rem; }
.historia_text-medium #historia_textDisplay { font-size: 1.2rem; }
.historia_text-large #historia_textDisplay { font-size: 1.4rem; }
.historia_text-vlarge #historia_textDisplay { font-size: 1.6rem; }

.historia_switch_wrapper { width: 100%; position: relative; min-height: 250px; overflow: hidden; transition: height 0.7s ease-in-out; }
.historia_text-panel {
    width: 100%; position: absolute; top: 0; left: 0;
    transition: transform 0.7s ease-in-out, opacity 0.7s ease-in-out, visibility 0s 0.7s;
    transform: translateX(100vw); opacity: 0; visibility: hidden; pointer-events: none;
}
body.historia_details-mode .historia_text-panel {
    transform: translateX(0); opacity: 1; visibility: visible; pointer-events: auto; transition-delay: 0s;
}

#historia_rangeFieldset {
    border: 2px solid var(--accent-yellow); border-radius: 8px; box-shadow: 0 2px 5px rgba(0,0,0,0.1);
    width: calc(100% - 4px); margin: 0 auto; padding: 15px;
}
#historia_rangeFieldset legend, #historia_textFieldset legend {
    font-size: 2rem; font-weight: bold; color: #ddd; padding: 0 10px;
    display: flex; justify-content: space-between; align-items: center; margin-bottom: 20px;
}

.historia_split-container { display: flex; gap: 20px; align-items: flex-start; width: 100%; }
.historia_text-column { flex: 0 0 70%; max-width: 70%; }
.historia_images-column { flex: 1; display: flex; flex-direction: column; gap: 20px; padding-top: 15px; }

#historia_textFieldset {
    padding: 30px; min-height: 300px; border-radius: 8px;
    width: 100%; margin: 0; background-color: var(--glass-bg);
    border: 2px solid var(--accent-yellow); box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}
#historia_textFieldset p { color: #ccc; }
#historia_textFieldset h3 { color: #ddd; }

.historia_image-card {
    background-color: #ffffff; border-radius: 8px; box-shadow: 0 4px 10px rgba(0,0,0,0.15); padding: 10px;
    display: flex; flex-direction: column; align-items: center; text-align: center; transition: transform 0.2s;
}
.historia_image-card.clickable { cursor: pointer; }
.historia_image-card.clickable:hover { transform: scale(1.02); }
.historia_image-card img { width: 100%; height: auto; border-radius: 4px; margin-bottom: 10px; object-fit: cover; }
.historia_image-placeholder {
    width: 100%; height: 150px; background-color: #eee; color: #999;
    display: flex; justify-content: center; align-items: center;
    border-radius: 4px; margin-bottom: 10px; font-weight: bold; border: 2px dashed #ccc;
}
.historia_image-desc { font-size: 0.9rem; color: #555; line-height: 1.4; }

.historia_nav-btn { background-color: #146b3a; font-weight: bold; }
.historia_nav-btn.hidden { visibility: hidden !important; }
.historia_legend-controls { display: flex; align-items: center; gap: 15px; }
.historia_text-controls-bottom { width: 100%; margin-top: 20px; display: flex; justify-content: space-between; align-items: center; min-height: 40px; gap: 10px; }
.historia_mobile_top_nav { display: none; width: 100%; margin-bottom: 20px; opacity: 0; transition: opacity 0.7s ease; }
body.historia_details-mode .historia_mobile_top_nav { opacity: 1; }

/* --- ZAJEZDNIE I TABOR --- */
.zajezdnie_fieldset, .tabor_fieldset {
    border-radius: 10px; padding: 20px; width: 100%; display: flex; flex-wrap: wrap;
    gap: 2%; margin-bottom: 15px; align-items: flex-start;
    transition: opacity 0.5s, max-height 0.5s, margin 0.5s;
}
.zajezdnie_fieldset legend, .tabor_fieldset legend { padding: 0 10px; margin-left: -10px; }

.zajezdnie_tile, .tabor_tile {
    border-radius: 10px; cursor: pointer; box-shadow: var(--shadow-std);
    position: relative; overflow: hidden; margin-bottom: 2vh;
    opacity: 0; transform: translateX(-100vw); animation: slideIn 0.8s forwards;
    transition: transform 0.3s, width 0.5s, height 0.5s, margin 0.5s, opacity 0.5s, box-shadow 0.3s;
}
.zajezdnie_tile { width: 32%; height: 25vmin; }
.tabor_tile { width: 23.5%; height: 20vmin; }

.zajezdnie_tile img, .tabor_tile img {
    width: 100%; height: 100%; object-fit: cover; position: absolute; top: 0; left: 0; z-index: 0;
}
.zajezdnie_tile::before, .tabor_tile::before {
    content: ''; position: absolute; top: 0; left: 0; right: 0; bottom: 0;
    background-color: rgba(100, 100, 100, 0.3); z-index: 1; transition: background-color 0.3s;
}
.zajezdnie_tile::after, .tabor_tile::after {
    content: ''; position: absolute; bottom: 0; left: 0; right: 0; height: 50%;
    background: linear-gradient(to top, rgba(0,0,0,0.8), transparent); z-index: 2;
}
.zajezdnie_tile-title, .tabor_tile-title {
    position: absolute; bottom: 15px; left: 15px; color: white;
    font-size: 1.1rem; font-weight: bold; z-index: 3;
}
.zajezdnie_tile:hover, .tabor_tile:hover {
    transform: scale(1.03); box-shadow: 0 4px 15px rgba(0,0,0,0.4); z-index: 10;
}
.zajezdnie_tile:hover::before, .tabor_tile:hover::before { background-color: rgba(100, 100, 100, 0.05); }

/* Zajezdnie/Tabor Details Mode */
body.zajezdnie_details-mode .zajezdnie_fieldset,
body.tabor_details-mode .tabor_fieldset { display: none; }

.zajezdnie_active-tile-wrapper, .tabor_active-tile-wrapper {
    display: flex; flex-direction: column; align-items: flex-start;
    width: 23.5%; margin-right: 30px; flex-shrink: 0; order: 1;
}

.zajezdnie_details-mode .zajezdnie_tile.active,
.tabor_active-tile-wrapper .tabor_tile.active {
    width: 100% !important; height: auto; margin: 0 !important;
    cursor: default; transform: none !important; opacity: 1 !important;
    order: -1; position: relative; padding-bottom: 0;
}
.tabor_active-tile-wrapper .tabor_tile.active { box-shadow: var(--shadow-std); }

.zajezdnie_active-tile-wrapper img, .tabor_active-tile-wrapper img {
    width: 100% !important; border-radius: 10px; height: auto !important; position: relative;
}
.tabor_active-tile-wrapper .tabor_tile.active::before,
.tabor_active-tile-wrapper .tabor_tile.active::after,
.tabor_active-tile-wrapper .tabor_tile.active .tabor_tile-title { display: none; }

.zajezdnie_close-btn, .tabor_close-btn {
    display: inline-block; padding: 10px 25px; background-color: #333;
    color: white; text-decoration: none; border-radius: 5px; cursor: pointer;
    transition: background 0.3s, opacity 0.4s ease, transform 0.4s ease;
    opacity: 0; transform: translateY(15px); margin-bottom: 20px;
}
.tabor_close-btn { margin-top: 20px; }
.zajezdnie_close-btn:hover, .tabor_close-btn:hover { background-color: #555; }
body.zajezdnie_details-mode .zajezdnie_close-btn,
body.tabor_details-mode .tabor_close-btn { animation: fadeInButton 0.5s forwards 0.7s; }

/* Tabor Specifics */
.tabor_subtiles-wrapper { display: none; flex-direction: column; gap: 2vh; width: 100%; margin-top: 2vh; }
body.tabor_details-mode .tabor_subtiles-wrapper { display: flex; }
.tabor_subtile {
    width: 100%; border-radius: 10px; box-shadow: var(--shadow-std);
    overflow: hidden; position: relative; cursor: pointer; opacity: 0;
}
body.tabor_details-mode .tabor_subtile { animation: slideInUp 0.5s ease forwards; }
body.tabor_details-mode .tabor_subtile:nth-child(1) { animation-delay: 0.1s; }
body.tabor_details-mode .tabor_subtile:nth-child(2) { animation-delay: 0.2s; }
body.tabor_details-mode .tabor_subtile:nth-child(3) { animation-delay: 0.3s; }
.tabor_subtile img { width: 100%; height: 100%; object-fit: cover; display: block; }

/* Tabor Table */
#tabor_tableHeader {
    margin-top: 0; margin-bottom: 10px; cursor: pointer; display: flex; justify-content: space-between; align-items: center;
}
#tabor_tableHeader::after { content: '▲'; font-size: 1rem; margin-left: 10px; transition: transform 0.3s; }
#tabor_tableHeader.collapsed::after { content: '▼'; }

.tabor_panel-content-scroll {
    overflow-y: visible; overflow-x: hidden; flex-grow: 0;
    padding-top: 10px; padding-bottom: 20px;
    transition: max-height 0.4s ease-in-out, opacity 0.4s ease-in-out, padding 0.4s ease-in-out; opacity: 1;
}

#tabor_wagonTable { transition: font-size 0.2s ease; }
.tabor_wagon-table { margin-top: 0; width: 100%; display: flex; flex-direction: column; gap: 8px; }
.tabor_wagon-row {
    grid-template-columns: 0.5fr 1.2fr 1.2fr 1fr 1fr 2fr 1fr;
    display: grid; gap: 10px; padding: 10px 15px; border-radius: 8px; transition: background-color 0.2s ease; align-items: center;
}
.tabor_wagon-row.header {
    background: #333; color: white; font-weight: bold; font-size: 1em !important; border-radius: 8px 8px 0 0; margin-bottom: -4px; z-index: 5;
}
.tabor_wagon-row.header > div { cursor: pointer; position: relative; display: flex; align-items: center; justify-content: space-between; }
.tabor_wagon-row.header > div::after { content: ''; font-size: 0.7em; margin-left: 5px; transition: transform 0.2s; }
.tabor_wagon-row.header > div[data-sort-direction="asc"]::after { content: '▲'; }
.tabor_wagon-row.header > div[data-sort-direction="desc"]::after { content: '▼'; }
.tabor_cell-label { display: none; font-weight: bold; color: #666; min-width: 120px; }
.tabor_wagon-row:not(.header):hover { background-color: var(--accent-yellow); color:#1f1f1f; cursor: pointer; }

/* Tabor Filter Bar */
.tabor_filter-bar {
    display: grid; grid-template-columns: 0.5fr 1.2fr 1.2fr 1fr 1fr 2fr 1fr; gap: 10px; padding: 10px 15px;
    background: var(--accent-yellow); border-radius: 8px 8px 0 0; margin-top: 10px; font-size: 0.9em; border-bottom: 2px solid #ccc;
}
.tabor_filter-bar input {
    width: 100%; padding: 6px; border: 1px solid #ced4da; border-radius: 4px; font-size: 0.9em; transition: border-color 0.2s;
}
.tabor_filter-bar input:focus { border-color: #007bff; outline: none; box-shadow: 0 0 0 0.2rem rgba(0, 123, 255, 0.25); }
.tabor_filter-placeholder { display: block; height: 32px; }

/* Galeria w Detalach */
.zajezdnie_gallery-container, .tabor_wagon-gallery-container {
    border: 2px solid #ccc; border-radius: 10px; padding: 15px; margin-top: 20px;
}
.tabor_wagon-gallery-container { display: none; flex-direction: column; width: 100%; padding-top: 10px; border: none; }
.zajezdnie_gallery-grid, .tabor_wagon-gallery-grid { display: grid; gap: 10px; margin-top: 15px; }
.zajezdnie_gallery-grid { grid-template-columns: repeat(6, 1fr); }
.tabor_wagon-gallery-grid { grid-template-columns: repeat(4, 1fr); opacity: 0; transition: opacity 0.4s ease-in-out; margin-top: 20px; }

.zajezdnie_gallery-item, .tabor_gallery-thumbnail {
    cursor: pointer; overflow: hidden; border-radius: 5px; transition: transform 0.2s, box-shadow 0.2s;
}
.zajezdnie_gallery-item { aspect-ratio: 1 / 1; }
.tabor_gallery-thumbnail { aspect-ratio: 4/3; border-radius: 8px; box-shadow: 0 2px 8px rgba(0,0,0,0.1); }
.zajezdnie_gallery-item:hover, .tabor_gallery-thumbnail:hover { transform: scale(1.05); box-shadow: 0 4px 10px rgba(0,0,0,0.3); }
.zajezdnie_gallery-item img, .tabor_gallery-thumbnail img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform 0.3s ease; }
.tabor_gallery-thumbnail:hover img { transform: scale(1.05); }

/* Buttons in Tabor Table */
.tabor_wagon-table a[onclick*="tabor_openWagonGallery"], .support_btn {
    display: inline-flex; align-items: center; justify-content: center; padding: 6px 12px;
    background: linear-gradient(135deg, #007bff, #0056b3); color: white !important; font-size: 13px; font-weight: 600;
    text-transform: uppercase; letter-spacing: 0.5px; border-radius: 6px; text-decoration: none;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2); transition: all 0.3s ease; min-width: 90px; height: 100%; text-align: center; border: none;
}
.support_btn { display: block; padding: 15px 10px; margin-top: 20px; background: linear-gradient(135deg, #28a745, #1e7e34); font-size: 1.2rem; }
.tabor_wagon-table a[onclick*="tabor_openWagonGallery"]:hover {
    background: linear-gradient(135deg, #0088ff, #0066cc); transform: translateY(-2px); box-shadow: 0 6px 15px rgba(0, 0, 0, 0.3); text-decoration: none !important; cursor: pointer;
}
.support_btn:hover { background: linear-gradient(135deg, #218838, #1c7430); transform: translateY(-2px); box-shadow: 0 6px 15px rgba(0, 0, 0, 0.3); text-decoration: none; }
.tabor_gallery-btn::before { content: "📷"; margin-right: 6px; font-size: 14px; }
.tabor_gallery-close-btn {
    display: inline-block; padding: 10px 25px; background-color: #d9534f; color: white;
    text-decoration: none; border-radius: 5px; cursor: pointer; transition: background 0.3s;
}
.tabor_gallery-close-btn:hover { background-color: #c9302c; }

/* --- PĘTLE I WSPARCIE --- */
.loop_section { display: flex; flex-wrap: wrap; gap: 20px 5%; padding-top: 20px; }
.loop_row { display: flex; width: 100%; gap: 20px 5%; min-height: 200px; align-items: stretch; }
.loop_image_box {
    width: 45%; flex-shrink: 0; box-shadow: 0 4px 15px rgba(0,0,0,0.08); padding: 15px;
    display: flex; flex-direction: column; align-items: center; justify-content: center;
    opacity: 0; transform: translateX(-50vw); animation: slideIn 0.5s forwards;
    border-right: 4px solid var(--accent-green); border-top: 4px solid var(--accent-green);
}
.loop_details_box {
    width: 50%; background: var(--glass-bg); border-left: 4px solid var(--accent-yellow);
    border-bottom: 4px solid var(--accent-yellow); color: #ccc; flex-shrink: 0;
    box-shadow: 0 4px 15px rgba(0,0,0,0.08); padding: 15px 25px; opacity: 0;
    transform: translateX(50vw); animation: slideInRight 0.5s forwards;
}

.wsparcie_main_columns {
    display: flex; flex-wrap: nowrap; max-width: 1600px; margin: 0 auto; padding: 0 5% 8vh; gap: 4%; align-items: flex-start;
}
.wsparcie_left_column { flex: 1 1 68%; min-width: 0; }
.wsparcie_right_column { flex: 0 0 28%; max-width: 420px; }
.wsparcie_btn {
    display: inline-block; padding: 18px 40px; margin: 15px; font-size: 1.3rem; font-weight: 600;
    text-transform: uppercase; letter-spacing: 0.8px; border-radius: 10px; text-decoration: none; color: white;
    box-shadow: 0 6px 15px rgba(0,0,0,0.2); transition: all 0.3s ease; min-width: 300px;
}
.wsparcie_btn.buycoffee { background: var(--accent-green); }
.wsparcie_btn.patronite { background: var(--accent-yellow); }
.wsparcie_btn:hover { transform: translateY(-4px); box-shadow: 0 12px 25px rgba(0,0,0,0.3); }

/* --- KOMUNIKATY --- */
.komunikaty-section { width: 100%; margin: 30px auto; padding: 0 10px; }
.komunikaty-header { border-left: 4px solid var(--accent-yellow); padding-left: 15px; margin-bottom: 20px; color: var(--text-white); }
.komunikat-row { display: flex; width: 100%; margin-bottom: 20px; gap: 30px; }
.komunikat-thumb { width: 20%; border-top: 4px solid var(--accent-yellow); border-left: 4px solid var(--accent-yellow); overflow: hidden; }
.komunikat-thumb img { width: 100%; height: auto; display: block; padding: 10px; }
.komunikat-body {
    width: 80%; background: var(--glass-bg); padding: 15px; border-bottom: 4px solid var(--accent-green);
    border-right: 4px solid var(--accent-green); color: var(--text-white); display: flex; flex-direction: column; justify-content: space-between;
}
.komunikat-text { font-size: 1rem; line-height: 1.5; }
.komunikat-date { font-size: 0.8rem; color: var(--text-gray); margin-top: 10px; }
.toggle-btn { color: var(--accent-yellow); cursor: pointer; margin-top: 10px; font-weight: bold; display: inline-block; text-decoration: underline; }
.full-text { display: none; }

/* =======================================================
   5. LIGHTBOXY I MODALE
   ======================================================= */
/* Generic Lightbox Structure */
.zajezdnie_lightbox, .tabor_lightbox, #modal_lightbox, #gazety_lightbox, #lightbox {
    position: fixed; top: 0; left: 0; width: 100%; height: 100%; z-index: 1000;
    background-color: rgba(0,0,0,0.9); backdrop-filter: blur(5px);
    display: none; justify-content: center; align-items: center;
}
#modal_lightbox { opacity: 0; visibility: hidden; transition: opacity 0.3s, visibility 0.3s; z-index: 9999; }
#modal_lightbox.show { opacity: 1; visibility: visible; }
.zajezdnie_lightbox.active, .tabor_lightbox.active { display: block; animation: fadeIn 0.4s; }

.zajezdnie_lightbox-content, .tabor_lightbox-content {
    margin: auto; display: block; width: 80%; max-width: 1200px; max-height: 90vh;
    object-fit: contain; border-radius: 10px; transition: opacity 0.3s ease-in-out;
}
.zajezdnie_lightbox.active .zajezdnie_lightbox-content,
.tabor_lightbox.active .tabor_lightbox-content { animation: zoom 0.4s; }

/* Gazety Lightbox - Kolumnowy na Desktopie */
.gazety_lightbox-overlay {
    position: fixed; z-index: 1000; left: 0; top: 0; width: 100%; height: 100%;
    overflow: hidden; background-color: rgba(0,0,0,0.9); display: flex; justify-content: center;
    opacity: 0; transition: opacity 0.3s ease;
}
.gazety_lightbox-overlay.show { opacity: 1; }
.gazety_lightbox-content {
    background-color: #fefefe; margin-top: 10px; padding: 20px; border-radius: 8px;
    width: 90vw; color: #2a2a2a; max-width: 90vw; max-height: 90vh; position: relative;
    transform: scale(0.95); transition: transform 0.3s ease; display: flex; flex-direction: column; overflow-y: auto;
}
.gazety_lightbox-overlay.show .gazety_lightbox-content { transform: scale(1); }
/* Specific layout for Gazety (Articles) - Side by Side */
.gazety_lightbox-media { display: flex; justify-content: space-between; gap: 20px; width: 100%; flex-grow: 1; }
#lightbox_image_container { width: 50%; flex-shrink: 0; max-height: 80vh; border: 1px solid #ccc; border-radius: 5px; position: relative; overflow: auto; }
#lightbox_image { width: 100%; height: auto; object-fit: contain; display: block; }
#lightbox_transcription_wrapper { width: 50%; flex-shrink: 0; display: flex; margin-top: -40px; flex-direction: column; max-height: 80vh; }
.gazety_lightbox-transcription {
    width: 100%; flex-grow: 1; background-color: #eee; padding: 5px; padding-right: 40px;
    text-align: left; overflow-y: auto; border: 1px solid #ccc; border-radius: 5px;
    white-space: normal; font-size: 0.95rem;
}
.gazety_lightbox-transcription mark { background-color: #FFD700; color: #333; padding: 0 2px; border-radius: 2px; }

/* Nawigacja w Lightboxach */
.gazety_lightbox-prev, .gazety_lightbox-next, .zajezdnie_lightbox-arrow, .lightbox-nav {
    cursor: pointer; position: fixed; top: 50%; transform: translateY(-50%);
    color: var(--accent-green); font-weight: bold; z-index: 1002; transition: 0.3s ease; user-select: none;
}
.gazety_lightbox-prev, .gazety_lightbox-next {
    width: 30px; height: 60px; display: flex; justify-content: center; align-items: center;
    font-size: 30px; background-color: rgba(0,0,0,0.4);
}
.zajezdnie_lightbox-arrow { font-size: 60px; opacity: 0.7; padding: 10px; }
.lightbox-nav { font-size: 3em; padding: 10px 20px; background: rgba(0, 0, 0, 0.5); border-radius: 5px; }

.gazety_lightbox-prev { left: 0; border-radius: 0 3px 3px 0; }
.gazety_lightbox-next { right: 0; border-radius: 3px 0 0 3px; }
#zajezdnie_lightbox-prev { left: 25px; }
#zajezdnie_lightbox-next { right: 25px; }
#lightbox-prev { left: 10px; }
#lightbox-next { right: 10px; }

.gazety_lightbox-prev:hover, .gazety_lightbox-next:hover, .zajezdnie_lightbox-arrow:hover { color: var(--accent-yellow); opacity: 1; }
.lightbox-nav:hover { background: rgba(0, 0, 0, 0.8); transform: translateY(-50%) scale(1.1); }

/* =======================================================
   6. ANIMACJE (KEYFRAMES)
   ======================================================= */
@keyframes pulse-logo {
    0%, 100% { transform: scale(1); opacity: 0.8; }
    50% { transform: scale(1.1); opacity: 1; }
}
@keyframes loader-ring {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}
@keyframes slideIn {
    from { opacity: 0; transform: translateX(-100vw); }
    to { opacity: 1; transform: translateX(0); }
}
@keyframes slideInRight {
    from { opacity: 0; transform: translateX(100vw); }
    to { opacity: 1; transform: translateX(0); }
}
@keyframes slideInUp {
    from { opacity: 0; transform: translateY(40px); }
    to { opacity: 1; transform: translateY(0); }
}
@keyframes fadeInButton {
    to { opacity: 1; transform: translateY(0); }
}
@keyframes fadeIn {
    from { opacity: 0; } to { opacity: 1; }
}
@keyframes zoom {
    from { transform: scale(0.1); } to { transform: scale(1); }
}
/* Scalone animacje revealUp */
@keyframes revealUp {
    from { opacity: 0; transform: translateY(60px); }
    to { opacity: 1; transform: translateY(0); }
}
.gazety_reveal-up, .animate-on-scroll.is-visible { animation: revealUp 0.7s ease-out forwards; }
/* Mapowania dla JS (zachowane dla kompatybilności skryptów) */
@keyframes gazety_revealUp { from { opacity: 0; transform: translateY(60px); } to { opacity: 1; transform: translateY(0); } }
@keyframes historia_revealUp { from { opacity: 0; transform: translateY(60px); } to { opacity: 1; transform: translateY(0); } }
@keyframes zajezdnie_revealUp { from { opacity: 0; transform: translateY(60px); } to { opacity: 1; transform: translateY(0); } }
@keyframes pocztowki_revealUp { from { opacity: 0; transform: translateY(60px); } to { opacity: 1; transform: translateY(0); } }
@keyframes slideInUpGazety { to { transform: translateY(0); opacity: 1; } }
@keyframes slideInUpHistoria { to { transform: translateY(0); opacity: 1; } }
@keyframes slideInUpPocztowki { from { opacity: 0; transform: translateY(20px); } to { opacity: 1; transform: translateY(0); } }

/* =======================================================
   7. MEDIA QUERIES
   ======================================================= */
/* --- TABLET/DESKTOP BREAKPOINT (900px) --- */
@media (max-width: 900px) {
    :root { --sidebar-width: 70vw; }
    .logo-icon-box { display: none; }
    nav { justify-content: space-between; padding: 15px 20px; }
    .logo-icon-box2 { display: flex; align-items: center; order: 1; margin: 0; flex-grow: 0; }
    .logo-icon-box2 img { width: auto; height: 100px; padding-bottom: 10px; }
    .hamburger { display: block; position: static; margin: 0; order: 2; }
    nav ul {
        flex-direction: column; width: calc(100% + 40px); margin-left: -20px; margin-right: -20px;
        background-color: #2a2a2a; box-shadow: 0 5px 10px rgba(0,0,0,0.5); max-height: 0; overflow: hidden;
        opacity: 0; transition: max-height 0.4s cubic-bezier(0.8, 0, 0.2, 1), opacity 0.3s ease-in; order: 3;
    }
    nav ul li { width: 100%; text-align: center; border-bottom: 1px solid #333; }
    nav ul li:hover { background-color: var(--accent-green); }
    nav ul li:last-child { border-bottom: none; }
    nav a { display: block; padding: 15px 0; color: var(--text-white); }
    nav ul li:hover a { color: var(--bg-color) !important; }
    nav.open ul { max-height: 1500px; opacity: 1; padding: 10px 0; z-index: 500; }
    
    .hero { flex-direction: column; margin-top: 0px; }
    .hero-left, .hero-right { width: 100%; margin-left: 0; margin-top: 0px; }
    .wireframe-tram { display: none; }
    .grid-container { grid-template-columns: repeat(1, 1fr); gap: 15px; }
    .tile-title { font-size: 18px; }
    .footer-content { flex-direction: column; gap: 10px; }
    .footer-deco-left, .footer-deco-right { display: none !important; visibility: hidden !important; opacity: 0 !important; }
    .site-logo { margin-bottom: 0; justify-content: center; width: 100%; }
    .logo-icon-box { margin-right: 10px; }
    .logo-text { font-size: 24px; }
    .logo-img { height: auto; width: 100%; }
    .text-box, .text-box2 { width: 100%; max-width: 100%; }
    /* Modal UC */
    .modal-overlay-uc { align-items: flex-start; padding-top: 50px; }
    .modal-content-uc { margin: 0 auto; max-height: 500px; z-index: 9999; }
    /* Bilety / Kontakt fix */
    .wsparcie_main_columns { flex-direction: column; }
    .wsparcie_left_column, .wsparcie_right_column { flex: 0 0 100%; max-width: 100%; width: 100%; }
    .bilety-img-side { margin-bottom: 20px; order: -1; }
    .content_section#section_1 { justify-content: center; padding: 20px; background-position: center left; }
    #contact_info_panel { max-width: 100%; margin: 0; }
    .wsparcie_right_column { order: -1; margin-bottom: 30px; }
    .wsparcie_right_panel { position: static; }
}

@media (min-width: 901px) {
    .logo-icon-box2, .hamburger { display: none; }
    nav { justify-content: center; text-align: center; }
    .wsparcie_main_columns { display: flex; flex-wrap: nowrap; }
    .wsparcie_right_column { flex: 0 0 28%; max-width: 420px; }
}

/* --- MOBILE BREAKPOINT (768px) --- */
@media (max-width: 768px) {
    .gazety_intro-box, .pocztowki_intro-box { flex-direction: column; padding: 20px; gap: 20px; }
    .gazety_intro-text, .pocztowki_intro-text { flex-basis: auto; text-align: center; }
    .gazety_intro-image-container, .pocztowki_intro-image-container { flex-basis: auto; }
    .gazety_intro-text h2, .pocztowki_intro-text h2 { font-size: 2rem; }

    .text-box4 { flex-direction: column; padding: 20px; gap: 20px; }
    .historia_split-container { flex-direction: column; }
    .historia_text-column { flex: 1 1 100%; max-width: 100%; }
    .historia_images-column { flex-direction: column; width: 100%; }
    .historia_image-card { width: 100%; }
    .historia_tile { width: 48%; height: 40vw; margin-bottom: 10px; }
    .historia_text-controls-bottom { flex-direction: column; }
    body.historia_details-mode .historia_mobile_top_nav { display: flex; flex-direction: row; justify-content: center; align-items: center; flex-wrap: wrap; gap: 10px; }
    #historia_textFieldset legend .historia_legend-controls, #historia_textFieldset legend .desktop-only { display: none !important; }
    #historia_textFieldset legend { flex-direction: column; justify-content: center; }

    .gazety_gallery-grid, .pocztowki_gallery-grid { grid-template-columns: repeat(2, 1fr); gap: 15px; padding: 10px; }
    
    .zajezdnie_fieldset, .tabor_fieldset { padding: 10px; }
    .zajezdnie_fieldset legend, .tabor_fieldset legend { font-size: 1.2rem; }
    .zajezdnie_tile, .tabor_tile { width: 100%; height: 30vh; margin-bottom: 20px; animation-duration: 0.5s; }
    
    body.zajezdnie_details-mode .zajezdnie_container,
    body.tabor_details-mode .tabor_container { flex-direction: column; flex-wrap: nowrap; }
    body.zajezdnie_details-mode .zajezdnie_tile:not(.active),
    body.tabor_details-mode .tabor_tile:not(.active) { display: none !important; }
    
    .zajezdnie_active-tile-wrapper, .tabor_active-tile-wrapper { width: 100%; margin-right: 0; margin-bottom: 20px; order: 1; }
    .tabor_subtiles-wrapper { order: 99; width: 100%; }
    
    body.zajezdnie_details-mode .text-box3,
    body.tabor_details-mode .text-box3 { order: 2; padding: 20px; width: 100%;}
    
    .zajezdnie_gallery-grid, .tabor_wagon-gallery-grid { grid-template-columns: 1fr; gap: 15px; }
    .zajezdnie_close-btn, .tabor_close-btn { align-self: flex-start; order: 99; }
    
    .tabor_panel-content-scroll { display: none; }
    .text-box3:not(.collapsed) .tabor_panel-content-scroll { display: block; }
    .tabor_filter-bar { display: none; }
    .text-box3:not(.collapsed) .tabor_filter-bar { display: flex; flex-direction: column; margin-bottom: 10px; }
    .text-box3.collapsed #tabor_tableHeader::after { content: 'Rozwiń ▼'; }
    #tabor_tableHeader::after { content: 'Zwiń ▲'; }
    
    .tabor_wagon-row { display: flex; flex-direction: column; padding: 15px; margin-bottom: 15px; border: 1px solid #ddd; align-items: normal; }
    .tabor_wagon-row.header { display: none !important; }
    .tabor_wagon-row > div { display: flex; justify-content: space-between; padding: 3px 0; border-bottom: 1px dotted #eee; }
    .tabor_cell-label { display: block; margin-right: 10px; flex-shrink: 0;}
	.tabor_cell-label:hover {color: #1f1f1f;}
    
    .gazety_lightbox-content, .zajezdnie_lightbox-content, .tabor_lightbox-content { width: 100%; height: 100%; border-radius: 0; padding: 10px; }
    .gazety_lightbox-media { flex-direction: column; gap: 10px; }
    #lightbox_image_container, #lightbox_transcription_wrapper { width: 100%; max-height: 40vh; }
    .gazety_lightbox-prev, .gazety_lightbox-next { top: 30%; font-size: 20px; width: 25px; height: 45px; }

    .main_wrapper { flex-direction: column; padding: 2vh 2.5%; width: 100%; max-width: none; align-items: stretch; }
    .left_column, .right_column { width: 100%; margin: 0; padding: 0; }
    .right_column { order: -1; margin-bottom: 20px; }
    
    .loop_row { display: flex !important; flex-direction: column-reverse !important; gap: 0 !important; height: auto !important; margin-bottom: 40px !important; }
    .loop_image_box, .loop_details_box { width: 100% !important; max-width: 100% !important; transform: none !important; opacity: 1 !important; animation: none !important; }
    .komunikat-row { flex-direction: column; gap: 0; }
    .komunikat-thumb, .komunikat-body { width: 100%; }
    
    .animate-on-scroll, h2, h3, p, img { opacity: 1 !important; transform: none !important; animation: none !important; visibility: visible !important; }
    
    #lightbox-close { top: -15px; right: -10px; width: 35px; height: 35px; font-size: 24px; line-height: 32px; }
    #lightbox-content { max-width: 95%; border-width: 2px; }
    
    .table-container thead { display: none; }
    .table-container tr { display: block; margin-bottom: 20px; border: 1px solid #444; border-radius: 10px; background: rgba(40, 40, 40, 0.8); padding: 10px; }
    .table-container td { display: flex; justify-content: space-between; align-items: center; border-bottom: 1px solid #555; padding: 10px 0; }
    .table-container td::before { content: attr(data-label); font-weight: bold; color: var(--accent-yellow); margin-right: 10px; }
    .table-container td:last-child { border-bottom: none; }
}

@media (min-width: 769px) {
    .historia_mobile_top_nav { display: none !important; }
    body.zajezdnie_details-mode .zajezdnie_container, body.tabor_details-mode .tabor_container { flex-wrap: nowrap; gap: 0; }
    body.zajezdnie_details-mode .zajezdnie_tile:not(.active), body.tabor_details-mode .tabor_tile:not(.active) { display: none !important; }
    body.zajezdnie_details-mode .zajezdnie_tile.active::before, body.tabor_details-mode .tabor_tile.active::before { background-color: transparent; }
    .text-box3 > .zajezdnie_close-btn, .text-box3 > .tabor_close-btn { align-self: flex-start; }
    #tabor_wagonTable.collapsed { display: flex !important; }
    #tabor_tableHeader::after { content: '▲'; }
    #tabor_tableHeader.collapsed::after { content: '▼'; }
}

/* =========================================================================
   8. FIXY DLA PODSTRON I MODAL "W BUDOWIE"
   ========================================================================= */
.bilety-img-side { width: 100%; border-radius: 12px; box-shadow: 0 4px 15px rgba(0,0,0,0.3); display: block; height: auto; }
.bilety-col-60 .text-box4a, .bilety-col-60 .text-box5 { display: block !important; width: 100%; }

.table-container table { width: 100%; border-collapse: collapse; margin-top: 15px; background: rgba(0, 0, 0, 0.2); border-radius: 8px; overflow: hidden; }
.table-container th, .table-container td { padding: 12px 15px; text-align: left; border-bottom: 1px solid rgba(255, 255, 255, 0.1); }
.table-container th { background-color: var(--accent-green); color: white; font-weight: bold; }
.table-container tr:last-child td { border-bottom: none; }
.table-container tr:hover { background-color: rgba(255, 255, 255, 0.05); }

/* Pocztówki Mapa */
.map-container { position: relative; width: 100%; margin: 30px auto; box-shadow: 0 8px 25px rgba(0,0,0,0.5); border-radius: 4px; overflow: hidden; }
.map-container img { display: block; width: 100%; height: auto; }
.map-container svg { position: absolute; top: 0; left: 0; width: 100%; height: 100%; z-index: 10; }
.map-area { fill: transparent; cursor: pointer; transition: fill 0.2s, stroke 0.2s; }
.map-area:hover { fill: rgba(254, 207, 9, 0.4); stroke: var(--accent-yellow); stroke-width: 3px; }
#area-tooltip {
    position: absolute; background: rgba(0,0,0,0.9); color: white; padding: 8px 12px;
    border-radius: 4px; font-size: 14px; pointer-events: none; z-index: 20; white-space: nowrap;
    border: 1px solid var(--accent-yellow); box-shadow: 0 4px 10px rgba(0,0,0,0.5);
}

/* Access Form */
.access-form-container {
    background: #2a2a2a; padding: 30px; border-radius: 10px; border: 1px solid var(--accent-yellow);
    max-width: 600px; margin: 40px auto; text-align: center;
}
.access-form-container input { padding: 10px; font-size: 16px; border-radius: 5px; border: 1px solid #555; background: #fff; color: #000; }
.access-form-container button {
    padding: 10px 20px; background: var(--accent-yellow); border: none; border-radius: 5px;
    color: #000; font-weight: bold; cursor: pointer; margin-left: 10px;
}
.access-form-container button:hover { background: #e6bc08; }

/* Kontakt */
.main_wrapper .text-box4 { display: block; width: 100%; margin: 0 auto; padding: 0; background: transparent; border: none; box-shadow: none; }
.content_section#section_1 {
    position: relative; background-image: url('/images_web/kontakt_tlo.jpg'); background-size: cover; background-position: center;
    border-radius: 12px; overflow: hidden; padding: 50px; min-height: 500px; display: flex; align-items: center; justify-content: center;
}
#contact_info_panel {
    background: rgba(255, 255, 255, 0.95); padding: 30px; border-radius: 10px;
    max-width: 1200px; width: 100%; color: #333; box-shadow: 0 10px 30px rgba(0,0,0,0.3);
}
#contact_info_panel h2 { color: #146b3a; border-bottom: 2px solid #146b3a; display: inline-block; }
#contact_info_panel p { color: #333; font-size: 16px; }
#contact_info_panel a { color: #146b3a; font-weight: bold; }

/* Wsparcie */
#wsparcie_header_img { width: 100%; max-height: 400px; object-fit: cover; border-radius: 0 0 15px 15px; margin-bottom: 40px; }
.wsparcie_right_panel { background: white; color: #333; padding: 20px; border-radius: 10px; position: sticky; top: 20px; text-align: center; }
.wsparcie_right_panel h3 { color: #146b3a; }

/* Fallback widoczności */
.text-box4, .text-box4a, .text-box5, .content_section, .animate-on-scroll { opacity: 1 !important; transform: none !important; animation: none !important; }
.text-box4.visible, .text-box4a.visible, .text-box5.visible, .animate-on-scroll.is-visible { animation: revealUp 0.8s ease-out forwards !important; }

/* Nowy Modal "W budowie" */
.modal-overlay-uc { 
    margin-top: 0; /* Zresetowane, bo pozycja fixed na całym ekranie */
    padding-top: 100px; /* Modal trochę niżej od góry */
    backdrop-filter: blur(8px); 
    background-color: rgba(0, 0, 0, 0.95) !important; /* Mocne tło */
    position: fixed !important; 
    top: 0; 
    left: 0; 
    width: 100%; 
    height: 100%; 
    z-index: 2147483647 !important; /* Max Z-Index */
    display: flex;
    justify-content: center;
    align-items: flex-start;
}
.modal-content-uc {
    background-color: var(--bg-dark-secondary); color: #e0e0e0; border: none; border-bottom: 4px solid var(--accent-yellow);
    border-radius: 12px; box-shadow: 0 20px 50px rgba(0, 0, 0, 0.9); max-width: 500px; width: 90%;
    margin: 0; position: relative; overflow: hidden; text-align: center; padding: 40px 30px 30px;
    z-index: 2147483648 !important; /* Nad tłem */
}
.modal-content-uc::before {
    content: ''; display: block; height: 15px; width: 100%; position: absolute; top: 0; left: 0;
    background: repeating-linear-gradient(45deg, var(--accent-yellow), var(--accent-yellow) 15px, #111 15px, #111 30px);
}
.modal-content-uc h2 { color: var(--accent-yellow); font-size: 2.2rem; margin: 10px 0 15px; text-transform: uppercase; letter-spacing: 1px; font-weight: 800; }
.modal-content-uc p { color: #ccc; font-size: 1.1rem; line-height: 1.6; margin-bottom: 20px; }
.modal-date-uc {
    display: block; width: fit-content; margin: 20px auto !important; padding: 15px 30px;
    background: rgba(255, 255, 255, 0.05); border: 1px dashed var(--accent-yellow);
    border-radius: 8px; color: #fff !important; font-weight: normal; font-size: 1.1rem; line-height: 1.4;
}
.modal-date-uc br { display: block; margin-bottom: 5px; }
.close-btn-uc {
    background-color: var(--accent-green); color: white; border: none; padding: 16px 32px;
    font-size: 1rem; font-weight: bold; text-transform: uppercase; letter-spacing: 1px;
    border-radius: 6px; cursor: pointer; transition: all 0.3s ease; box-shadow: 0 4px 15px rgba(76, 175, 80, 0.3);
    width: 100%; margin-top: 10px;
}
.close-btn-uc:hover { background-color: #43a047; transform: translateY(-3px); box-shadow: 0 6px 20px rgba(76, 175, 80, 0.5); }
@media (max-width: 600px) { .modal-content-uc { padding: 30px 20px 20px; } .modal-content-uc h2 { font-size: 1.8rem; } }

/* Font Size Controls */
.historia_font-size-btn, .gazety_text_control_btn, #tabor_textControls button, #zajezdnie_textControls button {
    display: inline-flex; justify-content: center; align-items: center; width: 32px; height: 32px; margin-left: 5px;
    background-color: var(--bg-charcoal); border: 1px solid #999; color: white; font-size: 1.2rem;
    font-weight: bold; line-height: 1; border-radius: 4px; cursor: pointer; transition: all 0.2s ease-in-out;
    padding: 0; vertical-align: middle; user-select: none;
}

.back_btn {
    display: inline-flex; justify-content: center; align-items: center; width: auto; margin-left: 5px;
    background-color: var(--bg-charcoal); border: 1px solid #999; color: white; font-size: 1.2rem;
    font-weight: bold; line-height: 1; border-radius: 4px; cursor: pointer; transition: all 0.2s ease-in-out;
    padding: 5px; vertical-align: middle; user-select: none;
}

.historia_font-size-btn:hover, .gazety_text_control_btn:hover, #tabor_textControls button:hover, #zajezdnie_textControls button:hover, .back_btn:hover {
    background-color: var(--accent-yellow); color: #121212; border-color: var(--accent-yellow); transform: translateY(-2px); box-shadow: 0 4px 8px rgba(0,0,0,0.3);
}
.historia_font-size-btn:active, .gazety_text_control_btn:active, #tabor_textControls button:active, #zajezdnie_textControls button:active, .back_btn:active {
    transform: translateY(0); box-shadow: none;
}
#tabor_textControls, #zajezdnie_textControls, .historia_font-size-controls, #gazety_text_controls { display: flex; align-items: center; }
#gazety_text_controls { justify-content: flex-end; margin: 0 10px 10px 0; }
.tabor_control-label, #zajezdnie_textControls span { color: #ccc; margin-right: 5px; margin-bottom: 0px;
}


/* =======================================================
   9. POPRAWKI FINALNE: BILETY, TABOR, POCZTÓWKI
   ======================================================= */

/* 1. BILETY - KOLUMNY OBOK SIEBIE (DESKTOP) */
.bilety-row {
    display: flex !important;
    flex-direction: row !important;
    flex-wrap: nowrap;
    align-items: center;
    gap: 30px;
    width: 100%;
}
@media (min-width: 901px) {
    .bilety-col-40 { flex: 0 0 40% !important; max-width: 40% !important; }
    .bilety-col-60 { flex: 0 0 60% !important; max-width: 60% !important; }
}
@media (max-width: 900px) {
    .bilety-row { flex-direction: column !important; }
    .bilety-col-40, .bilety-col-60 { flex: 0 0 100% !important; max-width: 100% !important; }
}

/* 2. TABOR LIGHTBOX - UKŁAD PIONOWY, PODPIS POD ZDJĘCIEM */
#tabor_lightbox, #zajezdnie_lightbox {
    display: none;
    position: fixed; top: 0; left: 0; width: 100%; height: 100%;
    background: rgba(0,0,0,0.9); z-index: 1000;
    flex-direction: column; /* Zdjęcie nad opisem */
    justify-content: center;
    align-items: center;
    padding-top: 50px; /* Lekkie odsunięcie od góry */
}
#tabor_lightbox.active, #zajezdnie_lightbox.active { display: flex !important; }

/* Zdjęcie w Taborze (ma klasę .tabor_lightbox-content w PHP) */
img.tabor_lightbox-content {
    display: block;
    max-width: 90vw;
    max-height: 80vh;
    border: 3px solid var(--accent-yellow);
    border-radius: 8px;
    object-fit: contain;
    background: #000;
    margin-bottom: 10px;
}

/* Podpis w Taborze (ma ID #tabor_caption w PHP) */
#tabor_caption {
    display: block;
    color: #fff;
    background: rgba(30,30,30, 0.9);
    padding: 10px 20px;
    border-radius: 5px;
    text-align: center;
    font-size: 1.1rem;
    max-width: 90vw;
}

/* Strzałki i krzyżyk dla Taboru (są bezpośrednio w kontenerze) */
#tabor_lightbox #lightbox-close { /* Krzyżyk w tabor.php ma ID lightbox-close */
    position: absolute; top: 20px; right: 20px;
    font-size: 40px; color: #fff; cursor: pointer; z-index: 1001;
}
#tabor_lightbox .zajezdnie_lightbox-arrow, 
#zajezdnie_lightbox .zajezdnie_lightbox-arrow {
    position: absolute; top: 50%; transform: translateY(-50%);
    font-size: 50px; color: var(--accent-green); cursor: pointer; z-index: 1001;
    background: rgba(0,0,0,0.5); padding: 10px; border-radius: 5px;
}
#tabor_lightbox #zajezdnie_lightbox-prev, #zajezdnie_lightbox #zajezdnie_lightbox-prev { left: 20px; }
#tabor_lightbox #zajezdnie_lightbox-next, #zajezdnie_lightbox #zajezdnie_lightbox-next { right: 20px; }


/* 3. POCZTÓWKI LIGHTBOX (Generyczne #lightbox w PHP) - PODPIS POD ZDJĘCIEM */
#lightbox {
    display: none;
    position: fixed; top: 0; left: 0; width: 100%; height: 100%;
    background: rgba(0,0,0,0.9); z-index: 1000;
    flex-direction: column; /* Wymuszenie pionu */
    justify-content: center; 
    align-items: center;
    padding-top: 50px;
}
#lightbox.show { display: flex !important; }

/* Wrapper treści w pocztówkach (#lightbox-content) */
#lightbox-content {
    position: relative; /* To sprawia, że elementy absolute wewnątrz pozycjonują się względem TEGO diva */
    width: fit-content; /* Div dopasuje szerokość do obrazka */
    height: fit-content; /* Div dopasuje wysokość do obrazka */
    max-width: 90vw;     /* Zabezpieczenie szerokości */
    max-height: 90vh;    /* Zabezpieczenie wysokości */
    display: flex;       /* Usuwa dziwne odstępy pod obrazkiem */
    justify-content: center;
    align-items: center;
    margin: auto;        /* Wyśrodkowanie w flexboxie rodzica (#lightbox) */
    background: transparent; /* Upewnij się, że tło nie zasłania */
    border-radius: 8px;  /* Opcjonalne zaokrąglenie */
}

/* Podpis w pocztówkach (#lightbox-caption - rodzeństwo contentu) */
#lightbox-caption {
    margin-top: 15px;
    color: #eee;
    text-align: center;
    font-size: 1.1rem;
    background: rgba(0, 0, 0, 0.6);
    padding: 10px 20px;
    border-radius: 20px;
    max-width: 80%;
}

/* Krzyżyk w pocztówkach */
#lightbox #lightbox-close {
    position: absolute;
    top: -20px;   /* Przesunięcie w górę poza krawędź zdjęcia */
    right: -20px; /* Przesunięcie w prawo poza krawędź zdjęcia */
    
    /* Style wyglądu (możesz dostosować) */
    width: 40px;
    height: 40px;
    line-height: 40px;
    text-align: center;
    background: var(--accent-green); /* Użycie Twojego koloru zdefiniowanego w CSS */
    color: white;
    border-radius: 50%;
    font-size: 40px;
    font-weight: bold;
    cursor: pointer;
    border: 2px solid white;
    z-index: 1005;
    box-shadow: 0 0 10px rgba(0,0,0,0.5);
    transition: transform 0.3s ease, background-color 0.3s ease;
}

#tabor_lightbox #lightbox-close:hover {
    color: var(--accent-yellow); /* Zmiana koloru na żółty */
    transform: rotate(90deg); /* Powiększenie i obrót */
    text-shadow: 0 0 10px rgba(254, 207, 9, 0.6); /* Delikatna poświata */
}

/* 2. Naprawa przycisku 'X' w Pocztówkach/Ogólnym (kółko z tłem) */
#lightbox #lightbox-close {
    /* Dodajemy płynne przejście dla tła, transformacji i ramki */
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

#lightbox #lightbox-close:hover {
    background-color: var(--accent-yellow);
    transform: scale(1.1) rotate(90deg);
    color: black;
}

/* 3. Dodatkowo: Strzałki nawigacji (lewo/prawo) też warto ożywić */
.zajezdnie_lightbox-arrow, 
#tabor_lightbox .zajezdnie_lightbox-arrow {
    transition: all 0.3s ease;
}

.zajezdnie_lightbox-arrow:hover, 
#tabor_lightbox .zajezdnie_lightbox-arrow:hover,
#zajezdnie_lightbox .zajezdnie_lightbox-arrow:hover {
    color: var(--accent-yellow);
    transform: translateY(-50%) scale(1.2); 
    background: rgba(0,0,0,0.8);
}

/* =======================================================
   FIX: ANIMACJE I HOVER DLA GAZETY LIGHTBOX (ARTYKUŁY)
   ======================================================= */

/* 1. Przycisk zamknięcia 'X' w Gazetach */
#gazety_lightbox #lightbox-close {
    position: absolute;
    top: 10px;
    right: 20px;
    font-size: 2.5rem; /* Duży, wyraźny X */
    font-weight: bold;
    color: #333; /* Ciemny kolor, bo tło w gazetach jest jasne (#fefefe) */
    cursor: pointer;
    line-height: 1;
    z-index: 1005;
    /* Kluczowe dla animacji: */
    transition: transform 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275), color 0.3s ease;
}

/* Stan po najechaniu myszką */
#gazety_lightbox #lightbox-close:hover {
    color: var(--accent-yellow); /* Zmiana na żółty */
    transform: rotate(90deg); /* Powiększenie i obrót */
}

/* 2. Strzałki nawigacji w Gazetach (Lewo/Prawo) */
#gazety_lightbox .gazety_lightbox-prev,
#gazety_lightbox .gazety_lightbox-next {
    /* Dodajemy płynność */
    transition: all 0.3s ease;
    background-color: rgba(0,0,0,0.1); /* Delikatne tło domyślne */
}

#gazety_lightbox .gazety_lightbox-prev:hover,
#gazety_lightbox .gazety_lightbox-next:hover {
    background-color: var(--accent-yellow); /* Żółte tło po najechaniu */
    color: #121212; /* Ciemna strzałka dla kontrastu */
    transform: translateY(-50%); /* Lekkie powiększenie */
    box-shadow: 0 0 15px rgba(254, 207, 9, 0.4); /* Poświata */
}

/* Korekta dla mobilnych (żeby X nie wchodził na tekst) */
@media (max-width: 768px) {
    #gazety_lightbox #lightbox-close {
        top: 5px;
        right: 10px;
        font-size: 2rem;
        color: #555;
    }
}
.home-content-wrapper {
    width: 100%;
    /* Zapewnia, że animacja wewnątrz wrapper'a będzie widoczna */
    display: block; 
}

/* Kontener wewnątrz lightboxa taboru - pozycjonuje krzyżyk */
#tabor_lightbox-inner, #zajezdnie_lightbox-inner, #historia_lightbox-inner, #pocztowki_lightbox-inner {
    position: relative;
    width: fit-content;
    height: fit-content;
    max-width: 90vw;
    max-height: 80vh; /* Zostawiamy miejsce na podpis pod spodem */
    display: flex;
    justify-content: center;
    align-items: center;
    margin: 0 auto; /* Wyśrodkowanie */
}

/* Stylizacja zdjęcia, aby nie wychodziło poza kontener */
#tabor_lightboxImage, #lightbox-image {
    display: block;
    max-width: 100%;
    max-height: 80vh; /* Dopasowanie do wysokości kontenera */
    width: auto;
    height: auto;
    object-fit: contain;
    border-radius: 8px; /* Opcjonalne zaokrąglenie rogów zdjęcia */
}


/* Pozycjonowanie krzyżyka w zajezdniach */
#zajezdnie_lightbox  #lightbox-close, #tabor_lightbox  #lightbox-close {
    position: absolute;
    top: -20px;
    right: -20px;
    width: 40px;
    height: 40px;
    line-height: 40px;
    text-align: center;
    background: var(--accent-green); /* Upewnij się, że ta zmienna istnieje, jeśli nie: #4caf50 */
    color: white;
    font-size: 40px;
    font-weight: bold;
    border-radius: 50%;
    cursor: pointer;
    border: 2px solid white;
    z-index: 1005;
    box-shadow: 0 0 10px rgba(0,0,0,0.5);
    transition: transform 0.3s ease, background-color 0.3s ease;
}

#zajezdnie_lightbox #lightbox-close:hover, #tabor_lightbox #lightbox-close:hover {
    background-color: var(--accent-yellow); /* Upewnij się, że ta zmienna istnieje, jeśli nie: #fecf09 */
    color: black;
    transform: scale(1.1) rotate(90deg);
}

/* Dopasowanie na urządzenia mobilne */
@media (max-width: 768px) {
    #zajezdnie_lightbox #lightbox-close, #tabor_lightbox #lightbox-close, #lightbox #lightbox-close {
        top: -15px;
        right: -10px;
        width: 35px;
        height: 35px;
        line-height: 35px;
        font-size: 20px;
    }
}

