/* 首页 index2 — 对齐 site_header.css / questions 绿色体系 */
*,
*::before,
*::after {
    box-sizing: border-box;
}

:root {
    --i2-main: #16a34a;
    --i2-main-dark: #15803d;
    --i2-main-light: #22c55e;
    --i2-soft-bg: #ecfdf5;
    --i2-soft-border: #bbf7d0;
    --i2-text: #111827;
    --i2-sub: #475569;
    --i2-muted: #64748b;
    --i2-line: #e5e7eb;
    --i2-shadow: 0 12px 28px rgba(15, 23, 42, 0.08);
}

.i2-page {
    margin: 0;
    padding: 0;
    font-family: "PingFang SC", "Microsoft YaHei", Arial, sans-serif;
    color: var(--i2-text);
    background: #fff;
    line-height: 1.7;
}

/* 正文区块用浅灰底，顶栏 / Banner 与题库页一样贴边全宽 */
.i2-main-wrap {
    overflow: hidden;
    background: #f8fafc;
}

/* 页脚宽度与正文 qb-container 一致（避免 footer 用 92% 多出两侧空白） */
.i2-page .footer .container,
.i2-page .footer-extra .container {
    width: 100%;
    max-width: 1200px;
    margin-left: auto;
    margin-right: auto;
    padding-left: 20px;
    padding-right: 20px;
    box-sizing: border-box;
}

/* 首页 banner：内容比题库页多，压紧高度、减少底部空白 */
.i2-page a {
    color: inherit;
    text-decoration: none;
}

.i2-home-banner {
    min-height: 0;
}

.i2-home-banner .qb-banner-inner {
    min-height: 0;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    padding: 22px 0 20px;
    background-image: url("/static/index/images/tikubanner.png");
    background-repeat: no-repeat;
    background-position: calc(100% - 210px) center;
    background-size: min(340px, 32vw) auto;
}

.i2-home-banner .qb-banner-content {
    flex: 1;
    min-width: 0;
    max-width: min(640px, calc(100% - 380px));
    padding-bottom: 4px;
}

.i2-banner-side {
    position: relative;
    z-index: 9;
    flex-shrink: 0;
    width: 200px;
}

.i2-banner-hint {
    font-size: 13px;
    color: #64748b;
    margin-bottom: 0;
}

.i2-banner-hint a {
    color: #16a34a;
    font-weight: 700;
}

.i2-home-banner .qb-banner-lead {
    margin-bottom: 14px;
    font-size: 15px;
    line-height: 1.6;
}

.i2-home-banner .qb-banner-wave-light {
    --wave-height: 88px;
    --wave-bottom: 0;
}

.i2-home-banner .qb-banner-wave-mid {
    --wave-height: 96px;
    --wave-bottom: -12px;
}

.i2-home-banner .qb-banner-wave-main {
    --wave-height: 108px;
    --wave-bottom: -28px;
}

.i2-home-banner .qb-banner-hill {
    width: 420px;
    height: 170px;
    right: -120px;
    bottom: -36px;
    opacity: 0.85;
}

.i2-home-banner + .i2-section {
    padding-top: 40px;
}

@media (max-width: 980px) {
    .i2-home-body {
        padding-top: 16px;
    }
}

/* Banner 内：搜题框（参考 search.html，主色对齐 header #16a34a） */
.i2-eyebrow {
    display: inline-block;
    margin-bottom: 10px;
    padding: 5px 12px;
    border-radius: 999px;
    background: #ecfdf5;
    color: #15803d;
    font-size: 13px;
    font-weight: 800;
}

.i2-search-form {
    margin-bottom: 10px;
}

.i2-search-bar-shell {
    display: flex;
    align-items: center;
    width: 100%;
    max-width: 620px;
    height: 58px;
    padding: 0 10px 0 16px;
    background: #fff;
    border: 1px solid #e6ece9;
    border-radius: 12px;
    box-shadow: 0 12px 28px rgba(22, 163, 74, 0.12);
}

.i2-search-bar-shell:focus-within {
    border-color: rgba(22, 163, 74, 0.45);
    box-shadow: 0 8px 20px rgba(22, 163, 74, 0.13), 0 0 0 3px rgba(22, 163, 74, 0.1);
}

.i2-search-bar-icon {
    flex: 0 0 auto;
    display: grid;
    place-items: center;
    color: #9aa5a0;
}

.i2-search-bar-input {
    flex: 1;
    min-width: 0;
    height: 100%;
    margin-left: 10px;
    border: 0;
    outline: 0;
    background: transparent;
    color: #111827;
    font-size: 15px;
}

