/* AK Türkiye Atlası - Main Styles */
:root {
    --turkish-red: #E30A17;
    --turkish-red-dark: #C41E3A;
    --ottoman-gold: #D4AF37;
    --ottoman-gold-dark: #B8860B;
    --aegean-blue: #2E86AB;
    --aegean-blue-dark: #1B4F72;
    --anatolian-brown: #A0522D;
    --anatolian-brown-dark: #8B4513;
    --turkish-white: #F8F9FA;
    --gold: #D4AF37;
    --purple: #8E44AD;
    --brown: #A0522D;
}
/* ===== MARKER UTILITY CLASSES ===== */
.marker {
    width: 20px;
    height: 20px;
    border: 2px solid white;
    border-radius: 50%;
    box-shadow: 0 2px 4px rgba(0,0,0,0.3);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 10px;
    font-weight: bold;
    transition: all 0.2s ease;
}
.marker--small {
    width: 18px;
    height: 18px;
    font-size: 9px;
}
.marker--large {
    width: 24px;
    height: 24px;
    font-size: 12px;
}
/* ===== MARKER TYPE CLASSES ===== */
.marker-city {
    background-color: var(--turkish-red);
}
.marker-city:hover {
    background-color: var(--turkish-red-dark);
    transform: scale(1.1);
}
.marker-unesco {
    background-color: var(--ottoman-gold);
    transform: rotate(45deg);
    box-shadow: 0 3px 8px rgba(212, 175, 55, 0.4);
}
.marker-unesco:hover {
    background-color: var(--ottoman-gold-dark);
    transform: rotate(45deg) scale(1.1);
}
.marker-unesco .marker__inner {
    transform: rotate(-45deg);
    font-size: 12px;
    font-weight: bold;
}
.marker-university {
    background-color: var(--aegean-blue);
}
.marker-university:hover {
    background-color: var(--aegean-blue-dark);
    transform: scale(1.1);
}
.marker-vakif {
    background-color: var(--purple);
}
.marker-vakif:hover {
    background-color: #6C3483;
    transform: scale(1.1);
}
.marker-airport {
    background-color: var(--anatolian-brown);
}
.marker-airport:hover {
    background-color: var(--anatolian-brown-dark);
    transform: scale(1.1);
}
/* ===== LAYER TOGGLE CLASSES ===== */
.layer-toggle {
    border: 2px solid;
    background: transparent;
    transition: all 0.3s ease;
    padding: 0.5rem 1rem;
    border-radius: 0.375rem;
    font-size: 0.9rem;
    min-height: 60px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}
