@import url('https://fonts.googleapis.com/css2?family=Quicksand:wght@600;700&display=swap');

/* === ŞABLON STYLES === */
/* TASARIM SİSTEMİ VE DEĞİŞKENLER */
:root, [data-theme="light"] {
    --theme-mode: light;
    
    /* Üst Bar: Açık temada Yeşil */
    --topbar-bg: #00b047;
    --topbar-border: #d0d0d0;
    --topbar-logo-text: #ffffff;
    --topbar-logo-box-bg: rgba(255, 255, 255, 0.22);
    --topbar-logo-icon-color: #ffffff;
    --topbar-btn-bg: rgba(255, 255, 255, 0.18);
    --topbar-btn-border: rgba(255, 255, 255, 0.35);
    --topbar-btn-color: #ffffff;
    --topbar-btn-hover: rgba(255, 255, 255, 0.30);
    --topbar-search-bg: #ffffff;
    --topbar-search-border: var(--topbar-border);
    --topbar-search-text: #0f172a;
    --topbar-search-placeholder: #64748b;
    --topbar-search-icon: #00b047;
    --lang-btn-hover-bg: #ffffff;
    --lang-btn-hover-text: #00b047;
    
    --box-border-color: var(--topbar-border);
    --box-border-width: 2px;
    
    /* Kalan Kısım: Şu anki açık renkler */
    --bg-color: #f8fafc;
    --body-bg: #f8fafc;
    --card-bg: #ffffff;
    --card-border: var(--topbar-border);
    --card-border-glow: var(--topbar-border);
    --text-primary: #0f172a;
    --text-secondary: #475569;
    --accent-color: #00b047;
    --accent-gradient: linear-gradient(135deg, #00e676 0%, #00a040 100%);
    --accent-success: #00b047;
    --accent-danger: #ff1744;
    --glow-color: transparent;
    --nav-link-color: #00b047;
    
    --breadcrumb-bg: transparent;
    --breadcrumb-link: #0f3d82;
    --breadcrumb-sep: #00b047;
    --breadcrumb-active: #0f3d82;
    
    --chip-bg: #f1f5f9;
    --chip-border: #e2e8f0;
    --chip-text: #334155;
    --chip-active-bg: #00b047;
    --chip-active-text: #ffffff;
    
    --dropdown-bg: #ffffff;
    --dropdown-border: var(--topbar-border);
    --dropdown-hover: #f1f5f9;
    --dropdown-text: #0f172a;
    --dropdown-subtext: #64748b;
    
    --input-bg: #ffffff;
    --input-border: var(--topbar-border);
    --input-text: #0f172a;
    --input-placeholder: #94a3b8;
    
    --font-heading: 'Outfit', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    --font-body: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    --transition-smooth: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
    --transition-fast: all 0.2s ease;
}

/* Kapalı Tema (Dark Mode): Üst bar Yeşil, Altında Kalan Kısım GitHub Grisi */
[data-theme="dark"] {
    --theme-mode: dark;
    
    /* Üst Bar: Açık temadaki gibi Yeşil */
    --topbar-bg: #00b047;
    --topbar-border: #30363d;
    --topbar-logo-text: #ffffff;
    --topbar-logo-box-bg: rgba(255, 255, 255, 0.22);
    --topbar-logo-icon-color: #ffffff;
    --topbar-btn-bg: rgba(255, 255, 255, 0.18);
    --topbar-btn-border: rgba(255, 255, 255, 0.35);
    --topbar-btn-color: #ffffff;
    --topbar-btn-hover: rgba(255, 255, 255, 0.30);
    --topbar-search-bg: #0d1117;
    --topbar-search-border: var(--topbar-border);
    --topbar-search-text: #f0f6fc;
    --topbar-search-placeholder: #8b949e;
    --topbar-search-icon: #8b949e;
    --lang-btn-hover-bg: #000000;
    --lang-btn-hover-text: #ffffff;
    
    --box-border-color: var(--topbar-border);
    --box-border-width: 2px;
    
    /* Altında Kalan Kısım: GitHub Grisi / GitHub Dark Theme */
    --bg-color: #0d1117;
    --body-bg: #0d1117;
    --card-bg: #161b22;
    --card-border: var(--topbar-border);
    --card-border-glow: var(--topbar-border);
    --text-primary: #f0f6fc;
    --text-secondary: #8b949e;
    --accent-color: #00e676;
    --accent-gradient: linear-gradient(135deg, #00e676 0%, #00a040 100%);
    --accent-success: #238636;
    --accent-danger: #f85149;
    --glow-color: transparent;
    --nav-link-color: #00e676;
    
    --breadcrumb-bg: transparent;
    --breadcrumb-link: #ffffff;
    --breadcrumb-sep: #00b047;
    --breadcrumb-active: #00b047;
    
    --chip-bg: #21262d;
    --chip-border: #30363d;
    --chip-text: #c9d1d9;
    --chip-active-bg: #238636;
    --chip-active-text: #ffffff;
    
    --dropdown-bg: #161b22;
    --dropdown-border: #30363d;
    --dropdown-hover: #21262d;
    --dropdown-text: #f0f6fc;
    --dropdown-subtext: #8b949e;
    
    --input-bg: #161b22;
    --input-border: #30363d;
    --input-text: #f0f6fc;
    --input-placeholder: #8b949e;
}

@media (prefers-color-scheme: dark) {
    :root:not([data-theme="light"]) {
        --theme-mode: dark;
        
        --topbar-bg: #00b047;
        --topbar-border: #d0d0d0;
        --topbar-logo-text: #ffffff;
        --topbar-logo-box-bg: rgba(255, 255, 255, 0.22);
        --topbar-logo-icon-color: #ffffff;
        --topbar-btn-bg: rgba(255, 255, 255, 0.18);
        --topbar-btn-border: rgba(255, 255, 255, 0.35);
        --topbar-btn-color: #ffffff;
        --topbar-btn-hover: rgba(255, 255, 255, 0.30);
        --topbar-search-bg: #0d1117;
        --topbar-search-border: #d0d0d0;
        --topbar-search-text: #f0f6fc;
        --topbar-search-placeholder: #8b949e;
        --topbar-search-icon: #8b949e;
        
        --bg-color: #0d1117;
        --body-bg: #0d1117;
        --card-bg: #161b22;
        --card-border: #30363d;
        --card-border-glow: #30363d;
        --text-primary: #f0f6fc;
        --text-secondary: #8b949e;
        --accent-color: #00e676;
        --accent-gradient: linear-gradient(135deg, #00e676 0%, #00a040 100%);
        --accent-success: #238636;
        --accent-danger: #f85149;
        --glow-color: transparent;
        --nav-link-color: #00e676;
        
        --breadcrumb-bg: transparent;
        --breadcrumb-link: #f0f6fc;
        --breadcrumb-sep: #00e676;
        --breadcrumb-active: #f0f6fc;
        
        --chip-bg: #21262d;
        --chip-border: #30363d;
        --chip-text: #c9d1d9;
        --chip-active-bg: #238636;
        --chip-active-text: #ffffff;
        
        --dropdown-bg: #161b22;
        --dropdown-border: #30363d;
        --dropdown-hover: #21262d;
        --dropdown-text: #f0f6fc;
        --dropdown-subtext: #8b949e;
        
        --input-bg: #161b22;
        --input-border: #30363d;
        --input-text: #f0f6fc;
        --input-placeholder: #8b949e;
    }
}

.logo-text {
    color: var(--topbar-logo-text) !important;
    font-family: var(--font-heading);
    font-weight: 800;
    font-size: 2.2rem;
    letter-spacing: -0.4px;
}

.logo-app-box {
    background: transparent !important;
    border: none !important;
    display: flex;
    align-items: center;
    justify-content: center;
    width: auto;
    height: auto;
    padding: 0;
}

.logo-app-icon {
    width: 88px;
    height: 88px;
    object-fit: contain;
    display: block;
}

.nav-link,
.lang-toggle-text,
.dropdown-arrow-icon,
.theme-toggle,
.mobile-menu-toggle {
    color: var(--topbar-btn-color) !important;
}

/* TEMEL SIFIRLAMA (RESET) */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    scroll-behavior: smooth;
    -webkit-tap-highlight-color: transparent;
}

/* Fare tıklamasında mavi kutu gizle, klavye Tab navigasyonu çalışsın */
*:focus:not(:focus-visible) {
    outline: none !important;
    box-shadow: none;
}

/* Klavye navigasyonu için yeşil temalı focus göster */
*:focus-visible {
    outline: 2px solid #00b047 !important;
    outline-offset: 2px;
}

html {
    -webkit-text-size-adjust: 100%;
    -moz-text-size-adjust: 100%;
    text-size-adjust: 100%;
}

body {
    -webkit-text-size-adjust: 100%;
    -moz-text-size-adjust: 100%;
    text-size-adjust: 100%;
    background: var(--body-bg);
    color: var(--text-primary);
    font-family: var(--font-body);
    line-height: 1.6;
    overflow-x: hidden;
    position: relative;
}

/* BAŞLIKLAR VE AÇIKLAMALAR TİPOGRAFİSİ */
h1,
h2,
h3,
h4,
h5,
h6,
.section-title {
    font-family: var(--font-heading) !important;
    font-weight: 400 !important;
    color: var(--text-primary);
}

.section-subtitle,
p,
.badge-text {
    font-family: var(--font-body) !important;
    font-weight: 400;
    color: var(--text-secondary);
}

/* YARDIMCI (UTILITY) SINIFLAR */
.container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 24px;
}

.hidden {
    display: none !important;
}

/* BUTONLAR */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-family: var(--font-heading);
    font-weight: 500;
    font-size: 0.95rem;
    padding: 12px 28px;
    border-radius: 30px;
    border: 1px solid transparent;
    cursor: pointer;
    text-decoration: none;
    transition: var(--transition-smooth);
}

/* NAVİGASYON ÇUBUĞU (NAVBAR) */
.navbar {
    position: fixed;
    top: 110px;
    left: 0;
    width: 100%;
    z-index: 100;
    background: transparent;
    border-bottom: none;
    transition: var(--transition-smooth);
    padding-top: 10px;
}

