/* ==========================================================================
   КОСМОСЪТ · Дигитална обсерватория на ТГ „Княз Симеон Търновски“
   Външен вид: дълбок космос, слънчево злато, оптично стъкло и ясна кирилица.
   ========================================================================== */

/* --- 1. Шрифтове от нашия сървър (Unbounded за заглавия, Manrope за текст) --- */
@font-face {
  font-family: "Unbounded"; font-weight: 400; font-display: swap;
  src: url("fonts/unbounded/files/unbounded-cyrillic-400-normal.woff2") format("woff2");
  unicode-range: U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}
@font-face {
  font-family: "Unbounded"; font-weight: 400; font-display: swap;
  src: url("fonts/unbounded/files/unbounded-latin-400-normal.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+2000-206F;
}
@font-face {
  font-family: "Unbounded"; font-weight: 600; font-display: swap;
  src: url("fonts/unbounded/files/unbounded-cyrillic-600-normal.woff2") format("woff2");
  unicode-range: U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}
@font-face {
  font-family: "Unbounded"; font-weight: 600; font-display: swap;
  src: url("fonts/unbounded/files/unbounded-latin-600-normal.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+2000-206F;
}
@font-face {
  font-family: "Unbounded"; font-weight: 700; font-display: swap;
  src: url("fonts/unbounded/files/unbounded-cyrillic-700-normal.woff2") format("woff2");
  unicode-range: U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}
@font-face {
  font-family: "Unbounded"; font-weight: 700; font-display: swap;
  src: url("fonts/unbounded/files/unbounded-latin-700-normal.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+2000-206F;
}
@font-face {
  font-family: "Manrope"; font-weight: 400; font-display: swap;
  src: url("fonts/manrope/files/manrope-cyrillic-400-normal.woff2") format("woff2");
  unicode-range: U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}
@font-face {
  font-family: "Manrope"; font-weight: 400; font-display: swap;
  src: url("fonts/manrope/files/manrope-latin-400-normal.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+2000-206F;
}
@font-face {
  font-family: "Manrope"; font-weight: 600; font-display: swap;
  src: url("fonts/manrope/files/manrope-cyrillic-600-normal.woff2") format("woff2");
  unicode-range: U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}
@font-face {
  font-family: "Manrope"; font-weight: 600; font-display: swap;
  src: url("fonts/manrope/files/manrope-latin-600-normal.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+2000-206F;
}
@font-face {
  font-family: "Manrope"; font-weight: 700; font-display: swap;
  src: url("fonts/manrope/files/manrope-cyrillic-700-normal.woff2") format("woff2");
  unicode-range: U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}
@font-face {
  font-family: "Manrope"; font-weight: 700; font-display: swap;
  src: url("fonts/manrope/files/manrope-latin-700-normal.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+2000-206F;
}

/* --- 2. Основни цветове и променливи --- */
:root {
  --bg: #03050c;
  --bg-deep: #070b19;
  --surface: rgba(13, 19, 38, 0.72);
  --surface-strong: rgba(16, 24, 48, 0.9);
  --surface-hover: rgba(22, 32, 62, 0.86);
  --line: rgba(255, 255, 255, 0.09);
  --line-strong: rgba(245, 185, 95, 0.38);
  --text: #f3f6fc;
  --text-soft: #c5cfe4;
  --muted: #8491b0;
  --gold: #f5b95f;
  --gold-light: #ffe0a3;
  --gold-glow: rgba(245, 185, 95, 0.24);
  --sky: #7cc4ff;
  --sky-glow: rgba(124, 196, 255, 0.2);
  --ok: #6ee7a8;
  --danger: #ff857a;
  --radius-lg: 24px;
  --radius: 18px;
  --radius-sm: 12px;
  --max-w: 1160px;
}

*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
html { scroll-behavior: smooth; background: var(--bg); overflow-x: hidden; }
input, textarea, select { font-size: 16px; } /* Спира автоматичното приближаване на телефон при натискане в поле */

body {
  margin: 0;
  min-height: 100vh;
  font-family: "Manrope", system-ui, -apple-system, sans-serif;
  color: var(--text);
  background-color: var(--bg);
  background-image:
    radial-gradient(1px 1px at 28px 44px, rgba(255,255,255,0.75), transparent),
    radial-gradient(1px 1px at 142px 108px, rgba(190,220,255,0.65), transparent),
    radial-gradient(1.5px 1.5px at 78px 186px, rgba(255,235,195,0.7), transparent),
    radial-gradient(1px 1px at 234px 32px, rgba(255,255,255,0.55), transparent),
    radial-gradient(1px 1px at 312px 240px, rgba(180,210,255,0.6), transparent),
    radial-gradient(ellipse 80% 50% at 15% -5%, rgba(62, 98, 190, 0.22), transparent 65%),
    radial-gradient(ellipse 65% 45% at 88% 12%, rgba(214, 138, 52, 0.14), transparent 60%),
    radial-gradient(ellipse 70% 55% at 50% 100%, rgba(42, 68, 145, 0.18), transparent 65%);
  background-size: 240px 240px, 310px 310px, 370px 370px, 290px 290px, 420px 420px, 100% 100%, 100% 100%, 100% 100%;
  line-height: 1.65;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

a { color: var(--gold-light); text-decoration: none; transition: color 0.2s ease; }
a:hover { color: #fff; }
img { max-width: 100%; display: block; }

/* Лента за напредък при четене (горе на екрана) */
#read-progress {
  position: fixed; top: 0; left: 0; height: 3px; width: 0%; z-index: 120;
  background: linear-gradient(90deg, var(--gold), var(--sky));
  box-shadow: 0 0 12px var(--gold);
  transition: width 0.08s linear;
}

/* --- 3. Горна шапка (навигация) --- */
.topbar {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 90;
  padding: 14px 20px;
  transition: background 0.3s ease, backdrop-filter 0.3s ease, border-color 0.3s ease, padding 0.3s ease;
  border-bottom: 1px solid transparent;
}
.topbar.scrolled, body.inner .topbar {
  background: rgba(5, 8, 18, 0.78);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  border-bottom-color: var(--line);
  padding: 10px 20px;
}
.topbar-inner {
  max-width: var(--max-w);
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.brand-link {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  color: var(--text);
  text-decoration: none;
}
.brand-mark {
  width: 38px; height: 38px;
  border-radius: 12px;
  background: radial-gradient(circle at 35% 35%, rgba(245, 185, 95, 0.28), rgba(15, 23, 46, 0.9));
  border: 1px solid rgba(245, 185, 95, 0.45);
  display: grid;
  place-items: center;
  box-shadow: 0 0 24px rgba(245, 185, 95, 0.18);
  flex-shrink: 0;
}
.brand-mark svg { width: 22px; height: 22px; }
.brand-title {
  font-family: "Unbounded", sans-serif;
  font-weight: 700;
  font-size: 16px;
  letter-spacing: 0.08em;
  line-height: 1.1;
  color: #fff;
}
.brand-sub {
  font-size: 11px;
  color: var(--muted);
  letter-spacing: 0.02em;
  margin-top: 2px;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 4px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--line);
}
.nav-links a {
  padding: 8px 15px;
  border-radius: 999px;
  color: var(--text-soft);
  font-size: 14px;
  font-weight: 600;
  white-space: nowrap;
  transition: all 0.2s ease;
}
.nav-links a:hover { color: #fff; background: rgba(255, 255, 255, 0.06); }
.nav-links a.active {
  color: #090d1a;
  background: linear-gradient(135deg, var(--gold-light), var(--gold));
  box-shadow: 0 4px 18px var(--gold-glow);
}

.topbar-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

/* Бутони */
.btn, button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 11px 20px;
  border-radius: 999px;
  border: 1px solid transparent;
  font-family: "Manrope", sans-serif;
  font-weight: 700;
  font-size: 14px;
  cursor: pointer;
  text-decoration: none;
  transition: transform 0.18s ease, box-shadow 0.2s ease, background 0.2s ease, border-color 0.2s ease;
  color: #090d18;
  background: linear-gradient(135deg, var(--gold-light), var(--gold));
  box-shadow: 0 6px 24px var(--gold-glow);
}
.btn:hover, button:hover {
  transform: translateY(-1px);
  box-shadow: 0 10px 28px rgba(245, 185, 95, 0.36);
  color: #060912;
}
.btn:active, button:active { transform: translateY(0); }
button:disabled { opacity: 0.55; cursor: wait; transform: none; }

.btn-sm { padding: 8px 15px; font-size: 13px; }
.btn-lg { padding: 14px 26px; font-size: 15px; }

.btn-ghost, button.ghost {
  background: rgba(255, 255, 255, 0.06);
  color: var(--text);
  border-color: var(--line);
  box-shadow: none;
}
.btn-ghost:hover, button.ghost:hover {
  background: rgba(255, 255, 255, 0.12);
  border-color: rgba(255, 255, 255, 0.24);
  color: #fff;
  box-shadow: none;
}
button.danger, .btn-danger {
  background: rgba(255, 107, 97, 0.12);
  color: var(--danger);
  border-color: rgba(255, 107, 97, 0.28);
  box-shadow: none;
}
button.danger:hover, .btn-danger:hover {
  background: rgba(255, 107, 97, 0.22);
  color: #ffb3ac;
}

/* Долна плаваща лента за телефон */
.mobile-dock {
  display: none;
  position: fixed;
  left: 10px; right: 10px;
  bottom: max(10px, env(safe-area-inset-bottom));
  z-index: 95;
  padding: 5px 4px;
  gap: 2px;
  border-radius: 20px;
  background: rgba(8, 12, 26, 0.88);
  border: 1px solid rgba(255, 255, 255, 0.14);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  box-shadow: 0 14px 40px rgba(0, 0, 0, 0.65);
  justify-content: space-between;
}
.mobile-dock a {
  flex: 1 0 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
  padding: 7px 5px;
  border-radius: 14px;
  color: var(--muted);
  font-size: 10.5px;
  font-weight: 700;
  white-space: nowrap;
  text-decoration: none;
}
.mobile-dock a svg { width: 19px; height: 19px; stroke-width: 1.9; }
.mobile-dock a.active {
  color: var(--gold-light);
  background: rgba(245, 185, 95, 0.13);
}

@media (max-width: 900px) {
  .nav-links { display: none; }
  .mobile-dock { display: flex; }
  .brand-sub { display: none; }
}
@media (max-width: 560px) {
  .topbar, .topbar.scrolled, body.inner .topbar { padding: 10px 14px; }
  .brand-link { gap: 9px; }
  .brand-mark { width: 34px; height: 34px; border-radius: 10px; }
  .brand-title { font-size: 12px; letter-spacing: 0.03em; line-height: 1.18; }
  .topbar-actions .btn-sm { padding: 7px 12px; font-size: 12.5px; white-space: nowrap; }
}

/* --- 4. Начална сцена със Слънчевата система --- */
.hero {
  position: relative;
  height: 100vh;
  height: 100svh;
  min-height: 620px;
  overflow: hidden;
  border-bottom: 1px solid var(--line);
}
#space {
  position: absolute;
  inset: 0;
  opacity: 0;
  transition: opacity 1.1s ease;
  cursor: grab;
}
#space:active { cursor: grabbing; }
.hero.ready #space { opacity: 1; }

/* Затъмняване горе и долу, за да се четат буквите кристално ясно */
.hero-vignette {
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    linear-gradient(180deg, rgba(3,5,12,0.72) 0%, rgba(3,5,12,0.18) 28%, rgba(3,5,12,0) 58%, rgba(3,5,12,0.92) 100%);
}

/* Анимация докато се теглят планетите */
#loading {
  position: absolute; left: 50%; top: 54%; width: 170px; height: 170px;
  transform: translate(-50%, -50%); transition: opacity 0.7s ease;
  pointer-events: none;
}
.hero.ready #loading { opacity: 0; }
.sunlet {
  position: absolute; inset: 0; margin: auto; width: 26px; height: 26px; border-radius: 50%;
  background: radial-gradient(circle, #fff5d6, #f5b95f 60%, #e07b28);
  box-shadow: 0 0 32px 10px rgba(245, 185, 95, 0.5);
  animation: pulse 1.6s ease-in-out infinite;
}
.orbit {
  position: absolute; inset: 0; margin: auto; border-radius: 50%;
  border: 1px solid rgba(145, 175, 235, 0.3); animation: spin linear infinite;
}
.orbit span {
  position: absolute; top: -4px; left: 50%; width: 8px; height: 8px; margin-left: -4px; border-radius: 50%;
}
.o1 { width: 68px; height: 68px; animation-duration: 1.5s; }
.o2 { width: 116px; height: 116px; animation-duration: 2.5s; }
.o3 { width: 166px; height: 166px; animation-duration: 3.9s; }
.o1 span { background: var(--sky); box-shadow: 0 0 10px var(--sky); }
.o2 span { background: var(--gold); box-shadow: 0 0 10px var(--gold); }
.o3 span { background: #b49cff; box-shadow: 0 0 10px #b49cff; }
@keyframes spin { to { transform: rotate(360deg); } }
@keyframes pulse { 50% { transform: scale(1.15); } }

/* Заглавието върху космоса */
.hero-content {
  position: absolute;
  top: 92px; left: 0; right: 0;
  z-index: 5;
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 20px;
  pointer-events: none;
  transition: opacity 0.4s ease, transform 0.4s ease;
}
.hero.inspecting .hero-content {
  opacity: 0.18;
  transform: translateY(-8px);
}
.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 13px;
  border-radius: 999px;
  background: rgba(245, 185, 95, 0.1);
  border: 1px solid rgba(245, 185, 95, 0.28);
  color: var(--gold-light);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  margin-bottom: 14px;
}
.eyebrow::before {
  content: "";
  width: 6px; height: 6px;
  border-radius: 50%;
  background: var(--gold);
  box-shadow: 0 0 8px var(--gold);
}
.hero-content h1 {
  font-family: "Unbounded", sans-serif;
  font-weight: 700;
  font-size: clamp(32px, 6vw, 68px);
  line-height: 1.08;
  letter-spacing: -0.01em;
  margin: 0 0 12px;
  max-width: 720px;
  background: linear-gradient(115deg, #ffffff 15%, #ffe5b4 60%, #9acbff 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.hero-content p {
  color: var(--text-soft);
  font-size: clamp(15px, 1.8vw, 18px);
  max-width: 540px;
  margin: 0;
  text-shadow: 0 2px 18px rgba(0, 0, 0, 0.8);
}

/* Информационна карта за избрана планета */
.planet-card {
  position: absolute;
  right: 24px;
  top: 104px;
  z-index: 12;
  width: min(350px, calc(100vw - 32px));
  padding: 20px;
  border-radius: 20px;
  background: rgba(9, 14, 30, 0.84);
  border: 1px solid rgba(245, 185, 95, 0.35);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.6);
  animation: fadeUp 0.3s ease;
}
.planet-card[hidden] { display: none; }
.planet-card-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 10px;
}
.planet-card-type {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--gold);
  font-weight: 700;
}
.planet-card h3 {
  font-family: "Unbounded", sans-serif;
  font-size: 22px;
  margin: 2px 0 0;
}
.planet-close {
  width: 32px; height: 32px; padding: 0;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.08);
  color: var(--text);
  box-shadow: none;
  font-size: 18px;
}
.planet-stats {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin: 12px 0;
}
.planet-stat {
  padding: 9px 11px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--line);
}
.planet-stat span { display: block; font-size: 11px; color: var(--muted); }
.planet-stat strong { font-size: 13px; color: #fff; }
.planet-fact {
  font-size: 13.5px;
  color: var(--text-soft);
  margin: 0;
  line-height: 1.55;
}

/* Лента за избор на планета в долната част на космоса */
.planet-bar-wrap {
  position: absolute;
  left: 0; right: 0;
  bottom: 24px;
  z-index: 10;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  padding: 0 16px;
}
.planet-hint {
  font-size: 12px;
  color: var(--muted);
  letter-spacing: 0.03em;
}
.planet-bar {
  display: flex;
  align-items: center;
  gap: 6px;
  max-width: 100%;
  overflow-x: auto;
  padding: 6px;
  border-radius: 999px;
  background: rgba(8, 12, 26, 0.75);
  border: 1px solid var(--line);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  scrollbar-width: none;
}
.planet-bar::-webkit-scrollbar { display: none; }
.planet-chip {
  padding: 7px 14px;
  border-radius: 999px;
  background: transparent;
  color: var(--text-soft);
  border: 1px solid transparent;
  box-shadow: none;
  font-size: 13px;
  font-weight: 600;
  white-space: nowrap;
}
.planet-chip:hover {
  background: rgba(255, 255, 255, 0.08);
  color: #fff;
  box-shadow: none;
  transform: none;
}
.planet-chip.active {
  background: rgba(245, 185, 95, 0.18);
  border-color: rgba(245, 185, 95, 0.5);
  color: var(--gold-light);
}

@media (max-width: 900px) {
  .hero-content { top: 76px; }
  .planet-bar-wrap { bottom: 86px; }
  .planet-hint { display: none; }
  .planet-card {
    top: auto;
    right: 16px; left: 16px;
    bottom: 142px;
    width: auto;
    padding: 16px;
  }
}

/* --- 5. Общи контейнери и секции --- */
.container {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 20px;
}
.page-main {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 108px 20px 80px;
}
.section {
  padding: 76px 0;
}
.section-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 20px;
  flex-wrap: wrap;
  margin-bottom: 32px;
}
.section-title {
  font-family: "Unbounded", sans-serif;
  font-weight: 600;
  font-size: clamp(24px, 3.6vw, 38px);
  line-height: 1.18;
  margin: 0;
}
.section-sub {
  color: var(--muted);
  font-size: 16px;
  max-width: 580px;
  margin: 8px 0 0;
}

/* Заглавна част на вътрешна страница */
.page-hero {
  position: relative;
  padding: 18px 0 36px;
  margin-bottom: 32px;
  border-bottom: 1px solid var(--line);
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 20px;
  flex-wrap: wrap;
}
.page-hero h1 {
  font-family: "Unbounded", sans-serif;
  font-weight: 700;
  font-size: clamp(28px, 4.5vw, 48px);
  line-height: 1.12;
  margin: 4px 0 10px;
}
.page-hero .lead {
  color: var(--text-soft);
  font-size: clamp(16px, 2vw, 18px);
  max-width: 640px;
  margin: 0;
}

/* --- 6. Стъклени карти и решетки --- */
.card {
  background: linear-gradient(165deg, rgba(16, 23, 46, 0.78), rgba(9, 13, 28, 0.88));
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 26px;
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.32);
  transition: border-color 0.25s ease, transform 0.25s ease, box-shadow 0.25s ease;
}
.card > :first-child { margin-top: 0; }
.card > :last-child { margin-bottom: 0; }
.card h2, .card h3 {
  font-family: "Unbounded", sans-serif;
  font-weight: 600;
  line-height: 1.3;
}

/* Числа за Вселената (4 колони) */
.metrics-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
}
.metric-card {
  padding: 24px;
  border-radius: var(--radius);
  background: linear-gradient(160deg, rgba(20, 29, 58, 0.65), rgba(9, 13, 26, 0.82));
  border: 1px solid var(--line);
  position: relative;
  overflow: hidden;
}
.metric-card::after {
  content: "";
  position: absolute; top: 0; left: 0; right: 0; height: 2px;
  background: linear-gradient(90deg, transparent, var(--gold), transparent);
  opacity: 0.55;
}
.metric-num {
  font-family: "Unbounded", sans-serif;
  font-weight: 700;
  font-size: clamp(22px, 2.6vw, 30px);
  color: var(--gold-light);
  margin-bottom: 6px;
}
.metric-label {
  font-weight: 700;
  font-size: 14px;
  color: #fff;
  margin-bottom: 4px;
}
.metric-desc {
  font-size: 13px;
  color: var(--muted);
  margin: 0;
}

