/* Reset i zmienne */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary-color: #3B82F6;
    --secondary-color: #10B981;
    --danger-color: #EF4444;
    --text-primary: #1F2937;
    --text-secondary: #6B7280;
    --bg-primary: #FFFFFF;
    --bg-secondary: #F9FAFB;
    --border-color: #E5E7EB;
    --shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, sans-serif;
    background: var(--bg-secondary);
    color: var(--text-primary);
    overflow: hidden;
}

.container {
    display: flex;
    flex-direction: column;
    height: 100vh;
    position: relative;
}

/* Header */
/* Header */
.header {
    background: white;
    padding: 20px;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    text-align: center;
    margin-bottom: 20px;
}

.header-logo {
    height: 60px;
    width: auto;
    margin-bottom: 10px;
    display: block;
    margin-left: auto;
    margin-right: auto;
}

.header h1 {
    font-size: 28px;
    font-weight: 700;
    color: #1F2937;
    margin: 0 0 8px 0;
}

.header .subtitle {
    font-size: 14px;
    color: #6B7280;
    margin: 0;
    font-weight: 400;
}

/* Mobile */
@media (max-width: 768px) {
    .header {
        padding: 15px;
    }
    
    .header-logo {
        height: 45px;
        margin-bottom: 8px;
    }
    
    .header h1 {
        font-size: 20px;
    }
    
    .header .subtitle {
        font-size: 12px;
    }
}

/* Controls */
.controls {
    background: var(--bg-primary);
    padding: 1rem 1.5rem;
    border-bottom: 1px solid var(--border-color);
    z-index: 999;
}

/* Search box */
.search-box {
    position: relative;
    margin-bottom: 1rem;
}

#searchInput {
    width: 100%;
    padding: 0.75rem 1rem;
    border: 2px solid var(--border-color);
    border-radius: 0.5rem;
    font-size: 1rem;
    transition: border-color 0.2s;
}

#searchInput:focus {
    outline: none;
    border-color: var(--primary-color);
}

.search-results {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--bg-primary);
    border: 1px solid var(--border-color);
    border-radius: 0.5rem;
    margin-top: 0.5rem;
    max-height: 300px;
    overflow-y: auto;
    box-shadow: var(--shadow-lg);
    display: none;
    z-index: 1000;
}

.search-results.active {
    display: block;
}

.search-result-item {
    padding: 0.75rem 1rem;
    cursor: pointer;
    border-bottom: 1px solid var(--border-color);
    transition: background 0.2s;
}

.search-result-item:last-child {
    border-bottom: none;
}

.search-result-item:hover {
    background: var(--bg-secondary);
}

.result-name {
    font-weight: 600;
    margin-bottom: 0.25rem;
}

.result-address {
    font-size: 0.875rem;
    color: var(--text-secondary);
}

/* Filter dropdown */
.filter-select-wrapper {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.filter-select-wrapper label {
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--text-primary);
    white-space: nowrap;
}

.category-select {
    padding: 0.75rem 1rem;
    border: 2px solid var(--border-color);
    border-radius: 0.5rem;
    font-size: 0.875rem;
    font-weight: 500;
    background: var(--bg-primary);
    color: var(--text-primary);
    cursor: pointer;
    transition: all 0.2s;
    min-width: 200px;
}

.category-select:hover {
    border-color: var(--primary-color);
}

.category-select:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}


/* Location button */
.location-btn {
    padding: 0.75rem 1rem;
    background: var(--secondary-color);
    color: white;
    border: none;
    border-radius: 0.5rem;
    font-size: 0.875rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    width: 100%;
}

.location-btn:hover {
    background: #059669;
}

.location-btn:active {
    transform: scale(0.98);
}

/* Map */
#map {
    flex: 1;
    z-index: 1;
}

/* Custom Leaflet marker cluster styles */
.marker-cluster {
    background-color: rgba(59, 130, 246, 0.6);
    border-radius: 50%;
}

.marker-cluster div {
    background-color: rgba(59, 130, 246, 0.8);
    color: white;
    font-weight: 700;
    border-radius: 50%;
}