/* === ÜST BAR (TOP BAR) STYLES === */
.top-bar {
    position: relative;
    width: 100%;
    z-index: 99999;
    background: var(--topbar-bg) !important;
    border-bottom: 2px solid var(--topbar-border) !important;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.04);
    transition: background 0.3s ease, border-color 0.3s ease;
}

.nav-container {
    position: relative;
    max-width: 1500px;
    width: 100%;
    height: 156px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 24px;
    box-sizing: border-box;
}

.logo {
    display: flex;
    align-items: center;
    gap: 10px;
    text-decoration: none;
    flex: none;
    margin-left: 0;
    height: 100%;
    z-index: 101;
}

.nav-cta {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 16px;
    flex: none;
    z-index: 1010;
}

/* === THEME TOGGLE BUTTON === */
.theme-toggle-btn {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    background: transparent !important;
    border: none !important;
    color: var(--topbar-btn-color) !important;
    cursor: pointer;
    transition: color 0.2s ease, opacity 0.2s ease;
    padding: 0;
    outline: none;
    box-shadow: none !important;
    overflow: hidden;
}

.theme-toggle-btn:hover {
    background: transparent !important;
    border: none !important;
    color: #ffffff !important;
    transform: none !important;
    box-shadow: none !important;
}

.theme-toggle-btn svg {
    position: absolute;
    width: 24px;
    height: 24px;
    stroke: currentColor;
    transition: transform 0.45s cubic-bezier(0.34, 1.56, 0.64, 1), opacity 0.3s ease;
}

/* Varsayılan (Açık tema): Ay görünür, Güneş dönük ve gizli */
.theme-toggle-btn .moon-icon {
    opacity: 1;
    transform: rotate(0deg) scale(1);
}

.theme-toggle-btn .sun-icon {
    opacity: 0;
    transform: rotate(90deg) scale(0.3);
    pointer-events: none;
}

/* Koyu tema: Güneş görünür, Ay dönük ve gizli */
[data-theme="dark"] .theme-toggle-btn .moon-icon {
    opacity: 0 !important;
    transform: rotate(-90deg) scale(0.3) !important;
    pointer-events: none;
}

[data-theme="dark"] .theme-toggle-btn .sun-icon {
    opacity: 1 !important;
    transform: rotate(0deg) scale(1) !important;
    pointer-events: auto;
}

@media (prefers-color-scheme: dark) {
    :root:not([data-theme="light"]) .theme-toggle-btn .moon-icon {
        opacity: 0 !important;
        transform: rotate(-90deg) scale(0.3) !important;
        pointer-events: none;
    }
    :root:not([data-theme="light"]) .theme-toggle-btn .sun-icon {
        opacity: 1 !important;
        transform: rotate(0deg) scale(1) !important;
        pointer-events: auto;
    }
}

/* Mobilde çember ve arka plan gözükebilir */
@media (max-width: 768px) {
    .theme-toggle-btn {
        width: 38px;
        height: 38px;
        border-radius: 50%;
        background: var(--topbar-btn-bg) !important;
        border: 1px solid var(--topbar-btn-border) !important;
    }
}

/* HORIZONTALLY CENTERED NAV SEARCH STRADDLING BOTTOM BORDER LINE */
.nav-search-container {
    position: absolute;
    left: 50%;
    top: 100%;
    transform: translate(-50%, -50%);
    width: 90%;
    max-width: 520px;
    z-index: 1000;
}

.search-input-wrapper {
    position: relative;
    width: 100%;
    display: flex;
    align-items: center;
    z-index: 10;
}

.search-input-wrapper .search-icon {
    position: absolute;
    left: 18px;
    width: 20px;
    height: 20px;
    color: var(--topbar-search-icon) !important;
    pointer-events: none;
    z-index: 2;
    transition: color 0.3s ease;
}

.search-input-wrapper .search-input {
    width: 100%;
    height: 54px;
    padding: 12px 24px 12px 52px;
    font-family: var(--font-body);
    font-size: 1.02rem;
    font-weight: 500;
    color: var(--topbar-search-text) !important;
    background: var(--topbar-search-bg) !important;
    border: 2px solid var(--topbar-search-border) !important;
    border-radius: 28px;
    outline: none;
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.08);
    transition: var(--transition-fast);
}

.search-input-wrapper .search-input::placeholder {
    color: var(--topbar-search-placeholder) !important;
}

.search-input-wrapper .search-input:focus {
    border-color: #00b047;
    box-shadow: 0 8px 26px rgba(0, 176, 71, 0.22);
}

.breadcrumb-bar {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 60px 24px 12px;
    font-family: var(--font-heading);
    font-size: 0.97rem;
    font-weight: 600;
    color: var(--text-secondary);
    letter-spacing: normal;
    flex-wrap: wrap;
}

.breadcrumb-bar a {
    font-family: var(--font-heading);
    font-size: 0.97rem;
    font-weight: 600;
    color: var(--text-primary);
    text-decoration: none;
    letter-spacing: normal;
    transition: var(--transition-fast);
}

.breadcrumb-bar a:first-child {
    color: #00b047;
}

.breadcrumb-bar a:hover {
    color: #00b047;
    text-decoration: underline;
}

.breadcrumb-bar .sep {
    font-family: var(--font-heading);
    font-size: 0.97rem;
    font-weight: 600;
    color: #00b047;
}

.breadcrumb-line-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 4px 12px;
    border-radius: 16px;
    font-family: var(--font-heading);
    font-size: 0.97rem;
    font-weight: 600;
    letter-spacing: normal;
    line-height: 1.2;
    white-space: nowrap;
}

.search-results-dropdown {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    max-height: 380px;
    overflow-y: auto;
    background: #ffffff;
    border: 2px solid var(--topbar-border, #d0d0d0) !important;
    border-radius: 28px;
    box-shadow: 0 12px 32px rgba(10, 25, 48, 0.12);
    z-index: 5;
    display: none;
    padding: 60px 6px 8px 6px;
    box-sizing: border-box;
    -ms-overflow-style: none !important;
    scrollbar-width: none !important;
}

.search-results-dropdown::-webkit-scrollbar {
    display: none !important;
    width: 0 !important;
    height: 0 !important;
}

.search-results-dropdown.active {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.search-result-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 12px;
    border-radius: 8px;
    text-decoration: none;
    transition: var(--transition-fast);
}

.search-result-item:hover {
    background: rgba(0, 176, 71, 0.08);
}

.search-result-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 3px 8px;
    border-radius: 6px;
    font-family: var(--font-heading);
    font-weight: 800;
    font-size: 0.82rem;
    flex-shrink: 0;
}

.search-result-info {
    display: flex;
    flex-direction: column;
    gap: 2px;
    min-width: 0;
    flex: 1;
}

.search-result-title {
    font-family: var(--font-heading);
    font-size: 0.9rem;
    font-weight: 700;
    color: #0f3d82;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.search-result-meta {
    font-size: 0.78rem;
    color: var(--text-secondary);
    display: flex;
    align-items: center;
    gap: 6px;
}

.search-vehicle-pill {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-size: 0.75rem;
    color: var(--text-secondary);
    background: rgba(15, 61, 130, 0.06);
    padding: 2px 6px;
    border-radius: 6px;
    font-weight: 600;
}

/* VEHICLE TYPE BADGES & ICONS */
.line-badge-wrapper {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
    margin-bottom: 10px;
}

.vehicle-type-badge,
.vehicle-pill {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 4px 10px;
    border-radius: 8px;
    font-family: var(--font-heading);
    font-size: 0.8rem;
    font-weight: 600;
    background: rgba(15, 61, 130, 0.07);
    color: #0f3d82;
    border: 1px solid rgba(15, 61, 130, 0.12);
    transition: var(--transition-fast);
}

.vehicle-icon {
    display: inline-block;
    vertical-align: middle;
    flex-shrink: 0;
}

