/* Homepage blog: Kasulikku lugemist (up) + Veel artikleid (down).
 * White image surface only. Keep ≲15KB FTP. */

/* Shared head / CTA */
body#index .hl-home-blog2__head,
body#index .hl-home-blog-featured__head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 0.5rem 1rem;
  margin: 0 0 0.55rem;
}

body#index .hl-home-blog2__more {
  margin: 0;
  white-space: nowrap;
  font-size: 0.8125rem;
  font-weight: 600;
}

body#index .hl-home-blog2__more a {
  color: var(--hl-red, #d71920) !important;
  text-decoration: none !important;
}

body#index .hl-home-blog2__more a:hover {
  text-decoration: underline !important;
  text-underline-offset: 2px;
}

body#index .hl-home-blog2__label {
  margin: 0;
  font-size: 0.6875rem;
  font-weight: 600;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  color: #9ca3af;
}

body#index .hl-home-blog2__date {
  display: block;
  margin: 0;
  font-size: 0.75rem;
  line-height: 1.3;
  color: #9ca3af;
}

body#index .hl-home-blog2__cta {
  display: inline-flex;
  align-items: center;
  gap: 0.2rem;
  margin-top: 0.4rem;
  padding: 0;
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--hl-red, #d71920) !important;
  text-decoration: none !important;
}

body#index .hl-home-blog2__cta-arrow {
  display: inline-block;
  transition: transform 160ms ease;
}

/* ——— Kasulikku lugemist (after Categories) ——— */
body#index .hl-home-blog-featured {
  margin: 0.35rem 0 1.5rem;
}

body#index .hl-home-blog-featured__link {
  display: grid;
  grid-template-columns: minmax(0, 0.34fr) minmax(0, 0.66fr);
  align-items: stretch;
  min-height: 160px;
  max-height: 180px;
  text-decoration: none !important;
  color: inherit;
  background: #fff;
  border: 1px solid #e6e9ee;
  border-radius: 8px;
  overflow: hidden;
  transition: border-color 0.15s ease;
}

body#index .hl-home-blog-featured__link:hover {
  border-color: #d0d4db;
}

body#index .hl-home-blog-featured__link:focus-visible {
  outline: 2px solid var(--hl-red, #d71920);
  outline-offset: 2px;
}

body#index .hl-home-blog-featured__media {
  display: flex;
  align-items: center;
  justify-content: center;
  min-width: 0;
  height: 100%;
  min-height: 160px;
  max-height: 180px;
  padding: 0;
  background: #fff;
  box-sizing: border-box;
  overflow: hidden;
}

body#index .hl-home-blog-featured__media img {
  display: block;
  width: 100% !important;
  height: 100% !important;
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  object-position: center;
  transform: none !important;
  border: 0;
  box-shadow: none;
}

body#index .hl-home-blog-featured__body {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 0.28rem;
  min-width: 0;
  padding: 0.7rem 1rem 0.75rem 0.85rem;
  box-sizing: border-box;
}

body#index .hl-home-blog-featured__title {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  margin: 0;
  font-family: Mulish, "Segoe UI", sans-serif;
  font-size: clamp(1.05rem, 0.95rem + 0.35vw, 1.25rem); /* ~17–20px */
  font-weight: 600;
  line-height: 1.18;
  letter-spacing: -0.015em;
  color: #111827;
}

body#index .hl-home-blog-featured__link:hover .hl-home-blog-featured__title {
  color: var(--hl-red, #d71920);
}

body#index .hl-home-blog-featured__excerpt {
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
  margin: 0.1rem 0 0;
  font-size: 0.84375rem; /* ~13.5px */
  line-height: 1.45;
  color: #4b5563;
}

