/* 种植技术页面专用样式 */

/* 页面标题区域 */
.tech-page-header {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-dark) 100%);
    color: var(--white);
    padding: 100px 0 40px;
    margin-top: 99px;
    text-align: center;
}

.breadcrumb a {
    color: var(--white);
    text-decoration: none;
    opacity: 0.8;
    transition: opacity 0.3s;
}

.tech-page-header .page-title {
    font-size: 3rem;
    margin-bottom: 1rem;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
}

.tech-page-header .page-subtitle {
    font-size: 1.3rem;
    opacity: 0.9;
    margin-bottom: 2rem;
}

/* 技术分类导航 */
.tech-categories {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 1rem;
    margin-top: 2rem;
}

.category-btn {
    background: rgba(255, 255, 255, 0.2);
    color: var(--white);
    border: 2px solid rgba(255, 255, 255, 0.3);
    padding: 0.8rem 1.5rem;
    border-radius: 25px;
    cursor: pointer;
    transition: all 0.3s;
    font-weight: 500;
    backdrop-filter: blur(10px);
}

.category-btn:hover,
.category-btn.active {
    background: var(--white);
    color: var(--primary-color);
    border-color: var(--white);
    transform: translateY(-2px);
}

/* 搜索区域 */
.search-section {
    background: var(--background-light);
    padding: 2rem 0;
}

.search-box {
    max-width: 600px;
    margin: 0 auto;
    position: relative;
}

.search-input {
    width: 100%;
    padding: 1rem 2rem;
    border: 2px solid var(--border-color);
    border-radius: 50px;
    font-size: 1.1rem;
    outline: none;
    transition: border-color 0.3s;
}

.search-input:focus {
    border-color: var(--primary-color);
}

.search-btn {
    position: absolute;
    right: 10px;
    top: 50%;
    transform: translateY(-50%);
    background: var(--primary-color);
    color: var(--white);
    border: none;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.3s;
}

.search-btn:hover {
    background: var(--primary-dark);
}

/* 热门技术推荐 */
.featured-tech-section {
    padding: 4rem 0;
    background: var(--white);
}

.featured-grid {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 2rem;
}

.featured-card {
    position: relative;
    border-radius: var(--border-radius);
    overflow: hidden;
    box-shadow: var(--shadow);
    transition: transform 0.3s;
}

.featured-card:hover {
    transform: translateY(-5px);
}

.featured-card img {
    width: 100%;
    height: 300px;
    object-fit: cover;
}

.featured-badge {
    position: absolute;
    top: 1rem;
    left: 1rem;
    background: var(--secondary-color);
    color: var(--white);
    padding: 0.5rem 1rem;
    border-radius: 20px;
    font-weight: bold;
    font-size: 0.9rem;
}

.featured-content {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(transparent, rgba(0, 0, 0, 0.8));
    color: var(--white);
    padding: 2rem;
}

.tech-category {
    background: var(--primary-color);
    color: var(--white);
    padding: 0.3rem 0.8rem;
    border-radius: 15px;
    font-size: 0.8rem;
    font-weight: 600;
}

.featured-content h3 {
    font-size: 1.5rem;
    margin: 0.5rem 0;
    line-height: 1.3;
}

.tech-meta {
    font-size: 0.9rem;
    opacity: 0.9;
    margin-bottom: 1rem;
}

