/* Два блока с главной Макета 2: «Yaqinlashayotgan tadbirlar» (перед
   партнёрами) и «Ijtimoiy tarmoqlar» с бесконечной лентой кадров (перед
   подвалом). Разметка и значения 1:1 (переменные Макета 2 подставлены
   литералами), классы с префиксом nd-, шрифт Geist. */

.nd-events, .nd-social {
  --accent: #2563eb;
  --navy-700: #1a2334;
  --oxford: #0b1220;
  --blue-50: #eff6ff;
  --blue-700: #1d4ed8;
  --gray-100: #eceef2;
  --gray-500: #6b7385;
  --shadow-sm: 0 1px 2px rgba(5, 8, 15, .06), 0 1px 3px rgba(5, 8, 15, .04);
  --shadow: 0 6px 20px rgba(5, 8, 15, .08);
  --radius: 12px;
  --ease: cubic-bezier(.2, .7, .2, 1);
  font-size: 16px; line-height: 1.5; color: var(--navy-700);
}
.nd-events, .nd-events *, .nd-social, .nd-social * { font-family: Geist, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif !important; box-sizing: border-box; }
:is(.nd-events, .nd-social) a { color: inherit; text-decoration: none; }
:is(.nd-events, .nd-social) :is(h2, h3, p, figure) { margin: 0; }
:is(.nd-events, .nd-social) img { display: block; max-width: 100%; }
:is(.nd-events, .nd-social) .icon { width: 1em; height: 1em; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; flex: none; }
:is(.nd-events, .nd-social) .container { width: 100%; max-width: none; margin: 0; padding: 0 5%; }

