/* ============================
   BLOG — HERO left aligned + controls
   ✅ NO BLUR
   ✅ Separate background for Desktop / Mobile
   ✅ Optional dim + gradient overlay (controlled by vars)
   ============================ */

.blog-main {
  padding-top: var(--blog-top-pad, 80px);
}

/* HERO */
.blog-hero {
  position: relative;
  overflow: hidden;
  isolation: isolate; /* ✅ щоб шари не “змішувались” із зовнішніми */

  /* spacing */
  --hero-pad-y: 72px;
  --hero-pad-x: 0px;
  --hero-max: 980px;
  --hero-gap: 14px;
  --hero-align: left;

  /* typography */
  --hero-title-min: 30px;
  --hero-title-pref: 3.2vw;
  --hero-title-max: 52px;

  --hero-text-min: 15px;
  --hero-text-pref: 1.2vw;
  --hero-text-max: 20px;

  /* ✅ backgrounds (desktop + mobile) */
  --hero-bg-desktop: url("/assets/img/blog/fon_blog16-6.webp");
  --hero-bg-mobile: url("/assets/img/blog/fon_blog16-12_mob.webp");

  /* image controls */
  --hero-bg-pos: center;
  --hero-bg-size: cover;
  --hero-bg-opacity: 0.70; /* 0..1 */

  /* overlay controls (NO blur) */
  --hero-dim: 0.10;              /* 0..1  (darken whole hero) */
  --hero-overlay-strength: 0.55;  /* 0..1  (tint/whiten overlay strength) */

  padding: var(--hero-pad-y) var(--hero-pad-x);
  text-align: var(--hero-align);

  /* ✅ не ставимо background тут, щоб не перебивати .blog-hero-bg */
  background: transparent;
}

/* ✅ image layer */
.blog-hero-bg {
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;

  background-image: var(--hero-bg-desktop);
  background-position: var(--hero-bg-pos);
  background-size: var(--hero-bg-size);
  background-repeat: no-repeat;

  opacity: var(--hero-bg-opacity);
  transform: scale(1.04);
}

/* ✅ overlay layer (no blur) */
.blog-hero-overlay {
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;

  /* LIMPI tint (регулюється --hero-overlay-strength) */
  background: linear-gradient(
    135deg,
    rgba(186, 230, 253, var(--hero-overlay-strength)) 0%,
    rgba(255, 255, 255, calc(var(--hero-overlay-strength) * 0.72)) 60%,
    rgba(255, 255, 255, calc(var(--hero-overlay-strength) * 0.50)) 100%
  );

  /* optional dim */
  box-shadow: inset 0 0 0 9999px rgba(2, 6, 23, var(--hero-dim));
}

/* content on top */
.blog-hero .container,
.blog-hero-inner {
  position: relative;
  z-index: 2;
  flex-direction: column;
  align-items: flex-start;
}

/* Title */
.blog-hero-title {
  font-family: var(--font-display);
  font-size: clamp(var(--hero-title-min), var(--hero-title-pref), var(--hero-title-max));
  font-weight: 800;
  color: hsl(215 25% 27%);
  line-height: 1.1;
  max-width: var(--hero-max);
  margin: 0 0 calc(var(--hero-gap) + 2px) 0;
}

/* Subtitle */
.blog-hero-subtitle {
  font-size: clamp(var(--hero-text-min), var(--hero-text-pref), var(--hero-text-max));
  color: hsl(215, 93%, 18%);
  line-height: 1.6;
  max-width: var(--hero-max);
  margin: 0 0 var(--hero-gap) 0;
}
.blog-hero-subtitle:last-of-type { margin-bottom: 0; }

/* CONTENT */
.blog-content { padding: 4rem 0; }

.blog-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2rem;
  margin-bottom: 4rem;
}

/* CARDS (як було) */
.blog-card {
  display: block;
  text-decoration: none;
  color: inherit;
  background: #fff;
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: 0 4px 6px -1px rgb(0 0 0 / 0.1);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  border: 1px solid hsl(214 32% 91%);
  cursor: pointer;
}
.blog-card:hover { transform: translateY(-4px); box-shadow: 0 20px 25px -5px rgb(0 0 0 / 0.1); }
.blog-card:hover .blog-card-title { color: hsl(195 100% 40%); }

.blog-card-image { aspect-ratio: 16/10; overflow: hidden; }
.blog-card-image img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.3s ease; }
.blog-card:hover .blog-card-image img { transform: scale(1.05); }

.blog-card-content { padding: 1.5rem; }

