/********** Template CSS **********/
:root {
    --primary: #355EFC;
    --secondary: #E93C05;
    --tertiary: #555555;
    --light: #DFE4FD;
    --dark: #011A41;
}

.back-to-top {
    position: fixed;
    display: none;
    right: 30px;
    bottom: 30px;
    z-index: 99;
}

h1,
.h1,
h2,
.h2,
.fw-bold {
    font-weight: 700 !important;
}

h3,
.h3,
h4,
.h4,
.fw-medium {
    font-weight: 600 !important;
}

h5,
.h5,
h6,
.h6,
.fw-semi-bold {
    font-weight: 500 !important;
}


/*** Spinner ***/
html.visited #spinner {
    display: none !important;
    visibility: hidden !important;
    opacity: 0 !important;
}

#spinner {
    opacity: 0;
    visibility: hidden;
    transition: opacity .5s ease-out, visibility 0s linear .5s;
    z-index: 99999;
}

#spinner.show {
    visibility: visible;
    opacity: 1;
}

.splash-logo {
    width: 150px;
    /* Adjust size as needed */
    height: auto;
    animation: pulse 1.5s infinite ease-in-out;
}

@keyframes pulse {
    0% {
        transform: scale(0.95);
        opacity: 0.8;
    }

    50% {
        transform: scale(1.05);
        opacity: 1;
    }

    100% {
        transform: scale(0.95);
        opacity: 0.8;
    }
}


/*** Button ***/
.btn {
    font-weight: 500;
}

/*** Header Loader ***/
.header-loader {
    width: 100%;
    height: 4px;
    /* Adjust height as needed */
    background-color: transparent;
    position: relative;
    z-index: 1031;
    /* Above navbar (which is usually around 1030 in bootstrap) or just high enough */
    overflow: hidden;
    visibility: hidden;
    opacity: 0;
    transition: opacity 0.5s ease;
}

.header-loader.show {
    visibility: visible;
    opacity: 1;
}

.header-loader .loader-bar {
    width: 100%;
    height: 100%;
    background-color: var(--secondary);
    /* Use secondary color for visibility */
    animation: loader-animation 2s infinite linear;
    transform-origin: 0% 50%;
}

@keyframes loader-animation {
    0% {
        transform: translateX(0) scaleX(0);
    }

    40% {
        transform: translateX(0) scaleX(0.4);
    }

    100% {
        transform: translateX(100%) scaleX(0.5);
    }
}

.btn-primary,
.btn-outline-primary:hover {
    color: var(--light);
}

.btn-square {
    width: 38px;
    height: 38px;
}

.btn-sm-square {
    width: 32px;
    height: 32px;
}

.btn-lg-square {
    width: 48px;
    height: 48px;
}

.btn-square,
.btn-sm-square,
.btn-lg-square {
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: normal;
}


/*** Navbar ***/
.fixed-top {
    transition: .5s;
    box-shadow: 0 .5rem 1rem rgba(0, 0, 0, .15) !important;
    /* Thicker shadow (Bootstrap default shadow) */
}

.top-bar {
    height: 45px;
    background: var(--dark);
    color: #FFFFFF;
}

.top-bar small {
    color: rgba(255, 255, 255, .7);
}

.top-bar i {
    color: var(--primary) !important;
}

.navbar .dropdown-toggle::after {
    border: none;
    content: "\f107";
    font-family: "Font Awesome 5 Free";
    font-weight: 900;
    vertical-align: middle;
    margin-left: 8px;
}

.navbar {
    background: #FFFFFF;
    transition: .5s;
}

/* Hero carousel image sizing: keep rectangular crop without inline styles */
#header-carousel .hero-img {
    width: 100%;
    height: 520px;
    object-fit: cover;
}

@media (max-width: 992px) {
    #header-carousel .hero-img {
        height: 420px;
    }
}

@media (max-width: 576px) {
    #header-carousel .hero-img {
        height: 300px;
    }
}

.navbar .navbar-nav .nav-link {
    padding: 25px 15px;
    color: #000000;
    font-weight: 500;
    outline: none;
}

