/*
Theme Name: Mimarlik Haritasi
Theme URI: https://example.com/mimarlik-haritasi
Author: Architect
Author URI: https://example.com
Description: A technical, blueprint-inspired WordPress theme for an architectural map of Turkey. Features a grid layout with filter sidebar, interactive map markers, and project detail panel.
Version: 2.0
License: GNU General Public License v2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Text Domain: mimarlik-haritasi
Tags: architecture, map, grid-layout, monospace
*/

/* ========== FONTS ========== */
@import url('https://fonts.googleapis.com/css2?family=Space+Mono:ital,wght@0,400;0,700;1,400&display=swap');

/* ========== CSS VARIABLES ========== */
:root {
    --bg-color: #F8F8F8;
    --ink-color: #050505;
    --line-weight: 1px;
    --dim-color: #A0A0A0;
    --active-color: #0000FF;
    --cell-padding: 12px;
    --font-stack: 'Space Mono', monospace;
    --spine-bg: #F0F0F0;
    --hover-bg: #E5E5E5;
    --header-bg: #EEEEEE;
    --input-bg: #FAFAFA;
    --border-dim: #F0F0F0;
}

html.theme-dark {
    --bg-color: #111111;
    --ink-color: #F8F8F8;
    --active-color: #FF3366;
    --spine-bg: #1A1A1A;
    --hover-bg: #2A2A2A;
    --header-bg: #151515;
    --input-bg: #222222;
    --border-dim: #333333;
}

html.theme-blue {
    --bg-color: #093145;
    --ink-color: #FFFFFF;
    --active-color: #FFD700;
    --spine-bg: #062332;
    --hover-bg: #0d4663;
    --header-bg: #082d40;
    --input-bg: #062b3d;
    --border-dim: #104868;
}

/* ========== RESET ========== */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    -webkit-font-smoothing: antialiased;
}