@media (max-width: 920px) { .metrics-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 500px) { .metrics-grid { grid-template-columns: 1fr; } }

/* Двуколонни и триколонни секции */
.split-grid {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 24px;
  align-items: stretch;
}
.three-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}
@media (max-width: 880px) {
  .split-grid, .three-grid { grid-template-columns: 1fr; }
}

/* --- 7. Новини (списаниен изглед) --- */
.news-featured {
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  gap: 28px;
  align-items: center;
  padding: 34px;
  margin-bottom: 24px;
  border-color: rgba(245, 185, 95, 0.28);
  background:
    radial-gradient(circle at 95% 15%, rgba(245, 185, 95, 0.14), transparent 50%),
    linear-gradient(165deg, rgba(20, 29, 58, 0.85), rgba(9, 13, 28, 0.92));
  color: var(--text);
  text-decoration: none;
}
.news-featured:hover {
  border-color: var(--gold);
  transform: translateY(-3px);
  color: var(--text);
}
.news-featured-visual {
  height: 100%;
  min-height: 190px;
  border-radius: 16px;
  border: 1px solid var(--line);
  background:
    radial-gradient(circle at 30% 35%, rgba(245, 185, 95, 0.35), transparent 45%),
    radial-gradient(circle at 75% 70%, rgba(124, 196, 255, 0.3), transparent 50%),
    #070c1b;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 20px;
  text-align: center;
}
.news-featured-visual .big-num {
  font-family: "Unbounded", sans-serif;
  font-size: 42px;
  font-weight: 700;
  color: var(--gold-light);
  opacity: 0.9;
}
@media (max-width: 780px) {
  .news-featured { grid-template-columns: 1fr; padding: 24px; }
  .news-featured-visual { display: none; }
}

