/**
 * SZRSzon Enterprise - Additional Custom CSS
 * Extends the main style.css with extra styling
 */

/* ============================================================
   Navigation Fix — Override WordPress / Block Editor defaults
   ============================================================ */

/* 强制清除 WordPress 默认给 ul/li 的间距和列表符号 */
#site-header ul,
#site-header ol,
#site-header li,
.site-nav ul,
.site-nav li,
.mobile-menu ul,
.mobile-menu li {
  list-style: none !important;
  margin: 0 !important;
  padding: 0 !important;
}

/* 修复主导航菜单布局 */
.header-inner {
  position: relative;
}

.site-nav {
  position: static !important;
}

/* 确保子菜单相对于正确的父元素定位 */
.site-nav .menu-item {
  position: relative;
}

/* 响应式菜单修复 */
@media (max-width: 768px) {
  .header-inner {
    flex-wrap: wrap;
  }
  
  .site-nav {
    order: 3;
    width: 100%;
    top: 100% !important;
  }
  
  .site-nav:not(.active) {
    display: none;
  }
  
  .site-nav .menu {
    flex-direction: column;
  }
  
  .site-nav .menu-item {
    width: 100%;
  }
  
  .site-nav .menu-item > a {
    padding: 1rem 2rem;
    justify-content: space-between;
  }
  
  .site-nav .sub-menu {
    position: static;
    opacity: 1;
    visibility: visible;
    transform: none;
    box-shadow: inset 0 2px 4px rgba(0,0,0,0.05);
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease;
  }
  
  .site-nav .sub-menu.active {
    max-height: 500px;
  }
}

/* ============================================================
   Custom Scrollbar
   ============================================================ */
::-webkit-scrollbar {
  width: 6px;
  height: 6px;
}

::-webkit-scrollbar-track {
  background: var(--bg-secondary);
}

::-webkit-scrollbar-thumb {
  background: linear-gradient(var(--color-highlight), var(--color-gold));
  border-radius: 3px;
}

::-webkit-scrollbar-thumb:hover {
  background: var(--color-highlight);
}

/* ============================================================
   Text Selection
   ============================================================ */
::selection {
  background: rgba(233, 69, 96, 0.2);
  color: var(--text-primary);
}

/* ============================================================
   Focus Styles (Accessibility)
   ============================================================ */
:focus-visible {
  outline: 2px solid var(--color-highlight);
  outline-offset: 3px;
  border-radius: 4px;
}

/* ============================================================
   Skip to Content
   ============================================================ */
.skip-link {
  position: fixed;
  top: -100px;
  left: var(--space-xl);
  background: var(--color-primary);
  color: #ffffff;
  padding: 0.75rem 1.5rem;
  border-radius: 0 0 var(--radius-md) var(--radius-md);
  font-weight: 600;
  z-index: 9999;
  transition: top 0.2s;
}

.skip-link:focus {
  top: 0;
}

/* ============================================================
   Animations on Cards
   ============================================================ */
.service-card,
.product-card,
.team-card,
.testimonial-card,
.stat-card {
  will-change: transform;
}

/* ============================================================
   Section Dividers
   ============================================================ */
.section-divider {
  width: 60px;
  height: 4px;
  background: linear-gradient(90deg, var(--color-highlight), var(--color-gold));
  border-radius: var(--radius-full);
  margin: var(--space-md) auto;
}

/* ============================================================
   Gradient Text (Additional)
   ============================================================ */
