/* ==========================================
   HubSpot风格首页样式 - 简洁聚焦内容
   参考HubSpot博客首页设计，减少视觉干扰
========================================== */

/* 基础容器 */
.hubspot-homepage {
    background: #ffffff;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Helvetica Neue', Arial, sans-serif;
    line-height: 1.6;
    color: #2d3748;
}

.hubspot-homepage .container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* ==========================================
   主要特色区域 - 左右布局
========================================== */
.hubspot-homepage .hero-main-section {
    padding: 40px 0;
    border-bottom: 1px solid #e2e8f0;
}

.hubspot-homepage .hero-layout {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 60px;
    align-items: start;
}

/* 左侧特色文章 */
.hubspot-homepage .hero-featured {
    position: relative;
}

.hubspot-homepage .featured-story {
    background: #ffffff;
    border-radius: 8px;
    overflow: hidden;
    transition: transform 0.2s ease;
}

.hubspot-homepage .featured-story:hover {
    transform: translateY(-2px);
}

.hubspot-homepage .featured-image {
    position: relative;
    width: 100%;
    height: 400px;
    overflow: hidden;
    border-radius: 8px;
    background-color: #f7fafc;
    display: flex;
    align-items: center;
    justify-content: center;
}

.hubspot-homepage .featured-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
    border-radius: 8px;
    background-color: transparent;
}

.hubspot-homepage .featured-story:hover .featured-image img {
    transform: scale(1.05);
}

.hubspot-homepage .featured-content {
    padding: 30px 0;
}

.hubspot-homepage .featured-title {
    font-size: 2.25rem;
    line-height: 1.2;
    margin-bottom: 16px;
    font-weight: 700;
}

.hubspot-homepage .featured-title a {
    color: #1a202c;
    text-decoration: none;
    transition: color 0.2s ease;
}

