/*** Spinner Start ***/
/*** Spinner ***/
#spinner {
    opacity: 0;
    visibility: hidden;
    transition: opacity .5s ease-out, visibility 0s linear .5s;
    z-index: 99999;
}

#spinner.show {
    transition: opacity .5s ease-out, visibility 0s linear 0s;
    visibility: visible;
    opacity: 1;
}
/*** Spinner End ***/

.back-to-top {
    position: fixed;
    right: 30px;
    bottom: 30px;
    display: flex;
    width: 45px;
    height: 45px;
    align-items: center;
    justify-content: center;
    transition: 0.5s;
    z-index: 99;
}

/*** Button Start ***/
.btn {
    font-weight: 600;
    transition: .5s;
}

.btn-square {
    width: 32px;
    height: 32px;
}

.btn-sm-square {
    width: 34px;
    height: 34px;
}

.btn-md-square {
    width: 44px;
    height: 44px;
}

.btn-lg-square {
    width: 56px;
    height: 56px;
}

.btn-square,
.btn-sm-square,
.btn-md-square,
.btn-lg-square {
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: normal;
    border-radius: 50%;
}

.btn.btn-primary {
    background: var(--bs-secondary) !important;
    color: var(--bs-white) !important;
    font-family: 'Poppins', sans-serif;
    font-weight: 400;
    transition: 0.5s;
}

.btn.btn.btn-primary:hover {
    background: var(--bs-primary) !important;
    color: var(--bs-secondary);
    border: 1px solid var(--bs-secondary);
}

.btn.btn-secondary {
    background: transparent;
    color: var(--bs-secondary);
    font-family: 'Poppins', sans-serif;
    font-weight: 400;
    border: none;
    transition: 0.5s;
}

.btn.btn-secondary:hover {
    color: var(--bs-primary) !important;
}


/*** Section Title Start ***/
.section-title {
    max-width: 900px;
    text-align: center;
    margin: 0 auto;
}

.section-title .sub-style {
    position: relative;
    display: inline-block;
    text-transform: uppercase;
    color: var(--bs-primary);
}

.section-title .sub-style::before {
    content: "";
    width: 100px;
    position: absolute;
    bottom: 50%;
    left: 0;
    transform: translateY(-50%);
    margin-bottom: -6px;
    margin-left: -100px;
    border: 1px solid var(--bs-secondary) !important;
}

.section-title .sub-style::after {
    content: "";
    width: 50px;
    position: absolute;
    top: 50%;
    left: 0;
    transform: translateY(-50%);
    margin-top: -8px;
    margin-left: -50px;
    border: 1px solid var(--bs-primary) !important;
}

.sub-title {
    position: relative;
    display: inline-block;
    text-transform: uppercase;
    color: var(--bs-primary);
}

.sub-title::before {
    content: "";
    width: 100px;
    position: absolute;
    bottom: 50%;
    right: 0;
    transform: translateY(-50%);
    margin-bottom: -8px;
    margin-right: -100px;
    border: 1px solid var(--bs-secondary) !important;
}

.sub-title::after {
    content: "";
    width: 50px;
    position: absolute;
    top: 50%;
    right: 0;
    transform: translateY(-50%);
    margin-top: -6px;
    margin-right: -50px;
    border: 1px solid var(--bs-primary) !important;
}


/*** Topbar Start ***/
.fixed-top .container {
    transition: 0.5s;
}

.topbar {
    padding: 2px 10px 2px 20px;
    background: var(--bs-primary) !important;
    position: relative;
    z-index: 100; /* Lower z-index value */
}

.topbar a,
.topbar a i {
    transition: 0.5s;
}

.topbar a:hover,
.topbar a i:hover {
    color: var(--bs-secondary) !important;
}

@media (max-width: 768px) {
    .topbar {
        display: none;    
    }
}
/*** Topbar End ***/

/*** Navbar ***/
.navbar {
    position: relative;
    z-index: 90; /* Lower z-index value */
}

.sticky-top {
    z-index: 90; /* Lower z-index value */
}

.navbar-light .navbar-nav .nav-link {
    font-family: 'Poppins', sans-serif;
    position: relative;
    margin-right: 25px;
    padding: 35px 0;
    color: var(--bs-primary) !important;
    font-size: 17px;
    font-weight: 400;
    outline: none;
    transition: .5s;
}

/* Make all navbar menu items bold on all screens */
.navbar-nav .nav-link,
.navbar-light .navbar-nav .nav-link,
.navbar-expand-xl .navbar-nav .nav-link {
    font-weight: bold !important;
}