.text-gradient-gold {
  background: linear-gradient(135deg, var(--color-gold), #e8c84a);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* ============================================================
   Glass Effect
   ============================================================ */
.glass {
  background: rgba(255, 255, 255, 0.06);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid rgba(255, 255, 255, 0.1);
}

[data-theme="dark"] .glass {
  background: rgba(13, 13, 26, 0.6);
}

/* ============================================================
   Highlighted Sections
   ============================================================ */
.highlight-box {
  background: linear-gradient(135deg, rgba(233, 69, 96, 0.06), rgba(201, 162, 39, 0.04));
  border: 1px solid rgba(233, 69, 96, 0.15);
  border-radius: var(--radius-xl);
  padding: var(--space-2xl);
}

/* ============================================================
   Tags & Badges
   ============================================================ */
.badge {
  display: inline-flex;
  align-items: center;
  gap: var(--space-xs);
  padding: 4px 12px;
  border-radius: var(--radius-full);
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.05em;
}

.badge-primary {
  background: rgba(233, 69, 96, 0.1);
  color: var(--color-highlight);
  border: 1px solid rgba(233, 69, 96, 0.2);
}

.badge-gold {
  background: rgba(201, 162, 39, 0.1);
  color: var(--color-gold);
  border: 1px solid rgba(201, 162, 39, 0.2);
}

.badge-success {
  background: rgba(16, 185, 129, 0.1);
  color: #10b981;
  border: 1px solid rgba(16, 185, 129, 0.2);
}

/* ============================================================
   Image Hover Zoom
   ============================================================ */
.img-zoom {
  overflow: hidden;
  border-radius: var(--radius-lg);
}

.img-zoom img {
  transition: transform 0.5s ease;
}

.img-zoom:hover img {
  transform: scale(1.05);
}

/* ============================================================
   Decorative Elements
   ============================================================ */
.dot-pattern {
  background-image: radial-gradient(var(--border-color) 1px, transparent 1px);
  background-size: 24px 24px;
}

.line-pattern {
  background-image: repeating-linear-gradient(
    -45deg,
    transparent,
    transparent 8px,
    rgba(233, 69, 96, 0.04) 8px,
    rgba(233, 69, 96, 0.04) 9px
  );
}

/* ============================================================
   Floating Labels for Forms
   ============================================================ */
.form-floating {
  position: relative;
}

.form-floating .form-input,
.form-floating .form-textarea {
  padding-top: 1.5rem;
  padding-bottom: 0.5rem;
}

.form-floating .form-label {
  position: absolute;
  top: 1rem;
  left: var(--space-md);
  transition: all 0.2s ease;
  pointer-events: none;
  font-size: 0.9rem;
  color: var(--text-muted);
}

.form-floating .form-input:focus ~ .form-label,
.form-floating .form-input:not(:placeholder-shown) ~ .form-label,
.form-floating .form-textarea:focus ~ .form-label,
.form-floating .form-textarea:not(:placeholder-shown) ~ .form-label {
  top: 0.35rem;
  font-size: 0.7rem;
  color: var(--color-highlight);
}

/* ============================================================
   Timeline Component
   ============================================================ */
.timeline {
  position: relative;
  padding-left: 2rem;
}

.timeline::before {
  content: '';
  position: absolute;
  left: 0;
  top: 8px;
  bottom: 8px;
  width: 2px;
  background: linear-gradient(to bottom, var(--color-highlight), var(--color-gold), transparent);
}

.timeline-item {
  position: relative;
  padding-bottom: var(--space-2xl);
}

.timeline-item::before {
  content: '';
  position: absolute;
  left: -2.5rem;
  top: 6px;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--color-highlight);
  border: 3px solid var(--bg-primary);
  box-shadow: 0 0 0 2px var(--color-highlight);
}

.timeline-date {
  font-size: 0.8rem;
  color: var(--color-highlight);
  font-weight: 600;
  letter-spacing: 0.05em;
  margin-bottom: var(--space-xs);
}

.timeline-title {
  font-size: 1rem;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: var(--space-sm);
}

.timeline-desc {
  font-size: 0.875rem;
  color: var(--text-secondary);
  line-height: 1.7;
}

/* ============================================================
   Accordion / FAQ
   ============================================================ */
.accordion-item {
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  overflow: hidden;
  margin-bottom: var(--space-md);
  transition: border-color var(--transition-base);
}

.accordion-item.open {
  border-color: var(--color-highlight);
}

.accordion-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: var(--space-xl);
  cursor: pointer;
  background: var(--card-bg);
  user-select: none;
  gap: var(--space-md);
}

