/* General Reset */
html, body {
  margin: 0;
  padding: 0;
  height: 100%;
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  background-color: #f9f9f9;
  color: #222;
}

/* Page Wrapper */
.page-wrapper {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

.site-header,
.site-footer {
  flex-shrink: 0;
}

/* Main Content */
.resources-wrapper {
  flex: 1;
  max-width: 900px;
  margin: 0 auto;
  padding: 2rem;
}

/* Blog List Styling */
.blog-list .blog-post {
  background: #ffffff;
  padding: 1.5rem;
  border-radius: 10px;
  margin-bottom: 1.5rem;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
  transition: box-shadow 0.3s ease;
}

.blog-post h2 {
  margin-top: 0;
  margin-bottom: 0.5rem;
}

.blog-post h2 a {
  color: #2a658f;
  text-decoration: none;
  font-size: 1.25rem;
  font-weight: 600;
}

.blog-post h2 a:hover {
  text-decoration: underline;
}

.snippet {
  font-size: 0.95rem;
  color: #555;
}

/* Blog Post Page */
.blog-article {
  max-width: 800px;
  margin: 2rem auto;
  padding: 2rem;
  background: #ffffff;
  border-radius: 12px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
  line-height: 1.7;
  font-size: 1rem;
}

.blog-header h1 {
  font-size: 2rem;
  color: #2a658f;
  margin-bottom: 0.5rem;
}

.blog-header .meta {
  font-size: 0.9rem;
  color: #777;
  margin-bottom: 1.5rem;
}

/* Blog Content Styling */
.blog-content p {
  margin-bottom: 1.2rem;
}

.blog-content h2,
.blog-content h3 {
  color: #3f87a6;
  margin-top: 2rem;
  margin-bottom: 0.8rem;
}

.blog-content ul,
.blog-content ol {
  padding-left: 1.5rem;
  margin: 1rem 0;
}

.blog-content li {
  margin-bottom: 0.5rem;
}

.blog-content blockquote {
  background-color: #f9f9f9;
  border-left: 4px solid #3f87a6;
  padding: 0.75rem 1rem;
  font-style: italic;
  color: #555;
  margin: 1.5rem 0;
}

/* Back Link */
.back-link {
  margin-top: 2rem;
  text-align: left;
}

.back-link a {
  color: #3f87a6;
  text-decoration: none;
  font-weight: 600;
}

.back-link a:hover {
  text-decoration: underline;
}

/* --- Blog Grid --- */
.blog-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 1.25rem;
  margin-top: 1.5rem;
}

.blog-card {
  background: #fff;
  border-radius: 14px;
  overflow: hidden;
  box-shadow: 0 6px 18px rgba(0,0,0,0.06);
  display: flex;
  flex-direction: column;
  transition: transform .18s ease, box-shadow .18s ease;
}
.blog-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 24px rgba(0,0,0,0.10);
}

/* Thumbnail keeps 16:9 using aspect-ratio */
.blog-card .thumb {
  position: relative;
  display: block;
  background: linear-gradient(180deg, #eef3ff, #e9ecf2);
  aspect-ratio: 16 / 9;
  overflow: hidden;
}
.blog-card .thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform .3s ease;
}
.blog-card:hover .thumb img {
  transform: scale(1.03);
}

.blog-card .badge {
  position: absolute;
  top: .6rem;
  left: .6rem;
  background: #1e40af; /* your theme blue */
  color: #fff;
  font-size: .75rem;
  padding: .25rem .5rem;
  border-radius: 8px;
  box-shadow: 0 2px 8px rgba(0,0,0,.15);
}

.blog-card .card-body {
  padding: 1rem 1rem 1.1rem;
  display: flex;
  flex-direction: column;
  gap: .5rem;
}

.blog-title {
  font-size: 1.05rem;
  line-height: 1.35;
  margin: 0;
}
.blog-title a {
  color: #0f172a;
  text-decoration: none;
}
.blog-title a:hover {
  text-decoration: underline;
}

.meta {
  color: #6b7280;
  font-size: .85rem;
  margin: 0;
}

.snippet {
  color: #374151;
  margin: 0;
  font-size: .95rem;
}

.read-more {
  margin-top: .25rem;
  font-weight: 600;
  text-decoration: none;
  color: #1e40af;
}
.read-more:hover { text-decoration: underline; }

/* --- Dark mode tweaks (you already toggle .dark-mode on <html>) --- */
.dark-mode .blog-card { background: #0f172a; box-shadow: 0 6px 18px rgba(0,0,0,0.4); }
.dark-mode .blog-title a { color: #e5e7eb; }
.dark-mode .snippet { color: #cbd5e1; }
.dark-mode .meta { color: #94a3b8; }
.dark-mode .blog-card .thumb { background: linear-gradient(180deg, #172036, #0b1324); }
.dark-mode .read-more { color: #93c5fd; }
