/* ==========================================================================
   ЗАЖИГАЙ 3 — Reusable Components
   ========================================================================== */

/* ---------- Buttons ---------- */
.zg3-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--zg3-sp-8);
  font-size: var(--zg3-fs-small);
  font-weight: var(--zg3-fw-medium);
  padding: var(--zg3-sp-12) var(--zg3-sp-24);
  border-radius: var(--zg3-r-full);
  transition: transform var(--zg3-dur-fast), background var(--zg3-dur-fast);
  position: relative;
  overflow: hidden;
  white-space: nowrap;
  cursor: pointer;
}
.zg3-btn::after {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: rgba(255,255,255,0.15);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform var(--zg3-dur-normal) cubic-bezier(0.22, 1, 0.36, 1);
}
.zg3-btn:hover::after { transform: scaleX(1); }
.zg3-btn:active { transform: scale(0.97); }

.zg3-btn--primary {
  background: var(--zg3-primary);
  color: var(--zg3-white);
}
.zg3-btn--secondary {
  background: var(--zg3-secondary);
  color: var(--zg3-white);
}
.zg3-btn--dark {
  background: var(--zg3-black);
  color: var(--zg3-white);
}
.zg3-btn--outline {
  background: transparent;
  color: var(--zg3-black);
  box-shadow: inset 0 0 0 1.5px var(--zg3-black);
}
.zg3-btn--white {
  background: var(--zg3-white);
  color: var(--zg3-black);
}
.zg3-btn--ghost {
  background: rgba(255,255,255,0.1);
  color: var(--zg3-white);
}
.zg3-btn--sm {
  font-size: var(--zg3-fs-micro);
  padding: var(--zg3-sp-8) var(--zg3-sp-16);
}
.zg3-btn--lg {
  font-size: var(--zg3-fs-body);
  padding: var(--zg3-sp-16) var(--zg3-sp-32);
}

.zg3-btn__arrow {
  display: inline-flex;
  align-items: center;
  transition: transform var(--zg3-dur-fast);
}
.zg3-btn:hover .zg3-btn__arrow { transform: translateX(4px); }

/* Circle icon button */
.zg3-btn-circle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  transition: transform var(--zg3-dur-fast), background var(--zg3-dur-fast);
  cursor: pointer;
}
.zg3-btn-circle:hover { transform: scale(1.08); }
.zg3-btn-circle:active { transform: scale(0.95); }
.zg3-btn-circle--primary { background: var(--zg3-primary); color: var(--zg3-white); }
.zg3-btn-circle--secondary { background: var(--zg3-secondary); color: var(--zg3-white); }
.zg3-btn-circle--white { background: var(--zg3-white); color: var(--zg3-black); }
.zg3-btn-circle--sm { width: 36px; height: 36px; }
.zg3-btn-circle--lg { width: 56px; height: 56px; }

/* ---------- Badges / Pills ---------- */
.zg3-badge {
  display: inline-flex;
  align-items: center;
  gap: var(--zg3-sp-4);
  font-size: var(--zg3-fs-micro);
  font-weight: var(--zg3-fw-medium);
  padding: var(--zg3-sp-4) var(--zg3-sp-12);
  border-radius: var(--zg3-r-full);
  background: rgba(34,34,34,0.06);
  color: var(--zg3-black);
  white-space: nowrap;
}
.zg3-badge--primary { background: var(--zg3-primary); color: var(--zg3-white); }
.zg3-badge--dark    { background: var(--zg3-black); color: var(--zg3-white); }
.zg3-badge--white   { background: var(--zg3-white); color: var(--zg3-black); }

.zg3-badge svg, .zg3-badge img {
  width: 14px;
  height: 14px;
}

/* ---------- Cards ---------- */
.zg3-card {
  background: var(--zg3-white);
  border-radius: var(--zg3-r-lg);
  overflow: hidden;
  transition: transform var(--zg3-dur-normal) cubic-bezier(0.22, 1, 0.36, 1);
}
.zg3-card:hover { transform: translateY(-4px); }

.zg3-card__image {
  position: relative;
  overflow: hidden;
}
.zg3-card__image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform var(--zg3-dur-slow);
}
.zg3-card:hover .zg3-card__image img { transform: scale(1.05); }

.zg3-card__badges {
  position: absolute;
  top: var(--zg3-sp-12);
  left: var(--zg3-sp-12);
  display: flex;
  flex-wrap: wrap;
  gap: var(--zg3-sp-4);
  z-index: 2;
}

.zg3-card__body {
  padding: var(--zg3-sp-20);
}
.zg3-card__title {
  font-size: var(--zg3-fs-body);
  font-weight: var(--zg3-fw-semibold);
  margin-bottom: var(--zg3-sp-8);
  line-height: 1.3;
}
.zg3-card__excerpt {
  font-size: var(--zg3-fs-small);
  color: var(--zg3-gray);
  line-height: 1.5;
}

/* Bento card variant */
.zg3-bento {
  background: var(--zg3-white);
  border-radius: var(--zg3-r-lg);
  padding: var(--zg3-sp-24);
  position: relative;
  overflow: hidden;
}

/* ---------- Avatar ---------- */
.zg3-avatar {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  object-fit: cover;
  flex-shrink: 0;
}
.zg3-avatar--sm { width: 36px; height: 36px; }
.zg3-avatar--lg { width: 64px; height: 64px; }
.zg3-avatar--xl { width: 80px; height: 80px; }