/* Building info sidebar */
.building-info {
    position: fixed;
    right: 0;
    top: 0;
    width: 400px;
    height: 100vh;
    background: var(--bg-primary);
    box-shadow: -4px 0 15px rgba(0, 0, 0, 0.1);
    z-index: 2000;
    overflow-y: auto;
    transition: transform 0.3s ease;
}

.building-info.hidden {
    transform: translateX(100%);
}

.close-btn {
    position: absolute;
    top: 1rem;
    right: 1rem;
    width: 2.5rem;
    height: 2.5rem;
    background: rgba(0, 0, 0, 0.1);
    border: none;
    border-radius: 50%;
    font-size: 1.5rem;
    cursor: pointer;
    transition: all 0.2s;
    z-index: 10;
}

.close-btn:hover {
    background: rgba(0, 0, 0, 0.2);
}

.building-content {
    padding: 2rem;
}

.building-image {
    width: 100%;
    height: 200px;
    object-fit: cover;
    border-radius: 0.5rem;
    margin-bottom: 1.5rem;
}

.building-content h2 {
    font-size: 1.5rem;
    margin-bottom: 0.5rem;
}

.building-short {
    display: inline-block;
    padding: 0.25rem 0.75rem;
    background: var(--primary-color);
    color: white;
    border-radius: 0.25rem;
    font-size: 0.875rem;
    font-weight: 600;
    margin-bottom: 1rem;
}

.building-address {
    color: var(--text-secondary);
    margin-bottom: 1rem;
    font-size: 0.875rem;
}

.building-desc {
    margin-bottom: 1.5rem;
    line-height: 1.6;
}

.building-details {
    background: var(--bg-secondary);
    padding: 1rem;
    border-radius: 0.5rem;
    margin-bottom: 1.5rem;
}

.detail-item {
    margin-bottom: 0.75rem;
}

.detail-item:last-child {
    margin-bottom: 0;
}

.detail-item strong {
    display: block;
    margin-bottom: 0.25rem;
    font-size: 0.875rem;
}

.facilities {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.facility-tag {
    padding: 0.25rem 0.75rem;
    background: white;
    border: 1px solid var(--border-color);
    border-radius: 1rem;
    font-size: 0.75rem;
}

.btn-primary {
    display: block;
    width: 100%;
    padding: 0.75rem;
    background: var(--primary-color);
    color: white;
    text-align: center;
    text-decoration: none;
    border-radius: 0.5rem;
    font-weight: 600;
    transition: background 0.2s;
}

.btn-primary:hover {
    background: #2563EB;
}

/* Mobile responsive */
@media (max-width: 768px) {
    .header h1 {
        font-size: 1.25rem;
    }

    .building-info {
        width: 100%;
        top: auto;
        bottom: 0;
        height: 70vh;
        border-top-left-radius: 1rem;
        border-top-right-radius: 1rem;
    }

    .building-info.hidden {
        transform: translateY(100%);
    }

    .building-content {
        padding: 1.5rem;
        padding-top: 3rem;
    }
}

@media (min-width: 769px) {
    .controls {
        display: grid;
        grid-template-columns: 1fr auto auto auto;  /* ← ZMIANA: 4 kolumny zamiast 3 */
        gap: 1rem;
        align-items: start;
    }

    .search-box {
        margin-bottom: 0;
    }

    .location-btn,
    .feedback-btn-top {
        width: auto;
    }
}

/* Leaflet popup customization */
.leaflet-popup-content-wrapper {
    border-radius: 0.5rem;
    padding: 0;
}

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

.popup-content {
    padding: 1rem;
}

.popup-title {
    font-weight: 700;
    font-size: 1rem;
    margin-bottom: 0.5rem;
}

.popup-category {
    display: inline-block;
    padding: 0.25rem 0.5rem;
    background: var(--primary-color);
    color: white;
    border-radius: 0.25rem;
    font-size: 0.75rem;
    margin-bottom: 0.5rem;
}

.popup-address {
    font-size: 0.875rem;
    color: var(--text-secondary);
    margin-bottom: 0.5rem;
}

.popup-link {
    display: inline-block;
    margin-top: 0.5rem;
    color: var(--primary-color);
    text-decoration: none;
    font-size: 0.875rem;
    font-weight: 600;
}

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

/* ============================================
   STOPKA
   ============================================ */
.footer {
    position: absolute;
    bottom: 10px;
    left: 10px;
    background: rgba(255, 255, 255, 0.95);
    padding: 8px 16px;
    border-radius: 8px;
    font-size: 12px;
    color: #6B7280;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    z-index: 999;
    font-weight: 500;
}

@media (max-width: 768px) {
    .footer {
        font-size: 10px;
        padding: 6px 12px;
    }
}
/* ============================================
   FEEDBACK BUTTON
   ============================================ */
.feedback-btn-top {
    padding: 0.75rem 1rem;
    background: #F59E0B;  /* Pomarańczowy - wyróżnia się */
    color: white;
    border: none;
    border-radius: 0.5rem;
    font-size: 0.875rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    white-space: nowrap;
}

.feedback-btn-top:hover {
    background: #D97706;
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(245, 158, 11, 0.3);
}

.feedback-btn-top:active {
    transform: scale(0.98);
}
/* ============================================
   FEEDBACK POPUP
   ============================================ */
.feedback-popup {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.6);
    z-index: 10000;
    animation: fadeIn 0.3s ease;
}

