﻿/* assets/css/style.css */

/* ===== RESET ===== */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: "Inter", Arial, sans-serif;
  color: #0f172a;
  background: #f8fafc;
  line-height: 1.6;
}

/* ===== CONTAINER ===== */
.container {
  width: 90%;
  max-width: 1200px;
  margin: auto;
}

/* ===== HEADER ===== */
header {
  background: rgba(15, 23, 42, 0.9);
  backdrop-filter: blur(10px);
  color: #fff;
  position: sticky;
  top: 0;
  z-index: 999;
}

.navbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 15px 0;
}

.logo {
  font-weight: bold;
  font-size: 18px;
}

/* ===== NAV ===== */
.nav-menu {
  display: flex;
  list-style: none;
  gap: 20px;
}

.nav-menu li a {
  color: #fff;
  text-decoration: none;
  font-size: 14px;
  position: relative;
  transition: 0.3s;
}

.nav-menu li a::after {
  content: "";
  position: absolute;
  bottom: -5px;
  left: 0;
  width: 0%;
  height: 2px;
  background: #22c55e;
  transition: 0.3s;
}

.nav-menu li a:hover::after,
.nav-menu li a.active::after {
  width: 100%;
}

/* ===== MOBILE ===== */
.menu-toggle {
  display: none;
  font-size: 24px;
  cursor: pointer;
}

/* ===== HERO ===== */
.hero {
  position: relative;
  color: #fff;
  padding: 120px 0;
  overflow: hidden;
}

.hero::before {
  content: "";
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: url("../img/dial-hero.jpg") no-repeat center/cover;
  animation: slideBg 1.2s ease forwards;
}

.hero::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(15,23,42,0.9), rgba(34,197,94,0.4));
}

.hero .container {
  position: relative;
  z-index: 2;
}

@keyframes slideBg {
  to { left: 0; }
}

.hero h1 {
  font-size: 42px;
  margin-bottom: 15px;
}

.hero p {
  margin-bottom: 25px;
  opacity: 0.9;
}

/* ===== BUTTON ===== */
.btn {
  display: inline-block;
  padding: 12px 22px;
  background: linear-gradient(90deg, #22c55e, #4ade80);
  color: #fff;
  border-radius: 6px;
  text-decoration: none;
  transition: 0.3s;
}

.btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 25px rgba(34,197,94,0.4);
}

/* ===== SECTION ===== */
.section {
  padding: 80px 0;
}

.section h2 {
  margin-bottom: 30px;
  font-size: 28px;
}

/* ===== GRID ===== */
.grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 25px;
}

/* ===== CARD（高级感）===== */
.card {
  background: rgba(255,255,255,0.7);
  backdrop-filter: blur(8px);
  padding: 25px;
  border-radius: 12px;
  transition: 0.4s;
  border: 1px solid rgba(0,0,0,0.05);
}

.card:hover {
  transform: translateY(-8px);
  box-shadow: 0 20px 40px rgba(0,0,0,0.08);
}

/* ===== IMAGE ===== */
.image-box {
  width: 100%;
  aspect-ratio: 16 / 9;   /* ⭐推荐 */
  overflow: hidden;
  border-radius: 12px;
}

.image-box img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
/* ===== TABLE ===== */
.table {
  width: 100%;
  border-collapse: collapse;
  background: #fff;
  border-radius: 10px;
  overflow: hidden;
}

.table td {
  padding: 12px;
  border-bottom: 1px solid #eee;
}

/* ===== FOOTER ===== */
footer {
  background: #0f172a;
  color: #fff;
  padding: 50px 0;
}

.footer-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
}

footer a {
  color: #cbd5f5;
  text-decoration: none;
  font-size: 14px;
}

footer a:hover {
  color: #22c55e;
}

/* ===== ANIMATION ===== */
.fade-in {
  opacity: 0;
  transform: translateY(40px);
  transition: all 0.8s ease;
}

.fade-in.show {
  opacity: 1;
  transform: translateY(0);
}

/* ===== RESPONSIVE ===== */
@media (max-width: 768px) {
  .nav-menu {
    display: none;
    flex-direction: column;
    background: #0f172a;
    position: absolute;
    top: 60px;
    right: 0;
    width: 100%;
  }

  .nav-menu.active {
    display: flex;
  }

  .menu-toggle {
    display: block;
  }

  .grid {
    grid-template-columns: 1fr;
  }

  .footer-grid {
    grid-template-columns: 1fr;
  }
}
