:root {
    --primary-color: #1a1a2e;
    --secondary-color: #16213e;
    --accent-color: #e94560;
    --text-dark: #0f0f0f;
    --text-light: #6b6b6b;
    --text-white: #ffffff;
    --bg-light: #f8f9fa;
    --bg-white: #ffffff;
    --border-color: #e0e0e0;
    --shadow-sm: 0 2px 8px rgba(0,0,0,0.08);
    --shadow-md: 0 4px 16px rgba(0,0,0,0.12);
    --shadow-lg: 0 8px 32px rgba(0,0,0,0.16);
    --transition-fast: 0.2s ease;
    --transition-normal: 0.3s ease;
    --transition-slow: 0.5s ease;
    --font-heading: 'Playfair Display', Georgia, 'Times New Roman', serif;
    --font-body: 'Source Sans Pro', 'Helvetica Neue', Arial, sans-serif;
    --container-max: 1400px;
    --header-height: 80px;
}

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

html {
    font-size: 16px;
    -webkit-text-size-adjust: 100%;
}

body {
    font-family: var(--font-body);
    font-size: 1rem;
    line-height: 1.6;
    color: var(--text-dark);
    background-color: var(--bg-light);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

a {
    color: inherit;
    text-decoration: none;
    transition: color var(--transition-fast);
}

a:hover {
    color: var(--accent-color);
}

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

button {
    font-family: inherit;
    cursor: pointer;
    border: none;
    background: none;
}

ul, ol {
    list-style: none;
}

.news-wrapper {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* Header Styles */
.news-header {
    position: sticky;
    top: 0;
    z-index: 1000;
    background: var(--bg-white);
    border-bottom: 1px solid var(--border-color);
    box-shadow: var(--shadow-sm);
}

.header-container {
    max-width: var(--container-max);
    margin: 0 auto;
    padding: 0 24px;
    height: var(--header-height);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 32px;
}

.logo-section {
    display: flex;
    flex-direction: column;
    flex-shrink: 0;
}

.logo {
    font-family: var(--font-heading);
    font-size: 1.75rem;
    font-weight: 700;
    letter-spacing: -0.5px;
    color: var(--primary-color);
    line-height: 1.2;
}

.tagline {
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 2px;
    color: var(--text-light);
    margin-top: 2px;
}

.main-nav {
    flex: 1;
    display: flex;
    justify-content: center;
}

.nav-list {
    display: flex;
    gap: 8px;
}

.nav-link {
    display: block;
    padding: 8px 16px;
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--text-dark);
    border-radius: 4px;
    transition: all var(--transition-fast);
    position: relative;
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    width: 0;
    height: 2px;
    background: var(--accent-color);
    transform: translateX(-50%);
    transition: width var(--transition-normal);
}

.nav-link:hover,
.nav-link.active {
    color: var(--accent-color);
}

.nav-link:hover::after,
.nav-link.active::after {
    width: 60%;
}

.header-actions {
    display: flex;
    align-items: center;
    gap: 16px;
}

.search-toggle {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    color: var(--text-dark);
    transition: all var(--transition-fast);
}

.search-toggle:hover {
    background: var(--bg-light);
    color: var(--accent-color);
}

/* Ad Container */
.ad-container {
    max-width: var(--container-max);
    margin: 0 auto;
    padding: 16px 24px;
}

.ad-label {
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--text-light);
    text-align: center;
    margin-bottom: 8px;
}

.ad-slot {
    background: var(--bg-light);
    border-radius: 4px;
    overflow: hidden;
    min-height: 90px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.top-ad .ad-slot {
    height: 90px;
}

.mid-ad .ad-slot {
    height: 250px;
}

@media (max-width: 768px) {
    .top-ad .ad-slot {
        height: 60px;
    }
    .mid-ad .ad-slot {
        height: 200px;
    }
}

/* Main Content */
.main-content {
    flex: 1;
    max-width: var(--container-max);
    margin: 0 auto;
    padding: 32px 24px;
    width: 100%;
}

/* Hero Section */
.hero-section {
    margin-bottom: 32px;
    animation: fadeInUp 0.6s ease-out;
}

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

.hero-grid {
    display: grid;
    grid-template-columns: 1fr 380px;
    gap: 24px;
}

.hero-card {
    position: relative;
    overflow: hidden;
    border-radius: 8px;
    cursor: pointer;
    background: var(--bg-white);
    box-shadow: var(--shadow-sm);
    transition: transform var(--transition-normal), box-shadow var(--transition-normal);
}

.hero-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-md);
}

