/* ==========================================================================
   Микрофон и мишка — micmouse.net
   Дисплей: Cormac (Typedepot) — български кирилски форми
   Текст:   Sofia Sans
   ========================================================================== */

@import url('../fonts/sofia-sans.css');

@font-face {
  font-family: 'Cormac';
  src: url('../fonts/cormac-black.woff2') format('woff2');
  font-weight: 900;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'Cormac';
  src: url('../fonts/cormac-extralight.woff2') format('woff2');
  font-weight: 200;
  font-style: normal;
  font-display: swap;
}

:root {
  /* Основна тема: оранжево върху черно */
  --ink:        #0c0c0d;
  --ink-2:      #151618;
  --ink-3:      #1e1f22;
  --line:       #2f3135;
  --paper:      #f1efec;
  --paper-dim:  #c3c0bb;
  --muted:      #8b8885;
  --gold:       #ff7a18;
  --gold-lit:   #ff9a4d;
  --live:       #ff3d2e;
  --on-accent:  #14100c;
  --nav-bg:     rgba(12, 12, 13, .84);
  --scrim:      rgba(12, 12, 13, .78);
  --modal-bg:   rgba(6, 6, 7, .92);
  --shade:      0 0 0;

  --display: 'Cormac', 'Sofia Sans', Georgia, serif;
  --text: 'Sofia Sans', 'Cormac', system-ui, -apple-system, sans-serif;

  --wrap: 1180px;
  --gut: clamp(20px, 5vw, 56px);
  --r: 4px;
}

/* Светла тема — същата подредба, обърнати стойности */
[data-theme="light"] {
  --ink:        #faf7f2;
  --ink-2:      #f2ede4;
  --ink-3:      #e8e1d5;
  --line:       #d8cfc0;
  --paper:      #17130e;
  --paper-dim:  #4a423a;
  --muted:      #7d7368;
  --gold:       #d2600b;
  --gold-lit:   #a94b06;
  --live:       #c22f1f;
  --on-accent:  #fffaf4;
  --nav-bg:     rgba(250, 247, 242, .88);
  --scrim:      rgba(23, 19, 14, .55);
  --modal-bg:   rgba(23, 19, 14, .88);
  --shade:      120 100 70;
}

/* Първоначалната тема: злато от рисуваното лого */
[data-theme="gold"] {
  --ink:        #14110d;
  --ink-2:      #1b1712;
  --ink-3:      #241f18;
  --line:       #352e24;
  --paper:      #f4efe6;
  --paper-dim:  #cdc4b4;
  --muted:      #9c9182;
  --gold:       #c89b4e;
  --gold-lit:   #e4b85f;
  --live:       #d0452b;
  --on-accent:  #14110d;
  --nav-bg:     rgba(20, 17, 13, .82);
  --scrim:      rgba(20, 17, 13, .75);
  --modal-bg:   rgba(10, 8, 6, .9);
  --shade:      0 0 0;
}

*, *::before, *::after { box-sizing: border-box; }

html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: .001ms !important; transition-duration: .001ms !important; }
}

body {
  margin: 0;
  background: var(--ink);
  color: var(--paper);
  font-family: var(--text);
  font-size: 17px;
  line-height: 1.65;
  font-weight: 400;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

/* Фина зърнистост — аналогов оттенък, без да се вижда като ефект */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 1;
  opacity: .035;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='140' height='140'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='3'/%3E%3C/filter%3E%3Crect width='140' height='140' filter='url(%23n)'/%3E%3C/svg%3E");
}

img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }

.wrap { width: 100%; max-width: var(--wrap); margin: 0 auto; padding: 0 var(--gut); }

/* ---------- Типография ---------- */

h1, h2, h3, .display {
  font-family: var(--display);
  font-weight: 900;
  line-height: .96;
  letter-spacing: -.01em;
  margin: 0;
}

.eyebrow {
  font-family: var(--text);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: .18em;
  text-transform: uppercase;
  color: var(--gold);
}