.navbar .navbar-nav .nav-link:hover,
.navbar .navbar-nav .nav-link.active {
    color: var(--primary);
}

.navbar-brand img {
    /* filter: brightness(0) invert(1); */
    mix-blend-mode: normal !important;
    max-height: 80px;
    /* Adjust height based on new logo */
    width: auto;
}

.navbar .navbar-toggler {
    color: var(--primary) !important;
    border-color: var(--primary) !important;
}

.navbar .navbar-toggler-icon {
    /* filter: brightness(0) invert(1); */
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 30 30'%3e%3cpath stroke='rgba%280, 0, 0, 0.55%29' stroke-linecap='round' stroke-miterlimit='10' stroke-width='2' d='M4 7h22M4 15h22M4 23h22'/%3e%3c/svg%3e");
}


@media (max-width: 991.98px) {
    .navbar .navbar-nav {
        margin-top: 10px;
        border-top: 1px solid rgba(0, 0, 0, .1);
        background: #FFFFFF;
    }

    .navbar .navbar-nav .nav-link {
        padding: 10px 15px;
    }
}

@media (min-width: 992px) {
    .navbar .nav-item .dropdown-menu {
        display: block;
        visibility: hidden;
        top: 100%;
        transform: rotateX(-75deg);
        transform-origin: 0% 0%;
        transition: .5s;
        opacity: 0;
        background: #FFFFFF;
        box-shadow: 0 8px 15px rgba(0, 0, 0, 0.1);
    }

    .navbar .nav-item:hover .dropdown-menu {
        transform: rotateX(0deg);
        visibility: visible;
        transition: .5s;
        opacity: 1;
    }

    .navbar .dropdown-item {
        color: var(--dark);
    }

    .navbar .dropdown-item:hover {
        background: var(--light);
        color: var(--primary);
    }
}


.carousel-item::before {
    content: "";
    position: absolute;
    width: 100%;
    height: 100%;
    top: 0;
    left: 0;
    background: rgba(1, 26, 65, .5);
    z-index: 1;
}

/* Fix for Hero Section Height */
.header-carousel .carousel-item {
    height: 700px;
}

.header-carousel .carousel-item img {
    height: 100%;
    object-fit: cover;
}

@media (max-width: 991.98px) {
    .header-carousel .carousel-item {
        height: 500px;
        /* Smaller height for tablets/mobile */
    }
}

.carousel-caption {
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: start;
    z-index: 2;
}

.carousel-caption h1,
.carousel-caption p {
    color: #FFFFFF !important;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, .5);
}

.carousel-caption .text-primary {
    color: var(--light) !important;
    border-color: var(--light) !important;
}

.carousel-control-prev,
.carousel-control-next {
    width: 3rem;
}

.carousel-control-prev-icon,
.carousel-control-next-icon {
    width: 3rem;
    height: 3rem;
    background-color: var(--primary);
    border: 10px solid var(--primary);
}

.carousel-control-prev-icon {
    border-radius: 0 3rem 3rem 0;
}

.carousel-control-next-icon {
    border-radius: 3rem 0 0 3rem;
}

@media (max-width: 768px) {
    #header-carousel .carousel-item {
        position: relative;
        min-height: 450px;
    }

    #header-carousel .carousel-item img {
        position: absolute;
        width: 100%;
        height: 100%;
        object-fit: cover;
    }
}

.page-header {
    padding-top: 12rem;
    padding-bottom: 6rem;
    background: url(../img/header.jpg) center center no-repeat;
    background-size: cover;
}

/* Specific Page Headers with Overlays for text readability */
.page-header-about {
    background: linear-gradient(rgba(1, 26, 65, 0.7), rgba(1, 26, 65, 0.7)), url(../img/generated/about_us_2.png) center center no-repeat !important;
    background-size: cover !important;
}

.page-header-service,
.page-header-feature {
    background: linear-gradient(rgba(1, 26, 65, 0.7), rgba(1, 26, 65, 0.7)), url(../img/generated/finance_cash_investment_1768906570157.png) center center no-repeat !important;
    background-size: cover !important;
}

