/**
 * Стили страницы «Мои SEO кейсы» (slug: moi-portfolio).
 */

.lsi-cases-page {
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "SF Pro Text", "Roboto", sans-serif;
  color: #1b1b1b; line-height: 1.7;
}
.lsi-cases-page .container { width: min(1200px, 100% - 32px); margin: 0 auto; }

/* ── Buttons ── */
.lsi-cases-page a.cases-btn, a.cases-btn, button.cases-btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  border-radius: 999px; padding: 12px 24px; font-size: 14px; font-weight: 600;
  border: 1px solid transparent; cursor: pointer;
  text-decoration: none !important;
  transition: transform 0.1s ease, box-shadow 0.15s ease, background 0.15s ease;
  font-family: inherit;
}
.cases-btn--primary {
  background: linear-gradient(135deg, #004a99, #022c5c) !important;
  color: #fff !important; font-weight: 700;
  box-shadow: 0 6px 24px rgba(0,74,153,0.25);
}
.cases-btn--primary:hover { transform: translateY(-2px); box-shadow: 0 10px 32px rgba(0,74,153,0.35); }

a.cases-btn--white, .cases-btn--white {
  background: #fff !important; color: #022c5c !important; font-weight: 700;
  box-shadow: 0 8px 28px rgba(255,255,255,0.18);
}
a.cases-btn--white:hover, .cases-btn--white:hover {
  transform: translateY(-2px); box-shadow: 0 12px 36px rgba(255,255,255,0.25); color: #022c5c !important;
}
a.cases-btn--ghost, .cases-btn--ghost {
  background: transparent !important; border: 1px solid rgba(255,255,255,0.35); color: #fff !important;
}
a.cases-btn--ghost:hover, .cases-btn--ghost:hover {
  background: rgba(255,255,255,0.12) !important; color: #fff !important;
}

/* ── Hero ── */
.cases-hero {
  padding: 56px 0 48px; text-align: center;
  background: linear-gradient(160deg, #021835 0%, #003d80 50%, #022c5c 100%);
  color: #fff;
}
.cases-hero__badge {
  display: inline-block; padding: 5px 14px; border-radius: 999px;
  background: rgba(255,180,0,0.2); color: #ffb400;
  font-size: 12px; font-weight: 600; letter-spacing: 0.05em; text-transform: uppercase; margin-bottom: 14px;
}
.cases-hero h1 { margin: 0 0 16px; font-size: clamp(28px, 3.5vw, 40px); line-height: 1.2; color: #fff; }
.cases-hero__subtitle {
  margin: 0 auto 28px; font-size: 16px; color: rgba(255,255,255,0.85);
  max-width: 660px; line-height: 1.7;
}
.cases-hero__stats { display: flex; justify-content: center; gap: 40px; flex-wrap: wrap; }
.cases-hero__stat { display: flex; flex-direction: column; align-items: center; gap: 2px; }
.cases-hero__stat-num { font-size: 28px; font-weight: 800; color: #ffb400; }
.cases-hero__stat-label { font-size: 13px; color: rgba(255,255,255,0.7); }

/* ── Section ── */
.cases-section { padding: 48px 0; }
.cases-section--cta {
  background: linear-gradient(120deg, #022c5c, #004a99); color: #fff; padding: 40px 0;
}

/* ── Grid ── */
.cases-grid {
  display: grid; grid-template-columns: repeat(2, 1fr); gap: 24px;
}

/* ── Card ── */
.cases-card {
  background: #fff; border-radius: 16px; overflow: hidden;
  box-shadow: 0 8px 32px rgba(0,0,0,0.06); border: 1px solid rgba(0,0,0,0.04);
  display: flex; flex-direction: column;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}
.cases-card:hover { transform: translateY(-3px); box-shadow: 0 16px 48px rgba(0,0,0,0.1); }

/* Card Logo/Image */
.cases-card__logo {
  width: 100%; height: 80px; overflow: hidden; background: #f4f6fb;
  display: flex; align-items: center; justify-content: center;
  padding: 12px 20px; border-bottom: 1px solid rgba(0,0,0,0.04);
}
.cases-card__logo img {
  max-width: 180px; max-height: 56px; width: auto; height: auto;
  object-fit: contain;
  transition: transform 0.3s ease;
}
.cases-card:hover .cases-card__logo img { transform: scale(1.05); }

/* Card Body */
.cases-card__body { padding: 18px 20px 20px; display: flex; flex-direction: column; flex: 1; }

.cases-card__header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 10px; }
.cases-card__num {
  font-size: 12px; font-weight: 700; color: #b0b5c0;
  width: 28px; height: 28px; border-radius: 8px;
  background: #f4f6fb; display: flex; align-items: center; justify-content: center;
}

/* Video button on card */
.cases-card__video-btn {
  display: inline-flex; align-items: center; gap: 5px;
  padding: 4px 12px; border-radius: 999px; border: none; cursor: pointer;
  background: rgba(229,57,53,0.08); color: #e53935;
  font-size: 12px; font-weight: 700; font-family: inherit;
  transition: background 0.15s;
}
.cases-card__video-btn:hover { background: rgba(229,57,53,0.15); }
.cases-card__video-btn svg { flex-shrink: 0; }

.cases-card__title {
  margin: 0 0 4px; font-size: 16px; font-weight: 700; color: #022c5c; line-height: 1.35;
}
.cases-card__domain {
  display: inline-block;
  font-size: 13px; color: #004a99 !important; font-weight: 500; margin-bottom: 8px;
  word-break: break-all; text-decoration: none !important;
}
.cases-card__domain:hover { text-decoration: underline !important; }

.cases-card__result {
  margin: 0 0 12px; font-size: 13px; line-height: 1.6; color: #4a4e5a;
}

/* ── Card Slider ── */
.cases-card__slider { margin-bottom: 14px; }
.cases-card__slide-wrap { position: relative; border-radius: 10px; overflow: hidden; background: #f4f6fb; }
.cases-card__slide-img {
  width: 100%; max-height: 280px; object-fit: contain; display: block; cursor: zoom-in;
  transition: opacity 0.2s; background: #f4f6fb;
}

/* ── Card Actions ── */
.cases-card__actions {
  display: flex; gap: 8px; flex-wrap: wrap; padding-top: 12px; margin-top: auto;
  border-top: 1px solid rgba(0,0,0,0.05);
}
.cases-card__link {
  display: inline-flex; align-items: center; gap: 5px;
  font-size: 12px; font-weight: 600; color: #004a99 !important;
  padding: 5px 10px; border-radius: 8px;
  background: rgba(0,74,153,0.05);
  text-decoration: none !important;
  transition: background 0.15s ease;
}
.cases-card__link:hover { background: rgba(0,74,153,0.1); color: #004a99 !important; }
.cases-card__link--topvisor { background: rgba(0,200,83,0.08); color: #00a844 !important; }
.cases-card__link--topvisor:hover { background: rgba(0,200,83,0.15); color: #00a844 !important; }

/* ── Load More ── */
.cases-load-more { text-align: center; padding-top: 32px; }
.cases-load-more__count { opacity: 0.7; font-weight: 400; }

/* ── CTA ── */
.cases-cta__inner { display: flex; align-items: center; justify-content: space-between; gap: 32px; }
.cases-cta__content h2 { margin: 0 0 8px; font-size: clamp(22px, 2.5vw, 28px); color: #fff; }
.cases-cta__content p { margin: 0; font-size: 15px; color: rgba(255,255,255,0.85); max-width: 480px; }
.cases-cta__actions { display: flex; flex-wrap: wrap; gap: 12px; flex-shrink: 0; }

/* ── Video Modal ── */
.cases-modal { display: none; position: fixed; inset: 0; z-index: 99999; align-items: center; justify-content: center; }
.cases-modal.active { display: flex; }
.cases-modal__overlay { position: absolute; inset: 0; background: rgba(0,0,0,0.8); }
.cases-modal__content {
  position: relative; width: min(900px, 90vw); z-index: 1;
}
.cases-modal__close {
  position: absolute; top: -40px; right: 0;
  background: none; border: none; color: #fff; font-size: 32px; cursor: pointer;
  width: 40px; height: 40px; display: flex; align-items: center; justify-content: center;
}
.cases-modal__video { position: relative; padding-bottom: 56.25%; height: 0; border-radius: 12px; overflow: hidden; }
.cases-modal__video iframe { position: absolute; top: 0; left: 0; width: 100%; height: 100%; }

/* ── Lightbox ── */
.cases-lightbox { display: none; position: fixed; inset: 0; z-index: 99999; align-items: center; justify-content: center; }
.cases-lightbox.active { display: flex; }
.cases-lightbox__overlay { position: absolute; inset: 0; background: rgba(0,0,0,0.85); }
.cases-lightbox__content {
  position: relative; z-index: 1; max-width: 95vw; max-height: 95vh;
  display: flex; flex-direction: column; align-items: center;
}
.cases-lightbox__close {
  position: absolute; top: -40px; right: 0;
  background: none; border: none; color: #fff; font-size: 32px; cursor: pointer;
  width: 40px; height: 40px; display: flex; align-items: center; justify-content: center;
}
#casesLightboxImg { max-width: 95vw; max-height: 80vh; border-radius: 8px; object-fit: contain; }
.cases-lightbox__caption {
  color: rgba(255,255,255,0.85); font-size: 14px; line-height: 1.6;
  text-align: center; max-width: 700px; margin-top: 16px; padding: 0 16px;
}

/* ── Responsive ── */
@media (max-width: 960px) {
  .cases-grid { grid-template-columns: 1fr; max-width: 600px; margin: 0 auto; }
  .cases-cta__inner { flex-direction: column; text-align: center; }
  .cases-cta__actions { justify-content: center; }
  .cases-hero__stats { gap: 24px; }
}
@media (max-width: 640px) {
  .cases-hero { padding: 36px 0 40px; }
  .cases-section { padding: 36px 0; }
  .cases-hero__stats { gap: 16px; }
  .cases-hero__stat-num { font-size: 22px; }
}