.vehicle-icon-bus { color: #00b047; }
.vehicle-icon-subway { color: #8e24aa; }
.vehicle-icon-tram { color: #0288d1; }
.vehicle-icon-train { color: #d84315; }
.vehicle-icon-ferry { color: #0097a7; }
.vehicle-icon-cablecar { color: #e65100; }
.vehicle-icon-funicular { color: #5d4037; }

/* === SPACE-EFFICIENT HIERARCHY & ROUTE GRIDS === */
.cities-section {
    max-width: 1400px;
    margin: 16px auto 40px;
    padding: 0 20px;
}

.section-header-title {
    font-size: 1.6rem;
    font-weight: 700;
    color: #0f3d82;
    margin-bottom: 4px;
    letter-spacing: -0.3px;
}

/* FILTER TOOLBAR */
.filter-toolbar {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-bottom: 20px;
    background: #ffffff;
    border: 1px solid rgba(10, 25, 48, 0.08);
    border-radius: 14px;
    padding: 12px 16px;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.02);
}

@media (min-width: 768px) {
    .filter-toolbar {
        flex-direction: row;
        align-items: center;
        justify-content: space-between;
    }
}

.filter-search-box {
    position: relative;
    flex: 1;
    max-width: 380px;
    display: flex;
    align-items: center;
}

.filter-search-box svg {
    position: absolute;
    left: 12px;
    color: var(--text-secondary);
    pointer-events: none;
    opacity: 0.6;
}

.grid-filter-input {
    width: 100%;
    height: 38px;
    padding: 6px 14px 6px 36px;
    font-family: var(--font-body);
    font-size: 0.88rem;
    color: var(--text-primary);
    background: #f8fafc;
    border: 1px solid rgba(10, 25, 48, 0.12);
    border-radius: 10px;
    outline: none;
    transition: var(--transition-fast);
}

.grid-filter-input:focus {
    background: #ffffff;
    border-color: #00b047;
    box-shadow: 0 0 0 3px rgba(0, 176, 71, 0.15);
}

.filter-chips-container {
    display: flex;
    align-items: center;
    gap: 6px;
    flex-wrap: wrap;
}

.filter-chip {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 6px 12px;
    border-radius: 16px;
    font-family: var(--font-heading);
    font-size: 0.82rem;
    font-weight: 600;
    background: #f1f5f9;
    color: var(--text-secondary);
    border: 1px solid transparent;
    cursor: pointer;
    transition: var(--transition-fast);
}

.filter-chip:hover {
    background: #e2e8f0;
    color: var(--text-primary);
}

.filter-chip.active {
    background: #00b047;
    color: #ffffff;
    border-color: #00b047;
    box-shadow: 0 3px 10px rgba(0, 176, 71, 0.22);
}

/* HIERARCHY GRID (HIGH DENSITY) */
.hierarchy-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 12px;
}

/* CARDS: CITIES & AGENCIES */
.hierarchy-card {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: #ffffff;
    border: 1px solid rgba(10, 25, 48, 0.08);
    border-radius: 12px;
    padding: 12px 16px;
    text-decoration: none;
    transition: var(--transition-fast);
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.02);
}

.hierarchy-card:hover {
    transform: translateY(-2px);
    border-color: #00b047;
    box-shadow: 0 6px 20px rgba(0, 176, 71, 0.12);
}

.hierarchy-card-content {
    display: flex;
    flex-direction: column;
    gap: 2px;
    min-width: 0;
}

.hierarchy-card-title {
    font-family: var(--font-heading);
    font-size: 1.02rem;
    font-weight: 700;
    color: #0f3d82;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.hierarchy-card-subtitle {
    font-size: 0.8rem;
    color: var(--text-secondary);
}

.hierarchy-card-badge {
    background: #e6f4ea;
    color: #00b047;
    font-family: var(--font-heading);
    font-size: 0.78rem;
    font-weight: 700;
    padding: 3px 9px;
    border-radius: 10px;
    white-space: nowrap;
    flex-shrink: 0;
}

/* ROUTE CARDS (COMPACT & MODERN) */
.route-card {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    background: #ffffff;
    border: 1px solid rgba(10, 25, 48, 0.08);
    border-radius: 12px;
    padding: 12px 14px;
    text-decoration: none;
    transition: var(--transition-fast);
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.02);
    min-height: 96px;
}

.route-card:hover {
    transform: translateY(-2px);
    border-color: #00b047;
    box-shadow: 0 6px 20px rgba(0, 176, 71, 0.14);
}

.route-card-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    margin-bottom: 8px;
}

.route-card-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 3px 8px;
    border-radius: 6px;
    font-family: var(--font-heading);
    font-weight: 800;
    font-size: 0.85rem;
    letter-spacing: 0.4px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.08);
}

.route-card-main {
    display: flex;
    flex-direction: column;
    gap: 3px;
}