.page-header-finance,
.page-header-investment {
    background: linear-gradient(rgba(1, 26, 65, 0.7), rgba(1, 26, 65, 0.7)), url(../img/generated/career_investment_1768908345771.png) center center no-repeat !important;
    background-size: cover !important;
}

.page-header-essential {
    background: linear-gradient(rgba(1, 26, 65, 0.7), rgba(1, 26, 65, 0.7)), url(../img/generated/home_essential_services_1768906636210.png) center center no-repeat !important;
    background-size: cover !important;
}

.page-header-legal {
    background: linear-gradient(rgba(1, 26, 65, 0.7), rgba(1, 26, 65, 0.7)), url(../img/legal/legal-service-banner.png) center center no-repeat !important;
    background-size: cover !important;
}

.page-header-realestate {
    background: linear-gradient(rgba(1, 26, 65, 0.7), rgba(1, 26, 65, 0.7)), url(../img/generated/home_real_estate_1768906681594.png) center center no-repeat !important;
    background-size: cover !important;
}

.page-header-project {
    background: linear-gradient(rgba(1, 26, 65, 0.7), rgba(1, 26, 65, 0.7)), url(../img/generated/project_planning_1768908201073.png) center center no-repeat !important;
    background-size: cover !important;
}

.page-header-career,
.page-header-team,
.page-header-testimonial {
    background: linear-gradient(rgba(1, 26, 65, 0.7), rgba(1, 26, 65, 0.7)), url(../img/generated/career_planning_1768908323330.png) center center no-repeat !important;
    background-size: cover !important;
}

.page-header-contact {
    background: linear-gradient(rgba(1, 26, 65, 0.7), rgba(1, 26, 65, 0.7)), url(../img/generated/about_main_1768908445584.png) center center no-repeat !important;
    background-size: cover !important;
}

.page-header-financial-calculator {
    background: linear-gradient(rgba(1, 26, 65, 0.7), rgba(1, 26, 65, 0.7)), url(../img/generated/career_investment_1768908345771.png) center center no-repeat !important;
    background-size: cover !important;
}

.page-header-realestate-calculator {
    background: linear-gradient(rgba(1, 26, 65, 0.7), rgba(1, 26, 65, 0.7)), url(../img/generated/home_real_estate_1768906681594.png) center center no-repeat !important;
    background-size: cover !important;
}

.page-header .breadcrumb-item,
.page-header .breadcrumb-item a {
    font-weight: 500;
    color: #FFFFFF !important;
    /* Force white text for visibility */
}

.page-header .display-3 {
    color: #FFFFFF !important;
    /* Force white text for visibility */
}

.page-header .breadcrumb-item+.breadcrumb-item::before {
    color: #FFFFFF !important;
    /* Force white visibility */
    content: ">";
    /* Change separator to greater-than sign */
}


/*** Facts ***/
.facts {
    background: linear-gradient(rgba(53, 94, 252, .95), rgba(53, 94, 252, .95)), url(../img/bg.png);
}


/*** Callback ***/
.callback {
    position: relative;
}

.callback::before {
    position: absolute;
    content: "";
    width: 100%;
    height: 50%;
    top: 0;
    left: 0;
    background: linear-gradient(rgba(53, 94, 252, .95), rgba(53, 94, 252, .95)), url(../img/bg.png);
    z-index: -1;
}


/*** Feature ***/
.feature .feature-box,
.feature .feature-box * {
    transition: .5s;
}

.feature .feature-box:hover {
    background: var(--primary);
    border-color: var(--primary) !important;
}

.feature .feature-box:hover * {
    color: #FFFFFF !important;
}


/*** Service ***/
.service .nav .nav-link {
    transition: .5s;
}

.service .nav .nav-link.active {
    border-color: var(--primary) !important;
    background: var(--primary);
}

.service .nav .nav-link.active h5 {
    color: #FFFFFF !important;
}

.service .nav .nav-link.active h5 i {
    color: #FFFFFF !important;
}


/*** Project ***/
.project-item,
.project-item .project-img {
    position: relative;
}

.project-item .project-img a {
    position: absolute;
    width: 100%;
    height: 100%;
    top: 0;
    left: 0;
    background: rgba(255, 255, 255, .5);
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
    opacity: 0;
    transition: .5s;
}

