:root {
  --bg: #cfe9f7;
  --bg-2: #b7dff2;
  --surface: #eaf6fc;
  --ink: #16324a;
  --muted: #4a6a80;
  --accent: #1f7f8a;
  --accent-2: #b8860b;
  --line: rgba(22, 50, 74, 0.14);
  --radius: 10px;
  --font-display: "Lato", system-ui, sans-serif;
  --font-body: "Lato", system-ui, sans-serif;
  --max: 1080px;
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  font-family: var(--font-body);
  color: var(--ink);
  background: var(--bg);
  min-height: 100vh;
  line-height: 1.55;
}

a { color: var(--accent); text-decoration: none; }
a:hover { color: #155e66; }
img, video { max-width: 100%; display: block; }

.page-shell { min-height: 100vh; display: flex; flex-direction: column; }
.site-header-bar {
  width: 100%;
  background: #d8f0d0;
  border-bottom: 3px solid rgba(22, 50, 74, 0.35);
}
.site-header, .site-main, .site-footer, .admin-header, .admin-main {
  width: min(100% - 2rem, var(--max));
  margin-inline: auto;
}
.site-header, .admin-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1.25rem 0;
}
.admin-header {
  border-bottom: 3px solid rgba(22, 50, 74, 0.35);
}
.brand, .brand-hero {
  font-family: var(--font-display);
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--ink);
}
.brand-group {
  display: flex;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 0.15rem 0.2rem;
  min-width: 0;
}
.brand { font-size: 1.85rem; line-height: 1.2; }
.brand-tagline {
  font-size: 1.08rem;
  font-weight: 700;
  line-height: 1.2;
  color: var(--ink);
  white-space: nowrap;
}
.brand span, .brand-hero span { color: var(--accent); }
.site-nav, .admin-header nav {
  display: flex;
  gap: 1rem;
  align-items: center;
  flex-wrap: wrap;
}
.site-nav {
  gap: 1.35rem;
}
.site-nav a {
  color: var(--ink);
  font-size: 1.08rem;
  font-weight: 600;
  padding: 0.55rem 1.1rem;
  border: 1px solid rgba(22, 50, 74, 0.28);
  border-radius: 999px;
  background: transparent;
  line-height: 1.2;
}
.site-nav a:hover {
  border-color: var(--accent);
  color: var(--accent);
}
.admin-header nav a { color: var(--ink); }
.nav-toggle {
  display: none;
  background: transparent;
  border: 1px solid var(--line);
  color: var(--ink);
  border-radius: 8px;
  padding: 0.35rem 0.6rem;
}
.site-main, .admin-main { flex: 1; padding: 2rem 0 3rem; }
/* Ana sayfa: header çizgisinin hemen altı */
.site-main:has(.home-photo),
.site-main:has(.weather-strip-top),
.site-main:has(.daily-word-strip),
.site-main:has(.hero) {
  padding-top: 0.75rem;
}

.home-photo {
  margin: 0 auto 2rem;
  width: min(100%, 420px);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.3rem;
}
.home-photo-media {
  width: 100%;
  aspect-ratio: 3 / 4;
  max-height: min(70vh, 560px);
  overflow: hidden;
  border-radius: 22px;
}
.home-photo-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  display: block;
}
.site-footer-bar {
  width: 100%;
  background: #d8f0d0;
  border-top: 3px solid rgba(22, 50, 74, 0.35);
}
.site-footer {
  padding: 0.2rem 0 1.25rem;
  color: var(--muted);
  font-size: 0.95rem;
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
}
.site-footer p {
  margin: 0;
}
.footer-views {
  margin-left: auto;
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
}

