/* iOS 技巧与应用指南 - 主样式文件 */
/* 中文注释便于后期维护 */

/* 全局样式 */
body {
    font-family: 'SF Pro Display', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, 'Open Sans', 'Helvetica Neue', sans-serif;
    background-color: #F5F5F7;
    color: #1D1D1F;
    line-height: 1.6;
}

/* 标题样式 */
h1, h2, h3, h4, h5, h6 {
    color: #1D1D1F;
    font-weight: 600;
}

/* 链接样式 */
a {
    color: #0071E3;
    text-decoration: none;
    transition: color 0.3s ease;
}

a:hover {
    color: #0077ED;
    text-decoration: underline;
}

/* 主色调 */
.primary-color {
    color: #0071E3;
}

.bg-primary-color {
    background-color: #0071E3;
}

/* 导航栏样式 */
.navbar {
    background-color: rgba(245, 245, 247, 0.95);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid rgba(0, 0, 0, 0.1);
}

.navbar-brand {
    font-weight: 700;
    font-size: 1.5rem;
    color: #1D1D1F;
}

.navbar-nav .nav-link {
    color: #1D1D1F;
    font-weight: 500;
    margin-right: 1rem;
}

.navbar-nav .nav-link:hover {
    color: #0071E3;
}

/* 移动端汉堡菜单 */
.navbar-toggler {
    border: none;
}

.navbar-toggler:focus {
    box-shadow: none;
}