body {
    background-color: var(--bg-color);
    color: var(--ink-color);
    font-family: var(--font-stack);
    font-size: 13px;
    line-height: 1.4;
    overflow-x: hidden;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

/* ========== UTILITY CLASSES ========== */
.u-caps {
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.u-bold {
    font-weight: 700;
}

.u-vertical-text {
    writing-mode: vertical-rl;
    text-orientation: mixed;
    transform: rotate(180deg);
    white-space: nowrap;
}

.u-diagonal-bg {
    background-image: linear-gradient(45deg, var(--ink-color) 25%, transparent 25%, transparent 50%, var(--ink-color) 50%, var(--ink-color) 75%, transparent 75%, transparent 100%);
    background-size: 4px 4px;
    opacity: 0.1;
}

.u-cross-bg {
    position: relative;
    overflow: hidden;
}

.u-cross-bg::before,
.u-cross-bg::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    border-top: var(--line-weight) solid var(--ink-color);
    transform-origin: top left;
}

.u-cross-bg::before {
    transform: rotate(45deg) scale(1.5);
}

/* ========== BASE ELEMENTS ========== */
a {
    color: inherit;
    text-decoration: none;
    cursor: crosshair;
}

button {
    background: none;
    border: none;
    font: inherit;
    cursor: crosshair;
    color: inherit;
    text-transform: uppercase;
}

/* ========== LAYOUT GRID (4 sütun) ========== */
.layout-container {
    display: grid;
    grid-template-columns: 60px 250px 1fr 300px;
    grid-template-rows: 60px 1fr auto;
    width: 100vw;
    height: 100vh;
    border: var(--line-weight) solid var(--ink-color);
    overflow: hidden;
}

/* ========== GRID CELL BASE ========== */
.grid-cell {
    border-right: var(--line-weight) solid var(--ink-color);
    border-bottom: var(--line-weight) solid var(--ink-color);
    position: relative;
    background: var(--bg-color);
}

.grid-cell:last-child {
    border-right: none;
}

/* ========== HEADER ========== */
.header-logo {
    grid-column: 1 / 3;
    grid-row: 1;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 var(--cell-padding);
}

.header-logo-inner {
    display: flex;
    align-items: center;
}

.header-stats {
    grid-column: 3;
    grid-row: 1;
    display: flex;
    align-items: center;
    padding: 0 var(--cell-padding);
    font-size: 11px;
    gap: 1.5rem;
}

/* ========== YEAR RANGE SLIDER ========== */
.year-slider-wrap {
    display: flex;
    align-items: center;
    gap: 8px;
}

.year-slider-label {
    font-weight: bold;
    letter-spacing: 1px;
}

.year-slider-value {
    font-variant-numeric: tabular-nums;
    min-width: 32px;
    text-align: center;
    font-weight: bold;
}

.year-slider-dash {
    font-size: 14px;
}

.range-slider-container {
    position: relative;
    width: 320px;
    height: 24px;
}

.range-track {
    position: absolute;
    top: 50%;
    left: 0;
    right: 0;
    height: 2px;
    background: var(--dim-color);
    transform: translateY(-50%);
    pointer-events: none;
    z-index: 1;
}

.range-track::after {
    content: '';
    position: absolute;
    top: 0;
    height: 100%;
    background: var(--ink-color);
    left: var(--track-left, 0%);
    right: var(--track-right, 0%);
}

.range-input {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    margin: 0;
    padding: 0;
    -webkit-appearance: none;
    appearance: none;
    background: none;
    pointer-events: none;
    z-index: 2;
    outline: none;
}

.range-input::-webkit-slider-thumb {
    -webkit-appearance: none;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background: var(--bg-color);
    border: 2px solid var(--ink-color);
    cursor: pointer;
    pointer-events: auto;
    position: relative;
    z-index: 3;
    transition: background 0.15s;
}

.range-input::-webkit-slider-thumb:hover {
    background: var(--ink-color);
}

.range-input::-moz-range-thumb {
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background: var(--bg-color);
    border: 2px solid var(--ink-color);
    cursor: pointer;
    pointer-events: auto;
}

.range-input::-moz-range-thumb:hover {
    background: var(--ink-color);
}

.range-input::-webkit-slider-runnable-track {
    background: transparent;
}

.range-input::-moz-range-track {
    background: transparent;
}

.header-actions {
    grid-column: 4;
    grid-row: 1;
    display: flex;
}



.action-btn {
    flex: 1;
    border-left: var(--line-weight) solid var(--ink-color);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s, color 0.2s;
}

.action-btn:hover {
    background: var(--ink-color);
    color: var(--bg-color);
}

/* ========== SIDEBAR SPINE ========== */
.sidebar-spine {
    grid-column: 1;
    grid-row: 2;
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: var(--cell-padding) 0;
    gap: 40px;
    background: var(--spine-bg);
}

.spine-divider {
    height: 50px;
    width: 1px;
    background: var(--ink-color);
}

/* ========== SIDEBAR FILTERS ========== */
.sidebar-filters {
    grid-column: 2;
    grid-row: 2;
    display: flex;
    flex-direction: column;
    overflow-y: auto;
}

.filter-group {
    border-bottom: var(--line-weight) solid var(--ink-color);
}

.filter-header {
    padding: 8px var(--cell-padding);
    background: var(--header-bg);
    border-bottom: var(--line-weight) solid var(--ink-color);
    font-size: 11px;
}

.filter-item {
    display: flex;
    align-items: center;
    padding: 10px var(--cell-padding);
    cursor: pointer;
    transition: background 0.1s;
}

.filter-item:hover {
    background: var(--hover-bg);
}

.checkbox {
    width: 12px;
    height: 12px;
    border: var(--line-weight) solid var(--ink-color);
    margin-right: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.filter-item.active .checkbox::after {
    content: '';
    width: 6px;
    height: 6px;
    background: var(--ink-color);
}

/* ========== CITY FILTER ========== */
.city-filter-group {
    display: flex;
    flex-direction: column;
    max-height: 50vh;
}

.city-search-input {
    font-family: var(--font-stack);
    font-size: 12px;
    padding: 8px var(--cell-padding);
    border: none;
    border-bottom: var(--line-weight) solid var(--ink-color);
    background: var(--input-bg);
    color: var(--ink-color);
    outline: none;
    width: 100%;
}

.city-search-input::placeholder {
    color: var(--dim-color);
    font-style: italic;
}

.city-search-input:focus {
    background: var(--bg-color);
}

.city-list {
    overflow-y: auto;
    flex: 1;
    max-height: 290px;
}

.city-item {
    padding: 7px var(--cell-padding);
    cursor: pointer;
    font-size: 12px;
    transition: background 0.1s, color 0.1s;
    border-bottom: 1px solid var(--border-dim);
}

.city-item:hover {
    background: var(--hover-bg);
}

.city-item.active {
    background: var(--ink-color);
    color: var(--bg-color);
    font-weight: 700;
}

.city-item.hidden {
    display: none;
}

.city-reset-btn {
    font-family: var(--font-stack);
    font-size: 10px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    padding: 6px var(--cell-padding);
    border: none;
    border-bottom: var(--line-weight) solid var(--ink-color);
    background: var(--header-bg);
    color: var(--ink-color);
    cursor: pointer;
    text-align: center;
    transition: background 0.15s;
    display: none;
}

.city-reset-btn.visible {
    display: block;
}

.city-reset-btn:hover {
    background: var(--ink-color);
    color: var(--bg-color);
}

/* ========== COUNTRY LABELS ========== */
.country-label {
    background: none !important;
    border: none !important;
    box-shadow: none !important;
}

.country-label span {
    font-family: var(--font-stack);
    font-size: 11px;
    font-style: italic;
    color: #999;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    white-space: nowrap;
    pointer-events: none;
}

/* ========== TÜR DROPDOWN ========== */
.tur-select {
    font-family: var(--font-stack);
    font-size: 12px;
    width: 100%;
    padding: 6px 8px;
    border: var(--line-weight) solid var(--ink-color);
    background: var(--bg-color);
    color: var(--ink-color);
    cursor: pointer;
    outline: none;
    appearance: none;
    -webkit-appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6'%3E%3Cpath d='M0 0l5 6 5-6z' fill='%23050505'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 8px center;
    padding-right: 24px;
}

.tur-select:focus {
    border-color: var(--active-color);
}

/* ========== PIN TYPE TOGGLE BUTTONS ========== */
.pin-type-toggles {
    display: flex;
    gap: 4px;
    align-items: center;
}

.pin-type-toggle {
    font-family: var(--font-stack);
    font-size: 9px;
    font-weight: 700;
    letter-spacing: 1px;
    text-transform: uppercase;
    padding: 3px 8px;
    border: 1px solid var(--ink-color);
    background: transparent;
    color: var(--ink-color);
    cursor: pointer;
    transition: background 0.15s, color 0.15s;
}

.pin-type-toggle.active {
    background: var(--ink-color);
    color: var(--bg-color);
}

.pin-type-toggle:hover {
    opacity: 0.8;
}

/* ========== LOGIN MODAL ========== */
.login-modal-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(4px);
    z-index: 9999;
    justify-content: center;
    align-items: center;
}

.login-modal-overlay.active {
    display: flex;
}

.login-modal {
    background: var(--bg-color);
    border: 2px solid var(--ink-color);
    width: 380px;
    max-width: 90vw;
    position: relative;
    font-family: var(--font-stack);
}

.login-modal-close {
    position: absolute;
    top: 12px;
    right: 16px;
    font-size: 22px;
    line-height: 1;
    cursor: pointer;
    color: var(--ink-color);
    background: none;
    border: none;
    z-index: 1;
}

.login-modal-close:hover {
    color: #c00;
}

.login-modal-header {
    padding: 28px 28px 16px;
    text-align: center;
    border-bottom: 1px solid var(--border-dim);
}

.login-modal-header h2 {
    font-size: 18px;
    font-weight: 700;
    letter-spacing: 3px;
    margin: 0 0 6px;
}

.login-modal-header p {
    font-size: 12px;
    color: var(--dim-color);
    margin: 0;
}

.login-modal-body {
    padding: 24px 28px;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.login-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    width: 100%;
    padding: 12px 16px;
    font-family: var(--font-stack);
    font-size: 13px;
    font-weight: 600;
    border: 1.5px solid;
    cursor: pointer;
    transition: background 0.2s, transform 0.1s, box-shadow 0.1s;
    box-shadow: 2px 2px 0px 0px rgba(0, 0, 0, 0.15);
}

.login-btn:active {
    box-shadow: none;
    transform: translate(2px, 2px);
}

.login-btn-google {
    background: #fff;
    color: #444;
    border-color: #ddd;
}

.login-btn-google:hover {
    background: #f8f8f8;
    border-color: #4285F4;
}

.login-btn-linkedin {
    background: #0A66C2;
    color: #fff;
    border-color: #0A66C2;
}

.login-btn-linkedin:hover {
    background: #004182;
    border-color: #004182;
}

.login-modal-footer {
    padding: 12px 28px 20px;
    text-align: center;
    border-top: 1px solid var(--border-dim);
}

.login-modal-footer p {
    font-size: 10px;
    color: var(--dim-color);
    margin: 0;
}

.login-modal-footer a {
    color: var(--ink-color);
    text-decoration: underline;
}

/* ========== MAIN STAGE (MAP) ========== */
.main-stage {
    grid-column: 3;
    grid-row: 2;
    position: relative;
    background: var(--spine-bg);
    overflow: hidden;
}

.map-canvas {
    width: 100%;
    height: 100%;
    background-image:
        linear-gradient(var(--dim-color) 1px, transparent 1px),
        linear-gradient(90deg, var(--dim-color) 1px, transparent 1px);
    background-size: 100px 100px;
    position: relative;
}

/* ========== MAP MARKERS – 3 TİP ========== */
.leaflet-marker-custom {
    background: none !important;
    border: none !important;
}

.map-marker-pin {
    width: 32px;
    height: 32px;
    border: 2px solid var(--ink-color);
    border-radius: 50% 50% 50% 0;
    transform: rotate(-45deg);
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 2px 2px 6px rgba(0, 0, 0, 0.2);
    transition: transform 0.2s, box-shadow 0.2s;
}

.map-marker-pin svg {
    transform: rotate(45deg);
}

.map-marker-pin:hover {
    box-shadow: 3px 3px 10px rgba(0, 0, 0, 0.3);
}

/* Modern */
.marker-pin-modern {
    background: #ffffff;
    border-color: #1a1a1a;
}

.marker-pin-modern svg {
    stroke: #1a1a1a;
}

/* Tarihi */
.marker-pin-tarihi {
    background: #FFF8F0;
    border-color: #8B4513;
}

.marker-pin-tarihi svg {
    stroke: #8B4513;
}

/* Ofis */
.marker-pin-ofis {
    background: #EFF6FF;
    border-color: #2563EB;
}

.marker-pin-ofis svg {
    stroke: #2563EB;
}

/* ========== PIN POPUP ========== */
.custom-popup .leaflet-popup-content-wrapper {
    border-radius: 2px;
    font-family: var(--font-stack);
    padding: 0;
    border: 1px solid var(--ink-color);
    box-shadow: 4px 4px 0 rgba(0, 0, 0, 0.1);
}

.custom-popup .leaflet-popup-content {
    margin: 0;
    min-width: 220px;
}

.custom-popup .leaflet-popup-tip {
    border-top-color: var(--ink-color);
}

.pin-popup-img {
    width: 100%;
    height: 120px;
    overflow: hidden;
    border-bottom: 1px solid var(--ink-color);
}

.pin-popup-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    filter: grayscale(80%);
    transition: filter 0.3s;
}

