/* ============================================
   style.css - 今年会金字招牌品牌公司
   版本: 1.0
   最后更新: 2025年1月
   ============================================ */

/* ========== CSS Variables & Reset ========== */
:root {
  --primary: #1a3a5c;
  --primary-light: #2a5a8c;
  --gold: #d4af37;
  --gold-light: #f0d060;
  --gold-dark: #b8962e;
  --bg: #ffffff;
  --bg-alt: #f5f8ff;
  --bg-dark: #0f1e2f;
  --text: #333333;
  --text-light: #555555;
  --text-muted: #888888;
  --border: #e0e0e0;
  --shadow: 0 4px 20px rgba(26, 58, 92, 0.08);
  --shadow-hover: 0 8px 30px rgba(26, 58, 92, 0.15);
  --radius: 12px;
  --radius-sm: 8px;
  --radius-lg: 30px;
  --transition: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  --font-family: 'PingFang SC', 'Microsoft YaHei', 'Helvetica Neue', Arial, sans-serif;
  --max-width: 1200px;
  --header-height: 70px;
}

/* Dark mode variables */
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #121e2d;
    --bg-alt: #1a2a3e;
    --text: #e0e0e0;
    --text-light: #b0b0b0;
    --text-muted: #888888;
    --border: #2a3a4e;
    --shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
    --shadow-hover: 0 8px 30px rgba(0, 0, 0, 0.4);
  }
}

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

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

body {
  font-family: var(--font-family);
  background-color: var(--bg);
  color: var(--text);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
  transition: background-color 0.3s, color 0.3s;
}

img, svg {
  max-width: 100%;
  height: auto;
  display: block;
}

a {
  color: inherit;
  text-decoration: none;
  transition: color var(--transition);
}

a:hover {
  color: var(--gold);
}

ul, ol {
  list-style: none;
}

/* ========== Scrollbar ========== */
::-webkit-scrollbar {
  width: 8px;
}

::-webkit-scrollbar-track {
  background: var(--bg);
}

::-webkit-scrollbar-thumb {
  background: var(--primary-light);
  border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
  background: var(--gold);
}

/* ========== Selection ========== */
::selection {
  background: var(--gold);
  color: var(--primary);
}

/* ========== Header / Navigation ========== */
#header {
  background: var(--primary) !important;
  color: #fff !important;
  position: sticky;
  top: 0;
  z-index: 1000;
  box-shadow: 0 2px 20px rgba(0, 0, 0, 0.15);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  transition: background 0.3s, box-shadow 0.3s;
}

#header nav {
  max-width: var(--max-width);
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0 20px;
  min-height: var(--header-height);
}

#header nav svg {
  flex-shrink: 0;
}

#header nav ul {
  display: flex;
  gap: 25px;
  align-items: center;
}

#header nav ul li a {
  color: #fff !important;
  font-size: 15px;
  font-weight: 500;
  padding: 8px 0;
  position: relative;
  transition: color var(--transition), transform var(--transition);
}

#header nav ul li a::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 0;
  height: 2px;
  background: var(--gold);
  transition: width var(--transition);
}

#header nav ul li a:hover {
  color: var(--gold-light) !important;
  transform: translateY(-1px);
}

#header nav ul li a:hover::after {
  width: 100%;
}

/* ========== Breadcrumb ========== */
[aria-label="Breadcrumb"] {
  padding: 12px 0;
  font-size: 14px;
  color: var(--text-muted);
  animation: fadeInUp 0.5s ease;
}

[aria-label="Breadcrumb"] ol {
  display: flex;
  gap: 5px;
  flex-wrap: wrap;
}

[aria-label="Breadcrumb"] a {
  color: var(--primary);
  font-weight: 500;
}

[aria-label="Breadcrumb"] a:hover {
  color: var(--gold);
}

[aria-label="Breadcrumb"] [aria-current="page"] {
  color: var(--text-muted);
  font-weight: normal;
}