/* Desktop micro-tune: pull featured ~15–25px higher + slightly larger product visual */
@media (min-width: 992px) {
  body#index .hl-home-quick {
    margin-bottom: 1rem !important; /* 24px → 16px */
    padding-bottom: 0.7rem !important; /* 16px → ~11px */
  }
  body#index .hl-home-blog-featured {
    margin: 0.12rem 0 1.4rem; /* bottom ~22px before Uued */
  }
  body#index .hl-home-blog-featured__head {
    margin-bottom: 0.5rem; /* 8px heading → card */
  }
  body#index .hl-home-blog-featured__link {
    min-height: 165px;
    max-height: 185px;
  }
  body#index .hl-home-blog-featured__media {
    min-height: 165px;
    max-height: 185px;
  }
  /* Equal hlc3 canvases — display 1:1 */
  body#index .hl-home-blog-featured__media img {
    width: 100% !important;
    height: 100% !important;
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    object-position: center;
    transform: none !important;
  }
  body#index .hl-home-blog-featured__body {
    gap: 0.22rem;
    padding: 0.55rem 0.95rem 0.55rem 0.8rem;
  }
  body#index .hl-home-blog-featured__excerpt {
    margin: 0.15rem 0 0;
  }
  body#index .hl-home-blog-featured__link .hl-home-blog2__cta {
    margin-top: 0.35rem;
  }
}

body#index .hl-home-blog-featured__link:hover .hl-home-blog2__cta-arrow,
body#index .hl-home-blog2__card:hover .hl-home-blog2__cta-arrow {
  transform: translateX(2px);
}

/* ——— Veel artikleid ——— */
body#index .hl-home-blog2 {
  margin: 0 0 1.25rem;
}

body#index .hl-home-blog2__grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.7rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

body#index .hl-home-blog2__item {
  display: flex;
  min-width: 0;
}

/* Mini featured: image left + text right (same language as Kasulikku lugemist) */
body#index .hl-home-blog2__card {
  display: grid !important;
  grid-template-columns: minmax(0, 0.44fr) minmax(0, 0.56fr);
  align-items: stretch;
  width: 100%;
  height: 100%;
  min-height: 150px;
  max-height: 168px;
  text-decoration: none !important;
  color: inherit;
  background: #fff !important;
  border: 1px solid #e6e9ee !important;
  border-radius: 8px !important;
  overflow: hidden;
  box-shadow: none !important;
  transform: none !important;
  transition: border-color 0.15s ease;
}

body#index .hl-home-blog2__card:hover {
  border-color: #d0d4db !important;
  box-shadow: none !important;
  transform: none !important;
}

body#index .hl-home-blog2__card:focus-visible {
  outline: 2px solid var(--hl-red, #d71920);
  outline-offset: 2px;
}

body#index .hl-home-blog2__media {
  position: relative;
  display: flex !important;
  align-items: center;
  justify-content: center;
  min-width: 0;
  width: 100%;
  height: 100%;
  min-height: 150px;
  max-height: 168px;
  padding: 0 !important;
  margin: 0;
  background: #fff !important;
  border: 0 !important;
  border-radius: 0 !important;
  box-sizing: border-box;
  overflow: hidden;
}

body#index .hl-home-blog2__media img,
body#index .hl-home-blog2__media--cover img {
  display: block;
  width: 100% !important;
  height: 100% !important;
  max-width: 100% !important;
  max-height: 100% !important;
  object-fit: contain !important;
  object-position: center;
  /* Equal hlc3 canvases — no CSS scale (scale made uneven sources worse) */
  transform: none !important;
  border: 0;
  box-shadow: none;
}

body#index .hl-home-blog2__body {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 0.16rem;
  min-width: 0;
  min-height: 0;
  padding: 0.55rem 0.65rem 0.55rem 0.55rem !important;
  box-sizing: border-box;
  overflow: hidden;
}

body#index .hl-home-blog2__title {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  margin: 0 !important;
  padding: 0;
  font-family: Mulish, "Segoe UI", sans-serif;
  font-size: 0.875rem; /* 14px */
  font-weight: 600;
  line-height: 1.22;
  color: #111827;
}

