/* style.css - 南京金城数据科技有限公司 */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans SC", sans-serif;
  line-height: 1.6;
  color: #333;
  background: #f8f9fa;
  transition: background 0.3s, color 0.3s;
}

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

/* Header */
header {
  background: linear-gradient(135deg, #1a3a5c 0%, #2a5a8c 100%);
  color: #fff;
  padding: 20px 0;
  position: sticky;
  top: 0;
  z-index: 1000;
  box-shadow: 0 2px 10px rgba(0,0,0,0.1);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}

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

.logo a {
  color: #fff;
  font-size: 1.5rem;
  font-weight: 700;
  text-decoration: none;
}

.logo span {
  color: #ffc107;
}

nav ul {
  list-style: none;
  display: flex;
  gap: 20px;
}

nav a {
  color: #fff;
  text-decoration: none;
  font-size: 0.95rem;
  padding: 5px 10px;
  border-radius: 4px;
  transition: background 0.3s, transform 0.3s;
}

nav a:hover {
  background: rgba(255,255,255,0.15);
  transform: translateY(-2px);
}

.menu-toggle {
  display: none;
  background: none;
  border: none;
  color: #fff;
  font-size: 1.5rem;
  cursor: pointer;
}

/* Hero */
.hero {
  background: linear-gradient(135deg, #e8f0fe 0%, #d4e4f7 100%);
  padding: 80px 0;
  text-align: center;
  transition: background 0.3s;
}

.hero h1 {
  font-size: 2.5rem;
  color: #1a3a5c;
  margin-bottom: 20px;
  animation: fadeInUp 1s ease;
}

.hero p {
  font-size: 1.2rem;
  color: #555;
  max-width: 700px;
  margin: 0 auto 30px;
  animation: fadeInUp 1s ease 0.2s both;
}

.hero .btn {
  display: inline-block;
  background: #1a3a5c;
  color: #fff;
  padding: 12px 30px;
  border-radius: 6px;
  text-decoration: none;
  font-weight: 600;
  transition: background 0.3s, transform 0.3s, box-shadow 0.3s;
  animation: fadeInUp 1s ease 0.4s both;
}

.hero .btn:hover {
  background: #2a5a8c;
  transform: translateY(-3px);
  box-shadow: 0 4px 15px rgba(26,58,92,0.3);
}

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

.section h2 {
  text-align: center;
  font-size: 2rem;
  color: #1a3a5c;
  margin-bottom: 40px;
  position: relative;
}

.section h2::after {
  content: '';
  display: block;
  width: 60px;
  height: 4px;
  background: #ffc107;
  margin: 10px auto 0;
  border-radius: 2px;
}

.section h3 {
  font-size: 1.3rem;
  color: #2a5a8c;
  margin-bottom: 15px;
}

.section h4 {
  font-size: 1.1rem;
  color: #3a6a9c;
  margin-bottom: 10px;
}

/* Grid & Cards */
.grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 30px;
}

.card {
  background: rgba(255,255,255,0.85);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-radius: 16px;
  padding: 25px;
  box-shadow: 0 4px 20px rgba(0,0,0,0.08);
  transition: transform 0.3s, box-shadow 0.3s, background 0.3s;
  border: 1px solid rgba(255,255,255,0.3);
}

.card:hover {
  transform: translateY(-8px);
  box-shadow: 0 8px 30px rgba(0,0,0,0.12);
  background: rgba(255,255,255,0.95);
}

.card svg {
  width: 60px;
  height: 60px;
  margin-bottom: 15px;
  fill: #1a3a5c;
  transition: transform 0.3s;
}

.card:hover svg {
  transform: scale(1.1);
}

/* About */
.about-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 40px;
  align-items: start;
}

.about-text p {
  margin-bottom: 15px;
}

.about-info {
  background: rgba(232,240,254,0.8);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  padding: 20px;
  border-radius: 12px;
  border: 1px solid rgba(255,255,255,0.3);
}

.about-info p {
  margin-bottom: 8px;
}

/* Articles */
.articles .article-item {
  background: rgba(255,255,255,0.85);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border-radius: 12px;
  padding: 20px;
  margin-bottom: 20px;
  box-shadow: 0 2px 12px rgba(0,0,0,0.06);
  border: 1px solid rgba(255,255,255,0.3);
  transition: transform 0.3s, box-shadow 0.3s;
}

.articles .article-item:hover {
  transform: translateX(5px);
  box-shadow: 0 4px 20px rgba(0,0,0,0.1);
}

.articles .article-item h3 {
  margin-bottom: 5px;
}

.articles .article-item .meta {
  color: #888;
  font-size: 0.9rem;
  margin-bottom: 10px;
}

.articles .article-item a {
  color: #1a3a5c;
  text-decoration: none;
  font-weight: 600;
  transition: color 0.3s;
}

.articles .article-item a:hover {
  color: #ffc107;
  text-decoration: underline;
}

/* FAQ */
.faq-item {
  background: rgba(255,255,255,0.85);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border-radius: 12px;
  margin-bottom: 12px;
  box-shadow: 0 2px 10px rgba(0,0,0,0.06);
  border: 1px solid rgba(255,255,255,0.3);
  transition: transform 0.3s;
}

.faq-item:hover {
  transform: translateY(-2px);
}

.faq-question {
  padding: 18px 20px;
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-weight: 600;
  color: #1a3a5c;
  transition: color 0.3s;
}

.faq-question::after {
  content: '+';
  font-size: 1.5rem;
  transition: transform 0.3s;
}

.faq-item.active .faq-question::after {
  transform: rotate(45deg);
}

.faq-answer {
  padding: 0 20px 18px;
  display: none;
  animation: fadeIn 0.3s ease;
}