.news-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(310px, 1fr));
  gap: 20px;
}
a.news-card {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  color: var(--text);
  text-decoration: none;
  height: 100%;
}
a.news-card:hover {
  border-color: var(--line-strong);
  transform: translateY(-4px);
  box-shadow: 0 22px 44px rgba(0, 0, 0, 0.45);
  color: var(--text);
}
.news-meta {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 12px;
  color: var(--gold);
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  margin-bottom: 12px;
}
.news-card h2, .news-card h3 {
  font-size: 19px;
  margin: 0 0 10px;
  color: #fff;
}
.news-card p {
  color: var(--text-soft);
  font-size: 15px;
  margin: 0 0 18px;
  line-height: 1.6;
}
.news-read {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  font-weight: 700;
  color: var(--gold-light);
  margin-top: auto;
}

/* Статия (единична новина) */
.article-wrap {
  max-width: 780px;
  margin: 0 auto;
}
.article-back {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
  font-weight: 700;
  color: var(--muted);
  margin-bottom: 20px;
}
.article-back:hover { color: var(--gold-light); }
.article-header h1 {
  font-family: "Unbounded", sans-serif;
  font-size: clamp(24px, 4vw, 40px);
  line-height: 1.2;
  margin: 10px 0 16px;
}
.article-summary {
  font-size: 19px;
  color: var(--gold-light);
  line-height: 1.6;
  margin: 0 0 28px;
  padding-left: 16px;
  border-left: 3px solid var(--gold);
}
.article-body {
  padding: 34px;
}
.article-body p {
  font-size: 18px;
  line-height: 1.82;
  color: #dce3f3;
  margin: 0 0 22px;
}
.article-body p:last-child { margin-bottom: 0; }
@media (max-width: 600px) { .article-body { padding: 22px; } }

