/* ===== GENEL ===== */
html,
body {
    height: 100%;
    width: 100%;
    margin: 0;
    padding: 0;
}

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

body {
    font-family: 'EB Garamond', serif;
    background-color: var(--koyu-arkaplan);
    color: var(--yazi);
    overflow-x: hidden;
    min-height: 100dvh;
    font-size: 18px;
    /* EB Garamond biraz küçük görünür, genel metni büyütüyoruz */
}

input,
button,
textarea,
select {
    font-family: 'EB Garamond', serif !important;
}

::-webkit-input-placeholder {
    font-style: italic;
}

:-ms-input-placeholder {
    font-style: italic;
}

::placeholder {
    font-style: italic;
}

/* Eser isimleri: Sadece ilk harfler büyük */
.popup-title,
.monument-card h3,
.monument-list-name,
#modal-title {
    font-style: normal;
    font-variant-ligatures: none;
    font-feature-settings: "lnum";
}

.bottom-navbar {
    transition: background-color 0.3s ease, box-shadow 0.3s ease;
}

.nav-item {
    transition: color 0.3s ease;
}

/* ===== MAP PAGE ===== */
.map-page {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

#map {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
}

/* ===== ÜST BAR ===== */
.map-top-bar {
    position: absolute;
    top: 16px;
    left: 16px;
    right: 16px;
    display: flex;
    gap: 10px;
    z-index: 1020;
}

.clear-filter-btn {
    position: absolute;
    top: 126px;
    left: 16px;
    background: var(--beyaz);
    color: var(--altin);
    border: 2px solid var(--altin);
    padding: 9px 12px;
    border-radius: 10px;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    font-weight: 600;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
    z-index: 1020;
    cursor: pointer;
    transition: background 0.2s ease;
    overflow: hidden;
    white-space: nowrap;
}

.clear-filter-btn:hover {
    background: var(--gri-acik);
}

.clear-filter-close {
    width: 22px;
    height: 22px;
    border-radius: 6px;
    background: rgba(128, 128, 128, 0.2);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-left: 4px;
    transition: background 0.2s;
}

.clear-filter-close i {
    font-size: 11px;
}

.search-container {
    flex: 1;
    display: flex;
    align-items: center;
    background: var(--beyaz);
    border-radius: 50px;
    padding: 0 16px;
    height: 52px;
    box-shadow: var(--golge);
    gap: 10px;
}

.search-icon {
    color: var(--gri);
    font-size: 16px;
}

.search-input {
    flex: 1;
    border: none;
    outline: none;
    font-size: 15px;
    color: var(--yazi);
    background: transparent;
}

.search-clear {
    background: none;
    border: none;
    cursor: pointer;
    color: var(--gri);
    font-size: 16px;
    padding: 4px;
}

.filter-btn {
    width: 52px;
    height: 52px;
    border-radius: 14px;
    background: var(--beyaz);
    border: 2px solid var(--altin);
    cursor: pointer;
    color: var(--altin);
    font-size: 18px;
    box-shadow: var(--golge);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    transition: all 0.2s ease;
}

.filter-btn:hover {
    background: var(--altin);
    color: var(--beyaz);
    transform: translateY(-2px);
}

.filter-btn:active {
    transform: scale(0.94);
}

/* ===== KATEGORİ FİLTRELERİ ====== */
.category-filters {
    position: absolute;
    top: 78px;
    left: 16px;
    right: 16px;
    z-index: 1010;
    display: flex;
    gap: 8px;
    overflow-x: auto;
    padding-bottom: 8px;
    scrollbar-width: none;
}

.category-filters::-webkit-scrollbar {
    display: none;
}

.category-pill {
    background: var(--beyaz);
    color: var(--altin);
    border: 2px solid var(--altin);
    padding: 8px 16px;
    border-radius: 12px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    white-space: nowrap;
    box-shadow: var(--golge);
    transition: all 0.2s ease;
}

.category-pill:hover {
    background: var(--altin);
    color: var(--beyaz);
    transform: translateY(-2px);
}

.category-pill:active {
    transform: scale(0.94);
}

.category-pill.active {
    background: var(--altin);
    color: var(--beyaz);
    border-color: var(--altin);
    box-shadow: 0 4px 12px rgba(184, 134, 11, 0.35);
}

/* ===== ARAMA SONUÇLARI ===== */
.search-results {
    position: absolute;
    top: 126px;
    left: 16px;
    right: 140px;
    background: var(--beyaz);
    border-radius: var(--radius);
    box-shadow: var(--golge);
    z-index: 1020;
    overflow: hidden;
}

