/* Dove Insight overrides — loaded after the theme CSS so these win. */

/* Services page: masonry grid instead of fixed rows so cards of differing
   heights pack together. */
.services-masonry {
    column-count: 3;
    column-gap: 30px;
}

.services-masonry .single-service {
    display: inline-block;
    width: 100%;
    margin-bottom: 30px;
    break-inside: avoid;
    -webkit-column-break-inside: avoid;
}

@media (max-width: 991px) {
    .services-masonry {
        column-count: 2;
    }
}

@media (max-width: 600px) {
    .services-masonry {
        column-count: 1;
    }
}

/* Information Center pagination. */
.pagination-di {
    display: inline-flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 6px;
    list-style: none;
    padding: 20px 0 0;
    margin: 0;
}

.pagination-di li,
.pagination-di li a {
    display: inline-block;
    padding: 8px 14px;
    border: 1px solid #e5e5e5;
    border-radius: 4px;
    color: #444;
    text-decoration: none;
}

.pagination-di li.active,
.pagination-di li.active a {
    background: #26b14b;
    color: #fff;
    border-color: #26b14b;
}

.pagination-di li.disabled {
    color: #bbb;
}

/* Active nav link → brand green (desktop menu + mobile MeanMenu clone). */
.main-menu ul.navbar-nav li.active > a,
.mobile-menu nav#dropdown ul li.active > a,
.mean-nav ul li.active > a {
    color: #26b14b !important;
}

/* Tailwind ships a `.collapse` utility (visibility: collapse) that collides
   with Bootstrap's navbar `.collapse` toggle class and hides the desktop menu.
   Force the header nav back to visible while keeping Bootstrap's layout rules
   intact. */
.header-area .navbar-collapse.collapse {
    visibility: visible !important;
}

/* On mobile the container spans the full viewport width. */
@media (max-width: 767px) {
    .container {
        width: 100% !important;
        max-width: 100% !important;
    }
}

@media (min-width: 768px) {
    /* Widen the Bootstrap fixed container to a fluid 80% of the viewport
       (Bootstrap otherwise caps it at 750/970/1170px). */
    .container {
        width: 80% !important;
        max-width: 1600px !important;
    }

    /* Deterministic header layout: logo on the left, nav links in the middle,
       Contact Us button on the right. Bootstrap's float-based navbar was
       dropping the menu onto a second row, so lay the row out with flexbox. */
    #sticker .container > .row {
        display: flex;
        align-items: center;
        flex-wrap: nowrap;
    }

    #sticker .col-md-3 {
        width: auto;
        flex: 0 0 auto;
    }

    #sticker .col-md-9 {
        width: auto;
        flex: 1 1 auto;
        display: flex;
        align-items: center;
        justify-content: space-between;
    }

    #sticker nav.navbar-default {
        order: 1;
        float: none;
        margin: 0;
    }

    #sticker .header-right-link {
        order: 2;
        float: none;
        width: auto;
        margin: 0;
        padding: 0;
    }

    #sticker .navbar-collapse.collapse {
        padding: 0;
    }

    #sticker .main-menu ul.navbar-nav {
        margin: 0;
        float: none;
    }

    /* Reduce the header height — the white overlay was too tall. */
    #sticker .main-menu ul.navbar-nav li a {
        padding-top: 22px;
        padding-bottom: 22px;
    }

    #sticker .logo a {
        padding: 14px 0;
    }
}

/* Testimonials ("Customer say some words"): the Owl Carousel lays the cards
   out in a horizontal row. If the Owl script hasn't run yet — or its assets
   fail to load in the browser — the cards fall back to plain block flow and
   stack vertically. This guarantees a horizontal layout until (and unless)
   Owl takes over, at which point `.owl-loaded` deactivates the fallback. */
.reviews-area .testimonial-carousel:not(.owl-loaded) {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    align-items: stretch;
    gap: 30px;
}

.reviews-area .testimonial-carousel:not(.owl-loaded) > .single-testi {
    flex: 1 1 0;
    min-width: 280px;
    max-width: calc(33.333% - 20px);
}

@media (max-width: 991px) {
    .reviews-area .testimonial-carousel:not(.owl-loaded) > .single-testi {
        max-width: calc(50% - 15px);
    }
}

@media (max-width: 600px) {
    .reviews-area .testimonial-carousel:not(.owl-loaded) > .single-testi {
        max-width: 100%;
    }
}

/* Self-contained mobile menu — replaces the MeanMenu jQuery plugin so the
   mobile header renders and toggles even when the theme JS fails to load. */
.di-mobile-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.di-mobile-logo img {
    max-height: 45px;
    width: auto;
}

.di-mobile-toggle {
    display: inline-flex;
    flex-direction: column;
    justify-content: center;
    gap: 5px;
    width: 46px;
    height: 40px;
    padding: 9px 10px;
    border: 1px solid #e4e4e4;
    border-radius: 4px;
    background: #fff;
    cursor: pointer;
}

.di-mobile-toggle span {
    display: block;
    width: 100%;
    height: 2px;
    background: #151b2c;
    border-radius: 2px;
}

.di-mobile-nav {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease;
}

.di-mobile-nav.is-open {
    max-height: 460px;
}

.di-mobile-nav ul {
    list-style: none;
    margin: 12px 0 4px;
    padding: 0;
}

.di-mobile-nav li {
    border-top: 1px solid #f0f0f0;
}

.di-mobile-nav li a {
    display: block;
    padding: 13px 6px;
    color: #151b2c;
    font-size: 14px;
    font-weight: 500;
    text-transform: uppercase;
    text-decoration: none;
}

.di-mobile-nav li.active > a,
.di-mobile-nav li a:hover {
    color: #26b14b;
}
