/* history.css */
/* Sidebar Navigation */
nav.sidebar {
  background-color: #fff;
  box-shadow: 1px 0 4px rgba(0,0,0,0.1);
  border-right: 1px solid #ccc;
  padding: 1em;
  width: 220px;
}
nav.sidebar ul {
  list-style: none;
  padding: 0;
}
nav.sidebar li {
  margin: 0.5em 0;
}
nav.sidebar a {
  color: #0366d6;
  text-decoration: none;
}

/* Sidebar Toggle State */
/* Sidebar collapsed (hidden) */
.sidebar.collapsed {
  display: none;
}

/* Sidebar container or sibling element — fills space when sidebar is collapsed */
.content-wrapper {
  flex-grow: 1; /* ✨ lets summary fill vertical space */
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}
.sidebar.active {
  display: block;
}

/* Container and Main Layout */
.container {
  display: flex;
  flex-direction: row;
  max-width: 1200px;
  margin: 0 auto;
  padding: 1.5rem;
  gap: 30px;
  flex-wrap: wrap;
  align-items: stretch;
  min-height: 100vh;
}

.main {
  flex: 1;
  margin-left: 0;
  width: 100%;
  overflow-x: hidden;
  background-color: #fff;
  margin-bottom: 0;
}

.main-body {
  padding: 1rem 2rem;
  width: 100%;
  margin-top: 0;
}
/* Top Summary Section */
.top-story {
  display: flex;
  flex-wrap: wrap;
  flex-direction: row;
  gap: 30px;
  max-width: 1200px;
  margin: 0 auto;
  align-items: flex-start;
  justify-content: space-between;
  box-sizing: border-box;
  align-items: stretch;
}

.content-block {
  flex: 2 1 600px;
  min-width: 300px;
}

.summary-section {
  display: flex;
  flex-direction: column;
  flex: 1 1 340px;
  min-width: 280px;
}
.summary-wrap {
  flex: 1 1 500px;
  min-width: 300px;
  max-width: calc(100% - 350px);
  margin-top: 0;
  box-sizing: border-box;
  order: 1;
}

.highlight-box {
  flex: 0 0 320px;
  max-width: 320px;
  min-width: 250px;
  background: #fff;
  border: 1px solid #ccc;
  border-radius: 6px;
  padding: 1rem;
  box-shadow: 0 2px 4px rgba(0,0,0,0.1);
  box-sizing: border-box;
  align-self: flex-start;
  order: 2;
  margin-top: auto;
}


/* Details & Summary Styling */
details {
  margin-bottom: 24px;
  margin-top: 0;
  box-sizing: border-box;
}
summary {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  cursor: pointer;
  list-style: none;
  position: relative;
  box-sizing: border-box;
}

.tooltip-box {
  background-color: #000 !important; /* Ensures black background */
  color: #fff; /* White text for contrast */
  border: 1px solid #444; /* Subtle border for definition */
  padding: 12px;
  max-width: 250px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.3); /* Adds depth */
  border-radius: 4px; /* Smooth corners */
  z-index: 1000; /* Keeps tooltip above other elements */
  font-size: 14px;
  pointer-events: auto; /* Ensures interactivity */
}

.tooltip-box img {
  max-width: 100%;
  height: auto;
  margin-top: 8px;
  border-radius: 4px;
}

.tooltip-box a:hover {
  color: #99e0ff;
  text-decoration: none;
}
.tooltip-box a {
  pointer-events: auto; /* Ensure link is clickable */
  color: #66ccff;
  text-decoration: underline;
}

.tooltip-box span:hover {
  color: #fff;
}

.tooltip-box span {
  color: #ccc;
}


/* Table Styling */
table {
  border-collapse: collapse;
  width: 100%;
}
th, td {
  border: 1px solid #444;
  padding: 8px;
  text-align: left;
}
/* Scroll Button */
#backToTop {
  position: fixed;
  bottom: 40px;
  right: 40px;
  background-color: #0366d6;
  color: white;
  border: none;
  border-radius: 5px;
  padding: 10px 15px;
  font-size: 14px;
  cursor: pointer;
  z-index: 999;
}
/* 🪄 Mobile Responsiveness */
@media (max-width: 768px) and (max-width: 1024px){
  nav.sidebar {
    display: none;
    flex-direction: row;
  }

  .main {
    margin-left: 0;
    width: 100%;
  }

  .container {
    flex-direction: column;
    padding: 1rem;
  }

  .top-story {
    flex-direction: column;
    gap: 1.5rem;
    flex-wrap: nowrap;
  }

  .highlight-box {
    flex: 1 1 auto;
    margin: 1rem auto;
    width: 320px;
    flex-shrink: 0;
    margin-left: auto;
    margin-top: 1rem;
  }
  .main-body {
    padding-left: 1rem;
    padding-right: 1rem;
    padding-top: 1rem;
  }
.summary-section {
    flex-direction: column;
  }

  .summary-wrap {
    padding-left: 1rem;
    padding-right: 1rem;
    flex: 1;
    min-width: 300px;
    max-width: calc(100% - 360px);
    width: 100%;
    margin-top: 1rem;
  }

  summary {
    padding-left: 1rem;
    padding-right: 1rem;
  }

  details {
    margin-left: 0.5rem;
    margin-right: 0.5rem;
  }

.content-block {
    width: 100%;
  }

.tooltip-box {
    font-size: 13px;
    padding: 10px;
    max-width: 200px;
  }

}