/* ========== Hero Section ========== */
#home {
  background: linear-gradient(135deg, var(--primary), var(--primary-light)) !important;
  color: #fff !important;
  padding: 60px 40px;
  border-radius: var(--radius);
  margin-bottom: 40px;
  text-align: center;
  position: relative;
  overflow: hidden;
  animation: fadeInUp 0.6s ease;
  box-shadow: 0 8px 40px rgba(26, 58, 92, 0.2);
}

#home::before {
  content: '';
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: radial-gradient(circle at 30% 50%, rgba(212, 175, 55, 0.08) 0%, transparent 60%);
  animation: shimmer 8s infinite linear;
}

@keyframes shimmer {
  0% { transform: translate(0, 0); }
  100% { transform: translate(20%, 20%); }
}

#home h1 {
  font-size: 42px;
  margin: 0 0 20px;
  color: var(--gold) !important;
  text-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
  letter-spacing: 2px;
  animation: fadeInUp 0.8s ease;
}

#home p {
  font-size: 20px;
  line-height: 1.6;
  max-width: 800px;
  margin: 0 auto 30px;
  opacity: 0.95;
  animation: fadeInUp 1s ease;
}

#home a {
  display: inline-block;
  background: var(--gold) !important;
  color: var(--primary) !important;
  padding: 14px 40px;
  border-radius: var(--radius-lg);
  font-weight: bold;
  font-size: 18px;
  text-decoration: none;
  transition: all var(--transition);
  box-shadow: 0 4px 15px rgba(212, 175, 55, 0.3);
  animation: fadeInUp 1.2s ease;
  position: relative;
  overflow: hidden;
}

#home a:hover {
  background: var(--gold-light) !important;
  transform: translateY(-3px) scale(1.02);
  box-shadow: 0 8px 25px rgba(212, 175, 55, 0.4);
}

#home a:active {
  transform: translateY(0) scale(0.98);
}

/* ========== Section Titles ========== */
section h2 {
  color: var(--primary);
  border-bottom: 3px solid var(--gold);
  padding-bottom: 10px;
  margin-bottom: 20px;
  font-size: 28px;
  position: relative;
  display: inline-block;
}

section h2::after {
  content: '';
  position: absolute;
  bottom: -3px;
  left: 0;
  width: 60px;
  height: 3px;
  background: var(--gold-light);
}

/* ========== About Section ========== */
#about {
  margin-bottom: 50px;
  animation: fadeInUp 0.6s ease;
}

#about > div {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 30px;
  margin-top: 20px;
}

#about h3 {
  color: var(--primary);
  margin-bottom: 10px;
  font-size: 20px;
}

#about p {
  font-size: 16px;
  line-height: 1.8;
  color: var(--text-light);
}

/* ========== Products Section ========== */
#products {
  margin-bottom: 50px;
  animation: fadeInUp 0.6s ease;
}

#products > div {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 25px;
  margin-top: 20px;
}

#products > div > div {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 25px;
  text-align: center;
  transition: all var(--transition);
  cursor: default;
  position: relative;
  overflow: hidden;
  backdrop-filter: blur(5px);
  -webkit-backdrop-filter: blur(5px);
}

#products > div > div::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 4px;
  background: linear-gradient(90deg, var(--gold), var(--gold-light));
  transform: scaleX(0);
  transform-origin: left;
  transition: transform var(--transition);
}

#products > div > div:hover {
  transform: translateY(-8px);
  box-shadow: var(--shadow-hover);
  border-color: var(--gold);
}

#products > div > div:hover::before {
  transform: scaleX(1);
}

#products > div > div svg {
  margin-bottom: 15px;
  transition: transform var(--transition);
}

#products > div > div:hover svg {
  transform: scale(1.1) rotate(-5deg);
}

#products h3 {
  color: var(--primary);
  font-size: 18px;
  margin-bottom: 10px;
}

#products p {
  font-size: 15px;
  line-height: 1.7;
  color: var(--text-light);
}

/* ========== Solutions Section ========== */
#solutions {
  margin-bottom: 50px;
  animation: fadeInUp 0.6s ease;
}

