/********** Template CSS **********/

:root {
    --bs-primary: #3B82F6 !important;
    --bs-dark: #1E3A8A !important;
    --bs-light: #F0F9FF !important;
    --primary: #3B82F6 !important;
    --secondary: #1E3A8A !important;
}

/* Global Button & Card Branding */
.btn-primary, .bg-primary {
    background-color: #3B82F6 !important;
    border-color: #3B82F6 !important;
}

.btn-outline-primary {
    color: #3B82F6 !important;
    border-color: #3B82F6 !important;
}

.btn-outline-primary:hover {
    background-color: #3B82F6 !important;
    color: #fff !important;
}

.text-primary {
    color: #3B82F6 !important;
}

.card {
    border: 1px solid rgba(59, 130, 246, 0.15) !important;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.card:hover {
    box-shadow: 0 10px 20px rgba(59, 130, 246, 0.1) !important;
}

.card-header {
    background-color: rgba(59, 130, 246, 0.03) !important;
    border-bottom: 1px solid rgba(59, 130, 246, 0.1) !important;
    color: #1E3A8A !important;
    font-weight: 600;
}

/* Service & Project Card Blue Reinforcement */
.service-item, .project-item {
    border: 1px solid rgba(59, 130, 246, 0.1) !important;
}

.service-item:hover, .project-item:hover {
    border-color: #3B82F6 !important;
}

.project-overlay {
    background: transparent !important;
    transition: .5s;
}

.project-item:hover .project-overlay {
    background: linear-gradient(rgba(0, 0, 0, 0) 0%, rgba(0, 0, 0, 0.7) 100%) !important;
}

.service-item i, .project-item i {
    color: #3B82F6 !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;
}

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

/*** Button ***/
.btn {
    transition: .5s;
}

.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 ***/
.sticky-top {
    top: -150px;
    transition: .5s;
}

.navbar {
    padding: 15px 0;
    font-family: "Space Grotesk", sans-serif;
    font-size: 18px;
}

.navbar .navbar-nav .nav-link {
    margin-left: 30px;
    padding: 0;
    outline: none;
    color: var(--bs-dark);
}

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

.navbar .dropdown-menu .dropdown-item:hover,
.navbar .dropdown-menu .dropdown-item.active {
    color: var(--bs-white);
    background: var(--bs-primary);
}

@media (max-width: 991.98px) {
    .navbar .navbar-nav .nav-link  {
        margin-left: 0;
        padding: 10px 0;
    }
}

@media (min-width: 992px) {
    .navbar .nav-item .dropdown-menu {
        display: block;
        border: none;
        margin-top: 0;
        top: 150%;
        opacity: 0;
        visibility: hidden;
        transition: .5s;
    }

    .navbar .nav-item:hover .dropdown-menu {
        top: 100%;
        visibility: visible;
        transition: .5s;
        opacity: 1;
    }
}


/*** Hero Header ***/
.hero-header {
    margin-top: -140px;
    padding-top: 150px;
    background: url(../img/hero-bg.jpg) top center no-repeat;
    background-size: cover;
}

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

.header-carousel {
    position: relative;
    padding: 45px 90px 45px 0;
}

.header-carousel::before {
    position: absolute;
    content: "";
    top: 0;
    right: 0;
    width: calc(50% + 45px);
    height: 100%;
    background: var(--bs-primary);
    z-index: -1;
}

.header-carousel .owl-dots {
    position: absolute;
    top: 50%;
    right: 38px;
    transform: translateY(-50%);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.header-carousel .owl-dot {
    position: relative;
    display: inline-block;
    margin: 5px 0;
    width: 15px;
    height: 15px;
    border: 2px solid var(--bs-white);
    transition: .5s;
}

.header-carousel .owl-dot.active {
    height: 30px;
    background: var(--bs-white);
}


/*** About ***/
.about-img {
    position: relative;
    overflow: hidden;
}

.about-img::after {
    position: absolute;
    content: "";
    width: 100%;
    height: 100%;
    top: 0;
    left: 0;
    background: url(../img/bg-about-img.png) top left no-repeat;
    background-size: contain;
}


/*** Project ***/
.project-item img {
    transition: .5s;
}
  
.project-item:hover img {
    transform: scale(1.2);
}
  
.project-overlay {
    position: absolute;
    padding: 25px;
    width: 100%;
    height: 100%;
    top: 0;
    left: 0;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    justify-content: flex-end;
    background: transparent;
    opacity: 0;
    transition: .5s;
    z-index: 1;
}

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



/*** Service ***/
.service-item {
    position: relative;
    padding: 30px 25px;
    transition: .5s;
}

.service-item.bg-primary:hover {
    background: var(--bs-light) !important;
}

.service-item.bg-primary p {
    color: var(--bs-light);
    transition: .5s;
}

.service-item.bg-primary:hover p {
    color: var(--bs-secondary);
}

.service-item.bg-light:hover {
    background: var(--bs-primary) !important;
}

.service-item.bg-light p {
    color: var(--bs-secondary);
    transition: .5s;
}

.service-item.bg-light:hover p {
    color: var(--bs-light);
}


.service-item .service-img h3 {
    position: absolute;
    top: 0;
    left: 0;
    padding: 0 12px 7px 0;
}

.service-item.bg-primary .service-img h3 {
    background: var(--bs-primary);
    color: var(--bs-white);
    transition: .5s;
}

.service-item.bg-primary:hover .service-img h3 {
    background: var(--bs-light);
    color: var(--bs-dark);
}

.service-item.bg-light .service-img h3 {
    background: var(--bs-light);
    color: var(--bs-dark);
    transition: .5s;
}

.service-item.bg-light:hover .service-img h3 {
    background: var(--bs-primary);
    color: var(--bs-white);
}


/*** Our Team ***/
.team-item img {
    transition: .5s;
}
  
.team-item:hover img {
    transform: scale(1.2);
}
  
.team-overlay {
    position: absolute;
    padding: 30px;
    width: 100%;
    height: 100%;
    top: 0;
    left: 0;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    justify-content: flex-end;
    background: linear-gradient(rgba(255, 255, 255, .1) 50%, var(--bs-dark));
    z-index: 1;
}

.team-overlay small {
    display: inline-block;
    padding: 3px 15px;
    color: var(--bs-white);
    background: var(--bs-primary);
}


/*** Testimonial ***/
.testimonial-img {
    position: relative;
    padding: 45px 0 45px 90px;
}

.testimonial-img::before {
    position: absolute;
    content: "";
    top: 0;
    left: 0;
    width: calc(50% + 45px);
    height: 100%;
    background: var(--bs-primary);
    z-index: -1;
}

.testimonial-text h5 {
    position: relative;
    padding-left: 45px;
}

.testimonial-text h5::before {
    position: absolute;
    content: "";
    top: 50%;
    left: 0;
    transform: translateY(-50%);
    width: 40px;
    height: 2px;
    background: var(--bs-primary);
}

.testimonial-carousel .owl-dots {
    position: absolute;
    height: 17px;
    bottom: 0;
    right: 0;
    left: auto;
}

.testimonial-carousel .owl-dot {
    position: relative;
    display: inline-block;
    margin-left: 10px;
    width: 15px;
    height: 15px;
    background: var(--bs-white);
    border: 2px solid var(--bs-primary);
    transition: .5s;
}

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

@media (max-width: 768px) {
    .testimonial-carousel .owl-dots {
        left: 0;
        right: auto;
    }

    .testimonial-carousel .owl-dot {
        margin-right: 10px;
        margin-left: 0;
    }
}


/*** Newsletter ***/
.newsletter {
    background: url(../img/hero-bg.jpg) bottom right no-repeat;
    background-size: cover;
}

@media (min-width: 992px) {
    .newsletter .container {
        max-width: 100% !important;
    }

    .newsletter .newsletter-text  {
        padding-right: calc(((100% - 960px) / 2) + .75rem);
    }
}

@media (min-width: 1200px) {
    .newsletter .newsletter-text  {
        padding-right: calc(((100% - 1140px) / 2) + .75rem);
    }
}

@media (min-width: 1400px) {
    .newsletter .newsletter-text  {
        padding-right: calc(((100% - 1320px) / 2) + .75rem);
    }
}


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

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

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

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

.footer .copyright a {
    color: rgba(255,255,255,.5);
}

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

.footer .footer-menu a {
    margin-right: 15px;
    padding-right: 15px;
    border-right: 1px solid rgba(255, 255, 255, .1);
}

.footer .footer-menu a:last-child {
    margin-right: 0;
    padding-right: 0;
    border-right: none;
}


/*** Compact Form Styles ***/
.form-floating-sm > .form-control,
.form-floating-sm > .form-select {
    height: 42px;
    min-height: 42px;
    padding: 0.8rem 0.65rem 0.25rem;
    font-size: 0.82rem;
    line-height: 1.3;
}

.form-floating-sm > label {
    padding: 0.6rem 0.65rem;
    font-size: 0.78rem;
}

.form-floating-sm > .form-control:focus ~ label,
.form-floating-sm > .form-control:not(:placeholder-shown) ~ label,
.form-floating-sm > .form-select ~ label {
    transform: scale(0.78) translateY(-0.45rem) translateX(0.1rem);
    font-size: 0.7rem;
}

.form-floating-sm > textarea.form-control {
    min-height: 80px;
    height: auto;
}

/*** Auth Card ***/
.auth-card {
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.08);
    padding: 1.5rem;
}

.auth-icon-circle {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: rgba(var(--bs-primary-rgb, 246,139,31), 0.1);
    display: flex;
    align-items: center;
    justify-content: center;
}

.auth-toggle-wrapper {
    display: inline-flex;
    background: #f0f0f0;
    border-radius: 8px;
    padding: 3px;
    gap: 3px;
}

.auth-toggle-btn {
    border: none;
    border-radius: 6px;
    padding: 6px 16px;
    font-size: 0.82rem;
    font-weight: 500;
    color: #666;
    background: transparent;
    transition: all 0.25s ease;
}

.auth-toggle-btn.active {
    background: var(--bs-primary);
    color: #fff;
    box-shadow: 0 2px 6px rgba(0,0,0,0.12);
}

.btn-login-nav {
    background: var(--bs-primary);
    color: #fff !important;
    border-radius: 6px;
    padding: 6px 14px !important;
    font-size: 0.85rem;
    margin-left: 10px;
}

.btn-login-nav:hover {
    background: #d97a1a;
    color: #fff !important;
}


/*** ===== RESPONSIVE STYLES ===== ***/

/* ---- Extra Small Devices (phones, < 576px) ---- */
@media (max-width: 575.98px) {
    /* Hero Header */
    .hero-header {
        margin-top: -100px;
        padding-top: 110px;
    }

    .hero-header .display-1 {
        font-size: 2.2rem;
    }

    .hero-header h5 {
        font-size: 0.95rem;
        padding: 10px 18px !important;
    }

    /* Header Carousel */
    .header-carousel {
        padding: 20px 40px 20px 0;
    }

    .header-carousel .owl-dots {
        right: 15px;
    }

    /* General headings */
    h1 {
        font-size: 1.6rem;
    }

    .display-1 {
        font-size: 2.2rem !important;
    }

    h4 {
        font-size: 1.1rem;
    }

    h5 {
        font-size: 1rem;
    }

    /* Service items */
    .service-item {
        padding: 20px 18px;
    }

    .service-item .service-img h3 {
        font-size: 1rem;
    }

    /* Newsletter */
    .newsletter .p-5 {
        padding: 1.5rem !important;
    }

    .newsletter h1 {
        font-size: 1.4rem;
        margin-bottom: 1.2rem !important;
    }

    .newsletter input.form-control {
        height: 48px !important;
        font-size: 0.85rem;
    }

    /* Footer */
    .footer .container.py-5 {
        padding-top: 2rem !important;
        padding-bottom: 2rem !important;
    }

    .footer h1 {
        font-size: 1.5rem;
    }

    .footer h5 {
        font-size: 1rem;
    }

    .footer .copyright {
        font-size: 12px;
        padding: 15px 0;
    }

    .footer .footer-menu a {
        margin-right: 8px;
        padding-right: 8px;
        font-size: 12px;
    }

    /* Contact form map */
    iframe {
        height: 250px !important;
    }

    /* Back to top button */
    .back-to-top {
        right: 15px;
        bottom: 15px;
    }

    /* Testimonial */
    .testimonial-img {
        padding: 20px 0 20px 40px;
    }

    .testimonial-text h5 {
        padding-left: 30px;
    }

    .testimonial-text h5::before {
        width: 25px;
    }

    /* Project overlay */
    .project-overlay {
        padding: 15px;
    }

    .project-overlay h4 {
        font-size: 0.95rem;
    }

    /* Team overlay */
    .team-overlay {
        padding: 15px;
    }

    .team-overlay h4 {
        font-size: 0.95rem;
    }

    /* Auth / Login card */
    .auth-card {
        padding: 1.5rem !important;
    }

    .auth-toggle-wrapper {
        flex-direction: column;
        width: 100%;
    }

    .auth-toggle-btn {
        width: 100%;
    }

    /* CTA Banner */
    .rounded-3.text-white.p-5 {
        padding: 1.5rem !important;
    }

    .rounded-3.text-white h3 {
        font-size: 1.2rem;
    }

    /* Feature icon size */
    .fa-5x {
        font-size: 2.5rem !important;
    }

    /* About section image grid */
    .about-img::after {
        display: none;
    }

    /* Btn square consistent sizing on small */
    .btn-square {
        width: 34px;
        height: 34px;
    }

    /* Social icon row wrap */
    .d-flex.pt-2 {
        flex-wrap: wrap;
        gap: 4px;
    }
}


/* ---- Small Devices (landscape phones, 576px - 767px) ---- */
@media (min-width: 576px) and (max-width: 767.98px) {
    .hero-header {
        margin-top: -120px;
        padding-top: 130px;
    }

    .hero-header .display-1 {
        font-size: 2.8rem;
    }

    .header-carousel {
        padding: 30px 60px 30px 0;
    }

    .display-1 {
        font-size: 2.8rem !important;
    }

    h1 {
        font-size: 1.8rem;
    }

    .newsletter .p-5 {
        padding: 2rem !important;
    }

    .newsletter h1 {
        font-size: 1.6rem;
    }

    iframe {
        height: 300px !important;
    }

    .fa-5x {
        font-size: 3rem !important;
    }

    .testimonial-img {
        padding: 30px 0 30px 60px;
    }
}


/* ---- Medium Devices (tablets, 768px - 991px) ---- */
@media (min-width: 768px) and (max-width: 991.98px) {
    .hero-header {
        margin-top: -130px;
        padding-top: 140px;
    }

    .hero-header .display-1 {
        font-size: 3.2rem;
    }

    .display-1 {
        font-size: 3.2rem !important;
    }

    .header-carousel {
        padding: 35px 70px 35px 0;
    }

    .newsletter h1 {
        font-size: 1.8rem;
    }

    iframe {
        height: 350px !important;
    }

    .footer .copyright {
        font-size: 13px;
    }
}


/* ---- Prevent horizontal overflow globally ---- */
html, body {
    overflow-x: hidden;
}

img {
    max-width: 100%;
    height: auto;
}

/* ---- Ensure long words/emails don't break layout ---- */
.footer p,
.footer a,
.footer span {
    word-break: break-word;
    overflow-wrap: break-word;
}

/* ---- Touch-friendly tap targets ---- */
@media (max-width: 991.98px) {
    .navbar .navbar-nav .nav-link {
        padding: 12px 0;
        font-size: 16px;
    }

    .btn-square,
    .btn-sm-square {
        min-width: 38px;
        min-height: 38px;
    }

    /* Make form inputs easier to tap */
    .form-control,
    .form-select {
        font-size: 16px;
    }

    /* Fix sticky nav z-index on mobile */
    .sticky-top {
        z-index: 1030;
    }
}

/* ---- Smooth transitions for responsive changes ---- */
.container,
.container-fluid,
.row,
.col,
[class*="col-"] {
    transition: padding 0.2s ease;
}