.pin-popup-img:hover img {
    filter: grayscale(0%);
}

.pin-popup-body {
    padding: 10px 12px;
}

.pin-popup-title {
    font-size: 12px;
    font-weight: bold;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 4px;
}

.pin-popup-office {
    font-size: 11px;
    color: #666;
    margin-bottom: 4px;
}

.pin-popup-meta {
    font-size: 10px;
    color: #888;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 6px;
}

.pin-popup-type {
    display: inline-block;
    font-size: 9px;
    font-weight: bold;
    letter-spacing: 1px;
    padding: 2px 8px;
    margin-bottom: 8px;
}

.pin-type-modern {
    background: #1a1a1a;
    color: #fff;
}

.pin-type-tarihi {
    background: #8B4513;
    color: #fff;
}

.pin-type-ofis {
    background: #2563EB;
    color: #fff;
}

.pin-popup-actions {
    display: flex;
    gap: 8px;
    align-items: center;
    border-top: 1px solid #eee;
    padding-top: 8px;
}

.pin-popup-link {
    font-size: 10px;
    text-transform: uppercase;
    text-decoration: none;
    color: var(--ink-color);
    border-bottom: 1px solid var(--ink-color);
    letter-spacing: 0.5px;
}

.pin-popup-sv-btn {
    font-family: var(--font-stack);
    font-size: 9px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    padding: 3px 8px;
    border: 1px solid #2563EB;
    background: #EFF6FF;
    color: #2563EB;
    cursor: pointer;
    transition: background 0.2s;
    margin-left: auto;
}

.pin-popup-sv-btn:hover {
    background: #2563EB;
    color: #fff;
}

