/*
Theme Name: Kırşehir Güncel ESH
Description: Ensonhaber mimarisinde, Yoast SEO uyumlu, native manşet sistemli ve admin panelli haber teması.
Version: 1.0.0
Text Domain: kg-esh
*/

:root {
  --kg-red: #e30613;
  --kg-red-hover: #c20510;
  --kg-bg: #ffffff;
  --kg-surface: #f8f9fa;
  --kg-surface-alt: #f1f5f9;
  --kg-text: #111827;
  --kg-text-muted: #4b5563;
  --kg-border: #e5e7eb;
  --kg-navy: #131f33;
  --kg-navy-dark: #0b111c;
  --kg-finance-bg: #0e4d82;
  --kg-radius: 6px;
  --kg-container: 1200px;
  --kg-font: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

[data-theme="dark"] {
  --kg-bg: #0f172a;
  --kg-surface: #1e293b;
  --kg-surface-alt: #273549;
  --kg-text: #f8fafc;
  --kg-text-muted: #94a3b8;
  --kg-border: #334155;
}

*, *::before, *::after {
  box-sizing: border-box;
}

html, body {
  margin: 0;
  padding: 0;
  max-width: 100%;
  overflow-x: clip;
  background-color: var(--kg-bg);
  color: var(--kg-text);
  font-family: var(--kg-font);
  font-size: 15px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

a {
  color: inherit;
  text-decoration: none;
  transition: color .18s ease, opacity .18s ease;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  border: 0;
}

.esh-container {
  width: 100%;
  max-width: var(--kg-container);
  margin: 0 auto;
  padding: 0 16px;
}

/* ==================== HEADER ==================== */
.esh-header {
  background: var(--kg-bg);
  border-bottom: 1px solid var(--kg-border);
  position: sticky;
  top: 0;
  z-index: 900;
}

.esh-header-top {
  border-bottom: 1px solid var(--kg-border);
  height: 60px;
  display: flex;
  align-items: center;
}

.esh-header-top-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.esh-logo {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-weight: 900;
  font-size: 22px;
  letter-spacing: -0.5px;
  line-height: 1;
}

.esh-logo img {
  max-height: 36px;
  width: auto;
}

.esh-logo-box {
  background: var(--kg-red);
  color: #ffffff;
  padding: 5px 8px;
  border-radius: 4px;
  font-size: 18px;
}

.esh-logo-dark-text {
  color: var(--kg-text);
}

.esh-header-actions {
  display: flex;
  align-items: center;
  gap: 18px;
  font-size: 13px;
  font-weight: 600;
  color: var(--kg-text);
}

.esh-action-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: transparent;
  border: none;
  color: var(--kg-text);
  font-family: inherit;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  padding: 6px 8px;
  border-radius: 4px;
}

.esh-action-btn:hover {
  color: var(--kg-red);
  background: var(--kg-surface);
}

.esh-nav-bar {
  height: 46px;
  display: flex;
  align-items: center;
}

.esh-nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.esh-primary-menu {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  align-items: center;
  gap: 20px;
  overflow-x: auto;
  scrollbar-width: none;
}

.esh-primary-menu::-webkit-scrollbar {
  display: none;
}

.esh-primary-menu li a {
  display: inline-block;
  font-size: 13px;
  font-weight: 800;
  text-transform: uppercase;
  white-space: nowrap;
  padding: 12px 0;
  letter-spacing: 0.2px;
}

.esh-primary-menu li a:hover,
.esh-primary-menu li.current-menu-item a {
  color: var(--kg-red);
}

.esh-menu-toggle {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: transparent;
  border: none;
  color: var(--kg-text);
  font-weight: 800;
  font-size: 13px;
  cursor: pointer;
  flex-shrink: 0;
}

/* ==================== REKLAM ALANLARI ==================== */
.esh-ad-slot {
  width: 100%;
  margin: 18px 0;
  display: flex;
  justify-content: center;
  align-items: center;
  overflow: hidden;
  text-align: center;
}

/* ==================== HERO / MANŞET ALANI ==================== */
.esh-hero-section {
  padding-top: 18px;
  padding-bottom: 18px;
}

.esh-hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 340px;
  gap: 16px;
  align-items: stretch;
}

