/********** Template CSS **********/
html,
body {
    overflow-x: hidden;
    width: 100%;
}

.back-to-top {
    position: fixed;
    display: none;
    right: 30px;
    bottom: 30px;
    z-index: 99;
}

.fw-medium {
    font-weight: 500;
}


/*** 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 ***/
.btn {
    transition: .5s;
    font-weight: 500;
}

.btn-primary,
.btn-outline-primary:hover {
    color: var(--bs-light);
}

.btn-secondary,
.btn-outline-secondary:hover {
    color: var(--bs-dark);
}

.btn-square {
    width: 38px;
    height: 38px;
}

.btn-sm-square {
    width: 32px;
    height: 32px;
}

.btn-lg-square {
    width: 48px;
    height: 48px;
}

/* Premium Glass Buttons */
.btn-glass-light {
    background: rgba(255, 255, 255, 0.95);
    color: var(--bs-primary);
    border: 1px solid rgba(255, 255, 255, 1);
    font-weight: 600;
    backdrop-filter: blur(5px);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

.btn-glass-light:hover {
    background: #ffffff;
    color: var(--bs-dark);
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(255, 255, 255, 0.4);
}

.btn-glass-primary {
    background: rgba(3, 27, 78, 0.6);
    color: #ffffff;
    border: 1px solid rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(5px);
}

.btn-glass-primary:hover {
    background: rgba(3, 27, 78, 0.9);
    color: #ffffff;
    border-color: rgba(255, 255, 255, 0.5);
    transform: translateY(-2px);
}

.btn-square,
.btn-sm-square,
.btn-lg-square {
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50px;
    font-weight: normal;
}

.icon-box-primary,
.icon-box-light {
    position: relative;
    padding: 0 0 10px 10px;
    z-index: 1;
}

.icon-box-primary i,
.icon-box-light i {
    font-size: 60px;
    line-height: 0;
}

.icon-box-primary::before,
.icon-box-light::before {
    position: absolute;
    content: "";
    width: 35px;
    height: 35px;
    left: 0;
    bottom: 0;
    border-radius: 35px;
    transition: .5s;
    z-index: -1;
}

.icon-box-primary::before {
    background: var(--bs-primary);
}

.icon-box-light::before {
    background: var(--bs-light);
}



/*** Site Header & Navbar ***/
.site-header {
    transition: all 0.5s;
    z-index: 999;
    padding-top: 20px;
    /* Gentle shift down */
}

.site-header.fixed-top {
    background: transparent;
    /* Initial state, JS can toggle this or we keep it transparent unless scrolled */
}

/* Add a class via JS 'scrolled' if needed, or just style for dark bg availability */
.site-header.scrolled {
    background: rgba(3, 27, 78, 0.95);
    backdrop-filter: blur(10px);
    box-shadow: 0 2px 15px rgba(0, 0, 0, 0.1);
}

.navbar-brand .brand-text {
    font-weight: 700;
    letter-spacing: 1px;
    font-size: 2rem;
    /* Compact logo size */
}

.text-primary-light {
    color: #4ac4f3;
    /* Lighter blue for contrast on dark bg */
}

.navbar-dark .navbar-nav .nav-link {
    color: rgba(255, 255, 255, 0.8) !important;
    font-weight: 500;
    padding: 25px 15px;
    font-family: 'Red Rose', serif;
    text-transform: uppercase;
    font-size: 14px;
    letter-spacing: 1px;
    transition: .3s;
}

.navbar-dark .navbar-nav .nav-link:hover,
.navbar-dark .navbar-nav .nav-link.active {
    color: #ffffff !important;
    text-shadow: 0 0 10px rgba(74, 196, 243, 0.5);
}

@media (max-width: 991.98px) {
    .site-header {
        background: rgba(3, 27, 78, 1) !important;
        /* Solid dark on mobile */
    }

    .navbar-collapse {
        margin-top: 15px;
        border-top: 1px solid rgba(255, 255, 255, 0.1);
        padding-bottom: 15px;
    }

    .navbar-dark .navbar-nav .nav-link {
        padding: 10px 0;
    }
}


/*** Hero Header ***/
.hero-header {
    background: linear-gradient(rgba(3, 27, 78, 0.6), rgba(3, 27, 78, 0.6)), url(../img/cdc-9JucsQ_5p_8-unsplash.jpg) center center no-repeat;
    background-color: #031b4e;
    background-size: cover;
    margin-top: -95px !important;
    /* Pull up behind the header */
    min-height: calc(100vh + 120px);
    /* Slightly shorter */
    display: flex;
    align-items: center;
    padding-top: 220px !important;
    /* SIGNIFICANTLY increased to clear header */
}

.hero-content h1 {
    font-weight: 700;
    letter-spacing: -0.5px;
    font-size: 3rem;
    /* Reduced from 3.5rem */
    line-height: 1.2;
    /* Compact hero text */
}

.hero-header .hero-content p {
    margin-bottom: 4rem !important;
    /* further reduced for compactness */
    font-size: 1.1rem;
    /* slightly thinner/smaller */
}

.hero-header .hero-address {
    margin-top: 40px;
    display: inline-block;
    padding: 12px 30px;
    background: rgba(0, 0, 0, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.4);
    border-radius: 0 !important;
    /* Force rectangular */
    color: #fff;
    font-size: 1.1rem;
    letter-spacing: 0.5px;
    transition: 0.3s;
}

.hero-header .hero-address:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: translateY(-2px);
}

