/* ==========================================
   牛僧站长网 - 主样式文件
   参考HubSpot设计风格
========================================== */

/* CSS变量定义 */
:root {
    /* 主色调 */
    --primary-color: #ff7a59;
    --primary-hover: #e5654b;
    --secondary-color: #33475b;
    --accent-color: #0091ae;
    
    /* 背景色 */
    --bg-primary: #ffffff;
    --bg-secondary: #f8fafc;
    --bg-tertiary: #f1f5f9;
    --bg-dark: #1e293b;
    
    /* 文字颜色 */
    --text-primary: #1e293b;
    --text-secondary: #64748b;
    --text-muted: #94a3b8;
    --text-white: #ffffff;
    
    /* 边框颜色 */
    --border-light: #e2e8f0;
    --border-medium: #cbd5e1;
    
    /* 阴影 */
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
    --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1);
    
    /* 间距 */
    --container-max-width: 1200px;
    --content-padding: 20px;
    
    /* 响应式断点 */
    --mobile: 768px;
    --tablet: 1024px;
}

/* 基础重置 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    font-size: 16px;
    scroll-behavior: smooth;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    line-height: 1.6;
    color: var(--text-primary);
    background-color: var(--bg-primary);
    font-size: 16px;
    padding-top: 75px;
}

@media (max-width: 900px) {
    body {
        padding-top: 65px;
    }
}

/* 响应式容器 */
.container {
    max-width: var(--container-max-width);
    margin: 0 auto;
    padding: 0 var(--content-padding);
}

/* ==========================================
   首页样式
========================================== */

.home-page {
    min-height: 100vh;
}

/* 英雄区域 */
.hero-section {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: var(--text-white);
    padding: 100px 0 80px;
    position: relative;
    overflow: hidden;
}

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

.hero-content {
    position: relative;
    z-index: 2;
    text-align: center;
    max-width: 800px;
    margin: 0 auto;
}

.hero-title {
    font-size: 3.5rem;
    font-weight: 700;
    margin-bottom: 20px;
    text-shadow: 0 2px 4px rgba(0,0,0,0.3);
}

.hero-subtitle {
    font-size: 1.3rem;
    margin-bottom: 40px;
    opacity: 0.9;
}

.cta-buttons {
    display: flex;
    gap: 20px;
    justify-content: center;
    flex-wrap: wrap;
}

.btn-primary {
    background: var(--primary-color);
    color: white;
    padding: 15px 30px;
    border: none;
    border-radius: 8px;
    font-size: 1.1rem;
    font-weight: 600;
    text-decoration: none;
    display: inline-block;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(255, 122, 89, 0.3);
}

.btn-primary:hover {
    background: var(--primary-hover);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(255, 122, 89, 0.4);
}

.btn-secondary {
    background: transparent;
    color: white;
    padding: 15px 30px;
    border: 2px solid white;
    border-radius: 8px;
    font-size: 1.1rem;
    font-weight: 600;
    text-decoration: none;
    display: inline-block;
    transition: all 0.3s ease;
}

.btn-secondary:hover {
    background: white;
    color: var(--secondary-color);
}

/* 主要特色文章 - 仅在非HubSpot首页中生效 */
body:not(.hubspot-homepage) .hero-featured {
    background: #2d3748;
    color: white;
    padding: 80px 0;
}

.featured-main {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 60px;
    align-items: center;
}

.featured-image img {
    width: 100%;
    height: 400px;
    object-fit: cover;
    border-radius: 12px;
}

.placeholder-image {
    width: 100%;
    height: 400px;
    background: rgba(255,255,255,0.1);
    border-radius: 12px;
    border: 2px dashed rgba(255,255,255,0.3);
}

.featured-title {
    font-size: 2.5rem;
    font-weight: 700;
    line-height: 1.2;
    margin-bottom: 20px;
}

.featured-title a {
    color: white;
    text-decoration: none;
}

.featured-title a:hover {
    color: #ff6b35;
}

.featured-excerpt {
    font-size: 1.1rem;
    line-height: 1.6;
    margin-bottom: 25px;
    opacity: 0.9;
}