.lead {
  font-family: var(--display);
  font-weight: 200;
  font-size: clamp(19px, 2.1vw, 25px);
  line-height: 1.45;
  color: var(--paper-dim);
}

.section-head {
  display: flex;
  align-items: baseline;
  gap: 18px;
  flex-wrap: wrap;
  padding-bottom: 22px;
  margin-bottom: 40px;
  border-bottom: 1px solid var(--line);
}
.section-head h2 { font-size: clamp(30px, 4.4vw, 52px); }
.section-head .note { color: var(--muted); font-size: 15px; margin-left: auto; }

section { padding: clamp(64px, 9vw, 120px) 0; position: relative; z-index: 2; }

/* ---------- Навигация ---------- */

.nav {
  position: sticky;
  top: 0;
  z-index: 60;
  background: var(--nav-bg);
  backdrop-filter: saturate(140%) blur(14px);
  border-bottom: 1px solid transparent;
  transition: border-color .3s ease, background .3s ease;
}
.nav.stuck { border-bottom-color: var(--line); }
.nav-in {
  display: flex;
  align-items: center;
  gap: 20px;
  height: 68px;
  max-width: var(--wrap);
  margin: 0 auto;
  padding: 0 var(--gut);
}
.brand { display: flex; align-items: center; gap: 11px; }
.brand img { width: 44px; height: 44px; object-fit: contain; margin: -4px 0; }
.brand span {
  font-family: var(--display);
  font-weight: 900;
  font-size: 18px;
  letter-spacing: -.01em;
}
.nav-links { display: flex; gap: 28px; margin-left: auto; align-items: center; }
.nav-links a:not(.btn) {
  font-size: 15px;
  color: var(--paper-dim);
  padding: 6px 0;
  border-bottom: 1px solid transparent;
  transition: color .2s, border-color .2s;
}
.nav-links a:not(.btn):hover { color: var(--paper); border-bottom-color: var(--gold); }

.btn {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  font-family: var(--text);
  font-size: 15px;
  font-weight: 600;
  padding: 11px 20px;
  border-radius: var(--r);
  border: 1px solid var(--gold);
  color: var(--on-accent);
  background: var(--gold);
  transition: background .2s, transform .12s, border-color .2s, color .2s;
  cursor: pointer;
}
.btn:hover { background: var(--gold-lit); border-color: var(--gold-lit); }
.btn:active { transform: translateY(1px); }
.btn.ghost { background: transparent; color: var(--paper); border-color: var(--line); }
.btn.ghost:hover { border-color: var(--gold); color: var(--gold-lit); }

.nav-burger {
  display: none;
  margin-left: auto;
  width: 42px; height: 42px;
  background: none; border: 1px solid var(--line); border-radius: var(--r);
  color: var(--paper); font-size: 18px; cursor: pointer;
}

/* ---------- Герой ---------- */

.hero { padding-top: clamp(36px, 4.6vw, 62px); padding-bottom: clamp(48px, 7vw, 96px); }
.hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: clamp(32px, 5vw, 72px);
  align-items: start;
  margin-top: clamp(26px, 3.4vw, 40px);
}
/* Заглавието върви на цялата ширина — иначе не му стига мястото */
.masthead {
  font-size: clamp(44px, 10.4vw, 118px);
  line-height: .84;
  margin: 14px 0 0;
  text-transform: uppercase;
  letter-spacing: -.02em;
}
.masthead span { display: block; }
.masthead .l2 { color: var(--gold); }
/* Мотото — стои точно под името */
.motto {
  font-family: var(--display);
  font-weight: 200;
  font-size: clamp(20px, 2.9vw, 34px);
  line-height: 1.2;
  color: var(--gold-lit);
  margin: 18px 0 0;
}
.hero .lead { max-width: 34ch; }
.hero-actions { display: flex; gap: 12px; margin-top: 30px; flex-wrap: wrap; }