.feedback-popup.active {
    display: flex;
    align-items: center;
    justify-content: center;
}

.feedback-popup-content {
    background: white;
    padding: 30px;
    border-radius: 16px;
    max-width: 500px;
    width: 90%;
    position: relative;
    animation: slideUp 0.3s ease;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
}

.popup-close {
    position: absolute;
    top: 15px;
    right: 15px;
    background: none;
    border: none;
    font-size: 28px;
    color: #9CA3AF;
    cursor: pointer;
    line-height: 1;
    transition: color 0.2s;
}

.popup-close:hover {
    color: #4B5563;
}

.feedback-popup-content h3 {
    margin: 0 0 15px 0;
    color: #1F2937;
    font-size: 22px;
}

.feedback-popup-content p {
    color: #6B7280;
    margin-bottom: 25px;
    line-height: 1.6;
}

.popup-buttons {
    display: flex;
    gap: 12px;
    flex-direction: column;
}

.popup-btn {
    padding: 14px 24px;
    border-radius: 10px;
    font-weight: 600;
    font-size: 15px;
    text-align: center;
    cursor: pointer;
    transition: all 0.2s;
    text-decoration: none;
    border: none;
    display: block;
}

.popup-btn.primary {
    background: #3B82F6;
    color: white;
}

.popup-btn.primary:hover {
    background: #2563EB;
    transform: translateY(-1px);
}

.popup-btn.secondary {
    background: #F3F4F6;
    color: #6B7280;
}

.popup-btn.secondary:hover {
    background: #E5E7EB;
}

/* ============================================
   ANIMACJE
   ============================================ */
@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes slideUp {
    from { 
        transform: translateY(30px); 
        opacity: 0; 
    }
    to { 
        transform: translateY(0); 
        opacity: 1; 
    }
}

/* ============================================
   RESPONSIVE - MOBILE
   ============================================ */
@media (max-width: 768px) {
    .controls {
        padding: 1rem;
    }
    
    /* Filter dropdown - mobile */
    .filter-select-wrapper {
        width: 100%;
        margin-bottom: 0.5rem;
    }
    
    .filter-select-wrapper label {
        font-size: 0.75rem;
    }
    
    .category-select {
        flex: 1;
        min-width: auto;
    }
    
    /* Stopka */
    .footer {
        font-size: 10px;
        padding: 6px 12px;
        bottom: 10px;  /* ← POPRAWKA: było 70px */
    }
    
    /* Feedback button */
    .location-btn,
    .feedback-btn-top {
        width: 100%;
        margin-top: 0.5rem;
    }
    /* Stopka */
    .footer {
        font-size: 10px;
        padding: 6px 12px;
        bottom: 70px; /* Nad przyciskiem lokalizacji */
    }
    
    /* Feedback button */
    .location-btn,
    .feedback-btn-top {
        width: 100%;
        margin-top: 0.5rem;
    }
    
    /* Feedback popup */
    .feedback-popup-content {
        padding: 25px 20px;
        max-width: 90%;
    }
    
    .feedback-popup-content h3 {
        font-size: 18px;
    }
    
    .feedback-popup-content p {
        font-size: 14px;
    }
    
    .popup-btn {
        padding: 12px 20px;
        font-size: 14px;
    }
}