/* Sol Ana Manşet Slider */
.esh-main-slider {
  position: relative;
  background: #000;
  border-radius: 4px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.esh-main-slides {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9.2;
  overflow: hidden;
}

.esh-main-slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  pointer-events: none;
  transition: opacity .25s ease;
}

.esh-main-slide.is-active {
  opacity: 1;
  pointer-events: auto;
  z-index: 2;
}

.esh-main-slide img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.esh-main-slide-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(0,0,0,0.88) 0%, rgba(0,0,0,0.28) 45%, rgba(0,0,0,0) 75%);
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: 24px 26px;
}

.esh-slide-cat {
  display: inline-block;
  align-self: flex-start;
  background: var(--kg-red);
  color: #fff;
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
  padding: 3px 8px;
  border-radius: 3px;
  margin-bottom: 8px;
}

.esh-main-slide-title {
  margin: 0;
  color: #ffffff;
  font-size: 28px;
  font-weight: 900;
  line-height: 1.18;
  text-shadow: 0 2px 10px rgba(0,0,0,0.6);
}

.esh-slider-numbers {
  display: flex;
  align-items: stretch;
  background: #111111;
  height: 36px;
  overflow-x: auto;
  scrollbar-width: none;
}

.esh-slider-num {
  flex: 1;
  min-width: 30px;
  border: none;
  border-right: 1px solid rgba(255,255,255,0.08);
  background: transparent;
  color: #e5e7eb;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  transition: background .15s ease;
}

.esh-slider-num:hover,
.esh-slider-num.is-active {
  background: var(--kg-red);
  color: #ffffff;
}

/* Sağ Yan Manşet Slider */
.esh-side-slider {
  position: relative;
  background: #111;
  border-radius: 4px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.esh-side-slides {
  position: relative;
  flex: 1;
  min-height: 360px;
  overflow: hidden;
}

.esh-side-slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  pointer-events: none;
  transition: opacity .25s ease;
}

.esh-side-slide.is-active {
  opacity: 1;
  pointer-events: auto;
  z-index: 2;
}

.esh-side-slide img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.esh-side-slide-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(0,0,0,0.92) 0%, rgba(0,0,0,0.35) 50%, rgba(0,0,0,0) 80%);
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: 18px;
}

.esh-side-slide-title {
  margin: 0;
  color: #ffffff;
  font-size: 20px;
  font-weight: 800;
  line-height: 1.25;
}

.esh-side-controls {
  height: 36px;
  background: #111111;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 10px;
}

.esh-side-arrow {
  background: transparent;
  border: none;
  color: #ffffff;
  font-size: 16px;
  cursor: pointer;
  padding: 4px 8px;
}

.esh-side-dots {
  display: flex;
  align-items: center;
  gap: 6px;
}

.esh-side-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  border: none;
  padding: 0;
  background: rgba(255,255,255,0.35);
  cursor: pointer;
}

.esh-side-dot.is-active {
  background: var(--kg-red);
  transform: scale(1.2);
}

/* ==================== MANŞET ALTI 4'LÜ GRİD ==================== */
.esh-sub-hero-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
  margin-top: 18px;
}

.esh-card {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.esh-card-thumb {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9.5;
  overflow: hidden;
  border-radius: 4px;
  background: var(--kg-surface-alt);
}

.esh-card-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform .3s ease;
}

.esh-card:hover .esh-card-thumb img {
  transform: scale(1.04);
}