/* Табло с числа */
.figures {
  display: flex;
  gap: clamp(24px, 4vw, 48px);
  margin-top: 46px;
  padding-top: 26px;
  border-top: 1px solid var(--line);
  flex-wrap: wrap;
}
.fig b {
  display: block;
  font-family: var(--display);
  font-weight: 200;
  font-size: clamp(34px, 4.4vw, 52px);
  line-height: 1;
  color: var(--gold);
  letter-spacing: -.02em;
  font-variant-numeric: lining-nums;
}
.fig b .sp { display: inline-block; width: .26em; }   /* разделител за хилядите */
.fig span { font-size: 13px; color: var(--muted); letter-spacing: .04em; }

/* Карта на последния епизод */
.latest {
  border: 1px solid var(--line);
  border-radius: var(--r);
  background: var(--ink-2);
  overflow: hidden;
}
.latest-thumb { position: relative; display: block; aspect-ratio: 16 / 9; background: var(--ink-3); }
.latest-thumb img { width: 100%; height: 100%; object-fit: cover; }
.latest-thumb::after {
  content: '';
  position: absolute; inset: 0;
  background: linear-gradient(to top, var(--scrim), transparent 55%);
}
.play {
  position: absolute;
  left: 50%; top: 50%;
  transform: translate(-50%, -50%);
  width: 66px; height: 66px;
  border-radius: 50%;
  background: var(--gold);
  color: var(--on-accent);
  display: grid; place-items: center;
  font-size: 22px;
  z-index: 2;
  transition: transform .18s ease, background .18s ease;
}
.latest-thumb:hover .play { transform: translate(-50%, -50%) scale(1.08); background: var(--gold-lit); }
.latest-body { padding: 20px 22px 24px; }
.latest-body .ep-no { font-family: var(--display); font-weight: 200; font-size: 15px; color: var(--gold); letter-spacing: .06em; }
.latest-body h3 { font-size: 22px; line-height: 1.15; margin: 6px 0 10px; font-weight: 900; }
.latest-meta { font-size: 14px; color: var(--muted); display: flex; gap: 14px; flex-wrap: wrap; }

/* Лента „на живо“ */
.onair {
  border: 1px solid var(--line);
  border-left: 3px solid var(--live);
  border-radius: var(--r);
  background: var(--ink-2);
  padding: 14px 18px;
  display: flex;
  align-items: center;
  gap: 13px;
  font-size: 15px;
  margin-bottom: 22px;
}
.onair .dot {
  width: 9px; height: 9px; border-radius: 50%;
  background: var(--live);
  flex: none;
}
.onair.live .dot { animation: pulse 1.6s infinite; }
.onair strong { font-weight: 600; }
.onair .when { color: var(--muted); margin-left: auto; white-space: nowrap; padding-left: 10px; }
@keyframes pulse {
  0%, 100% { box-shadow: 0 0 0 0 rgb(from var(--live) r g b / .55); }
  70% { box-shadow: 0 0 0 9px rgb(from var(--live) r g b / 0); }
}

/* ---------- За предаването ---------- */

#about { background: var(--ink-2); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.about-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: clamp(32px, 5vw, 72px); align-items: start; }
.about-grid p { margin: 0 0 18px; color: var(--paper-dim); }
.about-grid p.first { font-family: var(--display); font-weight: 200; font-size: clamp(20px, 2.2vw, 26px); line-height: 1.4; color: var(--paper); }
.rubrics {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(112px, 1fr));
  gap: 10px;
  margin-top: 26px;
}
.rubric {
  display: flex;
  flex-direction: column;
  gap: 9px;
  padding: 14px 12px;
  border: 1px solid var(--line);
  border-radius: var(--r);
  background: var(--ink);
  transition: border-color .18s ease, transform .18s ease, background .18s ease;
}
.rubric:hover { border-color: var(--gold); transform: translateY(-2px); }
.rubric svg {
  width: 26px;
  height: 26px;
  stroke: var(--gold);
  stroke-width: 1.5;
  stroke-linecap: round;
  stroke-linejoin: round;
  fill: none;
}
.rubric b {
  font-family: var(--display);
  font-weight: 900;
  font-size: 18px;
  line-height: 1.15;
  letter-spacing: -.005em;
}
.rubric span {
  display: block;
  font-size: 13.5px;
  line-height: 1.3;
  color: var(--muted);
  margin-top: 4px;
}

