/********** Template CSS **********/
:root {
    --primary: #2563eb; /* More vibrant blue */
    --secondary: #10b981; /* Modern teal */
    --accent: #8b5cf6; /* Purple accent */
    --light: #f8fafc;
    --dark: #0f172a;
    --text: #334155;
    --gray: #94a3b8;
    --gradient: linear-gradient(135deg, var(--primary), var(--accent));
    --shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}


/*** Spinner ***/
.spinner {
    width: 50px;
    height: 50px;
    background: var(--gradient);
    margin: 100px auto;
    border-radius: 12px;
    -webkit-animation: sk-rotateplane 1.2s infinite ease-in-out;
    animation: sk-rotateplane 1.2s infinite ease-in-out;
    box-shadow: 0 0 20px rgba(37, 99, 235, 0.3);
}

@-webkit-keyframes sk-rotateplane {
    0% {
        -webkit-transform: perspective(120px)
    }
    50% {
        -webkit-transform: perspective(120px) rotateY(180deg)
    }
    100% {
        -webkit-transform: perspective(120px) rotateY(180deg) rotateX(180deg)
    }
}

@keyframes sk-rotateplane {
    0% {
        transform: perspective(120px) rotateX(0deg) rotateY(0deg);
        -webkit-transform: perspective(120px) rotateX(0deg) rotateY(0deg)
    }
    50% {
        transform: perspective(120px) rotateX(-180.1deg) rotateY(0deg);
        -webkit-transform: perspective(120px) rotateX(-180.1deg) rotateY(0deg)
    }
    100% {
        transform: perspective(120px) rotateX(-180deg) rotateY(-179.9deg);
        -webkit-transform: perspective(120px) rotateX(-180deg) rotateY(-179.9deg);
    }
}

#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;
}


/*** Heading ***/
h1,
h2,
.fw-bold {
    font-weight: 800 !important;
}

h3,
h4,
.fw-semi-bold {
    font-weight: 700 !important;
}

h5,
h6,
.fw-medium {
    font-weight: 600 !important;
}


/*** Button ***/
.btn {
    font-family: 'Nunito', sans-serif;
    font-weight: 600;
    letter-spacing: 0.5px;
    padding: 12px 28px;
    border-radius: 8px;
    transition: var(--transition);
    position: relative;
    overflow: hidden;
    z-index: 1;
    border: none;
    box-shadow: var(--shadow);
}

.btn:before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 0;
    height: 100%;
    background-color: rgba(255, 255, 255, 0.2);
    transition: var(--transition);
    z-index: -1;
}

.btn:hover:before {
    width: 100%;
}

.btn-primary {
    background: var(--gradient);
    color: white;
    border: 2px solid var(--primary);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
}

.btn-secondary {
    background: white;
    color: var(--primary);
    border: 2px solid var(--primary);
}

.btn-secondary:hover {
    background: var(--primary);
    color: white;
    transform: translateY(-2px);
}

.btn-square {
    width: 36px;
    height: 36px;
    padding-left: 0;
    padding-right: 0;
    text-align: center;
}

.btn-sm-square {
    width: 30px;
    height: 30px;
}

.btn-lg-square {
    width: 48px;
    height: 48px;
}

.btn-square,
.btn-sm-square,
.btn-lg-square {
    padding-left: 0;
    padding-right: 0;
    text-align: center;
}


/*** Navbar ***/
.navbar-dark .navbar-nav .nav-link {
    font-family: 'Nunito', sans-serif;
    position: relative;
    margin-left: 25px;
    padding: 35px 0;
    color: #FFFFFF;
    font-size: 18px;
    font-weight: 600;
    outline: none;
    transition: .5s;
}

.sticky-top.navbar-dark .navbar-nav .nav-link {
    padding: 20px 0;
    color: var(--dark);
}

.navbar-dark .navbar-nav .nav-link:hover,
.navbar-dark .navbar-nav .nav-link.active {
    color: var(--primary);
}

.navbar-dark .navbar-brand h1 {
    color: #FFFFFF;
}

.navbar-dark .navbar-toggler {
    color: var(--primary) !important;
    border-color: var(--primary) !important;
}

@media (max-width: 991.98px) {
    .sticky-top.navbar-dark {
        position: relative;
        background: #FFFFFF;
    }

    .navbar-dark .navbar-nav .nav-link,
    .navbar-dark .navbar-nav .nav-link.show,
    .sticky-top.navbar-dark .navbar-nav .nav-link {
        padding: 10px 0;
        color: var(--dark);
    }

    .navbar-dark .navbar-brand h1 {
        color: var(--primary);
    }
}

