/* ===== 1. RESET & BASE STYLES ===== */

/* Verhindert das lästige Markieren von Texten auf dem Handy */
        body, p, h1, h2, h3, h4, h5, h6, span, a, div {
            -webkit-user-select: none;
            -ms-user-select: none;
            user-select: none;
            -webkit-touch-callout: none;
            -webkit-tap-highlight-color: transparent;
        }

        /* Ausnahmen für Suchfelder, damit man dort schreiben und markieren kann */
        input, textarea {
            -webkit-user-select: text;
            user-select: text;
        }
        
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    -webkit-tap-highlight-color: transparent;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: #ffffff;
    color: #333;
    line-height: 1.6;
    overflow-x: hidden;
    transition: background 0.3s ease, color 0.3s ease;
}

body.dark-mode {
    background-color: #121212;
    color: #e0e0e0;
}

/* ===== 2. HEADER NAV & TOP CONTROLS ===== */
.header-nav {
    position: absolute;
    top: 0; left: 0; right: 0;
    background: linear-gradient(to bottom, rgba(0,0,0,0.6) 0%, rgba(0,0,0,0) 100%);
    padding: 15px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    z-index: 10;
}

.back-button {
    background: rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    border: 1px solid rgba(255, 255, 255, 0.3);
    color: white;
    padding: 6px 14px;
    border-radius: 20px;
    cursor: pointer;
    font-size: 0.85em;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    white-space: nowrap;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
    transition: all 0.3s ease;
}

.back-button:hover {
    background: white;
    color: #2b231c;
    border-color: white;
    transform: translateY(-1px);
}

.top-right-controls {
    position: absolute;
    top: 20px;
    right: 20px;
    display: flex;
    flex-direction: column;
    gap: 12px;
    z-index: 100;
}

.glass-circle-btn {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.4) !important;
    -webkit-backdrop-filter: blur(12px) !important;
    backdrop-filter: blur(12px) !important;
    border: 1px solid rgba(255, 255, 255, 0.5) !important;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    cursor: pointer;
    text-decoration: none;
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    color: #333;
    outline: none;
    position: relative;
    font-family: inherit;
}

.glass-circle-btn:hover {
    transform: scale(1.1);
    background: rgba(255, 255, 255, 0.7) !important;
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.15);
}

body.dark-mode .glass-circle-btn {
    background: rgba(30, 30, 30, 0.5) !important;
    border-color: rgba(255, 255, 255, 0.2) !important;
    color: #fff;
}

body.dark-mode .glass-circle-btn:hover {
    background: rgba(50, 50, 50, 0.8) !important;
}

.glass-circle-btn::before {
    content: attr(data-tooltip);
    position: absolute;
    right: 55px;
    top: 50%;
    transform: translateY(-50%) scale(0.9);
    background: rgba(255, 255, 255, 0.85) !important;
    backdrop-filter: blur(12px) !important;
    -webkit-backdrop-filter: blur(12px) !important;
    border: 1px solid rgba(255, 255, 255, 0.6) !important;
    color: #222 !important;
    font-size: 0.8rem !important;
    font-weight: 500 !important;
    letter-spacing: 0.2px;
    text-decoration: none !important;
    white-space: nowrap;
    padding: 6px 14px;
    border-radius: 20px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.15);
    opacity: 0;
    pointer-events: none;
    transition: all 0.25s ease-in-out;
}

.glass-circle-btn:hover::before {
    opacity: 1;
    transform: translateY(-50%) scale(1);
}

body.dark-mode .glass-circle-btn::before {
    background: rgba(25, 25, 25, 0.85) !important;
    border-color: rgba(255, 255, 255, 0.2) !important;
    color: #fff !important;
}