/* ---------- История ---------- */

.timeline { position: relative; padding-left: 0; }
.timeline::before {
  content: '';
  position: absolute;
  left: 96px; top: 8px; bottom: 8px;
  width: 1px;
  background: linear-gradient(to bottom, var(--gold), var(--line) 60%, transparent);
}
.tl-item {
  position: relative;
  display: grid;
  grid-template-columns: 96px minmax(0, 1fr);
  gap: 0 40px;
  padding-bottom: 46px;
}
.tl-year {
  font-family: var(--display);
  font-weight: 200;
  font-size: 30px;
  color: var(--gold);
  line-height: 1;
  padding-top: 2px;
  letter-spacing: -.01em;
}
.tl-item::before {
  content: '';
  position: absolute;
  left: 92px; top: 8px;
  width: 9px; height: 9px;
  border-radius: 50%;
  background: var(--gold);
  box-shadow: 0 0 0 5px var(--ink);
}
.tl-body h3 { font-size: 21px; margin-bottom: 8px; }
.tl-body p { margin: 0; color: var(--paper-dim); max-width: 62ch; }
.tl-where { font-size: 13px; color: var(--muted); letter-spacing: .05em; text-transform: uppercase; margin-bottom: 5px; }

/* Лозунгите от началото */
.mottos {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 8px 20px;
  margin-top: 16px;
  padding-left: 18px;
  border-left: 2px solid var(--gold);
}
.mottos span {
  font-family: var(--display);
  font-weight: 200;
  font-size: clamp(18px, 2vw, 23px);
  line-height: 1.3;
  color: var(--gold-lit);
}
.mottos em {
  font-style: normal;
  font-size: 12px;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--muted);
  flex-basis: 100%;
}

/* ---------- Архив ---------- */

#archive { background: var(--ink-2); border-top: 1px solid var(--line); }

.archive-tools {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  align-items: center;
  margin-bottom: 26px;
}
.search {
  flex: 1 1 240px;
  max-width: 380px;
  position: relative;
}
.search input {
  width: 100%;
  background: var(--ink);
  border: 1px solid var(--line);
  border-radius: var(--r);
  color: var(--paper);
  font-family: var(--text);
  font-size: 15px;
  padding: 11px 14px 11px 38px;
}
.search input:focus { outline: none; border-color: var(--gold); }
.search::before {
  content: '⌕';
  position: absolute; left: 13px; top: 50%; transform: translateY(-50%);
  color: var(--muted); font-size: 18px;
}
.chips { display: flex; gap: 8px; flex-wrap: wrap; }
.chip {
  font-family: var(--text);
  font-size: 14px;
  padding: 9px 15px;
  border: 1px solid var(--line);
  background: transparent;
  border-radius: 100px;
  color: var(--paper-dim);
  cursor: pointer;
  transition: border-color .18s, color .18s, background .18s;
}
.chip:hover { border-color: var(--gold); color: var(--paper); }
.chip.on { background: var(--gold); border-color: var(--gold); color: var(--on-accent); font-weight: 600; }

