/* ===========================
   RESET & BASE STYLES
   =========================== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary-color: #e74c3c;
    --primary-dark: #c0392b;
    --text-dark: #2c3e50;
    --text-light: #7f8c8d;
    --bg-light: #f8f9fa;
    --border-color: #ecf0f1;
    --shadow: 0 2px 8px rgba(0,0,0,0.1);
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    line-height: 1.6;
    color: var(--text-dark);
    background: var(--bg-light);
}

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

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

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

/* ===========================
   HEADER
   =========================== */
.site-header {
    background: white;
    box-shadow: var(--shadow);
    position: sticky;
    top: 0;
    z-index: 100;
    border-bottom: 3px solid var(--primary-color);
}

.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 0;
}

.logo h1 {
    font-size: 28px;
    font-weight: 700;
    color: var(--primary-color);
    letter-spacing: -0.5px;
}

.logo .tagline {
    font-size: 12px;
    color: var(--text-light);
    display: block;
    margin-top: -4px;
}

.main-nav {
    display: flex;
    gap: 25px;
}

.nav-link {
    color: var(--text-dark);
    font-weight: 500;
    font-size: 15px;
    transition: color 0.2s;
    padding: 8px 0;
}

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

/* ===========================
   MAIN CONTENT
   =========================== */
.main-content {
    min-height: 70vh;
    padding: 40px 0;
}

/* ===========================
   NEWS GRID
   =========================== */
.news-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 30px;
    margin-bottom: 40px;
}

.news-card {
    background: white;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: var(--shadow);
    transition: transform 0.2s, box-shadow 0.2s;
    cursor: pointer;
}

.news-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 4px 16px rgba(0,0,0,0.15);
}

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

.news-card-category {
    display: inline-block;
    background: var(--primary-color);
    color: white;
    padding: 4px 12px;
    border-radius: 4px;
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    margin-bottom: 12px;
}

.news-card-title {
    font-size: 20px;
    font-weight: 700;
    line-height: 1.3;
    margin-bottom: 12px;
    color: var(--text-dark);
}

.news-card-summary {
    font-size: 15px;
    color: var(--text-light);
    line-height: 1.6;
    margin-bottom: 16px;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.news-card-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 13px;
    color: var(--text-light);
    padding-top: 12px;
    border-top: 1px solid var(--border-color);
}

.news-card-date {
    font-weight: 500;
}

.news-card-read {
    color: var(--primary-color);
    font-weight: 600;
}

/* ===========================
   POST ARTICLE
   =========================== */
.post-article {
    background: white;
    border-radius: 8px;
    padding: 40px;
    box-shadow: var(--shadow);
    margin-bottom: 40px;
}

.post-header {
    margin-bottom: 30px;
}

.post-category {
    display: inline-block;
    background: var(--primary-color);
    color: white;
    padding: 6px 16px;
    border-radius: 4px;
    font-size: 13px;
    font-weight: 600;
    text-transform: uppercase;
    margin-bottom: 16px;
}

.post-title {
    font-size: 36px;
    font-weight: 700;
    line-height: 1.2;
    margin-bottom: 16px;
    color: var(--text-dark);
}

.post-meta {
    display: flex;
    gap: 20px;
    font-size: 14px;
    color: var(--text-light);
    padding-bottom: 20px;
    border-bottom: 2px solid var(--border-color);
}

.post-content {
    font-size: 18px;
    line-height: 1.8;
    color: var(--text-dark);
    margin-bottom: 30px;
}

.post-source {
    background: var(--bg-light);
    padding: 20px;
    border-radius: 6px;
    border-left: 4px solid var(--primary-color);
}

.post-source-label {
    font-size: 13px;
    color: var(--text-light);
    font-weight: 600;
    text-transform: uppercase;
    margin-bottom: 8px;
}

.post-source-link {
    color: var(--primary-color);
    font-weight: 600;
    word-break: break-all;
}

.post-source-link:hover {
    text-decoration: underline;
}

/* ===========================
   RELATED POSTS
   =========================== */
.related-posts {
    margin-top: 60px;
}

.related-posts h2 {
    font-size: 28px;
    margin-bottom: 30px;
    color: var(--text-dark);
}

.related-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 25px;
}

/* ===========================
   CATEGORY PAGE
   =========================== */
.category-header {
    margin-bottom: 40px;
    text-align: center;
}

.category-header h1 {
    font-size: 42px;
    color: var(--text-dark);
    text-transform: capitalize;
}

/* ===========================
   LOAD MORE
   =========================== */
.load-more-container {
    text-align: center;
    margin: 40px 0;
}

.load-more-btn {
    background: var(--primary-color);
    color: white;
    padding: 14px 40px;
    border: none;
    border-radius: 6px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s;
}

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

/* ===========================
   LOADING STATE
   =========================== */
.loading {
    text-align: center;
    padding: 60px 20px;
    color: var(--text-light);
    font-size: 18px;
}

/* ===========================
   FOOTER
   =========================== */
.site-footer {
    background: #2c3e50;
    color: white;
    padding: 40px 0 20px;
    margin-top: 60px;
}

.footer-content {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 40px;
    margin-bottom: 30px;
}

.footer-brand h3 {
    font-size: 24px;
    margin-bottom: 12px;
    color: var(--primary-color);
}

.footer-brand p {
    color: #95a5a6;
    line-height: 1.6;
}

.footer-links {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.footer-links a {
    color: #95a5a6;
    transition: color 0.2s;
}

.footer-links a:hover {
    color: white;
}

.footer-bottom {
    text-align: center;
    padding-top: 20px;
    border-top: 1px solid #34495e;
    color: #95a5a6;
    font-size: 14px;
}

/* ===========================
   RESPONSIVE
   =========================== */
@media (max-width: 768px) {
    .header-content {
        flex-direction: column;
        gap: 15px;
    }
    
    .main-nav {
        gap: 15px;
        font-size: 14px;
    }
    
    .news-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    
    .post-article {
        padding: 24px;
    }
    
    .post-title {
        font-size: 28px;
    }
    
    .post-content {
        font-size: 16px;
    }
    
    .footer-content {
        grid-template-columns: 1fr;
        gap: 30px;
    }
    
    .category-header h1 {
        font-size: 32px;
    }
}

@media (max-width: 480px) {
    .logo h1 {
        font-size: 24px;
    }
    
    .nav-link {
        font-size: 13px;
    }
    
    .news-card-title {
        font-size: 18px;
    }
    
    .post-title {
        font-size: 24px;
    }
  }
