/* style.css - 通用样式 */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    color: #333;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

.section-title {
    font-size: 2.5rem;
    margin-bottom: 1rem;
    color: #2c3e50;
    position: relative;
    display: inline-block;
}

.section-title:after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 50%;
    transform: translateX(-50%);
    width: 100px;
    height: 3px;
    background: linear-gradient(90deg, #0066CC 0%, #00A859 100%);
}

.btn-primary {
    background: linear-gradient(135deg, #1f72c5 0%, #1cd07b 100%);
    border: none;
    padding: 12px 30px;
    border-radius: 50px;
    font-weight: 600;
    transition: transform 0.3s ease;
}

.btn-primary:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 20px rgba(0, 102, 204, 0.3);
}

.btn-outline-primary {
    border: 2px solid #0066CC;
    color: #0066CC;
    background: transparent;
    padding: 10px 30px;
    border-radius: 50px;
    font-weight: 600;
    transition: all 0.3s ease;
}

.btn-outline-primary:hover {
    background: #0066CC;
    color: white;
}

/* 卡片样式 */
.card {
    border-radius: 15px;
    overflow: hidden;
    border: none;
    transition: all 0.3s ease;
}

.card:hover {
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.1);
}

/* 图标包装 */
.icon-wrapper {
    width: 80px;
    height: 80px;
    background: linear-gradient(135deg, #ffffff 0%, #00A859 100%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 20px;
}

.icon-wrapper i {
    color: white;
}

/* 养殖技巧详情页特定样式 */
.technique-overview .card {
    transition: transform 0.3s ease;
}

.technique-overview .card:hover {
    transform: translateY(-3px);
}

.step-by-step .step {
    border-left: 3px solid #007bff;
    padding-left: 20px;
    margin-left: 15px;
    position: relative;
}

.step-by-step .step:before {
    content: '';
    position: absolute;
    left: -9px;
    top: 0;
    width: 15px;
    height: 15px;
    background: #007bff;
    border-radius: 50%;
}

/* 侧边栏样式 */
.sidebar-card .list-group-item {
    border: none;
    padding: 0.75rem 1.25rem;
    transition: all 0.2s ease;
}

.sidebar-card .list-group-item:hover {
    background-color: rgba(0, 123, 255, 0.1);
    padding-left: 1.5rem;
}

/* 标题锚点样式 */
.heading-anchor {
    opacity: 0;
    transition: opacity 0.2s ease;
    text-decoration: none;
    font-size: 0.8em;
}

h2:hover .heading-anchor,
h3:hover .heading-anchor,
h4:hover .heading-anchor {
    opacity: 1;
}

.heading-anchor:hover {
    color: #007bff;
}

/* 文本截断 */
.truncate-2 {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
}

.truncate-1 {
    display: -webkit-box;
    -webkit-line-clamp: 1;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* 动画效果 */
@keyframes fadeInOut {
    0% { opacity: 0; transform: translateY(10px); }
    15% { opacity: 1; transform: translateY(0); }
    85% { opacity: 1; transform: translateY(0); }
    100% { opacity: 0; transform: translateY(10px); }
}