.sticky-top .navbar-light .navbar-nav .nav-link {
    padding: 20px 0;
    color: var(--bs-primary) !important;
}

.navbar-light .navbar-nav .nav-link:hover,
.navbar-light .navbar-nav .nav-link.active {
    color: var(--bs-secondary) !important;
}

.navbar-light .navbar-brand img {
    max-height: 60px;
    transition: .5s;
}

.sticky-top .navbar-light .navbar-brand img {
    max-height: 45px;
}

.navbar .dropdown-toggle::after {
    border: none;
    content: "\f107";
    font-family: "Font Awesome 5 Free";
    font-weight: 600;
    vertical-align: middle;
}

@media (min-width: 1200px) {
    .navbar .nav-item .dropdown-menu {
        display: block;
        visibility: hidden;
        top: 100%;
        transform: rotateX(-75deg);
        transform-origin: 0% 0%;
        border: 0;
        border-radius: 10px;
        transition: .5s;
        opacity: 0;
        z-index: 95; /* Slightly higher than navbar but not too high */
    }
}

.dropdown .dropdown-menu a:hover {
    background: var(--bs-primary);
    color: var(--bs-secondary);
}

.navbar .nav-item:hover .dropdown-menu {
    transform: rotateX(0deg);
    visibility: visible;
    background: var(--bs-light) !important;
    transition: .5s;
    opacity: 1;
}

@media (max-width: 991.98px) {
    .sticky-top {
        position: relative;
        background: var(--bs-white);
        z-index: 90;
    }

    .navbar.navbar-expand-lg .navbar-toggler {
        padding: 10px 20px;
        border: 1px solid var(--bs-primary) !important;
        color: var(--bs-primary);
    }

    .navbar-light .navbar-collapse {
        margin-top: 15px;
        border-top: 1px solid #DDDDDD;
    }

    .navbar-light .navbar-nav .nav-link,
    .sticky-top .navbar-light .navbar-nav .nav-link {
        padding: 10px 0;
        margin-left: 0;
        color: var(--bs-dark) !important;
    }

    .navbar-light .navbar-brand img {
        max-height: 45px;
    }
}

@media (min-width: 991.98px) {
    .sticky-top .navbar-light {
        background: var(--bs-light) !important;
    }

    /*** Top and Bottom borders go out ***/
    .navbar-light .navbar-nav .nav-link:after,
    .navbar-light .navbar-nav .nav-link::before {
        position: absolute;
        content: "";
        top: 30px;
        bottom: 30px;
        left: 0px;
        width: 100%;
        height: 2px;
        background: var(--bs-primary);
        opacity: 0;
        transition: all 0.5s;
    }

    .navbar-light .navbar-nav .nav-link:before {
        bottom: auto;
    }

    .navbar-light .navbar-nav .nav-link:after {
        top: auto;
    }

    .navbar-light .navbar-nav .nav-link:hover:before,
    .navbar-light .navbar-nav .nav-link.active:before {
        top: 20px;
        opacity: 1;
    }

    .navbar-light .navbar-nav .nav-link:hover::after,
    .navbar-light .navbar-nav .nav-link.active::after {
        bottom: 20px;
        opacity: 1;
    }
}

#searchModal .modal-content {
    background: rgba(240, 245, 251, 0.5);
    <style>
/* Aggressive override for navbar - add this AFTER your existing CSS */
.navbar.navbar-expand-lg .navbar-collapse {
    display: flex !important;
    flex-basis: auto !important;
}

.navbar.navbar-expand-lg .navbar-toggler {
    display: none !important;
}

.navbar.navbar-expand-lg .navbar-nav {
    flex-direction: row !important;
}

/* Force it to work on all screen sizes above 768px */
@media (min-width: 768px) {
    .navbar.navbar-expand-lg .navbar-collapse {
        display: flex !important;
        flex-basis: auto !important;
        border-top: none !important;
        margin-top: 0 !important;
    }
    
    .navbar.navbar-expand-lg .navbar-toggler {
        display: none !important;
    }
    
    .navbar.navbar-expand-lg .navbar-nav {
        flex-direction: row !important;
    }
    
    .navbar.navbar-expand-lg .navbar-nav .nav-link {
        padding: 35px 0 !important;
        margin-right: 25px !important;
    }
}

