:root {
    --primary-color: #e60023;
    /* News Red */
    --secondary-color: #0d1117;
    /* Dark Background */
    --text-color: #333;
    --text-light: #666;
    --bg-color: #f4f4f4;
    --white: #ffffff;
    --border-color: #ddd;
    --font-family: 'Inter', sans-serif;
    --container-width: 1200px;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: var(--font-family);
    background-color: var(--bg-color);
    color: var(--text-color);
    line-height: 1.6;
}

a {
    text-decoration: none;
    color: inherit;
    transition: color 0.3s;
}

a:hover {
    color: var(--primary-color);
}

.container {
    max-width: var(--container-width);
    margin: 0 auto;
    padding: 0 20px;
}

/* Article Page Layout */
.article-layout-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 30px;
    margin-top: 30px;
    margin-bottom: 30px;
}

@media (min-width: 992px) {
    .article-layout-grid {
        grid-template-columns: 3fr 1fr;
        align-items: start;
    }
}

/* Header */
header {
    background-color: var(--white);
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.05);
    position: sticky;
    top: 0;
    z-index: 1000;
}

.top-bar {
    background-color: var(--secondary-color);
    color: var(--white);
    padding: 5px 0;
    font-size: 0.8rem;
}

.top-bar .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.main-header {
    padding: 15px 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    font-size: 1.8rem;
    font-weight: 800;
    color: var(--secondary-color);
    text-transform: uppercase;
    letter-spacing: -1px;
}

.logo span {
    color: var(--primary-color);
}

.nav-links {
    display: flex;
    gap: 20px;
    list-style: none;
}

.nav-links.active {
    display: flex;
    flex-direction: column;
    position: absolute;
    top: 100%;
    left: 0;
    width: 100%;
    background: var(--white);
    padding: 20px;
    box-shadow: 0 5px 10px rgba(0, 0, 0, 0.1);
}

.mobile-menu-btn {
    display: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: var(--secondary-color);
}

.nav-links a {
    font-weight: 600;
    text-transform: uppercase;
    font-size: 0.9rem;
    color: var(--secondary-color);
}

.search-bar input {
    padding: 8px 15px;
    border: 1px solid var(--border-color);
    border-radius: 20px;
    outline: none;
}

/* Hero Section */
.hero {
    margin: 30px 0;
}

.featured-article {
    background: var(--white);
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
    display: grid;
    grid-template-columns: 1fr;
    cursor: pointer;
    /* Clickable */
    transition: transform 0.2s;
}

.featured-article:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1);
}

.featured-image {
    height: 280px;
    /* Reduced from 400px */
    background-size: cover;
    background-position: center;
    position: relative;
}

.badge {
    position: absolute;
    top: 20px;
    left: 20px;
    background: var(--primary-color);
    color: var(--white);
    padding: 5px 10px;
    font-size: 0.8rem;
    font-weight: 700;
    border-radius: 4px;
    text-transform: uppercase;
}

.featured-content {
    padding: 40px;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.meta {
    font-size: 0.85rem;
    margin-bottom: 50px;
}

.news-card {
    background: var(--white);
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
    transition: transform 0.3s, box-shadow 0.3s;
}

.news-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1);
}

.card-image {
    height: 200px;
    background-size: cover;
    background-position: center;
    position: relative;
}

.card-content {
    padding: 20px;
}

.card-title {
    font-size: 1.2rem;
    margin: 10px 0;
    font-weight: 700;
}

.card-excerpt {
    font-size: 0.9rem;
    color: var(--text-light);
    margin-bottom: 15px;
    display: -webkit-box;
    line-clamp: 3;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* Article Page */
.article-container {
    background: var(--white);
    padding: 40px;
    border-radius: 8px;
    margin-top: 30px;
    margin-bottom: 50px;
    box-shadow: 0 2px 15px rgba(0, 0, 0, 0.05);
}

.article-header {
    margin-bottom: 30px;
    text-align: center;
}

.article-title {
    font-size: 2.5rem;
    margin-bottom: 15px;
}

.article-image {
    width: 100%;
    height: 500px;
    object-fit: cover;
    border-radius: 8px;
    margin-bottom: 30px;
}

.article-body {
    font-size: 1.1rem;
    line-height: 1.8;
    color: #222;
    max-width: 800px;
    margin: 0 auto;
}

.article-body p {
    margin-bottom: 20px;
}

/* Footer */
footer {
    background-color: var(--secondary-color);
    color: var(--white);
    padding: 50px 0 20px;
}

.footer-content {
    display: grid;
    grid-template-columns: 1fr;
    gap: 40px;
    margin-bottom: 40px;
}

.footer-col h3 {
    margin-bottom: 20px;
    font-size: 1.2rem;
}

.footer-col ul {
    list-style: none;
}

.footer-col ul li {
    margin-bottom: 10px;
}

.footer-col ul li a {
    color: #aaa;
}

.footer-col ul li a:hover {
    color: var(--white);
}

.copyright {
    text-align: center;
    border-top: 1px solid #333;
    padding-top: 20px;
    color: #777;
    font-size: 0.9rem;
}

/* Responsive */
@media (max-width: 768px) {
    .featured-article {
        grid-template-columns: 1fr;
    }

    .featured-image {
        height: 250px;
    }

    .nav-links {
        display: none;
    }

    .mobile-menu-btn {
        display: block;
    }

    .search-bar {
        display: none;
        /* Hide search on mobile for simplicity or move it */
    }

    .article-title {
        font-size: 1.8rem;
    }

    .article-image {
        height: 300px;
    }
}

.news-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 30px;
}

