/* =============================================
   Hava Durumu Türkiye - Ana Stil Dosyası
   Mobile-First, Core Web Vitals Optimized
   ============================================= */

:root {
  --primary:    #1565C0;
  --primary-lt: #1976D2;
  --primary-dk: #0D47A1;
  --accent:     #FF6F00;
  --sky:        #E3F2FD;
  --sky-mid:    #BBDEFB;
  --text:       #1A1A2E;
  --text-muted: #546E7A;
  --border:     #CFD8DC;
  --white:      #FFFFFF;
  --card-bg:    #FFFFFF;
  --body-bg:    #F0F4F8;
  --shadow:     0 2px 12px rgba(21,101,192,.10);
  --radius:     12px;
  --radius-sm:  8px;
  --font-body:  'Nunito', sans-serif;
  --font-head:  'Oswald', sans-serif;
  --transition: .2s ease;
}

/* ---- Reset & Base ---- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; font-size: 16px; }
body {
  font-family: var(--font-body);
  background: var(--body-bg);
  color: var(--text);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--primary); text-decoration: none; }
a:hover { text-decoration: underline; }
ul { list-style: none; }

/* ---- Layout ---- */
.container { width: 100%; max-width: 1140px; margin: 0 auto; padding: 0 16px; }
.page-wrap { display: flex; flex-direction: column; gap: 24px; padding: 24px 0 40px; }
.main-col { min-width: 0; }
.sidebar { display: none; }

@media (min-width: 900px) {
  .page-wrap { flex-direction: row; align-items: flex-start; }
  .main-col { flex: 1; }
  .sidebar { display: block; width: 300px; flex-shrink: 0; }
}

