/* Global Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    color: #333;
    background-color: #f9f9f9;
}

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

img {
    max-width: 100%;
    height: auto;
}

/* Header Styles */
.header {
    background-color: #fff;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    position: sticky;
    top: 0;
    z-index: 1000;
    height: 80px;
    display: flex;
    align-items: center;
}

.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
    position: relative;
}

.logo a {
    font-size: 28px;
    font-weight: 700;
    color: #0066cc;
    text-decoration: none;
    text-transform: uppercase;
    letter-spacing: -1px;
}

.nav {
    display: flex;
    align-items: center;
}

.nav-list {
    display: flex;
    list-style: none;
}

.nav-item {
    margin-left: 30px;
}

.nav-item a {
    text-decoration: none;
    color: #333;
    font-weight: 500;
    font-size: 16px;
    transition: color 0.3s ease;
}

.nav-item a:hover, .nav-item a.active {
    color: #0066cc;
}

.search-box {
    display: flex;
    margin-left: 30px;
}

.search-box input {
    padding: 8px 15px;
    border: 1px solid #ddd;
    border-radius: 4px 0 0 4px;
    outline: none;
    width: 200px;
}

.search-btn {
    padding: 8px 15px;
    background-color: #0066cc;
    color: white;
    border: none;
    border-radius: 0 4px 4px 0;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

.search-btn:hover {
    background-color: #0052a3;
}

.menu-toggle {
    display: none;
    cursor: pointer;
}

.bar {
    display: block;
    width: 25px;
    height: 3px;
    margin: 5px auto;
    transition: all 0.3s ease;
    background-color: #333;
}

/* Breaking News */
.breaking-news {
    background-color: #e61e25;
    color: white;
    padding: 12px 0;
    overflow: hidden;
}

.breaking-news-content {
    display: flex;
    align-items: center;
}

.breaking-label {
    font-weight: 700;
    text-transform: uppercase;
    margin-right: 20px;
    letter-spacing: 1px;
    white-space: nowrap;
}

.breaking-text {
    margin: 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Hero Section */
.hero {
    padding: 40px 0;
}

.hero-content {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 30px;
}

.hero-main {
    background-color: #fff;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.hero-main:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.12);
}

.hero-image img {
    width: 100%;
    height: 400px;
    object-fit: cover;
    border-bottom: 5px solid #0066cc;
}

.hero-text {
    padding: 30px;
}

.hero-secondary {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.hero-item {
    background-color: #fff;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
    display: flex;
    transition: transform 0.3s ease;
}

.hero-item:hover {
    transform: translateY(-3px);
}

.hero-item-image img {
    width: 150px;
    height: 100%;
    object-fit: cover;
}

.hero-item-text {
    padding: 15px;
    flex: 1;
}

.category-badge {
    display: inline-block;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    margin-bottom: 10px;
}

.category-badge.politics {
    background-color: #e61e25;
    color: white;
}

.category-badge.tech {
    background-color: #28a745;
    color: white;
}

.category-badge.business {
    background-color: #ffc107;
    color: #333;
}

.category-badge.health {
    background-color: #17a2b8;
    color: white;
}

.category-badge.science {
    background-color: #6f42c1;
    color: white;
}

.hero-text h1 {
    font-size: 32px;
    margin-bottom: 15px;
    line-height: 1.3;
}

.hero-item-text h3 {
    font-size: 18px;
    margin-bottom: 5px;
    line-height: 1.4;
}

.meta {
    font-size: 14px;
    color: #666;
    margin-bottom: 15px;
}

.read-more {
    display: inline-block;
    color: #0066cc;
    font-weight: 600;
    text-decoration: none;
    margin-top: 10px;
    position: relative;
    padding-right: 20px;
}

.read-more::after {
    content: '→';
    position: absolute;
    right: 0;
    top: 0;
    transition: transform 0.3s ease;
}

.read-more:hover::after {
    transform: translateX(5px);
}

/* Featured News Section */
.featured-news {
    padding: 60px 0;
}

.section-header {
    text-align: center;
    margin-bottom: 40px;
}

.section-header h2 {
    font-size: 32px;
    color: #1a1a1a;
    margin-bottom: 10px;
}

.section-divider {
    width: 60px;
    height: 4px;
    background-color: #0066cc;
    margin: 0 auto;
}

.featured-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 30px;
}

.featured-item {
    background-color: #fff;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.featured-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.12);
}

.featured-image img {
    width: 100%;
    height: 280px;
    object-fit: cover;
    border-bottom: 5px solid #0066cc;
}

.featured-content {
    padding: 30px;
}

.featured-content h3 {
    font-size: 24px;
    margin-bottom: 15px;
    line-height: 1.3;
}

/* News Grid */
.news-grid {
    padding: 20px 0 20px;
}

.row {
    display: flex;
    flex-wrap: wrap;
    margin: 0 -15px;
}

.col-lg-8, .col-lg-4 {
    padding: 0 15px;
}

.col-lg-8 {
    width: 66.666%;
}

.col-lg-4 {
    width: 33.333%;
}

.news-item {
    background-color: #fff;
    border-radius: 8px;
    overflow: hidden;
    margin-bottom: 30px;
    box-shadow: 0 2px 15px rgba(0, 0, 0, 0.05);
    transition: transform 0.3s ease;
}

/* 在更小屏幕上减小文章间距 */
@media (max-width: 767px) {
    .news-item {
        margin-bottom: 15px;
    }
}

@media (max-width: 575px) {
    .news-item {
        margin-bottom: 10px;
    }
}

.news-item:hover {
    transform: translateY(-3px);
}

.news-item-inner {
    display: flex;
}

.news-image {
    flex: 0 0 300px;
}

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

.news-content {
    flex: 1;
    padding: 20px;
}

.news-content h3 {
    font-size: 20px;
    margin-bottom: 15px;
    line-height: 1.4;
}

/* Ad Banner Styles */
.ad-banner {
    margin-bottom: 30px;
    border: 1px solid #ddd;
    border-radius: 8px;
    overflow: hidden;
}

.ad-container {
    padding: 10px;
    background-color: #f8f9fa;
    text-align: center;
}

.ad-container p {
    font-size: 12px;
    color: #666;
    margin-bottom: 10px;
    text-transform: uppercase;
    font-weight: 600;
}

/* Sidebar Styles */
.sidebar {
    position: sticky;
    top: 170px;
}

.sidebar-ad {
    margin-bottom: 40px;
}

.trending-news {
    background-color: #fff;
    border-radius: 8px;
    padding: 25px;
    margin-bottom: 40px;
    box-shadow: 0 2px 15px rgba(0, 0, 0, 0.05);
}

.trending-news h3 {
    font-size: 22px;
    margin-bottom: 20px;
    color: #1a1a1a;
}

.trending-item {
    display: flex;
    align-items: center;
    margin-bottom: 20px;
    transition: transform 0.3s ease;
}

.trending-item:hover {
    transform: translateX(5px);
}

.trending-number {
    font-size: 24px;
    font-weight: 700;
    color: #0066cc;
    margin-right: 15px;
    line-height: 1;
}

.trending-content h4 {
    font-size: 16px;
    margin-bottom: 5px;
    line-height: 1.4;
}

.categories {
    background-color: #fff;
    border-radius: 8px;
    padding: 25px;
    box-shadow: 0 2px 15px rgba(0, 0, 0, 0.05);
}

.categories h3 {
    font-size: 22px;
    margin-bottom: 20px;
    color: #1a1a1a;
}

.category-list {
    list-style: none;
}

.category-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 0;
    border-bottom: 1px solid #f0f0f0;
}

.category-item:last-child {
    border-bottom: none;
}

.category-item a {
    text-decoration: none;
    color: #333;
    font-weight: 500;
    transition: color 0.3s ease;
}

.category-item a:hover {
    color: #0066cc;
}

.category-item .count {
    background-color: #f0f0f0;
    padding: 3px 10px;
    border-radius: 15px;
    font-size: 14px;
    color: #666;
}

/* Footer Styles */
.footer {
    background-color: #1a1a1a;
    color: #fff;
    padding: 10px 0;
    height: 50px;
    display: flex;
    align-items: center;
}

.footer-content {
    display: flex;
    justify-content: center;
    align-items: center;
    width: 100%;
}

.footer-logo a {
    color: #fff;
    font-size: 24px;
}

.footer-description {
    color: #999;
    margin-top: 10px;
    font-size: 14px;
}

.footer-nav {
    display: flex;
    list-style: none;
}

.footer-nav li {
    margin-left: 25px;
}

.footer-nav a {
    text-decoration: none;
    color: #999;
    font-size: 14px;
    transition: color 0.3s ease;
}

.footer-nav a:hover {
    color: #fff;
}

.legal-links {
    display: flex;
    list-style: none;
    margin-bottom: 0px;
    justify-content: center;
    gap: 10px;
}



.legal-links a {
    text-decoration: none;
    color: #999;
    font-size: 14px;
    transition: color 0.3s ease;
}

.legal-links a:hover {
    color: #fff;
}

.copyright {
    color: #999;
    font-size: 14px;
}

/* Responsive Styles */
@media (max-width: 1199px) {
    .hero-content {
        grid-template-columns: 1fr;
    }
    
    .hero-secondary {
        flex-direction: row;
    }
    
    .hero-item {
        flex: 1;
    }
    
    .featured-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 991px) {
    .col-lg-8, .col-lg-4 {
        width: 100%;
    }
    
    .sidebar {
        position: static;
        margin-top: 40px;
    }
    
    .footer-content {
        flex-direction: column;
        text-align: center;
    }
    
    .footer-links {
        margin: 20px 0;
    }
    
    .footer-nav li {
        margin: 0 15px;
    }
    
    .legal-links li {
        margin: 0 10px;
    }
}

@media (max-width: 767px) {
    .header {
        height: auto;
        padding: 15px 0;
    }
    
    .nav {
        display: none;
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background-color: #fff;
        box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
        padding: 20px;
    }
    
    .nav.active {
        display: block;
    }
    
    .nav-list {
        flex-direction: column;
    }
    
    .nav-item {
        margin: 10px 0;
    }
    
    .search-box {
        display: none;
    }
    
    .menu-toggle {
        display: block;
    }
    
    .hero-main {
        margin-bottom: 20px;
    }
    
    .hero-image img {
        height: 250px;
    }
    
    .hero-secondary {
        flex-direction: column;
    }
    
    .hero-item {
        flex-direction: column;
    }
    
    .hero-item-image img {
        width: 100%;
        height: 200px;
    }
    
    .news-item-inner {
        flex-direction: column;
    }
    
    .news-image {
        flex: none;
    }
    
    .news-image img {
        height: 200px;
    }
    
    .featured-image img {
        height: 200px;
    }
    
    .sidebar-ad {
        margin-bottom: 30px;
    }
    
    .footer {
        height: auto;
        padding: 10px 0;
    }
    
    .footer-nav, .legal-links {
    flex-direction: row;
    align-items: center;
    gap: 10px;
    justify-content: center;
    }
    
    .footer-nav li, .legal-links li {
        margin: 0;
    }
    
    /* 减小移动端文章间距 */
    .news-item {
        margin-bottom: 15px;
    }
    
    .trending-item {
        margin-bottom: 10px;
    }
    
    /* 减小移动端各区块间距 */
    .hero {
        padding: 20px 0;
    }
    
    .featured-news {
        padding: 30px 0;
    }
    
    .news-grid {
        padding: 10px 0;
    }
    
    /* 减小标题区域间距 */
    .section-header {
        margin-bottom: 20px;
    }
    
    .hero-text {
        padding: 20px;
    }
    
    .hero-secondary {
        gap: 15px;
    }
    
    .featured-content {
        padding: 20px;
    }
    
    .news-content {
        padding: 15px;
    }
    
    .trending-news {
        padding: 20px;
        margin-bottom: 20px;
    }
    
    .categories {
        padding: 20px;
    }
    
    .featured-grid {
        gap: 20px;
    }
}

@media (max-width: 575px) {
    .breaking-news-content {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .breaking-label {
        margin-bottom: 10px;
    }
    
    .hero-text h1 {
        font-size: 24px;
    }
    
    .featured-content h3, .news-content h3 {
        font-size: 20px;
    }
    
    /* 进一步减小小屏幕文章间距 */
    .news-item {
        margin-bottom: 10px;
    }
    
    .trending-item {
        margin-bottom: 8px;
    }
    
    /* 进一步减小超小屏幕间距 */
    .hero {
        padding: 15px 0;
    }
    
    .featured-news {
        padding: 10px 0;
    }
    
    .news-grid {
        padding: 5px 0;
    }
    
    .section-header {
        margin-bottom: 15px;
    }
    
    .hero-text {
        padding: 15px;
    }
    
    .hero-secondary {
        gap: 10px;
    }
    
    .featured-content {
        padding: 15px;
    }
    
    .news-content {
        padding: 10px;
    }
    
    .trending-news {
        padding: 15px;
        margin-bottom: 15px;
    }
    
    .categories {
        padding: 15px;
    }
    
    .featured-grid {
        gap: 15px;
    }
}