/********** Template CSS **********/
:root {
    --primary: #D81324;
    --secondary: #0B2154;
    --light: #F2F2F2;
    --dark: #111111;
}

.fw-medium {
    font-weight: 600 !important;
}

.back-to-top {
    position: fixed;
    display: none;
    right: 45px;
    bottom: 45px;
    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 ***/
.btn {
    font-weight: 500;
    text-transform: uppercase;
    transition: .5s;
}

.btn.btn-primary,
.btn.btn-secondary {
    color: #FFFFFF;
}

.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;
    border-radius: 2px;
}


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

.navbar-light .navbar-nav .nav-link {
    margin-right: 30px;
    padding: 25px 0;
    color: #FFFFFF;
    font-size: 15px;
    text-transform: uppercase;
    outline: none;
}

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

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

    .navbar-light .navbar-nav {
        border-top: 1px solid #EEEEEE;
    }
}

.navbar-light .navbar-brand,
.navbar-light a.btn {
    height: 75px;
}

.navbar-light .navbar-nav .nav-link {
    color: var(--dark);
    font-weight: 500;
}

.navbar-light.sticky-top {
    top: -100px;
    transition: .5s;
}

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


/*** Header ***/
.carousel-caption {
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, .7);
    z-index: 1;
}

.carousel-control-prev,
.carousel-control-next {
    width: 10%;
}

.carousel-control-prev-icon,
.carousel-control-next-icon {
    width: 3rem;
    height: 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 {
    background-position: center center;
    background-repeat: no-repeat;
    background-size: cover;
}

.page-header-inner {
    background: rgba(0, 0, 0, .7);
}

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


/*** Facts ***/
.fact {
    background: linear-gradient(rgba(0, 0, 0, .7), rgba(0, 0, 0, .7)), url(../img/carousel-bg-1.jpg);
    background-position: center center;
    background-repeat: no-repeat;
    background-size: cover;
}


/*** Service ***/
.service .nav .nav-link {
    background: var(--light);
    transition: .5s;
}

.service .nav .nav-link.active {
    background: var(--primary);
}

.service .nav .nav-link.active h4 {
    color: #FFFFFF !important;
}


/*** Booking ***/
.booking {
    background: linear-gradient(rgba(0, 0, 0, .7), rgba(0, 0, 0, .7)), url(../img/carousel-bg-2.jpg) center center no-repeat;
    background-size: cover;
}

.bootstrap-datetimepicker-widget.bottom {
    top: auto !important;
}

.bootstrap-datetimepicker-widget .table * {
    border-bottom-width: 0px;
}

.bootstrap-datetimepicker-widget .table th {
    font-weight: 500;
}

.bootstrap-datetimepicker-widget.dropdown-menu {
    padding: 10px;
    border-radius: 2px;
}

.bootstrap-datetimepicker-widget table td.active,
.bootstrap-datetimepicker-widget table td.active:hover {
    background: var(--primary);
}

.bootstrap-datetimepicker-widget table td.today::before {
    border-bottom-color: var(--primary);
}


/*** Team ***/
.team-item .team-overlay {
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--primary);
    transform: scale(0);
    transition: .5s;
}

.team-item:hover .team-overlay {
    transform: scale(1);
}

.team-item .team-overlay .btn {
    color: var(--primary);
    background: #FFFFFF;
}

.team-item .team-overlay .btn:hover {
    color: #FFFFFF;
    background: var(--secondary)
}


/*** Testimonial ***/
.testimonial-carousel .owl-item .testimonial-text,
.testimonial-carousel .owl-item.center .testimonial-text * {
    transition: .5s;
}

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

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

.testimonial-carousel .owl-dots {
    margin-top: 24px;
    display: flex;
    align-items: flex-end;
    justify-content: center;
}

.testimonial-carousel .owl-dot {
    position: relative;
    display: inline-block;
    margin: 0 5px;
    width: 15px;
    height: 15px;
    border: 1px solid #CCCCCC;
    transition: .5s;
}

.testimonial-carousel .owl-dot.active {
    background: var(--primary);
    border-color: var(--primary);
}


/*** Footer ***/
.footer {
    background: linear-gradient(rgba(0, 0, 0, .9), rgba(0, 0, 0, .9)), url(../img/carousel-bg-1.jpg) center center no-repeat;
    background-size: cover;
}

.footer .btn.btn-social {
    margin-right: 5px;
    width: 35px;
    height: 35px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--light);
    border: 1px solid #FFFFFF;
    border-radius: 35px;
    transition: .3s;
}

.footer .btn.btn-social:hover {
    color: var(--primary);
}

