/* SanFordCNC — site custom styles (edit directly, no build step) */

html {
    scroll-behavior: smooth;
}

.hero-video {
    object-fit: cover;
    width: 100%;
    height: 100%;
}

.home-hero__title-short,
.home-hero__cta-short {
    display: none;
}

/* ========== 首页 Hero — 手机端精简（标题 + 按钮，露出视频） ========== */
@media (max-width: 639px) {
    .home-hero {
        min-height: 300px;
    }

        .home-hero .hero-video {
            opacity: 0.6;
        }

    .home-hero__overlay {
        background: rgba(15, 23, 42, 0.3);
    }

    .home-hero__inner {
        padding-top: 2rem;
        padding-bottom: 2rem;
    }

    .home-hero__title-full,
    .home-hero__desc,
    .home-hero__stats,
    .home-hero__cta-full {
        display: none;
    }

    .home-hero__title-short {
        display: block;
        font-size: 1.5rem;
        line-height: 1.3;
    }

    .home-hero__cta-short {
        display: inline;
    }

    .home-hero__cta {
        margin-top: 1.5rem;
        padding: 0.75rem 1.5rem;
        font-size: 0.9375rem;
    }
}

@media (min-width: 640px) {
    .home-hero__title-short,
    .home-hero__cta-short {
        display: none;
    }

    .home-hero__title-full,
    .home-hero__cta-full {
        display: inline;
    }
}

.service-card img {
    width: 100%;
    height: 220px;
    object-fit: cover;
}

/* 图片悬停：缓慢放大 */
.img-hover-zoom {
    overflow: hidden;
}

    .img-hover-zoom img {
        display: block;
        width: 100%;
        transition: transform 0.65s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    }

    .img-hover-zoom:hover img {
        transform: scale(1.15);
    }

.img-hover-zoom--icon img {
    transition: transform 0.5s ease;
}

.img-hover-zoom--icon:hover img {
    transform: scale(1.22);
}

.img-hover-zoom--avatar {
    flex-shrink: 0;
    overflow: hidden;
    border-radius: 9999px;
}

    .img-hover-zoom--avatar img {
        transition: transform 0.5s ease;
    }

    .img-hover-zoom--avatar:hover img {
        transform: scale(1.18);
    }

.material-tab.active {
    background: #0d9488;
    color: #fff;
}

/* PC / 手机头部互斥（默认 PC，≤1023px 手机） */
.header-mobile {
    display: none;
}

@media (max-width: 1023px) {
    .header-pc {
        display: none;
    }

    .header-mobile {
        display: block;
    }
}

/* 手机顶栏 */
.header-mobile .mobile-header-content {
    min-height: 3.5rem;
}

.menu-btn,
.close-menu-btn {
    background: none;
    border: none;
    cursor: pointer;
    -webkit-tap-highlight-color: transparent;
}

.close-menu-btn {
    font-size: 1.75rem;
    line-height: 1;
    color: #64748b;
}

/* 手机侧滑菜单 */
.header-mobile .mobile-menu {
    display: flex;
    flex-direction: column;
    position: fixed;
    top: 0;
    right: 0;
    width: min(100%, 20rem);
    max-width: 100%;
    height: 100%;
    height: 100dvh;
    z-index: 60;
    background: #fff;
    box-shadow: -8px 0 32px rgba(15, 23, 42, 0.15);
    transform: translateX(100%);
    visibility: hidden;
    pointer-events: none;
    transition: transform 0.28s ease, visibility 0.28s;
}

    .header-mobile .mobile-menu.open {
        transform: translateX(0);
        visibility: visible;
        pointer-events: auto;
    }

.mobile-menu-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.75rem 1rem;
    border-bottom: 1px solid #e2e8f0;
}

.mobile-menu-title {
    font-weight: 700;
    font-size: 1rem;
    color: #0f172a;
}

.mobile-menu-body {
    flex: 1;
    overflow-y: auto;
    padding: 0.5rem 1rem;
}

.mobile-menu-list {
    list-style: none;
    margin: 0;
    padding: 0;
}

.mobile-nav-link {
    display: flex;
    align-items: center;
    min-height: 3rem;
    padding: 0.75rem 0.5rem;
    font-size: 1.0625rem;
    font-weight: 500;
    color: #334155;
    text-decoration: none;
    border-bottom: 1px solid #f1f5f9;
    -webkit-tap-highlight-color: transparent;
}

    .mobile-nav-link.text-primary {
        color: #0d9488;
        font-weight: 700;
        background: #f0fdfa;
        border-radius: 0.375rem;
    }