.esh-card-title {
  margin: 0;
  font-size: 15px;
  font-weight: 700;
  line-height: 1.35;
  color: var(--kg-text);
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.esh-card:hover .esh-card-title {
  color: var(--kg-red);
}

.esh-card-excerpt {
  margin: 0;
  font-size: 13.5px;
  color: var(--kg-text-muted);
  line-height: 1.5;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* ==================== PİYASA / FİNANS BANDI ==================== */
.esh-finance-wrap {
  margin: 22px 0 32px;
}

.esh-finance-bar {
  background: var(--kg-finance-bg);
  color: #ffffff;
  border-radius: 4px;
  padding: 12px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  overflow-x: auto;
  scrollbar-width: none;
}

.esh-finance-brand {
  font-weight: 800;
  font-size: 14px;
  letter-spacing: 0.6px;
  white-space: nowrap;
  padding-right: 16px;
  border-right: 1px solid rgba(255,255,255,0.2);
}

.esh-finance-items {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex: 1;
  gap: 20px;
}

.esh-finance-item {
  display: flex;
  flex-direction: column;
  white-space: nowrap;
}

.esh-f-label {
  font-size: 10px;
  opacity: 0.8;
  font-weight: 700;
}

.esh-f-val {
  font-size: 15px;
  font-weight: 800;
  line-height: 1.2;
}

.esh-f-diff {
  font-size: 11px;
  font-weight: 700;
}

.esh-f-up { color: #4ade80; }
.esh-f-down { color: #f87171; }

/* ==================== BÖLÜM BAŞLIKLARI ==================== */
.esh-section {
  padding: 28px 0;
}

.esh-section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 18px;
}

.esh-section-title {
  margin: 0;
  font-size: 20px;
  font-weight: 800;
  position: relative;
  padding-bottom: 8px;
}

.esh-section-title::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: 0;
  width: 42px;
  height: 3px;
  background: var(--kg-red);
}

.esh-section-more {
  font-size: 13px;
  font-weight: 700;
  color: var(--kg-text-muted);
}

.esh-section-more:hover {
  color: var(--kg-red);
}

/* ==================== SPOR BLOĞU (FULL-BLEED KOYU LACİVERT) ==================== */
.esh-sport-band {
  width: 100%;
  background: var(--kg-navy);
  color: #ffffff;
  padding: 36px 0 42px;
  margin: 12px 0;
}

.esh-sport-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 20px;
  gap: 12px;
}

.esh-sport-title-group {
  display: flex;
  align-items: center;
  gap: 12px;
}

.esh-sport-logo {
  font-size: 20px;
  font-weight: 900;
  letter-spacing: -0.3px;
  border-bottom: 2px solid #ffffff;
  padding-bottom: 2px;
}

.esh-sport-badge {
  background: #2563eb;
  color: #ffffff;
  font-size: 12px;
  font-weight: 700;
  padding: 5px 12px;
  border-radius: 4px;
}

.esh-sport-grid {
  display: grid;
  grid-template-columns: 1.15fr 1fr;
  gap: 20px;
  align-items: start;
}

.esh-sport-slider {
  position: relative;
}

.esh-sport-slides {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 10.2;
  border-radius: 4px;
  overflow: hidden;
  background: #0b111c;
}

.esh-sport-slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  pointer-events: none;
  transition: opacity .25s ease;
}

.esh-sport-slide.is-active {
  opacity: 1;
  pointer-events: auto;
  z-index: 2;
}

.esh-sport-slide img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.esh-sport-slide-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(0,0,0,0.9) 0%, rgba(0,0,0,0.15) 55%, transparent 100%);
  display: flex;
  align-items: flex-end;
  padding: 20px;
}

.esh-sport-slide-title {
  margin: 0;
  color: #ffffff;
  font-size: 22px;
  font-weight: 900;
  line-height: 1.25;
}

.esh-sport-arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  z-index: 5;
  background: rgba(0,0,0,0.45);
  color: #fff;
  border: none;
  width: 36px;
  height: 44px;
  font-size: 20px;
  cursor: pointer;
}

