/* ========================================
   模板页面自定义样式 - 从模板文件迁移
   ======================================== */

/* ----------------------------------------
   轮播进度条动画
   ---------------------------------------- */
@keyframes progressBar {
    0% {
        width: 0%
    }
    100% {
        width: 100%
    }
}

/* ----------------------------------------
   行业卡片滚动样式
   ---------------------------------------- */
.industry-scroll-wrapper {
    width: 100%;
    overflow: hidden;
}

.industry-scroll-track {
    display: flex;
    gap: 16px;
    animation: industryScroll 40s linear infinite;
    width: max-content;
}

.industry-scroll-track:hover {
    animation-play-state: paused;
}

.industry-card {
    flex-shrink: 0;
    width: 200px;
    height: 260px;
    border-radius: 16px;
    overflow: hidden;
    position: relative;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.industry-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
}

.industry-card-image {
    position: absolute;
    inset: 0;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
}

.industry-card-content {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 16px;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.8) 0%, rgba(0, 0, 0, 0.4) 60%, transparent 100%);
    color: white;
}

.industry-card-title {
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 4px;
    color: white;
}

.industry-card-desc {
    font-size: 12px;
    color: rgba(255, 255, 255, 0.8);
    margin: 0;
}

@keyframes industryScroll {
    0% {
        transform: translateX(0);
    }
    100% {
        transform: translateX(-50%);
    }
}

@media (max-width: 640px) {
    .industry-scroll-track {
        gap: 12px;
    }

    .industry-card {
        width: 160px;
        height: 210px;
        border-radius: 12px;
    }

    .industry-card-content {
        padding: 12px;
    }

    .industry-card-title {
        font-size: 15px;
    }

    .industry-card-desc {
        font-size: 11px;
    }
}

/* ----------------------------------------
   商家经营模块 - 标签切换样式
   ---------------------------------------- */
.business-tab {
    background: transparent;
}

.business-tab:not(.active):hover {
    background: rgba(107, 114, 128, 0.6);
}

