/* ============================================================
   Публичен сайт — Био-библиографии
   Цветова схема: libruse.bg (тийл #20906A + бял фон)
   ============================================================ */

:root {
  --ink:         #1C1E1E;
  --ink-soft:    #20906A;
  --ink-muted:   #4A7A68;
  --brass:       #20906A;
  --brass-light: #1cc28e;
  --brass-pale:  #E6F7F1;
  --cream:       #F5FDFB;
  --paper:       #FFFFFF;
  --border:      #D6EDE6;
  --text:        #616161;
  --text-muted:  #9AABA5;
  --ruby:        #D46C20;

  --radius-sm:   6px;
  --radius:      12px;
  --radius-lg:   20px;

  --font-display: 'IM Fell English', 'PT Serif', Georgia, serif;
  --font-serif:   'PT Serif', Georgia, serif;
  --font-sans:    'PT Sans', -apple-system, 'Segoe UI', Roboto, Arial, sans-serif;
  --font-mono:    'PT Mono', 'Courier New', monospace;

  --max-w:        1100px;
  --sidebar-w:    300px;

  --shadow-sm:    0 1px 3px rgba(32,144,106,.07), 0 4px 12px rgba(32,144,106,.06);
  --shadow:       0 2px 8px rgba(32,144,106,.1), 0 12px 32px rgba(32,144,106,.08);
  --shadow-lg:    0 8px 24px rgba(32,144,106,.12), 0 32px 64px rgba(32,144,106,.1);
}

/* ---- Reset & Base ---- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; font-size: 16px; }
body {
  font-family: var(--font-sans);
  background: var(--cream);
  color: var(--text);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
img { display: block; max-width: 100%; height: auto; }
a { color: var(--brass); text-decoration: none; }
a:hover { color: var(--brass-light); text-decoration: underline; }
::selection { background: var(--brass-pale); color: var(--ink); }

/* ---- Utility ---- */
.container { max-width: var(--max-w); margin: 0 auto; padding: 0 24px; }
.sr-only { position: absolute; width:1px; height:1px; overflow:hidden; clip:rect(0,0,0,0); }
.text-muted { color: var(--text-muted); }
.text-center { text-align: center; }
.mono { font-family: var(--font-mono); }

/* ============================================================
   TOP NAVIGATION BAR
   ============================================================ */