.hero-image-wrapper {
    position: relative;
    width: 100%;
    height: 480px;
    overflow: hidden;
}

.hero-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform var(--transition-slow);
}

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

.hero-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 70%;
    background: linear-gradient(to top, rgba(0,0,0,0.85) 0%, rgba(0,0,0,0.4) 50%, transparent 100%);
    pointer-events: none;
}

.hero-content {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 32px;
    color: var(--text-white);
}

.news-tag {
    display: inline-block;
    padding: 4px 12px;
    background: var(--accent-color);
    color: var(--text-white);
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    border-radius: 2px;
    margin-bottom: 12px;
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0%, 100% {
        opacity: 1;
    }
    50% {
        opacity: 0.8;
    }
}

.hero-title {
    font-family: var(--font-heading);
    font-size: 2rem;
    font-weight: 700;
    line-height: 1.3;
    margin-bottom: 12px;
    color: var(--text-white);
}

.hero-meta {
    display: flex;
    gap: 16px;
    font-size: 0.85rem;
    opacity: 0.9;
}

.hero-meta span::before {
    content: '';
    display: inline-block;
    width: 6px;
    height: 6px;
    background: var(--accent-color);
    border-radius: 50%;
    margin-right: 8px;
    vertical-align: middle;
}

.hero-meta span:first-child::before {
    display: none;
}

.hero-side {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.side-hero {
    display: flex;
    gap: 16px;
    padding: 16px;
    height: calc(50% - 8px);
}

.side-image-wrapper {
    width: 120px;
    height: 100%;
    flex-shrink: 0;
    border-radius: 4px;
    overflow: hidden;
}

.side-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform var(--transition-normal);
}

.side-hero:hover .side-image {
    transform: scale(1.1);
}

.side-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.side-title {
    font-family: var(--font-heading);
    font-size: 1rem;
    font-weight: 600;
    line-height: 1.4;
    color: var(--text-dark);
    margin-bottom: 8px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.side-time {
    font-size: 0.75rem;
    color: var(--text-light);
}

/* News Feed Section */
.news-feed {
    animation: fadeInUp 0.6s ease-out 0.2s both;
}

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

.section-title {
    font-family: var(--font-heading);
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--primary-color);
    margin-bottom: 16px;
}

.section-line {
    width: 60px;
    height: 3px;
    background: var(--accent-color);
    margin: 0 auto;
    border-radius: 2px;
}

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

.news-card {
    background: var(--bg-white);
    border-radius: 8px;
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    transition: transform var(--transition-normal), box-shadow var(--transition-normal);
    cursor: pointer;
    animation: fadeInUp 0.5s ease-out both;
}

.news-card:nth-child(1) { animation-delay: 0.1s; }
.news-card:nth-child(2) { animation-delay: 0.15s; }
.news-card:nth-child(3) { animation-delay: 0.2s; }
.news-card:nth-child(4) { animation-delay: 0.25s; }
.news-card:nth-child(5) { animation-delay: 0.3s; }
.news-card:nth-child(6) { animation-delay: 0.35s; }
.news-card:nth-child(7) { animation-delay: 0.4s; }
.news-card:nth-child(8) { animation-delay: 0.45s; }
.news-card:nth-child(9) { animation-delay: 0.5s; }

.news-card:hover {
    transform: translateY(-6px);
    box-shadow: var(--shadow-md);
}

.news-image-container {
    position: relative;
    width: 100%;
    height: 180px;
    overflow: hidden;
    background: var(--bg-light);
}

.news-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform var(--transition-slow);
}

.news-card:hover .news-image {
    transform: scale(1.08);
}

.news-card-content {
    padding: 20px;
}

.news-title {
    font-family: var(--font-heading);
    font-size: 1.1rem;
    font-weight: 600;
    line-height: 1.4;
    color: var(--text-dark);
    margin-bottom: 12px;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

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

.news-source {
    font-weight: 600;
    color: var(--secondary-color);
}

.news-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-top: 10px;
}

.news-tag-item {
    font-size: 0.7rem;
    padding: 2px 8px;
    background: var(--bg-light);
    color: var(--text-light);
    border-radius: 2px;
    transition: all var(--transition-fast);
}

.news-tag-item:hover {
    background: var(--accent-color);
    color: var(--text-white);
}

/* Load More Button */
.load-more-container {
    text-align: center;
    margin-top: 48px;
}

.load-more-btn {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    padding: 14px 40px;
    background: var(--primary-color);
    color: var(--text-white);
    font-size: 0.95rem;
    font-weight: 600;
    border-radius: 4px;
    transition: all var(--transition-normal);
    min-width: 180px;
    justify-content: center;
}

