/********** Template CSS **********/
:root {
    --primary: #009CFF;
    --secondary: #777777;
    --light: #F8F8F8;
    --dark: #252525;
}

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


/*** 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;
}


/*** Button ***/
@media (max-width: 991px) {
    .navbar .btn {
        font-size: 15px;
        font-weight: 600;
    }
}




/* ================= NAVBAR ================= */

.navbar .navbar-nav .nav-link {
    margin-right: 30px;
    padding: 20px 0;
    color: #fff;
    font-weight: 500;
}

.navbar .navbar-nav .nav-link:hover {
    color: #000;
}

/* ================= DROPDOWN BASE ================= */

.dropdown-menu {
    border-radius: 8px;
    box-shadow: 0 12px 30px rgba(0,0,0,0.15);
}

.main-menu {
    position: absolute;
    min-width: 240px;
}

/* ================= SUBMENU FIX ================= */

.dropdown-submenu {
    position: relative;
}

.dropdown-submenu > .dropdown-menu {
    position: absolute;
    left: 100%;
    top: 0;

    min-width: 260px;
    max-height: 75vh;
    overflow-y: auto;

    display: none;
}
/* === MOBILE SUBMENU FIX === */
@media (max-width: 991.98px) {

    .dropdown-submenu > .dropdown-menu {
        position: static;
        width: 100%;
        max-height: none;
        box-shadow: none;
        margin-left: 0;
        display: none;
    }

    .dropdown-submenu.open > .dropdown-menu {
        display: block;
    }

    .dropdown-submenu > .dropdown-item::after {
        content: "›";
        float: right;
        transform: rotate(90deg);
    }
}


/* SHOW SUBMENU */
.dropdown-submenu:hover > .dropdown-menu {
    display: block;
}

/* ================= PREVENT BOOTSTRAP OVERRIDE ================= */
.dropdown-menu[data-bs-popper] {
    top: auto;
    left: auto;
}



/*** Video Header ***/
.video-banner {
    position: relative;
    height: 100vh;
    overflow: hidden;
}

.video-banner video {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* LIGHT OVERLAY (reduced darkness) */
.video-banner::after {
    content: "";
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.25); /* reduced from 0.5 */
    z-index: 1;
}

.video-caption {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    z-index: 2;
}

/* Mobile optimization */
@media (max-width: 768px) {
    .video-banner {
        height: 500px;
    }

    /* slightly darker on mobile for text clarity */
    .video-banner::after {
        background: rgba(0, 0, 0, 0.35);
    }
}

/*** Page Header ***/
.page-header {
    background: linear-gradient(
        rgba(0, 0, 0, 0.5),
        rgba(0, 0, 0, 0.5)
    ), url(../img/carousel-1.jpg) center center no-repeat;
    background-size: cover;
}

.breadcrumb-item + .breadcrumb-item::before {
    color: var(--secondary);
}

.page-header .breadcrumb-item + .breadcrumb-item::before {
    color: var(--light);
}


/*** Section Title ***/
.section-title {
    position: relative;
    display: inline-block;
    text-transform: uppercase;
}

.section-title::before {
    position: absolute;
    content: "";
    width: calc(100% + 80px);
    height: 2px;
    top: 4px;
    left: -40px;
    background: var(--primary);
    z-index: -1;
}

.section-title::after {
    position: absolute;
    content: "";
    width: calc(100% + 120px);
    height: 2px;
    bottom: 4px;
    left: -60px;
    background: var(--primary);
    z-index: -1;
}

.section-title.text-start::before {
    width: calc(100% + 40px);
    left: 0;
}

.section-title.text-start::after {
    width: calc(100% + 60px);
    left: 0;
}



/*** Img / Video Border ***/
.img-border {
    position: relative;
    height: 100%;
    min-height: 400px;
}

.img-border::before {
    position: absolute;
    content: "";
    top: 0;
    left: 0;
    right: 3rem;
    bottom: 3rem;
    border: 5px solid var(--primary);
    border-radius: 6px;
}

/* Applies to BOTH image & video */
.img-border img,
.img-border video {
    position: absolute;
    top: 3rem;
    left: 3rem;
    width: calc(100% - 3rem);
    height: calc(100% - 3rem);
    object-fit: contain;
background: transparent;
    border-radius: 6px;
}
/*** Rectangular Video Border ***/
.img-border {
    position: relative;
    width: 100%;
    height: auto;
    aspect-ratio: 16 / 9;      /* 🔑 rectangular video ratio */
}

/* Border frame */
.img-border::before {
    content: "";
    position: absolute;
    inset: 0;
    border: 4px solid var(--primary);
    border-radius: 10px;       /* softer, modern rectangle */
}

/* Video or Image inside */
.img-border img,
.img-border video {
    position: absolute;
    inset: 8px;                /* spacing inside border */
    width: calc(100% - 16px);
    height: calc(100% - 16px);
    object-fit: contain;       /* no cropping */
    background: transparent;
    border-radius: 6px;
}


/*** Facts ***/
.fact-item {
    transition: .5s;
}

.fact-item:hover {
    margin-top: -10px;
    background: #FFFFFF !important;
    box-shadow: 0 0 45px rgba(0, 0, 0, .07);
}


/*** Service ***/
.service-item {
    box-shadow: 0 0 45px rgba(0, 0, 0, .07);
    border: 1px solid transparent;
    transition: .5s;
}

