/* 
 * 文章内容页样式文件
 * 包含：页面布局、英雄区、文章内容、卡片、相关文章、订阅区、页脚等模块
 */

/* ==================== 页面基础布局 ==================== */
.content-wrapper {
    margin-top: 80px;
}

body {
    margin: 0;
    padding: 0;
}

nav {
    top: 0 !important;
}

/* ==================== 英雄区 (Hero Section) ==================== */
.hero-section {
    background: linear-gradient(135deg, #f3f4f6 0%, #e5e7eb 100%);
    padding: 4rem 0;
    position: relative;
    overflow: hidden;
}

.hero-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><defs><pattern id="grain" width="100" height="100" patternUnits="userSpaceOnUse"><circle cx="25" cy="25" r="1" fill="%23ffffff" opacity="0.1"/><circle cx="75" cy="75" r="1" fill="%23ffffff" opacity="0.1"/><circle cx="25" cy="75" r="1" fill="%23ffffff" opacity="0.1"/><circle cx="75" cy="25" r="1" fill="%23ffffff" opacity="0.1"/></pattern></defs><rect width="100" height="100" fill="url(%23grain)"/></svg>');
    opacity: 0.3;
}

.hero-container {
    max-width: 800px;
    margin: 0 auto;
    padding: 0 1.5rem;
    text-align: center;
    position: relative;
    z-index: 1;
}

.article-category {
    display: inline-block;
    background: rgba(99, 102, 241, 0.1);
    color: var(--primary-color);
    padding: 0.5rem 1rem;
    border-radius: 50px;
    font-size: 0.875rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 1.5rem;
}

.article-title {
    font-size: 2.5rem;
    font-weight: 800;
    line-height: 1.2;
    margin-bottom: 1.5rem;
    background: linear-gradient(135deg, #3b82f6, #8b5cf6);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.article-meta {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 2rem;
    margin-bottom: 2rem;
    color: var(--light-text);
    font-size: 0.875rem;
}

.meta-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.author-info {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 2rem;
}

.author-avatar {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    object-fit: cover;
    border: 3px solid white;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

.author-details h3 {
    margin: 0;
    font-size: 1.125rem;
    font-weight: 600;
}

.author-details p {
    margin: 0;
    color: var(--light-text);
    font-size: 0.875rem;
}

.article-featured-image {
    width: 100%;
    max-width: 800px;
    height: 400px;
    object-fit: cover;
    border-radius: 16px;
    margin: 2rem auto;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
}

.article-summary {
    background: white;
    padding: 2rem;
    border-radius: 16px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.05);
    margin: 2rem auto;
    max-width: 700px;
    border-left: 4px solid var(--primary-color);
}

.article-summary h3 {
    margin: 0 0 1rem 0;
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--primary-color);
}

.article-summary p {
    margin: 0;
    color: var(--light-text);
    font-size: 1.05rem;
}

/* ==================== 文章内容区域 ==================== */
.article-content {
    max-width: 1200px;
    margin: 4rem auto;
    padding: 0 1.5rem;
}

.content-section {
    background: white;
    border-radius: 20px;
    padding: 3rem;
    margin-bottom: 3rem;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.05);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.content-section:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.08);
}

.content-section h2 {
    font-size: 1.875rem;
    font-weight: 700;
    margin: 0 0 1.5rem 0;
    color: var(--primary-color);
    position: relative;
    padding-bottom: 0.75rem;
}

.content-section h2::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 60px;
    height: 3px;
    background: linear-gradient(90deg, var(--primary-color), var(--secondary-color));
    border-radius: 3px;
}

.content-section h3 {
    font-size: 1.5rem;
    font-weight: 600;
    margin: 2rem 0 1rem 0;
    color: var(--secondary-color);
}

.content-section p {
    margin: 0 0 1.5rem 0;
    font-size: 1.05rem;
    color: var(--light-text);
    line-height: 1.8;
}

.content-section ul,
.content-section ol {
    margin: 0 0 1.5rem 0;
    padding-left: 1.5rem;
}

.content-section li {
    margin-bottom: 0.75rem;
    color: var(--light-text);
}

.content-section li strong {
    color: var(--primary-color);
    font-weight: 600;
}

/* ==================== 特色卡片 ==================== */
.feature-card {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: white;
    border-radius: 16px;
    padding: 2rem;
    margin: 2rem 0;
    box-shadow: 0 15px 35px rgba(99, 102, 241, 0.3);
}

.feature-card h4 {
    margin: 0 0 1rem 0;
    font-size: 1.25rem;
    font-weight: 600;
}

.feature-card ul {
    margin: 0;
    padding-left: 1.5rem;
}

.feature-card li {
    margin-bottom: 0.5rem;
    color: rgba(255, 255, 255, 0.9);
}

/* ==================== 交互元素 ==================== */
.interactive-buttons {
    display: flex;
    gap: 1rem;
    margin: 3rem 0;
    justify-content: center;
}

.interactive-btn {
    background: white;
    border: 2px solid var(--primary-color);
    color: var(--primary-color);
    padding: 1rem 2rem;
    border-radius: 50px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.interactive-btn:hover {
    background: var(--primary-color);
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(99, 102, 241, 0.3);
}

/* ==================== 相关文章区域 ==================== */
.related-articles {
    background: linear-gradient(135deg, #f3f4f6 0%, #e5e7eb 100%);
    padding: 4rem 0;
    margin-top: 4rem;
}

.related-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1.5rem;
}

.related-title {
    text-align: center;
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: 3rem;
    color: var(--text-color);
}

.related-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
}

