/* =========================
   GLOBAL RESET & OBJECT FIX
========================= */
html, body {
  margin: 0;
  padding: 0;
  width: 100%;
  overflow-x: hidden; 
}

*, *::before, *::after {
  box-sizing: border-box;
}

object {
  display: block;
  width: 100%; 
  height: auto; 
  border: none; 
  overflow: hidden; 
  min-height: 0; 
}

/* =========================
   BLOG BRANDING DNA
========================= */
:root {
  --text-main: #49524c;
  --accent: #f15a22;
  --bg-light: #f7f7f6;
  --border-soft: #d7dad7;
}

body {
  font-family: 'Montserrat', sans-serif;
  color: var(--text-main);
  background-color: #ffffff;
  line-height: 1.6;
}

main {
  background-color: var(--bg-light);
  padding: 80px 20px;
}

.content-wrap {
  max-width: 900px;
  margin: 0 auto;
}

h1, h2, h3 {
  font-family: 'Averia Serif Libre', serif;
  color: var(--text-main);
  line-height: 1.2;
}

h1 { font-size: 2.8rem; margin-bottom: 24px; }
h2 { font-size: 2rem; margin-top: 40px; }

/* =========================
   BLOG FEED (Main Page)
========================= */
.blog-feed {
  display: flex;
  flex-direction: column;
  gap: 60px;
}

.blog-card {
  display: flex;
  flex-direction: column;
  background: #ffffff;
  border-radius: 4px;
  overflow: hidden;
  border: 1px solid var(--border-soft);
}

.blog-card-image {
  width: 100%;
  height: 350px;
  object-fit: cover;
}

.blog-card-content {
  padding: 32px;
  display: flex;
  flex-direction: column;
  align-items: flex-start; 
}

.blog-cta {
  display: inline-block;
  font-family: 'Averia Serif Libre', serif;
  font-weight: 700;
  font-size: 0.95rem;
  text-transform: uppercase;
  background-color: #f26722;
  color: #ffffff;
  padding: 12px 26px;
  border-radius: 4px;
  text-decoration: none;
  box-shadow: 0 2px 0 #d4571c;
  transition: transform 0.15s ease;
}

/* =========================
   ARCHIVE LAYOUT (Desktop)
========================= */
.archive-grid {
  display: grid;
  grid-template-columns: 1fr 1fr; 
  gap: 30px;
  margin-top: 40px;
  width: 100%;
}

.blog-card.archive-style {
  display: flex;
  flex-direction: row; 
  background: #ffffff;
  border: 1px solid var(--border-soft);
  border-radius: 4px;
  overflow: hidden;
  height: 130px; 
}

.blog-card-image-wrap {
  flex: 0 0 35%; 
  height: 100%;
  overflow: hidden;
}

.blog-card-image-wrap img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.blog-card.archive-style .blog-card-content {
  flex: 1;
  padding: 12px 15px; 
  display: flex;
  flex-direction: column;
}

.blog-card.archive-style h2 {
  font-size: 1rem;
  margin: 0;
  line-height: 1.2;
}

.card-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  width: 100%;
  margin-top: auto; 
  padding-top: 8px;
}

.blog-meta {
  font-size: 0.7rem;
  text-transform: uppercase;
  color: var(--accent);
  font-weight: 700;
  text-align: right;
}

.blog-cta.small {
  padding: 6px 14px; 
  font-size: 0.75rem;
  box-shadow: 0 1px 0 #d4571c;
}

/* =========================
   RESPONSIVE TUNE-UP (Mobile)
========================= */
@media screen and (max-width: 768px) {
  .archive-grid {
    grid-template-columns: 1fr 1fr; 
    gap: 12px;
  }

  .blog-card.archive-style {
    flex-direction: column; 
    height: 236px; /* Maintained overall size */
  }

  .blog-card-image-wrap {
    flex: 0 0 95px; /* Image 5% taller (from 90px) */
    width: 100%;
  }

  .blog-card.archive-style .blog-card-content {
    padding: 4px 10px; /* Further tight padding to fit elements */
    flex: 1;
    display: flex;
    flex-direction: column;
  }

  .blog-card.archive-style h2 {
    /* Title text increased by 1px (approx 0.9rem) */
    font-size: 0.9rem;
    line-height: 1.1;
    display: -webkit-box;
    -webkit-line-clamp: 5; 
    -webkit-box-orient: vertical;  
    overflow: hidden;
    margin-bottom: 0;
  }

  .card-footer {
    margin-top: auto;
    padding-top: 0;
    align-items: flex-end; /* Keeps button/date anchored low */
  }

  .blog-meta {
    font-size: 0.52rem;
    white-space: nowrap;
    padding-bottom: 2px;
  }

  .blog-card.archive-style .blog-cta.small {
    padding: 7px 11px;
    font-size: 0.72rem;
  }
}