/* =============================================
   AiPrank.ru — Gallery, Stats & New UI Elements
   =============================================*/

/* ─── btn-blue ─── */
.btn-blue {
  background: var(--blue);
  color: var(--white);
  border: 2px solid var(--blue);
  box-shadow: 4px 4px 0 rgba(0,102,255,0.35);
}
.btn-blue:hover {
  background: transparent;
  color: var(--blue);
  box-shadow: 4px 4px 0 var(--blue);
}

/* ─── Hero trust micro-copy ─── */
.hero__trust {
  margin-top: 16px;
  font-family: var(--font-mono);
  font-size: 12px;
  color: rgba(250,250,248,0.55);
  letter-spacing: 0.5px;
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  animation: slideUp .8s cubic-bezier(.16,1,.3,1) .75s both;
}
.hero__trust .sep2 {
  color: var(--yellow);
  opacity: 0.6;
}
.hero__trust span:not(.sep2) {
  display: flex;
  align-items: center;
  gap: 4px;
}
.hero__trust span:not(.sep2)::before {
  content: '✓';
  color: var(--yellow);
  font-weight: 900;
}

/* ─── STATS / TRUST SECTION ─── */
.stats-trust {
  padding: 40px 0;
  background: linear-gradient(180deg, var(--dark) 0%, rgba(10,10,18,0.95) 100%);
  border-top: 1px solid rgba(255,255,255,0.06);
  border-bottom: 1px solid rgba(255,255,255,0.06);
}

.stats__grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 2px;
}

.stat-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  padding: 32px 20px;
  text-align: center;
  position: relative;
  border-right: 1px solid rgba(255,255,255,0.07);
}
.stat-card:last-child { border-right: none; }

.stat-card__num {
  font-family: var(--font-display);
  font-size: clamp(36px, 4vw, 64px);
  line-height: 1;
  color: var(--yellow);
  letter-spacing: 2px;
}
.stat-card__plus,
.stat-card__pct,
.stat-card__rub {
  font-size: 0.5em;
  vertical-align: super;
  color: var(--red);
}

.stat-card__label {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  color: rgba(250,250,248,0.5);
}

@media (max-width: 700px) {
  .stats__grid { grid-template-columns: repeat(2, 1fr); }
  .stat-card:nth-child(2) { border-right: none; }
  .stat-card:nth-child(3) { border-right: 1px solid rgba(255,255,255,0.07); }
}
@media (max-width: 400px) {
  .stats__grid { grid-template-columns: 1fr; }
  .stat-card { border-right: none; border-bottom: 1px solid rgba(255,255,255,0.07); }
}

/* ─── GALLERY SECTION ─── */
.gallery {
  padding: 80px 0;
  background: var(--dark);
}

.gallery__sub {
  font-size: 17px;
  color: rgba(250,250,248,0.65);
  margin-bottom: 36px;
  line-height: 1.5;
}

/* Filter tabs */
.gallery__filters {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 40px;
}

.gf-btn {
  padding: 9px 22px;
  border: 2px solid rgba(255,255,255,0.15);
  background: transparent;
  color: rgba(250,250,248,0.6);
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  border-radius: 4px;
  cursor: pointer;
  transition: all 0.25s ease;
}
.gf-btn:hover {
  border-color: var(--yellow);
  color: var(--yellow);
}
.gf-btn.active {
  background: var(--yellow);
  border-color: var(--yellow);
  color: var(--dark);
  box-shadow: 0 0 20px rgba(255,215,0,0.25);
}

/* Gallery grid */
.gallery__grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}

/* Hidden cards when filtered */
.gal-card.hidden {
  display: none;
}

/* Gallery card */
.gal-card {
  background: var(--dark2, #13131f);
  border: 2px solid rgba(255,255,255,0.07);
  border-radius: 14px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: border-color 0.3s ease, transform 0.3s ease, box-shadow 0.3s ease;
  cursor: pointer;
}
.gal-card:hover {
  border-color: var(--yellow);
  transform: translateY(-4px);
  box-shadow: 0 16px 40px rgba(0,0,0,0.5), 0 0 0 1px var(--yellow);
}

/* Video area */
.gal-card__media {
  position: relative;
  aspect-ratio: 16 / 10;
  overflow: hidden;
  background: #0a0a12;
}
.gal-card__video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.4s ease;
}

/* Face alignment: show top of video frame */
.gal-card--top .gal-card__video {
  object-position: top;
}

/* Face alignment: 25% from top (between top and center) */
.gal-card--upper .gal-card__video {
  object-position: center 25%;
}

.gal-card:hover .gal-card__video {
  transform: scale(1.04);
}

/* Play button */
.gal-card__play {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(10,10,18,0.35);
  transition: background 0.3s ease;
}
.gal-card:hover .gal-card__play {
  background: rgba(10,10,18,0.15);
}
.gal-card__play span {
  width: 52px;
  height: 52px;
  background: rgba(255,215,0,0.92);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  color: var(--dark);
  transform: scale(0.85);
  transition: transform 0.3s cubic-bezier(0.34,1.56,0.64,1);
  box-shadow: 0 4px 20px rgba(255,215,0,0.3);
}
.gal-card:hover .gal-card__play span {
  transform: scale(1);
}

/* Card info */
.gal-card__info {
  padding: 16px 18px 8px;
  flex: 1;
}

.gal-card__tag {
  display: inline-block;
  padding: 3px 10px;
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  border-radius: 20px;
  margin-bottom: 8px;
}
.gal-card__tag.tag-red    { background: var(--red);    color: #fff; }
.gal-card__tag.tag-blue   { background: var(--blue);   color: #fff; }
.gal-card__tag.tag-yellow { background: var(--yellow); color: var(--dark); }

.gal-card__title {
  font-family: var(--font-display);
  font-size: 20px;
  text-transform: uppercase;
  color: var(--white);
  margin: 0 0 4px;
  line-height: 1.1;
}

.gal-card__desc {
  font-size: 13px;
  color: rgba(250,250,248,0.5);
  margin: 0;
  line-height: 1.4;
}

/* CTA link in card */
.gal-card__cta {
  display: block;
  padding: 12px 18px;
  border-top: 1px solid rgba(255,255,255,0.07);
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 1px;
  text-transform: uppercase;
  color: var(--yellow);
  text-decoration: none;
  transition: background 0.2s ease, color 0.2s ease;
}
.gal-card__cta:hover {
  background: var(--yellow);
  color: var(--dark);
}

/* Gallery footer CTA */
.gallery__footer {
  text-align: center;
  margin-top: 48px;
}

/* ─── Responsive gallery ─── */
@media (max-width: 1000px) {
  .gallery__grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 600px) {
  .gallery__grid { grid-template-columns: 1fr; }
  .gallery__filters { gap: 8px; }
  .gf-btn { padding: 8px 14px; font-size: 11px; }
}