/* ============================================
   MENU DOSTĘPNOŚCI
   ============================================ */

/* Screen reader only */
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border-width: 0;
}

/* Floating toggle button */
.a11y-toggle {
    position: fixed;
    top: 75%;  /* 3/4 wysokości okna */
    right: 20px;
    transform: translateY(-50%);  /* Wycentruj przycisk */
    width: 56px;
    height: 56px;
    background: var(--primary-color);
    color: white;
    border: none;
    border-radius: 50%;
    cursor: pointer;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
    z-index: 9999;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.a11y-toggle:hover {
    transform: translateY(-50%) scale(1.1);
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.3);
}

.a11y-toggle:focus {
    outline: 3px solid #FFFF00;
    outline-offset: 2px;
}

/* Fancy tooltip */
.a11y-toggle::after {
    content: attr(data-tooltip);
    position: absolute;
    top: 50%;
    right: calc(100% + 15px);
    transform: translateY(-50%);
    background: #2D1B69;
    color: white;
    padding: 10px 16px;
    border-radius: 8px;
    font-size: 14px;
    white-space: nowrap;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s, transform 0.3s;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
    z-index: 10000;
}

.a11y-toggle::before {
    content: '';
    position: absolute;
    top: 50%;
    right: calc(100% + 7px);
    transform: translateY(-50%) rotate(-90deg);
    width: 0;
    height: 0;
    border-left: 8px solid transparent;
    border-right: 8px solid transparent;
    border-bottom: 8px solid #2D1B69;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s;
    z-index: 10001;
}

.a11y-toggle:hover::after,
.a11y-toggle:hover::before {
    opacity: 1;
    transform: translateY(0);
}

/* Accessibility panel */
.a11y-panel {
    position: fixed;
    top: 0;
    right: -400px;
    width: 380px;
    height: 100vh;
    background: white;
    box-shadow: -4px 0 20px rgba(0, 0, 0, 0.2);
    z-index: 10000;
    transition: right 0.3s ease;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
}

.a11y-panel.open {
    right: 0;
}

/* Header */
.a11y-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px;
    background: var(--primary-color);
    color: white;
    position: sticky;
    top: 0;
    z-index: 10;
}

.a11y-header h2 {
    margin: 0;
    font-size: 20px;
    display: flex;
    align-items: center;
}

.a11y-close {
    background: rgba(255, 255, 255, 0.2);
    border: none;
    color: white;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    font-size: 20px;
    cursor: pointer;
    transition: background 0.2s;
}

.a11y-close:hover {
    background: rgba(255, 255, 255, 0.3);
}

.a11y-close:focus {
    outline: 2px solid white;
    outline-offset: 2px;
}

/* Content */
.a11y-content {
    padding: 20px;
    flex: 1;
}

/* Section */
.a11y-section {
    margin-bottom: 24px;
    border: 1px solid var(--border-color);
    padding: 16px;
    border-radius: 8px;
}

.a11y-section legend {
    font-weight: 600;
    font-size: 16px;
    padding: 0 8px;
    color: var(--text-primary);
}

/* Buttons group */
.a11y-buttons {
    display: flex;
    gap: 8px;
    margin-top: 12px;
    flex-wrap: wrap;
}

.a11y-btn {
    flex: 1;
    min-width: 70px;
    padding: 10px 16px;
    border: 2px solid var(--border-color);
    background: white;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    color: var(--text-primary);
}

.a11y-btn:hover {
    border-color: var(--primary-color);
    background: var(--bg-secondary);
}

.a11y-btn:focus {
    outline: 2px solid var(--primary-color);
    outline-offset: 2px;
}

