/* ==========================================
   RESET & BASE STYLES
   ========================================== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary-color: #1e40af;
    --secondary-color: #dc2626;
    --text-dark: #1f2937;
    --text-light: #6b7280;
    --bg-light: #f9fafb;
    --white: #ffffff;
    --border-color: #e5e7eb;
    --shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.1);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    font-size: 16px;
    line-height: 1.6;
    color: var(--text-dark);
    background-color: var(--bg-light);
}

a {
    text-decoration: none;
    color: inherit;
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* ==========================================
   HEADER
   ========================================== */
.header {
    background: var(--white);
    box-shadow: var(--shadow);
    position: sticky;
    top: 0;
    z-index: 1000;
}

.header-top {
    background: var(--primary-color);
    color: var(--white);
    padding: 8px 0;
    font-size: 14px;
}

.header-top .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.header-main {
    padding: 20px 0;
}

.header-main .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    font-size: 28px;
    font-weight: 700;
    color: var(--primary-color);
}

.logo span {
    color: var(--secondary-color);
}

.nav-menu {
    display: flex;
    list-style: none;
    gap: 30px;
}

.nav-menu a {
    font-weight: 500;
    color: var(--text-dark);
    transition: color 0.3s;
    padding: 8px 0;
}

.nav-menu a:hover {
    color: var(--primary-color);
}

.mobile-menu-toggle {
    display: none;
    background: none;
    border: none;
    font-size: 24px;
    cursor: pointer;
}

/* ==========================================
   BREAKING NEWS
   ========================================== */
.breaking-news {
    background: var(--secondary-color);
    color: var(--white);
    padding: 10px 0;
}

.breaking-news .container {
    display: flex;
    align-items: center;
    gap: 15px;
}

.breaking-label {
    background: var(--white);
    color: var(--secondary-color);
    padding: 4px 12px;
    font-weight: 700;
    font-size: 12px;
    text-transform: uppercase;
    white-space: nowrap;
}

.breaking-content {
    overflow: hidden;
    flex: 1;
}

.breaking-content a {
    display: block;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    font-weight: 500;
}

.breaking-content a:hover {
    text-decoration: underline;
}

/* ==========================================
   MAIN CONTENT
   ========================================== */
.main-content {
    padding: 40px 0;
}

.content-wrapper {
    display: grid;
    grid-template-columns: 1fr 350px;
    gap: 40px;
}

/* ==========================================
   FEATURED ARTICLE
   ========================================== */
.featured-article {
    margin-bottom: 40px;
}

.featured-card {
    position: relative;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: var(--shadow-md);
}

.featured-image {
    width: 100%;
    height: 500px;
    object-fit: cover;
}

.featured-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(to top, rgba(0,0,0,0.9), transparent);
    padding: 40px;
    color: var(--white);
}

.category-badge {
    display: inline-block;
    background: var(--secondary-color);
    color: var(--white);
    padding: 4px 12px;
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    border-radius: 4px;
    margin-bottom: 12px;
}

.featured-title {
    font-size: 32px;
    font-weight: 700;
    line-height: 1.3;
    margin-bottom: 12px;
}

.featured-meta {
    font-size: 14px;
    opacity: 0.9;
}

/* ==========================================
   NEWS GRID
   ========================================== */
.section-title {
    font-size: 24px;
    font-weight: 700;
    margin-bottom: 24px;
    padding-bottom: 12px;
    border-bottom: 3px solid var(--primary-color);
    display: inline-block;
}

.news-grid {
    display: grid;
    gap: 24px;
}

.news-card {
    background: var(--white);
    border-radius: 8px;
    overflow: hidden;
    box-shadow: var(--shadow);
    transition: transform 0.3s, box-shadow 0.3s;
    display: flex;
}

.news-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-md);
}

.news-card-image {
    width: 280px;
    height: 200px;
    object-fit: cover;
}

