/* ========================================
   CSS Variables
   ======================================== */
:root {
  --primary: #094BAE;
  --primary-dark: #073a8a;
  --text: #333;
  --text-light: #666;
  --bg: #fff;
  --bg-light: #f8f9fa;
  --border: #e0e0e0;
  --max-width: 1200px;
  --radius: 8px;
}

/* ========================================
   Reset & Base
   ======================================== */
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen,
    Ubuntu, Cantarell, "Helvetica Neue", Arial, sans-serif;
  font-size: 16px;
  line-height: 1.7;
  color: var(--text);
  background-color: var(--bg);
}

h1, h2, h3, h4, h5, h6 {
  font-family: Georgia, "Times New Roman", Times, serif;
  line-height: 1.3;
  color: var(--text);
  font-weight: 700;
}

a {
  color: var(--primary);
  text-decoration: none;
  transition: color 0.2s ease;
}

a:hover {
  color: var(--primary-dark);
}

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

ul, ol {
  list-style: none;
}

/* ========================================
   Container
   ======================================== */
.container {
  width: 100%;
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 16px;
}

/* ========================================
   Sections
   ======================================== */
.section {
  padding: 60px 0;
}

.section-title {
  font-size: 2rem;
  margin-bottom: 12px;
  color: var(--text);
  text-align: center;
}

.section-subtitle {
  font-size: 1.1rem;
  color: var(--text-light);
  margin-bottom: 40px;
  text-align: center;
}

.bg-light {
  background-color: var(--bg-light);
}

.page-banner {
  padding: 120px 0 40px;
  text-align: center;
  background: linear-gradient(180deg, #f0f4ff 0%, #fff 100%);
}

.page-banner h1 {
  font-size: 2.2rem;
  margin-bottom: 12px;
}

.page-banner p {
  font-size: 1.1rem;
  color: var(--text-light);
}

/* ========================================
   Header
   ======================================== */
.header {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 64px;
  background: rgba(255, 255, 255, 0.85);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
  z-index: 1000;
  display: flex;
  align-items: center;
}

.header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

/* ========================================
   Logo
   ======================================== */
.logo {
  font-family: Georgia, "Times New Roman", Times, serif;
  font-size: 1.4rem;
  font-weight: 700;
  color: var(--primary);
  letter-spacing: -0.5px;
}

.logo:hover {
  color: var(--primary-dark);
}

/* ========================================
   Navigation
   ======================================== */
.nav {
  display: flex;
  align-items: center;
  gap: 32px;
}

.nav-list {
  display: flex;
  align-items: center;
  gap: 28px;
}

.nav-list a {
  font-size: 0.95rem;
  color: var(--text);
  padding: 6px 0;
  border-bottom: 2px solid transparent;
  transition: color 0.2s ease, border-color 0.2s ease;
}

.nav-list a:hover,
.nav-list a.active {
  color: var(--primary);
  border-bottom-color: var(--primary);
}

.menu-toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 8px;
  font-size: 1.5rem;
  color: var(--text);
  line-height: 1;
}

/* ========================================
   Hero
   ======================================== */
.hero {
  padding-top: 140px;
  padding-bottom: 80px;
  background: linear-gradient(180deg, #f0f4ff 0%, #fff 100%);
}

.hero .container {
  text-align: center;
}

.hero h1 {
  font-size: 2.8rem;
  margin-bottom: 20px;
  color: var(--text);
  font-family: Georgia, "Times New Roman", Times, serif;
}

.hero p {
  font-size: 1.2rem;
  color: var(--text-light);
  max-width: 600px;
  margin: 0 auto 32px;
}

.hero-buttons {
  display: flex;
  gap: 16px;
  justify-content: center;
  flex-wrap: wrap;
}

/* ========================================
   Buttons
   ======================================== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 12px 28px;
  font-size: 1rem;
  font-weight: 500;
  border: 2px solid transparent;
  border-radius: var(--radius);
  cursor: pointer;
  transition: background-color 0.2s ease, color 0.2s ease, border-color 0.2s ease;
  text-decoration: none;
}

.btn-primary {
  background-color: var(--primary);
  color: #fff;
  border-color: var(--primary);
}

.btn-primary:hover {
  background-color: var(--primary-dark);
  border-color: var(--primary-dark);
  color: #fff;
}

.btn-outline {
  background-color: transparent;
  color: var(--primary);
  border-color: var(--primary);
}

.btn-outline:hover {
  background-color: var(--primary);
  color: #fff;
}

/* ========================================
   Services
   ======================================== */
.services-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 24px;
}

