/* ============================================================
   BLOG PAGE — ГРАНД
   Inherits base variables from main.css (loaded before this)
============================================================ */

/* ============================================================
   HEADER
============================================================ */

.header .header__inner {
  height: 56px;
  background: #081352bd;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-radius: 50px;
  padding: 0 24px 0 20px;
}

.header .header__logo-icon { width: 64px; height: 64px; top: 0; }

.header .header__logo-text {
  display: block;
  color: #d5d5d5;
}

.header .header__nav-link { color: #d5d5d5; }
.header .header__nav-link:hover { background: rgba(0,0,0,0.08); }

.header .header__phone { color: #d5d5d5; }
.header .header__phone:hover { color: #ffffff; }

/* Active nav link */
.header__nav-link--active {
  color: #fff !important;
  position: relative;
}
/* .header__nav-link--active::after {
  content: '';
  position: absolute;
  bottom: -3px;
  left: 12px;
  right: 12px;
  height: 2px;
  background: currentColor;
  border-radius: 2px;
  opacity: 0.7;
} */

/* ============================================================
   HERO
============================================================ */
.blog-hero {
  padding: 120px 0 56px;
  background: #f3f3f3;
}

.blog-hero__label {
  font-size: 12px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: #888;
  font-weight: 500;
  margin-bottom: 18px;
}

.blog-hero__title {
  font-family: 'Georgia', serif;
  font-size: clamp(36px, 5.5vw, 68px);
  font-weight: 800;
  line-height: 1.05;
  color: #1f1f1f;
  text-transform: uppercase;
  letter-spacing: -0.01em;
  margin-bottom: 20px;
}

.blog-hero__sub {
  font-size: 16px;
  color: #666;
  line-height: 1.65;
  max-width: 560px;
}

/* ─── Category Filter ─────────────────────────────────────── */
.blog-filter {
  background: #f3f3f3;
  padding-bottom: 40px;
}

.blog-filter__inner {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.blog-filter__btn {
  padding: 9px 22px;
  border-radius: 24px;
  font-size: 14px;
  font-weight: 500;
  color: #555;
  background: #fff;
  border: 1.5px solid #e0e0e0;
  cursor: pointer;
  transition: background 0.2s, color 0.2s, border-color 0.2s;
  white-space: nowrap;
}

.blog-filter__btn:hover {
  border-color: #1c3850;
  color: #1c3850;
}

.blog-filter__btn.is-active {
  background: #1c3850;
  color: #fff;
  border-color: #1c3850;
}

/* ─── Articles Section ────────────────────────────────────── */
.blog-section {
  background: #f3f3f3;
  padding-bottom: 80px;
}

/* ─── Grid ────────────────────────────────────────────────── */
.blog-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  grid-template-rows: auto auto;
  gap: 16px;
  margin-bottom: 16px;
}

/* Featured card: col 1 spans 2 rows */
.blog-grid .acard:first-child {
  grid-column: 1;
  grid-row: 1 / span 2;
}

/* ─── Article Card ────────────────────────────────────────── */
.acard {
  position: relative;
  border-radius: 20px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  background: #fff;
  cursor: pointer;
  transition: transform 0.28s cubic-bezier(0.25,0.46,0.45,0.94),
              box-shadow 0.28s cubic-bezier(0.25,0.46,0.45,0.94);
  text-decoration: none;
  color: inherit;
}

.acard:hover {
  transform: translateY(-5px);
  box-shadow: 0 16px 40px rgba(0,0,0,0.12);
}

/* Featured (first card) — dark overlay style */
.acard--featured {
  min-height: 420px;
  justify-content: flex-end;
}

.acard--featured .acard__bg {
  position: absolute;
  inset: 0;
}

.acard--featured .acard__bg img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.acard--featured .acard__overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to bottom,
    rgba(10,20,50,0.3) 0%,
    rgba(10,20,50,0.45) 40%,
    rgba(10,20,50,0.90) 100%);
}

.acard--featured .acard__body {
  position: relative;
  z-index: 2;
  padding: 28px 28px 24px;
  background: transparent;
}

.acard--featured .acard__cat { color: rgba(255,255,255,0.65); }
.acard--featured .acard__date { color: rgba(255,255,255,0.5); }
.acard--featured .acard__title { color: #fff; font-size: clamp(18px, 1.8vw, 23px); }
.acard--featured .acard__desc { color: rgba(255,255,255,0.65); }
.acard--featured .acard__arrow {
  background: rgba(255,255,255,0.18);
  color: #fff;
}
.acard--featured .acard__arrow:hover {
  background: #fff;
  color: #1c3850;
}

/* No-image featured fallback */
.acard--featured.acard--noimg {
  background: #1c3850;
  justify-content: flex-end;
}

/* Regular card */
.acard--regular { min-height: 200px; }

.acard--regular .acard__img-wrap {
  width: 100%;
  height: 180px;
  overflow: hidden;
  flex-shrink: 0;
}

.acard--regular .acard__img-wrap img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s ease;
}

.acard:hover .acard__img-wrap img { transform: scale(1.04); }

.acard--regular .acard__body { padding: 20px 20px 18px; flex: 1; display: flex; flex-direction: column; }

/* Accent card (no image, colored bg) */
.acard--accent { background: #f5c4a3; }
.acard--accent .acard__cat { color: rgba(30,20,10,0.55); }
.acard--accent .acard__date { color: rgba(30,20,10,0.45); }
.acard--accent .acard__title { color: #1f1f1f; }
.acard--accent .acard__desc { color: rgba(30,20,10,0.65); }
.acard--accent .acard__arrow { background: rgba(0,0,0,0.1); color: #1f1f1f; }
.acard--accent .acard__arrow:hover { background: #1c3850; color: #fff; }

/* ─── Card inner elements ─────────────────────────────────── */
.acard__meta {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 12px;
  flex-wrap: wrap;
}

.acard__cat {
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.04em;
  color: #1c3850;
  text-transform: none;
}

.acard__sep {
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: currentColor;
  opacity: 0.45;
  flex-shrink: 0;
}

.acard__date {
  font-size: 12px;
  color: #888;
}

.acard__title {
  font-family: 'Georgia', serif;
  font-size: clamp(15px, 1.4vw, 18px);
  font-weight: 700;
  line-height: 1.3;
  color: #1f1f1f;
  margin-bottom: 10px;
}

.acard__desc {
  font-size: 13px;
  color: #666;
  line-height: 1.6;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
  flex: 1;
  margin-bottom: 14px;
}

.acard__arrow {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: rgba(0,0,0,0.07);
  color: #1c3850;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  align-self: flex-end;
  margin-top: auto;
  transition: background 0.2s, color 0.2s, transform 0.2s;
}

.acard:hover .acard__arrow {
  background: #1c3850;
  color: #fff;
  transform: scale(1.08);
}

/* ─── Additional rows (page 2+ or no-featured rows) ──────── */
.blog-grid-plain {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  margin-bottom: 16px;
}

/* ─── Pagination ──────────────────────────────────────────── */
.blog-pagination {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  margin-top: 40px;
}

.blog-pagination__arrow {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: 2px solid #1c3850;
  background: transparent;
  color: #1c3850;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: background 0.2s, color 0.2s;
  flex-shrink: 0;
}

.blog-pagination__arrow:hover { background: #1c3850; color: #fff; }
.blog-pagination__arrow:disabled { border-color: #d0d0d0; color: #d0d0d0; cursor: not-allowed; }
.blog-pagination__arrow:disabled:hover { background: transparent; }

.blog-pagination__dots {
  display: flex;
  gap: 8px;
  align-items: center;
}

.blog-pagination__dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: #d0d0d0;
  border: none;
  cursor: pointer;
  transition: background 0.25s, transform 0.25s;
  padding: 0;
}

.blog-pagination__dot.is-active {
  background: #1c3850;
  transform: scale(1.3);
}

.blog-pagination__info {
  font-size: 13px;
  color: #888;
  min-width: 80px;
  text-align: center;
}

/* ─── Loading / Error states ──────────────────────────────── */
.blog-loading {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 16px;
  padding: 80px 24px;
  color: #888;
}

.blog-spinner {
  width: 36px;
  height: 36px;
  border: 3px solid #e0e0e0;
  border-top-color: #1c3850;
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

@keyframes spin { to { transform: rotate(360deg); } }

.blog-empty {
  text-align: center;
  padding: 80px 24px;
  color: #888;
  font-size: 16px;
}

.blog-empty a {
  color: #1c3850;
  text-decoration: underline;
}

/* ─── Responsive ──────────────────────────────────────────── */
@media (max-width: 960px) {
  .blog-grid {
    grid-template-columns: 1fr 1fr;
    grid-template-rows: auto;
  }

  .blog-grid .acard:first-child {
    grid-column: 1 / span 2;
    grid-row: auto;
    min-height: 320px;
  }

  .blog-grid-plain { grid-template-columns: 1fr 1fr; }
  .blog-hero { padding: 100px 0 40px; }
}

@media (max-width: 640px) {
  .blog-grid { grid-template-columns: 1fr; grid-template-rows: auto; }
  .blog-grid .acard:first-child { grid-column: 1; grid-row: auto; }
  .blog-grid-plain { grid-template-columns: 1fr; }
  .blog-filter__btn { font-size: 13px; padding: 8px 16px; }
  .acard--regular .acard__img-wrap { height: 200px; }
  .acard--featured { min-height: 300px; }
}

/* ─── Article Page Styles ─────────────────────────────────── */
.article-page { background: #f3f3f3; min-height: 100vh; }

.article-hero {
  position: relative;
  min-height: 420px;
  display: flex;
  align-items: flex-end;
  overflow: hidden;
}

.article-hero__bg {
  position: absolute;
  inset: 0;
}

.article-hero__bg img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.article-hero__overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    to bottom,
    rgba(10,20,50,0.4) 0%,
    rgba(10,20,50,0.95) 100%
  );
}

.article-hero__content {
  position: relative;
  z-index: 2;
  padding: 140px 0 56px;
  width: 100%;
}

.article-hero--noimg {
  background: #1c3850;
  min-height: 300px;
}

.article-hero__back {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  color: rgba(255,255,255,0.6);
  margin-bottom: 20px;
  transition: color 0.2s;
}

.article-hero__back:hover { color: rgba(255,255,255,0.9); }

.article-hero__meta {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 16px;
}

.article-hero__cat {
  font-size: 12px;
  font-weight: 600;
  color: rgba(255,255,255,0.6);
  letter-spacing: 0.04em;
}

.article-hero__date { font-size: 12px; color: rgba(255,255,255,0.45); }

.article-hero__title {
  font-family: 'Georgia', serif;
  font-size: clamp(26px, 4vw, 52px);
  font-weight: 800;
  color: #fff;
  line-height: 1.1;
  text-transform: uppercase;
  letter-spacing: -0.01em;
  max-width: 820px;
}

/* Article body */
.article-body { padding: 64px 0 100px; }

.article-content {
  max-width: 760px;
}

.article-content p { font-size: 17px; line-height: 1.85; color: #333; margin-bottom: 20px; }
.article-content h1 { font-family: 'Georgia', serif; font-size: 34px; font-weight: 800; color: #1c3850; margin: 36px 0 14px; text-transform: uppercase; }
.article-content h2 { font-family: 'Georgia', serif; font-size: 26px; font-weight: 800; color: #1f1f1f; margin: 30px 0 12px; }
.article-content h3 { font-size: 20px; font-weight: 700; color: #1f1f1f; margin: 24px 0 10px; }
.article-content ul, .article-content ol { padding-left: 24px; margin-bottom: 20px; }
.article-content li { font-size: 17px; line-height: 1.75; color: #333; margin-bottom: 6px; }
.article-content blockquote {
  border-left: 4px solid #1c3850;
  padding: 16px 24px;
  background: rgba(28,56,80,0.05);
  border-radius: 0 10px 10px 0;
  margin: 28px 0;
  color: #555;
  font-style: italic;
  font-size: 17px;
  line-height: 1.75;
}
.article-content img {
  width: 100%;
  border-radius: 16px;
  margin: 28px 0;
  max-height: 520px;
  object-fit: cover;
}
.article-content a { color: #1c3850; text-decoration: underline; text-underline-offset: 3px; }
.article-content strong { font-weight: 700; color: #1f1f1f; }

/* Article error/loading */
.article-loading, .article-error {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 16px;
  padding: 120px 24px;
  text-align: center;
}

.article-error__title { font-size: 24px; font-weight: 700; color: #1f1f1f; }
.article-error__text { font-size: 16px; color: #888; }
.article-error a { color: #1c3850; text-decoration: underline; }
