/* ── CASE PAGE STYLES ── */

/* Breadcrumb */
.case-breadcrumb {
  display: flex; align-items: center; gap: 8px;
  font-size: 12px; color: var(--gray); margin-bottom: 20px; flex-wrap: wrap;
}
.case-breadcrumb a { color: var(--gray); transition: color 0.2s; }
.case-breadcrumb a:hover { color: var(--orange); }
.case-breadcrumb span { color: var(--gray-border); }

/* Section tag */
.section-tag {
  display: inline-block; font-family: 'Manrope', sans-serif;
  font-size: 11px; font-weight: 800; text-transform: uppercase;
  letter-spacing: 0.12em; color: var(--orange); margin-bottom: 12px;
}

/* ── HERO: Browser Mockup ── */
.case-hero {
  padding-top: 72px;
  margin-bottom: 72px;
  background: var(--white);
  position: relative;
  overflow: hidden;
}
.case-hero::after {
  content: '';
  position: absolute;
  top: 0; right: 0; bottom: 0;
  width: 55%;
  background: var(--gray-light);
  border-radius: 0 0 0 80px;
  z-index: 0;
}
.case-hero-inner {
  display: grid;
  grid-template-columns: 1fr 1fr;
  align-items: stretch;
  position: relative;
  z-index: 1;
}
.case-hero-inner > * { min-width: 0; }
.case-hero-inner > div:first-child { padding: 64px var(--pad) 64px 0; }

.case-hero h1 {
  font-family: 'Bebas Neue Cyrillic', sans-serif; font-weight: 900;
  font-size: clamp(28px, 4vw, 52px); line-height: 1.05;
  color: var(--black); margin-bottom: 20px;
}
.case-hero h1 em { font-style: normal; color: var(--orange); }

.case-meta { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 28px; }
.case-meta-tag {
  padding: 5px 12px; background: var(--orange-soft);
  border-radius: 100px; font-size: 12px; font-weight: 600; color: var(--orange);
}
.case-lead { font-size: 16px; color: var(--gray); line-height: 1.7; margin-bottom: 32px; max-width: 480px; }

.case-cta { display: flex; gap: 12px; flex-wrap: wrap; margin-bottom: 48px; }
.btn-outline-case {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 11px 22px; border-radius: 6px;
  font-family: 'Manrope', sans-serif; font-size: 13px; font-weight: 700;
  color: var(--orange); border: 2px solid var(--orange); background: transparent;
  transition: all 0.2s; text-decoration: none;
}
.btn-outline-case:hover { background: var(--orange); color: var(--white); }

/* Hero results strip */
.case-results {
  display: flex; gap: 0;
  background: var(--white); border: 1px solid var(--gray-border);
  border-radius: var(--r2); overflow: hidden;
}
.case-result {
  flex: 1; padding: 20px 16px; text-align: center;
  border-right: 1px solid var(--gray-border);
}
.case-result:last-child { border-right: none; }
.case-result .num {
  font-family: 'Manrope', sans-serif; font-size: 28px; font-weight: 900;
  color: var(--orange); line-height: 1;
}
.case-result .lbl { font-size: 11px; color: var(--gray); margin-top: 4px; line-height: 1.4; }