.accordion-title {
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--text-primary);
}

.accordion-icon {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--bg-secondary);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  font-size: 0.8rem;
  color: var(--text-muted);
  transition: all var(--transition-base);
}

.accordion-item.open .accordion-icon {
  background: var(--color-highlight);
  color: #ffffff;
  transform: rotate(45deg);
}

.accordion-body {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.35s cubic-bezier(0.4, 0, 0.2, 1);
}

.accordion-item.open .accordion-body {
  max-height: 500px;
}

.accordion-content {
  padding: 0 var(--space-xl) var(--space-xl);
  font-size: 0.9rem;
  color: var(--text-secondary);
  line-height: 1.8;
}

/* ============================================================
   Alert / Notice Boxes
   ============================================================ */
.alert {
  display: flex;
  align-items: flex-start;
  gap: var(--space-md);
  padding: var(--space-lg);
  border-radius: var(--radius-md);
  font-size: 0.9rem;
  line-height: 1.6;
}

.alert-info {
  background: rgba(59, 130, 246, 0.08);
  border: 1px solid rgba(59, 130, 246, 0.2);
  color: #2563eb;
}

.alert-success {
  background: rgba(16, 185, 129, 0.08);
  border: 1px solid rgba(16, 185, 129, 0.2);
  color: #059669;
}

.alert-warning {
  background: rgba(245, 158, 11, 0.08);
  border: 1px solid rgba(245, 158, 11, 0.2);
  color: #d97706;
}

.alert-danger {
  background: rgba(239, 68, 68, 0.08);
  border: 1px solid rgba(239, 68, 68, 0.2);
  color: #dc2626;
}

/* ============================================================
   Tooltip
   ============================================================ */
[data-tooltip] {
  position: relative;
}

[data-tooltip]::after {
  content: attr(data-tooltip);
  position: absolute;
  bottom: calc(100% + 8px);
  left: 50%;
  transform: translateX(-50%);
  background: var(--color-primary);
  color: #ffffff;
  padding: 6px 12px;
  border-radius: var(--radius-md);
  font-size: 0.75rem;
  white-space: nowrap;
  opacity: 0;
  visibility: hidden;
  transition: all var(--transition-fast);
  pointer-events: none;
  z-index: var(--z-dropdown);
}

[data-tooltip]:hover::after {
  opacity: 1;
  visibility: visible;
}

/* ============================================================
   Print Preview
   ============================================================ */
@media print {
  .btn, nav, #site-header, footer, #back-to-top,
  .dark-mode-toggle, #cookie-banner, #page-loader {
    display: none !important;
  }

  body {
    font-size: 12pt;
    color: #000;
  }

  h1, h2, h3 {
    page-break-after: avoid;
  }

  img {
    max-width: 100% !important;
    page-break-inside: avoid;
  }
}

/* ============================================================
   Reduced Motion
   ============================================================ */
@media (prefers-reduced-motion: reduce) {
  *, ::before, ::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }

  .reveal, .reveal-left, .reveal-right, .reveal-scale {
    opacity: 1 !important;
    transform: none !important;
  }

  #cursor-dot, #cursor-ring {
    display: none !important;
  }
}

/* ============================================================
   High Contrast Mode
   ============================================================ */
@media (forced-colors: active) {
  .btn {
    border: 2px solid ButtonText;
  }

  .service-card, .product-card, .team-card {
    border: 1px solid ButtonText;
  }
}

/* ============================================================
   Floating Contact Buttons
   ============================================================ */
.floating-contact {
  position: fixed;
  right: 1.5rem;
  bottom: 5rem;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  z-index: var(--z-sticky);
}

