/* ============================================================
   TOG DERVENTA – ROUTER MODUL
   Vizuelni identitet usklađen sa togderventa.com
   Boje, fontovi i stilovi preuzeti iz portala
   ============================================================ */

/* ===== BRAND VARIJABLE (identično togderventa.com) ===== */
:root {
  /* Primarne boje portala */
  --togd-primary:      #1CA8CB;   /* theme-color */
  --togd-primary-dark: #1590AF;   /* tamnija varijanta */
  --togd-primary-light:#E9F6F9;   /* smoke-color */
  --togd-title:        #113D48;   /* title-color */
  --togd-body:         #6E7070;   /* body-color */
  --togd-yellow:       #FFB539;   /* yellow-color (akcent) */
  --togd-menu-bg:      #75D5EE;   /* menu-area pozadina */
  --togd-smoke:        #E9F6F9;   /* smoke pozadina */
  --togd-smoke2:       #F3F4F6;
  --togd-border:       #E9EDF5;
  --togd-white:        #ffffff;
  --togd-black:        #0D0D0C;

  /* Kategorije */
  --cat-smjestaj:      #1CA8CB;
  --cat-atrakcije:     #FFB539;
  --cat-domaci:        #51b04d;

  /* Fontovi (identično togderventa.com) */
  --font-title:        'Manrope', sans-serif;
  --font-body:         'Roboto Condensed', serif;

  /* Layout */
  --side-width:        300px;
  --topbar-h:          38px;
  --header-h:          72px;
  --breadcrumb-h:      120px;
  --radius:            6px;
  --shadow-sm:         0 2px 8px rgba(0,0,0,.08);
  --shadow-md:         0 4px 16px rgba(0,0,0,.12);
  --transition:        .3s ease;
}

*, *::before, *::after { box-sizing: border-box; }

html, body {
  margin: 0; padding: 0;
  font-family: var(--font-body);
  font-size: 16px;
  color: var(--togd-body);
  background: var(--togd-smoke2);
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

/* ===== TOP BAR ===== */
#top-bar {
  background: var(--togd-smoke);
  border-bottom: 1px solid var(--togd-border);
  height: var(--topbar-h);
  display: flex;
  align-items: center;
}
.topbar-inner {
  width: 100%;
  max-width: 100%;
  padding: 0 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.topbar-left {
  display: flex;
  align-items: center;
  gap: 4px;
  font-size: .82rem;
  color: var(--togd-body);
}
.topbar-left i { color: var(--togd-primary); }
.topbar-sep { margin: 0 8px; color: var(--togd-border); }
.topbar-right { display: flex; align-items: center; gap: 12px; }
.topbar-back {
  font-size: .82rem;
  color: var(--togd-primary);
  text-decoration: none;
  font-weight: 600;
  transition: color var(--transition);
}
.topbar-back:hover { color: var(--togd-title); }

/* ===== HEADER / NAVBAR ===== */
#main-header {
  background: var(--togd-white);
  height: var(--header-h);
  box-shadow: 0 2px 12px rgba(0,0,0,.08);
  position: sticky;
  top: 0;
  z-index: 1050;
}
.header-inner {
  display: flex;
  align-items: center;
  height: 100%;
  padding: 0 24px;
  gap: 0;
}

/* Logo */
.site-logo {
  display: flex;
  align-items: center;
  text-decoration: none;
  flex-shrink: 0;
  margin-right: 24px;
}
.site-logo img {
  height: 52px;
  width: auto;
  object-fit: contain;
}
.logo-fallback {
  display: flex;
  align-items: center;
  gap: 10px;
}
.logo-wheel {
  width: 44px; height: 44px;
  background: var(--togd-primary);
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  color: #fff; font-size: 22px;
}
.logo-text { line-height: 1.1; }
.logo-tog {
  display: block;
  font-family: var(--font-title);
  font-size: 1.1rem;
  font-weight: 800;
  color: var(--togd-primary);
  letter-spacing: 2px;
}
.logo-derventa {
  display: block;
  font-family: var(--font-title);
  font-size: .65rem;
  font-weight: 600;
  color: var(--togd-title);
  letter-spacing: 3px;
  text-transform: uppercase;
}

