/* Import Tailwind-inspired utility classes */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&display=swap');

/* Global Styles */
/* CSS变量 - 与React应用保持一致 */
:root {
    --bg-primary: #f9fafb;
    --bg-secondary: #f3f4f6;
    --bg-tertiary: #e5e7eb;
    --bg-dark: #1f2937;
    --text-primary: #111827;
    --text-secondary: #4b5563;
    --text-tertiary: #6b7280;
    --accent-primary: #1e40af;
    --accent-secondary: #3b82f6;
    
    /* 新增响应式断点变量 */
    --sm: 640px;
    --md: 768px;
    --lg: 1024px;
    --xl: 1280px;
    --2xl: 1536px;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", "Noto Sans", Helvetica, Arial, sans-serif;
    line-height: 1.5;
    font-weight: 400;
    color: var(--text-primary);
    background-color: var(--bg-primary);
    scroll-behavior: smooth;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* Header Styles */
.site-header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 50;
    background-color: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur-sm;
    box-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.1);
}

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

/* Navigation Styles */
.main-navigation {
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 5rem;
    position: relative;
}

.site-branding {
    display: flex;
    align-items: center;
}

.site-branding a {
    text-decoration: none;
}

.menu-toggle {
    display: none;
    background: none;
    border: none;
    color: var(--text-primary);
    cursor: pointer;
    font-size: 1.5rem;
}

#primary-menu {
    display: flex;
    list-style: none;
}

#primary-menu li {
    margin-left: 1.5rem;
}

#primary-menu li a {
    display: block;
    padding: 0.5rem 0.75rem;
    color: var(--text-secondary);
    text-decoration: none;
    transition: all 0.3s ease;
    border-radius: 0.375rem;
}

#primary-menu li a:hover {
    color: var(--accent-secondary);
}

#primary-menu li.current-menu-item a {
    color: var(--accent-primary);
    font-weight: 500;
}

/* Content Styles */
/* 主内容区域样式 - 与React应用保持一致 */
#primary {
    padding-top: 6rem;
    min-height: 100vh;
}

/* Hero Section Styles */
section {
    position: relative;
}

/* 首页Hero区域样式 - 与React应用保持一致 */
section#home {
    background: linear-gradient(to bottom right, #1f2937, #111827);
    color: white;
    padding: 6rem 0;
    position: relative;
    overflow: hidden;
}

/* Card Styles */
.card {
    background-color: white;
    border-radius: 0.75rem;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    overflow: hidden;
    transition: all 0.3s ease;
    border: 1px solid #e5e7eb;
}

.card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
}

/* 卡片图片样式 - 统一图片尺寸和过渡效果 */
.card-image {
    width: 100%;
    height: 192px; /* 与React应用中的h-48保持一致 */
    min-height: 192px;
    object-fit: cover;
    transition: transform 0.7s ease;
}

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

.card-content {
    padding: 1.5rem;
}

/* Button Styles */
/* 按钮样式 - 与React应用中的CTAButton组件保持一致 */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.75rem 2rem;
    background-color: var(--accent-primary);
    color: white;
    font-weight: 600;
    text-decoration: none;
    border-radius: 0.5rem;
    transition: all 0.3s ease;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    border: none;
    cursor: pointer;
    font-size: 1rem;
}

.btn:hover {
    background-color: var(--accent-secondary);
    transform: translateY(-2px);
    box-shadow: 0 6px 8px -1px rgba(0, 0, 0, 0.15);
    color: white;
}

/* Footer Styles */
.site-footer {
    background-color: var(--bg-dark);
    color: white;
    padding: 4rem 0 2rem;
}

/* 页脚内容布局 - 调整为更一致的网格布局 */
.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 3rem;
    margin-bottom: 2rem;
}

.footer-logo {
    display: flex;
    align-items: center;
    margin-bottom: 1.5rem;
}

.footer-logo i {
    margin-right: 0.75rem;
}

.social-links {
    display: flex;
    gap: 1rem;
}

.social-links a {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 2.5rem;
    height: 2.5rem;
    border-radius: 50%;
    background-color: rgba(255, 255, 255, 0.1);
    color: white;
    transition: all 0.3s ease;
}

.social-links a:hover {
    background-color: var(--accent-secondary);
    transform: translateY(-3px);
}

.footer-column h3 {
    margin-bottom: 1.5rem;
    font-size: 1.125rem;
    font-weight: 600;
}

.footer-column ul {
    list-style: none;
}

.footer-column ul li {
    margin-bottom: 0.75rem;
}

.footer-column ul li a {
    color: rgba(255, 255, 255, 0.7);
    text-decoration: none;
    transition: color 0.3s ease;
}

.footer-column ul li a:hover {
    color: white;
}

.site-info {
    text-align: center;
    padding-top: 2rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    color: rgba(255, 255, 255, 0.5);
}