#solutions h3 {
  color: var(--primary);
  margin: 20px 0 10px;
  font-size: 20px;
}

#solutions p {
  font-size: 16px;
  line-height: 1.8;
  color: var(--text-light);
}

#solutions > div > div {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
  margin-top: 10px;
}

#solutions > div > div > div {
  background: var(--bg-alt);
  padding: 20px;
  border-radius: var(--radius-sm);
  transition: all var(--transition);
  border: 1px solid transparent;
}

#solutions > div > div > div:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow);
  border-color: var(--gold);
  background: var(--bg);
}

#solutions h4 {
  color: var(--primary);
  margin-bottom: 8px;
  font-size: 17px;
}

/* ========== Cases Section ========== */
#cases {
  margin-bottom: 50px;
  animation: fadeInUp 0.6s ease;
}

#cases > div {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 30px;
  margin-top: 20px;
}

#cases h3 {
  color: var(--primary);
  margin-bottom: 15px;
  font-size: 20px;
}

#cases > div > div > div {
  border: 1px solid var(--border);
  padding: 20px;
  border-radius: var(--radius-sm);
  margin-bottom: 15px;
  transition: all var(--transition);
  background: var(--bg);
}

#cases > div > div > div:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-hover);
  border-color: var(--gold);
}

#cases h4 {
  color: var(--primary);
  margin-bottom: 8px;
  font-size: 17px;
}

#cases p {
  font-size: 15px;
  color: var(--text-light);
  font-style: italic;
}

/* ========== Articles Section ========== */
#articles {
  margin-bottom: 50px;
  animation: fadeInUp 0.6s ease;
}

#articles > div {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 20px;
  margin-top: 20px;
}

#articles article {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 20px;
  transition: all var(--transition);
  position: relative;
  overflow: hidden;
}

#articles article::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 3px;
  background: linear-gradient(90deg, var(--gold), var(--gold-light));
  transform: translateX(-100%);
  transition: transform 0.5s ease;
}

#articles article:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow-hover);
  border-color: var(--gold);
}

#articles article:hover::after {
  transform: translateX(0);
}

#articles h3 {
  font-size: 18px;
  color: var(--primary);
  margin-bottom: 8px;
  line-height: 1.4;
}

#articles time {
  font-size: 13px;
  color: var(--text-muted);
  display: block;
  margin-bottom: 10px;
}

#articles p {
  font-size: 15px;
  color: var(--text-light);
  line-height: 1.6;
  margin-bottom: 10px;
}

#articles a {
  color: var(--gold);
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  transition: gap var(--transition);
}

#articles a:hover {
  gap: 10px;
  color: var(--gold-dark);
}

/* ========== FAQ Section ========== */
#faq {
  margin-bottom: 50px;
  animation: fadeInUp 0.6s ease;
}

#faq > div {
  margin-top: 20px;
}

#faq details {
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 15px;
  margin-bottom: 10px;
  transition: all var(--transition);
  background: var(--bg);
}

#faq details:hover {
  border-color: var(--gold);
  box-shadow: var(--shadow);
}

#faq details[open] {
  border-color: var(--gold);
  box-shadow: var(--shadow);
}

#faq summary {
  font-weight: bold;
  color: var(--primary);
  cursor: pointer;
  font-size: 16px;
  padding: 5px 0;
  transition: color var(--transition);
  list-style: none;
  display: flex;
  align-items: center;
  gap: 10px;
}

#faq summary::-webkit-details-marker {
  display: none;
}

#faq summary::before {
  content: '▶';
  font-size: 12px;
  color: var(--gold);
  transition: transform var(--transition);
}

#faq details[open] summary::before {
  transform: rotate(90deg);
}

#faq summary:hover {
  color: var(--gold);
}

#faq p {
  font-size: 15px;
  color: var(--text-light);
  margin-top: 10px;
  line-height: 1.7;
  padding-left: 22px;
}

/* ========== HowTo Section ========== */
#howto {
  margin-bottom: 50px;
  animation: fadeInUp 0.6s ease;
}

