/* AYBUGE shared Turkey project map */
.turkey-map-section {
  position: relative;
  overflow: hidden;
  margin: 48px 0 56px;
  padding: 24px 0 32px;
  border: 1px solid #e4edf3;
  border-radius: 24px;
  background: #fff;
}

.turkey-map-section__head {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 14px;
  max-width: 1240px;
  margin: 0 auto;
  padding: 0 16px 20px;
  text-align: left;
}

.turkey-map-section__badge {
  display: inline-flex;
  flex: 0 0 auto;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  margin: 0;
  border: 1px solid rgba(14, 159, 170, .2);
  border-radius: 11px;
  background: linear-gradient(135deg, rgba(14, 159, 170, .15), rgba(37, 99, 235, .15));
}

.turkey-map-section__badge svg {
  width: 20px;
  height: 20px;
  color: #0e9faa;
}

.turkey-map-section__head h3 {
  margin: 0;
  color: #071b32;
  font-size: 1.05rem;
  font-weight: 700;
  letter-spacing: -.02em;
  white-space: nowrap;
}

.turkey-map-section__head p {
  max-width: none;
  margin: 0;
  padding-left: 14px;
  border-left: 1px solid #dbe5ec;
  color: #64748b;
  font-size: .84rem;
  line-height: 1.5;
  white-space: nowrap;
}

.turkey-map-wrap {
  position: relative;
  max-width: 1240px;
  margin: 0 auto;
  padding: 0 16px;
}

.turkey-map__explorer {
  display: grid;
  grid-template-columns: 230px minmax(0, 1fr);
  gap: 10px;
  max-width: none;
  margin: 0 auto;
  padding: 0 10px;
}

.turkey-map__sidebar {
  min-width: 0;
  padding: 10px;
  border: 1px solid #e1eaf1;
  border-radius: 14px;
  background: #f8fafc;
}

.turkey-map__branch-tabs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4px;
  padding: 4px;
  border: 1px solid #dce6ed;
  border-radius: 10px;
  background: #fff;
}

.turkey-map__branch-tabs button {
  min-height: 34px;
  padding: 6px 8px;
  border: 0;
  border-radius: 7px;
  background: transparent;
  color: #61758a;
  font: inherit;
  font-size: .75rem;
  font-weight: 700;
  cursor: pointer;
}

.turkey-map__branch-tabs button.is-active {
  background: #0a2540;
  color: #fff;
  box-shadow: 0 4px 10px rgba(10, 37, 64, .14);
}

.turkey-map__sidebar-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 15px 5px 9px;
}