/* Дневник на излъчванията */
.log { border-top: 1px solid var(--line); }
.log-row {
  display: grid;
  grid-template-columns: 58px 116px minmax(0, 1fr) auto;
  gap: 20px;
  align-items: center;
  padding: 13px 8px;
  border-bottom: 1px solid var(--line);
  transition: background .16s ease;
}
.log-row:hover { background: var(--ink-3); }
.log-no {
  font-family: var(--display);
  font-weight: 200;
  font-size: 24px;
  color: var(--gold);
  line-height: 1;
  text-align: right;
  letter-spacing: -.02em;
}
.log-no.none { color: var(--line); font-size: 18px; }
.log-thumb {
  aspect-ratio: 16 / 9;
  background: var(--ink-3);
  border-radius: 3px;
  overflow: hidden;
}
.log-thumb img { width: 100%; height: 100%; object-fit: cover; }
.log-title { font-size: 16px; line-height: 1.35; }
.log-sub {
  font-size: 13px;
  color: var(--muted);
  margin-top: 3px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.log-meta {
  font-size: 13px;
  color: var(--muted);
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
}
.log-empty { padding: 44px 8px; color: var(--muted); }

.archive-more { margin-top: 32px; display: flex; gap: 14px; align-items: center; flex-wrap: wrap; }
.archive-count { color: var(--muted); font-size: 14px; }

/* ---------- Контакт ---------- */

.contact-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: clamp(32px, 5vw, 72px); }
.contact-grid p { color: var(--paper-dim); }
.contact-list { display: flex; flex-direction: column; gap: 2px; }
.contact-list a {
  display: flex;
  align-items: baseline;
  gap: 16px;
  padding: 16px 4px;
  border-bottom: 1px solid var(--line);
  transition: padding-left .2s ease, color .2s ease;
}
.contact-list a:first-child { border-top: 1px solid var(--line); }
.contact-list a:hover { padding-left: 12px; color: var(--gold-lit); }
.contact-list .k { font-size: 13px; color: var(--muted); letter-spacing: .08em; text-transform: uppercase; width: 92px; flex: none; }
.contact-list .v { font-size: 17px; }

/* ---------- Подвал ---------- */

footer {
  border-top: 1px solid var(--line);
  padding: 52px 0 40px;
  position: relative;
  z-index: 2;
}
.foot-in { display: flex; gap: 28px; align-items: flex-start; flex-wrap: wrap; }
.foot-brand { display: flex; align-items: center; gap: 12px; }
.foot-brand img { width: 42px; height: 42px; object-fit: contain; }
.foot-brand b { font-family: var(--display); font-weight: 900; font-size: 19px; display: block; }
.foot-brand small { color: var(--muted); font-size: 13px; }
.foot-links { display: flex; gap: 26px; margin-left: auto; flex-wrap: wrap; font-size: 15px; }
.foot-links a { color: var(--paper-dim); }
.foot-links a:hover { color: var(--gold-lit); }
.foot-bottom {
  margin-top: 36px;
  padding-top: 20px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 13px;
  display: flex;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}

/* ---------- Модал с видео ---------- */