.floating-btn {
  position: relative;
  width: 50px;
  height: 50px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
  color: #ffffff;
  box-shadow: 0 4px 20px rgba(0,0,0,0.2);
  transition: all var(--transition-spring);
  cursor: pointer;
  text-decoration: none;
}

.floating-btn:hover {
  transform: scale(1.15) translateX(-5px);
  color: #ffffff;
}

.floating-phone {
  background: linear-gradient(135deg, var(--color-highlight), #c73652);
}

.floating-wechat {
  background: linear-gradient(135deg, #07c160, #06ad56);
}

.floating-btn-tooltip {
  position: absolute;
  right: calc(100% + 12px);
  top: 50%;
  transform: translateY(-50%);
  background: var(--color-primary);
  color: #ffffff;
  padding: 6px 14px;
  border-radius: var(--radius-md);
  font-size: 0.8rem;
  white-space: nowrap;
  opacity: 0;
  pointer-events: none;
  transition: opacity var(--transition-fast);
}

.floating-btn:hover .floating-btn-tooltip {
  opacity: 1;
}

/* ============================================================
   Author Box
   ============================================================ */
.author-box {
  display: flex;
  gap: 1.5rem;
  align-items: flex-start;
  background: var(--card-bg);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-xl);
  padding: 2rem;
  margin: 3rem 0;
}

.author-avatar img {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  object-fit: cover;
  flex-shrink: 0;
  border: 3px solid var(--border-color);
}

.author-name {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 0.5rem;
}

.author-bio {
  font-size: 0.875rem;
  color: var(--text-secondary);
  line-height: 1.7;
  margin-bottom: 1rem;
}

.author-links {
  display: flex;
  gap: 1rem;
}

.author-links a {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--color-highlight);
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

.author-links a:hover {
  color: var(--color-gold);
}

/* ============================================================
   Related Posts
   ============================================================ */
.related-posts {
  background: var(--bg-secondary);
}

.related-posts-title {
  font-size: 1.35rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 1.5rem;
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.related-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
}

.related-card {
  background: var(--card-bg);
  border-radius: var(--radius-lg);
  overflow: hidden;
  border: 1px solid var(--border-color);
  transition: all var(--transition-base);
}

.related-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
}

.related-thumb {
  display: block;
  aspect-ratio: 16/9;
  overflow: hidden;
}

.related-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.4s ease;
}

.related-card:hover .related-thumb img {
  transform: scale(1.06);
}

.related-info {
  padding: 1rem;
}

.related-meta {
  font-size: 0.75rem;
  color: var(--text-muted);
  margin-bottom: 0.5rem;
}

.related-info h4 {
  font-size: 0.9rem;
  font-weight: 600;
  line-height: 1.4;
}

.related-info h4 a {
  color: var(--text-primary);
  transition: color var(--transition-fast);
}

.related-info h4 a:hover {
  color: var(--color-highlight);
}

/* ============================================================
   Pagination
   ============================================================ */
.pagination {
  margin: 3rem 0;
  display: flex;
  justify-content: center;
}

