/* Homepage rhythm shares the existing brand, typography, and theme tokens. */
.home-page {
    --home-section-space: 64px;
    --home-heading-gap: 40px;
}

.home-page > .home-section {
    margin-bottom: 0;
    padding: var(--home-section-space) 0;
}

.home-section .heading {
    margin-bottom: var(--home-heading-gap);
}

.home-section .heading h2 {
    margin-top: 0;
    padding-bottom: 12px;
    border-bottom-width: 3px;
    font-size: 32px;
    line-height: 1.25;
}

.home-section p {
    text-wrap: pretty;
}

.home-section > .container > .row > div > .lead {
    margin-bottom: 32px;
}

/* The outer hero section has no extra padding around its photo surface. */
.home-page > .home-section--hero {
    padding: 0;
}

.home-section--hero .home-carousel {
    padding: var(--home-section-space) 0;
}

.home-section--hero .home-carousel .owl-carousel {
    padding: 0;
}

.home-section--hero .homepage .item .row {
    display: flex;
    align-items: center;
    min-height: 400px;
}

.home-section--hero .homepage img {
    width: auto;
    height: auto;
    max-height: 400px;
    margin: 0 auto;
    object-fit: contain;
}

.home-section--hero .owl-controls,
.home-section--practice .owl-controls {
    margin-top: 24px;
}

/* Flatten only the non-semantic row wrappers so both feature rows share a grid. */
.home-section--features > .container {
    display: grid;
    grid-template-columns: repeat(var(--home-feature-columns), minmax(0, 1fr));
    gap: 32px;
}

.home-section--features > .container::before,
.home-section--features > .container::after,
.home-section--features .row::before,
.home-section--features .row::after {
    display: none;
}

.home-section--features .row {
    display: contents;
}

.home-section--features .row > div {
    display: flex;
    float: none;
    width: auto;
    padding: 0;
}

.home-section--features .box-simple {
    width: 100%;
    min-height: 240px;
    margin-bottom: 0;
}

.home-section--features .box-simple .icon {
    margin-bottom: 20px;
}

.home-section--features .box-simple h3 {
    margin: 0 0 12px;
}

.home-section--features .box-simple p {
    margin: 0;
}

/* Let case-study content grow naturally instead of fixing heights with jQuery. */
.home-section--practice .testimonials {
    margin-bottom: 0;
}

.home-section--practice .testimonial {
    min-height: 240px;
}

.home-section--practice .testimonials .item .testimonial .bottom {
    height: auto;
    margin-bottom: 24px;
}

.home-section--practice .testimonials .item .testimonial .name-picture {
    float: none;
}

.home-section--practice .testimonials .item .testimonial .name-picture h5 {
    min-height: 2.8em;
    margin: 0 0 8px;
}

.home-section--practice .testimonials .item .testimonial .name-picture > p {
    min-height: 2.9em;
}

.home-section--practice .testimonials .item .testimonial .text,
.home-section--practice .testimonial .text p:last-child {
    margin-bottom: 0;
}

.home-section--blog .rp-row {
    row-gap: 24px;
    margin-right: -12px;
    margin-left: -12px;
}

.home-section--blog .rp-row > div {
    margin-bottom: 0;
    padding-right: 12px;
    padding-left: 12px;
}

.home-section--blog .box-image-text.blog .top {
    margin-bottom: 0;
}

.home-section--blog .box-image-text.blog .image {
    height: auto;
}

.home-section--blog .box-image-text.blog .image img {
    height: auto;
    aspect-ratio: 16 / 9;
}

.home-section--blog .box-image-text.blog .content {
    padding: 16px 16px 18px;
}

.home-section--blog .box-image-text.blog .content h4 {
    margin: 0 0 12px;
}

.home-section--blog .box-image-text.blog .intro {
    margin-bottom: 16px;
}

.home-section--blog .box-image-text.blog .read-more {
    margin-bottom: 0;
    padding-top: 8px;
}

.home-section--ecosystem .ecosystem-img {
    width: 100%;
    max-width: 1140px;
    height: auto;
    margin: 0 auto;
}

.home-page #top {
    min-height: 32px;
    padding: 6px 0;
}

.home-page #top p {
    line-height: 20px;
}

.home-page #footer {
    padding: 56px 0;
}

.home-page #footer h4 {
    margin: 0 0 20px;
}

.home-page #copyright {
    min-height: 64px;
    padding: 18px 0;
}

.home-page #copyright p {
    margin: 0;
}

@media (min-width: 1200px) {
    .home-page #navbar {
        min-height: 72px;
    }

    .home-page #navbar .navbar-brand {
        display: flex;
        align-items: center;
        height: 72px;
    }

    .home-page #navbar .navbar-brand img {
        margin-top: 0;
    }

    .home-page #navbar .navbar-nav > li > a {
        padding-top: 23px;
        padding-bottom: 24px;
    }

    .home-page #navbar .nav-control {
        height: 72px;
    }

    .home-section--hero .home-carousel,
    .home-page > .home-section--practice {
        display: flex;
        align-items: center;
        min-height: var(--home-photo-min-height, 600px);
    }

    .home-page > .home-section--ecosystem {
        min-height: 1040px;
    }

    .home-page #footer {
        min-height: 360px;
    }
}

@media (min-width: 768px) and (max-width: 1199px) {
    .home-page {
        --home-section-space: 56px;
    }

    .home-section--features > .container {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .home-section--blog .rp-row > div {
        width: 50%;
    }
}

@media (max-width: 767px) {
    .home-page {
        --home-section-space: 40px;
        --home-heading-gap: 32px;
    }

    .home-section .heading h2 {
        font-size: 28px;
    }

    .home-section--hero .homepage .item .row {
        display: block;
        min-height: 0;
    }

    .home-section--hero .homepage .right {
        margin-bottom: 32px;
    }

    .home-section--hero .homepage img {
        max-height: none;
    }

    .home-section--features > .container {
        grid-template-columns: minmax(0, 1fr);
        gap: 24px;
    }

    .home-section--features .box-simple,
    .home-section--practice .testimonial {
        min-height: 0;
    }

    .home-section--blog .rp-row > div {
        width: 100%;
    }

    .home-section--practice .testimonials .item .testimonial .name-picture h5,
    .home-section--practice .testimonials .item .testimonial .name-picture > p {
        min-height: 0;
    }

    .home-page #footer {
        padding: 40px 0;
    }
}