/* ========== STREET VIEW PANEL ========== */
.streetview-panel {
    position: absolute;
    bottom: 60px;
    right: 10px;
    width: 400px;
    height: 280px;
    background: var(--bg-color);
    border: 2px solid var(--ink-color);
    z-index: 1000;
    box-shadow: 6px 6px 0 rgba(0, 0, 0, 0.15);
    font-family: var(--font-stack);
    overflow: hidden;
}

.sv-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 6px 10px;
    border-bottom: 1px solid var(--ink-color);
    background: #f5f5f5;
    height: 32px;
    box-sizing: border-box;
}

.sv-title {
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    font-weight: bold;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 340px;
}

.sv-close {
    background: none;
    border: none;
    font-size: 18px;
    cursor: pointer;
    line-height: 1;
    color: var(--ink-color);
}

.sv-close:hover {
    color: #c00;
}

/* Resize handle (sağ alt köşe) */
.sv-resize-handle {
    position: absolute;
    bottom: 0;
    right: 0;
    width: 16px;
    height: 16px;
    cursor: nwse-resize;
    background:
        linear-gradient(135deg, transparent 30%, var(--ink-color) 30%, var(--ink-color) 35%, transparent 35%,
            transparent 50%, var(--ink-color) 50%, var(--ink-color) 55%, transparent 55%,
            transparent 70%, var(--ink-color) 70%, var(--ink-color) 75%, transparent 75%);
    z-index: 10;
}

/* ========== COORDINATE OVERLAY (SAĞ ÜST) ========== */
.coord-overlay {
    position: absolute;
    top: 10px;
    right: 10px;
    left: auto;
    font-family: var(--font-stack);
    font-size: 10px;
    background: rgba(255, 255, 255, 0.92);
    padding: 4px 10px;
    border: 1px solid var(--ink-color);
    z-index: 100;
    letter-spacing: 0.5px;
    white-space: nowrap;
}