/* Form Styles */
/* 表单样式 - 与React应用保持一致 */
form {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

label {
    font-weight: 500;
    color: var(--text-secondary);
    display: block;
    margin-bottom: 0.5rem;
}

input, textarea, select {
    padding: 0.75rem 1rem;
    border: 1px solid #e5e7eb;
    border-radius: 0.5rem;
    font-size: 1rem;
    transition: all 0.3s ease;
}

input:focus, textarea:focus, select:focus {
    outline: none;
    border-color: var(--accent-secondary);
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

/* Utility Classes */
.text-center {
    text-align: center;
}

.text-blue-400 {
    color: #93c5fd;
}

.text-blue-600 {
    color: #2563eb;
}

.text-white {
    color: white;
}

.text-gray-300 {
    color: #d1d5db;
}

.text-gray-400 {
    color: #9ca3af;
}

.text-gray-700 {
    color: #374151;
}

.text-gray-900 {
    color: #111827;
}

.bg-gray-800 {
    background-color: #1f2937;
}

.bg-gray-900 {
    background-color: #111827;
}

.bg-blue-600 {
    background-color: #2563eb;
}

.bg-blue-700 {
    background-color: #1d4ed8;
}

.bg-blue-800 {
    background-color: #1e40af;
}

.bg-blue-900 {
    background-color: #1e3a8a;
}

.bg-green-500 {
    background-color: #10b981;
}

.font-bold {
    font-weight: 700;
}

.font-semibold {
    font-weight: 600;
}

.font-medium {
    font-weight: 500;
}

.mt-2 {
    margin-top: 0.5rem;
}

.mt-4 {
    margin-top: 1rem;
}

.mt-6 {
    margin-top: 1.5rem;
}

.mt-10 {
    margin-top: 2.5rem;
}

.mb-2 {
    margin-bottom: 0.5rem;
}

.mb-3 {
    margin-bottom: 0.75rem;
}

.mb-4 {
    margin-bottom: 1rem;
}

.mb-6 {
    margin-bottom: 1.5rem;
}

.mr-3 {
    margin-right: 0.75rem;
}

.p-3 {
    padding: 0.75rem;
}

.p-4 {
    padding: 1rem;
}

.p-6 {
    padding: 1.5rem;
}

.p-8 {
    padding: 2rem;
}

.rounded-full {
    border-radius: 9999px;
}

.rounded-xl {
    border-radius: 0.75rem;
}

.rounded-lg {
    border-radius: 0.5rem;
}

.shadow-lg {
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
}

.shadow-xl {
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
}

.overflow-hidden {
    overflow: hidden;
}

.object-cover {
    object-fit: cover;
}

/* Grid and Flexbox Utilities */
.grid {
    display: grid;
}

.grid-cols-1 {
    grid-template-columns: repeat(1, minmax(0, 1fr));
}

.grid-cols-2 {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.grid-cols-3 {
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.grid-cols-4 {
    grid-template-columns: repeat(4, minmax(0, 1fr));
}

.gap-4 {
    gap: 1rem;
}

.gap-6 {
    gap: 1.5rem;
}

.gap-8 {
    gap: 2rem;
}

.gap-12 {
    gap: 3rem;
}

/* 新增的间距类 */
.gap-16 {
    gap: 4rem;
}

.flex {
    display: flex;
}

.items-center {
    align-items: center;
}

.items-start {
    align-items: flex-start;
}

.justify-center {
    justify-content: center;
}

.justify-between {
    justify-content: space-between;
}

.flex-col {
    flex-direction: column;
}

.flex-row {
    flex-direction: row;
}

/* Responsive Styles */
@media (max-width: 768px) {
    .container {
        padding: 0 1rem;
    }
    
    .menu-toggle {
        display: block;
    }
    
    #primary-menu {
        display: none;
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        flex-direction: column;
        background-color: white;
        box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
        padding: 1rem;
    }
    
    #primary-menu.toggled {
        display: flex;
    }
    
    #primary-menu li {
        margin: 0.5rem 0;
    }
    
    .grid-cols-2, .grid-cols-3, .grid-cols-4 {
        grid-template-columns: repeat(1, minmax(0, 1fr));
    }
    
    .footer-content {
        grid-template-columns: 1fr;
        gap: 2rem;
    }
    
    .card-image {
        height: 180px;
    }
}

@media (min-width: 769px) and (max-width: 1024px) {
    .grid-cols-3 {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
    
    .grid-cols-4 {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

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

.animate-fade-in-up {
    animation: fadeInUp 0.6s ease forwards;
}

/* Table Styles */
table {
    width: 100%;
    border-collapse: collapse;
}

th, td {
    padding: 1rem;
    text-align: left;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

th {
    font-weight: 600;
    color: white;
}

/* Background Gradients */
.bg-gradient-to-br {
    background: linear-gradient(to bottom right, var(--tw-gradient-stops));
}

.bg-gradient-to-r {
    background: linear-gradient(to right, var(--tw-gradient-stops));
}

/* 全局排版重置 - 确保与React应用保持一致 */
h1, h2, h3, h4, h5, h6 {
    font-weight: 700;
    line-height: 1.2;
}

p {
    margin-bottom: 1rem;
    line-height: 1.5;
}

/* Contact Form 7 Integration */
.wpcf7-form {
    margin: 0;
}

.wpcf7-form p {
    margin-bottom: 1.5rem;
}

.wpcf7-form input,
.wpcf7-form textarea,
.wpcf7-form select {
    width: 100%;
    padding: 0.75rem 1rem;
    border: 1px solid #e5e7eb;
    border-radius: 0.5rem;
    font-size: 1rem;
    transition: all 0.3s ease;
}

.wpcf7-form input:focus,
.wpcf7-form textarea:focus,
.wpcf7-form select:focus {
    outline: none;
    border-color: var(--accent-secondary);
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

.wpcf7-form .wpcf7-submit {
    width: auto;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.75rem 2rem;
    background-color: var(--accent-primary);
    color: white;
    font-weight: 600;
    text-decoration: none;
    border-radius: 0.5rem;
    transition: all 0.3s ease;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    border: none;
    cursor: pointer;
}

.wpcf7-form .wpcf7-submit:hover {
    background-color: var(--accent-secondary);
    transform: translateY(-2px);
    box-shadow: 0 6px 8px -1px rgba(0, 0, 0, 0.15);
    color: white;
}