/* Vegvísir (inc/vegvisir.php): cards, numbered steps, example sentences as speech bubbles, illustrations beside the text.
   Uses the theme's colours (--fh-*) and the classes fh-vv-* set on ordinary blocks, so the office can edit the page. */

/* a section's opening: the illustration floats beside the first paragraphs on wide screens */
.fh-efni .fh-vv-kafli { display: flow-root; }
.fh-efni .fh-vv-kafli > * + * { margin-top: 1em; }
.fh-efni .fh-vv-mynd { float: right; width: min(42%, 300px); margin: 4px 0 18px 32px !important; }
.fh-efni .fh-vv-mynd img { display: block; width: 100%; height: auto; aspect-ratio: 1; object-fit: cover; border-radius: 24px; }
@media (max-width: 640px) {
  .fh-efni .fh-vv-mynd { float: none; width: 100%; max-width: 420px; margin: 0 auto 18px !important; }
}

/* the four kinds of change in an ordinary teenager: a two-column grid of pale cards */
.fh-efni .fh-vv-spjold { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; margin-top: 18px !important; }
.fh-efni .fh-vv-spjald, .fh-efni .fh-vv-merki, .fh-efni .fh-vv-skref { border-radius: 20px; padding: 22px 24px !important; }
.fh-efni .fh-vv-spjald { background: var(--fh-fol); }
.fh-efni .fh-vv-spjold > * { margin: 0 !important; }
@media (max-width: 700px) { .fh-efni .fh-vv-spjold { grid-template-columns: minmax(0, 1fr); } }

/* headings and lists inside the cards and steps */
.fh-efni :is(.fh-vv-spjald, .fh-vv-merki, .fh-vv-skref) > :first-child { margin-top: 0 !important; }
.fh-efni :is(.fh-vv-spjald, .fh-vv-merki, .fh-vv-skref) h3 { font-size: 22px; line-height: 1.25; margin: 0 0 10px !important; }
.fh-efni :is(.fh-vv-spjald, .fh-vv-merki, .fh-vv-skref) ul { margin: 0 !important; }
.fh-efni :is(.fh-vv-spjald, .fh-vv-merki, .fh-vv-skref) li { font-size: 16.5px; line-height: 1.55; }
.fh-efni :is(.fh-vv-spjald, .fh-vv-merki, .fh-vv-skref) li + li { margin-top: 6px; }
.fh-efni :is(.fh-vv-spjald, .fh-vv-merki, .fh-vv-skref) strong { color: var(--fh-blek); }

/* the signs: white cards with a thin line, one under another */
.fh-efni .fh-vv-merki { background: #fff; border: 1px solid var(--fh-lin); }
.fh-efni .fh-vv-merki + .fh-vv-merki { margin-top: 14px !important; }

/* a point the text wants to land: a soft pink box */
.fh-efni .fh-vv-aherslur { background: var(--fh-bleik-l); border-radius: 18px; padding: 18px 22px; color: var(--fh-blek); font-size: 18px; line-height: 1.55; margin-top: 22px !important; }

/* numbered steps (Að eiga samtalið, the reasons): the numbers come from the order, so steps can be added or moved */
.fh-efni .fh-vv-skrefin { counter-reset: vv; display: grid; gap: 14px; margin-top: 18px !important; }
.fh-efni .fh-vv-skrefin > * { margin: 0 !important; }
.fh-efni .fh-vv-skref { counter-increment: vv; background: var(--fh-fol); position: relative; padding-left: 76px !important; }
.fh-efni .fh-vv-skref::before { content: counter(vv); position: absolute; left: 22px; top: 20px; width: 38px; height: 38px; border-radius: 50%;
  display: grid; place-items: center; background: var(--fh-blar); color: #fff; font: 600 19px/1 Faustina, serif; }
@media (max-width: 560px) {
  .fh-efni .fh-vv-skref { padding: 20px !important; }
  .fh-efni .fh-vv-skref::before { position: static; margin-bottom: 10px; }
}

/* example sentences: speech bubbles, as a parent would say them */
.fh-efni .fh-vv-daemi { font-weight: 700; color: var(--fh-blek); margin: 16px 0 8px !important; font-size: 16.5px; }
.fh-efni ul.fh-vv-setningar { display: grid; gap: 10px; margin: 0 !important; }
.fh-efni ul.fh-vv-setningar > li { padding: 14px 18px !important; background: #fff; border: 1px solid var(--fh-lin); border-radius: 20px 20px 20px 6px;
  font: italic 500 18px/1.5 Faustina, serif; color: var(--fh-blek); max-width: 94%; }
.fh-efni ul.fh-vv-setningar > li::before { content: none !important; }

/* contact at the end of the conversation steps */
.fh-efni .fh-vv-samband { margin-top: 22px !important; }
.fh-efni .fh-vv-samband p { margin: 0 !important; }
.fh-efni .fh-vv-samband p + p { margin-top: 8px !important; }
.fh-efni .fh-vv-samband a { font-weight: 600; }

@media print {
  .fh-efni .fh-vv-mynd { width: 34%; }
  .fh-efni :is(.fh-vv-spjald, .fh-vv-merki, .fh-vv-skref, .fh-vv-aherslur) { break-inside: avoid; }
}
