/* enterprises/css/index.css */
/* 企业目录（企业列表）页面专属样式 */

:root {
    --ent-blue: #2563EB;
    --ent-blue-dark: #1D4ED8;
}

html { scroll-behavior: smooth; }

#enterprise-list { scroll-margin-top: 80px; }

/* =========================================
   1. 首屏 Banner
   ========================================= */
.ent-hero {
    position: relative;
    height: 340px;
    overflow: hidden;
    background: #F1F5F9;
}
.ent-hero-img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center 45%;
}
/* 左侧白色渐变，保证深色文字可读，右侧露出城市照片 */
.ent-hero-mask {
    position: absolute;
    inset: 0;
    background: linear-gradient(
        90deg,
        #FFFFFF 0%,
        rgba(255, 255, 255, 0.96) 26%,
        rgba(255, 255, 255, 0.88) 44%,
        rgba(255, 255, 255, 0.46) 62%,
        rgba(255, 255, 255, 0) 80%
    );
}

.ent-hero h1 {
    font-size: 44px;
    font-weight: 800;
    line-height: 1.1;
    letter-spacing: 0.03em;
    color: #0F172A;
}
.ent-hero .en {
    margin-top: 8px;
    font-size: 18px;
    font-weight: 500;
    letter-spacing: 0.02em;
    color: #334155;
}
.ent-hero .desc {
    margin-top: 22px;
    font-size: 16px;
    color: #475569;
}

.ent-actions {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-top: 26px;
}

.btn-ent {
    display: inline-flex;
    align-items: center;
    gap: 9px;
    height: 42px;
    padding: 0 22px;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    transition: all 0.2s ease;
}
.btn-ent-primary {
    background: var(--ent-blue);
    color: #FFFFFF;
    box-shadow: 0 8px 18px -10px rgba(37, 99, 235, 0.9);
}
.btn-ent-primary:hover { background: var(--ent-blue-dark); }
.btn-ent-ghost {
    background: #FFFFFF;
    border: 1px solid #E2E8F0;
    color: #1E293B;
}
.btn-ent-ghost:hover {
    border-color: var(--ent-blue);
    color: var(--ent-blue);
}

/* =========================================
   2. 面包屑
   ========================================= */
.breadcrumb {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
    padding: 18px 0 6px;
    font-size: 12px;
    color: #94A3B8;
}
.breadcrumb a {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    transition: color 0.2s;
}
.breadcrumb a:hover { color: var(--ent-blue); }
.breadcrumb .fa-chevron-right { font-size: 9px; color: #CBD5E1; }
.breadcrumb .current { color: #334155; font-weight: 500; }

/* =========================================
   3. 列表标题栏
   ========================================= */
.list-bar {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 16px;
    padding: 14px 0 16px;
}
.list-count {
    font-size: 20px;
    font-weight: 700;
    color: #0F172A;
}
.list-count span {
    font-size: 22px;
    color: var(--ent-blue);
    margin: 0 2px;
}
.list-note {
    font-size: 12px;
    color: #94A3B8;
}

/* =========================================
   4. 企业列表
   ========================================= */
.ent-row {
    display: grid;
    grid-template-columns: 192px 108px minmax(0, 1fr) 176px 104px 30px;
    align-items: center;
    gap: 20px;
}

.ent-row {
    padding: 14px 20px;
    margin-bottom: 10px;
    background: #FFFFFF;
    border: 1px solid #EFF2F6;
    border-radius: 12px;
    box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04);
    transition: border-color 0.2s, box-shadow 0.2s, transform 0.2s;
}
.ent-row:last-child { margin-bottom: 0; }
.ent-row:hover {
    border-color: #DCE6F8;
    box-shadow: 0 12px 26px -20px rgba(37, 99, 235, 0.65);
    transform: translateY(-1px);
}

/* 封面图 */
.ent-cover {
    width: 192px;
    height: 108px;
    border-radius: 10px;
    overflow: hidden;
    background: #F1F5F9;
    display: block;
}
.ent-cover img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.45s ease;
}
.ent-row:hover .ent-cover img { transform: scale(1.05); }

/* 企业 logo（白底卡片，等比缩放） */
.ent-logo {
    width: 108px;
    height: 64px;
    padding: 8px;
    border-radius: 8px;
    background: #FFFFFF;
    border: 1px solid #E8EEF7;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}
.ent-logo img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
}

