/**
 * 低代码 AI 对比页 · 五页统一壳层样式
 * cod-ai / cont-ai / con2-ai / con3-ai / con5-ai
 * v=20260626
 */
@import url('page-shell-unified.css?v=20260616');

:root {
    --ai-header-h: 55px;
    --ai-page-offset: 141px;
    --ai-shell-max: 1100px;
}

body.ai-compare-page {
    padding-top: var(--ai-page-offset, 141px);
}

#navbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    width: 100%;
    z-index: 50;
}

.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    border: 0;
}

/* 固定层：二级导航 + 章节目录 */
.ai-fixed-stack {
    position: fixed;
    left: 0;
    right: 0;
    top: var(--ai-header-h, 55px);
    z-index: 48;
    background: #fff;
    box-shadow: 0 4px 18px rgba(15, 23, 42, 0.07);
}

.ai-subnav {
    position: relative;
    background: linear-gradient(90deg, #059669, #10b981);
    box-shadow: none;
}

.ai-subnav-inner {
    max-width: var(--ai-shell-max);
    margin: 0 auto;
    display: none;
    align-items: center;
    justify-content: flex-start;
    flex-wrap: nowrap;
    gap: 0.15rem;
    padding: 0.4rem 1rem;
    overflow-x: auto;
    scrollbar-width: none;
}

.ai-subnav-inner::-webkit-scrollbar {
    display: none;
}

.ai-subnav-link {
    flex-shrink: 0;
    padding: 0.38rem 0.8rem;
    border-radius: 0.5rem;
    color: rgba(255, 255, 255, 0.95);
    font-size: 0.8125rem;
    font-weight: 500;
    text-decoration: none;
    white-space: nowrap;
    transition: background 0.2s;
}

.ai-subnav-link:hover {
    background: rgba(255, 255, 255, 0.14);
    color: #fff;
}

.ai-subnav-link.is-active {
    background: rgba(255, 255, 255, 0.24);
    font-weight: 600;
}

.ai-subnav-mobile {
    display: block;
    padding: 0.4rem 1rem;
    max-width: var(--ai-shell-max);
    margin: 0 auto;
}

.ai-subnav-select {
    width: 100%;
    padding: 0.45rem 0.75rem;
    border-radius: 0.5rem;
    border: 1px solid rgba(255, 255, 255, 0.35);
    background: rgba(255, 255, 255, 0.12);
    color: #fff;
    font-size: 16px;
}

.ai-subnav-select option {
    color: #111;
}

@media (min-width: 768px) {
    .ai-subnav-inner {
        display: flex;
    }

    .ai-subnav-mobile {
        display: none;
    }
}

/* 章节目录（固定顶栏下） */
.toc-bar--pinned {
    position: relative;
    top: auto;
    z-index: 1;
    margin: 0;
    border-radius: 0;
    border-left: none;
    border-right: none;
    border-top: 1px solid #e8edf3;
    border-bottom: none;
    box-shadow: none;
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
    background: #fff;
    padding: 0;
    overflow: hidden;
}

.toc-bar-inner {
    max-width: var(--ai-shell-max);
    margin: 0 auto;
    padding: 8px 16px;
    display: flex;
    flex-wrap: nowrap;
    align-items: center;
    gap: 6px;
    overflow-x: auto;
    scroll-padding-inline: 16px;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
}

.toc-bar-inner::-webkit-scrollbar {
    display: none;
}

.toc-label {
    font-size: 12px;
    font-weight: 700;
    color: #047857;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding-right: 8px;
    border-right: 1px solid #e5e7eb;
    margin-right: 4px;
    white-space: nowrap;
    flex-shrink: 0;
}

.toc-chip {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 5px 11px;
    background: #f3f4f6;
    color: #374151;
    border-radius: 16px;
    font-size: 12.5px;
    text-decoration: none;
    transition: all 0.2s;
    white-space: nowrap;
    flex-shrink: 0;
}

.toc-chip:hover,
.toc-chip.active {
    background: #10B981;
    color: #fff;
}

.toc-chip .num {
    width: 17px;
    height: 17px;
    border-radius: 50%;
    background: #fff;
    color: #059669;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 10px;
    font-weight: 700;
    flex-shrink: 0;
}

.toc-chip:hover .num,
.toc-chip.active .num {
    background: #fff;
    color: #059669;
}

@media (max-width: 768px) {
    .toc-bar-inner {
        padding: 8px 12px;
    }

    .toc-chip {
        font-size: 11.5px;
        padding: 5px 10px;
    }
}

/* Hero 轮播 */
.hero.hero--carousel {
    background: #0f172a;
    padding: 0 !important;
    margin-bottom: 0;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.hero.hero--carousel::before,
.hero.hero--carousel::after {
    display: none;
}

.hero-carousel-stage {
    position: relative;
    min-height: 300px;
}

.hero--carousel .hero-slider {
    position: relative;
    min-height: 300px;
}

.hero-slide {
    position: absolute;
    inset: 0;
    padding: 44px 52px 8px;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.6s ease, visibility 0.6s;
    pointer-events: none;
    z-index: 1;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
}

.hero-slide.is-active {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
    z-index: 2;
}

.hero-slide::before {
    content: "";
    position: absolute;
    inset: 0;
    pointer-events: none;
    z-index: 0;
    background:
        linear-gradient(180deg, rgba(15, 23, 42, 0.12) 0%, transparent 28%),
        linear-gradient(105deg, rgba(6, 78, 59, 0.88) 0%, rgba(15, 118, 110, 0.76) 40%, rgba(15, 23, 42, 0.42) 72%, rgba(15, 23, 42, 0.28) 100%);
}

.hero-slide .hero-slide-inner {
    position: relative;
    z-index: 1;
}

.hero--carousel .hero-slide h1,
.hero--carousel .hero-slide-title {
    font-size: 28px;
    font-weight: 800;
    color: #f8fafc;
    margin-bottom: 10px;
    line-height: 1.35;
    letter-spacing: -0.5px;
}

.hero--carousel .hero-slide p {
    font-size: 14px;
    color: rgba(248, 250, 252, 0.92);
    max-width: 720px;
    margin: 0 auto 16px;
    line-height: 1.7;
}

.hero--carousel .hero-slide p strong {
    color: #a7f3d0;
}

.hero-accent {
    background: linear-gradient(135deg, #6ee7b7, #a7f3d0);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    font-weight: 800;
}

.hero-tag-wrap {
    text-align: center;
    margin-bottom: 14px;
}

.hero-tag {
    display: inline-block;
    background: rgba(255, 255, 255, 0.12);
    border: 1px solid rgba(255, 255, 255, 0.28);
    color: #ecfdf5;
    padding: 5px 14px;
    border-radius: 20px;
    font-size: 11px;
    font-weight: 500;
}

.hero-tag i {
    color: #a7f3d0;
    margin-right: 4px;
}

.hero--carousel .hero-button.secondary {
    background: rgba(255, 255, 255, 0.1);
    color: #ecfdf5;
    border: 1px solid rgba(255, 255, 255, 0.35);
}

.hero--carousel .hero-button.secondary:hover {
    background: rgba(255, 255, 255, 0.18);
    color: #fff;
}

.hero-slide--main {
    background-image: url('../images/1/pexels-sora-shimazaki-5926382.jpg');
}

.hero-slide--dim {
    background-image: url('../images/1/pexels-anete-lusina-5240548.jpg');
}

.hero-slide--dir {
    background-image: url('../images/1/pexels-cottonbro-4705628.jpg');
}

.hero-slide--cta {
    background-image: url('../images/1/pexels-tima-miroshnichenko-6755089.jpg');
}

.hero-carousel-stage .hero-nav {
    position: absolute;
    top: 46%;
    transform: translateY(-50%);
    z-index: 8;
    width: 40px;
    height: 40px;
    border: 1px solid rgba(255, 255, 255, 0.5);
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.95);
    color: #059669;
    font-size: 1.05rem;
    line-height: 1;
    cursor: pointer;
    transition: background 0.2s, border-color 0.2s, box-shadow 0.2s;
    box-shadow: 0 4px 14px rgba(16, 185, 129, 0.18);
}

.hero-carousel-stage .hero-nav:hover {
    border-color: #10B981;
    box-shadow: 0 4px 14px rgba(16, 185, 129, 0.2);
}

.hero-nav--prev {
    left: 10px;
}

.hero-nav--next {
    right: 10px;
}

.hero-carousel-ui {
    position: relative;
    z-index: 6;
    padding-bottom: 4px;
}

.hero-slide-counter {
    text-align: center;
    font-size: 11px;
    font-weight: 600;
    color: rgba(236, 253, 245, 0.85);
    margin-bottom: 2px;
}

.hero-dots {
    position: relative;
    z-index: 5;
    display: flex;
    justify-content: center;
    gap: 8px;
    padding: 6px 0 4px;
}

.hero-dot {
    width: 9px;
    height: 9px;
    border-radius: 999px;
    border: none;
    padding: 0;
    background: rgba(16, 185, 129, 0.35);
    cursor: pointer;
    transition: width 0.25s, background 0.25s;
}

.hero-dot.is-active {
    width: 24px;
    background: #10B981;
}

.hero-foot {
    position: relative;
    z-index: 3;
    padding: 8px 0 36px;
    background: #f8fafc;
}

.hero-foot .container {
    max-width: var(--ai-shell-max);
    margin: 0 auto;
    padding: 0 20px;
}

/* AI 方向卡片 */
.ai-cards-grid {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 16px;
    margin-bottom: 24px;
}

.ai-card {
    background: #ffffff;
    border: 1px solid #e5e7eb;
    padding: 16px;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.25s ease;
    text-align: left;
    position: relative;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
    text-decoration: none;
    color: inherit;
    display: block;
}

.ai-card:hover {
    border-color: #10B981;
    transform: translateY(-3px);
    box-shadow: 0 8px 30px rgba(16, 185, 129, 0.12);
}

.ai-card .card-icon {
    width: 40px;
    height: 40px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    margin-bottom: 10px;
}

.ai-card h3 {
    font-size: 14px;
    font-weight: 700;
    color: #1D2129;
    margin-bottom: 4px;
}

.ai-card p {
    font-size: 13px;
    color: #4b5563;
    line-height: 1.5;
    margin: 0;
}

.ai-card .card-badge {
    display: inline-block;
    background: #f0fdf4;
    color: #059669;
    padding: 2px 8px;
    border-radius: 4px;
    font-size: 10px;
    font-weight: 600;
    margin-top: 8px;
}

.hero-buttons {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin-top: 16px;
    flex-wrap: wrap;
    position: relative;
    z-index: 1;
}

.hero-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 9px 16px;
    border-radius: 8px;
    font-size: 13px;
    font-weight: 600;
    transition: all 0.25s ease;
    text-decoration: none;
    gap: 6px;
}

.hero-button.primary {
    background: linear-gradient(135deg, #059669 0%, #10B981 100%);
    color: #ffffff;
    box-shadow: 0 4px 16px rgba(16, 185, 129, 0.2);
}

.hero-button.primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 24px rgba(16, 185, 129, 0.35);
    color: #fff;
}

.hero-button.secondary {
    background: #ffffff;
    color: #047857;
    border: 1px solid #a7f3d0;
}

.hero-button.secondary:hover {
    background: #f0fdf4;
    transform: translateY(-2px);
    color: #047857;
}

.hero-button.green {
    background: linear-gradient(135deg, #10B981 0%, #10B981 100%);
    color: #ffffff;
    box-shadow: 0 4px 16px rgba(0, 180, 42, 0.2);
}

.hero-button.green:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 24px rgba(0, 180, 42, 0.35);
    color: #fff;
}

@media (max-width: 1024px) {
    .ai-cards-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (max-width: 768px) {
    .hero-carousel-stage,
    .hero--carousel .hero-slider {
        min-height: 260px;
    }

    .hero-slide {
        padding: 32px 16px 8px;
    }

    .hero--carousel .hero-slide h1,
    .hero--carousel .hero-slide-title {
        font-size: 20px;
    }

    .ai-cards-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 10px;
    }

    .hero-buttons {
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 8px;
        max-width: 520px;
        margin-left: auto;
        margin-right: auto;
    }
}

@media (max-width: 480px) {
    .ai-cards-grid {
        grid-template-columns: 1fr;
    }
}

@media (prefers-reduced-motion: reduce) {
    .hero-slide {
        transition: none;
    }
}

/* 配对引流条 + 延伸阅读（与 lc-compare-common 对齐） */
.lc-pair-bar {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 12px;
    max-width: var(--ai-shell-max, 1440px);
    margin: 16px auto 20px;
    padding: 0 16px;
}

.lc-pair-bar__item {
    display: grid;
    grid-template-columns: 1fr auto;
    grid-template-rows: auto auto;
    gap: 2px 8px;
    align-items: center;
    padding: 14px 16px;
    border-radius: 12px;
    text-decoration: none;
    border: 1px solid #e5e7eb;
    background: #fff;
    transition: border-color 0.2s, box-shadow 0.2s, transform 0.2s;
}

.lc-pair-bar__item:hover {
    border-color: rgba(16, 185, 129, 0.4);
    box-shadow: 0 6px 20px rgba(16, 185, 129, 0.1);
    transform: translateY(-1px);
}

.lc-pair-bar__item--ai {
    background: linear-gradient(135deg, #f0fdf4, #ecfdf5);
    border-color: #a7f3d0;
}

.lc-pair-bar__item--calc {
    background: linear-gradient(135deg, #eff6ff, #f0f9ff);
    border-color: #bfdbfe;
}

.lc-pair-bar__item--compare {
    background: linear-gradient(135deg, #faf5ff, #f5f3ff);
    border-color: #ddd6fe;
}

.lc-pair-bar__label {
    grid-column: 1;
    font-size: 0.72rem;
    font-weight: 600;
    color: #64748b;
}

.lc-pair-bar__item strong {
    grid-column: 1;
    font-size: 0.9rem;
    color: #047857;
    font-weight: 700;
}

.lc-pair-bar__item--calc strong { color: #1d4ed8; }
.lc-pair-bar__item--compare strong { color: #6d28d9; }

.lc-pair-bar__desc {
    grid-column: 1 / -1;
    font-size: 0.75rem;
    color: #64748b;
    line-height: 1.45;
}

.lc-pair-bar__arrow {
    grid-column: 2;
    grid-row: 1 / span 2;
    color: #94a3b8;
    font-size: 1.1rem;
}

.lc-crosslinks {
    max-width: var(--ai-shell-max, 1440px);
    margin: 2rem auto 1.5rem;
    padding: 1.25rem 1.375rem;
    background: #f8fafc;
    border: 1px solid #e5e7eb;
    border-radius: 14px;
}

.lc-crosslinks h2 {
    font-size: 1.0625rem;
    font-weight: 700;
    color: #1D2129;
    margin: 0 0 0.875rem;
    display: flex;
    align-items: center;
    gap: 8px;
}

.lc-crosslinks h2 i { color: #10B981; }

.lc-crosslinks-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 10px;
}

.lc-crosslink-card {
    display: block;
    padding: 12px 14px;
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 10px;
    text-decoration: none;
    transition: border-color 0.2s, box-shadow 0.2s;
}

.lc-crosslink-card:hover {
    border-color: rgba(16, 185, 129, 0.35);
    box-shadow: 0 4px 14px rgba(16, 185, 129, 0.08);
}

.lc-crosslink-card strong {
    display: block;
    font-size: 0.875rem;
    color: #047857;
    margin-bottom: 4px;
}

.lc-crosslink-card span {
    font-size: 0.75rem;
    color: #64748b;
    line-height: 1.5;
}

@media (max-width: 640px) {
    .lc-pair-bar { grid-template-columns: 1fr; }
    .lc-crosslinks-grid { grid-template-columns: 1fr; }
}
