/* ---
Theme: SilentBlog
Font: Inter
Tone: Informative & Straightforward
--- */

/* --- CSS Variables --- */
:root {
  --primary-color: #2563eb; /* A calm but distinct blue */
  --primary-color-hover: #1d4ed8;
  --secondary-color: #f3f4f6; /* Light grey background */
  --text-color: #1f2937; /* Dark grey for text */
  --text-color-light: #6b7280; /* Lighter grey for meta info */
  --border-color: #e5e7eb;
  --header-bg: #ffffff;
  --footer-bg: #111827; /* Dark footer */
  --footer-text: #d1d5db;
  --card-bg: #ffffff;
  --font-family: 'Inter', sans-serif;
  --container-width: 1100px;
  --border-radius: 8px;
  --shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -2px rgba(0, 0, 0, 0.1);
}

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

/* --- General Reset & Base Styles --- */
*,
*::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);
}

h1, h2, h3, h4, h5, h6 {
  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: 1.5rem;
}

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

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

ul, ol {
  list-style-position: inside;
  margin-bottom: 1.5rem;
  padding-left: 1.5rem;
}

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

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

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

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

.site-title {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--text-color);
  text-decoration: none;
}

.site-nav ul {
  list-style: none;
  display: flex;
  gap: 1.5rem;
  margin: 0;
  padding: 0;
}

.site-nav a {
  font-weight: 500;
  color: var(--text-color);
  text-decoration: none;
  padding: 0.5rem 0;
  position: relative;
}

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

.site-nav a:hover::after,
.site-nav a.active::after {
  width: 100%;
}


/* --- Main Content Layout --- */
.main-layout {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2rem;
  padding: 2rem 0;
}

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

main {
  background-color: var(--card-bg);
  padding: 2rem;
  border-radius: var(--border-radius);
  border: 1px solid var(--border-color);
}

/* --- Page Hero Section --- */
.page-hero {
  text-align: center;
  padding: 3rem 1rem;
  background-color: var(--card-bg);
  border-radius: var(--border-radius);
  margin-bottom: 2rem;
}

.page-hero h1 {
  font-size: 3rem;
  margin-bottom: 0.5rem;
}

.page-hero p {
  font-size: 1.125rem;
  color: var(--text-color-light);
  max-width: 600px;
  margin: 0 auto;
}

/* --- Blog Articles Grid --- */
.articles-section {
  padding-bottom: 1rem;
}

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

@media (min-width: 768px) {
  .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(--card-bg);
  border: 1px solid var(--border-color);
  border-radius: var(--border-radius);
  overflow: hidden;
  box-shadow: var(--shadow);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  display: flex;
  flex-direction: column;
}

.article-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -4px rgba(0, 0, 0, 0.1);
}

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

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

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

.read-more-btn {
  display: inline-block;
  background-color: var(--primary-color);
  color: #fff;
  padding: 0.6rem 1.2rem;
  border-radius: 5px;
  text-decoration: none;
  font-weight: 500;
  transition: background-color 0.3s ease;
  align-self: flex-start;
}

.read-more-btn:hover {
  background-color: var(--primary-color-hover);
  color: #fff;
  text-decoration: none;
}

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

.widget {
  background-color: var(--card-bg);
  padding: 1.5rem;
  border-radius: var(--border-radius);
  border: 1px solid var(--border-color);
}

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

.widget ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

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

.widget ul li a {
  text-decoration: none;
  font-weight: 500;
}

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

.footer-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}

.footer-links {
  list-style: none;
  display: flex;
  gap: 1.5rem;
  margin: 0 0 1rem 0;
  padding: 0;
  flex-wrap: wrap;
  justify-content: center;
}

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

.footer-links a:hover {
  color: #fff;
}

.copyright {
  font-size: 0.9rem;
}

/* --- Article Page Specifics --- */
.article-header {
  margin-bottom: 2rem;
  text-align: center;
}

.article-header h1 {
  font-size: 3rem;
  margin-bottom: 0.5rem;
}

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

.article-content {
  font-size: 1.1rem;
}

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

.article-content h3 {
  margin-top: 2rem;
}

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

/* --- Call to Action Section --- */
.cta-section {
    background-color: var(--primary-color);
    color: #fff;
    padding: 2.5rem;
    border-radius: var(--border-radius);
    text-align: center;
    margin: 3rem 0;
}

.cta-section h2 {
    color: #fff;
    margin-bottom: 1rem;
}

.cta-section p {
    font-size: 1.1rem;
    margin-bottom: 1.5rem;
}

.cta-btn {
    display: inline-block;
    background-color: #fff;
    color: var(--primary-color);
    padding: 0.8rem 1.6rem;
    border-radius: 5px;
    text-decoration: none;
    font-weight: 700;
    transition: background-color 0.3s ease, color 0.3s ease;
}

.cta-btn:hover {
    background-color: var(--secondary-color);
    color: var(--primary-color-hover);
}

/* --- Contact & About Page --- */
.page-content p:last-child {
    margin-bottom: 0;
}