/* ========== COMPASS ========== */
.compass {
    position: absolute;
    top: 60px;
    right: 15px;
    width: 60px;
    height: 60px;
    border: 1px solid var(--ink-color);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.compass::before {
    content: 'N';
    position: absolute;
    top: 2px;
    font-size: 10px;
}

.compass-arrow {
    width: 1px;
    height: 40px;
    background: var(--ink-color);
    transform: rotate(45deg);
}

/* ========== DETAIL PANEL ========== */
.detail-panel {
    grid-column: 4;
    grid-row: 2;
    overflow-y: auto;
    border-left: var(--line-weight) solid var(--ink-color);
}

/* ========== PROJECT CARDS ========== */
.project-card {
    border-bottom: var(--line-weight) solid var(--ink-color);
    display: flex;
    flex-direction: column;
    transition: background 0.3s;
}

.project-image {
    width: 100%;
    height: 200px;
    background-color: #ddd;
    position: relative;
    overflow: hidden;
    border-bottom: var(--line-weight) solid var(--ink-color);
    filter: grayscale(100%);
    transition: filter 0.3s;
}

.project-card:hover .project-image {
    filter: grayscale(0%);
}

.project-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.project-image-label {
    position: absolute;
    bottom: 0;
    right: 0;
    background: black;
    color: white;
    padding: 2px 6px;
    font-size: 10px;
}

.project-meta {
    padding: var(--cell-padding);
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 8px;
}

.meta-row {
    grid-column: 1 / 3;
    display: flex;
    justify-content: space-between;
    font-size: 11px;
    color: #555;
    margin-top: 8px;
    padding-top: 8px;
    border-top: 1px solid #eee;
}

/* ========== STAMP BOX ========== */
.stamp-box {
    border: 1px solid var(--ink-color);
    padding: 2px;
    display: inline-block;
    margin-right: 10px;
}

/* ========== VERSION BADGE ========== */
.version-badge {
    font-size: 10px;
    border: 1px solid black;
    padding: 2px 6px;
}

/* ========== EMPTY CELL DECORATION ========== */
.empty-cell-decoration {
    width: 100%;
    height: 20px;
    background: repeating-linear-gradient(45deg,
            transparent,
            transparent 5px,
            #ddd 5px,
            #ddd 6px);
    margin-top: auto;
    border-top: 1px solid var(--ink-color);
}

/* ========== DIAGONAL BG DECORATION ========== */
.diagonal-decoration {
    height: 100px;
    border-bottom: 1px solid black;
}

/* ========== SCROLLBAR ========== */
::-webkit-scrollbar {
    width: 6px;
}

::-webkit-scrollbar-track {
    background: var(--bg-color);
    border-left: 1px solid var(--ink-color);
}

::-webkit-scrollbar-thumb {
    background: var(--ink-color);
}

/* ========== PROJE/OFİS META ITEMS ========== */
.proje-meta-item {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    padding: 10px var(--cell-padding);
    border-bottom: 1px solid #eee;
    font-size: 12px;
    gap: 8px;
}

.proje-meta-item:last-child {
    border-bottom: none;
}

.meta-label {
    font-size: 10px;
    color: var(--dim-color);
    flex-shrink: 0;
    letter-spacing: 0.5px;
}

.meta-value {
    text-align: right;
    word-break: break-word;
}

.meta-value a,
a.meta-value {
    text-decoration: none;
    border-bottom: 1px solid var(--ink-color);
    transition: opacity 0.2s;
}

.meta-value a:hover,
a.meta-value:hover {
    opacity: 0.6;
}

/* ========== LEAFLET OVERRIDES ========== */
#proje-harita,
#ana-harita {
    z-index: 1;
}

.leaflet-control-attribution {
    font-family: var(--font-stack) !important;
    font-size: 9px !important;
}

/* Custom marker pin (blueprint style) */
.leaflet-marker-custom {
    background: none !important;
    border: none !important;
}

.map-marker-pin {
    width: 28px;
    height: 28px;
    border: var(--line-weight) solid var(--ink-color);
    background: var(--bg-color);
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: var(--font-stack);
    font-size: 10px;
    cursor: pointer;
    transition: transform 0.2s, background 0.2s;
    box-shadow: 3px 3px 0 rgba(0, 0, 0, 0.15);
}

.map-marker-pin:hover {
    transform: scale(1.15);
    background: var(--ink-color);
    color: var(--bg-color);
}

/* Leaflet popup override */
.leaflet-popup-content-wrapper {
    border-radius: 0 !important;
    border: 1px solid var(--ink-color) !important;
    box-shadow: 4px 4px 0 rgba(0, 0, 0, 0.1) !important;
    font-family: var(--font-stack) !important;
}

.leaflet-popup-tip {
    border: 1px solid var(--ink-color) !important;
    box-shadow: none !important;
}


/* ========== BÖLÜM KALDIRILDI ========== */

/* ========== FAVORİLER POPUP ========== */
.favoriler-panel {
    position: fixed;
    right: 60px;
    top: 60px;
    width: 300px;
    max-height: calc(100vh - 60px);
    background: var(--bg-color);
    border-left: var(--line-weight) solid var(--ink-color);
    border-bottom: var(--line-weight) solid var(--ink-color);
    z-index: 1000;
    overflow-y: auto;
    box-shadow: -4px 4px 0 rgba(0, 0, 0, 0.08);
}

.favoriler-panel .favori-item {
    display: flex;
    gap: 10px;
    padding: 10px var(--cell-padding);
    border-bottom: 1px solid #eee;
    font-size: 12px;
    text-decoration: none;
    color: var(--ink-color);
    transition: background 0.15s;
}

.favoriler-panel .favori-item:hover {
    background: #f5f5f5;
}

.favoriler-panel .favori-thumb {
    width: 50px;
    height: 40px;
    object-fit: cover;
    border: 1px solid #ddd;
    flex-shrink: 0;
}

/* ========== RESPONSIVE — TABLET ========== */
@media (max-width: 1024px) {
    .layout-container {
        grid-template-columns: 50px 200px 1fr;
        grid-template-rows: 60px 1fr auto;
    }

    .detail-panel {
        display: none;
    }

    .header-actions {
        grid-column: 3;
    }
}

/* ========== RESPONSIVE — MOBİL ========== */
@media (max-width: 768px) {

    /* ---- LAYOUT: Grid → Flex Column ---- */
    .layout-container {
        display: flex;
        flex-direction: column;
        width: 100vw;
        height: 100vh;
        overflow: hidden;
        border: none;
    }

    /* ---- HEADER LOGO ---- */
    .header-logo {
        flex: none;
        height: 64px;
        display: flex;
        align-items: center;
        justify-content: space-between;
        padding: 0 16px;
        border-right: none;
        border-bottom: 2px solid var(--ink-color);
    }

    .header-logo .theme-switcher {
        display: none !important;
    }

    .header-logo h1 {
        font-size: 14px !important;
    }

    .header-logo .stamp-box {
        font-size: 10px;
        padding: 1px 4px;
        margin-right: 8px;
    }

    .version-badge {
        font-size: 9px;
        padding: 1px 4px;
        background: var(--ink-color);
        color: var(--bg-color);
        border-color: var(--ink-color);
    }

    /* ---- HEADER STATS (Dönem Slider Bar) ---- */
    .header-stats {
        flex: none;
        height: 48px;
        display: flex;
        align-items: center;
        padding: 0 16px;
        gap: 12px;
        border-right: none;
        border-bottom: 2px solid var(--ink-color);
        font-size: 10px;
    }

    .header-stats .year-slider-wrap {
        flex: 1;
        gap: 6px;
    }

    .header-stats .range-slider-container {
        width: auto;
        flex: 1;
    }

    .header-stats>span[style*="margin-left:auto"] {
        display: none;
    }

    .header-stats>span:not(.year-slider-label):not(.year-slider-value):not(.year-slider-dash):not([id]) {
        font-size: 9px;
    }

    /* Mobilde pin type toggles */
    .pin-type-toggles {
        display: none;
    }

    .header-stats>a[style*="background"] {
        display: none;
    }

    /* ---- HEADER ACTIONS ---- */
    .header-actions {
        position: absolute;
        top: 0;
        right: 0;
        height: 64px;
        display: flex;
        align-items: center;
        gap: 8px;
        padding: 0 16px;
        border: none;
        z-index: 50;
    }

    .header-actions .action-btn {
        width: 32px;
        height: 32px;
        border: 1px solid var(--ink-color);
        border-radius: 50%;
        flex: none;
        display: flex;
        align-items: center;
        justify-content: center;
    }

    .header-actions .action-btn svg {
        width: 14px;
        height: 14px;
    }

    .header-actions #btn-login {
        font-size: 10px;
        padding: 0 8px;
        height: 32px;
        border-radius: 0;
    }

    /* ---- SIDEBAR SPINE: Gizle ---- */
    .sidebar-spine {
        display: none !important;
    }

    /* ---- SIDEBAR FILTERS: Drawer ---- */
    .sidebar-filters {
        position: fixed;
        left: 0;
        top: 0;
        bottom: 0;
        width: 85%;
        max-width: 360px;
        z-index: 1000;
        transform: translateX(-100%);
        transition: transform 0.3s ease-in-out;
        border-right: 2px solid var(--ink-color);
        overflow-y: auto;
        background: var(--bg-color);
    }

    .sidebar-filters.mobile-open {
        transform: translateX(0);
    }

    /* ---- MOBILE FILTER OVERLAY ---- */
    .mobile-filter-overlay {
        display: none;
        position: fixed;
        inset: 0;
        background: rgba(0, 0, 0, 0.2);
        backdrop-filter: blur(2px);
        z-index: 999;
    }

    .mobile-filter-overlay.active {
        display: block;
    }

    /* ---- MOBILE FILTER TOGGLE BUTTON ---- */
    .mobile-filter-toggle {
        display: flex !important;
        align-items: center;
        justify-content: center;
        width: 32px;
        height: 32px;
        border: 1px solid var(--ink-color) !important;
        background: var(--bg-color);
        cursor: pointer;
        flex-shrink: 0;
        box-shadow: 2px 2px 0px 0px var(--ink-color);
        transition: box-shadow 0.1s, transform 0.1s;
    }

    .mobile-filter-toggle:active {
        box-shadow: none;
        transform: translate(2px, 2px);
    }

    .mobile-filter-toggle svg {
        width: 14px;
        height: 14px;
    }

    /* ---- MOBILE FILTER HEADER ---- */
    .mobile-filter-drawer-header {
        display: flex !important;
        align-items: center;
        justify-content: space-between;
        padding: 12px 16px;
        background: var(--ink-color);
        color: var(--bg-color);
        border-bottom: 2px solid var(--ink-color);
        font-size: 14px;
        font-weight: 700;
        letter-spacing: 2px;
        text-transform: uppercase;
    }

    .mobile-filter-drawer-header button {
        color: var(--bg-color);
        font-size: 18px;
        line-height: 1;
        cursor: pointer;
    }

    /* ---- MOBILE FILTER APPLY BUTTON ---- */
    .mobile-filter-apply {
        display: block !important;
        width: 100%;
        padding: 14px;
        background: var(--ink-color);
        color: var(--bg-color);
        font-family: var(--font-stack);
        font-size: 12px;
        font-weight: 700;
        text-transform: uppercase;
        letter-spacing: 1px;
        border: none;
        border-top: 2px solid var(--ink-color);
        cursor: pointer;
        transition: opacity 0.2s;
    }

    .mobile-filter-apply:hover {
        opacity: 0.85;
    }

    /* ---- MAIN STAGE (MAP) ---- */
    .main-stage {
        flex: 1;
        width: 100%;
        min-height: 0;
        position: relative;
        border-right: none;
    }

    .coord-overlay {
        top: 12px;
        right: 12px;
        font-size: 9px;
        padding: 4px 8px;
        border: 1px solid var(--ink-color);
        background: rgba(255, 255, 255, 0.92);
        box-shadow: 2px 2px 0px rgba(0, 0, 0, 0.1);
    }

    .compass {
        top: auto;
        bottom: 12px;
        right: 12px;
        width: 36px;
        height: 36px;
        background: var(--bg-color);
        box-shadow: 2px 2px 0px rgba(0, 0, 0, 0.1);
    }

    .compass::before {
        font-size: 10px;
        font-weight: 700;
        top: 3px;
    }

    .compass-arrow {
        height: 24px;
    }

    /* ---- MAP ZOOM ---- */
    .mobile-map-zoom {
        display: flex !important;
        flex-direction: column;
        gap: 8px;
        position: absolute;
        bottom: 56px;
        right: 12px;
        z-index: 10;
    }

    .mobile-map-zoom button {
        width: 32px;
        height: 32px;
        background: var(--bg-color);
        border: 1px solid var(--ink-color);
        display: flex;
        align-items: center;
        justify-content: center;
        font-size: 16px;
        font-weight: bold;
        cursor: pointer;
        box-shadow: 2px 2px 0px rgba(0, 0, 0, 1);
        transition: box-shadow 0.1s, transform 0.1s;
    }

    .mobile-map-zoom button:active {
        box-shadow: none;
        transform: translate(2px, 2px);
    }

    /* ---- DETAIL PANEL (Son Projeler — Bottom Carousel) ---- */
    .detail-panel {
        display: block !important;
        flex: none;
        border-right: none;
        border-left: none;
        border-top: 2px solid var(--ink-color);
        overflow: hidden;
        background: var(--bg-color);
        max-height: 120px;
    }

    .detail-panel .filter-header {
        display: flex;
        justify-content: space-between;
        align-items: center;
        padding: 8px 12px;
        border-bottom: 1px solid var(--border-dim);
        background: var(--bg-color);
        font-size: 10px;
        letter-spacing: 2px;
    }

    .detail-panel .diagonal-decoration {
        display: none;
    }

    /* AdSense placeholder hide on mobile */
    .detail-panel>div[style*="YATAY REKLAM"] {
        display: none !important;
    }

    /* Desktop-only header hide on mobile (fix double Son Projeler) */
    .detail-panel .desktop-only-header {
        display: none !important;
    }

    /* Proje kartları yatay scroll */
    .detail-panel .mobile-projects-scroll {
        display: flex !important;
        overflow-x: auto;
        gap: 8px;
        padding: 8px 12px;
        -ms-overflow-style: none;
        scrollbar-width: none;
    }

    .detail-panel .mobile-projects-scroll::-webkit-scrollbar {
        display: none;
    }

    .detail-panel .project-card {
        min-width: 200px;
        max-width: 200px;
        flex-shrink: 0;
        border: 1px solid var(--ink-color);
        border-bottom: 1px solid var(--ink-color);
        display: flex;
        flex-direction: row;
        box-shadow: 2px 2px 0px rgba(0, 0, 0, 1);
        transition: box-shadow 0.15s, transform 0.15s;
    }

    .detail-panel .project-card:hover {
        box-shadow: none;
        transform: translate(2px, 2px);
    }

    .detail-panel .project-image {
        width: 64px;
        min-width: 64px;
        height: auto;
        border-bottom: none;
        border-right: 1px solid var(--ink-color);
    }

    .detail-panel .project-image img {
        width: 100%;
        height: 100%;
        object-fit: cover;
    }

    .detail-panel .project-image-label {
        font-size: 7px;
        padding: 1px 4px;
        top: 2px;
        left: 2px;
        bottom: auto;
        right: auto;
    }

    .detail-panel .project-meta {
        padding: 8px;
        display: flex;
        flex-direction: column;
        justify-content: space-between;
        gap: 4px;
    }

    .detail-panel .project-meta .u-bold {
        font-size: 10px !important;
        line-height: 1.2;
    }

    .detail-panel .project-meta .u-caps:not(.u-bold) {
        font-size: 8px;
        color: var(--dim-color);
    }

    .detail-panel .meta-row {
        font-size: 7px;
        margin-top: 4px;
        padding-top: 4px;
    }

    .detail-panel .meta-row span {
        border: 1px solid var(--dim-color);
        padding: 1px 4px;
        font-size: 7px;
        color: var(--dim-color);
    }

    /* ---- ADD PROJECT CARD (MOBİL) ---- */
    .detail-panel .mobile-add-project {
        min-width: 120px;
        max-width: 120px;
        flex-shrink: 0;
        border: 1px dashed var(--dim-color);
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        padding: 8px;
        text-align: center;
        cursor: pointer;
        background: var(--spine-bg);
        transition: background 0.15s;
    }

    .detail-panel .mobile-add-project:hover {
        background: var(--hover-bg);
    }

    .detail-panel .mobile-add-project svg {
        color: var(--dim-color);
        margin-bottom: 4px;
    }

    .detail-panel .mobile-add-project span {
        font-size: 8px;
        color: var(--dim-color);
        text-transform: uppercase;
        letter-spacing: 0.5px;
    }

    /* ---- SON PROJELER HEADER BAR ---- */
    .mobile-projects-header {
        display: flex !important;
        justify-content: space-between;
        align-items: center;
        padding: 6px 12px;
        border-bottom: 1px solid var(--border-dim);
    }

    .mobile-projects-header h2 {
        font-size: 10px;
        font-weight: 700;
        text-transform: uppercase;
        letter-spacing: 2px;
    }

    .mobile-projects-header a {
        font-size: 9px;
        text-decoration: underline;
        text-underline-offset: 2px;
    }

    /* ---- DRAG HANDLE ---- */
    .mobile-drag-handle {
        display: flex !important;
        justify-content: center;
        padding: 6px 0 2px;
    }

    .mobile-drag-handle span {
        width: 32px;
        height: 2px;
        background: var(--dim-color);
        border-radius: 2px;
    }

    /* ---- FOOTER ---- */
    .site-footer {
        flex: none;
        padding: 10px 16px;
        gap: 16px;
        background: #000;
        color: #fff;
        border-top: none;
        font-size: 10px;
        display: flex;
        justify-content: space-between;
        align-items: center;
    }

    .site-footer .footer-col {
        flex-direction: row;
        gap: 16px;
    }

    .site-footer .footer-col-title {
        display: none;
    }

    .site-footer .footer-col a {
        color: #fff;
        font-size: 10px;
        text-transform: uppercase;
        letter-spacing: 0.5px;
    }

    .site-footer .footer-col a:hover {
        color: #ccc;
        border-bottom-color: #ccc;
    }

    .site-footer .footer-copy {
        color: #888;
        font-size: 9px;
        margin-top: 0;
    }

    /* ---- LEAFLET OVERRIDES ---- */
    .leaflet-control-zoom {
        display: none !important;
    }

    /* ---- FAVORİLER PANEL MOBİL ---- */
    .favoriler-panel {
        right: 0;
        top: 64px;
        width: 100%;
        max-width: none;
        max-height: 50vh;
    }

    /* ---- STREETVIEW PANEL MOBİL ---- */
    .streetview-panel {
        width: calc(100% - 20px);
        right: 10px;
        bottom: 80px;
        height: 200px;
    }

    /* ---- Leaflet popups ---- */
    .leaflet-popup-content {
        min-width: 180px !important;
    }
}