.spotify-icon { width: 20px; height: 20px; fill: #1DB954; }
.spotify-btn:hover { box-shadow: 0 6px 20px rgba(29, 185, 84, 0.3) !important; }

/* ===== 3. HERO BANNER SECTIONS ===== */
.hero {
    background: linear-gradient(135deg, #e6d7c3 0%, #c8b39b 100%);
    color: #2b231c;
    padding: 100px 20px;
    text-align: center;
    min-height: 600px;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
}

.profile-pic {
    width: 150px;
    height: 150px;
    border-radius: 50%;
    border: 5px solid white;
    margin-bottom: 30px;
    object-fit: cover;
    box-shadow: 0 10px 40px rgba(0,0,0,0.1);
    cursor: pointer;
    transition: transform 0.3s ease;
}

.profile-pic:hover { transform: scale(1.05); }
.hero h1 { font-size: 3em; margin-bottom: 15px; font-weight: 700; }
.subtitle { font-size: 1.4em; margin-bottom: 20px; font-weight: 300; }

.description {
    font-size: 1.1em;
    line-height: 1.8;
    margin: 0 auto 20px auto;
    text-align: center;
    max-width: 550px;
    opacity: 0.9;
}

.travel-stats {
    display: flex;
    justify-content: center;
    gap: 40px;
    margin-top: 30px;
}

.stat { display: flex; flex-direction: column; align-items: center; }
.stat-number { font-size: 2em; font-weight: 700; }
.stat-label { font-size: 0.9em; opacity: 0.9; }

.hero-clean-banner {
    position: relative;
    height: 425px;
    width: 100%;
    display: flex;
    align-items: flex-end;
    justify-content: flex-start;
    overflow: hidden;
    background: linear-gradient(135deg, #e6d7c3 0%, #c8b39b 100%);
}

.banner-overlay {
    width: 100%;
    padding: 35px 30px;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.75) 0%, rgba(0, 0, 0, 0) 100%);
    z-index: 2;
}

.country-name {
    max-width: 1200px;
    margin: 0 auto;
    font-size: 3.2em;
    font-weight: 700;
    color: #ffffff;
}

.hero-image-banner {
    width: 100%;
    height: 550px;
    position: relative;
    overflow: hidden;
    background-color: #c8b39b;
}

.hero-image-banner img { width: 100%; height: 100%; object-fit: cover; }

.hero-overlay {
    position: absolute;
    bottom: 0; left: 0; right: 0;
    background: linear-gradient(to top, rgba(0,0,0,0.7) 0%, rgba(0,0,0,0) 100%);
    padding: 50px 20px 40px 20px;
    color: white;
}

.hero-actions-container {
    max-width: 1100px;
    margin: 16px auto 0 auto;
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
}

.weather-badge, .share-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.35);
    padding: 7px 18px;
    border-radius: 20px;
    color: white;
    font-size: 0.9em;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
}

.weather-badge:hover, .share-btn:hover {
    background: rgba(255, 255, 255, 0.35);
    transform: translateY(-2px);
    color: white;
}

.city-title {
    max-width: 1100px;
    margin: 0 auto;
    font-size: 3.5em;
    font-weight: 700;
}

/* ===== 4. CONTAINER & SEARCH BAR ===== */
.container, .cities-section {
    max-width: 1200px;
    margin: 0 auto;
    padding: 50px 20px;
}

.search-container {
    max-width: 500px;
    margin: 0 auto 40px auto;
    position: relative;
}

.search-input {
    width: 100%;
    padding: 14px 20px 14px 48px;
    font-size: 1em;
    border-radius: 30px;
    border: 1px solid #e0e0e0;
    background-color: white;
    color: #333;
    outline: none;
    transition: all 0.3s ease;
}

.search-input:focus { border-color: #967959; }

.search-icon {
    position: absolute;
    left: 18px; top: 50%;
    transform: translateY(-50%);
    opacity: 0.5;
}

body.dark-mode .search-input {
    background-color: #1e1e1e;
    color: #ffffff;
    border-color: rgba(255, 255, 255, 0.15);
}

/* ===== 5. GRIDS & CARDS ===== */
.cities-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 25px;
}

@media (max-width: 1024px) { .cities-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 600px) { .cities-grid { grid-template-columns: 1fr; } }

.city-card {
    background: white;
    border-radius: 15px;
    overflow: hidden;
    cursor: pointer;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
    transition: all 0.4s ease;
}

.city-card:hover { transform: translateY(-10px); }

.city-card-image-wrapper, .image-wrapper {
    width: 100%;
    height: 160px;
    position: relative;
    overflow: hidden;
}

.city-card-image-wrapper img, .image-wrapper img {
    width: 100%; height: 100%; object-fit: cover;
    transition: transform 0.4s ease;
}

.city-card:hover img { transform: scale(1.08); }

