/* --- Modern Research Hub Layout --- */

/* 1. The Main Frame */
.site-wrapper {
  max-width: 1350px;      /* Widened for 2026 readability standards */
  margin: 0 auto;         /* Centering the entire hub */
  display: flex;          /* Allows sidebar and content to sit side-by-side */
  gap: 60px;              /* The professional gap you requested */
  padding: 40px 20px;
}

/* 2. The Sidebar (Now flexible, not fixed) */
.sidebar {
  width: 290px;
  flex-shrink: 0;         /* Prevents the sidebar from squishing */
  position: sticky;       /* Stays in view as the reader scrolls research */
  top: 20px;
  background: #fff;
  padding: 20px;
  border-radius: 12px;
  box-shadow: 0 4px 12px rgba(0,0,0,0.05);
}
.post-body img { max-width: 100%; height: auto; display: block; margin: 20px auto; }
/* 3. The Main Content (Posts) */
.content-box {
  flex-grow: 1;           /* Fills the remaining widened space */
  background: #fff;
  padding: 40px;
  border-radius: 12px;
  box-shadow: 0 4px 20px rgba(0,0,0,0.08);
  min-width: 0;           /* Prevents layout fractures from wide tables */
}

/* 4. Clinical Typography Update */
h1, h2, h3 {
  font-family: 'Roboto Serif', serif;
  color: #1a237e;         /* Indigo for medical authority */
  line-height: 1.3;
}

body {
  font-family: 'Roboto Serif', serif;
  line-height: 1.8;       /* High-literacy spacing for senior readers */
  color: #444;
  background-color: #f4f7f9;
}

/* --- Mobile Stack (Ensures it doesn't break) --- */
@media (max-width: 992px) {
  .site-wrapper {
    flex-direction: column;
    gap: 30px;
  }
  .sidebar {
    width: 100%;
    position: static;
  }
}
/* FORCE FLEX LAYOUT */
.content-box {
  display: flex !important;
  max-width: 1300px;
  margin: 0 auto !important; /* Centers the whole site */
  padding: 40px 20px;
  gap: 50px; /* The gap between sidebar and research */
}

/* Sidebar styling */
.sidebar {
  position: sticky !important; /* Stays visible while scrolling */
  top: 20px;
  width: 260px !important;
  flex-shrink: 0;
  left: auto !important; /* Breaks the old "Fixed" rule */
}

/* Research Post Area */
.post, .article-page {
  flex-grow: 1;
  max-width: 925px; /* Professional reading width */
  margin: 0 !important;
}

/* Image Fixes */
.page-image, .post-featured-image {
  width: 100%;
  height: auto;
  display: block;
  margin-bottom: 20px;
  border-radius: 8px;
}

/* Mobile Fix */
@media (max-width: 1000px) {
  .content-box {
    flex-direction: column;
  }
  .sidebar {
    width: 100% !important;
    position: relative !important;
  }
}
