:root {
    --bg-color: #0f172a;
    --text-color: #f8fafc;
    --accent-color: #3b82f6;
    --accent-hover: #60a5fa;
    --card-bg: rgba(30, 41, 59, 0.7);
    --border-color: rgba(255, 255, 255, 0.1);
    --glass-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.37);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Outfit', sans-serif;
}

body {
    background-color: var(--bg-color);
    color: var(--text-color);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    overflow-x: hidden;
    background-image: 
        radial-gradient(circle at 15% 50%, rgba(59, 130, 246, 0.15), transparent 25%),
        radial-gradient(circle at 85% 30%, rgba(139, 92, 246, 0.15), transparent 25%);
}

/* Header */
header {
    background: rgba(15, 23, 42, 0.8);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--border-color);
    padding: 1.5rem 5%;
    position: sticky;
    top: 0;
    z-index: 100;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    font-size: 2rem;
    font-weight: 800;
    background: linear-gradient(to right, #60a5fa, #a78bfa);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    text-decoration: none;
}

.tagline {
    font-size: 0.9rem;
    color: #94a3b8;
    margin-left: 1rem;
    font-weight: 300;
    display: none;
}

@media (min-width: 768px) {
    .tagline { display: inline; }
}

nav ul {
    display: flex;
    list-style: none;
    gap: 2rem;
}

nav a {
    color: var(--text-color);
    text-decoration: none;
    font-weight: 500;
    transition: color 0.3s ease;
}

nav a:hover {
    color: var(--accent-hover);
}

/* Ad Containers */
.ad-container {
    width: 100%;
    display: flex;
    justify-content: center;
    margin: 2rem 0;
    overflow: hidden;
}

.ad-container > div {
    background: rgba(255, 255, 255, 0.05);
    border: 1px dashed var(--border-color);
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #64748b;
    font-size: 0.8rem;
}

/* Main Layout */
.container {
    display: flex;
    max-width: 1400px;
    margin: 0 auto;
    padding: 2rem 5%;
    gap: 2rem;
    flex: 1;
}

main {
    flex: 1;
}

aside {
    width: 300px;
    display: none;
}

@media (min-width: 1024px) {
    aside { display: block; }
}

.sticky-sidebar {
    position: sticky;
    top: 100px;
}

/* Grid Layout for Articles */
.articles-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 2rem;
}

/* Card Styling (Glassmorphism) */
.article-card {
    background: var(--card-bg);
    backdrop-filter: blur(10px);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    overflow: hidden;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    cursor: pointer;
    display: flex;
    flex-direction: column;
}

.article-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--glass-shadow);
    border-color: rgba(255, 255, 255, 0.2);
}

.card-img {
    height: 200px;
    background-color: #1e293b;
    background-size: cover;
    background-position: center;
    position: relative;
    overflow: hidden;
}

.card-img::after {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    background: linear-gradient(to bottom, transparent, rgba(15, 23, 42, 0.8));
}

.card-category {
    position: absolute;
    top: 1rem;
    right: 1rem;
    background: var(--accent-color);
    color: white;
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 600;
    z-index: 10;
}

.card-content {
    padding: 1.5rem;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.card-title {
    font-size: 1.25rem;
    margin-bottom: 0.75rem;
    line-height: 1.4;
    color: #e2e8f0;
}

.card-excerpt {
    font-size: 0.9rem;
    color: #94a3b8;
    line-height: 1.6;
    flex: 1;
}

.card-footer {
    margin-top: 1.5rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.8rem;
    color: #64748b;
}

/* Article Modal/View */
#article-modal {
    display: none;
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(15, 23, 42, 0.95);
    backdrop-filter: blur(15px);
    z-index: 1000;
    overflow-y: auto;
    padding: 2rem 5%;
}

.modal-content {
    background: var(--card-bg);
    max-width: 900px;
    margin: 0 auto;
    border-radius: 24px;
    border: 1px solid var(--border-color);
    padding: 3rem;
    position: relative;
    box-shadow: var(--glass-shadow);
}

.close-btn {
    position: absolute;
    top: 1.5rem;
    right: 2rem;
    font-size: 2rem;
    color: #94a3b8;
    cursor: pointer;
    transition: color 0.3s ease;
}

.close-btn:hover {
    color: #f8fafc;
}

.article-header {
    margin-bottom: 2rem;
    text-align: center;
}

.article-header h1 {
    font-size: 2.5rem;
    margin-bottom: 1rem;
    background: linear-gradient(to right, #f8fafc, #94a3b8);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.article-meta {
    color: var(--accent-hover);
    font-weight: 500;
}

.article-body {
    font-size: 1.1rem;
    line-height: 1.8;
    color: #cbd5e1;
}

.article-body p {
    margin-bottom: 1.5rem;
}

.article-body h2 {
    color: #f8fafc;
    margin: 2rem 0 1rem;
}

/* Footer */
footer {
    background: rgba(15, 23, 42, 0.8);
    border-top: 1px solid var(--border-color);
    padding: 3rem 5% 1.5rem;
    margin-top: auto;
}

.footer-content {
    max-width: 1400px;
    margin: 0 auto;
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    gap: 2rem;
    margin-bottom: 2rem;
}

.footer-section h3 {
    color: #f8fafc;
    margin-bottom: 1rem;
}

.footer-section p {
    color: #94a3b8;
    line-height: 1.6;
    max-width: 300px;
}

.footer-links {
    list-style: none;
}

.footer-links li {
    margin-bottom: 0.5rem;
}

.footer-links a {
    color: #94a3b8;
    text-decoration: none;
    transition: color 0.3s ease;
}

.footer-links a:hover {
    color: var(--accent-hover);
}

.footer-bottom {
    text-align: center;
    color: #64748b;
    font-size: 0.9rem;
    padding-top: 1.5rem;
    border-top: 1px solid rgba(255,255,255,0.05);
}

/* Page content for policy pages */
.page-content {
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    padding: 3rem;
    max-width: 900px;
    margin: 0 auto;
    box-shadow: var(--glass-shadow);
}

.page-content h1 {
    margin-bottom: 2rem;
    color: var(--accent-hover);
}

.page-content h2 {
    margin: 2rem 0 1rem;
    color: #e2e8f0;
}

.page-content p {
    line-height: 1.7;
    margin-bottom: 1rem;
    color: #cbd5e1;
}

.page-content ul {
    margin-left: 2rem;
    margin-bottom: 1.5rem;
    color: #cbd5e1;
    line-height: 1.7;
}

@media (max-width: 768px) {
    .modal-content, .page-content {
        padding: 1.5rem;
    }
    .article-header h1 {
        font-size: 1.8rem;
    }
}