.layer-toggle:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.2);
}
.layer-toggle.active {
    color: #FFFFFF !important;
    box-shadow: 0 2px 8px rgba(0,0,0,0.3);
}
/* Layer-specific toggle styles */
.layer-toggle--cities {
    border-color: var(--turkish-red);
    color: var(--turkish-red);
}
.layer-toggle--cities.active {
    background-color: var(--turkish-red);
    border-color: var(--turkish-red);
}
.layer-toggle--unesco {
    border-color: var(--ottoman-gold);
    color: var(--ottoman-gold);
}
.layer-toggle--unesco.active {
    background-color: var(--ottoman-gold);
    border-color: var(--ottoman-gold);
}
.layer-toggle--universities {
    border-color: var(--aegean-blue);
    color: var(--aegean-blue);
}
.layer-toggle--universities.active {
    background-color: var(--aegean-blue);
    border-color: var(--aegean-blue);
}
.layer-toggle--vakif {
    border-color: var(--purple);
    color: var(--purple);
}
.layer-toggle--vakif.active {
    background-color: var(--purple);
    border-color: var(--purple);
}
.layer-toggle--airports {
    border-color: var(--anatolian-brown);
    color: var(--anatolian-brown);
}
.layer-toggle--airports.active {
    background-color: var(--anatolian-brown);
    border-color: var(--anatolian-brown);
}
.layer-toggle--all {
    border-color: var(--aegean-blue);
    color: var(--aegean-blue);
    background: transparent;
}
.layer-toggle--all.active {
    background-color: var(--aegean-blue);
    border-color: var(--aegean-blue);
}
/* ===== LAYER TOGGLE TEXT ===== */
.layer-toggle-text {
    font-size: 12px;
    line-height: 1;
    margin-top: 0.25rem;
}
/* ===== LAYER TOGGLE ICONS ===== */
.layer-toggle-icon {
    width: 1.2em;
    height: 1.2em;
    margin-bottom: 0.25rem;
    filter: brightness(0) invert(1); /* Standard: weiß für aktive Buttons */
}
/* Inaktive Buttons - Icons folgen der Textfarbe */
.layer-toggle:not(.active).layer-toggle--cities .layer-toggle-icon {
    filter: brightness(0) saturate(100%) invert(27%) sepia(51%) saturate(2878%) hue-rotate(346deg) brightness(104%) contrast(97%) !important;
}
.layer-toggle:not(.active).layer-toggle--unesco .layer-toggle-icon {
    filter: brightness(0) saturate(100%) invert(83%) sepia(31%) saturate(638%) hue-rotate(359deg) brightness(103%) contrast(107%) !important;
}
.layer-toggle:not(.active).layer-toggle--universities .layer-toggle-icon {
    filter: brightness(0) saturate(100%) invert(48%) sepia(79%) saturate(2476%) hue-rotate(182deg) brightness(95%) contrast(101%) !important;
}
.layer-toggle:not(.active).layer-toggle--vakif .layer-toggle-icon {
    filter: brightness(0) saturate(100%) invert(27%) sepia(83%) saturate(2878%) hue-rotate(267deg) brightness(89%) contrast(101%) !important;
}
.layer-toggle:not(.active).layer-toggle--airports .layer-toggle-icon {
    filter: brightness(0) saturate(100%) invert(47%) sepia(51%) saturate(2878%) hue-rotate(346deg) brightness(104%) contrast(97%) !important;
}
.layer-toggle:not(.active).layer-toggle--all .layer-toggle-icon {
    filter: brightness(0) saturate(100%) invert(48%) sepia(79%) saturate(2476%) hue-rotate(182deg) brightness(95%) contrast(101%) !important;
}
/* ===== LEGEND ICONS ===== */
.legend-icon {
    width: 1.2em;
    height: 1.2em;
    margin-right: 0.5rem;
    filter: brightness(0) invert(0.6); /* Standard grau */
}
/* Legend-Icons folgen der Textfarbe */
.list-unstyled li:nth-child(1) .legend-icon {
    filter: brightness(0) saturate(100%) invert(27%) sepia(51%) saturate(2878%) hue-rotate(346deg) brightness(104%) contrast(97%) !important; /* Türkisches Rot */
}
.list-unstyled li:nth-child(2) .legend-icon {
    filter: brightness(0) saturate(100%) invert(83%) sepia(31%) saturate(638%) hue-rotate(359deg) brightness(103%) contrast(107%) !important; /* Gold */
}
.list-unstyled li:nth-child(3) .legend-icon {
    filter: brightness(0) saturate(100%) invert(48%) sepia(79%) saturate(2476%) hue-rotate(182deg) brightness(95%) contrast(101%) !important; /* Blau */
}
.list-unstyled li:nth-child(4) .legend-icon {
    filter: brightness(0) saturate(100%) invert(27%) sepia(83%) saturate(2878%) hue-rotate(267deg) brightness(89%) contrast(101%) !important; /* Lila */
}
.list-unstyled li:nth-child(5) .legend-icon {
    filter: brightness(0) saturate(100%) invert(47%) sepia(51%) saturate(2878%) hue-rotate(346deg) brightness(104%) contrast(97%) !important; /* Braun */
}
/* Verbesserte Legend-Liste */
.list-unstyled li {
    display: flex;
    align-items: center;
    padding: 0.5rem 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    transition: all 0.2s ease;
}
.list-unstyled li:last-child {
    border-bottom: none;
}
.list-unstyled li:hover {
    background-color: rgba(255, 255, 255, 0.05);
    border-radius: 0.375rem;
    padding-left: 0.5rem;
    padding-right: 0.5rem;
}
.list-unstyled li span {
    font-weight: 500;
    margin-right: 0.5rem;
}
.list-unstyled li:last-child,
.list-unstyled li:nth-last-child(2) {
    border-bottom: none;
    font-style: italic;
    color: var(--bs-secondary);
}
/* ===== STATISTICS ICONS ===== */
.stats-icon {
    width: 1.2em;
    height: 1.2em;
    display: block;
    margin: 0 auto 0.5rem auto;
    filter: brightness(0) invert(0.6); /* Standard grau */
}
/* Stats-Icons folgen der Textfarbe - basierend auf der Position */
.stats-card:nth-child(1) .stats-icon {
    filter: brightness(0) saturate(100%) invert(27%) sepia(51%) saturate(2878%) hue-rotate(346deg) brightness(104%) contrast(97%) !important; /* Türkisches Rot */
}
.stats-card:nth-child(2) .stats-icon {
    filter: brightness(0) saturate(100%) invert(83%) sepia(31%) saturate(638%) hue-rotate(359deg) brightness(103%) contrast(107%) !important; /* Gold */
}
.stats-card:nth-child(3) .stats-icon {
    filter: brightness(0) saturate(100%) invert(48%) sepia(79%) saturate(2476%) hue-rotate(182deg) brightness(95%) contrast(101%) !important; /* Blau */
}
.stats-card:nth-child(4) .stats-icon {
    filter: brightness(0) saturate(100%) invert(27%) sepia(83%) saturate(2878%) hue-rotate(267deg) brightness(89%) contrast(101%) !important; /* Lila */
}
.stats-card:nth-child(5) .stats-icon {
    filter: brightness(0) saturate(100%) invert(47%) sepia(51%) saturate(2878%) hue-rotate(346deg) brightness(104%) contrast(97%) !important; /* Braun */
}
/* Spezifische Selektoren für Stats-Icons basierend auf Container-ID */
.col-6:nth-child(1) .stats-icon {
    filter: brightness(0) saturate(100%) invert(27%) sepia(51%) saturate(2878%) hue-rotate(346deg) brightness(104%) contrast(97%) !important; /* Türkisches Rot */
}
.col-6:nth-child(2) .stats-icon {
    filter: brightness(0) saturate(100%) invert(83%) sepia(31%) saturate(638%) hue-rotate(359deg) brightness(103%) contrast(107%) !important; /* Gold */
}
.col-6:nth-child(3) .stats-icon {
    filter: brightness(0) saturate(100%) invert(48%) sepia(79%) saturate(2476%) hue-rotate(182deg) brightness(95%) contrast(101%) !important; /* Blau */
}
.col-6:nth-child(4) .stats-icon {
    filter: brightness(0) saturate(100%) invert(27%) sepia(83%) saturate(2878%) hue-rotate(267deg) brightness(89%) contrast(101%) !important; /* Lila */
}
.col-6:nth-child(5) .stats-icon {
    filter: brightness(0) saturate(100%) invert(47%) sepia(51%) saturate(2878%) hue-rotate(346deg) brightness(104%) contrast(97%) !important; /* Braun */
}
/* ===== MAP CONTAINER ===== */
#map {
    height: 100vh;
    width: 100%;
}
/* ===== LOADING SPINNER ===== */
#loading {
    display: none; /* Standardmäßig versteckt */
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 9999;
    background-color: rgba(0, 0, 0, 0.8);
    padding: 2rem;
    border-radius: 0.5rem;
}
.loading {
    display: flex;
    justify-content: center;
    align-items: center;
    height: 100vh;
}
.error {
    color: #dc3545;
    text-align: center;
    padding: 2rem;
}
/* ===== LAYER CONTROL STYLES ===== */
.layer-control {
    background-color: var(--bs-dark);
    border: 1px solid var(--bs-border-color);
    border-radius: 0.375rem;
    padding: 0.75rem;
    margin-bottom: 1rem;
}
/* ===== STATISTICS CARDS ===== */
.stats-card {
    border-radius: 0.375rem;
    transition: transform 0.2s ease;
    text-align: center;
    padding: 0.5rem;
    min-height: 80px;
    display: flex;
    flex-direction: column;
    justify-content: center;
}
.stats-card:hover {
    transform: translateY(-2px);
}
/* ===== ACCESSIBILITY IMPROVEMENTS ===== */
/* Ensure sufficient contrast for all interactive elements */
.layer-toggle:focus {
    outline: 2px solid var(--aegean-blue);
    outline-offset: 2px;
}
.marker:focus {
    outline: 2px solid white;
    outline-offset: 2px;
}
/* Touch-friendly hit areas for mobile */
@media (max-width: 768px) {
    .layer-toggle {
        min-height: 70px;
        padding: 0.75rem 0.5rem;
    }
    .marker {
        width: 24px;
        height: 24px;
        font-size: 12px;
    }
    .marker--small {
        width: 22px;
        height: 22px;
        font-size: 11px;
    }
    .marker--large {
        width: 28px;
        height: 28px;
        font-size: 14px;
    }
}
/* ===== RESPONSIVE DESIGN ===== */
@media (max-width: 768px) {
    .legend-icon {
        font-size: 1em;
        margin-right: 0.25rem;
    }
    .stats-icon {
        width: 1em;
        height: 1em;
    }
    .layer-toggle-icon {
        font-size: 1em;
    }
    .stats-card {
        min-height: 70px;
        padding: 0.375rem;
    }
}
/* ===== DARK MODE SUPPORT (Future-ready) ===== */
@media (prefers-color-scheme: dark) {
    /* Dark mode specific adjustments can be added here */
}
/* ===== HIGH CONTRAST MODE SUPPORT ===== */
@media (prefers-contrast: high) {
    .marker {
        border-width: 3px;
        box-shadow: 0 3px 6px rgba(0,0,0,0.5);
    }
    .layer-toggle {
        border-width: 3px;
    }
}