/* Заглавна снимка при отваряне на статия и снимки вътре в текста */
.article-cover {
  margin: 0 0 26px;
  border-radius: 20px;
  overflow: hidden;
  border: 1px solid rgba(245, 185, 95, 0.28);
  background: rgba(6, 9, 20, 0.8);
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.45);
}
.article-cover img {
  width: 100%;
  max-height: 460px;
  object-fit: cover;
  display: block;
  cursor: zoom-in;
}
.article-figure {
  margin: 28px 0;
  border-radius: 16px;
  overflow: hidden;
  border: 1px solid var(--line);
  background: rgba(5, 8, 18, 0.72);
}
.article-figure:first-child { margin-top: 0; }
.article-figure:last-child { margin-bottom: 0; }
.article-figure img {
  width: 100%;
  max-height: 520px;
  object-fit: contain;
  background: #040711;
  display: block;
  cursor: zoom-in;
}
.article-figure figcaption {
  padding: 10px 16px;
  font-size: 13.5px;
  color: var(--muted);
  text-align: center;
  border-top: 1px solid var(--line);
}

/* --- 8. Галерия и преглед на цял екран --- */
.filter-bar {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 28px;
}
.filter-btn {
  padding: 8px 16px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.05);
  color: var(--text-soft);
  border: 1px solid var(--line);
  box-shadow: none;
  font-size: 13.5px;
}
.filter-btn:hover {
  background: rgba(255, 255, 255, 0.1);
  color: #fff;
  box-shadow: none;
}
.filter-btn.active {
  background: linear-gradient(135deg, var(--gold-light), var(--gold));
  color: #090d18;
  border-color: transparent;
}

