/**
 * Home & shared section motion: scroll reveals, hero extras, hover polish.
 * Respects prefers-reduced-motion.
 */

/* ---- Scroll reveal (IntersectionObserver adds .is-visible) ---- */
.reveal {
    opacity: 0;
    transform: translate3d(0, 32px, 0);
    transition:
        opacity 0.7s cubic-bezier(0.22, 1, 0.36, 1),
        transform 0.7s cubic-bezier(0.22, 1, 0.36, 1);
}

.reveal.is-visible {
    opacity: 1;
    transform: translate3d(0, 0, 0);
}

.reveal-left {
    transform: translate3d(-28px, 0, 0);
}

.reveal-left.is-visible {
    transform: translate3d(0, 0, 0);
}

.reveal-right {
    transform: translate3d(28px, 0, 0);
}

.reveal-right.is-visible {
    transform: translate3d(0, 0, 0);
}

.reveal-delay-1 {
    transition-delay: 0.06s;
}
.reveal-delay-2 {
    transition-delay: 0.12s;
}
.reveal-delay-3 {
    transition-delay: 0.18s;
}
.reveal-delay-4 {
    transition-delay: 0.24s;
}
.reveal-delay-5 {
    transition-delay: 0.3s;
}
.reveal-delay-6 {
    transition-delay: 0.36s;
}

/* Checklist lines in fun-facts / about block */
.fun-facts .about-us-feature.reveal {
    transform: translate3d(-14px, 28px, 0);
}

.fun-facts .about-us-feature.reveal.is-visible {
    transform: translate3d(0, 0, 0);
}

/* ---- Hero: complete the story after existing h6 / h4 animations ---- */
@keyframes homeFadeUp {
    from {
        opacity: 0;
        transform: translate3d(0, 22px, 0);
    }
    to {
        opacity: 1;
        transform: translate3d(0, 0, 0);
    }
}

.Modern-Slider .item.slick-active .text-content p {
    animation: homeFadeUp 0.85s cubic-bezier(0.22, 1, 0.36, 1) both 1.85s;
}

.Modern-Slider .item.slick-active .text-content a.filled-button {
    animation: homeFadeUp 0.85s cubic-bezier(0.22, 1, 0.36, 1) both 2.05s;
}

/* ==========================================================================
   UPDATED: Dynamic Equal Height Flex Matrix Controls for Services Section
   ========================================================================== */

/* Force row structural components to act as active flex-wrapping boxes */
.services .row {
    display: flex !important;
    flex-wrap: wrap !important;
}

/* Force intermediate Bootstrap 4 grid wrappers to expand fully to match adjacent items */
.services .row > div[class*="col-"] {
    /*display: flex !important;*/
    margin-bottom: 30px; /* Optional clean spacing between stacked card rows */
}

.services .service-item {
    display: flex !important;
    flex-direction: column !important;
    width: 100% !important;
    height: 100% !important; /* Dynamically stretches card block sizes to identical levels */
    transition:
        transform 0.35s ease,
        box-shadow 0.35s ease;
}

/* Force lower body components to expand and fill the remaining bottom space of the cards */
.services .service-item .down-content {
    flex-grow: 1 !important;
    display: flex !important;
    flex-direction: column !important;
}

/* Ground descriptions or operational read-more buttons consistently at the bottom */
.services .service-item .down-content p {
    flex-grow: 1 !important;
    margin-bottom: 0;
}

.services .service-item:hover {
    transform: translateY(-8px);
    box-shadow: 0 20px 45px rgba(0, 0, 0, 0.12);
}

.services .service-item img {
    transition: transform 0.45s ease;
    width: 100%;
}

.services .service-item:hover img {
    transform: scale(1.03);
}

/* ==========================================================================
   End Equal Height Modifications
   ========================================================================== */

.filled-button,
.border-button,
.request-form a.border-button {
    transition:
        transform 0.22s ease,
        box-shadow 0.22s ease,
        filter 0.22s ease;
}

.filled-button:hover,
.border-button:hover,
.request-form a.border-button:hover {
    transform: translateY(-2px);
    filter: brightness(1.05);
}

/* ---- Who we are image ---- */
.more-info .left-image img {
    transition: transform 0.5s cubic-bezier(0.22, 1, 0.36, 1);
}

.more-info .left-image:hover img {
    transform: scale(1.02);
}

/* ---- Testimonials ---- */
.testimonial-item .inner-content {
    transition:
        transform 0.3s ease,
        box-shadow 0.3s ease;
}

