/* Reset and Base Styles */
:root {
    --primary-color: #1a73e8;
    --secondary-color: #0d47a1;
    --accent-color: #f44336;
    --text-color: #333;
    --light-text: #666;
    --light-bg: #f5f5f5;
    --border-color: #e0e0e0;
    --white: #ffffff;
    --black: #000000;
    --box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    --transition: all 0.3s ease;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Roboto', sans-serif;
    line-height: 1.6;
    color: var(--text-color);
    background-color: var(--light-bg);
}

.container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 15px;
}

a {
    text-decoration: none;
    color: var(--primary-color);
    transition: var(--transition);
}

a:hover {
    color: var(--secondary-color);
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

.btn {
    display: inline-block;
    padding: 10px 20px;
    background-color: var(--primary-color);
    color: var(--white);
    border: none;
    border-radius: 4px;
    cursor: pointer;
    transition: var(--transition);
}

.btn:hover {
    background-color: var(--secondary-color);
    color: var(--white);
}

.section-title {
    font-family: 'Playfair Display', serif;
    font-size: 24px;
    margin-bottom: 20px;
    padding-bottom: 10px;
    border-bottom: 2px solid var(--primary-color);
    display: inline-block;
}

/* Top Bar */
.top-bar {
    background-color: var(--primary-color);
    color: var(--white);
    padding: 8px 0;
    font-size: 14px;
}

.trending-ticker {
    display: flex;
    align-items: center;
    overflow: hidden;
}

.trending-label {
    font-weight: 600;
    margin-right: 15px;
    white-space: nowrap;
}

.ticker-content {
    display: flex;
    overflow: hidden;
    white-space: nowrap;
}

.ticker-content span {
    padding-right: 30px;
    animation: ticker 20s linear infinite;
}

@keyframes ticker {
    0% { transform: translateX(100%); }
    100% { transform: translateX(-100%); }
}

/* Header */
.main-header {
    background-color: var(--white);
    padding: 20px 0;
    box-shadow: var(--box-shadow);
}

.header-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.logo h1 {
    font-size: 32px;
    font-weight: 700;
    color: var(--primary-color);
}

.logo span {
    color: var(--accent-color);
}

.ad {
    width: 300px;
    height: 100px;
    background-color: #f0f0f0;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #999;
}

/* Navigation */
.main-nav {
    background-color: var(--primary-color);
    color: var(--white);
}

.nav-menu {
    list-style: none;
    display: flex;
    margin: 0;
    padding: 0;
}

.nav-menu li {
    position: relative;
}

.nav-menu li a {
    display: block;
    padding: 15px 20px;
    color: var(--white);
    font-weight: 500;
    transition: var(--transition);
}

.nav-menu li a:hover,
.nav-menu li.active a {
    background-color: var(--secondary-color);
}

.mobile-menu-toggle {
    display: none;
    cursor: pointer;
    padding: 15px;
    font-size: 20px;
}

/* Featured Section */
.featured-section {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 30px;
    margin: 30px 0;
}

.featured-carousel {
    position: relative;
    overflow: hidden;
    border-radius: 8px;
    box-shadow: var(--box-shadow);
    background-color: var(--white);
}

.carousel-container {
    position: relative;
    overflow: hidden;
    height: 400px;
}

.carousel-track {
    display: flex;
    transition: transform 0.5s ease;
    height: 100%;
}

.carousel-item {
    min-width: 100%;
    height: 100%;
    position: relative;
}

.carousel-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.carousel-content {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 20px;
    background: linear-gradient(transparent, rgba(0, 0, 0, 0.8));
    color: var(--white);
}

.carousel-content h3 {
    font-size: 22px;
    margin-bottom: 10px;
}

.carousel-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background-color: rgba(0, 0, 0, 0.5);
    color: var(--white);
    border: none;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition);
}

.carousel-nav:hover {
    background-color: var(--primary-color);
}

.carousel-nav.prev {
    left: 15px;
}

.carousel-nav.next {
    right: 15px;
}

/* Latest Posts */
.latest-posts {
    background-color: var(--white);
    padding: 20px;
    border-radius: 8px;
    box-shadow: var(--box-shadow);
}

.latest-posts-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 15px;
}

.latest-post-item {
    display: flex;
    gap: 15px;
    padding-bottom: 15px;
    border-bottom: 1px solid var(--border-color);
    margin-bottom: 15px;
}

.latest-post-item:last-child {
    border-bottom: none;
    margin-bottom: 0;
    padding-bottom: 0;
}