/* Тънка тийл лента най-отгоре (като libruse.bg) */
.site-header-topbar {
  background: #20906A;
  height: 4px;
  width: 100%;
}
.site-header {
  position: sticky;
  top: 0;
  z-index: 200;
  background: #ffffff;
  box-shadow: 0 2px 8px rgba(0,0,0,.1);
  border-bottom: 3px solid #20906A;
}
.site-header .inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 10px 24px;
  max-width: var(--max-w);
  margin: 0 auto;
}
.site-logo {
  font-family: var(--font-serif);
  font-size: .95rem;
  color: #1C1E1E;
  line-height: 1.2;
  display: flex;
  flex-direction: column;
}
.site-logo span { color: #20906A; font-size: .7rem; letter-spacing: .06em; font-family: var(--font-mono); }
.site-logo a { color: inherit; text-decoration: none; }

.header-nav {
  display: flex;
  align-items: center;
  gap: 4px;
}
.header-nav a {
  color: #444;
  font-size: .88rem;
  padding: 6px 12px;
  border-radius: var(--radius-sm);
  transition: background .18s, color .18s;
  font-weight: 500;
}
.header-nav a:hover {
  background: #E6F7F1;
  color: #20906A;
  text-decoration: none;
}
.header-nav a.active {
  background: #20906A;
  color: #fff;
  text-decoration: none;
}

.header-search-form {
  display: flex;
  align-items: center;
  gap: 6px;
}
.header-search-form input {
  background: #F5FDFB;
  border: 1px solid #D6EDE6;
  border-radius: 100px;
  color: #333;
  padding: 6px 14px;
  font-size: .85rem;
  font-family: var(--font-sans);
  width: 200px;
  transition: width .3s, border-color .2s;
}
.header-search-form input::placeholder { color: #aaa; }
.header-search-form input:focus { outline: none; width: 260px; border-color: #20906A; box-shadow: 0 0 0 3px rgba(32,144,106,.12); }
.header-search-form button {
  background: #20906A;
  border: none;
  border-radius: 100px;
  color: #fff;
  padding: 6px 16px;
  font-size: .82rem;
  cursor: pointer;
  font-family: var(--font-sans);
  font-weight: 600;
  transition: background .18s;
}
.header-search-form button:hover { background: #1cc28e; }

/* ============================================================
   HERO — Начална страница
   ============================================================ */
.home-hero {
  background: linear-gradient(160deg, #20906A 0%, #1cc28e 60%, #17A87C 100%);
  color: #fff;
  padding: 80px 24px;
  text-align: center;
  position: relative;
  overflow: hidden;
}
.home-hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='60' height='60'%3E%3Crect width='60' height='60' fill='none'/%3E%3Cpath d='M0 60L60 0M-10 10L10-10M50 70L70 50' stroke='rgba(255,255,255,.06)' stroke-width='1'/%3E%3C/svg%3E");
  pointer-events: none;
}
.home-hero h1 {
  font-family: var(--font-display);
  font-size: clamp(2rem, 5vw, 3.5rem);
  color: #fff;
  font-style: italic;
  line-height: 1.1;
  margin-bottom: 14px;
}
.home-hero p {
  color: rgba(255,255,255,.85);
  font-size: 1.1rem;
  max-width: 540px;
  margin: 0 auto 32px;
}
.home-hero .brass-line {
  width: 60px;
  height: 2px;
  background: rgba(255,255,255,.6);
  margin: 0 auto 32px;
  border-radius: 2px;
}

/* ---- Author cards on homepage ---- */
.author-cards {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 24px;
  padding: 56px 0;
}
.author-card {
  background: var(--paper);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 28px;
  box-shadow: var(--shadow-sm);
  display: flex;
  gap: 20px;
  text-decoration: none;
  color: var(--text);
  transition: transform .22s ease, box-shadow .22s ease;
}
.author-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow);
  text-decoration: none;
  color: var(--text);
}
.author-card-photo {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  object-fit: cover;
  border: 3px solid var(--brass-pale);
  flex-shrink: 0;
}
.author-card-photo.placeholder {
  background: linear-gradient(135deg, var(--ink-soft), var(--ink));
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.8rem;
  color: rgba(232,223,202,.4);
}
.author-card h2 { font-family: var(--font-serif); font-size: 1.2rem; color: var(--ink); margin-bottom: 4px; }
.author-card .subtitle { font-size: .82rem; color: var(--text-muted); margin-bottom: 12px; }
.author-card .stats { display: flex; gap: 14px; font-size: .78rem; color: var(--text-muted); }
.author-card .stats strong { color: var(--ink); font-family: var(--font-mono); }

/* ============================================================
   AUTHOR PAGE — HERO
   ============================================================ */
.author-hero {
  background: linear-gradient(160deg, #20906A 0%, #1AAF80 100%);
  color: #fff;
  padding: 0;
  position: relative;
  overflow: hidden;
}
.author-hero-inner {
  display: flex;
  align-items: center;
  gap: 48px;
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 64px 24px;
}
.author-hero-photo {
  width: 160px;
  height: 200px;
  border-radius: var(--radius);
  object-fit: cover;
  border: 3px solid rgba(184,137,26,.4);
  box-shadow: var(--shadow-lg);
  flex-shrink: 0;
}
.author-hero-photo.no-photo {
  background: rgba(255,255,255,.05);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 4rem;
  color: rgba(232,223,202,.2);
}
.author-hero-info { flex: 1; }
.author-hero-info .eyebrow {
  font-family: var(--font-mono);
  font-size: .72rem;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--brass-light);
  margin-bottom: 10px;
}
.author-hero-info h1 {
  font-family: var(--font-display);
  font-size: clamp(2rem, 4vw, 3rem);
  color: #fff;
  font-style: italic;
  line-height: 1.1;
  margin-bottom: 8px;
}
.author-hero-info .birth {
  font-size: .9rem;
  color: rgba(255,255,255,.7);
  margin-bottom: 20px;
}
.author-hero-stats {
  display: flex;
  gap: 24px;
  flex-wrap: wrap;
}
.author-stat-num {
  font-family: var(--font-mono);
  font-size: 1.6rem;
  font-weight: 700;
  color: #fff;
  line-height: 1;
}
.author-stat-label {
  font-size: .75rem;
  color: rgba(255,255,255,.65);
  margin-top: 3px;
}
.author-hero-ornament {
  position: absolute;
  right: 0;
  top: 0;
  bottom: 0;
  width: 300px;
  opacity: .04;
  font-family: var(--font-display);
  font-size: 18rem;
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  pointer-events: none;
  user-select: none;
  font-style: italic;
}

/* ============================================================
   NAVIGATION TABS (on author page)
   ============================================================ */
.author-tabs-bar {
  background: var(--paper);
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 56px; /* height of header */
  z-index: 100;
  box-shadow: 0 2px 8px rgba(14,32,24,.06);
}
.author-tabs-inner {
  display: flex;
  gap: 0;
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 24px;
  overflow-x: auto;
  scrollbar-width: none;
}
.author-tabs-inner::-webkit-scrollbar { display: none; }
.author-tab {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 14px 16px;
  font-size: .9rem;
  color: var(--text-muted);
  border-bottom: 3px solid transparent;
  white-space: nowrap;
  cursor: pointer;
  transition: color .18s, border-color .18s;
  text-decoration: none;
  background: none;
  border-top: none;
  border-left: none;
  border-right: none;
  font-family: var(--font-sans);
}
.author-tab:hover { color: var(--ink); text-decoration: none; }
.author-tab.active { color: var(--ink); border-bottom-color: var(--brass); font-weight: 700; }
.tab-count {
  background: var(--brass-pale);
  color: var(--brass);
  border-radius: 100px;
  padding: 1px 6px;
  font-family: var(--font-mono);
  font-size: .7rem;
  font-weight: 700;
}

/* ============================================================
   LAYOUT — Author page body
   ============================================================ */
.author-body {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 40px 24px 80px;
  display: grid;
  grid-template-columns: var(--sidebar-w) 1fr;
  gap: 40px;
}
@media (max-width: 860px) { .author-body { grid-template-columns: 1fr; } }

/* ---- Sidebar TOC ---- */
.toc-sidebar {
  position: relative;
}
.toc-sticky {
  position: sticky;
  top: 110px;
  max-height: calc(100vh - 130px);
  overflow-y: auto;
  scrollbar-width: thin;
  scrollbar-color: var(--border) transparent;
}
.toc-title {
  font-family: var(--font-mono);
  font-size: .7rem;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: 12px;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--border);
}
.toc-list { list-style: none; }
.toc-list li { }
.toc-link {
  display: block;
  padding: 5px 0 5px 12px;
  font-size: .85rem;
  color: var(--text-muted);
  border-left: 2px solid transparent;
  transition: color .16s, border-color .16s, padding-left .16s;
  line-height: 1.3;
}
.toc-link:hover { color: var(--ink); text-decoration: none; border-left-color: var(--border); }
.toc-link.active { color: var(--brass); border-left-color: var(--brass); font-weight: 700; padding-left: 14px; }
.toc-child { padding-left: 12px; }
.toc-child .toc-link { font-size: .8rem; }
.toc-grandchild { padding-left: 12px; }
.toc-grandchild .toc-link { font-size: .75rem; }
.toc-search-filter {
  width: 100%;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 7px 10px;
  font-size: .82rem;
  font-family: var(--font-sans);
  margin-bottom: 12px;
  color: var(--text);
  background: var(--paper);
}
.toc-search-filter:focus { outline: none; border-color: var(--brass); }

/* ---- Main content area ---- */
.bib-main { min-width: 0; }

/* ============================================================
   INTRO / FOREWORD block
   ============================================================ */
.intro-block {
  background: var(--paper);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 28px 32px;
  margin-bottom: 36px;
  box-shadow: var(--shadow-sm);
  font-family: var(--font-serif);
  line-height: 1.7;
}
.intro-block h2 {
  font-family: var(--font-display);
  font-style: italic;
  font-size: 1.4rem;
  color: var(--ink);
  margin-bottom: 16px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--border);
}
.intro-collapsed .intro-body { max-height: 200px; overflow: hidden; position: relative; }
.intro-collapsed .intro-body::after {
  content: '';
  position: absolute;
  bottom: 0; left: 0; right: 0;
  height: 80px;
  background: linear-gradient(to bottom, transparent, var(--paper));
}
.intro-toggle {
  display: inline-block;
  margin-top: 12px;
  font-size: .85rem;
  color: var(--brass);
  cursor: pointer;
  background: none;
  border: none;
  font-family: var(--font-sans);
  padding: 0;
}

