/* ============================================================
   LEDiMedia-lohkot: Kuva + teksti ja Valmis lohko
   Ladataan block.json:n "style"-kentällä sekä sivulle että
   editoriin. Lohkot toimivat millä tahansa sivulla, eivät vain
   referensseissä.
   Full-bleed-tausta: box-shadow + clip-path (ei vaakavieritystä).
   ============================================================ */

/* ── KUVA + TEKSTI ─────────────────────────────────────────── */
.lm-kt {
  max-width: 1200px;
  margin: 0 auto;
  padding: clamp(3rem, 6vw, 5rem) 0;
  font-family: var(--basefont, 'Zalando Sans', sans-serif);
}
.lm-kt__inner {
  display: flex;
  align-items: center;
  gap: clamp(2rem, 5vw, 5rem);
}
.lm-kt.is-reversed .lm-kt__inner { flex-direction: row-reverse; }
.lm-kt__media, .lm-kt__text { flex: 1 1 0; min-width: 0; }
.lm-kt.is-text-only .lm-kt__text { max-width: 760px; margin: 0 auto; }

.lm-kt__media :where(img, video) {
  display: block;
  width: 100%;
  height: auto;
  border-radius: 6px;
  box-shadow: 0 20px 50px rgba(1, 27, 47, 0.15);
}

.lm-kt__eyebrow {
  margin: 0 0 1rem;
  color: #011B2F;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  line-height: 1.3;
}
.lm-kt__title {
  margin: 0 0 1.5rem;
  color: #011B2F;
  font-size: clamp(1.625rem, 3vw, 2.375rem);
  font-weight: 700;
  line-height: 1.15;
  letter-spacing: -0.02em;
}
.lm-kt__title::after {
  content: '';
  display: block;
  width: 3rem;
  height: 3px;
  margin-top: 1rem;
  background: #FFB915;
}
.lm-kt__body p {
  margin: 0 0 1.1em;
  color: rgba(1, 27, 47, 0.8);
  font-size: 1.0625rem;
  font-weight: 300;
  line-height: 1.8;
}
.lm-kt__body > :last-child { margin-bottom: 0; }
.lm-kt__body ul { margin: 0 0 1.1em; padding-left: 1.25em; line-height: 1.8; }

/* harmaa tausta */
.lm-kt.is-tinted {
  background: #F3F5F7;
  box-shadow: 0 0 0 100vmax #F3F5F7;
  clip-path: inset(0 -100vmax);
}