/* ---- Desktop: Hide mobile-only elements ---- */
.mobile-filter-toggle,
.mobile-filter-overlay,
.mobile-filter-drawer-header,
.mobile-filter-apply,
.mobile-map-zoom,
.mobile-projects-header,
.mobile-drag-handle,
.mobile-add-project {
    display: none;
}

.mobile-projects-scroll {
    display: contents;
}

/* ========== THEME SPECIFIC LEAFLET TILES ========== */
.grayscale-tiles {
    filter: grayscale(100%);
    transition: filter 0.3s ease;
}

html.theme-dark .grayscale-tiles {
    filter: grayscale(100%) invert(1) hue-rotate(180deg) brightness(130%) contrast(85%);
}

html.theme-blue .grayscale-tiles {
    filter: grayscale(100%) invert(1) sepia(100%) hue-rotate(180deg) brightness(120%) contrast(80%);
}

/* ========== SITE FOOTER ========== */
.site-footer {
    background: var(--header-bg);
    border-top: var(--line-weight) solid var(--ink-color);
    font-family: var(--font-stack);
    font-size: 10px;
    padding: 8px 40px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 30px;
    flex-wrap: wrap;
    grid-column: 1 / -1;
    grid-row: 3;
}

.footer-col {
    display: flex;
    flex-direction: row;
    gap: 10px;
    align-items: center;
}