.service-item:hover {
    margin-top: -10px;
    box-shadow: none;
    border: 1px solid #DEE2E6;
}


/*** Feature ***/
.progress {
    height: 5px;
}

.progress .progress-bar {
    width: 0px;
    transition: 3s;
}


/*** Project ***/
.project-item a {
    position: absolute;
    width: 100%;
    height: 100%;
    top: 0;
    left: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #FFFFFF;
    background: rgba(0, 0, 0, .5);
    border-radius: 6px;
    opacity: 0;
    transition: .5s;
}

.project-item:hover a {
    opacity: 1;
}

.project-carousel .owl-dots {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
    margin-top: 20px;
}

.project-carousel .owl-dot {
    width: 35px;
    height: 35px;
    margin: 3px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid #DEE2E6;
    border-radius: 35px;
    transition: .5s;
}

.project-carousel .owl-dot:hover,
.project-carousel .owl-dot.active {
    color: #FFFFFF;
    border-color: var(--primary);
    background: var(--primary);
}


/*** Team ***/
.team-item {
    box-shadow: 0 0 45px rgba(0, 0, 0, .07);
}

.team-item .team-text {
    position: relative;
    height: 65px;
    overflow: hidden;
}

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

.team-item:hover .team-title {
    top: -65px;
}

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

.team-item .team-social .btn {
    margin: 0 3px;
}

.team-item:hover .team-social {
    top: 0;
}


/*** Testimonial ***/

.testimonial-carousel .owl-item .testimonial-item img {
    width: 60px;
    height: 60px;
}

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

.testimonial-carousel .owl-item.center .testimonial-item {
    background: var(--primary) !important;
}

.testimonial-carousel .owl-item.center .testimonial-item * {
    color: #FFFFFF !important;
}

.testimonial-carousel .owl-nav {
    margin-top: 30px;
    display: flex;
    justify-content: center;
}

.testimonial-carousel .owl-nav .owl-prev,
.testimonial-carousel .owl-nav .owl-next {
    margin: 0 12px;
    width: 50px;
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid #DEE2E6;
    border-radius: 50px;
    font-size: 18px;
    transition: .5s;
}

.testimonial-carousel .owl-nav .owl-prev:hover,
.testimonial-carousel .owl-nav .owl-next:hover {
    color: #FFFFFF;
    border-color: var(--primary);
    background: var(--primary);
}


/*** Footer ***/
.footer .btn.btn-link {
    display: block;
    margin-bottom: 5px;
    padding: 0;
    text-align: left;
    color: var(--secondary);
    font-weight: normal;
    text-transform: capitalize;
    transition: .3s;
}

.footer .btn.btn-link::before {
    position: relative;
    content: "\f105";
    font-family: "Font Awesome 5 Free";
    font-weight: 900;
    color: var(--secondary);
    margin-right: 10px;
}

.footer .btn.btn-link:hover {
    color: var(--primary);
    letter-spacing: 1px;
    box-shadow: none;
}

.footer .copyright {
    padding: 25px 0;
    font-size: 15px;
    border-top: 1px solid rgba(256, 256, 256, .1);
}

.footer .copyright a {
    color: var(--light);
}

.footer .copyright a:hover {
    color: var(--primary);
}

/* Prevent Bootstrap auto-opening nested menus */
.dropdown-menu .dropdown-menu {
    display: none !important;
}

.dropdown-submenu {
    position: relative;
}

.submenu-right {
    position: absolute;
    top: 0;                 /* align with parent */
    left: 100%;
    margin-left: -2px;      /* keeps hover smooth */
    margin-top: -6px;       /* 🔑 aligns with Active Component text */

    z-index: 1000;

    width: max-content;
    min-width: max-content;
    white-space: nowrap;

    padding: 6px 0;
}



/* Show submenu ONLY on hover */
.dropdown-submenu:hover > .submenu-right {
    display: block !important;
}
.dropdown-submenu > a {
    padding-right: 30px; /* improves hover comfort */
}

.dropdown-submenu > a {
    padding-top: 8px;
    padding-bottom: 8px;
}
.submenu-right .dropdown-item {
    padding: 8px 18px;
    font-size: 14.5px;
}

.submenu-right .dropdown-item:hover {
    background-color: #f2f6ff;
    color: #0d6efd;
}
/* Main dropdown menu items (same style as submenu) */
.dropdown-menu > li > .dropdown-item {
    padding: 8px 18px;
    font-size: 14.5px;
}

/* Hover effect for main menu */
.dropdown-menu > li > .dropdown-item:hover {
    background-color: #f2f6ff;
    color: #0d6efd;
}


/* ===== Footer Equal Layout ===== */
.footer-main {
    display: flex;
    flex-wrap: wrap;
}

.footer-col {
    display: flex;
    flex-direction: column;
}

/* ===== Gallery Image ===== */
.footer-gallery-img {
    width: 100%;
    height: 170px;              /* desktop height */
    object-fit: cover;
    border-radius: 8px;
}

/* ===== Mobile Fixes ===== */
@media (max-width: 768px) {

    .footer-main {
        row-gap: 30px;
    }

    .footer-gallery-img {
        height: auto;           /* 👈 FIXES MOBILE ISSUE */
        max-height: 220px;
        object-fit: contain;    /* 👈 no awkward crop */
    }

    .footer-col {
        text-align: left;
    }
}

.company-logo {
    height: 45px;              /* Matches Bootstrap h1 visual size */
    width: auto;
    display: block;
}