/* Custom styles for EduPort button */
.eduport-btn {
    background-color: white !important;
    border: 2px solid #446d46 !important;
    color: #446d46 !important;
    transition: all 0.3s ease;
    font-weight: 500;
    text-decoration: none;
}

.eduport-btn:hover {
    background-color: #446d46 !important;
    border-color: #446d46 !important;
    color: white !important;
}

/* Ensure buttons show on medium screens and up */
@media (min-width: 768px) {
    .navbar-buttons {
        display: flex !important;
        align-items: center;
    }
}
</style>

<!-- HTML Structure -->
<div class="container-fluid nav-bar p-0">
    <nav class="navbar navbar-expand-lg navbar-light bg-white px-4 px-lg-5 py-3 py-lg-0">
        <a href="/" class="navbar-brand p-0">
            <h1 class="display-5 text-secondary m-0"><img src="img/brand-logo.png" class="img-fluid" alt=""></h1>
        </a>
        
        <button class="navbar-toggler" type="button" data-bs-toggle="collapse" data-bs-target="#navbarCollapse">
            <span class="fa fa-bars"></span>
        </button>
        
        <div class="collapse navbar-collapse" id="navbarCollapse">
            <div class="navbar-nav ms-auto py-0">
                <a href="/" class="nav-item nav-link active">Home</a>
                <a href="/about" class="nav-item nav-link">About</a>
                <a href="/service" class="nav-item nav-link">Service</a>
                <a href="/contact" class="nav-item nav-link">Contact</a>
                
                <div class="nav-item dropdown">
                    <a href="#" class="nav-link" data-bs-toggle="dropdown"><span class="dropdown-toggle">More</span></a>
                    <div class="dropdown-menu m-0">
                        <a href="/feature" class="dropdown-item">Feature</a>
                        <a href="/countries" class="dropdown-item">Countries</a>
                        <a href="/testimonial" class="dropdown-item">Testimonial</a>
                        <a href="/training" class="dropdown-item">Training</a>
                    </div>
                </div>
                
                <!-- Mobile/Tablet view: Add EduPort as nav item -->
                <a href="/task-portal.html" class="nav-item nav-link d-md-none">EduPort</a>
            </div>
        </div>
        
        <!-- Buttons Section - Always outside the collapsible area -->
        <div class="navbar-buttons d-none d-md-flex align-items-center ms-3">
            <!-- Search Button -->
            <button class="btn btn-primary btn-md-square border-secondary mb-3 mb-md-3 mb-lg-0 me-3" data-bs-toggle="modal" data-bs-target="#searchModal">
                <i class="fas fa-search"></i>
            </button>
            
            <!-- EduPort Button -->
            <a href="/task-portal.html" class="btn eduport-btn rounded-pill py-2 px-4 mb-3 mb-md-3 mb-lg-0 me-3">
                EduPort
            </a>
            
            <!-- Free Consultancy Button -->
            <a href="" class="btn btn-primary border-secondary rounded-pill py-2 px-4 px-lg-3 mb-3 mb-md-3 mb-lg-0">
                Free Consultancy
            </a>
        </div>
    </nav>
</div>
}
/*** Navbar End ***/


/*** Single Page Hero Header Start ***/
.bg-about-3 {
    background: linear-gradient(rgba(0, 58, 102, 0.9), rgba(0, 58, 102, 0.8)), url(../img/about-3.jpg);
    background-position: center center;
    background-repeat: no-repeat;
    background-attachment: initial;
    background-size: cover;
    padding: 100px 0 60px 0;
}
/*** Single Page Hero Header End ***/


/*** Carousel Hero Header Start ***/
.carousel-header .carousel-control-prev .carousel-control-prev-icon,
.carousel-header .carousel-control-next .carousel-control-next-icon {
    width: 4rem;
    height: 4rem;
    margin-left: -60px;
    border-radius: 50%;
    background-size: 60% 60%;
    transition: 0.5s;
}

.carousel-header .carousel-control-next .carousel-control-next-icon {
    margin-left: 0;
    margin-right: -60px;
}

.carousel-header .carousel .carousel-indicators {
    padding-bottom: 0;
    transition: 0.5s;
}


.carousel-header .carousel .carousel-indicators li,
.carousel-header .carousel .carousel-indicators li,
.carousel-header .carousel .carousel-indicators li {
    width: 8px;
    height: 8px;
    border: 8px solid var(--bs-primary);
    border-radius: 50%;
    margin-right: 30px;
    transition: 0.5s;
}

