/* Home content spacing. Keep the header, sidebar and gapless hero untouched. */
body.home {
    --nps-home-gutter: clamp(20px, 3vw, 48px);
    --nps-home-space: clamp(48px, 4vw, 64px);
    --nps-home-gap: clamp(24px, 2vw, 32px);
}
body.home .homeblog,
body.home .services,
body.home .homepage,
body.home .partner,
body.home footer .footer { padding: var(--nps-home-space) 0; }
body.home .homeblog > .container,
body.home .services > .container,
body.home .homepage > .container,
body.home .partner > .container,
body.home footer .container {
    width: 100%;
    max-width: none;
    padding-right: var(--nps-home-gutter);
    padding-left: var(--nps-home-gutter);
}
/* Remove Bootstrap's nested gutters only within these home sections. */
body.home :is(.homeblog, .services, .homepage, .partner, footer) .row { margin-right: 0; margin-left: 0; }
body.home :is(.homeblog, .services, .homepage, .partner, footer) .row > [class*="col-"] {
    float: none;
    min-width: 0;
    padding-right: 0;
    padding-left: 0;
}
body.home .services > .container > .row > [class*="col-"],
body.home .homepage > .container > .row > [class*="col-"] { width: 100%; }
body.home .services p.homeblock-title,
body.home .homepage p.homeblock-title {
    position: static;
    inset: auto;
    width: auto;
    margin: 0 0 var(--nps-home-gap);
    transform: none;
    white-space: normal;
    text-align: left;
}
body.home .homeblog > .container > .row h2,
body.home .partner h2 { margin: 0 0 var(--nps-home-gap); }

body.home .homeblog .blog-post { margin: 0 0 var(--nps-home-gap); }
body.home .homeblog .blog-post:last-child { margin-bottom: 0; }
body.home .homeblog .blog-post article > .row {
    display: grid;
    grid-template-columns: clamp(220px, 24vw, 300px) minmax(0, 1fr);
    gap: var(--nps-home-gap);
    align-items: start;
}
body.home .homeblog .blog-post article > .row::before,
body.home .homeblog .blog-post article > .row::after { display: none; }
body.home .homeblog :is(.blog-post-image, .blog-post-text) { width: auto; text-align: left; }
body.home .homeblog .blog-post-image,
body.home .homeblog .post-img { margin: 0; }
body.home .homeblog .post-img,
body.home .homeblog .post-img > span { display: block; }
body.home .homeblog .post-img img {
    display: block;
    width: 100%;
    height: auto;
    aspect-ratio: 360 / 250;
    object-fit: contain;
    background: #fff;
}
body.home .homeblog .post-title { margin-top: 0; }
body.home .homeblog .post-more { margin-bottom: 0; }

body.home .services :is(.subpages-list-h2, .subpages-list-a) {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: var(--nps-home-gap);
}
body.home .services :is(.subpages-list-h2, .subpages-list-a) > .product-item { width: auto; margin: 0; }
body.home .services .product-item .image a { display: block; }
body.home .services .product-item .image img {
    display: block;
    width: 100%;
    max-width: none;
    height: auto;
    aspect-ratio: 340 / 250;
    object-fit: contain;
}
body.home .services .product-item :is(h2, h3) { white-space: normal; margin-bottom: 0; }

body.home .homepage .col-md-10 > .row {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: var(--nps-home-gap);
    align-items: start;
}
body.home .homepage .col-md-10 > .row::before,
body.home .homepage .col-md-10 > .row::after { display: none; }
body.home .homepage .col-md-10 > .row > [class*="col-"] { width: auto; }
body.home .homepage .home-image {
    display: block;
    width: 100%;
    max-width: none;
    height: clamp(280px, 25vw, 400px);
    object-fit: cover;
    object-position: 50% 40%;
}

body.home .partner > .container > .row > .col-xs-12 > .row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 180px), 1fr));
    gap: var(--nps-home-gap);
    align-items: start;
}
body.home .partner > .container > .row > .col-xs-12 > .row::before,
body.home .partner > .container > .row > .col-xs-12 > .row::after { display: none; }
body.home .partner .row > .col-sm-4 { width: auto; clear: none; }
body.home .partner .service-image {
    display: block;
    width: 100%;
    height: 165px;
    margin: 0 auto;
    object-fit: contain;
}
body.home .partner .service-title { margin: 16px 0 0; }

body.home footer .footer { display: block; }
body.home footer .footer > .container > .row {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: var(--nps-home-gap);
}
body.home footer .footer > .container > .row::before,
body.home footer .footer > .container > .row::after { display: none; }
/* Existing address and telephone links remain available at every width. */
body.home footer .footer .footer-block { display: block !important; width: auto; margin: 0; overflow-wrap: anywhere; }
body.home footer .footer .footer-title { margin-bottom: 20px; }
body.home footer .footer .phone p + p { margin-top: 8px; }
body.home footer .footer .logo img { display: block; width: 100%; max-width: 280px; height: auto; }
body.home footer .copyright .col-xs-12 { width: 100%; }

@media (min-width: 601px) and (max-width: 1099px) {
    body.home .partner > .container > .row > .col-xs-12 > .row { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    body.home footer .footer > .container > .row { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 767px) {
    body.home .services :is(.subpages-list-h2, .subpages-list-a) { grid-template-columns: minmax(0, 1fr); }
    body.home .homepage .col-md-10 > .row { grid-template-columns: minmax(0, 1fr); }
    body.home .homepage .home-image { height: auto; }
    body.home .partner > .container > .row > .col-xs-12 > .row { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 600px) {
    body.home { --nps-home-gutter: 16px; --nps-home-space: 36px; --nps-home-gap: 24px; }
    body.home .homeblog .blog-post article > .row,
    body.home .services :is(.subpages-list-h2, .subpages-list-a),
    body.home footer .footer > .container > .row { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 380px) {
    body.home .partner > .container > .row > .col-xs-12 > .row { grid-template-columns: minmax(0, 1fr); }
}