/* Navigation */
.main-nav {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: flex-end;
}
.nav-list {
  list-style: none;
  margin: 0; padding: 0;
  display: flex;
  align-items: center;
  gap: 0;
}
.nav-item { position: relative; }
.nav-link-item {
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 8px 14px;
  font-family: var(--font-body);
  font-size: .9rem;
  font-weight: 500;
  color: var(--togd-black);
  text-decoration: none;
  white-space: nowrap;
  transition: color var(--transition), background var(--transition);
  border-radius: var(--radius);
}
.nav-link-item:hover,
.nav-link-item.active {
  color: var(--togd-primary);
  background: var(--togd-smoke);
}
.nav-arrow {
  font-size: .65rem;
  color: var(--togd-primary);
  transition: transform var(--transition);
}
.nav-item:hover .nav-arrow { transform: rotate(180deg); }

/* Dropdown */
.nav-dropdown {
  display: none;
  position: absolute;
  top: calc(100% + 6px);
  left: 0;
  min-width: 200px;
  background: var(--togd-white);
  border: 1px solid var(--togd-border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-md);
  list-style: none;
  padding: 6px 0;
  margin: 0;
  z-index: 2000;
}
.nav-item.has-dropdown:hover .nav-dropdown { display: block; }
.nav-drop-link {
  display: flex;
  align-items: center;
  padding: 9px 16px;
  font-size: .875rem;
  color: var(--togd-black);
  text-decoration: none;
  transition: background var(--transition), color var(--transition);
}
.nav-drop-link:hover,
.nav-drop-link.active {
  background: var(--togd-smoke);
  color: var(--togd-primary);
}
.nav-drop-link i { color: var(--togd-primary); }

/* Hamburger */
.nav-hamburger {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 8px;
  margin-left: auto;
}
.nav-hamburger span {
  display: block;
  width: 24px; height: 2px;
  background: var(--togd-title);
  border-radius: 2px;
  transition: all var(--transition);
}
.nav-hamburger.active span:nth-child(1) { transform: rotate(45deg) translate(5px, 5px); }
.nav-hamburger.active span:nth-child(2) { opacity: 0; }
.nav-hamburger.active span:nth-child(3) { transform: rotate(-45deg) translate(5px, -5px); }

/* ===== BREADCRUMB BAR ===== */
#breadcrumb-bar {
  background: linear-gradient(135deg, var(--togd-title) 0%, var(--togd-primary-dark) 60%, var(--togd-primary) 100%);
  padding: 16px 24px 20px;
  position: relative;
  overflow: hidden;
}
#breadcrumb-bar::before {
  content: '';
  position: absolute;
  inset: 0;
  background: url('https://togderventa.com/assets/img/bg/breadcumb-bg.jpg') center/cover no-repeat;
  opacity: .12;
}
.breadcrumb-inner { position: relative; z-index: 1; }
.breadcrumb { margin: 0; padding: 0; background: none; }
.breadcrumb-item a {
  color: rgba(255,255,255,.75);
  font-size: .8rem;
  text-decoration: none;
  transition: color var(--transition);
}
.breadcrumb-item a:hover { color: var(--togd-yellow); }
.breadcrumb-item.active { color: var(--togd-yellow); font-size: .8rem; }
.breadcrumb-item + .breadcrumb-item::before { color: rgba(255,255,255,.4); }

.breadcrumb-title-wrap { margin-top: 8px; }
.page-title {
  font-family: var(--font-title);
  font-size: 1.6rem;
  font-weight: 800;
  color: var(--togd-white);
  margin: 0 0 4px;
  line-height: 1.2;
}
.page-title i { color: var(--togd-yellow); }
.page-subtitle {
  font-size: .875rem;
  color: rgba(255,255,255,.75);
  margin: 0;
  font-family: var(--font-body);
}

/* ===== APP WRAPPER ===== */
.app-wrapper {
  display: flex;
  width: 100%;
  height: calc(100vh - var(--topbar-h) - var(--header-h) - var(--breadcrumb-h));
  min-height: 580px;
  gap: 0;
  background: var(--togd-smoke2);
  overflow: hidden;
}

/* ===== SIDE PANEL ===== */
.side-panel {
  width: var(--side-width);
  min-width: var(--side-width);
  background: var(--togd-white);
  border-right: 1px solid var(--togd-border);
  display: flex;
  flex-direction: column;
  overflow-y: auto;
  overflow-x: hidden;
  z-index: 10;
  transition: transform var(--transition);
  box-shadow: 2px 0 12px rgba(0,0,0,.05);
}

