/* The energy pages rebuilt in the new design (group "energi"): only what ny_design.css has no class for. */

/* ---------- Insikter articles (pages/insikter/*.html): one long column of the old copy ---------- */

/* The article is one column of CMS copy, so its headings need the room a new section would give them. */
.nd_page.nd_energi_article_page .nd_rich h2:not(:first-child) {
    margin-top: 64px;
}
.nd_page.nd_energi_article_page .nd_rich h3:not(:first-child),
.nd_page.nd_energi_article_page .nd_rich h4:not(:first-child) {
    margin-top: 32px;
}
.nd_page.nd_energi_article_page .nd_rich > .richtextWrap:first-child > h2:first-child {
    margin-top: 0;
}

/* A figure from the article ("Fig. 1 ..."): its caption above it, as on the old page. */
.nd_page .nd_energi_figure {
    margin: 40px 0;
}
.nd_page .nd_energi_figure figcaption {
    margin-bottom: 12px;
    font-weight: 700;
    font-size: 14px;
    line-height: 20px;
}
.nd_page .nd_energi_figure img {
    display: block;
    width: 100%;
    height: auto;
}

/* A fact box ("Vad är ...?"), once a gray box: a dashed frame on the page's off-white, as two light
   sand boxes must not sit next to each other. Its title is a small heading whatever its tag. */
.nd_page .nd_energi_fact {
    padding: 32px;
    border: 1px solid transparent;
    background:
        linear-gradient(to right, var(--nd_gray_dash) 50%, transparent 50%) 0 0 / 6px 1px repeat-x,
        linear-gradient(to right, var(--nd_gray_dash) 50%, transparent 50%) 0 100% / 6px 1px repeat-x,
        linear-gradient(to bottom, var(--nd_gray_dash) 50%, transparent 50%) 0 0 / 1px 6px repeat-y,
        linear-gradient(to bottom, var(--nd_gray_dash) 50%, transparent 50%) 100% 0 / 1px 6px repeat-y;
    background-origin: border-box;
}
.nd_page .nd_rich .nd_energi_fact h2,
.nd_page .nd_rich .nd_energi_fact > .richtextWrap:first-child > p:first-child {
    margin-top: 0;
    font-weight: 700;
    font-size: 16px;
    line-height: 1.3;
    letter-spacing: 0;
}
.nd_page .nd_rich .nd_energi_fact > * + * {
    margin-top: 12px;
}
.nd_page .nd_rich .nd_energi_fact + .nd_energi_fact {
    margin-top: 16px;
}
@media (max-width: 767px) {
    .nd_page .nd_energi_fact {
        padding: 24px 20px;
    }
}

/* ---------- Energirenovering Podden (pages/energirenovering-podden*.html) ---------- */

/* The Spotify player of an episode, in the text column under the episode's name. */
.nd_page .nd_energi_spotify {
    display: block;
    width: 100%;
    height: 352px;
    margin-top: 24px;
    border: 0;
    border-radius: 12px;
}
/* A guest's portrait is cropped from the top, so the head is never cut. */
.nd_page.nd_energi_podd_page .nd_text_image_media img {
    object-position: center top;
}

/* ---------- Luft/luftvärmepump (pages/luft-luftvarmepump.html): the Daikin heat pumps as list cards ---------- */

/* The product pictures are cut-outs on a transparent background: shown whole, never cropped. */
.nd_page .energi_daikin_list .nd_list_card_image {
    object-fit: contain;
}

/* ---------- Energieffektivisering pages (energieffektivisering, -stockholm, energieffektivisera-din-villa) ---------- */

/* The four steps of an energy renovation as cards: the step's number in Space Mono over its name, and
   the arrow links at the bottom, so they line up across the row. */
.nd_page .nd_energi_steps .nd_columns li .nd_h3 {
    margin-top: 4px;
}
.nd_page .nd_energi_steps .nd_columns li > .nd_arrow_link {
    margin-top: auto;
    padding-top: 8px;
}

/* ---------- The guides on families/bergvarmepump_ny_design.html ---------- */

/* The second line of an H1 that had one in the old CMS ("Bidrag vid renovering 2023" and its
   subtitle): still part of the H1, at the big heading's size (Playbook type scale). */
.nd_page .nd_hero .nd_energi_h1_second_line {
    display: inline-block;
    margin-top: 12px;
    font-size: 32px;
    line-height: 1.2;
}
@media (min-width: 768px) {
    .nd_page .nd_hero .nd_energi_h1_second_line {
        font-size: 40px;
        line-height: 1.18;
    }
}
@media (min-width: 1024px) {
    .nd_page .nd_hero .nd_energi_h1_second_line {
        font-size: 52px;
    }
}
