/* =============================================
   Base UI Components — clean version (no generic selectors)
   ============================================= */

.container { max-width: 1200px; margin: 0 auto; padding: 0 20px; }

/* Header */
.site-header, .header { position: sticky; top: 0; z-index: 1000; background: #fff; box-shadow: 0 1px 4px rgba(0,0,0,.08); }
.site-header .container, .header .container, .site-header .header-inner { display: flex; align-items: center; justify-content: space-between; min-height: 60px; flex-wrap: nowrap; gap: 12px; }
.site-header .logo, .header .logo { flex-shrink: 0; max-width: 260px; }
.site-header .logo a, .header .logo a { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; display: block; font-size: 1.2rem; font-weight: 700; color: var(--primary, #2563eb); text-decoration: none; }

/* Nav */
.main-nav, .nav-list { display: flex; list-style: none; margin: 0; padding: 0; gap: 2px; flex-wrap: nowrap; align-items: center; }
.main-nav li, .nav-list li { position: relative; flex-shrink: 0; }
.main-nav li a, .nav-list li a { display: block; padding: 10px 14px; white-space: nowrap; text-decoration: none; font-size: 14px; color: #333; transition: background 0.3s ease, color 0.3s ease; }
.main-nav li a:hover, .nav-list li a:hover, .main-nav li.active a { color: var(--primary, #2563eb); }
.main-nav li ul, .nav-list li ul, .subnav { visibility: hidden; opacity: 0; position: absolute; top: 100%; left: 0; min-width: 160px; z-index: 300; padding: 8px 0; box-shadow: 0 4px 12px rgba(0,0,0,0.2); transition: visibility 0.15s, opacity 0.15s ease; background: #fff; }
.main-nav li:hover > ul, .nav-list li:hover > ul { visibility: visible; opacity: 1; }
.main-nav li ul a, .nav-list li ul a { padding: 8px 18px; display: block; white-space: nowrap; text-decoration: none; color: #333; }
.main-nav li ul a:hover { color: var(--primary, #2563eb); }
.nav-toggle { display: none; background: none; border: none; cursor: pointer; padding: 4px; font-size: 20px; }
.nav-search-btn { background: none; border: none; cursor: pointer; padding: 8px; color: #666; font-size: 18px; }

/* Hero */
.hero { padding: 80px 0 60px; background: linear-gradient(135deg, var(--primary, #2563eb), var(--secondary, #0891b2)); color: #fff; text-align: center; }
.hero h1 { font-size: 2.2rem; font-weight: 800; line-height: 1.2; margin-bottom: 16px; color: #fff; }
.hero p, .hero .hero-subtitle { font-size: 1.1rem; opacity: 0.85; line-height: 1.7; margin-bottom: 32px; max-width: 600px; margin-left: auto; margin-right: auto; color: rgba(255,255,255,0.85); }
.hero-badge { display: inline-block; background: rgba(255,255,255,0.15); color: #fff; padding: 6px 20px; border-radius: 50px; font-size: 0.85rem; margin-bottom: 24px; }
.hero-actions { display: flex; gap: 12px; flex-wrap: wrap; justify-content: center; }

/* Buttons */
.btn, .btn-primary, .btn-outline, .btn-white, .btn-lg, .btn-sm, .btn-cta { display: inline-flex; align-items: center; justify-content: center; gap: 8px; padding: 12px 28px; border-radius: 8px; font-size: 0.95rem; font-weight: 600; cursor: pointer; transition: all 0.3s ease; border: none; text-decoration: none; line-height: 1.4; }
.btn-primary { background: var(--primary, #2563eb); color: #fff; }
.btn-primary:hover { opacity: 0.9; transform: translateY(-2px); box-shadow: 0 4px 16px rgba(0,0,0,0.15); }
.btn-outline { background: transparent; color: var(--primary, #2563eb); border: 2px solid var(--primary, #2563eb); }
.btn-outline:hover { background: var(--primary, #2563eb); color: #fff; }
.btn-white { background: #fff; color: var(--primary, #2563eb); }
.btn-white:hover { background: rgba(255,255,255,0.85); }
.btn-lg { padding: 16px 36px; font-size: 1.05rem; }
.btn-sm { padding: 8px 20px; font-size: 0.85rem; }

/* Cards */
.card { background: #fff; border-radius: 12px; box-shadow: 0 2px 12px rgba(0,0,0,0.06); overflow: hidden; transition: transform 0.3s ease, box-shadow 0.3s ease; }
.card:hover { transform: translateY(-4px); box-shadow: 0 8px 24px rgba(0,0,0,0.12); }
.card a { text-decoration: none; color: inherit; }
.card h3, .card h4 { font-size: 1.15rem; font-weight: 700; margin-bottom: 8px; color: var(--text, #1e293b); }
.card p { color: var(--gray, #64748b); font-size: 0.92rem; line-height: 1.6; margin-bottom: 0; }

/* Sections */
.section { padding: 60px 0; }
.section-alt, .section-dark, .section-gray { background: var(--gray-100, #f1f5f9); }
.section-header { text-align: center; margin-bottom: 48px; }
.section-title { font-size: 2rem; font-weight: 800; color: var(--text, #0f172a); margin-bottom: 8px; }
.section-subtitle, .section-desc { color: var(--gray, #64748b); font-size: 1.05rem; max-width: 600px; margin: 0 auto; }
.section-more { display: inline-flex; align-items: center; gap: 4px; color: var(--primary, #2563eb); font-weight: 600; text-decoration: none; font-size: 0.9rem; }
.section-more:hover { opacity: 0.8; }

/* Tags / Labels / Badges */
.tag, .label, .badge { display: inline-flex; align-items: center; padding: 4px 12px; border-radius: 50px; font-size: 0.8rem; font-weight: 500; background: var(--primary-light, #dbeafe); color: var(--primary, #2563eb); text-decoration: none; }

/* Meta */
.meta { display: flex; align-items: center; gap: 16px; font-size: 0.85rem; color: var(--gray, #94a3b8); }
.meta span { white-space: nowrap; }

/* News / Article items */
.news article, .news .item, .article-item { padding: 16px 0; border-bottom: 1px solid var(--gray-100, #f1f5f9); }
.news h3, .news h3 a { font-size: 1.05rem; font-weight: 600; color: var(--text, #1e293b); text-decoration: none; }
.news h3 a:hover { color: var(--primary, #2563eb); }

/* Icons */
.icon { display: flex; align-items: center; justify-content: center; flex-shrink: 0; }

/* Empty state */
.empty-state { text-align: center; padding: 40px 0; color: var(--gray, #94a3b8); font-size: 0.95rem; }

/* Stats */
.stat .number, .stat .num { font-size: 2.5rem; font-weight: 900; color: var(--primary, #2563eb); line-height: 1; }
.stat .label { font-size: 0.9rem; color: var(--gray, #64748b); margin-top: 4px; }

/* CTA */
.cta { text-align: center; padding: 60px 24px; background: linear-gradient(135deg, var(--primary, #2563eb), var(--secondary, #0891b2)); color: #fff; border-radius: 16px; }
.cta h2 { font-size: 2rem; font-weight: 800; color: #fff; margin-bottom: 12px; }
.cta p { font-size: 1.1rem; opacity: 0.9; margin-bottom: 28px; color: rgba(255,255,255,0.85); }

/* Partner / client */
.partner, .client { opacity: 0.6; transition: opacity 0.3s; }
.partner:hover, .client:hover { opacity: 1; }

/* Footer */
.site-footer, .footer, footer.footer { background: #1e293b; color: #fff; padding: 48px 0 0; }
.footer .container { max-width: 1200px; margin: 0 auto; padding: 0 20px; }
.footer-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 32px; padding-bottom: 32px; border-bottom: 1px solid rgba(255,255,255,0.1); }
.footer-col h4 { font-size: 1rem; margin-bottom: 14px; padding-bottom: 8px; border-bottom: 1px solid rgba(255,255,255,0.15); color: #fff; }
.footer-col ul { list-style: none; }
.footer-col li { margin-bottom: 6px; }
.footer-col a { color: rgba(255,255,255,0.7); font-size: 14px; transition: color 0.3s ease; text-decoration: none; }
.footer-col a:hover { color: #fff; }
.footer-bottom { text-align: center; padding: 20px 0; font-size: 13px; color: rgba(255,255,255,0.5); }
.footer-bottom a { color: rgba(255,255,255,0.7); text-decoration: none; }
.footer-bottom a:hover { color: #fff; }

/* Breadcrumb */
.breadcrumb, .page-breadcrumb { padding: 16px 0; font-size: .9rem; color: #64748b; }
.breadcrumb a, .page-breadcrumb a { color: var(--primary, #2563eb); text-decoration: none; }
.breadcrumb .sep, .page-breadcrumb .sep { margin: 0 8px; color: #cbd5e1; }

/* Two-column layout */
.content-with-sidebar { display: grid; grid-template-columns: 1fr 320px; gap: 32px; }
.main-content { min-width: 0; }
.sidebar .widget { background: #fff; border-radius: 8px; box-shadow: 0 1px 4px rgba(0,0,0,.06); padding: 20px; margin-bottom: 20px; }
.sidebar .widget h3, .sidebar .widget h4 { font-size: 1rem; font-weight: 700; color: #1e293b; margin-bottom: 12px; padding-bottom: 8px; border-bottom: 2px solid var(--primary, #2563eb); }
.sidebar .widget ul { list-style: none; padding: 0; }
.sidebar .widget li { padding: 6px 0; border-bottom: 1px solid #f1f5f9; }
.sidebar .widget li a { color: #475569; text-decoration: none; font-size: .9rem; }
.sidebar .widget li a:hover { color: var(--primary, #2563eb); }

/* Article detail */
.article-detail h1 { font-size: 1.8rem; font-weight: 800; color: #1e293b; margin-bottom: 12px; line-height: 1.3; }
.article-detail .meta { margin-bottom: 24px; padding-bottom: 16px; border-bottom: 1px solid #f1f5f9; }
.article-cover { margin-bottom: 24px; border-radius: 12px; overflow: hidden; }
.article-content { line-height: 1.8; color: #374151; }
.article-content h2 { font-size: 1.3rem; font-weight: 700; color: #1e293b; margin: 32px 0 12px; padding-bottom: 8px; border-bottom: 2px solid #f1f5f9; }
.article-content p { margin-bottom: 16px; }
.article-content a { color: var(--primary, #2563eb); }
.article-content img { max-width: 100%; height: auto; border-radius: 8px; margin: 16px 0; }

/* Related / Prev-Next */
.related-articles { margin-top: 48px; padding-top: 32px; border-top: 1px solid #e5e7eb; }
.related-articles h3 { font-size: 1.2rem; font-weight: 700; color: #1e293b; margin-bottom: 20px; }
.related-articles .article-list { display: grid; gap: 12px; }
.related-articles .article-item { padding: 16px; background: #f8fafc; border-radius: 8px; }
.prev-next { margin-top: 32px; padding-top: 24px; border-top: 1px solid #e5e7eb; }
.prev-next a { display: block; padding: 16px; background: #f8fafc; border-radius: 8px; color: #1e293b; text-decoration: none; font-weight: 500; }
.prev-next a:hover { background: #f1f5f9; color: var(--primary, #2563eb); }

/* Sidebar nav */
.side-nav { list-style: none; padding: 0; margin: 0; }
.side-nav > li { margin-bottom: 8px; }
.side-nav > li > a { display: block; padding: 8px 12px; background: #f0f5ff; border-radius: 6px; font-weight: 600; font-size: 14px; color: #1e3a5f; text-decoration: none; }
.side-nav > li > a:hover { background: #dbeafe; color: var(--primary, #2563eb); }
.side-nav > li > ul { display: grid; grid-template-columns: repeat(auto-fill, minmax(110px, 1fr)); gap: 2px 8px; list-style: none; padding: 6px 0 0 4px; margin: 0; }
.side-nav > li > ul > li { font-size: 12px; line-height: 1.6; }
.side-nav > li > ul > li a { color: #6b7280; display: block; padding: 3px 0; text-decoration: none; }
.side-nav > li > ul > li a:hover { color: var(--primary, #2563eb); }

/* Hot list */
.hot-list { list-style: none; padding: 0; margin: 0; }
.hot-list li { display: flex; align-items: flex-start; gap: 8px; padding: 8px 0; border-bottom: 1px solid #f1f5f9; }
.hot-list li:last-child { border-bottom: none; }
.hot-list .num { display: inline-flex; align-items: center; justify-content: center; min-width: 20px; height: 20px; background: #e2e8f0; border-radius: 4px; font-size: 11px; font-weight: 700; color: #64748b; flex-shrink: 0; }
.hot-list li:nth-child(1) .num, .hot-list li:nth-child(2) .num, .hot-list li:nth-child(3) .num { background: var(--primary, #2563eb); color: #fff; }
.hot-list a { color: #475569; text-decoration: none; font-size: .85rem; }
.hot-list a:hover { color: var(--primary, #2563eb); }

/* City / Friend links */
.city-links-section { padding: 24px 0; background: #fff; border-top: 1px solid #e5e7eb; }
.city-links-section h3, .friend-links-section h3 { text-align: center; font-size: 14px; color: #6b7280; margin-bottom: 10px; font-weight: 400; }
.city-links-grid, .friend-links { display: flex; flex-wrap: wrap; gap: 6px; justify-content: center; }
.city-links-grid a { display: inline-block; padding: 4px 10px; border: 1px solid #e5e7eb; border-radius: 4px; font-size: 13px; color: #6b7280; text-decoration: none; }
.city-links-grid a:hover { border-color: var(--primary, #2563eb); color: var(--primary, #2563eb); }
.friend-links-section { padding: 16px 0; background: #f8fafb; border-top: 1px solid #e5e7eb; }
.friend-links a { display: inline-block; padding: 3px 10px; font-size: 12px; color: #9ca3af; text-decoration: none; }
.friend-links a:hover { color: var(--primary, #2563eb); }

/* Float top */
.float-top { position: fixed; right: 20px; bottom: 80px; width: 44px; height: 44px; background: var(--primary, #2563eb); color: #fff; border-radius: 50%; display: flex; align-items: center; justify-content: center; cursor: pointer; box-shadow: 0 2px 8px rgba(0,0,0,.15); z-index: 999; font-size: 18px; text-decoration: none; }
.float-top:hover { opacity: .85; }

/* Skip link */
.skip-link { position: absolute; top: -100%; left: 50%; z-index: 9999; transform: translateX(-50%); background: #2563eb; color: #fff; padding: 8px 20px; border-radius: 0 0 8px 8px; font-size: 14px; text-decoration: none; white-space: nowrap; }
.skip-link:focus { top: 0; }

/* Article subtitle */
.article-subtitle { color: #888; font-size: 1.05rem; line-height: 1.6; margin: -8px 0 16px 0; }

/* Ad slots */
.ad-slot { margin: 16px 0; position: relative; }
.ad-slot:first-child { margin-top: 0; }
.ad-slot img { max-width: 100%; height: auto; display: block; border-radius: 6px; }
.ad-item { margin-bottom: 12px; }
.ad-item-card { padding: 20px; border-radius: 8px; text-align: center; background: #f8fafc; }
.ad-item-card h4 { font-size: 18px; margin-bottom: 8px; color: #1f2937; }
.ad-item-card p { font-size: 14px; color: #6b7280; margin-bottom: 16px; line-height: 1.5; }
.header-banner, .footer-banner { background: #f8fafc; }
.header-banner .ad-slot, .footer-banner .ad-slot { margin: 0 auto; max-width: 1200px; padding: 12px 16px; }

/* Pagination */
.pagination { display: flex; justify-content: center; gap: 6px; padding: 32px 0; }
.pagination a, .pagination span { display: inline-flex; align-items: center; justify-content: center; min-width: 36px; height: 36px; padding: 0 10px; border-radius: 6px; text-decoration: none; font-size: .9rem; border: 1px solid #e2e8f0; color: #475569; transition: all .2s; }
.pagination a:hover { background: var(--primary, #2563eb); color: #fff; border-color: var(--primary, #2563eb); }
.pagination .current { background: var(--primary, #2563eb); color: #fff; border-color: var(--primary, #2563eb); }

/* List layout */
.list-layout { display: grid; grid-template-columns: 1fr 300px; gap: 32px; padding: 40px 0; }
.list-main { min-width: 0; }

/* Responsive */
@media (max-width: 992px) {
  .content-with-sidebar, .list-layout { grid-template-columns: 1fr !important; }
  .sidebar { margin-top: 32px; }
  .footer-grid { grid-template-columns: repeat(2, 1fr); }
  .hero h1 { font-size: 2rem; }
  .section-title { font-size: 1.6rem; }
}
@media (max-width: 768px) {
  .site-header .nav-toggle, .header .nav-toggle { display: block; }
  .site-header .main-nav, .header .main-nav { display: none; flex-direction: column; width: 100%; }
  .site-header .main-nav.active, .header .main-nav.active { display: flex; position: absolute; top: 60px; left: 0; right: 0; background: #fff; box-shadow: 0 4px 12px rgba(0,0,0,.1); z-index: 999; }
  .site-header .main-nav li a, .header .main-nav li a { padding: 12px 20px; border-bottom: 1px solid #f1f5f9; }
  .hero { padding: 60px 0; }
  .hero h1 { font-size: 1.65rem; }
  .section { padding: 48px 0; }
  .footer-grid { grid-template-columns: 1fr; }
  .article-detail h1 { font-size: 1.4rem; }
}

.related-articles .article-item h2 { font-size: 1rem; font-weight: 600; margin: 0 0 4px; line-height: 1.4; }
.related-articles .article-item h2 a { color: #1e293b; text-decoration: none; }
.related-articles .article-item h2 a:hover { color: var(--primary, #2563eb); }
.related-articles .article-item .meta { font-size: .8rem; color: #94a3b8; margin: 0; border: 0; padding: 0; display: block; }
