:root {
  --accent: #4a6cf7;
  --text: #1a1a1a;
  --muted: #666;
  --bg: #ffffff;
  --border: #e6e6e6;
  --radius-sm: 6px;
  --radius-md: 12px;
  --transition: 0.2s ease;
}

html, body{
  margin: 0;
  padding: 0;
  font-family: system-ui, Arial, sans-serif;
  color: var(--text);
  background: var(--bg);
} 

a {
  color: inherit;
  text-decoration: none;
}

pre {
  background: #111;
  color: #eee;
  padding: 10px;
  overflow-x: auto;
}

.layout {
  display: grid;
  grid-template-columns: 250px 1fr 250px;
  gap: 20px;
  /* align-items: start; */
  background: var(--bg);
  align-items: stretch;
}

#leftSidebar {
  grid-column: 1;
}

#mainContent {
  grid-column: 2;
}

#rightSidebar {
  grid-column: 3;
}

.active-ui {
  background: var(--accent);
  color: #fff !important;
  border-color: var(--accent);
}

.top-wrapper { /* Wraps Header and Navbar together */
  position: sticky;
  width: 100%;
  height: auto;
  text-align: center;
} 

.header {
  max-width: 1400px;
  height: auto;
  margin: 0 auto; 
}
 
.banner {
  display: block;
  border-color: var(--border);/* #555; */
  border-style: solid;
  border-width: 5px 5px 0px 5px;
  border-radius: 20px 20px 0px 0px; 
  width: calc(100% - 10px); /* this allows for the border */
  height: calc(auto - 10px); /* this allows for the border */
}

/* NAVBAR */
.navbar {
  position: relative; /* relative if using header/navbar wrapper otherwise sticky */
  /* top: 80px; */ /* sits under header */
  display: grid;
  grid-template-columns: repeat(8, 1fr);
  border: 5px solid var(--border);
  border-radius: 0px 0px 20px 20px;
  max-width: calc(1400px - 10px); /* this allows for the border */
  margin: 0 auto;
  background: var(--bg);
  z-index: 2000;
  text-decoration: none;
}

.navbar a,
.nav-search {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 12px;
  border-right: 1px solid var(--border);
  transition: var(--transition);
  position: relative;
  overflow: visible; /* ✅ allow dropdown to escape */
}

.navbar a:first-child {
  border-radius: 0px 0px 0px 20px;
}

.navbar a:last-child,
.nav-search:last-child {
  border-right: none;
  border-radius: 0px 0px 20px 0px;
}

.navbar a,
.category-chip,
.post-card {
  transition: all var(--transition);
}

/* unified active state */
.navbar a.active-ui {
  background: var(--accent);
  color: #fff;
  border-color: var(--accent);
}

/* hover */
.navbar a:hover {
  background: #f5f5f5;
}

/* search input */
.nav-search input {
  width: 90%;
  padding: 6px;
  border: 1px solid #ccc;
}

.search-wrapper {
  position: relative;
  /*overflow: hidden;*/
}

.search-suggestions {
  position: fixed;
  /* position: absolute;*/
  z-index: 99999;
  /* top: calc(100% + 4px); */ /* small gap */
  /* top: 100%; */
  top: 0;
  left: 0;
  width: auto;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 6px;
  max-height: 300px;
  overflow-y: auto;
  display: none;
  box-shadow: 0 4px 12px rgba(0,0,0,0.1); /* optional but nice */
}

.suggestion-item {
  padding: 10px;
  cursor: pointer;
  border-bottom: 1px solid var(--border);
}

.suggestion-item:hover {
  background: var(--hover);
}

.container{
  max-width:1200px;
  margin:auto;
  padding:20px;
}

.slide {
  display: block; /* needs to be block */
  margin: 0 auto;
  width: 600px; 
  text-align: center;
}
.slideimage {
  display: none;
  border: 5px solid var(--border); /* #555; */
  border-radius: 20px;
  width: calc(100% - 10px); /* this allows for the border */
  height: auto;
  text-align: center; 
}