.i2-search-bar-input::placeholder {
    color: #a8b0ac;
}

.i2-search-btn {
    flex: 0 0 auto;
    height: 46px;
    margin-left: 8px;
    padding: 0 24px;
    border: 0;
    border-radius: 10px;
    background: #16a34a;
    box-shadow: 0 8px 16px rgba(22, 163, 74, 0.24);
    color: #fff;
    cursor: pointer;
    font-size: 15px;
    font-weight: 700;
    white-space: nowrap;
    transition: background-color 0.15s ease, transform 0.15s ease;
}

.i2-search-btn:hover {
    background: #15803d;
    transform: translateY(-1px);
}

.i2-mini-entry {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    padding: 14px 12px;
    border-radius: 14px;
    border: 1px solid rgba(187, 247, 208, 0.9);
    background: rgba(255, 255, 255, 0.94);
    backdrop-filter: blur(6px);
    box-shadow: 0 10px 24px rgba(15, 23, 42, 0.08);
    text-align: center;
}

.i2-mini-entry::before {
    content: "小程序刷题入口";
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 3px 9px;
    border-radius: 999px;
    background: #16a34a;
    color: #fff;
    font-size: 12px;
    font-weight: 700;
    line-height: 1.4;
}

.i2-mini-qr {
    width: 132px;
    height: 132px;
    flex-shrink: 0;
    border-radius: 10px;
    overflow: hidden;
    border: 1px solid #e5e7eb;
    background: #fff;
}

.i2-mini-qr img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.i2-mini-entry-text {
    display: flex;
    flex-direction: column;
    gap: 4px;
    min-width: 0;
}

.i2-mini-entry-text strong {
    font-size: 16px;
    color: #111827;
}

.i2-mini-entry-text span {
    font-size: 12px;
    color: #475569;
    line-height: 1.55;
}

@media (max-width: 560px) {
    .i2-search-bar-shell {
        flex-wrap: wrap;
        height: auto;
        padding: 10px;
    }

    .i2-search-bar-input {
        width: 100%;
        margin: 8px 0 0;
        height: 44px;
    }

    .i2-search-btn {
        width: 100%;
        margin: 8px 0 0;
    }
}

/* Banner 下方：参考竞品两栏内容区 */
.i2-home-body {
    padding: 22px 0 48px;
}

.i2-feed-row {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 220px;
    gap: 14px;
    align-items: stretch;
    margin-bottom: 14px;
}

.i2-panel,
.i2-side-card {
    background: #fff;
    border: 1px solid #e8edf3;
    border-radius: 4px;
    box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04);
}

.i2-side-card {
    display: flex;
    flex-direction: column;
    height: 100%;
    min-height: 100%;
    overflow: hidden;
}

.i2-feed-main {
    min-width: 0;
}

.i2-block-head {
    display: flex;
    flex-direction: column;
    gap: 10px;
    padding: 14px 16px 12px;
    border-bottom: 1px solid #eef2f7;
}

.i2-block-head-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    min-width: 0;
}

.i2-block-head-main {
    min-width: 0;
    flex: 1;
}

.i2-block-title {
    display: flex;
    align-items: center;
    gap: 8px;
    margin: 0;
    font-size: 18px;
    line-height: 1.3;
    color: #111827;
}

.i2-title-bar {
    width: 4px;
    height: 18px;
    border-radius: 2px;
    background: var(--i2-main);
    flex-shrink: 0;
}

.i2-tab-nav-wrap {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px 10px;
}

.i2-tab-nav-label {
    flex: 0 0 auto;
    font-size: 12px;
    font-weight: 700;
    color: #94a3b8;
    letter-spacing: 0.02em;
}

button.i2-tab-link {
    cursor: pointer;
    font-family: inherit;
}

.i2-tab-panel.is-hidden,
.i2-course-question-panel.is-hidden {
    display: none;
}

.i2-course-questions {
    min-height: 80px;
}

.i2-tab-nav-courses {
    flex-wrap: nowrap;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
}

.i2-tab-nav-courses::-webkit-scrollbar {
    display: none;
}

.i2-tab-nav-courses .i2-tab-link {
    flex: 0 0 auto;
    width: auto;
    min-width: 0;
    max-width: 148px;
    padding-left: 14px;
    padding-right: 14px;
    justify-content: flex-start;
}