.project-item:hover .project-img a {
    opacity: 1;
}

.project-item .project-title {
    position: absolute;
    top: 3rem;
    right: 0;
    bottom: 0;
    left: 3rem;
    border: 1px solid var(--light);
    border-radius: 8px;
    display: flex;
    align-items: flex-end;
    padding: 18px;
    z-index: -1;
    transition: .5s;
}

.project-item:hover .project-title {
    background: var(--primary);
    border-color: var(--primary);
}

.project-item .project-title h4 {
    transition: .5s;
}

.project-item:hover .project-title h4 {
    color: #FFFFFF;
}

.project-carousel .owl-nav {
    margin-top: 25px;
    display: flex;
    justify-content: center;
}

.project-carousel .owl-nav .owl-prev,
.project-carousel .owl-nav .owl-next {
    margin: 0 12px;
    width: 45px;
    height: 45px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--primary);
    background: var(--light);
    border-radius: 45px;
    font-size: 22px;
    transition: .5s;
}

.project-carousel .owl-nav .owl-prev:hover,
.project-carousel .owl-nav .owl-next:hover {
    background: var(--primary);
    color: var(--light);
}


/*** Team ***/
.team-item {
    position: relative;
    padding: 4rem 0;
}

.team-item img {
    position: relative;
    z-index: 2;
}

.team-item .team-text {
    position: absolute;
    top: 0;
    right: 3rem;
    bottom: 0;
    left: 3rem;
    padding: 15px;
    border: 1px solid var(--light);
    border-radius: 8px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: space-between;
    transition: .5s;
    z-index: 1;
}

.team-item:hover .team-text {
    background: var(--primary);
    border-color: var(--primary);
}

.team-item .team-text h4 {
    transition: .5s;
}

.team-item:hover .team-text h4 {
    color: #FFFFFF;
}

.team-item .team-social .btn {
    background: var(--light);
    color: var(--primary);
}

.team-item:hover .team-social .btn {
    background: #FFFFFF;
}

.team-item .team-social .btn:hover {
    background: var(--primary);
    color: var(--light);
}


/*** Testimonial ***/
.testimonial-item {
    position: relative;
    text-align: center;
    padding-top: 30px;
}

.testimonial-item .testimonial-text {
    position: relative;
    text-align: center;
}

.testimonial-item .testimonial-text .btn-square {
    position: absolute;
    width: 60px;
    height: 60px;
    top: -30px;
    left: 50%;
    transform: translateX(-50%);
}

.testimonial-item .testimonial-text::before {
    position: absolute;
    content: "";
    bottom: -60px;
    left: 50%;
    transform: translateX(-50%);
    border: 30px solid;
    border-color: var(--light) transparent transparent transparent;
}

.testimonial-item .testimonial-text::after {
    position: absolute;
    content: "";
    bottom: -59px;
    left: 50%;
    transform: translateX(-50%);
    border: 30px solid;
    border-color: #FFFFFF transparent transparent transparent;
}

.testimonial-carousel .owl-item img {
    margin: 0 auto;
    width: 100px;
    height: 100px;
}

.testimonial-carousel .owl-dots {
    margin-top: 25px;
    display: flex;
    align-items: flex-end;
    justify-content: center;
}

.testimonial-carousel .owl-dot {
    position: relative;
    display: inline-block;
    margin: 0 5px;
    width: 30px;
    height: 30px;
    border: 1px solid var(--light);
    border-radius: 30px;
    transition: .5s;
}

.testimonial-carousel .owl-dot::after {
    position: absolute;
    content: "";
    width: 16px;
    height: 16px;
    top: 6px;
    left: 6px;
    border-radius: 16px;
    background: var(--light);
    transition: .5s;
}

.testimonial-carousel .owl-dot.active {
    border-color: var(--primary);
}

.testimonial-carousel .owl-dot.active::after {
    background: var(--primary);
}


/*** Footer ***/
.footer .btn.btn-link {
    display: block;
    margin-bottom: 5px;
    padding: 0;
    text-align: left;
    color: var(--light);
    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;
    margin-right: 10px;
}