.search-result-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 18px;
    cursor: pointer;
    border-bottom: 2px solid var(--altin);
    transition: background 0.2s;
}

.search-result-item:last-child {
    border-bottom: none;
}

.search-result-item:hover {
    background: var(--gri-acik);
}

.search-result-left {
    display: flex;
    align-items: center;
    gap: 12px;
}

.search-result-left i {
    color: var(--altin);
    font-size: 18px;
}

.search-result-name {
    font-size: 15px;
    font-weight: 600;
    color: var(--yazi);
}

.search-result-meta {
    font-size: 12px;
    color: var(--gri);
}

.search-result-item .fa-arrow-up-right-from-square {
    color: var(--gri);
    font-size: 14px;
}

/* ===== TARİHİ YARIMADA BUTONU & KONUM BUTONU ===== */
.peninsula-btn {
    position: absolute;
    bottom: 162px;
    right: 16px;
    width: 52px;
    height: 52px;
    border-radius: 14px;
    background: var(--beyaz);
    border: 2px solid var(--altin);
    cursor: pointer;
    color: var(--altin);
    font-size: 20px;
    box-shadow: var(--golge);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1020;
    transition: all 0.2s ease;
}

.peninsula-btn:hover {
    background: var(--altin);
    color: var(--beyaz);
    transform: translateY(-2px);
}

.peninsula-btn:active {
    transform: scale(0.94);
}

.locate-btn {
    position: absolute;
    bottom: 100px;
    right: 16px;
    width: 52px;
    height: 52px;
    border-radius: 14px;
    background: var(--beyaz);
    border: 2px solid var(--altin);
    cursor: pointer;
    color: var(--altin);
    font-size: 20px;
    box-shadow: var(--golge);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1020;
    transition: all 0.2s ease;
}

.locate-btn:hover {
    background: var(--altin);
    color: var(--beyaz);
    transform: translateY(-2px);
}

.locate-btn:active {
    transform: scale(0.94);
}

/* ===== MONUMENT POPUP (BOTTOM SHEET) ===== */
.monument-popup {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: var(--beyaz);
    border-radius: 24px 24px 0 0;
    box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.15);
    z-index: 1050;
    height: 40vh;
    display: flex;
    flex-direction: column;
    transform: translateY(100%);
    transition: transform 0.3s cubic-bezier(0.2, 0.8, 0.2, 1), height 0.3s cubic-bezier(0.2, 0.8, 0.2, 1);
}

.monument-popup.show {
    transform: translateY(0);
}

.monument-popup.expanded {
    height: 90vh;
}

.popup-drag-handle {
    width: 40px;
    height: 5px;
    background: #ddd;
    border-radius: 3px;
    margin: 12px auto;
    flex-shrink: 0;
    cursor: pointer;
}

.popup-scrollable {
    flex: 1;
    overflow-y: auto;
    padding: 0 20px 20px 20px;
}

.popup-top-image {
    width: calc(100% + 40px);
    margin: 0 -20px 15px -20px;
    height: 200px;
    max-height: 35vh;
    aspect-ratio: 16/9;
    object-fit: cover;
}

.popup-info-header {
    display: flex;
    align-items: flex-start;
    gap: 16px;
}

.popup-main-icon {
    width: 64px;
    height: 64px;
    min-width: 64px;
    background-color: var(--altin);
    border: 2px solid var(--altin);
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 28px;
    color: var(--altin);
}

.popup-main-icon img {
    filter: brightness(0) invert(1);
}

