/* =========================================
   PRZYCISKI
   ========================================= */
.btn-install-pwa {
    background: #e74c3c;
    color: white;
    border: none;
    padding: 8px 20px;
    border-radius: 20px;
    font-size: 0.95em;
    cursor: pointer;
    font-weight: bold;
    transition: background 0.3s, transform 0.2s;
    box-shadow: 0 4px 6px rgba(0,0,0,0.2);
    font-family: inherit;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

@media (hover: hover) and (pointer: fine) {
    .btn-install-pwa:hover {
        background: #c0392b;
        transform: translateY(-2px);
    }
}

.btn-cta {
    background: var(--kolor-akcent);
    color: black; /* Kontrastowy tekst */
    border: none;
    padding: 10px 25px;
    border-radius: 25px;
    font-size: 1em;
    cursor: pointer;
    font-weight: bold;
    transition: background 0.3s, transform 0.2s, box-shadow 0.2s;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
    font-family: inherit;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

@media (hover: hover) and (pointer: fine) {
    .btn-cta:hover {
        background: #e6c200; /* Darker gold */
        transform: translateY(-2px);
        box-shadow: 0 6px 12px rgba(0,0,0,0.15);
    }
}

.btn-powiadomienia {
    background: #f39c12;
    color: white;
    border: none;
    padding: 8px 20px;
    border-radius: 20px;
    font-size: 0.95em;
    cursor: pointer;
    font-weight: bold;
    transition: background 0.3s, transform 0.2s;
    box-shadow: 0 4px 6px rgba(0,0,0,0.2);
    font-family: inherit;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

@media (hover: hover) and (pointer: fine) {
    .btn-powiadomienia:hover {
        background: #e67e22;
        transform: translateY(-2px);
    }
}

.btn-login {
    background: #2ecc71;
    color: white;
    border: none;
    padding: 8px 20px;
    border-radius: 20px;
    font-size: 0.95em;
    cursor: pointer;
    font-weight: bold;
    transition: background 0.3s, transform 0.2s;
    box-shadow: 0 4px 6px rgba(0,0,0,0.2);
    font-family: inherit;
}

@media (hover: hover) and (pointer: fine) {
    .btn-login:hover {
        background: #27ae60;
        transform: translateY(-2px);
    }
}

.btn-sort {
    background: #fdfdfd;
    border: 1px solid #ccc;
    padding: 8px 15px;
    border-radius: 20px;
    cursor: pointer;
    transition: 0.3s;
    font-family: inherit;
    font-size: 0.9em;
}

.btn-sort.aktywny {
    background: var(--kolor-glowny);
    color: white;
    border-color: var(--kolor-glowny);
}

.btn-wczytaj {
    background: var(--kolor-ciemny);
    color: white;
    padding: 10px 25px;
    border: none;
    border-radius: 20px;
    cursor: pointer;
    font-size: 1em;
    transition: 0.3s;
}

@media (hover: hover) and (pointer: fine) {
    .btn-wczytaj:hover {
        background: var(--kolor-glowny);
    }
}

.kontrolki-sekcji {
    display: flex;
    gap: 10px;
    margin-bottom: 20px;
    flex-wrap: wrap;
    justify-content: center;
}

.wczytaj-wiecej-kontener {
    text-align: center;
    margin-top: 15px;
    margin-bottom: 30px;
}

/* =========================================
   AKTUALNOŚCI (NEWS)
   ========================================= */
.news-item {
    border: 1px solid #eee;
    border-radius: 8px;
    margin-bottom: 40px; /* Increased margin */
    overflow: hidden;
    background: #fdfdfd;
    box-shadow: var(--shadow-soft); /* Added soft shadow */
    transition: transform 0.2s, box-shadow 0.2s;
}

@media (hover: hover) and (pointer: fine) {
    .news-item:hover {
        box-shadow: var(--shadow-deep);
    }
}

.news-header {
    background: #f8f9fa;
    padding: 20px 25px; /* Increased padding */
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid #eee;
}

.news-header h3 {
    margin: 0;
    color: var(--kolor-ciemny);
}

.news-data {
    font-size: 0.85em;
    color: #7f8c8d;
}

.news-body {
    padding: 25px; /* Increased padding */
}

.news-img {
    width: 100%;
    height: auto;
    max-height: 500px;
    object-fit: contain;
    border-radius: 4px;
    margin-bottom: 15px;
    cursor: pointer;
    transition: opacity 0.3s;
    background-color: #f8f9fa;
    min-height: 200px;
}

@media (hover: hover) and (pointer: fine) {
    .news-img:hover {
        opacity: 0.9;
    }
}

.news-opis {
    color: #444;
    line-height: 1.7;
}

.btn-czytaj-dalej,
.btn-zwin {
    background-color: transparent;
    color: var(--kolor-glowny);
    border: 2px solid var(--kolor-glowny);
    padding: 8px 18px;
    border-radius: 20px;
    cursor: pointer;
    font-weight: bold;
    font-size: 0.9em;
    transition: all 0.3s ease;
    margin-top: 10px;
    display: inline-block;
}

@media (hover: hover) and (pointer: fine) {
    .btn-czytaj-dalej:hover,
    .btn-zwin:hover {
        background-color: var(--kolor-glowny);
        color: white;
        transform: translateY(-2px);
    }
}

.btn-zwin {
    margin-top: 20px;
    border-color: #7f8c8d;
    color: #7f8c8d;
}

.news-wideo-kontener {
    margin: 25px 0;
    text-align: center;
}

.news-wideo {
    width: 100%;
    max-width: 700px;
    max-height: 70vh;
    object-fit: contain;
    border-radius: 8px;
    background-color: #000;
}

/* =========================================
   WYSZUKIWARKA
   ========================================= */
.wyszukiwarka-kontener {
    margin-bottom: 25px;
    text-align: center;
}

.wyszukiwarka-input {
    width: 100%;
    max-width: 400px;
    padding: 12px 20px;
    border: 2px solid #eee;
    border-radius: 25px;
    font-size: 1em;
    outline: none;
    transition: 0.3s ease;
    background-color: #fdfdfd;
}

.wyszukiwarka-input:focus {
    border-color: var(--kolor-glowny);
}

.ukryty-przez-szukaj {
    display: none !important;
}

.ukryty {
    display: none !important;
}

/* =========================================
   HARMONOGRAM I TABELE
   ========================================= */
.smieci-sekcja {
    margin-top: 30px;
    scroll-margin-top: 80px;
}

.btn-pobierz-tabelke {
    display: inline-block;
    background: var(--kolor-glowny);
    color: white;
    text-decoration: none;
    padding: 10px 25px;
    border-radius: 25px;
    font-weight: bold;
    transition: background 0.3s, transform 0.2s;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
    font-size: 1em;
}

@media (hover: hover) and (pointer: fine) {
    .btn-pobierz-tabelke:hover {
        background: var(--kolor-hover);
        transform: translateY(-2px);
    }
}

.tabela-kontener {
    overflow-x: auto;
    margin-bottom: 20px;
    border-radius: 8px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
}

.tabela-smieci {
    width: 100%;
    border-collapse: collapse;
    background: #fff;
    text-align: center;
    min-width: 650px;
}

.tabela-smieci th,
.tabela-smieci td {
    padding: 12px 15px;
    border: 1px solid #eee;
}

.tabela-smieci th {
    background-color: var(--kolor-glowny);
    color: white;
    font-weight: bold;
}

.tabela-smieci tbody tr:nth-child(even) {
    background-color: #f9f9f9;
}

@media (hover: hover) and (pointer: fine) {
    .tabela-smieci tbody tr:hover {
        background-color: #f1f7fd;
    }
}

.smieci-info {
    display: flex;
    flex-direction: column;
    gap: 15px;
    margin-top: 20px;
}

/* =========================================
   MAPY I IFRAME
   ========================================= */
.mapa-container {
    position: relative;
    padding-bottom: 56.25%;
    height: 0;
    overflow: hidden;
    border-radius: 8px;
    margin-bottom: 30px;
}

.mapa-container iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: 0;
}

/* =========================================
   ROZKŁAD JAZDY - AUTOBUSY (KARTA)
   ========================================= */
.autobusy-container {
    display: flex;
    justify-content: center;
    margin-bottom: 30px;
}

.autobusy-karta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    background: linear-gradient(135deg, #ffffff 0%, #f1f7fd 100%);
    border: 2px solid var(--kolor-glowny);
    border-radius: 15px;
    padding: 30px 35px; /* Increased padding */
    text-decoration: none;
    color: var(--kolor-ciemny);
    box-shadow: var(--shadow-soft);
    transition: transform 0.2s, box-shadow 0.2s, border-color 0.2s;
    width: 100%;
    max-width: 600px;
    position: relative;
    overflow: hidden;
}

@media (hover: hover) and (pointer: fine) {
    .autobusy-karta:hover {
        transform: translateY(-5px);
        box-shadow: var(--shadow-deep);
        border-color: var(--kolor-hover);
        background: #fdfdfd;
    }
}

.autobusy-ikona {
    font-size: 3em;
    filter: drop-shadow(2px 2px 0px rgba(0,0,0,0.1));
}

.autobusy-tekst {
    flex: 1;
    text-align: left;
}

.autobusy-tekst h3 {
    margin: 0 0 5px 0;
    font-size: 1.3em;
    color: var(--kolor-glowny);
    font-weight: bold;
}

.autobusy-tekst p {
    margin: 0;
    font-size: 0.95em;
    color: #7f8c8d;
}

.autobusy-strzalka {
    font-size: 1.5em;
    color: var(--kolor-glowny);
    font-weight: bold;
    transition: transform 0.2s;
}

@media (hover: hover) and (pointer: fine) {
    .autobusy-karta:hover .autobusy-strzalka {
        transform: translateX(5px);
    }
}

@media (max-width: 480px) {
    .autobusy-karta {
        padding: 15px;
        gap: 15px;
    }
    .autobusy-ikona {
        font-size: 2.5em;
    }
    .autobusy-tekst h3 {
        font-size: 1.1em;
    }
}

/* =========================================
   GALERIA
   ========================================= */
.galeria-foldery {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
}

.folder {
    background: #fdfdfd;
    padding: 25px 15px;
    border-radius: 10px;
    text-align: center;
    cursor: pointer;
    border: 1px solid #eee;
    transition: 0.2s;
    font-family: inherit;
    font-size: inherit;
    color: inherit;
    display: block;
    width: 100%;
}

@media (hover: hover) and (pointer: fine) {
    .folder:hover,
    .folder:focus {
        transform: translateY(-5px);
        box-shadow: 0 8px 15px rgba(0, 0, 0, 0.1);
        border-color: var(--kolor-glowny);
    }
}

.folder-ikona {
    font-size: 60px;
    margin-bottom: 10px;
}

.przycisk-powrot {
    background: var(--kolor-glowny);
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 20px;
    cursor: pointer;
    font-size: 1em;
    margin-bottom: 20px;
    transition: 0.2s;
}

@media (hover: hover) and (pointer: fine) {
    .przycisk-powrot:hover,
    .przycisk-powrot:focus {
        background: var(--kolor-hover);
    }
}

.tytul-otwartej-galerii {
    color: var(--kolor-ciemny);
    margin-bottom: 20px;
    border-bottom: 2px solid var(--kolor-glowny);
    display: inline-block;
    padding-bottom: 5px;
}

.siatka-zdjec {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 15px;
    align-items: center;
}

.siatka-zdjec img {
    width: 100%;
    height: auto;
    max-height: 300px;
    object-fit: contain;
    border-radius: 8px;
    cursor: pointer;
    transition: 0.3s;
    background-color: #f8f9fa;
    min-height: 200px;
}

@media (hover: hover) and (pointer: fine) {
    .siatka-zdjec img:hover {
        transform: scale(1.03);
    }
}

/* =========================================
   KONTAKT I RODO
   ========================================= */
.kontener-rodo {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
}

.blok-rodo {
    flex: 1 1 300px;
}

.kontakt-dane {
    text-align: center;
    margin-top: 30px;
    padding: 25px;
    background-color: #f8f9fa;
    border-radius: 8px;
    border: 1px dashed var(--kolor-glowny);
}

.kontakt-dane a {
    color: #21618C;
    text-decoration: underline;
    font-weight: bold;
    font-size: 1.2em;
}

/* =========================================
   SKELETON LOADERS
   ========================================= */
.skeleton {
    background: #e0e0e0;
    background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
    background-size: 200% 100%;
    animation: skeleton-loading 1.5s infinite linear;
    border-radius: 4px;
}

@keyframes skeleton-loading {
    0% {
        background-position: 200% 0;
    }
    100% {
        background-position: -200% 0;
    }
}

.skeleton-text {
    width: 100%;
    height: 16px;
    margin-bottom: 8px;
    border-radius: 4px;
}

.skeleton-text.short {
    width: 60%;
}

.skeleton-text.medium {
    width: 80%;
}

.skeleton-title {
    width: 70%;
    height: 24px;
    margin-bottom: 12px;
    border-radius: 4px;
}

.skeleton-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
}

.skeleton-img {
    width: 100%;
    height: 250px;
    border-radius: 8px;
    margin-bottom: 15px;
}

.skeleton-folder {
    height: 180px;
    border-radius: 10px;
    border: 1px solid #eee;
}

.skeleton-weather {
    width: 100%;
    height: 100px;
    border-radius: 8px;
}

.skeleton-calendar {
    width: 100%;
    height: 60px;
    border-radius: 8px;
}

/* =========================================
   LIGHTBOX I MODAL
   ========================================= */
#lightbox-container {
    position: fixed;
    z-index: 10005;
    left: 0;
    top: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(0, 0, 0, 0.9);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding: 20px;
}