.modal {
  position: fixed;
  inset: 0;
  z-index: 90;
  background: var(--modal-bg);
  display: none;
  place-items: center;
  padding: var(--gut);
}
.modal.open { display: grid; }
.modal-box { width: min(1040px, 100%); }
.modal-box .frame { aspect-ratio: 16 / 9; background: #000; border: 1px solid var(--line); }
.modal-box iframe { width: 100%; height: 100%; border: 0; }
.modal-close {
  margin-bottom: 12px;
  background: none;
  border: 1px solid var(--line);
  color: var(--paper);
  border-radius: var(--r);
  padding: 8px 15px;
  font-family: var(--text);
  font-size: 14px;
  cursor: pointer;
}
.modal-close:hover { border-color: var(--gold); color: var(--gold-lit); }

/* ---------- Адаптив ---------- */

@media (max-width: 960px) {
  .hero-grid, .about-grid, .contact-grid { grid-template-columns: minmax(0, 1fr); }
  .hero .lead { max-width: none; }
  .nav-links {
    display: none;
    position: absolute;
    top: 68px; left: 0; right: 0;
    flex-direction: column;
    gap: 0;
    background: var(--ink-2);
    border-bottom: 1px solid var(--line);
    padding: 8px var(--gut) 18px;
  }
  .nav-links.open { display: flex; }
  .nav-links a { padding: 13px 0; border-bottom: 1px solid var(--line); width: 100%; }
  .nav-links .btn { margin-top: 12px; justify-content: center; }
  .nav-burger { display: block; }
}

@media (max-width: 700px) {
  body { font-size: 16px; }
  .log-row { grid-template-columns: 44px minmax(0, 1fr); gap: 6px 14px; padding: 14px 4px; }
  .log-thumb { display: none; }
  .log-meta { grid-column: 2; font-size: 12px; }
  .log-no { font-size: 20px; }
  .timeline::before { left: 5px; }
  .tl-item { grid-template-columns: minmax(0, 1fr); gap: 6px; padding-left: 28px; padding-bottom: 34px; }
  .tl-item::before { left: 1px; top: 10px; }
  .tl-year { font-size: 24px; }
  .figures { gap: 22px 30px; }
}


/* ---------- Екипът ---------- */

#team { background: var(--ink-2); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.team {
  align-items: start;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 0 clamp(24px, 4vw, 52px);
}
.member {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  padding: 15px 0;
  border-bottom: 1px solid var(--line);
}
.who { min-width: 0; flex: 1; }
.who-head {
  display: block;
  width: 100%;
  padding: 0;
  border: 0;
  background: none;
  text-align: left;
  font: inherit;
  color: inherit;
  cursor: pointer;
  position: relative;
  padding-right: 22px;
}
.member.has-bio:hover b { color: var(--gold-lit); }
.chev {
  position: absolute;
  right: 2px;
  top: 5px;
  width: 9px;
  height: 9px;
  border-right: 1.6px solid var(--muted);
  border-bottom: 1.6px solid var(--muted);
  transform: rotate(45deg);
  transition: transform .2s ease, border-color .2s ease;
}
.who-head[aria-expanded="true"] .chev {
  transform: rotate(-135deg);
  border-color: var(--gold);
}
.member.has-bio:hover .chev { border-color: var(--gold); }
.bio p {
  margin: 9px 0 2px;
  font-size: 14px;
  line-height: 1.55;
  color: var(--paper-dim);
}
.face {
  flex: none;
  margin-top: 2px;
  width: 56px;
  height: 56px;
  border-radius: 50%;
  overflow: hidden;
  background: var(--ink-3);
  border: 1px solid var(--line);
  display: grid;
  place-items: center;
}
.face img { width: 100%; height: 100%; object-fit: cover; }
.initials {
  font-family: var(--display);
  font-weight: 900;
  font-size: 17px;
  color: var(--muted);
  letter-spacing: -.02em;
}
.member b {
  display: block;
  font-family: var(--display);
  font-weight: 900;
  font-size: 19px;
  line-height: 1.2;
}
.member span {
  display: block;
  font-size: 14px;
  color: var(--muted);
  margin-top: 2px;
}
.member:first-child b { color: var(--gold-lit); }


/* ---------- Форма за връзка ---------- */

.form { display: flex; flex-direction: column; gap: 16px; }
.field { display: flex; flex-direction: column; gap: 7px; }
.field-row { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 16px; }
.field label {
  font-size: 13px;
  letter-spacing: .06em;
  text-transform: uppercase;
  color: var(--muted);
}
.field label span { text-transform: none; letter-spacing: 0; }
.field input,
.field select,
.field textarea {
  width: 100%;
  background: var(--ink);
  border: 1px solid var(--line);
  border-radius: var(--r);
  color: var(--paper);
  font-family: var(--text);
  font-size: 16px;
  padding: 12px 14px;
  resize: vertical;
}
#about .field input, #about .field textarea { background: var(--ink-2); }
.field input:focus,
.field select:focus,
.field textarea:focus { outline: none; border-color: var(--gold); }
/* Собствена стрелка — вградената изчезва с appearance: none */
.field select {
  appearance: none;
  cursor: pointer;
  padding-right: 44px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='9' viewBox='0 0 14 9'%3E%3Cpath d='M1 1.5 7 7.5l6-6' fill='none' stroke='%23c89b4e' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 16px center;
}
.field select:hover { border-color: var(--gold); }