.related-card {
    background: white;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.05);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.related-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
}

.related-card-content {
    padding: 1.5rem;
}

.related-card-category {
    display: inline-block;
    background: rgba(99, 102, 241, 0.1);
    color: var(--primary-color);
    padding: 0.25rem 0.75rem;
    border-radius: 50px;
    font-size: 0.75rem;
    font-weight: 600;
    margin-bottom: 1rem;
}

.related-card-title {
    font-size: 1.25rem;
    font-weight: 600;
    margin: 0 0 1rem 0;
    color: var(--text-color);
}

.related-card-excerpt {
    color: var(--light-text);
    font-size: 0.875rem;
    margin: 0 0 1.5rem 0;
    line-height: 1.6;
}

.related-card-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.75rem;
    color: var(--light-text);
}

.related-card-link {
    color: var(--primary-color);
    font-weight: 600;
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 0.25rem;
    transition: color 0.3s ease;
}

.related-card-link:hover {
    color: var(--secondary-color);
}

/* ==================== 订阅区域 ==================== */
.subscribe-section {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: white;
    padding: 4rem 0;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.subscribe-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><defs><pattern id="dots" width="20" height="20" patternUnits="userSpaceOnUse"><circle cx="10" cy="10" r="2" fill="%23ffffff" opacity="0.1"/></pattern></defs><rect width="100" height="100" fill="url(%23dots)"/></svg>');
}

.subscribe-container {
    max-width: 600px;
    margin: 0 auto;
    padding: 0 1.5rem;
    position: relative;
    z-index: 1;
}

.subscribe-title {
    font-size: 2rem;
    font-weight: 700;
    margin: 0 0 1rem 0;
}

.subscribe-description {
    font-size: 1.125rem;
    margin: 0 0 2rem 0;
    opacity: 0.9;
}

.subscribe-form {
    display: flex;
    gap: 1rem;
    max-width: 500px;
    margin: 0 auto;
}

.subscribe-input {
    flex: 1;
    padding: 1rem 1.5rem;
    border: none;
    border-radius: 50px;
    font-size: 1rem;
    outline: none;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.subscribe-button {
    background: var(--accent-color);
    color: white;
    padding: 1rem 2rem;
    border: none;
    border-radius: 50px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 5px 15px rgba(236, 72, 153, 0.3);
}

.subscribe-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(236, 72, 153, 0.4);
}

/* ==================== 页脚样式 ==================== */
.modern-footer {
    background: var(--text-color);
    color: white;
    padding: 3rem 0 1rem 0;
}

.footer-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1.5rem;
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
    margin-bottom: 2rem;
}

.footer-section h3 {
    font-size: 1.25rem;
    font-weight: 600;
    margin: 0 0 1rem 0;
    color: var(--primary-color);
}

.footer-section p,
.footer-section li {
    margin: 0 0 0.5rem 0;
    color: #9ca3af;
    font-size: 0.875rem;
}

.footer-section ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.footer-section a {
    color: #9ca3af;
    text-decoration: none;
    transition: color 0.3s ease;
}

.footer-section a:hover {
    color: var(--primary-color);
}

.footer-bottom {
    border-top: 1px solid #374151;
    padding-top: 1rem;
    text-align: center;
    color: #9ca3af;
    font-size: 0.875rem;
}

/* ==================== 返回顶部按钮 ==================== */
.back-to-top {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    width: 50px;
    height: 50px;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: #d60f0f;
    border: none;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: 0 5px 15px rgba(99, 102, 241, 0.3);
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    z-index: 40;
}

.back-to-top.visible {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.back-to-top:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 20px rgba(99, 102, 241, 0.4);
}

/* ==================== 响应式设计 ==================== */
@media (max-width: 768px) {
    .nav-links {
        display: none;
    }

    .mobile-menu-btn {
        display: block;
    }

    .mobile-menu {
        position: fixed;
        top: 80px;
        left: 0;
        right: 0;
        background: white;
        padding: 1rem 0;
        box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1);
        transform: translateY(-100%);
        opacity: 0;
        visibility: hidden;
        transition: all 0.3s ease;
        z-index: 45;
    }

    .mobile-menu.active {
        transform: translateY(0);
        opacity: 1;
        visibility: visible;
    }

    .mobile-menu-links {
        list-style: none;
        padding: 0;
        margin: 0;
        display: flex;
        flex-direction: column;
        gap: 1rem;
        padding: 0 1.5rem;
    }

    .mobile-menu-links a {
        text-decoration: none;
        color: var(--text-color);
        font-weight: 500;
        padding: 0.5rem 0;
        transition: color 0.3s ease;
    }

    .mobile-menu-links a:hover {
        color: var(--primary-color);
    }

    .article-title {
        font-size: 2rem;
    }

    .article-meta {
        flex-direction: column;
        gap: 1rem;
    }

    .article-featured-image {
        height: 250px;
    }

    .content-section {
        padding: 2rem;
    }

    .content-section h2 {
        font-size: 1.5rem;
    }

    .content-section h3 {
        font-size: 1.25rem;
    }

    .interactive-buttons {
        flex-direction: column;
        align-items: center;
    }

    .interactive-btn {
        width: 100%;
        max-width: 300px;
        justify-content: center;
    }

    .subscribe-form {
        flex-direction: column;
    }
}

@media (max-width: 480px) {
    .article-title {
        font-size: 1.75rem;
    }

    .content-section {
        padding: 1.5rem;
    }

    .article-summary {
        padding: 1.5rem;
    }
}