.pagination .page-numbers {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.pagination .page-numbers li a,
.pagination .page-numbers li span {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 42px;
  height: 42px;
  border-radius: var(--radius-md);
  font-size: 0.9rem;
  font-weight: 500;
  border: 1px solid var(--border-color);
  color: var(--text-secondary);
  background: var(--card-bg);
  transition: all var(--transition-fast);
}

.pagination .page-numbers li a:hover {
  background: var(--color-highlight);
  border-color: var(--color-highlight);
  color: #ffffff;
}

.pagination .page-numbers li span.current {
  background: var(--color-highlight);
  border-color: var(--color-highlight);
  color: #ffffff;
}

/* ============================================================
   Social Share
   ============================================================ */
.social-share {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  flex-wrap: wrap;
}

.social-share-label {
  font-size: 0.85rem;
  color: var(--text-muted);
  font-weight: 500;
}

.social-share-btn {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  color: var(--text-secondary);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.9rem;
  transition: all var(--transition-base);
}

.social-share-btn:hover {
  background: var(--share-color, var(--color-highlight));
  border-color: var(--share-color, var(--color-highlight));
  color: #ffffff;
  transform: translateY(-3px);
}

/* ============================================================
   Entry Content (Article Body)
   ============================================================ */
.entry-content h1,
.entry-content h2,
.entry-content h3,
.entry-content h4,
.entry-content h5 {
  margin: 2rem 0 1rem;
  color: var(--text-primary);
  font-family: var(--font-heading);
  line-height: 1.4;
}

.entry-content p {
  margin-bottom: 1.25rem;
  color: var(--text-secondary);
  line-height: 1.9;
}

.entry-content ul,
.entry-content ol {
  margin: 1rem 0 1.5rem 1.5rem;
  color: var(--text-secondary);
  line-height: 1.9;
}

.entry-content li {
  list-style: disc;
  margin-bottom: 0.5rem;
}

.entry-content ol li {
  list-style: decimal;
}

.entry-content blockquote {
  border-left: 4px solid var(--color-highlight);
  padding: 1.25rem 1.5rem;
  background: rgba(233, 69, 96, 0.04);
  border-radius: 0 var(--radius-md) var(--radius-md) 0;
  margin: 2rem 0;
  font-style: italic;
  color: var(--text-secondary);
  font-size: 1.05rem;
  line-height: 1.8;
}

.entry-content img {
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-md);
  margin: 1.5rem 0;
}

.entry-content a {
  color: var(--color-highlight);
  text-decoration: underline;
  text-underline-offset: 3px;
}

.entry-content a:hover {
  color: var(--color-gold);
}

.entry-content code {
  background: var(--bg-tertiary);
  padding: 2px 8px;
  border-radius: 4px;
  font-family: var(--font-mono);
  font-size: 0.875em;
  color: var(--color-highlight);
}

.entry-content pre {
  background: var(--color-primary);
  color: #e8e8f0;
  padding: 1.5rem;
  border-radius: var(--radius-lg);
  overflow-x: auto;
  font-family: var(--font-mono);
  font-size: 0.875rem;
  line-height: 1.7;
  margin: 1.5rem 0;
}

.entry-content table {
  width: 100%;
  border-collapse: collapse;
  margin: 1.5rem 0;
  font-size: 0.9rem;
}

.entry-content th {
  background: var(--bg-secondary);
  color: var(--text-primary);
  font-weight: 600;
  padding: 0.75rem 1rem;
  text-align: left;
  border: 1px solid var(--border-color);
}

.entry-content td {
  padding: 0.75rem 1rem;
  border: 1px solid var(--border-color);
  color: var(--text-secondary);
}

.entry-content tr:hover td {
  background: var(--bg-secondary);
}

/* ============================================================
   Post Card (from helpers.php)
   ============================================================ */
.post-card-thumb {
  display: block;
  aspect-ratio: 16/9;
  overflow: hidden;
  position: relative;
}

.post-card-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s ease;
}

.post-card:hover .post-card-thumb img {
  transform: scale(1.06);
}

.post-card-thumb-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(26,26,46,0.4), transparent);
  opacity: 0;
  transition: opacity var(--transition-base);
}

.post-card:hover .post-card-thumb-overlay {
  opacity: 1;
}

.post-card-body {
  padding: 1.5rem;
}

.post-card-meta {
  display: flex;
  align-items: center;
  gap: 1rem;
  flex-wrap: wrap;
  margin-bottom: 0.75rem;
  font-size: 0.8rem;
  color: var(--text-muted);
}