.city-tag {
    position: absolute;
    top: 15px; right: 15px;
    background: rgba(51, 51, 51, 0.85);
    color: white;
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 0.8em;
}

.city-info { padding: 20px; background: white; transition: background 0.3s ease; }
.city-info h3 { font-size: 1.4em; color: #967959; margin-bottom: 8px; }

body.dark-mode .city-card, body.dark-mode .city-info {
    background-color: #1e1e1e;
    color: #e0e0e0;
}

/* ===== 6. DETAILS PAGE LAYOUT (FIX FOR KACHEL-ÜBERLAPPUNG) ===== */
.info-grid { 
    display: grid; 
    grid-template-columns: 1fr 1fr; 
    gap: 30px; 
    margin-bottom: 30px;
}

.info-box, .gallery-section {
    background: #ffffff;
    padding: 35px;
    border-radius: 16px;
    border-left: 5px solid #c8b39b;
    box-shadow: 0 4px 20px rgba(0,0,0,0.06);
    isolation: isolate;
}

body.dark-mode .info-box, 
body.dark-mode .gallery-section { 
    background-color: #1e1e1e !important; 
    border-left-color: #967959;
}

.info-box h2, .gallery-section h2 { 
    color: #967959; 
    margin-bottom: 20px; 
    font-size: 1.5em;
}

.info-box ul { list-style: none; }

.info-box li, .restaurant-item {
    padding: 14px 0;
    border-bottom: 1px solid #f0f0f0;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 10px;
}

.info-box li:last-child, .restaurant-item:last-child {
    border-bottom: none;
}

body.dark-mode .info-box li, 
body.dark-mode .restaurant-item { 
    border-bottom-color: rgba(255,255,255,0.08); 
}

/* NEUER FIX FÜR HIGHLIGHTS LISTE (Verhindert Verrutschen bei langen Namen) */
.info-box li a.maps-link {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    text-align: left;
}

.highlight-name, .restaurant-name { 
    font-weight: 700; 
    color: #333; 
}

.highlight-name {
    flex: 1; /* Lässt den Text sauber umbrechen, während das Icon fix rechts bleibt */
}

.maps-link { text-decoration: none; color: inherit; }
.maps-link:hover { color: #967959; }

body.dark-mode .highlight-name, 
body.dark-mode .restaurant-name { color: #fff; }

/* Erstreckt die Beschreibungskachel über beide Spalten (doppelte Breite) */
.full-width-box {
    grid-column: 1 / -1;
    margin-bottom: 10px;
}

/* ===== 7. GALERIE & LIGHTBOX STYLES ===== */
.gallery-section {
    margin-top: 30px;
}

/* ===== GALERIE GRID (EXAKT 5 SPALTEN) ===== */
.gallery-grid {
    display: grid;
    /* Erzwingt IMMER genau 5 Spalten in einer Reihe */
    grid-template-columns: repeat(5, 1fr); 
    gap: 15px;
}

.gallery-item {
    height: 140px;
    border-radius: 12px;
    overflow: hidden;
    cursor: pointer;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.gallery-item:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 20px rgba(0,0,0,0.2);
}

.gallery-item img { 
    width: 100%; 
    height: 100%; 
    object-fit: cover; /* Verhindert Verzerrungen */
}

/* RESPONSIVE ANPASSUNG FÜR MOBILGERÄTE */
@media (max-width: 900px) {
    .gallery-grid {
        /* Auf kleineren Tablets 3 Spalten */
        grid-template-columns: repeat(3, 1fr); 
    }
}

@media (max-width: 500px) {
    .gallery-grid {
        /* Auf Smartphones 2 Spalten */
        grid-template-columns: repeat(2, 1fr); 
    }
}

/* Lightbox Modal */
.gallery-modal-img {
    max-width: 85%;
    max-height: 80vh;
    border-radius: 12px;
    box-shadow: 0 10px 40px rgba(0,0,0,0.5);
    object-fit: contain;
}

.gallery-nav-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: none !important; /* Entfernt jeglichen Hintergrund */
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
    border: none;
    color: white;
    font-size: 2.5em; /* Schöne Größe für die Pfeile */
    cursor: pointer;
    text-shadow: 0 2px 8px rgba(0, 0, 0, 0.8); /* Sorgt dafür, dass man sie auf jedem Bild perfekt liest */
    transition: transform 0.2s ease, color 0.2s ease;
    user-select: none;
}

.gallery-nav-btn:hover { 
    background: none !important; 
    color: #ffcc00; 
    transform: translateY(-50%) scale(1.15);
}

.gallery-prev { left: 20px; }
.gallery-next { right: 20px; }
.gallery-close {
    position: absolute;
    top: 20px; right: 25px;
    color: white;
    font-size: 2.2em;
    cursor: pointer;
    font-weight: bold;
}

/* ===== 8. ALL MODALS ===== */
.modal, .share-modal-overlay, .gallery-modal {
    display: none;
    position: fixed;
    top: 0; left: 0; width: 100%; height: 100%;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    z-index: 1000;
    align-items: center;
    justify-content: center;
}

.modal-content { 
    width: 320px; 
    height: 320px; 
    border-radius: 50%; 
    object-fit: cover; 
    border: 4px solid white; 
}

.share-modal {
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    padding: 30px;
    border-radius: 24px;
    width: 90%; max-width: 380px;
    text-align: center;
    position: relative;
}

.share-close-btn { 
    position: absolute; 
    top: 15px; right: 18px; 
    background: none; 
    border: none; 
    font-size: 1.2em; 
    cursor: pointer; 
}

.share-options { 
    display: grid; 
    grid-template-columns: repeat(2, 1fr); 
    gap: 12px; 
    margin-top: 20px; 
}

.share-option-btn {
    display: flex; align-items: center; justify-content: center; gap: 8px;
    padding: 12px; border-radius: 16px; border: 1px solid rgba(0,0,0,0.1);
    background: rgba(255,255,255,0.8); color: #333; text-decoration: none; font-weight: 600; cursor: pointer;
}

body.dark-mode .share-modal { background: rgba(30,30,30,0.9); color: #fff; }
body.dark-mode .share-option-btn { background: rgba(255,255,255,0.1); color: #fff; border-color: rgba(255,255,255,0.15); }

/* ===== 9. FOOTER ===== */
footer {
    background: linear-gradient(135deg, #e6d7c3 0%, #c8b39b 100%);
    color: #2b231c;
    text-align: center;
    padding: 50px 20px;
    margin-top: 80px;
}
footer a { color: #2b231c; text-decoration: none; margin: 0 15px; }

/* ===== 10. MOBILE RESPONSIVE ===== */
@media (max-width: 768px) {
    .glass-circle-btn::before { display: none !important; }
    .top-right-controls { top: 12px; right: 12px; gap: 8px; }
    .glass-circle-btn { width: 38px; height: 38px; font-size: 1rem; }
    .info-grid { grid-template-columns: 1fr; }
    .hero-image-banner { height: 380px; }
    .city-title { font-size: 2.2em; }
}

/* ===== SECRET MODAL & HOLDING EFFECT ===== */
.profile-pic {
    user-select: none;
    -webkit-user-select: none;
    -webkit-touch-callout: none; /* Verhindert das iOS-Menü */
    -webkit-user-drag: none; /* Verhindert das Ziehen des Bildes */
    touch-action: manipulation; /* Blockiert störende Touch-Gesten des Browsers */
    transition: transform 0.3s ease, filter 0.3s ease;
}

/* Visuelles Feedback beim 3-Sekunden-Drücken */
.profile-pic.holding {
    transform: scale(0.95);
    filter: brightness(0.8) contrast(1.2);
}

.secret-modal-card {
    background: rgba(255, 255, 255, 0.85);
    backdrop-filter: blur(25px);
    -webkit-backdrop-filter: blur(25px);
    border: 1px solid rgba(255, 255, 255, 0.4);
    padding: 35px 25px;
    border-radius: 24px;
    width: 90%;
    max-width: 360px;
    text-align: center;
    position: relative;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.25);
    animation: secretPop 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

body.dark-mode .secret-modal-card {
    background: rgba(25, 25, 25, 0.9);
    color: #fff;
    border-color: rgba(255, 255, 255, 0.12);
}

@keyframes secretPop {
    from { transform: scale(0.8); opacity: 0; }
    to { transform: scale(1); opacity: 1; }
}

.secret-icon {
    font-size: 2.2rem;
    margin-bottom: 10px;
}

.secret-subtext {
    font-size: 0.85rem;
    color: #666;
    margin: 8px 0 20px 0;
}

body.dark-mode .secret-subtext {
    color: #aaa;
}

#secretCodeInput {
    width: 100%;
    padding: 12px 16px;
    font-size: 1.2rem;
    text-align: center;
    letter-spacing: 4px;
    border-radius: 14px;
    border: 1px solid rgba(0, 0, 0, 0.15);
    background: rgba(255, 255, 255, 0.9);
    outline: none;
    margin-bottom: 15px;
    transition: all 0.2s ease;
}

body.dark-mode #secretCodeInput {
    background: rgba(255, 255, 255, 0.08);
    color: #fff;
    border-color: rgba(255, 255, 255, 0.2);
}

#secretCodeInput:focus {
    border-color: #967959;
    box-shadow: 0 0 10px rgba(150, 121, 89, 0.3);
}

.secret-submit-btn {
    width: 100%;
    padding: 12px;
    border-radius: 14px;
    border: none;
    background: #967959;
    color: white;
    font-weight: 600;
    font-size: 0.95rem;
    cursor: pointer;
    transition: background 0.2s ease, transform 0.1s ease;
}

.secret-submit-btn:hover {
    background: #82674a;
}

.secret-submit-btn:active {
    transform: scale(0.98);
}

.secret-error {
    display: none;
    color: #ff4d4d;
    font-size: 0.8rem;
    font-weight: 600;
    margin-top: 10px;
}

/* ===== FIX FÜR ABSTAND: Meine Empfehlungen & Suchfeld ===== */
.cities-section h2 {
    margin-bottom: 40px; /* Vergrößert den Abstand nach unten zur Suchleiste */
}

/* Optional für ein sauberes Grid, falls es nebeneinander oder zentriert sein soll */
@media (min-width: 900px) {
    .cities-section .search-container {
        margin-top: 10px;
        margin-bottom: 50px;
    }
}

/* ===== NEUES HAUPT-HUB (REISEN & SPACE KACHELN) ===== */
.main-hub-section {
    max-width: 1100px;
    margin: 0 auto;
    padding: 60px 20px;
    text-align: center;
}

.main-hub-section h2 {
    font-size: 2.2rem;
    color: #967959;
    margin-bottom: 40px;
    font-weight: 700;
}

body.dark-mode .main-hub-section h2 {
    color: #e0e0e0;
}

.hub-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 30px;
}

@media (max-width: 768px) {
    .hub-grid {
        grid-template-columns: 1fr;
    }
}

.hub-card {
    position: relative;
    height: 380px;
    border-radius: 24px;
    overflow: hidden;
    cursor: pointer;
    box-shadow: 0 10px 30px rgba(0,0,0,0.15);
    transition: transform 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275), box-shadow 0.4s ease;
}

.hub-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 20px 40px rgba(0,0,0,0.25);
}