.latest-post-item img {
    width: 100px;
    height: 80px;
    object-fit: cover;
    border-radius: 4px;
}

.latest-post-content h4 {
    font-size: 16px;
    margin-bottom: 5px;
}

.latest-post-meta {
    font-size: 12px;
    color: var(--light-text);
}

/* Content Section */
.content-section {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 30px;
    margin: 30px 0;
}

.news-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
}

.news-item {
    background-color: var(--white);
    border-radius: 8px;
    overflow: hidden;
    box-shadow: var(--box-shadow);
    transition: var(--transition);
}

.news-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.news-item img {
    width: 100%;
    height: 200px;
    object-fit: cover;
}

.news-content {
    padding: 15px;
}

.news-content h3 {
    font-size: 18px;
    margin-bottom: 10px;
}

.news-meta {
    display: flex;
    justify-content: space-between;
    font-size: 12px;
    color: var(--light-text);
    margin-bottom: 10px;
}

.news-excerpt {
    font-size: 14px;
    color: var(--light-text);
    margin-bottom: 15px;
}

/* Sidebar */
.sidebar {
    display: flex;
    flex-direction: column;
    gap: 30px;
}

.sidebar-widget {
    background-color: var(--white);
    border-radius: 8px;
    padding: 20px;
    box-shadow: var(--box-shadow);
}

.widget-title {
    font-size: 18px;
    margin-bottom: 15px;
    padding-bottom: 10px;
    border-bottom: 2px solid var(--primary-color);
    display: inline-block;
}

.popular-posts {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.popular-post-item {
    display: flex;
    gap: 10px;
    padding-bottom: 10px;
    border-bottom: 1px solid var(--border-color);
}

.popular-post-item:last-child {
    border-bottom: none;
    padding-bottom: 0;
}

.popular-post-item img {
    width: 80px;
    height: 60px;
    object-fit: cover;
    border-radius: 4px;
}

.popular-post-content h4 {
    font-size: 14px;
    margin-bottom: 5px;
}

.popular-post-meta {
    font-size: 12px;
    color: var(--light-text);
}

.ad-widget {
    height: 250px;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: #f5f5f5;
    color: #999;
}

/* Footer */
.main-footer {
    background-color: #222;
    color: #ccc;
    padding: 60px 0 0;
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 30px;
    margin-bottom: 40px;
}

.footer-widget h3 {
    color: var(--white);
    font-size: 18px;
    margin-bottom: 20px;
    position: relative;
    padding-bottom: 10px;
}

.footer-widget h3::after {
    content: '';
    position: absolute;
    left: 0;
    bottom: 0;
    width: 40px;
    height: 2px;
    background-color: var(--primary-color);
}

.footer-widget p {
    margin-bottom: 15px;
    line-height: 1.6;
}

.footer-widget ul {
    list-style: none;
}

.footer-widget ul li {
    margin-bottom: 10px;
}

.footer-widget ul li a {
    color: #ccc;
    transition: var(--transition);
}

.footer-widget ul li a:hover {
    color: var(--primary-color);
    padding-left: 5px;
}

.newsletter-form {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.newsletter-form input {
    padding: 10px;
    border: 1px solid #444;
    background-color: #333;
    color: #fff;
    border-radius: 4px;
}

.newsletter-form button {
    padding: 10px;
    background-color: var(--primary-color);
    color: var(--white);
    border: none;
    border-radius: 4px;
    cursor: pointer;
    transition: var(--transition);
}

.newsletter-form button:hover {
    background-color: var(--secondary-color);
}

.footer-bottom {
    border-top: 1px solid #444;
    padding: 20px 0;
    text-align: center;
}

.footer-links {
    display: flex;
    justify-content: center;
    gap: 20px;
    margin-top: 10px;
}

.footer-links a {
    color: #999;
    transition: var(--transition);
}

.footer-links a:hover {
    color: var(--primary-color);
}

/* Responsive Styles */
@media (max-width: 1024px) {
    .featured-section,
    .content-section {
        grid-template-columns: 1fr;
    }
    
    .news-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .footer-content {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .header-content {
        flex-direction: column;
        gap: 20px;
    }
    
    .ad {
        display: none;
    }
    
    .nav-menu {
        display: none;
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background-color: var(--primary-color);
        flex-direction: column;
        z-index: 1000;
    }
    
    .nav-menu.active {
        display: flex;
    }
    
    .mobile-menu-toggle {
        display: block;
    }
    
    .news-grid {
        grid-template-columns: 1fr;
    }
    
    .footer-content {
        grid-template-columns: 1fr;
    }
}