/* Global styles */
:root {
    --primary-color: #2c3e50;
    --secondary-color: #3498db;
    --accent-color: #e74c3c;
    --background-color: #ecf0f1;
    --text-color: #2c3e50;
    --hover-color: #2980b9;
    --light-gray: #f5f6fa;
    --border-color: #dcdde1;
    --primary: #3498db;
    --primary-dark: #2980b9;
    --text-dark: #2c3e50;
    --text-muted: #7f8c8d;
    --accent: #e74c3c;
    --success: #2ecc71;
    --card-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    --card-radius: 10px;
    --spacing-sm: 8px;
    --spacing-md: 15px;
    --spacing-lg: 20px;
    --spacing-xl: 30px;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body { font-family: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial; color:#222; background:#fff; margin:0; }
.section { max-width:1200px; margin:0 auto; padding:20px; }
.text-center { text-align:center; }
.muted { color:#777; }

/* Global heading styles */
h1 {
    font-family: 'Roboto', sans-serif;
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--primary-color);
    margin: 1.5rem 0;
    padding-bottom: 0.5rem;
    border-bottom: 3px solid var(--primary-color);
    text-align: left;
    text-transform: none;
    line-height: 1.2;
    letter-spacing: -0.5px;
}

/* Responsive h1 for mobile */
@media (max-width: 768px) {
    h1 {
        font-size: 2rem;
        margin: 1rem 0;
    }
}

/* --- LAYOUT MAPY + SIDEBAR (ulica.php, mapa.php) --- */
.map-container { display:flex; gap:20px; margin-bottom:2em; align-items:flex-start; }
#map { flex-grow:1; height:600px; border-radius:12px; box-shadow:0 4px 12px rgba(0,0,0,0.1); }
.streets-sidebar { flex-basis:350px; flex-shrink:0; background:#f9f9f9; padding:20px; border-radius:12px; height:600px; overflow-y:auto; }
.streets-sidebar h3 { margin-top:0; margin-bottom:15px; border-bottom:2px solid #eee; padding-bottom:10px; font-size:1.05rem; }

/* --- LISTY ULIC --- */
.street-list a { display:block; padding:8px 12px; text-decoration:none; color:#333; border-radius:6px; margin-bottom:5px; transition:background-color .2s; }
.street-list a:hover { background:#e9e9e9; }
.street-list a.active { background:#007bff; color:#fff; font-weight:600; }

/* Modern Header styles */
.header {
    background: linear-gradient(135deg, var(--primary-color), #34495e);
    color: white;
    padding: 0.5rem 0;
    box-shadow: 0 2px 15px rgba(0,0,0,0.1);
    position: sticky;
    top: 0;
    z-index: 1000;
    border-bottom: 1px solid rgba(255,255,255,0.1);
}

.main-nav {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0.5rem 2rem;
}

.nav-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 2rem;
}

.logo {
    color: white;
    text-decoration: none;
    font-size: 1.15rem;
    font-weight: 700;
    letter-spacing: 0.5px;
    padding: 0.5rem 0;
    transition: all 0.3s ease;
}

.logo:hover {
    color: var(--secondary-color);
    transform: translateY(-1px);
}

.nav-links {
    display: flex;
    gap: 1rem;
    list-style: none;
    margin: 0;
    padding: 0;
    align-items: center;
}

.nav-links li {
    position: relative;
}

.nav-links a {
    color: rgba(255,255,255,0.9);
    text-decoration: none;
    padding: 0.75rem 1rem;
    font-weight: 500;
    font-size: 0.95rem;
    transition: all 0.3s ease;
    border-radius: 6px;
    white-space: nowrap;
}

.nav-links a:hover {
    color: white;
    background: rgba(255,255,255,0.1);
    transform: translateY(-1px);
}

.nav-links a.active {
    background: var(--secondary-color);
    color: white;
}

/* Responsive navigation */
@media (max-width: 1024px) {
    .nav-container {
        flex-direction: column;
        gap: 1rem;
    }
    
    .nav-links {
        flex-wrap: wrap;
        justify-content: center;
        gap: 0.5rem;
    }
    
    .nav-links a {
        padding: 0.5rem 0.75rem;
        font-size: 0.9rem;
    }
}

@media (max-width: 768px) {
    .main-nav {
        padding: 0.5rem 1rem;
    }
    
    .nav-links {
        gap: 0.25rem;
    }
    
    .nav-links a {
		color:#333;
        padding: 0.4rem 0.6rem;
        font-size: 0.85rem;
    }
}

/* Map container and sidebar */
.map-container {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 1.5rem;
    margin: 1.5rem 0;
    position: relative;
    height: 600px;
}

@media (max-width: 768px) {
    .map-container {
        grid-template-columns: 1fr;
        height: auto;
        gap: 1rem;
    }

    .poi-details {
        height: auto !important;
        max-height: none !important;
        order: -1;
    }

    #map {
        height: 400px !important;
    }
}

#map {
    width: 100%;
    height: 100%;
    margin: 0;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.poi-details {
    background: rgba(255, 255, 255, 0.95);
    padding: 1.5rem;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    height: 600px;
    overflow-y: auto;
    scrollbar-width: thin;
    scrollbar-color: rgba(52, 152, 219, 0.3) rgba(0, 0, 0, 0.05);
}

.poi-details h3 {
    margin-bottom: 1rem;
    color: var(--primary-color);
    font-size: 1.25rem;
}

.poi-subcategories {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.subcategory {
    display: block;
    padding: 0.75rem 1rem;
    background: var(--light-gray);
    border-radius: 8px;
    color: var(--text-color);
    text-decoration: none;
    transition: all 0.3s ease;
}

.subcategory:hover {
    background: var(--primary-color);
    color: white;
    transform: translateY(-2px);
}

.subcategory.active {
    background: var(--primary-color);
    color: white;
    font-weight: 500;
}

.poi-details::-webkit-scrollbar {
    width: 6px;
}

.poi-details::-webkit-scrollbar-track {
    background: rgba(0, 0, 0, 0.05);
    border-radius: 3px;
}

.poi-details::-webkit-scrollbar-thumb {
    background: rgba(52, 152, 219, 0.3);
    border-radius: 3px;
}

.poi-details::-webkit-scrollbar-thumb:hover {
    background: rgba(52, 152, 219, 0.5);
}

.poi-details h3 {
    font-size: 1.4rem;
    color: #1a1a1a;
    margin-bottom: 1.5rem;
    font-weight: 600;
    letter-spacing: -0.5px;
}

/* Category styles */
.category-container {
    display: flex;
    gap: 10px;
    margin: 20px 0;
    padding: 10px;
    overflow-x: auto;
    background: white;
    border-radius: 8px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

.category-buttons {
    display: flex;
    gap: 10px;
    overflow-x: auto;
    padding: 0 10px;
    scroll-behavior: smooth;
    -ms-overflow-style: none;
    scrollbar-width: none;
}

.category-buttons::-webkit-scrollbar {
    display: none;
}

.button {
    padding: 10px 20px;
    background: var(--light-gray);
    border: none;
    border-radius: 6px;
    color: var(--text-color);
    cursor: pointer;
    font-weight: 500;
    white-space: nowrap;
    transition: all 0.3s ease;
    text-decoration: none;
}

.button:hover {
    background: var(--secondary-color);
    color: white;
    transform: translateY(-1px);
}

.button.active {
    background: var(--secondary-color);
    color: white;
}

.scroll-arrow {
    padding: 10px;
    background: white;
    border: 1px solid var(--border-color);
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    z-index: 2;
}

.scroll-arrow:hover {
    background: var(--light-gray);
}

/* Category container and buttons */
.category-container {
    position: relative;
    display: flex;
    align-items: center;
    gap: 1rem;
    margin: 1rem 0;
    padding: 0 3rem;
}

.category-buttons {
    display: flex;
    gap: 0.5rem;
    overflow-x: auto;
    white-space: nowrap;
    flex-wrap: nowrap;
    scroll-behavior: smooth;
    scrollbar-width: none; /* Firefox */
    -ms-overflow-style: none; /* IE and Edge */
    padding: 0.5rem 0;
    width: 100%;
}

.category-buttons::-webkit-scrollbar {
    display: none; /* Chrome, Safari, Opera */
}

.category-buttons .button {
    flex: 0 0 auto;
    padding: 0.75rem 1.5rem;
    background: rgba(255, 255, 255, 0.95);
    border: 1px solid rgba(0, 0, 0, 0.1);
    border-radius: 8px;
    color: #2c3e50;
    text-decoration: none;
    transition: all 0.3s ease;
    font-weight: 500;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.category-buttons .button:hover {
    background: rgba(52, 152, 219, 0.1);
    border-color: rgba(52, 152, 219, 0.2);
    transform: translateY(-2px);
}

.category-buttons .button.active {
    background: #3498db;
    color: white;
    border-color: #2980b9;
    box-shadow: 0 4px 12px rgba(52, 152, 219, 0.2);
}

.scroll-arrow {
    position: absolute;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.95);
    border: 1px solid rgba(0, 0, 0, 0.1);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    color: #2c3e50;
    transition: all 0.3s ease;
    z-index: 10;
}

.scroll-arrow:hover {
    background: #3498db;
    color: white;
    transform: scale(1.1);
}

.scroll-left {
    left: 0;
}

.scroll-right {
    right: 0;
}

/* POI List styles */
.poi-list {
    margin-top: 30px;
    padding: 20px;
    background: white;
    border-radius: 12px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.poi-list h3 {
    margin-bottom: 20px;
    color: var(--primary-color);
    font-size: 1.5rem;
}

.poi-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 20px;
}

.poi-item {
    background: var(--light-gray);
    padding: 20px;
    border-radius: 8px;
    transition: all 0.3s ease;
}

.poi-item:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

.poi-item h4 {
    color: var(--primary-color);
    font-size: 1.1rem;
    margin-bottom: 15px;
}

.poi-buttons {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}

.map-button, .details-button {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.6rem 1rem;
    border-radius: 6px;
    font-size: 0.9rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
    border: none;
}

.map-button {
    background: var(--light-gray);
    color: var(--primary-color);
}

.map-button:hover {
    background: var(--border-color);
    transform: translateY(-1px);
}

.button-group {
    display: flex;
    gap: 10px;
    margin-top: 10px;
}

.show-on-map,
.details-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 10px 20px;
    background-color: var(--secondary-color);
    color: white;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-family: inherit;
    font-size: 14px;
    font-weight: 500;
    text-decoration: none;
    transition: all 0.3s ease;
    width: auto;
    min-width: 140px;
    line-height: 1.5;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.show-on-map:hover,
.details-button:hover {
    background-color: var(--hover-color);
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0,0,0,0.15);
}

.show-on-map i,
.details-button i {
    font-size: 16px;
}

.detailed-content {
    display: flex;
    flex-direction: column;
}

.detailed-content h4 {
    margin-bottom: 10px;
    color: var(--primary-color);
    font-size: 16px;
}

.detailed-content {
    display: flex;
    flex-direction: column;
    height: 100%;
}

.detailed-content h4 {
    color: #1a1a1a;
    margin-bottom: 1rem;
    font-size: 1.3rem;
    font-weight: 600;
    letter-spacing: -0.5px;
}

.detailed-content .details {
    flex-grow: 1;
    font-size: 0.95rem;
    color: #4a4a4a;
    line-height: 1.6;
    overflow-y: auto;
    padding-right: 0.5rem;
}

.detailed-content .details::-webkit-scrollbar {
    width: 4px;
}

.detailed-content .details::-webkit-scrollbar-track {
    background: rgba(0, 0, 0, 0.05);
    border-radius: 2px;
}

.detailed-content .details::-webkit-scrollbar-thumb {
    background: rgba(52, 152, 219, 0.3);
    border-radius: 2px;
}

.detailed-content .details::-webkit-scrollbar-thumb:hover {
    background: rgba(52, 152, 219, 0.5);
}

.detailed-content .details p {
    margin: 0.75rem 0;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.detailed-content .details strong {
    color: #2c3e50;
    font-weight: 600;
}

/* POI Details Page */
.poi-details-container {
    display: flex;
    gap: 20px;
    margin-bottom: 30px;
    height: 500px;
}

.poi-details-container #map {
    flex: 1;
    margin: 0;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.poi-details-container .details-panel {
    width: 300px;
    background: white;
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    height: 500px;
    overflow-y: auto;
    scrollbar-width: thin;
    scrollbar-color: rgba(52, 152, 219, 0.3) rgba(0, 0, 0, 0.05);
}

.poi-details-container .details-panel h2 {
    color: var(--primary-color);
    margin-bottom: 15px;
    font-size: 1.5rem;
}

.poi-details-container .details p {
    margin: 10px 0;
    line-height: 1.6;
}

.poi-details-container .details strong {
    color: var(--primary-color);
    font-weight: 600;
}

.poi-details-container .details a {
    color: #2c3e50;
    text-decoration: none;
}

.poi-details-container .details a:hover {
    color: #2c3e50;
}

/* Popup / Balloon (poi_browser, ulica popup) */
.popup-content { min-width:220px; font-size:14px; color:#222; }
.popup-content h3 { margin:0 0 6px 0; font-size:1rem; color:#0056b3; }
.popup-content .details { margin-top:6px; font-size:0.9rem; color:#555; }
.popup-content a.details-button { padding:6px 10px; font-size:13px; display:inline-block; margin-top:8px; }

/* Map Popup Styles */
.popup-content {
    padding: 15px;
    min-width: 200px;
}

.popup-content h3 {
    margin-bottom: 15px;
    color: var(--primary-color);
    font-size: 16px;
    font-weight: 600;
}

.popup-content .button-group {
    margin-top: 10px;
}

.popup-content .details-button {
    width: 100%;
    justify-content: center;
}

.leaflet-popup-content {
    margin: 0;
    min-width: 200px;
}

.leaflet-popup-content-wrapper {
    padding: 0;
    border-radius: 8px;
}

.leaflet-popup-content-wrapper {
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
}

.leaflet-popup-content {
    margin: 1rem 1.5rem;
}

.popup-content h3 {
    color: #1a1a1a;
    font-size: 1.2rem;
    margin-bottom: 0.75rem;
    font-weight: 600;
}

.popup-content p {
    margin: 0.5rem 0;
    color: #4a4a4a;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.popup-content a {
    color: #3498db;
    text-decoration: none;
    transition: color 0.2s ease;
}

.popup-content a:hover {
    color: #2980b9;
}

.leaflet-popup-content .detailed-content {
    padding: 15px;
    min-width: 200px;
}

.leaflet-popup-content .detailed-content h4 {
    margin: 0 0 15px 0;
    text-align: center;
    color: #2c3e50;
    font-size: 1.1em;
}

.leaflet-popup-content .button-group {
    display: flex;
    justify-content: center;
    margin-top: 10px;
}

.leaflet-popup-content .details-button {
    padding: 8px 15px;
    background-color: #3498db;
    color: white;
    text-decoration: none;
    border-radius: 5px;
    transition: background-color 0.3s;
    font-size: 0.9em;
}

.leaflet-popup-content .details-button:hover {
    background-color: #2980b9;
}

/* Buttons */
.btn {
    padding: 0.8rem 1.5rem;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-weight: 500;
    transition: all 0.3s ease;
    text-decoration: none;
    display: inline-block;
    text-align: center;
}

.btn-primary {
    background-color: var(--secondary-color);
    color: white;
}

.btn-primary:hover {
    background-color: var(--hover-color);
    transform: translateY(-2px);
}

.btn.active {
    background-color: var(--accent-color);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.btn-secondary {
    background-color: #95a5a6;
    color: white;
}

.btn-secondary:hover {
    background-color: #7f8c8d;
    transform: translateY(-2px);
}

/* Section containers */
.section {
    max-width: 1200px;
    margin: 2rem auto;
    padding: 0 1rem;
}

/* Category Navigation */
.category-nav {
    margin: 20px 0;
    padding: 15px;
    background-color: var(--light-gray);
    border-radius: 10px;
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    justify-content: center;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

/* Category buttons */
.category-buttons {
    margin: 20px 0;
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.button {
    display: inline-block;
    padding: 10px 20px;
    background-color: #f0f0f0;
    border: 1px solid #ddd;
    border-radius: 4px;
    text-decoration: none;
    color: #333;
    transition: all 0.3s ease;
}

.button:hover {
    background-color: #e0e0e0;
}

.button.active {
    background-color: #3498db;
    color: white;
    border-color: #2980b9;
}

/* POI Grid */
.poi-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 15px;
    margin: 20px 0;
}

/* Categories Overview */
.categories-overview {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
    margin-top: 30px;
}

.category-section {
    background-color: white;
    padding: 20px;
    border-radius: 10px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.category-section h3 {
    color: var(--primary-color);
    border-bottom: 2px solid var(--secondary-color);
    padding-bottom: 10px;
    margin-bottom: 15px;
    font-size: 1.2rem;
}

/* Detailed POI list styles */
.detailed-poi-list {
    margin-top: 2rem;
    padding: 1rem;
}

.detailed-poi-list h3 {
    margin-bottom: 1rem;
    color: #333;
}

.poi-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 1rem;
    padding: 1rem;
}

.detailed-poi-item {
    background: #fff;
    border: 1px solid #ddd;
    border-radius: 8px;
    padding: 1rem;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    transition: transform 0.2s;
}

.detailed-poi-item:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0,0,0,0.15);
}

.detailed-content h4 {
    color: #2c3e50;
    margin-bottom: 0.5rem;
    font-size: 1.1rem;
}

.detailed-content .details {
    font-size: 0.9rem;
    color: #666;
}

.detailed-content .details p {
    margin: 0.5rem 0;
}

.detailed-content .details strong {
    color: #34495e;
}

.show-on-map {
    margin-top: 1rem;
    padding: 0.5rem 1rem;
    background: #3498db;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    width: 100%;
    transition: background 0.2s;
}

.show-on-map:hover {
    background: #2980b9;
}

/* News styles */
.news-container {
    margin: 20px auto;
    padding: 0px;
}

.news-item {
    background: white;
    border-radius: 8px;
    padding: 20px;
    margin-bottom: 20px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
    transition: transform 0.2s ease-in-out;
}

.news-item:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 10px rgba(0,0,0,0.15);
}

.news-title {
    margin-bottom: 10px;
    font-size: 1.4em;
    color: var(--primary-color);
}

.news-title a {
    color: inherit;
    text-decoration: none;
    transition: color 0.2s ease;
}

.news-title a:hover {
    color: var(--secondary-color);
}

.news-meta {
    font-size: 0.9em;
    color: #666;
    margin-bottom: 15px;
}

.news-description {
    color: var(--text-color);
    line-height: 1.6;
}

.error-message {
    background-color: #fee;
    color: #c33;
    padding: 15px;
    border-radius: 8px;
    text-align: center;
    margin: 20px 0;
}

/* Footer */
.footer {
    background-color: var(--primary-color);
    color: white;
    padding: 2rem 0;
    margin-top: 3rem;
}

.footer .section {
    text-align: center;
}

/* Responsive design */
@media (max-width: 768px) {
    .nav-menu {
        flex-direction: column;
        text-align: center;
        gap: 15px;
    }
    
    .nav-links {
        flex-direction: column;
        width: 100%;
    }
    
    #map {
        height: 300px;
    }
    
    .poi-grid {
        grid-template-columns: 1fr;
    }
    
    .categories-overview {
        grid-template-columns: 1fr;
    }
    
    .category-nav {
        flex-direction: column;
    }
    
    .btn {
        width: 100%;
    }
}

/* Loading indicator */
.loading {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    
    color: #000;
    padding: 15px 30px;
    border-radius: 5px;
    z-index: 1000;
}

/* Error message */
.error-message {
    background-color: #ff7675;
    color: white;
    padding: 10px;
    border-radius: 5px;
    margin: 10px 0;
    text-align: center;
}

/* Weather / Pogoda (pogoda.php) --- */
.weather-widget { display:flex; gap:14px; align-items:center; background:#f7fbff; border:1px solid #e6f0ff; padding:12px; border-radius:8px; }
.weather-widget .temp { font-size:2rem; font-weight:700; color:#1f6feb; }
.weather-forecast { display:flex; gap:8px; margin-top:10px; }

/* --- POI DETAILS (poi_details.php) --- */
.poi-header { display:flex; flex-direction:column; gap:6px; margin-bottom:10px; }
.poi-info { display:flex; gap:30px; flex-wrap:wrap; }
.poi-info h4 { margin:6px 0; }
.poi-info table { width:100%; border-collapse:collapse; }
.poi-info table td, .poi-info table th { padding:6px; border-bottom:1px solid #f0f0f0; }

/* --- RESPONSYWNOŚĆ --- */
@media (max-width:900px) {
  .map-container { flex-direction:column; }
  .streets-sidebar { width:100%; height:300px; }
  #map { height:450px; }
  .poi-grid { grid-template-columns:repeat(auto-fill, minmax(240px, 1fr)); }
  .events-list { grid-template-columns:repeat(auto-fill, minmax(220px, 1fr)); }
}

/* Index page — blok pogody (obsługuje #pogoda, .pogoda, .index-weather, .weather-card) */
#index-pogoda,
.pogoda,
.index-weather,
.weather-card {
    background: linear-gradient(180deg, rgba(52,152,219,0.06), rgba(255,255,255,0.85));
    border: 1px solid rgba(52,152,219,0.12);
    padding: 16px;
    border-radius: 10px;
    box-shadow: var(--card-shadow);
    display: flex;
    gap: 16px;
    align-items: center;
    color: var(--text-color);
    max-width: 460px;
    margin: 0.5rem 0;
}

#index-pogoda .temp,
.index-weather .temp,
.weather-card .temp {
    font-size: 2.2rem;
    font-weight: 700;
    color: var(--primary-color);
    line-height: 1;
}

#index-pogoda .meta,
.index-weather .meta,
.weather-card .meta {
    font-size: 0.95rem;
    color: var(--text-muted);
}

#index-pogoda .icon,
.index-weather .icon,
.weather-card .icon {
    width: 72px;
    height: 72px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 36px;
    background: rgba(52,152,219,0.08);
    border-radius: 8px;
}

#index-pogoda .forecast,
.index-weather .forecast,
.weather-card .forecast {
    display:flex;
    gap:8px;
    margin-top:8px;
    flex-wrap:wrap;
}

#index-pogoda .forecast .day,
.index-weather .forecast .day,
.weather-card .forecast .day {
    display:flex;
    flex-direction:column;
    align-items:center;
    font-size:0.85rem;
    color:var(--text-muted);
    min-width:56px;
}

@media (max-width:600px) {
    #index-pogoda,
    .pogoda,
    .index-weather,
    .weather-card {
        flex-direction: row;
        gap:10px;
        padding:12px;
        max-width:100%;
    }
    #index-pogoda .icon,
    .index-weather .icon {
        width:56px;
        height:56px;
        font-size:28px;
    }
    #index-pogoda .temp,
    .index-weather .temp { font-size:1.6rem; }
}

/* Weather box (append this block) */
.weather-box {
    background: linear-gradient(135deg, #ffffff 0%, #f5f7fa 100%);
    border-radius: 15px;
    padding: 25px;
    margin: 0;
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.3);
    width: 100%;
    height: 510px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.weather-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 2px solid rgba(52, 152, 219, 0.06);
}

.weather-title {
    display: flex;
    align-items: center;
    gap: 12px;
}

.weather-title h3 {
    margin: 0;
    font-size: 1.5em;
    color: #2c3e50;
    font-weight: 600;
}

.weather-main-icon {
    font-size: 1.8em;
    color: #3498db;
}

.weather-temp {
    display: flex;
    align-items: center;
    gap: 8px;
}

.weather-temp i {
    color: #e74c3c;
    font-size: 1.2em;
}

.temp-value {
    font-size: 1.8em;
    font-weight: 600;
    color: #2c3e50;
}

.weather-info {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    margin-top: 12px;
}

.weather-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 15px;
    background: rgba(255, 255, 255, 0.7);
    border-radius: 12px;
    transition: all 0.3s ease;
    border: 1px solid rgba(52, 152, 219, 0.08);
}

.weather-item:hover {
    transform: translateY(-3px);
    box-shadow: 0 5px 15px rgba(0,0,0,0.08);
    background: rgba(255, 255, 255, 0.9);
}

.weather-item i {
    color: #3498db;
    font-size: 1.4em;
    width: 30px;
    text-align: center;
}

.weather-item span {
    color: #2c3e50;
    font-weight: 500;
    font-size: 1.05em;
}

.weather-update {
    display: block;
    margin-top: 12px;
    color: #7f8c8d;
    font-size: 0.9em;
    text-align: right;
}

.weather-item-content {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.weather-label {
    color: #7f8c8d;
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.weather-value {
    color: #2c3e50;
    font-size: 1.1rem;
    font-weight: 600;
}

/* small screens */
@media (max-width: 600px) {
    .weather-box { height: auto; padding: 16px; }
    .weather-item { padding: 12px; }
    .weather-main-icon { font-size: 1.4em; }
    .temp-value { font-size: 1.4rem; }
}

/* Hero dla najnowszego newsa (zastępuje mapę na stronie głównej) */
.hero-news {
    width: 100%;
    height: 510px;
    background-size: cover;
    background-position: center;
    border-radius: 12px;
    overflow: hidden;
    position: relative;
    box-shadow: 0 10px 20px rgba(0,0,0,0.08);
    border: 1px solid rgba(0,0,0,0.04);
}

.hero-news .hero-link {
    display: block;
    width: 100%;
    height: 100%;
    color: inherit;
    text-decoration: none;
}

.hero-overlay {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    padding: 20px;
    background: linear-gradient(180deg, rgba(0,0,0,0) 0%, rgba(0,0,0,0.55) 100%);
    color: #fff;
}

.hero-overlay .hero-title {
    margin: 0 0 8px 0;
    font-size: 1.6rem;
    font-weight: 700;
    line-height: 1.1;
    text-shadow: 0 2px 8px rgba(0,0,0,0.5);
}

.hero-overlay .hero-excerpt {
    margin: 0;
    font-size: 1rem;
    opacity: 0.95;
}

/* responsiveness */
@media (max-width:900px) {
    .hero-news { height: 320px; }
    .hero-overlay { padding: 14px; }
    .hero-overlay .hero-title { font-size: 1.2rem; }
    .hero-overlay .hero-excerpt { font-size: 0.95rem; }
}

/* Weather page styles */
.weather-page .weather-card {
    background: white;
    border-radius: 15px;
    padding: 20px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    margin-bottom: 20px;
    width: 100%;
    max-width: 100% !important;
    box-sizing: border-box;
}

.weather-page .current-weather {
    text-align: center;
    padding: 30px;
}

.weather-page .temperature {
    font-size: 3em;
    font-weight: bold;
    color: #2c3e50;
}

.weather-page .feels-like {
    font-size: 1.2em;
    color: #7f8c8d;
    margin-top: -10px;
}

.weather-page .weather-details {
    font-size: 1.2em;
    color: #7f8c8d;
}

.weather-page canvas {
    max-width: 100%;
    height: auto !important;
}

.weather-page .forecast-day {
    display: flex;
    align-items: center;
    padding: 15px;
    border-bottom: 1px solid #eee;
}

.weather-page .forecast-day:last-child {
    border-bottom: none;
}

.weather-page .forecast-date {
    width: 100px;
    font-weight: bold;
}

.weather-page .forecast-icon {
    width: 50px;
    text-align: center;
    font-size: 1.5em;
}

.weather-page .forecast-temp {
    flex: 1;
    text-align: right;
}

.weather-page .forecast-precip {
    width: 80px;
    text-align: right;
    color: #3498db;
}

.weather-page .max-temp {
    color: #e74c3c;
    font-weight: bold;
}

.weather-page .min-temp {
    color: #3498db;
    margin-left: 10px;
}

.weather-page .weather-icon {
    font-size: 2.5em;
    margin: 20px 0;
}

.weather-page .sunny { color: #f1c40f; }
.weather-page .partly-cloudy { color: #95a5a6; }
.weather-page .cloudy { color: #7f8c8d; }
.weather-page .rain { color: #3498db; }
.weather-page .snow { color: #bdc3c7; }
.weather-page .thunder { color: #9b59b6; }
.weather-page .fog { color: #95a5a6; }

.weather-page .sunrise-icon { color: #f39c12; }
.weather-page .sunset-icon { color: #e67e22; }
.weather-page .daylight-icon { color: #f1c40f; }
.weather-page .uv-icon { color: #e74c3c; }

@media (max-width: 768px) {
    .weather-page .weather-card { padding: 15px; margin-bottom: 15px; }
    .weather-page .temperature { font-size: 2.5em; }
    .weather-page .weather-details { font-size: 1em; }
    .weather-page .forecast-day { padding: 10px; }
    .weather-page .forecast-date { width: 80px; font-size: 0.9em; }
    .weather-page .forecast-icon { width: 40px; font-size: 1.2em; }
    .weather-page .forecast-temp { font-size: 0.9em; }
    .weather-page .forecast-precip { width: 60px; font-size: 0.9em; }
    .weather-page h1 { font-size: 1.5rem; }
    .weather-page h3 { font-size: 1.2rem; display: block; margin-bottom: 15px; }
}

/* Weather page - H3 styles - FORCE BLOCK DISPLAY */
.weather-page .weather-card h3 {
    display: block !important;
    width: 100%;
    margin-bottom: 20px;
    font-size: 1.3rem;
    font-weight: 600;
    color: #2c3e50;
    text-align: left;
}

.weather-page .current-weather h3 {
    text-align: center;
}

/* FIX: Zapewnia, że H3 w kartach pogody jest zawsze nad zawartością */
.weather-card {
    display: flex;
    flex-direction: column;
}

.weather-card h3 {
    width: 100%;
    text-align: center; /* Opcjonalnie, dla lepszego wyglądu */
    margin-bottom: 15px;
}

/* ============================================= */
/*           Styling dla POI Details             */
/* ============================================= */

.poi-details-page .poi-header {
    margin-bottom: 2rem;
    border-bottom: 1px solid #eee;
    padding-bottom: 1.5rem;
}

.poi-details-page .poi-header h1 {
    margin-bottom: 0.25rem;
}

.poi-details-page .poi-category {
    font-size: 1.2rem;
    color: #6c757d; /* muted color */
    text-transform: capitalize;
}

.poi-details-page .info-card {
    background-color: #fff;
    border-radius: 8px;
    padding: 1.5rem;
    box-shadow: 0 4px 12px rgba(0,0,0,0.08);
    margin-bottom: 1.5rem;
}

.poi-details-page .info-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.poi-details-page .info-list li {
    display: flex;
    align-items: flex-start;
    padding: 0.75rem 0;
    border-bottom: 1px solid #f0f0f0;
}

.poi-details-page .info-list li:last-child {
    border-bottom: none;
}

.poi-details-page .info-list .icon {
    font-size: 1.2rem;
    color: #0d6efd; /* Bootstrap primary color */
    width: 40px;
    flex-shrink: 0;
    text-align: center;
}

.poi-details-page .info-list .info-content {
    font-size: 1rem;
}

.poi-details-page .info-list .info-content a {
    text-decoration: none;
    color: #0d6efd;
}

.poi-details-page .info-list .info-content a:hover {
    text-decoration: underline;
}

.poi-details-page #map {
    height: 400px;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.08);
    margin-bottom: 1.5rem;
}

.poi-details-page .debug-section .card-header {
    cursor: pointer;
}

.poi-details-page .osm-tags-table {
    width: 100%;
    font-size: 0.9rem;
    border-collapse: collapse;
}

.poi-details-page .osm-tags-table th,
.poi-details-page .osm-tags-table td {
    padding: 8px;
    border: 1px solid #dee2e6;
    text-align: left;
    vertical-align: top;
    word-break: break-word;
}

.poi-details-page .osm-tags-table th {
    background-color: #f8f9fa;
}

.poi-details-page .osm-tags-table code {
    background-color: #e9ecef;
    padding: 2px 4px;
    border-radius: 4px;
    color: #c7254e;
}

/* Poprawki dla listy dodatkowych informacji */
.poi-details-page .info-list .info-content strong {
    display: block;
    color: #343a40;
}

/* ============================================= */
/*           Custom Leaflet Popup Styles         */
/* ============================================= */

/* Reset default Leaflet padding */
.leaflet-popup-content-wrapper {
    border-radius: 8px !important;
}
.leaflet-popup-content {
    margin: 0 !important;
    padding: 0 !important;
    width: auto !important;
    min-width: 200px;
}

/* Custom popup container */
.custom-popup {
    padding: 12px 16px;
    font-family: 'Roboto', sans-serif;
    line-height: 1.4;
}

.custom-popup-title {
    font-size: 1.1rem;
    font-weight: 700;
    color: #2c3e50;
    margin: 0 0 5px 0;
}

.custom-popup-category {
    font-size: 0.9rem;
    color: #7f8c8d;
    margin: 0;
    text-transform: capitalize;
}

.custom-popup-link {
    display: block;
    margin-top: 10px;
    font-weight: 500;
    color: #0d6efd;
    text-decoration: none;
}

.custom-popup-link:hover {
    text-decoration: underline;
}

/* Styling for Wikidata image in POI details */
.poi-details-page .poi-image-container {
    margin-bottom: 1.5rem;
}

.poi-details-page .poi-image {
    width: 100%;
    height: auto;
    border-radius: 8px;
    background-color: #f0f0f0;
    box-shadow: 0 4px 12px rgba(0,0,0,0.08);
}

/* ============================================= */
/*           Styling dla kart POI                */
/* ============================================= */
.poi-categories {
    margin-top: 40px;
}
.poi-category {
    margin-bottom: 30px;
}
.poi-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 20px;
}
.poi-item {
    display: flex;
}
.poi-card {
    background: #fff;
    border: 1px solid #e9ecef;
    border-radius: 8px;
    padding: 16px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.06);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    width: 100%;
    display: flex;
    flex-direction: column;
}
.poi-item:hover .poi-card {
    transform: translateY(-3px);
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
}
.poi-card-link-wrapper {
    text-decoration: none;
    color: inherit;
    flex-grow: 1;
}
.poi-card-title {
    font-size: 1.1rem;
    font-weight: 600;
    margin: 0 0 8px 0;
    color: #343a40;
}
.poi-card-summary {
    font-size: 0.9rem;
    color: #6c757d;
    margin: 0;
    line-height: 1.5;
}
.poi-card-details-btn {
    margin-top: 12px;
    text-decoration: none;
    color: #0d6efd;
    font-weight: 500;
    font-size: 0.9rem;
    align-self: flex-start;
}
.poi-card-details-btn i {
    margin-left: 4px;
    transition: transform 0.2s ease;
}
.poi-card-details-btn:hover i {
    transform: translateX(3px);
}

/* Admin panel additions */
.admin-box {
  max-width: 980px;
  margin: 24px auto;
  background: #fff;
  border-radius: 8px;
  padding: 18px;
  box-shadow: 0 8px 30px rgba(22,33,62,0.06);
  font-family: "Helvetica Neue", Arial, sans-serif;
}
.admin-box h2 { margin-top:0; margin-bottom:16px; font-size:20px; color:#1b2430; }
.form-control { width:100%; padding:8px 10px; border:1px solid #e2e8f0; border-radius:6px; box-sizing:border-box; }
.form-control-file { padding:6px 0; }
.form-group { margin-bottom:12px; }
.btn { display:inline-block; padding:8px 12px; border-radius:6px; background:#0b58d6; color:#fff; text-decoration:none; border:none; cursor:pointer; }
.btn.btn-secondary { background:#6c757d; }
.btn.btn-danger { background:#d9534f; }

.image-preview { margin-top:8px; }
.image-preview img { max-width:220px; border-radius:6px; display:block; margin-top:6px; }

/* keep admin table readable */
.table th, .table td { padding:10px 8px; border-bottom:1px solid rgba(0,0,0,0.06); text-align:left; }

/* Admin top navigation */
.admin-nav { background:#fff; border-bottom:1px solid #e6eef8; padding:8px 16px; margin-bottom:16px; border-radius:6px; box-shadow:0 4px 12px rgba(13,31,62,0.04); }
.admin-nav ul { list-style:none; margin:0; padding:0; display:flex; gap:8px; align-items:center; }
.admin-nav li.right { margin-left:auto; }
.admin-nav a { color:#1b2430; text-decoration:none; padding:8px 10px; border-radius:6px; display:inline-block; font-weight:600; }
.admin-nav a:hover { background:#f0f6ff; }
.admin-nav li.active a { background:#0b58d6; color:#fff; }

/* Logo: skaluj proporcjonalnie, ogranicz wysokość */
.header .logo img,
.main-nav .logo img {
  height: 56px;    /* dopasuj do nagłówka */
  width: auto;
  max-width: 100%;
  display: block;
  object-fit: contain;
}

/* Mniejsze ekrany */
@media (max-width: 768px) {
  .header .logo img,
  .main-nav .logo img {
    height: 44px;
  }
}
@media (max-width: 420px) {
  .header .logo img,
  .main-nav .logo img {
    height: 36px;
  }
}

.hero-content {
  color: #fff;
  background: linear-gradient(90deg, rgba(229,62,62,0.95), rgba(210,45,45,0.95));
  padding: 6px 12px;
  border-radius: 20px;
  font-weight: 700;
  text-transform: uppercase;
  font-size: 0.9rem;
  box-shadow: 0 6px 18px rgba(229,62,62,0.18);
  display: inline-block;
  margin: 10px;
}

.hero-news .hero-overlay { 
  background: linear-gradient(180deg, rgba(0,0,0,0.45), rgba(0,0,0,0.65));
}

.hero-title {
  color: #ffdede;
  font-size: 1.6rem;
  margin: 6px 0;
  text-shadow: 0 2px 8px rgba(0,0,0,0.6);
  font-weight: 800;
}

.hero-excerpt {
  color: #ffecec;
  opacity: 0.95;
  margin-top: 6px;
}

/* Weather box accent */
.weather-box {
  border: 1px solid rgba(229,62,62,0.08);
  box-shadow: 0 8px 28px rgba(229,62,62,0.04);
  border-radius: 12px;
  overflow: hidden;
}
.weather-title h3 { color: #e53e3e; margin:0; font-weight:700; }

/* Event titles red */
.event-title {
  color: #e53e3e;
  font-weight: 800;
  margin-bottom: 6px;
}

/* Buttons accent for highlighted items */
.card .btn-primary, .event-button {
  background: linear-gradient(180deg,#e53e3e,#c43b3b);
  border: none;
  box-shadow: 0 6px 18px rgba(196,59,59,0.18);
}
.card .btn-primary:hover, .event-button:hover {
  background: linear-gradient(180deg,#c43b3b,#a32f2f);
}

/* Subtle badge for sticky news */
.sticky-news::before {
  content: "WYRÓŻNIONE";
  position: absolute;
  top: 10px;
  left: 10px;
  background: #e53e3e;
  color: #fff;
  padding: 4px 8px;
  font-size: 0.75rem;
  border-radius: 4px;
  font-weight:700;
  box-shadow: 0 4px 12px rgba(229,62,62,0.14);
}

/* Responsive tweaks */
@media (max-width: 768px) {
  .hero-title { font-size: 1.25rem; }
  .hero-content { font-size: 0.8rem; padding:4px 10px; }
}