/* ---- Ads ---- */
.ad-top { background: #f8f8f8; text-align: center; padding: 8px 0; min-height: 90px; border-bottom: 1px solid var(--border); }
.ad-mid  { background: #f8f8f8; text-align: center; padding: 12px; margin: 24px 0; min-height: 250px; border: 1px dashed var(--border); border-radius: var(--radius-sm); }
.ad-sidebar { background: #f8f8f8; text-align: center; padding: 12px; min-height: 250px; border: 1px dashed var(--border); border-radius: var(--radius-sm); margin-bottom: 20px; }

/* ---- Header ---- */
.site-header {
  background: linear-gradient(135deg, var(--primary-dk) 0%, var(--primary-lt) 100%);
  color: #fff;
  box-shadow: 0 3px 16px rgba(13,71,161,.3);
  position: sticky; top: 0; z-index: 200;
}
.header-inner {
  display: flex;
  align-items: center;
  height: 60px;
  gap: 12px;
}
.logo {
  display: flex; align-items: center; gap: 8px;
  text-decoration: none; flex: 1;
}
.logo-icon { font-size: 1.7rem; line-height: 1; }
.logo-text  { font-family: var(--font-head); font-size: 1.25rem; color: #fff; letter-spacing: .5px; }

/* ---- Hamburger butonu ---- */
.nav-toggle {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 5px;
  width: 40px; height: 40px;
  background: rgba(255,255,255,.15);
  border: none;
  border-radius: 8px;
  cursor: pointer;
  padding: 0;
  flex-shrink: 0;
  /* Sola al */
  order: -1;
}
.hamburger-bar {
  display: block;
  width: 22px; height: 2px;
  background: #fff;
  border-radius: 2px;
  transition: transform .25s ease, opacity .25s ease;
  pointer-events: none;
}
/* X animasyonu — menü açıkken */
body.menu-open .hamburger-bar:nth-child(1) { transform: translateY(7px) rotate(45deg); }
body.menu-open .hamburger-bar:nth-child(2) { opacity: 0; }
body.menu-open .hamburger-bar:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ---- Masaüstü nav ---- */
.desktop-nav { display: none; }

@media (min-width: 768px) {
  .nav-toggle  { display: none; }
  .desktop-nav { display: block; }
  .desktop-nav ul {
    display: flex; gap: 4px; list-style: none; margin: 0; padding: 0;
  }
  .desktop-nav a {
    color: rgba(255,255,255,.9); font-size: .9rem; font-weight: 600;
    padding: 6px 12px; border-radius: 6px; display: block; text-decoration: none;
  }
  .desktop-nav a:hover { background: rgba(255,255,255,.15); color: #fff; }
}

/* ════════════════════════════════════════════════════
   MOBİL DRAWER — SOL'DAN AÇILAN MENÜ
   ════════════════════════════════════════════════════ */

/* Karartma katmanı */
.nav-overlay {
  display: none;
  position: fixed;
  inset: 0;                         /* top/right/bottom/left: 0 */
  background: rgba(0,0,0,.55);
  z-index: 300;
  opacity: 0;
  transition: opacity .3s ease;
}
.nav-overlay.active {
  display: block;
  opacity: 1;
}

/* Drawer kutusu */
.mobile-drawer {
  position: fixed;
  top: 0; left: 0; bottom: 0;
  width: 280px;
  background: var(--primary-dk);
  z-index: 400;
  overflow-y: auto;
  transform: translateX(-100%);     /* başlangıçta görünmez */
  transition: transform .3s cubic-bezier(.4,0,.2,1);
  -webkit-overflow-scrolling: touch;
}
.mobile-drawer.open {
  transform: translateX(0);        /* açık konum */
}

/* Drawer başlık */
.drawer-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 20px;
  background: rgba(0,0,0,.2);
  border-bottom: 1px solid rgba(255,255,255,.1);
  position: sticky; top: 0;
}
.drawer-logo {
  font-family: var(--font-head);
  font-size: 1.1rem;
  color: #fff;
}
.drawer-close {
  background: rgba(255,255,255,.15);
  border: none;
  color: #fff;
  font-size: 1rem;
  width: 32px; height: 32px;
  border-radius: 6px;
  cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}
.drawer-close:hover { background: rgba(255,255,255,.25); }

/* Drawer linkler */
.drawer-links {
  list-style: none;
  margin: 0; padding: 8px 0 24px;
}
.drawer-links li a {
  display: block;
  padding: 11px 20px;
  color: rgba(255,255,255,.88);
  font-size: .95rem;
  font-weight: 600;
  text-decoration: none;
  border-left: 3px solid transparent;
  transition: background .15s, border-color .15s, color .15s;
}
.drawer-links li a:hover,
.drawer-links li a:active {
  background: rgba(255,255,255,.1);
  border-left-color: #fff;
  color: #fff;
}
.drawer-divider {
  font-size: .7rem;
  font-weight: 800;
  letter-spacing: 1.2px;
  text-transform: uppercase;
  color: rgba(255,255,255,.4);
  padding: 14px 20px 6px;
}

/* Body scroll kilidi — menü açıkken */
body.menu-open {
  overflow: hidden;
}

/* ---- Breadcrumb ---- */
.breadcrumb { font-size: .82rem; color: var(--text-muted); padding: 10px 0; }
.breadcrumb a { color: var(--primary); }
.breadcrumb span { margin: 0 5px; }

/* ---- Page Title ---- */
.page-title-section { margin-bottom: 20px; }
.page-title-section h1 { font-family: var(--font-head); font-size: 1.9rem; color: var(--primary-dk); letter-spacing: .3px; }
.page-title-section .subtitle { color: var(--text-muted); font-size: .95rem; margin-top: 4px; }

/* ---- Cards ---- */
.card {
  background: var(--card-bg);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 20px;
  margin-bottom: 20px;
}
.card-title {
  font-family: var(--font-head);
  font-size: 1.1rem;
  color: var(--primary);
  margin-bottom: 16px;
  padding-bottom: 8px;
  border-bottom: 2px solid var(--sky-mid);
  display: flex;
  align-items: center;
  gap: 8px;
}

/* ---- Current Weather Card ---- */
.current-weather {
  background: linear-gradient(135deg, #1565C0 0%, #42A5F5 100%);
  color: #fff;
  border-radius: var(--radius);
  padding: 28px 24px;
  margin-bottom: 20px;
  box-shadow: 0 4px 20px rgba(21,101,192,.25);
}
.cw-top { display: flex; justify-content: space-between; align-items: flex-start; flex-wrap: wrap; gap: 12px; }
.cw-city { font-size: .95rem; opacity: .85; font-weight: 600; }
.cw-date { font-size: .85rem; opacity: .75; }
.cw-main { display: flex; align-items: center; gap: 16px; margin-top: 12px; }
.cw-icon { font-size: 4rem; line-height: 1; }
.cw-temp { font-family: var(--font-head); font-size: 4rem; line-height: 1; }
.cw-temp sup { font-size: 1.8rem; vertical-align: super; }
.cw-desc { font-size: 1.1rem; opacity: .9; margin-top: 4px; font-weight: 600; }
.cw-details { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; margin-top: 20px; }
@media (min-width: 480px) { .cw-details { grid-template-columns: repeat(4, 1fr); } }
.cw-detail { background: rgba(255,255,255,.15); border-radius: 8px; padding: 10px 12px; text-align: center; }
.cw-detail-label { font-size: .72rem; opacity: .8; text-transform: uppercase; letter-spacing: .5px; }
.cw-detail-val { font-size: 1.1rem; font-weight: 700; margin-top: 2px; }

/* ---- Hourly ---- */
.hourly-scroll { display: flex; gap: 10px; overflow-x: auto; padding-bottom: 8px; scroll-snap-type: x mandatory; }
.hourly-scroll::-webkit-scrollbar { height: 4px; }
.hourly-scroll::-webkit-scrollbar-track { background: var(--sky); border-radius: 2px; }
.hourly-scroll::-webkit-scrollbar-thumb { background: var(--primary-lt); border-radius: 2px; }
.hour-card {
  flex-shrink: 0;
  scroll-snap-align: start;
  background: var(--sky);
  border-radius: var(--radius-sm);
  padding: 12px 14px;
  text-align: center;
  min-width: 75px;
  border: 1px solid var(--sky-mid);
}
.hour-time { font-size: .75rem; font-weight: 700; color: var(--primary); }
.hour-icon { font-size: 1.6rem; margin: 6px 0; }
.hour-temp { font-size: 1rem; font-weight: 700; }
.hour-rain { font-size: .72rem; color: #1565C0; margin-top: 3px; }

/* ---- 7-Day Forecast ---- */
.day-list { display: flex; flex-direction: column; gap: 8px; }
.day-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: var(--sky);
  border-radius: var(--radius-sm);
  padding: 10px 16px;
  border: 1px solid var(--sky-mid);
}
.day-name { font-weight: 700; min-width: 40px; font-size: .9rem; }
.day-icon { font-size: 1.5rem; }
.day-desc { flex: 1; padding: 0 12px; color: var(--text-muted); font-size: .85rem; }
.day-temps { display: flex; gap: 10px; font-weight: 700; font-size: .95rem; }
.day-max { color: var(--text); }
.day-min { color: var(--text-muted); }

/* ---- City Grid (Homepage) ---- */
.city-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
@media (min-width: 600px) { .city-grid { grid-template-columns: repeat(3, 1fr); } }
@media (min-width: 900px) { .city-grid { grid-template-columns: repeat(4, 1fr); } }
.city-card {
  background: var(--card-bg);
  border-radius: var(--radius);
  padding: 16px;
  text-align: center;
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
  transition: transform var(--transition), box-shadow var(--transition);
  text-decoration: none;
  display: block;
  color: var(--text);
}
.city-card:hover { transform: translateY(-3px); box-shadow: 0 6px 20px rgba(21,101,192,.15); text-decoration: none; }
.city-card .cc-icon { font-size: 2rem; margin-bottom: 6px; }
.city-card .cc-name { font-family: var(--font-head); font-size: 1rem; color: var(--primary); }
.city-card .cc-temp { font-size: 1.5rem; font-weight: 800; margin: 4px 0; }
.city-card .cc-desc { font-size: .78rem; color: var(--text-muted); }

/* ---- SEO Content ---- */
.seo-content { background: var(--card-bg); border-radius: var(--radius); padding: 24px; margin-bottom: 20px; box-shadow: var(--shadow); }
.seo-content h2 { font-family: var(--font-head); font-size: 1.3rem; color: var(--primary-dk); margin: 20px 0 10px; }
.seo-content h2:first-child { margin-top: 0; }
.seo-content h3 { font-family: var(--font-head); font-size: 1.1rem; color: var(--primary); margin: 16px 0 8px; }
.seo-content p { margin-bottom: 12px; color: #37474F; line-height: 1.75; }
.seo-content ul { padding-left: 20px; list-style: disc; margin-bottom: 12px; }
.seo-content ul li { margin-bottom: 6px; color: #37474F; }

/* ---- Sidebar ---- */
.sidebar .card { margin-bottom: 16px; }
.sidebar-city-list { display: flex; flex-direction: column; gap: 6px; }
.sidebar-city-list a {
  display: flex; justify-content: space-between; align-items: center;
  padding: 8px 12px; background: var(--sky); border-radius: var(--radius-sm);
  color: var(--text); font-size: .9rem; font-weight: 600; border: 1px solid var(--sky-mid);
  transition: background var(--transition);
}
.sidebar-city-list a:hover { background: var(--sky-mid); text-decoration: none; }

/* ---- Alert/Error ---- */
.weather-error {
  background: #FFF3E0; border: 1px solid #FFB74D; border-radius: var(--radius);
  padding: 20px; text-align: center; color: #E65100;
}

/* ---- Footer ---- */
.site-footer {
  background: var(--primary-dk);
  color: rgba(255,255,255,.85);
  padding: 36px 0 16px;
  margin-top: 40px;
}
.footer-grid { display: grid; gap: 24px; grid-template-columns: 1fr; margin-bottom: 28px; }
@media (min-width: 600px) { .footer-grid { grid-template-columns: repeat(3, 1fr); } }
.footer-col h3 { font-family: var(--font-head); color: #fff; font-size: 1rem; margin-bottom: 12px; }
.footer-col ul { display: flex; flex-direction: column; gap: 6px; }
.footer-col ul li a { color: rgba(255,255,255,.75); font-size: .85rem; }
.footer-col ul li a:hover { color: #fff; }
.footer-col p { font-size: .85rem; color: rgba(255,255,255,.7); }
.footer-bottom { border-top: 1px solid rgba(255,255,255,.15); padding-top: 16px; text-align: center; font-size: .8rem; color: rgba(255,255,255,.5); }
.footer-bottom a { color: rgba(255,255,255,.7); }

/* ---- Utility ---- */
.text-center { text-align: center; }
.mt-0 { margin-top: 0; }
.badge { display: inline-block; background: var(--sky-mid); color: var(--primary-dk); border-radius: 20px; padding: 2px 10px; font-size: .78rem; font-weight: 700; }
.section-label { font-family: var(--font-head); font-size: .8rem; text-transform: uppercase; letter-spacing: 1px; color: var(--text-muted); margin-bottom: 12px; }

/* ---- Loader ---- */
.loader { text-align: center; padding: 40px; color: var(--text-muted); font-size: 1.1rem; }

/* ---- Print ---- */
@media print {
  .ad-top, .ad-mid, .ad-sidebar, .site-header, .site-footer { display: none; }
}