.carousel-header .carousel .carousel-indicators li.active {
    width: 8px;
    height: 8px;
    border: 8px solid var(--bs-secondary);
}

.carousel-header .carousel-inner .carousel-item {
    position: relative;
    min-height: 100vh 
}

.carousel-header .carousel-inner .carousel-item img {
    position: absolute;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.carousel-header .carousel-inner .carousel-item .carousel-caption  {
    position: absolute;
    width: 100%;
    height: 100%;
    top: 0;
    left: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    background: linear-gradient(rgba(0, 0, 0, .6), rgba(0, 0, 0, 0.6));
    background-size: cover;
}


@media (max-width: 768px) {
    .carousel-header {
        height: 700px !important;
    }

    .carousel-header .carousel-control-prev .carousel-control-prev-icon,
    .carousel-header .carousel-control-next .carousel-control-next-icon {
        margin-top: 500px;
    }

    .carousel-header .carousel-control-prev .carousel-control-prev-icon {
        margin-left: 0px;
    }

    .carousel-header .carousel-control-next .carousel-control-next-icon {
        margin-right: 0px;
    }

    .carousel-header .carousel .carousel-indicators {
        padding: 0;
    }
}
/*** Carousel Hero Header End ***/


/*** Counter Facts Start ***/
.counter-facts {
    background: linear-gradient(rgba(255, 255, 255, .9), rgba(255, 255, 255, 0.8)), url(../img/about-3.jpg);
    background-size: cover;
    background-attachment: fixed;
    background-position: center center;
    background-repeat: no-repeat;
}

.counter-facts .counter {
    position: relative;
    text-align: center;
    width: 200px;
    min-height: 215px;
    padding: 10px 15px;
    margin: 0 auto;
    border-radius: 100px;
    box-shadow: 0 8px 5px rgba(0, 0, 0, 0.2);
    background: var(--bs-white);
}

.counter-facts .counter:before {
    content: "";
    position: absolute;
    height: 105px;
    width: 100%;
    left: 0;
    top: 0;
    border-radius: 10px 10px 0 0;
    background-color: var(--bs-primary);
    
}
.counter-facts .counter .counter-icon {
    position: relative;
    width: 120px;
    height: 100px;
    margin: 0 auto 10px;
    border-radius: 10px 10px 0 0;
    transform: translateY(-20px);
    font-size: 50px;
    line-height: 90px;
    color: var(--bs-secondary);
    background: rgba(1, 143, 252, 0.5);
    clip-path: polygon(0% 0%, 100% 0, 100% 70%, 50% 100%, 0 70%);
}
.counter-facts .counter .counter-icon:before {
    content: "";
    position: absolute;
    width: 120px;
    height: 90px;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    border-radius: 10px 10px 0 0;
    background: rgba(0, 58, 102, 0.5);
    z-index: -1;
    clip-path: polygon(0% 0%, 100% 0, 100% 70%, 50% 100%, 0 70%);
}
.counter-facts .counter:hover .counter-icon i {
    transform: rotate(360deg);
    transition: all 0.3s ease;
}
.counter-facts .counter h3 {
    color: var(--bs-primary);
    font-size: 17px;
    font-weight: 600;
    letter-spacing: 1px;
    text-transform: uppercase;
    margin: 0 0 5px 0;
}
.counter-facts .counter .counter-value {
    font-size: 30px;
    font-weight: 700;
    display: block;
    color: var(--bs-secondary);
}

@media screen and (max-width: 1200px) {
    .counter-facts .counter { margin-bottom: 40px; 
    }
}
/*** Counter Facts End ***/


/*** service Start ***/
.service .service-item {
    position: relative;
    overflow: hidden;
}

.service .service-item .service-inner .service-title {
    position: relative;
    margin-top: -30px;
    text-align: center;
    transition: 0.5s;
}

.service .service-item .service-inner .service-title .service-content {
    position: absolute;
    bottom: -100%; 
    left: 0;
    margin-left: 30px;
    margin-right: 30px;
    text-align: center;
    border-radius: 10px;
    background: var(--bs-primary);
    opacity: 0;
    transition: 0.5s;
}

.service .service-item:hover .service-inner .service-title .service-content {
    bottom: 0;
    opacity: 1;
}

.service .service-item .service-inner .service-title .service-content a h4 {
    border-bottom: 1px solid rgba(256, 256, 256, .1);
}

.service .service-item .service-inner .service-title .service-title-name {
    transition: 0.5s;
}

.service .service-item:hover .service-inner .service-title .service-title-name {
    opacity: 0;
}

.service .service-item .service-inner .service-img {
    position: relative;
    border-radius: 10px;
    overflow: hidden;
}

.service .service-item .service-inner .service-img::after {
    content: "";
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 0;
    border-radius: 10px;
    background: rgba(255, 255, 255, .5);
    transition: 0.5s;
    opacity: 0;
}

.service .service-item:hover .service-inner .service-img::after {
    height: 100%;
    opacity: 1;
}

.service .service-item .service-inner .service-img img {
    transition: 0.5s;
}

.service .service-item:hover .service-inner .service-img img {
    transform: scale(1.3);
}
/*** Service End ***/


/*** Features Start ***/
.features .feature-item {
    position: relative;
    box-shadow: 0 0 45px rgba(0, 0, 0, 0.1);
    border-radius: 10px;
}

.features .feature-item::after {
    content: "";
    position: absolute;
    width: 100%;
    height: 0;
    bottom: 0;
    left: 0;
    border-radius: 10px;
    background: rgba(0, 58, 102, 0.1);
    z-index: -1;
    transition: 0.5s;
}

.features .feature-item:hover::after {
    height: 100%;
}

.features .feature-item .feature-icon {
    width: 120px; 
    height: 120px;
    border-radius: 10px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    background: var(--bs-light);
    transition: 0.5s;
}

.features .feature-item:hover .feature-icon {
    border-radius: 50%;
    background: var(--bs-white) !important;
}

.features .feature-item .feature-icon i {
    transition: 0.5s;
}

.features .feature-item:hover .feature-icon i {
    color: var(--bs-secondary) !important;
    transform: rotate(360deg);
    transition: all 0.5s ease;
}
/*** Features End ***/


/*** Country Start ***/
.country .country-item {
    position: relative;
}

.country .country-item::after {
    position: absolute;
    content: "";
    width: 100%;
    height: 0;
    bottom: 0;
    left: 0;
    background: rgba(0, 58, 102, 0.7);
    border-radius: 10px;
    transition: 0.5s;
    z-index: 1;
}

.country .country-item:hover::after {
    height: 100%;
}

.country .country-item .country-flag {
    position: absolute;
    width: 90px; 
    height: 90px; 
    border-radius: 50%;
    top: -45px; 
    left: 50%; 
    transform: translateX(-50%);
    transition: 0.5s;
    z-index: 2;
}

.country .country-item .country-flag img {
    border: 5px solid var(--bs-white);
    transition: 0.5s;
}

.country .country-item:hover .country-flag img {
    border: 5px solid var(--bs-white);
    transform: rotate(360deg);
    transition: all 0.5s ease;
}

.country .country-item .country-name {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    transition: 0.5s;
    opacity: 0;
    z-index: 3;
}

.country .country-item:hover .country-name {
    opacity: 1;
}

.country .country-item img {
    transition: 0.5s;
}

.country .country-item:hover img {
    transform: scale(1.2);
}

.country .country-item .country-name a.fs-4 {
    transition: 0.5s;
}

.country .country-item .country-name a.fs-4:hover {
    color: var(--bs-secondary) !important;
}
/*** Country End ***/


/*** testimonial Start ***/
.testimonial .owl-carousel.testimonial-carousel {
    position: relative;
}

.testimonial .owl-carousel.testimonial-carousel .testimonial-item .testimonial-content {
    position: relative;
    border-radius: 10px;
    background: var(--bs-light);
}

.testimonial .owl-carousel.testimonial-carousel .testimonial-item .testimonial-content::after {
    position: absolute;
    content: "";
    width: 45px;
    height: 45px;
    bottom: -20px;
    left: 30px;
    transform: rotate(45deg);
    background: var(--bs-light);
    z-index: -1;
}

.testimonial .owl-carousel.testimonial-carousel .owl-nav {
    position: absolute;
    top: -60px;
    right: 0;
    display: flex;
    font-size: 40px;
    color: var(--bs-primary);
}

.testimonial .owl-carousel.testimonial-carousel .owl-nav .owl-prev {
    margin-right: 40px;
}

.testimonial .owl-carousel.testimonial-carousel .owl-nav .owl-prev,
.testimonial .owl-carousel.testimonial-carousel .owl-nav .owl-next {
    transition: 0.5s;
}

.testimonial .owl-carousel.testimonial-carousel .owl-nav .owl-prev:hover,
.testimonial .owl-carousel.testimonial-carousel .owl-nav .owl-next:hover {
    color: var(--bs-secondary);
}
/*** testimonial end ***/


/*** training Start ***/
.training .training-item .training-inner {
    position: relative;
}

.training .training-item .training-inner .training-title-name {
    position: absolute;
    width: 100%;
    height: 100%;
    bottom: 0;
    left: 0;
    padding: 20px;
    border-radius: 10px;
    background: rgba(0, 0, 0, 0.5);
    display: flex; 
    flex-direction: column;
    justify-content: end;
    text-align: center;
    transition: 0.5s;
}

.training .training-item {
    border-radius: 10px;
    position: relative;
    overflow: hidden;
}

.training .training-item:hover .training-inner .training-title-name {
    background: rgba(0, 58, 102, 0.5);
}

.training .training-item:hover .training-inner .training-title-name a {
    opacity: 0;
}

.training .training-item .training-inner img {
    transition: 0.5s;
}

.training .training-item:hover .training-inner img {
    transform: scale(1.3);
}

.training .training-item .training-content {
    position: absolute;
    width: 100%;
    bottom: -100%;
    left: 0;
    transition: 0.5s;
}

.training .training-item:hover .training-content {
    bottom: 0;
}  
/*** training End ***/


/*** Contact Start ***/
.contact .office .office-item {
    text-align: center;
    border-radius: 10px;
    box-shadow: 0 0 45px rgba(0, 0, 0, 0.2);
    background: var(--bs-light);
    transition: 0.5s;
}

.contact .office .office-item:hover {
    box-shadow: 20px 20px 20px rgba(0, 58, 102, 0.3);
}

.contact .office .office-item .office-img {
    position: relative;
    overflow: hidden;
    border-radius: 10px;
}

.contact .office .office-item .office-img img {
    transition: 0.5s;
}

.contact .office .office-item:hover .office-img img {
    transform: scale(1.3);
}

.contact .office .office-item .office-content a.text-secondary,
.contact .office .office-item .office-content a.text-muted {
    transition: 0.5s;
}

.contact .office .office-item .office-content a.text-muted:hover {
    color: var(--bs-secondary) !important;
}

.contact .office .office-item .office-content a.text-secondary:hover {
    color: var(--bs-primary) !important;
}
/*** Contact End ***/


/*** Footer Start ***/
.footer {
    background: var(--bs-primary);
}
.footer .footer-item a {
    line-height: 30px;
    color: var(--bs-white);
    transition: 0.5s;
}

.footer .footer-item p {
    line-height: 30px;
}

.footer .footer-item a:hover {
    letter-spacing: 2px;
    color: var(--bs-secondary);
}

/*** Footer End ***/


/*** copyright Start ***/
.copyright {
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    background: var(--bs-secondary) !important;
}
/*** copyright end ***/
(start of the new code of the boxes)
/* Modern Counter Facts Styles - Updated with Brand Colors */

/* Enhanced Counter Container */
.counter-facts {
    position: relative;
}

.counter-facts::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(255, 255, 255, 0.1); /* Changed to transparent white */
    z-index: 1;
}