.a11y-btn.active {
    background: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
}

/* Checkbox */
.a11y-checkbox {
    display: flex;
    align-items: center;
    gap: 12px;
    cursor: pointer;
    margin-top: 12px;
}

.a11y-checkbox input[type="checkbox"] {
    width: 20px;
    height: 20px;
    cursor: pointer;
}

.a11y-checkbox span {
    font-size: 14px;
}

.a11y-hint {
    margin-top: 8px;
    font-size: 12px;
    color: var(--text-secondary);
}

/* Reset button */
.a11y-btn-reset {
    width: 100%;
    padding: 12px;
    background: var(--danger-color);
    color: white;
    border: none;
    border-radius: 6px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
}

.a11y-btn-reset:hover {
    background: #DC2626;
}

.a11y-btn-reset:focus {
    outline: 2px solid var(--danger-color);
    outline-offset: 2px;
}

/* Info box */
.a11y-info {
    margin-top: 20px;
    padding: 12px;
    background: var(--bg-secondary);
    border-radius: 6px;
    font-size: 13px;
    color: var(--text-secondary);
}

.a11y-info p {
    margin: 4px 0;
}

/* ============================================
   ACCESSIBILITY MODES
   ============================================ */

/* HIGH CONTRAST */
body.contrast-high {
    --primary-color: #0066CC;
    --secondary-color: #009900;
    --text-primary: #000000;
    --text-secondary: #333333;
    --bg-primary: #FFFFFF;
    --bg-secondary: #F0F0F0;
    --border-color: #000000;
    filter: contrast(1.2);
}

/* VERY HIGH CONTRAST - POPRAWIONE */
body.contrast-vhigh {
    --primary-color: #FFFF00;
    --secondary-color: #00FF00;
    --text-primary: #FFFFFF;
    --text-secondary: #CCCCCC;
    --bg-primary: #000000;
    --bg-secondary: #1A1A1A;
    --border-color: #FFFFFF;
    filter: contrast(1.5);
}

/* Przycisk toggle */
body.contrast-vhigh .a11y-toggle {
    background: #000000;
    color: #FFFF00;
    border: 3px solid #FFFF00;
}

/* Header panelu */
body.contrast-vhigh .a11y-header {
    background: #000000;
    color: #FFFF00;
    border-bottom: 3px solid #FFFF00;
}

/* Przyciski AKTYWNE - czarne tło + żółty tekst */
body.contrast-vhigh .a11y-btn.active {
    background: #000000 !important;
    color: #FFFF00 !important;
    border: 3px solid #FFFF00 !important;
    font-weight: 700;
}

/* Przyciski NIEAKTYWNE - białe tło + czarny tekst */
body.contrast-vhigh .a11y-btn {
    background: #FFFFFF;
    color: #000000;
    border: 3px solid #000000;
}

body.contrast-vhigh .a11y-btn:hover {
    background: #FFFF00;
    color: #000000;
    border: 3px solid #000000;
}

/* Sekcje */
body.contrast-vhigh .a11y-section {
    border: 2px solid #FFFF00;
    background: #000000;
}

body.contrast-vhigh .a11y-section legend {
    color: #FFFF00;
    background: #000000;
    padding: 0 12px;
}

/* Checkbox */
body.contrast-vhigh .a11y-checkbox {
    color: #FFFFFF;
}

body.contrast-vhigh .a11y-checkbox input[type="checkbox"] {
    border: 2px solid #FFFF00;
    outline: 2px solid #FFFF00;
}

/* Hint text */
body.contrast-vhigh .a11y-hint {
    color: #FFFF00;
}

/* Reset button */
body.contrast-vhigh .a11y-btn-reset {
    background: #FF0000;
    color: #FFFFFF;
    border: 3px solid #FFFFFF;
    font-weight: 700;
}

body.contrast-vhigh .a11y-btn-reset:hover {
    background: #FFFFFF;
    color: #FF0000;
    border: 3px solid #FF0000;
}

/* Info box */
body.contrast-vhigh .a11y-info {
    background: #1A1A1A;
    border: 2px solid #FFFF00;
    color: #FFFF00;
}

