/* Рожден ден на Експерта - само на 6 декември (inc/anniversary.php) */

:root {
  --anniv-gold-1: #b8862a;
  --anniv-gold-2: #e8c46a;
  --anniv-gold-3: #f6dd9a;
}

/* ---- Златната лента: горният ред на хедъра ---- */
.is-anniversary .topbar,
.is-anniversary .site-header.scrolled .topbar {
  background: linear-gradient(90deg, var(--anniv-gold-1), var(--anniv-gold-2) 50%, var(--anniv-gold-1));
  background-size: 200% 100%;
  border-bottom-color: rgba(0, 0, 0, .12);
  animation: anniv-shine 8s linear infinite;
}
.is-anniversary .topbar__item,
.is-anniversary .topbar__social,
.is-anniversary .topbar__lang a { color: rgba(16, 26, 48, .75); }
.is-anniversary .topbar__item:hover,
.is-anniversary .topbar__social:hover,
.is-anniversary .topbar__lang a:hover,
.is-anniversary .topbar__lang a.active { color: #101a30; }
.is-anniversary .topbar__lang a.active { background: rgba(255, 255, 255, .35); }
.is-anniversary .topbar__lang span { color: rgba(16, 26, 48, .35); }
.is-anniversary .topbar__divider { background: rgba(16, 26, 48, .2); }

.topbar__anniv {
  flex: 1;
  margin: 0 16px;
  padding: 0;
  min-width: 0;
  height: 100%;
  text-align: center;
  font: inherit;
  font-size: .76rem;
  font-weight: var(--fw-bold, 700);
  letter-spacing: .03em;
  color: #101a30;
  background: none;
  border: 0;
  cursor: pointer;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.topbar__anniv::before { content: '🎉 '; }
.topbar__anniv:hover span,
.topbar__anniv:focus-visible span { text-decoration: underline; text-underline-offset: 3px; }
.topbar__anniv:focus-visible { outline: 2px solid #101a30; outline-offset: -4px; border-radius: 4px; }
.topbar__anniv-short { display: none; }

@keyframes anniv-shine {
  from { background-position: 0% 0; }
  to   { background-position: 200% 0; }
}

@media (max-width: 1100px) {
  .topbar__anniv-long  { display: none; }
  .topbar__anniv-short { display: inline; }
}
@media (max-width: 768px) {
  /* на телефон текстът заменя телефона и имейла */
  .is-anniversary .topbar__left { display: none; }
  .topbar__anniv { margin-left: 0; text-align: left; }
}

/* ---- Значката и благодарността в hero ---- */
.x-eyebrow--anniv {
  color: var(--anniv-gold-3);
  background: linear-gradient(90deg, rgba(232, 196, 106, .16), rgba(232, 196, 106, .06));
  border-color: rgba(232, 196, 106, .55);
  box-shadow: 0 0 24px rgba(232, 196, 106, .18);
}
.x-eyebrow--anniv::before {
  background: var(--anniv-gold-2);
  box-shadow: 0 0 0 4px rgba(232, 196, 106, .25);
  animation: anniv-pulse 2s ease-in-out infinite;
}
@keyframes anniv-pulse {
  50% { box-shadow: 0 0 0 7px rgba(232, 196, 106, 0); }
}

.x-hero__anniv {
  margin-top: 14px;
  font-size: 1rem;
  font-style: italic;
  color: var(--anniv-gold-3);
}

/* ---- Preloader на цял екран (~4,6 s) ---- */
.anniv-intro { display: none; }

html.anniv-on .anniv-intro {
  position: fixed;
  inset: 0;
  z-index: 100000;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  background: radial-gradient(ellipse at 50% 45%, #14305f 0%, #0b1a36 45%, #050d1c 100%);
  color: #fff;
  font-family: var(--font, 'Comfortaa', sans-serif);
  /* изход: кръгът се свива към центъра и разкрива страницата.
     Чисто CSS, за да се махне сам дори ако JS не тръгне. */
  clip-path: circle(150% at 50% 50%);
  animation: anniv-exit .75s cubic-bezier(.7, 0, .3, 1) 3.9s forwards;
}
@keyframes anniv-exit {
  to { clip-path: circle(0% at 50% 50%); visibility: hidden; }
}
html.anniv-on .anniv-intro.is-skipped { animation: anniv-exit .45s cubic-bezier(.7, 0, .3, 1) forwards; }

.anniv-intro__glow {
  position: absolute;
  left: 50%; top: 50%;
  width: 70vmin; height: 70vmin;
  margin: -35vmin 0 0 -35vmin;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(232, 196, 106, .28), rgba(232, 196, 106, 0) 65%);
  opacity: 0;
  animation: anniv-glow 2.4s ease-out 1.2s forwards;
}
@keyframes anniv-glow {
  0%   { opacity: 0; transform: scale(.6); }
  40%  { opacity: 1; transform: scale(1.1); }
  100% { opacity: .7; transform: scale(1); }
}

.anniv-intro__lights span {
  position: absolute;
  border-radius: 50%;
  background: radial-gradient(circle, rgb(var(--c) / .9), rgb(var(--c) / 0) 70%);
  filter: blur(var(--b, 2px));
  opacity: 0;
  animation: anniv-light 3s ease-in-out var(--d, 0s) infinite;
}
@keyframes anniv-light {
  0%, 100% { opacity: 0; transform: translateY(10px) scale(.8); }
  50%      { opacity: var(--o, .7); transform: translateY(-10px) scale(1); }
}

.anniv-intro__confetti {
  position: absolute;
  inset: 0;
  z-index: 2; /* пред цифрата */
  width: 100%;
  height: 100%;
  pointer-events: none;
}

.anniv-intro__stage {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: 0 24px;
  animation: anniv-stage-out .6s ease-in 3.8s forwards;
}
@keyframes anniv-stage-out { to { transform: scale(1.08); opacity: 0; } }

.anniv-intro__logo {
  width: clamp(150px, 18vw, 220px);
  height: auto;
  opacity: 0;
  animation: anniv-up .7s ease-out .15s forwards;
}

.anniv-intro__num {
  width: clamp(200px, 34vmin, 340px);
  height: clamp(200px, 34vmin, 340px);
  margin: 10px 0 -28px;
  overflow: visible;
}
.anniv-intro__num text {
  font-family: var(--font, 'Comfortaa', sans-serif);
  font-size: 290px;
  font-weight: 700;
  fill: url(#annivGold);
  fill-opacity: 0;
  stroke: url(#annivGold);
  stroke-width: 3;
  stroke-linejoin: round;
  stroke-dasharray: 1400;
  stroke-dashoffset: 1400;
  animation:
    anniv-draw 1.3s cubic-bezier(.6, 0, .3, 1) .45s forwards,
    anniv-fill .6s ease-out 1.55s forwards;
}
@keyframes anniv-draw { to { stroke-dashoffset: 0; } }
@keyframes anniv-fill { to { fill-opacity: 1; } }
.anniv-intro__num { animation: anniv-pop .5s cubic-bezier(.3, 1.6, .5, 1) 1.55s both; }
@keyframes anniv-pop {
  0%   { transform: scale(1); filter: drop-shadow(0 0 0 rgba(232, 196, 106, 0)); }
  50%  { transform: scale(1.12); }
  100% { transform: scale(1); filter: drop-shadow(0 0 28px rgba(232, 196, 106, .55)); }
}

.anniv-intro__years {
  margin: 0;
  font-size: clamp(1.3rem, 3vw, 2rem);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .2em;
  color: var(--anniv-gold-3);
  opacity: 0;
  animation: anniv-spread .9s cubic-bezier(.2, .8, .2, 1) 1.9s forwards;
}
@keyframes anniv-spread {
  from { opacity: 0; letter-spacing: .05em; }
  to   { opacity: 1; letter-spacing: .5em; }
}

.anniv-intro__name,
.anniv-intro__thanks {
  margin: 14px 0 0;
  opacity: 0;
}
.anniv-intro__name {
  font-size: clamp(.85rem, 1.6vw, 1rem);
  letter-spacing: .25em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, .8);
  animation: anniv-up .6s ease-out 2.3s forwards;
}
.anniv-intro__thanks {
  font-size: clamp(1rem, 2.2vw, 1.35rem);
  font-style: italic;
  color: #fff;
  animation: anniv-up .6s ease-out 2.7s forwards;
}
@keyframes anniv-up {
  from { opacity: 0; transform: translateY(14px); }
  to   { opacity: 1; transform: none; }
}

.anniv-intro__skip {
  position: absolute;
  right: 24px;
  bottom: 24px;
  padding: 8px 16px;
  font: inherit;
  font-size: .8rem;
  color: rgba(255, 255, 255, .7);
  background: rgba(255, 255, 255, .06);
  border: 1px solid rgba(255, 255, 255, .2);
  border-radius: 999px;
  cursor: pointer;
  transition: color .2s, border-color .2s;
}
.anniv-intro__skip:hover,
.anniv-intro__skip:focus-visible { color: #fff; border-color: var(--anniv-gold-2); }

@media (prefers-reduced-motion: reduce) {
  .is-anniversary .topbar,
  .x-eyebrow--anniv::before { animation: none; }
  /* кратка спокойна версия: всичко се вижда веднага, после изчезва */
  html.anniv-on .anniv-intro { animation: anniv-fade .5s ease 2s forwards; clip-path: none; }
  .anniv-intro *,
  .anniv-intro__num text { animation: none !important; opacity: 1; fill-opacity: 1; stroke-dashoffset: 0; }
  .anniv-intro__lights { display: none; }
}
@keyframes anniv-fade { to { opacity: 0; visibility: hidden; } }