/* Hero browser frame */
.case-hero-img {
  display: flex; flex-direction: column; justify-content: center;
  padding: 48px 0 48px var(--pad);
}
.hero-browser {
  border-radius: var(--r2); overflow: hidden;
  border: 1px solid var(--gray-border);
  box-shadow: 0 12px 48px rgba(0,0,0,0.15);
}
.hero-browser-bar {
  display: flex; align-items: center; gap: 12px;
  padding: 10px 16px; background: #EFEFEF;
  border-bottom: 1px solid var(--gray-border);
}
.hero-browser-dots { display: flex; gap: 5px; flex-shrink: 0; }
.hero-browser-dots span { width: 11px; height: 11px; border-radius: 50%; background: #D0D0D0; }
.hero-browser-dots span:nth-child(1) { background: #FF6058; }
.hero-browser-dots span:nth-child(2) { background: #FFBC2E; }
.hero-browser-dots span:nth-child(3) { background: #28C840; }
.hero-browser-url {
  flex: 1; background: var(--white); border: 1px solid var(--gray-border);
  border-radius: 6px; padding: 4px 12px; font-size: 12px;
  color: var(--gray); font-family: 'Manrope', sans-serif;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.hero-browser-scroll {
  height: 500px; overflow-y: scroll; overflow-x: hidden;
  background: var(--white);
  scrollbar-width: thin; scrollbar-color: var(--orange) var(--gray-light);
  cursor: ns-resize;
}
.hero-browser-scroll::-webkit-scrollbar { width: 5px; }
.hero-browser-scroll::-webkit-scrollbar-track { background: var(--gray-light); }
.hero-browser-scroll::-webkit-scrollbar-thumb { background: var(--orange); border-radius: 3px; }
.hero-browser-scroll img { width: 100%; display: block; pointer-events: none; user-select: none; }

.case-site-link {
  display: flex; align-items: center; justify-content: space-between;
  background: var(--dark); padding: 14px 20px;
  border-radius: 0 0 var(--r2) var(--r2); gap: 12px;
}
.case-url { font-size: 13px; font-weight: 500; color: rgba(255,255,255,0.6); font-family: 'Manrope', sans-serif; }
.case-url-link {
  display: inline-flex; align-items: center; gap: 6px;
  font-family: 'Manrope', sans-serif; font-size: 12px; font-weight: 700;
  color: var(--orange); text-transform: uppercase; letter-spacing: 0.06em;
  text-decoration: none; transition: gap 0.2s;
}
.case-url-link:hover { gap: 10px; }

/* ── HERO: Full-Width Image ── */
.case-hero-fw {
  padding: 160px 0 100px;
  background-size: cover; background-position: center; background-repeat: no-repeat;
  color: var(--white); position: relative;
}
.case-hero-fw::before {
  content: ''; position: absolute; inset: 0;
  background: linear-gradient(rgba(0,0,0,0.4), rgba(0,0,0,0.55));
  z-index: 0;
}
.case-hero-fw .wrap { position: relative; z-index: 1; }
.case-hero-fw h1 { color: var(--white); margin-bottom: 24px; }
.case-hero-fw .case-breadcrumb { color: rgba(255,255,255,0.7); margin-bottom: 32px; }
.case-hero-fw .case-breadcrumb a { color: rgba(255,255,255,0.8); }
.case-hero-fw .case-breadcrumb a:hover { opacity: 1; }
.case-meta-grid {
  display: grid; grid-template-columns: repeat(4, 1fr);
  gap: 30px; margin-top: 60px;
}
.meta-item { border-left: 2px solid var(--orange); padding-left: 20px; }
.meta-label { font-size: 12px; text-transform: uppercase; letter-spacing: 0.1em; opacity: 0.7; margin-bottom: 8px; font-weight: 700; }
.meta-value { font-size: 18px; font-weight: 800; font-family: 'Manrope', sans-serif; }

/* ── HERO: Marketing ── */
.case-hero-mk {
  padding: 152px 0 80px;
  background: var(--dark);
  position: relative; overflow: hidden;
}
.case-hero-mk::before {
  content: ''; position: absolute; inset: 0;
  background: radial-gradient(ellipse 60% 80% at 80% 50%, rgba(255,102,0,0.12) 0%, transparent 70%);
  z-index: 0;
}
.case-hero-mk .wrap { position: relative; z-index: 1; }
.case-hero-mk h1 { color: var(--white); margin-bottom: 24px; }
.case-hero-mk h1 em { color: var(--orange); }
.case-hero-mk .case-lead { color: rgba(255,255,255,0.7); }
.case-hero-mk .section-tag { color: var(--orange); }
.case-hero-mk .case-breadcrumb { color: rgba(255,255,255,0.5); margin-bottom: 24px; }
.case-hero-mk .case-breadcrumb a { color: rgba(255,255,255,0.6); }
.case-hero-mk .case-breadcrumb a:hover { color: var(--orange); }
.hero-stats {
  display: flex; gap: 48px; margin-top: 40px; flex-wrap: wrap;
}
.hero-stat-val { font-family: 'Manrope', sans-serif; font-size: 36px; font-weight: 900; color: var(--orange); }
.hero-stat-lbl { font-size: 13px; color: rgba(255,255,255,0.5); margin-top: 4px; line-height: 1.5; }

/* ── ABOUT CASE ── */
.about-case { padding: 96px 0; background: var(--gray-light); }
.about-case-inner {
  display: grid; grid-template-columns: 1fr 1fr; gap: 80px; align-items: start;
}
.about-case-inner > * { min-width: 0; }
.case-desc p { font-size: 16px; color: var(--dark); line-height: 1.8; margin-bottom: 20px; }
.case-desc p:last-child { margin-bottom: 0; }

.case-tasks { display: flex; flex-direction: column; gap: 4px; }
.case-task {
  display: flex; align-items: flex-start; gap: 14px;
  padding: 13px 16px; border-radius: var(--r);
  background: var(--white); border: 1px solid var(--gray-border);
  transition: border-color 0.2s, transform 0.2s; cursor: default;
}
.case-task:hover { border-color: rgba(255,102,0,0.3); transform: translateX(4px); }
.case-task-icon {
  flex-shrink: 0; width: 26px; height: 26px; border-radius: 50%;
  background: var(--orange-soft); border: 1.5px solid rgba(255,102,0,0.2);
  display: flex; align-items: center; justify-content: center; margin-top: 1px;
}
.case-task-icon svg { width: 12px; height: 12px; stroke: var(--orange); fill: none; stroke-width: 2.5; stroke-linecap: round; stroke-linejoin: round; }
.case-task-text { font-size: 14px; font-weight: 500; color: var(--dark); line-height: 1.5; }

/* ── GALLERY / MEDIA ── */
.screenshots { background: var(--gray-light); padding: 96px 0; }
.screenshots-grid {
  display: grid; grid-template-columns: repeat(2, 1fr); gap: 20px; margin-top: 48px;
}
.screenshots-grid > * { min-width: 0; }
.screen-card {
  border-radius: var(--r2); overflow: hidden;
  border: 1px solid var(--gray-border); background: var(--white);
  transition: transform 0.25s, box-shadow 0.25s; cursor: zoom-in;
}
.screen-card:hover { transform: translateY(-4px); box-shadow: 0 12px 40px rgba(0,0,0,0.12); }
.screen-card img { width: 100%; display: block; }
.screen-label {
  padding: 14px 20px;
  font-family: 'Manrope', sans-serif; font-size: 12px; font-weight: 700;
  color: var(--gray); text-transform: uppercase; letter-spacing: 0.06em;
  border-top: 1px solid var(--gray-border);
}

.gallery-main { position: relative; border-radius: var(--r2); overflow: hidden; background: var(--white); border: 1px solid var(--gray-border); margin-bottom: 16px; }
.gallery-viewport {
  height: 520px; overflow-y: scroll; overflow-x: hidden; background: var(--white);
  scrollbar-width: thin; scrollbar-color: var(--orange) var(--gray-light); cursor: ns-resize;
}
.gallery-viewport::-webkit-scrollbar { width: 5px; }
.gallery-viewport::-webkit-scrollbar-track { background: var(--gray-light); }
.gallery-viewport::-webkit-scrollbar-thumb { background: var(--orange); border-radius: 3px; }
.gallery-viewport img { width: 100%; display: block; pointer-events: none; user-select: none; }
.gallery-thumbs {
  display: flex; gap: 10px; overflow-x: auto; padding: 16px;
  background: var(--dark); border: 1px solid rgba(255,255,255,0.08);
  border-radius: var(--r2); box-shadow: 0 4px 16px rgba(0,0,0,0.2);
  scrollbar-width: thin; scrollbar-color: var(--orange) rgba(255,255,255,0.08);
}
.gallery-thumb {
  flex-shrink: 0; width: 100px; border-radius: 8px;
  border: 2px solid transparent; cursor: pointer;
  transition: border-color 0.2s, opacity 0.2s; opacity: 0.6;
}
.gallery-thumb.active { border-color: var(--orange); opacity: 1; }
.gallery-thumb:hover { opacity: 0.9; }
.gallery-thumb img { display:block; width: 100px; height: 68px; object-fit: cover; pointer-events: none; border-radius: 6px; }
.gallery-thumb-cap { font-size: 11px; line-height: 1.25; color: rgba(255,255,255,0.85); padding: 6px 4px 2px; text-align: left; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* Caption under the main image (left-aligned) */
.gallery-caption { padding: 12px 4px 0; font-size: 14px; line-height: 1.4; color: var(--gray); text-align: left; min-height: 0; }
.gallery-caption:empty { display: none; }

/* Gallery nav arrows + counter (single-swap gallery) */
.gallery-nav { position: absolute; top: 50%; transform: translateY(-50%); display: flex; justify-content: space-between; padding: 0 12px; width: 100%; pointer-events: none; z-index: 10; }
.gallery-btn { pointer-events: all; width: 44px; height: 44px; border-radius: 50%; background: rgba(255,255,255,0.95); border: 1px solid var(--gray-border); display: flex; align-items: center; justify-content: center; cursor: pointer; color: var(--dark); box-shadow: 0 2px 12px rgba(0,0,0,0.12); transition: all 0.2s; }
.gallery-btn:hover { background: var(--orange); color: #fff; border-color: var(--orange); }
.gallery-btn svg { width: 18px; height: 18px; stroke: currentColor; fill: none; stroke-width: 2.5; }
.gallery-counter { position: absolute; bottom: 12px; right: 12px; background: rgba(0,0,0,0.6); color: #fff; font-size: 12px; font-weight: 700; padding: 4px 10px; border-radius: 100px; z-index: 10; }

/* Tour/video embed */
.tour-section, .video-section { padding: 96px 0; background: var(--gray-light); }
.embed-container {
  border-radius: var(--r2); overflow: hidden; border: 1px solid var(--gray-border);
  background: var(--white); margin-top: 48px;
}
.embed-container iframe { width: 100%; height: 600px; border: none; display: block; }
.embed-container.tour iframe { height: 500px; }

/* Lightbox */
.lightbox {
  display: none; position: fixed; inset: 0; z-index: 500;
  background: rgba(0,0,0,0.92); align-items: center; justify-content: center;
  padding: 32px;
}
.lightbox.open { display: flex; }
.lightbox img { max-width: 100%; max-height: 90vh; border-radius: var(--r); object-fit: contain; }
.lightbox-close {
  position: absolute; top: 20px; right: 20px;
  background: none; border: none; color: white; font-size: 36px;
  cursor: pointer; line-height: 1; opacity: 0.7; transition: opacity 0.2s;
}
.lightbox-close:hover { opacity: 1; }

/* ── RESULTS ── */
.results-section { padding: 96px 0; }
.results-grid {
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; margin-top: 48px;
}
.results-grid > * { min-width: 0; }
.result-card {
  background: var(--gray-light); border: 1px solid var(--gray-border);
  border-radius: var(--r2); padding: 32px 24px; text-align: center;
  transition: border-color 0.2s, transform 0.2s;
}
.result-card:hover { border-color: rgba(255,102,0,0.3); transform: translateY(-2px); }
.result-card .big {
  font-family: 'Manrope', sans-serif; font-size: 48px; font-weight: 900;
  color: var(--orange); line-height: 1; margin-bottom: 8px;
}
.result-card .desc { font-size: 13px; color: var(--gray); line-height: 1.5; }

/* Quote */
.case-quote {
  margin-top: 48px; padding: 32px 36px; background: var(--orange-soft);
  border-left: 4px solid var(--orange); border-radius: 0 var(--r2) var(--r2) 0;
}
.case-quote p { font-size: 17px; font-style: italic; color: var(--dark); line-height: 1.7; margin-bottom: 16px; }
.case-quote-author { display: flex; align-items: center; gap: 12px; }
.case-quote-ava {
  flex-shrink: 0; width: 40px; height: 40px; border-radius: 50%;
  background: var(--orange); display: flex; align-items: center; justify-content: center;
  font-family: 'Manrope', sans-serif; font-weight: 800; color: #fff; font-size: 14px;
}
.case-quote-name { font-family: 'Manrope', sans-serif; font-size: 14px; font-weight: 700; color: var(--black); }
.case-quote-role { font-size: 12px; color: var(--gray); margin-top: 2px; }

/* ── TECH ── */
.tech-section { background: var(--gray-light); padding: 96px 0; }
.tech-grid { display: flex; gap: 16px; flex-wrap: wrap; margin-top: 40px; }
.tech-tag {
  padding: 10px 20px; background: var(--white);
  border: 1px solid var(--gray-border); border-radius: 100px;
  font-size: 14px; font-weight: 500; color: var(--dark);
  transition: border-color 0.2s, color 0.2s;
}
.tech-tag:hover { border-color: var(--orange); color: var(--orange); }

/* ── CTA ── */
.case-cta-section { background: var(--orange); padding: 80px 0; }
.case-cta-inner {
  display: flex; align-items: flex-end; justify-content: space-between; gap: 40px;
}
.case-cta-inner h2 { color: var(--white); }
.case-cta-inner p { font-size: 16px; color: rgba(255,255,255,0.8); margin-top: 10px; max-width: 480px; line-height: 1.6; }
.btn-white-cta {
  background: var(--white); color: var(--orange);
  font-family: 'Manrope', sans-serif; font-size: 14px; font-weight: 800;
  padding: 16px 36px; border-radius: 8px; white-space: nowrap;
  flex-shrink: 0; transition: all 0.2s; border: none; cursor: pointer; text-decoration: none; display: inline-block;
}
.btn-white-cta:hover { transform: translateY(-2px); box-shadow: 0 6px 20px rgba(0,0,0,0.2); }

/* ── MORE CASES ── */
.more-cases { padding: 96px 0; }
.more-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; margin-top: 48px; }
.more-grid > * { min-width: 0; }
.more-card {
  background: var(--gray-light); border-radius: var(--r2); overflow: hidden;
  border: 1px solid var(--gray-border); transition: transform 0.25s, box-shadow 0.25s;
  text-decoration: none; color: inherit;
}
.more-card:hover { transform: translateY(-4px); box-shadow: 0 12px 40px rgba(0,0,0,0.1); }
.more-img { aspect-ratio: 16/9; overflow: hidden; background: #E0E0E0; }
.more-img img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.4s; }
.more-card:hover .more-img img { transform: scale(1.04); }
.more-body { padding: 20px 24px 24px; }
.more-tags { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 10px; }
.more-tag { padding: 3px 10px; background: var(--orange-soft); border-radius: 100px; font-size: 11px; font-weight: 600; color: var(--orange); }
.more-name { font-size: 16px; font-weight: 700; color: var(--black); margin-bottom: 14px; line-height: 1.3; }
.more-link {
  display: inline-flex; align-items: center; gap: 6px;
  font-family: 'Manrope', sans-serif; font-size: 11px; font-weight: 700;
  color: var(--orange); text-transform: uppercase; letter-spacing: 0.08em; transition: gap 0.2s;
}
.more-link:hover { gap: 10px; }

/* ── SOLUTION (marketing) ── */
.solution-section { padding: 96px 0; }
.solution-grid {
  display: grid; grid-template-columns: 1fr 1fr; gap: 80px; align-items: start;
}
.solution-grid > * { min-width: 0; }
.solution-item {
  padding: 20px 24px; background: var(--gray-light); border: 1px solid var(--gray-border);
  border-radius: var(--r2); margin-bottom: 16px;
}
.solution-item h3 { font-size: 16px; font-weight: 700; margin-bottom: 8px; }
.solution-item ul { padding-left: 20px; }
.solution-item li { font-size: 14px; color: var(--gray); line-height: 1.7; margin-bottom: 4px; }

/* ── REVEAL ANIMATION ── */
.reveal { opacity: 0; transform: translateY(24px); transition: opacity 0.55s ease, transform 0.55s ease; }
.reveal.in { opacity: 1; transform: none; }

/* ── RESPONSIVE ── */
@media (max-width: 1100px) {
  :root { --pad: 24px; }
  .case-hero-inner { gap: 40px; }
  .about-case-inner { gap: 48px; }
  .solution-grid { gap: 48px; }
}
@media (max-width: 900px) {
  :root { --pad: 24px; }
  .case-hero::after { display: none; }
  .case-hero-inner { grid-template-columns: 1fr; min-height: auto; }
  .case-hero-inner > div:first-child { padding: 48px 0 40px; }
  .case-hero-img { padding: 40px 0; order: 2; background: var(--gray-light); }
  .hero-browser-scroll { height: 360px; }
  .about-case-inner { grid-template-columns: 1fr; }
  .solution-grid { grid-template-columns: 1fr; }
  .results-grid { grid-template-columns: repeat(2, 1fr); }
  .case-cta-inner { flex-direction: column; align-items: flex-start; gap: 24px; }
  .btn-white-cta { width: 100%; text-align: center; }
  .more-grid { grid-template-columns: 1fr; }
  .case-meta-grid { grid-template-columns: 1fr 1fr; }
  .hero-stats { gap: 32px; }
}
@media (max-width: 600px) {
  :root { --pad: 16px; }
  .case-hero { padding: 88px 0 0; }
  .case-hero-fw { padding: 120px 0 60px; }
  .case-hero-mk { padding: 120px 0 60px; }
  .results-grid { grid-template-columns: 1fr 1fr; }
  .case-results { flex-direction: column; }
  .case-result { border-right: none; border-bottom: 1px solid var(--gray-border); }
  .case-result:last-child { border-bottom: none; }
  .about-case { padding: 64px 0; }
  .screenshots { padding: 64px 0; }
  .results-section { padding: 64px 0; }
  .more-cases { padding: 64px 0; }
  .gallery-viewport { height: 300px; }
  .gallery-thumb { width: 72px; }
  .gallery-thumb img { width: 72px; height: 50px; }
}