.footer-col-title {
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    font-size: 10px;
    margin-bottom: 4px;
}

.footer-col a {
    color: var(--ink-color);
    text-decoration: none;
    border-bottom: 1px solid transparent;
    transition: border-color 0.2s;
}

.footer-col a:hover {
    border-bottom-color: var(--ink-color);
}

.footer-copy {
    color: var(--dim-color);
    font-size: 10px;
    margin-top: 4px;
}

/* ========== SOCIAL SHARE ========== */
.social-share-bar {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 16px 0;
    margin-top: 20px;
    border-top: 1px solid var(--ink-color);
}

.social-share-bar .share-label {
    font-size: 10px;
    text-transform: uppercase;
    letter-spacing: 1px;
    font-weight: 700;
    color: var(--dim-color);
    margin-right: 6px;
}

.social-share-bar a,
.social-share-bar button {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    border: 1px solid var(--ink-color);
    background: var(--bg-color);
    color: var(--ink-color);
    transition: background 0.2s, color 0.2s;
    padding: 0;
    text-decoration: none;
}

.social-share-bar a:hover,
.social-share-bar button:hover {
    background: var(--ink-color);
    color: var(--bg-color);
}

.social-share-bar svg {
    width: 16px;
    height: 16px;
}

/* ========== COMMENTS ========== */
.comments-area {
    margin-top: 30px;
    padding-top: 20px;
    border-top: var(--line-weight) solid var(--ink-color);
}

