/* --- Google Font Import --- */
@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@400;600;700&display=swap');

/* --- CSS Variables (Bold & Colorful Theme) --- */
:root {
    --bg-color: #f4f7f9;
    --surface-color: #ffffff;
    --text-color: #4A4A4A;
    --heading-color: #1A1A1A;
    --primary-accent: #0077FF; /* Electric Blue */
    --secondary-accent: #FFD300; /* Bright Yellow */
    --tertiary-accent: #FF1493; /* Hot Pink */
    --border-color: #e9eef2;
    --font-family-main: 'Poppins', sans-serif;
    --border-radius: 12px;
    --box-shadow: 0 4px 15px rgba(0, 0, 0, 0.07);
}

/* --- Base & Reset --- */
*,
*::before,
*::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: var(--font-family-main);
    background-color: var(--bg-color);
    color: var(--text-color);
    line-height: 1.7;
    font-size: 16px;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* --- Typography --- */
h1, h2, h3, h4 {
    font-family: var(--font-family-main);
    color: var(--heading-color);
    line-height: 1.3;
    margin-bottom: 1.25rem;
    font-weight: 700;
}

h1 { font-size: 3rem; }
h2 { font-size: 2rem; }
h3 { font-size: 1.5rem; }
p { margin-bottom: 1.5rem; }

a {
    color: var(--primary-accent);
    text-decoration: none;
    font-weight: 600;
    transition: all 0.2s ease-in-out;
}

a:hover {
    color: var(--tertiary-accent);
}

/* --- Layout --- */
.container {
    width: 90%;
    max-width: 1280px;
    margin: 0 auto;
    padding: 2.5rem 0;
}

/* --- Header & Navigation --- */
.site-header {
    background-color: var(--surface-color);
    box-shadow: var(--box-shadow);
    padding: 1rem 0;
    position: sticky;
    top: 0;
    z-index: 100;
}

.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 90%;
    max-width: 1280px;
    margin: 0 auto;
}

.site-title {
    font-size: 1.8rem;
    font-weight: 700;
}

.site-title a {
    color: var(--heading-color);
    background: linear-gradient(45deg, var(--primary-accent), var(--tertiary-accent));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    text-decoration: none;
}

.main-nav ul {
    list-style: none;
    display: flex;
    gap: 2rem;
}

.main-nav a {
    font-weight: 600;
    font-size: 1.1rem;
    color: var(--text-color);
    padding: 0.5rem 0.25rem;
}

.main-nav a:hover {
    color: var(--primary-accent);
}


/* --- Homepage Specific --- */
.hero {
    text-align: center;
    margin-bottom: 4rem;
    padding: 4rem 1rem;
    background: linear-gradient(135deg, var(--primary-accent) 0%, var(--tertiary-accent) 100%);
    border-radius: var(--border-radius);
    color: white;
}
.hero h1 {
    color: white;
}
.hero p {
    font-size: 1.2rem;
    max-width: 750px;
    margin: 0 auto;
    opacity: 0.9;
}
.hero a {
    color: var(--secondary-accent);
}

.section-title {
    text-align: center;
    margin-bottom: 3rem;
}

.articles-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 2rem;
}

.article-card {
    background-color: var(--surface-color);
    border-radius: var(--border-radius);
    box-shadow: var(--box-shadow);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}
.article-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
}

.article-card-content {
    padding: 1.5rem 2rem;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
}

.article-card h2 {
    font-size: 1.4rem;
    margin-bottom: 0.75rem;
    font-weight: 600;
}

.article-card p {
    margin-bottom: 1.5rem;
    flex-grow: 1;
}

.read-more-btn {
    display: inline-block;
    align-self: flex-start;
    background-color: var(--primary-accent);
    color: white;
    padding: 0.75rem 1.5rem;
    border-radius: 50px;
    text-transform: uppercase;
    font-size: 0.8rem;
    font-weight: 700;
    letter-spacing: 0.5px;
}
.read-more-btn:hover {
    background-color: var(--tertiary-accent);
    color: white;
}

/* --- Article Page Specific --- */
.article-header {
    margin-bottom: 2.5rem;
    padding-bottom: 1.5rem;
    border-bottom: 3px solid var(--secondary-accent);
}
.article-header h1 {
    font-size: 2.5rem;
}
.article-meta {
    font-size: 0.9rem;
    color: #777;
    margin-top: 0.5rem;
    font-weight: 600;
}
.article-content h2, .article-content h3 {
    margin-top: 3rem;
}
.article-content ul {
    list-style-type: '⚡';
    margin-bottom: 1.5rem;
    padding-left: 1.5rem;
}
.article-content li {
    margin-bottom: 0.75rem;
    padding-left: 0.5rem;
}
.cta-box {
    background: linear-gradient(135deg, var(--secondary-accent) 0%, #ffeb3b 100%);
    color: var(--heading-color);
    border-radius: var(--border-radius);
    padding: 2rem;
    margin: 3rem 0;
    text-align: center;
}
.cta-box a {
    color: var(--primary-accent);
}
.cta-box a:hover {
    color: var(--tertiary-accent);
}


/* --- Sidebar --- */
.sidebar-widget {
    margin-bottom: 2.5rem;
    background-color: var(--surface-color);
    padding: 1.5rem;
    border-radius: var(--border-radius);
    box-shadow: var(--box-shadow);
}
.sidebar-widget h3 {
    font-size: 1.4rem;
    margin-bottom: 1rem;
    border-bottom: 2px solid var(--primary-accent);
    padding-bottom: 0.5rem;
}
.sidebar-widget ul {
    list-style: none;
}
.sidebar-widget ul li {
    margin-bottom: 0.75rem;
}

/* --- Footer --- */
.site-footer {
    text-align: center;
    margin-top: 4rem;
    padding: 2.5rem 1rem;
    border-top: 1px solid var(--border-color);
    font-size: 0.9rem;
    background-color: var(--surface-color);
}

/* --- Responsive Design --- */
@media (max-width: 768px) {
    .header-content {
        flex-direction: column;
        gap: 1.5rem;
    }
    .main-nav ul {
        flex-wrap: wrap;
        justify-content: center;
        gap: 0.5rem 1.5rem;
    }
    h1 { font-size: 2.3rem; }
    h2 { font-size: 1.9rem; }
}

@media (min-width: 768px) {
    .articles-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (min-width: 1024px) {
    .main-layout, .article-layout {
        display: grid;
        grid-template-columns: 1fr 320px;
        gap: 3rem;
    }
    .articles-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}