/*==================================================
MODERN BLOG SYSTEM CSS
(Listing Grid + Single Post Architecture)
==================================================*/

/*==========================
DESIGN TOKENS & SYSTEM
==========================*/
:root {

  /* Brand Palette */
  --primary: #2563eb;
  --primary-hover: #1d4ed8;
  --primary-light: rgba(37, 99, 235, 0.08);
  --accent: #f59e0b;
  
  /* Neutral Color System */
  --bg-main: #f8fafc;
  --bg-surface: #ffffff;
  --bg-glass: rgba(255, 255, 255, 0.75);
  
  --text-primary: #0f172a;
  --text-secondary: #475569;
  --text-muted: #94a3b8;
  
  --border-color: #e2e8f0;
  --border-focus: #93c5fd;

  /* Shadows (Elevation Level 1 to 3) */
  --shadow-sm: 0 2px 8px -2px rgba(15, 23, 42, 0.05), 0 1px 4px -1px rgba(15, 23, 42, 0.03);
  --shadow-md: 0 12px 24px -4px rgba(15, 23, 42, 0.08), 0 4px 12px -2px rgba(15, 23, 42, 0.04);
  --shadow-lg: 0 24px 48px -12px rgba(15, 23, 42, 0.12), 0 8px 24px -4px rgba(15, 23, 42, 0.06);

  /* Layout & Utility Variables */
  --radius-sm: 8px;
  --radius-md: Opx;
  --radius-lg: 24px;
  --radius-pill: 9999px;
  
  --transition-fast: 0.15s cubic-bezier(0.4, 0, 0.2, 1);
  --transition-normal: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  --transition-spring: 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  
  --container-width: 1200px;
  --post-width: 600px;
}

/* Optional Dark Theme System */
@media (prefers-color-scheme: dark) {
  :root {
    --bg-main: #0b0f19;
    --bg-surface: #111827;
    --bg-glass: rgba(17, 24, 39, 0.8);
    
    --text-primary: #f8fafc;
    --text-secondary: #94a3b8;
    --text-muted: #64748b;
    
    --border-color: #1e293b;
    --border-focus: #3b82f6;

    --shadow-sm: 0 2px 8px -2px rgba(0, 0, 0, 0.3);
    --shadow-md: 0 12px 24px -4px rgba(0, 0, 0, 0.4);
    --shadow-lg: 0 24px 48px -12px rgba(0, 0, 0, 0.5);
  }
}

/*==========================
BASE RESET & GLOBALS
==========================*/


img {
  max-width: 100%;
  height: auto;
  display: block;
}

a {
  color: inherit;
  text-decoration: none;
}

.container {
  width: min(100% - 2rem, var(--container-width));
  margin-inline: auto;
}



/*==========================
BLOG GRID & CARDS
==========================*/
.blogs-section {
  padding-block: 5rem;
}

.blog-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 340px), 1fr));
  gap: 2rem;
  align-items: stretch;
}

.blog-card {
  background: var(--bg-surface);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: var(--transition-normal);
  position: relative;
}

.blog-card:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow-lg);
  border-color: var(--border-focus);
}

.blog-card-image {
  aspect-ratio: 16 / 9;
  overflow: hidden;
  position: relative;
  background-color: var(--border-color);
}

.blog-card-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}

.blog-card:hover .blog-card-image img {
  transform: scale(1.05);
}


.blog-card-body {
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  flex-grow: 1;
}

.blog-meta {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-bottom: 0.75rem;
}

.blog-card h3 {
  font-size: 1.5rem;
  font-weight: 700;
  line-height: 1.4;
  margin-bottom: 0.75rem;
  color: var(--text-primary);
  transition: var(--transition-fast);
}

.blog-card:hover h3 {
  color: var(--primary);
}

.blog-card p {
  color: var(--text-secondary);
  font-size: 0.95rem;
  line-height: 1.6;
  margin-bottom: 1.5rem;
  flex-grow: 1;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.blog-readmore {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-weight: 600;
  font-size: 1.2rem;
  color: var(--primary);
}

.blog-readmore i {
  transition: transform var(--transition-fast);
}

.blog-card:hover .blog-readmore i {
  transform: translateX(4px);
}