@media (min-width: 768px) {
    .news-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (min-width: 1024px) {
    .news-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

.news-grid .ad-banner-full {
    grid-column: 1 / -1;
}

/* Advertisement Styles */
.ad-banner-full {
    width: 100%;
    max-width: 728px;
    height: 90px;
    background-color: #f0f0f0;
    margin: 20px auto;
    display: flex;
    justify-content: center;
    align-items: center;
    color: #999;
    font-size: 0.8rem;
    border: 1px dashed #ccc;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.ad-sidebar {
    width: 100%;
    max-width: 300px;
    height: 250px;
    /* Default to rectangle for safer mobile fit, or 600 for vertical */
    background-color: #f0f0f0;
    margin: 0 auto 20px;
    display: flex;
    justify-content: center;
    align-items: center;
    color: #999;
    font-size: 0.8rem;
    border: 1px dashed #ccc;
    text-transform: uppercase;
    letter-spacing: 1px;
}

@media (min-width: 992px) {
    .ad-sidebar {
        height: 600px;
        /* Taller on desktop */
    }
}

/* Search Bar Update */
.search-bar-wrapper {
    position: relative;
    border: 1px solid var(--border-color);
    border-radius: 20px;
    padding: 2px 10px;
    display: flex;
    align-items: center;
}

.search-bar-wrapper input {
    border: none;
    outline: none;
    padding: 6px;
    font-size: 0.9rem;
    background: transparent;
    width: 200px;
}

.search-btn {
    background: none;
    border: none;
    color: var(--text-light);
    cursor: pointer;
    padding: 5px;
    font-size: 0.9rem;
}

.search-btn:hover {
    color: var(--primary-color);
}

/* Subscribe Modal */
/* Subscribe Modal */
.subscribe-modal {
    display: none;
    position: fixed;
    z-index: 2000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.4);
    backdrop-filter: blur(5px);
    justify-content: center;
    align-items: center;
}

.subscribe-content {
    background-color: #fff;
    padding: 50px 40px;
    border-radius: 20px;
    width: 90%;
    max-width: 420px;
    position: relative;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.2);
    animation: slideUp 0.4s cubic-bezier(0.16, 1, 0.3, 1);
    text-align: center;
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(40px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.close-modal {
    position: absolute;
    top: 15px;
    right: 20px;
    color: #cbd5e0;
    font-size: 24px;
    cursor: pointer;
    transition: color 0.2s;
}

.close-modal:hover {
    color: #4a5568;
}

.subscribe-content h2 {
    margin-bottom: 10px;
    font-family: 'Inter', sans-serif;
    font-weight: 800;
    font-size: 1.8rem;
    color: #1a202c;
    letter-spacing: -0.5px;
}

.subscribe-content p {
    color: #718096;
    margin-bottom: 30px;
    font-size: 0.95rem;
    line-height: 1.5;
}

.subscribe-content input[type="email"],
.subscribe-content input[type="text"] {
    width: 100%;
    padding: 16px 20px;
    margin-bottom: 15px;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    font-size: 1rem;
    box-sizing: border-box;
    font-family: 'Inter', sans-serif;
    background-color: #f7fafc;
    transition: all 0.2s;
}

.subscribe-content input:focus {
    outline: none;
    border-color: #4299e1;
    background-color: #fff;
    box-shadow: 0 0 0 3px rgba(66, 153, 225, 0.15);
}

.subscribe-content button {
    width: 100%;
    padding: 16px;
    background-color: #3182ce;
    color: white;
    border: none;
    border-radius: 12px;
    font-size: 1rem;
    font-weight: 700;
    cursor: pointer;
    transition: transform 0.1s, background-color 0.2s;
    margin-top: 5px;
}

.subscribe-content button:hover {
    background-color: #2b6cb0;
    transform: translateY(-1px);
}

.subscribe-content button:active {
    transform: translateY(1px);
}

/* Pagination */
.pagination {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin: 40px 0;
}

.pagination-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: 8px;
    background: white;
    border: 1px solid #e2e8f0;
    color: #4a5568;
    font-weight: 600;
    transition: all 0.2s;
}

.pagination-btn:hover {
    border-color: #cbd5e0;
    background: #f7fafc;
    color: var(--primary-color);
}

.pagination-btn.active {
    background: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
}

.pagination-btn i {
    font-size: 0.9rem;
}