/* ============================================================
   BIBLIOGRAPHY SECTIONS
   ============================================================ */
.bib-section {
  margin-bottom: 48px;
  opacity: 0;
  transform: translateY(20px);
  transition: opacity .5s ease, transform .5s ease;
}
.bib-section.visible { opacity: 1; transform: translateY(0); }

.section-header {
  display: flex;
  align-items: baseline;
  gap: 12px;
  margin-bottom: 20px;
  padding-bottom: 10px;
  border-bottom: 2px solid var(--brass-pale);
}
.section-header h2 {
  font-family: var(--font-display);
  font-style: italic;
  font-size: 1.5rem;
  color: var(--ink);
}
.section-header h3 {
  font-family: var(--font-serif);
  font-size: 1.2rem;
  color: var(--ink-soft);
}
.section-entry-count {
  font-family: var(--font-mono);
  font-size: .75rem;
  color: var(--text-muted);
  background: var(--brass-pale);
  padding: 2px 8px;
  border-radius: 100px;
  margin-left: auto;
  flex-shrink: 0;
}

.subsection { margin-bottom: 32px; }
.subsection-title {
  font-family: var(--font-serif);
  font-size: 1.05rem;
  color: var(--ink-soft);
  font-style: italic;
  margin-bottom: 14px;
  display: flex;
  align-items: center;
  gap: 8px;
}
.subsection-title::before {
  content: '';
  display: inline-block;
  width: 4px;
  height: 1em;
  background: var(--brass);
  border-radius: 2px;
  flex-shrink: 0;
}

