/* havadurumu81 — ortak stil */

:root {
  --bg: #eef3f8;
  --surface: #ffffff;
  --surface-glass: rgba(255, 255, 255, 0.55);
  --ink: #14202b;
  --ink-muted: #5b6a78;
  --line: #dde5ec;
  --primary: #1976d2;
  --primary-ink: #ffffff;
  --accent: #ff9d42;
  --radius-sm: 10px;
  --radius: 16px;
  --radius-lg: 24px;
  --max: 1080px;
  --shadow: 0 2px 8px rgba(20, 32, 43, 0.06), 0 12px 32px rgba(20, 32, 43, 0.08);
  --shadow-md: 0 8px 24px rgba(20, 32, 43, 0.12), 0 24px 48px rgba(20, 32, 43, 0.1);
  --font-body: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;

  --sky-1: #4facfe;
  --sky-2: #a6d9ff;
}

:root[data-theme="dark"] {
  --bg: #0c1622;
  --surface: #131f2c;
  --surface-glass: rgba(255, 255, 255, 0.06);
  --ink: #eef4fa;
  --ink-muted: #9aacbb;
  --line: #223140;
  --primary: #5b9fe8;
  --primary-ink: #0c1622;
  --accent: #ffb266;
  --shadow: 0 2px 8px rgba(0, 0, 0, 0.4), 0 16px 40px rgba(0, 0, 0, 0.35);
  --shadow-md: 0 10px 28px rgba(0, 0, 0, 0.5), 0 28px 56px rgba(0, 0, 0, 0.45);
}

* { box-sizing: border-box; }
html { background: var(--bg); scroll-behavior: smooth; }

body {
  margin: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  font-family: var(--font-body);
  background: var(--bg);
  color: var(--ink);
  -webkit-font-smoothing: antialiased;
  transition: background-color .3s ease, color .3s ease;
}

main { flex: 1 0 auto; }
a { color: inherit; text-decoration: none; }
ul { margin: 0; padding: 0; list-style: none; }
img, svg { max-width: 100%; display: block; }
button { font-family: inherit; }
.wrap { max-width: var(--max); margin: 0 auto; padding: 0 20px; }

/* ---------- header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 40;
  background: var(--surface);
  border-bottom: 1px solid var(--line);
}
.site-header .wrap {
  display: flex; align-items: center; justify-content: space-between;
  height: 62px;
}
.logo { display: flex; align-items: center; gap: 8px; font-weight: 700; font-size: 1.05rem; }
.logo .dot { color: var(--primary); }
.header-nav { display: flex; align-items: center; gap: 18px; }
.header-nav a { font-size: .92rem; color: var(--ink-muted); }
.header-nav a:hover { color: var(--ink); }
.theme-toggle {
  border: 1px solid var(--line); background: var(--surface);
  color: var(--ink); border-radius: 100px; width: 36px; height: 36px;
  display: flex; align-items: center; justify-content: center; cursor: pointer;
}

/* ---------- hero / search ---------- */
.hero {
  padding: 56px 0 40px;
  text-align: center;
}
.hero h1 { font-size: clamp(1.7rem, 3.4vw, 2.5rem); margin: 0 0 10px; letter-spacing: -.02em; }
.hero p { color: var(--ink-muted); margin: 0 0 28px; font-size: 1.02rem; }

.search-box { position: relative; max-width: 460px; margin: 0 auto; }
.search-box input {
  width: 100%; height: 54px; border-radius: 100px; border: 1px solid var(--line);
  background: var(--surface); color: var(--ink); padding: 0 52px 0 22px;
  font-size: 1rem; outline: none; box-shadow: var(--shadow);
  transition: box-shadow .2s ease;
}
.search-box input:focus { box-shadow: 0 0 0 3px rgba(25, 118, 210, .18), var(--shadow); }
.search-box .search-icon {
  position: absolute; right: 18px; top: 50%; transform: translateY(-50%);
  color: var(--ink-muted); pointer-events: none;
}
.search-suggest {
  position: absolute; left: 0; right: 0; top: calc(100% + 8px);
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  box-shadow: var(--shadow-md); overflow: hidden; text-align: left; z-index: 30;
  max-height: 320px; overflow-y: auto; display: none;
}
.search-suggest.open { display: block; }
.search-suggest li a {
  display: flex; align-items: center; justify-content: space-between;
  padding: 12px 18px; font-size: .95rem;
}
.search-suggest li a:hover, .search-suggest li a.active { background: var(--bg); }
.search-suggest .il-bolge { color: var(--ink-muted); font-size: .8rem; }