/* Avatar stack */
.zg3-avatar-stack {
  display: flex;
  align-items: center;
}
.zg3-avatar-stack .zg3-avatar {
  margin-left: -12px;
  border: 3px solid var(--zg3-bg);
}
.zg3-avatar-stack .zg3-avatar:first-child { margin-left: 0; }
.zg3-avatar-stack__count {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: var(--zg3-primary);
  color: var(--zg3-white);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: var(--zg3-fs-micro);
  font-weight: var(--zg3-fw-semibold);
  margin-left: -12px;
  border: 3px solid var(--zg3-bg);
}

/* ---------- Chip / Tag ---------- */
.zg3-chip {
  display: inline-flex;
  align-items: center;
  gap: var(--zg3-sp-8);
  font-size: var(--zg3-fs-small);
  padding: var(--zg3-sp-8) var(--zg3-sp-16);
  border-radius: var(--zg3-r-full);
  background: var(--zg3-white);
  transition: background var(--zg3-dur-fast), transform var(--zg3-dur-fast);
  cursor: pointer;
}
.zg3-chip:hover {
  background: var(--zg3-primary);
  color: var(--zg3-white);
  transform: translateY(-2px);
}
.zg3-chip svg { width: 16px; height: 16px; }

/* ---------- Accordion ---------- */
.zg3-accordion {}
.zg3-accordion__item {
  border-bottom: 1px solid rgba(34,34,34,0.08);
}
.zg3-accordion__trigger {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--zg3-sp-16);
  padding: var(--zg3-sp-20) 0;
  font-size: var(--zg3-fs-body);
  font-weight: var(--zg3-fw-medium);
  text-align: left;
  cursor: pointer;
  transition: color var(--zg3-dur-fast);
}
.zg3-accordion__trigger:hover { color: var(--zg3-primary); }
.zg3-accordion__icon {
  width: 24px;
  height: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: transform var(--zg3-dur-normal);
}
.zg3-accordion__item.is-open .zg3-accordion__icon { transform: rotate(45deg); }
.zg3-accordion__body {
  max-height: 0;
  overflow: hidden;
  transition: max-height var(--zg3-dur-normal) cubic-bezier(0.22, 1, 0.36, 1);
}
.zg3-accordion__body-inner {
  padding-bottom: var(--zg3-sp-20);
  font-size: var(--zg3-fs-small);
  color: var(--zg3-gray);
  line-height: 1.6;
}

/* ---------- Form inputs ---------- */
.zg3-input {
  width: 100%;
  padding: var(--zg3-sp-12) var(--zg3-sp-16);
  font-size: var(--zg3-fs-small);
  background: var(--zg3-white);
  border: 1.5px solid rgba(34,34,34,0.1);
  border-radius: var(--zg3-r-md);
  transition: border-color var(--zg3-dur-fast);
  outline: none;
}
.zg3-input:focus {
  border-color: var(--zg3-primary);
}
.zg3-input::placeholder {
  color: var(--zg3-gray-light);
}
textarea.zg3-input { resize: vertical; min-height: 100px; }

/* ---------- Tooltip ---------- */
.zg3-tooltip {
  position: relative;
  cursor: help;
}
.zg3-tooltip::after {
  content: attr(data-tooltip);
  position: absolute;
  bottom: calc(100% + 8px);
  left: 50%;
  transform: translateX(-50%) translateY(4px);
  padding: var(--zg3-sp-8) var(--zg3-sp-12);
  font-size: var(--zg3-fs-micro);
  font-weight: var(--zg3-fw-medium);
  white-space: nowrap;
  background: var(--zg3-black);
  color: var(--zg3-white);
  border-radius: var(--zg3-r-sm);
  opacity: 0;
  pointer-events: none;
  transition: opacity var(--zg3-dur-fast), transform var(--zg3-dur-fast);
  z-index: var(--zg3-z-overlay);
}
.zg3-tooltip:hover::after {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

/* ---------- Modal ---------- */
.zg3-modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.6);
  z-index: var(--zg3-z-modal);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity var(--zg3-dur-normal);
}
.zg3-modal-overlay.is-active {
  opacity: 1;
  pointer-events: auto;
}
.zg3-modal {
  background: var(--zg3-white);
  border-radius: var(--zg3-r-lg);
  padding: var(--zg3-sp-32);
  width: 90%;
  max-width: 560px;
  max-height: 90vh;
  overflow-y: auto;
  transform: translateY(20px);
  transition: transform var(--zg3-dur-normal) cubic-bezier(0.22, 1, 0.36, 1);
}
.zg3-modal-overlay.is-active .zg3-modal {
  transform: translateY(0);
}
.zg3-modal__close {
  position: absolute;
  top: var(--zg3-sp-16);
  right: var(--zg3-sp-16);
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: rgba(34,34,34,0.06);
  cursor: pointer;
  transition: background var(--zg3-dur-fast);
}
.zg3-modal__close:hover { background: rgba(34,34,34,0.12); }

/* Side drawer modal (mobile menu) */
.zg3-drawer {
  position: fixed;
  top: 0;
  right: 0;
  width: 320px;
  max-width: 85vw;
  height: 100vh;
  background: var(--zg3-white);
  z-index: calc(var(--zg3-z-modal) + 1);
  transform: translateX(100%);
  transition: transform var(--zg3-dur-normal) cubic-bezier(0.22, 1, 0.36, 1);
  overflow-y: auto;
  padding: var(--zg3-sp-32) var(--zg3-sp-24);
}
.zg3-drawer.is-active { transform: translateX(0); }

/* ---------- Swiper overrides ---------- */
.swiper-pagination-bullet {
  width: 8px;
  height: 8px;
  background: var(--zg3-black);
  opacity: 0.2;
}
.swiper-pagination-bullet-active {
  opacity: 1;
  background: var(--zg3-primary);
  width: 24px;
  border-radius: var(--zg3-r-full);
}