.topic-section { margin-bottom: 44px; }
.topic-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin: 0 0 16px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--line);
}
.topic-heading h2 {
  font-family: "Unbounded", sans-serif;
  font-size: 20px;
  font-weight: 600;
  margin: 0;
}
.topic-count {
  font-size: 13px;
  color: var(--muted);
}

.gallery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));
  gap: 16px;
}
.tile {
  position: relative;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 18px;
  overflow: hidden;
  aspect-ratio: 1;
  background: var(--surface);
  cursor: pointer;
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.35);
}
.tile img {
  width: 100%; height: 100%;
  object-fit: cover;
  transition: transform 0.45s ease;
}
.tile:hover {
  border-color: var(--line-strong);
  transform: translateY(-3px);
}
.tile:hover img { transform: scale(1.06); }
.tile-overlay {
  position: absolute;
  inset: auto 0 0 0;
  padding: 36px 14px 12px;
  text-align: left;
  background: linear-gradient(transparent, rgba(3, 5, 12, 0.9));
  color: #fff;
}
.tile-caption {
  display: block;
  font-size: 13.5px;
  font-weight: 700;
  margin-bottom: 2px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.tile-author {
  display: block;
  font-size: 12px;
  color: var(--gold-light);
  font-weight: 600;
}

@media (max-width: 540px) {
  .gallery-grid { grid-template-columns: repeat(2, 1fr); gap: 10px; }
}

/* Номерация на страниците в Галерията (по 30 снимки на страница) */
.pagination-wrap {
  margin-top: 32px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
}
.pagination-info {
  font-size: 13px;
  color: var(--muted);
}
.pagination {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  flex-wrap: wrap;
}
.page-btn {
  min-width: 40px;
  height: 40px;
  padding: 0 13px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--line);
  color: var(--text-soft);
  box-shadow: none;
  font-size: 14px;
  font-weight: 700;
}
.page-btn:hover:not(:disabled) {
  background: rgba(255, 255, 255, 0.11);
  color: #fff;
  box-shadow: none;
  transform: none;
}
.page-btn.active {
  background: linear-gradient(135deg, var(--gold-light), var(--gold));
  color: #090d18;
  border-color: transparent;
}
.page-dots {
  color: var(--muted);
  padding: 0 4px;
  font-weight: 700;
}

