/* =============================================
   Button System — 2026
   - Primary: animated fill (left→right) on hover
   - Secondary: outline, dark text
   - Ghost: minimal
   - Danger: outline red
   ============================================= */
.btn {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.625rem 1.5rem;
  font-size: var(--text-sm);
  font-weight: 600;
  border-radius: var(--radius-full);
  cursor: pointer;
  text-decoration: none;
  line-height: 1.4;
  letter-spacing: -0.01em;
  border: 2px solid var(--color-dark);
  background: transparent;
  color: var(--color-dark);
  transition: color 0.45s cubic-bezier(0.65, 0, 0.076, 1);
  z-index: 1;
  overflow: hidden;
}

.btn::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0;
  width: 0;
  height: 100%;
  background: var(--color-dark);
  transition: width 0.45s cubic-bezier(0.65, 0, 0.076, 1);
  z-index: -1;
}

.btn:hover::before {
  width: 100%;
}

.btn:hover {
  color: var(--color-white);
}

.btn:active {
  transform: scale(0.97);
}

/* Primary — animated fill (the hero button style) */
.btn--primary {
  border-color: var(--color-dark);
  color: var(--color-dark);
}

.btn--primary::before {
  background: var(--color-dark);
}

/* Secondary — clean outline, blue accent on hover */
.btn--secondary {
  border-color: var(--color-border);
  color: var(--color-text-soft);
}

.btn--secondary::before {
  background: var(--color-bg);
}

.btn--secondary:hover {
  border-color: var(--color-blue);
  color: var(--color-blue);
}

/* Ghost — no border, subtle bg on hover */
.btn--ghost {
  border-color: transparent;
  color: var(--color-text-soft);
}

.btn--ghost::before {
  display: none;
}

.btn--ghost:hover {
  background: var(--color-bg);
  color: var(--color-dark);
}

/* Danger — red outline, red fill on hover */
.btn--danger {
  border-color: var(--color-error);
  color: var(--color-error);
}

.btn--danger::before {
  background: var(--color-error);
}

.btn--danger:hover {
  color: white;
}

/* Sizes */
.btn--small {
  padding: 0.375rem 1rem;
  font-size: var(--text-xs);
  border-width: 1.5px;
}

.btn--full {
  width: 100%;
}

/* Icon inside button */
.btn__icon {
  width: 1em;
  height: 1em;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.btn__icon svg {
  width: 100%;
  height: 100%;
}

/* Arrow icon for "Все →" */
.btn--arrow::after {
  content: '';
  display: inline-block;
  width: 0.6em;
  height: 0.6em;
  border-right: 2px solid currentColor;
  border-top: 2px solid currentColor;
  transform: rotate(45deg);
  margin-left: 0.25em;
  transition: transform 0.3s ease;
}

.btn--arrow:hover::after {
  transform: rotate(45deg) translate(2px, -2px);
}
