:root {
    --primary: #f7b731;
    --primary-dark: #e5a800;
    --secondary: #1a1a2e;
    --secondary-light: #16213e;
    --accent: #0f3460;
    --text: #333;
    --text-light: #666;
    --white: #fff;
    --bg-light: #f8f9fa;
    --border: #e1e1e1;
    --shadow: 0 2px 10px rgba(0,0,0,0.1);
}

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

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    color: var(--text);
    background: var(--bg-light);
}

a {
    text-decoration: none;
    color: inherit;
}

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

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

/* Header */
header {
    background: var(--secondary);
    color: var(--white);
    position: sticky;
    top: 0;
    z-index: 1000;
}

.top-bar {
    background: var(--secondary-light);
    padding: 8px 0;
    font-size: 0.85rem;
}

.top-bar .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.date {
    color: #aaa;
}

.social-links a {
    margin-left: 15px;
    color: #aaa;
    transition: color 0.3s;
}

.social-links a:hover {
    color: var(--primary);
}

.main-header {
    padding: 15px 0;
    box-shadow: var(--shadow);
}

.main-header .container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 15px;
}

.logo {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 1.8rem;
    font-weight: 800;
    color: var(--primary);
}

.logo svg {
    width: 45px;
    height: 45px;
}

.search-box {
    display: flex;
    flex: 1;
    max-width: 400px;
}

.search-box input {
    flex: 1;
    padding: 10px 15px;
    border: none;
    border-radius: 4px 0 0 4px;
    font-size: 0.95rem;
}

.search-box button {
    padding: 10px 20px;
    background: var(--primary);
    border: none;
    border-radius: 0 4px 4px 0;
    cursor: pointer;
    font-weight: 600;
    transition: background 0.3s;
}

.search-box button:hover {
    background: var(--primary-dark);
}

nav {
    background: var(--secondary);
    border-top: 1px solid rgba(255,255,255,0.1);
}

nav ul {
    display: flex;
    list-style: none;
    gap: 5px;
    flex-wrap: wrap;
}

nav a {
    display: block;
    padding: 12px 18px;
    color: var(--white);
    font-weight: 500;
    transition: all 0.3s;
}

nav a:hover, nav a.active {
    background: var(--primary);
    color: var(--secondary);
}

/* Mobile menu */
.mobile-menu-btn {
    display: none;
    background: none;
    border: none;
    color: white;
    font-size: 1.5rem;
    cursor: pointer;
}

/* Hero Section */
.hero {
    background: linear-gradient(135deg, var(--secondary) 0%, var(--accent) 100%);
    color: white;
    padding: 40px 0;
    text-align: center;
}

.hero h1 {
    font-size: 2.5rem;
    margin-bottom: 10px;
}

.hero p {
    font-size: 1.2rem;
    opacity: 0.9;
}

/* Main Content */
.main-content {
    display: grid;
    grid-template-columns: 1fr 300px;
    gap: 30px;
    padding: 30px 0;
}

/* Articles Grid */
.articles-section {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 25px;
}

.article-card {
    background: var(--white);
    border-radius: 8px;
    overflow: hidden;
    box-shadow: var(--shadow);
    transition: transform 0.3s;
}

.article-card:hover {
    transform: translateY(-5px);
}

.article-card img {
    width: 100%;
    height: 180px;
    object-fit: cover;
}

.article-content {
    padding: 20px;
}

.category-tag {
    display: inline-block;
    padding: 4px 12px;
    background: var(--primary);
    color: var(--secondary);
    font-size: 0.75rem;
    font-weight: 600;
    border-radius: 20px;
    margin-bottom: 10px;
}

.article-card h3 {
    font-size: 1.1rem;
    margin-bottom: 10px;
    line-height: 1.4;
}

.article-card h3 a:hover {
    color: var(--primary-dark);
}

.article-meta {
    font-size: 0.85rem;
    color: var(--text-light);
}

.article-meta span {
    margin-right: 15px;
}

/* Sidebar */
.sidebar {
    display: flex;
    flex-direction: column;
    gap: 25px;
}