#lightbox-obraz {
    max-width: 95vw;
    max-height: 85vh;
    border: 3px solid white;
    border-radius: 4px;
    object-fit: contain;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.5);
}

#lightbox-zamknij,
#lightbox-prev,
#lightbox-next {
    background: transparent;
    border: none;
    color: white;
    font-weight: bold;
    cursor: pointer;
    z-index: 1001;
    transition: color 0.3s;
}

#lightbox-zamknij {
    position: absolute;
    top: 15px;
    right: 20px;
    font-size: 40px;
    line-height: 1;
}

#lightbox-prev,
#lightbox-next {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    font-size: 50px;
    padding: 15px;
    user-select: none;
}

#lightbox-prev {
    left: 10px;
}

#lightbox-next {
    right: 10px;
}

@media (hover: hover) and (pointer: fine) {
    #lightbox-prev:hover,
    #lightbox-next:hover,
    #lightbox-zamknij:hover {
        color: var(--kolor-glowny);
    }
}

#lightbox-pobierz {
    margin-top: 25px;
    padding: 10px 25px;
    background: var(--kolor-glowny);
    color: white;
    text-decoration: none;
    border-radius: 30px;
    font-weight: bold;
    font-size: 15px;
    text-align: center;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.3);
    transition: 0.2s;
    max-width: 80vw;
}

