/* 青岛公交广告 - 前台主样式 */

:root {
    --primary: #1a5fb4;
    --primary-dark: #134a8e;
    --primary-light: #3584e4;
    --accent: #e5a00d;
    --accent-dark: #c78c0b;
    --dark: #1e293b;
    --gray-50: #f8fafc;
    --gray-100: #f1f5f9;
    --gray-200: #e2e8f0;
    --gray-300: #cbd5e1;
    --gray-400: #94a3b8;
    --gray-500: #64748b;
    --gray-600: #475569;
    --gray-700: #334155;
    --gray-800: #1e293b;
    --white: #ffffff;
    --shadow-sm: 0 1px 2px rgba(0,0,0,0.05);
    --shadow: 0 4px 6px -1px rgba(0,0,0,0.07), 0 2px 4px -2px rgba(0,0,0,0.05);
    --shadow-md: 0 10px 15px -3px rgba(0,0,0,0.08), 0 4px 6px -4px rgba(0,0,0,0.04);
    --shadow-lg: 0 20px 25px -5px rgba(0,0,0,0.08), 0 8px 10px -6px rgba(0,0,0,0.04);
    --radius: 8px;
    --radius-lg: 12px;
    --transition: all 0.3s ease;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'PingFang SC', 'Hiragino Sans GB', 'Microsoft YaHei', 'Helvetica Neue', Arial, sans-serif;
    color: var(--gray-700);
    background: var(--gray-50);
    line-height: 1.7;
    font-size: 15px;
    overflow-x: hidden;
}

a { color: var(--primary); text-decoration: none; transition: var(--transition); }
a:hover { color: var(--primary-dark); }
img { max-width: 100%; height: auto; }

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* ===== 顶部栏 ===== */
.top-bar {
    background: var(--dark);
    color: rgba(255,255,255,0.85);
    font-size: 13px;
    padding: 8px 0;
}
.top-bar .container { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 10px; }
.top-bar a { color: rgba(255,255,255,0.85); }
.top-bar a:hover { color: var(--white); }
.top-bar .contact-info { display: flex; gap: 20px; flex-wrap: wrap; align-items: center; }
.top-bar .contact-info span { display: inline-flex; align-items: center; gap: 5px; }

/* ===== 头部导航 ===== */
.header {
    background: var(--white);
    box-shadow: var(--shadow);
    position: sticky;
    top: 0;
    z-index: 1000;
}
.header .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 12px;
    padding-bottom: 12px;
}
.logo { display: flex; align-items: center; gap: 12px; font-size: 22px; font-weight: 700; color: var(--primary); }
.logo img { height: 48px; width: auto; }
.logo span { white-space: nowrap; }

.nav { display: flex; list-style: none; gap: 5px; }
.nav > li { position: relative; }
.nav > li > a {
    display: block;
    padding: 10px 18px;
    color: var(--gray-700);
    font-weight: 500;
    font-size: 15px;
    border-radius: var(--radius);
    transition: var(--transition);
    white-space: nowrap;
}
.nav > li > a:hover,
.nav > li > a.active {
    color: var(--primary);
    background: rgba(26,95,180,0.06);
}

/* 移动端菜单按钮 */
.menu-toggle {
    display: none;
    background: none;
    border: none;
    font-size: 24px;
    cursor: pointer;
    color: var(--gray-700);
    padding: 5px;
}

/* ===== 页面横幅 ===== */
.page-banner {
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    color: var(--white);
    padding: 50px 0;
    text-align: center;
}
.page-banner h1 { font-size: 32px; font-weight: 700; margin-bottom: 10px; }
.page-banner p { font-size: 16px; opacity: 0.9; }

/* ===== 首页轮播/Hero ===== */
.hero {
    background: linear-gradient(135deg, #0f3460 0%, #1a5fb4 50%, #3584e4 100%);
    color: var(--white);
    padding: 80px 0 60px;
    position: relative;
    overflow: hidden;
}
.hero::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -10%;
    width: 600px;
    height: 600px;
    background: radial-gradient(circle, rgba(255,255,255,0.06) 0%, transparent 70%);
    border-radius: 50%;
}
.hero .container { position: relative; z-index: 1; }
.hero h1 { font-size: 40px; font-weight: 800; margin-bottom: 16px; line-height: 1.3; }
.hero p { font-size: 18px; opacity: 0.9; margin-bottom: 32px; max-width: 600px; line-height: 1.8; }

