/* 
 * AILawerWord - 网站开发能力展示平台
 * 主样式表
 */

/* 基础样式 */
:root {
    --primary-color: #3498db;
    --secondary-color: #2ecc71;
    --accent-color: #e74c3c;
    --dark-color: #333333;
    --light-color: #f8f9fa;
    --gray-color: #6c757d;
    --border-radius: 0.25rem;
    --box-shadow: 0 0.125rem 0.25rem rgba(0, 0, 0, 0.075);
    --transition: all 0.3s ease;
}

body {
    font-family: 'Open Sans', 'Noto Sans SC', sans-serif;
    color: var(--dark-color);
    line-height: 1.6;
    padding-top: 56px; /* 为固定导航栏留出空间 */
}

h1, h2, h3, h4, h5, h6 {
    font-family: 'Montserrat', 'Noto Sans SC', sans-serif;
    font-weight: 600;
}

a {
    color: var(--primary-color);
    transition: var(--transition);
}

a:hover {
    color: #2980b9;
    text-decoration: none;
}

/* 按钮样式 */
.btn-primary {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
}

.btn-primary:hover {
    background-color: #2980b9;
    border-color: #2980b9;
}

.btn-outline-primary {
    color: var(--primary-color);
    border-color: var(--primary-color);
}

.btn-outline-primary:hover {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
}

/* 导航栏样式 */
.navbar {
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.navbar-brand {
    font-weight: 700;
    color: var(--primary-color) !important;
}

.nav-link {
    font-weight: 500;
    padding: 0.5rem 1rem !important;
}

.nav-link.active {
    color: var(--primary-color) !important;
}

/* 语言切换器样式 */
.language-switch {
    cursor: pointer;
    padding: 0.25rem 0.75rem;
    border-radius: 4px;
    transition: all 0.3s ease;
}

.language-switch.active {
    background-color: var(--primary-color);
    color: #fff !important;
}

.dropdown-menu .language-switch:hover:not(.active) {
    background-color: rgba(52, 152, 219, 0.1);
}

#languageDropdown {
    display: flex;
    align-items: center;
}

#languageDropdown .fa-globe {
    margin-right: 5px;
    color: var(--primary-color);
}

.lang-switching {
    opacity: 0.8;
    transition: opacity 0.2s ease-in-out;
}

.language-switch.active {
    font-weight: bold;
    background-color: rgba(0, 123, 255, 0.1);
}

/* Language-specific font adjustments */
html[lang="zh"] body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", "微软雅黑", sans-serif;
}

html[lang="en"] body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

/* Language specific spacing adjustments (for Chinese vs English differences) */
html[lang="zh"] .section-title,
html[lang="zh"] .lead {
    letter-spacing: 0.03em;
}

/* 首页横幅 */
.hero-section {
    padding-top: 3rem;
    padding-bottom: 3rem;
    background-color: var(--light-color);
}

/* 章节标题 */
.section-title {
    position: relative;
    margin-bottom: 1rem;
    font-weight: 700;
    color: var(--dark-color);
}

.section-description {
    font-size: 1.1rem;
    color: var(--gray-color);
    max-width: 700px;
    margin: 0 auto 2rem;
}

/* 服务卡片 */
.card {
    transition: var(--transition);
    border-radius: 0.5rem;
}

.card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1);
}

.icon-box {
    margin-bottom: 1.5rem;
}

.icon-box i {
    color: var(--primary-color);
}

/* 技能图标 */
.skill-icons {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    margin-bottom: 1rem;
}

.skill-icon {
    width: 50px;
    height: 50px;
    object-fit: contain;
}

/* 案例卡片 */
.portfolio-card img {
    height: 200px;
    object-fit: cover;
}

/* 用户反馈卡片 */
.testimonial-card {
    position: relative;
}

.testimonial-card .card-body {
    position: relative;
    z-index: 1;
}

.testimonial-card::before {
    content: '\201C';
    position: absolute;
    top: 20px;
    left: 20px;
    font-size: 5rem;
    font-family: Georgia, serif;
    color: rgba(52, 152, 219, 0.1);
    line-height: 1;
}

/* 博客卡片 */
.blog-card img {
    height: 200px;
    object-fit: cover;
}

/* CTA区域 */
.cta-section {
    background-color: var(--primary-color);
    color: white;
}

.cta-section h2 {
    color: white;
}

/* 页脚 */
.footer {
    background-color: #2c3e50;
}

.social-links a {
    display: inline-block;
    width: 36px;
    height: 36px;
    line-height: 36px;
    text-align: center;
    background-color: rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    margin-right: 10px;
    transition: var(--transition);
}

.social-links a:hover {
    background-color: var(--primary-color);
    transform: translateY(-3px);
}

/* 响应式调整 */
@media (max-width: 768px) {
    .hero-section {
        text-align: center;
    }
    
    .hero-section .btn-group {
        justify-content: center;
    }
    
    .portfolio-card img,
    .blog-card img {
        height: 180px;
    }
}

@media (max-width: 576px) {
    body {
        padding-top: 62px;
    }
    
    .section-title {
        font-size: 1.75rem;
    }
    
    .portfolio-card img,
    .blog-card img {
        height: 160px;
    }
}

/* 自定义动画 */
.animate-up {
    transition: transform 0.3s ease;
}

.animate-up:hover {
    transform: translateY(-5px);
}

/* 工具提示和弹出框 */
.tooltip-inner {
    background-color: var(--primary-color);
}

.bs-tooltip-auto[x-placement^=top] .arrow::before, 
.bs-tooltip-top .arrow::before {
    border-top-color: var(--primary-color);
}

/* 表单样式 */
.form-control:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 0.2rem rgba(52, 152, 219, 0.25);
}

/* 自定义复选框和单选按钮 */
.custom-control-input:checked ~ .custom-control-label::before {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
}

/* 页面过渡效果 */
.page-transition {
    animation: fadeIn 0.5s ease-in-out;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* 加载动画 */
.loader {
    display: inline-block;
    width: 30px;
    height: 30px;
    border: 3px solid rgba(52, 152, 219, 0.3);
    border-radius: 50%;
    border-top-color: var(--primary-color);
    animation: spin 1s ease-in-out infinite;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

/* 分页控件 */
.pagination .page-item.active .page-link {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
}

.pagination .page-link {
    color: var(--primary-color);
}

.pagination .page-link:hover {
    background-color: #e9ecef;
}

/* 评分星星 */
.rating .fas {
    color: #ffc107;
} 