.esh-sport-arrow.prev { left: 0; border-radius: 0 4px 4px 0; }
.esh-sport-arrow.next { right: 0; border-radius: 4px 0 0 4px; }

.esh-sport-dots {
  display: flex;
  justify-content: center;
  gap: 8px;
  margin-top: 12px;
}

.esh-sport-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  border: none;
  background: rgba(255,255,255,0.3);
  cursor: pointer;
  padding: 0;
}

.esh-sport-dot.is-active {
  background: #22c55e;
}

.esh-sport-cards {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}

.esh-sport-band .esh-card-title {
  color: #f8fafc;
  font-size: 14px;
}

.esh-sport-band .esh-card:hover .esh-card-title {
  color: #38bdf8;
}

/* ==================== ASİMETRİK MAGAZİN BLOĞU (1+4) ==================== */
.esh-asym-grid {
  display: grid;
  grid-template-columns: 1fr 1.35fr;
  gap: 20px;
  align-items: start;
}

.esh-asym-featured .esh-card-thumb {
  aspect-ratio: 4 / 3;
}

.esh-asym-featured .esh-card-title {
  font-size: 22px;
  font-weight: 800;
  line-height: 1.25;
}

.esh-asym-side-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}

/* ==================== YAŞAM / LIFE BLOĞU (25% - 50% - 25%) ==================== */
.esh-life-grid {
  display: grid;
  grid-template-columns: 1fr 2fr 1fr;
  gap: 20px;
  align-items: start;
}

.esh-life-col {
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.esh-life-center .esh-card-thumb {
  aspect-ratio: 16 / 10;
}

.esh-life-center .esh-card-title {
  font-size: 22px;
  font-weight: 800;
}

/* ==================== GÖZDEN KAÇMASIN (3x2 GRİD) ==================== */
.esh-grid-3 {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 20px;
}

/* ==================== HABER DETAY (SINGLE) ==================== */
.esh-single-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 320px;
  gap: 32px;
  padding: 24px 0 48px;
}

.esh-breadcrumb {
  font-size: 13px;
  color: var(--kg-text-muted);
  margin-bottom: 14px;
}

.esh-breadcrumb a:hover {
  color: var(--kg-red);
}

.esh-single-title {
  margin: 8px 0 14px;
  font-size: 32px;
  font-weight: 900;
  line-height: 1.22;
}

.esh-single-spot {
  font-size: 18px;
  font-weight: 500;
  color: var(--kg-text-muted);
  line-height: 1.5;
  margin-bottom: 18px;
}

.esh-single-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 14px;
  font-size: 13px;
  color: var(--kg-text-muted);
  padding: 12px 0;
  border-top: 1px solid var(--kg-border);
  border-bottom: 1px solid var(--kg-border);
  margin-bottom: 20px;
}

.esh-single-featured {
  margin-bottom: 22px;
  border-radius: 6px;
  overflow: hidden;
}

.esh-single-featured img {
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
}

.esh-single-content {
  font-size: 17px;
  line-height: 1.75;
}

.esh-single-content p {
  margin: 0 0 18px;
}

.esh-single-content h2,
.esh-single-content h3 {
  margin: 26px 0 12px;
  line-height: 1.3;
}

.esh-sidebar-box {
  background: var(--kg-surface);
  border: 1px solid var(--kg-border);
  border-radius: 6px;
  padding: 16px;
  margin-bottom: 22px;
}

.esh-sidebar-title {
  margin: 0 0 14px;
  font-size: 16px;
  font-weight: 800;
  padding-left: 10px;
  border-left: 3px solid var(--kg-red);
}

.esh-sidebar-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.esh-sidebar-item {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--kg-border);
}

.esh-sidebar-item:last-child {
  border-bottom: none;
  padding-bottom: 0;
}

.esh-sidebar-num {
  color: var(--kg-red);
  font-weight: 900;
  font-size: 18px;
  line-height: 1.1;
  min-width: 20px;
}

.esh-sidebar-item a {
  font-size: 14px;
  font-weight: 700;
  line-height: 1.35;
}