.footer .btn.btn-link {
    display: block;
    margin-bottom: 5px;
    padding: 0;
    text-align: left;
    color: #FFFFFF;
    font-size: 15px;
    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 {
    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 .footer-menu a {
    margin-right: 15px;
    padding-right: 15px;
    border-right: 1px solid rgba(255, 255, 255, .3);
}

.footer .footer-menu a:last-child {
    margin-right: 0;
    padding-right: 0;
    border-right: none;
}
/********** MecaGo App Specific **********/

/* Auth */
.auth-card {
    max-width: 460px;
    margin: 60px auto;
}
.auth-card .card-header {
    border-bottom: 3px solid var(--primary);
}
.role-selector .btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    padding: 24px 16px;
    border: 2px solid #e3e3e3;
    border-radius: 4px;
    color: var(--dark);
    transition: .3s;
}
.role-selector .btn i {
    font-size: 2rem;
    color: var(--primary);
}
.role-selector .btn.active,
.role-selector .btn:hover {
    border-color: var(--primary);
    background: rgba(216, 19, 36, .05);
}
.role-selector .btn.active {
    box-shadow: 0 0 0 3px rgba(216, 19, 36, .15);
}

/* Map / Search */
.mec-map {
    height: 100%;
    min-height: 420px;
}
.leaflet-container {
    font-family: 'Ubuntu', sans-serif;
}
.mechanic-pin {
    background: var(--primary);
    border: 3px solid #fff;
    border-radius: 50% 50% 50% 0;
    transform: rotate(-45deg);
    width: 28px;
    height: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 8px rgba(0,0,0,.3);
}
.mechanic-pin i {
    transform: rotate(45deg);
    color: #fff;
    font-size: 1rem;
}
.mechanic-card {
    border: 1px solid #eee;
    border-radius: 4px;
    padding: 20px;
    background: #fff;
    transition: .3s;
}
.mechanic-card:hover {
    box-shadow: 0 8px 25px rgba(11,33,84,.12);
    transform: translateY(-3px);
}
.verified-badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    background: #e8f5e9;
    color: #2e7d32;
    font-size: .75rem;
    font-weight: 600;
    padding: 2px 8px;
    border-radius: 20px;
}
.online-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: #2e7d32;
    display: inline-block;
}
.online-dot.offline {
    background: #9e9e9e;
}
.star-rating {
    color: #f5b301;
    letter-spacing: 2px;
}

