/* ============================================================
   КОМПОНЕНТЫ — дополнительные стили
   ============================================================ */

/* ── Lightbox ─────────────────────────────────────────────── */
.lightbox-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.95);
  z-index: 3000;
  align-items: center;
  justify-content: center;
  flex-direction: column;
}
.lightbox-overlay.is-open {
  display: flex;
}

.lightbox-content {
  position: relative;
  max-width: 90vw;
  max-height: 85vh;
  display: flex;
  align-items: center;
  justify-content: center;
}

.lightbox-content img {
  max-width: 90vw;
  max-height: 85vh;
  object-fit: contain;
  border-radius: 4px;
  box-shadow: 0 0 60px rgba(0,0,0,0.8);
  user-select: none;
}

.lightbox-close {
  position: absolute;
  top: 1rem;
  right: 1rem;
  background: none;
  border: none;
  color: rgba(255,255,255,0.8);
  font-size: 2.5rem;
  cursor: pointer;
  z-index: 3001;
  line-height: 1;
  transition: color 0.2s, transform 0.2s;
}
.lightbox-close:hover {
  color: #fff;
  transform: scale(1.1);
}

.lightbox-prev,
.lightbox-next {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(255,255,255,0.15);
  border: 2px solid rgba(255,255,255,0.3);
  color: #fff;
  width: 52px;
  height: 52px;
  border-radius: 50%;
  font-size: 1.5rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s;
  z-index: 3001;
}
.lightbox-prev:hover,
.lightbox-next:hover {
  background: rgba(30,155,215,0.6);
}
.lightbox-prev { left: 1rem; }
.lightbox-next { right: 1rem; }

.lightbox-caption {
  position: absolute;
  bottom: -2.5rem;
  left: 0;
  right: 0;
  text-align: center;
  color: rgba(255,255,255,0.75);
  font-size: 0.9rem;
}

.lightbox-counter {
  position: absolute;
  top: 1rem;
  left: 50%;
  transform: translateX(-50%);
  background: rgba(0,0,0,0.5);
  color: rgba(255,255,255,0.7);
  font-size: 0.8rem;
  padding: 0.25rem 0.75rem;
  border-radius: 100px;
}

/* ── Анимация появления ─────────────────────────────────── */
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(24px); }
  to   { opacity: 1; transform: translateY(0); }
}

.animate-up {
  animation: fadeUp 0.6s ease both;
}
.animate-up--delay-1 { animation-delay: 0.1s; }
.animate-up--delay-2 { animation-delay: 0.2s; }
.animate-up--delay-3 { animation-delay: 0.3s; }
.animate-up--delay-4 { animation-delay: 0.4s; }

/* ── Pulse-эффект на CTA-кнопке ─────────────────────────── */
@keyframes pulse-ring {
  0%   { box-shadow: 0 0 0 0 rgba(232,67,10,0.4); }
  70%  { box-shadow: 0 0 0 14px rgba(232,67,10,0); }
  100% { box-shadow: 0 0 0 0 rgba(232,67,10,0); }
}

.btn--pulse {
  animation: pulse-ring 2.5s ease infinite;
}

/* ── Лоадер ─────────────────────────────────────────────── */
.loader {
  display: inline-block;
  width: 24px;
  height: 24px;
  border: 3px solid rgba(255,255,255,0.3);
  border-top-color: #fff;
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}
@keyframes spin {
  to { transform: rotate(360deg); }
}

/* ── Пустое состояние ──────────────────────────────────── */
.empty-state {
  text-align: center;
  padding: 4rem 2rem;
  color: var(--c-gray-2);
}
.empty-state__icon {
  font-size: 3rem;
  margin-bottom: 1rem;
}
.empty-state__title {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--c-dark);
  margin-bottom: 0.5rem;
}
.empty-state__text {
  font-size: 0.9rem;
}