/* Zamknij button */
body.contrast-vhigh .a11y-close {
    background: #FFFF00;
    color: #000000;
    border: 2px solid #FFFF00;
}

body.contrast-vhigh .a11y-close:hover {
    background: #000000;
    color: #FFFF00;
}

/* Tooltip */
body.contrast-vhigh .a11y-toggle::after {
    background: #000000;
    color: #FFFF00;
    border: 3px solid #FFFF00;
}

body.contrast-vhigh .a11y-toggle::before {
    border-bottom-color: #FFFF00;
}

/* Panel tło */
body.contrast-vhigh .a11y-panel {
    background: #000000;
    border-left: 4px solid #FFFF00;
}

body.contrast-vhigh .a11y-content {
    background: #000000;
}

/* FONT SIZES - WCAG 2.0 (minimum 200%) */
html.font-small,
body.font-small {
    font-size: 75% !important;
}

html.font-normal,
body.font-normal {
    font-size: 100% !important;
}

html.font-large,
body.font-large {
    font-size: 150% !important;
}

html.font-xlarge,
body.font-xlarge {
    font-size: 200% !important;
}

/* Wymuszenie na elementach Leaflet (popup, kontrolki) */
body.font-large .leaflet-popup-content,
body.font-large .leaflet-control,
body.font-large .popup-content,
body.font-large .category-select,
body.font-large .search-result-item {
    font-size: 1rem !important;
}

body.font-xlarge .leaflet-popup-content,
body.font-xlarge .leaflet-control,
body.font-xlarge .popup-content,
body.font-xlarge .category-select,
body.font-xlarge .search-result-item {
    font-size: 1rem !important;
}

/* Przyciski w popup Leaflet */
body.font-large .leaflet-popup-content .popup-link,
body.font-xlarge .leaflet-popup-content .popup-link {
    font-size: 1rem !important;
}

/* ENHANCED FOCUS - wszystkie klikalne elementy */
body.enhanced-focus *:focus,
body.enhanced-focus a:focus,
body.enhanced-focus button:focus,
body.enhanced-focus input:focus,
body.enhanced-focus select:focus,
body.enhanced-focus textarea:focus,
body.enhanced-focus [role="button"]:focus,
body.enhanced-focus [tabindex]:focus {
    outline: 4px solid #FFFF00 !important;
    outline-offset: 3px !important;
    box-shadow: 0 0 0 6px rgba(255, 255, 0, 0.3) !important;
}

/* Leaflet - markery, popup, kontrolki */
body.enhanced-focus .leaflet-marker-icon:focus,
body.enhanced-focus .leaflet-popup-close-button:focus,
body.enhanced-focus .leaflet-control-zoom a:focus,
body.enhanced-focus .leaflet-control-layers-toggle:focus,
body.enhanced-focus .leaflet-control-layers label:focus {
    outline: 4px solid #FFFF00 !important;
    outline-offset: 3px !important;
    box-shadow: 0 0 0 6px rgba(255, 255, 0, 0.3) !important;
}

/* Linki w popup */
body.enhanced-focus .popup-link:focus,
body.enhanced-focus .leaflet-popup-content a:focus {
    outline: 4px solid #FFFF00 !important;
    outline-offset: 3px !important;
    box-shadow: 0 0 0 6px rgba(255, 255, 0, 0.3) !important;
}

/* Markery - hover też (dla lepszej widoczności) */
body.enhanced-focus .leaflet-marker-icon:hover {
    outline: 3px solid #FFFF00 !important;
    box-shadow: 0 0 0 5px rgba(255, 255, 0, 0.2) !important;
}

/* Search results */
body.enhanced-focus .search-result-item:focus,
body.enhanced-focus .search-result-item:hover {
    outline: 3px solid #FFFF00 !important;
    box-shadow: 0 0 0 4px rgba(255, 255, 0, 0.2) !important;
}

/* NO ANIMATIONS */
body.no-animations,
body.no-animations * {
    animation-duration: 0s !important;
    animation-delay: 0s !important;
    transition-duration: 0s !important;
    transition-delay: 0s !important;
}