.featured-sidebar {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.sidebar-card {
    display: flex;
    background: var(--white);
    border-radius: var(--border-radius);
    overflow: hidden;
    box-shadow: var(--shadow);
    transition: transform 0.3s;
}

.sidebar-card:hover {
    transform: translateX(5px);
}

.sidebar-card img {
    width: 120px;
    height: 80px;
    object-fit: cover;
    flex-shrink: 0;
}

.sidebar-content {
    padding: 1rem;
    flex: 1;
}

.sidebar-content h4 {
    font-size: 1rem;
    margin-bottom: 0.5rem;
    color: var(--text-dark);
    line-height: 1.3;
}

.views {
    font-size: 0.8rem;
    color: var(--text-light);
}

/* 技术文章列表 */
.tech-list-section {
    padding: 3rem 0;
    background: var(--background-light);
}

.tech-content {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 3rem;
}

.tech-filters {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
    padding: 1rem;
    background: var(--white);
    border-radius: var(--border-radius);
    box-shadow: var(--shadow);
}

.filter-group {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.filter-group label {
    font-weight: 600;
    color: var(--text-dark);
}

.filter-select {
    padding: 0.5rem 1rem;
    border: 1px solid var(--border-color);
    border-radius: 5px;
    background: var(--white);
}

.result-count {
    color: var(--text-light);
    font-size: 0.9rem;
}

/* 技术文章样式 */
.tech-articles {
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

.tech-article {
    display: flex;
    background: var(--white);
    border-radius: var(--border-radius);
    box-shadow: var(--shadow);
    overflow: hidden;
    transition: all 0.3s;
}

.tech-article:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15);
}

.article-image {
    flex: 0 0 300px;
    align-items: center;
    display: flex;
    padding-left: 1rem;
}

.article-image img {
    width: 100%;
    height: 200px;
    object-fit: cover;
    border-radius: 0.5rem;
}

.article-content {
    flex: 1;
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
}

.article-category {
    display: inline-block;
    background: var(--primary-light);
    color: var(--white);
    padding: 0.3rem 0.8rem;
    border-radius: 15px;
    font-size: 0.8rem;
    font-weight: 600;
    margin-bottom: 1rem;
}

.article-content h3 {
    margin-bottom: 1rem;
}

.article-content h3 a {
    color: var(--text-dark);
    text-decoration: none;
    transition: color 0.3s;
    font-size: 1.3rem;
    line-height: 1.4;
}

.article-content h3 a:hover {
    color: var(--primary-color);
}

.article-meta {
    display: flex;
    gap: 1.5rem;
    margin-bottom: 1rem;
    font-size: 0.9rem;
    color: var(--text-light);
}

.article-excerpt {
    color: var(--text-light);
    line-height: 1.6;
    margin-bottom: 1rem;
    flex: 1;
}

.article-tags {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.tag {
    background: var(--background-light);
    color: var(--text-light);
    padding: 0.3rem 0.8rem;
    border-radius: 15px;
    font-size: 0.8rem;
    transition: all 0.3s;
}

.tag:hover {
    background: var(--primary-light);
    color: var(--white);
    cursor: pointer;
}

/* 分页样式 */
.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 0.5rem;
    margin-top: 3rem;
}

.page-btn {
    padding: 0.8rem 1.2rem;
    border: 1px solid var(--border-color);
    background: var(--white);
    color: var(--text-dark);
    border-radius: 5px;
    cursor: pointer;
    transition: all 0.3s;
}

.page-btn:hover:not(.disabled):not(.active) {
    border-color: var(--primary-color);
    color: var(--primary-color);
}

.page-btn.active {
    background: var(--primary-color);
    color: var(--white);
    border-color: var(--primary-color);
}

.page-btn.disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.page-ellipsis {
    padding: 0.8rem 0.5rem;
    color: var(--text-light);
}

/* 侧边栏样式 */
.tech-sidebar {
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

.sidebar-widget {
    background: var(--white);
    border-radius: var(--border-radius);
    box-shadow: var(--shadow);
    padding: 1.5rem;
}

.sidebar-widget h3 {
    color: var(--primary-dark);
    margin-bottom: 1rem;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid var(--primary-light);
}

/* 分类列表 */
.category-list {
    list-style: none;
}

.category-list li {
    margin-bottom: 0.5rem;
}

.category-link {
    display: flex;
    justify-content: space-between;
    padding: 0.8rem;
    color: var(--text-dark);
    text-decoration: none;
    border-radius: 5px;
    transition: all 0.3s;
}

.category-link:hover,
.category-link.active {
    background: var(--primary-light);
    color: var(--white);
}

.count {
    background: var(--background-light);
    color: var(--text-light);
    padding: 0.2rem 0.5rem;
    border-radius: 10px;
    font-size: 0.8rem;
}

.category-link.active .count {
    background: rgba(255, 255, 255, 0.2);
    color: var(--white);
}

/* 热门文章 */
.popular-articles {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.popular-article {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 0.8rem;
    border-radius: 5px;
    transition: background 0.3s;
}

.popular-article:hover {
    background: var(--background-light);
}

.rank {
    background: var(--primary-color);
    color: var(--white);
    width: 24px;
    height: 24px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.8rem;
    font-weight: bold;
}

.popular-content h4 {
    margin-bottom: 0.3rem;
    font-size: 0.9rem;
}

.popular-content h4 a {
    color: var(--text-dark);
    text-decoration: none;
}

.popular-content h4 a:hover {
    color: var(--primary-color);
}

.popular-content .views {
    font-size: 0.8rem;
}

/* 下载区域 */
.download-list {
    display: flex;
    flex-direction: column;
    gap: 0.8rem;
}

.download-item {
    display: flex;
    align-items: center;
    padding: 1rem;
    background: var(--background-light);
    border-radius: 5px;
    text-decoration: none;
    color: var(--text-dark);
    transition: all 0.3s;
    gap: 1rem;
}

.download-item:hover {
    background: var(--primary-light);
    color: var(--white);
    transform: translateX(5px);
}

.file-icon {
    font-size: 1.5rem;
}

.file-name {
    flex: 1;
    font-weight: 500;
}

.file-size {
    font-size: 0.8rem;
    color: var(--text-light);
}

.download-item:hover .file-size {
    color: rgba(255, 255, 255, 0.8);
}

/* 专家咨询 */
.expert-content {
    text-align: center;
}

.expert-content p {
    margin-bottom: 1.5rem;
    color: var(--text-light);
    line-height: 1.5;
}

.consult-btn {
    display: inline-block;
    background: var(--primary-color);
    color: var(--white);
    padding: 0.8rem 2rem;
    border-radius: 25px;
    text-decoration: none;
    font-weight: 600;
    transition: background 0.3s;
}

.consult-btn:hover {
    background: var(--primary-dark);
}

/* 培训通知 */
.training-section {
    padding: 4rem 0;
    background: linear-gradient(135deg, var(--primary-dark) 0%, var(--primary-color) 100%);
}

.training-banner {
    background: url('images/training-bg.jpg') center/cover no-repeat;
    border-radius: var(--border-radius);
    padding: 3rem;
    position: relative;
    overflow: hidden;
}

.training-banner::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.6);
    z-index: 1;
}

.training-content {
    position: relative;
    z-index: 2;
    color: var(--white);
    text-align: center;
    max-width: 600px;
    margin: 0 auto;
}

.training-content h2 {
    font-size: 2.5rem;
    margin-bottom: 1rem;
}

.training-content p {
    font-size: 1.1rem;
    margin-bottom: 2rem;
    opacity: 0.9;
}

.training-info {
    display: flex;
    justify-content: center;
    gap: 2rem;
    margin-bottom: 2rem;
    flex-wrap: wrap;
}

.training-date,
.training-location {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.training-btn {
    display: inline-block;
    background: var(--secondary-color);
    color: var(--white);
    padding: 1rem 2.5rem;
    border-radius: 25px;
    text-decoration: none;
    font-weight: 600;
    font-size: 1.1rem;
    transition: all 0.3s;
}

.training-btn:hover {
    background: #e68900;
    transform: translateY(-2px);
}

/* 搜索高亮 */
mark {
    background: var(--secondary-color);
    color: var(--white);
    padding: 0.1rem 0.3rem;
    border-radius: 3px;
}

/* 响应式设计 */
@media (max-width: 768px) {
    .tech-page-header {
        padding: 80px 0 30px;
    }

    .tech-page-header .page-title {
        font-size: 2rem;
    }

    .tech-categories {
        gap: 0.5rem;
    }

    .category-btn {
        padding: 0.6rem 1rem;
        font-size: 0.9rem;
    }

    .featured-grid {
        grid-template-columns: 1fr;
    }

    .tech-content {
        grid-template-columns: 1fr;
        gap: 2rem;
    }

    .tech-filters {
        flex-direction: column;
        gap: 1rem;
        text-align: center;
    }

    .tech-article {
        flex-direction: column;
    }

    .article-image {
        flex: 0 0 auto;
    }

    .article-meta {
        flex-direction: column;
        gap: 0.5rem;
    }

    .training-content h2 {
        font-size: 2rem;
    }

    .training-info {
        flex-direction: column;
        gap: 1rem;
    }
}

@media (max-width: 480px) {
    .tech-page-header .page-title {
        font-size: 1.8rem;
    }

    .category-btn {
        padding: 0.5rem 0.8rem;
        font-size: 0.8rem;
    }

    .pagination {
        flex-wrap: wrap;
    }

    .training-content {
        padding: 0 1rem;
    }

    .training-content h2 {
        font-size: 1.8rem;
    }
}

/* 动画效果 */
.tech-article {
    animation: fadeInUp 0.6s ease-out;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* 性能优化 */
@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* loading样式 */
/* 加载动画容器 - 固定全屏 */
.loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(25, 25, 35, 0.92);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 9999;
    opacity: 1;
    transition: opacity 0.5s ease;
}

/* 加载动画主体 */
.loader {
    width: 120px;
    height: 120px;
    position: relative;
}

/* 外圈旋转圆环 */
.outer-ring {
    width: 120px;
    height: 120px;
    border-radius: 50%;
    border: 4px solid transparent;
    border-top: 4px solid #3498db;
    border-right: 4px solid #2ecc71;
    animation: spin 1.5s linear infinite;
}

/* 内圈旋转圆环 */
.inner-ring {
    position: absolute;
    top: 20px;
    left: 20px;
    width: 80px;
    height: 80px;
    border-radius: 50%;
    border: 3px solid transparent;
    border-top: 3px solid #e74c3c;
    border-right: 3px solid #f39c12;
    animation: spinReverse 1.2s linear infinite;
}

/* 中心圆点 */
.center-dot {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 20px;
    height: 20px;
    background: linear-gradient(45deg, #9b59b6, #1abc9c);
    border-radius: 50%;
    box-shadow: 0 0 15px rgba(155, 89, 182, 0.7);
}

/* 加载文字 */
.loading-text {
    color: white;
    margin-top: 2rem;
    text-align: center;
    font-size: 1.2rem;
    font-weight: 500;
    letter-spacing: 1px;
}

.loading-text span {
    display: inline-block;
    animation: pulse 1.5s infinite;
    animation-delay: calc(0.1s * var(--i));
}

/* 动画定义 */
@keyframes spin {
    0% {
        transform: rotate(0deg);
    }

    100% {
        transform: rotate(360deg);
    }
}

@keyframes spinReverse {
    0% {
        transform: rotate(0deg);
    }

    100% {
        transform: rotate(-360deg);
    }
}

@keyframes pulse {

    0%,
    100% {
        opacity: 0.4;
    }

    50% {
        opacity: 1;
    }
}

/* 响应式调整 */
@media (max-width: 768px) {
    .loader {
        width: 90px;
        height: 90px;
    }

    .outer-ring {
        width: 90px;
        height: 90px;
    }

    .inner-ring {
        width: 60px;
        height: 60px;
        top: 15px;
        left: 15px;
    }

    .loading-text {
        font-size: 1rem;
    }
}