/* view16 样式 v2026-08-13-18:05 — card-main 内图片水平居中（justify-content center + carrier-img object-position center） */

/* ========================================
   上海至程货运代理有限公司 H5 官网样式
   风格：简约专业 / Linear & Vercel 式亮色系
   ======================================== */

:root {
    /* 品牌色 */
    --brand-900: #0f2461;
    --brand-800: #15307a;
    --brand-700: #1e40af;
    --brand-600: #2563eb;
    --brand-500: #3b82f6;
    --brand-100: #dbeafe;
    --brand-50: #eff6ff;

    /* 中性色 */
    --gray-950: #0f172a;
    --gray-900: #1e293b;
    --gray-700: #334155;
    --gray-500: #64748b;
    --gray-400: #94a3b8;
    --gray-200: #e2e8f0;
    --gray-100: #f1f5f9;
    --gray-50: #f8fafc;

    /* 背景与文字 */
    --bg-body: #f4f6fb;
    --bg-card: #ffffff;
    --text-primary: #0f172a;
    --text-secondary: #475569;
    --text-tertiary: #64748b;

    /* 尺寸 */
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 16px;
    --radius-xl: 20px;
    --radius-full: 9999px;

    /* 阴影 */
    --shadow-sm: 0 1px 2px rgba(15, 23, 42, 0.04);
    --shadow-md: 0 4px 12px rgba(15, 23, 42, 0.06);
    --shadow-lg: 0 10px 28px rgba(15, 23, 42, 0.08);
    --shadow-card: 0 2px 8px rgba(30, 64, 175, 0.06);

    /* 间距 */
    --space-xs: 6px;
    --space-sm: 10px;
    --space-md: 16px;
    --space-lg: 22px;
    --space-xl: 28px;
}

/* 全局重置 */
*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    font-size: 16px;
    -webkit-tap-highlight-color: transparent;
    scroll-behavior: smooth;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Helvetica Neue", Arial, sans-serif;
    background: var(--bg-body);
    color: var(--text-primary);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

a {
    color: inherit;
    text-decoration: none;
}

button {
    font-family: inherit;
    border: none;
    background: none;
    cursor: pointer;
}

img, svg {
    display: block;
    max-width: 100%;
}

/* 页面容器：移动端优先，桌面端居中 */
.page-wrapper {
    width: 100%;
    max-width: 480px;
    margin: 0 auto;
    min-height: 100vh;
    background: var(--bg-body);
    display: flex;
    flex-direction: column;
    padding-bottom: env(safe-area-inset-bottom, 0);
}

/* ========================================
   顶部品牌区
   ======================================== */
.site-header {
    padding: var(--space-xl) var(--space-md) var(--space-lg);
    background: linear-gradient(180deg, #ffffff 0%, var(--bg-body) 100%);
}

.brand {
    display: flex;
    flex-direction: column;
    align-items: center;
  
}

.logo {
    width: 200px;
    height: 100px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.logo img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.brand-text {
    text-align: center;
}

.company-name {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--text-primary);
    letter-spacing: 0.02em;
    line-height: 1.4;
}

.company-en {
    font-size: 0.75rem;
    font-weight: 500;
    color: var(--text-tertiary);
    margin-top: 4px;
    letter-spacing: 0.04em;
}

/* ========================================
   Banner 轮播
   ======================================== */
.hero-banner {
    position: relative;
    margin: 0 var(--space-md);
    border-radius: var(--radius-xl);
    overflow: hidden;
    box-shadow: var(--shadow-lg);
    background: var(--bg-card);
    max-width: 1100px;
    /* 高度由 inline style 给：height: min(420px, calc((100vw - 32px) * 0.4255))
       桌面端 max-width 1100 + min(420px) 双重限制高度不超过 420px，
       避免桌面端 vw 算出来 800+px 过高 */
}

/* 桌面端（> 1100px）让 hero-banner 水平居中 */
@media (min-width: 1100px) {
    .hero-banner {
        margin-left: auto;
        margin-right: auto;
    }
}

.banner-slider {
    position: relative;
    width: 100%;
    height: 100%;
}

.banner-slide {
    position: absolute;
    inset: 0;
    background-color: #1e40af;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    opacity: 0;
    transition: opacity 0.5s ease-in-out;
    display: flex;
    align-items: center;
    padding: var(--space-lg);
    text-decoration: none;
    color: inherit;
}

.banner-slide.active {
    opacity: 1;
}

/* 轮播图广告（后台 carousel 表）：需要展示文字，整体不显示底部渐变遮罩（用文字自然底色） */
.banner-slide--text::before {
    display: none;
}

.banner-slide::before {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, rgba(15, 36, 97, 0) 0%, rgba(15, 36, 97, 0.72) 100%);
    z-index: 1;
}