/* ============================================
   MOBILE RESPONSIVE
   ============================================ */

@media (max-width: 768px) {
    .a11y-toggle {
        top: 80%;  /* Na mobile nieco niżej */
        right: 10px;
        width: 48px;
        height: 48px;
        transform: translateY(-50%);
    }

    .a11y-toggle:hover {
        transform: translateY(-50%) scale(1.1);
    }

    .a11y-toggle svg {
        width: 24px;
        height: 24px;
    }

    .a11y-toggle::after {
        right: -10px;
        font-size: 12px;
        padding: 8px 12px;
    }

    .a11y-toggle::before {
        right: 10px;
    }

    .a11y-panel {
        width: 100%;
        right: -100%;
    }

    .a11y-panel.open {
        right: 0;
    }

    .a11y-buttons {
        flex-direction: column;
    }

    .a11y-btn {
        min-width: auto;
    }
}

/* ========================================
   HOVER STATES - przyciski górne
   ======================================== */

/* Search input */
.search-bar input:hover {
    border-color: var(--primary-color);
    box-shadow: 0 2px 8px rgba(99, 102, 241, 0.15);
}

.search-bar input:focus {
    border-color: var(--primary-color);
    box-shadow: 0 2px 12px rgba(99, 102, 241, 0.25);
    outline: none; /* Użyjemy własnego fokusa */
}

/* Category select */
.category-select:hover {
    border-color: var(--primary-color);
    box-shadow: 0 2px 8px rgba(99, 102, 241, 0.15);
    cursor: pointer;
}

.category-select:focus {
    border-color: var(--primary-color);
    box-shadow: 0 2px 12px rgba(99, 102, 241, 0.25);
    outline: none;
}

/* Moja lokalizacja (zielony) */
.location-btn:hover {
    background: #059669;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(16, 185, 129, 0.3);
}

.location-btn:active {
    transform: translateY(0);
}

/* Podziel się opinią (pomarańczowy) */
.feedback-btn-top:hover {
    background: #DC2626;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(245, 158, 11, 0.3);
}

.feedback-btn-top:active {
    transform: translateY(0);
}

/* Map controls (radio buttons) */
.leaflet-control-layers label:hover {
    background: rgba(99, 102, 241, 0.1);
    cursor: pointer;
}

/* Focus dla keyboard navigation (Tab) - NAJWAŻNIEJSZE! */
*:focus-visible,
input:focus-visible,
select:focus-visible,
button:focus-visible,
a:focus-visible,
[role="button"]:focus-visible,
[tabindex]:focus-visible {
    outline: 3px solid #0066CC !important;
    outline-offset: 3px !important;
    box-shadow: 0 0 0 6px rgba(0, 102, 204, 0.2) !important;
}

/* Dla myszy (kliknięcie) - subtelniejszy fokus */
*:focus:not(:focus-visible) {
    outline: 2px solid rgba(99, 102, 241, 0.5);
    outline-offset: 2px;
}

/* Search input - specjalny fokus */
.search-bar input:focus-visible {
    outline: 3px solid #0066CC !important;
    outline-offset: 2px !important;
    border-color: #0066CC !important;
    box-shadow: 0 0 0 4px rgba(0, 102, 204, 0.15) !important;
}

/* Category select - specjalny fokus */
.category-select:focus-visible {
    outline: 3px solid #0066CC !important;
    outline-offset: 2px !important;
    border-color: #0066CC !important;
    box-shadow: 0 0 0 4px rgba(0, 102, 204, 0.15) !important;
}

/* Przyciski - fokus keyboard */
.location-btn:focus-visible,
.feedback-btn-top:focus-visible {
    outline: 3px solid #0066CC !important;
    outline-offset: 3px !important;
    box-shadow: 0 0 0 6px rgba(0, 102, 204, 0.25) !important;
}

/* Leaflet controls - fokus */
.leaflet-control-layers-toggle:focus-visible,
.leaflet-control-zoom a:focus-visible {
    outline: 3px solid #0066CC !important;
    outline-offset: 2px !important;
    box-shadow: 0 0 0 5px rgba(0, 102, 204, 0.2) !important;
}