.trap { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

.form-foot { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; margin-top: 4px; }
.form-msg { font-size: 14px; color: var(--muted); }
.form-msg.ok { color: var(--gold-lit); }
.form-msg.err { color: var(--live); }
.form.sending button { opacity: .6; pointer-events: none; }

@media (max-width: 700px) {
  .field-row { grid-template-columns: minmax(0, 1fr); }
}


/* Стрелката на падащото поле следва акцента на темата */
.field select {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='9' viewBox='0 0 14 9'%3E%3Cpath d='M1 1.5 7 7.5l6-6' fill='none' stroke='%23ff7a18' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
}
[data-theme="light"] .field select {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='9' viewBox='0 0 14 9'%3E%3Cpath d='M1 1.5 7 7.5l6-6' fill='none' stroke='%23d2600b' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
}
[data-theme="gold"] .field select {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='9' viewBox='0 0 14 9'%3E%3Cpath d='M1 1.5 7 7.5l6-6' fill='none' stroke='%23c89b4e' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
}
[data-theme="light"] body::before { opacity: .02; }

/* ---------- Превключвател на темата ---------- */

.themes {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-top: 22px;
}
.themes .lbl {
  font-size: 12px;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--muted);
  margin-right: 6px;
}
.themes button {
  font-family: var(--text);
  font-size: 13px;
  padding: 7px 13px;
  border: 1px solid var(--line);
  background: transparent;
  color: var(--paper-dim);
  border-radius: 100px;
  cursor: pointer;
  transition: border-color .18s, color .18s, background .18s;
}
.themes button:hover { border-color: var(--gold); color: var(--paper); }
.themes button[aria-pressed="true"] {
  background: var(--gold);
  border-color: var(--gold);
  color: var(--on-accent);
  font-weight: 600;
}


/* Секцията с екипа стои над следващите — иначе изскачащата биография на
   ПОСЛЕДНИЯ ред увисва под секцията и следващата секция я отрязва (всички
   секции са z-index: 2, а по-късната в DOM печели). */
#team { z-index: 4; }

/* С мишка биографията изскача като панел — гридът не мърда.
   На докосване (телефон) остава клик, защото hover там няма. */
@media (hover: hover) and (pointer: fine) {
  .member.has-bio { position: relative; }
  .member.has-bio:hover { z-index: 5; }
  .member.has-bio:hover .bio[hidden] {
    display: block;
    position: absolute;
    left: 70px;
    right: -14px;
    top: calc(100% - 12px);
    background: var(--ink-2);
    border: 1px solid var(--gold);
    border-radius: var(--r);
    padding: 12px 15px 14px;
    box-shadow: 0 16px 34px rgb(var(--shade) / .45);
  }
  .member.has-bio:hover .bio[hidden] p { margin: 0; }
}

/* ---------------------------------------------------------- Новини
   Карти от Факт рафинерия. Снимките са на чужд хост (hotlink), затова
   имат фиксирано съотношение и фон — оформлението не скача, ако някоя
   не се зареди. */
.news-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 22px;
  margin-top: 26px;
}
.news-card {
  display: flex;
  flex-direction: column;
  background: var(--ink-2);
  border: 1px solid var(--line);
  border-radius: var(--r);
  overflow: hidden;
  transition: border-color .16s ease, transform .16s ease;
}
.news-card:hover {
  border-color: var(--gold);
  transform: translateY(-2px);
}
.news-thumb {
  aspect-ratio: 16 / 9;
  background: var(--ink-3);
  overflow: hidden;
}
.news-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.news-body {
  padding: 16px 18px 18px;
  display: flex;
  flex-direction: column;
  gap: 9px;
  flex: 1;
}
.news-title {
  font-family: var(--display);
  font-size: 21px;
  line-height: 1.28;
  color: var(--paper);
  letter-spacing: -.01em;
}
.news-card:hover .news-title { color: var(--gold-lit); }
.news-sum {
  margin: 0;
  font-size: 15.5px;
  line-height: 1.55;
  color: var(--paper-dim);
}
.news-meta {
  margin-top: auto;
  font-size: 13px;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: .06em;
}
@media (max-width: 640px) {
  .news-grid { grid-template-columns: 1fr; gap: 18px; }
}