.panel-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 16px;
  background: linear-gradient(135deg, var(--togd-title) 0%, var(--togd-primary-dark) 60%, var(--togd-primary) 100%);
  color: var(--togd-white);
  flex-shrink: 0;
  border-bottom: 3px solid var(--togd-yellow);
}
.panel-title {
  display: flex; align-items: center; gap: 8px;
  font-family: var(--font-title);
  font-size: 1rem; font-weight: 700;
  color: var(--togd-white);
}
.panel-title i { color: var(--togd-yellow); font-size: 1.1rem; }
.panel-close {
  background: rgba(255,255,255,.15);
  border: none; color: #fff;
  width: 28px; height: 28px;
  border-radius: var(--radius);
  cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  transition: background var(--transition);
}
.panel-close:hover { background: rgba(255,255,255,.3); }

.panel-section {
  padding: 12px 14px;
  border-bottom: 1px solid var(--togd-border);
}
.panel-section:last-child { border-bottom: none; }

.section-label {
  display: block;
  font-family: var(--font-title);
  font-size: .75rem;
  font-weight: 700;
  color: var(--togd-title);
  text-transform: uppercase;
  letter-spacing: .6px;
  margin-bottom: 8px;
}
.section-label i { color: var(--togd-primary); }

/* ===== TOGD INPUT ===== */
.togd-input {
  width: 100%;
  height: 40px;
  padding: 0 12px;
  border: 1.5px solid var(--togd-border);
  border-radius: var(--radius);
  font-family: var(--font-body);
  font-size: .875rem;
  color: var(--togd-black);
  background: var(--togd-white);
  transition: border-color var(--transition), box-shadow var(--transition);
  outline: none;
}
.togd-input:focus {
  border-color: var(--togd-primary);
  box-shadow: 0 0 0 3px rgba(28,168,203,.15);
}

/* ===== TOGD BADGE ===== */
.togd-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 20px; height: 20px;
  padding: 0 6px;
  background: var(--togd-primary);
  color: #fff;
  border-radius: 10px;
  font-size: .72rem;
  font-weight: 700;
  margin-left: 6px;
}