@media (min-width: 992px) {
    .navbar-dark {
        position: absolute;
        width: 100%;
        top: 0;
        left: 0;
        border-bottom: 1px solid rgba(256, 256, 256, .1);
        z-index: 999;
    }
    
    .sticky-top.navbar-dark {
        position: fixed;
        background: #FFFFFF;
    }

    .navbar-dark .navbar-nav .nav-link::before {
        position: absolute;
        content: "";
        width: 0;
        height: 2px;
        bottom: -1px;
        left: 50%;
        background: var(--primary);
        transition: .5s;
    }

    .navbar-dark .navbar-nav .nav-link:hover::before,
    .navbar-dark .navbar-nav .nav-link.active::before {
        width: 100%;
        left: 0;
    }

    .navbar-dark .navbar-nav .nav-link.nav-contact::before {
        display: none;
    }

    .sticky-top.navbar-dark .navbar-brand h1 {
        color: var(--primary);
    }
}


/*** Carousel ***/
.carousel {
    position: relative;
    overflow: hidden;
    border-radius: 0 0 20px 20px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
}

/* Header Carousel */
#header-carousel {
    position: relative;
    width: 100%;
    z-index: 1;
    margin-top: 0;
    padding-top: 0;
}

.carousel-bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-size: cover;
    background-position: center center;
    background-repeat: no-repeat;
    background-attachment: fixed;
    transition: transform 0.5s ease-in-out;
    z-index: 1;
    filter: brightness(0.7);
}

.carousel-item {
    position: relative;
    height: 100vh;
    min-height: 600px;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    background: #000;
}

.carousel-caption {
    position: relative;
    z-index: 2;
    text-align: center;
    padding: 2rem;
    max-width: 1200px;
    margin: 0 auto;
    color: #fff;
    text-shadow: 0 2px 4px rgba(0,0,0,0.3);
}

/* Fix for content being hidden behind navbar */
.carousel-caption {
    padding-top: 120px;
}

/* Carousel Controls */
.carousel-control-prev,
.carousel-control-next {
    width: 10%;
    z-index: 10;
}

.carousel-control-prev-icon,
.carousel-control-next-icon {
    width: 3rem;
    height: 3rem;
    background-color: rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    background-size: 1.5rem;
    transition: all 0.3s ease;
}

.carousel-control-prev:hover .carousel-control-prev-icon,
.carousel-control-next:hover .carousel-control-next-icon {
    background-color: var(--primary);
    transform: scale(1.1);
}

/* Responsive adjustments */
@media (max-width: 992px) {
    .carousel-caption h1 {
        font-size: 2.5rem;
    }
    
    .carousel-caption p {
        font-size: 1.1rem;
    }
}

@media (max-width: 768px) {
    .carousel-item {
        height: 80vh;
        min-height: 500px;
    }
    
    .carousel-caption {
        padding-top: 100px;
    }
    
    .carousel-caption h1 {
        font-size: 2rem;
    }
    
    .carousel-caption p {
        font-size: 1rem;
    }
    
    .btn {
        padding: 0.5rem 1rem;
        font-size: 0.9rem;
    }
}

/* Animation for carousel items */
.carousel-item .carousel-caption h5 {
    animation-delay: 0.3s;
}

.carousel-item .carousel-caption h1 {
    animation-delay: 0.5s;
}

.carousel-item .carousel-caption p {
    animation-delay: 0.7s;
}

.carousel-item .carousel-caption .btn {
    animation-delay: 0.9s;
}

.carousel-caption {
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(to right, rgba(15, 23, 42, 0.9) 0%, rgba(15, 23, 42, 0.7) 100%);
    z-index: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem;
}

@media (max-width: 768px) {
    .carousel-item {
        height: 80vh;
        min-height: 500px;
    }
    
    .carousel-caption h1 {
        font-size: 2.5rem !important;
        margin-bottom: 1rem !important;
    }
    
    .carousel-caption p {
        font-size: 1rem;
        margin-bottom: 1.5rem !important;
    }
    
    .carousel-caption .btn {
        padding: 0.75rem 1.5rem;
        font-size: 0.9rem;
    }
}

@media (max-width: 576px) {
    .carousel-item {
        height: 70vh;
        min-height: 400px;
    }
    
    .carousel-caption h5 {
        font-size: 14px;
        font-weight: 500 !important;
        margin-bottom: 0.5rem !important;
    }

    .carousel-caption h1 {
        font-size: 1.8rem !important;
        margin-bottom: 1rem !important;
    }
    
    .carousel-caption .btn {
        display: block;
        width: 100%;
        margin: 0.5rem 0;
    }
    
    .carousel-caption .btn + .btn {
        margin-left: 0 !important;
    }
}

.carousel-control-prev,
.carousel-control-next {
    width: 10%;
}