.i2-tab-nav-courses .i2-tab-link-text {
    display: block;
    min-width: 0;
    max-width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.i2-tab-nav {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
    flex: 1;
    min-width: 0;
}

.i2-tab-nav-sub {
    padding-top: 0;
}

.i2-tab-link {
    flex: 0 0 auto;
    display: inline-flex;
    align-items: center;
    padding: 6px 14px;
    border: 1px solid #e2e8f0;
    border-radius: 999px;
    background: #f8fafc;
    color: #475569;
    font-size: 13px;
    line-height: 1.35;
    white-space: nowrap;
    transition: color 0.15s ease, background-color 0.15s ease, border-color 0.15s ease, box-shadow 0.15s ease;
}

.i2-tab-nav-sub .i2-tab-link {
    padding: 5px 12px;
    font-size: 12px;
    background: #fff;
}

.i2-tab-link:hover {
    color: var(--i2-main-dark);
    border-color: #bbf7d0;
    background: #f0fdf4;
}

.i2-tab-link.is-active {
    color: #fff;
    font-weight: 700;
    border-color: var(--i2-main);
    background: var(--i2-main);
    box-shadow: 0 4px 12px rgba(22, 163, 74, 0.22);
}

.i2-tab-link.is-current {
    color: var(--i2-main-dark);
    font-weight: 700;
    border-color: var(--i2-main);
    background: var(--i2-soft-bg);
    box-shadow: none;
}

.i2-tab-link.is-active:hover,
.i2-tab-link.is-current:hover {
    color: var(--i2-main-dark);
    background: #dcfce7;
    border-color: var(--i2-main);
}

.i2-tab-link.is-active:hover {
    color: #fff;
    background: var(--i2-main-dark);
    border-color: var(--i2-main-dark);
}

.i2-more-link {
    flex-shrink: 0;
    font-size: 13px;
    color: #64748b;
    white-space: nowrap;
}

.i2-more-link:hover {
    color: var(--i2-main);
}

.i2-link-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0;
}

.i2-link-item {
    display: block;
    padding: 11px 16px;
    border-bottom: 1px solid #f1f5f9;
    color: #374151;
    font-size: 14px;
    line-height: 1.55;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.i2-link-grid .i2-link-item:nth-child(odd) {
    border-right: 1px solid #f8fafc;
}

.i2-link-item:hover {
    color: var(--i2-main);
    background: #f8fffb;
}

.i2-feed-side {
    display: grid;
    gap: 10px;
}

.i2-promo {
    display: flex;
    flex-direction: column;
    justify-content: center;
    min-height: 132px;
    padding: 16px 14px;
    border: 1px solid #dbeee4;
    border-radius: 8px;
    color: #0f172a;
    overflow: hidden;
    position: relative;
    background-color: #f0fdf4;
    background-repeat: no-repeat;
    background-position: right center;
    background-size: cover;
    box-shadow: 0 8px 18px rgba(15, 23, 42, 0.06);
    isolation: isolate;
    transition: transform 0.16s ease, box-shadow 0.16s ease, border-color 0.16s ease;
}

.i2-promo::before {
    content: "";
    position: absolute;
    inset: 0;
    z-index: -1;
    background: linear-gradient(90deg, rgba(255, 255, 255, 0.98) 0%, rgba(255, 255, 255, 0.9) 42%, rgba(255, 255, 255, 0.22) 100%);
}

.i2-promo::after {
    content: "";
    position: absolute;
    right: 12px;
    bottom: 12px;
    width: 28px;
    height: 28px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.84);
    box-shadow: inset 0 0 0 1px rgba(22, 163, 74, 0.14);
}

.i2-promo:hover {
    transform: translateY(-2px);
    border-color: #bbf7d0;
    box-shadow: 0 12px 24px rgba(15, 23, 42, 0.1);
}

.i2-promo:hover em {
    color: var(--i2-main-dark);
}

.i2-promo strong {
    display: block;
    max-width: 136px;
    font-size: 17px;
    line-height: 1.35;
    margin: 5px 0 5px;
    position: relative;
    z-index: 1;
}

.i2-promo span {
    position: relative;
    z-index: 1;
}

.i2-promo > span:not(.i2-promo-kicker) {
    display: block;
    max-width: 136px;
    font-size: 12px;
    line-height: 1.5;
    color: #475569;
}

.i2-promo-kicker {
    align-self: flex-start;
    padding: 2px 7px;
    border-radius: 999px;
    background: rgba(22, 163, 74, 0.1);
    color: #15803d;
    font-size: 11px;
    font-weight: 800;
    line-height: 1.4;
}

.i2-promo em {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    width: fit-content;
    margin-top: 10px;
    color: #16a34a;
    font-size: 12px;
    font-style: normal;
    font-weight: 800;
    line-height: 1.35;
    position: relative;
    z-index: 1;
}

