/* Bright & Fresh - Variant 2 refined */
@font-face {
    font-family: 'Noto Serif';
    src: url('../fonts/notoserif.ttf') format('truetype');
    font-weight: 100 900;
    font-display: swap;
}

@font-face {
    font-family: 'Manrope';
    src: url('../fonts/manrope.ttf') format('truetype');
    font-weight: 200 800;
    font-display: swap;
}

:root {
    --primary: #0077b6; /* Ocean Blue */
    --primary-container: #00b4d8; /* Bright Blue */
    --secondary: #5c677d; /* Soft Slate */
    --tertiary: #ffb703; /* Sunshine Yellow */
    
    --surface: #ffffff; /* Crisp White */
    --surface-container-low: #f8f9fa; /* Very Light Grey/Ivory */
    --surface-container-lowest: rgba(255, 255, 255, 0.85); /* Frost Glass */
    --surface-container-high: #e9ecef;
    --on-surface: #2b2d42; /* Dark Navy Text */
    
    --outline-variant: rgba(0, 119, 182, 0.15);
    --ambient-shadow: 0 15px 35px rgba(0, 119, 182, 0.08);

    --font-serif: 'Noto Serif', serif;
    --font-sans: 'Manrope', sans-serif;

    --spacing-6: 2rem;
    --spacing-12: 4rem;
    --spacing-20: 7rem;

    --roundedness-md: 1rem;
    --roundedness-lg: 1.5rem;
    --roundedness-xl: 3rem;
    --roundedness-full: 9999px;
}

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

html {
    scroll-behavior: smooth;
}

body {
    background-color: var(--surface);
    color: var(--on-surface);
    font-family: var(--font-sans);
    line-height: 1.7;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
}

/* Typography */
.display-lg { font-family: var(--font-serif); font-size: clamp(2.5rem, 5vw, 4.5rem); letter-spacing: -0.02em; line-height: 1.1; font-weight: 400; color: var(--on-surface); }
.title-md { font-family: var(--font-serif); font-size: clamp(1.8rem, 3.5vw, 3rem); letter-spacing: -0.01em; font-weight: 400; color: var(--primary); }
.body-lg { font-family: var(--font-sans); font-size: 1.125rem; color: var(--secondary); font-weight: 300; }
.label-md { font-family: var(--font-sans); font-size: 0.85rem; text-transform: uppercase; letter-spacing: 0.15rem; font-weight: 600; color: var(--tertiary); }

/* Layout */
.container { max-width: 1400px; margin: 0 auto; padding: 0 2rem; }
.section { padding: var(--spacing-20) 0; position: relative; scroll-margin-top: 50px; }
.section-alt { background-color: var(--surface-container-low); }

#about, #fotogalerie, #kontakt { scroll-margin-top: 80px; } /* Increased slightly to handle the fixed nav + 50px gap */

/* Cinematic Grid */
.grid-cinematic { display: grid; grid-template-columns: 5fr 7fr; gap: var(--spacing-12); align-items: center; }
.grid-cinematic.reverse { grid-template-columns: 6fr 5fr; }
.grid-cinematic.reverse .content { grid-column: 2; grid-row: 1; }
.grid-cinematic.reverse .image-container { grid-column: 1; grid-row: 1; }

@media (max-width: 900px) {
    .grid-cinematic, .grid-cinematic.reverse { grid-template-columns: 1fr; }
    .grid-cinematic.reverse .content { grid-column: 1; grid-row: 2; }
}

.image-wrapper { position: relative; border-radius: var(--roundedness-lg); overflow: hidden; box-shadow: var(--ambient-shadow); }
.image-wrapper img { width: 100%; height: auto; display: block; object-fit: cover; }