#howto > div {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 25px;
  background: var(--bg);
  transition: box-shadow var(--transition);
}

#howto > div:hover {
  box-shadow: var(--shadow);
}

#howto h3 {
  color: var(--primary);
  font-size: 18px;
  margin: 15px 0 8px;
}

#howto h3:first-child {
  margin-top: 0;
}

#howto p {
  font-size: 15px;
  color: var(--text-light);
  line-height: 1.7;
}

#howto ul, #howto ol {
  font-size: 15px;
  color: var(--text-light);
  line-height: 1.8;
  padding-left: 20px;
}

#howto li {
  margin-bottom: 4px;
}

#howto ul li::marker {
  color: var(--gold);
}

#howto ol li::marker {
  color: var(--gold);
  font-weight: bold;
}

/* ========== Contact Section ========== */
#contact {
  margin-bottom: 50px;
  background: var(--bg-alt) !important;
  padding: 30px;
  border-radius: var(--radius);
  animation: fadeInUp 0.6s ease;
}

#contact > div {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 30px;
  margin-top: 20px;
}

#contact h3 {
  color: var(--primary);
  margin-bottom: 12px;
  font-size: 20px;
}

#contact p {
  font-size: 15px;
  color: var(--text-light);
  line-height: 2;
}

#contact strong {
  color: var(--primary);
}

/* ========== Footer ========== */
footer {
  background: var(--primary) !important;
  color: #fff !important;
  padding: 40px 20px;
  border-radius: var(--radius);
  margin-top: 20px;
  animation: fadeInUp 0.6s ease;
}

footer > div:first-child {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 30px;
}

footer h4 {
  color: var(--gold) !important;
  margin-bottom: 15px;
  font-size: 16px;
  position: relative;
  padding-bottom: 8px;
}

footer h4::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 30px;
  height: 2px;
  background: var(--gold-light);
}

footer ul {
  list-style: none;
  padding: 0;
  font-size: 14px;
}

footer ul li {
  margin-bottom: 8px;
}

footer ul li a {
  color: #fff !important;
  text-decoration: none;
  transition: all var(--transition);
  display: inline-block;
}

footer ul li a:hover {
  color: var(--gold-light) !important;
  transform: translateX(4px);
}

footer p {
  font-size: 14px;
  color: #ccc;
  line-height: 1.8;
}

footer > div:last-child {
  text-align: center;
  margin-top: 30px;
  border-top: 1px solid var(--primary-light);
  padding-top: 20px;
  font-size: 13px;
  color: #aaa;
}

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

/* Stagger animation for cards */
#products > div > div:nth-child(1) { animation: fadeInUp 0.5s ease 0.1s both; }
#products > div > div:nth-child(2) { animation: fadeInUp 0.5s ease 0.2s both; }
#products > div > div:nth-child(3) { animation: fadeInUp 0.5s ease 0.3s both; }
#products > div > div:nth-child(4) { animation: fadeInUp 0.5s ease 0.4s both; }

#articles article:nth-child(1) { animation: fadeInUp 0.5s ease 0.05s both; }
#articles article:nth-child(2) { animation: fadeInUp 0.5s ease 0.1s both; }
#articles article:nth-child(3) { animation: fadeInUp 0.5s ease 0.15s both; }
#articles article:nth-child(4) { animation: fadeInUp 0.5s ease 0.2s both; }
#articles article:nth-child(5) { animation: fadeInUp 0.5s ease 0.25s both; }
#articles article:nth-child(6) { animation: fadeInUp 0.5s ease 0.3s both; }
#articles article:nth-child(7) { animation: fadeInUp 0.5s ease 0.35s both; }
#articles article:nth-child(8) { animation: fadeInUp 0.5s ease 0.4s both; }
#articles article:nth-child(9) { animation: fadeInUp 0.5s ease 0.45s both; }
#articles article:nth-child(10) { animation: fadeInUp 0.5s ease 0.5s both; }

