/* --- Global Styles & Variables --- */
:root {
  --primary-font: 'Source Sans Pro', sans-serif;
  --heading-font: 'Merriweather', serif;
  --base-font-size: 16px;
  --line-height: 1.7;

  --color-primary: #1A5276; /* Deeper Blue */
  --color-secondary: #5DADE2; /* Lighter Blue */
  --color-accent: #F5B041; /* Orange Accent */
  --color-background: #F4F6F7; /* Very Light Gray */
  --color-content-bg: #FFFFFF; /* White */
  --color-text: #34495E; /* Dark Slate Gray */
  --color-text-light: #798692; /* Grayish Blue */
  --color-border: #EAECEE; /* Light Gray Border */
  --color-white: #FFFFFF;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  font-size: var(--base-font-size);
}

body {
  font-family: var(--primary-font);
  line-height: var(--line-height);
  color: var(--color-text);
  background-color: var(--color-background);
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

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

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

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

h1, h2, h3, h4, h5, h6 {
  font-family: var(--heading-font);
  color: var(--color-primary);
  margin: 1.5rem 0 0.8rem 0;
  line-height: 1.3;
  font-weight: 700;
}

h1 { font-size: 2.5rem; margin-top: 0; }
h2 { font-size: 2rem; }
h3 { font-size: 1.5rem; }
h4 { font-size: 1.25rem; }

p {
  margin-bottom: 1rem;
}

ul, ol {
    margin-bottom: 1rem;
    padding-left: 1.5rem;
}

li {
    margin-bottom: 0.5rem;
}

hr {
    border: 0;
    height: 1px;
    background-color: var(--color-border);
    margin: 2rem 0;
}

/* --- Layout --- */
.container {
  width: 90%;
  max-width: 1140px; /* Wider container for modern look */
  margin: 0 auto;
  padding: 2rem 15px;
}

.site-main {
  flex-grow: 1;
}

.main-layout {
  display: flex;
  flex-wrap: wrap;
  gap: 30px; /* Space between content and sidebar */
}

.content-area {
  flex: 1; /* Takes up remaining space */
  min-width: 65%; /* Ensures content area doesn't get too small */
}

.sidebar {
  flex-basis: 300px; /* Fixed width sidebar */
  flex-grow: 0;
}

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

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

.site-branding .site-title a {
  font-family: var(--heading-font);
  font-size: 1.8rem;
  color: var(--color-primary);
  font-weight: bold;
  text-decoration: none;
}
.site-branding .site-title a:hover {
  color: var(--color-secondary);
}
.site-branding .site-description {
    font-size: 0.9rem;
    color: var(--color-text-light);
    margin-top: -5px;
}


/* --- Navigation --- */
.main-navigation {
    background-color: var(--color-primary);
    padding: 0.5rem 0;
}
.main-navigation ul {
  list-style: none;
  display: flex;
  justify-content: center; /* Center nav items */
  padding: 0;
  margin: 0;
}

.main-navigation li {
  margin: 0 1rem; /* Space between nav items */
}

.main-navigation a {
  color: var(--color-white);
  font-weight: 600; /* Slightly bolder */
  text-transform: uppercase;
  font-size: 0.9rem;
  padding: 0.5rem 0;
  display: block;
  text-decoration: none;
  border-bottom: 2px solid transparent;
  transition: border-color 0.3s ease;
}

.main-navigation a:hover,
.main-navigation .current-menu-item a { /* Style for active page */
  color: var(--color-accent);
  border-bottom-color: var(--color-accent);
}

/* --- Blog Post List (Index Page) --- */
.post-list {
  list-style: none;
  padding: 0;
}

.post-preview {
  background-color: var(--color-content-bg);
  border: 1px solid var(--color-border);
  border-radius: 5px;
  margin-bottom: 2rem;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.05);
  transition: box-shadow 0.3s ease;
  display: flex;
  flex-direction: column;
}

