/* 全局样式 - 为所有页面添加顶部内边距，防止被固定导航栏遮挡 */
body {
    padding-top: 70px; /* 导航栏高度 */
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Inter', sans-serif;
}

.text-gradient {
    background: linear-gradient(90deg, #0073f5, #00c3ff);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.bg-gradient-primary {
    background: linear-gradient(135deg, #0073f5, #00c3ff);
}

.card-hover {
    transition: all 0.3s ease;
}

.card-hover:hover {
    transform: translateY(-5px);
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
}

.feature-icon {
    transition: all 0.3s ease;
}

.feature-card:hover .feature-icon {
    transform: scale(1.1);
    color: #0073f5;
}

#hero-canvas {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
}

.nav-link {
    position: relative;
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 0;
    height: 2px;
    background-color: #0073f5;
    transition: width 0.3s ease;
}

.nav-link:hover::after {
    width: 100%;
}

/* Mobile Swiper Styles */
.snap-x {
    scroll-snap-type: x mandatory;
    -webkit-overflow-scrolling: touch;
}

.snap-start {
    scroll-snap-align: start;
}

.overflow-x-auto {
    overflow-x: auto;
    -ms-overflow-style: none;
    scrollbar-width: none;
}

.overflow-x-auto::-webkit-scrollbar {
    display: none;
}

.swiper-indicator.active {
    background-color: #0073f5;
}

.mobile-menu {
    transition: transform 0.3s ease-in-out;
}

.mobile-menu.hidden {
    transform: translateX(-100%);
}

/* 自定义导航菜单样式 */
.main-nav {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.main-nav li {
    position: relative;
}

.main-nav a {
    display: block;
    padding: 0.5rem 1rem;
    color: #333;
    font-weight: 500;
    transition: color 0.3s ease;
}

.main-nav a:hover {
    color: #0073f5;
}

.main-nav a.active {
    color: #0073f5;
}

/* 下拉菜单样式 */
.main-nav .sub-menu {
    position: absolute;
    top: 100%;
    left: 0;
    min-width: 200px;
    background-color: white;
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
    border-radius: 0.375rem;
    padding: 0.5rem 0;
    margin-top: 0.25rem;
    display: none;
    z-index: 10;
}

.main-nav li:hover .sub-menu {
    display: block;
}

.main-nav .sub-menu li {
    width: 100%;
}

.main-nav .sub-menu a {
    padding: 0.75rem 1.25rem;
    color: #4b5563;
    font-weight: 400;
}

.main-nav .sub-menu a:hover {
    background-color: #f3f4f6;
    color: #0073f5;
}

/* 移动端导航菜单样式 */
.mobile-nav {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.mobile-nav a {
    display: block;
    padding: 0.75rem 1rem;
    color: #333;
    font-weight: 500;
    border-radius: 0.375rem;
    transition: background-color 0.3s ease;
}

.mobile-nav a:hover {
    background-color: #f3f4f6;
}

.mobile-nav a.active {
    background-color: #e6f1fe;
    color: #0073f5;
}

/* 移动端下拉菜单样式 */
.mobile-nav .menu-item-has-children {
    position: relative;
}

.mobile-nav .menu-item-has-children::after {
    content: '+';
    position: absolute;
    right: 1rem;
    top: 50%;
    transform: translateY(-50%);
    font-weight: bold;
}

.mobile-nav .menu-item-has-children.open::after {
    content: '-';
}

.mobile-nav .sub-menu {
    display: none;
    padding-left: 1rem;
    margin-top: 0.25rem;
}

.mobile-nav .sub-menu a {
    font-weight: 400;
    padding-left: 1.5rem;
}

/* 内容区域样式 */
.site-content {
    padding-top: 120px; /* 为固定导航栏留出空间 */
}

/* 文章详情页面样式 */
.single .entry-header {
    padding-top: 20px;
}

@media (max-width: 768px) {
    .single .entry-header {
        padding-top: 30px;
    }
    
    .single .entry-title {
        font-size: 1.75rem !important;
        line-height: 1.3;
        margin-bottom: 1rem !important;
    }
}

/* 文章内容样式 */
.entry-content {
    line-height: 1.8;
    color: #4b5563;
}

.entry-content p {
    margin-bottom: 1.5rem;
}

.entry-content h2 {
    font-size: 1.5rem;
    font-weight: 600;
    margin-top: 2rem;
    margin-bottom: 1rem;
    color: #1f2937;
}

.entry-content h3 {
    font-size: 1.25rem;
    font-weight: 600;
    margin-top: 1.5rem;
    margin-bottom: 0.75rem;
    color: #1f2937;
}

/* 侧边栏样式 */
.widget-area {
    background-color: #f9fafb;
    border-radius: 0.5rem;
    padding: 1.5rem;
    box-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.1), 0 1px 2px 0 rgba(0, 0, 0, 0.06);
}

.widget {
    margin-bottom: 1.5rem;
}

.widget-title {
    font-size: 1.25rem;
    font-weight: 600;
    margin-bottom: 1rem;
    color: #1f2937;
    border-bottom: 2px solid #0073f5;
    padding-bottom: 0.5rem;
}

.widget ul {
    list-style-type: none;
    padding: 0;
}

.widget ul li {
    margin-bottom: 0.75rem;
}

.widget ul li a {
    color: #4b5563;
    transition: color 0.3s ease;
}

.widget ul li a:hover {
    color: #0073f5;
}

/* 评论表单样式 */
.comment-form {
    background-color: #f9fafb;
    border-radius: 0.5rem;
    padding: 1.5rem;
    margin-top: 2rem;
}

.comment-form p {
    margin-bottom: 1rem;
}

.comment-form label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
}

.comment-form input,
.comment-form textarea {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid #e5e7eb;
    border-radius: 0.375rem;
    font-size: 0.875rem;
}

.comment-form textarea {
    min-height: 150px;
    resize: vertical;
}

.comment-form .form-submit input {
    width: auto;
    background-color: #0073f5;
    color: white;
    border: none;
    padding: 0.75rem 1.5rem;
    border-radius: 0.375rem;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

.comment-form .form-submit input:hover {
    background-color: #0067dc;
}