/* Преглед на снимка на цял екран (с плъзгане наляво/надясно с пръст на телефон) */
#viewer {
  position: fixed; inset: 0; z-index: 200;
  background: rgba(3, 5, 12, 0.95);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  padding: 24px;
  overflow: hidden;
  touch-action: none;
  user-select: none;
  -webkit-user-select: none;
}
#viewer[hidden] { display: none; }
#viewer img {
  max-width: min(92vw, 1100px);
  max-height: 75vh;
  border-radius: 16px;
  border: 1px solid var(--line);
  box-shadow: 0 24px 70px rgba(0, 0, 0, 0.8);
  will-change: transform, opacity;
  pointer-events: none;
}
.viewer-counter {
  position: absolute; top: 24px; left: 22px;
  padding: 6px 13px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.09);
  color: var(--text-soft);
  font-size: 13px;
  font-weight: 700;
}
.viewer-bar {
  margin-top: 16px;
  text-align: center;
  max-width: 600px;
}
.viewer-title { font-weight: 700; font-size: 16px; color: #fff; }
.viewer-meta { font-size: 13.5px; color: var(--gold-light); margin-top: 4px; }
.viewer-close {
  position: absolute; top: 20px; right: 20px;
  width: 44px; height: 44px; border-radius: 50%; padding: 0;
  background: rgba(255, 255, 255, 0.1); color: #fff; font-size: 22px; box-shadow: none;
}
.viewer-nav {
  position: absolute; top: 50%; transform: translateY(-50%);
  width: 46px; height: 46px; border-radius: 50%; padding: 0;
  background: rgba(255, 255, 255, 0.1); color: #fff; font-size: 20px; box-shadow: none;
}
.viewer-prev { left: 20px; }
.viewer-next { right: 20px; }
@media (max-width: 640px) {
  .viewer-nav { top: auto; bottom: 24px; transform: none; }
}

/* --- 9. Страница за качване на снимки (kachi) --- */
.upload-layout {
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  gap: 28px;
  align-items: start;
}
@media (max-width: 860px) { .upload-layout { grid-template-columns: 1fr; } }

.dropzone {
  position: relative;
  border: 2px dashed rgba(245, 185, 95, 0.42);
  border-radius: 18px;
  padding: 28px 20px;
  text-align: center;
  background: rgba(245, 185, 95, 0.04);
  cursor: pointer;
  transition: border-color 0.2s ease, background 0.2s ease;
  margin-bottom: 18px;
}
.dropzone:hover, .dropzone.dragover {
  border-color: var(--gold);
  background: rgba(245, 185, 95, 0.09);
}
.dropzone input[type="file"] {
  position: absolute; inset: 0; opacity: 0; cursor: pointer; width: 100%; height: 100%;
}
.dropzone-icon {
  width: 54px; height: 54px;
  margin: 0 auto 12px;
  border-radius: 16px;
  background: rgba(245, 185, 95, 0.14);
  color: var(--gold-light);
  display: grid;
  place-items: center;
  font-size: 24px;
}
.dropzone-title { font-weight: 700; font-size: 16px; color: #fff; margin-bottom: 4px; }
.dropzone-sub { font-size: 13px; color: var(--muted); }
.preview-box {
  margin-top: 14px;
}
.preview-box[hidden] { display: none; }
.preview-box img {
  max-height: 240px;
  margin: 0 auto;
  border-radius: 12px;
  border: 1px solid var(--line);
}
.preview-name { font-size: 12.5px; color: var(--gold-light); margin-top: 8px; }

.steps-list {
  list-style: none;
  padding: 0; margin: 18px 0 0;
  display: grid; gap: 16px;
}
.steps-list li {
  display: grid;
  grid-template-columns: 36px 1fr;
  gap: 14px;
  align-items: start;
}
.step-num {
  width: 36px; height: 36px;
  border-radius: 50%;
  background: rgba(245, 185, 95, 0.15);
  border: 1px solid rgba(245, 185, 95, 0.4);
  color: var(--gold-light);
  font-family: "Unbounded", sans-serif;
  font-weight: 700;
  font-size: 14px;
  display: grid;
  place-items: center;
}
.steps-list strong { display: block; color: #fff; margin-bottom: 2px; }
.steps-list span { font-size: 14px; color: var(--text-soft); }

.success-box {
  text-align: center;
  padding: 36px 24px;
}
.success-box[hidden] { display: none; }
.success-icon {
  width: 64px; height: 64px;
  border-radius: 50%;
  margin: 0 auto 16px;
  background: rgba(110, 231, 168, 0.15);
  border: 1px solid rgba(110, 231, 168, 0.45);
  color: var(--ok);
  display: grid;
  place-items: center;
  font-size: 28px;
}

/* --- 10. Контакти и интерактивна карта с ПИН --- */
.contact-layout {
  display: grid;
  grid-template-columns: 0.95fr 1.05fr;
  gap: 24px;
  align-items: stretch;
}
@media (max-width: 880px) { .contact-layout { grid-template-columns: 1fr; } }

.contact-items {
  display: grid;
  gap: 14px;
  margin: 20px 0 24px;
}
.contact-row {
  display: grid;
  grid-template-columns: 42px 1fr;
  gap: 14px;
  align-items: start;
  padding: 14px;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--line);
}
.contact-icon {
  width: 42px; height: 42px;
  border-radius: 12px;
  background: rgba(245, 185, 95, 0.12);
  color: var(--gold-light);
  display: grid;
  place-items: center;
  font-size: 18px;
}
.contact-row small {
  display: block;
  font-size: 11.5px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--muted);
  margin-bottom: 2px;
}
.contact-row strong, .contact-row a {
  font-size: 15px;
  font-weight: 700;
  color: #fff;
}
.contact-row a:hover { color: var(--gold-light); }

.map-card {
  padding: 10px;
  display: flex;
  flex-direction: column;
  min-height: 440px;
}
#school-map {
  width: 100%;
  flex: 1;
  min-height: 420px;
  border-radius: 14px;
  overflow: hidden;
  z-index: 1;
  background: #0b1124;
}
/* Tъмно-космически филтър за плочките на картата, за да пасва идеално на сайта */
#school-map .leaflet-tile-pane {
  filter: invert(92%) hue-rotate(188deg) brightness(96%) contrast(94%) saturate(85%);
}
/* Светещ златен ПИН за гимназията */
.school-pin {
  position: relative;
  width: 38px; height: 38px;
}
.school-pin-pulse {
  position: absolute; inset: -10px;
  border-radius: 50%;
  background: rgba(245, 185, 95, 0.32);
  animation: pinPulse 2s ease-out infinite;
}
.school-pin-head {
  position: relative;
  width: 38px; height: 38px;
  border-radius: 50% 50% 50% 0;
  transform: rotate(-45deg);
  background: linear-gradient(135deg, #ffe3a8, #e89b32);
  border: 2px solid #090d1a;
  box-shadow: 0 8px 22px rgba(0, 0, 0, 0.65);
  display: grid;
  place-items: center;
}
.school-pin-head::after {
  content: "";
  width: 12px; height: 12px;
  border-radius: 50%;
  background: #090d1a;
}
@keyframes pinPulse {
  0% { transform: scale(0.6); opacity: 0.9; }
  100% { transform: scale(1.7); opacity: 0; }
}
.leaflet-popup-content-wrapper {
  background: rgba(10, 15, 32, 0.95) !important;
  color: var(--text) !important;
  border: 1px solid rgba(245, 185, 95, 0.45);
  border-radius: 14px !important;
  box-shadow: 0 14px 36px rgba(0, 0, 0, 0.65) !important;
}
.leaflet-popup-tip { background: rgba(10, 15, 32, 0.95) !important; }
.leaflet-popup-content { margin: 12px 15px !important; font-family: "Manrope", sans-serif; line-height: 1.45; }
.map-popup-title { font-family: "Unbounded", sans-serif; font-size: 13px; font-weight: 700; color: var(--gold-light); margin-bottom: 4px; }
.map-popup-addr { font-size: 12.5px; color: var(--text-soft); }

/* --- 11. Форми и Админ панел --- */
.form label {
  display: block;
  margin-bottom: 16px;
  font-weight: 700;
  font-size: 13.5px;
  color: var(--text-soft);
}
.form input:not([type="file"]):not([type="checkbox"]), .form textarea, .form select {
  display: block;
  width: 100%;
  margin-top: 7px;
  padding: 12px 14px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--line);
  background: rgba(4, 7, 16, 0.65);
  color: var(--text);
  font-family: inherit;
  font-weight: 400;
  font-size: 16px; /* Задължително поне 16px, за да не приближава на телефон! */
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}
.form-two-cols {
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  gap: 14px;
}
@media (max-width: 640px) {
  .form-two-cols { grid-template-columns: 1fr; gap: 0; }
}
.form label.check-label {
  display: flex;
  align-items: center;
  gap: 10px;
  cursor: pointer;
  font-weight: 600;
  margin: 6px 0 18px;
}
.form label.check-label input[type="checkbox"] {
  width: 20px; height: 20px;
  accent-color: var(--gold);
  flex-shrink: 0;
}