.banner-content {
    position: relative;
    z-index: 2;
    color: #ffffff;
    max-width: 78%;
}

.banner-tag {
    display: inline-block;
    padding: 4px 10px;
    background: rgba(255, 255, 255, 0.18);
    backdrop-filter: blur(8px);
    border-radius: var(--radius-full);
    font-size: 0.7rem;
    font-weight: 600;
    letter-spacing: 0.04em;
    margin-bottom: var(--space-sm);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.banner-content h2 {
    font-size: 1.35rem;
    font-weight: 700;
    line-height: 1.3;
    margin-bottom: 6px;
    text-shadow: 0 2px 8px rgba(15, 36, 97, 0.35);
}

.banner-content p {
    font-size: 0.8rem;
    opacity: 0.92;
    line-height: 1.5;
    text-shadow: 0 1px 4px rgba(15, 36, 97, 0.3);
}

.banner-dots {
    position: absolute;
    bottom: 10px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 6px;
    z-index: 3;
}

.banner-dots .dot {
    width: 6px;
    height: 6px;
    border-radius: var(--radius-full);
    background: rgba(255, 255, 255, 0.45);
    transition: all 0.3s ease;
}

.banner-dots .dot.active {
    width: 18px;
    background: #ffffff;
    border-radius: 3px;
}

/* ========================================
   滚动公告
   ======================================== */
.notice-bar {
    margin: var(--space-md) var(--space-md) 0;
    background: var(--bg-card);
    border-radius: var(--radius-full);
    box-shadow: var(--shadow-card);
    display: flex;
    align-items: center;
    gap: var(--space-sm);
    padding: 8px var(--space-md);
    overflow: hidden;
    border: 1px solid var(--gray-100);
}

.notice-icon {
    flex-shrink: 0;
    width: 18px;
    height: 18px;
    color: var(--brand-600);
}

.notice-icon svg {
    width: 100%;
    height: 100%;
}

.notice-track {
    flex: 1;
    overflow: hidden;
    mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent);
    -webkit-mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent);
}

.notice-text {
    display: inline-flex;
    align-items: center;
    white-space: nowrap;
    color: var(--text-secondary);
    font-size: 0.82rem;
    animation: marquee 16s linear infinite;
}

.notice-text span {
    padding-right: 60px;
}

@keyframes marquee {
    0% {
        transform: translateX(0);
    }
    100% {
        transform: translateX(-50%);
    }
}

/* ========================================
   主内容区
   ======================================== */
.main-content {
    flex: 1;
    padding: var(--space-xl) var(--space-md);
    display: flex;
    flex-direction: column;
    gap: var(--space-xl);
}

.section-header {
    text-align: center;
    margin-bottom: var(--space-lg);
}

.section-header h2 {
    font-size: 1.05rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 4px;
}

.section-header p {
    font-size: 0.78rem;
    color: var(--text-tertiary);
}

/* 区块标题前的图标（货代查询入口） */
.section-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 52px;
    height: 52px;
    margin: 0 auto var(--space-sm);
    border-radius: var(--radius-lg);
    background: linear-gradient(135deg, #eff6ff 0%, #e0e7ff 100%);
    box-shadow: var(--shadow-sm);
}

.section-icon svg {
    width: 30px;
    height: 30px;
    display: block;
}