.btn {
    display: inline-block;
    padding: 12px 28px;
    border-radius: var(--radius);
    font-weight: 600;
    font-size: 15px;
    cursor: pointer;
    transition: var(--transition);
    border: none;
    text-align: center;
}
.btn-primary {
    background: var(--accent);
    color: #fff;
}
.btn-primary:hover {
    background: var(--accent-dark);
    color: #fff;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(229,160,13,0.4);
}
.btn-outline {
    background: transparent;
    border: 2px solid var(--white);
    color: var(--white);
}
.btn-outline:hover {
    background: var(--white);
    color: var(--primary);
}
.btn-sm { padding: 8px 18px; font-size: 14px; }

/* ===== 通用区块 ===== */
.section { padding: 70px 0; }
.section-title {
    text-align: center;
    margin-bottom: 45px;
}
.section-title h2 {
    font-size: 30px;
    font-weight: 700;
    color: var(--gray-800);
    margin-bottom: 10px;
    position: relative;
    display: inline-block;
}
.section-title h2::after {
    content: '';
    position: absolute;
    bottom: -8px;
    left: 50%;
    transform: translateX(-50%);
    width: 50px;
    height: 3px;
    background: var(--accent);
    border-radius: 2px;
}
.section-title p { color: var(--gray-500); font-size: 15px; }

/* ===== 板块子标题 ===== */
.sub-section-title {
    margin: 32px 0 20px;
    padding-bottom: 12px;
    border-bottom: 2px solid var(--gray-100);
}
.sub-section-title:first-child { margin-top: 0; }
.sub-section-title h3 {
    font-size: 22px;
    font-weight: 700;
    color: var(--gray-800);
}

/* ===== 广告形式卡片 ===== */
.ad-card-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(340px, 1fr));
    gap: 28px;
}

/* 公交车体广告 - 3个形式横向排列 */
.bus-form-row {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
}
.bus-form-row .ad-card-image {
    height: auto;
    aspect-ratio: 7 / 9;
}

.ad-card {
    background: var(--white);
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow);
    transition: var(--transition);
    border: 1px solid var(--gray-200);
}
.ad-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
}
.ad-card-image {
    height: 240px;
    overflow: hidden;
    background: var(--gray-200);
}
.ad-card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}
.ad-card:hover .ad-card-image img { transform: scale(1.05); }
.ad-card-body { padding: 24px; }
.ad-card-body h3 { font-size: 18px; font-weight: 600; color: var(--gray-800); margin-bottom: 12px; }
.ad-card-info { display: flex; gap: 24px; margin-bottom: 16px; }
.ad-card-info .info-item { display: flex; flex-direction: column; }
.ad-card-info .info-label { font-size: 12px; color: var(--gray-400); text-transform: uppercase; }
.ad-card-info .info-value { font-size: 18px; font-weight: 700; color: var(--accent); }
.ad-card-footer { padding: 16px 24px; border-top: 1px solid var(--gray-100); text-align: center; }

/* ===== 线路等级表 ===== */
.route-table {
    width: 100%;
    border-collapse: collapse;
    background: var(--white);
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow);
}
.route-table thead { background: var(--primary); color: var(--white); }
.route-table th {
    padding: 14px 20px;
    text-align: left;
    font-weight: 600;
    font-size: 14px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}
.route-table td { padding: 14px 20px; border-bottom: 1px solid var(--gray-100); }
.route-table tbody tr:hover { background: var(--gray-50); }
.route-table tbody tr:last-child td { border-bottom: none; }
.route-table .price { font-weight: 700; color: var(--accent); font-size: 16px; }

/* ===== 资讯/案例列表 ===== */
.article-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 24px;
}
.article-card {
    background: var(--white);
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow);
    transition: var(--transition);
    border: 1px solid var(--gray-200);
    display: flex;
    flex-direction: column;
}
.article-card:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-md);
}
.article-card-image {
    height: 200px;
    overflow: hidden;
    background: var(--gray-200);
}
.article-card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s;
}
.article-card:hover .article-card-image img { transform: scale(1.05); }
.article-card-body { padding: 20px; flex: 1; display: flex; flex-direction: column; }
.article-card-body h3 {
    font-size: 17px;
    font-weight: 600;
    margin-bottom: 10px;
    line-height: 1.5;
}
.article-card-body h3 a { color: var(--gray-800); }
.article-card-body h3 a:hover { color: var(--primary); }
.article-card-body .summary {
    color: var(--gray-500);
    font-size: 14px;
    line-height: 1.6;
    flex: 1;
    margin-bottom: 12px;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.article-card-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 13px;
    color: var(--gray-400);
    padding-top: 12px;
    border-top: 1px solid var(--gray-100);
}