.i2-promo em::after {
    content: ">";
    font-family: Arial, sans-serif;
    font-size: 13px;
}

.i2-promo-a {
    background-image: url("/static/index/images/index2-promo-tiku.webp");
}

.i2-promo-b {
    background-image: url("/static/index/images/index2-promo-news.webp");
}

.i2-more-banks {
    grid-template-columns: 1fr;
    margin-bottom: 0;
}

.i2-more-banks-foot {
    padding: 12px 16px;
    border-top: 1px solid #eef2f7;
    text-align: center;
}

.i2-more-banks-foot a {
    color: #64748b;
    font-size: 13px;
}

.i2-more-banks-foot a:hover {
    color: var(--i2-main);
}

.i2-side-card > .i2-tool-grid {
    flex-shrink: 0;
}

.i2-side-card-head {
    display: block;
    padding: 10px 12px 6px;
    background: #ecfdf5;
    color: #15803d;
    font-size: 14px;
    font-weight: 700;
    line-height: 1.4;
    text-decoration: none;
    transition: color 0.15s ease;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

a.i2-side-card-head:hover {
    color: #166534;
}

.i2-side-card-head:not(a) {
    cursor: default;
    text-decoration: none;
}

.i2-side-card-hint {
    margin: 0;
    padding: 0 12px 10px;
    background: #ecfdf5;
    color: #64748b;
    font-size: 11px;
    line-height: 1.45;
    border-bottom: 1px solid #d1fae5;
}

.i2-tab-nav-sync .i2-tab-link {
    cursor: pointer;
}

.i2-tool-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 8px;
    padding: 14px 10px 10px;
}

.i2-tool-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    text-align: center;
    color: #374151;
    font-size: 12px;
    line-height: 1.35;
    border-radius: 8px;
    padding: 8px 4px;
    transition: background-color 0.15s ease, color 0.15s ease;
}

.i2-tool-item:hover {
    color: var(--i2-main);
    background: #f0fdf4;
}

.i2-tool-icon {
    width: 44px;
    height: 44px;
    border-radius: 12px;
    display: grid;
    place-items: center;
    color: #fff;
    flex-shrink: 0;
    box-shadow: 0 2px 6px rgba(15, 23, 42, 0.08);
}

.i2-tool-icon svg {
    width: 22px;
    height: 22px;
    display: block;
}

.i2-tool-mock {
    background: #3b82f6;
}

.i2-tool-practice {
    background: #16a34a;
}

.i2-tool-real {
    background: #f97316;
}

.i2-side-qr {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 8px;
    flex: 1;
    min-height: 0;
    padding: 12px 10px 14px;
    border-top: 1px solid #eef2f7;
    background: #fafbfc;
}

.i2-side-qr-img {
    width: 120px;
    height: 120px;
    padding: 6px;
    border-radius: 8px;
    background: #fff;
    border: 1px solid #e2e8f0;
    box-sizing: border-box;
}

.i2-side-qr-img img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.i2-side-qr-text {
    margin: 0;
    color: #64748b;
    font-size: 11px;
    line-height: 1.4;
    text-align: center;
}

.i2-tag-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    padding: 0 10px 14px;
}

.i2-tag-chip {
    padding: 5px 10px;
    border-radius: 4px;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    color: #475569;
    font-size: 12px;
    line-height: 1.3;
}

.i2-tag-chip:hover {
    border-color: #bbf7d0;
    color: var(--i2-main-dark);
    background: #f0fdf4;
}

.i2-empty {
    padding: 24px;
    color: var(--i2-muted);
    text-align: center;
    background: #fff;
    border-top: 1px solid #eef2f7;
}

.i2-empty-inline {
    margin: 0 16px 16px;
    border: 1px dashed #e2e8f0;
    border-radius: 4px;
    background: #f8fafc;
}

@media (max-width: 980px) {
    .i2-feed-row {
        grid-template-columns: 1fr;
    }

    .i2-feed-side {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .i2-link-grid {
        grid-template-columns: 1fr;
    }

    .i2-link-grid .i2-link-item:nth-child(odd) {
        border-right: 0;
    }
}

@media (max-width: 560px) {
    .i2-home-body {
        padding: 16px 0 36px;
    }

    .i2-feed-side {
        grid-template-columns: 1fr;
    }

    .i2-block-head-top {
        align-items: flex-start;
    }

    .i2-tool-grid {
        grid-template-columns: 1fr;
    }
}