.highlight {
  background: yellow;
  color: #000;
  padding: 0 2px;
  border-radius: 2px;
  /* min-height: 90px; */ /* use this if you want cards with images to be slightly taller for balance */
}

.cards-container,
.featured-container {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 15px;
  margin-bottom: 20px;
}

.post-card {
  display: flex;
  flex-direction: column; /* use this for vertical cards */
  gap: 8px;
  align-items: flex-start;
}

.post-card-title {
  margin: 0;
  font-size: 1.1rem;
}

.post-card-image img {
  width: 100%;
  /* height: 80px; */
  object-fit: cover;
  border-radius: 6px;
}

/* excerpt */
.post-card-excerpt {
  margin: 0;
  color: #555;
}

.post-card-content {
  flex: 1;
}

/* full width when no image */
.post-card-content.full {
  width: 100%;
}

.post-card,
.featured-card {
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 15px;
  transition: var(--transition);
  background: var(--bg);
  cursor: pointer;
}

.post-card:hover,
.featured-card:hover {
  transform: translateY(-2px); /* remove this if z-index errors */
  box-shadow: 0 4px 12px rgba(0,0,0,0.1);
  border-color: var(--accent);
}

/* unified active state */
.post-card.active-ui,
.featured-card.active-ui {
  background: var(--accent);
  color: #fff;
  border-color: var(--accent);
}

.post-full {
  max-width: 700px;
  margin: auto;
  line-height: 1.7;
}

.sidebar {
  padding: 12px;
  border: 1px solid var(--border);
  border-left: none;
  border-radius: var(--radius-md);
  background: var(--bg);
  display: flex;
  flex-direction: column;
  gap: 8px;
  
  position: sticky;
  z-index: 10;
  top: 120px;
  align-self: start;
  
  max-height: calc(100vh - 140px);
  overflow-y: auto;
  scroll-behavior: smooth;
  height: 100%;
  
  box-shadow: -1px 0 0 var(--border);
  
}

.sidebar-inner {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 0;
  margin: 0;
}

/* sidebar items = same system as chips */
.sidebar-item {
  padding: 8px 12px;
  margin: 0;
  /* margin-bottom: 0;  8px; */
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: var(--transition);
  text-align: center;
  background: var(--bg);
  display: block;
  background-clip: border-box;
}

.sidebar-item:hover {
  background: #f5f5f5;
  border-color: var(--accent);
}

/* unified active state */
.sidebar-item.active-ui {
  background: var(--accent);
  color: #fff;
  border-color: var(--accent);
  position: relative;
}

.sidebar-item.active-ui::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 3px;
  /* background: #fff; */
  opacity: 0.7; /* remove this if z-index errors */
}

.sidebar-title {
  font-size: 14px;
  margin-bottom: 10px;
  color: var(--muted);
  text-transform: uppercase; /* remove this if z-index errors */
  letter-spacing: 0.05em;
  text-align: center;
}

.hidden {
  display: none;
}

.back-button {
  margin-bottom: 16px;
  padding: 6px 10px;
  border: 1px solid var(--border);
  background: var(--bg);
  cursor: pointer;
  border-radius: var(--radius-sm);
}

.back-button:hover {
  background: var(--hover);
}

#pagination {
  text-align: center;
  margin-top: 20px;
}

#pagination button {
  margin: 5px;
  padding: 6px 10px;
  cursor: pointer;
}

#pagination button.active {
  background: var(--accent);
  color: #fff;
}