.hero {
  padding: 0 0 2.5rem;
  max-width: 100%;
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(180px, 0.7fr);
  gap: 1.75rem 2rem;
  align-items: start;
}
.hero-copy { min-width: 0; }
.brand-hero {
  font-size: clamp(2.8rem, 8vw, 4.8rem);
  line-height: 1;
  margin: 0 0 1rem;
}
.lede {
  color: var(--muted);
  font-size: 1.15rem;
  margin: 0 0 1.5rem;
  white-space: nowrap;
  max-width: 100%;
}
.hero-frame {
  margin: 0;
  width: 100%;
  max-height: none;
  border: none;
  border-radius: 0;
  overflow: visible;
  background: transparent;
  justify-self: end;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.3rem;
}
.hero-frame-media {
  width: 100%;
  aspect-ratio: 3 / 4;
  max-height: min(62vh, 520px);
  overflow: hidden;
  border-radius: 22px;
}
.hero-frame-media img,
.hero-frame img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  display: block;
}
.hero-caption,
.media-caption {
  margin: 0;
  padding: 0.15rem 0.25rem 0;
  text-align: center;
  font-style: italic;
  font-size: 0.85rem;
  line-height: 1.35;
  color: var(--muted);
  max-width: 100%;
}
.hero-frame-empty {
  min-height: 240px;
  aspect-ratio: 3 / 4;
  max-height: min(62vh, 520px);
}
@media (max-width: 900px) {
  .lede {
    white-space: normal;
  }
  .hero {
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }
  .hero-frame {
    justify-self: stretch;
  }
  .hero-frame-media,
  .hero-frame-empty {
    max-height: min(55vh, 420px);
    aspect-ratio: 4 / 5;
  }
}
.hero-actions { display: flex; gap: 0.75rem; flex-wrap: wrap; }

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  padding: 0.65rem 1.15rem;
  border: 1px solid transparent;
  font-weight: 600;
  cursor: pointer;
}
.btn.primary { background: var(--accent); color: #ffffff; }
.btn.ghost { background: transparent; border-color: var(--line); color: var(--ink); }
.btn.ghost:hover { border-color: var(--accent); }

.weather-strip {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem 1.25rem;
  padding: 0.9rem 1.1rem;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  margin-bottom: 2rem;
  color: var(--muted);
}
.weather-strip-top {
  margin-top: 0;
  margin-bottom: 0.75rem;
}
.weather-strip strong { color: var(--ink); }

.daily-word-strip {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.35rem;
  padding: 0.9rem 1.1rem;
  border: 1px solid rgba(22, 50, 74, 0.18);
  border-radius: var(--radius);
  background: #efe8f8;
  margin-bottom: 0.75rem;
  color: var(--ink);
  text-align: left;
}
.daily-word-text {
  font-weight: 400;
}
.daily-word-text strong, .daily-word-text b {
  font-weight: 700;
}
.daily-word-text em, .daily-word-text i {
  font-style: italic;
}
.daily-word-source {
  color: var(--muted);
  font-size: 0.8rem;
  font-style: italic;
}

.section { margin-top: 1rem; }
.section-head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 1rem;
  margin-bottom: 1.25rem;
}
.section-head h1, .section-head h2, .article-header h1 { font-family: var(--font-display); margin: 0; }
.meta { color: var(--muted); font-size: 0.92rem; }
.link-list {
  list-style: none;
  padding: 0;
  margin: 1.25rem 0 0;
  display: grid;
  gap: 1.35rem;
}
.link-item { margin: 0; }
.link-url, .link-desc {
  margin: 0;
  line-height: 1.5;
}
.link-url { word-break: break-word; }
.link-desc {
  margin-top: 0.25rem;
  padding-left: 1.1rem;
  color: var(--ink);
}
.link-bullet {
  display: inline-block;
  width: 1rem;
  font-weight: 700;
}
.empty { color: var(--muted); }