.post-card-cat {
  background: rgba(233, 69, 96, 0.1);
  color: var(--color-highlight);
  padding: 3px 10px;
  border-radius: 999px;
  font-weight: 600;
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.post-card-date,
.post-card-reading {
  display: flex;
  align-items: center;
  gap: 0.35rem;
}

.post-card-title {
  font-size: 1.05rem;
  font-weight: 700;
  margin-bottom: 0.75rem;
  line-height: 1.4;
  color: var(--text-primary);
}

.post-card-title a {
  color: var(--text-primary);
  transition: color var(--transition-fast);
}

.post-card-title a:hover {
  color: var(--color-highlight);
}

.post-card-excerpt {
  font-size: 0.875rem;
  color: var(--text-secondary);
  line-height: 1.7;
  margin-bottom: 1.25rem;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.post-card-link {
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--color-highlight);
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  transition: gap var(--transition-base);
}

.post-card-link:hover {
  gap: 0.875rem;
  color: var(--color-highlight);
}

/* ============================================================
   Responsive (Extra)
   ============================================================ */
@media (max-width: 768px) {
  .related-grid { grid-template-columns: 1fr; }
  .author-box { flex-direction: column; }
  .floating-contact { right: 1rem; bottom: 4.5rem; }
  .social-share { gap: 0.5rem; }
}

/* ============================================================
   Product Filter — CSS-driven animation (replaces JS show/hide)
   ============================================================ */
.product-card {
  transition: opacity 0.3s ease, transform 0.3s ease, max-height 0.4s ease !important;
}

.product-card.filter-hidden {
  opacity: 0 !important;
  transform: scale(0.92) !important;
  pointer-events: none !important;
  /* Collapse card in grid without breaking layout flow */
  overflow: hidden !important;
  max-height: 0 !important;
  margin: 0 !important;
  padding: 0 !important;
  border: 0 !important;
  min-height: 0 !important;
}

.product-card.filter-visible {
  opacity: 1 !important;
  transform: scale(1) !important;
  pointer-events: auto !important;
}

/* ============================================================
   Partner Logo
   ============================================================ */
.partner-logo {
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 1.1rem;
  color: var(--text-primary);
  letter-spacing: 0.05em;
  padding: 0.5rem 1rem;
  border: 1px solid var(--border-color);
  border-radius: 6px;
  transition: all 0.3s ease;
  cursor: default;
}

.partner-logo:hover {
  opacity: 1 !important;
  filter: none !important;
  border-color: var(--color-highlight) !important;
}

/* ============================================================
   Service / Product Card — text overflow protection
   ============================================================ */
.service-title,
.product-title,
.team-name {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.service-desc,
.product-desc,
.team-bio {
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* ============================================================
   Contact Form — form-message enhanced
   ============================================================ */
.form-message {
  padding: 0;
  border-radius: var(--radius-md);
  font-size: 0.9rem;
  line-height: 1.6;
  max-height: 0;
  overflow: hidden;
  transition: all 0.3s ease;
}

.form-message.success,
.form-message.error {
  padding: 0.875rem 1.25rem;
  margin-top: 1rem;
  max-height: 80px;
}

.form-message.success {
  background: rgba(16, 185, 129, 0.08);
  border: 1px solid rgba(16, 185, 129, 0.25);
  color: #059669;
}

.form-message.error {
  background: rgba(239, 68, 68, 0.08);
  border: 1px solid rgba(239, 68, 68, 0.25);
  color: #dc2626;
}

/* ============================================================
   Footer newsletter form — tighter layout
   ============================================================ */
.footer-newsletter {
  display: flex;
  flex-direction: column;
  gap: 0;
}

.footer-newsletter .form-input {
  border-radius: 8px 8px 0 0;
  border-bottom: none;
  background: rgba(255,255,255,0.06);
  border-color: rgba(255,255,255,0.12);
  color: #fff;
  font-size: 0.875rem;
  padding: 0.75rem 1rem;
}

.footer-newsletter .form-input::placeholder {
  color: rgba(255,255,255,0.35);
}

.footer-newsletter .form-input:focus {
  background: rgba(255,255,255,0.1);
  border-color: var(--color-highlight);
  outline: none;
}

/* ============================================================
   Hero stats — small screen wrapping
   ============================================================ */
.hero-stats {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem 2rem;
}

@media (max-width: 480px) {
  .hero-stats {
    gap: 0.75rem 1.25rem;
  }

  .hero-stat-number {
    font-size: 1.5rem !important;
  }

  .hero-stat-label {
    font-size: 0.75rem !important;
  }
}

/* ============================================================
   Back to top button — ensure visibility
   ============================================================ */
#back-to-top {
  position: fixed;
  right: 1.5rem;
  bottom: 1.5rem;
  width: 46px;
  height: 46px;
  border-radius: 50%;
  background: var(--color-highlight);
  color: #fff;
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1rem;
  box-shadow: 0 4px 20px rgba(233, 69, 96, 0.4);
  opacity: 0;
  transform: translateY(20px);
  transition: all var(--transition-base);
  z-index: var(--z-sticky);
}

#back-to-top.visible {
  opacity: 1;
  transform: translateY(0);
}

#back-to-top:hover {
  background: #c73652;
  transform: translateY(-4px);
  box-shadow: 0 8px 28px rgba(233, 69, 96, 0.5);
}