.featured-meta {
    display: flex;
    gap: 20px;
    font-size: 0.9rem;
    opacity: 0.8;
}

/* 精选教程优化 */
.featured-posts {
    padding: 60px 0; /* 减少上下padding */
    background: #fff;
}

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px; /* 减少底部margin */
    /* 移除border-bottom */
}

.section-title {
    font-size: 1.8rem;
    font-weight: 600;
    color: var(--text-primary);
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 0; /* 移除默认margin */
}

.section-title .icon {
    font-size: 1.5rem;
}

.section-more {
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 500;
    font-size: 0.9rem;
    transition: color 0.3s ease;
}

/* 内容区块 */
.content-section {
    margin-bottom: 40px; /* 减少间距 */
}

.posts-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 25px; /* 减少gap */
}

.post-card {
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    padding: 20px; /* 减少padding */
    transition: box-shadow 0.3s ease;
}

.post-card:hover {
    box-shadow: 0 10px 25px rgba(0,0,0,0.1);
}

.card-meta {
    margin-bottom: 12px; /* 减少margin */
}

.category {
    background: #ff6b35;
    color: white;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 600;
    margin-right: 10px;
}

.date {
    color: #718096;
    font-size: 0.9rem;
}

.card-title {
    font-size: 1.2rem; /* 稍微减小字体 */
    font-weight: 600;
    line-height: 1.3; /* 减少行高 */
    margin-bottom: 10px; /* 减少margin */
    /* 限制最多两行显示 */
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
}

.card-title a {
    color: #2d3748;
    text-decoration: none;
}

.card-title a:hover {
    color: #ff6b35;
}

/* AI内容网格 */
.ai-content-grid {
    padding: 60px 0; /* 减少padding */
    background: #f8f9fa;
}

.content-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 25px; /* 减少gap */
}

.content-card {
    background: white;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
    transition: transform 0.3s ease;
}

.content-card:hover {
    transform: translateY(-3px);
}

.card-image {
    height: 200px;
    overflow: hidden;
}

.card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

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

.card-body {
    padding: 20px; /* 减少padding */
}

/* SEO栏目优化 */
.seo-section {
    padding: 50px 0; /* 减少上下padding */
}

.seo-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 25px; /* 减少gap */
}

.seo-card {
    border-left: 4px solid #ff6b35;
    padding: 20px; /* 减少padding */
    background: #f8f9fa;
    border-radius: 0 8px 8px 0;
}

.seo-card .card-title {
    font-size: 1.1rem;
    margin-bottom: 8px;
}

.seo-card .card-excerpt {
    font-size: 0.95rem;
    color: #64748b;
    margin-bottom: 10px;
    /* 限制3行显示 */
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.seo-card .card-meta {
    font-size: 0.85rem;
    margin-bottom: 0;
}

/* 资源库 - 仅在非HubSpot首页中生效 */
body:not(.hubspot-homepage) .resource-library {
    padding: 60px 0; /* 减少padding */
    background: #2d3748;
    color: white;
}

.resource-library .section-title {
    color: white;
    border-bottom-color: #ff6b35;
}

.carousel-container {
    position: relative;
    overflow: hidden;
    border-radius: 12px;
}

.resource-slide {
    display: none;
    grid-template-columns: 1fr 1fr;
    gap: 40px;
    align-items: center;
}

.resource-slide.active {
    display: grid;
}

.slide-image img {
    width: 100%;
    height: 300px;
    object-fit: cover;
    border-radius: 8px;
}

.slide-title {
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: 15px;
}

.slide-title a {
    color: white;
    text-decoration: none;
}

.slide-title a:hover {
    color: #ff6b35;
}

.slide-meta {
    display: flex;
    gap: 20px;
    font-size: 0.9rem;
    opacity: 0.8;
}

.carousel-controls {
    display: flex;
    justify-content: center;
    gap: 20px;
    margin-top: 30px;
}

.prev-btn, .next-btn {
    background: #ff6b35;
    color: white;
    border: none;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    font-size: 1.5rem;
    cursor: pointer;
    transition: background 0.3s ease;
}

.prev-btn:hover, .next-btn:hover {
    background: #e55a2b;
}

.carousel-indicators {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin-top: 20px;
}

.indicator {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: rgba(255,255,255,0.3);
    cursor: pointer;
    transition: background 0.3s ease;
}

.indicator.active {
    background: #ff6b35;
}

/* 资讯栏目优化 */
.news-section {
    padding: 50px 0; /* 减少padding */
}

.news-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 25px; /* 减少gap */
}

