﻿﻿@layer utilities {
      .content-auto {
        content-visibility: auto;
      }
      .text-shadow {
        text-shadow: 0 2px 4px rgba(0,0,0,0.1);
      }
      .card-hover {
        transition: all 0.3s ease;
      }
      .card-hover:hover {
        transform: translateY(-5px);
        box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
      }
      .bg-gradient-overlay {
        background: linear-gradient(to right, rgba(30, 64, 175, 0.9), rgba(59, 130, 246, 0.7));
      }
       .transition-navbar {
        transition: background-color 0.3s, box-shadow 0.3s;
      }
      .card-hover {
        transition: transform 0.3s ease, box-shadow 0.3s ease;
      }
      .card-hover:hover {
        transform: translateY(-5px);
        box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
      }
      .badge {
        @apply inline-block px-2 py-1 text-xs font-semibold rounded-full bg-primary/10 text-primary;
      }
      /* 移动端菜单动画 */
      .animate-slideDown {
        animation: slideDown 0.3s ease-out forwards;
      }
      
      .animate-slideUp {
        animation: slideUp 0.3s ease-out forwards;
      }

      
      @keyframes slideDown {
        from {
          opacity: 0;
          transform: translateY(-10px);
          max-height: 0;
        }
        to {
          opacity: 1;
          transform: translateY(0);
          max-height: 300px;
        }
      }
      
      @keyframes slideUp {
        from {
          opacity: 1;
          transform: translateY(0);
          max-height: 300px;
        }
        to {
          opacity: 0;
          transform: translateY(-10px);
          max-height: 0;
        }
      }
      
      /* 移动端菜单样式优化 */
      #mobile-menu {
        box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
        overflow: hidden;
        max-height: 0;
        transition: max-height 0.3s ease-out;
      }
      
      #mobile-menu:not(.hidden) {
        max-height: 300px;
      }
      
      #mobile-menu a {
        border-bottom: 1px solid #f3f4f6;
        transition: all 0.2s ease;
        display: block;
        padding: 0.75rem 1rem;
        color: #4b5563;
        text-decoration: none;
      }
      
      #mobile-menu a:last-child {
        border-bottom: none;
      }
      
      #mobile-menu a:hover {
        background-color: #f8fafc;
        color: #0A3D62;
        transform: translateX(5px);
      }
      
      /* 菜单按钮动画 */
      #menu-toggle {
        transition: all 0.3s ease;
        position: relative;
        z-index: 100;
      }
      
      #menu-toggle:hover {
        transform: scale(1.1);
      }
      
      #menu-toggle.active {
        color: #F97316;
      }
      
      /* 导航栏滚动效果 */
      #navbar {
        transition: all 0.3s ease;
      }
      
      #navbar.scrolled {
        box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
        background-color: rgba(255, 255, 255, 0.98);
      }
      
      /* 平滑滚动优化 */
      html {
        scroll-behavior: smooth;
      }
      
      /* 响应式优化 */
      @media (max-width: 767px) {
        #navbar {
          backdrop-filter: blur(10px);
          background-color: rgba(255, 255, 255, 0.95);
        }
        
        #mobile-menu {
          position: fixed;
          top: 80px;
          left: 0;
          right: 0;
          z-index: 40;
          background-color: white;
        }
        
        /* 移动端触摸优化 */
        #mobile-menu a {
          -webkit-tap-highlight-color: transparent;
          touch-action: manipulation;
        }
        
        #menu-toggle {
          -webkit-tap-highlight-color: transparent;
          touch-action: manipulation;
        }
      }
      
      /* 大屏幕优化 */
      @media (min-width: 768px) {
        #navbar {
          transition: transform 0.3s ease, background-color 0.3s ease;
        }
        
        /* 桌面端导航链接悬停效果 */
        nav a {
          position: relative;
          transition: color 0.3s ease;
        }
        
        nav a::after {
          content: '';
          position: absolute;
          width: 0;
          height: 2px;
          bottom: -5px;
          left: 50%;
          background-color: #F97316;
          transition: all 0.3s ease;
          transform: translateX(-50%);
        }
        
        nav a:hover::after {
          width: 100%;
        }
      }
}