.post-grid, .gallery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 1.25rem;
}
.post-teaser, .weather-card {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--surface);
}
.gallery-item {
  margin: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.3rem;
  background: transparent;
  border: none;
  overflow: visible;
}
.teaser-media { aspect-ratio: 16/10; overflow: hidden; background: var(--bg-2); }
.teaser-media img { width: 100%; height: 100%; object-fit: cover; }
.gallery-item > a,
.gallery-item > video {
  width: 100%;
  border-radius: 16px;
  overflow: hidden;
  display: block;
}
.gallery-item img {
  width: 100%;
  aspect-ratio: 4 / 5;
  object-fit: cover;
  display: block;
  border-radius: 16px;
}
.teaser-body, .weather-card { padding: 1rem; }
.gallery-item .media-caption {
  padding: 0.15rem 0.35rem 0.25rem;
}
.teaser-body h3 { font-family: var(--font-display); font-size: 1.2rem; margin: 0.2rem 0 0.5rem; }
.teaser-body h3 a { color: var(--ink); }
.teaser-body p { margin: 0; color: var(--muted); }

.filter-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-bottom: 1.5rem;
}
.filter-bar input, .filter-bar select,
.stack-form input, .stack-form textarea, .stack-form select {
  width: 100%;
  background: #ffffff;
  color: var(--ink);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 0.65rem 0.75rem;
  font: inherit;
}
.filter-bar input, .filter-bar select { width: auto; min-width: 160px; }
.chip, .chip-check {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.4rem 0.75rem;
  border-radius: 999px;
  border: 1px solid var(--line);
  color: var(--ink);
  background: var(--surface);
}
.chip.active { border-color: var(--accent); color: var(--accent); }

.article { max-width: 720px; }
.article-header { margin-bottom: 1.5rem; }
.article-cover { margin: 0 0 1.5rem; }
.article-cover figcaption { color: var(--muted); font-size: 0.9rem; padding: 0.6rem 0 0; }
.prose h2, .prose h3 { font-family: var(--font-display); }
.prose p, .prose ul, .prose ol { color: var(--ink); }
.prose pre, .preview-box {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 1rem;
  overflow: auto;
}
.narrow { max-width: 640px; }
.weather-temp { font-family: var(--font-display); font-size: 3rem; margin: 0.2rem 0; }
.weather-stats { list-style: none; padding: 0; display: grid; gap: 0.6rem; }
.weather-stats li { display: flex; justify-content: space-between; border-bottom: 1px solid var(--line); padding: 0.4rem 0; }

.admin-body { background: var(--bg); color: var(--ink); min-height: 100vh; }
.admin-body .page-shell { min-height: 100vh; }
.admin-login { max-width: 380px; margin: 4rem auto; }
.stack-form { display: grid; gap: 0.9rem; }
.stack-form label { display: grid; gap: 0.35rem; font-weight: 600; }
.split, .split-panels { display: grid; gap: 1rem; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); }
.admin-table { width: 100%; border-collapse: collapse; }
.admin-table th, .admin-table td { text-align: left; padding: 0.7rem 0.4rem; border-bottom: 1px solid var(--line); }
.row-actions { display: flex; gap: 0.75rem; align-items: center; }
.linkish, form.inline { display: inline; }
.linkish {
  background: none; border: none; color: #b33a3a; cursor: pointer; font: inherit; padding: 0;
}
.form-error { color: #b33a3a; }
.plain-list { list-style: none; padding: 0; }
.plain-list li { padding: 0.4rem 0; border-bottom: 1px solid var(--line); }
.chip-list { display: flex; flex-wrap: wrap; gap: 0.5rem; }
.doc-link {
  display: grid; place-items: center; min-height: 140px; padding: 1rem;
  background: var(--bg-2); color: var(--ink);
}

@media (max-width: 720px) {
  .nav-toggle { display: inline-flex; }
  .site-nav {
    display: none;
    width: 100%;
    flex-direction: column;
    align-items: flex-start;
  }
  body.nav-open .site-nav { display: flex; }
  .site-header { flex-wrap: wrap; }
  .hero { padding-top: 0; }
  .brand-tagline {
    white-space: normal;
    font-weight: 600;
  }
}