/* Hamburger Navigation */
.nav-glass {
    position: fixed; top: 0.5rem; left: 50%; transform: translateX(-50%); width: calc(100% - 1rem); max-width: 1200px;
    padding: 0.25rem 1.5rem; background: var(--surface-container-lowest);
    display: flex; justify-content: space-between; align-items: center; z-index: 100;
    backdrop-filter: blur(20px); -webkit-backdrop-filter: blur(20px);
    border-radius: var(--roundedness-xl); border: 1px solid rgba(255,255,255,0.6); box-shadow: var(--ambient-shadow);
}
.nav-logo img { width: 200px !important; height: auto !important; transition: width 0.3s ease; }
.nav-logo { font-family: var(--font-serif); font-size: 1.25rem; text-decoration: none; color: var(--primary); font-weight: 600; }
.nav-links { display: flex; align-items: center; }
.nav-links a { text-decoration: none; color: var(--on-surface); margin-left: 1.5rem; font-family: var(--font-sans); font-size: 0.9rem; font-weight: 500; transition: color 0.3s; }
.nav-links a:hover, .nav-links a.active { color: var(--primary); }
.nav-links a[target="_blank"]:after { content: ' \2197'; font-size: 0.8em; } /* External link arrow */

/* Hamburger Button */
.hamburger { display: none; cursor: pointer; flex-direction: column; gap: 5px; }
.hamburger span { display: block; width: 25px; height: 3px; background-color: var(--primary); transition: all 0.3s ease-in-out; }

@media (max-width: 992px) {
    .hamburger { display: flex; }
    .nav-links { position: fixed; top: 70px; right: -100%; flex-direction: column; background: var(--surface-container-lowest); backdrop-filter: blur(30px); border-radius: var(--roundedness-md); box-shadow: var(--ambient-shadow); padding: 2rem; width: 250px; transition: right 0.4s ease; align-items: flex-start; }
    .nav-links.active { right: 1rem; }
    .nav-links a { margin: 1rem 0; width: 100%; }
    .hamburger.active span:nth-child(1) { transform: translateY(8px) rotate(45deg); }
    .hamburger.active span:nth-child(2) { opacity: 0; }
    .hamburger.active span:nth-child(3) { transform: translateY(-8px) rotate(-45deg); }
}

/* Base UI Components */
.btn { display: inline-block; padding: 1rem 2.5rem; text-decoration: none; font-family: var(--font-sans); font-weight: 600; font-size: 1rem; transition: all 0.4s; cursor: pointer; border: none; border-radius: var(--roundedness-xl); }
.btn-primary { background: linear-gradient(135deg, var(--primary) 0%, var(--primary-container) 100%); color: #fff; box-shadow: var(--ambient-shadow); }
.btn-primary:hover { transform: translateY(-3px); box-shadow: 0 15px 35px rgba(0, 119, 182, 0.3); }
.btn-ghost { background: transparent; color: var(--primary); border: 2px solid var(--outline-variant); }
.btn-ghost:hover { border-color: var(--primary); }

/* Animated Button with Icon (ported from React example) */
.btn-icon-animated {
    position: relative;
    display: inline-flex;
    align-items: center;
    height: 3.5rem;
    padding: 0.25rem 4rem 0.25rem 2rem;
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-container) 100%);
    color: #fff;
    font-family: var(--font-sans);
    font-weight: 600;
    font-size: 1rem;
    border-radius: 9999px;
    text-decoration: none;
    overflow: hidden;
    transition: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: var(--ambient-shadow);
    cursor: pointer;
}