/* navy (Valmis lohko: tuotenostot, esim. Areno, LEDiMediaCloud) */
.lm-kt.is-navy {
  background: #011B2F;
  box-shadow: 0 0 0 100vmax #011B2F;
  clip-path: inset(0 -100vmax);
}
.lm-kt.is-navy .lm-kt__eyebrow { color: #FFD358; }
.lm-kt.is-navy .lm-kt__title { color: #fff; }
.lm-kt.is-navy .lm-kt__body p,
.lm-kt.is-navy .lm-kt__body li { color: rgba(255, 255, 255, 0.78); }
.lm-kt.is-navy .lm-kt__body a { color: #FFD358; }
.lm-kt.is-navy .lm-kt__media :where(img, video) { box-shadow: 0 24px 60px rgba(0, 0, 0, 0.35); }

/* ── YHTEYDENOTTOKORTTI ──────────────────────────────────────
   Neutraali vaalea kortti: teksti vasemmalla, kultainen perusnappi
   + tekstilinkki oikealla; mobiilissa allekkain.                   */
.lm-yhteys {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: clamp(2rem, 5vw, 5rem);
  align-items: center;
  max-width: 1200px;
  margin: clamp(3rem, 6vw, 5rem) auto;
  padding: clamp(2.5rem, 5vw, 4.5rem);
  box-sizing: border-box;
  border-radius: 8px;
  background: #F3F5F7;
  font-family: var(--basefont, 'Zalando Sans', sans-serif);
}
.lm-yhteys__eyebrow {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin: 0 0 1.25rem;
  color: #011B2F;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  line-height: 1;
}
.lm-yhteys__eyebrow::before { content: ''; width: 2rem; height: 2px; background: #FFB915; }
.lm-yhteys__title {
  margin: 0 0 1rem;
  color: #011B2F;
  font-size: clamp(1.625rem, 3vw, 2.25rem);
  font-weight: 700;
  line-height: 1.15;
  letter-spacing: -0.02em;
}
.lm-yhteys__body { max-width: 540px; }
.lm-yhteys__body p {
  margin: 0 0 1em;
  color: rgba(1, 27, 47, 0.8);
  font-size: 1.0625rem;
  font-weight: 400;
  line-height: 1.7;
}
.lm-yhteys__body > :last-child { margin-bottom: 0; }
.lm-yhteys__body a { color: #011B2F; }

/* ── PAINIKKEET ────────────────────────────────────────────────
   Primary = sivuston globaali kultapilleri (a.wp-block-button__link).
   Ghost-muunnelmat tarvitsevat !importantin, koska globaali
   painikesääntö käyttää sitä.                                     */
.lm-kt__actions, .lm-yhteys__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-top: 2rem;
}
.lm-yhteys__actions { margin-top: 0; align-items: center; justify-content: flex-end; gap: 0.5rem 1.5rem; }

/* toinen nappi tekstilinkkinä */
.lm-yhteys a.lm-btn--ghost {
  padding-left: 0 !important;
  padding-right: 0 !important;
  background: transparent !important;
  color: #011B2F !important;
  box-shadow: none !important;
}
.lm-yhteys a.lm-btn--ghost::after {
  content: '→';
  display: inline-block;
  margin-left: 0.5rem;
  transition: transform 0.22s cubic-bezier(0.22, 1, 0.36, 1);
}
.lm-yhteys a.lm-btn--ghost:hover { transform: none !important; box-shadow: none !important; background: transparent !important; }
.lm-yhteys a.lm-btn--ghost:hover::after { transform: translateX(4px); }
.lm-kt__actions a.wp-block-button__link,
.lm-yhteys__actions a.wp-block-button__link { margin: 0; text-decoration: none; }

/* ghost tummalla pohjalla */
.lm-kt.is-navy a.lm-btn--ghost {
  background: rgba(255, 255, 255, 0.07) !important;
  color: #fff !important;
  border: 1.5px solid rgba(255, 255, 255, 0.45) !important;
  box-shadow: none !important;
}
.lm-kt.is-navy a.lm-btn--ghost:hover { background: rgba(255, 255, 255, 0.14) !important; border-color: #fff !important; color: #fff !important; }

/* ghost vaalealla pohjalla */
.lm-kt:not(.is-navy) a.lm-btn--ghost {
  background: transparent !important;
  color: #011B2F !important;
  border: 1.5px solid rgba(1, 27, 47, 0.3) !important;
  box-shadow: none !important;
}
.lm-kt:not(.is-navy) a.lm-btn--ghost:hover { background: rgba(1, 27, 47, 0.05) !important; border-color: #011B2F !important; }

/* ── TAVALLISET SIVUT ──────────────────────────────────────────
   Sivuilla (.page) sisältöalueella ei ole reunuksia, joten
   annetaan lohkoille omat.                                        */
.page .lm-kt__inner { padding: 0 var(--pagepadding, 4%); }
.page .lm-yhteys { margin-left: var(--pagepadding, 4%); margin-right: var(--pagepadding, 4%); }
@media (min-width: 1300px) {
  .page .lm-yhteys { margin-left: auto; margin-right: auto; }
}

/* ── BLOGIARTIKKELI ────────────────────────────────────────────
   Kortti artikkelin lopussa (inc/referenssit-lohkot.php). Palsta on
   kapea (~800px), joten napit tekstin alle. Ohitetaan .single-post
   .entry-content h2/p -välit (main.css), jotka ovat tarkempia.      */
.single-post .entry-content .lm-yhteys {
  grid-template-columns: 1fr;
  gap: 1.75rem;
  margin: clamp(2.5rem, 5vw, 4rem) 0 0;
  padding: clamp(2rem, 4vw, 3rem);
}
.single-post .entry-content .lm-yhteys__actions { justify-content: flex-start; }
.single-post .entry-content .lm-yhteys__eyebrow { margin: 0 0 1.25rem; }
.single-post .entry-content .lm-yhteys__title { margin: 0 0 1rem; }
.single-post .entry-content .lm-yhteys__body p { margin: 0 0 1em; }
.single-post .entry-content .lm-yhteys__body > :last-child { margin-bottom: 0; }

/* ── EDITORI ──────────────────────────────────────────────── */
.acf-block-preview .lm-kt { box-shadow: none; clip-path: none; padding-left: 2rem; padding-right: 2rem; }
.lm-lohko-placeholder {
  margin: 0;
  padding: 1.5rem;
  border: 2px dashed rgba(1, 27, 47, 0.25);
  border-radius: 6px;
  color: rgba(1, 27, 47, 0.7);
  font-size: 0.9375rem;
  text-align: center;
}

/* ── MOBIILI ──────────────────────────────────────────────── */
@media (max-width: 781px) {
  .lm-kt__inner,
  .lm-kt.is-reversed .lm-kt__inner { flex-direction: column; align-items: stretch; }
  .lm-yhteys { grid-template-columns: 1fr; }
  .lm-yhteys__actions { justify-content: flex-start; }
  .lm-kt__actions a.wp-block-button__link,
  .lm-yhteys__actions a.wp-block-button__link { width: 100%; box-sizing: border-box; text-align: center; }
}