.hub-card-bg {
    position: absolute;
    top: 0; left: 0; width: 100%; height: 100%;
    background-size: cover;
    background-position: center;
    filter: brightness(0.6) contrast(1.1);
    transition: transform 0.6s ease;
}

.hub-card:hover .hub-card-bg {
    transform: scale(1.08);
}

.hub-overlay {
    position: absolute;
    top: 0; left: 0; width: 100%; height: 100%;
    background: linear-gradient(to top, rgba(0,0,0,0.8) 0%, rgba(0,0,0,0.2) 100%);
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    align-items: flex-start;
    padding: 40px;
    text-align: left;
    color: white;
}

.hub-icon {
    font-size: 3rem;
    margin-bottom: 15px;
}

.hub-overlay h3 {
    font-size: 2.2rem;
    font-weight: 700;
    margin-bottom: 10px;
}

.hub-overlay p {
    font-size: 1rem;
    opacity: 0.9;
    margin-bottom: 20px;
    line-height: 1.5;
    max-width: 400px;
}

.hub-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.4);
    padding: 10px 22px;
    border-radius: 30px;
    font-weight: 600;
    font-size: 0.95rem;
    transition: all 0.3s ease;
}

.hub-card:hover .hub-btn {
    background: white;
    color: #222;
}

@media (max-width: 768px) {
    .country-name {
        font-size: 2.2rem !important; /* Prevents the title from becoming overwhelmingly large on phones */
    }
    
    .city-title {
        font-size: 2.2em !important; 
    }
}