/* Adjust floating-contact to not overlap back-to-top */
.floating-contact {
  bottom: 5.5rem !important;
}

/* ============================================================
   Navigation Tech Effects — 科技感导航增强
   ============================================================ */

/* 扫光关键帧 */
@keyframes nav-shine {
  0%   { left: -60%; }
  100% { left: 120%; }
}

/* 磁场追踪光斑 keyframe */
@keyframes nav-glow-pulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(233, 69, 96, 0.0); }
  50%       { box-shadow: 0 0 16px 4px rgba(233, 69, 96, 0.15); }
}

/* active 菜单项的脉冲圆环 */
.site-nav .menu-item.current-menu-item > a {
  position: relative;
  color: var(--color-highlight);
}

.site-nav .menu-item.current-menu-item > a::before {
  opacity: 1;
  animation: nav-glow-pulse 2.5s ease-in-out infinite;
}

/* 子菜单项入场动画（第 1~8 项依次延迟）*/
.site-nav .sub-menu .menu-item {
  opacity: 0;
  transform: translateY(-4px);
  transition: opacity 0.2s ease, transform 0.2s ease;
}

.site-nav .menu-item-has-children:hover > .sub-menu .menu-item,
.site-nav .menu-item-has-children:focus-within > .sub-menu .menu-item {
  opacity: 1;
  transform: translateY(0);
}

/* 各子项依次延迟进场 */
.site-nav .sub-menu .menu-item:nth-child(1) { transition-delay: 0.04s; }
.site-nav .sub-menu .menu-item:nth-child(2) { transition-delay: 0.08s; }
.site-nav .sub-menu .menu-item:nth-child(3) { transition-delay: 0.12s; }
.site-nav .sub-menu .menu-item:nth-child(4) { transition-delay: 0.16s; }
.site-nav .sub-menu .menu-item:nth-child(5) { transition-delay: 0.20s; }
.site-nav .sub-menu .menu-item:nth-child(6) { transition-delay: 0.24s; }

/* header 滚动后：增加一条彩色顶部边框 */
#site-header.scrolled {
  border-top: 2px solid transparent;
  background-image: linear-gradient(var(--nav-bg), var(--nav-bg)),
                    linear-gradient(90deg, var(--color-highlight) 0%, var(--color-gold) 50%, var(--color-accent) 100%);
  background-origin: border-box;
  background-clip: padding-box, border-box;
}

/* 导航悬停时 header 微发光 */
#site-header.scrolled .site-nav .menu-item:hover > a {
  text-shadow: 0 0 20px rgba(233, 69, 96, 0.4);
}