.route-card-title {
    font-family: var(--font-heading);
    font-size: 0.95rem;
    font-weight: 700;
    color: #0f3d82;
    line-height: 1.25;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.route-card-desc {
    display: flex;
    align-items: center;
    gap: 4px;
    font-size: 0.8rem;
    color: var(--text-secondary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.route-card-desc svg {
    flex-shrink: 0;
    opacity: 0.6;
}

/* Logo stili: Kutusuz, doğrudan yeşil arka plan üzerinde 2 kat büyük logo */
.logo {
    display: flex !important;
    align-items: center !important;
    gap: 16px !important;
    text-decoration: none !important;
}

.logo-app-box {
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    width: auto !important;
    height: auto !important;
    background: transparent !important;
    border: none !important;
    border-radius: 0 !important;
    padding: 0 !important;
    box-shadow: none !important;
}

.logo-app-icon {
    width: 84px !important;
    height: 84px !important;
    min-width: 84px !important;
    min-height: 84px !important;
    display: block !important;
    object-fit: contain !important;
}

.logo-brand-col {
    display: flex !important;
    flex-direction: column !important;
    justify-content: space-between !important;
    height: 84px !important;
    box-sizing: border-box !important;
    padding: 0 !important;
    width: fit-content !important;
}

.logo-text-wrapper {
    display: flex !important;
    align-items: center !important;
    margin-left: 0 !important;
}

.logo-text {
    font-family: 'Quicksand', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif !important;
    font-weight: 700 !important;
    font-size: 2.6rem !important;
    letter-spacing: -0.2px !important;
    color: var(--topbar-logo-text) !important;
    line-height: 1 !important;
    margin: 0 !important;
    padding: 0 !important;
    display: block !important;
    width: 100% !important;
    transition: color 0.3s ease;
}

.logo-store-badges {
    display: flex !important;
    align-items: flex-end !important;
    justify-content: flex-start !important;
    width: 100% !important;
    line-height: 1 !important;
    margin-bottom: 0 !important;
    padding: 0 !important;
}

.google-play-badge-img {
    height: 34px !important;
    width: auto !important;
    max-width: 100% !important;
    object-fit: contain !important;
    display: block !important;
    border-radius: 5px !important;
    transition: transform 0.2s ease, opacity 0.2s ease;
}

.google-play-badge-img:hover {
    transform: scale(1.04);
}

.logo-letters-row {
    display: flex;
    align-items: flex-end;
    gap: -2px;
    direction: ltr;
}

.logo-letter {
    height: 10px;
    width: auto;
    display: inline-block;
}

.logo-letter.logo-s-large {
    height: 22px;
    margin-right: 0px;
}

.logo-letters-row .logo-letter:nth-child(7),
.logo-letters-row .logo-letter:nth-child(8) {
    margin-left: -3.6px;
}

.logo-letter.logo-mart-letter {
    height: 14px;
    width: auto;
    opacity: 0.9;
    margin-bottom: 2px;
}

.logo-subtext {
    display: flex;
    flex-direction: column;
    line-height: 1.3;
    font-family: var(--font-heading);
    font-size: 1.2rem;
    font-weight: 600;
    color: var(--accent-success);
    letter-spacing: 3px;
    text-align: left;
    white-space: nowrap;
}

.nav-menu {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 40px;
    flex: 1;
}

.nav-link {
    font-family: 'Nunito', var(--font-heading) !important;
    font-size: 1.05rem;
    font-weight: 700;
    color: var(--nav-link-color);
    text-decoration: none;
    transition: var(--transition-smooth) !important;
    padding: 8px 20px;
    border-radius: 30px;
}

.nav-link:hover {
    color: var(--accent-color);
    background: rgba(255, 255, 255, 0.08);
}

.nav-link:hover {
    background: rgba(255, 255, 255, 0.45) !important;
    color: #00b047 !important;
}

.nav-cta {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 24px;
    flex: 1;
}

.mobile-menu-toggle {
    display: none;
    background: none;
    border: none;
    color: var(--text-primary);
    cursor: pointer;
}

/* Mobil Çekmece (Drawer) */
.mobile-drawer {
    position: fixed;
    top: 52px;
    left: 0;
    width: 100%;
    height: 0;
    background: var(--body-bg);
    z-index: 99990;
    overflow-y: auto;
    transition: height 0.3s cubic-bezier(0.16, 1, 0.3, 1);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
}

.mobile-drawer.open {
    height: calc(100vh - 52px);
    border-bottom: 1px solid rgba(0, 0, 0, 0.06);
}

.mobile-nav {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 80%;
    gap: 32px;
    padding: 40px 24px;
}

.mobile-link {
    font-family: var(--font-heading);
    font-size: 1.5rem;
    color: var(--text-secondary);
    text-decoration: none;
}

.mobile-link:hover {
    color: var(--text-primary);
}

.mobile-btn {
    width: 100%;
    max-width: 280px;
    padding: 12px 24px !important;
    font-size: 0.95rem !important;
    white-space: normal !important;
    text-align: center !important;
    line-height: 1.3 !important;
    border-radius: 16px !important;
}

/* DİL SEÇİCİ KAPLAMA ALANI */
.lang-selector-container {
    display: none !important;
    position: relative;
    z-index: 1010;
}

.lang-toggle-text {
    background: transparent;
    border: none;
    outline: none;
    cursor: pointer;
    padding: 8px 20px !important;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    border-radius: 30px;
    color: #ffffff !important;
    font-family: var(--font-heading) !important;
    font-weight: 700;
    transition: background 0.2s ease, color 0.2s ease;
    -webkit-tap-highlight-color: transparent;
}

.lang-toggle-text svg,
.lang-toggle-text .dropdown-arrow-icon {
    color: #ffffff !important;
    stroke: #ffffff !important;
    transition: color 0.2s ease, stroke 0.2s ease;
}

@media (min-width: 769px) and (hover: hover) and (pointer: fine) {
    .lang-toggle-text:hover,
    .lang-selector-container:hover .lang-toggle-text {
        background: var(--lang-btn-hover-bg, #ffffff) !important;
        color: var(--lang-btn-hover-text, #00b047) !important;
    }

    .lang-toggle-text:hover svg,
    .lang-toggle-text:hover .dropdown-arrow-icon,
    .lang-selector-container:hover .dropdown-arrow-icon {
        color: var(--lang-btn-hover-text, #00b047) !important;
        stroke: var(--lang-btn-hover-text, #00b047) !important;
    }
}

.lang-toggle-text .dropdown-arrow {
    font-size: 0.8em;
    margin-top: 2px;
}

.lang-toggle {
    display: none;
}

/* AÇILIR MENÜ (DROPDOWN) */
.lang-dropdown {
    position: absolute;
    top: calc(100% + 4px);
    right: 0;
    width: 100%;
    min-width: unset;
    background: #ffffff;
    border: 2px solid var(--topbar-border, #d0d0d0) !important;
    outline: none;
    border-radius: 20px;
    padding: 4px;
    display: flex;
    flex-direction: column;
    gap: 2px;
    opacity: 0;
    visibility: hidden;
    transform: translateY(6px) scale(0.97);
    transition: all 0.22s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 1020;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15);
}

.lang-dropdown.open {
    opacity: 1;
    visibility: visible;
    transform: translateY(0) scale(1);
}

.lang-dropdown button {
    background: transparent;
    border: none;
    outline: none;
    text-align: center;
    padding: 8px 16px;
    font-size: 0.95rem;
    font-family: var(--font-heading) !important;
    font-weight: 700;
    color: var(--dropdown-text, #0f172a);
    cursor: pointer;
    border-radius: 16px;
    transition: background 0.2s ease, color 0.2s ease;
    letter-spacing: 0;
    display: block;
    width: 100%;
    -webkit-tap-highlight-color: transparent;
}

.lang-dropdown button:focus,
.lang-dropdown button:focus-visible {
    outline: none;
    box-shadow: none;
}

.lang-toggle-text:focus,
.lang-toggle-text:focus-visible {
    outline: none;
    box-shadow: none;
}

.lang-dropdown button::before {
    display: none;
}

.lang-dropdown button:active {
    background: var(--topbar-bg, #00b047) !important;
    color: #ffffff !important;
}

@media (hover: hover) and (pointer: fine) {
    .lang-dropdown button:hover {
        background: var(--topbar-bg, #00b047) !important;
        color: #ffffff !important;
    }
}

.lang-dropdown button.active {
    background: var(--topbar-bg, #00b047) !important;
    color: #ffffff !important;
    font-weight: 700;
    outline: none;
}

.lang-dropdown button.active::before {
    display: none;
}

/* MOBİL DİL SEÇİCİ SATIRI */
.mobile-lang-row {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    padding: 10px 0 15px 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    margin-bottom: 15px;
    justify-content: center;
}

.mobile-lang-row {
    border-bottom-color: rgba(0, 0, 0, 0.05);
}

.mobile-lang-btn {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: var(--text-primary);
    padding: 6px 10px;
    font-size: 0.75rem;
    font-weight: 600;
    border-radius: 20px;
    cursor: pointer;
    transition: var(--transition-fast);
}

.mobile-lang-btn:hover,
.mobile-lang-btn.active {
    background: var(--accent-color);
    border-color: var(--accent-color);
    color: #ffffff;
}

.mobile-lang-btn {
    background: rgba(0, 0, 0, 0.03);
    border-color: rgba(0, 0, 0, 0.08);
}

/* ALT BİLGİ (FOOTER) */
.footer {
    display: none !important;
}

.footer-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.footer p {
    color: var(--text-secondary);
    font-size: 0.9rem;
}

.footer-socials {
    display: flex;
    gap: 20px;
}

.footer-socials a {
    color: var(--text-secondary);
    transition: var(--transition-fast);
}

.footer-socials a:hover {
    color: var(--text-primary);
}

/* Özel Alt Bilgi Sosyal İkonları (Harizm SVG'leri) */
.footer-socials-svg-container {
    display: flex;
    justify-content: center;
    width: 100%;
    margin-top: 15px;
}

.footer-social-svg {
    width: 100%;
    max-width: 320px;
    height: auto;
    display: block;
}

.footer-social-svg a {
    color: #146c36;
    transition: color 0.2s ease, opacity 0.2s ease;
}

.footer-social-svg a:hover {
    color: #16a34a;
    opacity: 0.85;
}

/* Özel Alt Bilgi Izgara Bölünmüş Düzeni */
.footer-content-grid {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    flex-wrap: wrap;
    gap: 48px;
    padding: 0 24px 20px 24px;
    box-sizing: border-box;
}

.footer-section {
    display: flex;
    flex-direction: column;
    gap: 12px;
    min-width: 0;
    flex: 1;
    margin: 0;
    padding: 0;
}

.footer-section-left {
    align-items: flex-start;
    text-align: left;
}

.footer-section-right {
    align-items: flex-start;
    text-align: left;
}

.footer-section h4 {
    font-family: var(--font-heading) !important;
    font-weight: 900 !important;
    font-size: 1.25rem !important;
    letter-spacing: 1.5px !important;
    color: #146c36 !important;
    margin: 0 0 4px 0;
    text-transform: uppercase !important;
    -webkit-text-stroke: 0.6px #146c36 !important;
    line-height: 1.2;
}

.footer-links-vertical {
    display: flex;
    flex-direction: column;
    gap: 8px;
    font-size: 14px;
}

.footer-links-vertical a {
    color: var(--text-secondary);
    text-decoration: none;
    transition: color 0.2s ease, background-color 0.2s ease;
    border-radius: 8px;
    padding: 2px 8px;
    margin-left: -8px;
    display: inline-block;
    background-color: rgba(18, 76, 42, 0.06);
    outline: 1.5px solid rgba(18, 76, 42, 0.08);
    font-weight: 600;
}

.footer-links-vertical a:hover {
    color: #16a34a;
    background-color: rgba(18, 76, 42, 0.06);
    outline: 1.5px solid rgba(18, 76, 42, 0.08);
}

.footer-socials-grid {
    display: grid;
    grid-template-columns: repeat(3, 44px);
    gap: 12px;
    justify-content: flex-start;
    margin-top: 5px;
}

.social-icon-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    padding: 9px;
    border-radius: 50%;
    color: #146c36;
    background-color: rgba(20, 108, 54, 0.08);
    transition: color 0.2s ease;
}

.social-icon-link:hover,
.social-icon-link:active {
    color: #16a34a;
}

.social-icon-link img {
    width: 100%;
    height: 100%;
    display: block;
    filter: invert(32%) sepia(61%) saturate(567%) hue-rotate(95deg) brightness(95%) contrast(93%);
    transition: filter 0.2s ease;
}

.social-icon-link:hover img,
.social-icon-link:active img {
    filter: invert(47%) sepia(85%) saturate(471%) hue-rotate(93deg) brightness(95%) contrast(93%);
}

.footer-bottom-row {
    margin-top: 40px !important;
    border-top: 1px solid rgba(0, 0, 0, 0.05) !important;
    padding-top: 20px !important;
    padding-bottom: 10px !important;
    text-align: center !important;
    width: 100% !important;
}

.footer-bottom-row p {
    color: var(--text-secondary);
    font-size: 0.85rem;
    margin: 0;
}

.footer-bottom-row a {
    color: var(--text-secondary);
    text-decoration: none;
    transition: var(--transition-fast);
}

.footer-bottom-row a:hover {
    color: var(--text-primary);
}

/* Duyarlı Alt Bilgi (Footer) */
@media (max-width: 768px) {
    .footer-content-grid {
        flex-direction: column;
        align-items: center;
        text-align: center;
        gap: 40px;
    }

    .footer-section {
        align-items: center;
        text-align: center;
    }

    .footer-section-right {
        align-items: center;
        text-align: center;
    }

    .footer-socials-grid {
        justify-content: center;
    }

    .footer-links-vertical {
        align-items: center;
    }
}

/* Geliştirici Bilgi Kutusu Stili */
.developer-info-box {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 12px;
    margin-top: 5px;
    max-width: 100%;
    box-sizing: border-box;
}

.developer-profile-header {
    display: flex;
    align-items: center;
    gap: 16px;
}

.developer-avatar {
    width: 88px;
    height: 88px;
    border-radius: 50%;
    background-color: #d1fae5;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #124c2a;
    flex-shrink: 0;
    box-shadow: 0 0 0 2px rgba(18, 76, 42, 0.15);
}

.developer-avatar-img {
    width: 40px;
    height: 40px;
    display: block;
}

.developer-name {
    color: #146c36;
    font-weight: 700;
    font-size: 34px;
    line-height: 1.2;
    display: inline-block;
    max-width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
    text-align: center;
    white-space: pre-line;
}

.developer-email {
    color: var(--text-secondary);
    font-size: 14px;
    text-decoration: none;
    font-weight: 600;
    background-color: rgba(18, 76, 42, 0.07);
    outline: 1.5px solid rgba(18, 76, 42, 0.15);
    border-radius: 8px;
    padding: 2px 8px;
    display: inline-block;
    transition: background-color 0.2s, color 0.2s;
    width: fit-content;
    max-width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    box-sizing: border-box;
}

.developer-email:hover {
    background-color: rgba(18, 76, 42, 0.14);
}



/* DUYARLILIK (RESPONSIVENESS) */
@media (max-width: 991px) {
    .nav-container {
        margin: 0 auto !important;
        height: 122px !important;
        padding: 0 20px !important;
        display: flex !important;
        align-items: center !important;
        justify-content: space-between !important;
        position: relative !important;
        z-index: 99999 !important;
    }

    .logo {
        margin-left: 8px !important;
        height: auto !important;
        display: flex !important;
        align-items: center !important;
    }

    .logo-text-wrapper {
        display: none !important;
    }

    .logo-app-box {
        width: 50px !important;
        height: 50px !important;
        padding: 0 !important;
        border-radius: 8px !important;
    }

    .logo-app-icon {
        width: 50px !important;
        height: 50px !important;
        min-width: 50px !important;
        min-height: 50px !important;
        object-fit: contain !important;
    }

    /* Mobilde arama çubuğunun yatay genişliğini azalt */
    .nav-search-container {
        width: 78% !important;
        max-width: 380px !important;
    }

    /* Mobilde nav-cta dikey ortalı ve görünür kalır */
    .nav-cta {
        display: flex !important;
        align-items: center !important;
    }

    .nav-menu {
        display: none !important;
    }

    .mobile-menu-toggle {
        display: none !important;
    }

    /* Mobilde dil seçici: Kutucuksuz, her zaman şeffaf arka plan ve doğrudan beyaz yazı */
    .lang-selector-container,
    .lang-selector-container:hover {
        background: transparent !important;
    }

    .lang-toggle-text,
    .lang-toggle-text:hover,
    .lang-toggle-text:focus,
    .lang-toggle-text:focus-visible,
    .lang-selector-container:hover .lang-toggle-text {
        background: transparent !important;
        color: #ffffff !important;
        padding: 6px 12px !important;
        font-size: 1.15rem !important;
        font-weight: 800 !important;
        letter-spacing: 0.8px;
        min-width: 44px;
        border-radius: 20px;
        border: none !important;
        outline: none !important;
        box-shadow: none !important;
    }

    .lang-toggle-text:active {
        background: transparent !important;
        color: #ffffff !important;
        opacity: 0.65;
        transition: opacity 0.1s ease;
    }

    .lang-toggle-text svg,
    .lang-toggle-text .dropdown-arrow-icon {
        display: none !important;
    }

    .lang-dropdown {
        display: none !important;
    }
}

/* === CONTENT STYLES === */
/* Yazı Boyutu Kilitleme (Font-scaling prevention) */
html {
    font-size: 16px !important;
    -webkit-text-size-adjust: 100% !important;
    -moz-text-size-adjust: 100% !important;
    text-size-adjust: 100% !important;
}

body {
    -webkit-text-size-adjust: 100% !important;
    -moz-text-size-adjust: 100% !important;
    text-size-adjust: 100% !important;
    background: #f5f6f8 !important;
}

@media (min-width: 992px) {
    body {
        background: #eef0f3 !important;
    }
}

/*
 * Hat-Shablon — Content-specific styles only.
 * Şablonun (shablon/index.css) kapsamadığı, bu sayfaya özgü stiller.
 * NAV, FOOTER, BODY, RESET, :root gibi genel stiller BURAYA YAZILMAZ.
 */

/* ── Breadcrumb & Page Title ─────────────────────────────────── */
.breadcrumb-bar {
    max-width: 1600px;
    width: 95%;
    margin: 0 auto;
    padding: 60px 24px 16px 24px;
    box-sizing: border-box;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    flex-wrap: nowrap !important;
    white-space: nowrap !important;
    gap: 6px 12px;
    font-family: var(--font-heading);
    font-size: 1.85rem;
    font-weight: 800;
    line-height: 1.3;
}

.breadcrumb-bar a {
    color: var(--text-secondary);
    text-decoration: none;
    transition: color 0.15s ease;
}

.breadcrumb-bar a:hover {
    color: var(--accent-color);
}

.breadcrumb-bar .sep {
    color: var(--text-secondary);
    opacity: 0.55;
    font-size: 2.8rem;
    display: inline-flex;
    align-items: center;
    font-weight: 700;
    flex-shrink: 0;
    transform: translateY(-0.06em);
}

.breadcrumb-bar span:not(.sep):not(.breadcrumb-line-badge) {
    color: var(--breadcrumb-active, #00b047);
}

.breadcrumb-bar .active {
    color: var(--breadcrumb-active, #00b047) !important;
}

[data-theme="dark"] .breadcrumb-bar a,
[data-theme="dark"] .breadcrumb-bar a:first-child {
    color: #ffffff !important;
}

[data-theme="dark"] .breadcrumb-bar a:hover {
    color: #00b047 !important;
    text-decoration: underline;
}

[data-theme="dark"] .breadcrumb-bar .sep {
    color: #00b047 !important;
    opacity: 1;
}

[data-theme="dark"] .breadcrumb-bar span:not(.sep):not(.breadcrumb-line-badge) {
    color: #00b047 !important;
}

[data-theme="dark"] .breadcrumb-bar .active {
    color: #00b047 !important;
}

.breadcrumb-line-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 34px;
    width: auto;
    height: 34px;
    padding: 0 12px;
    border-radius: 9999px;
    background-color: rgb(238, 49, 36);
    color: #ffffff !important;
    font-family: var(--font-heading);
    font-weight: 800;
    font-size: 14px;
    line-height: 1;
    white-space: nowrap;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.12);
    vertical-align: middle;
    flex-shrink: 0;
    max-width: 100%;
}

/* ── Line Header Subtitle (Ortalanmış Nerden Nereye & Büyük Yön Butonları) ────── */
.line-header-subtitle {
    max-width: 1600px;
    width: 95%;
    margin: 16px auto 12px auto;
    padding: 0 24px;
    box-sizing: border-box;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    gap: 14px;
}



.route-direction-display {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px 12px;
    font-family: var(--font-heading);
    font-size: 0.97rem;
    font-weight: 600;
    color: var(--text-primary);
    line-height: 1.25;
    flex-wrap: wrap;
}

.line-header-subtitle .route-arrow-icon {
    color: #0066ff;
    flex-shrink: 0;
    transition: color 0.3s ease, transform 0.3s ease;
    width: 20px !important;
    height: 20px !important;
    stroke-width: 2.5px !important;
}

/* ── Gidiş / Dönüş Yön Seçici ─────────────────────────────── */
.direction-toggle-container {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: rgba(0, 0, 0, 0.04);
    border-radius: 30px;
    padding: 4px;
}

.dir-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 8px 22px;
    border: none;
    border-radius: 24px;
    background: transparent;
    color: #1c3150;
    font-family: var(--font-heading);
    font-size: 0.97rem;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.22s ease, color 0.22s ease, box-shadow 0.22s ease;
    white-space: nowrap;
    position: relative;
}

.dir-btn:hover {
    background: rgba(0, 102, 255, 0.08);
    color: #0066ff;
}

/* Seçili (aktif) durum */
.dir-btn.active {
    background: #ffffff;
    color: #0066ff;
    font-weight: 700;
    box-shadow: 0 2px 10px rgba(0, 102, 255, 0.15), 0 1px 3px rgba(0, 0, 0, 0.08);
}

/* Dönüş yönü seçiliyken turuncu */
#btnDirReturn.active {
    color: #ff6b00;
    box-shadow: 0 2px 10px rgba(255, 107, 0, 0.18), 0 1px 3px rgba(0, 0, 0, 0.08);
}

/* Tab / klavye navigasyonu focus göstergesi */
.dir-btn:focus-visible {
    outline: 2px solid #0066ff !important;
    outline-offset: 2px;
}

#btnDirReturn:focus-visible {
    outline-color: #ff6b00 !important;
}

@media (max-width: 768px) {
    .breadcrumb-bar {
        font-size: clamp(1.1rem, 5vw, 1.45rem);
        margin: 0 auto;
        width: 95%;
        padding: 48px 16px 12px 16px;
        flex-wrap: nowrap !important;
        white-space: nowrap !important;
        gap: 4px 8px;
    }

    .breadcrumb-bar .sep {
        font-size: clamp(1.8rem, 6.5vw, 2.4rem);
    }

    .breadcrumb-line-badge {
        min-width: clamp(26px, 8vw, 30px);
        width: auto;
        height: clamp(26px, 8vw, 30px);
        padding: 0 10px;
        border-radius: 9999px;
        font-size: clamp(11px, 3.5vw, 13px);
        white-space: nowrap;
    }

    .line-header-subtitle {
        font-size: 1.05rem;
        margin: 6px 0 0 0;
        width: 100%;
        padding: 0 20px;
        gap: 6px 8px;
    }



    .line-header-subtitle .route-arrow-icon {
        width: 26px !important;
        height: 26px !important;
        stroke-width: 3px !important;
    }
}

/* ── Layout ─────────────────────────────────────────────────── */
.metro-container {
    max-width: 1600px;
    width: 95%;
    margin: 18px auto 48px auto;
    padding: 0 24px;
    display: grid;
    grid-template-columns: 1fr;
    gap: 24px;
    box-sizing: border-box;
}

@media (min-width: 992px) {
    .metro-container {
        grid-template-columns: 1fr 450px;
        align-items: stretch;
    }

    .left-column {
        display: flex;
        flex-direction: column;
        justify-content: space-between;
        gap: 24px;
        height: 100%;
    }

    .left-column .panel:not(.map-panel) {
        flex: 1;
        display: flex;
        flex-direction: column;
        justify-content: space-between;
    }
}

/* ── Panels ─────────────────────────────────────────────────── */
.panel {
    background: #ffffff;
    border: 1px solid rgba(18, 76, 42, 0.08);
    border-radius: 28px;
    padding: 32px;
    box-shadow: 0 10px 30px rgba(18, 76, 42, 0.02);
    box-sizing: border-box;
    transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

.panel:not(.map-panel):hover {
    transform: translateY(-2px);
    box-shadow: 0 16px 40px rgba(18, 76, 42, 0.06);
}

/* ── Typography (page-scoped) ───────────────────────────────── */
.panel h1 {
    font-family: var(--font-heading);
    font-size: 2.1rem;
    margin: 12px 0 8px 0;
    color: var(--text-primary);
    font-weight: 700;
    line-height: 1.25;
}

.panel h2 {
    font-family: var(--font-heading);
    font-size: 1.35rem;
    margin: 28px 0 14px 0;
    color: var(--text-primary);
    border-bottom: 1px solid var(--card-border);
    padding-bottom: 10px;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 8px;
}

/* ── Line Badge ─────────────────────────────────────────────── */
.line-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background-color: var(--accent-color);
    color: #ffffff;
    font-family: var(--font-body);
    font-weight: 700;
    padding: 4px 14px;
    border-radius: 20px;
    font-size: 12px;
    letter-spacing: 0.5px;
    width: fit-content;
}

.description {
    font-size: 14px;
    color: var(--text-secondary);
    margin: 0 0 24px 0;
    border-bottom: 1px solid rgba(18, 76, 42, 0.08);
    padding-bottom: 16px;
    line-height: 1.6;
}

/* ── Stops Timeline ─────────────────────────────────────────── */
.stops-container {
    position: relative;
    padding-left: 48px;
    padding-right: 8px;
    margin-bottom: 24px;
}

/* Tek dikey çizgi */
.stops-container::before {
    content: '';
    position: absolute;
    left: 20px;
    top: 21px;
    bottom: 21px;
    width: 4px;
    z-index: 1;
    transition: background-color 0.3s ease;
}

.stops-container.stops-outward::before {
    background-color: #0066ff;
    /* canlı mavi */
}

.stops-container.stops-return::before {
    background-color: #ff6b00;
    /* turuncu */
}

/* ::after kullanılmıyor, devre dışı bırakıldı */
.stops-container::after {
    display: none !important;
}

.stop-row {
    position: relative;
    padding: 10px 0;
    font-size: 14px;
    font-weight: 600;
    color: var(--text-secondary);
    display: flex;
    align-items: center;
    justify-content: space-between;
    transition: color 0.15s ease, background 0.15s ease;
    flex-wrap: wrap;
    /* allow wrapping on narrow viewports */
    gap: 8px;
    border-radius: 8px;
    padding-right: 6px;
    cursor: default;
}

.stop-row>span {
    flex: 1;
    min-width: 140px;
    word-break: break-word;
    overflow-wrap: break-word;
}

.stop-row:hover {
    color: var(--accent-color);
}

/* Tab / klavye gezinme focus göstergesi */
.stop-row:focus-visible {
    outline: none !important;
    background: rgba(0, 102, 255, 0.10) !important;
    color: #0055cc !important;
    border-radius: 8px;
    box-shadow: -6px 0 0 rgba(0, 102, 255, 0.10);
}

/* Dönüş modunda turuncu vurgu */
.stops-container.stops-return .stop-row:focus-visible {
    background: rgba(255, 107, 0, 0.10) !important;
    color: #cc5500 !important;
    box-shadow: -3px 0 0 rgba(255, 107, 0, 0.10);
}

/* Tek durak noktası */
.stop-row::before {
    content: '';
    position: absolute;
    left: -32px;
    /* 48px padding-left'e göre ortalandı */
    top: 21px;
    transform: translateY(-50%);
    width: 12px;
    height: 12px;
    background-color: var(--card-bg, #ffffff);
    border: 3px solid #0066ff;
    /* varsayılan gidiş mavi */
    border-radius: 50%;
    z-index: 2;
    box-sizing: border-box;
    transition: border-color 0.3s ease, background-color 0.3s ease, box-shadow 0.3s ease;
}

.stops-container.stops-outward .stop-row::before {
    border-color: #0066ff;
}

.stops-container.stops-return .stop-row::before {
    border-color: #ff6b00;
}

/* ::after kullanılmıyor, devre dışı bırakıldı */
.stop-row::after {
    display: none !important;
}

/* Terminal durakları */
.stops-container.stops-outward .stop-row.terminal::before {
    background-color: var(--card-bg, #ffffff);
    border-color: #0066ff;
}

.stops-container.stops-return .stop-row.terminal::before {
    background-color: var(--card-bg, #ffffff);
    border-color: #ff6b00;
}

/* ── Info Table ─────────────────────────────────────────────── */
.table-container {
    width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    margin-top: 8px;
}

.info-table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    margin-top: 8px;
    font-size: 13.5px;
}

.info-table th {
    background-color: rgba(18, 76, 42, 0.04);
    color: #124c2a;
    text-align: left;
    padding: 12px 14px;
    font-weight: 700;
    font-family: var(--font-body);
    border-bottom: 2px solid rgba(18, 76, 42, 0.08);
}

.info-table th:first-child {
    border-radius: 12px 0 0 0;
}

.info-table th:last-child {
    border-radius: 0 12px 0 0;
}

.info-table td {
    padding: 12px 14px;
    border-bottom: 1px solid rgba(18, 76, 42, 0.08);
    color: var(--text-secondary);
    font-weight: 500;
}

.info-table tr:hover td {
    background-color: rgba(18, 76, 42, 0.02);
}

.freq-pill {
    display: inline-block;
    background: rgba(0, 176, 71, 0.1);
    color: var(--accent-color);
    font-weight: 700;
    padding: 2px 10px;
    border-radius: 12px;
    font-size: 12px;
    font-family: var(--font-body);
}

/* ── Fare Cards ─────────────────────────────────────────────── */
.fare-grid {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-top: 14px;
}

.fare-card {
    background-color: rgba(18, 76, 42, 0.04);
    border: 1px solid rgba(18, 76, 42, 0.08);
    border-radius: 12px;
    padding: 10px 16px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    transition: transform 0.2s ease, border-color 0.2s ease;
}

.fare-card:hover {
    transform: translateY(-1px);
    border-color: rgba(0, 176, 71, 0.3);
}

.fare-card-type {
    font-size: 12px;
    font-weight: 600;
    color: var(--text-secondary);
}

.fare-card-price {
    font-size: 1.05rem;
    font-weight: 700;
    color: var(--accent-color);
    font-family: var(--font-body);
}

.fare-subtext {
    font-size: 12px;
    color: var(--text-secondary);
    margin-top: 12px;
    line-height: 1.5;
}

/* ── Map Panel ──────────────────────────────────────────────── */
.map-panel {
    display: flex;
    flex-direction: column;
    padding: 0;
    overflow: hidden;
    width: 100%;
    max-width: 540px;
    aspect-ratio: 1 / 1;
    height: auto;
    max-height: none;
    margin: 0 auto;
    flex-shrink: 0;
    border-radius: 28px;
    border: 1px solid rgba(18, 76, 42, 0.08);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.03);
    position: relative;
}

.map-floating-badge {
    position: absolute;
    top: 14px;
    right: 14px;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    border: 1px solid rgba(18, 76, 42, 0.08);
    border-radius: 20px;
    padding: 6px 14px;
    font-size: 12px;
    font-weight: 700;
    color: #124c2a;
    z-index: 999;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.06);
    display: flex;
    align-items: center;
    gap: 6px;
}

#map {
    width: 100%;
    height: 100%;
    z-index: 1;
}

/* ── Toggle Stops Button ───────────────────────────────────────── */
.btn-toggle-stops {
    display: none;
}

/* ── Mobile Layout & Responsiveness ─────────────────────────── */
.mobile-line-badge {
    display: flex;
    align-items: center;
    justify-content: center;
    position: absolute;
    top: 8px;
    right: 8px;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background-color: rgb(238, 49, 36);
    color: #ffffff;
    font-family: var(--font-heading);
    font-weight: 800;
    font-size: 18px;
    line-height: 1;
    z-index: 1000;
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.16);
    transition: all 0.25s ease;
}

@media (max-width: 991px) {
    .metro-container {
        display: flex;
        flex-direction: column;
        gap: 0;
        padding: 0;
        margin: 16px 0 32px 0;
        width: 100%;
    }

    .left-column {
        display: contents;
        /* Allows child panels to participate in metro-container flex */
    }

    /* Map Panel - Connected Style (Top) */
    .map-panel {
        order: 1;
        width: 100%;
        max-width: 450px;
        aspect-ratio: 1 / 1;
        height: auto;
        margin: 16px auto;
        border: 1px solid rgba(18, 76, 42, 0.08);
        border-radius: 20px;
    }

    /* Mobile Badge on Map Panel */
    .mobile-line-badge {
        top: 6px;
        right: 6px;
        width: 42px;
        height: 42px;
        font-size: 15px;
        box-shadow: 0 2px 8px rgba(0, 0, 0, 0.14);
    }

    /* Stops Panel - Connected Style (Middle) */
    #stopsPanel {
        order: 2;
        margin-top: 0;
        border-top: none;
        border-left: none;
        border-right: none;
        border-bottom: 1px solid rgba(18, 76, 42, 0.08);
        border-radius: 0;
        padding: 24px 20px;
        box-shadow: none;

        /* Collapsed behavior */
        max-height: 240px;
        overflow: hidden;
        position: relative;
        transition: max-height 0.4s cubic-bezier(0.16, 1, 0.3, 1);
    }

    #stopsPanel.expanded {
        max-height: 2500px;
        /* high limit to allow full details expansion */
    }

    #stopsPanel::after {
        content: '';
        position: absolute;
        bottom: 0;
        left: 0;
        right: 0;
        height: 140px;
        background: linear-gradient(to top, rgba(255, 255, 255, 1) 0%, rgba(255, 255, 255, 1) 16px, rgba(255, 255, 255, 0) 100%);
        pointer-events: none;
        transition: opacity 0.4s cubic-bezier(0.16, 1, 0.3, 1), visibility 0.4s;
        opacity: 1;
        visibility: visible;
        z-index: 2;
    }

    #stopsPanel.expanded::after {
        opacity: 0;
        visibility: hidden;
    }

    /* Hide redundant elements inside stops panel on mobile */
    #stopsPanel h1,
    #stopsPanel .description,
    #stopsPanel .line-badge {
        display: none;
    }

    /* New Toggle Button */
    .btn-toggle-stops {
        width: fit-content;
        margin: 0 auto 16px auto;
        display: flex;
        justify-content: center;
        align-items: center;
        gap: 8px;
        padding: 14px 32px;
        background-color: var(--accent-color);
        border: none;
        border-radius: 50px;
        font-family: var(--font-body);
        font-size: 15px;
        font-weight: 800;
        color: #ffffff;
        cursor: pointer;
        transition: all 0.3s ease;
    }

    .btn-toggle-stops:hover {
        transform: translateY(-1px);
        background-color: #009e3f;
        /* Slightly darker accent on hover since we removed shadow */
    }

    /* Fares & Schedule Panel - (Bottom) */
    .left-column>.panel:not(.map-panel) {
        order: 3;
        border-radius: 0;
        border-left: none;
        border-right: none;
        border-bottom: 1px solid rgba(18, 76, 42, 0.08);
        padding: 24px 20px;
        box-shadow: none;
    }
}