/* ---- Year divider ---- */
.year-group { margin-bottom: 8px; }
.year-label {
  font-family: var(--font-mono);
  font-size: .82rem;
  font-weight: 700;
  color: var(--brass);
  display: inline-block;
  padding: 3px 10px;
  background: var(--brass-pale);
  border-radius: 100px;
  margin: 16px 0 10px;
  letter-spacing: .04em;
}

/* ---- Entry row ---- */
.entry-item {
  display: flex;
  gap: 14px;
  padding: 10px 0;
  border-bottom: 1px solid rgba(14,32,24,.05);
}
.entry-item:last-child { border-bottom: none; }
.entry-num {
  font-family: var(--font-mono);
  font-size: .78rem;
  color: var(--text-muted);
  min-width: 40px;
  padding-top: 2px;
  flex-shrink: 0;
}
.entry-body { flex: 1; min-width: 0; }
.entry-citation {
  font-family: var(--font-serif);
  font-size: .97rem;
  line-height: 1.65;
}
.entry-citation em, .entry-citation i { font-style: italic; }
.entry-citation strong, .entry-citation b { font-weight: 700; }
.entry-contains {
  font-size: .88rem;
  color: var(--text-muted);
  margin-top: 4px;
  font-style: italic;
}
.entry-note {
  font-size: .82rem;
  color: var(--ink-muted);
  margin-top: 4px;
  border-left: 2px solid var(--border);
  padding-left: 8px;
}
.entry-about-badge {
  display: inline-block;
  font-size: .68rem;
  font-family: var(--font-mono);
  color: var(--ruby);
  border: 1px solid rgba(140,47,57,.25);
  border-radius: 4px;
  padding: 1px 5px;
  margin-left: 6px;
  vertical-align: middle;
}
.entry-images {
  display: flex;
  gap: 8px;
  margin-top: 10px;
  flex-wrap: wrap;
}
.entry-image-thumb {
  width: 72px;
  height: 90px;
  object-fit: cover;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  cursor: pointer;
  transition: transform .2s, box-shadow .2s;
}
.entry-image-thumb:hover {
  transform: scale(1.06);
  box-shadow: var(--shadow);
}

/* ============================================================
   ANIMATED TIMELINE
   ============================================================ */
