/* Mechanics listing page */
.mech-index-page {
    min-height: 100vh;
    background: linear-gradient(180deg, #eef6fa 0%, #ffffff 40%, #f8fafc 100%);
}

.mech-index-wrap {
    max-width: 80rem;
    margin: 0 auto;
    padding: 36px 16px 56px;
}

.mech-index-hero {
    position: relative;
    overflow: hidden;
    border-radius: 22px;
    padding: 36px 36px;
    margin-bottom: 28px;
    min-height: 280px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    background: linear-gradient(135deg, #0b1526 0%, #172554 45%, #0e4a6e 100%);
    box-shadow: 0 20px 48px rgba(15, 23, 42, 0.25);
    border: 1px solid rgba(255, 255, 255, 0.08);
}

.mech-index-hero__backdrop {
    position: absolute;
    inset: 0;
    pointer-events: none;
    z-index: 0;
    overflow: hidden;
}

.mech-index-hero__glow {
    position: absolute;
    border-radius: 50%;
    filter: blur(60px);
    opacity: 0.5;
}

.mech-index-hero__glow--1 {
    width: 320px;
    height: 320px;
    top: -100px;
    right: 10%;
    background: radial-gradient(circle, rgba(90, 172, 206, 0.45) 0%, transparent 70%);
}

.mech-index-hero__glow--2 {
    width: 260px;
    height: 260px;
    bottom: -80px;
    left: 25%;
    background: radial-gradient(circle, rgba(43, 122, 196, 0.35) 0%, transparent 70%);
}

.mech-index-hero__pattern {
    position: absolute;
    inset: 0;
    opacity: 0.04;
    background-image: radial-gradient(#fff 1px, transparent 1px);
    background-size: 20px 20px;
}

.mech-index-hero__inner {
    position: relative;
    z-index: 2;
    max-width: 40rem;
    flex: 1 1 auto;
}

.mech-index-hero,
.mech-index-hero h1,
.mech-index-hero p {
    color: #fff !important;
}

.mech-index-hero__visual {
    position: relative;
    z-index: 2;
    flex: 0 0 auto;
    width: 230px;
    height: 230px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.mech-index-hero__visual-glow {
    position: absolute;
    inset: 0;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(90, 172, 206, 0.28) 0%, transparent 70%);
    animation: mechGlowPulse 4s ease-in-out infinite alternate;
    will-change: transform, opacity;
    transform: translateZ(0);
}

@keyframes mechGlowPulse {
    0% { transform: scale(0.92) translateZ(0); opacity: 0.6; }
    100% { transform: scale(1.12) translateZ(0); opacity: 1; }
}

.mech-hero-lottie {
    width: 100%;
    height: 100%;
    position: relative;
    z-index: 1;
    filter: drop-shadow(0 8px 24px rgba(0, 0, 0, 0.28));
    contain: layout paint;
    transform: translateZ(0);
}

.mech-hero-lottie svg {
    width: 100% !important;
    height: 100% !important;
    display: block;
    transform: translateZ(0);
}

.mech-index-hero__label {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    opacity: 0.88;
    margin: 0 0 10px;
}

.mech-index-hero__title {
    font-size: clamp(1.75rem, 4vw, 2.5rem);
    font-weight: 800;
    line-height: 1.15;
    margin: 0 0 10px;
    text-transform: uppercase;
    text-shadow: 0 2px 16px rgba(0, 0, 0, 0.35);
}

.mech-index-hero__subtitle {
    font-size: 0.95rem;
    opacity: 0.92;
    margin: 0;
    max-width: 640px;
    line-height: 1.55;
}

.mech-index-hero__subtitle strong {
    color: #7dd3fc !important;
}

@media (max-width: 900px) {
    .mech-index-hero {
        padding: 28px 22px;
        gap: 16px;
    }
    .mech-index-hero__visual {
        width: 160px;
        height: 160px;
    }
}

@media (max-width: 640px) {
    .mech-index-hero {
        flex-direction: column-reverse;
        align-items: flex-start;
        padding: 24px 18px;
        min-height: auto;
        border-radius: 16px;
    }
    .mech-index-hero__visual {
        width: 130px;
        height: 130px;
        align-self: center;
        margin-bottom: -6px;
    }
}

.mech-index-cta {
    border-radius: 16px;
    border: 1px solid #dce8f5;
    background: #fff;
    padding: 22px 24px;
    margin-bottom: 32px;
    box-shadow: 0 4px 20px rgba(20, 33, 43, 0.05);
}

.mech-index-cta__head {
    display: flex;
    align-items: flex-start;
    gap: 14px;
    margin-bottom: 16px;
}

.mech-index-cta__icon {
    width: 44px;
    height: 44px;
    border-radius: 12px;
    background: linear-gradient(135deg, rgba(43, 122, 196, 0.12), rgba(124, 179, 66, 0.12));
    color: #2b7ac4;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    font-size: 1.1rem;
}

.mech-index-cta__title {
    font-size: 1.05rem;
    font-weight: 700;
    color: #14212b;
    margin: 0 0 6px;
}

.mech-index-cta__text {
    font-size: 0.9rem;
    color: #6b7b93;
    margin: 0;
    line-height: 1.55;
    max-width: 720px;
}

.mech-index-cta__actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.mech-index-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 10px 18px;
    border-radius: 10px;
    font-size: 0.875rem;
    font-weight: 600;
    text-decoration: none;
    border: 1.5px solid transparent;
    transition: transform 0.15s ease, box-shadow 0.2s ease, opacity 0.2s ease;
}

.mech-index-btn:hover {
    transform: translateY(-1px);
}

.mech-index-btn--primary {
    background: linear-gradient(135deg, #2b7ac4, #7cb342);
    color: #fff !important;
    box-shadow: 0 4px 14px rgba(43, 122, 196, 0.22);
}

.mech-index-btn--outline {
    background: #fff;
    color: #2b7ac4 !important;
    border-color: #2b7ac4;
}

.mech-index-btn--outline:hover {
    background: #f0f7ff;
}

.mech-index-btn--ghost {
    background: #f8fafc;
    color: #14212b !important;
    border-color: #dce8f5;
}

.mech-index-section {
    margin-bottom: 36px;
}

.mech-index-section:last-child {
    margin-bottom: 0;
}

.mech-index-section__head {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 20px;
}

.mech-index-section__bar {
    width: 4px;
    height: 28px;
    border-radius: 4px;
    flex-shrink: 0;
}

.mech-index-section__bar--local {
    background: linear-gradient(180deg, #2b7ac4, #7cb342);
}

.mech-index-section__bar--other {
    background: #cbd5e1;
}

.mech-index-section__title {
    font-size: 1.2rem;
    font-weight: 700;
    color: #14212b;
    margin: 0;
}

.mech-index-section__count {
    margin-left: auto;
    font-size: 0.8rem;
    font-weight: 600;
    color: #6b7b93;
    background: #f0f4f8;
    padding: 4px 10px;
    border-radius: 20px;
}

.mech-index-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 18px;
}

@media (min-width: 640px) {
    .mech-index-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (min-width: 1024px) {
    .mech-index-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (min-width: 1280px) {
    .mech-index-grid {
        grid-template-columns: repeat(4, 1fr);
    }
}

.mech-index-card {
    display: flex;
    flex-direction: column;
    height: 100%;
    border-radius: 16px;
    border: 1px solid #e4f2ff;
    background: #fff;
    overflow: hidden;
    text-decoration: none;
    color: inherit;
    box-shadow: 0 4px 16px rgba(20, 33, 43, 0.04);
    transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}

.mech-index-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 12px 32px rgba(20, 33, 43, 0.1);
    border-color: #2b7ac4;
}

.mech-index-card__top {
    display: flex;
    align-items: flex-start;
    gap: 14px;
    padding: 18px 18px 12px;
}

.mech-index-card__avatar {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    background: linear-gradient(135deg, #2b7ac4, #7cb342);
    color: #fff;
    font-weight: 800;
    font-size: 1.1rem;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.mech-index-card__info {
    flex: 1;
    min-width: 0;
}

.mech-index-card__name {
    font-size: 1rem;
    font-weight: 700;
    color: #14212b;
    margin: 0 0 6px;
    line-height: 1.3;
    transition: color 0.2s ease;
}

.mech-index-card:hover .mech-index-card__name {
    color: #2b7ac4;
}

.mech-index-card__meta {
    display: flex;
    flex-direction: column;
    gap: 3px;
    font-size: 0.8rem;
    color: #6b7b93;
}

.mech-index-card__meta span {
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.mech-index-card__meta i {
    width: 12px;
    color: #2b7ac4;
    text-align: center;
}

.mech-index-card__body {
    padding: 0 18px 14px;
    flex: 1;
}

.mech-index-card__about {
    font-size: 0.85rem;
    color: #6b7b93;
    line-height: 1.5;
    margin: 0;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.mech-index-card__stats {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    padding: 12px 18px;
    border-top: 1px solid #f0f4f8;
    font-size: 0.8rem;
}

.mech-index-card__rating {
    font-weight: 700;
    color: #f59e0b;
}

.mech-index-card__rating--empty {
    color: #9ca3af;
    font-weight: 500;
}

.mech-index-card__services {
    color: #6b7b93;
    font-weight: 500;
}

.mech-index-card__footer {
    padding: 0 18px 18px;
}

.mech-index-card__btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: 100%;
    padding: 11px 14px;
    border-radius: 10px;
    font-size: 0.875rem;
    font-weight: 700;
    color: #fff !important;
    background: linear-gradient(135deg, #2b7ac4, #7cb342);
    transition: opacity 0.2s ease;
}

.mech-index-card:hover .mech-index-card__btn {
    opacity: 0.95;
}

.mech-index-empty {
    border-radius: 18px;
    border: 1px solid #e4f2ff;
    background: #fff;
    padding: 48px 24px;
    text-align: center;
    box-shadow: 0 4px 18px rgba(20, 33, 43, 0.04);
}

.mech-index-empty i {
    font-size: 2.5rem;
    color: #cbd5e1;
    margin-bottom: 14px;
}

.mech-index-empty p {
    color: #6b7b93;
    margin: 0 0 18px;
    font-size: 0.95rem;
}

@media (max-width: 640px) {
    .mech-index-wrap {
        padding-top: 24px;
    }

    .mech-index-hero {
        padding: 24px 20px;
    }

    .mech-index-cta {
        padding: 18px 16px;
    }
}

/* Layout + sidebar filters */
.mech-layout {
    display: grid;
    grid-template-columns: 280px minmax(0, 1fr);
    gap: 24px;
    align-items: start;
}

.mech-sidebar-backdrop { display: none; }

.mech-sidebar {
    position: sticky;
    top: 88px;
    background: #fff;
    border: 1px solid #dce8f5;
    border-radius: 18px;
    box-shadow: 0 10px 36px rgba(20, 33, 43, 0.06);
    overflow: hidden;
    max-height: calc(100vh - 110px);
    display: flex;
    flex-direction: column;
}

.mech-sidebar::before {
    content: '';
    display: block;
    height: 3px;
    flex-shrink: 0;
    background: linear-gradient(90deg, #2b7ac4, #1e3a5f 55%, #7cb342);
}

.mech-sidebar__head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 10px;
    padding: 16px 16px 12px;
    border-bottom: 1px solid #eef2f7;
    flex-shrink: 0;
}

.mech-sidebar__title-wrap { display: flex; align-items: flex-start; gap: 10px; }

.mech-sidebar__icon {
    width: 36px;
    height: 36px;
    border-radius: 10px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(145deg, #e8f3fc, #eef8e8);
    color: #1e3a5f;
    border: 1px solid #c5ddf3;
    flex-shrink: 0;
}

.mech-sidebar__title { font-size: 1rem; font-weight: 800; margin: 0 0 2px; color: #14212b; }
.mech-sidebar__hint { margin: 0; font-size: 0.78rem; color: #64748b; }
.mech-sidebar__head-actions { display: flex; align-items: center; gap: 8px; }

.mech-sidebar__badge {
    min-width: 22px;
    height: 22px;
    padding: 0 7px;
    border-radius: 999px;
    background: #e8f3fc;
    border: 1px solid #9bc4e8;
    color: #1e3a5f;
    font-size: 0.72rem;
    font-weight: 800;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.mech-sidebar__close {
    display: none;
    width: 34px;
    height: 34px;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    background: #f8fafc;
    color: #475569;
    cursor: pointer;
    align-items: center;
    justify-content: center;
}

.mech-sidebar__form { padding: 14px 16px 18px; overflow-y: auto; flex: 1; }

.mech-sidebar__section {
    margin-bottom: 18px;
    padding-bottom: 16px;
    border-bottom: 1px solid #eef2f7;
}

.mech-sidebar__section:last-of-type {
    border-bottom: 0;
    margin-bottom: 8px;
    padding-bottom: 0;
}

.mech-sidebar__label {
    display: block;
    margin: 0 0 8px;
    font-size: 0.7rem;
    font-weight: 800;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    color: #64748b;
}

.mech-search-bar { position: relative; }

.mech-search-bar__icon {
    position: absolute;
    left: 14px;
    top: 50%;
    transform: translateY(-50%);
    color: #94a3b8;
    font-size: 0.88rem;
    pointer-events: none;
}

.mech-search-bar__input {
    width: 100%;
    height: 42px;
    padding: 0 14px 0 40px;
    border: 1px solid #e2e8f0;
    border-radius: 11px;
    background: #f8fafc;
    font-size: 0.88rem;
    color: #0f172a;
    outline: none;
}

.mech-search-bar__input:focus {
    background: #fff;
    border-color: #2b7ac4;
    box-shadow: 0 0 0 3px rgba(43, 122, 196, 0.16);
}

.mech-search-input {
    width: 100%;
    height: 42px;
    padding: 0 12px;
    border: 1px solid #e2e8f0;
    border-radius: 11px;
    background: #fff;
    font-size: 0.88rem;
    font-weight: 600;
    color: #1e293b;
    outline: none;
    appearance: none;
    -webkit-appearance: none;
}

select.mech-search-input {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%2364748b' d='M2.5 4.5L6 8l3.5-3.5'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 12px center;
    padding-right: 32px;
}

.mech-search-input:focus {
    border-color: #2b7ac4;
    box-shadow: 0 0 0 3px rgba(43, 122, 196, 0.16);
}

.mech-sidebar__actions {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-top: 8px;
    padding-top: 14px;
    border-top: 1px solid #eef2f7;
}

.mech-search-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-height: 42px;
    padding: 0 16px;
    border-radius: 11px;
    font-weight: 800;
    font-size: 0.88rem;
    text-decoration: none;
    border: 0;
    cursor: pointer;
    width: 100%;
}

.mech-search-btn--primary {
    background: linear-gradient(135deg, #2b7ac4, #1e3a5f);
    color: #fff !important;
    box-shadow: 0 8px 20px rgba(43, 122, 196, 0.28);
}

.mech-search-btn--ghost {
    background: #f8fafc;
    color: #475569 !important;
    border: 1px solid #e2e8f0;
}

.mech-search-btn--ghost:hover {
    background: #e8f3fc;
    border-color: #9bc4e8;
    color: #1e3a5f !important;
}

.mech-main { min-width: 0; }

.mech-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    flex-wrap: wrap;
    margin-bottom: 16px;
    padding: 12px 14px;
    background: #fff;
    border: 1px solid #dce8f5;
    border-radius: 14px;
    box-shadow: 0 6px 20px rgba(20, 33, 43, 0.04);
}

.mech-toolbar__left,
.mech-toolbar__right {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
}

.mech-toolbar__filters-btn {
    display: none;
    align-items: center;
    gap: 8px;
    min-height: 38px;
    padding: 0 12px;
    border-radius: 10px;
    border: 1px solid #e2e8f0;
    background: #f8fafc;
    color: #334155;
    font-weight: 800;
    font-size: 0.85rem;
    cursor: pointer;
}

.mech-toolbar__filters-count {
    min-width: 20px;
    height: 20px;
    padding: 0 6px;
    border-radius: 999px;
    background: #2b7ac4;
    color: #fff;
    font-size: 0.7rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.mech-toolbar__count { margin: 0; font-size: 0.9rem; color: #64748b; }
.mech-toolbar__count strong { color: #14212b; }
.mech-toolbar__filtered { color: #1e3a5f; font-weight: 700; }

.mech-toolbar__clear {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 0.82rem;
    font-weight: 800;
    color: #1e3a5f !important;
    text-decoration: none;
}

.mech-toolbar__sort {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin: 0;
    font-size: 0.78rem;
    font-weight: 800;
    color: #64748b;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.mech-toolbar__sort .mech-search-input {
    width: auto;
    min-width: 170px;
    height: 38px;
    text-transform: none;
    letter-spacing: normal;
}

.mech-index-grid {
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
}

body.mech-sidebar-open { overflow: hidden; }

@media (max-width: 991px) {
    .mech-layout { grid-template-columns: 1fr; }

    .mech-sidebar-backdrop {
        display: block;
        position: fixed;
        inset: 0;
        background: rgba(15, 23, 42, 0.45);
        z-index: 1040;
    }

    .mech-sidebar-backdrop[hidden] { display: none !important; }

    .mech-sidebar {
        position: fixed;
        top: 0;
        left: 0;
        bottom: 0;
        width: min(340px, 88vw);
        max-height: none;
        border-radius: 0 16px 16px 0;
        z-index: 1050;
        transform: translateX(-105%);
        transition: transform .22s ease;
        box-shadow: 12px 0 40px rgba(15, 23, 42, 0.18);
    }

    .mech-sidebar.is-open { transform: translateX(0); }
    .mech-sidebar__close { display: inline-flex; }
    .mech-toolbar__filters-btn { display: inline-flex; }
}