.business-tab.active {
    background: linear-gradient(270deg, #455FFE 0%, rgba(26, 140, 255, 0) 100%);
}

.business-content-wrapper {
    position: relative;
    min-height: 280px;
}

.business-content {
    display: none;
    opacity: 0;
    transform: translateY(10px);
    transition: opacity 0.3s ease, transform 0.3s ease;
}

.business-content.active {
    display: block;
    opacity: 1;
    transform: translateY(0);
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(15px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.business-content.active {
    animation: fadeInUp 0.35s ease forwards;
}

@media (max-width: 1023px) {
    .business-tab.active {
        background: linear-gradient(90deg, #455FFE 0%, rgba(26, 140, 255, 0.3) 100%);
    }

    .business-content-wrapper {
        min-height: 200px;
    }
}

/* ----------------------------------------
   文章列表页样式
   ---------------------------------------- */
.article-section {
    padding: 40px 16px 60px;
    margin-top: 120px;
}

@media (max-width: 1024px) {
    .article-section {
        margin-top: 80px;
    }
}

@media (max-width: 640px) {
    .article-section {
        margin-top: 60px;
    }
}

.article-wrapper {
    max-width: 1400px;
    margin: 0 auto;
}

.article-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
}

@media (max-width: 1024px) {
    .article-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 640px) {
    .article-grid {
        grid-template-columns: 1fr;
    }
}

.article-card {
    background: #fff;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.06);
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
    text-decoration: none;
}

.article-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
}

.article-card-title {
    padding: 20px 20px 12px;
    font-size: 18px;
    font-weight: 600;
    color: #1e3a8a;
    line-height: 1.5;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.article-card-image {
    position: relative;
    width: 100%;
    padding-top: 56.25%;
    background: #f3f4f6;
    overflow: hidden;
}

.article-card-image img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.article-card:hover .article-card-image img {
    transform: scale(1.05);
}

.article-card-content {
    padding: 16px 20px 20px;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.article-card-desc {
    color: #4b5563;
    font-size: 14px;
    line-height: 1.7;
    flex: 1;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
    margin-bottom: 16px;
}

.article-card-meta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding-top: 12px;
    border-top: 1px solid #f3f4f6;
    font-size: 13px;
    color: #9ca3af;
}

.article-meta-item {
    display: flex;
    align-items: center;
    gap: 4px;
}

.article-meta-item svg {
    width: 16px;
    height: 16px;
}

/* ----------------------------------------
   文章详情页样式
   ---------------------------------------- */
.article-page {
    margin-top: 48px;
    background: #f8fafc;
    flex: 1 0 auto;
}

.article-container {
    max-width: 900px;
    margin: 0 auto;
    padding: 40px 16px 60px;
}

@media (max-width: 768px) {
    .article-container {
        padding: 24px 16px 40px;
    }
}

.breadcrumb {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    color: #6b7280;
    margin-bottom: 24px;
}

.breadcrumb a {
    color: #3b82f6;
    text-decoration: none;
    transition: color 0.2s;
}

.breadcrumb a:hover {
    color: #2563eb;
}

.breadcrumb-sep {
    color: #d1d5db;
}

.article-main {
    background: #fff;
    border-radius: 16px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.06);
    overflow: hidden;
}

.article-header {
    padding: 32px 32px 24px;
    border-bottom: 1px solid #f3f4f6;
}

@media (max-width: 768px) {
    .article-header {
        padding: 24px 20px 20px;
    }
}

.article-title {
    font-size: 28px;
    font-weight: 700;
    color: #1f2937;
    line-height: 1.4;
    margin-bottom: 16px;
}

@media (max-width: 768px) {
    .article-title {
        font-size: 22px;
    }
}

.article-meta {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 16px;
    font-size: 14px;
    color: #9ca3af;
}

.ad-top, .ad-bottom {
    padding: 0 32px;
}

@media (max-width: 768px) {
    .ad-top, .ad-bottom {
        padding: 0 20px;
    }
}

.ad-container {
    background: linear-gradient(135deg, #eff6ff 0%, #dbeafe 100%);
    border-radius: 12px;
    padding: 20px;
    margin: 24px 0;
    text-align: center;
    min-height: 100px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 2px dashed #93c5fd;
}

.ad-placeholder {
    color: #3b82f6;
    font-size: 14px;
}

.article-content {
    padding: 32px;
    font-size: 16px;
    line-height: 1.8;
    color: #374151;
}

@media (max-width: 768px) {
    .article-content {
        padding: 24px 20px;
        font-size: 15px;
    }
}

.article-content h2 {
    font-size: 22px;
    font-weight: 600;
    color: #1f2937;
    margin: 32px 0 16px;
    padding-left: 12px;
    border-left: 4px solid #3b82f6;
}

.article-content h3 {
    font-size: 18px;
    font-weight: 600;
    color: #1f2937;
    margin: 24px 0 12px;
}

.article-content p {
    margin-bottom: 16px;
}

.article-content ul, .article-content ol {
    margin: 16px 0;
    padding-left: 24px;
}

.article-content li {
    margin-bottom: 8px;
}

.article-content img {
    max-width: 100%;
    height: auto;
    border-radius: 8px;
    margin: 16px 0;
}

.article-content a {
    color: #3b82f6;
    text-decoration: none;
}

.article-content a:hover {
    text-decoration: underline;
}

.article-content blockquote {
    background: #f9fafb;
    border-left: 4px solid #3b82f6;
    padding: 16px 20px;
    margin: 16px 0;
    color: #4b5563;
    font-style: italic;
}

.article-footer {
    padding: 24px 32px;
    border-top: 1px solid #f3f4f6;
    display: flex;
    flex-direction: column;
    gap: 20px;
}

@media (max-width: 768px) {
    .article-footer {
        padding: 20px;
    }
}

/* 上下篇导航 */
.article-nav {
    display: flex;
    justify-content: space-between;
    gap: 16px;
    padding-bottom: 20px;
    border-bottom: 1px solid #f3f4f6;
}

.article-nav-prev,
.article-nav-next {
    flex: 1;
    max-width: 48%;
}

.article-nav-next {
    text-align: right;
}

.article-nav-label {
    display: block;
    font-size: 13px;
    color: #9ca3af;
    margin-bottom: 6px;
}

.article-nav-link {
    display: block;
    font-size: 15px;
    color: #374151;
    text-decoration: none;
    line-height: 1.5;
    transition: color 0.2s;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.article-nav-link:hover {
    color: #3b82f6;
}

@media (max-width: 640px) {
    .article-nav {
        flex-direction: column;
        gap: 12px;
    }

    .article-nav-prev,
    .article-nav-next {
        max-width: 100%;
        text-align: left;
    }

    .article-nav-link {
        font-size: 14px;
    }
}

/* 文章底部标签和分享 */
.article-footer-bottom {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    align-items: center;
    gap: 16px;
}

@media (max-width: 768px) {
    .article-footer-bottom {
        flex-direction: column;
        align-items: flex-start;
    }
}

.article-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.article-tag {
    background: #f3f4f6;
    color: #6b7280;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 13px;
    text-decoration: none;
    transition: all 0.2s;
}

.article-tag:hover {
    background: #e5e7eb;
    color: #374151;
}

.article-share {
    display: flex;
    align-items: center;
    gap: 12px;
}

.share-label {
    font-size: 14px;
    color: #6b7280;
}

.share-btn {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #f3f4f6;
    color: #6b7280;
    transition: all 0.2s;
    cursor: pointer;
}

.share-btn:hover {
    background: #3b82f6;
    color: #fff;
}

.share-btn svg {
    width: 18px;
    height: 18px;
}

.related-articles {
    margin-top: 32px;
    background: #fff;
    border-radius: 16px;
    padding: 24px 32px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.06);
}

@media (max-width: 768px) {
    .related-articles {
        padding: 20px;
    }
}

.related-title {
    font-size: 18px;
    font-weight: 600;
    color: #1f2937;
    margin-bottom: 16px;
}

.related-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.related-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px;
    background: #f9fafb;
    border-radius: 8px;
    text-decoration: none;
    transition: all 0.2s;
}

.related-item:hover {
    background: #f3f4f6;
}

.related-item-num {
    width: 28px;
    height: 28px;
    background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%);
    color: #fff;
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    font-weight: 600;
    flex-shrink: 0;
}

.related-item-title {
    flex: 1;
    font-size: 14px;
    color: #374151;
    line-height: 1.5;
}

/* ----------------------------------------
   页脚更多栏目 - 自动分列布局
   ---------------------------------------- */
@media (min-width: 768px) {
    .footer-columns-auto {
        display: grid;
        grid-template-rows: repeat(8, auto);
        grid-auto-flow: column;
        grid-auto-columns: minmax(120px, 1fr);
        gap: 16px 32px;
    }

    .footer-columns-auto li {
        margin: 0;
    }
}