.post-preview:hover {
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.post-thumbnail img { /* Style for featured image */
    width: 100%;
    height: 250px; /* Fixed height for consistency */
    object-fit: cover; /* Crop image nicely */
    border-top-left-radius: 5px;
    border-top-right-radius: 5px;
}

.post-content-wrap {
    padding: 1.5rem;
}

.post-preview h2 {
  margin-top: 0;
  margin-bottom: 0.5rem;
  font-size: 1.6rem;
}

.post-preview h2 a {
    color: var(--color-primary);
}
.post-preview h2 a:hover {
    color: var(--color-secondary);
    text-decoration: none;
}

.post-meta {
  font-size: 0.85rem;
  color: var(--color-text-light);
  margin-bottom: 1rem;
}
.post-meta span { margin-right: 10px; } /* Space out meta items */

.post-excerpt {
  margin-bottom: 1.5rem;
}

.read-more {
  display: inline-block;
  background-color: var(--color-secondary);
  color: var(--color-white);
  padding: 0.6rem 1.2rem;
  border-radius: 20px; /* Pill shape */
  font-weight: 600;
  font-size: 0.9rem;
  transition: background-color 0.3s ease;
  text-decoration: none;
}

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

/* --- Single Blog Post --- */
.post-full .post-header {
    text-align: center; /* Center title and meta */
    margin-bottom: 2rem;
    border-bottom: 1px solid var(--color-border);
    padding-bottom: 1.5rem;
}

.post-full .post-header h1 {
    margin-bottom: 0.8rem;
}

.post-full .featured-image {
    margin-bottom: 2rem;
}
.post-full .featured-image img {
    border-radius: 5px;
}

.post-full .post-content {
  margin-top: 0; /* Reset margin as header provides space */
  background-color: var(--color-content-bg);
  padding: 2rem;
  border: 1px solid var(--color-border);
  border-radius: 5px;
  box-shadow: 0 2px 5px rgba(0,0,0,0.05);
}

.post-full .post-content h2 {
    margin-top: 2.5rem;
    border-bottom: 2px solid var(--color-secondary);
    padding-bottom: 0.3rem;
    display: inline-block; /* Keep border only under text */
}

.post-full .post-content h3 {
    margin-top: 2rem;
    color: var(--color-secondary);
}

.post-full .post-content strong {
    color: var(--color-primary);
    font-weight: 600;
}

.post-full .post-content code {
    background-color: #e9ecef;
    padding: 0.2em 0.4em;
    border-radius: 3px;
    font-family: 'Courier New', Courier, monospace;
    font-size: 0.9em;
    color: #c7254e; /* Bootstrap's code color */
}

.post-full .post-content blockquote {
    border-left: 5px solid var(--color-accent);
    margin: 1.5rem 0;
    padding: 1rem 1.5rem;
    background-color: var(--color-background);
    color: var(--color-text-light);
    font-style: italic;
    font-size: 1.1rem;
}
.post-full .post-content blockquote p:last-child {
    margin-bottom: 0;
}

/* --- Sidebar --- */
.widget {
    background-color: var(--color-content-bg);
    border: 1px solid var(--color-border);
    border-radius: 5px;
    padding: 1.5rem;
    margin-bottom: 2rem;
    box-shadow: 0 2px 5px rgba(0,0,0,0.05);
}

.widget-title {
    font-family: var(--heading-font);
    font-size: 1.3rem;
    color: var(--color-primary);
    margin-top: 0;
    margin-bottom: 1rem;
    border-bottom: 2px solid var(--color-secondary);
    padding-bottom: 0.5rem;
}

.widget ul {
    list-style: none;
    padding: 0;
}
.widget ul li {
    margin-bottom: 0.7rem;
    border-bottom: 1px dashed var(--color-border);
    padding-bottom: 0.7rem;
}
.widget ul li:last-child {
    border-bottom: none;
    margin-bottom: 0;
    padding-bottom: 0;
}
.widget ul li a {
    color: var(--color-text);
}
.widget ul li a:hover {
    color: var(--color-secondary);
}


/* --- Footer --- */
.site-footer {
  background-color: var(--color-primary);
  color: var(--color-background);
  padding: 2rem 0;
  text-align: center;
  font-size: 0.9rem;
  margin-top: auto; /* Pushes footer to bottom */
}

.site-footer p {
    margin-bottom: 0.5rem;
    color: #A9CCE3; /* Lighter blue for footer text */
}
.site-footer a {
    color: var(--color-white);
}

/* --- Ad --- */

.ad {
  display: flex;
}

.ad * {
  margin: auto;
}