.mobile-menu-foot {
    padding: 1rem;
    border-top: 1px solid #e2e8f0;
    background: #f8fafc;
}

.mobile-quote-cta {
    display: block;
    text-align: center;
    min-height: 3rem;
    line-height: 3rem;
    padding: 0 1.25rem;
    background: #0d9488;
    color: #fff;
    font-size: 1rem;
    font-weight: 700;
    border-radius: 0.5rem;
    text-decoration: none;
}

    .mobile-quote-cta:hover {
        background: #0f766e;
    }

.mobile-menu-hint {
    margin-top: 0.5rem;
    text-align: center;
    font-size: 0.75rem;
    color: #64748b;
}

.mobile-menu-overlay {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 55;
    background: rgba(15, 23, 42, 0.55);
    -webkit-backdrop-filter: blur(2px);
    backdrop-filter: blur(2px);
}

    .mobile-menu-overlay.active {
        display: block;
    }

/* ========== PC 导航 Services 下拉菜单 ========== */
.nav-dropdown {
    position: relative;
}

.nav-dropdown__trigger {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0;
    border: none;
    background: none;
    font: inherit;
    font-size: 0.875rem;
    font-weight: 500;
    color: #334155;
    cursor: pointer;
    line-height: 1.25rem;
    -webkit-tap-highlight-color: transparent;
}

    .nav-dropdown__trigger:hover,
    .nav-dropdown.is-active .nav-dropdown__trigger,
    .nav-dropdown.is-open .nav-dropdown__trigger {
        color: #0d9488;
    }

.nav-dropdown.is-active .nav-dropdown__trigger {
    font-weight: 600;
}

.nav-dropdown__caret {
    flex-shrink: 0;
    transition: transform 0.2s ease;
}

.nav-dropdown:hover .nav-dropdown__caret,
.nav-dropdown.is-open .nav-dropdown__caret,
.nav-dropdown:focus-within .nav-dropdown__caret {
    transform: rotate(180deg);
}

.nav-dropdown__panel {
    position: absolute;
    top: 100%;
    left: 50%;
    padding-top: 0.625rem;
    transform: translateX(-50%);
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: opacity 0.2s ease, visibility 0.2s ease;
    z-index: 70;
}

.nav-dropdown:hover .nav-dropdown__panel,
.nav-dropdown:focus-within .nav-dropdown__panel,
.nav-dropdown.is-open .nav-dropdown__panel {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
}

.nav-dropdown__menu {
    list-style: none;
    margin: 0;
    padding: 0.5rem 0;
    min-width: 15.5rem;
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 0.5rem;
    box-shadow: 0 10px 25px rgba(15, 23, 42, 0.12);
}

    .nav-dropdown__menu a {
        display: block;
        padding: 0.625rem 1.125rem;
        font-size: 0.875rem;
        font-weight: 500;
        color: #334155;
        text-decoration: none;
        white-space: nowrap;
        transition: background-color 0.15s ease, color 0.15s ease;
    }

        .nav-dropdown__menu a:hover,
        .nav-dropdown__menu a.is-current {
            background: #f0fdfa;
            color: #0d9488;
        }

        .nav-dropdown__menu a.is-current {
            font-weight: 600;
        }

/* ========== 手机导航 Services 子菜单 ========== */
.mobile-nav-group__trigger {
    width: 100%;
    justify-content: space-between;
    cursor: pointer;
}

.mobile-nav-group__caret {
    flex-shrink: 0;
    transition: transform 0.2s ease;
    color: #94a3b8;
}

.mobile-nav-group.is-open .mobile-nav-group__caret {
    transform: rotate(180deg);
}

.mobile-nav-group.is-active > .mobile-nav-group__trigger {
    color: #0d9488;
    font-weight: 700;
    background: #f0fdfa;
    border-radius: 0.375rem;
}

.mobile-nav-submenu {
    display: none;
    list-style: none;
    margin: 0;
    padding: 0;
    background: #f8fafc;
}

.mobile-nav-group.is-open .mobile-nav-submenu {
    display: block;
}

.mobile-nav-sublink {
    display: block;
    padding: 0.7rem 1rem 0.7rem 1.75rem;
    font-size: 0.9375rem;
    font-weight: 500;
    color: #475569;
    text-decoration: none;
    border-bottom: 1px solid #f1f5f9;
    -webkit-tap-highlight-color: transparent;
}

    .mobile-nav-sublink:hover,
    .mobile-nav-sublink.is-current {
        color: #0d9488;
        background: #f0fdfa;
    }

    .mobile-nav-sublink.is-current {
        font-weight: 600;
    }
