/* Language Switcher */
.language-switcher {
    display: flex;
    gap: 0.5rem;
    align-items: center;
}

.language-link {
    opacity: 0.6;
    transition: opacity 0.2s;
    border: 2px solid transparent;
    border-radius: 4px;
    padding: 2px;
    display: inline-block;
}

.language-link:hover {
    opacity: 1;
}

.language-link.active {
    opacity: 1;
    border-color: var(--primary-600);
}

.language-link img {
    display: block;
}

/* Cards */
.card {
    background: white;
    border-radius: 0.5rem;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    overflow: hidden;
    transition: transform 0.2s;
}

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

/* Map Container */
#map {
    width: 100%;
    height: 600px;
    position: relative;
    border-radius: 0.5rem;
    overflow: hidden;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
}

/* Map Switcher */
.map-switcher {
    position: absolute;
    top: 10px;
    right: 10px;
    z-index: 1000;
    background: white;
    padding: 10px;
    border-radius: 4px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.2);
}

.map-switcher-btn {
    display: block;
    width: 100%;
    padding: 8px 16px;
    margin-bottom: 5px;
    border: 1px solid #ddd;
    background: white;
    cursor: pointer;
    border-radius: 4px;
    transition: all 0.2s;
    font-size: 14px;
    text-align: left;
}

.map-switcher-btn:hover {
    background: #f0f0f0;
}

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

.map-switcher-btn:last-child {
    margin-bottom: 0;
}

/* ==========================================================================
   MAP PAGE RESPONSIVE LAYOUT
   ========================================================================== */

/* Desktop Layout */
.map-layout {
    display: flex;
    gap: 1rem;
    height: calc(100vh - 140px);
}

.map-container {
    width: 80%;
    flex-shrink: 0;
    height: 100%;
}

.map-sidebar {
    width: 20%;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    height: 100%;
    overflow: hidden;
}

.poi-list-container {
    flex: 1;
    min-height: 0;
    display: flex;
    flex-direction: column;
}

/* POI List Item Styles */
.poi-list-item {
    background-color: white;
    border-color: #e5e7eb;
}

.poi-list-item:nth-child(odd) {
    background-color: white;
}

.poi-list-item:nth-child(even) {
    background-color: #f9fafb;
}

.poi-list-item:hover {
    background-color: var(--primary-50) !important;
}

/* POI List Item Dark Mode */
.dark .poi-list-item {
    background-color: #1e293b;
    border-color: #475569;
}

.dark .poi-list-item:nth-child(odd) {
    background-color: #1e293b;
}

.dark .poi-list-item:nth-child(even) {
    background-color: #334155;
}

.dark .poi-list-item:hover {
    background-color: var(--primary-900) !important;
}

.dark .poi-list-item h4 {
    color: #f1f5f9;
}

.dark .poi-list-item .text-gray-500 {
    color: #94a3b8 !important;
}

.dark .poi-list-item .border-gray-100 {
    border-color: #475569 !important;
}

/* POI Category Badge */
.poi-category-badge {
    background-color: var(--primary-100);
    color: var(--primary-700);
}

.dark .poi-category-badge {
    background-color: var(--primary-900);
    color: var(--primary-300);
}

/* POI List Divider */
.poi-list-divider {
    border-color: #e5e7eb;
}

.dark .poi-list-divider {
    border-color: #475569;
}

/* POI List Filters Text */
.poi-list-filters {
    color: #374151;
}

.dark .poi-list-filters {
    color: #cbd5e1;
}

/* POI List Description */
.poi-list-description {
    padding: 8px;
    margin-left: 8px;
    border-left: 2px solid #e5e7eb;
    color: #6b7280;
}

.dark .poi-list-description {
    border-left-color: #475569;
    color: #94a3b8;
}

/* POI List Link */
.poi-list-link {
    color: var(--primary-600);
}

.poi-list-link:hover {
    color: var(--primary-800);
}

.dark .poi-list-link {
    color: var(--primary-400);
}

.dark .poi-list-link:hover {
    color: var(--primary-300);
}

/* Medium Desktop: 1024px - 1650px - Sidebar 25% */
@media (min-width: 1025px) and (max-width: 1650px) {
    .map-container {
        width: 75%;
    }

    .map-sidebar {
        width: 25%;
    }
}

/* Tablet & Mobile: Vertical Stack */
@media (max-width: 1024px) {
    .map-layout {
        flex-direction: column;
        height: auto;
    }

    .map-container {
        width: 100%;
        height: 60vh;
        min-height: 400px;
    }

    .map-sidebar {
        width: 100%;
        height: auto;
        overflow: visible;
        margin-top: 1rem;
    }

    .poi-list-container {
        max-height: 50vh;
        overflow-y: auto;
    }
}

