/* Zenith Theme | risij.uk Blog | Friendly & Casual Tone */
/* Font: Inter */

/* --- CSS Variables --- */
:root {
  --primary-color: #007BFF; /* A friendly, trustworthy blue */
  --secondary-color: #6c757d;
  --background-color: #f8f9fa;
  --surface-color: #ffffff;
  --text-color: #212529;
  --heading-color: #343a40;
  --border-color: #dee2e6;
  --link-hover-color: #0056b3;
  --font-family: 'Inter', sans-serif;
  --header-height: 70px;
}

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

html {
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-family);
  font-size: 16px;
  line-height: 1.6;
  color: var(--text-color);
  background-color: var(--background-color);
  /* New subtle pattern */
  background-image: linear-gradient(rgba(0, 123, 255, 0.02) 1px, transparent 1px),
                    linear-gradient(90deg, rgba(0, 123, 255, 0.02) 1px, transparent 1px);
  background-size: 20px 20px;
}

/* --- Accessibility --- */
a:focus-visible, .btn-primary:focus-visible {
    outline: 3px solid var(--link-hover-color);
    outline-offset: 3px;
    border-radius: 5px;
}

/* --- Typography --- */
h1, h2, h3, h4, h5, h6 {
  color: var(--heading-color);
  line-height: 1.3;
  margin-bottom: 0.75rem;
  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.3s ease;
}

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

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

/* --- Layout --- */
.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 15px;
}

.main-content-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2rem;
  padding-top: 2rem;
  padding-bottom: 2rem;
}

/* --- Header & Navigation --- */
.site-header {
  background-color: var(--surface-color);
  border-bottom: 1px solid var(--border-color);
  padding: 0 1rem;
  height: var(--header-height);
  display: flex;
  align-items: center;
  justify-content: center;
  position: sticky;
  top: 0;
  z-index: 1000;
}

.header-container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  width: 100%;
  max-width: 1200px;
}

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

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

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

.main-nav a {
  font-weight: 500;
  padding: 0.5rem 0;
  color: var(--secondary-color);
  position: relative;
  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,
.main-nav a.active {
  color: var(--primary-color);
}

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

.mobile-nav-toggle {
    display: none;
    background: none;
    border: none;
    cursor: pointer;
    padding: 0.5rem;
}
.mobile-nav-toggle .bar {
    display: block;
    width: 25px;
    height: 3px;
    background-color: var(--heading-color);
    margin: 5px 0;
    transition: 0.3s;
}

/* --- Main Content --- */
main {
  background-color: var(--surface-color);
  padding: 2rem;
  border-radius: 8px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.05);
}

.page-intro {
  text-align: center;
  padding: 3rem 0;
  background-color: var(--surface-color);
  border-radius: 8px;
  margin-bottom: 2rem;
}
.page-intro h1 {
  margin-bottom: 1rem;
}
.page-intro p {
  max-width: 700px;
  margin: 0 auto;
  color: var(--secondary-color);
}

/* --- Blog Post Cards --- */
.articles-section {
  padding: 2rem 0;
}

.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;
  display: flex;
  flex-direction: column;
  transition: transform 0.3s ease, box-shadow 0.3s ease, border-color 0.3s ease;
}

.article-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 4px 15px rgba(0,0,0,0.1);
  border-color: var(--primary-color);
}

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

.article-card-content h3 {
  margin-top: 0;
}
.article-card-content h3 a {
  color: var(--heading-color);
  text-decoration: none;
}
.article-card-content h3 a:hover {
  color: var(--primary-color);
}

.read-more-link {
  display: inline-block;
  margin-top: auto;
  font-weight: 600;
  color: var(--primary-color);
  text-decoration: none;
}
.read-more-link:hover {
  text-decoration: underline;
}

/* --- Sidebar --- */
.sidebar {
  padding-top: 1.5rem;
}

.widget {
  background-color: var(--surface-color);
  padding: 1.5rem;
  border-radius: 8px;
  margin-bottom: 2rem;
  box-shadow: 0 2px 8px rgba(0,0,0,0.05);
}

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

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

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

.widget ul li a {
  text-decoration: none;
  color: var(--text-color);
}

.widget ul li a:hover {
  color: var(--primary-color);
}

.promo-widget p {
  margin-bottom: 0;
  font-style: italic;
  color: var(--secondary-color);
}

/* --- Article Page Specifics --- */
.article-header {
  border-bottom: 1px solid var(--border-color);
  margin-bottom: 2rem;
  padding-bottom: 1rem;
}
.article-header h1 {
  font-size: 2.8rem;
  margin-bottom: 0.5rem;
}
.article-meta {
  color: var(--secondary-color);
  font-size: 0.9rem;
}
.article-meta span {
  margin-right: 1rem;
}
.article-content {
  font-size: 1.1rem;
}
.article-content h2 {
  margin-top: 2rem;
  border-bottom: 1px solid var(--border-color);
  padding-bottom: 0.5rem;
}
.article-content h3 {
  margin-top: 1.5rem;
}
.article-content blockquote {
    margin: 1.5rem 0;
    padding: 1rem 1.5rem;
    border-left: 5px solid var(--primary-color);
    background-color: var(--background-color);
    border-radius: 0 8px 8px 0;
    font-style: italic;
    color: var(--secondary-color);
}
.article-content blockquote p {
    margin-bottom: 0;
}

.cta-section {
    background-color: var(--background-color);
    padding: 2rem;
    margin: 2rem 0;
    text-align: center;
    border-radius: 8px;
    border: 1px solid var(--border-color);
}

.cta-section h2 {
    margin-top: 0;
}

.btn-primary {
    display: inline-block;
    background-color: var(--primary-color);
    color: #fff;
    padding: 0.75rem 1.5rem;
    border-radius: 5px;
    text-decoration: none;
    font-weight: 600;
    border: none;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    background-image: linear-gradient(to bottom, var(--primary-color), #0069d9);
    transition: background-color 0.3s ease, transform 0.3s ease, box-shadow 0.3s ease;
}

.btn-primary:hover {
    background-color: var(--link-hover-color);
    transform: translateY(-2px);
    color: #fff;
    text-decoration: none;
    box-shadow: 0 4px 8px rgba(0,0,0,0.15);
    background-image: linear-gradient(to bottom, #0069d9, #0056b3);
}

/* --- Contact Page --- */
.contact-details {
    margin-top: 2rem;
}
.contact-details p {
    font-size: 1.1rem;
}

/* --- Footer --- */
.site-footer {
  background-color: var(--heading-color);
  color: #fff;
  padding: 2rem 0;
  margin-top: 2rem;
  text-align: center;
}

.footer-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 15px;
}
.footer-links {
  list-style: none;
  padding: 0;
  display: flex;
  justify-content: center;
  gap: 1.5rem;
  margin-bottom: 1rem;
}
.footer-links a {
  color: #fff;
  opacity: 0.8;
}
.footer-links a:hover {
  opacity: 1;
  text-decoration: underline;
}
.copyright {
  font-size: 0.9rem;
  opacity: 0.7;
  margin-bottom: 0.5rem;
}
.footer-credit {
    font-size: 0.8rem;
    opacity: 0.5;
    margin-bottom: 0;
}


/* --- Media Queries (Mobile-First) --- */

/* Tablet */
@media (max-width: 850px) {
    .main-nav ul {
        display: none;
    }
    .mobile-nav-toggle {
        display: block;
    }
    .header-container {
        justify-content: space-between;
    }
    .site-title {
        margin-right: auto;
    }
}

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

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