.category-wrapper {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.category-chip {
  padding: 8px 10px;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  /* color: #111;
  background: #fff; */
  cursor: pointer;
  text-align: center;
   transition: var(--transition);
  user-select: none;
}

.category-chip:hover {
  background: #f2f2f2;
  border-color: var(--accent);
}

/*
.category-chip.active {
  background: var(--accent);
  color: #fff !important;
  border-color: var(--accent);
}
*/

/* unified active state */
.category-chip.active-ui {
  background: var(--accent);
  color: #fff;
  border-color: var(--accent);
}

.clear-filters {
  margin-top: 10px;
  font-size: 12px;
  text-align: center;
  cursor: pointer;
  opacity: 0.7; /* remove this if z-index errors */
}

.clear-filters:hover {
  opacity: 1; /* remove this if z-index errors */
}

.feed-item {
  display: flex;
  padding: 10px;
  border-bottom: 1px solid var(--border);
  cursor: pointer;
  gap: 15px; 
  background: white; 
  margin-bottom: 10px;  
  border-radius: 8px; 
  box-shadow: 0 2px 5px rgba(0,0,0,0.1); 
  width: calc(100% - 20px); /* this allows for the border */
  color: #333;
}

.feed-line-1 {
  display: flex;
  justify-content: space-between;
  font-size: 0.8rem;
  color: #777;
}

.feed-line-2 {
  display: flex;
  justify-content: space-between;
  font-size: 0.95rem;
}

.feedimg {
display: block;
border: 5px solid var(--border); /* #555; */
border-radius: 20px;
width: calc(100% - 10px); /* this allows for the border */
height: auto;
text-align: center; 
}

.thumb { 
  width: 75px; 
  height: 50px; 
  object-fit: cover; 
  border-radius: 4px; 
  background: #ddd; 
  flex-shrink: 0; 
}

.content { 
flex: 1; 
}

figure {
display: block!important;
margin: 0 auto!important;
text-align: left!important; 
Padding: 0!important;
width: 100% !important;
}

.content a {
 display: block; 
 /*font-weight: bold; */ 
 /* font-size: 1.1em; */
 color: #333; 
 text-decoration: none; 
 margin-bottom: 5px; 
 }
 
.feedcontent {
display: block!important;
margin: 0 auto!important;
text-align: left!important; 
Padding: 0!important;
width: 100% !important;
}
 
.feedcontent img {
display: block;     /* avoids inline whitespace/line-height issues */
border: 5px solid var(--border); /* #555; */
border-radius: 20px;
width: calc(100% - 10px)!important; /* this allows for the border */
/*max-width: calc(100% - 10px)!important;*/
min-width: calc(100% - 10px)!important; 
height: auto !important;
Padding: 0!important;
margin: 0!important;
/* object-fit: cover !important; */
}
  
.content a:hover { 
color: var(--accent); 
}

.date { 
font-size: 0.85em; 
color: #888; 
float: right;
}

/* @media (max-width: 900px) { */
@media (max-width: 768px) {
  body {
    font-size: 16px;
    line-height: 1.6;
  }
  h1, h2, h3 {
    line-height: 1.3;
  }
  .layout {
	display: block;
    /* grid-template-columns: 1fr; */
  }
  .navbar {
    /* display: flex; */
    overflow-x: auto; 
    white-space: nowrap; 
  }
  .navbar-item {
    /* flex: 0 0 auto; */
    padding: 2px 2px;
  }
  .nav-search {
    /*display: flex;*/
    padding: 2px 2px;
	min-width: 80px;
}
  .sidebar {
    display: none; /* hide sidebars on mobile */
    /*position: fixed;
    top: 0;
    right: -280px;
    width: 260px;
    height: 100%;
    background: var(--bg);
    box-shadow: -2px 0 10px rgba(0,0,0,0.1);
    transition: right 0.3s ease;
    z-index: 1000;*/
  }
  .sidebar.open {
    /*right: 0;*/
  }
  .post-card,
  .featured-card  {
    border-radius: 10px;
    padding: 14px;
    margin-bottom: 12px;
  }
  .post-card:hover,
  .featured-card:hover,
  .sidebar-item:hover {
    background: inherit;
  }
  .sidebar-item,
  .post-card,
  .featured-card,
  .navbar-item {
    padding: 12px;
    font-size: 16px;
  }
  .post-full {
    padding: 0 10px;
  }
  #mainContent {
    width: 100%;
  }
}