.service-card {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 32px;
  transition: box-shadow 0.2s ease;
}

.service-card:hover {
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
}

.service-icon {
  font-size: 2rem;
  margin-bottom: 16px;
}

.service-card h3 {
  font-size: 1.25rem;
  margin-bottom: 12px;
}

.service-card p {
  color: var(--text-light);
  margin-bottom: 16px;
}

.service-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.tag {
  display: inline-block;
  padding: 4px 12px;
  background-color: var(--bg-light);
  border: 1px solid var(--border);
  border-radius: 100px;
  font-size: 0.8rem;
  color: var(--text-light);
}

/* ========================================
   Blog
   ======================================== */
.blog-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 24px;
}

.blog-card {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  transition: box-shadow 0.2s ease;
}

.blog-card:hover {
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
}

.blog-card-body {
  padding: 24px;
}

.blog-card-meta {
  font-size: 0.85rem;
  color: var(--text-light);
  margin-bottom: 8px;
}

.blog-card-title {
  font-size: 1.2rem;
  margin-bottom: 12px;
}

.blog-card-title a {
  color: var(--text);
}

.blog-card-title a:hover {
  color: var(--primary);
}

.read-more {
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--primary);
}

.read-more:hover {
  color: var(--primary-dark);
}

/* ========================================
   Portfolio
   ======================================== */
.portfolio-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 24px;
}

.portfolio-card {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  transition: box-shadow 0.2s ease;
}

.portfolio-card:hover {
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
}

.portfolio-thumbnail {
  aspect-ratio: 16 / 9;
  background-color: var(--bg-light);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-light);
  font-size: 0.9rem;
}

.portfolio-card-body {
  padding: 24px;
}

.portfolio-card-title {
  font-size: 1.15rem;
  margin-bottom: 8px;
}

.portfolio-card-desc {
  color: var(--text-light);
  font-size: 0.95rem;
}

/* ========================================
   About Page
   ======================================== */
.about-intro {
  display: flex;
  flex-direction: column;
  gap: 32px;
  align-items: center;
  text-align: center;
  margin-bottom: 48px;
}

.avatar {
  width: 120px;
  height: 120px;
  border-radius: 50%;
  background-color: var(--primary);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-size: 2.5rem;
  font-family: Georgia, "Times New Roman", Times, serif;
  flex-shrink: 0;
}

.tech-stack {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  justify-content: center;
  margin-top: 24px;
}

.tech-stack .tag {
  background-color: #eef2ff;
  border-color: #c7d2fe;
  color: var(--primary);
  font-size: 0.85rem;
  padding: 6px 14px;
}

/* Timeline */
.timeline {
  position: relative;
  padding-left: 32px;
}

.timeline::before {
  content: "";
  position: absolute;
  left: 7px;
  top: 0;
  bottom: 0;
  width: 2px;
  background-color: var(--border);
}

.timeline-item {
  position: relative;
  padding-bottom: 36px;
}

.timeline-item:last-child {
  padding-bottom: 0;
}

.timeline-item::before {
  content: "";
  position: absolute;
  left: -29px;
  top: 6px;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background-color: var(--primary);
  border: 2px solid #fff;
}

.timeline-item h3 {
  font-size: 1.1rem;
  margin-bottom: 4px;
}

.timeline-date {
  font-size: 0.85rem;
  color: var(--text-light);
  margin-bottom: 8px;
}

.timeline-content h4 {
  font-size: 1rem;
  margin-bottom: 4px;
}

.timeline-content p {
  color: var(--text-light);
}

.post-meta {
  font-size: 0.9rem;
  color: var(--text-light);
  margin-bottom: 8px;
}

.post-meta span {
  margin-right: 16px;
}

.card-body {
  padding: 24px;
}

.card-body h3 {
  font-size: 1.15rem;
  margin-bottom: 8px;
}

.card-body p {
  color: var(--text-light);
  font-size: 0.95rem;
  margin-bottom: 12px;
}

.blog-meta {
  font-size: 0.85rem;
  color: var(--text-light);
  margin-bottom: 8px;
}

.blog-meta time,
.blog-meta .blog-category {
  margin-right: 12px;
}

/* ========================================
   Advantages Grid (Homepage)
   ======================================== */
.advantages-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 32px;
  text-align: center;
}

.advantage-item {
  padding: 24px;
}

.advantage-number {
  font-family: Georgia, "Times New Roman", Times, serif;
  font-size: 2.5rem;
  font-weight: 700;
  color: var(--primary);
  margin-bottom: 8px;
}