.load-more-btn:hover {
    background: var(--secondary-color);
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.load-more-btn:disabled {
    background: var(--text-light);
    cursor: not-allowed;
    transform: none;
}

.loading-spinner {
    display: none;
    width: 18px;
    height: 18px;
    border: 2px solid transparent;
    border-top-color: var(--text-white);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

.load-more-btn.loading .loading-spinner {
    display: block;
}

.load-more-btn.loading .btn-text {
    display: none;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

/* Footer Styles */
.news-footer {
    background: var(--primary-color);
    color: var(--text-white);
    margin-top: 64px;
}

.footer-container {
    max-width: var(--container-max);
    margin: 0 auto;
    padding: 48px 24px 24px;
}

.footer-grid {
    display: grid;
    grid-template-columns: 1.5fr 1fr 1fr 1.5fr;
    gap: 48px;
    margin-bottom: 48px;
}

.footer-section {
    font-size: 0.9rem;
}

.footer-title {
    font-family: var(--font-heading);
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 20px;
    position: relative;
    padding-bottom: 12px;
}

.footer-title::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 40px;
    height: 2px;
    background: var(--accent-color);
}

.footer-text {
    color: rgba(255,255,255,0.7);
    line-height: 1.7;
}

.footer-links li {
    margin-bottom: 10px;
}

.footer-links a {
    color: rgba(255,255,255,0.7);
    transition: all var(--transition-fast);
}

.footer-links a:hover {
    color: var(--accent-color);
    padding-left: 8px;
}

.contact-info li {
    color: rgba(255,255,255,0.7);
    margin-bottom: 12px;
    line-height: 1.6;
}

.contact-info strong {
    color: var(--text-white);
    display: inline-block;
    min-width: 60px;
}

.social-links {
    display: flex;
    gap: 12px;
    margin-top: 20px;
}

.social-link {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255,255,255,0.1);
    border-radius: 50%;
    color: var(--text-white);
    transition: all var(--transition-fast);
}

.social-link:hover {
    background: var(--accent-color);
    transform: translateY(-3px);
}

.footer-bottom {
    padding-top: 24px;
    border-top: 1px solid rgba(255,255,255,0.1);
    text-align: center;
}

.copyright {
    font-size: 0.85rem;
    color: rgba(255,255,255,0.7);
    margin-bottom: 8px;
}

.disclaimer {
    font-size: 0.75rem;
    color: rgba(255,255,255,0.5);
}

/* Responsive Styles */
@media (max-width: 1200px) {
    .hero-grid {
        grid-template-columns: 1fr 320px;
    }
    
    .news-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .footer-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 32px;
    }
}

@media (max-width: 992px) {
    .hero-image-wrapper {
        height: 400px;
    }
    
    .hero-title {
        font-size: 1.5rem;
    }
    
    .news-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 16px;
    }
}

@media (max-width: 768px) {
    :root {
        --header-height: 60px;
    }
    
    .header-container {
        padding: 0 16px;
    }
    
    .logo {
        font-size: 1.25rem;
    }
    
    .tagline {
        display: none;
    }
    
    .main-nav {
        display: none;
    }
    
    .hero-grid {
        grid-template-columns: 1fr;
    }
    
    .hero-side {
        flex-direction: row;
    }
    
    .side-hero {
        flex: 1;
        height: auto;
    }
    
    .hero-image-wrapper {
        height: 300px;
    }
    
    .hero-content {
        padding: 20px;
    }
    
    .hero-title {
        font-size: 1.25rem;
    }
    
    .news-grid {
        grid-template-columns: 1fr;
    }
    
    .main-content {
        padding: 16px;
    }
    
    .news-card-content {
        padding: 16px;
    }
    
    .news-title {
        font-size: 1rem;
    }
    
    .footer-grid {
        grid-template-columns: 1fr;
        gap: 32px;
    }
    
    .footer-container {
        padding: 32px 16px 16px;
    }
}

@media (max-width: 480px) {
    .hero-side {
        flex-direction: column;
    }
    
    .side-hero {
        flex-direction: row;
    }
    
    .side-image-wrapper {
        width: 80px;
    }
}

/* IE8+ Compatibility */
.lt-ie9 .hero-grid {
    display: block;
}

.lt-ie9 .hero-card {
    margin-bottom: 20px;
}

/* Print Styles */
@media print {
    .news-header,
    .ad-container,
    .load-more-container,
    .news-footer {
        display: none;
    }
    
    .news-card {
        page-break-inside: avoid;
    }
}