body#index .hl-home-blog2__card:hover .hl-home-blog2__title {
  color: var(--hl-red, #d71920);
}

body#index .hl-home-blog2__excerpt {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  margin: 0;
  font-size: 0.75rem; /* 12px */
  line-height: 1.35;
  color: #6b7280;
}

body#index .hl-home-blog2__card .hl-home-blog2__cta {
  margin-top: 0.2rem;
  padding-top: 0;
  font-size: 0.75rem;
}

body#index .hl-home-blog2__card .hl-home-blog2__date {
  font-size: 0.6875rem;
}

@media (prefers-reduced-motion: reduce) {
  body#index .hl-home-blog2__cta-arrow { transition: none; }
  body#index .hl-home-blog-featured__link:hover .hl-home-blog2__cta-arrow,
  body#index .hl-home-blog2__card:hover .hl-home-blog2__cta-arrow { transform: none; }
}

/* Tablet */
@media (min-width: 768px) and (max-width: 1023.98px) {
  body#index .hl-home-blog-featured__link {
    grid-template-columns: minmax(0, 0.32fr) minmax(0, 0.68fr);
    min-height: 150px;
    max-height: 170px;
  }
  body#index .hl-home-blog-featured__media {
    min-height: 150px;
    max-height: 170px;
  }
  body#index .hl-home-blog-featured__excerpt {
    -webkit-line-clamp: 2;
  }
  body#index .hl-home-blog2__grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  body#index .hl-home-blog2__item:last-child:nth-child(odd) {
    grid-column: 1 / -1;
    max-width: 50%;
  }
  body#index .hl-home-blog2__card {
    min-height: 140px;
    max-height: 158px;
  }
  body#index .hl-home-blog2__media {
    min-height: 140px;
    max-height: 158px;
  }
}

/* Mobile */
@media (max-width: 767.98px) {
  body#index .hl-home-blog-featured {
    margin: 0.15rem 0 1.1rem;
  }
  body#index .hl-home-blog2__head,
  body#index .hl-home-blog-featured__head {
    flex-direction: column;
    align-items: flex-start;
    margin-bottom: 0.5rem;
  }
  body#index .hl-home-blog-featured__link {
    display: flex;
    flex-direction: column;
    min-height: 0;
    max-height: none;
  }
  body#index .hl-home-blog-featured__media {
    width: 100%;
    height: 220px;
    min-height: 220px;
    max-height: 240px;
  }
  body#index .hl-home-blog-featured__body {
    padding: 0.65rem 0.75rem 0.75rem;
    gap: 0.22rem;
  }
  body#index .hl-home-blog-featured__title {
    font-size: 1.05rem;
    -webkit-line-clamp: 2;
  }
  body#index .hl-home-blog-featured__excerpt {
    -webkit-line-clamp: 2;
    font-size: 0.8125rem;
  }
  body#index .hl-home-blog2 {
    margin: 0 0 1rem;
  }
  body#index .hl-home-blog2__grid {
    grid-template-columns: 1fr;
    gap: 0.55rem;
  }
  body#index .hl-home-blog2__item:last-child:nth-child(odd) {
    max-width: none;
    grid-column: auto;
  }
  body#index .hl-home-blog2__card {
    grid-template-columns: 128px minmax(0, 1fr) !important;
    min-height: 120px;
    max-height: none;
  }
  body#index .hl-home-blog2__media {
    width: 128px !important;
    min-height: 120px !important;
    max-height: none !important;
    height: 100% !important;
  }
  body#index .hl-home-blog2__media img,
  body#index .hl-home-blog2__media--cover img {
    transform: none !important;
  }
  body#index .hl-home-blog2__body {
    padding: 0.5rem 0.6rem !important;
  }
  body#index .hl-home-blog2__title {
    font-size: 0.8125rem;
  }
  body#index .hl-home-blog2__excerpt {
    -webkit-line-clamp: 1;
    font-size: 0.71875rem;
  }
}