@media (hover: hover) and (pointer: fine) {
    #lightbox-pobierz:hover {
        background: var(--kolor-hover);
        transform: scale(1.05);
    }
}

/* --- TABLICA OGŁOSZEŃ --- */
.ogloszenia-sekcja {
    background: #f0f8ff;
    padding: 20px;
    border-radius: 12px;
    margin-top: 30px;
    border: 2px dashed #aed6f1;
}

.ad-item {
    background: white;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    padding: 25px; /* Increased padding */
    margin-bottom: 25px; /* Increased margin */
    box-shadow: var(--shadow-soft);
    position: relative;
    transition: transform 0.2s, box-shadow 0.2s;
}

@media (hover: hover) and (pointer: fine) {
    .ad-item:hover {
        transform: translateY(-2px);
        box-shadow: var(--shadow-deep);
    }
}

.ad-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
    font-size: 0.85em;
    color: #7f8c8d;
    border-bottom: 1px solid #f0f0f0;
    padding-bottom: 10px;
}

.ad-author {
    font-weight: bold;
    color: var(--kolor-ciemny);
    display: flex;
    align-items: center;
    gap: 8px;
}

.ad-author img {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    object-fit: cover;
    border: 1px solid #ddd;
}

.ad-content {
    font-size: 1.05em;
    color: #333;
    line-height: 1.6;
    white-space: pre-wrap;
    margin-bottom: 10px;
}

