.breadcrumb-nav {
  font-size: 0.9rem;
  margin: 1rem 0;
  color: #555;
}
.breadcrumb-nav a {
  color: #007acc;
  text-decoration: none;
  margin-right: 4px;
}
.breadcrumb-nav a:hover {
  text-decoration: underline;
}
.breadcrumb-nav span {
  color: #333;
}

#likeBtn {
  background-color: #f4a600; /* Darker yellow */
  color: #000; /* Black text is OK */
}


/* ==================================================
   Search Bar and Suggestions
================================================== */
.search-wrapper {
  width: 100%;
  position: relative;
  margin: 0rem 0;
  padding: 0 0rem;
}

.search-wrapper input {
  width: 100%;
  padding: 10px 15px;
  font-size: 1rem;
  border-radius: 6px;
  border: 1px solid #ccc;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
}
.search-suggestions {
  position: absolute;
  background: #fff;
  border: 1px solid #ccc;
  width: 100%;
  max-height: 200px;
  overflow-y: auto;
  z-index: 100;
  display: none;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}
.result-item,
.search-suggestions div {
  padding: 10px;
  cursor: pointer;
  border-bottom: 1px solid #eee;
  transition: background-color 0.2s ease, color 0.2s ease;
}
.result-item:hover,
.result-item.highlighted,
.search-suggestions div:hover,
.search-suggestions div.highlighted {
  background-color: #343a40;
  color: #ffffff;
}
.result-item:hover .category-label,
.result-item.highlighted .category-label,
.search-suggestions div:hover .category-label,
.search-suggestions div.highlighted .category-label {
  color: #ffffff;
}
.category-label {
  font-size: 0.85em;
  color: #666;
  margin-left: 8px;
  transition: color 0.2s ease;
}

* {
  box-sizing: border-box;
}

html, body {
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  margin: 0;
  padding: 0;
  background-color: #f9f9f9;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  overflow-x: hidden;
}


    .section-heading {
      background-color: #f9f9f9;
      color: #2d2d2d;
      padding: 0.75rem 1rem;
      margin-top: 2rem;
      border-left: 5px solid #ffb400;
      border-radius: 8px;
      font-size: 1.25rem;
      font-weight: 600;
      box-shadow: 0 1px 3px rgba(0,0,0,0.05);
    }


/* Headers */
h1 {
  font-size: 30px;
  background-color: #2d2d2d;
  color: white;
  padding: 0.2em;
  width: 100%;
}

h2 { font-size: 24px; }
h3 { font-size: 19px; }


@media (max-width: 767px) {
  .page-container {
    flex-direction: column;
    min-height: auto;
    height: auto !important;
    overflow: visible !important;
  }

  .main-box {
    padding: 0;
    border: none;
    border-radius: 0;
    box-shadow: none;
  }

  .site-footer {
    position: static !important;
    margin-top: 2rem;
  }
}


.site-footer {
  background-color: #2d2d2d;
  color: white;
  text-align: center;
  padding: 1em;
  margin-top: auto;
  width: 100%;
  flex-shrink: 0;
}

.page-container {
  display: flex;
  width: 100%;
  flex-grow: 1;
  height: calc(100vh - 120px); /* adjust if your header/footer height changes */
  padding: 5px;
  box-sizing: border-box;
  gap: 3px;
}
.sidebar-fixed {
  width: 200px;
  background-color: #1f1f1f;
  color: white;
  padding: 1em;
  overflow-y: auto;
  overflow-x: hidden; /* ✅ Prevent horizontal scroll */
  height: 100%;
  position: sticky;
  top: 0;
  flex-shrink: 0;
  border-radius: 0px;
  box-sizing: border-box;
  word-break: break-word; /* ✅ Prevent long words from overflowing */
}


.main-box {
 flex: 1;
  overflow-y: auto;
  max-height: calc(100vh - 120px);

  padding: 5px;
  border: 1px solid #ccc;
  border-radius: 0px;
  background-color: #fff;
  box-shadow: 0 0 10px rgba(0,0,0,0.05);
  box-sizing: border-box;
}



@media (max-width: 1024px) {
  .sidebar-fixed {
    display: none;
  }
}

.site-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
}

.logo {
  font-size: 1.5em;
  font-weight: bold;
  cursor: pointer;
}

nav ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

nav ul li {
  padding: 0.5em;
  cursor: pointer;
  display: flex;
  align-items: center;
}

.menu-btn {
  background: #ffb400;
  color: #000;
  padding: 0.5em 1.2em;
  border: none;
  font-size: 1em;
  border-radius: 5px;
  cursor: pointer;
  margin-top: 0.5em;
}

#menu-list.hidden {
  display: none;
}

#menu-list.show {
  display: flex;
  flex-direction: column;
  width: 100%;
  background-color: #2d2d2d;
}

@media (min-width: 768px) {
  #menu-list {
    display: flex !important;
    flex-direction: row;
    justify-content: center;
  }
  .menu-btn {
    display: none;
  }
}