.owl-carousel .owl-item .testimonial-item:hover .inner-content {
    transform: translateY(-4px);
    box-shadow: 0 12px 32px rgba(0, 0, 0, 0.08);
}

/* ---- Partners ---- */
.partner-item img {
    transition:
        transform 0.35s ease,
        filter 0.35s ease;
}

.partner-item:hover img {
    transform: scale(1.06);
    filter: brightness(1.06);
}

/* ---- Footer social ---- */
footer .social-icons a {
    display: inline-flex;
    transition: transform 0.25s ease;
}

footer .social-icons a:hover {
    transform: translateY(-3px) scale(1.08);
}

/* ---- Fun facts / stats tiles ---- */
.fun-facts .count-area-content {
    transition:
        transform 0.3s ease,
        background-color 0.3s ease;
}

.fun-facts .count-area-content:hover {
    transform: translateY(-3px);
}

/* ---- Services page: tab nav + detail panels ---- */
@keyframes servicesTabPanelIn {
    from {
        opacity: 0;
        transform: translate3d(0, 16px, 0);
    }
    to {
        opacity: 1;
        transform: translate3d(0, 0, 0);
    }
}

.single-services #tabs ul li a {
    transition:
        transform 0.22s ease,
        box-shadow 0.22s ease,
        filter 0.22s ease;
}

.single-services #tabs ul li a:hover {
    transform: translateX(6px);
    filter: brightness(1.06);
    box-shadow: 0 6px 18px rgba(0, 0, 0, 0.12);
}

.single-services .tabs-content article.service-tab-panel.services-tab-panel-enter {
    animation: servicesTabPanelIn 0.55s cubic-bezier(0.22, 1, 0.36, 1) forwards;
}

.single-services .tabs-content article.service-tab-panel img {
    transition: transform 0.45s cubic-bezier(0.22, 1, 0.36, 1);
}

.single-services .tabs-content article.service-tab-panel:hover img {
    transform: scale(1.02);
}

/* ---- About page: team members ---- */
.team.about-team .team-item {
    transition:
        transform 0.35s ease,
        box-shadow 0.35s ease;
}

.team.about-team .team-item:hover {
    transform: translateY(-8px);
    box-shadow: 0 20px 45px rgba(0, 0, 0, 0.12);
}

.team.about-team .team-item img {
    transition: transform 0.45s cubic-bezier(0.22, 1, 0.36, 1);
}

.team.about-team .team-item:hover img {
    transform: scale(1.03);
}

/* ---- Reduced motion ---- */
@media (prefers-reduced-motion: reduce) {
    .reveal,
    .reveal-left,
    .reveal-right {
        opacity: 1 !important;
        transform: none !important;
        transition: none !important;
    }

    .Modern-Slider .item.slick-active .text-content p,
    .Modern-Slider .item.slick-active .text-content a.filled-button {
        animation: none !important;
        opacity: 1;
        transform: none;
    }

    .services .service-item,
    .services .service-item img,
    .filled-button,
    .border-button,
    .request-form a.border-button,
    .more-info .left-image img,
    .testimonial-item .inner-content,
    .partner-item img,
    footer .social-icons a,
    .fun-facts .count-area-content {
        transition: none !important;
    }

    .services .service-item:hover,
    .services .service-item:hover img,
    .filled-button:hover,
    .border-button:hover,
    .request-form a.border-button:hover,
    .more-info .left-image:hover img,
    .owl-carousel .owl-item .testimonial-item:hover .inner-content,
    .partner-item:hover img,
    footer .social-icons a:hover,
    .fun-facts .count-area-content:hover {
        transform: none !important;
        box-shadow: none !important;
        filter: none !important;
    }

    .single-services #tabs ul li a,
    .single-services .tabs-content article.service-tab-panel img {
        transition: none !important;
    }

    .single-services #tabs ul li a:hover,
    .single-services .tabs-content article.service-tab-panel:hover img {
        transform: none !important;
        box-shadow: none !important;
        filter: none !important;
    }

    .single-services .tabs-content article.service-tab-panel.services-tab-panel-enter {
        animation: none !important;
    }

    .team.about-team .team-item,
    .team.about-team .team-item img {
        transition: none !important;
    }

    .team.about-team .team-item:hover,
    .team.about-team .team-item:hover img {
        transform: none !important;
        box-shadow: none !important;
    }
}