.advantage-label {
  font-size: 1rem;
  color: var(--text-light);
}

@media (min-width: 768px) {
  .advantages-grid {
    grid-template-columns: repeat(4, 1fr);
  }
}

/* ========================================
   Service Detail Page
   ======================================== */
.service-detail {
  width: 100%;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 32px;
  margin-bottom: 24px;
}

.service-detail-icon {
  font-size: 2rem;
  margin-bottom: 16px;
}

.service-detail h3 {
  font-size: 1.3rem;
  margin-bottom: 12px;
}

.service-detail p {
  color: var(--text-light);
  margin-bottom: 12px;
}

.service-features {
  font-style: italic;
  margin-bottom: 16px !important;
}

.service-detail .service-tags {
  margin-top: 16px;
}

.process-steps {
  display: grid;
  grid-template-columns: 1fr;
  gap: 24px;
  margin-top: 40px;
}

.process-step {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 12px;
}

.process-step-number {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background-color: var(--primary);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
  font-weight: 700;
  flex-shrink: 0;
}

.process-step h3 {
  font-size: 1.05rem;
}

.process-step p {
  color: var(--text-light);
  font-size: 0.95rem;
}

/* ========================================
   Blog Post
   ======================================== */
.post-header {
  margin-bottom: 40px;
  text-align: center;
}

.post-header h1 {
  font-size: 2rem;
  margin-bottom: 12px;
}

.post-header .post-meta {
  font-size: 0.9rem;
  color: var(--text-light);
}

.post-content {
  max-width: 720px;
  margin: 0 auto;
  line-height: 1.85;
}

.post-content h2 {
  font-size: 1.5rem;
  margin-top: 40px;
  margin-bottom: 16px;
}

.post-content h3 {
  font-size: 1.25rem;
  margin-top: 32px;
  margin-bottom: 12px;
}

.post-content p {
  margin-bottom: 20px;
}

.post-content ul,
.post-content ol {
  margin-bottom: 20px;
  padding-left: 24px;
}

.post-content ul {
  list-style: disc;
}

.post-content ol {
  list-style: decimal;
}

.post-content li {
  margin-bottom: 8px;
}

.post-content blockquote {
  border-left: 3px solid var(--primary);
  padding-left: 20px;
  margin: 24px 0;
  color: var(--text-light);
  font-style: italic;
}

.post-content code {
  background-color: var(--bg-light);
  padding: 2px 6px;
  border-radius: 4px;
  font-size: 0.9em;
}

.post-content pre {
  background-color: var(--bg-light);
  padding: 20px;
  border-radius: var(--radius);
  overflow-x: auto;
  margin-bottom: 24px;
}

.post-content pre code {
  background: none;
  padding: 0;
}

.post-nav {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  margin-top: 48px;
  padding-top: 32px;
  border-top: 1px solid var(--border);
}

.post-nav a {
  font-size: 0.95rem;
}

.post-nav .post-nav-label {
  font-size: 0.8rem;
  color: var(--text-light);
  display: block;
  margin-bottom: 4px;
}

.post-back {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 32px;
  font-size: 0.95rem;
  color: var(--text-light);
}

.post-back:hover {
  color: var(--primary);
}

/* ========================================
   Footer
   ======================================== */
.footer {
  background-color: #1a1a2e;
  color: #fff;
  padding: 60px 0 32px;
}

.footer-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 40px;
  margin-bottom: 40px;
}

.footer h3 {
  color: #fff;
  font-size: 1.1rem;
  margin-bottom: 16px;
}

.footer-brand p {
  color: #a0a0b8;
  line-height: 1.7;
  margin-top: 12px;
}

.footer-links a {
  display: block;
  color: #a0a0b8;
  padding: 4px 0;
  transition: color 0.2s ease;
}

.footer-links a:hover {
  color: #fff;
}

.footer-contact p {
  color: #a0a0b8;
  margin-bottom: 8px;
}

.footer-contact a {
  color: #a0a0b8;
}

.footer-contact a:hover {
  color: #fff;
}

.footer-bottom {
  text-align: center;
  padding-top: 32px;
  border-top: 1px solid #2a2a3e;
  color: #a0a0b8;
  font-size: 0.9rem;
}

.footer-bottom a {
  color: #a0a0b8;
}

.footer-bottom a:hover {
  color: #fff;
}

/* ========================================
   Contact Form
   ======================================== */
.contact-form {
  max-width: 600px;
  margin: 0 auto;
}

.form-group {
  margin-bottom: 20px;
}