.chip-row { display: flex; gap: 8px; justify-content: center; flex-wrap: wrap; margin-top: 18px; }
.chip {
  border: 1px solid var(--line); background: var(--surface); color: var(--ink-muted);
  padding: 7px 14px; border-radius: 100px; font-size: .85rem; cursor: pointer;
}
.chip:hover { color: var(--ink); border-color: var(--primary); }

/* ---------- weather hero card (city pages) ---------- */
.weather-hero {
  border-radius: var(--radius-lg);
  padding: 36px 28px;
  color: #fff;
  position: relative;
  overflow: hidden;
  box-shadow: var(--shadow-md);
  background: linear-gradient(160deg, var(--sky-1), var(--sky-2));
  transition: background .6s ease;
}
.weather-hero.cond-clear-day { background: linear-gradient(160deg, #1E88E5 0%, #4FC3F7 55%, #FFD54F 145%); }
.weather-hero.cond-clear-night { background: linear-gradient(160deg, #0B1638 0%, #2A2F6B 55%, #6A4C93 145%); }
.weather-hero.cond-cloudy { background: linear-gradient(160deg, #5C7A99 0%, #8CA0B8 55%, #C4CFD8 145%); }
.weather-hero.cond-rain { background: linear-gradient(160deg, #223245 0%, #3E6B96 55%, #4FC3F7 150%); }
.weather-hero.cond-snow { background: linear-gradient(160deg, #4FC3F7 0%, #B3E5FC 65%, #EAF6FD 145%); color: #10202c; }
.weather-hero.cond-storm { background: linear-gradient(160deg, #14162B 0%, #3B2E5A 55%, #6A4C93 150%); }
.weather-hero.cond-fog { background: linear-gradient(160deg, #7C93A6 0%, #AEBBC8 65%, #DCE3E8 145%); color: #10202c; }

.weather-hero-top {
  display: flex; align-items: flex-start; justify-content: space-between; gap: 20px;
}
.weather-hero-city { font-size: 1.4rem; font-weight: 700; }
.weather-hero-sub { opacity: .85; font-size: .92rem; margin-top: 4px; }
.weather-hero-icon { width: 84px; height: 84px; flex-shrink: 0; }
.weather-hero-temp { font-size: 4.2rem; font-weight: 200; line-height: 1; margin: 10px 0 2px; letter-spacing: -.02em; }
.weather-hero-desc { font-size: 1.05rem; opacity: .92; }
.weather-hero-feels { opacity: .8; font-size: .9rem; margin-top: 2px; }

.weather-hero-stats {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(100px, 1fr)); gap: 10px; margin-top: 26px;
}
.wh-stat {
  background: rgba(255,255,255,.16); backdrop-filter: blur(6px);
  border-radius: var(--radius-sm); padding: 12px 10px; text-align: center;
}
.weather-hero.cond-snow .wh-stat, .weather-hero.cond-fog .wh-stat { background: rgba(16,32,44,.08); }
.wh-stat .wh-label { font-size: .72rem; opacity: .8; text-transform: uppercase; letter-spacing: .04em; }
.wh-stat .wh-value { font-size: 1.05rem; font-weight: 600; margin-top: 3px; }

.fav-btn {
  background: var(--surface); border: 1px solid var(--line); border-radius: 100px;
  width: 42px; height: 42px; font-size: 1.3rem; line-height: 1; cursor: pointer;
  color: var(--ink-muted); display: flex; align-items: center; justify-content: center; flex-shrink: 0;
}
.fav-btn.active { color: #FFC93C; border-color: #FFC93C; }

/* ---------- tabs ---------- */
.tabs { display: flex; gap: 6px; margin: 28px 0 18px; border-bottom: 1px solid var(--line); }
.tab-btn {
  border: none; background: none; color: var(--ink-muted); font-size: .95rem; font-weight: 600;
  padding: 10px 16px; cursor: pointer; border-bottom: 2px solid transparent; margin-bottom: -1px;
}
.tab-btn.active { color: var(--primary); border-bottom-color: var(--primary); }
.tab-panel { display: none; }
.tab-panel.active { display: block; }

/* ---------- hourly row ---------- */
.hourly-row { display: flex; gap: 10px; overflow-x: auto; padding: 4px 2px 14px; }
.hour-card {
  flex: 0 0 auto; width: 74px; text-align: center; background: var(--surface);
  border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 12px 6px;
}
.hour-card .h-time { font-size: .78rem; color: var(--ink-muted); }
.hour-card .h-icon { width: 30px; height: 30px; margin: 6px auto; }
.hour-card .h-temp { font-weight: 700; font-size: .95rem; }

/* ---------- daily list ---------- */
.day-list { display: flex; flex-direction: column; gap: 6px; }
.day-row {
  display: grid; grid-template-columns: 100px 1fr auto auto; align-items: center; gap: 14px;
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-sm);
  padding: 12px 16px;
}
.day-row .d-name { font-weight: 600; font-size: .92rem; }
.day-row .d-date { color: var(--ink-muted); font-size: .78rem; }
.day-row .d-icon { width: 26px; height: 26px; }
.day-row .d-pop { color: #1976d2; font-size: .8rem; font-weight: 600; width: 44px; }
.day-row .d-temps { display: flex; align-items: center; gap: 8px; font-size: .92rem; justify-self: end; }
.day-row .d-temps .lo { color: var(--ink-muted); }

/* ---------- info blurb ---------- */
.city-info {
  margin-top: 34px; background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 22px 24px;
}
.city-info h2 { font-size: 1.15rem; margin: 0 0 10px; }
.city-info p { color: var(--ink-muted); line-height: 1.65; font-size: .94rem; margin: 0 0 10px; }
.related-cities { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 14px; }
.related-cities a {
  border: 1px solid var(--line); border-radius: 100px; padding: 6px 12px;
  font-size: .82rem; color: var(--ink-muted);
}
.related-cities a:hover { color: var(--primary); border-color: var(--primary); }

/* ---------- il grid (index page) ---------- */
.il-grid-section { padding: 10px 0 60px; }
.il-grid-section h2 { font-size: 1.3rem; margin-bottom: 4px; }
.il-grid-section > .wrap > p { color: var(--ink-muted); margin-top: 0; margin-bottom: 22px; }
.bolge-block { margin-bottom: 28px; }
.bolge-block h3 {
  font-size: .95rem; color: var(--ink-muted); text-transform: uppercase; letter-spacing: .04em;
  margin: 0 0 10px;
}
.il-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 8px; }
.il-grid a {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-sm);
  padding: 10px 14px; font-size: .9rem; font-weight: 500;
  display: flex; align-items: center; justify-content: space-between;
}
.il-grid a:hover { border-color: var(--primary); color: var(--primary); }

/* ---------- footer ---------- */
.site-footer { border-top: 1px solid var(--line); padding: 28px 0; margin-top: 20px; }
.site-footer .wrap {
  display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 10px;
}
.site-footer p { color: var(--ink-muted); font-size: .82rem; margin: 0; }
.site-footer p.credit { margin-top: 4px; }
.site-footer p.credit a { color: var(--primary); }
.site-footer .foot-links { display: flex; gap: 14px; }
.site-footer .foot-links a { color: var(--ink-muted); font-size: .82rem; }
.site-footer .foot-links a:hover { color: var(--ink); }

.skeleton { background: linear-gradient(90deg, var(--line) 25%, var(--bg) 50%, var(--line) 75%); background-size: 200% 100%; animation: shimmer 1.3s infinite; border-radius: 6px; }
@keyframes shimmer { to { background-position: -200% 0; } }

.breadcrumb { font-size: .82rem; color: var(--ink-muted); margin: 18px 0 0; }
.breadcrumb a:hover { color: var(--primary); }

/* ---------- Türkiye sıcaklık haritası ---------- */
.tr-map-wrap {
  max-width: 1000px; margin: 0 auto; position: relative;
  border-radius: var(--radius-lg); overflow: hidden; box-shadow: var(--shadow-md);
}
.tr-map { width: 100%; height: auto; display: block; }
.tr-map-zoom-group { transform-origin: 0 0; transition: transform .7s cubic-bezier(.22,.61,.36,1); }
.il-path {
  stroke: rgba(255,255,255,.65); stroke-width: .6; cursor: pointer;
  transition: fill .15s ease, stroke-width .15s ease; vector-effect: non-scaling-stroke;
}
.il-path:hover, .il-path:focus-visible { stroke: #fff; stroke-width: 1.4; outline: none; }
.il-path.selected { stroke: #fff; stroke-width: 1.8; }

.tr-map-back-btn {
  position: absolute; top: 14px; left: 14px; z-index: 10;
  display: inline-flex; align-items: center; gap: 6px;
  background: rgba(10,20,30,.55); color: #fff; border: none; border-radius: 999px;
  padding: 8px 16px; font-size: .82rem; font-weight: 700; cursor: pointer;
  opacity: 0; pointer-events: none; transition: opacity .25s ease;
  backdrop-filter: blur(4px);
}
.tr-map-back-btn.visible { opacity: 1; pointer-events: auto; }

.tr-map-city-panel {
  position: absolute; left: 50%; bottom: 16px; z-index: 10;
  transform: translate(-50%, 12px); background: rgba(10,20,30,.72); backdrop-filter: blur(6px);
  color: #fff; border-radius: var(--radius); padding: 14px 20px; text-align: center;
  opacity: 0; pointer-events: none; transition: opacity .3s ease .25s, transform .3s ease .25s;
}
.tr-map-city-panel.visible { opacity: 1; pointer-events: auto; transform: translate(-50%, 0); }
.tr-map-city-panel h3 { margin: 0 0 2px; font-size: 1.05rem; }
.tr-map-city-panel p { margin: 0 0 10px; font-size: .85rem; color: rgba(255,255,255,.85); }
.tr-map-city-panel a.tr-map-city-go {
  display: inline-block; background: var(--primary); color: #fff; border-radius: 100px;
  padding: 8px 16px; font-size: .85rem; font-weight: 600;
}
.tr-map-tooltip {
  position: fixed; z-index: 40; pointer-events: none;
  background: var(--ink); color: var(--bg); font-size: .82rem; font-weight: 700;
  padding: 6px 12px; border-radius: var(--radius-sm); box-shadow: var(--shadow-md);
  transform: translate(-50%, -130%); white-space: nowrap; opacity: 0; transition: opacity .1s ease;
}
.tr-map-tooltip.visible { opacity: 1; }
.tr-map-legend { display: flex; gap: 10px; justify-content: center; align-items: center; margin: 18px 0 6px; font-size: .82rem; color: var(--ink-muted); }
.tr-map-legend-bar {
  width: 180px; height: 10px; border-radius: 6px;
  background: linear-gradient(90deg, rgb(59,111,209), rgb(79,168,224), rgb(79,191,143), rgb(240,180,41), rgb(242,121,42), rgb(230,67,42));
}
.photo-credit-badge {
  position: absolute; bottom: 6px; right: 6px; z-index: 10;
  width: 18px; height: 18px; border-radius: 50%;
  background: rgba(0, 0, 0, 0.4); color: rgba(255, 255, 255, 0.75);
  font-size: 11px; font-style: italic; line-height: 1;
  display: flex; align-items: center; justify-content: center;
  opacity: 0.55; transition: opacity 0.15s ease; cursor: default;
}
.photo-credit-badge:hover, .photo-credit-badge:focus-visible { opacity: 1; }

@media (max-width: 640px) {
  .il-path { stroke-width: .9; }
}

@media (max-width: 620px) {
  .weather-hero-stats { grid-template-columns: repeat(2, 1fr); }
  .day-row { grid-template-columns: 90px 1fr auto; }
  .day-row .d-pop { display: none; }
  .header-nav a:not(.theme-anchor) { display: none; }
}