/* ---------- Yaqinlashayotgan tadbirlar ---------- */
.nd-events { position: relative; padding: 72px 0; overflow: hidden; }
.nd-events .section-header { display: flex; align-items: flex-end; justify-content: space-between; gap: 24px; margin-bottom: 32px; }
.nd-events .section-title { font-size: 36px; font-weight: 600; line-height: 1.1; letter-spacing: -.03em; color: var(--navy-700) !important; }
.nd-events .section-title .accent { color: var(--accent) !important; }
.nd-events .section-link { display: inline-flex; align-items: center; gap: 4px; font-size: 14px; font-weight: 600; color: var(--accent); white-space: nowrap; }
.nd-events .section-link svg { width: 16px; height: 16px; transition: transform .25s var(--ease); }
.nd-events .section-link:hover svg { transform: translateX(3px); }
.nd-events .events__bg { position: absolute; inset: 0; z-index: 0; }
.nd-events .events__bg img { width: 100%; height: 100%; object-fit: cover; }
.nd-events .events__bg::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(255, 255, 255, .72) 0%, rgba(255, 255, 255, .6) 100%); }
.nd-events > .container { position: relative; z-index: 1; }
.nd-events .events-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.nd-events .event-card { display: flex; gap: 18px; padding: 18px; border-radius: var(--radius); background: #fff; box-shadow: var(--shadow-sm); border: 1px solid var(--gray-100); transition: transform .3s var(--ease), box-shadow .3s; }
.nd-events .event-card:hover { transform: translateY(-3px); box-shadow: var(--shadow); }
.nd-events .event-card__date { flex: none; width: 62px; padding: 8px 0; border-radius: 10px; background: var(--blue-50); color: var(--blue-700); text-align: center; line-height: 1; }
.nd-events .event-card__date b { display: block; font-size: 24px; font-weight: 800; }
.nd-events .event-card__date span { display: block; font-size: 11px; font-weight: 600; text-transform: uppercase; letter-spacing: .06em; margin-top: 5px; }
.nd-events .event-card__title { font-size: 15.5px; font-weight: 700; color: var(--navy-700) !important; line-height: 1.35; }
.nd-events .event-card__meta { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 8px; font-size: 12.5px; color: var(--gray-500); }
.nd-events .event-card__meta span { display: inline-flex; align-items: center; gap: 5px; }
.nd-events .event-card__meta .icon { width: 13px; height: 13px; }
.nd-events .reveal { opacity: 0; transform: translateY(18px); transition: opacity .6s var(--ease), transform .6s var(--ease); }
.nd-events .reveal.is-visible { opacity: 1; transform: none; }

/* ---------- Ijtimoiy tarmoqlar + лента ---------- */
.nd-social { padding: 72px 0 76px; background: var(--oxford); color: #fff; position: relative; overflow: hidden; }
.nd-social::before { content: ""; position: absolute; left: 0; right: 0; top: 0; height: 1px; background: linear-gradient(90deg, transparent, var(--accent), transparent); opacity: .6; }
.nd-social > * { position: relative; }
.nd-social .social__head { display: grid; grid-template-columns: minmax(0, .92fr) minmax(0, 1.08fr); gap: 36px 56px; align-items: end; }
.nd-social .social__eyebrow { display: inline-flex; align-items: center; gap: 10px; font-size: 12.5px; font-weight: 600; letter-spacing: .14em; text-transform: uppercase; color: var(--accent); }
.nd-social .social__eyebrow::before { content: ""; width: 26px; height: 1px; background: var(--accent); }
.nd-social .social__intro { max-width: 540px; }
.nd-social .social__title { font-size: 40px; font-weight: 500; line-height: 1.12; margin-top: 14px; color: #fff !important; }
.nd-social .social__title .accent { color: var(--accent) !important; }
.nd-social .social__text { font-size: 15.5px; line-height: 1.6; color: rgba(255, 255, 255, .7); margin-top: 14px; max-width: 46ch; }
.nd-social .social__links { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px 28px; }
.nd-social .social-link { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; padding-bottom: 7px; border-bottom: 1px solid rgba(255, 255, 255, .22); transition: border-color .25s, color .25s; }
.nd-social .social-link .icon { width: 17px; height: 17px; align-self: center; color: rgba(255, 255, 255, .7); transition: color .25s; }
.nd-social .social-link__name { font-size: 16px; font-weight: 500; margin-right: auto; }
.nd-social .social-link__handle { font-size: 13px; white-space: nowrap; color: rgba(255, 255, 255, .5); transition: color .25s; }
.nd-social .social-link:hover { border-color: var(--accent); color: var(--accent); }
.nd-social .social-link:hover .icon, .nd-social .social-link:hover .social-link__handle { color: var(--accent); }
.nd-social .feed { margin-top: 48px; overflow: hidden; -webkit-mask-image: linear-gradient(90deg, transparent, #000 5%, #000 95%, transparent); mask-image: linear-gradient(90deg, transparent, #000 5%, #000 95%, transparent); }
.nd-social .feed__track { display: flex; gap: 18px; width: max-content; animation: ndFeedScroll 60s linear infinite; }
.nd-social .feed:hover .feed__track, .nd-social .feed:focus-within .feed__track { animation-play-state: paused; }
@keyframes ndFeedScroll { from { transform: translate3d(0, 0, 0); } to { transform: translate3d(calc(-50% - 9px), 0, 0); } } /* -9px = половина gap, чтобы стык ленты был бесшовным */
.nd-social .feed__tile { position: relative; flex: none; width: 268px; aspect-ratio: 4 / 3; margin: 0; border-radius: 10px; overflow: hidden; background: rgba(255, 255, 255, .06); }
.nd-social .feed__tile img { width: 100%; height: 100%; object-fit: cover; transition: transform .6s var(--ease), filter .4s; filter: saturate(.9); }
.nd-social .feed__tile::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(5, 8, 15, 0) 45%, rgba(5, 8, 15, .82) 100%); }
.nd-social .feed__tile:hover img { transform: scale(1.06); filter: none; }
.nd-social .feed__tile:nth-child(even) { margin-top: 28px; }
.nd-social .feed__cap { position: absolute; left: 14px; right: 14px; bottom: 12px; z-index: 1; display: flex; align-items: center; gap: 8px; font-size: 13.5px; font-weight: 500; color: #fff; }
.nd-social .feed__cap .icon { width: 15px; height: 15px; color: var(--accent); }
@media (prefers-reduced-motion: reduce) { .nd-social .feed__track { animation: none; } .nd-events .reveal { opacity: 1; transform: none; } }

@media (max-width: 991px) {
  .nd-events .events-grid { grid-template-columns: 1fr; }
  .nd-social .social__head { grid-template-columns: 1fr; align-items: start; }
  .nd-social .social__links { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .nd-social .social__title { font-size: 32px; }
  .nd-social .feed__tile { width: 220px; }
}
@media (max-width: 640px) {
  .nd-events .section-title { font-size: 28px; }
  .nd-social { padding: 56px 0 60px; }
}