.widget {
    background: var(--white);
    border-radius: 8px;
    padding: 20px;
    box-shadow: var(--shadow);
}

.widget h3 {
    font-size: 1.1rem;
    margin-bottom: 15px;
    padding-bottom: 10px;
    border-bottom: 2px solid var(--primary);
}

.popular-posts {
    list-style: none;
}

.popular-posts li {
    padding: 12px 0;
    border-bottom: 1px solid var(--border);
}

.popular-posts li:last-child {
    border-bottom: none;
}

.popular-posts a {
    display: flex;
    gap: 12px;
    align-items: flex-start;
}

.popular-posts img {
    width: 60px;
    height: 45px;
    object-fit: cover;
    border-radius: 4px;
}

.popular-posts h4 {
    font-size: 0.9rem;
    line-height: 1.3;
}

/* Ad Placeholders */
.ad-placeholder {
    background: #f0f0f0;
    border: 2px dashed #ccc;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #888;
    font-size: 0.85rem;
    text-align: center;
    padding: 15px;
}

.ad-banner {
    width: 100%;
    height: 90px;
    margin: 20px 0;
}

.ad-sidebar {
    height: 250px;
    margin-bottom: 20px;
}

.ad-in-content {
    height: 120px;
    margin: 20px 0;
}

/* Footer */
footer {
    background: var(--secondary);
    color: #aaa;
    padding: 40px 0 20px;
    margin-top: 50px;
}

.footer-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 30px;
    margin-bottom: 30px;
}

.footer-section h4 {
    color: var(--white);
    margin-bottom: 15px;
}

.footer-section ul {
    list-style: none;
}

.footer-section li {
    margin-bottom: 8px;
}

.footer-section a:hover {
    color: var(--primary);
}

.footer-bottom {
    text-align: center;
    padding-top: 20px;
    border-top: 1px solid rgba(255,255,255,0.1);
    font-size: 0.9rem;
}

/* Category Pages */
.category-header {
    background: var(--secondary-light);
    color: white;
    padding: 30px 0;
    margin-bottom: 30px;
}

.category-header h1 {
    font-size: 2rem;
}

/* Article Page */
.article-page {
    padding: 30px 0;
}

.article-page .container {
    display: grid;
    grid-template-columns: 1fr 280px;
    gap: 40px;
}

.article-main h1 {
    font-size: 2rem;
    margin-bottom: 15px;
}

.article-main .article-meta {
    margin-bottom: 20px;
}

.article-main .featured-image {
    width: 100%;
    height: 400px;
    object-fit: cover;
    border-radius: 8px;
    margin-bottom: 25px;
}

.article-body {
    font-size: 1.1rem;
    line-height: 1.8;
}

.article-body p {
    margin-bottom: 20px;
}

.article-body h2 {
    margin: 30px 0 15px;
}

/* Contact Form */
.contact-form {
    background: var(--white);
    padding: 30px;
    border-radius: 8px;
    box-shadow: var(--shadow);
    max-width: 600px;
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 12px;
    border: 1px solid var(--border);
    border-radius: 4px;
    font-size: 1rem;
}

.form-group textarea {
    min-height: 150px;
    resize: vertical;
}

.btn-submit {
    background: var(--primary);
    color: var(--secondary);
    padding: 12px 30px;
    border: none;
    border-radius: 4px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.3s;
}

.btn-submit:hover {
    background: var(--primary-dark);
}

/* Responsive */
@media (max-width: 900px) {
    .main-content,
    .article-page .container {
        grid-template-columns: 1fr;
    }
    
    .sidebar {
        order: -1;
    }
}

@media (max-width: 768px) {
    .top-bar .container {
        flex-direction: column;
        gap: 10px;
    }
    
    .mobile-menu-btn {
        display: block;
    }
    
    nav ul {
        display: none;
        flex-direction: column;
    }
    
    nav ul.active {
        display: flex;
    }
    
    .search-box {
        order: 3;
        max-width: 100%;
        width: 100%;
    }
    
    .hero h1 {
        font-size: 1.8rem;
    }
    
    .articles-section {
        grid-template-columns: 1fr;
    }
    
    .article-main .featured-image {
        height: 250px;
    }
}