.comments-area .comments-title {
    font-size: 14px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 20px;
}

.comments-area .comment-list {
    list-style: none;
    padding: 0;
}

.comments-area .comment-list .comment {
    padding: 12px 0;
    border-bottom: 1px solid var(--border-dim);
}

.comments-area .comment-author {
    font-size: 12px;
    font-weight: 700;
    margin-bottom: 4px;
}

.comments-area .comment-content {
    font-size: 13px;
    line-height: 1.6;
}

.comments-area .comment-metadata {
    font-size: 10px;
    color: var(--dim-color);
    margin-top: 4px;
}

.comments-area .comment-respond {
    margin-top: 20px;
}

.comments-area .comment-form label {
    display: block;
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    font-weight: 700;
    margin-bottom: 4px;
}

.comments-area .comment-form input[type="text"],
.comments-area .comment-form input[type="email"],
.comments-area .comment-form input[type="url"],
.comments-area .comment-form textarea {
    width: 100%;
    font-family: var(--font-stack);
    font-size: 12px;
    padding: 8px var(--cell-padding);
    border: var(--line-weight) solid var(--ink-color);
    background: var(--input-bg);
    color: var(--ink-color);
    margin-bottom: 12px;
    outline: none;
}

.comments-area .comment-form textarea {
    min-height: 100px;
    resize: vertical;
}

.comments-area .comment-form .form-submit input[type="submit"] {
    font-family: var(--font-stack);
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 1px;
    font-weight: 700;
    padding: 10px 24px;
    border: var(--line-weight) solid var(--ink-color);
    background: var(--bg-color);
    color: var(--ink-color);
    cursor: pointer;
    transition: background 0.2s, color 0.2s;
}

.comments-area .comment-form .form-submit input[type="submit"]:hover {
    background: var(--ink-color);
    color: var(--bg-color);
}

/* ========== BLOG & DUYURULAR PAGES ========== */
.page-content-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 0;
}

.blog-card {
    border-bottom: var(--line-weight) solid var(--ink-color);
    border-right: var(--line-weight) solid var(--ink-color);
    display: flex;
    flex-direction: column;
    transition: background 0.2s;
}

.blog-card:hover {
    background: var(--hover-bg);
}

.blog-card-image {
    width: 100%;
    height: 180px;
    overflow: hidden;
    border-bottom: var(--line-weight) solid var(--ink-color);
    filter: grayscale(100%);
    transition: filter 0.3s;
}

.blog-card:hover .blog-card-image {
    filter: grayscale(0%);
}

.blog-card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.blog-card-body {
    padding: var(--cell-padding);
    flex: 1;
}

.blog-card-title {
    font-size: 13px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 6px;
}

.blog-card-excerpt {
    font-size: 12px;
    color: var(--dim-color);
    line-height: 1.5;
    margin-bottom: 8px;
}

.blog-card-date {
    font-size: 10px;
    color: var(--dim-color);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Blog Submit Form */
.blog-submit-form {
    padding: 24px;
    border-bottom: var(--line-weight) solid var(--ink-color);
    background: var(--header-bg);
}

.blog-submit-form label {
    display: block;
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    font-weight: 700;
    margin-bottom: 4px;
    margin-top: 12px;
}

.blog-submit-form label:first-child {
    margin-top: 0;
}

.blog-submit-form input[type="text"],
.blog-submit-form textarea {
    width: 100%;
    font-family: var(--font-stack);
    font-size: 12px;
    padding: 8px var(--cell-padding);
    border: var(--line-weight) solid var(--ink-color);
    background: var(--bg-color);
    color: var(--ink-color);
    outline: none;
}

.blog-submit-form textarea {
    min-height: 120px;
    resize: vertical;
}

.blog-submit-form input[type="submit"] {
    margin-top: 12px;
    font-family: var(--font-stack);
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 1px;
    font-weight: 700;
    padding: 10px 24px;
    border: var(--line-weight) solid var(--ink-color);
    background: var(--bg-color);
    color: var(--ink-color);
    cursor: pointer;
    transition: background 0.2s, color 0.2s;
}

.blog-submit-form input[type="submit"]:hover {
    background: var(--ink-color);
    color: var(--bg-color);
}

/* ========== OFFICE PORTFOLIO GRID ========== */
.ofis-portfolio-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 0;
    border-top: var(--line-weight) solid var(--ink-color);
}

.ofis-portfolio-grid .project-card {
    border-right: var(--line-weight) solid var(--ink-color);
}

/* ========== OFİS FİLTRE ========== */
.ofis-filter-group {
    display: flex;
    flex-direction: column;
    max-height: 40vh;
}

.ofis-search-input {
    font-family: var(--font-stack);
    font-size: 12px;
    padding: 8px var(--cell-padding);
    border: none;
    border-bottom: var(--line-weight) solid var(--ink-color);
    background: var(--input-bg);
    color: var(--ink-color);
    outline: none;
    width: 100%;
}

.ofis-search-input::placeholder {
    color: var(--dim-color);
    font-style: italic;
}

.ofis-list {
    overflow-y: auto;
    flex: 1;
    max-height: 250px;
}

.ofis-list .filter-item {
    font-size: 12px;
}

.ofis-list .filter-item.hidden {
    display: none;
}