.counter-facts .container {
    position: relative;
    z-index: 2;
}

/* Modern Card Design */
.counter {
    background: rgba(68, 109, 70, 0.15) !important; /* Primary color with transparency */
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(68, 109, 70, 0.3) !important; /* Primary color border */
    border-radius: 24px !important;
    padding: 40px 30px !important;
    height: 100%;
    position: relative;
    overflow: hidden;
    transition: all 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    cursor: pointer;
    transform: translateY(0);
    box-shadow: 0 8px 32px rgba(68, 109, 70, 0.2); /* Primary color shadow */
}

/* Shimmer Effect */
.counter::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 214, 10, 0.2), transparent); /* Secondary color shimmer */
    transition: left 0.6s ease;
}

.counter:hover::before {
    left: 100%;
}

/* Hover Effects */
.counter:hover {
    transform: translateY(-15px) scale(1.03);
    background: rgba(68, 109, 70, 0.25) !important; /* Darker primary on hover */
    border-color: rgba(255, 214, 10, 0.5) !important; /* Secondary color border on hover */
    box-shadow: 0 25px 50px rgba(68, 109, 70, 0.4);
}

/* Bottom Line Effect */
.counter::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    width: 0;
    height: 3px;
    background: linear-gradient(90deg, #446d46, #ffd60a); /* Primary to secondary gradient */
    transition: all 0.4s ease;
    transform: translateX(-50%);
}