.popup-header-details {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.popup-title-row {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 2px;
}

.monument-list-name {
    font-size: 15px;
    font-weight: 700;
    color: var(--yazi);
    margin-bottom: 2px;
}

.popup-title {
    font-size: 20px;
    font-weight: 700;
    color: var(--yazi);
    margin: 0;
    line-height: 1.2;
}

.popup-meta {
    font-size: 13px;
    color: var(--yazi);
    opacity: 0.8;
    font-weight: 500;
}

.popup-divider {
    border: none;
    border-top: 1px solid var(--altin);
    margin: 16px 0 12px 0;
}

.popup-desc-title {
    font-size: 15px;
    font-weight: 700;
    color: var(--koyu);
    margin: 0 0 8px 0;
}

.popup-favorite {
    background: none;
    border: none;
    cursor: pointer;
    font-size: 22px;
    color: var(--gri);
    padding: 4px;
}

.popup-favorite.active {
    color: var(--altin);
}

.popup-favorite.active i {
    font-weight: 900;
}

.popup-desc {
    font-size: 14px;
    color: var(--yazi-alt);
    line-height: 1.5;
    margin-bottom: 16px;
}

.popup-route-actions {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.popup-route-btn {
    width: 100%;
    padding: 14px;
    background: var(--altin);
    color: var(--beyaz);
    border: none;
    border-radius: 12px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    transition: background 0.2s, transform 0.1s;
}

.popup-route-btn:active {
    transform: scale(0.98);
}

.popup-expand-btn {
    width: 100%;
    padding: 12px;
    background: var(--gri-acik);
    color: var(--yazi);
    border: none;
    border-radius: 12px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    margin-bottom: 8px;
    transition: background 0.2s;
}

.popup-expand-btn:active {
    background: #e0e0e0;
}

/* Rota değiştir modu */
.popup-route-btn.switch-mode {
    background: #2563eb;
}

/* Aktif rota bilgi şeridi */
.popup-active-route-banner {
    display: flex;
    align-items: center;
    gap: 8px;
    background: #fff7e6;
    border: 1.5px solid #f0d080;
    border-radius: 10px;
    padding: 10px 14px;
    font-size: 13px;
    color: #7a5c00;
    margin-bottom: 8px;
}

.popup-active-route-banner i {
    color: var(--altin);
    font-size: 14px;
    flex-shrink: 0;
}

.popup-active-route-banner strong {
    font-weight: 700;
    color: var(--yazi);
}

/* ===== FİLTRE OVERLAY ===== */
.filter-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.3);
    z-index: 1030;
}

/* ===== FİLTRE PANELİ ===== */
.filter-panel {
    position: fixed;
    top: 0;
    right: 0;
    width: min(65%, 500px);
    height: 100%;
    background: var(--beyaz);
    border-radius: 0;
    z-index: 1040;
    overflow-y: auto;
    transform: translateX(100%);
    transition: transform 0.3s ease;
}

.filter-panel.open {
    transform: translateX(0);
}

.year-filter-panel {
    position: fixed;
    top: 0;
    right: 0;
    width: min(65%, 500px);
    height: 100%;
    background: var(--beyaz);
    z-index: 1040;
    overflow-y: auto;
    transform: translateX(100%);
    transition: transform 0.3s ease;
    display: flex;
    flex-direction: column;
}

.year-filter-panel.open {
    transform: translateX(0);
}

.filter-header {
    background: var(--altin);
    padding: 28px 20px 24px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    color: var(--beyaz);
}

.filter-header i {
    font-size: 28px;
}

.filter-header h2 {
    font-size: 20px;
    font-weight: 700;
}

.filter-body {
    padding: 0;
}

.filter-item {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 18px 20px;
    cursor: pointer;
    border-bottom: 2px solid var(--altin);
    transition: background 0.2s;
}

.filter-item:hover {
    background: var(--gri-acik);
}

.filter-item i:first-child {
    color: var(--altin);
    font-size: 18px;
    width: 24px;
}

.filter-item span {
    flex: 1;
    font-size: 16px;
    color: var(--yazi);
}

.filter-item .fa-chevron-right {
    color: var(--gri);
    font-size: 14px;
}

/* ===== YIL FİLTRESİ ===== */
.year-filter-header {
    padding: 20px;
    border-bottom: 2px solid var(--altin);
}

.back-btn {
    background: none;
    border: none;
    cursor: pointer;
    font-size: 18px;
    font-weight: 700;
    color: var(--yazi);
    display: flex;
    align-items: center;
    gap: 10px;
}

.year-filter-body {
    padding: 20px;
    flex: 1;
    overflow-y: auto;
}

.year-card {
    background: var(--beyaz);
    border-radius: var(--radius);
    padding: 20px;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.08);
    margin-bottom: 20px;
}

.year-card:last-child {
    margin-bottom: 0;
}

.year-card h3 {
    font-size: 16px;
    font-weight: 700;
    color: var(--yazi);
    margin-bottom: 16px;
}

.year-inputs {
    display: flex;
    gap: 12px;
    margin-bottom: 16px;
}

.year-input-group {
    flex: 1;
}

.year-input-group label {
    display: block;
    font-size: 12px;
    color: var(--gri);
    margin-bottom: 6px;
}

.year-input-group input {
    width: 100%;
    padding: 12px;
    border: 1.5px solid #ddd;
    border-radius: 10px;
    font-size: 15px;
    outline: none;
    transition: border 0.2s;
}

.year-input-group input:focus {
    border-color: var(--altin);
}

.filter-apply-btn {
    width: 100%;
    padding: 14px;
    background: var(--altin);
    color: var(--beyaz);
    border: none;
    border-radius: 12px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
}