/* ── Map Stop Labels ────────────────────────────────────────── */
.map-stop-label {
    font-family: var(--font-body);
    font-size: 9.5px;
    font-weight: 700;
    color: #124c2a;
    text-shadow:
        -1.5px -1.5px 0 #ffffff,
        1.5px -1.5px 0 #ffffff,
        -1.5px 1.5px 0 #ffffff,
        1.5px 1.5px 0 #ffffff,
        0px 1.5px 3px rgba(0, 0, 0, 0.15);
    /* White stroke/glow around text to be readable anywhere */
    white-space: nowrap;
    pointer-events: none;
    /* Let user clicks pass through to map */

    /* Slanted/diagonal look to avoid overlapping with horizontal route lines */
    transform: rotate(-30deg);
    transform-origin: 0 50%;
}

/* ── Direction Toggle Control (Sabit Ergonomik Dokunmatik Boyut - 48px Standart) ─────── */
.direction-toggle-container {
    position: static;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: #ffffff;
    border: 2px solid var(--topbar-border, #d0d0d0);
    border-radius: 32px;
    padding: 5px;
    z-index: 10;
    box-shadow: 0 4px 18px rgba(0, 0, 0, 0.08);
    gap: 6px;
    user-select: none;
    -webkit-user-select: none;
}

.dir-btn {
    background: transparent;
    border: none;
    color: var(--text-primary);
    font-family: var(--font-body);
    font-weight: 800;
    font-size: 15px;
    height: 48px;
    min-width: 124px;
    padding: 0 28px;
    border-radius: 26px;
    cursor: pointer;
    transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
    white-space: nowrap;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    box-sizing: border-box;
}

/* ── Responsive Scaling for Map Overlays ──────────────────────── */
@media (max-width: 768px) {
    .mobile-line-badge {
        top: 5px;
        right: 5px;
        width: 36px;
        height: 36px;
        font-size: 13px;
    }

    .line-header-subtitle {
        margin: 12px 0 8px 0;
        width: 100%;
        padding: 0 20px;
        gap: 12px;
    }

    .route-direction-display {
        font-size: 1.05rem;
        gap: 8px 10px;
    }
}

@media (max-width: 480px) {
    .mobile-line-badge {
        top: 4px;
        right: 4px;
        width: 32px;
        height: 32px;
        font-size: 11.5px;
    }

    .route-direction-display {
        font-size: 0.95rem;
        gap: 6px 8px;
    }



    .line-header-subtitle .route-arrow-icon {
        width: 23px !important;
        height: 23px !important;
        stroke-width: 2.8px !important;
    }
}

.dir-btn:hover:not(.active) {
    background: rgba(18, 76, 42, 0.05);
}

#btnDirOutward.active {
    background: #0066ff;
    color: #ffffff;
}