/* ===== 搜索栏 ===== */
.search-bar {
    background: var(--white);
    padding: 20px 24px;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow);
    margin-bottom: 30px;
    display: flex;
    gap: 12px;
    align-items: center;
    flex-wrap: wrap;
}
.search-bar input {
    flex: 1;
    min-width: 200px;
    padding: 12px 18px;
    border: 2px solid var(--gray-200);
    border-radius: var(--radius);
    font-size: 15px;
    transition: var(--transition);
    outline: none;
}
.search-bar input:focus { border-color: var(--primary); }
.search-bar select {
    padding: 12px 18px;
    border: 2px solid var(--gray-200);
    border-radius: var(--radius);
    font-size: 15px;
    background: var(--white);
    outline: none;
    cursor: pointer;
}
.search-bar button {
    padding: 12px 28px;
    background: var(--primary);
    color: var(--white);
    border: none;
    border-radius: var(--radius);
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
}
.search-bar button:hover { background: var(--primary-dark); }

/* ===== 分页 ===== */
.pagination {
    display: flex;
    justify-content: center;
    gap: 8px;
    margin-top: 40px;
    flex-wrap: wrap;
}
.pagination a, .pagination span {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 40px;
    height: 40px;
    padding: 0 12px;
    border-radius: var(--radius);
    font-size: 14px;
    font-weight: 500;
    transition: var(--transition);
    border: 1px solid var(--gray-200);
    background: var(--white);
    color: var(--gray-600);
}
.pagination a:hover { border-color: var(--primary); color: var(--primary); background: rgba(26,95,180,0.05); }
.pagination .active {
    background: var(--primary);
    color: var(--white);
    border-color: var(--primary);
}

/* ===== 详情页 ===== */
.detail-header { background: var(--white); padding: 40px; border-radius: var(--radius-lg); box-shadow: var(--shadow); margin-bottom: 30px; }
.detail-header h1 { font-size: 26px; font-weight: 700; color: var(--gray-800); margin-bottom: 14px; line-height: 1.4; }
.detail-meta { color: var(--gray-400); font-size: 14px; display: flex; gap: 20px; flex-wrap: wrap; }
.detail-content {
    background: var(--white);
    padding: 40px;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow);
    line-height: 1.9;
    font-size: 16px;
}
.detail-content img { max-width: 100%; height: auto; border-radius: var(--radius); margin: 20px 0; }
.detail-content p { margin-bottom: 16px; }
.detail-cover { margin-bottom: 30px; border-radius: var(--radius-lg); overflow: hidden; }
.detail-cover img { width: 100%; }

.prev-next {
    display: flex;
    justify-content: space-between;
    margin-top: 30px;
    gap: 20px;
    flex-wrap: wrap;
}
.prev-next a {
    flex: 1;
    min-width: 250px;
    padding: 18px 22px;
    background: var(--white);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow);
    transition: var(--transition);
    border: 1px solid var(--gray-200);
    display: flex;
    align-items: center;
    gap: 12px;
}
.prev-next a:hover { border-color: var(--primary); box-shadow: var(--shadow-md); }
.prev-next .prev-label, .prev-next .next-label { font-size: 12px; color: var(--gray-400); }
.prev-next .prev-title, .prev-next .next-title { font-size: 15px; font-weight: 500; color: var(--gray-700); }
.prev-next a:hover .prev-title, .prev-next a:hover .next-title { color: var(--primary); }
.prev-next .arrow { font-size: 20px; color: var(--primary); }

/* ===== 关于我们 ===== */
.about-hero {
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    color: var(--white);
    padding: 60px 0;
    text-align: center;
}
.about-content {
    background: var(--white);
    padding: 50px;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow);
    line-height: 1.9;
    font-size: 16px;
}
.about-content img { max-width: 100%; border-radius: var(--radius); margin: 20px 0; }