/* --------------------------------------------- Шега на рубриката (hover)
   Показва се при мишка И при клавиатурен фокус (рубриката е tabindex=0),
   за да не остане недостъпна за тъч/клавиатура. */
.rubric { position: relative; cursor: help; }
.rubric-joke {
  position: absolute;
  left: 50%;
  bottom: calc(100% + 9px);
  transform: translate(-50%, 4px);
  width: max-content;
  max-width: 260px;
  padding: 10px 13px;
  background: var(--ink-3);
  border: 1px solid var(--gold);
  border-radius: var(--r);
  color: var(--paper);
  font-size: 15.5px;
  line-height: 1.5;
  text-align: left;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity .16s ease, transform .16s ease, visibility .16s;
  z-index: 30;
  box-shadow: 0 10px 26px rgba(var(--shade), .35);
}
.rubric:hover .rubric-joke,
.rubric:focus-visible .rubric-joke {
  opacity: 1;
  visibility: visible;
  transform: translate(-50%, 0);
}
/* стрелка към картичката */
.rubric-joke::after {
  content: "";
  position: absolute;
  top: 100%;
  left: 50%;
  margin-left: -6px;
  border: 6px solid transparent;
  border-top-color: var(--gold);
}
@media (max-width: 640px) {
  .rubric-joke { max-width: min(78vw, 260px); }
}

/* Заглавие на секция вътре в „Новини" (показва се само при 2+ секции) */
.news-sec {
  font-family: var(--display);
  font-weight: 900;
  font-size: 24px;
  color: var(--gold);
  margin: 38px 0 -4px;
  letter-spacing: -.01em;
}
.news-sec:first-child { margin-top: 0; }

/* Заглавие на рубрика в „Новини" — бутон, който отваря цялата секция */
.news-sec {
  display: flex;
  align-items: center;
  gap: 11px;
  width: 100%;
  margin: 40px 0 18px;
  padding: 0 0 10px;
  background: none;
  border: 0;
  border-bottom: 1px solid var(--line);
  font-family: var(--display);
  font-weight: 900;
  font-size: 25px;
  letter-spacing: -.01em;
  color: var(--gold);
  text-align: left;
  cursor: pointer;
  transition: color .16s ease, border-color .16s ease;
}
.news-sec.is-plain { cursor: default; }
button.news-sec:hover { color: var(--gold-lit); border-bottom-color: var(--gold); }
.news-sec:first-child { margin-top: 0; }
.news-count {
  font-family: var(--text);
  font-size: 13px;
  font-weight: 600;
  color: var(--muted);
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 1px 9px;
}
.news-sec .chev {
  position: static;
  margin-left: auto;
  transform: rotate(-45deg);            /* сгънато: сочи надясно */
  transition: transform .2s ease;
}
.news-sec[aria-expanded="true"] .chev { transform: rotate(45deg); }  /* отворено: надолу */
.news-rest { margin-top: 22px; }
/* [hidden] е display:none в браузъра, но .news-grid{display:grid} го надвива —
   затова скритите карти се виждаха въпреки атрибута. */
.news-grid[hidden] { display: none; }

/* „още мусака →" под рубриката, води към същата рубрика в /novini.html */
.news-more { margin: 16px 0 0; }
.news-more a {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 15.5px;
  font-weight: 600;
  color: var(--gold);
  border-bottom: 1px solid transparent;
  transition: color .16s ease, border-color .16s ease;
}
.news-more a:hover { color: var(--gold-lit); border-bottom-color: var(--gold); }
.news-more-n {
  font-size: 12.5px;
  font-weight: 600;
  color: var(--muted);
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 1px 8px;
}
/* Лепкавото меню е 68px — без това котвата „още железа" застава под него. */
.news-sec { scroll-margin-top: 92px; }