/* Mobile-specific adjustments */
@media (max-width: 768px) {
    .map-switcher {
        top: 5px;
        right: 5px;
        padding: 5px;
    }

    .map-switcher-btn {
        padding: 6px 12px;
        font-size: 12px;
    }

    #map {
        height: 400px;
    }

    .map-container {
        min-height: 350px;
    }
}

/* Loading Animation */
.loading {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid rgba(0,0,0,0.1);
    border-radius: 50%;
    border-top-color: #3b82f6;
    animation: spin 1s ease-in-out infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* ==========================================================================
   DARK MODE STYLES
   ========================================================================== */

/* Language Switcher Dark Mode */
.dark .language-link.active {
    border-color: var(--primary-400);
}

/* Cards Dark Mode */
.dark .card {
    background: #1e293b;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

.dark .card:hover {
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.4);
}

/* Map Switcher Dark Mode (Fallback) */
.dark .map-switcher {
    background: #1e293b;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.4);
}

.dark .map-switcher-btn {
    background: #1e293b;
    border-color: #475569;
    color: #e2e8f0;
}

.dark .map-switcher-btn:hover {
    background: #334155;
}

.dark .map-switcher-btn.active {
    background: var(--primary-600);
    color: white;
    border-color: var(--primary-600);
}

/* Loading Animation Dark Mode */
.dark .loading {
    border-color: rgba(255, 255, 255, 0.1);
    border-top-color: #60a5fa;
}

/* ==========================================================================
   SVG RENDERING FIX - Diagonal Line Artifacts
   ========================================================================== */

/* Fix für SVG-Rendering-Artefakte (diagonale Linien) */
footer svg {
    shape-rendering: geometricPrecision;
    transform: translateZ(0);
    backface-visibility: hidden;
}

/* Alternative: crispEdges für schärfere Kanten */
footer svg path {
    shape-rendering: geometricPrecision;
}

/* Hardware-Beschleunigung für Footer-Container */
footer {
    transform: translateZ(0);
    backface-visibility: hidden;
    -webkit-backface-visibility: hidden;
    isolation: isolate;
}

/* Globaler SVG-Fix für alle Icons */
svg {
    overflow: visible;
    shape-rendering: geometricPrecision;
}

/* Fix für Stroke-basierte SVGs */
svg[stroke="currentColor"],
svg [stroke="currentColor"] {
    vector-effect: non-scaling-stroke;
}

/* Verhindert Subpixel-Rendering-Probleme */
header, footer, main, nav {
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* ==========================================================================
   NAVIGATION BREAKPOINT - 1024px
   Desktop-Navigation ab 1024px, Hamburger-Menu unter 1024px
   ========================================================================== */

/* Base Styles - Default hidden, shown via media query */
.nav-desktop-menu {
    display: none;
    list-style: none;
    margin: 0;
    padding: 0;
    flex-direction: row;
}

.nav-desktop-actions {
    display: none;
}

.nav-mobile-toggle {
    display: block;
}

/* Mobile Controls - Default versteckt */
.nav-mobile-controls {
    display: none;
}

/* Desktop Navigation - sichtbar ab 1024px */
@media (min-width: 1024px) {
    .nav-desktop-menu {
        display: flex !important;
        flex-direction: row !important;
        align-items: center !important;
    }
    .nav-mobile-toggle {
        display: none !important;
    }
    .nav-mobile-controls {
        display: none !important;
    }
    .nav-desktop-actions {
        display: flex !important;
    }
}

/* Mobile/Tablet Navigation - unter 1024px */
@media (max-width: 1023px) {
    .nav-desktop-menu {
        display: none !important;
    }
    .nav-mobile-toggle {
        display: block !important;
    }
    .nav-desktop-actions {
        display: none !important;
    }
}

/* Mobile: Logo-Text ausblenden, nur Icon zeigen */
@media (max-width: 767px) {
    .logo a span {
        display: none;
    }
}
.nav-mobile-toggle {
    flex-shrink: 0;
}
.nav-mobile-controls {
    flex-shrink: 0;
}

/* Mobile Controls nur unter 768px anzeigen (Topbar ist ab 768px sichtbar) */
@media (max-width: 767px) {
    .nav-mobile-controls {
        display: flex !important;
    }
}

@media (min-width: 768px) {
    .nav-mobile-controls {
        display: none !important;
    }
}
