/* Film Haritası — tasarımcının mockup'ına göre: koyu gri harita, altın işaretler, sol panel */
:root {
    --fm-bg: #1c1c1e;
    --fm-panel: rgba(24, 24, 26, .94);
    --fm-raise: #2a2a2d;
    --fm-line: rgba(255, 255, 255, .07);
    --fm-text: #f2f2f2;
    --fm-muted: #8d8d92;
    --fm-gold: #E2C068;
    --fm-gold-2: #B8923A;
    --fm-glow: rgba(226, 192, 104, .55);
    --fm-turq: #00CED1;
    --font-display: 'Cormorant Garamond', Georgia, serif;
    --font-body: 'Montserrat', -apple-system, 'Segoe UI', sans-serif;
    --panel-w: 312px;
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
html, body { margin: 0; height: 100%; }
body.fm { font-family: var(--font-body); background: var(--fm-bg); color: var(--fm-text); overflow: hidden; -webkit-font-smoothing: antialiased; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; cursor: pointer; }
:focus-visible { outline: 2px solid var(--fm-gold); outline-offset: 2px; }

.fm-map { position: fixed; inset: 0; background: #262628; }
/* Açık renkli altlığı mockup'taki koyu gri tona çeviriyoruz */
.fm-map.is-darkened .leaflet-tile-pane { filter: invert(1) grayscale(1) brightness(.78) contrast(1.15); }
.leaflet-container { font-family: var(--font-body); }
.leaflet-control-attribution { background: rgba(28,28,30,.7) !important; color: #777 !important; font-size: 10px; }
.leaflet-control-attribution a { color: #aaa !important; }
.leaflet-control-zoom { border: 0 !important; margin: 0 20px 80px 0 !important; }
.leaflet-control-zoom a { background: var(--fm-panel) !important; color: var(--fm-text) !important; border: 1px solid var(--fm-line) !important; width: 38px !important; height: 38px !important; line-height: 36px !important; }
.leaflet-control-zoom a:first-child { border-radius: 12px 12px 0 0 !important; }
.leaflet-control-zoom a:last-child { border-radius: 0 0 12px 12px !important; }

.fm-logo { position: fixed; top: 18px; left: calc(50% + (var(--panel-w) + 20px) / 2); transform: translateX(-50%); z-index: 500; transition: left .4s cubic-bezier(.4,0,.2,1); }
.fm-panel.is-collapsed ~ .fm-logo, body:has(.fm-panel.is-collapsed) .fm-logo { left: 50%; }
.fm-logo img { height: 40px; width: auto; filter: drop-shadow(0 2px 10px rgba(0,0,0,.6)); }
.fm-back-site { position: fixed; top: 22px; right: 20px; z-index: 500; display: flex; align-items: center; gap: 6px; padding: 9px 16px 9px 10px; border-radius: 999px; background: var(--fm-panel); border: 1px solid var(--fm-line); font-size: 12px; color: var(--fm-muted); transition: color .2s; }
.fm-back-site:hover { color: var(--fm-text); }
.fm-back-site svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 2; }

.fm-socials { position: fixed; bottom: 18px; left: 50%; transform: translateX(-50%); z-index: 500; background: var(--fm-panel); border: 1px solid var(--fm-line); border-radius: 12px; padding: 6px 10px; }
.fm-socials .socials { display: flex; gap: 4px; }
.fm-socials .socials a { width: 32px; height: 32px; display: grid; place-items: center; color: var(--fm-muted); border-radius: 8px; }
.fm-socials .socials a:hover { color: var(--fm-text); background: rgba(255,255,255,.05); }
.fm-socials svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.fm-socials svg .fill { fill: currentColor; stroke: none; }

/* ---------- Panel ---------- */
.fm-panel {
    position: fixed; z-index: 600;
    top: 20px; bottom: 20px; left: 20px;
    width: var(--panel-w);
    background: var(--fm-panel);
    backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
    border: 1px solid var(--fm-line);
    border-radius: 24px;
    box-shadow: 0 30px 80px rgba(0,0,0,.5);
    display: flex; flex-direction: column;
    transition: transform .4s cubic-bezier(.4,0,.2,1);
}
.fm-panel.is-collapsed { transform: translateX(calc(-100% - 20px)); }
.fm-collapse {
    position: absolute; right: -26px; top: 50%; transform: translateY(-50%);
    width: 26px; height: 64px;
    background: var(--fm-panel); border: 1px solid var(--fm-line); border-left: 0;
    border-radius: 0 12px 12px 0;
    display: grid; place-items: center; color: var(--fm-muted);
}
.fm-collapse svg { width: 14px; height: 14px; fill: none; stroke: currentColor; stroke-width: 2; transition: transform .3s; }
.fm-panel.is-collapsed .fm-collapse svg { transform: rotate(180deg); }

.fm-search { position: relative; margin: 18px 18px 10px; }
.fm-search svg { position: absolute; left: 16px; top: 50%; transform: translateY(-50%); width: 17px; height: 17px; fill: none; stroke: var(--fm-muted); stroke-width: 2; }
.fm-search input {
    width: 100%; padding: 14px 16px 14px 46px;
    border-radius: 14px; border: 1px solid var(--fm-line);
    background: var(--fm-raise); color: var(--fm-text);
    font: inherit; font-size: 14px;
}
.fm-search input::placeholder { color: #bdbdc2; }
.fm-search input:focus { outline: none; border-color: rgba(226,192,104,.5); }

.fm-views { position: relative; flex: 1; min-height: 0; }
.fm-view { position: absolute; inset: 0; overflow-y: auto; padding: 0 0 18px; opacity: 0; visibility: hidden; transform: translateX(12px); transition: opacity .25s, transform .25s, visibility .25s; scrollbar-width: thin; scrollbar-color: #3a3a3e transparent; }
.fm-view.is-active { opacity: 1; visibility: visible; transform: none; }

.fm-intro { padding: 6px 22px 8px; }
.fm-intro h1 { font-family: var(--font-display); font-weight: 600; font-size: 26px; margin: 0 0 4px; color: var(--fm-gold); }
.fm-intro p { font-size: 12.5px; line-height: 1.6; color: var(--fm-muted); margin: 0; }
.fm-tabs { display: flex; gap: 4px; margin: 12px 18px 6px; padding: 4px; background: var(--fm-raise); border-radius: 12px; }
.fm-tabs button { flex: 1; border: 0; background: none; padding: 8px; border-radius: 9px; font-size: 12px; font-weight: 600; letter-spacing: .06em; color: var(--fm-muted); }
.fm-tabs button.is-active { background: #3a3a3e; color: var(--fm-text); }

.fm-list li { list-style: none; }
.fm-list { margin: 0; padding: 0; }
.fm-group-title { padding: 14px 22px 6px; font-size: 10.5px; letter-spacing: .18em; text-transform: uppercase; color: var(--fm-muted); }
.fm-item {
    position: relative; width: 100%;
    display: flex; align-items: center; gap: 14px;
    padding: 12px 22px; border: 0; background: none; text-align: left;
    border-bottom: 1px solid var(--fm-line);
    transition: background .2s;
}
.fm-item::after { content: "⟶"; position: absolute; right: 22px; color: var(--fm-muted); opacity: 0; transform: translateX(-6px); transition: opacity .2s, transform .2s; font-size: 18px; }
.fm-item:hover, .fm-item.is-hover { background: linear-gradient(90deg, rgba(226,192,104,.16), rgba(226,192,104,0) 70%); }
.fm-item:hover::after, .fm-item.is-hover::after { opacity: 1; transform: none; }
.fm-thumb { width: 44px; height: 44px; border-radius: 9px; object-fit: cover; background: #333; flex: none; }
.fm-place-icon { width: 44px; height: 44px; border-radius: 9px; flex: none; display: grid; place-items: center; background: rgba(226,192,104,.12); color: var(--fm-gold); }
.fm-place-icon svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2; }
.fm-item-title { display: block; font-size: 14px; color: var(--fm-text); line-height: 1.3; padding-right: 22px; }
.fm-item-sub { display: block; font-size: 11.5px; color: var(--fm-muted); margin-top: 2px; }
.fm-item-route { display: block; font-size: 11.5px; color: var(--fm-gold); margin-top: 1px; }
.fm-head .route { font-size: 12.5px; color: var(--fm-gold); margin-top: 3px; letter-spacing: .04em; }
.fm-item-sub b { color: var(--fm-text); font-weight: 600; }
.fm-empty { padding: 30px 22px; color: var(--fm-muted); font-size: 13px; text-align: center; }

/* Detay */
.fm-back { margin: 0 18px 12px; display: inline-flex; align-items: center; gap: 6px; padding: 7px 12px; border-radius: 9px; border: 0; background: var(--fm-raise); font-size: 11.5px; color: var(--fm-muted); }
.fm-back:hover { color: var(--fm-text); }
.fm-back svg { width: 14px; height: 14px; fill: none; stroke: currentColor; stroke-width: 2; }
.fm-cover { margin: 0 18px; border-radius: 16px; overflow: hidden; aspect-ratio: 4/3; background: #333; position: relative; cursor: zoom-in; }
.fm-cover img { width: 100%; height: 100%; object-fit: cover; display: block; }
.fm-head { text-align: center; padding: 16px 22px 14px; background: radial-gradient(60% 100% at 50% 100%, rgba(226,192,104,.16), transparent 70%); border-bottom: 1px solid var(--fm-line); }
.fm-head h2 { font-size: 18px; font-weight: 500; letter-spacing: .08em; text-transform: uppercase; margin: 0; }
.fm-head .sub { font-size: 11.5px; color: var(--fm-muted); margin-top: 2px; }
.fm-head .sub b { color: var(--fm-text); }
.fm-head .meta { font-size: 11.5px; color: var(--fm-muted); margin-top: 6px; }
.fm-note { margin: 12px 22px 0; padding: 10px 12px; border-radius: 10px; background: rgba(226,192,104,.08); border: 1px dashed rgba(226,192,104,.3); font-size: 11.5px; color: #cfc3a0; }
.fm-desc { padding: 12px 22px 0; font-size: 12.5px; line-height: 1.7; color: #b8b8bd; }
.fm-link { display: block; margin: 16px 22px 0; text-align: center; padding: 11px; border-radius: 12px; border: 1px solid rgba(226,192,104,.4); color: var(--fm-gold); font-size: 12px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; }
.fm-link:hover { background: rgba(226,192,104,.1); }

.fm-stop { display: flex; align-items: center; gap: 16px; width: 100%; padding: 12px 22px; border: 0; border-bottom: 1px solid var(--fm-line); background: none; text-align: left; position: relative; transition: background .2s; }
.fm-stop:hover, .fm-stop.is-active { background: linear-gradient(90deg, rgba(226,192,104,.18), rgba(226,192,104,0) 75%); }
.fm-stop::after { content: "⟶"; position: absolute; right: 22px; color: var(--fm-muted); opacity: 0; transition: opacity .2s; font-size: 18px; }
.fm-stop:hover::after, .fm-stop.is-active::after { opacity: 1; }
.fm-num {
    width: 46px; height: 46px; border-radius: 10px; flex: none;
    display: grid; place-items: center;
    font-size: 16px; font-weight: 500; color: #3b2e0c;
    background: linear-gradient(145deg, #E9CB7A, #A8843A);
    box-shadow: inset 0 1px 0 rgba(255,255,255,.35);
}
.fm-stop.no-coords .fm-num { background: linear-gradient(145deg, #5a5240, #3d3628); color: #c9b98b; }
.fm-stop-name { font-size: 14px; color: var(--fm-text); padding-right: 24px; }
/* Seçilen mekânın metni (panelde, satırın altında) */
.fm-stop-desc { padding: 4px 22px 16px 84px; border-bottom: 1px solid var(--fm-line); font-size: 12.5px; line-height: 1.7; color: #c8c8cc; background: linear-gradient(90deg, rgba(226,192,104,.08), rgba(226,192,104,0) 75%); }
.fm-stop-desc p { margin: 0 0 .6em; }
.fm-stop-desc a { color: var(--fm-gold); text-decoration: underline; }
.fm-stop-wrap:has(.fm-stop-desc:not([hidden])) .fm-stop { border-bottom-color: transparent; }
/* Haritadaki mekân balonu */
.leaflet-popup.fm-popup .leaflet-popup-content-wrapper { background: var(--fm-panel); color: var(--fm-text); border: 1px solid var(--fm-line); border-radius: 14px; box-shadow: 0 18px 50px rgba(0,0,0,.5); padding: 0; overflow: hidden; }
.leaflet-popup.fm-popup .leaflet-popup-content { margin: 0; width: 260px !important; }
.leaflet-popup.fm-popup .leaflet-popup-tip { background: var(--fm-panel); border: 1px solid var(--fm-line); }
.leaflet-popup.fm-popup a.leaflet-popup-close-button { color: #fff; top: 6px; right: 6px; width: 26px; height: 26px; line-height: 24px; border-radius: 50%; background: rgba(0,0,0,.45); }
/* Mekân görseli kırpılmadan kendi oranıyla gösterilir (dikey görsel dikey); kısa ekranda ekranın yarısını geçmez,
   o durumda kenarlarda koyu boşlukla sığar */
.fm-pop img { display: block; width: 100%; height: auto; max-height: 50vh; object-fit: contain; background: #05080d; }
.fm-pop b { display: block; padding: 12px 14px 4px; font-size: 14px; font-weight: 600; }
.fm-pop-desc { padding: 0 14px 14px; font-size: 12.5px; line-height: 1.6; color: #c8c8cc; max-height: 180px; overflow-y: auto; }
.fm-pop-desc p { margin: 0 0 .5em; }
.fm-pop b:last-child { padding-bottom: 14px; }

/* ---------- Harita işaretleri ---------- */
.fm-marker, .fm-cluster { background: none; border: 0; }
.fm-dot {
    width: 100%; height: 100%; border-radius: 50%;
    background: radial-gradient(circle at 50% 45%, #F1D78E 0%, #DDB95C 55%, rgba(221,185,92,.85) 100%);
    box-shadow: 0 0 0 6px rgba(226,192,104,.18), 0 0 24px 6px var(--fm-glow);
    display: grid; place-items: center;
    color: #4a3a10; font-weight: 500; font-family: var(--font-body);
    transition: transform .2s;
}
.fm-marker:hover .fm-dot, .fm-cluster:hover .fm-dot { transform: scale(1.08); }
.fm-dot.is-active { box-shadow: 0 0 0 8px rgba(226,192,104,.28), 0 0 40px 14px var(--fm-glow); }
.fm-dot.is-pulse { animation: fmPulse 2.2s infinite; }
@keyframes fmPulse { 0%,100% { box-shadow: 0 0 0 6px rgba(226,192,104,.18), 0 0 24px 6px var(--fm-glow); } 50% { box-shadow: 0 0 0 16px rgba(226,192,104,.06), 0 0 50px 16px var(--fm-glow); } }
@media (prefers-reduced-motion: reduce) { .fm-dot.is-pulse { animation: none; } }
.fm-route { filter: drop-shadow(0 0 6px rgba(226,192,104,.7)); }
.leaflet-tooltip.fm-tip { background: var(--fm-panel); color: var(--fm-text); border: 1px solid var(--fm-line); border-radius: 10px; padding: 6px 10px; font-size: 12px; box-shadow: 0 10px 30px rgba(0,0,0,.4); }
.leaflet-tooltip.fm-tip::before { display: none; }
.leaflet-tooltip.fm-tip small { display: block; color: var(--fm-muted); }

/* Lightbox */
.fm-lightbox { position: fixed; inset: 0; z-index: 1000; background: rgba(0,0,0,.9); display: none; align-items: center; justify-content: center; padding: 40px; cursor: zoom-out; }
.fm-lightbox.is-open { display: flex; }
.fm-lightbox img { max-width: 100%; max-height: 100%; border-radius: 10px; }

/* ---------- Mobil: alttan açılan panel ---------- */
@media (max-width: 720px) {
    .fm-panel { top: auto; left: 8px; right: 8px; bottom: 8px; width: auto; height: 52vh; border-radius: 22px; }
    .fm-panel.is-collapsed { transform: translateY(calc(100% - 78px)); }
    .fm-collapse { right: 50%; top: -22px; transform: translateX(50%); width: 64px; height: 22px; border: 1px solid var(--fm-line); border-bottom: 0; border-radius: 12px 12px 0 0; }
    .fm-collapse svg { transform: rotate(90deg); }
    .fm-panel.is-collapsed .fm-collapse svg { transform: rotate(-90deg); }
    .fm-socials { display: none; }
    .fm-logo, body:has(.fm-panel.is-collapsed) .fm-logo { top: 12px; left: 50%; }
    .fm-logo img { height: 32px; }
    .fm-back-site span { display: none; }
    .fm-back-site { top: 14px; right: 12px; padding: 8px; }
    .leaflet-control-zoom { display: none; }
}