.blog-card-category {
  display: inline-block;
  background: hsl(195 100% 95%);
  color: hsl(195 100% 40%);
  font-size: 0.75rem;
  font-weight: 600;
  padding: 0.25rem 0.75rem;
  border-radius: 9999px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 0.75rem;
}

.blog-card-title {
  font-family: var(--font-display);
  font-size: 1.25rem;
  font-weight: 700;
  color: hsl(215 25% 27%);
  margin-bottom: 0.75rem;
  line-height: 1.3;
}

.blog-card-excerpt {
  font-size: 0.95rem;
  color: hsl(215 16% 47%);
  margin-bottom: 1rem;
  line-height: 1.6;
}

.blog-card-meta { font-size: 0.85rem; color: hsl(215 16% 60%); }

/* CTA */
.blog-cta {
  background: linear-gradient(135deg, hsl(215 25% 15%) 0%, hsl(215 25% 20%) 100%);
  padding: 3rem;
  border-radius: var(--radius-lg);
  text-align: center;
  margin-top: 3rem;
}
.blog-cta h3 {
  font-family: var(--font-display);
  font-size: 1.75rem;
  font-weight: 700;
  color: #fff;
  margin-bottom: 1rem;
}
.blog-cta p {
  font-size: 1.1rem;
  color: hsl(215 20% 70%);
  margin-bottom: 1.5rem;
  max-width: 500px;
  margin-left: auto;
  margin-right: auto;
}
/* ============================
   BLOG — FULL ARTICLE BLOCK
   (moved into main styles)
   + top spacing min 50px
   ============================ */

.blog-article-full{
  max-width: 800px;
  margin: 0 auto 4rem;
  margin-top: 100px;            /* ✅ top spacing min 50px */
  padding: 3rem;

  background: #fff;
  border-radius: var(--radius-lg);
  box-shadow: 0 4px 6px -1px rgb(0 0 0 / 0.1);
  border: 1px solid hsl(214 32% 91%);
}

.blog-article-full h2{
  font-family: var(--font-display);
  font-size: 2rem;
  font-weight: 700;
  color: hsl(215 25% 27%);

  margin-bottom: 1.5rem;
  padding-bottom: 1rem;
  border-bottom: 2px solid hsl(195 100% 50%);
}

.blog-article-full h3{
  font-family: var(--font-display);
  font-size: 1.35rem;
  font-weight: 600;
  color: hsl(215 25% 27%);

  margin: 2rem 0 1rem;
}

.blog-article-full p{
  font-size: 1.05rem;
  color: hsl(215 20% 35%);
  line-height: 1.8;
  margin-bottom: 1rem;
}

.blog-article-full ul,
.blog-article-full ol{
  margin: 1rem 0 1.5rem 1.5rem;
  color: hsl(215 20% 35%);
}

.blog-article-full li{
  font-size: 1.05rem;
  line-height: 1.8;
  margin-bottom: 0.5rem;
}

.blog-article-full ol{ list-style-type: decimal; }
.blog-article-full ul{ list-style-type: disc; }

/* Tip box */
.tip-box{
  background: hsl(195 100% 95%);
  border-left: 4px solid hsl(195 100% 50%);
  padding: 1.25rem 1.5rem;
  border-radius: 0 var(--radius) var(--radius) 0;
  margin: 1.5rem 0;
  font-style: italic;
}

/* Mobile */
@media (max-width: 768px){
  .blog-article-full{
    padding: 1.5rem;
    margin: 0 1rem 3rem;
    margin-top: 100px;          /* ✅ keep min top spacing on mobile too */
  }

  .blog-article-full h2{ font-size: 1.5rem; }
  .blog-article-full h3{ font-size: 1.2rem; }
}

/* Responsive */
@media (max-width: 1024px) {
  .blog-grid { grid-template-columns: repeat(2, 1fr); }
  .blog-hero { --hero-pad-y: 56px; --hero-max: 900px; }
}

@media (max-width: 768px) {
  /* ✅ switch to mobile background */
  .blog-hero-bg { background-image: var(--hero-bg-mobile); }

  .blog-hero {
    --hero-pad-y: 44px;
    --hero-gap: 12px;
    --hero-title-min: 26px;
    --hero-title-max: 36px;
    --hero-text-min: 14px;
    --hero-text-max: 17px;

    /* optional mobile tuning */
    --hero-bg-opacity: 0.7;
    --hero-overlay-strength: 0.48;
    --hero-dim: 0.08;
  }

  .blog-grid { grid-template-columns: 1fr; }

  .blog-cta { padding: 2rem 1.5rem; }
  .blog-cta h3 { font-size: 1.5rem; }
}