.year-results {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.year-result-card {
    background: var(--beyaz);
    border-radius: var(--radius);
    padding: 16px;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.08);
    display: flex;
    align-items: center;
    gap: 14px;
    cursor: pointer;
}

.year-result-icon {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    background-color: var(--altin);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 28px;
    flex-shrink: 0;
}

.year-result-icon img {
    filter: brightness(0) invert(1);
}

.year-result-info {
    flex: 1;
}

.year-result-name {
    font-size: 16px;
    font-weight: 700;
    color: var(--yazi);
}

.year-result-year {
    font-size: 13px;
    color: var(--altin);
    font-weight: 600;
}

.year-result-desc {
    font-size: 13px;
    color: #555;
    margin-top: 2px;
}

.year-result-type {
    font-size: 12px;
    color: var(--gri);
    font-style: italic;
}

.year-result-nav {
    color: var(--altin);
    font-size: 18px;
}

.no-result {
    text-align: center;
    padding: 40px 20px;
    color: var(--gri);
}

.no-result i {
    font-size: 40px;
    margin-bottom: 12px;
    display: block;
}

/* ===== NAVİGASYON BARI ===== */
.nav-bar {
    position: absolute;
    bottom: 80px;
    left: 16px;
    right: 16px;
    background: var(--beyaz);
    border-radius: var(--radius);
    padding: 16px;
    box-shadow: var(--golge);
    z-index: 1020;
    display: flex;
    align-items: center;
    justify-content: space-between;
    transition: transform 0.35s cubic-bezier(0.4, 0, 0.2, 1);
}

.nav-bar-content {
    display: flex;
    align-items: center;
    gap: 12px;
}

.nav-bar-icon {
    width: 40px;
    height: 40px;
    background: var(--altin);
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--beyaz);
    font-size: 18px;
}

.nav-bar-label {
    font-size: 12px;
    color: var(--gri);
}

.nav-bar-dest {
    font-size: 15px;
    font-weight: 700;
    color: var(--yazi);
}

.nav-bar-stop {
    background: #ff4444;
    color: var(--beyaz);
    border: none;
    border-radius: 10px;
    padding: 10px 16px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
}

/* ===== NAVBAR OFFSET ===== */
.bottom-navbar {
    z-index: 1050;
}

/* ===== CUSTOM TOAST ===== */
.custom-toast {
    position: fixed;
    bottom: 120px;
    left: 50%;
    transform: translateX(-50%);
    background: var(--yazi);
    border: 1.5px solid var(--altin);
    color: var(--beyaz);
    padding: 14px 24px;
    border-radius: 12px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.3);
    display: flex;
    align-items: center;
    gap: 12px;
    z-index: 9999;
    font-weight: 600;
    font-size: 15px;
    opacity: 1;
    transition: opacity 0.3s ease;
}

.custom-toast i {
    color: var(--altin);
    font-size: 18px;
}

/* ===== DİL SEÇİCİ (HARITA SAYFASI) ===== */
.map-language-selector {
    position: relative;
    z-index: 1020;
}

.map-lang-btn {
    width: 52px;
    height: 52px;
    border-radius: 14px;
    background: var(--beyaz);
    border: 2px solid var(--altin);
    cursor: pointer;
    color: var(--altin);
    font-size: 18px;
    box-shadow: var(--golge);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    transition: all 0.2s ease;
}

.map-lang-btn:hover {
    background: var(--altin);
    color: var(--beyaz);
    transform: translateY(-2px);
}

.map-lang-btn:active {
    transform: scale(0.94);
}

.map-language-menu {
    position: absolute;
    top: 60px;
    right: 0;
    background: var(--beyaz);
    border-radius: 12px;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.2);
    min-width: 140px;
    overflow: hidden;
    animation: slideDown 0.2s ease;
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.map-lang-option {
    display: block;
    width: 100%;
    padding: 12px 16px;
    border: none;
    background: transparent;
    color: var(--yazi);
    cursor: pointer;
    text-align: left;
    font-size: 14px;
    transition: background-color 0.2s;
}

.map-lang-option:hover {
    background-color: var(--altin-light, rgba(196, 154, 60, 0.1));
}

.map-lang-option:active {
    background-color: var(--altin-light, rgba(196, 154, 60, 0.15));
}

/* ===== RESPONSIVE - DİL SEÇİCİ ===== */
@media (max-width: 480px) {
    .map-language-menu {
        top: 54px;
        right: -4px;
        min-width: 130px;
    }

    .map-lang-option {
        padding: 10px 12px;
        font-size: 13px;
    }
}