.turkey-map__sidebar-head strong {
  min-width: 0;
  overflow: hidden;
  color: #071b32;
  font-size: .8rem;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.turkey-map__sidebar-head span {
  flex: 0 0 auto;
  color: #0e8f99;
  font-size: .7rem;
  font-weight: 700;
}

.turkey-map__project-list {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 5px;
  max-height: 390px;
  overflow: auto;
  padding-right: 2px;
}

.turkey-map__project-button {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 8px;
  width: 100%;
  min-height: 42px;
  padding: 8px 9px 8px 11px;
  border: 1px solid transparent;
  border-radius: 9px;
  background: transparent;
  color: #526a80;
  text-align: left;
  cursor: pointer;
  transition: background-color .16s ease, border-color .16s ease, color .16s ease;
}

.turkey-map__project-button.is-all {
  grid-column: 1 / -1;
}

.turkey-map__project-button.is-numbered {
  min-height: 40px;
}

.turkey-map__project-button.is-numbered .turkey-map__project-name {
  font-size: .72rem;
  font-weight: 650;
  letter-spacing: 0;
}

.turkey-map__project-button:hover {
  border-color: #d6e5eb;
  background: #fff;
  color: #0a2540;
}

.turkey-map__project-button.is-active {
  border-color: #bfe4e7;
  background: #eaf8fa;
  color: #087f89;
}

.turkey-map__project-name {
  min-width: 0;
  overflow: hidden;
  font-size: .73rem;
  font-weight: 650;
  line-height: 1.3;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.turkey-map__project-count {
  padding: 3px 6px;
  border-radius: 999px;
  background: rgba(14, 159, 170, .1);
  color: #0b8b95;
  font-size: .64rem;
  font-weight: 700;
  white-space: nowrap;
}

.turkey-map__canvas-panel {
  min-width: 0;
  padding: 8px 8px 12px;
  border: 1px solid #e4edf3;
  border-radius: 14px;
  background: #fff;
}

.turkey-map__canvas-toolbar {
  display: flex;
  align-items: center;
  gap: 10px;
}

.turkey-map__context {
  flex: 1 1 auto;
  min-height: 22px;
  margin: 0 4px 6px;
  color: #587083;
  font-size: .73rem;
  font-weight: 600;
  text-align: center;
}

.turkey-map__context.is-empty {
  color: #a06b1d;
}

.turkey-map,
.turkey-map__svg {
  display: block;
  width: 100%;
}

.turkey-map {
  position: relative;
}

.turkey-map__svg {
  height: auto;
}

.turkey-map__province {
  fill: #e7edf2;
  stroke: #fff;
  stroke-width: .5;
  cursor: pointer;
  transition: fill .25s ease, stroke .25s ease, filter .25s ease;
}

.turkey-map__province:hover {
  fill: #d5e1e8;
  stroke: #9eb2c0;
  stroke-width: 1;
  filter: brightness(1.3);
}

.turkey-map__province--active {
  fill: var(--province-fill, #0e9faa);
  fill-opacity: .94;
  stroke: #fff;
  stroke-width: .8;
}

.turkey-map__province--active:hover {
  fill: var(--province-fill, #0e9faa);
  fill-opacity: 1;
  stroke: #fff;
  stroke-width: 1.2;
  filter: brightness(1.03) drop-shadow(0 0 5px var(--province-fill));
}

.turkey-map__expand-button {
  display: none;
}

.turkey-map__province--selected,
.turkey-map__province--selected:hover {
  stroke: #087681;
  stroke-width: 1.25;
  vector-effect: non-scaling-stroke;
  filter: brightness(1.025) drop-shadow(0 0 2px rgba(8, 118, 129, .3));
}

.turkey-map__city--selected {
  outline: none;
}

.turkey-map__svg g[data-iladi]:focus {
  outline: none;
}

.turkey-map__svg g[data-iladi]:focus-visible .turkey-map__province {
  stroke: #087681;
  stroke-width: 1.25;
  vector-effect: non-scaling-stroke;
}

.turkey-map__tooltip {
  position: absolute;
  z-index: 100;
  min-width: 180px;
  max-width: 280px;
  opacity: 0;
  pointer-events: none;
  transform: translateY(4px);
  transition: opacity .2s ease, transform .2s ease;
}

.turkey-map__tooltip.is-visible {
  opacity: 1;
  transform: translateY(0);
}

.turkey-map__tooltip-city {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 8px 14px;
  border-radius: 10px 10px 0 0;
  background: linear-gradient(135deg, rgba(14, 159, 170, .94), rgba(10, 37, 64, .96));
  color: #f0f6fc;
  font-size: .85rem;
  font-weight: 700;
}

.turkey-map__tooltip-city::before {
  content: '📍';
  font-size: .75rem;
}

.turkey-map__tooltip-body {
  padding: 10px 14px 12px;
  border: 1px solid rgba(255, 255, 255, .08);
  border-top: 0;
  border-radius: 0 0 10px 10px;
  background: rgba(15, 33, 55, .94);
  color: #c8d6e5;
  font-size: .82rem;
  backdrop-filter: blur(16px);
}

.tooltip-total {
  margin-bottom: 8px;
  padding-bottom: 6px;
  border-bottom: 1px solid rgba(255, 255, 255, .08);
  color: #f0f6fc;
  font-size: .9rem;
  font-weight: 700;
}

.tooltip-programs {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.tooltip-projects {
  display: flex;
  flex-direction: column;
  gap: 4px;
  margin-bottom: 8px;
}

.tooltip-projects span {
  display: grid;
  grid-template-columns: 24px minmax(0, 1fr);
  gap: 7px;
  color: #d9e5ef;
  font-size: .76rem;
  line-height: 1.3;
}

.tooltip-projects span b {
  color: #66d0d5;
  font-size: .7rem;
  letter-spacing: .04em;
}

.tooltip-projects small {
  color: #8fa3b5;
  font-size: .68rem;
}

.tooltip-prog {
  display: flex;
  align-items: center;
  gap: 8px;
  color: #a8c0d4;
  font-size: .8rem;
}

.tooltip-prog i {
  flex: 0 0 auto;
  width: 8px;
  height: 8px;
  border-radius: 50%;
}

.tooltip-prog strong {
  color: #f0f6fc;
  font-weight: 600;
}

.tooltip-empty {
  color: #91a8bb;
  font-size: .8rem;
  font-style: italic;
}

.turkey-map__legend {
  position: relative;
  z-index: 1;
  max-width: 1240px;
  margin: 28px auto 0;
  padding: 0 24px;
}

.turkey-map__legend-title {
  margin-bottom: 10px;
  color: #4e6277;
  font-size: .75rem;
  font-weight: 600;
  letter-spacing: .06em;
  text-align: center;
  text-transform: uppercase;
}

.turkey-map__legend-items {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 14px 22px;
}

.turkey-map__legend-item {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: #64748b;
  font-size: .8rem;
  font-weight: 500;
}

.turkey-map__legend-item i {
  flex: 0 0 auto;
  width: 12px;
  height: 12px;
  border-radius: 3px;
  background: var(--legend-color);
}

.turkey-map__legend-item--empty i {
  border: 1px solid #cbd8e1;
  background: #e7edf2;
}

.turkey-map__notice {
  position: relative;
  z-index: 1;
  max-width: 680px;
  margin: 22px auto 0;
  padding: 10px 14px;
  border: 1px solid rgba(14, 159, 170, .2);
  border-radius: 10px;
  background: rgba(14, 159, 170, .07);
  color: #587083;
  font-size: .76rem;
  line-height: 1.5;
  text-align: center;
}

.turkey-map-section--compact {
  margin: 18px 0;
  padding: 18px 0 20px;
  border-radius: 16px;
}

.turkey-map-section--compact .turkey-map-section__head {
  padding-bottom: 12px;
}

.turkey-map-section--compact .turkey-map-wrap,
.turkey-map-section--compact .turkey-map__legend {
  max-width: none;
}

.turkey-map-section--compact .turkey-map__explorer {
  max-width: none;
}

.turkey-map-section--compact .turkey-map__legend {
  margin-top: 12px;
}

@media (max-width: 768px) {
  .turkey-map-section {
    margin: 32px 0 40px;
    padding: 24px 0;
    border-radius: 18px;
  }

  .turkey-map-section--compact {
    margin: 14px 0 18px;
    padding: 18px 0;
    border-radius: 14px;
  }

  .turkey-map-section__head h3 {
    font-size: 1rem;
  }

  .turkey-map-section__head p {
    min-width: 0;
    overflow: hidden;
    font-size: .78rem;
    text-overflow: ellipsis;
  }

  .turkey-map__legend-items {
    gap: 8px 16px;
  }

  .turkey-map__legend-item {
    font-size: .75rem;
  }

  .turkey-map__explorer {
    grid-template-columns: 1fr;
    gap: 12px;
    padding: 0 12px;
  }

  .turkey-map__sidebar {
    padding: 9px;
  }

  .turkey-map__sidebar-head {
    padding: 5px 3px 8px;
  }

  .turkey-map__project-list {
    display: flex;
    gap: 6px;
    max-height: none;
    overflow-x: auto;
    overflow-y: hidden;
    padding: 0 0 3px;
    scroll-snap-type: x proximity;
    scrollbar-color: #c4d6df transparent;
    scrollbar-width: thin;
  }

  .turkey-map__project-button {
    flex: 0 0 218px;
    width: auto;
    min-width: 218px;
    min-height: 36px;
    padding-block: 6px;
    scroll-snap-align: start;
  }

  .turkey-map__project-button.is-all {
    flex-basis: 138px;
    min-width: 138px;
  }

  .turkey-map__project-button.is-numbered {
    min-height: 36px;
    padding: 6px 9px 6px 10px;
  }

  .turkey-map__project-button.is-numbered .turkey-map__project-name {
    font-size: .72rem;
  }

  .turkey-map__canvas-panel {
    padding: 8px 6px 12px;
  }

  .turkey-map {
    overflow: hidden;
    touch-action: manipulation;
  }

  .turkey-map__svg {
    width: 100%;
    max-width: 100%;
  }

  .turkey-map__province--selected,
  .turkey-map__province--selected:hover {
    stroke-width: 1.4;
    filter: brightness(1.025) drop-shadow(0 0 2px rgba(8, 118, 129, .34));
  }

  .turkey-map__canvas-toolbar {
    min-height: 36px;
    margin: 0 3px 4px;
  }

  .turkey-map__context {
    min-width: 0;
    margin: 0;
    overflow: hidden;
    text-align: left;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .turkey-map__expand-button {
    display: inline-flex;
    flex: 0 0 auto;
    align-items: center;
    justify-content: center;
    gap: 6px;
    min-height: 32px;
    padding: 6px 9px;
    border: 1px solid #c7e5e8;
    border-radius: 9px;
    background: #eef9fa;
    color: #087f89;
    font: inherit;
    font-size: .68rem;
    font-weight: 700;
  }

  .turkey-map__expand-button svg {
    width: 14px;
    height: 14px;
  }

  .turkey-map__close-icon {
    display: none;
  }

  .turkey-map__expand-button.is-close .turkey-map__expand-icon {
    display: none;
  }

  .turkey-map__expand-button.is-close .turkey-map__close-icon {
    display: block;
  }

  body.turkey-map-is-expanded {
    overflow: hidden;
  }

  .turkey-map__modal-backdrop {
    position: fixed;
    z-index: 10000;
    inset: 0;
    background: rgba(7, 27, 50, .46);
    backdrop-filter: blur(3px);
  }

  .turkey-map__canvas-panel.is-map-expanded {
    position: fixed;
    z-index: 10001;
    inset: 10px;
    display: block;
    overflow-y: auto;
    padding: 10px 8px 16px;
    border-color: #cbdde6;
    border-radius: 18px;
    box-shadow: 0 24px 70px rgba(7, 27, 50, .28);
    overscroll-behavior: contain;
  }

  .turkey-map__canvas-panel.is-map-expanded .turkey-map__canvas-toolbar {
    position: sticky;
    z-index: 4;
    top: -10px;
    margin: 0 -2px 8px;
    padding: 10px 2px 8px;
    background: rgba(255, 255, 255, .96);
    backdrop-filter: blur(12px);
  }

  .turkey-map__canvas-panel.is-map-expanded .turkey-map {
    overflow-x: auto;
    overflow-y: hidden;
    overscroll-behavior-x: contain;
    scrollbar-color: #c4d6df transparent;
    scrollbar-width: thin;
    touch-action: pan-x pan-y;
  }

  .turkey-map__canvas-panel.is-map-expanded .turkey-map__svg {
    width: 720px;
    max-width: none;
  }

  .turkey-map__canvas-panel.is-map-expanded .turkey-map__expand-button {
    border-color: #d9e3e9;
    background: #fff;
    color: #334155;
  }

  .turkey-map__tooltip {
    position: static;
    display: none;
    width: calc(100% - 24px);
    min-width: 0;
    max-width: none;
    margin: 14px auto 0;
    opacity: 1;
    transform: none;
    transition: none;
  }

  .turkey-map__tooltip.is-visible {
    display: block;
    opacity: 1;
    transform: none;
  }

  .turkey-map__tooltip-city {
    border: 1px solid #c9e9ec;
    border-bottom: 0;
    background: #eaf8fa;
    color: #071b32;
  }

  .turkey-map__tooltip-body {
    border-color: #dbe5ec;
    background: #fff;
    color: #475569;
    box-shadow: 0 10px 24px rgba(15, 33, 55, .08);
    backdrop-filter: none;
  }

  .turkey-map__tooltip .tooltip-total,
  .turkey-map__tooltip .tooltip-prog strong {
    color: #071b32;
  }

  .turkey-map__tooltip .tooltip-total {
    border-bottom-color: #e4edf3;
  }

  .turkey-map__tooltip .tooltip-prog,
  .turkey-map__tooltip .tooltip-empty {
    color: #64748b;
  }

  .turkey-map__tooltip .tooltip-projects span {
    color: #334155;
  }

  .turkey-map__tooltip .tooltip-projects small {
    color: #64748b;
  }
}

@media (max-width: 480px) {
  .turkey-map-section__badge {
    width: 36px;
    height: 36px;
    border-radius: 10px;
  }

  .turkey-map-section__badge svg {
    width: 18px;
    height: 18px;
  }

  .turkey-map-section__head h3 {
    font-size: .95rem;
  }

  .turkey-map-section__head p {
    display: none;
  }

  .turkey-map-wrap {
    padding: 0 6px;
  }

  .turkey-map__explorer {
    padding: 0 8px;
  }

  .turkey-map__expand-button {
    width: 31px;
    min-width: 31px;
    min-height: 31px;
    padding: 0;
    border-radius: 9px;
    box-shadow: 0 3px 9px rgba(8, 127, 137, .08);
  }

  .turkey-map__expand-button span {
    display: none;
  }

  .turkey-map__expand-button svg {
    width: 13px;
    height: 13px;
  }

  .turkey-map__legend-items {
    gap: 6px 12px;
  }

  .turkey-map__legend-item {
    font-size: .72rem;
  }
}