/* Banner区域样式 */
.banner {
    background: linear-gradient(135deg, #0071E3 0%, #0077ED 100%);
    color: white;
    padding: 4rem 0;
    text-align: center;
    margin-top: 65px;
}

.banner h1 {
    color: white;
    font-size: 2.5rem;
    margin-bottom: 1rem;
}

.banner p {
    font-size: 1.2rem;
    margin-bottom: 2rem;
    opacity: 0.9;
}

/* 卡片样式 */
.card {
    border: none;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 2px 15px rgba(0, 0, 0, 0.05);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.card:hover {
    transform: translateY(-5px);
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.1);
}

.card-img-top {
    width: 100%;
    height: 200px;
    object-fit: cover;
}

.card-body {
    padding: 1.5rem;
}

/* 文章列表样式 */
.article-list {
    margin-bottom: 2rem;
}

.article-item {
    background-color: white;
    border-radius: 12px;
    padding: 1.5rem;
    margin-bottom: 1.5rem;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
    transition: transform 0.3s ease;
}

.article-image {
    width: 100%;
    height: 200px;
    object-fit: cover;
}

.article-item:hover {
    transform: translateY(-3px);
}

.article-title {
    font-size: 1.3rem;
    margin-bottom: 0.5rem;
    font-weight: 600;
}

.article-meta {
    color: #86868B;
    font-size: 0.9rem;
    margin-bottom: 1rem;
}

/* 文章页样式 */
.main-content {
    padding: 2rem 0;
}

.content-wrapper {
    display: flex;
    gap: 2rem;
    flex-wrap: wrap;
}

.article {
    flex: 1;
    min-width: 0;
}

.content-wrapper .sidebar {
    width: 300px;
    flex-shrink: 0;
}

.article-content {
    background-color: white;
    border-radius: 12px;
    padding: 2rem;
    box-shadow: 0 2px 15px rgba(0, 0, 0, 0.05);
}

.article-content h1 {
    margin-bottom: 1.5rem;
    font-size: 2rem;
}

.article-content h2 {
    margin-top: 2rem;
    margin-bottom: 1rem;
    font-size: 1.5rem;
}

.article-content h3 {
    margin-top: 1.5rem;
    margin-bottom: 0.8rem;
    font-size: 1.3rem;
}

.article-content p {
    margin-bottom: 1rem;
    font-size: 1.1rem;
}

.article-content img {
    max-width: 100%;
    height: auto;
    margin: 1.5rem 0;
    border-radius: 8px;
}

/* 侧边栏样式 */
.sidebar {
    background-color: white;
    border-radius: 12px;
    padding: 1.5rem;
    box-shadow: 0 2px 15px rgba(0, 0, 0, 0.05);
}

.sidebar h3 {
    font-size: 1.2rem;
    margin-bottom: 1rem;
    padding-bottom: 0.5rem;
    border-bottom: 1px solid #E8E8ED;
}

.sidebar ul {
    padding-left: 0;
    list-style: none;
}

.sidebar li {
    margin-bottom: 0.8rem;
}

.sidebar a {
    font-size: 0.95rem;
}

/* 表单样式 */
.form-control {
    border: 1px solid #E8E8ED;
    border-radius: 8px;
    padding: 0.75rem 1rem;
    font-size: 1rem;
    transition: border-color 0.3s ease;
}

.form-control:focus {
    border-color: #0071E3;
    box-shadow: 0 0 0 0.2rem rgba(0, 113, 227, 0.25);
}

.btn {
    border-radius: 8px;
    padding: 0.75rem 1.5rem;
    font-weight: 600;
    transition: all 0.3s ease;
}

.btn-primary {
    background-color: #0071E3;
    border-color: #0071E3;
}

.btn-primary:hover {
    background-color: #0077ED;
    border-color: #0077ED;
    transform: translateY(-2px);
}

/* 页脚样式 */
.footer {
    background-color: #1D1D1F;
    color: #86868B;
    padding: 3rem 0 1.5rem;
    margin-top: 4rem;
}

.footer h3 {
    color: white;
    font-size: 1.2rem;
    margin-bottom: 1.5rem;
}

.footer ul {
    list-style: none;
    padding-left: 0;
}

.footer li {
    margin-bottom: 0.8rem;
}

.footer a {
    color: #86868B;
    text-decoration: none;
    transition: color 0.3s ease;
}

.footer a:hover {
    color: white;
    text-decoration: none;
}

.footer-bottom {
    margin-top: 2rem;
    padding-top: 1.5rem;
    border-top: 1px solid #333;
    font-size: 0.9rem;
    text-align: center;
}

/* 返回顶部按钮 */
.back-to-top {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    width: 50px;
    height: 50px;
    background-color: #0071E3;
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    z-index: 1000;
}

.back-to-top.visible {
    opacity: 1;
    visibility: visible;
}

.back-to-top:hover {
    background-color: #0077ED;
    color: white;
    transform: translateY(-3px);
}

/* 响应式设计 */
@media (max-width: 768px) {
    /* 移动端导航 */
    .navbar-collapse {
        background-color: #F5F5F7;
        padding: 1rem;
        border-radius: 12px;
        margin-top: 1rem;
        box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    }
    
    /* 移动端Banner */
    .banner {
        padding: 3rem 0 2rem;
    }
    
    .banner h1 {
        font-size: 2rem;
    }
    
    .banner p {
        font-size: 1rem;
    }
    
    /* 移动端文章页 */
    .article-content {
        padding: 1.5rem;
    }
    
    .article-content h1 {
        font-size: 1.8rem;
    }
    
    /* 移动端卡片 */
    .card-body {
        padding: 1.25rem;
    }
    
    /* 返回顶部按钮 */
    .back-to-top {
        bottom: 1.5rem;
        right: 1.5rem;
        width: 45px;
        height: 45px;
    }
}

@media (max-width: 576px) {
    /* 移动端字体大小 */
    body {
        font-size: 1rem;
    }
    
    .article-content p {
        font-size: 1rem;
        line-height: 1.7;
    }
    
    .banner h1 {
        font-size: 1.7rem;
    }
    
    .article-title {
        font-size: 1.1rem;
    }
}

/* 动画效果 */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.fade-in {
    animation: fadeIn 0.6s ease forwards;
}

/* 图片懒加载 */
img.lazy-load {
    opacity: 0;
    transition: opacity 0.3s ease;
}

img.lazy-load.loaded {
    opacity: 1;
}

/* 相关文章图片样式 */
.related-article-image {
    width: 100% !important;
    height: 150px !important;
    object-fit: cover !important;
}
.related-article-title{
    font-size: 1rem !important;
    line-height: inherit !important;
}