/* Каре за сбирките на кръжока и карти с опити */
.meeting-card {
  padding: 28px 32px;
  border-radius: var(--radius-lg);
  border: 1px solid rgba(245, 185, 95, 0.36);
  background:
    radial-gradient(circle at 92% 18%, rgba(245, 185, 95, 0.16), transparent 48%),
    linear-gradient(165deg, rgba(18, 27, 54, 0.88), rgba(9, 13, 28, 0.94));
  box-shadow: 0 18px 44px rgba(0, 0, 0, 0.4);
}
.meeting-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
  margin-top: 18px;
}
.meeting-item {
  padding: 14px 16px;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--line);
}
.meeting-item small {
  display: block;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--gold);
  font-weight: 700;
  margin-bottom: 4px;
}
.meeting-item strong {
  display: block;
  font-size: 15.5px;
  color: #fff;
}
@media (max-width: 820px) {
  .meeting-card { padding: 22px; }
  .meeting-grid { grid-template-columns: 1fr; gap: 10px; }
}

.exp-card {
  display: flex;
  flex-direction: column;
  height: 100%;
}
.exp-card h3 {
  font-size: 19px;
  margin: 0 0 10px;
  color: #fff;
}
.exp-equip {
  font-size: 13px;
  color: var(--gold-light);
  padding: 8px 12px;
  border-radius: 10px;
  background: rgba(245, 185, 95, 0.08);
  border: 1px solid rgba(245, 185, 95, 0.2);
  margin-bottom: 12px;
}
.exp-card p {
  color: var(--text-soft);
  font-size: 14.5px;
  line-height: 1.65;
  margin: 0;
}
.form input:focus, .form textarea:focus, .form select:focus {
  outline: none;
  border-color: var(--gold);
  box-shadow: 0 0 0 3px rgba(245, 185, 95, 0.15);
}
.form textarea { resize: vertical; line-height: 1.6; }

.row { display: flex; gap: 10px; align-items: center; justify-content: space-between; flex-wrap: wrap; }
.hint { color: var(--muted); font-size: 13px; font-weight: 400; }
.muted { color: var(--muted); line-height: 1.65; }
.error { color: var(--danger); margin: 10px 0 0; font-size: 14px; min-height: 1.2em; }
.ok { color: var(--ok); margin: 10px 0 0; font-size: 14px; font-weight: 600; }

.empty {
  text-align: center;
  color: var(--muted);
  padding: 52px 24px;
}
.empty .icon { font-size: 42px; margin-bottom: 12px; }

/* Админ раздели и списък със снимки */
.tabs { display: flex; gap: 8px; flex-wrap: wrap; margin: 10px 0; }
.tab {
  background: rgba(255, 255, 255, 0.05);
  color: var(--text-soft);
  border: 1px solid var(--line);
  box-shadow: none;
}
.tab.active {
  background: linear-gradient(135deg, var(--gold-light), var(--gold));
  color: #090d18;
  border-color: transparent;
}
.badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 22px; height: 22px;
  padding: 0 7px;
  border-radius: 999px;
  background: #ff5e52;
  color: #fff;
  font-size: 12px;
  font-weight: 800;
}
.badge:empty { display: none; }