.contact-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 24px;
    margin-top: 40px;
}
.contact-card {
    background: var(--white);
    padding: 30px;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow);
    text-align: center;
    border: 1px solid var(--gray-200);
    transition: var(--transition);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 260px;
}
.contact-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-md); }
.contact-card .icon {
    width: 60px;
    height: 60px;
    margin: 0 auto 16px;
    background: rgba(26,95,180,0.1);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 26px;
    color: var(--primary);
    flex-shrink: 0;
}
.contact-card h4 { font-size: 16px; font-weight: 600; margin-bottom: 8px; color: var(--gray-800); }
.contact-card p { color: var(--gray-500); font-size: 14px; }
.contact-card .qrcode-img { width: 140px; height: 140px; margin-top: 10px; border-radius: var(--radius); flex-shrink: 0; }

/* ===== 页脚 ===== */
.footer {
    background: var(--dark);
    color: rgba(255,255,255,0.7);
    padding: 50px 0 0;
    margin-top: 60px;
}
.footer-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 30px;
    margin-bottom: 40px;
}
.footer-col h4 {
    color: var(--white);
    font-size: 17px;
    font-weight: 600;
    margin-bottom: 18px;
    position: relative;
    padding-bottom: 12px;
}
.footer-col h4::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 30px;
    height: 2px;
    background: var(--accent);
}
.footer-col p, .footer-col li { font-size: 14px; margin-bottom: 8px; line-height: 1.8; }
.footer-col ul { list-style: none; }
.footer-col ul li a { color: rgba(255,255,255,0.7); }
.footer-col ul li a:hover { color: var(--white); padding-left: 5px; }
.footer-bottom {
    border-top: 1px solid rgba(255,255,255,0.1);
    padding: 20px 0;
    text-align: center;
    font-size: 13px;
}
.footer-bottom a { color: rgba(255,255,255,0.7); }
.footer-bottom a:hover { color: var(--white); }

/* ===== 响应式 ===== */
@media (max-width: 992px) {
    .hero h1 { font-size: 32px; }
    .hero p { font-size: 16px; }
    .ad-card-grid { grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); }
    .bus-form-row { grid-template-columns: repeat(3, 1fr); gap: 16px; }
    .article-grid { grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); }
    .section { padding: 50px 0; }
}

@media (max-width: 768px) {
    .top-bar .contact-info { flex-direction: column; gap: 4px; }
    .menu-toggle { display: block; }
    .nav {
        display: none;
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background: var(--white);
        flex-direction: column;
        box-shadow: var(--shadow-lg);
        padding: 10px;
    }
    .nav.show { display: flex; }
    .nav > li > a { padding: 12px 16px; }
    .hero { padding: 50px 0 40px; }
    .hero h1 { font-size: 26px; }
    .page-banner { padding: 35px 0; }
    .page-banner h1 { font-size: 24px; }
    .detail-header, .detail-content, .about-content { padding: 24px; }
    .detail-header h1 { font-size: 20px; }
    .section-title h2 { font-size: 24px; }
    .search-bar { flex-direction: column; }
    .search-bar input, .search-bar select, .search-bar button { width: 100%; }
    .prev-next { flex-direction: column; }
    .route-table { font-size: 13px; }
    .route-table th, .route-table td { padding: 10px 12px; }
    .footer-grid { grid-template-columns: 1fr; }
    .contact-grid { grid-template-columns: 1fr; }
    .bus-form-row { grid-template-columns: 1fr 1fr; gap: 16px; }
}

@media (max-width: 480px) {
    .hero h1 { font-size: 22px; }
    .ad-card-grid { grid-template-columns: 1fr; }
    .bus-form-row { grid-template-columns: 1fr; }
    .article-grid { grid-template-columns: 1fr; }
    .detail-header h1 { font-size: 18px; }
}

/* 动画 */
@keyframes fadeInUp {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}
.fade-in-up { animation: fadeInUp 0.6s ease forwards; }

/* 空状态 */
.empty-state {
    text-align: center;
    padding: 60px 20px;
    color: var(--gray-400);
}
.empty-state svg { width: 80px; height: 80px; margin-bottom: 16px; opacity: 0.3; }
.empty-state p { font-size: 16px; }

/* 标签 */
.tag {
    display: inline-block;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 500;
}
.tag-primary { background: rgba(26,95,180,0.1); color: var(--primary); }
.tag-accent { background: rgba(229,160,13,0.1); color: var(--accent-dark); }
.tag-gray { background: var(--gray-100); color: var(--gray-500); }