.ent-info { min-width: 0; }
.ent-name {
    font-size: 16px;
    font-weight: 700;
    color: #0F172A;
    line-height: 1.4;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    transition: color 0.2s;
}
.ent-row:hover .ent-name { color: var(--ent-blue); }
.ent-desc {
    margin-top: 4px;
    font-size: 13px;
    color: #94A3B8;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.ent-tags {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}
.ent-tag {
    font-size: 12px;
    color: #475569;
    background: #F1F5F9;
    padding: 3px 10px;
    border-radius: 6px;
    white-space: nowrap;
}

.ent-loc {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 12px;
    color: #94A3B8;
    white-space: nowrap;
}
.ent-loc .fa-location-dot { font-size: 11px; }

.ent-arrow {
    width: 30px;
    height: 30px;
    border-radius: 9999px;
    border: 1px solid #E8EEF7;
    color: #94A3B8;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 11px;
    transition: all 0.2s;
}
.ent-row:hover .ent-arrow {
    background: var(--ent-blue);
    border-color: var(--ent-blue);
    color: #FFFFFF;
}

/* =========================================
   5. 入驻引导
   ========================================= */
.ent-cta {
    display: flex;
    align-items: center;
    gap: 24px;
    padding: 24px 26px;
    border-radius: 14px;
    border: 1px solid #EDF2FA;
    background: linear-gradient(90deg, #EFF5FF 0%, #F6F8FF 58%, #FDF7F7 100%);
}
.ent-cta-title {
    font-size: 18px;
    font-weight: 700;
    color: #0F172A;
}
.ent-cta-desc {
    margin-top: 6px;
    font-size: 13px;
    color: #64748B;
}


/* 置顶标识（由后台「置顶」字段决定，对应 data-pinned=1） */
.pin-badge {
    display: inline-flex;
    align-items: center;
    gap: 3px;
    margin-right: 8px;
    padding: 1px 6px;
    border-radius: 4px;
    border: 1px solid #FBD5D9;
    background: #FEF2F2;
    color: #E63946;
    font-size: 11px;
    font-weight: 600;
    line-height: 1.65;
    vertical-align: 1px;
}
.pin-badge .fa-thumbtack { font-size: 9px; }

.ent-row[data-pinned=1] {
    border-color: #FBE4E6;
    background: linear-gradient(90deg, #FFFCFC 0%, #FFFFFF 30%);
}

/* 翻页组件 */
.pager {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    flex-wrap: wrap;
    gap: 10px;
    padding: 22px 2px 4px;
    font-size: 14px;
    color: #64748B;
}
.pager-divider {
    width: 1px;
    height: 16px;
    background: #E2E8F0;
}
.pager-count b,
.pager-size b {
    color: #334155;
    font-weight: 600;
}
.pager-btn {
    height: 32px;
    padding: 0 14px;
    border: 1px solid #E2E8F0;
    border-radius: 6px;
    background: #FFFFFF;
    color: #64748B;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.2s;
}
.pager-btn:hover:not(:disabled) {
    color: var(--ent-blue);
    border-color: #C7D9F7;
}
.pager-btn:disabled {
    color: #CBD5E1;
    border-color: #EEF2F7;
    background: #FBFCFE;
    cursor: not-allowed;
}
.pager-numbers {
    display: flex;
    align-items: center;
    gap: 8px;
}
.pager-num {
    min-width: 32px;
    height: 32px;
    padding: 0 8px;
    border: 1px solid #E2E8F0;
    border-radius: 6px;
    background: #FFFFFF;
    color: #64748B;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.2s;
}
.pager-num:hover { border-color: #C7D9F7; color: var(--ent-blue); }
.pager-num.is-active {
    background: var(--ent-blue);
    border-color: var(--ent-blue);
    color: #FFFFFF;
    font-weight: 600;
}
.pager-num.is-active:hover { color: #FFFFFF; }
.pager-jump {
    display: inline-flex;
    align-items: center;
    gap: 8px;
}
.pager-input {
    width: 52px;
    height: 32px;
    border: 1px solid #E2E8F0;
    border-radius: 6px;
    text-align: center;
    font-size: 14px;
    color: #334155;
    outline: none;
    transition: all 0.2s;
}
.pager-input:focus {
    border-color: var(--ent-blue);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

@media (max-width: 767px) {
    .pager { justify-content: flex-start; gap: 8px; font-size: 13px; }
    .pager-divider:nth-of-type(2) { display: none; }
}


.ent-row[hidden] { display: none; }
.pager-gap {
    min-width: 24px;
    text-align: center;
    color: #94A3B8;
    font-size: 14px;
    user-select: none;
}

/* =========================================
   6. 进入视口渐显
   ========================================= */
.reveal {
    opacity: 0;
    transform: translateY(14px);
}
.reveal.is-visible {
    opacity: 1;
    transform: none;
    transition: opacity 0.6s ease, transform 0.6s ease;
}
@media (prefers-reduced-motion: reduce) {
    .reveal { opacity: 1 !important; transform: none !important; }
}

/* =========================================
   7. 响应式
   ========================================= */
@media (max-width: 1279px) {
    .ent-row { grid-template-columns: 158px 96px minmax(0, 1fr) 152px 88px 28px; gap: 14px; }
    .ent-cover { width: 158px; height: 89px; }
    .ent-logo { width: 96px; height: 56px; }
    .ent-tags { gap: 6px; }
    .ent-tag { padding: 3px 8px; font-size: 11px; }
}

@media (max-width: 1023px) {
    .ent-row {
        grid-template-columns: 120px minmax(0, 1fr) 30px;
        row-gap: 8px;
        padding: 12px 14px;
    }
    .ent-cover { width: 120px; height: 68px; grid-row: 1; }
    .ent-logo { display: none; }
    .ent-info { grid-column: 2; grid-row: 1; }
    .ent-name { white-space: normal; }
    .ent-tags { grid-column: 2; grid-row: 2; }
    .ent-loc { display: none; }
    .ent-arrow { grid-column: 3; grid-row: 1 / span 2; }
}

@media (max-width: 767px) {
    .ent-hero { height: 400px; }
    .ent-hero h1 { font-size: 32px; }
    .ent-hero .en { font-size: 15px; }
    .ent-hero .desc { font-size: 14px; }
    .ent-hero-mask {
        background: linear-gradient(
            180deg,
            rgba(255, 255, 255, 0.98) 0%,
            rgba(255, 255, 255, 0.9) 45%,
            rgba(255, 255, 255, 0.4) 100%
        );
    }
    .btn-ent { height: 40px; padding: 0 18px; font-size: 13px; }
    .ent-row { grid-template-columns: 96px minmax(0, 1fr) 26px; gap: 12px; }
    .ent-cover { width: 96px; height: 56px; }
    .ent-tags { margin-top: 8px; }
    .list-bar { flex-direction: column; align-items: flex-start; gap: 4px; }
    .ent-cta { flex-direction: column; align-items: flex-start; gap: 16px; }
}

/* =========================================
   8. 动态数据补充
   ========================================= */
.ent-cover-placeholder {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #EFF5FF 0%, #F8FAFC 55%, #E5EDFA 100%);
    color: #2563EB;
    overflow: hidden;
}
.ent-cover-placeholder::before {
    content: "";
    position: absolute;
    inset: 0;
    background-image: radial-gradient(rgba(37, 99, 235, 0.14) 1px, transparent 1px);
    background-size: 12px 12px;
    opacity: 0.55;
}
.ent-cover-initial {
    position: relative;
    font-size: 34px;
    font-weight: 800;
    letter-spacing: 0.06em;
    color: rgba(37, 99, 235, 0.34);
}
.ent-logo-initial {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
    border-radius: 6px;
    background: #EFF5FF;
    color: #2563EB;
    font-size: 18px;
    font-weight: 800;
}

.ent-empty {
    padding: 64px 24px;
    text-align: center;
    background: #F8FAFC;
    border: 1px dashed #DCE6F4;
    border-radius: 12px;
}
.ent-empty-icon {
    width: 54px;
    height: 54px;
    margin: 0 auto 16px;
    border-radius: 9999px;
    background: #EFF5FF;
    color: #2563EB;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 22px;
}
.ent-empty h3 {
    font-size: 18px;
    font-weight: 700;
    color: #0F172A;
}
.ent-empty p {
    margin-top: 8px;
    font-size: 13px;
    color: #64748B;
}
.ent-empty .btn-ent { margin-top: 20px; }

/* 服务端分页：复用原型 pager 视觉 */
.pager ul.page-numbers {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
    margin: 0;
    padding: 0;
    list-style: none;
}
.pager ul.page-numbers li {
    display: flex;
    align-items: center;
}
.pager ul.page-numbers .page-numbers {
    min-width: 32px;
    height: 32px;
    padding: 0 8px;
    border: 1px solid #E2E8F0;
    border-radius: 6px;
    background: #FFFFFF;
    color: #64748B;
    font-size: 14px;
    line-height: 30px;
    text-align: center;
    transition: all 0.2s;
}
.pager ul.page-numbers a.page-numbers:hover {
    border-color: #C7D9F7;
    color: var(--ent-blue);
}
.pager ul.page-numbers .page-numbers.current {
    background: var(--ent-blue);
    border-color: var(--ent-blue);
    color: #FFFFFF;
    font-weight: 600;
}
.pager ul.page-numbers .page-numbers.dots {
    border-color: transparent;
    background: transparent;
    color: #94A3B8;
}
.pager ul.page-numbers .page-numbers.prev,
.pager ul.page-numbers .page-numbers.next {
    padding: 0 14px;
}
