.sidebar,
.left-sidebar,
.right-sidebar {
  box-sizing: border-box;
}

/* Generic sidebar wrapper used for small widgets */
.sidebar-widget {
  background: #fff;
  border-radius: 8px;
  box-shadow: 0 2px 6px rgba(0,0,0,0.06);
  padding: 14px 12px;
  margin-bottom: 24px;
  margin-top: 0 auto;
}

.sidebar-title {
  font-size: 16px;
  font-weight: 700;
  color: #1a5a2a;
  margin: 0 0 18px 0;
  padding: 0;
  
}

.sidebar-content {
  font-size: 14px;
  color: #333;
  line-height: 1.4;
}

/* make widgets full-width inside the sidebar */
.left-sidebar .sidebar-widget,
.right-sidebar .sidebar-widget {
  width: 100%;
}

/* links inside sidebars */
.sidebar-widget a {
  color: #1a5a2a;
  text-decoration: none;
}
.sidebar-widget a:hover { text-decoration: underline; }

@media (max-width: 900px) {
  .sidebar-widget { padding: 12px 14px; }
}

/* Layout helper: place sidebar on the left and keep main content centered within a max-width */
.layout-sidebar-left {
  display: flex;
  gap: 16px; /* bring sidebar slightly closer to main content */
  align-items: flex-start;
  max-width: 1100px;
  margin: 0 auto;
  margin-bottom: 24px;
  padding: 12px 0;
  box-sizing: border-box;
  position: relative;
}
.layout-sidebar-left .left-sidebar {
  flex: 0 0 400px; /* increased so calendar iframe (360px) plus container padding fits */
}
.layout-sidebar-left main.container {
  flex: 1 1 auto;
  width: auto;
}

.sidebar-toggle-button {
  position: absolute;
  top: 22px;
  left: 0;
  width: 26px;
  height: 44px;
  padding: 0;
  border: 1px solid #1a5a2a;
  border-radius: 0 8px 8px 0;
  background: #ffffff;
  color: #1a5a2a;
  font-size: 18px;
  font-weight: 700;
  line-height: 1;
  cursor: pointer;
  z-index: 2;
}

.sidebar-toggle-button:hover {
  background: #1a5a2a;
  color: #ffffff;
}

.layout-sidebar-left.sidebar-collapsed .left-sidebar {
  display: none;
}

.layout-sidebar-left.sidebar-collapsed .sidebar-toggle-button {
  left: 0;
}

.layout-sidebar-left.sidebar-collapsed main.container {
  width: 100%;
}

@media (max-width: 900px) {
  .layout-sidebar-left { flex-direction: column; padding: 0 8px; }
  .layout-sidebar-left .left-sidebar { width: 100%; flex: 0 0 auto; }
}

/* Ensure sidebar aligns with the slideshow */
.left-sidebar {
    margin-top: 0; /* Align with the top of the slideshow */
    padding-top: 0; /* Remove any extra padding */
}

/* Shared box styling for all sidebar cards */
.left-sidebar .calendar-embed,
.left-sidebar .sidebar-secondary,
.left-sidebar .sidebar-tertiary{
  background: #ffffff;
  border-radius: 8px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.08);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  gap: 8px;
}



.left-sidebar .calendar-embed .sidebar-title{
  margin: 18px 0px 18px 0px;
  font-weight: 700;
  color: #1a5a2a;
  
}

.left-sidebar .calendar-embed iframe{
  width: 100%;
  height: 300px; /* adjust to show ~5 items */
  border: 0;
  display: block;
}

/* Improve readability of embedded agenda items (if the embed supports styling via sandboxed CSS it's limited; this mostly styles the wrapper) */
.left-sidebar .calendar-embed .note{
  font-size: 13px;
  color: #4a4a4a;
}

.navigation-button {
  display: inline-block;
  margin-top: 10px;
  padding: 8px 12px;
  border-radius: 6px;
  background: #1a5a2a;
  color: #ffffff;
  text-decoration: none;
  font-weight: 600;
}

.navigation-button:hover {
  background: #144721;
  text-decoration: none;
}

/* Secondary sidebar box */
.left-sidebar .sidebar-secondary{
  padding: 20px; /* same container padding as calendar box */
  margin-top: 16px; /* space below the calendar box */
  margin-bottom: 20px;
}

/* Tertiary sidebar box */
.left-sidebar .sidebar-tertiary{
  padding: 20px; /* same container padding as calendar box */
  margin-top: 16px; /* space below the previous sidebar box */
  margin-bottom: 24px; /* space after the last sidebar */
}

.left-sidebar .sidebar-secondary .sidebar-title,
.left-sidebar .sidebar-tertiary .sidebar-title{
  margin: 0 0 18px 0;
  font-size: 16px;
  font-weight: 700;
  color: #1a5a2a;
}

@media (max-width: 900px){
  .left-sidebar .calendar-embed{
    padding: 20px 16px;
  }
  .left-sidebar .calendar-embed iframe{
    height: 240px;
  }
  .left-sidebar .sidebar-secondary,
  .left-sidebar .sidebar-tertiary{
    padding: 18px 16px;
    margin-top: 12px;
  }
}


