/*
Theme Name: Xəzər Xəbər
Theme URI: https://khazar-review.khazar.media/
Author: Khazar Media
Description: Xəzər Xəbər jurnalı üçün modern arxiv mövzusu.
Version: 1.0
Requires at least: 6.0
Tested up to: 6.6
Requires PHP: 8.1
Text Domain: khazar-xeber
*/

:root {
  --ink: #122026;
  --muted: #5c6d74;
  --paper: #f3eee4;
  --card: #fffdf8;
  --line: #e4d9c8;
  --deep: #0b3d4a;
  --deep-2: #0f4d5c;
  --gold: #c9a24a;
  --gold-2: #e8d09a;
  --shadow: 0 12px 32px rgba(11, 61, 74, .08);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: Outfit, system-ui, sans-serif;
  color: var(--ink);
  background: var(--paper);
  line-height: 1.55;
}
img { max-width: 100%; height: auto; display: block; }
a { color: inherit; }
.wrap { width: min(1120px, calc(100% - 40px)); margin-inline: auto; }
.skip-link {
  position: absolute;
  left: -999px;
  top: 8px;
  background: var(--gold);
  color: var(--deep);
  padding: 8px 12px;
  z-index: 20;
}
.skip-link:focus { left: 12px; }

/* Header */
.site-header {
  background:
    radial-gradient(700px 280px at 8% -40%, rgba(201,162,74,.22), transparent 55%),
    linear-gradient(165deg, #082f38 0%, var(--deep) 55%, #164955 100%);
  color: #f7f1e6;
  position: sticky;
  top: 0;
  z-index: 30;
}
.site-header .bar {
  display: flex;
  align-items: center;
  gap: 18px;
  min-height: 72px;
  padding: 10px 0;
}
.brand {
  display: flex;
  flex-direction: column;
  text-decoration: none;
  margin-right: auto;
}
.brand strong {
  font-family: Fraunces, Georgia, serif;
  font-size: 1.25rem;
  font-weight: 640;
}
.brand span {
  color: var(--gold-2);
  font-size: .75rem;
  font-weight: 500;
}
.primary-nav ul {
  display: flex;
  gap: 6px;
  list-style: none;
  margin: 0;
  padding: 0;
}
.primary-nav a {
  text-decoration: none;
  font-size: .92rem;
  padding: 8px 12px;
  border-radius: 999px;
  color: var(--gold-2);
  border: 1px solid transparent;
}
.primary-nav a:hover,
.primary-nav .current-menu-item a {
  border-color: rgba(232,208,154,.35);
  background: rgba(255,255,255,.06);
}
.search-form {
  display: flex;
  background: rgba(255,255,255,.08);
  border: 1px solid rgba(232,208,154,.28);
  border-radius: 999px;
  overflow: hidden;
}
.search-form input[type="search"] {
  border: 0;
  background: transparent;
  color: #fff;
  padding: 8px 14px;
  width: 11.5rem;
  font: inherit;
}
.search-form input::placeholder { color: rgba(247,241,230,.65); }
.search-form button {
  border: 0;
  background: var(--gold);
  color: var(--deep);
  font-weight: 600;
  padding: 8px 14px;
  cursor: pointer;
}
.nav-toggle {
  display: none;
  border: 1px solid rgba(232,208,154,.35);
  background: transparent;
  color: var(--gold-2);
  border-radius: 8px;
  padding: 8px 10px;
  cursor: pointer;
}

/* Hero */
.hero {
  background:
    radial-gradient(900px 420px at 88% 10%, rgba(201,162,74,.16), transparent 50%),
    linear-gradient(165deg, #082f38 0%, var(--deep) 48%, #164955 100%);
  color: #f7f1e6;
  padding: 28px 0 56px;
  position: relative;
}
.hero::after {
  content: "";
  position: absolute;
  left: -8%;
  right: -8%;
  bottom: -1px;
  height: 64px;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 1440 90' preserveAspectRatio='none'%3E%3Cpath fill='%23f3eee4' d='M0 48c180 28 360-28 540-18 180 10 270 42 450 28 180-14 300-48 450-32v64H0z'/%3E%3C/svg%3E") center / 100% 100% no-repeat;
}
.hero-grid {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: 1.15fr .85fr;
  gap: 36px;
  align-items: center;
}
.kicker {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--gold-2);
  letter-spacing: .14em;
  text-transform: uppercase;
  font-size: .72rem;
  font-weight: 600;
  margin-bottom: 12px;
}
.kicker i { width: 28px; height: 1px; background: var(--gold); }
.hero h1,
.page-head h1,
.entry-title {
  font-family: Fraunces, Georgia, serif;
  font-weight: 640;
  line-height: 1.15;
  margin: 0 0 .6rem;
}
.hero h1 { font-size: clamp(1.8rem, 4vw, 2.8rem); }
.lede { color: rgba(247,241,230,.82); max-width: 38rem; margin: 0 0 1.2rem; }
.actions { display: flex; flex-wrap: wrap; gap: 10px; }
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  text-decoration: none;
  border-radius: 999px;
  padding: 11px 18px;
  font-weight: 600;
  font-size: .95rem;
  border: 1px solid transparent;
}
.btn-gold { background: var(--gold); color: var(--deep); }
.btn-gold:hover { background: var(--gold-2); }
.btn-ghost {
  border-color: rgba(232,208,154,.4);
  color: var(--gold-2);
}
.btn-ghost:hover { background: rgba(255,255,255,.06); }
.btn-line {
  border-color: var(--line);
  color: var(--deep);
  background: var(--card);
}
.btn-line:hover { border-color: var(--deep); }
.hero-cover {
  background: #0e2f38;
  border-radius: 16px;
  overflow: hidden;
  box-shadow: var(--shadow);
  display: flex;
  align-items: center;
  justify-content: center;
}
.hero-cover img {
  width: 100%;
  height: auto;
  max-height: 520px;
  object-fit: contain;
  object-position: center top;
}
.cover-fallback {
  min-height: 220px;
  display: grid;
  place-items: center;
  background: linear-gradient(160deg, #134655, #0b3d4a);
  color: var(--gold-2);
  font-family: Fraunces, Georgia, serif;
  font-size: 1.4rem;
  padding: 24px;
  text-align: center;
}

/* Page heads */
.page-head { padding: 28px 0 8px; }
.page-head p { color: var(--muted); margin: 0; }
.crumbs { font-size: .88rem; color: var(--muted); margin-bottom: 8px; }
.crumbs a { color: var(--deep); text-decoration: none; }
.crumbs a:hover { color: var(--gold); }

/* Years */
.years {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding: 8px 0 22px;
}
.years a {
  text-decoration: none;
  border: 1px solid var(--line);
  background: var(--card);
  color: var(--deep);
  border-radius: 999px;
  padding: 6px 12px;
  font-size: .88rem;
  font-weight: 500;
}
.years a:hover,
.years a.is-active {
  background: var(--deep);
  color: #f7f1e6;
  border-color: var(--deep);
}

/* Cards */
.section-title {
  font-family: Fraunces, Georgia, serif;
  font-size: 1.35rem;
  margin: 8px 0 16px;
}
.issue-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
  padding-bottom: 28px;
}
.issue-card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 14px;
  overflow: hidden;
  box-shadow: var(--shadow);
  display: flex;
  flex-direction: column;
  text-decoration: none;
}
.issue-card .thumb {
  aspect-ratio: 3 / 4;
  overflow: hidden;
  background: #0e2f38;
  display: flex;
  align-items: center;
  justify-content: center;
}
.issue-card img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  object-position: center;
}
.issue-card .body { padding: 14px 16px 16px; display: flex; flex-direction: column; gap: 8px; flex: 1; }
.issue-card h2 {
  font-family: Fraunces, Georgia, serif;
  font-size: 1.05rem;
  margin: 0;
  font-weight: 640;
}
.issue-card .meta { color: var(--muted); font-size: .82rem; }
.issue-card .row { display: flex; gap: 8px; margin-top: auto; }
.issue-card .row .btn { padding: 8px 12px; font-size: .82rem; }
.site-main .search-form {
  background: var(--card);
  border-color: var(--line);
  max-width: 22rem;
  margin: 8px 0 24px;
}
.site-main .search-form input[type="search"] { color: var(--ink); }