.btn-icon-animated .btn-text {
    position: relative;
    z-index: 10;
    transition: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

.btn-icon-animated .btn-icon-wrapper {
    position: absolute;
    right: 0.25rem;
    width: 3rem;
    height: 3rem;
    background: #fff;
    color: var(--primary);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

.btn-icon-animated:hover {
    padding-left: 4rem;
    padding-right: 2rem;
    box-shadow: 0 15px 35px rgba(0, 119, 182, 0.3);
}

.btn-icon-animated:hover .btn-icon-wrapper {
    right: calc(100% - 3.25rem);
}

.input-minimalist { width: 100%; padding: 1rem 0; background: transparent; border: none; border-bottom: 2px solid var(--outline-variant); font-family: var(--font-sans); font-size: 1.1rem; color: var(--on-surface); transition: all 0.3s; }
.input-minimalist:focus { outline: none; border-bottom-color: var(--primary); }

/* Desktop Fotogalerie Masonry Layout */
.masonry-grid { column-count: 4; column-gap: 1.5rem; margin: var(--spacing-6) auto 0 auto; max-width: 1200px; }
.masonry-item { break-inside: avoid; margin-bottom: 1.5rem; border-radius: var(--roundedness-md); overflow: hidden; position: relative; cursor: pointer; }
.masonry-item img { width: 100%; height: auto; display: block; transition: transform 0.5s ease; }
.masonry-item:hover img { transform: scale(1.05); }

@media (max-width: 900px) { .masonry-grid { column-count: 2; } }
@media (max-width: 600px) { 
    .masonry-grid { column-count: 2; column-gap: 0.75rem; margin-top: 1rem; } 
    .masonry-item { margin-bottom: 0.75rem; border-radius: 0.5rem; } 
}

/* Lightbox */
.lightbox { display: none; position: fixed; z-index: 1000; padding-top: 2rem; left: 0; top: 0; width: 100%; height: 100%; overflow: auto; background-color: rgba(255, 255, 255, 0.95); backdrop-filter: blur(20px); -webkit-backdrop-filter: blur(20px); }
.lightbox-content { margin: auto; display: block; max-width: 90vw; max-height: 75vh; border-radius: var(--roundedness-md); box-shadow: var(--ambient-shadow); object-fit: contain; animation: zoomIn 0.3s; }
.lightbox-close { position: absolute; top: 20px; right: 35px; color: var(--primary); font-size: 40px; font-weight: bold; transition: 0.3s; cursor: pointer; z-index: 1001; }
.lightbox-close:hover { color: var(--on-surface); }
.lightbox-nav { position: absolute; top: 50%; transform: translateY(-50%); background: transparent; border: none; font-size: 3rem; color: var(--primary); cursor: pointer; padding: 1rem; z-index: 1001; transition: color 0.3s; }
.lightbox-nav:hover { color: var(--on-surface); }
.lightbox-prev { left: 2vw; }
.lightbox-next { right: 2vw; }
.lightbox-caption { text-align: center; color: var(--on-surface); font-family: var(--font-sans); margin-top: 1.5rem; font-size: 1.1rem; font-weight: 500; }
@keyframes zoomIn { from { transform: scale(0.9); opacity: 0; } to { transform: scale(1); opacity: 1; } }

@media (max-width: 600px) {
    .lightbox-nav { font-size: 2rem; background: rgba(255, 255, 255, 0.5); border-radius: 50%; padding: 0.5rem; }
    .lightbox-prev { left: 5px; }
    .lightbox-next { right: 5px; }
}

/* Hero */
.hero { min-height: 100vh; display: flex; align-items: center; position: relative; overflow: hidden; }
.hero-bg { position: absolute; top: -5%; left: 0; width: 100%; height: 110%; object-fit: cover; z-index: 0; opacity: 1; }
.hero-content { position: relative; z-index: 2; max-width: 800px; padding-top: 5rem; }

/* Utils */
.reveal-text { opacity: 0; transform: translateY(30px); transition: all 1s cubic-bezier(0.16, 1, 0.3, 1); }
.reveal-text.is-visible { opacity: 1; transform: translateY(0); }
@keyframes drift { 0% { transform: translateY(0px); } 50% { transform: translateY(-10px); } 100% { transform: translateY(0px); } }
.anim-drift { animation: drift 6s ease-in-out infinite; }

/* Scatter Gallery Polaroid Effect */
.scatter-gallery { position: relative; height: 350px; width: 100%; display: flex; justify-content: center; align-items: center; margin: 3rem 0; z-index: 10; }
.scatter-img { position: absolute; width: 220px; height: 220px; object-fit: cover; border-radius: var(--roundedness-xl); box-shadow: var(--ambient-shadow); background: #fff; padding: 6px; cursor: grab; will-change: transform; transition: box-shadow 0.3s; top: calc(50% - 110px); left: calc(50% - 110px); }
.scatter-img:active { cursor: grabbing; box-shadow: 0 25px 50px -12px rgba(0,0,0,0.25); }
@media (max-width: 1024px) { .scatter-gallery { transform: scale(0.8); } }

/* ==========================================
 * 4. MAP & SIDEBAR
 * ==========================================*/
.map-consent { text-align: center; padding: 4rem 1rem; background: var(--surface-container-low); border-radius: var(--roundedness-lg); }
.map-consent__icon { width: 64px; height: 64px; color: var(--primary); margin: 0 auto 1.5rem auto; display: block; }
.map-consent__text { max-width: 600px; margin: 0 auto 2rem auto; font-size: 1.1rem; line-height: 1.6; color: var(--on-surface); }
.map-consent__btn { padding: 1rem 2.5rem; background: var(--primary); color: #fff; border: none; border-radius: var(--roundedness-md); cursor: pointer; font-weight: 600; font-size: 1.1rem; transition: background 0.3s, transform 0.2s; }
.map-consent__btn:hover { background: var(--primary-container); transform: translateY(-2px); }

.map-wrapper { display: flex; flex-direction: column; width: 100%; border-radius: var(--roundedness-xl); overflow: hidden; box-shadow: var(--ambient-shadow); background: #fff; margin: 0 auto; gap: 0; }

.map-container { position: relative; width: 100%; height: 75vh; min-height: 600px; border-bottom: 1px solid var(--outline-variant); }
#map { width: 100%; height: 100%; z-index: 1; }

.map-sidebar { width: 100%; display: flex; flex-direction: column; background: var(--surface-container-lowest); z-index: 2; min-height: 400px; }
.map-search { padding: 1.5rem; border-bottom: 1px solid var(--outline-variant); position: relative; }
.map-search__input { width: 100%; padding: 0.75rem 1rem 0.75rem 2.5rem; border: 1px solid var(--outline-variant); border-radius: var(--roundedness-md); font-family: var(--font-sans); margin-top:0.5rem;}
.map-search__icon { position: absolute; left: 2.25rem; top: 60%; transform: translateY(-50%); width: 20px; height: 20px; color: var(--outline-variant); }

.map-revoke-link { text-align: center; padding: 0.75rem; font-size: 0.8rem; color: #e63946; background: transparent; border: none; cursor: pointer; border-bottom: 1px solid rgba(230, 57, 70, 0.2); width: 100%; display:block; font-weight: 700; text-transform: uppercase; letter-spacing: 0.05em; transition: all 0.2s ease; }
.map-revoke-link:hover { color: #b91c1c; background: rgba(230, 57, 70, 0.05); border-bottom-color: #b91c1c; }

.map-results { width: 100%; scroll-behavior: smooth; }
.map-results__empty { padding: 2rem; text-align: center; color: var(--secondary); }

.map-result-item { padding: 1.25rem 1.5rem; border-bottom: 1px solid var(--outline-variant); transition: background-color 0.2s; display: flex; justify-content: space-between; align-items: flex-start; }
.map-result-item:hover { background: var(--surface-container-low); }
.map-result-item__content { text-decoration: none; color: inherit; flex: 1; display:block; }
.map-result-item__name { font-weight: 700; font-size: 1.1rem; margin-bottom: 0.25rem; color: var(--on-surface); }
.map-result-item__cat { font-size: 0.85rem; color: var(--secondary); text-transform: uppercase; letter-spacing: 0.5px; }

/* Admin */
.map-admin { border-top: 1px solid var(--outline-variant); background: var(--surface-container-low); }
.map-admin__toggle { width: 100%; padding: 1rem 1.5rem; display: flex; justify-content: space-between; align-items: center; background: none; border: none; font-weight: 600; cursor: pointer; color: var(--primary); }
.map-admin__toggle svg { width: 20px; height: 20px; transition: transform 0.3s; }
.map-admin__toggle.active svg { transform: rotate(180deg); }
.map-admin__form { display: none; padding: 1.5rem; background: #fff; }
.map-admin__form.visible { display: flex; flex-direction: column; gap: 1rem; }
.map-admin__label { display: block; font-size: 0.85rem; font-weight: 600; margin-bottom: 0.25rem; color: var(--on-surface); }
.map-admin__input, .map-admin__select { width: 100%; padding: 0.75rem; border: 1px solid var(--outline-variant); border-radius: var(--roundedness-sm); font-family: var(--font-sans); }

/* Popups */
.map-popup { min-width: 200px; }
.map-popup__name { font-weight: 700; font-size: 1.1rem; margin-bottom: 0.25rem; }
.map-popup__cat { font-size: 0.75rem; text-transform: uppercase; color: var(--secondary); margin-bottom: 0.75rem; }
.map-popup__info { font-size: 0.9rem; line-height: 1.5; margin-bottom: 1rem; }
.map-popup__routes { display: flex; gap: 0.5rem; }
.map-popup__route-btn { flex: 1; text-align: center; padding: 0.5rem; font-size: 0.8rem; font-weight: 600; border-radius: var(--roundedness-sm); color: #fff !important; text-decoration: none; }
.map-popup__route-btn--google { background: #4285F4; }
.map-popup__route-btn--ors { background: #E63946; }

.leaflet-container { font-family: var(--font-sans); }

/* Utility fixes for places.php missing tailwind */
.pt-40 { padding-top: 10rem; }
.mb-24 { margin-bottom: 6rem; }
.mb-10 { margin-bottom: 2.5rem; }
.text-4xl { font-size: 2.25rem; }
.font-bold { font-weight: 700; }
.uppercase { text-transform: uppercase; }
@media (max-width: 768px) { .scatter-gallery { transform: scale(0.5); height: 200px; margin: 1rem 0; } }

/* Footer */
/* Image Reveal Torch Effect (Ported from React) */
.image-reveal-wrapper {
    position: relative;
    width: 100%;
    overflow: hidden;
    cursor: crosshair;
}

.image-reveal-overlay {
    position: absolute;
    top: 0; left: 0;
    width: 100%; height: 100%;
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
    pointer-events: none;
    z-index: 5;
    transition: opacity 0.3s ease;
}

.image-reveal-glow {
    position: absolute;
    top: 0; left: 0;
    width: 100%; height: 100%;
    pointer-events: none;
    z-index: 6;
    mix-blend-mode: screen;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.image-reveal-wrapper img {
    display: block;
    width: 100%;
    height: auto;
    position: relative;
    z-index: 1;
}
.footer-links { margin-top: 1rem; }
.footer-links a { margin: 0 1rem; color: var(--secondary); text-decoration: none; font-size: 0.9rem; }
/* Scroll to Top Button */
.scroll-to-top {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    width: 3.5rem;
    height: 3.5rem;
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-container) 100%);
    color: #fff;
    border: none;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: 0 10px 25px rgba(0, 119, 182, 0.3);
    z-index: 999;
    opacity: 0;
    visibility: hidden;
    transform: translateY(20px);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.scroll-to-top.visible {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.scroll-to-top:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 35px rgba(0, 119, 182, 0.5);
}

.scroll-to-top svg {
    width: 1.5rem;
    height: 1.5rem;
    transition: transform 0.3s ease;
}

.scroll-to-top:hover svg {
    transform: translateY(-3px);
}

/* Map Pagination Styles */
.map-pagination {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    margin: 1.5rem 0;
    font-family: var(--font-sans);
}

.map-pagination__btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 2.5rem;
    height: 2.5rem;
    padding: 0;
    border: 1px solid #e5e7eb;
    background: #fff;
    color: var(--secondary);
    border-radius: 0.5rem;
    cursor: pointer;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    font-weight: 500;
}

.map-pagination__btn:hover:not(:disabled) {
    border-color: var(--primary);
    color: var(--primary);
    background: #f0f9ff;
    transform: translateY(-2px);
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
}

.map-pagination__btn:disabled {
    opacity: 0.4;
    cursor: not-allowed;
    background: #f9fafb;
}

.map-pagination__btn.active {
    background: var(--primary);
    color: #fff;
    border-color: var(--primary);
    box-shadow: 0 4px 12px rgba(14, 165, 233, 0.3);
}

.map-pagination__info {
    font-size: 0.875rem;
    color: var(--secondary);
    margin: 0 0.5rem;
    font-weight: 500;
}

/* Category Filter Chips */
.map-category-filters {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin: 1rem 0 1.5rem 0;
    padding-bottom: 0.25rem;
}

.map-cat-chip {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.4rem 0.8rem;
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 2rem;
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--secondary);
    cursor: pointer;
    transition: all 0.2s ease;
    white-space: nowrap;
    box-shadow: 0 1px 2px rgba(0,0,0,0.05);
}

.map-cat-chip:hover {
    border-color: var(--primary);
    transform: translateY(-1px);
    box-shadow: 0 4px 6px -1px rgba(0,0,0,0.1);
}

.map-cat-chip.active {
    background: var(--primary);
    color: #fff;
    border-color: var(--primary);
    box-shadow: 0 4px 12px rgba(14, 165, 233, 0.3);
}

.map-cat-chip__dot {
    width: 0.5rem;
    height: 0.5rem;
    border-radius: 50%;
    background: currentColor;
}

.map-cat-chip.active .map-cat-chip__dot {
    background: #fff;
}