main {
  overflow-y: auto;
}


.category-buttons {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  gap: 1em;
  padding: 2em;
  width: 100%;
}

.cat-btn {
  padding: 1em;
  font-size: 1em;
  width: 100%;
  height: 70px;
  border: none;
  background-color: #ffffff;
  border: 2px solid #ccc;
  cursor: pointer;
  border-radius: 5px;
  text-align: center;
  display: flex;
  align-items: center;
  justify-content: center;
  white-space: nowrap;
}

.site-footer {
  text-align: center;
}

.site-footer ul {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  list-style: none;
  gap: 1em;
  padding: 0;
  margin: 0;
}

.site-footer ul li {
  padding: 0.3em;
  cursor: pointer;
}

.site-footer p {
  margin-top: 1em;
  font-size: 0.9em;
  color: #aaa;
}
.category-buttons a {
    text-decoration: none;
    width: 100%;
    display: flex;
    justify-content: center;
  }

@media (min-width: 768px) {
  .category-buttons {
    grid-template-columns: repeat(3, 1fr);
  }
}

@media (max-width: 767px) {
  .category-buttons {
    grid-template-columns: repeat(2, 1fr);
     justify-items: center;
         text-align: center;

  }
}

@media (max-width: 767px) {
  .site-header {
    position: relative;
    flex-direction: row;
    justify-content: space-between;
    align-items: center;
  }

  #menu-list.show {
    position: absolute;
    top: 100%;
    right: 0;
    background-color: #2d2d2d;
    border: 1px solid #444;
    width: 200px;
    z-index: 999;
    padding: 0.5em 1em;
    box-shadow: 0 4px 8px rgba(0,0,0,0.3);
  }

  #menu-list.show li {
    margin: 0.5em 0;
  }
}




.sidebar {
  width: 180px;
  background-color: #1f1f1f;
  padding: 0.1em;
  color: white;
  min-height: 100%;
  display: none;
}


.sidebar ul {
  list-style: none;
  padding: 0;
}

.sidebar li {
  padding: 0.3em 0;
  cursor: pointer;
}

@media (min-width: 1024px) {
  .sidebar {
    display: block;
  }
}
.result-item:hover,
.result-item.highlighted {
  background-color: #343a40;
  color: #ffffff;
}


.search-bar {
  margin-bottom: 1em;
  padding: 0.5em;
    position: relative; /* NEW - required to keep result inside */

}

.search-bar input {
  width: 100%;
  padding: 0.6em;
  font-size: 1em;
  border: 1px solid #ccc;
  border-radius: 5px;
}

.sidebar a {
  color: white;
  text-decoration: none;
  display: block;
  padding: 0.4em 0;
}
.sidebar a:hover {
  text-decoration: underline;
}


@media screen and (max-width: 768px) {
  h1 { font-size: 20px; }

  h2.section-heading { font-size: 20px; }
  h3.section-heading { font-size: 16px; }
  h4.section-heading { font-size: 14px; }
}


@media (max-width: 600px) {
  .calculator-container {
    padding: 1.25rem;
    margin: 1rem;
  }
  h1 {
    font-size: 20px;
  }
}

.calculator-container {
  max-width: 600px;
  margin: auto;
  background: #fff;
  padding: 2rem;
  border: 1px solid #ccc;
  border-radius: 12px;
  box-shadow: 0 0 10px rgba(0,0,0,0.05);
}

.form-group {
  margin-bottom: 1rem;
}

.form-group label {
  display: block;
  margin-bottom: 0.3rem;
  font-weight: 600;
}

.form-group input {
  width: 100%;
  padding: 10px;
  border-radius: 6px;
  border: 1px solid #ccc;
  font-size: 1rem;
}

button[type="submit"] {
  width: 100%;
  padding: 12px;
  font-size: 1rem;
  background: #ffb400;
  color: #000;
  border: none;
  border-radius: 8px;
  cursor: pointer;
}
.result-section {
  margin-top: 2rem;
}

.result-section label {
  font-weight: bold;
  display: block;
  margin-bottom: 0.5rem;
}

#resultBox {
  width: 100%;
  background: #f0f9ff;
  border: 1px solid #007acc;
  padding: 0.8rem;
  font-size: 1.1rem;
  border-radius: 8px;
  margin-bottom: 1.5rem;
}
.graph-box {
  text-align: center;
  margin-bottom: 1.5rem;
}

.graph-box img,
.graph-box canvas {
  max-width: 100%;
  border-radius: 8px;
  border: 1px solid #ccc;
  background: #fff;
  height: 300px;
}
.explanation-box {
  background: #f9f9f9;
  padding: 1rem;
  border-radius: 8px;
  border: 1px solid #eee;
}

.explanation-box h3 {
  margin-top: 0;
}

main {
  flex: 1;
  padding: 2em;
  overflow-y: auto;
}

.site-footer {
  background-color: #2d2d2d;
  color: white;
  text-align: center;
  padding: 1em;
  margin-top: auto;
  width: 100%;
  flex-shrink: 0;
}