/* ── Reset & Tokens ─────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800&family=JetBrains+Mono:wght@400;600&display=swap');

:root {
  --bg:        #0b0d12;
  --surface:   #111318;
  --surface2:  #14161e;
  --surface3:  #1a1d28;
  --border:    #1f2232;
  --border2:   #272b3e;

  --text:      #dde3f0;
  --text-muted:#4e5670;
  --text-dim:  #2e3350;

  --green:     #22c55e;
  --red:       #ef4444;
  --yellow:    #f59e0b;
  --cyan:      #5fc9b3;   /* Kurumsal renk */
  --accent:    #5fc9b3;
  --accent2:   #7dd9c7;

  --navbar-h:  44px;
  --ticker-h:  32px;
  --status-h:  24px;
}

html, body {
  width: 100%; height: 100%;
  overflow: hidden;
  background: var(--bg);
  color: var(--text);
  font-family: 'Inter', 'Segoe UI', system-ui, sans-serif;
  font-size: 13px;
}

/* ── Scrollbar ──────────────────────────────────────────────── */
::-webkit-scrollbar         { width: 4px; height: 4px; }
::-webkit-scrollbar-track   { background: transparent; }
::-webkit-scrollbar-thumb   { background: var(--border2); border-radius: 2px; }
::-webkit-scrollbar-thumb:hover { background: var(--text-muted); }

/* ── Links ──────────────────────────────────────────────────── */
a { text-decoration: none; color: inherit; }
a:hover { color: var(--accent2); }

/* ── Body grid ──────────────────────────────────────────────── */
body {
  display: grid;
  grid-template-rows: var(--navbar-h) var(--ticker-h) 1fr var(--status-h);
  grid-template-areas:
    "navbar"
    "ticker"
    "main"
    "statusbar";
}

/* ── Navbar ─────────────────────────────────────────────────── */
#navbar {
  grid-area: navbar;
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 16px;
  gap: 12px;
  flex-shrink: 0;
  z-index: 100;
}

.nav-left  { display: flex; align-items: center; gap: 12px; }
.nav-right { display: flex; align-items: center; gap: 10px; }

.nav-logo {
  display: flex;
  align-items: center;
  text-decoration: none;
  user-select: none;
  flex-shrink: 0;
}
.nav-logo img { height: 26px; width: auto; }

.nav-sep {
  width: 1px; height: 18px;
  background: var(--border2);
  flex-shrink: 0;
}

.nav-menu {
  display: flex;
  list-style: none;
  gap: 2px;
}

.nav-link {
  display: flex;
  align-items: center;
  padding: 5px 10px;
  border-radius: 5px;
  color: var(--text-muted);
  text-decoration: none;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: .03em;
  text-transform: uppercase;
  transition: color .12s, background .12s;
  white-space: nowrap;
}
.nav-link:hover  { color: var(--text); background: var(--surface3); }
.nav-link.active { color: var(--accent2); background: rgba(95,201,179,.1); }

/* Search box */
.nav-search {
  display: flex;
  align-items: center;
  gap: 0;
  background: var(--surface3);
  border: 1px solid var(--border2);
  border-radius: 5px;
  padding: 0 10px;
  height: 28px;
  transition: border-color .15s;
}
.nav-search:focus-within { border-color: var(--cyan); }
.nav-search svg { color: var(--text-muted); flex-shrink: 0; }
.nav-search input {
  background: transparent;
  border: none;
  outline: none;
  color: var(--text);
  font-family: inherit;
  font-size: 11px;
  width: 160px;
  padding-left: 7px;
}
.nav-search input::placeholder { color: var(--text-dim); }

.nav-live {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 11px;
  font-weight: 600;
  color: var(--green);
}
.live-dot {
  width: 6px; height: 6px;
  border-radius: 50%;
  background: var(--green);
  box-shadow: 0 0 6px var(--green);
  animation: pulse 2s infinite;
}
@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: .5; }
}

/* ── News Ticker ────────────────────────────────────────────── */
#ticker {
  grid-area: ticker;
  background: var(--surface2);
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  overflow: hidden;
  flex-shrink: 0;
  font-size: 11px;
}

.ticker-label {
  background: var(--red);
  color: #fff;
  padding: 0 10px;
  height: 100%;
  display: flex;
  align-items: center;
  font-weight: 800;
  font-size: 10px;
  letter-spacing: .08em;
  flex-shrink: 0;
  z-index: 10;
}

.ticker-track {
  flex: 1;
  overflow: hidden;
  position: relative;
}

.ticker-content {
  display: flex;
  white-space: nowrap;
  animation: scroll-ticker 80s linear infinite;
}