.footer .btn.btn-link:hover {
    color: var(--primary);
    letter-spacing: 1px;
    box-shadow: none;
}

.copyright {
    color: var(--light);
    background: #000B1C;
}

.copyright a {
    color: var(--light);
}

.copyright a:hover {
    color: var(--primary);
}

/* Mobile Responsive Enhancements */
@media (max-width: 991.98px) {

    /* Header improvements for mobile */
    .navbar-brand img {
        height: 50px !important;
        max-height: 50px !important;
    }

    .navbar-collapse {
        background: rgba(255, 255, 255, 0.98);
        box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
        border-radius: 0 0 10px 10px;
        margin: 0 -15px;
        padding: 0 15px;
    }

    .navbar-nav .nav-link {
        padding: 12px 0 !important;
        border-bottom: 1px solid #f0f0f0;
        font-weight: 500;
    }

    .navbar-nav .nav-link:last-child {
        border-bottom: none;
    }

    .dropdown-menu {
        position: static !important;
        float: none !important;
        width: auto !important;
        margin-top: 0 !important;
        background-color: #f8f9fa !important;
        border: none !important;
        box-shadow: inset 0 1px 0 rgba(255, 255, 255, .15), inset 0 -1px 0 rgba(0, 0, 0, .075);
    }

    .dropdown-item {
        padding: 8px 20px !important;
        font-size: 14px;
    }

    /* Top bar responsive */
    .top-bar small {
        font-size: 11px;
        line-height: 1.4;
        margin-bottom: 2px;
    }
}

@media (max-width: 767.98px) {

    /* Extra small devices */
    .navbar-brand img {
        height: 45px !important;
        max-height: 45px !important;
    }

    .navbar-toggler {
        padding: 4px 8px;
        font-size: 1rem;
    }

    /* Footer responsive */
    .footer .container .row>div {
        margin-bottom: 2rem;
    }

    .footer .container .row>div:last-child {
        margin-bottom: 0;
    }

    /* Better spacing for mobile */
    .py-5 {
        padding-top: 2rem !important;
        padding-bottom: 2rem !important;
    }

    .my-5 {
        margin-top: 2rem !important;
        margin-bottom: 2rem !important;
    }

    /* Text sizing for mobile */
    .display-1,
    .display-2,
    .display-3 {
        font-size: 2rem;
        line-height: 1.2;
    }

    .display-4,
    .display-5,
    .display-6 {
        font-size: 1.5rem;
        line-height: 1.3;
    }
}

@media (max-width: 575.98px) {

    /* Small devices - phones */
    /* .container-fluid.fixed-top {
        position: relative !important;
    } Removed to allow sticky header on mobile */

    .navbar {
        padding: 8px 15px;
    }

    .navbar-brand img {
        height: 40px !important;
        max-height: 40px !important;
    }

    /* Hide top bar on very small screens */
    .top-bar {
        display: none !important;
    }

    /* Footer newsletter form */
    .position-relative input.form-control {
        padding-right: 70px !important;
    }

    .position-relative button {
        font-size: 12px;
        padding: 8px 12px !important;
    }
}

/* Touch improvements */
@media (hover: none) and (pointer: coarse) {

    .btn,
    .nav-link,
    .dropdown-item {
        min-height: 44px;
        display: flex;
        align-items: center;
    }

    .dropdown-toggle::after {
        margin-left: auto;
    }
}

/*** Page Header ***/
.page-header {
    margin-top: 0;
    padding-top: 7rem;
    padding-bottom: 3rem;
}

@media (min-width: 992px) {
    .page-header {
        margin-top: 0;
        /* Removed 120px to prevent double spacing with body padding */
        padding-top: 5rem;
        padding-bottom: 5rem;
    }
}

/* Fix for header overlap */
body {
    padding-top: 135px;
    /* Reduced from 155px to match header height closely */
}

@media (max-width: 991.98px) {
    body {
        padding-top: 100px;
        /* Reduced to match mobile header */
    }
}

@media (max-width: 575.98px) {
    body {
        padding-top: 60px;
    }
}

.realestate-nav-links .service .nav .nav-link.active h5 {
    color: #FFFFFF;
}