/* Single */
.issue-layout {
  display: grid;
  grid-template-columns: .42fr .58fr;
  gap: 32px;
  padding: 8px 0 48px;
  align-items: start;
}
.issue-layout .cover {
  border-radius: 16px;
  overflow: hidden;
  border: 1px solid var(--line);
  background: var(--card);
  box-shadow: var(--shadow);
}
.issue-layout .cover img { width: 100%; }
.prose { font-size: 1.02rem; color: #2a3a40; }
.prose p { margin: 0 0 1rem; }
.issue-nav {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 8px 0 40px;
}
.issue-nav a { color: var(--deep); text-decoration: none; font-weight: 500; }
.issue-nav a:hover { color: var(--gold); }

/* Pagination */
.nav-links, .pagination {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: center;
  padding: 8px 0 40px;
}
.nav-links a, .nav-links span, .page-numbers {
  min-width: 40px;
  text-align: center;
  text-decoration: none;
  border: 1px solid var(--line);
  background: var(--card);
  border-radius: 10px;
  padding: 8px 12px;
  color: var(--deep);
}
.nav-links .current, .page-numbers.current {
  background: var(--deep);
  color: #fff;
  border-color: var(--deep);
}

.site-main { padding-top: 8px; }
.empty { background: var(--card); border: 1px dashed var(--line); border-radius: 12px; padding: 28px; margin-bottom: 40px; }

footer.site-footer {
  background: var(--deep);
  color: rgba(247,241,230,.78);
  padding: 28px 0;
  margin-top: 12px;
}
footer.site-footer a { color: var(--gold-2); text-decoration: none; }
footer.site-footer .wrap { display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; }

@media (max-width: 900px) {
  .hero-grid, .issue-layout { grid-template-columns: 1fr; }
  .issue-grid { grid-template-columns: repeat(2, 1fr); }
  .hero-cover img { max-height: 420px; height: auto; }
}
@media (max-width: 720px) {
  .nav-toggle { display: inline-flex; }
  .primary-nav, .search-form { display: none; }
  .site-header.is-open .primary-nav,
  .site-header.is-open .search-form { display: flex; }
  .site-header.is-open .bar {
    flex-wrap: wrap;
  }
  .site-header.is-open .primary-nav {
    width: 100%;
    order: 5;
  }
  .site-header.is-open .primary-nav ul { flex-direction: column; width: 100%; }
  .site-header.is-open .search-form { width: 100%; order: 6; }
  .site-header.is-open .search-form input { flex: 1; width: auto; }
  .issue-grid { grid-template-columns: 1fr; }
}