@keyframes scroll-ticker {
  0%   { transform: translateX(0); }
  100% { transform: translateX(-50%); }
}

.ticker-item {
  padding: 0 24px;
  color: var(--text);
  display: flex;
  align-items: center;
  gap: 8px;
}
.ticker-item::before {
  content: '•';
  color: var(--cyan);
  flex-shrink: 0;
}

/* ── Main area ──────────────────────────────────────────────── */
#main {
  grid-area: main;
  display: flex;
  overflow: hidden;
  min-height: 0;
}

/* ── 3-sütun layout ─────────────────────────────────────────── */
#layout {
  flex: 1;
  display: grid;
  grid-template-columns: 300px 1fr 280px;
  min-height: 0;
  overflow: hidden;
}

/* ── Pane commons ───────────────────────────────────────────── */
.pane {
  border-right: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  min-height: 0;
}
.pane:last-child { border-right: none; border-left: 1px solid var(--border); }

.pane-hdr {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 6px 10px;
  background: var(--surface2);
  border-bottom: 1px solid var(--border);
  font-size: 9px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .08em;
  color: var(--text-muted);
  flex-shrink: 0;
}

.pane-scroll {
  flex: 1;
  overflow-y: auto;
  min-height: 0;
}

/* ── News list items (left/right panes) ─────────────────────── */
.news-item {
  display: flex;
  align-items: flex-start;
  gap: 9px;
  padding: 9px 10px;
  border-bottom: 1px solid rgba(255,255,255,.03);
  transition: background .12s;
  cursor: pointer;
  text-decoration: none;
  color: var(--text);
}
.news-item:hover { background: rgba(255,255,255,.03); color: var(--text); }
.news-item.active { background: rgba(95,201,179,.06); border-left: 2px solid var(--cyan); }

.news-item-thumb {
  width: 56px;
  height: 42px;
  flex-shrink: 0;
  border-radius: 3px;
  overflow: hidden;
  background: var(--surface3);
}
.news-item-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.news-item-info {
  flex: 1;
  min-width: 0;
}

.news-cat {
  font-size: 9px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .06em;
  color: var(--cyan);
  margin-bottom: 3px;
}

.news-title {
  font-size: 11px;
  font-weight: 500;
  line-height: 1.4;
  color: var(--text);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.news-num {
  font-size: 9px;
  font-weight: 700;
  font-family: 'JetBrains Mono', monospace;
  color: var(--text-dim);
  margin-bottom: 3px;
}

/* ── Center pane ────────────────────────────────────────────── */
#center-pane {
  display: flex;
  flex-direction: column;
  overflow: hidden;
  min-height: 0;
}

/* Featured hero */
.featured-area {
  display: flex;
  height: 380px;
  flex-shrink: 0;
  border-bottom: 1px solid var(--border);
}

.featured-col {
  flex: 1;
  position: relative;
  overflow: hidden;
}

.featured-col + .featured-col {
  border-left: 1px solid var(--border);
}

.featured-col img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform .4s ease;
}
.featured-col:hover img { transform: scale(1.03); }

.featured-overlay {
  position: absolute;
  bottom: 0; left: 0; right: 0;
  padding: 48px 18px 18px;
  background: linear-gradient(
    to bottom,
    transparent 0%,
    rgba(5,6,10,.4) 40%,
    rgba(5,6,10,.82) 100%
  );
}

.featured-cat {
  font-size: 9px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .08em;
  color: var(--cyan);
  margin-bottom: 6px;
}

.featured-title {
  font-size: 15px;
  font-weight: 700;
  line-height: 1.25;
  color: #fff;
}

/* Grid news area */
.news-grid-wrap {
  flex: 1;
  overflow-y: auto;
  padding: 16px;
  min-height: 0;
}

/* Grid header: sticky, title left + pagination right */
.grid-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  position: sticky;
  top: 0;
  z-index: 10;
  background: var(--bg);
  padding: 10px 16px;
  border-bottom: 1px solid var(--border);
  flex-shrink: 0;
}

.grid-header .section-label {
  margin: 0;
  padding: 0;
  border: none;
  font-size: 9px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .1em;
  color: var(--text-muted);
}

.news-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 10px;
}

.grid-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 6px;
  overflow: hidden;
  transition: border-color .15s, transform .15s;
  display: block;
  color: var(--text);
  text-decoration: none;
}
.grid-card:hover {
  border-color: var(--border2);
  transform: translateY(-1px);
  color: var(--text);
}

.grid-card-img {
  width: 100%;
  padding-top: 56.25%; /* 16:9 ratio – doesn't look square */
  position: relative;
  overflow: hidden;
}

.grid-card-img img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform .4s ease;
}
.grid-card:hover .grid-card-img img { transform: scale(1.04); }

