/********** Template CSS **********/
:root {
    --primary: #8c7421;
    --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 ***/
#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(--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;
}


/* For H1 elements specifically */
h1.text-container {
    padding: 20px; /* More padding for larger text */
    font-weight: bold; /* Enhance visibility */
}


.navbar {
    position: relative; /* Ensure it's not absolutely positioned */
    z-index: 1050; /* Bootstrap's default navbar z-index */
}


/*** Navbar ***/
.fixed-top {
    transition: .5s;
}

.top-bar {
    height: 45px;
    border-bottom: 1px solid rgba(53, 94, 252, .07);
}

.navbar .dropdown-toggle::after {
    border: none;
    content: "\f107";
    font-family: "Font Awesome 5 Free";
    font-weight: 900;
    vertical-align: middle;
    margin-left: 8px;
}

.navbar .navbar-nav .nav-link {
    padding: 25px 15px;
    color: var(--tertiary);
    font-weight: 500;
    outline: none;
}

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

@media (max-width: 991.98px) {
    .navbar .navbar-nav {
        margin-top: 10px;
        border-top: 1px solid rgba(0, 0, 0, .07);
        background: #FFFFFF;
       
    }

    .navbar .navbar-nav .nav-link {
        padding: 10px 0;
    }
}

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

    .navbar .nav-item:hover .dropdown-menu {
        transform: rotateX(0deg);
        visibility: visible;
        transition: .5s;
        opacity: 1;
    }
}


/*** Header ***/
#header-carousel {
    margin-top: var(--navbar-height, 80px); /* Adjust fallback value */
}

/* Add this to calculate dynamically */
:root {
    --navbar-height: 80px; /* Replace with the actual height of your navbar */
}

.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-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;
}
/* Gradient Overlay */
.carousel-image-wrapper .gradient-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 50%; /* Gradient width */
    height: 100%;
    background: linear-gradient(to right, #011A41, transparent);

    z-index: 1;
    pointer-events: none;
}

@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 .breadcrumb-item,
.page-header .breadcrumb-item a {
    font-weight: 500;
}

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


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

.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);
}


.loan-banner {
    position: relative;
    background: url('../img/housin.jpg') center center no-repeat;
    background-size: cover;
    height: 60vh; 
    display: flex;
    justify-content: center;
    align-items: center;
    color: #fff;
}

.loan-banner::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5); 
    z-index: 1;
}

.loan-banner .content {
    position: relative;
    z-index: 2;
    max-width: 700px;
    padding: 20px;
    background: rgba(255, 255, 255, 0.1); 
    border-radius: 10px; 
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.2); 
}

.btn-hover-effect {
    position: relative;
    color: #8c7421;
    background-color: #000;
    border: 2px solid transparent;
    transition: all 0.3s ease;
}

.btn-hover-effect:hover {
    color: #8c7421;
    background-color: #ffffff;
    border-color: #000;
    transform: scale(1.1);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

.btn-hover-effect:focus {
    outline: none;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.5); 
}

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

body {
    font-family: 'Open Sans', sans-serif;
    color: #333;
    background-color: #f8f9fa;
    overflow-x: hidden;
}

h1, h2, h3, h4, h5 {
    font-family: 'Jost', sans-serif;
    font-weight: 600;
}

.btn-dark {
    background: linear-gradient(135deg, #212529, #444);
    border: none;
    transition: all 0.3s ease;
}

    .btn-dark:hover {
        background: linear-gradient(135deg, #444, #000);
        transform: translateY(-2px);
    }

/* Carousel Enhancements */
.carousel-image-wrapper {
    position: relative;
    height: 100vh;
    overflow: hidden;
}

    .carousel-image-wrapper img {
        object-fit: cover;
        height: 100%;
        filter: brightness(75%);
        transition: transform 6s ease;
    }

.carousel-item.active .carousel-image-wrapper img {
    transform: scale(1.05);
}

.gradient-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(to bottom right, rgba(0,0,0,0.4), rgba(0,0,0,0.8));
}

/* Text Overlay */
.carousel-caption {
    bottom: 25%;
}

.text-container {
    backdrop-filter: blur(6px);
    background: rgba(0, 0, 0, 0.4);
    border-radius: 12px;
    padding: 10px 20px;
}

/* Smooth Section Reveal */
section, .container-xxl {
    opacity: 0;
    transform: translateY(20px);
    transition: all 1s ease-out;
}

    section.visible, .container-xxl.visible {
        opacity: 1;
        transform: translateY(0);
    }

/* Loan Banner Section */
.loan-banner {
    background: url('img/loan-bg.jpg') center/cover no-repeat;
    min-height: 300px;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
}

    .loan-banner::before {
        content: "";
        position: absolute;
        inset: 0;
        background: rgba(0,0,0,0.6);
    }

    .loan-banner .content {
        position: relative;
        z-index: 2;
    }

/* Preloader Enhancement */
#spinner {
    background: #fff url('img/logo.png') center no-repeat;
    background-size: 80px;
}

.spinner-border {
    display: none;
}

/* Soft fade-up effect */
@keyframes fadeUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.visible {
    animation: fadeUp 1s ease forwards;
}


/* Ensure all sections display on mobile */
section, .container-xxl, .container {
    opacity: 1;
    transform: none;
    transition: all 0.6s ease-in-out;
}

/* Make cards fully responsive */
.card {
    border: none;
    border-radius: 12px;
    overflow: hidden;
    background: #fff;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

    /* Ensure images resize properly */
    .card img,
    img.img-fluid {
        width: 100%;
        height: auto;
        object-fit: cover;
        display: block;
    }

/* Fix mobile stacking */
@media (max-width: 767.98px) {
    .row.align-items-center {
        flex-direction: column;
        align-items: stretch !important;
    }

    .col-md-6 {
        width: 100%;
        margin-bottom: 1.5rem;
    }

    .card-body {
        padding: 1rem;
    }

    /* Prevent clipping and hidden sections */
    body, html {
        overflow-x: hidden;
    }

    /* Ensure spacing for text */
    h4.card-title {
        font-size: 1.25rem;
    }

    p.card-text {
        font-size: 0.95rem;
    }

    /* Adjust button size */
    .btn.btn-lg {
        font-size: 1rem;
        padding: 0.75rem 1.5rem;
    }
}

/* Make sure visibility animations don't hide anything */
.visible {
    opacity: 1 !important;
    transform: none !important;
}


/* Modal fixes for the entire site */
.modal {
    z-index: 1060 !important;
}

.modal-backdrop {
    z-index: 1050 !important;
}

.navbar {
    z-index: 1040 !important;
}

.modal-content {
    background: white;
    color: #333;
    border-radius: 8px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.3);
}

.modal-header {
    border-bottom: 1px solid #dee2e6;
}

.modal-body {
    padding: 20px;
    max-height: 70vh;
    overflow-y: auto;
}