/* Radio buttons w kontrolce mapy */
.leaflet-control-layers input[type="radio"]:focus-visible {
    outline: 3px solid #0066CC !important;
    outline-offset: 2px !important;
}

.leaflet-control-layers label:has(input:focus-visible) {
    background: rgba(0, 102, 204, 0.1);
    border-left: 3px solid #0066CC;
}

/* Markery - fokus keyboard */
.leaflet-marker-icon:focus-visible {
    outline: 4px solid #0066CC !important;
    outline-offset: 4px !important;
    box-shadow: 0 0 0 8px rgba(0, 102, 204, 0.3) !important;
    filter: brightness(1.2);
}

/* Popup close button */
.leaflet-popup-close-button:focus-visible {
    outline: 3px solid #0066CC !important;
    outline-offset: 2px !important;
    background: rgba(0, 102, 204, 0.1);
}

/* Links w popup */
.popup-link:focus-visible,
.leaflet-popup-content a:focus-visible {
    outline: 3px solid #0066CC !important;
    outline-offset: 2px !important;
    text-decoration: underline;
    background: rgba(0, 102, 204, 0.05);
}

/* ========================================
   ENHANCED FOCUS MODE - żółty (accessibility menu)
   ======================================== */

body.enhanced-focus *:focus-visible,
body.enhanced-focus input:focus-visible,
body.enhanced-focus select:focus-visible,
body.enhanced-focus button:focus-visible,
body.enhanced-focus a:focus-visible,
body.enhanced-focus [tabindex]:focus-visible {
    outline: 4px solid #FFFF00 !important;
    outline-offset: 4px !important;
    box-shadow: 0 0 0 8px rgba(255, 255, 0, 0.3) !important;
}

body.enhanced-focus .search-bar input:focus-visible,
body.enhanced-focus .category-select:focus-visible {
    outline: 4px solid #FFFF00 !important;
    border-color: #FFFF00 !important;
    box-shadow: 0 0 0 6px rgba(255, 255, 0, 0.3) !important;
}

body.enhanced-focus .location-btn:focus-visible,
body.enhanced-focus .feedback-btn-top:focus-visible {
    outline: 4px solid #FFFF00 !important;
    outline-offset: 4px !important;
    box-shadow: 0 0 0 8px rgba(255, 255, 0, 0.4) !important;
}

body.enhanced-focus .leaflet-marker-icon:focus-visible {
    outline: 5px solid #FFFF00 !important;
    outline-offset: 5px !important;
    box-shadow: 0 0 0 10px rgba(255, 255, 0, 0.4) !important;
}

/* ========================================
   MAP LAYER OPTIONS - Keyboard focus
   ======================================== */

/* Label focus (keyboard) */
.leaflet-control-layers label.map-layer-option:focus {
    outline: 3px solid #0066CC !important;
    outline-offset: 2px !important;
    background: rgba(0, 102, 204, 0.1) !important;
    border-radius: 4px;
}

/* Enhanced focus mode */
body.enhanced-focus .leaflet-control-layers label.map-layer-option:focus {
    outline: 4px solid #FFFF00 !important;
    outline-offset: 3px !important;
    background: rgba(255, 255, 0, 0.15) !important;
}

/* Hover też */
.leaflet-control-layers label.map-layer-option:hover {
    background: rgba(99, 102, 241, 0.08);
    cursor: pointer;
    border-radius: 4px;
}

/* Active (zaznaczony) */
.leaflet-control-layers label.map-layer-option:has(input:checked) {
    background: rgba(99, 102, 241, 0.12);
    border-left: 3px solid #6366F1;
    padding-left: 5px;
}

.indoor-btn {
   display: block;
   width: 100%;
   margin-top: 12px;
   padding: 12px;
   background: #10B981;
   color: white;
   border: none;
   border-radius: 8px;
   font-size: 15px;
   font-weight: 600;
   cursor: pointer;
   transition: background 0.2s;
 }
 .indoor-btn:hover { background: #059669; }
 .indoor-btn:focus { outline: 3px solid rgba(16,185,129,0.4); }