/* =============================================================
   BLOG VITRINE — витрина блога Imperitel
   Переиспользует дизайн-токены (variables.css) и паттерны
   service-page.css: карточки, бордеры, hover, reveal.
   ============================================================= */

/* ---- HERO ---- */
.blog-hero {
  position: relative;
  padding-top: clamp(78px, 14vw, 180px);
  padding-bottom: clamp(24px, 3vw, 40px);
  overflow: hidden;
}

.blog-hero__inner {
  max-width: 760px;
  position: relative;
  z-index: 2;
}

.blog-hero__badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: rgba(97, 117, 162, 0.15);
  border: 1px solid rgba(97, 117, 162, 0.3);
  border-radius: 100px;
  padding: 6px 16px;
  font-size: 0.8rem;
  font-weight: 500;
  color: var(--accent-cyan);
  margin-bottom: 24px;
}

.blog-hero__badge svg {
  width: 16px;
  height: 16px;
}

.blog-hero__title {
  font-size: clamp(2.2rem, 5.5vw, 4rem);
  line-height: 1.1;
  letter-spacing: -0.02em;
  margin-bottom: 24px;
}

.blog-hero__subtitle {
  font-size: clamp(1rem, 1.4vw, 1.15rem);
  color: rgba(255, 255, 255, 0.65);
  line-height: 1.7;
  max-width: 580px;
}

/* ---- SECTION ---- */
.blog-section {
  padding: 0 0 var(--section-vertical-padding);
}

/* ---- FULL-WIDTH CONTAINER ---- */
.blog-fullwidth {
  width: 100%;
  padding: 0 clamp(16px, 3vw, 40px);
  max-width: 100%;
}

/* ---- FILTER TABS ---- */
.blog-filter {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 40px;
}

.blog-filter__btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 20px;
  background: rgba(8, 33, 66, 0.45);
  border: 1px solid rgba(97, 117, 162, 0.2);
  border-radius: 100px;
  color: rgba(255, 255, 255, 0.65);
  font-family: var(--font-sans);
  font-size: 0.85rem;
  font-weight: 500;
  cursor: pointer;
  transition: var(--transition-fast);
  white-space: nowrap;
}

.blog-filter__btn:hover {
  background: rgba(97, 117, 162, 0.15);
  border-color: rgba(97, 117, 162, 0.4);
  color: #fff;
}

.blog-filter__btn--active {
  background: var(--accent-gradient);
  border-color: transparent;
  color: var(--bg-main);
  font-weight: 600;
}

.blog-filter__btn--active:hover {
  background: var(--accent-gradient);
  border-color: transparent;
  color: var(--bg-main);
  opacity: 0.9;
}

/* ---- CARDS GRID ---- */
.blog-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 24px;
}

@media (min-width: 640px) {
  .blog-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (min-width: 1200px) {
  .blog-grid {
    grid-template-columns: repeat(4, 1fr);
  }
}

/* ---- ARTICLE CARD ---- */
.blog-card {
  display: flex;
  flex-direction: column;
  background: rgba(8, 33, 66, 0.45);
  border: 1px solid rgba(97, 117, 162, 0.15);
  border-radius: 20px;
  overflow: hidden;
  position: relative;
  transition: border-color 0.3s, transform 0.3s, box-shadow 0.3s;
}

.blog-card:hover {
  border-color: rgba(97, 117, 162, 0.4);
  transform: translateY(-4px);
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.25);
}

/* ---- CARD IMAGE ---- */
.blog-card__img {
  width: 100%;
  height: 180px;
  object-fit: cover;
  display: block;
}

/* ---- CARD BODY ---- */
.blog-card__body {
  display: flex;
  flex-direction: column;
  flex-grow: 1;
  padding: 22px 24px 24px;
}

.blog-card__tag {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  align-self: flex-start;
  background: rgba(97, 117, 162, 0.12);
  border: 1px solid rgba(97, 117, 162, 0.25);
  border-radius: 100px;
  padding: 4px 12px;
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.05em;
  color: var(--accent-cyan);
  margin-bottom: 16px;
  transition: var(--transition-fast);
}

.blog-card__tag:hover {
  background: rgba(97, 117, 162, 0.22);
  border-color: rgba(97, 117, 162, 0.4);
}

.blog-card__title {
  font-family: var(--font-serif);
  font-weight: 600;
  font-size: 1.08rem;
  line-height: 1.4;
  color: #fff;
  margin-bottom: 12px;
}

.blog-card__excerpt {
  font-family: var(--font-text);
  font-size: 0.9rem;
  line-height: 1.65;
  color: rgba(255, 255, 255, 0.58);
  margin-bottom: 24px;
  flex-grow: 1;
}

.blog-card__read {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--accent-cyan);
  align-self: flex-start;
  transition: var(--transition-fast);
}

.blog-card__read svg {
  width: 16px;
  height: 16px;
  transition: transform 0.3s ease;
}

.blog-card:hover .blog-card__read svg {
  transform: translateX(4px);
}

/* ---- FILTER ANIMATION ---- */
.blog-card.blog-card--hidden {
  display: none;
}

/* ---- INTRO NOTE (под hero, про плейсхолдеры/формат) ---- */
.blog-note {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin-top: 28px;
  padding: 12px 18px;
  background: rgba(8, 33, 66, 0.4);
  border: 1px solid rgba(97, 117, 162, 0.18);
  border-radius: 12px;
  font-size: 0.85rem;
  color: rgba(255, 255, 255, 0.6);
}

.blog-note svg {
  width: 18px;
  height: 18px;
  color: var(--accent-cyan);
  flex-shrink: 0;
}


/* ---- HERO CLOUDS (растворяются влево через градиент, как в блоке «О нас») ---- */
.blog-hero__clouds {
  position: absolute;
  top: 0;
  right: 0;
  width: clamp(420px, 55%, 900px);
  height: 100%;
  z-index: 1;
  pointer-events: none;
}

.blog-hero__clouds img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: right top;
  opacity: 0.55;
  /* плавный переход в фон влево + мягкое затухание книзу */
  -webkit-mask-image:
    linear-gradient(to right, transparent 0%, rgba(0,0,0,0.4) 35%, #000 75%),
    linear-gradient(to bottom, #000 60%, transparent 100%);
  mask-image:
    linear-gradient(to right, transparent 0%, rgba(0,0,0,0.4) 35%, #000 75%),
    linear-gradient(to bottom, #000 60%, transparent 100%);
  -webkit-mask-composite: source-in;
  mask-composite: intersect;
}

@media (max-width: 768px) {
  .blog-hero__clouds {
    width: 80%;
    opacity: 0.7;
  }
  .blog-hero__clouds img { opacity: 0.35; }
}