.timeline-section {
  padding: 16px 0 40px;
}
.timeline-section h2 {
  font-family: var(--font-display);
  font-style: italic;
  font-size: 1.5rem;
  color: var(--ink);
  margin-bottom: 32px;
  padding-bottom: 10px;
  border-bottom: 2px solid var(--brass-pale);
}

.timeline {
  position: relative;
  padding-left: 40px;
}
.timeline::before {
  content: '';
  position: absolute;
  left: 14px;
  top: 8px;
  bottom: 0;
  width: 2px;
  background: linear-gradient(to bottom, var(--brass) 0%, var(--brass-pale) 80%, transparent 100%);
}

.timeline-item {
  position: relative;
  margin-bottom: 28px;
  opacity: 0;
  transform: translateX(-16px);
  transition: opacity .5s ease, transform .5s ease;
}
.timeline-item.visible {
  opacity: 1;
  transform: translateX(0);
}

.timeline-dot {
  position: absolute;
  left: -32px;
  top: 6px;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: var(--paper);
  border: 2px solid var(--brass);
  transition: background .3s, transform .3s;
  cursor: pointer;
}
.timeline-item:hover .timeline-dot,
.timeline-item.expanded .timeline-dot {
  background: var(--brass);
  transform: scale(1.3);
}

.timeline-year {
  font-family: var(--font-mono);
  font-size: .82rem;
  font-weight: 700;
  color: var(--brass);
  margin-bottom: 4px;
  letter-spacing: .04em;
}
.timeline-content {
  background: var(--paper);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 14px 18px;
  font-size: .92rem;
  line-height: 1.55;
  box-shadow: var(--shadow-sm);
  transition: box-shadow .25s;
}
.timeline-item:hover .timeline-content {
  box-shadow: var(--shadow);
}
.timeline-content p { margin-bottom: .4em; }
.timeline-content p:last-child { margin: 0; }
.timeline-content strong { color: var(--ink); }

/* ============================================================
   LIGHTBOX (image overlay)
   ============================================================ */