.hubspot-homepage .featured-title a:hover {
    color: var(--primary-color, #ff7a59);
}

.hubspot-homepage .featured-excerpt {
    font-size: 1.125rem;
    line-height: 1.6;
    color: #4a5568;
    margin-bottom: 20px;
}

.hubspot-homepage .featured-meta {
    display: flex;
    align-items: center;
    gap: 16px;
    font-size: 0.9rem;
    color: #718096;
}

.hubspot-homepage .featured-meta .author {
    font-weight: 500;
    color: #2d3748;
}

.hubspot-homepage .featured-meta .publish-date {
    color: #718096;
}

/* 右侧精选列表 */
.hubspot-homepage .hero-sidebar {
    position: sticky;
    top: 80px;
}

.hubspot-homepage .hero-sidebar .section-title {
    font-size: 1.375rem;
    font-weight: 700;
    color: #1a202c;
    margin-bottom: 24px;
    border-bottom: 2px solid var(--primary-color, #ff7a59);
    padding-bottom: 8px;
}

.hubspot-homepage .featured-list {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.hubspot-homepage .featured-item {
    padding: 20px 0;
    border-bottom: 1px solid #e2e8f0;
    transition: background-color 0.2s ease;
}

.hubspot-homepage .featured-item:last-child {
    border-bottom: none;
}

.hubspot-homepage .featured-item:hover {
    background-color: #f7fafc;
    padding-left: 8px;
    padding-right: 8px;
    border-radius: 4px;
}

.hubspot-homepage .item-title {
    font-size: 1.1rem;
    line-height: 1.4;
    margin-bottom: 8px;
    font-weight: 600;
}

.hubspot-homepage .item-title a {
    color: #2d3748;
    text-decoration: none;
    transition: color 0.2s ease;
}

.hubspot-homepage .item-title a:hover {
    color: var(--primary-color, #ff7a59);
}

.hubspot-homepage .item-meta {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 0.875rem;
    color: #718096;
}

.hubspot-homepage .item-meta .author {
    font-weight: 500;
    color: #4a5568;
}

/* ==========================================
   营销栏目 - 四个内容卡片
========================================== */
.hubspot-homepage .marketing-section {
    padding: 60px 0;
    background: #f8fafc;
}

.hubspot-homepage .section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 40px;
}

.hubspot-homepage .main-title {
    font-size: 2rem;
    font-weight: 700;
    color: #1a202c;
    margin: 0;
}

.hubspot-homepage .view-more-link {
    color: var(--primary-color, #ff7a59);
    text-decoration: none;
    font-weight: 500;
    font-size: 1rem;
    transition: color 0.2s ease;
}

.hubspot-homepage .view-more-link:hover {
    color: var(--primary-hover, #e5654b);
    text-decoration: underline;
}

.hubspot-homepage .content-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 30px;
}

.hubspot-homepage .content-card {
    background: #ffffff;
    border-radius: 8px;
    padding: 24px;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    border: 1px solid #e2e8f0;
}

.hubspot-homepage .content-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
}

.hubspot-homepage .card-title {
    font-size: 1.25rem;
    line-height: 1.4;
    margin-bottom: 12px;
    font-weight: 600;
}

.hubspot-homepage .card-title a {
    color: #2d3748;
    text-decoration: none;
    transition: color 0.2s ease;
}

.hubspot-homepage .card-title a:hover {
    color: var(--primary-color, #ff7a59);
}

.hubspot-homepage .card-excerpt {
    color: #4a5568;
    line-height: 1.6;
    margin-bottom: 16px;
    font-size: 0.95rem;
    /* 限制为3行，超出显示省略号，确保卡片对齐 */
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
    height: 4.8em; /* 3行 * 1.6行高 = 4.8em */
}

.hubspot-homepage .card-meta {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 0.875rem;
    color: #718096;
}

.hubspot-homepage .card-meta .author {
    font-weight: 500;
    color: #4a5568;
}

/* ==========================================
   精选内容区域 - 带侧边栏布局
========================================== */
.hubspot-homepage .featured-content-section {
    padding: 60px 0;
    background: #ffffff;
}

.hubspot-homepage .content-layout {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 60px;
}

.hubspot-homepage .main-content {
    display: flex;
    flex-direction: column;
    gap: 32px;
}

.hubspot-homepage .story-card {
    padding: 24px 0;
    border-bottom: 1px solid #e2e8f0;
    transition: all 0.2s ease;
}

.hubspot-homepage .story-card:last-child {
    border-bottom: none;
}

.hubspot-homepage .story-card.featured {
    padding: 0 0 32px 0;
}

.hubspot-homepage .story-card:hover {
    background-color: #f7fafc;
    padding-left: 16px;
    padding-right: 16px;
    border-radius: 8px;
}

.hubspot-homepage .story-image {
    width: 100%;
    height: 300px;
    overflow: hidden;
    border-radius: 8px;
    margin-bottom: 20px;
    background-color: #f7fafc;
    display: flex;
    align-items: center;
    justify-content: center;
}

.hubspot-homepage .story-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
    background-color: transparent;
}

.hubspot-homepage .story-card:hover .story-image img {
    transform: scale(1.02);
}

.hubspot-homepage .story-content {
    flex: 1;
}

.hubspot-homepage .story-title {
    font-size: 1.5rem;
    line-height: 1.3;
    margin-bottom: 12px;
    font-weight: 700;
}

.hubspot-homepage .story-card:not(.featured) .story-title {
    font-size: 1.25rem;
}

.hubspot-homepage .story-title a {
    color: #1a202c;
    text-decoration: none;
    transition: color 0.2s ease;
}

.hubspot-homepage .story-title a:hover {
    color: var(--primary-color, #ff7a59);
}

.hubspot-homepage .story-excerpt {
    color: #4a5568;
    line-height: 1.6;
    margin-bottom: 16px;
    font-size: 1rem;
    /* 限制为3行，超出显示省略号，确保卡片对齐 */
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
    height: 4.8em; /* 3行 * 1.6行高 = 4.8em */
}

.hubspot-homepage .story-meta {
    display: flex;
    align-items: center;
    gap: 16px;
    font-size: 0.9rem;
    color: #718096;
}

.hubspot-homepage .story-meta .author {
    font-weight: 500;
    color: #4a5568;
}

/* 侧边栏内容 */
.hubspot-homepage .content-sidebar {
    position: sticky;
    top: 80px;
}

.hubspot-homepage .sidebar-section {
    background: linear-gradient(135deg, var(--primary-color, #ff7a59) 0%, #ff8f59 100%);
    border-radius: 12px;
    padding: 40px 30px;
    text-align: center;
    color: white;
}

.hubspot-homepage .sidebar-title {
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 20px;
    line-height: 1.3;
}

.hubspot-homepage .cta-box {
    background: rgba(255, 255, 255, 0.2);
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-radius: 8px;
    padding: 16px 24px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.hubspot-homepage .cta-box:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: translateY(-2px);
}

.hubspot-homepage .cta-box p {
    margin: 0;
    font-weight: 600;
    font-size: 1.1rem;
}

/* ==========================================
   补充样式 - 卡片图片和徽章
========================================== */
.hubspot-homepage .card-image {
    width: 100%;
    height: 180px;
    overflow: hidden;
    border-radius: 8px;
    margin-bottom: 16px;
    background-color: #f7fafc;
    display: flex;
    align-items: center;
    justify-content: center;
}

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

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

.hubspot-homepage .featured-badge {
    position: absolute;
    top: 16px;
    left: 16px;
    background: var(--primary-color, #ff7a59);
    color: white;
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 0.875rem;
    font-weight: 600;
    z-index: 2;
}

.hubspot-homepage .resource-type {
    background: #e6fffa;
    color: #047857;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 0.75rem;
    font-weight: 600;
}

/* 自定义区块样式 */
.hubspot-homepage .custom-section {
    padding: 60px 0;
    background: #f8fafc;
}

.hubspot-homepage .custom-section:nth-child(even) {
    background: #ffffff;
}

/* ==========================================
   响应式设计
========================================== */
@media (max-width: 1024px) {
    .hubspot-homepage .hero-layout,
    .hubspot-homepage .content-layout {
        grid-template-columns: 1fr;
        gap: 40px;
    }
    
    .hubspot-homepage .hero-sidebar,
    .hubspot-homepage .content-sidebar {
        position: static;
    }
    
    .hubspot-homepage .content-grid {
        grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
        gap: 20px;
    }
}

@media (max-width: 768px) {
    .hubspot-homepage .container {
        padding: 0 16px;
    }
    
    .hubspot-homepage .hero-main-section,
    .hubspot-homepage .marketing-section,
    .hubspot-homepage .featured-content-section {
        padding: 40px 0;
    }
    
    .hubspot-homepage .featured-title {
        font-size: 1.75rem;
    }
    
    .hubspot-homepage .featured-excerpt {
        font-size: 1rem;
    }
    
    .hubspot-homepage .section-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 16px;
    }
    
    .hubspot-homepage .main-title {
        font-size: 1.75rem;
    }
    
    .hubspot-homepage .content-grid {
        grid-template-columns: 1fr;
        gap: 16px;
    }
    
    .hubspot-homepage .story-title {
        font-size: 1.25rem;
    }
    
    .hubspot-homepage .story-card:not(.featured) .story-title {
        font-size: 1.125rem;
    }
}

@media (max-width: 480px) {
    .hubspot-homepage .featured-title {
        font-size: 1.5rem;
    }
    
    .hubspot-homepage .main-title {
        font-size: 1.5rem;
    }
    
    .hubspot-homepage .story-title {
        font-size: 1.125rem;
    }
    
    .hubspot-homepage .story-card:not(.featured) .story-title {
        font-size: 1rem;
    }
    
    .hubspot-homepage .sidebar-section {
        padding: 30px 20px;
    }
    
    .hubspot-homepage .sidebar-title {
        font-size: 1.25rem;
    }
}

/* ==========================================
   广告位样式
========================================== */
.hubspot-homepage .ad-section {
    margin-top: 30px;
}

.hubspot-homepage .ad-banner {
    background: linear-gradient(135deg, #f8fafc 0%, #e2e8f0 100%);
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    padding: 20px;
    text-align: center;
    position: relative;
    overflow: hidden;
    transition: all 0.3s ease;
}

.hubspot-homepage .ad-banner:hover {
    border-color: var(--primary-color, #ff7a59);
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(255, 122, 89, 0.15);
}

.hubspot-homepage .ad-label {
    position: absolute;
    top: 8px;
    right: 8px;
    background: #94a3b8;
    color: white;
    padding: 2px 8px;
    border-radius: 4px;
    font-size: 0.7rem;
    font-weight: 500;
}

.hubspot-homepage .ad-content h4 {
    font-size: 1.1rem;
    font-weight: 600;
    color: #1a202c;
    margin-bottom: 8px;
}

.hubspot-homepage .ad-content p {
    font-size: 0.9rem;
    color: #4a5568;
    line-height: 1.4;
    margin-bottom: 15px;
}

.hubspot-homepage .ad-link {
    display: inline-block;
    background: var(--primary-color, #ff7a59);
    color: white;
    padding: 8px 16px;
    border-radius: 6px;
    text-decoration: none;
    font-size: 0.9rem;
    font-weight: 500;
    transition: all 0.2s ease;
}

.hubspot-homepage .ad-link:hover {
    background: #e5654b;
    transform: translateY(-1px);
}

/* 移动端广告位优化 */
@media (max-width: 768px) {
    .hubspot-homepage .ad-section {
        margin-top: 20px;
    }
    
    .hubspot-homepage .ad-banner {
        padding: 15px;
    }
    
    .hubspot-homepage .ad-content h4 {
        font-size: 1rem;
    }
    
    .hubspot-homepage .ad-content p {
        font-size: 0.85rem;
    }
} 