.counter:hover::after {
    width: 80%;
}

/* Icon Styling */
.counter-icon {
    width: 80px !important;
    height: 80px !important;
    margin: 0 auto 30px !important;
    background: linear-gradient(135deg, #446d46, #3b923b) !important; /* Primary to success gradient */
    border-radius: 50% !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    position: relative;
    transition: all 0.4s ease;
    box-shadow: 0 10px 30px rgba(68, 109, 70, 0.5);
}

/* Different colors for each counter using brand colors */
.col-xl-3:nth-child(1) .counter-icon {
    background: linear-gradient(135deg, #446d46, #3b923b) !important; /* Primary to success */
    box-shadow: 0 10px 30px rgba(68, 109, 70, 0.5);
}

.col-xl-3:nth-child(2) .counter-icon {
    background: linear-gradient(135deg, #2c5282, #3182ce) !important; /* Blue to info */
    box-shadow: 0 10px 30px rgba(44, 82, 130, 0.5);
}

.col-xl-3:nth-child(3) .counter-icon {
    background: linear-gradient(135deg, #ffd60a, #ff8c42) !important; /* Secondary to orange */
    box-shadow: 0 10px 30px rgba(255, 214, 10, 0.5);
}

.col-xl-3:nth-child(4) .counter-icon {
    background: linear-gradient(135deg, #553c9a, #ed64a6) !important; /* Purple to pink */
    box-shadow: 0 10px 30px rgba(85, 60, 154, 0.5);
}

.counter:hover .counter-icon {
    transform: rotateY(360deg) scale(1.1);
    box-shadow: 0 15px 40px rgba(68, 109, 70, 0.6);
}

.counter-icon i {
    font-size: 2.2rem !important;
    color: white !important;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
}

/* Content Styling */
.counter-content {
    text-align: center;
    background: rgba(68, 109, 70, 0.2); /* Primary color background */
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-radius: 16px;
    padding: 18px 3px;
    margin-top: 15px;
    border: 1px solid rgba(68, 109, 70, 0.25); /* Primary color border */
    transition: all 0.3s ease;
}

/* Ensure headings inside counter-content are properly styled */
.counter-content h3 {
    color: white !important;
    font-size: 1.1rem !important;
    font-weight: 600 !important;
    text-transform: uppercase !important;
    letter-spacing: 1px !important;
    margin-bottom: 20px !important;
    margin-top: 0 !important;
    opacity: 0.9;
    transition: all 0.3s ease;
    text-align: center;
}

.counter:hover .counter-content {
    background: rgba(68, 109, 70, 0.3); /* Darker primary on hover */
    border-color: rgba(255, 214, 10, 0.4); /* Secondary color border on hover */
    transform: translateY(-2px);
}

.counter-content h3 {
    color: white !important;
    font-size: 1.1rem !important;
    font-weight: 600 !important;
    text-transform: uppercase !important;
    letter-spacing: 1px !important;
    margin-bottom: 20px !important;
    opacity: 0.9;
    transition: all 0.3s ease;
}

.counter:hover .counter-content h3 {
    color: #ffd60a !important; /* Secondary color on hover */
    opacity: 1;
    transform: translateY(-2px);
}

.counter-value {
    font-size: 3.5rem !important;
    font-weight: 900 !important;
    color: white !important;
    text-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
    transition: all 0.3s ease;
    display: inline-block;
}

.counter:hover .counter-value {
    transform: scale(1.05);
    text-shadow: 0 6px 20px rgba(0, 0, 0, 0.4);
    color: #ffd60a !important; /* Secondary color on hover */
}

.counter .text-secondary {
    color: rgba(255, 255, 255, 0.8) !important;
    font-size: 2rem !important;
    font-weight: 700 !important;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
}

/* Floating Animation */
@keyframes float {
    0%, 100% { transform: translateY(0px); }
    50% { transform: translateY(-10px); }
}

.counter {
    animation: float 6s ease-in-out infinite;
}

.col-xl-3:nth-child(2) .counter {
    animation-delay: -1s;
}

.col-xl-3:nth-child(3) .counter {
    animation-delay: -2s;
}

.col-xl-3:nth-child(4) .counter {
    animation-delay: -3s;
}

/* Mobile Carousel Styles */
@media (max-width: 768px) {
    /* Ensure background is visible on mobile */
    .counter-facts {
        min-height: 400px !important;
        background-attachment: scroll !important; /* Better mobile performance */
    }
    
    /* Create horizontal scrolling container */
    .counter-facts .row {
        display: flex !important;
        flex-wrap: nowrap !important;
        overflow-x: auto !important;
        overflow-y: hidden !important;
        gap: 20px !important;
        padding: 20px 15px !important; /* Add horizontal padding */
        scroll-behavior: smooth !important;
        -webkit-overflow-scrolling: touch !important;
        scrollbar-width: none !important; /* Firefox */
        margin: 0 !important;
        background: transparent !important; /* Ensure row doesn't block background */
    }
    
    /* Hide scrollbar for webkit browsers */
    .counter-facts .row::-webkit-scrollbar {
        display: none !important;
    }
    
    /* Counter cards in mobile carousel */
    .counter-facts .col-xl-3 {
        flex: 0 0 280px !important; /* Fixed width for carousel items */
        max-width: 280px !important;
        margin-bottom: 0 !important;
    }
    
    .counter {
        margin-bottom: 0 !important;
        padding: 25px 20px !important;
        min-height: 320px !important; /* Consistent height */
        display: flex !important;
        flex-direction: column !important;
        justify-content: space-between !important;
    }
    
    .counter-value {
        font-size: 2.5rem !important;
    }
    
    .counter-icon {
        width: 60px !important;
        height: 60px !important;
        margin-bottom: 20px !important;
        flex-shrink: 0 !important;
    }
    
    .counter-icon i {
        font-size: 1.6rem !important;
    }
    
    .counter-content {
        margin-top: 10px !important;
        padding: 15px 8px !important;
        flex-grow: 1 !important;
        display: flex !important;
        flex-direction: column !important;
        justify-content: center !important;
    }
    
    .counter-content h3 {
        font-size: 0.95rem !important;
        margin-bottom: 15px !important;
    }
    
    /* Disable floating animation on mobile for better performance */
    .counter {
        animation: none !important;
    }
    
    /* Mobile hover effects (touch-friendly) */
    .counter:active {
        transform: scale(0.98) !important;
        transition: transform 0.1s ease !important;
    }
    
    /* Add subtle gradient overlay to indicate scrollability */
    .counter-facts .container::after {
        content: '';
        position: absolute;
        top: 0;
        right: 15px;
        width: 30px;
        height: 100%;
        background: linear-gradient(to left, rgba(0, 0, 0, 0.1), transparent);
        pointer-events: none;
        z-index: 3;
    }
    
    /* Ensure container allows background to show through */
    .counter-facts .container {
        background: transparent !important;
        position: relative;
    }
}

/* Tablet specific adjustments */
@media (min-width: 769px) and (max-width: 1024px) {
    .counter-facts .col-xl-3 {
        flex: 0 0 calc(50% - 15px) !important;
        max-width: calc(50% - 15px) !important;
        margin-bottom: 30px !important;
    }
    
    .counter {
        padding: 35px 25px !important;
    }
    
    .counter-value {
        font-size: 3rem !important;
    }
    
    .counter-icon {
        width: 70px !important;
        height: 70px !important;
        margin-bottom: 25px !important;
    }
    
    .counter-icon i {
        font-size: 2rem !important;
    }
}

/* Enhanced WOW Animations */
.fadeInUp {
    animation-duration: 1s;
    animation-fill-mode: both;
    animation-name: fadeInUp;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translate3d(0, 40px, 0);
    }
    to {
        opacity: 1;
        transform: translate3d(0, 0, 0);
    }
}
.carousel-header .carousel-control-prev,
.carousel-header .carousel-control-next {
    z-index: 10 !important;
    pointer-events: auto !important;
}

.carousel-header .carousel-control-prev-icon,
.carousel-header .carousel-control-next-icon {
    z-index: 11 !important;
    pointer-events: auto !important;
}
/* Mobile touch scrolling - only affects mobile devices */
@media (max-width: 768px) {
    .carousel-header {
        touch-action: pan-x;
    }
    
    .carousel-header .carousel-inner {
        -webkit-overflow-scrolling: touch;
    }
}

.btn-secondary[href*="portal"] {
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.btn-secondary[href*="portal"]:hover {
    background-color: #3b923b !important;
    border-color: #3b923b !important;
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(68, 109, 70, 0.4);
}

.btn-secondary[href*="portal"]:before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: left 0.5s;
}

.btn-secondary[href*="portal"]:hover:before {
    left: 100%;  /* Shine effect on hover */
}