.lightbox {
  position: fixed;
  inset: 0;
  background: rgba(10,20,14,.92);
  z-index: 1000;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 24px;
  backdrop-filter: blur(8px);
}
.lightbox.open { display: flex; }
.lightbox-inner { position: relative; max-width: 90vw; max-height: 90vh; text-align: center; }
.lightbox-inner img {
  max-width: 100%;
  max-height: 80vh;
  border-radius: var(--radius);
  box-shadow: var(--shadow-lg);
  object-fit: contain;
}
.lightbox-caption {
  color: rgba(232,223,202,.7);
  font-size: .88rem;
  margin-top: 10px;
  font-style: italic;
}
.lightbox-close {
  position: fixed;
  top: 20px;
  right: 24px;
  background: none;
  border: none;
  color: rgba(232,223,202,.8);
  font-size: 2rem;
  cursor: pointer;
  line-height: 1;
  transition: color .2s;
}
.lightbox-close:hover { color: #fff; }

/* ============================================================
   SEARCH RESULTS PAGE
   ============================================================ */
.search-results-header {
  padding: 40px 0 24px;
}
.search-results-header h1 { font-family: var(--font-serif); font-size: 1.6rem; color: var(--ink); }
.search-results-header .query { color: var(--brass); font-style: italic; }
.search-hit { border-bottom: 1px solid var(--border); padding: 16px 0; }
.search-hit:last-child { border: none; }
.search-hit-path { font-size: .78rem; color: var(--text-muted); margin-bottom: 4px; display: flex; gap: 4px; align-items: center; }
.search-hit-path span { color: var(--border); }
.search-hit-citation { font-family: var(--font-serif); font-size: .95rem; }
.search-hit mark { background: var(--brass-pale); color: var(--ink); border-radius: 2px; padding: 0 2px; }

/* ============================================================
   AUXILIARY SECTIONS (Показалци)
   ============================================================ */
.auxiliary-content {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 40px 24px 80px;
}
.auxiliary-content h1 { font-family: var(--font-display); font-style: italic; font-size: 1.8rem; color: var(--ink); margin-bottom: 24px; }
.auxiliary-body {
  background: var(--paper);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 28px 32px;
  box-shadow: var(--shadow-sm);
  font-family: var(--font-serif);
  line-height: 1.7;
  column-count: 2;
  column-gap: 40px;
  column-rule: 1px solid var(--border);
}
@media (max-width: 640px) { .auxiliary-body { column-count: 1; } }

/* ============================================================
   FOOTER
   ============================================================ */
.site-footer {
  background: #20906A;
  color: rgba(255,255,255,.8);
  padding: 48px 24px;
  font-size: .85rem;
}
.site-footer .inner {
  max-width: var(--max-w);
  margin: 0 auto;
  display: flex;
  gap: 40px;
  align-items: flex-start;
  flex-wrap: wrap;
}
.site-footer h4 {
  font-family: var(--font-serif);
  font-size: .95rem;
  color: #fff;
  margin-bottom: 10px;
}
.site-footer a { color: #fff; }
.footer-copy { margin-top: 32px; padding-top: 20px; border-top: 1px solid rgba(255,255,255,.2); font-size: .78rem; text-align: center; }

/* ============================================================
   BACK TO TOP BUTTON
   ============================================================ */
.back-to-top {
  position: fixed;
  bottom: 28px;
  right: 28px;
  background: var(--ink);
  color: var(--brass-light);
  border: 1px solid rgba(184,137,26,.3);
  border-radius: 50%;
  width: 44px;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.1rem;
  cursor: pointer;
  box-shadow: var(--shadow);
  opacity: 0;
  transform: translateY(10px);
  transition: opacity .3s, transform .3s, background .2s;
  z-index: 150;
  text-decoration: none;
}
.back-to-top.visible { opacity: 1; transform: translateY(0); }
.back-to-top:hover { background: var(--ink-soft); text-decoration: none; }

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 700px) {
  .author-hero-inner { flex-direction: column; text-align: center; gap: 24px; }
  .author-hero-photo { width: 120px; height: 150px; }
  .author-hero-stats { justify-content: center; }
  .author-tabs-inner { padding: 0 12px; }
  .author-body { padding: 24px 16px 60px; gap: 24px; }
  .intro-block { padding: 20px; }
  .auxiliary-body { padding: 20px; }
}

/* ============================================================
   ENTRANCE ANIMATIONS
   ============================================================ */
@keyframes fadeSlideUp {
  from { opacity: 0; transform: translateY(24px); }
  to   { opacity: 1; transform: translateY(0); }
}
.anim-fade-up {
  opacity: 0;
  animation: fadeSlideUp .6s ease forwards;
}
.anim-delay-1 { animation-delay: .1s; }
.anim-delay-2 { animation-delay: .2s; }
.anim-delay-3 { animation-delay: .35s; }

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
  .timeline-item, .bib-section, .anim-fade-up { transition: none; animation: none; opacity: 1; transform: none; }
}