.carousel-control-prev-icon,
.carousel-control-next-icon {
    width: 3rem;
    height: 3rem;
}


/*** Section Title ***/
.section-title::before {
    position: absolute;
    content: "";
    width: 150px;
    height: 5px;
    left: 0;
    bottom: 0;
    background: var(--primary);
    border-radius: 2px;
}

.section-title.text-center::before {
    left: 50%;
    margin-left: -75px;
}

.section-title.section-title-sm::before {
    width: 90px;
    height: 3px;
}

.section-title::after {
    position: absolute;
    content: "";
    width: 6px;
    height: 5px;
    bottom: 0px;
    background: #FFFFFF;
    -webkit-animation: section-title-run 5s infinite linear;
    animation: section-title-run 5s infinite linear;
}

.section-title.section-title-sm::after {
    width: 4px;
    height: 3px;
}

.section-title.text-center::after {
    -webkit-animation: section-title-run-center 5s infinite linear;
    animation: section-title-run-center 5s infinite linear;
}

.section-title.section-title-sm::after {
    -webkit-animation: section-title-run-sm 5s infinite linear;
    animation: section-title-run-sm 5s infinite linear;
}

@-webkit-keyframes section-title-run {
    0% {left: 0; } 50% { left : 145px; } 100% { left: 0; }
}

@-webkit-keyframes section-title-run-center {
    0% { left: 50%; margin-left: -75px; } 50% { left : 50%; margin-left: 45px; } 100% { left: 50%; margin-left: -75px; }
}

@-webkit-keyframes section-title-run-sm {
    0% {left: 0; } 50% { left : 85px; } 100% { left: 0; }
}


/*** Service ***/
.service-item {
    height: 100%;
    padding: 50px 30px 40px;
    text-align: center;
    border-radius: 16px;
    background: #FFFFFF;
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.05);
    transition: all 0.4s cubic-bezier(0.25, 0.8, 0.25, 1);
    position: relative;
    overflow: hidden;
    border: 1px solid rgba(0, 0, 0, 0.03);
    z-index: 1;
}

.service-item::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 5px;
    background: var(--gradient);
    transition: all 0.6s cubic-bezier(0.25, 0.8, 0.25, 1);
    opacity: 0;
    transform: translateY(-100%);
    z-index: -1;
}

.service-item::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, rgba(37, 99, 235, 0.03) 0%, rgba(0, 0, 0, 0.01) 100%);
    opacity: 0;
    transition: all 0.4s ease;
    z-index: -1;
}

.service-item:hover::before {
    opacity: 1;
    transform: translateY(0);
}

.service-item:hover::after {
    opacity: 1;
}

.service-item .service-icon {
    margin: 0 auto 30px auto;
    width: 100px;
    height: 100px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 25px;
    background: var(--gradient);
    transition: all 0.5s cubic-bezier(0.25, 0.8, 0.25, 1);
    position: relative;
    z-index: 1;
    box-shadow: 0 10px 25px rgba(37, 99, 235, 0.2);
    transform-style: preserve-3d;
    perspective: 1000px;
}

.service-item .service-icon::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--primary);
    border-radius: 25px;
    z-index: -1;
    transition: all 0.5s cubic-bezier(0.25, 0.8, 0.25, 1);
    opacity: 1;
    transform: translateZ(-1px);
}

.service-item i {
    font-size: 42px;
    color: #FFFFFF;
    transition: all 0.5s cubic-bezier(0.25, 0.8, 0.25, 1);
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.service-item h4 {
    margin-bottom: 18px;
    font-size: 22px;
    font-weight: 700;
    color: var(--dark);
    transition: all 0.3s ease;
    position: relative;
    display: inline-block;
    letter-spacing: -0.5px;
}

.service-item h4::after {
    content: '';
    position: absolute;
    width: 0;
    height: 3px;
    bottom: -8px;
    left: 50%;
    transform: translateX(-50%);
    background: var(--primary);
    transition: all 0.4s cubic-bezier(0.25, 0.8, 0.25, 1);
    border-radius: 2px;
}

.service-item p {
    margin-bottom: 25px;
    color: var(--text);
    transition: all 0.3s ease;
    line-height: 1.8;
    font-size: 15.5px;
    opacity: 0.9;
}

.service-item .btn {
    width: 48px;
    height: 48px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: var(--primary);
    background: rgba(37, 99, 235, 0.1);
    border-radius: 50%;
    transition: all 0.4s cubic-bezier(0.25, 0.8, 0.25, 1);
    border: none;
    box-shadow: 0 5px 20px rgba(37, 99, 235, 0.15);
    position: relative;
    overflow: hidden;
}

.service-item .btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--gradient);
    opacity: 0;
    transition: all 0.4s cubic-bezier(0.25, 0.8, 0.25, 1);
    z-index: -1;
}