.grid-card-body {
  padding: 8px 10px;
}

.grid-card-meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 4px;
}

.grid-card-cat {
  font-size: 9px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .06em;
  color: var(--cyan);
}

.grid-card-date {
  font-size: 9px;
  color: var(--text-muted);
  font-family: 'JetBrains Mono', monospace;
  flex-shrink: 0;
}

.grid-card-title {
  font-size: 12.5px;
  font-weight: 600;
  line-height: 1.4;
  color: var(--text);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  min-height: 2.8em;
}

/* ── Right pane ─────────────────────────────────────────────── */
#right-pane {
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.stat-block {
  padding: 10px 12px;
  border-bottom: 1px solid var(--border);
}

.stat-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 6px;
}

.stat-label { font-size: 10px; color: var(--text-muted); text-transform: uppercase; letter-spacing: .04em; }
.stat-value { font-size: 10px; font-weight: 600; color: var(--text); }

.progress-track {
  height: 2px;
  background: var(--surface3);
  border-radius: 2px;
  overflow: hidden;
  margin-bottom: 10px;
}
.progress-fill {
  height: 100%;
  background: var(--cyan);
  border-radius: 2px;
}

/* ── Pagination ─────────────────────────────────────────────── */
.pagination {
  display: flex;
  gap: 4px;
  list-style: none;
  padding: 0;
  margin: 0;
  flex-wrap: wrap;
}
.pagination .page-item .page-link {
  display: flex;
  align-items: center;
  justify-content: center;
  min-width: 28px;
  height: 28px;
  padding: 0 8px;
  background: var(--surface2);
  border: 1px solid var(--border2);
  color: var(--text-muted);
  border-radius: 4px;
  font-size: 11px;
  font-family: 'JetBrains Mono', monospace;
  text-decoration: none;
  transition: all .12s;
}
.pagination .page-item .page-link:hover {
  color: var(--text);
  border-color: var(--accent);
  background: var(--surface3);
}
.pagination .page-item.active .page-link {
  background: var(--cyan);
  border-color: var(--cyan);
  color: #0b0d12;
  font-weight: 700;
}
.pagination .page-item.disabled .page-link {
  opacity: .35;
  cursor: not-allowed;
}

/* ── Footer / Statusbar ─────────────────────────────────────── */
#statusbar {
  grid-area: statusbar;
  background: var(--surface);
  border-top: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 16px;
  font-size: 10px;
  color: var(--text-muted);
  user-select: none;
  flex-shrink: 0;
}

/* Footer 3-zone */
.sb-left  { display: flex; align-items: center; flex: 1; }
.sb-center { display: flex; align-items: center; gap: 10px; justify-content: center; flex: 1; }
.sb-right { display: flex; align-items: center; gap: 10px; flex: 1; justify-content: flex-end; }
.sb-sep { color: var(--text-dim); }

.sb-social-link {
  display: flex;
  align-items: center;
  gap: 4px;
  color: var(--text-muted);
  text-decoration: none;
  font-size: 10px;
  transition: color .12s;
}
.sb-social-link:hover { color: var(--cyan); }

.sb-dot {
  width: 5px; height: 5px;
  border-radius: 50%;
  background: var(--green);
  box-shadow: 0 0 4px var(--green);
}

/* ── Mobile ─────────────────────────────────────────────────── */
@media (max-width: 1200px) {
  #layout { grid-template-columns: 260px 1fr 240px; }
}

@media (max-width: 992px) {
  body { overflow-y: auto; height: auto; }
  body { grid-template-rows: var(--navbar-h) var(--ticker-h) auto var(--status-h); }
  #layout { grid-template-columns: 1fr; }
  #main { overflow-y: auto; min-height: 0; }
  .pane:first-child, .pane:last-child { display: none; }
  #center-pane { overflow-y: auto; }
  .featured-area { height: auto; flex-direction: column; }
  .featured-col { height: 260px; }
  .featured-col + .featured-col { border-left: none; border-top: 1px solid var(--border); }
  .news-grid { grid-template-columns: repeat(2, 1fr); }
  .news-grid-wrap { padding: 0; }
  .grid-header { padding: 10px 12px; }
  .nav-menu { display: none; } /* hide category menu on tablet */
  #statusbar .sb-right { display: none; } /* hide social links on mobile */
}

@media (max-width: 600px) {
  .news-grid { grid-template-columns: repeat(2, 1fr); gap: 6px; }
  .featured-col { height: 200px; }
  .grid-card-title { font-size: 11.5px; }
  #statusbar { font-size: 9px; }
}

@media (max-width: 400px) {
  .news-grid { grid-template-columns: 1fr; }
}