.ad-image {
    width: 100%;
    max-height: 400px;
    object-fit: contain;
    background-color: #f9f9f9;
    border-radius: 8px;
    margin-top: 10px;
    cursor: pointer;
    border: 1px solid #eee;
}

.ad-controls {
    margin-top: 15px;
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    border-top: 1px dashed #eee;
    padding-top: 10px;
}

.btn-ad-action {
    background: none;
    border: 1px solid #bdc3c7;
    padding: 6px 12px;
    border-radius: 20px;
    cursor: pointer;
    font-size: 0.85em;
    transition: 0.2s;
    color: #7f8c8d;
    font-weight: 500;
}

@media (hover: hover) and (pointer: fine) {
    .btn-ad-action:hover {
        background: #ecf0f1;
        color: var(--kolor-ciemny);
        border-color: #95a5a6;
    }
}

.btn-ad-delete {
    color: #e74c3c;
    border-color: #e74c3c;
    opacity: 0.8;
}

@media (hover: hover) and (pointer: fine) {
    .btn-ad-delete:hover {
        background: #e74c3c;
        color: white;
        opacity: 1;
    }
}

/* --- MODAL FORMS --- */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.85);
    z-index: 10001;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 20px;
    backdrop-filter: blur(5px);
}

.modal-content-custom {
    background-color: white;
    padding: 35px; /* Increased padding */
    border-radius: 15px;
    width: 100%;
    max-width: 500px;
    position: relative;
    box-shadow: var(--shadow-deep);
    animation: slideDown 0.3s ease;
}

.modal-content-custom h3 {
    margin-top: 0;
    color: var(--kolor-glowny);
    text-align: center;
    margin-bottom: 10px;
}

/* Akcje formularza */
.form-actions {
    display: flex;
    justify-content: flex-end;
    gap: 15px;
    margin-top: 20px;
    border-top: 1px solid #eee;
    padding-top: 20px;
}

.btn-zapisz {
    background: #27ae60;
    color: white;
    border: none;
    padding: 12px 30px;
    border-radius: 25px;
    font-size: 1.1em;
    font-weight: bold;
    cursor: pointer;
    transition: 0.3s;
}

@media (hover: hover) and (pointer: fine) {
    .btn-zapisz:hover {
        background: #219150;
        transform: scale(1.05);
    }
}

.btn-anuluj {
    background: #95a5a6;
    color: white;
    border: none;
    padding: 12px 20px;
    border-radius: 25px;
    cursor: pointer;
    font-weight: bold;
}

@media (hover: hover) and (pointer: fine) {
    .btn-anuluj:hover {
        background: #7f8c8d;
    }
}
