/* Blog styles — match the landing's Forest Green / Montserrat language. */

/* ---- Header on light backgrounds ----
   The landing header is built for the dark hero overlay (white text).
   On blog pages we have a white page, so we recolor the header to dark
   text + a soft frosted background, while keeping the Hi-Client identity. */
body.blog-page { color: #0f172a; background: #ffffff; }

body.blog-page .header {
  margin-top: 0;
  padding: 18px 0;
  /* Same gradient as the brand .btn__primary / footer green — keeps the
     header consistent with the rest of the site. */
  background: linear-gradient(180deg, #04cc18 0%, #02bc4d 63.54%);
  border-bottom: 1px solid rgba(0, 0, 0, 0.06);
  box-shadow: 0 4px 16px -8px rgba(2, 188, 77, 0.45);
  position: sticky;
  top: 0;
  z-index: 50;
}

body.blog-page .header__wrapper { align-items: center; }

body.blog-page .menu {
  padding-bottom: 0;
  border-bottom: none;
}

/* All text/icons inside the green header become white. */
body.blog-page .menu__link { color: #ffffff; }
body.blog-page .menu__link:hover { opacity: 0.78; color: #ffffff; }

body.blog-page .text__logo { color: #ffffff; }

/* Hand/clip logo + phone/account icons — turn pure white via filter so they
   read clearly on the green background regardless of their original fill. */
body.blog-page .header .logo img,
body.blog-page .header .phone__wrapper img,
body.blog-page .header .account__wrapper img {
  filter: brightness(0) invert(1);
}

body.blog-page .phone__link {
  color: #ffffff;
  font-weight: 600;
}
body.blog-page .text-opacity {
  color: rgba(255, 255, 255, 0.72);
  font-weight: 500;
}
body.blog-page .account__link {
  color: #ffffff;
  text-decoration: none;
  font-weight: 600;
}
body.blog-page .phone__wrapper:hover .phone__link,
body.blog-page .phone__wrapper:hover .text-opacity { color: #ecfdf5; }
body.blog-page .account__wrapper:hover .account__link {
  color: #ecfdf5;
  text-decoration: underline;
  text-decoration-color: rgba(255, 255, 255, 0.7);
  text-underline-offset: 3px;
}

/* The first <main> on blog pages should not collide with the sticky header. */
body.blog-page .blog-main { padding-top: 56px; }

/* Footer keeps its original white-on-green look — undo the body's dark text
   color so labels like "Hi Client" / "Информация:" / phone don't go black. */
body.blog-page .footer,
body.blog-page .footer .footer__logo-text,
body.blog-page .footer .footer__list-title,
body.blog-page .footer .footer__phone-link,
body.blog-page .footer .footer__email-link { color: #ffffff; }

.blog-main {
  background: #ffffff;
  color: #0f172a;
  padding: 80px 0 100px;
  min-height: 60vh;
}

.blog-main--article {
  background: linear-gradient(180deg, #f8fafc 0%, #ffffff 280px);
}

.blog-hero {
  text-align: center;
  margin-bottom: 56px;
}

.blog-hero__eyebrow {
  text-transform: uppercase;
  letter-spacing: 2px;
  font-size: 13px;
  font-weight: 700;
  color: #16a34a;
  margin-bottom: 12px;
}

.blog-hero__title {
  font-family: Montserrat, sans-serif;
  font-size: clamp(28px, 4vw, 48px);
  font-weight: 800;
  line-height: 1.2;
  color: #0f172a;
  margin-bottom: 16px;
}

.blog-hero__lead {
  font-size: 17px;
  line-height: 1.6;
  color: #475569;
  max-width: 720px;
  margin: 0 auto;
}

.blog-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 28px;
}

.blog-card {
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 16px;
  overflow: hidden;
  transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease;
}

.blog-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 16px 32px -16px rgba(15, 23, 42, 0.18);
  border-color: rgba(2, 188, 77, 0.4);
}

.blog-card__link {
  display: flex;
  flex-direction: column;
  height: 100%;
  color: inherit;
  text-decoration: none;
}

.blog-card__cover {
  aspect-ratio: 16 / 9;
  background: #f1f5f9;
  overflow: hidden;
}

.blog-card__cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.4s ease;
}

.blog-card:hover .blog-card__cover img {
  transform: scale(1.04);
}

.blog-card__cover-placeholder {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, #16a34a 0%, #047857 100%);
  color: rgba(255, 255, 255, 0.85);
  font-weight: 700;
  font-size: 22px;
  letter-spacing: 1px;
}

.blog-card__body {
  padding: 22px 22px 24px;
  display: flex;
  flex-direction: column;
  flex: 1;
  gap: 10px;
}

.blog-card__tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.blog-card__tag {
  font-size: 12px;
  font-weight: 600;
  color: #15803d;
  background: rgba(2, 188, 77, 0.08);
  padding: 3px 10px;
  border-radius: 999px;
}

.blog-card__title {
  font-family: Montserrat, sans-serif;
  font-size: 20px;
  font-weight: 700;
  line-height: 1.3;
  color: #0f172a;
  margin: 4px 0 0;
}

.blog-card__excerpt {
  font-size: 15px;
  line-height: 1.55;
  color: #64748b;
  flex: 1;
}

.blog-card__meta {
  display: flex;
  gap: 12px;
  font-size: 13px;
  color: #94a3b8;
  margin-top: 6px;
  padding-top: 14px;
  border-top: 1px solid #f1f5f9;
}

.blog-empty {
  text-align: center;
  padding: 60px 24px;
  color: #64748b;
  background: #f8fafc;
  border-radius: 16px;
}

.blog-pagination {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 24px;
  margin-top: 56px;
  font-size: 15px;
}

.blog-pagination__link {
  color: #15803d;
  font-weight: 600;
  text-decoration: none;
}
.blog-pagination__link:hover { text-decoration: underline; }
.blog-pagination__current { color: #64748b; }

/* ---- Article ---- */

.blog-article {
  max-width: 760px;
  margin: 0 auto;
}

.blog-article__back {
  margin-bottom: 16px;
}
.blog-article__back a {
  color: #15803d;
  font-weight: 600;
  text-decoration: none;
}
.blog-article__back a:hover { text-decoration: underline; }

.blog-article__tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 16px;
}

.blog-article__tag {
  font-size: 13px;
  font-weight: 600;
  color: #15803d;
  background: rgba(2, 188, 77, 0.08);
  padding: 4px 12px;
  border-radius: 999px;
  text-decoration: none;
}
.blog-article__tag:hover { background: rgba(2, 188, 77, 0.16); }

.blog-article__title {
  font-family: Montserrat, sans-serif;
  font-size: clamp(28px, 4.5vw, 44px);
  font-weight: 800;
  line-height: 1.2;
  color: #0f172a;
  margin: 0 0 16px;
}

.blog-article__meta {
  display: flex;
  gap: 16px;
  font-size: 14px;
  color: #64748b;
  margin-bottom: 32px;
  padding-bottom: 24px;
  border-bottom: 1px solid #e2e8f0;
}

.blog-article__author { font-weight: 600; color: #475569; }

.blog-article__cover {
  margin: 0 0 36px;
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 12px 32px -12px rgba(15, 23, 42, 0.18);
}
.blog-article__cover img {
  width: 100%;
  height: auto;
  display: block;
}

.blog-article__content { font-size: 17px; line-height: 1.75; color: #1e293b; }
.blog-article__content > * + * { margin-top: 18px; }
.blog-article__content h2 {
  font-family: Montserrat, sans-serif;
  font-size: 28px;
  font-weight: 800;
  margin: 40px 0 16px;
  line-height: 1.25;
  color: #0f172a;
}
.blog-article__content h3 {
  font-family: Montserrat, sans-serif;
  font-size: 22px;
  font-weight: 700;
  margin: 32px 0 12px;
  line-height: 1.3;
  color: #0f172a;
}
.blog-article__content p { margin: 0 0 18px; }
.blog-article__content ul,
.blog-article__content ol { padding-left: 24px; margin: 0 0 18px; }
.blog-article__content li { margin-bottom: 8px; }
.blog-article__content a {
  color: #15803d;
  text-decoration: underline;
  text-decoration-thickness: 1.5px;
  text-underline-offset: 3px;
}
.blog-article__content a:hover { color: #047857; }
.blog-article__content blockquote {
  margin: 24px 0;
  padding: 16px 24px;
  border-left: 4px solid #16a34a;
  background: #f0fdf4;
  border-radius: 8px;
  color: #475569;
  font-style: italic;
}
.blog-article__content code {
  background: #f1f5f9;
  padding: 2px 8px;
  border-radius: 4px;
  font-size: 0.92em;
  color: #b91c1c;
}
.blog-article__content pre {
  background: #0f172a;
  color: #f1f5f9;
  padding: 16px 20px;
  border-radius: 10px;
  overflow-x: auto;
  font-size: 14px;
  line-height: 1.6;
}
.blog-article__content pre code {
  background: transparent;
  color: inherit;
  padding: 0;
}
.blog-article__content img {
  max-width: 100%;
  height: auto;
  border-radius: 12px;
  margin: 8px 0;
  display: block;
}

.blog-article__footer {
  margin-top: 56px;
  padding-top: 28px;
  border-top: 1px solid #e2e8f0;
  text-align: center;
}

@media (max-width: 600px) {
  .blog-main { padding: 56px 0 72px; }
  .blog-grid { gap: 20px; }
  .blog-article__title { font-size: 28px; }
  .blog-article__content { font-size: 16px; }
}