#btnDirReturn.active {
    background: #ff6b00;
    color: #ffffff;
}

/* Dark Mode için Yön Seçici Uyarlaması */
[data-theme="dark"] .direction-toggle-container {
    background: var(--bg-color, #0d1117);
    border: 2px solid var(--topbar-border, #d0d0d0);
    box-shadow: 0 4px 18px rgba(0, 0, 0, 0.2);
}

[data-theme="dark"] .dir-btn {
    color: var(--text-primary, #f0f6fc);
}

[data-theme="dark"] .dir-btn:hover:not(.active) {
    background: rgba(255, 255, 255, 0.08);
}

@media (prefers-color-scheme: dark) {
    :root:not([data-theme="light"]) .direction-toggle-container {
        background: var(--bg-color, #0d1117);
        border: 2px solid var(--topbar-border, #d0d0d0);
        box-shadow: 0 4px 18px rgba(0, 0, 0, 0.2);
    }

    :root:not([data-theme="light"]) .dir-btn {
        color: var(--text-primary, #f0f6fc);
    }

    :root:not([data-theme="light"]) .dir-btn:hover:not(.active) {
        background: rgba(255, 255, 255, 0.08);
    }
}

/* ── Route Direction Flow Animation ──────────────────────────── */
@keyframes routeFlowOutward {
    to {
        stroke-dashoffset: -40px;
    }
}

@keyframes routeFlowReturn {
    to {
        stroke-dashoffset: 40px;
    }
}

.route-flow-line {
    stroke-dasharray: 10px 15px;
    animation: routeFlowOutward 2.5s linear infinite;
}

.route-flow-line.return-flow {
    animation: routeFlowReturn 2.5s linear infinite;
}

/* ── Transfer Badges ────────────────────────────────────────── */
.transfer-badges {
    display: inline-flex;
    gap: 4px;
    align-items: center;
    margin-left: 8px;
    flex-wrap: wrap;
}

.transfer-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 10px;
    font-weight: 800;
    padding: 2px 6px;
    border-radius: 6px;
    color: #ffffff;
    font-family: var(--font-body);
    text-transform: uppercase;
    line-height: 1;
    white-space: nowrap;
}

/* Line-specific colors */
.transfer-badge.m2 {
    background-color: #008F5A;
}

.transfer-badge.m3 {
    background-color: #0097D7;
}

.transfer-badge.m9 {
    background-color: #FFC72C;
    color: #000000;
}

.transfer-badge.m1b {
    background-color: #E31B23;
}

.transfer-badge.marmaray {
    background-color: #005A9C;
}

.transfer-badge.metrobus {
    background-color: #E35205;
}

.transfer-badge.t1 {
    background-color: #0033A0;
}

.transfer-badge.t4 {
    background-color: #7F3F98;
}

/* ── Leaflet Controls & Attribution Fix ─────────────────────── */
.leaflet-control-zoom {
    display: none !important;
}

.leaflet-control-attribution {
    font-size: 9px !important;
    max-width: 80vw !important;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* ── Focus Outline & Touch Highlight Resets ─────────────────── */
button,
a,
input,
select,
textarea {
    -webkit-tap-highlight-color: transparent !important;
}

button:focus,
a:focus,
input:focus,
select:focus,
textarea:focus {
    outline: none !important;
    box-shadow: none !important;
}

/* ── Map Interaction Overlay (Mobile) ───────────────────────── */
.map-touch-overlay {
    position: absolute;
    inset: 0;
    z-index: 500;
    border-radius: inherit;
    background: transparent;
    /* pan-y: tarayıcı dikey kaydırmayı doğal yönetir */
    touch-action: pan-y;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Merkezdeki pulsing dokunma ikonu — metin yok, sadece görsel */
.map-touch-icon {
    pointer-events: none;
    z-index: 501;
    color: rgba(0, 102, 255, 0.78);
    filter: drop-shadow(0 0 10px rgba(0, 102, 255, 0.40));
    animation: touchIconPulse 2.2s ease-in-out infinite;
    transition: opacity 0.25s ease, transform 0.25s ease;
}

.map-touch-icon svg {
    display: block;
    width: 44px;
    height: 44px;
}

@keyframes touchIconPulse {

    0%,
    100% {
        transform: scale(1);
        opacity: 0.60;
    }

    50% {
        transform: scale(1.18);
        opacity: 1.00;
    }
}

/* İkon aktivasyon anında kaybolur */
.map-touch-icon.icon-hide {
    opacity: 0 !important;
    transform: scale(0.65) !important;
    animation: none !important;
}

/* ── Ripple (dokunulan noktada genişleyen mavi halka) ────────── */
.map-ripple {
    position: absolute;
    pointer-events: none;
    z-index: 503;
    width: 90px;
    height: 90px;
    margin-left: -45px;
    margin-top: -45px;
    border-radius: 50%;
    background: radial-gradient(circle,
            rgba(0, 102, 255, 0.32) 0%,
            rgba(0, 102, 255, 0.00) 70%);
    opacity: 0;
    transform: scale(0.2);
}

.map-ripple.ripple-go {
    animation: rippleExpand 0.72s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

@keyframes rippleExpand {
    0% {
        opacity: 0.92;
        transform: scale(0.2);
    }

    100% {
        opacity: 0;
        transform: scale(3.4);
    }
}

/* ── Map panel border glow ───────────────────────────────────── */
@keyframes mapGlowIn {
    0% {
        box-shadow: 0 0 0 0px rgba(0, 102, 255, 0.55), 0 10px 30px rgba(0, 0, 0, 0.03);
    }

    50% {
        box-shadow: 0 0 0 5px rgba(0, 102, 255, 0.28), 0 10px 30px rgba(0, 0, 0, 0.03);
    }

    100% {
        box-shadow: 0 0 0 3px rgba(0, 102, 255, 0.18), 0 10px 30px rgba(0, 0, 0, 0.03);
    }
}

@keyframes mapGlowOut {
    from {
        box-shadow: 0 0 0 3px rgba(0, 102, 255, 0.18), 0 10px 30px rgba(0, 0, 0, 0.03);
    }

    to {
        box-shadow: 0 10px 30px rgba(0, 0, 0, 0.03);
    }
}

.map-panel.map-touch-active {
    animation: mapGlowIn 0.45s ease-out forwards;
}

.map-panel.map-touch-deactivating {
    animation: mapGlowOut 0.4s ease-in forwards;
}

/* ── Desktop'ta overlay gizli ───────────────────────────────── */
@media (min-width: 992px) {

    .map-touch-overlay,
    .map-ripple {
        display: none !important;
    }
}

/* ── HEADER SEARCH BAR & AUTOCOMPLETE DROPDOWN ───────────────── */
.search-input-wrapper {
    position: relative;
    display: flex;
    align-items: center;
    width: 100%;
    z-index: 10;
}

.search-icon {
    position: absolute;
    left: 14px;
    color: #00b047;
    pointer-events: none;
    z-index: 2;
}

.search-input {
    width: 100%;
    height: 54px;
    padding: 12px 24px 12px 52px;
    font-family: var(--font-body);
    font-size: 1.02rem;
    color: var(--text-primary);
    background: rgba(255, 255, 255, 0.95);
    border: 2px solid rgba(0, 176, 71, 0.25);
    border-radius: 28px;
    outline: none;
    transition: all 0.3s ease;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.04);
}

.search-input:focus {
    border-color: #00b047;
    box-shadow: 0 4px 18px rgba(0, 176, 71, 0.18);
    background: #ffffff;
}

.search-results-dropdown {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    max-height: 380px;
    overflow-y: auto;
    background: rgba(255, 255, 255, 0.98);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 2px solid var(--topbar-border, #d0d0d0) !important;
    border-radius: 28px;
    box-shadow: 0 12px 36px rgba(0, 0, 0, 0.12);
    z-index: 5;
    display: none;
    padding: 60px 6px 8px 6px;
    box-sizing: border-box;
    -ms-overflow-style: none !important;
    scrollbar-width: none !important;
}

.search-results-dropdown.active {
    display: block;
}

.search-result-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 14px;
    border-radius: 10px;
    text-decoration: none;
    color: var(--text-primary);
    transition: background 0.2s ease;
}

.search-result-item:hover {
    background: rgba(0, 176, 71, 0.08);
}

.search-result-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 4px 10px;
    border-radius: 8px;
    font-family: var(--font-heading);
    font-weight: 700;
    font-size: 0.85rem;
    white-space: nowrap;
    min-width: 44px;
}

.search-result-info {
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.search-result-title {
    font-family: var(--font-heading);
    font-weight: 600;
    font-size: 0.95rem;
    color: var(--text-primary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.search-result-meta {
    font-size: 0.8rem;
    color: var(--text-secondary);
}

/* === CITIES & HIERARCHY LANDING PAGES === */
.cities-section {
    max-width: 1200px;
    margin: 40px auto 60px;
    padding: 0 24px;
}

.section-header-title {
    font-family: var(--font-heading);
    font-size: 1.8rem;
    font-weight: 800;
    color: #0f3d82;
    margin-bottom: 12px;
}

.city-grid, .hierarchy-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 24px;
}

.city-card, .hierarchy-card {
    background: rgba(255, 255, 255, 0.95);
    border: 1.5px solid rgba(10, 25, 48, 0.08);
    border-radius: 20px;
    padding: 24px;
    text-decoration: none;
    transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
    display: flex;
    align-items: center;
    justify-content: space-between;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.03);
}

.city-card:hover, .hierarchy-card:hover {
    transform: translateY(-4px);
    border-color: #00b047;
    box-shadow: 0 12px 32px rgba(0, 176, 71, 0.14);
}

.city-card-title, .hierarchy-card-title {
    font-family: var(--font-heading);
    font-size: 1.25rem;
    font-weight: 700;
    color: #0f3d82;
}

.city-card-subtitle, .hierarchy-card-subtitle {
    font-size: 0.85rem;
    color: var(--text-secondary);
}

.city-card-badge, .hierarchy-card-badge {
    background: #e6f4ea;
    color: #00b047;
    font-family: var(--font-heading);
    font-weight: 700;
    font-size: 0.85rem;
    padding: 6px 14px;
    border-radius: 20px;
    white-space: nowrap;
}

.breadcrumbs-nav {
    max-width: 1200px;
    margin: 30px auto 0;
    padding: 0 24px;
}

.breadcrumbs-container {
    display: flex;
    align-items: center;
    gap: 8px;
    font-family: var(--font-heading);
    font-size: 0.95rem;
    color: var(--text-secondary);
    flex-wrap: wrap;
}

.breadcrumbs-container a {
    color: #0f3d82;
    text-decoration: none;
    font-weight: 600;
    transition: color 0.2s ease;
}

.breadcrumbs-container a:hover {
    color: #00b047;
    text-decoration: underline;
}

.breadcrumb-sep {
    color: #94a3b8;
    font-size: 0.85rem;
}

.breadcrumb-current {
    color: var(--text-primary);
    font-weight: 700;
}

.route-card {
    background: #ffffff;
    border: 1.5px solid rgba(10, 25, 48, 0.08);
    border-radius: 18px;
    padding: 20px;
    text-decoration: none;
    transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
    display: flex;
    align-items: center;
    gap: 16px;
    box-shadow: 0 2px 12px rgba(0,0,0,0.03);
}

.route-card:hover {
    transform: translateY(-3px);
    border-color: #00b047;
    box-shadow: 0 10px 28px rgba(0, 176, 71, 0.14);
}

.route-card-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 8px 14px;
    border-radius: 12px;
    font-family: var(--font-heading);
    font-weight: 800;
    font-size: 1.1rem;
    min-width: 56px;
    text-align: center;
    flex-shrink: 0;
}

.route-card-info {
    display: flex;
    flex-direction: column;
    gap: 4px;
    overflow: hidden;
}

.route-card-name {
    font-family: var(--font-heading);
    font-weight: 700;
    font-size: 1.05rem;
    color: #0f3d82;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.route-card-desc {
    font-size: 0.85rem;
    color: var(--text-secondary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* === BREADCRUMB BAR (Bold Header Navigation) === */
.breadcrumb-bar {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    font-family: var(--font-heading);
    font-size: 1.6rem;
    font-weight: 800;
    color: var(--breadcrumb-active);
    padding: 60px 24px 16px 24px;
    max-width: 1400px;
    margin: 0 auto;
    flex-wrap: wrap;
    transition: color 0.3s ease;
}

.breadcrumb-bar a {
    color: var(--breadcrumb-link);
    text-decoration: none;
    font-weight: 800;
    transition: color 0.2s ease;
}

.breadcrumb-bar a:hover {
    color: var(--accent-color);
}

.breadcrumb-bar .sep {
    color: var(--breadcrumb-sep);
    font-size: 1.3rem;
    font-weight: 900;
}

.breadcrumb-line-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 6px 18px;
    border-radius: 24px;
    font-family: var(--font-heading);
    font-weight: 800;
    font-size: 1.15rem;
    box-shadow: none !important;
    border: 1px solid rgba(0, 0, 0, 0.1);
}

/* === THEME COMPONENT STYLES & OVERRIDES === */
*, *::before, *::after {
    box-shadow: none !important;
    text-shadow: none !important;
    filter: none !important;
}

body {
    background-color: var(--body-bg) !important;
    color: var(--text-primary) !important;
    transition: background-color 0.3s ease, color 0.3s ease;
}

.panel, .city-card, .hierarchy-card, .route-card, .search-results-dropdown, .lang-dropdown, .fare-card, .agency-info-box, .route-meta-box {
    border: 2px solid var(--topbar-border, #d0d0d0) !important;
    background: var(--card-bg) !important;
    color: var(--text-primary) !important;
    box-shadow: none !important;
    backdrop-filter: none !important;
    -webkit-backdrop-filter: none !important;
    transition: background 0.2s ease, border-color 0.2s ease, transform 0.2s ease;
}

.city-card-title, .hierarchy-card-title, .route-card-name, .section-header-title, .section-title, .hero-title, .panel-title {
    color: var(--text-primary) !important;
}

.city-card-subtitle, .hierarchy-card-subtitle, .route-card-desc, .section-subtitle, .hero-subtitle, p {
    color: var(--text-secondary) !important;
}

.city-card:hover, .hierarchy-card:hover, .route-card:hover, .panel:not(.map-panel):hover {
    transform: translateY(-2px) !important;
    border-color: var(--accent-color) !important;
    background: var(--card-bg) !important;
}

/* Filter search & chips */
.filter-search-box {
    background: var(--input-bg) !important;
    border: 2px solid var(--topbar-border, #d0d0d0) !important;
    color: var(--input-text) !important;
}

.grid-filter-input {
    background: transparent !important;
    color: var(--input-text) !important;
    border: none !important;
}

.grid-filter-input::placeholder {
    color: var(--input-placeholder) !important;
}

.filter-chip {
    background: var(--chip-bg) !important;
    border: 1px solid var(--chip-border) !important;
    color: var(--chip-text) !important;
    transition: all 0.2s ease;
}

.filter-chip:hover {
    border-color: var(--accent-color) !important;
}

.filter-chip.active {
    background: var(--chip-active-bg) !important;
    border-color: var(--chip-active-bg) !important;
    color: var(--chip-active-text) !important;
}

/* Dropdowns */
.search-results-dropdown, .lang-dropdown {
    background: var(--dropdown-bg) !important;
    border: 2px solid var(--topbar-border, #d0d0d0) !important;
}

.search-result-item {
    color: var(--dropdown-text) !important;
    border-bottom: 1px solid var(--card-border) !important;
}

.search-result-item:hover {
    background: var(--dropdown-hover) !important;
}

.search-result-name {
    color: var(--dropdown-text) !important;
}

.search-result-sub {
    color: var(--dropdown-subtext) !important;
}

.lang-dropdown button {
    color: var(--dropdown-text) !important;
}

.lang-dropdown button:active {
    background: var(--topbar-bg, #00b047) !important;
    color: #ffffff !important;
}

@media (hover: hover) and (pointer: fine) {
    .lang-dropdown button:hover {
        background: var(--topbar-bg, #00b047) !important;
        color: #ffffff !important;
    }
}

/* Stops Panel & Timeline */
.stop-item {
    color: var(--text-primary) !important;
    border-bottom: 1px solid var(--card-border) !important;
}

.stop-item:hover {
    background: var(--dropdown-hover) !important;
}

.stop-name {
    color: var(--text-primary) !important;
}

.stop-zone, .stop-meta, .stop-seq {
    color: var(--text-secondary) !important;
}

.direction-btn {
    background: var(--chip-bg) !important;
    border: 1px solid var(--chip-border) !important;
    color: var(--chip-text) !important;
}

.direction-btn.active {
    background: var(--chip-active-bg) !important;
    border-color: var(--chip-active-bg) !important;
    color: var(--chip-active-text) !important;
}

/* Hero Section */
.hero-section {
    background: var(--hero-bg) !important;
    border-bottom: 1px solid var(--hero-border) !important;
}

.hero-search-box input {
    background: var(--hero-search-bg) !important;
    border: 2px solid var(--hero-search-border) !important;
    color: var(--text-primary) !important;
}

.hero-search-box input:focus {
    border-color: var(--accent-color) !important;
}

/* Footer */
.footer {
    background: var(--card-bg) !important;
    border-top: 1px solid var(--card-border) !important;
    color: var(--text-secondary) !important;
}

/* Leaflet Map in Dark Mode */
[data-theme="dark"] .leaflet-container {
    background: #0d1117 !important;
}

[data-theme="dark"] .leaflet-popup-content-wrapper,
[data-theme="dark"] .leaflet-popup-tip {
    background: #161b22 !important;
    color: #f0f6fc !important;
    border: 1px solid #30363d !important;
}

[data-theme="dark"] .leaflet-bar a {
    background-color: #161b22 !important;
    border-bottom: 1px solid #30363d !important;
    color: #f0f6fc !important;
}

[data-theme="dark"] .leaflet-bar a:hover {
    background-color: #21262d !important;
}

.route-line-arrow {
    background: transparent !important;
    border: none !important;
    box-shadow: none !important;
}



