/* === ClearType Theme | risij.uk Blog === */

/* --- Variables and Resets --- */
:root {
    --primary-color: #007BFF; /* A clear, professional blue */
    --secondary-color: #F8F9FA; /* A very light grey for backgrounds */
    --accent-color: #17A2B8; /* An info/accent cyan */
    --text-color: #343A40; /* Dark grey for text */
    --light-text-color: #6C757D; /* Lighter grey for meta text */
    --border-color: #DEE2E6; /* Light border color */
    --white-color: #FFFFFF;
    --hover-color: #0056b3;
    --font-family: 'Inter', sans-serif;
    --container-width: 1100px;
    --border-radius: 8px;
    --box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
}

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

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

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-family);
    line-height: 1.7;
    color: var(--text-color);
    background-color: var(--secondary-color);
}

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

a {
    color: var(--primary-color);
    text-decoration: none;
    transition: color 0.3s ease;
}

a:hover {
    color: var(--hover-color);
    text-decoration: underline;
}

h1, h2, h3, h4 {
    line-height: 1.3;
    font-weight: 700;
    margin-bottom: 1rem;
}

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

/* --- Utility Classes --- */
.container {
    max-width: var(--container-width);
    margin: 0 auto;
    padding: 0 1rem;
}

.btn {
    display: inline-block;
    padding: 0.75rem 1.5rem;
    background-color: var(--primary-color);
    color: var(--white-color);
    border-radius: var(--border-radius);
    font-weight: 600;
    text-align: center;
    transition: background-color 0.3s ease, transform 0.2s ease;
}

.btn:hover {
    background-color: var(--hover-color);
    color: var(--white-color);
    text-decoration: none;
    transform: translateY(-2px);
}

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

.site-header .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo a {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-color);
}

.logo a:hover {
    text-decoration: none;
}

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

.main-nav a {
    font-weight: 600;
    color: var(--text-color);
    padding: 0.5rem 0;
    position: relative;
}

.main-nav a:hover {
    color: var(--primary-color);
    text-decoration: none;
}

.main-nav a::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background-color: var(--primary-color);
    transition: width 0.3s ease;
}

.main-nav a:hover::after {
    width: 100%;
}

/* --- Main Layout --- */
.main-content-area {
    padding: 2.5rem 0;
}

.main-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 2.5rem;
}

@media (min-width: 992px) {
    .main-grid {
        grid-template-columns: 1fr 300px;
    }
}

/* --- Hero Section (Homepage) --- */
.hero {
    background-color: var(--white-color);
    padding: 3rem 1.5rem;
    border-radius: var(--border-radius);
    text-align: center;
    margin-bottom: 2.5rem;
}

.hero h1 {
    color: var(--primary-color);
}

/* --- Articles Grid --- */
.articles-section h2 {
    text-align: center;
    margin-bottom: 2rem;
    position: relative;
    padding-bottom: 0.5rem;
}

.articles-section h2::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 80px;
    height: 3px;
    background-color: var(--primary-color);
}

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

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

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

.article-card {
    background-color: var(--white-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(-5px);
    box-shadow: 0 8px 15px rgba(0, 0, 0, 0.08);
}

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

.article-card-content h3 {
    margin-bottom: 0.5rem;
    font-size: 1.25rem;
}

.article-card-content p {
    flex-grow: 1;
    color: var(--light-text-color);
    margin-bottom: 1rem;
}

/* --- Sidebar --- */
.sidebar {
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

.widget {
    background-color: var(--white-color);
    padding: 1.5rem;
    border-radius: var(--border-radius);
    box-shadow: var(--box-shadow);
}

.widget-title {
    font-size: 1.25rem;
    margin-bottom: 1rem;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid var(--border-color);
}

.widget ul {
    list-style: none;
}

.widget ul li {
    margin-bottom: 0.75rem;
}

.widget ul li a {
    font-weight: 600;
}

.widget p {
    margin-bottom: 0;
}

/* --- Footer --- */
.site-footer {
    background-color: var(--text-color);
    color: var(--secondary-color);
    padding: 2.5rem 0;
    margin-top: 2.5rem;
}

.footer-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 2rem;
    text-align: center;
}

@media (min-width: 768px) {
    .footer-grid {
        grid-template-columns: repeat(3, 1fr);
        text-align: left;
    }
}

.footer-logo a {
    color: var(--white-color);
    font-size: 1.5rem;
    font-weight: 700;
}

.footer-widget h4 {
    color: var(--white-color);
    margin-bottom: 1rem;
}

.footer-widget ul {
    list-style: none;
}

.footer-widget ul li {
    margin-bottom: 0.5rem;
}

.footer-widget a {
    color: var(--border-color);
}

.footer-widget a:hover {
    color: var(--white-color);
    text-decoration: underline;
}

.copyright {
    text-align: center;
    margin-top: 2.5rem;
    padding-top: 1.5rem;
    border-top: 1px solid var(--light-text-color);
    font-size: 0.9rem;
    color: var(--border-color);
}

/* --- Article Page Specifics --- */
.article-full {
    background-color: var(--white-color);
    padding: 2rem;
    border-radius: var(--border-radius);
    box-shadow: var(--box-shadow);
}

.article-header {
    border-bottom: 1px solid var(--border-color);
    margin-bottom: 2rem;
    padding-bottom: 1.5rem;
}

.article-header h1 {
    font-size: 2.8rem;
    margin-bottom: 1rem;
}

.article-meta {
    color: var(--light-text-color);
    font-size: 0.9rem;
}

.article-meta span {
    margin-right: 1rem;
}

.article-content h2 {
    margin-top: 2rem;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid var(--border-color);
}

.article-content h3 {
    margin-top: 1.5rem;
    color: var(--primary-color);
}

.article-content ul, .article-content ol {
    margin-left: 1.5rem;
    margin-bottom: 1rem;
}

.article-content blockquote {
    border-left: 4px solid var(--primary-color);
    padding-left: 1rem;
    margin: 1.5rem 0;
    font-style: italic;
    color: var(--light-text-color);
}

.cta-section {
    background-color: var(--secondary-color);
    border: 2px dashed var(--primary-color);
    border-radius: var(--border-radius);
    padding: 2rem;
    text-align: center;
    margin-top: 2.5rem;
}

.cta-section h3 {
    color: var(--text-color);
}

/* --- Sub-pages (About, Contact) --- */
.page-content {
    background-color: var(--white-color);
    padding: 2rem;
    border-radius: var(--border-radius);
    box-shadow: var(--box-shadow);
}

.page-content h1 {
    margin-bottom: 2rem;
    padding-bottom: 1rem;
    border-bottom: 2px solid var(--border-color);
}