.esh-sidebar-item a:hover {
  color: var(--kg-red);
}

/* ==================== FOOTER ==================== */
.esh-footer {
  width: 100%;
  background: var(--kg-navy);
  color: #e2e8f0;
  padding-top: 48px;
  margin-top: 32px;
}

.esh-footer-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr 1fr;
  gap: 32px;
  padding-bottom: 40px;
}

/* Footer Logo kesinlikle beyaz ve okunabilir */
.esh-footer .esh-logo-dark-text {
  color: #ffffff;
}

.esh-footer-heading {
  margin: 0 0 16px;
  font-size: 15px;
  font-weight: 800;
  color: #ffffff;
}

.esh-footer-menu {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.esh-footer-menu a {
  font-size: 14px;
  color: #cbd5e1;
}

.esh-footer-menu a:hover {
  color: #ffffff;
}

.esh-social-links {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 16px;
}

.esh-social-links a {
  width: 34px;
  height: 34px;
  border-radius: 6px;
  background: rgba(255,255,255,0.08);
  color: #ffffff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  font-weight: 700;
}

.esh-social-links a:hover {
  background: var(--kg-red);
}

.esh-footer-bottom {
  background: var(--kg-navy-dark);
  padding: 20px 0;
  border-top: 1px solid rgba(255,255,255,0.06);
  font-size: 13px;
  color: #94a3b8;
}

.esh-footer-bottom p {
  margin: 0 0 6px;
}

.esh-footer-bottom strong {
  color: #ffffff;
}

/* ==================== MODAL & DRAWER ==================== */
.esh-modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.65);
  z-index: 1200;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 16px;
}

.esh-modal-backdrop.is-open {
  display: flex;
}

.esh-search-box {
  background: var(--kg-bg);
  width: 100%;
  max-width: 560px;
  padding: 24px;
  border-radius: 8px;
  position: relative;
}

.esh-search-form {
  display: flex;
  gap: 8px;
}

.esh-search-form input {
  flex: 1;
  padding: 12px 14px;
  border: 1px solid var(--kg-border);
  border-radius: 6px;
  background: var(--kg-surface);
  color: var(--kg-text);
  font-size: 15px;
}

.esh-search-form button {
  background: var(--kg-red);
  color: #fff;
  border: none;
  padding: 0 20px;
  border-radius: 6px;
  font-weight: 700;
  cursor: pointer;
}

.esh-drawer {
  position: fixed;
  top: 0;
  right: -320px;
  width: 300px;
  max-width: 85vw;
  height: 100vh;
  background: var(--kg-bg);
  z-index: 1300;
  box-shadow: -4px 0 24px rgba(0,0,0,0.25);
  transition: right .25s ease;
  padding: 20px;
  overflow-y: auto;
}

.esh-drawer.is-open {
  right: 0;
}

.esh-drawer-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--kg-border);
  margin-bottom: 16px;
}

.esh-drawer-menu {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.esh-drawer-menu a {
  display: block;
  padding: 8px 0;
  font-weight: 700;
  border-bottom: 1px solid var(--kg-border);
}

/* ==================== RESPONSIVE ==================== */
@media (max-width: 1024px) {
  .esh-hero-grid {
    grid-template-columns: 1fr;
  }
  .esh-side-slides {
    min-height: 280px;
  }
  .esh-sub-hero-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .esh-sport-grid,
  .esh-asym-grid,
  .esh-life-grid,
  .esh-single-layout {
    grid-template-columns: 1fr;
  }
  .esh-footer-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 640px) {
  .esh-main-slide-title {
    font-size: 20px;
  }
  .esh-grid-3,
  .esh-sport-cards,
  .esh-asym-side-grid,
  .esh-footer-grid {
    grid-template-columns: 1fr;
  }
  .esh-header-actions .esh-hide-mobile {
    display: none;
  }
  .esh-single-title {
    font-size: 24px;
  }
}