:root {
  --bg: #0f172a;
  --panel: #111827;
  --card: #1f2937;
  --text: #f8fafc;
  --muted: #cbd5e1;
  --accent: #f59e0b;
  --accent-dark: #b45309;
  --border: #334155;
  /* Фон сайта: любое фото из папки image — например image/1sokol.jpeg … image/6Sokol.jpeg */
  --falcon-bg-image: url("image/4Sokol.jpeg");
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: Arial, Helvetica, sans-serif;
  color: var(--text);
  min-height: 100vh;
  position: relative;
}

/* Фон: фото сокола + тёмный слой, чтобы текст и карточки оставались читаемыми */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -2;
  background: var(--falcon-bg-image) center / cover no-repeat;
}

body::after {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  background: linear-gradient(
    180deg,
    rgba(2, 6, 23, 0.28) 0%,
    rgba(15, 23, 42, 0.32) 45%,
    rgba(2, 6, 23, 0.42) 100%
  );
  pointer-events: none;
}

body.gallery-page {
  position: relative;
  overflow-x: hidden;
}

.container {
  max-width: 980px;
  margin: 0 auto;
  padding: 24px 18px 48px;
  position: relative;
  z-index: 1;
}

.top-nav {
  background: rgba(17, 24, 39, 0.92);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 10px 12px;
  margin-bottom: 18px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.top-nav-left {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.nav-links {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.top-nav a,
.lang-btn,
.menu-btn {
  color: #f8fafc;
  text-decoration: none;
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 7px 10px;
  font-weight: 700;
  background: transparent;
  font-size: 0.92rem;
  cursor: pointer;
}

.top-nav a.active,
.lang-btn.active {
  background: #fbbf24;
  border-color: #f59e0b;
  color: #1f2937;
}

.menu-btn {
  display: none;
}

.lang-switcher {
  display: flex;
  gap: 8px;
}

.hero,
.panel {
  background: rgba(17, 24, 39, 0.92);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 20px;
  margin-bottom: 18px;
}

.hero {
  position: relative;
  overflow: hidden;
}

.hero::after {
  content: "";
  position: absolute;
  inset: auto -80px -120px auto;
  width: 240px;
  height: 240px;
  border-radius: 999px;
  background: radial-gradient(circle, rgba(251, 191, 36, 0.22) 0%, rgba(251, 191, 36, 0) 72%);
  pointer-events: none;
}

h1 {
  margin: 0 0 10px;
  font-size: clamp(1.5rem, 3vw, 2rem);
  color: #fbbf24;
}

h2 {
  margin: 0 0 10px;
  color: #fde68a;
}

p {
  margin: 0;
  color: var(--muted);
  line-height: 1.6;
}

.space {
  margin-top: 12px;
}

.grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 16px;
}

.card {
  background: linear-gradient(180deg, rgba(31, 41, 55, 0.95) 0%, rgba(17, 24, 39, 0.98) 100%);
  border: 1px solid rgba(148, 163, 184, 0.3);
  border-radius: 12px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  min-height: 300px;
  animation: card-in 420ms ease both;
  transition: transform 0.22s ease, box-shadow 0.22s ease, border-color 0.22s ease;
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.25);
}

.card:hover {
  transform: translateY(-4px);
  border-color: rgba(251, 191, 36, 0.65);
  box-shadow: 0 18px 32px rgba(0, 0, 0, 0.32);
}

.card-openable {
  cursor: pointer;
}

.card-openable:focus-visible {
  outline: 2px solid #fbbf24;
  outline-offset: 2px;
}

.card img {
  width: 100%;
  height: 180px;
  object-fit: cover;
  background: #0b1220;
  filter: contrast(1.08) saturate(1.12);
  transition: transform 0.38s ease, filter 0.38s ease;
}

.card:hover img {
  transform: scale(1.04);
  filter: contrast(1.15) saturate(1.2);
}

.card .content {
  padding: 14px 14px 15px;
}

.card-tag {
  display: inline-flex;
  align-items: center;
  margin: 0 0 10px;
  padding: 4px 9px;
  border-radius: 999px;
  border: 1px solid rgba(251, 191, 36, 0.7);
  background: rgba(251, 191, 36, 0.12);
  color: #fde68a;
  font-size: 0.76rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.card h3 {
  margin: 0 0 8px;
  font-size: 1.05rem;
  color: #fde68a;
}

.card p {
  font-size: 0.95rem;
}

.pager-wrap {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
  justify-content: center;
  margin-top: 20px;
}

.pager {
  display: flex;
  gap: 8px;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
}

button {
  border: 1px solid var(--accent-dark);
  background: var(--accent);
  color: #1f2937;
  padding: 8px 12px;
  border-radius: 8px;
  font-weight: 700;
  cursor: pointer;
  transition: transform 0.15s ease, opacity 0.15s ease;
}

button:hover:not(:disabled) {
  transform: translateY(-1px);
}

button:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

.page-btn.active {
  background: #facc15;
  border-color: #eab308;
}

.status {
  text-align: center;
  color: #e2e8f0;
  margin-top: 10px;
  font-size: 0.95rem;
}

.quote {
  border-left: 3px solid #fbbf24;
  padding-left: 12px;
  color: #f8fafc;
  font-style: italic;
}

.magazine-feature {
  display: grid;
  grid-template-columns: minmax(260px, 1.1fr) minmax(280px, 1fr);
  gap: 16px;
  background: rgba(15, 23, 42, 0.9);
  border: 1px solid rgba(148, 163, 184, 0.4);
  border-radius: 14px;
  padding: 14px;
  margin-bottom: 18px;
}

.magazine-image {
  width: 100%;
  height: 100%;
  min-height: 260px;
  max-height: 360px;
  object-fit: cover;
  border-radius: 10px;
  filter: contrast(1.1) saturate(1.2);
}

.magazine-content {
  align-self: center;
}

.lightbox {
  position: fixed;
  inset: 0;
  background: rgba(2, 6, 23, 0.88);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  z-index: 50;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.2s ease, visibility 0.2s ease;
}

.lightbox.open {
  opacity: 1;
  visibility: visible;
}

.lightbox img {
  max-width: min(95vw, 1100px);
  max-height: 85vh;
  border-radius: 12px;
  border: 1px solid rgba(251, 191, 36, 0.6);
  box-shadow: 0 20px 44px rgba(0, 0, 0, 0.45);
}

.lightbox-close {
  position: absolute;
  top: 16px;
  right: 16px;
  width: 38px;
  height: 38px;
  border-radius: 999px;
  padding: 0;
}

.grid .card:nth-child(2) {
  animation-delay: 80ms;
}

.grid .card:nth-child(3) {
  animation-delay: 160ms;
}

@keyframes card-in {
  from {
    opacity: 0;
    transform: translateY(8px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@media (max-width: 760px) {
  .top-nav {
    align-items: flex-start;
  }

  .menu-btn {
    display: inline-flex;
  }

  .top-nav-left {
    width: 100%;
    flex-direction: column;
    gap: 10px;
  }

  .nav-links {
    display: none;
    width: 100%;
    flex-direction: column;
  }

  .top-nav.open .nav-links {
    display: flex;
  }

  .top-nav a,
  .lang-btn {
    width: 100%;
    text-align: center;
  }

  .lang-switcher {
    width: 100%;
  }

  .magazine-feature {
    grid-template-columns: 1fr;
  }

  .magazine-image {
    max-height: 240px;
  }
}
