:root {
    /* Default Theme - Science/Edu Blue */
    --primary-color: #2563eb;
    --primary-hover: #1d4ed8;
    --secondary-color: #64748b;
    --accent-color: #f59e0b;
    --bg-color: #f8fafc;
    --card-bg: #ffffff;
    --text-main: #1e293b;
    --text-muted: #64748b;
    --border-color: #e2e8f0;
    --max-width: 1200px;
    --header-height: 70px;
    --shadow: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
    --radius: 12px;
    --font-main: 'Outfit', sans-serif;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: var(--font-main);
    background-color: var(--bg-color);
    color: var(--text-main);
    line-height: 1.6;
}

a {
    text-decoration: none;
    color: inherit;
    transition: 0.3s;
}

img {
    max-width: 100%;
    height: auto;
    border-radius: var(--radius);
}

/* Layout */
.container {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 0 1.5rem;
}

header {
    background: var(--card-bg);
    height: var(--header-height);
    display: flex;
    align-items: center;
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: var(--shadow);
}

nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
}

.logo {
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--primary-color);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.search-container {
    flex: 1;
    max-width: 400px;
    margin: 0 2rem;
    position: relative;
}

.search-container input {
    width: 100%;
    padding: 0.6rem 1rem 0.6rem 2.5rem;
    border: 2px solid var(--border-color);
    border-radius: 50px;
    outline: none;
    font-family: inherit;
}

.search-container i {
    position: absolute;
    left: 1rem;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-muted);
}

/* Sidebar Search Styles */
.side-search input:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
    outline: none;
}

.search-dropdown {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: white;
    box-shadow: var(--shadow);
    border-radius: 10px;
    margin-top: 0.5rem;
    overflow: hidden;
    z-index: 1000;
}

.search-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 0.75rem 1rem;
    border-bottom: 1px solid var(--border-color);
    font-size: 0.9rem;
    cursor: pointer;
    transition: 0.2s;
}

.search-item:hover {
    background: #f1f5f9;
}

.search-item img {
    border-radius: 4px;
    object-fit: cover;
}

.nav-links {
    display: flex;
    gap: 1.5rem;
    list-style: none;
}

.nav-links li a:hover {
    color: var(--primary-color);
}

/* Hero Section */
.hero {
    padding: 4rem 0;
    text-align: center;
    background: linear-gradient(135deg, #ffffff 0%, #e0e7ff 100%);
}

.hero h1 {
    font-size: 3rem;
    margin-bottom: 1rem;
    color: var(--text-main);
}

.hero p {
    font-size: 1.25rem;
    color: var(--text-muted);
    max-width: 700px;
    margin: 0 auto;
}

/* Main Content Grid */
.main-grid {
    display: grid;
    grid-template-columns: 1fr 300px;
    gap: 2rem;
    padding: 2rem 0;
}

/* Categories Area */
.category-strip {
    display: flex;
    gap: 1rem;
    overflow-x: auto;
    padding: 1rem 0;
    margin-bottom: 2rem;
    scrollbar-width: none;
}

.category-card {
    background: var(--card-bg);
    padding: 1rem 2rem;
    border-radius: 50px;
    white-space: nowrap;
    box-shadow: var(--shadow);
    border: 1px solid var(--border-color);
    cursor: pointer;
    transition: 0.3s;
}

.category-card:hover {
    transform: translateY(-3px);
    border-color: var(--primary-color);
    color: var(--primary-color);
}

/* Article Cards */
.articles-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 2rem;
}

.article-card {
    background: var(--card-bg);
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: var(--shadow);
    transition: 0.3s;
    border: 1px solid var(--border-color);
}

.article-card:hover {
    transform: translateY(-5px);
}

.article-image {
    height: 200px;
    overflow: hidden;
}

.article-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 0;
}

.article-content {
    padding: 1.5rem;
}

.article-tag {
    display: inline-block;
    padding: 0.2rem 0.8rem;
    background: #e0e7ff;
    color: var(--primary-color);
    border-radius: 5px;
    font-size: 0.75rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
}

.article-title {
    font-size: 1.25rem;
    margin-bottom: 0.75rem;
    color: var(--text-main);
}

/* Sidebar */
.sidebar-section {
    background: var(--card-bg);
    padding: 1.5rem;
    border-radius: var(--radius);
    margin-bottom: 2rem;
    box-shadow: var(--shadow);
}

.sidebar-title {
    font-size: 1.1rem;
    font-weight: 700;
    margin-bottom: 1rem;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid var(--primary-color);
}

.popular-item {
    display: flex;
    gap: 1rem;
    margin-bottom: 1rem;
    align-items: center;
}

.popular-item img {
    width: 60px;
    height: 60px;
    object-fit: cover;
}

/* Article Detail Page */
.article-header {
    margin-bottom: 2rem;
}

.breadcrumb {
    display: flex;
    gap: 0.5rem;
    color: var(--text-muted);
    font-size: 0.9rem;
    margin-bottom: 1rem;
}

.article-body {
    font-size: 1.1rem;
    color: var(--text-main);
}

.article-body h2,
.article-body h3,
.article-body h4 {
    margin: 1.5rem 0 1rem;
}

.info-box {
    margin: 2rem 0;
    padding: 1.5rem;
    border-radius: var(--radius);
    border-left: 5px solid var(--primary-color);
    background: #eff6ff;
}

.info-box h5 {
    font-size: 1.1rem;
    margin-bottom: 0.5rem;
    color: var(--primary-color);
}

.facts-box {
    background: #fffbeb;
    border-left: 5px solid var(--accent-color);
}

/* Footer */
footer {
    background: #1e293b;
    color: white;
    padding: 4rem 0 2rem;
    margin-top: 4rem;
}

.footer-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 3rem;
    margin-bottom: 3rem;
}

.footer-logo {
    color: white;
    margin-bottom: 1.5rem;
}

.footer-links h4 {
    margin-bottom: 1.5rem;
}

.footer-links ul {
    list-style: none;
}

.footer-links ul li {
    margin-bottom: 0.75rem;
}

.footer-links ul li a:hover {
    color: var(--primary-color);
}

.footer-bottom {
    border-top: 1px solid #334155;
    padding-top: 2rem;
    text-align: center;
    font-size: 0.9rem;
    color: #94a3b8;
}

/* Responsive */
@media (max-width: 992px) {
    .main-grid {
        grid-template-columns: 1fr;
    }

    .hero h1 {
        font-size: 2.25rem;
    }
}

@media (max-width: 768px) {
    .nav-links {
        display: none;
    }

    .search-container {
        margin: 0 1rem;
    }
}

/* AdSense Readiness Styles (Appended) */
.ad-slot {
    margin: 2rem 0;
    text-align: center;
    overflow: hidden;
}

.ad-slot p {
    font-size: 10px;
    color: var(--text-muted);
    letter-spacing: 1px;
    margin-bottom: 8px;
    text-transform: uppercase;
    font-weight: 600;
}

.leaderboard-ad div {
    background: #f8fafc;
    height: 90px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 2px dashed #cbd5e1;
    color: #94a3b8;
    font-size: 14px;
}

.in-article-ad div {
    background: #f8fafc;
    padding: 3rem;
    border: 2px dashed #cbd5e1;
    color: #94a3b8;
    font-size: 14px;
}

.author-profile {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 0.5rem;
}

.author-profile h4 {
    margin: 0;
    color: var(--primary-color);
}