/* ========== Scroll-Triggered Animations (via Intersection Observer - CSS only fallback) ========== */
@media (prefers-reduced-motion: no-preference) {
  section {
    opacity: 0;
    animation: fadeInUp 0.6s ease forwards;
  }

  section:nth-child(2) { animation-delay: 0.1s; }
  section:nth-child(3) { animation-delay: 0.2s; }
  section:nth-child(4) { animation-delay: 0.3s; }
  section:nth-child(5) { animation-delay: 0.4s; }
  section:nth-child(6) { animation-delay: 0.5s; }
  section:nth-child(7) { animation-delay: 0.6s; }
  section:nth-child(8) { animation-delay: 0.7s; }
  section:nth-child(9) { animation-delay: 0.8s; }
  section:nth-child(10) { animation-delay: 0.9s; }
}

/* ========== Responsive Design ========== */
@media (max-width: 1024px) {
  #about > div,
  #cases > div,
  #contact > div {
    grid-template-columns: 1fr;
  }

  #solutions > div > div {
    grid-template-columns: 1fr;
  }

  #home h1 {
    font-size: 36px;
  }

  #home p {
    font-size: 18px;
  }
}

@media (max-width: 768px) {
  :root {
    --header-height: 60px;
  }

  #header nav {
    flex-direction: column;
    padding: 10px 15px;
    min-height: auto;
  }

  #header nav ul {
    flex-wrap: wrap;
    justify-content: center;
    gap: 12px;
    margin-top: 10px;
  }

  #header nav ul li a {
    font-size: 14px;
    padding: 5px 8px;
  }

  #header nav svg {
    width: 140px;
    height: 40px;
  }

  #home {
    padding: 40px 20px;
  }

  #home h1 {
    font-size: 28px;
  }

  #home p {
    font-size: 16px;
  }

  #home a {
    padding: 12px 30px;
    font-size: 16px;
  }

  section h2 {
    font-size: 24px;
  }

  #about > div {
    gap: 20px;
  }

  #products > div {
    grid-template-columns: 1fr;
  }

  #articles > div {
    grid-template-columns: 1fr;
  }

  #contact {
    padding: 20px;
  }

  footer {
    padding: 30px 15px;
  }

  footer > div:first-child {
    grid-template-columns: 1fr 1fr;
    gap: 20px;
  }

  #solutions > div > div {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 480px) {
  #header nav ul {
    gap: 8px;
  }

  #header nav ul li a {
    font-size: 13px;
    padding: 4px 6px;
  }

  #home h1 {
    font-size: 24px;
  }

  #home p {
    font-size: 15px;
  }

  section h2 {
    font-size: 20px;
  }

  footer > div:first-child {
    grid-template-columns: 1fr;
    text-align: center;
  }

  footer h4::after {
    left: 50%;
    transform: translateX(-50%);
  }

  #faq details {
    padding: 12px;
  }

  #faq summary {
    font-size: 15px;
  }

  #howto > div {
    padding: 15px;
  }
}

/* ========== Print Styles ========== */
@media print {
  #header {
    position: static;
    box-shadow: none;
  }

  #home {
    background: #1a3a5c !important;
    color: #fff !important;
    page-break-inside: avoid;
  }

  section {
    page-break-inside: avoid;
    opacity: 1 !important;
    animation: none !important;
  }

  footer {
    page-break-inside: avoid;
  }

  a[href]::after {
    content: " (" attr(href) ")";
    font-size: 0.8em;
    color: #666;
  }
}

/* ========== Accessibility ========== */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }

  html {
    scroll-behavior: auto;
  }
}

:focus-visible {
  outline: 2px solid var(--gold);
  outline-offset: 2px;
}

/* ========== Utility ========== */
main {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 20px;
}

/* Glassmorphism effect for cards */
#products > div > div,
#cases > div > div > div,
#howto > div,
#contact {
  background: rgba(255, 255, 255, 0.7);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}

@media (prefers-color-scheme: dark) {
  #products > div > div,
  #cases > div > div > div,
  #howto > div,
  #contact {
    background: rgba(26, 42, 62, 0.8);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
  }
}