.news-card-content {
    padding: 20px;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.news-card-title {
    font-size: 20px;
    font-weight: 600;
    margin-bottom: 10px;
    line-height: 1.4;
}

.news-card-title a:hover {
    color: var(--primary-color);
}

.news-card-excerpt {
    color: var(--text-light);
    font-size: 14px;
    line-height: 1.6;
    margin-bottom: 12px;
    flex: 1;
}

.news-card-meta {
    font-size: 13px;
    color: var(--text-light);
}

/* ==========================================
   SIDEBAR
   ========================================== */
.sidebar {
    display: flex;
    flex-direction: column;
    gap: 32px;
}

.widget {
    background: var(--white);
    border-radius: 8px;
    padding: 24px;
    box-shadow: var(--shadow);
}

.widget-title {
    font-size: 18px;
    font-weight: 700;
    margin-bottom: 20px;
    padding-bottom: 12px;
    border-bottom: 2px solid var(--border-color);
}

/* Latest Posts Widget */
.latest-post-item {
    display: flex;
    gap: 12px;
    margin-bottom: 16px;
    padding-bottom: 16px;
    border-bottom: 1px solid var(--border-color);
}

.latest-post-item:last-child {
    margin-bottom: 0;
    padding-bottom: 0;
    border-bottom: none;
}

.latest-post-thumb {
    width: 80px;
    height: 60px;
    object-fit: cover;
    border-radius: 4px;
}

.latest-post-content {
    flex: 1;
}

.latest-post-title {
    font-size: 14px;
    font-weight: 600;
    line-height: 1.4;
    margin-bottom: 4px;
}

.latest-post-title a:hover {
    color: var(--primary-color);
}

.latest-post-date {
    font-size: 12px;
    color: var(--text-light);
}

/* ==========================================
   SINGLE POST
   ========================================== */
.single-post-header {
    margin-bottom: 32px;
}

.breadcrumb {
    font-size: 14px;
    color: var(--text-light);
    margin-bottom: 16px;
}

.breadcrumb a:hover {
    color: var(--primary-color);
}

.post-title {
    font-size: 36px;
    font-weight: 700;
    line-height: 1.3;
    margin-bottom: 16px;
}

.post-meta {
    display: flex;
    gap: 20px;
    font-size: 14px;
    color: var(--text-light);
    flex-wrap: wrap;
}

.post-meta span {
    display: flex;
    align-items: center;
    gap: 6px;
}

.post-featured-image {
    width: 100%;
    height: 500px;
    object-fit: cover;
    border-radius: 8px;
    margin-bottom: 32px;
}

.post-content {
    background: var(--white);
    padding: 40px;
    border-radius: 8px;
    box-shadow: var(--shadow);
    font-size: 18px;
    line-height: 1.8;
}

.post-content h2 {
    font-size: 28px;
    margin: 32px 0 16px;
    font-weight: 700;
}

.post-content h3 {
    font-size: 22px;
    margin: 24px 0 12px;
    font-weight: 600;
}

.post-content p {
    margin-bottom: 20px;
}

.post-content img {
    margin: 24px 0;
    border-radius: 8px;
}

.post-content ul, .post-content ol {
    margin: 20px 0;
    padding-left: 30px;
}

.post-content li {
    margin-bottom: 8px;
}

.post-content blockquote {
    border-left: 4px solid var(--primary-color);
    padding-left: 20px;
    margin: 24px 0;
    font-style: italic;
    color: var(--text-light);
}

.post-content code {
    background: var(--bg-light);
    padding: 2px 6px;
    border-radius: 4px;
    font-family: monospace;
}

.post-content pre {
    background: var(--bg-light);
    padding: 20px;
    border-radius: 8px;
    overflow-x: auto;
    margin: 24px 0;
}

.post-content pre code {
    padding: 0;
    background: none;
}

/* Share Buttons */
.share-buttons {
    margin: 32px 0;
    padding: 24px 0;
    border-top: 1px solid var(--border-color);
    border-bottom: 1px solid var(--border-color);
}

.share-buttons span {
    font-weight: 600;
    margin-right: 12px;
}

.share-btn {
    display: inline-block;
    padding: 8px 16px;
    margin-right: 8px;
    border-radius: 4px;
    color: var(--white);
    font-size: 14px;
    transition: opacity 0.3s;
}

.share-btn:hover {
    opacity: 0.8;
}

.share-btn.facebook { background: #3b5998; }
.share-btn.twitter { background: #1da1f2; }
.share-btn.whatsapp { background: #25d366; }
.share-btn.telegram { background: #0088cc; }

/* Related Posts */
.related-posts {
    margin-top: 48px;
}

.related-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
    margin-top: 24px;
}

/* ==========================================
   FOOTER
   ========================================== */
.footer {
    background: var(--text-dark);
    color: var(--white);
    padding: 60px 0 20px;
    margin-top: 60px;
}

.footer-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 40px;
    margin-bottom: 40px;
}

.footer-widget h3 {
    font-size: 18px;
    margin-bottom: 20px;
    color: var(--white);
}

.footer-widget p {
    color: #9ca3af;
    line-height: 1.8;
    margin-bottom: 16px;
}

.footer-widget ul {
    list-style: none;
}

.footer-widget ul li {
    margin-bottom: 10px;
}

.footer-widget ul li a {
    color: #9ca3af;
    transition: color 0.3s;
}

.footer-widget ul li a:hover {
    color: var(--white);
}

.footer-bottom {
    border-top: 1px solid #374151;
    padding-top: 20px;
    text-align: center;
    color: #9ca3af;
    font-size: 14px;
}

/* ==========================================
   RESPONSIVE
   ========================================== */
@media (max-width: 1024px) {
    .content-wrapper {
        grid-template-columns: 1fr;
    }
    
    .sidebar {
        display: grid;
        grid-template-columns: repeat(2, 1fr);
    }
    
    .footer-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .nav-menu {
        display: none;
    }
    
    .mobile-menu-toggle {
        display: block;
    }
    
    .featured-title {
        font-size: 24px;
    }
    
    .post-title {
        font-size: 28px;
    }
    
    .news-card {
        flex-direction: column;
    }
    
    .news-card-image {
        width: 100%;
        height: 200px;
    }
    
    .sidebar {
        grid-template-columns: 1fr;
    }
    
    .related-grid {
        grid-template-columns: 1fr;
    }
    
    .footer-grid {
        grid-template-columns: 1fr;
    }
    
    .post-content {
        padding: 24px;
    }
}

/* ==========================================
   UTILITY CLASSES
   ========================================== */
.text-center { text-align: center; }
.mt-20 { margin-top: 20px; }
.mb-20 { margin-bottom: 20px; }
.hidden { display: none; }