/* ============================================================
   eye.shilifang.cn 全站视觉美化层 (2026-08-25)
   参照医疗/眼视光官网最佳实践：60-30-10 配色克制、蓝绿医疗调、
   卡片质感、微动效、信任要素强化、移动端触控优化
   ============================================================ */

/* ---------- 1. 全局基础 ---------- */
html { scroll-behavior: smooth; overflow-x: hidden; }
body { overflow-x: hidden; -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility; }
::selection { background: rgba(8,145,178,.18); }

/* ---------- 2. 按钮体系：光泽扫过 + 上浮 + 光晕 ---------- */
.btn-primary, .btn-secondary, .nav-btn, .btn-accent,
.slf-book-btn, .slf-call-btn, .cta-btn, .hero-actions .btn {
    position: relative;
    overflow: hidden;
    transition: transform .3s cubic-bezier(.22,1,.36,1), box-shadow .3s ease, background .3s ease !important;
}
.btn-primary::after, .nav-btn::after, .btn-accent::after {
    content: '';
    position: absolute;
    top: 0; left: -130%;
    width: 55%; height: 100%;
    background: linear-gradient(105deg, transparent, rgba(255,255,255,.35), transparent);
    transform: skewX(-18deg);
    transition: left .55s ease;
    pointer-events: none;
}
.btn-primary:hover::after, .nav-btn:hover::after, .btn-accent:hover::after { left: 165%; }
.btn-primary:hover, .nav-btn:hover, .btn-accent:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 26px -8px rgba(8,145,178,.5) !important;
}
.btn-secondary:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 22px -10px rgba(8,145,178,.35) !important;
    border-color: rgba(8,145,178,.4) !important;
}

/* CTA 呼吸光晕 */
.cta-section .btn-primary, .hero-actions .btn-primary {
    animation: slfBreath 3.2s ease-in-out infinite;
}
@keyframes slfBreath {
    0%, 100% { box-shadow: 0 8px 22px -6px rgba(8,145,178,.4); }
    50% { box-shadow: 0 8px 30px -4px rgba(6,182,212,.65); }
}

/* ---------- 3. 卡片 hover 统一：上浮 + 主色光晕 + 图标跳动 ---------- */
.service-card, .trust-item, .pricing-card, .knowledge-card,
.why-card, .member-card, .join-card, .stat-card, .step-card {
    transition: transform .4s cubic-bezier(.22,1,.36,1), box-shadow .4s ease, border-color .4s ease !important;
    will-change: transform;
}
.service-card:hover, .pricing-card:hover, .knowledge-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 26px 50px -18px rgba(8,145,178,.30), 0 6px 16px -6px rgba(8,145,178,.14) !important;
    border-color: rgba(8,145,178,.28) !important;
}
.service-icon, .trust-icon, .pricing-icon, .knowledge-icon,
.service-card i, .pricing-card i, .card-icon {
    transition: transform .35s cubic-bezier(.22,1,.36,1), color .3s ease;
}
.service-card:hover .service-icon,
.pricing-card:hover .pricing-icon,
.service-card:hover i,
.pricing-card:hover i {
    transform: translateY(-4px) scale(1.08);
}
.trust-item:hover .trust-icon {
    transform: translateY(-3px) scale(1.08);
}

/* ---------- 4. 图片 hover 缩放（配图容器） ---------- */
.img-zoom, .hero-visual img, .service-img, .about-img, .store-img {
    transition: transform .7s cubic-bezier(.22,1,.36,1), box-shadow .5s ease !important;
}
.img-zoom:hover, .service-img:hover, .about-img:hover, .store-img:hover {
    transform: scale(1.035);
}