/*** Page Header ***/
.page-header {
    background: linear-gradient(rgba(3, 27, 78, 0.6), rgba(3, 27, 78, 0.6)), url(../img/cdc-9JucsQ_5p_8-unsplash.jpg) center center no-repeat;
    background-color: #031b4e;
    background-size: cover;
    margin-top: -95px !important;
    min-height: 400px;
    padding-top: 15rem !important;
    padding-bottom: 5rem !important;
}

.page-header .breadcrumb-item,
.page-header .breadcrumb-item a {
    color: #fca311 !important;
    /* Premium accent color */
    font-weight: 500;
}

.page-header .display-2 {
    color: #fff;
    font-weight: 700;
}



.btn-primary-gradient {
    background: linear-gradient(45deg, #031b4e 0%, #0d6efd 100%);
    color: #fff;
    border: none;
    transition: 0.5s;
}

.btn-primary-gradient:hover {
    background: linear-gradient(45deg, #0d6efd 0%, #031b4e 100%);
    transform: translateY(-3px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.2);
    color: #fff;
}


/*** Features ***/
.feature {
    background: linear-gradient(rgba(3, 27, 78, .3), rgba(3, 27, 78, .3)), url(../img/feature.jpg) left center no-repeat;
    background-size: cover;
}

.feature-row {
    box-shadow: 0 0 45px rgba(0, 0, 0, .08);
}

.feature-item {
    border-color: rgba(0, 0, 0, .03) !important;
}

.experience .progress {
    height: 5px;
}

.experience .progress .progress-bar {
    width: 0px;
    transition: 3s;
}

.experience .nav-pills .nav-link {
    color: var(--dark);
}

.experience .nav-pills .nav-link.active {
    color: #FFFFFF;
}

.experience .tab-content hr {
    width: 30px;
}


/*** About ***/
.about-fact {
    width: 220px;
    height: 220px;
    box-shadow: 0 0 30px rgba(0, 0, 0, .1);
}

@media (min-width: 576px) {
    .about-fact.mt-n130 {
        margin-top: -130px;
    }
}

.btn-play {
    position: relative;
    display: block;
    box-sizing: content-box;
    width: 36px;
    height: 46px;
    border-radius: 100%;
    border: none;
    outline: none !important;
    padding: 18px 20px 20px 28px;
    background: var(--bs-primary);
}

.btn-play:before {
    content: "";
    position: absolute;
    z-index: 0;
    left: 50%;
    top: 50%;
    transform: translateX(-50%) translateY(-50%);
    display: block;
    width: 90px;
    height: 90px;
    background: var(--bs-primary);
    border-radius: 100%;
    animation: pulse-border 1500ms ease-out infinite;
}

.btn-play:after {
    content: "";
    position: absolute;
    z-index: 1;
    left: 50%;
    top: 50%;
    transform: translateX(-50%) translateY(-50%);
    display: block;
    width: 90px;
    height: 90px;
    background: var(--bs-primary);
    border-radius: 100%;
    transition: all 200ms;
}

.btn-play span {
    display: block;
    position: relative;
    z-index: 3;
    width: 0;
    height: 0;
    left: 3px;
    border-left: 30px solid #FFFFFF;
    border-top: 18px solid transparent;
    border-bottom: 18px solid transparent;
}

@keyframes pulse-border {
    0% {
        transform: translateX(-50%) translateY(-50%) translateZ(0) scale(1);
        opacity: 1;
    }

    100% {
        transform: translateX(-50%) translateY(-50%) translateZ(0) scale(2);
        opacity: 0;
    }
}

.modal-video .modal-dialog {
    position: relative;
    max-width: 800px;
    margin: 60px auto 0 auto;
}

.modal-video .modal-body {
    position: relative;
    padding: 0px;
}

.modal-video .close {
    position: absolute;
    width: 30px;
    height: 30px;
    right: 0px;
    top: -30px;
    z-index: 999;
    font-size: 30px;
    font-weight: normal;
    color: #FFFFFF;
    background: #000000;
    opacity: 1;
}


/*** Service ***/
.container-service {
    position: relative;
}

.container-service::before {
    position: absolute;
    content: '';
    background: var(--bs-light);
    width: 100%;
    height: 100%;
    left: 0px;
    top: 0px;
    clip-path: polygon(0 0, 100% 0, 100% 30%, 0 70%);
    z-index: -1;
}

.service-item {
    position: relative;
    height: 100%;
    padding: 45px 30px;
    background: var(--bs-white);
    box-shadow: 0 0 45px rgba(0, 0, 0, .05);
}

.service-item::before {
    position: absolute;
    content: "";
    width: 100%;
    height: 0;
    left: 0;
    bottom: 0;
    transition: .5s;
    background: var(--bs-primary);
}

.service-item:hover::before {
    height: 100%;
    top: 0;
}

.service-item * {
    position: relative;
    transition: .5s;
    z-index: 1;
}

.service-item:hover h5,
.service-item:hover p {
    color: var(--bs-white);
}

.service-item:hover .icon-box-primary::before {
    background: var(--bs-dark);
}

.service-item:hover .icon-box-primary i {
    color: var(--bs-white) !important;
}


/*** Team ***/
.container-team {
    position: relative;
}

.container-team::before {
    position: absolute;
    content: '';
    background: var(--bs-light);
    width: 100%;
    height: 100%;
    left: 0px;
    top: 0px;
    clip-path: polygon(0 70%, 100% 30%, 100% 100%, 0% 100%);
    z-index: -1;
}

.team-item {
    background: var(--bs-white);
    box-shadow: 0 0 45px rgba(0, 0, 0, .05);
}

.team-item .team-social {
    position: absolute;
    width: 0;
    height: 100%;
    top: 0;
    right: 0;
    transition: .5s;
    background: var(--bs-primary);
    display: flex;
    align-items: center;
    justify-content: center;
}

.team-item:hover .team-social {
    width: 100%;
    left: 0;
}

.team-item .team-social .btn {
    opacity: 0;
    transition: .5s;
}

.team-item:hover .team-social .btn {
    opacity: 1;
}


/*** Testimonial ***/
.testimonial {
    background: linear-gradient(rgba(3, 27, 78, .3), rgba(3, 27, 78, .3)), url(../img/testimonial.jpg) left center no-repeat;
    background-size: cover;
}

.testimonial-item img {
    width: 60px !important;
    height: 60px !important;
    border-radius: 60px;
}

.testimonial-carousel .owl-nav {
    position: absolute;
    top: 0;
    right: 0;
    display: flex;
}

.testimonial-carousel .owl-nav .owl-prev,
.testimonial-carousel .owl-nav .owl-next {
    margin-left: 15px;
    color: var(--bs-primary);
    font-size: 30px;
    line-height: 0;
    transition: .5s;
}

.testimonial-carousel .owl-nav .owl-prev:hover,
.testimonial-carousel .owl-nav .owl-next:hover {
    color: var(--bs-dark);
}


/*** Contact ***/
@media (min-width: 992px) {
    .contact-info::after {
        position: absolute;
        content: "";
        width: 0px;
        height: 100%;
        top: 0;
        left: 50%;
        border-left: 1px dashed rgba(255, 255, 255, .2);
    }
}

@media (max-width: 991.98px) {
    .contact-info::after {
        position: absolute;
        content: "";
        width: 100%;
        height: 0px;
        top: 50%;
        left: 0;
        border-top: 1px dashed rgba(255, 255, 255, .2);
    }
}


/*** Footer ***/
.footer {
    background: linear-gradient(rgba(3, 27, 78, .3), rgba(3, 27, 78, .3)), url(../img/footer.png) center center no-repeat;
    background-size: contain;
}

@media (min-width: 992px) {
    .footer::after {
        position: absolute;
        content: "";
        width: 0px;
        height: 100%;
        top: 0;
        left: 50%;
        border-left: 1px dashed rgba(255, 255, 255, .2);
    }
}

.footer .btn.btn-link {
    display: block;
    margin-bottom: 5px;
    padding: 0;
    text-align: left;
    color: rgba(255, 255, 255, .5);
    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: rgba(255, 255, 255, .5);
    margin-right: 10px;
}

.footer .btn.btn-link:hover {
    color: var(--bs-primary);
    letter-spacing: 1px;
    box-shadow: none;
}

.copyright {
    border-top: 1px dashed rgba(255, 255, 255, .2);
}

.copyright a {
    color: var(--bs-white);
}


/*** Legacy Navbar (For non-index pages) ***/
.sticky-top {
    top: -100px;
    transition: .5s;
}

.navbar .navbar-nav .nav-link {
    margin-right: 35px;
    padding: 20px 0;
    color: var(--bs-dark);
    font-size: 18px;
    font-weight: 500;
    outline: none;
}

.navbar .navbar-nav .nav-link:hover,
.navbar .navbar-nav .nav-link.active {
    color: var(--bs-primary);
}

.navbar .dropdown-toggle::after {
    border: none;
    content: "\f107";
    font-family: "Font Awesome 5 Free";
    font-weight: 900;
    vertical-align: middle;
    margin-left: 8px;
}

@media (max-width: 991.98px) {
    .navbar .navbar-nav .nav-link {
        margin-right: 0;
        padding: 10px 0;
    }

    .navbar .navbar-nav {
        margin-top: 15px;
        border-top: 1px solid #EEEEEE;
    }
}

.navbar .nav-item:hover .dropdown-menu {
    top: 100%;
    visibility: visible;
    transition: .5s;
    opacity: 1;
}


/*** Mobile Responsiveness & Compact Mode ***/
@media (max-width: 991.98px) {

    /* Compact Hero Header */
    .hero-header {
        margin-top: 0 !important;
        /* Reset negative margin */
        padding-top: 100px !important;
        /* Reduced top padding */
        min-height: auto !important;
        /* Allow content to dictate height */
        padding-bottom: 60px !important;
        background-position: center top;
    }

    /* Thinner & Smaller Headings */
    .hero-content h1 {
        font-size: 2.2rem !important;
        /* Smaller text */
        font-weight: 600 !important;
        /* Thinner weight */
        line-height: 1.2;
        margin-bottom: 15px !important;
    }

    .hero-header .hero-content p {
        font-size: 1rem !important;
        margin-bottom: 3rem !important;
        /* Reduced spacing */
        font-weight: 400;
        /* Thinner */
    }

    /* Compact Buttons */
    .hero-header .btn {
        padding: 10px 30px !important;
        /* Smaller buttons */
        font-size: 0.9rem;
    }

    /* Compact Address */
    .hero-header .hero-address {
        margin-top: 30px;
        padding: 8px 20px;
        font-size: 0.9rem;
    }

    /* Compact Sub-page Headed */
    .page-header {
        margin-top: 0 !important;
        padding-top: 100px !important;
        padding-bottom: 40px !important;
        min-height: 250px !important;
        /* Much smaller */
    }

    .page-header .display-2 {
        font-size: 2rem !important;
        font-weight: 600 !important;
    }

    /* General Layout */
    .navbar {
        background: transparent !important;
        /* Transparent on mobile */
        padding: 10px 0;
    }

    .navbar-brand h1 {
        font-size: 1.8rem;
        color: #fff !important;
        /* Restore WHITE text for contrast against dark hero */
    }

    .navbar-toggler {
        color: #fff !important;
        border-color: rgba(255, 255, 255, 0.5) !important;
    }

    .navbar-toggler-icon {
        background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 30 30'%3e%3cpath stroke='rgba(255, 255, 255, 1)' stroke-linecap='round' stroke-miterlimit='10' stroke-width='2' d='M4 7h22M4 15h22M4 23h22'/%3e%3c/svg%3e") !important;
    }
}