/* ---- Aux dropdown tab ---- */
.aux-tab-dropdown {
  position: relative;
}
.aux-tab-trigger.active {
  background: #20906A;
  color: #fff;
}
.aux-tab-menu {
  display: none;
  position: absolute;
  top: 100%;
  left: 0;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 0 0 var(--radius) var(--radius);
  box-shadow: var(--shadow);
  min-width: 320px;
  z-index: 200;
  padding: 6px 0;
}
.aux-tab-dropdown.open .aux-tab-menu { display: block; }
.aux-tab-item {
  display: block;
  width: 100%;
  text-align: left;
  padding: 10px 16px;
  font-size: .88rem;
  color: var(--text);
  background: none;
  border: none;
  cursor: pointer;
  font-family: var(--font-sans);
  transition: background .15s;
}
.aux-tab-item:hover { background: var(--brass-pale); color: #20906A; }
.aux-tab-item.active { background: var(--brass-pale); color: #20906A; font-weight: 700; }

/* ---- Header nav dropdowns ---- */
.header-dropdown { position: relative; }
.header-nav-btn {
  color: #444;
  font-size: .88rem;
  padding: 6px 12px;
  border-radius: var(--radius-sm);
  background: none;
  border: none;
  cursor: pointer;
  font-family: var(--font-sans);
  font-weight: 500;
  transition: background .18s, color .18s;
}
.header-nav-btn:hover,
.header-nav-btn.active { background: #E6F7F1; color: #20906A; }
.header-dropdown-menu {
  display: none;
  position: absolute;
  top: calc(100% + 4px);
  left: 0;
  background: #fff;
  border: 1px solid #D6EDE6;
  border-radius: 0 var(--radius) var(--radius) var(--radius);
  box-shadow: 0 8px 24px rgba(32,144,106,.15);
  min-width: 200px;
  z-index: 500;
  padding: 6px 0;
}
.header-dropdown:hover .header-dropdown-menu,
.header-dropdown:focus-within .header-dropdown-menu { display: block; }
.header-dropdown-menu a {
  display: block;
  padding: 10px 16px;
  font-size: .88rem;
  color: #444;
  border-radius: 0;
  white-space: nowrap;
}
.header-dropdown-menu a:hover,
.header-dropdown-menu a.active { background: #E6F7F1; color: #20906A; text-decoration: none; }

/* ============================================================
   ХРОНОЛОГИЯ tl2 — изолиран CSS без конфликти
   ============================================================ */

.tl2-wrap {
  max-width: 720px;
  margin: 0 auto;
  padding: 40px 24px 80px;
}

.tl2-heading {
  font-family: var(--font-serif, Georgia, serif);
  font-size: 1.4rem;
  font-weight: 400;
  color: #1C1E1E;
  margin: 0 0 36px 0;
  padding-bottom: 10px;
  border-bottom: 2px solid #20906A;
}

.tl2-list {
  display: flex;
  flex-direction: column;
}

/* Един ред */
.tl2-item {
  display: flex;
  align-items: flex-start;
  opacity: 0;
  transform: translateY(18px);
  transition: opacity .4s ease, transform .4s ease;
}
.tl2-item.tl2-show {
  opacity: 1;
  transform: translateY(0);
}

/* Лява колона — година */
.tl2-left {
  width: 96px;
  min-width: 96px;
  padding-right: 0;
  padding-top: 10px;
  text-align: right;
}
.tl2-year {
  font-size: .76rem;
  font-weight: 600;
  color: #0F6E56;
  background: #E1F5EE;
  border: 1px solid #9FE1CB;
  border-radius: 5px;
  padding: 2px 7px;
  display: inline-block;
  white-space: nowrap;
  line-height: 1.5;
}

/* Средна колона — линия + точка */
.tl2-mid {
  width: 48px;
  min-width: 48px;
  display: flex;
  flex-direction: column;
  align-items: center;
}
.tl2-dot {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 15px;
  flex-shrink: 0;
  margin-top: 4px;
  position: relative;
  z-index: 1;
  box-shadow: 0 0 0 4px #fff, 0 0 0 5px #C8E9DD;
}
.tl2-line {
  width: 2px;
  flex: 1;
  background: #D6EDE6;
  min-height: 28px;
  margin-top: 6px;
}
.tl2-item:last-child .tl2-line {
  display: none;
}

/* Дясна колона — съдържание */
.tl2-right {
  flex: 1;
  min-width: 0;
  padding: 6px 0 32px 12px;
}
.tl2-text {
  font-size: .94rem;
  line-height: 1.68;
  color: #2D2D2D;
  margin: 0;
}
.tl2-text p { margin: 0; }

/* Документни бутони */
.tl2-docs {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 10px;
}
.tl2-btn {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: .78rem;
  padding: 4px 10px;
  border-radius: 5px;
  border: 1px solid;
  cursor: pointer;
  font-family: inherit;
  text-decoration: none;
  line-height: 1.4;
  transition: opacity .15s;
  white-space: nowrap;
}
.tl2-btn:hover { opacity: .82; }
.tl2-btn-pdf  { background: #FEF3EE; color: #7A2F10; border-color: #F0A882; }
.tl2-btn-img  { background: #EDF4FD; color: #0D4A8A; border-color: #80B8EE; }
.tl2-btn-link { background: #F0FBF5; color: #0A5C3A; border-color: #7DD8B0; }

/* Мобилно */
@media (max-width: 560px) {
  .tl2-left { width: 70px; min-width: 70px; }
  .tl2-year { font-size: .7rem; padding: 2px 5px; }
  .tl2-mid  { width: 38px; min-width: 38px; }
  .tl2-dot  { width: 28px; height: 28px; font-size: 13px; }
}

@keyframes tl2ping {
  0%   { transform: scale(1); }
  50%  { transform: scale(1.35); }
  100% { transform: scale(1); }
}