/* ---------- 4b. services 页图文卡 ---------- */
.service-card-img {
    position: relative;
    height: 200px;
    margin: -44px -36px 26px;
    overflow: hidden;
}
.service-card-img::after {
    content: '';
    position: absolute;
    left: 0; right: 0; bottom: 0;
    height: 70px;
    background: linear-gradient(180deg, transparent, rgba(2,20,34,.32));
    pointer-events: none;
}
.service-card-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform .8s cubic-bezier(.22,1,.36,1);
}
.service-card:hover .service-card-img img { transform: scale(1.07); }
.service-card-img .service-icon {
    position: absolute;
    left: 18px;
    bottom: 18px;
    z-index: 2;
    width: 62px;
    height: 62px;
    border-radius: 18px;
    margin: 0;
    background: linear-gradient(135deg, var(--primary,#0891B2), var(--primary-light,#06B6D4));
    color: #fff;
    font-size: 26px;
    box-shadow: 0 10px 24px -6px rgba(8,145,178,.5);
    border: 3px solid rgba(255,255,255,.9);
}
.service-card-img .service-icon i { font-size: 26px; color: #fff; }
.service-card-img + h3 { margin-top: 4px; }
@media (max-width: 767px) {
    .service-card-img { height: 160px; margin: -28px -20px 22px; }
    .service-card-img .service-icon { width: 54px; height: 54px; font-size: 22px; border-radius: 15px; }
    .service-card-img .service-icon i { font-size: 22px; }
}

/* ---------- 5. section 标题体系：胶囊标签 + 渐变强调 ---------- */
.section-tag, .hero-badge, .page-banner .section-tag {
    background: linear-gradient(135deg, rgba(8,145,178,.12), rgba(6,182,212,.07)) !important;
    border: 1px solid rgba(8,145,178,.2) !important;
    border-radius: 999px !important;
    color: var(--primary-dark, #0E7490) !important;
    letter-spacing: .06em !important;
}
.section-title {
    position: relative;
}
.section-title::after {
    content: '';
    display: block;
    width: 64px; height: 4px;
    margin: 14px auto 0;
    border-radius: 999px;
    background: linear-gradient(90deg, var(--primary,#0891B2), var(--accent,#F59E0B));
    opacity: .7;
}
.page-banner .section-title::after { display: none; }

/* ---------- 5b. 子页面 banner 装饰增强 ---------- */
.page-banner { position: relative; overflow: hidden; }
.page-banner::before {
    content: '';
    position: absolute;
    top: -45%; right: -8%;
    width: 480px; height: 480px;
    background: radial-gradient(circle, rgba(6,182,212,.30), transparent 65%);
    border-radius: 50%;
    filter: blur(34px);
    animation: slfFloatY 9s ease-in-out infinite;
    pointer-events: none;
}
.page-banner::after {
    content: '';
    position: absolute;
    bottom: -35%; left: -6%;
    width: 400px; height: 400px;
    background: radial-gradient(circle, rgba(245,158,11,.18), transparent 65%);
    border-radius: 50%;
    filter: blur(34px);
    animation: slfFloatY 11s ease-in-out infinite reverse;
    pointer-events: none;
}
@keyframes slfFloatY {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-20px); }
}
.page-banner > * { position: relative; z-index: 2; }

/* ---------- 6. hero 视觉增强：玻璃卡 + orb 呼吸 + 粒子 ---------- */
.hero-main-card {
    box-shadow: 0 34px 70px -18px rgba(1,20,34,.6) !important;
    border: 1px solid rgba(255,255,255,.14) !important;
}

/* hero 图片主卡（真实场景图 + 底部玻璃信息条） */
.hero-main-photo {
    position: relative;
    width: 100%;
    height: 100%;
    border-radius: 36px;
    overflow: hidden;
    border: 1px solid rgba(255,255,255,.16);
    box-shadow: 0 34px 70px -18px rgba(1,20,34,.6);
    z-index: 2;
}
.hero-main-photo > img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}
.hero-visual-wrapper .hero-main-card {
    position: absolute;
    top: auto;
    left: 18px;
    right: 18px;
    bottom: 18px;
    transform: none;
    width: auto;
    background: rgba(7, 24, 40, .58);
    backdrop-filter: blur(18px);
    -webkit-backdrop-filter: blur(18px);
    border: 1px solid rgba(255,255,255,.18);
    border-radius: 22px;
    padding: 20px 22px;
    z-index: 3;
}
.hero-main-photo .hero-card-icon {
    width: 52px;
    height: 52px;
    font-size: 22px;
    margin-bottom: 12px;
    border-radius: 14px;
}
.hero-main-photo .hero-card-title { font-size: 1.08rem; margin-bottom: 6px; }
.hero-main-photo .hero-card-text { font-size: .85rem; line-height: 1.65; opacity: .94; }

/* ---------- 6b. 各页内容配图统一样式 ---------- */
.site-photo {
    border-radius: 24px;
    box-shadow: 0 24px 50px -18px rgba(8,145,178,.32), 0 6px 16px -6px rgba(8,145,178,.12);
    border: 1px solid rgba(255,255,255,.6);
    overflow: hidden;
}
.site-photo img { width: 100%; height: 100%; object-fit: cover; display: block; }

/* about 页图片替换 */
.about-image.site-photo {
    position: relative;
    padding: 0 !important;
    background: none !important;
    min-height: 360px;
    border-radius: 28px;
}
.about-image.site-photo img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.about-image-cap {
    position: absolute;
    left: 16px; right: 16px; bottom: 16px;
    background: rgba(7,24,40,.58);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border-radius: 16px;
    padding: 14px 18px;
    text-align: left;
    color: #fff;
    border: 1px solid rgba(255,255,255,.16);
}
.about-image-cap h4 { margin: 0 0 4px; font-size: 1.05rem; color: #fff; }
.about-image-cap p { margin: 0; font-size: .83rem; opacity: .92; }

/* join 页团队图替换 */
.join-image.site-photo {
    position: relative;
    padding: 0 !important;
    background: none !important;
    min-height: 380px;
    border-radius: 28px;
}
.join-image.site-photo img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }

/* contact 页门店实景横幅 */
.contact-store-banner {
    position: relative;
    height: 260px;
    margin: 8px 0 0;
    border-radius: 28px;
    overflow: hidden;
    border: 1px solid rgba(255,255,255,.6);
    box-shadow: 0 24px 50px -18px rgba(8,145,178,.30);
}
.contact-store-banner > img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
@media (max-width: 767px) {
    .contact-store-banner { height: 200px; border-radius: 22px; }
    .join-image.site-photo, .about-image.site-photo { min-height: 260px; }
}
.hero-orb { animation-duration: 7s !important; animation-timing-function: ease-in-out !important; }
.hero-float-card {
    box-shadow: 0 18px 40px -12px rgba(1,20,34,.5) !important;
    border: 1px solid rgba(255,255,255,.16) !important;
}
.hero-particles .particle { opacity: .85; }

/* ---------- 7. 页脚/导航细节 ---------- */
.navbar-brand:hover { opacity: .88; }
.footer-links a { position: relative; }
.footer-contact li:hover i { color: var(--primary-lighter, #22D3EE) !important; transform: scale(1.1); }
.footer-contact li i { transition: transform .3s ease, color .3s ease; }

/* ---------- 7b. 导航栏自适应修复：防止窄桌面视口(992-1199px)下菜单文字竖排/挤压 ---------- */
.navbar-nav .nav-link { white-space: nowrap; }
.nav-cta-wrap { flex-shrink: 0; flex-wrap: nowrap; }
.nav-tel { white-space: nowrap; }
.nav-book-btn { flex-shrink: 0; white-space: nowrap; }

@media (min-width: 992px) {
    .navbar .container { flex-wrap: nowrap; }
    .navbar-nav { flex-wrap: nowrap; }
    .navbar-nav .nav-item { flex-shrink: 0; }
    .nav-cta-wrap { margin-left: 14px !important; }
}

@media (min-width: 992px) and (max-width: 1199px) {
    .navbar-logo, .logo-container { max-width: 140px !important; }
    .navbar-nav .nav-link { padding: 10px 9px !important; font-size: .9rem !important; }
    .nav-cta-wrap { margin-left: 6px !important; gap: 6px !important; }
    .nav-tel { font-size: 13px !important; gap: 4px !important; }
    .nav-book-btn { padding: 7px 13px !important; font-size: 13px !important; }
}

@media (max-width: 991px) {
    .nav-cta-wrap { margin-left: 0 !important; }
    .navbar-nav .nav-link { white-space: normal; }
}

/* ---------- 8. 表单视觉 ---------- */
.form-control:focus, .slf-form input:focus, .slf-form textarea:focus, .form-input:focus {
    box-shadow: 0 0 0 3px rgba(8,145,178,.14) !important;
    border-color: rgba(8,145,178,.5) !important;
}
.form-control, .slf-form input, .slf-form textarea, .form-input {
    transition: border-color .25s ease, box-shadow .25s ease !important;
}

/* ---------- 9. 移动端触控与溢出兜底 ---------- */
@media (max-width: 991px) {
    .btn, .btn-primary, .btn-secondary, .nav-btn {
        min-height: 46px;
        display: inline-flex;
        align-items: center;
        justify-content: center;
    }
    .slf-mobile-bar a { min-height: 52px; }
    .section-title::after { margin-left: 0; }
}
@media (max-width: 767px) {
    .hero-title, .section-title { letter-spacing: 0 !important; }
    .service-card, .pricing-card { border-radius: 24px !important; }
    .hero-actions .btn { width: 100%; max-width: 320px; }
}
/* 移动端恢复 hero 视觉图（真实场景图值得展示，覆盖 mobile-optimized 隐藏规则） */
@media (max-width: 768px) {
    .hero-visual,
    body.device-mobile .hero-visual,
    body.touch-device .hero-visual {
        display: block !important;
        margin-top: 30px;
    }
    .hero-visual-wrapper {
        aspect-ratio: 4/5;
        max-width: 360px;
        margin: 0 auto;
    }
    .hero-main-photo { border-radius: 26px; }
    .hero-visual-wrapper .hero-main-card {
        left: 12px; right: 12px; bottom: 12px;
        padding: 16px 18px;
        border-radius: 18px;
    }
    .hero-main-photo .hero-card-icon { width: 44px; height: 44px; font-size: 19px; margin-bottom: 10px; }
    .hero-main-photo .hero-card-title { font-size: 1rem; }
    .hero-main-photo .hero-card-text { font-size: .78rem; }
}

/* ---------- 10. 降级保护：prefers-reduced-motion ---------- */
@media (prefers-reduced-motion: reduce) {
    html { scroll-behavior: auto; }
    *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; }
}