.form-group label {
  display: block;
  font-size: 0.9rem;
  font-weight: 500;
  margin-bottom: 6px;
  color: var(--text);
}

.form-group input,
.form-group textarea {
  width: 100%;
  padding: 12px 14px;
  font-size: 1rem;
  font-family: inherit;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background-color: var(--bg);
  color: var(--text);
  transition: border-color 0.2s ease;
}

.form-group input:focus,
.form-group textarea:focus {
  outline: none;
  border-color: var(--primary);
}

.form-group textarea {
  resize: vertical;
  min-height: 140px;
}

.form-message {
  padding: 12px 16px;
  border-radius: var(--radius);
  margin-bottom: 20px;
  font-size: 0.95rem;
}

.form-message.success {
  background-color: #ecfdf5;
  color: #065f46;
  border: 1px solid #a7f3d0;
}

.form-message.error {
  background-color: #fef2f2;
  color: #991b1b;
  border: 1px solid #fecaca;
}

/* ========================================
   Contact Info (替代表单)
   ======================================== */
.contact-info-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 32px;
  max-width: 800px;
  margin: 0 auto;
  text-align: center;
}

.contact-info-item {
  padding: 32px 24px;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
}

.contact-info-icon {
  font-size: 2rem;
  margin-bottom: 12px;
}

.contact-info-item h3 {
  font-size: 1.1rem;
  margin-bottom: 8px;
}

.contact-info-item p {
  color: var(--text-light);
}

@media (min-width: 768px) {
  .contact-info-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

/* ========================================
   CTA Section
   ======================================== */
.cta-section {
  text-align: center;
}

.cta-section h2 {
  font-size: 1.8rem;
  margin-bottom: 24px;
}

/* ========================================
   Responsive — Tablet (768px–1024px)
   ======================================== */
@media (min-width: 768px) {
  .container {
    padding: 0 24px;
  }

  .section {
    padding: 80px 0;
  }

  .section-title {
    font-size: 2.2rem;
  }

  .hero {
    padding-top: 160px;
    padding-bottom: 100px;
  }

  .hero h1 {
    font-size: 3.2rem;
  }

  .services-grid {
    grid-template-columns: 1fr 1fr;
  }

  .blog-grid {
    grid-template-columns: 1fr 1fr;
  }

  .portfolio-grid {
    grid-template-columns: 1fr 1fr;
  }

  .about-intro {
    flex-direction: row;
    text-align: left;
    gap: 40px;
  }

  .process-steps {
    grid-template-columns: 1fr 1fr;
  }

  .footer-grid {
    grid-template-columns: 1fr 1fr;
  }
}

/* ========================================
   Responsive — Desktop (>1024px)
   ======================================== */
@media (min-width: 1024px) {
  .menu-toggle {
    display: none;
  }

  .nav-list {
    display: flex;
  }

  .section {
    padding: 100px 0;
  }

  .section-title {
    font-size: 2.5rem;
  }

  .hero {
    padding-top: 180px;
    padding-bottom: 120px;
  }

  .hero h1 {
    font-size: 3.6rem;
  }

  .hero p {
    font-size: 1.25rem;
  }

  .blog-grid {
    grid-template-columns: 1fr 1fr 1fr;
  }

  .process-steps {
    grid-template-columns: repeat(4, 1fr);
  }

  .footer-grid {
    grid-template-columns: 2fr 1fr 1fr;
    gap: 48px;
  }
}

/* ========================================
   Responsive — Mobile (<768px)
   ======================================== */
@media (max-width: 767px) {
  .nav-list {
    display: none;
    position: absolute;
    top: 64px;
    left: 0;
    right: 0;
    flex-direction: column;
    background: rgba(255, 255, 255, 0.98);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--border);
    padding: 16px 24px;
    gap: 4px;
  }

  .nav-list.active {
    display: flex;
  }

  .nav-list a {
    padding: 12px 0;
    width: 100%;
    border-bottom: 1px solid var(--border);
  }

  .nav-list a:last-child {
    border-bottom: none;
  }

  .menu-toggle {
    display: block;
  }

  .hero h1 {
    font-size: 2rem;
  }

  .hero p {
    font-size: 1.05rem;
  }

  .hero-buttons {
    flex-direction: column;
    align-items: center;
  }

  .btn {
    width: 100%;
    max-width: 280px;
  }

  .post-header h1 {
    font-size: 1.6rem;
  }

  .post-nav {
    flex-direction: column;
  }

  .page-banner h1 {
    font-size: 1.8rem;
  }
}