/* ===== SEARCH ===== */
.search-wrapper { position: relative; }
.search-dropdown {
  position: absolute;
  top: calc(100% + 4px);
  left: 0; right: 0;
  background: var(--togd-white);
  border: 1px solid var(--togd-border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-md);
  z-index: 2000;
  max-height: 260px;
  overflow-y: auto;
}
.search-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 12px;
  cursor: pointer;
  border-bottom: 1px solid var(--togd-border);
  transition: background var(--transition);
  font-size: .85rem;
}
.search-item:last-child { border-bottom: none; }
.search-item:hover { background: var(--togd-smoke); }
.search-item-icon {
  width: 28px; height: 28px;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 12px; color: #fff; flex-shrink: 0;
}
.search-item-info { flex: 1; overflow: hidden; }
.search-item-name { font-weight: 600; color: var(--togd-title); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.search-item-addr { font-size: .75rem; color: var(--togd-body); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.search-item-add {
  padding: 4px 8px;
  border-radius: 4px;
  border: none;
  font-size: .75rem;
  font-weight: 700;
  background: var(--togd-yellow);
  color: var(--togd-title);
  cursor: pointer;
  white-space: nowrap;
  transition: background var(--transition);
}
.search-item-add:hover { background: #e8a020; }

/* ===== HODOGRAM LIST ===== */
.hodogram-list {
  list-style: none;
  padding: 0; margin: 0;
  min-height: 60px;
  max-height: 260px;
  overflow-y: auto;
  border: 1.5px dashed var(--togd-border);
  border-radius: var(--radius);
  background: var(--togd-smoke2);
}
.hodogram-empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 20px 12px;
  color: #aaa;
  font-size: .82rem;
  text-align: center;
}
.hodogram-empty i { font-size: 1.5rem; color: var(--togd-primary); opacity: .4; }

.hodogram-item {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 10px;
  background: var(--togd-white);
  border-bottom: 1px solid var(--togd-border);
  cursor: grab;
  transition: background var(--transition);
}
.hodogram-item:last-child { border-bottom: none; }
.hodogram-item:hover { background: var(--togd-smoke); }
.hodogram-item.sortable-ghost { opacity: .4; background: var(--togd-smoke); }
.hodogram-item.sortable-chosen { box-shadow: var(--shadow-md); }

.hodogram-num {
  width: 22px; height: 22px;
  border-radius: 50%;
  background: var(--togd-primary);
  color: #fff;
  font-size: .72rem;
  font-weight: 800;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}
.hodogram-name {
  flex: 1;
  font-family: var(--font-body);
  font-size: .82rem;
  font-weight: 600;
  color: var(--togd-title);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.hodogram-cat-dot {
  width: 8px; height: 8px;
  border-radius: 50%;
  flex-shrink: 0;
}
.hodogram-remove {
  background: none; border: none;
  color: #ccc; cursor: pointer;
  font-size: .9rem; padding: 2px 4px;
  border-radius: 4px;
  transition: color var(--transition), background var(--transition);
}
.hodogram-remove:hover { color: #dc3545; background: #ffeaea; }

/* ===== ACTION BUTTONS ===== */
.actions-block {
  display: flex;
  flex-direction: column;
  gap: 7px;
}
.action-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 10px 14px;
  border-radius: var(--radius);
  border: none;
  cursor: pointer;
  font-family: var(--font-title);
  font-size: .875rem;
  font-weight: 700;
  transition: filter var(--transition), transform var(--transition), box-shadow var(--transition);
  box-shadow: var(--shadow-sm);
  letter-spacing: .3px;
}
.action-btn:hover { filter: brightness(1.08); transform: translateY(-1px); box-shadow: var(--shadow-md); }
.action-btn:active { transform: translateY(0); filter: brightness(.95); }
.action-reset  { background: #dc3545;          color: #fff; }
.action-route  { background: var(--togd-primary); color: #fff; }
.action-instr  { background: var(--togd-title);   color: #fff; }
.action-export { background: var(--togd-yellow);  color: var(--togd-title); }

/* ===== TOGD BUTTON ===== */
.togd-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 8px 18px;
  border-radius: var(--radius);
  border: none;
  cursor: pointer;
  font-family: var(--font-title);
  font-size: .875rem;
  font-weight: 700;
  text-decoration: none;
  transition: filter var(--transition), transform var(--transition);
}
.togd-btn:hover { filter: brightness(1.08); transform: translateY(-1px); }
.togd-btn-primary { background: var(--togd-primary); color: #fff; }
.togd-btn-outline  { background: transparent; border: 2px solid var(--togd-title); color: var(--togd-title); }
.togd-btn-outline:hover { background: var(--togd-title); color: #fff; }

/* ===== CATEGORY FILTERS ===== */
#category-filters {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.cat-card {
  border: 1.5px solid var(--togd-border);
  border-radius: var(--radius);
  background: var(--togd-white);
  overflow: hidden;
  transition: border-color var(--transition);
}
.cat-card:hover { border-color: var(--togd-primary); }
.cat-head {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 12px;
  cursor: pointer;
  user-select: none;
}
.cat-check {
  width: 16px; height: 16px;
  cursor: pointer;
  accent-color: var(--togd-primary);
  flex-shrink: 0;
}
.cat-icon {
  width: 26px; height: 26px;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 11px; color: #fff; flex-shrink: 0;
}
.cat-label {
  flex: 1;
  font-family: var(--font-body);
  font-size: .875rem;
  font-weight: 600;
  color: var(--togd-title);
}
.cat-toggle {
  color: var(--togd-primary); font-size: .75rem;
  transition: transform var(--transition);
}
.cat-card.expanded .cat-toggle { transform: rotate(180deg); }

.subcat-list {
  display: none;
  border-top: 1px solid var(--togd-border);
  padding: 8px 12px;
  background: var(--togd-smoke2);
  max-height: 180px;
  overflow-y: auto;
}
.cat-card.expanded .subcat-list { display: block; }
.subcat-item {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 5px 4px;
  border-radius: 4px;
  transition: background var(--transition);
}
.subcat-item:hover { background: var(--togd-smoke); }
.subcat-label {
  font-size: .8rem;
  font-weight: 500;
  color: var(--togd-body);
  cursor: pointer;
  flex: 1;
}
.subcat-item input[type="checkbox"] {
  accent-color: var(--togd-primary);
  cursor: pointer;
}

/* ===== MAP AREA ===== */
.map-area {
  flex: 1;
  min-width: 0;
  position: relative;
}
.map-container {
  position: absolute;
  inset: 0;
  overflow: hidden;
  transition: width var(--transition);
}
#main-map {
  position: absolute !important;
  inset: 0;
  width: 100% !important;
  height: 100% !important;
}
.map-container.fullscreen {
  position: fixed !important;
  inset: 0;
  width: 100% !important;
  height: 100% !important;
  z-index: 9999;
  border-radius: 0;
}

/* ===== MAP CONTROLS ===== */
.map-controls {
  position: absolute;
  top: 12px;
  right: 12px;
  z-index: 1000;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.map-ctrl-btn {
  width: 38px; height: 38px;
  border-radius: var(--radius);
  border: none;
  color: #fff;
  font-size: 15px;
  cursor: pointer;
  box-shadow: var(--shadow-md);
  display: flex; align-items: center; justify-content: center;
  transition: filter var(--transition), transform var(--transition);
}
.map-ctrl-btn:hover { filter: brightness(1.1); transform: scale(1.05); }
.map-ctrl-primary { background: var(--togd-primary); }
.map-ctrl-yellow  { background: var(--togd-yellow); color: var(--togd-title); }
.map-ctrl-danger  { background: #dc3545; }
.map-ctrl-dark    { background: var(--togd-title); }

.map-panel-toggle {
  position: absolute;
  top: 12px;
  left: 12px;
  z-index: 1000;
  box-shadow: var(--shadow-md);
}

/* ===== ROUTE INSTRUCTIONS SIDEBAR ===== */
#route-instructions-sidebar {
  width: 0;
  height: 100%;
  background: var(--togd-white);
  border-left: 1px solid var(--togd-border);
  overflow-y: auto;
  font-size: .85rem;
  transition: width var(--transition);
  display: none;
  flex-shrink: 0;
}
#route-instructions-sidebar.active {
  width: 280px;
  display: block;
}
.instr-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 14px;
  background: linear-gradient(135deg, var(--togd-title) 0%, var(--togd-primary) 100%);
  color: var(--togd-white);
  position: sticky; top: 0;
  border-bottom: 3px solid var(--togd-yellow);
}
.instr-header h6 {
  color: var(--togd-white);
  font-family: var(--font-title);
  font-weight: 700;
}
.instr-close {
  background: rgba(255,255,255,.15);
  border: none; color: #fff;
  width: 28px; height: 28px;
  border-radius: var(--radius);
  cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  transition: background var(--transition);
}
.instr-close:hover { background: rgba(255,255,255,.3); }
#instr-content { padding: 12px; }
.no-instructions {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 30px 16px;
  text-align: center;
  color: var(--togd-body);
}
.no-instructions i { color: var(--togd-primary); opacity: .4; }
.instr-step {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 8px 0;
  border-bottom: 1px solid var(--togd-border);
  font-size: .82rem;
  color: var(--togd-body);
}
.instr-step:last-child { border-bottom: none; }
.instr-step-num {
  width: 22px; height: 22px;
  border-radius: 50%;
  background: var(--togd-primary);
  color: #fff;
  font-size: .7rem;
  font-weight: 700;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}
.instr-summary {
  background: var(--togd-smoke);
  border-radius: var(--radius);
  border-left: 3px solid var(--togd-primary);
  padding: 10px 12px;
  margin-bottom: 12px;
  font-size: .85rem;
}
.instr-summary strong { color: var(--togd-title); font-family: var(--font-title); }

/* ===== LEAFLET POPUP ===== */
.leaflet-popup-content-wrapper {
  border-radius: var(--radius) !important;
  box-shadow: var(--shadow-md) !important;
  padding: 0 !important;
  overflow: hidden;
  border-top: 3px solid var(--togd-primary) !important;
}
.leaflet-popup-content {
  margin: 0 !important;
  min-width: 220px;
  max-width: 260px;
}
.leaflet-popup-tip-container { margin-top: -1px; }

.gd-popup { color: var(--togd-black); }
.gd-popup-img {
  width: 100%;
  height: 130px;
  object-fit: cover;
  display: block;
}
.gd-popup-body { padding: 10px 12px; }
.gd-popup-cat {
  font-family: var(--font-title);
  font-size: .7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .6px;
  margin-bottom: 4px;
}
.gd-popup-title {
  font-family: var(--font-title);
  font-size: .95rem;
  font-weight: 700;
  color: var(--togd-title);
  margin-bottom: 4px;
  line-height: 1.3;
}
.gd-popup-addr {
  font-size: .78rem;
  color: var(--togd-body);
  margin-bottom: 8px;
}
.gd-popup-addr i { color: var(--togd-primary); margin-right: 3px; }
.gd-popup-rating { display: flex; align-items: center; gap: 4px; margin-bottom: 8px; }
.gd-popup-stars { color: var(--togd-yellow); font-size: .8rem; }
.gd-popup-rating-val { font-size: .78rem; font-weight: 700; color: var(--togd-title); }
.gd-popup-actions {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}
.gd-popup-btn {
  flex: 1;
  min-width: 0;
  padding: 7px 6px;
  border-radius: var(--radius);
  border: none;
  cursor: pointer;
  font-family: var(--font-title);
  font-size: .75rem;
  font-weight: 700;
  text-align: center;
  text-decoration: none;
  display: flex; align-items: center; justify-content: center; gap: 4px;
  transition: filter var(--transition);
}
.gd-popup-btn:hover { filter: brightness(1.1); }
.gd-popup-add    { background: var(--togd-yellow); color: var(--togd-title); width: 100%; margin-bottom: 4px; }
.gd-popup-call   { background: #51b04d; color: #fff; }
.gd-popup-detail { background: var(--togd-primary); color: #fff; }

/* ===== MARKER STYLES ===== */
.svg-marker-wrapper { background: none !important; border: none !important; }

/* ===== EXPORT MODAL ===== */
.togd-modal .modal-content { border-radius: var(--radius); overflow: hidden; }
.togd-modal-header {
  background: linear-gradient(135deg, var(--togd-title) 0%, var(--togd-primary) 100%);
  color: var(--togd-white);
  border-bottom: 3px solid var(--togd-yellow);
}
.togd-modal-header .modal-title {
  font-family: var(--font-title);
  color: var(--togd-white);
  font-weight: 700;
}
.export-options {
  display: flex;
  gap: 8px;
}
.export-option {
  flex: 1;
  padding: 12px 8px;
  border-radius: var(--radius);
  border: 1.5px solid var(--togd-border);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  text-align: center;
  font-size: .8rem;
  font-weight: 600;
  color: var(--togd-body);
  transition: border-color var(--transition), background var(--transition);
}
.export-option:hover { border-color: var(--togd-primary); background: var(--togd-smoke); }
.export-option.selected { border-color: var(--togd-primary); background: var(--togd-smoke); color: var(--togd-primary); }

/* ===== DETAIL MODAL ===== */
.detail-img {
  width: 100%;
  height: 220px;
  object-fit: cover;
}
.detail-body { padding: 20px; }
.detail-cat-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  border-radius: 20px;
  font-family: var(--font-title);
  font-size: .75rem;
  font-weight: 700;
  color: #fff;
  margin-bottom: 10px;
}
.detail-title {
  font-family: var(--font-title);
  font-size: 1.3rem;
  font-weight: 800;
  color: var(--togd-title);
  margin-bottom: 6px;
}
.detail-rating { display: flex; align-items: center; gap: 6px; margin-bottom: 12px; }
.detail-stars { color: var(--togd-yellow); }
.detail-desc { font-size: .9rem; color: var(--togd-body); line-height: 1.6; margin-bottom: 14px; }
.detail-info-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 0;
  border-bottom: 1px solid var(--togd-border);
  font-size: .875rem;
  color: var(--togd-body);
}
.detail-info-row:last-child { border-bottom: none; }
.detail-info-row i { width: 20px; color: var(--togd-primary); text-align: center; }
.detail-actions { display: flex; gap: 8px; margin-top: 16px; flex-wrap: wrap; }
.detail-actions .btn { flex: 1; min-width: 120px; }

/* ===== CUSTOM MARKER POPUP ===== */
.custom-marker-popup .title {
  font-family: var(--font-title);
  font-weight: 700;
  color: var(--togd-title);
  margin-bottom: 8px;
}
.cta-add-custom {
  display: flex; align-items: center; justify-content: center; gap: 6px;
  padding: 8px; border-radius: var(--radius);
  background: var(--togd-yellow); color: var(--togd-title);
  text-decoration: none;
  font-family: var(--font-title);
  font-weight: 700; font-size: .85rem;
  width: 100%;
}

/* ===== TOAST ===== */
#app-toast { background: var(--togd-title); }

/* ===== SCROLLBAR ===== */
::-webkit-scrollbar { width: 5px; height: 5px; }
::-webkit-scrollbar-track { background: var(--togd-smoke2); }
::-webkit-scrollbar-thumb { background: var(--togd-primary); opacity: .5; border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: var(--togd-primary-dark); }

/* ===== ROUTE LINE ===== */
.leaflet-routing-container { display: none !important; }

/* ===== LEAFLET PANE FIX ===== */
/* Ensure Leaflet panes have proper dimensions in flexbox containers */
#main-map .leaflet-map-pane,
#main-map .leaflet-tile-pane,
#main-map .leaflet-overlay-pane,
#main-map .leaflet-shadow-pane,
#main-map .leaflet-marker-pane,
#main-map .leaflet-tooltip-pane,
#main-map .leaflet-popup-pane {
  position: absolute;
}
#main-map .leaflet-tile-container {
  width: 256px;
  height: 256px;
}

/* ===== MARKER CLUSTERS ===== */
.cluster-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  font-family: var(--font-title);
  font-weight: 800;
  color: #fff;
  border: 3px solid rgba(255,255,255,0.85);
  box-shadow: 0 2px 8px rgba(0,0,0,.2);
  transition: transform .15s ease;
}
.cluster-icon:hover { transform: scale(1.1); }
.cluster-small  { width: 36px; height: 36px; font-size: .8rem; background: var(--togd-primary); }
.cluster-medium { width: 44px; height: 44px; font-size: .9rem; background: var(--togd-title); }
.cluster-large  { width: 54px; height: 54px; font-size: 1rem;  background: #dc3545; }

/* ===== ADDING MARKER MODE ===== */
body.adding-marker #main-map { cursor: crosshair !important; }
body.adding-marker .map-ctrl-yellow { background: #dc3545; color: #fff; box-shadow: 0 0 0 3px rgba(220,53,69,.3); }

/* ===== RESPONSIVE ===== */
@media (max-width: 1199px) {
  .nav-link-item { padding: 8px 10px; font-size: .85rem; }
}

@media (max-width: 991px) {
  :root {
    --topbar-h: 0px;
    --header-h: 60px;
    --breadcrumb-h: 90px;
  }
  #top-bar { display: none; }
  .nav-hamburger { display: flex; }
  .main-nav {
    display: none;
    position: absolute;
    top: var(--header-h);
    left: 0; right: 0;
    background: var(--togd-white);
    border-bottom: 2px solid var(--togd-primary);
    box-shadow: var(--shadow-md);
    z-index: 1040;
    padding: 12px 0;
  }
  .main-nav.open { display: block; }
  .nav-list { flex-direction: column; gap: 0; }
  .nav-link-item { padding: 12px 20px; border-radius: 0; }
  .nav-dropdown { position: static; box-shadow: none; border: none; background: var(--togd-smoke); border-radius: 0; display: none; }
  .nav-item.has-dropdown:hover .nav-dropdown { display: none; }
  .nav-item.has-dropdown.open .nav-dropdown { display: block; }

  .app-wrapper {
    flex-direction: column;
    height: auto;
    min-height: auto;
  }
  .side-panel {
    width: 100%;
    min-width: 0;
    max-height: 0;
    overflow: hidden;
    border-right: none;
    border-bottom: 1px solid var(--togd-border);
    transition: max-height .35s ease;
  }
  .side-panel.mobile-open {
    max-height: 600px;
    overflow-y: auto;
  }
  .map-area {
    height: 70vh;
    min-height: 400px;
  }
  #route-instructions-sidebar.active {
    width: 100%;
    position: absolute;
    top: 0; left: 0; right: 0;
    height: 100%;
    z-index: 500;
  }
  .page-title { font-size: 1.3rem; }
  .page-subtitle { font-size: .8rem; }
}

@media (max-width: 576px) {
  .map-area { height: 60vh; }
  .export-options { flex-wrap: wrap; }
  .export-option { min-width: calc(50% - 4px); }
  .topbar-left span:last-child { display: none; }
  .topbar-sep { display: none; }
}

/* ===== UTILITY ===== */
.text-togd-primary { color: var(--togd-primary) !important; }
.bg-togd-primary   { background: var(--togd-primary) !important; }
.text-togd-title   { color: var(--togd-title) !important; }