.photo-item {
  display: grid;
  grid-template-columns: 170px 1fr;
  gap: 20px;
  align-items: start;
  margin-bottom: 16px;
}
.photo-item .thumb {
  width: 170px;
  aspect-ratio: 1;
  object-fit: cover;
  border-radius: 14px;
  border: 1px solid var(--line);
  cursor: zoom-in;
}
.status-pill {
  display: inline-block;
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 11.5px;
  font-weight: 700;
  margin-bottom: 10px;
}
.status-pill.pending { background: rgba(245, 185, 95, 0.16); color: var(--gold-light); border: 1px solid rgba(245, 185, 95, 0.4); }
.status-pill.approved { background: rgba(110, 231, 168, 0.14); color: var(--ok); border: 1px solid rgba(110, 231, 168, 0.35); }
@media (max-width: 580px) {
  .photo-item { grid-template-columns: 1fr; }
  .photo-item .thumb { width: 100%; max-height: 260px; }
}

/* Банер за призив / Дарение */
.cta-banner {
  padding: 38px;
  border-radius: var(--radius-lg);
  background:
    radial-gradient(circle at 90% 20%, rgba(245, 185, 95, 0.2), transparent 50%),
    radial-gradient(circle at 10% 90%, rgba(124, 196, 255, 0.16), transparent 50%),
    linear-gradient(160deg, rgba(19, 28, 56, 0.9), rgba(9, 13, 28, 0.94));
  border: 1px solid rgba(245, 185, 95, 0.3);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  flex-wrap: wrap;
}
.cta-banner h2 {
  font-family: "Unbounded", sans-serif;
  font-size: clamp(20px, 3vw, 28px);
  margin: 4px 0 8px;
}
.cta-banner p { color: var(--text-soft); margin: 0; max-width: 580px; }

/* --- 12. Долна част на сайта (Футър) --- */
.site-footer {
  margin-top: 64px;
  border-top: 1px solid var(--line);
  background: rgba(3, 5, 12, 0.85);
  padding: 48px 20px 110px;
}
@media (min-width: 901px) {
  .site-footer { padding-bottom: 48px; }
}
.footer-grid {
  max-width: var(--max-w);
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr;
  gap: 32px;
}
@media (max-width: 780px) { .footer-grid { grid-template-columns: 1fr; gap: 24px; } }
.footer-col h4 {
  font-family: "Unbounded", sans-serif;
  font-size: 13px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--gold-light);
  margin: 0 0 14px;
}
.footer-links {
  list-style: none;
  padding: 0; margin: 0;
  display: grid; gap: 8px;
}
.footer-links a { color: var(--text-soft); font-size: 14px; }
.footer-links a:hover { color: var(--gold-light); }
.footer-bottom {
  max-width: var(--max-w);
  margin: 36px auto 0;
  padding-top: 20px;
  border-top: 1px solid var(--line);
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  font-size: 13px;
  color: var(--muted);
}

/* Отметка за съгласие (GDPR) при качване на снимка */
.form label.consent-box {
  display: grid;
  grid-template-columns: 22px 1fr;
  gap: 12px;
  align-items: start;
  padding: 14px 16px;
  margin: 8px 0 18px;
  border-radius: 14px;
  background: rgba(245, 185, 95, 0.06);
  border: 1px solid rgba(245, 185, 95, 0.28);
  font-weight: 500;
  font-size: 13.5px;
  line-height: 1.55;
  color: var(--text-soft);
  cursor: pointer;
}
.form label.consent-box input[type="checkbox"] {
  width: 20px; height: 20px;
  margin-top: 2px;
  accent-color: var(--gold);
  cursor: pointer;
}
.form label.consent-box a {
  text-decoration: underline;
  font-weight: 700;
}

/* Страница Общи условия и GDPR */
.legal-stack {
  max-width: 860px;
  display: grid;
  gap: 20px;
}
.legal-card h2 {
  font-size: 21px;
  margin: 6px 0 12px;
}
.legal-card p {
  color: var(--text-soft);
  margin: 0 0 12px;
}
.legal-list {
  margin: 0;
  padding-left: 20px;
  display: grid;
  gap: 10px;
  color: var(--text-soft);
}
.legal-list strong { color: #fff; }
.legal-card code {
  padding: 2px 6px;
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.08);
  font-size: 13px;
  color: var(--gold-light);
}

/* Екран преди съгласие за зареждане на външната карта */
.map-consent-placeholder {
  width: 100%;
  height: 100%;
  min-height: 420px;
  border-radius: 14px;
  padding: 28px;
  background:
    radial-gradient(circle at 50% 35%, rgba(245, 185, 95, 0.14), transparent 55%),
    #080d1d;
  border: 1px dashed rgba(245, 185, 95, 0.35);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  gap: 10px;
}

/* Банер за бисквитки (GDPR) */
.cookie-banner {
  position: fixed;
  left: 16px;
  right: 16px;
  bottom: 20px;
  max-width: 880px;
  margin: 0 auto;
  z-index: 150;
  padding: 18px 22px;
  border-radius: 20px;
  background: rgba(9, 14, 30, 0.96);
  border: 1px solid rgba(245, 185, 95, 0.42);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  box-shadow: 0 20px 55px rgba(0, 0, 0, 0.75);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  animation: fadeUp 0.3s ease;
}
.cookie-banner[hidden] { display: none; }
.cookie-text {
  font-size: 13.5px;
  line-height: 1.55;
  color: var(--text-soft);
}
.cookie-text strong { color: #fff; }
.cookie-text a { text-decoration: underline; font-weight: 700; }
.cookie-actions {
  display: flex;
  gap: 10px;
  flex-shrink: 0;
  flex-wrap: wrap;
}
@media (max-width: 900px) {
  .cookie-banner {
    bottom: max(84px, calc(env(safe-area-inset-bottom) + 76px));
    flex-direction: column;
    align-items: stretch;
    padding: 16px;
    gap: 12px;
  }
  .cookie-actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
  }
}

/* Плавна поява при зареждане */
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(14px); }
  to { opacity: 1; transform: translateY(0); }
}
.reveal {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity 0.55s ease, transform 0.55s ease;
}
.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}