.faq-item.active .faq-answer {
  display: block;
}

/* HowTo */
.howto {
  background: rgba(255,255,255,0.85);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-radius: 16px;
  padding: 30px;
  box-shadow: 0 4px 20px rgba(0,0,0,0.08);
  border: 1px solid rgba(255,255,255,0.3);
}

.howto ol {
  padding-left: 20px;
}

.howto li {
  margin-bottom: 10px;
  transition: transform 0.3s;
}

.howto li:hover {
  transform: translateX(5px);
}

/* Footer */
.footer {
  background: #1a3a5c;
  color: #ccc;
  padding: 40px 0;
}

.footer .container {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 30px;
}

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

.footer h3::after {
  content: '';
  display: block;
  width: 30px;
  height: 2px;
  background: #ffc107;
  margin-top: 5px;
}

.footer a {
  color: #bbb;
  text-decoration: none;
  display: block;
  margin-bottom: 6px;
  transition: color 0.3s, padding-left 0.3s;
}

.footer a:hover {
  color: #ffc107;
  padding-left: 5px;
}

.footer .copyright {
  grid-column: 1 / -1;
  text-align: center;
  padding-top: 20px;
  border-top: 1px solid #2a5a8c;
  margin-top: 20px;
}

/* Banner */
.banner {
  position: relative;
  overflow: hidden;
  height: 400px;
}

.banner-slide {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  opacity: 0;
  transition: opacity 0.8s ease;
  background: linear-gradient(135deg, #1a3a5c 0%, #2a5a8c 100%);
  color: #fff;
}

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

.banner-slide h2 {
  font-size: 2.2rem;
  margin-bottom: 15px;
  animation: fadeInUp 0.8s ease;
}

.banner-slide p {
  font-size: 1.1rem;
  max-width: 600px;
  animation: fadeInUp 0.8s ease 0.2s both;
}

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

.banner-dots span {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: rgba(255,255,255,0.5);
  cursor: pointer;
  transition: background 0.3s, transform 0.3s;
}

.banner-dots span:hover {
  transform: scale(1.2);
}

.banner-dots span.active {
  background: #fff;
}

/* Back to Top */
.back-to-top {
  position: fixed;
  bottom: 30px;
  right: 30px;
  background: #1a3a5c;
  color: #fff;
  width: 45px;
  height: 45px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  opacity: 0;
  transition: opacity 0.3s, transform 0.3s;
  z-index: 999;
  box-shadow: 0 2px 10px rgba(0,0,0,0.2);
}

.back-to-top.show {
  opacity: 1;
}

.back-to-top:hover {
  transform: scale(1.1);
}

/* Dark Mode Toggle */
.dark-mode-toggle {
  position: fixed;
  bottom: 30px;
  left: 30px;
  background: #1a3a5c;
  color: #fff;
  width: 45px;
  height: 45px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  z-index: 999;
  border: none;
  font-size: 1.2rem;
  box-shadow: 0 2px 10px rgba(0,0,0,0.2);
  transition: transform 0.3s;
}

.dark-mode-toggle:hover {
  transform: scale(1.1);
}

/* Dark Mode */
body.dark-mode {
  background: #121212;
  color: #e0e0e0;
}

body.dark-mode .card,
body.dark-mode .faq-item,
body.dark-mode .howto,
body.dark-mode .article-item,
body.dark-mode .about-info {
  background: rgba(30,30,30,0.85);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  color: #e0e0e0;
  border-color: rgba(255,255,255,0.1);
}

body.dark-mode .hero {
  background: #1a1a2e;
}

body.dark-mode .hero h1 {
  color: #e0e0e0;
}

body.dark-mode .hero p {
  color: #bbb;
}

body.dark-mode .section h2 {
  color: #e0e0e0;
}

body.dark-mode .section h3 {
  color: #90caf9;
}

body.dark-mode .section h4 {
  color: #90caf9;
}

body.dark-mode .faq-question {
  color: #90caf9;
}

body.dark-mode .footer {
  background: #0d0d0d;
}

body.dark-mode .banner-slide {
  background: linear-gradient(135deg, #0d1b2a 0%, #1b2838 100%);
}

body.dark-mode .back-to-top,
body.dark-mode .dark-mode-toggle {
  background: #2a5a8c;
}

/* Animations */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

/* Scroll Animation */
.card, .article-item, .faq-item, .howto {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

.card.visible, .article-item.visible, .faq-item.visible, .howto.visible {
  opacity: 1;
  transform: translateY(0);
}

/* Responsive */
@media (max-width: 768px) {
  nav ul {
    display: none;
    flex-direction: column;
    width: 100%;
    margin-top: 15px;
    background: rgba(26,58,92,0.95);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-radius: 8px;
    padding: 10px;
  }

  nav ul.show {
    display: flex;
  }

  .menu-toggle {
    display: block;
  }

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

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

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

  .banner {
    height: 300px;
  }

  .banner-slide h2 {
    font-size: 1.6rem;
  }

  .banner-slide p {
    font-size: 1rem;
  }

  .section h2 {
    font-size: 1.6rem;
  }

  .back-to-top {
    bottom: 20px;
    right: 20px;
    width: 40px;
    height: 40px;
  }

  .dark-mode-toggle {
    bottom: 20px;
    left: 20px;
    width: 40px;
    height: 40px;
  }
}

@media (max-width: 480px) {
  .container {
    padding: 0 15px;
  }

  .hero {
    padding: 50px 0;
  }

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

  .section {
    padding: 40px 0;
  }

  .grid {
    gap: 20px;
  }

  .card {
    padding: 20px;
  }
}