/* 副标题中的公告链接 */
.query-subtitle a {
    color: var(--brand, #1e40af);
    text-decoration: none;
    word-break: break-all;
}

.query-subtitle a:hover {
    text-decoration: underline;
}

/* ========================================
   查询卡片
   ======================================== */
.query-cards {
    display: flex;
    flex-direction: column;
    gap: var(--space-md);
}

.query-card {
    position: relative;
    display: flex;
    flex-direction: column;
    background: var(--bg-card);
    border-radius: var(--radius-lg);
    padding: var(--space-md);
    box-shadow: var(--shadow-card), var(--shadow-sm);
    border: 1px solid var(--gray-100);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.card-badge {
    position: absolute;
    top: 0;
    left: 0;
    /* 颜色由后台 links.php 的 badge_color 控制（支持 hex 或 linear-gradient）；
       这里留默认渐变作为未配置时的兜底，让卡片视觉仍统一 */
    background: linear-gradient(135deg, #f59e0b 0%, #f97316 100%);
    color: #ffffff;
    font-size: 0.66rem;
    font-weight: 700;
    line-height: 1;
    padding: 5px 11px;
    border-radius: var(--radius-lg) 0 var(--radius-md) 0;
    letter-spacing: 0.04em;
    /* 阴影改中性色，避免用户自定义蓝色/红色徽章时还残留橙色光晕 */
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.18);
    z-index: 2;
}

.query-card:active {
    transform: scale(0.985);
}

.card-main {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: var(--space-md);
    min-height: 56px;
}

.carrier-logo {
    flex-shrink: 0;
    width: 52px;
    height: 52px;
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 800;
    font-size: 0.85rem;
    letter-spacing: -0.02em;
    color: #ffffff;
}

.carrier-logo.cre {
    background: linear-gradient(135deg, #dc2626 0%, #b91c1c 100%);
}

.carrier-logo.csair {
    background: linear-gradient(135deg, #0369a1 0%, #0284c7 100%);
}

.carrier-logo.airchina {
    background: linear-gradient(135deg, #b91c1c 0%, #991b1b 100%);
}

.carrier-info {
    flex: 1;
    min-width: 0;
}

.carrier-info h3 {
    font-size: 0.92rem;
    font-weight: 700;
    color: var(--text-primary);
    line-height: 1.4;
}

.carrier-info p {
    font-size: 0.72rem;
    color: var(--text-tertiary);
    margin-top: 2px;
}

.carrier-img {
    max-width: 100%;
    height: 56px;
    width: auto;
    object-fit: contain;
    object-position: center center;
}

.card-divider {
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--gray-200), transparent);
    margin: var(--space-md) 0;
}

.card-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: var(--space-sm);
    margin-top: 2px;
}

.card-meta {
    flex: 1;
    min-width: 0;
}

.card-meta span {
    font-size: 0.86rem;
    font-weight: 500;
    color: var(--text-secondary);
    display: flex;
    align-items: center;
    gap: 6px;
}

.card-meta span::before {
    content: "";
    width: 5px;
    height: 5px;
    border-radius: 50%;
    background: var(--brand-500);
    flex-shrink: 0;
}

.query-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 5px;
    width: auto;
    flex-shrink: 0;
    padding: 8px 20px;
    background: linear-gradient(135deg, var(--brand-600) 0%, var(--brand-700) 100%);
    color: #ffffff;
    border-radius: var(--radius-full);
    font-size: 0.82rem;
    font-weight: 600;
    letter-spacing: 0.02em;
    box-shadow: 0 4px 12px rgba(37, 99, 235, 0.22);
    transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.query-btn svg {
    width: 16px;
    height: 16px;
}

.query-btn:active {
    transform: translateY(1px);
    box-shadow: 0 2px 6px rgba(37, 99, 235, 0.2);
}

/* ========================================
   公司介绍
   ======================================== */
.intro-card {
    background: var(--bg-card);
    border-radius: var(--radius-lg);
    padding: var(--space-lg);
    box-shadow: var(--shadow-card), var(--shadow-sm);
    border: 1px solid var(--gray-100);
    position: relative;
    overflow: hidden;
}

.intro-card::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, var(--brand-600), var(--brand-500));
}

.intro-card h2 {
    font-size: 1rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: var(--space-md);
    display: flex;
    align-items: center;
    gap: 8px;
}

.intro-card h2::before {
    content: "";
    width: 4px;
    height: 18px;
    border-radius: 2px;
    background: var(--brand-600);
}

.intro-card p {
    font-size: 0.84rem;
    color: var(--text-secondary);
    line-height: 1.75;
    margin-bottom: var(--space-sm);
}

.intro-card p:last-child {
    margin-bottom: 0;
}

/* ========================================
   页脚
   ======================================== */
.site-footer {
    padding: var(--space-lg) var(--space-md) calc(var(--space-xl) + env(safe-area-inset-bottom, 0));
    text-align: center;
    color: var(--text-tertiary);
}

.footer-company {
    font-size: 0.82rem;
    font-weight: 600;
    margin-bottom: 4px;
}

.footer-icp {
    font-size: 0.72rem;
    color: var(--gray-400);
}

/* ========================================
   桌面端增强
   ======================================== */
@media (min-width: 640px) {
    .page-wrapper {
        max-width: 520px;
        box-shadow: 0 0 60px rgba(15, 23, 42, 0.06);
    }

    .company-name {
        font-size: 1.35rem;
    }

    .banner-content h2 {
        font-size: 1.55rem;
    }

    .banner-content p {
        font-size: 0.88rem;
    }
}

/* 减少动画偏好 */
@media (prefers-reduced-motion: reduce) {
    .notice-text {
        animation: none;
        padding-left: 0;
        white-space: normal;
    }

    .banner-slide {
        transition: none;
    }
}
