
/* --- Global Styles & Variables --- */
:root {
  --primary-color: #007BFF;
  --secondary-color: #0056b3;
  --background-color: #f8f9fa;
  --surface-color: #ffffff;
  --text-color: #343a40;
  --muted-text-color: #6c757d;
  --border-color: #dee2e6;
  --font-family: 'Inter', sans-serif;
}

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

html {
  font-size: 16px;
  scroll-behavior: smooth;
}

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

h1, h2, h3, h4, h5, h6 {
  margin-bottom: 0.75rem;
  line-height: 1.3;
  font-weight: 600;
}

h1 { font-size: 2.5rem; }
h2 { font-size: 2rem; }
h3 { font-size: 1.5rem; }

p {
  margin-bottom: 1rem;
}

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

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

/* --- Layout Containers --- */
.container {
  width: 90%;
  max-width: 1200px;
  margin: 0 auto;
}

.site-header {
  background-color: var(--surface-color);
  padding: 1rem 0;
  border-bottom: 1px solid var(--border-color);
  box-shadow: 0 2px 4px rgba(0,0,0,0.05);
}

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

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

.site-title a {
  text-decoration: none;
  color: var(--text-color);
}

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

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

main {
  padding: 2rem 0;
}

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

.main-content {
  background-color: var(--surface-color);
  padding: 2rem;
  border-radius: 8px;
  border: 1px solid var(--border-color);
}

.sidebar {
  padding: 1.5rem;
  background-color: var(--surface-color);
  border-radius: 8px;
  border: 1px solid var(--border-color);
}

.sidebar-widget {
  margin-bottom: 2rem;
}

.sidebar-widget h3 {
  border-bottom: 2px solid var(--primary-color);
  padding-bottom: 0.5rem;
  margin-bottom: 1rem;
}

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

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

.site-footer {
  background-color: var(--text-color);
  color: var(--background-color);
  text-align: center;
  padding: 1.5rem 0;
  margin-top: 2rem;
}

/* --- Homepage Specific --- */
.hero {
  text-align: center;
  margin-bottom: 3rem;
}
.hero h1 {
  margin-bottom: 1rem;
}
.hero p {
  font-size: 1.1rem;
  color: var(--muted-text-color);
  max-width: 700px;
  margin: 0 auto;
}

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

.article-card {
  background-color: var(--surface-color);
  border: 1px solid var(--border-color);
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 2px 8px rgba(0,0,0,0.05);
  transition: transform 0.2s ease-in-out, box-shadow 0.2s ease-in-out;
}
.article-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

.card-content {
  padding: 1.5rem;
}

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

.card-content p {
  color: var(--muted-text-color);
  margin-bottom: 1rem;
}

.read-more-btn {
  display: inline-block;
  background-color: var(--primary-color);
  color: white;
  padding: 0.5rem 1rem;
  border-radius: 5px;
  font-weight: 500;
  text-align: center;
}
.read-more-btn:hover {
  background-color: var(--secondary-color);
  color: white;
  text-decoration: none;
}

/* --- Article Page Specific --- */
.article-header {
  margin-bottom: 2rem;
  border-bottom: 1px solid var(--border-color);
  padding-bottom: 1rem;
}

.article-meta {
  color: var(--muted-text-color);
  font-size: 0.9rem;
  margin-top: 0.5rem;
}

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

.cta-box {
  background-color: var(--background-color);
  border: 1px solid var(--border-color);
  border-left: 5px solid var(--primary-color);
  padding: 1.5rem;
  margin: 2rem 0;
  border-radius: 5px;
}
.cta-box p {
  margin-bottom: 0;
}

/* --- Media Queries for Responsiveness --- */
@media (min-width: 768px) {
  .articles-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

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

/* Hamburger Menu for Mobile */
.menu-toggle {
    display: none;
    flex-direction: column;
    cursor: pointer;
    background: none;
    border: none;
}

.menu-toggle .bar {
    width: 25px;
    height: 3px;
    background-color: var(--text-color);
    margin: 4px 0;
    transition: 0.4s;
}


@media (max-width: 768px) {
    .main-nav {
        display: none;
        width: 100%;
    }

    .main-nav ul {
        flex-direction: column;
        width: 100%;
        text-align: center;
        padding-top: 1rem;
    }

    .main-nav ul li {
        padding: 0.5rem 0;
    }

    .header-content {
        flex-wrap: wrap;
    }

    .menu-toggle {
        display: flex;
    }

    #nav-checkbox {
        display: none;
    }
    
    #nav-checkbox:checked ~ .main-nav {
        display: block;
    }
}