/* Status badge */
.status-badge {
    padding: 4px 12px;
    border-radius: 20px;
    font-size: .78rem;
    font-weight: 700;
    text-transform: uppercase;
}
.status-badge.pending { background: #fff3e0; color: #e65100; }
.status-badge.requested { background: #e3f2fd; color: #0d47a1; }
.status-badge.accepted { background: #e8f5e9; color: #1b5e20; }
.status-badge.in_progress { background: #ede7f6; color: #4527a0; }
.status-badge.completed { background: #1b5e20; color: #fff; }
.status-badge.cancelled { background: #ffebee; color: #b71c1c; }

/* Timeline / tracking */
.track-steps {
    list-style: none;
    padding: 0;
    margin: 0;
    position: relative;
}
.track-steps li {
    position: relative;
    padding-left: 44px;
    padding-bottom: 28px;
}
.track-steps li::before {
    content: "";
    position: absolute;
    left: 15px;
    top: 24px;
    bottom: 0;
    width: 2px;
    background: #e3e3e3;
}
.track-steps li:last-child::before {
    display: none;
}
.track-steps .step-ic {
    position: absolute;
    left: 0;
    top: 0;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #e3e3e3;
    color: #9e9e9e;
    font-size: .85rem;
}
.track-steps li.active .step-ic,
.track-steps li.done .step-ic {
    background: var(--primary);
    color: #fff;
}
.track-steps li.done::before {
    background: var(--primary);
}
.track-steps li .step-title {
    font-weight: 600;
    color: var(--dark);
}
.track-steps li.active .step-title {
    color: var(--primary);
}

/* Preventivo / chat */
.quote-card {
    border: 2px dashed var(--primary);
    border-radius: 4px;
    padding: 20px;
    background: #fff;
}
.chat-box {
    background: #f7f7f7;
    border-radius: 4px;
    padding: 16px;
    max-height: 360px;
    overflow-y: auto;
}
.chat-bubble {
    max-width: 75%;
    padding: 10px 14px;
    border-radius: 12px;
    margin-bottom: 10px;
    clear: both;
}
.chat-bubble.mine {
    background: var(--primary);
    color: #fff;
    float: right;
    border-bottom-right-radius: 2px;
}
.chat-bubble.theirs {
    background: #fff;
    color: var(--dark);
    float: left;
    border-bottom-left-radius: 2px;
    box-shadow: 0 1px 4px rgba(0,0,0,.08);
}

/* Upload photo */
.photo-drop {
    border: 2px dashed #ccc;
    border-radius: 4px;
    padding: 24px;
    text-align: center;
    cursor: pointer;
    color: #777;
    transition: .3s;
}
.photo-drop:hover {
    border-color: var(--primary);
    color: var(--primary);
}
.photo-previews img {
    width: 80px;
    height: 80px;
    object-fit: cover;
    border-radius: 4px;
    margin: 4px;
}

/* Top mechanic badge */
.top-mechanic {
    background: linear-gradient(135deg, #f5b301, #ffd54f);
    color: #5d4200;
    font-weight: 700;
    padding: 3px 10px;
    border-radius: 20px;
    font-size: .72rem;
    display: inline-block;
}

/* Toggle switch (online/offline) */
.switch {
    position: relative;
    display: inline-block;
    width: 54px;
    height: 28px;
}
.switch input {
    opacity: 0;
    width: 0;
    height: 0;
}
.slider {
    position: absolute;
    cursor: pointer;
    top: 0; left: 0; right: 0; bottom: 0;
    background-color: #ccc;
    transition: .4s;
    border-radius: 28px;
}
.slider:before {
    position: absolute;
    content: "";
    height: 20px;
    width: 20px;
    left: 4px;
    bottom: 4px;
    background-color: white;
    transition: .4s;
    border-radius: 50%;
}
.switch input:checked + .slider {
    background-color: var(--primary);
}
.switch input:checked + .slider:before {
    transform: translateX(26px);
}

/* Dashboard sidebar */
.dash-sidebar {
    background: var(--secondary);
    min-height: calc(100vh - 75px);
    color: #fff;
}
.dash-sidebar .nav-link {
    color: rgba(255,255,255,.85);
    padding: 14px 20px;
    border-radius: 0;
    font-weight: 500;
    border-left: 3px solid transparent;
}
.dash-sidebar .nav-link:hover {
    background: rgba(255,255,255,.08);
    color: #fff;
}
.dash-sidebar .nav-link.active {
    background: rgba(255,255,255,.12);
    color: #fff;
    border-left-color: var(--primary);
}
.stat-box {
    background: #fff;
    border: 1px solid #eee;
    border-radius: 4px;
    padding: 20px;
    border-top: 3px solid var(--primary);
}
.stat-box .num {
    font-size: 2rem;
    font-weight: 700;
    color: var(--dark);
}
.stat-box .label {
    color: #777;
}

/* Language pills */
.lang-pill {
    cursor: pointer;
    padding: 4px 10px;
    font-size: .78rem;
    border: 1px solid #ccc;
    border-radius: 20px;
    color: #666;
    transition: .3s;
    margin-right: 4px;
}
.lang-pill.active,
.lang-pill:hover {
    background: var(--primary);
    border-color: var(--primary);
    color: #fff;
}

/* Toast */
.mec-toast {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 9999;
    min-width: 280px;
    max-width: 360px;
    padding: 14px 18px;
    border-radius: 4px;
    color: #fff;
    box-shadow: 0 6px 20px rgba(0,0,0,.2);
    display: none;
}
.mec-toast.success { background: #2e7d32; }
.mec-toast.error { background: #b71c1c; }
.mec-toast.info { background: #0d47a1; }
@media (max-width: 576px) {
    .dash-sidebar { min-height: auto; }
}

/* ---------- Home mechanic list (Airbnb-style cards) ---------- */
@keyframes mecUp {
    from { opacity: 0; transform: translateY(14px); }
    to { opacity: 1; transform: none; }
}
.mec-col {
    animation: mecUp .45s ease both;
}
.mec-card {
    display: block;
    height: 100%;
    background: #fff;
    border: 1px solid #eee;
    border-radius: 18px;
    overflow: hidden;
    box-shadow: 0 2px 10px rgba(11,33,84,.06);
    color: inherit;
    text-decoration: none;
    transition: box-shadow .25s, transform .25s;
}
.mec-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 28px rgba(11,33,84,.16);
    color: inherit;
}
.mec-img {
    position: relative;
    overflow: hidden;
    aspect-ratio: 4 / 3;
    background: #f1f3f6;
}
.mec-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}
.mec-tag {
    position: absolute;
    top: 12px;
    left: 12px;
    font-size: .72rem;
    font-weight: 700;
    color: #fff;
    padding: 4px 10px;
    border-radius: 20px;
    display: inline-flex;
    align-items: center;
    gap: 5px;
    backdrop-filter: blur(2px);
}
.mec-tag.online { background: rgba(46,125,50,.92); }
.mec-tag.verified { background: rgba(216,19,36,.9); }
.mec-body { padding: 15px 16px 17px; }
.mec-name {
    font-size: 1.02rem;
    font-weight: 700;
    color: #0b2154;
    margin: 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.mec-price {
    font-weight: 800;
    color: var(--primary);
    white-space: nowrap;
    font-size: 1rem;
}
.mec-price small {
    font-weight: 600;
    color: #8a94a6;
    font-size: .78rem;
}
.mec-skills {
    color: #7a8699;
    font-size: .83rem;
    margin-top: 3px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.mec-rating {
    font-size: .85rem;
    font-weight: 700;
    color: #0b2154;
}
.mec-rating .fa-star { color: #f5b301; }
.mec-count { color: #8a94a6; font-weight: 500; }
