/* Новогодний снег для artgb1.ru — варианты A / B / C. Префикс agb-snow. */

/* ---------- Общая кнопка «Выключить снег» ---------- */
.agb-snow-toggle{
  position:fixed; left:16px; bottom:16px; z-index:9990;
  display:inline-flex; align-items:center; gap:8px;
  height:44px; padding:0 16px 0 12px;
  border:0; border-radius:22px;
  background:#61779D; color:#fff;
  font:600 14px/1 Nunito, Arial, sans-serif;
  box-shadow:0 4px 14px rgba(34,60,80,.25);
  cursor:pointer; opacity:.92;
  transition:opacity .2s, background-color .2s;
}
.agb-snow-toggle:hover{opacity:1; background:#4f6488}
.agb-snow-toggle:focus-visible{outline:3px solid #f2b33d; outline-offset:2px}
.agb-snow-toggle svg{width:20px; height:20px; flex:none}
.agb-snow-toggle[aria-pressed="false"]{background:#8a97ad}

/* ---------- A: снег на CSS ---------- */
.agb-snow-a{position:fixed; inset:0; z-index:9980; pointer-events:none; overflow:hidden}
.agb-snow-a__sway{position:absolute; inset:0; animation:agbSway 7s ease-in-out infinite alternate}
.agb-snow-a__sway:nth-child(2){animation-duration:9s; animation-delay:-3s}
.agb-snow-a__sway:nth-child(3){animation-duration:11s; animation-delay:-5s}
.agb-snow-a__fall{
  position:absolute; left:-40px; right:-40px; top:calc(var(--t) * -1); bottom:0;
  background-repeat:repeat;
  will-change:transform;
  animation:agbFall var(--d) linear infinite;
}
/* хлопья: белая середина + голубоватый край, чтобы было видно и на белом фоне */
.agb-snow-a__sway:nth-child(1) .agb-snow-a__fall{
  --t:260px; --d:16s; opacity:.75;
  background-size:260px 260px;
  background-image:
    radial-gradient(circle at 87px 247px, #fff 0 1.1px, rgba(97,119,157,0.35) 1.8px, transparent 2.5px),
    radial-gradient(circle at 171px 17px, #fff 0 1.0px, rgba(97,119,157,0.35) 1.7px, transparent 2.4px),
    radial-gradient(circle at 142px 29px, #fff 0 1.2px, rgba(97,119,157,0.35) 1.9px, transparent 2.6px),
    radial-gradient(circle at 19px 237px, #fff 0 1.3px, rgba(97,119,157,0.35) 2.0px, transparent 2.7px),
    radial-gradient(circle at 14px 27px, #fff 0 1.3px, rgba(97,119,157,0.35) 2.0px, transparent 2.7px),
    radial-gradient(circle at 22px 66px, #fff 0 1.1px, rgba(97,119,157,0.35) 1.8px, transparent 2.5px),
    radial-gradient(circle at 113px 20px, #fff 0 1.5px, rgba(97,119,157,0.35) 2.2px, transparent 2.9px),
    radial-gradient(circle at 36px 247px, #fff 0 1.1px, rgba(97,119,157,0.35) 1.8px, transparent 2.5px),
    radial-gradient(circle at 165px 154px, #fff 0 1.6px, rgba(97,119,157,0.35) 2.3px, transparent 3.0px);
}
.agb-snow-a__sway:nth-child(2) .agb-snow-a__fall{
  --t:380px; --d:12s; opacity:.85;
  background-size:380px 380px;
  background-image:
    radial-gradient(circle at 300px 304px, #fff 0 2.1px, rgba(97,119,157,0.35) 2.8px, transparent 3.5px),
    radial-gradient(circle at 118px 28px, #fff 0 2.2px, rgba(97,119,157,0.35) 2.9px, transparent 3.6px),
    radial-gradient(circle at 73px 153px, #fff 0 2.1px, rgba(97,119,157,0.35) 2.8px, transparent 3.5px),
    radial-gradient(circle at 281px 65px, #fff 0 2.3px, rgba(97,119,157,0.35) 3.0px, transparent 3.7px),
    radial-gradient(circle at 291px 354px, #fff 0 1.9px, rgba(97,119,157,0.35) 2.6px, transparent 3.3px),
    radial-gradient(circle at 302px 297px, #fff 0 2.3px, rgba(97,119,157,0.35) 3.0px, transparent 3.7px),
    radial-gradient(circle at 195px 54px, #fff 0 2.2px, rgba(97,119,157,0.35) 2.9px, transparent 3.6px),
    radial-gradient(circle at 37px 293px, #fff 0 1.8px, rgba(97,119,157,0.35) 2.5px, transparent 3.2px);
}
.agb-snow-a__sway:nth-child(3) .agb-snow-a__fall{
  --t:560px; --d:9s; opacity:.9;
  background-size:560px 560px;
  background-image:
    radial-gradient(circle at 215px 513px, #fff 0 3.3px, rgba(97,119,157,0.3) 4.0px, transparent 4.7px),
    radial-gradient(circle at 442px 326px, #fff 0 3.2px, rgba(97,119,157,0.3) 3.9px, transparent 4.6px),
    radial-gradient(circle at 469px 375px, #fff 0 3.0px, rgba(97,119,157,0.3) 3.7px, transparent 4.4px),
    radial-gradient(circle at 189px 254px, #fff 0 2.9px, rgba(97,119,157,0.3) 3.6px, transparent 4.3px),
    radial-gradient(circle at 312px 542px, #fff 0 3.2px, rgba(97,119,157,0.3) 3.9px, transparent 4.6px);
}
@keyframes agbFall{from{transform:translate3d(0,0,0)} to{transform:translate3d(0,var(--t),0)}}
@keyframes agbSway{from{transform:translate3d(-14px,0,0)} to{transform:translate3d(14px,0,0)}}

/* ---------- B и C: холст ---------- */
.agb-snow-canvas{position:fixed; inset:0; width:100%; height:100%; z-index:9980; pointer-events:none}
.agb-snow-canvas--top{
  position:absolute; bottom:auto; height:var(--agb-snow-h, 900px);
  -webkit-mask-image:linear-gradient(#000 70%, transparent);
          mask-image:linear-gradient(#000 70%, transparent);
}

/* ---------- C: снежные шапки на плитках и кнопке ---------- */
.agb-snow-caps .buttons-box,
.agb-snow-caps .big-section_aside,
.agb-snow-caps .header-buttons_box .btn-golden{position:relative}
.agb-snow-caps .buttons-box::before,
.agb-snow-caps .big-section_aside::before,
.agb-snow-caps .header-buttons_box .btn-golden::before{
  content:""; position:absolute; z-index:2; pointer-events:none;
  left:-4px; right:-4px; top:-11px; height:26px;
  background:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 300 26' preserveAspectRatio='none'%3E%3Cdefs%3E%3ClinearGradient id='g' x1='0' y1='0' x2='0' y2='1'%3E%3Cstop offset='.45' stop-color='%23fff'/%3E%3Cstop offset='1' stop-color='%23dde7f3'/%3E%3C/linearGradient%3E%3C/defs%3E%3Cpath fill='url(%23g)' d='M2 16 C0 9 6 5 14 6 C22 1 38 0 50 4 C60 2 70 3 78 6 C92 0 116 1 130 5 C140 3 150 3 158 6 C172 1 196 0 210 5 C222 2 236 3 244 6 C258 2 280 2 290 7 C298 9 300 14 298 17 C296 20 290 20 286 18 C270 19 252 17 238 18 C234 25 226 26 224 19 C204 19 182 17 164 18 C150 19 132 17 118 18 C114 23 108 23 106 18 C88 19 66 17 48 19 C44 25 36 25 34 19 C24 20 10 20 6 19 C3 19 2 18 2 16 Z'/%3E%3C/svg%3E") center top / 100% 100% no-repeat;
  filter:drop-shadow(0 2px 2px rgba(34,60,80,.22));
}
.agb-snow-caps .header-buttons_box .btn-golden::before{top:-9px; height:18px; left:-3px; right:-3px}

@media (max-width:767px){
  .agb-snow-toggle{left:12px; bottom:12px; height:40px; padding:0 12px 0 10px; font-size:13px}
}
@media print{.agb-snow-a,.agb-snow-canvas,.agb-snow-toggle{display:none!important}}

/* ---------- Гирлянда вдоль шапки и ёлочные игрушки ---------- */
.agb-decor-host{position:relative}
.agb-decor{position:absolute; left:0; right:0; top:0; height:0; z-index:5; pointer-events:none}
.agb-garland{position:absolute; left:0; top:0; display:block; overflow:visible}
.agb-bulb{
  filter:drop-shadow(0 0 5px var(--c));
  animation:agbGlow 3.2s ease-in-out infinite alternate;  /* медленно: не чаще 3 вспышек в секунду */
}
@keyframes agbGlow{
  0%{opacity:.55; filter:drop-shadow(0 0 1px var(--c))}
  100%{opacity:1; filter:drop-shadow(0 0 7px var(--c))}
}
.agb-orn{
  position:absolute; display:flex; flex-direction:column; align-items:center;
  transform-origin:50% 0;
  animation:agbSwing 5s ease-in-out infinite alternate;
}
.agb-orn__thread{display:block; width:1.5px; height:var(--len); background:linear-gradient(#c9a44c, #8d7434)}
.agb-orn__ball{display:block; margin-top:-1px; transform-origin:50% 0; pointer-events:auto; filter:drop-shadow(0 6px 8px rgba(10,25,50,.35))}
.agb-orn__ball svg{display:block}
@keyframes agbSwing{from{transform:rotate(-2.5deg)} to{transform:rotate(2.5deg)}}
.agb-decor--still .agb-bulb,.agb-decor--still .agb-orn{animation:none}
.agb-decor--still .agb-bulb{opacity:1}
@media print{.agb-decor{display:none!important}}