/* 子菜单 icon 圆圈背景 */
.site-nav .sub-menu .menu-item > a .sub-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border-radius: 8px;
  background: rgba(233, 69, 96, 0.08);
  color: var(--color-highlight);
  font-size: 0.8rem;
  flex-shrink: 0;
  transition: background 0.2s ease, transform 0.2s ease;
}

.site-nav .sub-menu .menu-item > a:hover .sub-icon {
  background: rgba(233, 69, 96, 0.16);
  transform: scale(1.12);
}

/* 子菜单 footer 区域样式 */
.sub-menu-footer {
  margin-top: 4px;
  padding: 8px 10px 4px;
  border-top: 1px solid rgba(26, 26, 46, 0.06);
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 0.75rem;
  color: var(--text-muted);
}

[data-theme="dark"] .sub-menu-footer {
  border-top-color: rgba(255, 255, 255, 0.07);
}

.sub-menu-footer a {
  color: var(--color-highlight);
  font-weight: 600;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  transition: gap 0.2s ease;
}

.sub-menu-footer a:hover {
  gap: 8px;
}

/* ============================================================
   响应式：992px 以下隐藏桌面导航（与 style.css 断点一致）
   ============================================================ */
@media (max-width: 992px) {
  #site-header.scrolled {
    background-image: none;
    background: var(--nav-bg);
    border-top: 2px solid var(--color-highlight);
  }
}

/* ============================================================
   Mobile Menu — 子菜单手风琴样式
   ============================================================ */

/* 移动端子菜单容器 */
#mobile-menu .menu-item-has-children > .sub-menu {
  position: static !important;
  transform: none !important;
  opacity: 1 !important;
  visibility: visible !important;
  pointer-events: auto !important;
  background: transparent !important;
  backdrop-filter: none !important;
  -webkit-backdrop-filter: none !important;
  box-shadow: none !important;
  border: none !important;
  border-radius: 0 !important;
  padding: 0 0 8px 0 !important;
  margin-left: 1.2rem;
  width: auto !important;
  min-width: 0 !important;
  max-width: none !important;
  border-left: 2px solid rgba(233, 69, 96, 0.25) !important;
}

/* 移动端子菜单 top 装饰线不需要 */
#mobile-menu .sub-menu::after {
  display: none !important;
}

/* 移动端子菜单小三角不需要 */
#mobile-menu .sub-menu::before {
  display: none !important;
}

/* 移动端子菜单 footer 样式 */
#mobile-menu .sub-menu-footer {
  border-top-color: rgba(255, 255, 255, 0.08) !important;
  padding: 8px 12px 0 !important;
}

/* 移动端子菜单项样式 */
#mobile-menu .sub-menu .menu-item > a {
  padding: 0.55rem 0.8rem !important;
  font-size: 0.85rem !important;
  border-radius: 8px !important;
  white-space: normal !important;
}

#mobile-menu .sub-menu .menu-item > a:hover {
  transform: none !important;
  background: rgba(233, 69, 96, 0.06);
}

/* 展开状态指示线 */
#mobile-menu .menu-item-has-children.mobile-open > .sub-menu {
  border-left-color: rgba(233, 69, 96, 0.5) !important;
}

/* 移动端顶级链接 padding */
#mobile-menu .menu > .menu-item > a {
  padding: 0.8rem 1rem;
  border-radius: 10px;
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--text-primary);
  font-weight: 500;
  font-size: 0.95rem;
  transition: background 0.2s ease;
}

#mobile-menu .menu > .menu-item > a:hover {
  background: rgba(233, 69, 96, 0.06);
}

#mobile-menu .menu > .menu-item > a i:first-child {
  width: 20px;
  text-align: center;
  color: var(--color-highlight);
  opacity: 0.8;
}

/* 移动端子菜单入场恢复 — 不需要延迟动画 */
#mobile-menu .sub-menu .menu-item {
  opacity: 1 !important;
  transform: none !important;
  transition: none !important;
}