.service-item .btn i {
    color: var(--primary);
    font-size: 20px;
    transition: all 0.3s ease;
}

.service-item .btn:hover {
    transform: translateY(-3px) scale(1.05);
    box-shadow: 0 10px 25px rgba(37, 99, 235, 0.25);
    color: #FFFFFF;
}

.service-item .btn:hover::before {
    opacity: 1;
}

.service-item .btn:hover i {
    color: #FFFFFF;
    transform: translateX(3px);
}

.service-item:hover {
    transform: translateY(-10px) scale(1.02);
    box-shadow: 0 25px 60px rgba(0, 0, 0, 0.1);
    background: #FFFFFF;
    border-color: rgba(37, 99, 235, 0.1);
}

.service-item:hover h4 {
    color: var(--primary);
    letter-spacing: 0;
}

.service-item:hover h4::after {
    width: 50px;
}

.service-item:hover .service-icon {
    transform: rotateY(180deg) scale(1.1);
    box-shadow: 0 15px 30px rgba(37, 99, 235, 0.3);
}

.service-item:hover .service-icon::before {
    opacity: 0;
    transform: translateZ(-1px) rotate(15deg);
}

/* Animation for service items */
@keyframes fadeInUpService {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.service-item {
    animation: fadeInUpService 0.6s ease-out forwards;
    opacity: 0;
}

.service-item:nth-child(1) { animation-delay: 0.1s; }
.service-item:nth-child(2) { animation-delay: 0.2s; }
.service-item:nth-child(3) { animation-delay: 0.3s; }
.service-item:nth-child(4) { animation-delay: 0.1s; }
.service-item:nth-child(5) { animation-delay: 0.2s; }
.service-item:nth-child(6) { animation-delay: 0.3s; }


/*** Testimonial ***/
.testimonial-carousel .owl-dots {
    margin-top: 15px;
    display: flex;
    align-items: flex-end;
    justify-content: center;
}

.testimonial-carousel .owl-dot {
    position: relative;
    display: inline-block;
    margin: 0 5px;
    width: 15px;
    height: 15px;
    background: #DDDDDD;
    border-radius: 2px;
    transition: .5s;
}

.testimonial-carousel .owl-dot.active {
    width: 30px;
    background: var(--primary);
}

.testimonial-carousel .owl-item.center {
    position: relative;
    z-index: 1;
}

.testimonial-carousel .owl-item .testimonial-item {
    transition: .5s;
}

.testimonial-carousel .owl-item.center .testimonial-item {
    background: #FFFFFF !important;
    box-shadow: 0 0 30px #DDDDDD;
}


/*** Team ***/
.team-item {
    transition: .5s;
}

.team-social {
    position: absolute;
    width: 100%;
    height: 100%;
    top: 0;
    left: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: .5s;
}

.team-social a.btn {
    position: relative;
    margin: 0 3px;
    margin-top: 100px;
    opacity: 0;
}

.team-item:hover {
    box-shadow: 0 0 30px #DDDDDD;
}

.team-item:hover .team-social {
    background: rgba(9, 30, 62, .7);
}

.team-item:hover .team-social a.btn:first-child {
    opacity: 1;
    margin-top: 0;
    transition: .3s 0s;
}

.team-item:hover .team-social a.btn:nth-child(2) {
    opacity: 1;
    margin-top: 0;
    transition: .3s .05s;
}

.team-item:hover .team-social a.btn:nth-child(3) {
    opacity: 1;
    margin-top: 0;
    transition: .3s .1s;
}

.team-item:hover .team-social a.btn:nth-child(4) {
    opacity: 1;
    margin-top: 0;
    transition: .3s .15s;
}

.team-item .team-img img,
.blog-item .blog-img img  {
    transition: .5s;
}

.team-item:hover .team-img img,
.blog-item:hover .blog-img img {
    transform: scale(1.15);
}


/*** Miscellaneous ***/
@media (min-width: 991.98px) {
    .facts {
        position: relative;
        margin-top: -75px;
        z-index: 1;
    }
}

.back-to-top {
    position: fixed;
    display: none;
    right: 45px;
    bottom: 45px;
    z-index: 99;
}

.bg-header {
    background: linear-gradient(rgba(9, 30, 62, .7), rgba(9, 30, 62, .7)), url(../img/carousel-1.jpg) center center no-repeat;
    background-size: cover;
}

.link-animated a {
    transition: .5s;
}

.link-animated a:hover {
    padding-left: 10px;
}

@media (min-width: 767.98px) {
    .footer-about {
        margin-bottom: -75px;
    }
}