.news-card {
    background: white;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    overflow: hidden;
    transition: box-shadow 0.3s ease;
}

.news-card:hover {
    box-shadow: 0 10px 25px rgba(0,0,0,0.1);
}

.news-card .card-image {
    height: 200px;
    overflow: hidden;
}

.news-card .card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.news-card .card-content {
    padding: 20px; /* 减少padding */
}

.news-card .card-title {
    font-size: 1.1rem;
    margin-bottom: 8px;
}

.news-card .card-excerpt {
    font-size: 0.95rem;
    color: #64748b;
    margin-bottom: 10px;
    /* 限制3行显示 */
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.news-card .card-meta {
    font-size: 0.85rem;
    margin-bottom: 0; /* 移除底部margin */
}

/* 精品资源推荐区域 */
.premium-resources {
    padding: 60px 0;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

.premium-resources .section-header {
    margin-bottom: 40px;
}

.premium-resources .section-title {
    color: white;
    font-size: 2rem;
    font-weight: 700;
}

.premium-resources .view-more {
    color: rgba(255,255,255,0.9);
    border: 1px solid rgba(255,255,255,0.3);
    padding: 8px 16px;
    border-radius: 6px;
    transition: all 0.3s ease;
}

.premium-resources .view-more:hover {
    background: rgba(255,255,255,0.1);
    color: white;
}

.resources-showcase {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr;
    gap: 30px;
    align-items: start;
}

.resource-highlight {
    background: white;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 10px 25px rgba(0,0,0,0.15);
    transition: transform 0.3s ease;
}

.resource-highlight:hover {
    transform: translateY(-5px);
}

.resource-highlight.featured {
    grid-row: 1 / 3;
}

.resource-image {
    position: relative;
    height: 200px;
    overflow: hidden;
}

.resource-highlight.featured .resource-image {
    height: 300px;
}

.resource-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.resource-highlight:hover .resource-image img {
    transform: scale(1.05);
}

.featured-badge {
    position: absolute;
    top: 15px;
    right: 15px;
    background: #ff6b35;
    color: white;
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 600;
    box-shadow: 0 2px 8px rgba(255,107,53,0.3);
}

.resource-content {
    padding: 20px;
}

.resource-highlight.featured .resource-content {
    padding: 25px;
}

.resource-title {
    font-size: 1.2rem;
    font-weight: 600;
    margin-bottom: 10px;
    line-height: 1.3;
    /* 限制最多两行显示 */
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.resource-highlight.featured .resource-title {
    font-size: 1.4rem;
    margin-bottom: 15px;
}

.resource-title a {
    color: #2d3748;
    text-decoration: none;
}

.resource-title a:hover {
    color: #ff6b35;
}

.resource-excerpt {
    color: #64748b;
    font-size: 0.95rem;
    line-height: 1.5;
    margin-bottom: 15px;
    /* 限制3行显示 */
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.resource-highlight.featured .resource-excerpt {
    font-size: 1rem;
    -webkit-line-clamp: 4;
}

.resource-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.85rem;
    padding-top: 12px;
    border-top: 1px solid #e2e8f0;
}

.resource-type {
    background: #e3f2fd;
    color: #1976d2;
    padding: 4px 8px;
    border-radius: 4px;
    font-weight: 500;
}

.resource-date {
    color: #718096;
}

/* 社区栏目优化 */
.community-section {
    padding: 50px 0; /* 减少padding */
    background: #f8f9fa;
}

.community-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 25px; /* 减少gap */
}

.community-card {
    background: white;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
    transition: transform 0.3s ease;
}

.community-card:hover {
    transform: translateY(-3px); /* 减少hover效果 */
}

.community-card .card-image {
    height: 200px;
    overflow: hidden;
}

.community-card .card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.community-card .card-content {
    padding: 20px; /* 减少padding */
}

.community-card .card-title {
    font-size: 1.1rem;
    margin-bottom: 8px;
}

.community-card .card-excerpt {
    font-size: 0.95rem;
    color: #64748b;
    margin-bottom: 10px;
    /* 限制3行显示 */
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.community-card .card-meta {
    font-size: 0.85rem;
    margin-bottom: 0; /* 移除底部margin */
}

/* 订阅区域已删除 */

/* 查看更多链接 */
.view-more {
    color: #ff6b35;
    text-decoration: none;
    font-weight: 600;
    font-size: 0.9rem;
}

.view-more:hover {
    text-decoration: underline;
}

/* 响应式设计 */
@media (max-width: 768px) {
    .hero-title {
        font-size: 2.5rem;
    }
    
    .featured-main {
        grid-template-columns: 1fr;
        gap: 30px;
    }
    
    .posts-grid,
    .content-grid,
    .seo-grid,
    .news-grid,
    .community-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    
         .resources-showcase {
         grid-template-columns: 1fr;
         gap: 20px;
     }
     
     .resource-highlight.featured {
         grid-row: auto;
     }
     
     .resource-highlight.featured .resource-image {
         height: 200px;
     }
    
    .resource-slide {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    
    .cta-buttons {
        flex-direction: column;
        align-items: center;
    }
    
    .form-group {
        flex-direction: column;
    }
}

@media (max-width: 480px) {
    .container {
        padding: 0 15px;
    }
    
    .hero-title {
        font-size: 2rem;
    }
    
    .featured-posts,
    .ai-content-grid,
    .seo-section,
    .news-section,
    .community-section {
        padding: 40px 0;
    }
    
    .post-card,
    .seo-card,
    .news-card .card-content,
    .community-card .card-content {
        padding: 15px;
    }
}

/* ============================================
   错误页面样式
   ============================================ */

/* 错误页面专用body样式 */
body.error-page {
    background: #f5f7fa;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

.error-container {
    max-width: 500px;
    margin: 0 auto;
    background: white;
    padding: 60px 40px;
    border-radius: 20px;
    box-shadow: 0 20px 60px rgba(0,0,0,0.1);
    text-align: center;
}

.error-icon {
    font-size: 80px;
    margin-bottom: 30px;
}

.error-container h1 {
    color: #e74c3c;
    margin-bottom: 20px;
    font-size: 36px;
}

.error-container p {
    color: #7f8c8d;
    margin-bottom: 40px;
    font-size: 18px;
    line-height: 1.6;
}

.error-container .btn {
    display: inline-block;
    padding: 12px 30px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    text-decoration: none;
    border-radius: 25px;
    font-weight: 600;
    transition: all 0.3s ease;
    margin: 0 10px;
}

.error-container .btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(102, 126, 234, 0.4);
}

.back-link {
    margin-top: 20px;
    font-size: 14px;
}

.back-link a {
    color: #3498db;
    text-decoration: none;
}

.back-link a:hover {
    text-decoration: underline;
}

.debug-info {
    margin-top: 30px;
    padding: 15px;
    background: #f8f9fa;
    border-radius: 8px;
    text-align: left;
    font-size: 12px;
    color: #666;
}

/* 订阅区域样式已删除 */

/* Footer相关样式已移至 footer.css */

/* 文章相关样式已移至 article.css */

/* 响应式设计 */
@media (max-width: 768px) {
    
    /* Newsletter响应式样式已删除 */
    
    /* Newsletter相关响应式样式已全部删除 */
    
    /* Footer响应式样式已移至 footer.css */
    
}

@media (max-width: 480px) {
    /* Footer响应式样式已移至 footer.css */
} 