/* ── Тег / Badge (контент) ──────────────────────────────── */
.tag {
  display: inline-block;
  background: rgba(30,155,215,0.1);
  color: var(--c-accent);
  border: 1px solid rgba(30,155,215,0.25);
  padding: 0.2rem 0.625rem;
  border-radius: 100px;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.04em;
}

/* ── Команда организаторов ──────────────────────────────── */
.team-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 1.5rem;
  text-align: center;
}
.team-card__photo {
  width: 100px;
  height: 100px;
  border-radius: 50%;
  object-fit: cover;
  margin: 0 auto 0.75rem;
  border: 3px solid var(--c-accent);
}
.team-card__name {
  font-weight: 700;
  font-size: 0.95rem;
  color: var(--c-dark);
  margin-bottom: 0.25rem;
}
.team-card__role {
  font-size: 0.8rem;
  color: var(--c-gray-2);
}

/* ── Статья (одиночная новость) ─────────────────────────── */
.article-cover {
  width: 100%;
  max-height: 480px;
  object-fit: cover;
  border-radius: var(--radius-lg);
  margin-bottom: 2rem;
}

.article-body {
  max-width: 780px;
  margin: 0 auto;
  font-size: 1.05rem;
  line-height: 1.8;
  color: var(--c-text);
}
.article-body h2 {
  font-size: 1.5rem;
  margin: 2rem 0 1rem;
  color: var(--c-dark);
}
.article-body h3 {
  font-size: 1.2rem;
  margin: 1.5rem 0 0.75rem;
  color: var(--c-dark);
}
.article-body p {
  margin-bottom: 1.25rem;
}
.article-body ul,
.article-body ol {
  list-style: initial;
  padding-left: 1.5rem;
  margin-bottom: 1.25rem;
}
.article-body ol { list-style: decimal; }
.article-body li { margin-bottom: 0.375rem; }
.article-body strong { color: var(--c-dark); }
.article-body table {
  width: 100%;
  border-collapse: collapse;
  margin-bottom: 1.5rem;
  font-size: 0.9rem;
}
.article-body table th,
.article-body table td {
  padding: 0.75rem 1rem;
  border: 1px solid var(--c-gray);
  text-align: left;
}
.article-body table th {
  background: var(--c-dark);
  color: var(--c-white);
  font-weight: 700;
}
.article-body details {
  background: var(--c-white);
  border: 1px solid var(--c-gray);
  border-radius: var(--radius);
  padding: 0;
  margin-bottom: 0.75rem;
}
.article-body summary {
  padding: 1rem 1.25rem;
  font-weight: 600;
  cursor: pointer;
  list-style: none;
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.article-body summary::-webkit-details-marker { display: none; }
.article-body summary::after { content: '+'; font-size: 1.25rem; color: var(--c-accent); }
.article-body details[open] summary::after { content: '−'; }
.article-body details p {
  padding: 0 1.25rem 1rem;
  margin: 0;
}

/* ── Фильтр результатов ─────────────────────────────────── */
.results-summary {
  font-size: 0.875rem;
  color: var(--c-gray-2);
  margin-bottom: 1rem;
}

/* ── Форма волонтёра ────────────────────────────────────── */
.volunteer-form-wrap {
  max-width: 600px;
  margin: 0 auto;
  background: var(--c-white);
  border-radius: var(--radius-lg);
  padding: 2.5rem;
  box-shadow: var(--shadow-md);
}

/* ── Контактная форма ───────────────────────────────────── */
.contacts-layout {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 3rem;
  align-items: start;
}
@media (max-width: 767px) {
  .contacts-layout { grid-template-columns: 1fr; }
}

/* ── Сводка статистики на главной ──────────────────────── */
.home-about {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4rem;
  align-items: center;
}
.home-about__text h2 {
  font-size: clamp(1.5rem, 3vw, 2.25rem);
  margin-bottom: 1rem;
}
.home-about__text p {
  font-size: 1rem;
  color: #4B5563;
  line-height: 1.7;
  margin-bottom: 1.5rem;
}
@media (max-width: 767px) {
  .home-about { grid-template-columns: 1fr; gap: 2rem; }
}
