/* ===== Reset & Base ===== */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
body {
  font-family: 'PingFang SC', 'Microsoft YaHei', sans-serif;
  color: #333; background: #f5f6fa; line-height: 1.7;
  display: flex; flex-direction: column; min-height: 100vh;
}
a { color: #1a56db; text-decoration: none; }
a:hover { text-decoration: underline; }
.container { max-width: 1100px; margin: 0 auto; padding: 0 24px; }

/* ===== Sticky Footer ===== */
.site-main { flex: 1; }

/* ===== Header ===== */
.site-header {
  background: #0f2744;
  color: #fff; padding: 0;
  box-shadow: 0 2px 12px rgba(0,0,0,.3);
  position: sticky; top: 0; z-index: 50;
}
.header-inner { display: flex; align-items: center; justify-content: space-between; height: 64px; }
.logo {
  font-size: 1.5rem; font-weight: 800; color: #fff; letter-spacing: 3px;
  display: flex; align-items: center; gap: 8px;
}
.logo::before { content: '🚗'; font-size: 1.2rem; }
.logo:hover { text-decoration: none; }
.nav a {
  color: rgba(255,255,255,.8); margin-left: 32px;
  font-size: .95rem; transition: color .2s; padding-bottom: 4px;
  border-bottom: 2px solid transparent;
}
.nav a:hover { color: #e47320; text-decoration: none; border-bottom-color: #e47320; }
.nav-contact {
  background: #e47320; color: #fff !important;
  padding: 5px 16px; border-radius: 20px;
  border-bottom: none !important; margin-left: 8px;
  transition: background .2s !important;
}
.nav-contact:hover { background: #c9620f !important; color: #fff !important; }

/* ===== Footer ===== */
.site-footer {
  background: #0f2744; color: rgba(255,255,255,.65);
  text-align: center; padding: 24px 20px; font-size: .85rem;
  margin-top: 0;
}
.site-footer p { margin-bottom: 4px; }

/* ===== Hero ===== */
.hero {
  position: relative; overflow: hidden;
  background: linear-gradient(135deg, #0f2744 0%, #1e3a5f 45%, #174a7c 75%, #0f2744 100%);
  padding: 90px 0 80px; text-align: center; color: #fff;
}
.hero::before {
  content: ''; position: absolute; inset: 0;
  background: repeating-linear-gradient(
    45deg, transparent, transparent 40px,
    rgba(255,255,255,.02) 40px, rgba(255,255,255,.02) 80px
  );
}
.hero::after {
  content: ''; position: absolute; bottom: 0; left: 0; right: 0; height: 4px;
  background: linear-gradient(90deg, #e47320, #f5a623, #e47320);
}
.hero-inner { position: relative; z-index: 1; }
.hero-tag {
  display: inline-block; background: rgba(228,115,32,.2);
  border: 1px solid rgba(228,115,32,.5); color: #f5a623;
  padding: 4px 16px; border-radius: 20px; font-size: .85rem;
  letter-spacing: 1px; margin-bottom: 20px;
}
.hero-title {
  font-size: clamp(2rem, 5vw, 3.2rem); font-weight: 800;
  letter-spacing: 4px; margin-bottom: 16px;
  text-shadow: 0 2px 12px rgba(0,0,0,.3);
}
.hero-sub {
  font-size: 1.1rem; color: rgba(255,255,255,.75); letter-spacing: 6px;
}

/* ===== Features ===== */
.features { background: #fff; padding: 0; box-shadow: 0 2px 12px rgba(0,0,0,.06); }
.features-grid {
  display: grid; grid-template-columns: repeat(4, 1fr);
  gap: 0;
}
@media (max-width: 640px) { .features-grid { grid-template-columns: repeat(2, 1fr); } }
.feature-card {
  display: flex; flex-direction: column; align-items: center;
  padding: 28px 16px; gap: 6px; border-right: 1px solid #f0f0f0;
  transition: background .2s;
}
.feature-card:last-child { border-right: none; }
.feature-card:hover { background: #fafbff; }
.feature-icon { font-size: 2rem; margin-bottom: 4px; }
.feature-card strong { font-size: 1.4rem; color: #1e3a5f; font-weight: 700; }
.feature-card span { font-size: .85rem; color: #888; }

/* ===== Services ===== */
.services-section { padding: 56px 0 0; }
.block-title {
  text-align: center; margin-bottom: 32px;
}
.block-title h2 {
  font-size: 1.5rem; color: #1e3a5f; display: inline-block;
  padding-bottom: 10px; border-bottom: 3px solid #e47320;
}
.services-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
@media (max-width: 768px) { .services-grid { grid-template-columns: 1fr; } }
.service-card {
  background: #fff; border-radius: 10px; overflow: hidden;
  box-shadow: 0 2px 12px rgba(0,0,0,.07); transition: transform .25s, box-shadow .25s;
}
.service-card:hover { transform: translateY(-4px); box-shadow: 0 8px 28px rgba(0,0,0,.12); }
.service-img {
  height: 180px;
  background-size: cover; background-position: center;
}
.si-1 { background-image: url('https://images.unsplash.com/photo-1607860108855-64acf2078ed9?w=800&q=80'); }
.si-2 { background-image: url('https://images.unsplash.com/photo-1558618666-fcd25c85cd64?w=800&q=80'); }
.si-3 { background-image: url('https://images.unsplash.com/photo-1616455579100-2ceaa4eb2d37?w=800&q=80'); }
.service-info { padding: 20px; }
.service-info h3 { font-size: 1.05rem; color: #1e3a5f; margin-bottom: 8px; }
.service-info p { font-size: .88rem; color: #666; }

/* ===== Home Grid ===== */
.home-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 28px; margin: 40px 0 32px; }
@media (max-width: 640px) { .home-grid { grid-template-columns: 1fr; } }
.home-col {
  background: #fff; border-radius: 10px; padding: 24px;
  box-shadow: 0 2px 10px rgba(0,0,0,.06);
}
.section-header {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 16px; padding-bottom: 12px;
  border-bottom: 2px solid #e47320;
}
.section-header h2 { font-size: 1.05rem; color: #1e3a5f; }
.section-header a { font-size: .82rem; color: #e47320; }

/* ===== Item List ===== */
.item-list { list-style: none; }
.item-list li {
  display: flex; justify-content: space-between; align-items: center;
  padding: 11px 0; border-bottom: 1px solid #f0f0f0; gap: 12px;
}
.item-list li:last-child { border-bottom: none; }
.item-list li a {
  flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
  color: #333; font-size: .94rem;
}
.item-list li a:hover { color: #1a56db; }
.item-list .date { color: #aaa; font-size: .8rem; white-space: nowrap; }
.item-list .empty { color: #bbb; font-size: .9rem; justify-content: center; padding: 20px 0; }
.card-list {
  background: #fff; border-radius: 10px;
  padding: 4px 24px; box-shadow: 0 2px 10px rgba(0,0,0,.06);
  margin: 24px 0 40px;
}
.card-list li { padding: 14px 0; }

/* ===== Page Banner ===== */
.page-banner {
  background: linear-gradient(135deg, #0f2744 0%, #1e3a5f 60%, #174a7c 100%);
  padding: 40px 0; color: #fff;
  border-bottom: 3px solid #e47320;
}
.page-banner h1 {
  font-size: 1.6rem; font-weight: 700;
  letter-spacing: 2px; position: relative; padding-left: 16px;
}
.page-banner h1::before {
  content: ''; position: absolute; left: 0; top: 50%;
  transform: translateY(-50%); width: 4px; height: 1.4em;
  background: #e47320; border-radius: 2px;
}

/* ===== Detail ===== */
.detail {
  background: #fff; border-radius: 10px;
  padding: 36px 40px; box-shadow: 0 2px 10px rgba(0,0,0,.06);
  margin: 32px 0 48px;
}
@media (max-width: 640px) { .detail { padding: 24px 20px; } }
.detail h1 { font-size: 1.5rem; color: #1e3a5f; margin-bottom: 12px; }
.meta {
  color: #aaa; font-size: .84rem; margin-bottom: 28px;
  padding-bottom: 16px; border-bottom: 1px solid #f0f0f0;
}
.content { line-height: 2; font-size: .97rem; }
.content img { max-width: 100%; border-radius: 6px; margin: 16px 0; }
.content p { margin-bottom: 12px; }
.back-link {
  display: inline-flex; align-items: center; gap: 6px;
  margin-top: 36px; color: #888; font-size: .88rem;
  transition: color .2s;
}
.back-link:hover { color: #1a56db; text-decoration: none; }

/* ===== Contact ===== */
.contact-grid {
  display: grid; grid-template-columns: repeat(3, 1fr);
  gap: 24px; margin: 36px 0;
}
@media (max-width: 768px) { .contact-grid { grid-template-columns: 1fr; } }
.contact-card {
  background: #fff; border-radius: 10px; padding: 32px 24px;
  text-align: center; box-shadow: 0 2px 10px rgba(0,0,0,.06);
  transition: transform .2s, box-shadow .2s;
}
.contact-card:hover { transform: translateY(-4px); box-shadow: 0 8px 24px rgba(0,0,0,.1); }
.contact-icon { font-size: 2.4rem; margin-bottom: 14px; }
.contact-card h3 { font-size: 1.05rem; color: #1e3a5f; margin-bottom: 10px; }
.contact-card p { color: #444; font-size: .95rem; }
.contact-card a { color: #1a56db; font-size: 1.1rem; font-weight: 600; }
.contact-sub { color: #aaa !important; font-size: .82rem !important; margin-top: 6px; }
.contact-map { margin-bottom: 48px; }
.map-placeholder {
  background: #f0f4ff; border: 2px dashed #c5d3f0;
  border-radius: 10px; height: 260px;
  display: flex; flex-direction: column;
  align-items: center; justify-content: center; gap: 8px;
  color: #aaa;
}
.map-placeholder span { font-size: 2.5rem; }
.map-placeholder p { font-size: .95rem; color: #888; }

/* ===== About ===== */
.about {
  background: #fff; border-radius: 10px;
  padding: 28px 32px; box-shadow: 0 2px 10px rgba(0,0,0,.06);
  margin-bottom: 48px;
}
.about h2 {
  font-size: 1.1rem; color: #1e3a5f; margin-bottom: 14px;
  padding-bottom: 10px; border-bottom: 2px solid #e47320;
}
.about p { color: #555; margin-bottom: 8px; font-size: .95rem; }

/* ===== Brand Sections ===== */
.brand-section {
  background: #fff; border-radius: 8px;
  padding: 28px 32px; box-shadow: 0 2px 10px rgba(0,0,0,.06);
  margin: 32px 0;
}
.profile-section p { color: #444; font-size: .98rem; }
.section-header.plain {
  border-bottom: none; padding-bottom: 0;
}
.section-header.plain span { color: #9aa0aa; font-size: .82rem; }
.auto-scroll {
  overflow-x: auto; overflow-y: hidden;
  padding: 4px 2px 14px;
  scrollbar-width: thin;
  scrollbar-color: #b8c2d6 #eef2f7;
}
.auto-scroll::-webkit-scrollbar { height: 9px; }
.auto-scroll::-webkit-scrollbar-track { background: #eef2f7; border-radius: 999px; }
.auto-scroll::-webkit-scrollbar-thumb { background: #b8c2d6; border-radius: 999px; }
.auto-scroll::-webkit-scrollbar-thumb:hover { background: #98a7bd; }
.auto-scroll::before, .auto-scroll::after { content: ''; }
.scroll-track {
  display: flex; gap: 16px; width: max-content; min-width: 100%;
}
.position-card {
  position: relative; width: 224px; min-height: 132px; border-radius: 8px;
  border: 1px solid #e1e8f2; background: linear-gradient(180deg, #fff 0%, #f8fafc 100%);
  padding: 18px; flex: 0 0 auto; overflow: hidden;
  box-shadow: 0 2px 10px rgba(15,39,68,.06);
  transition: border-color .2s, box-shadow .2s, transform .2s;
}
.position-card::before {
  content: ''; position: absolute; top: 0; left: 0; right: 0; height: 4px;
  background: #e47320;
}
.position-card:hover {
  border-color: #cfd9e8;
  box-shadow: 0 8px 22px rgba(15,39,68,.1);
  transform: translateY(-2px);
}
.position-index {
  display: inline-flex; align-items: center; justify-content: center;
  width: 34px; height: 22px; margin-bottom: 12px; border-radius: 6px;
  background: #f3f6fb; color: #e47320; font-size: .76rem; font-weight: 800;
  border: 1px solid #e6ebf3;
}
.position-card h3 { color: #1e3a5f; font-size: 1rem; margin-bottom: 8px; font-weight: 800; }
.position-card p { color: #667085; font-size: .86rem; line-height: 1.55; }
.business-grid {
  display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px;
}
.business-card {
  border: 1px solid #e8edf5; border-radius: 8px; overflow: hidden;
  background: #fff; box-shadow: 0 2px 8px rgba(0,0,0,.05);
}
.business-card img {
  display: block; width: 100%; height: 170px; aspect-ratio: 16 / 10;
  object-fit: cover; background: #edf1f7;
}
.business-card h3 {
  min-height: 46px; display: flex; align-items: center;
  padding: 10px 12px; color: #1e3a5f; font-size: .95rem; font-weight: 700;
}
.media-track { align-items: stretch; }
.media-card {
  width: 260px; flex: 0 0 auto; padding: 0; border: 1px solid #e8edf5;
  background: #fff; border-radius: 8px; overflow: hidden;
  cursor: pointer; text-align: left; box-shadow: 0 2px 8px rgba(0,0,0,.05);
}
.media-card img {
  display: block; width: 100%; height: 195px; aspect-ratio: 4 / 3;
  object-fit: cover; background: #edf1f7;
}
.preview-open { overflow: hidden; }
.preview-mask {
  position: fixed; inset: 0; z-index: 500;
  background: rgba(4, 12, 24, .86);
  display: grid; place-items: center; padding: 28px;
}
.preview-mask[hidden] { display: none; }
.preview-mask img {
  max-width: min(92vw, 1100px); max-height: 78vh; object-fit: contain;
  border-radius: 8px; box-shadow: 0 20px 60px rgba(0,0,0,.35);
}
.preview-close, .preview-nav {
  position: fixed; border: 1px solid rgba(255,255,255,.35);
  background: rgba(255,255,255,.1); color: #fff; cursor: pointer;
}
.preview-close {
  top: 22px; right: 24px; width: 42px; height: 42px;
  border-radius: 50%; font-size: 1.8rem; line-height: 1;
}
.preview-nav {
  top: 50%; transform: translateY(-50%);
  width: 46px; height: 62px; border-radius: 8px; font-size: 2.2rem;
}
.preview-prev { left: 24px; }
.preview-next { right: 24px; }
#preview-title {
  position: fixed; bottom: 24px; left: 24px; right: 24px;
  text-align: center; color: rgba(255,255,255,.86);
}
.real-map {
  border-style: solid;
  background: linear-gradient(135deg, #f0f4ff, #fff);
}
.real-map strong { color: #1e3a5f; }
.real-map div { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 8px; }

/* ===== 404 ===== */
.empty-page { text-align: center; padding: 100px 0; }
.empty-page h1 { font-size: 5rem; color: #e0e0e0; }
.empty-page p { color: #aaa; margin: 16px 0 24px; }

/* ===== Buttons ===== */
.btn {
  display: inline-flex; align-items: center; padding: 8px 18px;
  border-radius: 6px; border: 1px solid #d0d0d0; background: #fff;
  cursor: pointer; font-size: .9rem; transition: all .15s;
}
.btn:hover { background: #f5f5f5; }
.btn-primary { background: #1a56db; color: #fff; border-color: #1a56db; }
.btn-primary:hover { background: #1648c0; }
.btn-danger { background: #e53e3e; color: #fff; border-color: #e53e3e; }
.btn-danger:hover { background: #c53030; }
.btn-sm { padding: 4px 12px; font-size: .82rem; }
.btn-block { width: 100%; justify-content: center; padding: 11px; font-size: 1rem; }

/* ===== Login Page ===== */
.login-page {
  background: linear-gradient(135deg, #0f2744, #1e3a5f);
  min-height: 100vh; display: flex; align-items: center; justify-content: center;
}
.login-box {
  background: #fff; border-radius: 12px; padding: 44px 40px;
  width: 100%; max-width: 390px;
  box-shadow: 0 16px 48px rgba(0,0,0,.25);
}
.login-box h1 {
  text-align: center; font-size: 1.15rem; color: #1e3a5f;
  margin-bottom: 32px; letter-spacing: 1px;
}
.error-msg {
  background: #fff5f5; color: #e53e3e; border: 1px solid #fecaca;
  border-radius: 5px; padding: 9px 14px; margin-bottom: 16px; font-size: .88rem;
}

/* ===== Forms ===== */
.form-group { margin-bottom: 20px; }
.form-group label { display: block; font-size: .85rem; color: #555; margin-bottom: 6px; }
.form-group input {
  width: 100%; border: 1px solid #d8d8d8; border-radius: 6px;
  padding: 10px 14px; font-size: .95rem; outline: none;
  transition: border-color .15s, box-shadow .15s;
}
.form-group textarea, .form-group select {
  width: 100%; border: 1px solid #d8d8d8; border-radius: 6px;
  padding: 10px 14px; font-size: .95rem; outline: none;
  transition: border-color .15s, box-shadow .15s; font-family: inherit;
}
.form-group textarea { min-height: 82px; resize: vertical; }
.form-group input:focus { border-color: #1a56db; box-shadow: 0 0 0 3px rgba(26,86,219,.1); }
.form-group textarea:focus, .form-group select:focus { border-color: #1a56db; box-shadow: 0 0 0 3px rgba(26,86,219,.1); }

/* ===== Admin Layout ===== */
.admin-nav {
  display: flex; align-items: center;
  background: #0f2744; padding: 0 28px; height: 58px; gap: 20px;
  box-shadow: 0 2px 8px rgba(0,0,0,.2);
}
.admin-logo { color: #fff; font-weight: 700; font-size: 1rem; }
.admin-nav-links a {
  color: rgba(255,255,255,.7); font-size: .92rem;
  padding: 6px 14px; border-radius: 5px; transition: all .15s;
}
.admin-nav-links a:hover, .admin-nav-links a.active {
  background: rgba(255,255,255,.12); color: #fff; text-decoration: none;
}
.admin-nav #btn-logout {
  margin-left: auto; color: rgba(255,255,255,.7);
  border-color: rgba(255,255,255,.25);
}
.admin-nav #btn-logout:hover { background: rgba(255,255,255,.1); color: #fff; }

.admin-page { background: #f0f2f7; min-height: 100vh; }
.admin-content { max-width: 960px; margin: 36px auto; padding: 0 24px; }
.admin-toolbar {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 20px;
}
.admin-toolbar h2 { font-size: 1.2rem; color: #1e3a5f; }

/* ===== Admin Table ===== */
.admin-table {
  width: 100%; border-collapse: collapse; background: #fff;
  border-radius: 10px; overflow: hidden;
  box-shadow: 0 2px 10px rgba(0,0,0,.07);
}
.admin-table th {
  background: #f0f4ff; color: #555;
  font-size: .85rem; padding: 13px 18px; text-align: left;
}
.admin-table td {
  padding: 13px 18px; border-top: 1px solid #f3f3f3;
  font-size: .92rem; vertical-align: middle;
}
.admin-table td:first-child { max-width: 420px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.admin-table .actions { display: flex; gap: 8px; }
.admin-filters {
  display: grid; grid-template-columns: 160px 160px 1fr auto; gap: 12px;
  margin-bottom: 18px;
}
.media-thumb {
  width: 88px; aspect-ratio: 4 / 3; object-fit: cover;
  border-radius: 6px; border: 1px solid #e5e7eb; background: #f3f4f6;
}
.status-pill {
  display: inline-flex; align-items: center; border-radius: 999px;
  padding: 3px 9px; font-size: .78rem; background: #edf7ed; color: #237a2f;
}
.status-pill.off { background: #f5f5f5; color: #888; }
.image-preview {
  width: 180px; aspect-ratio: 4 / 3; object-fit: cover;
  display: none; border-radius: 8px; border: 1px solid #e5e7eb;
  margin-top: 10px;
}

/* ===== Modal ===== */
.modal-mask {
  position: fixed; inset: 0; background: rgba(0,0,0,.5);
  display: flex; align-items: center; justify-content: center; z-index: 200;
  backdrop-filter: blur(2px);
}
.modal-box {
  background: #fff; border-radius: 12px; padding: 32px 36px;
  width: 100%; max-width: 700px; max-height: 90vh; overflow-y: auto;
  box-shadow: 0 16px 48px rgba(0,0,0,.2);
}
.modal-box h3 { font-size: 1.1rem; color: #1e3a5f; margin-bottom: 22px; }
.modal-footer { display: flex; justify-content: flex-end; gap: 12px; margin-top: 22px; }
#editor { height: 280px; }

/* ===== Responsive ===== */
@media (max-width: 640px) {
  .admin-content { padding: 0 14px; }
  .modal-box { padding: 22px 18px; }
  .admin-table td:first-child { max-width: 140px; }
  .hero { padding: 60px 0 50px; }
  .brand-section { padding: 22px 18px; }
  .business-grid { grid-template-columns: 1fr 1fr; gap: 12px; }
  .business-card img { height: 120px; }
  .business-card h3 { font-size: .86rem; min-height: 42px; padding: 8px 10px; }
  .position-card { width: 190px; min-height: 128px; padding: 16px; }
  .media-card { width: 220px; }
  .media-card img { height: 165px; }
  .admin-filters { grid-template-columns: 1fr; }
  .preview-nav { width: 38px; height: 52px; }
  .preview-prev { left: 10px; }
  .preview-next { right: 10px; }
}
