.hero {
  position: relative;
  height: 110vh;
  margin-top: -10vh;
  display: flex;
  justify-content: center;
  align-items: center;
  text-align: center;
  background: url("../media/tridentu-abstract.webp") no-repeat center
    center/cover;
}
.hero::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(
    180deg,
    rgba(0, 191, 255, 0.12) 0%,
    rgba(0, 191, 255, 0.08) 40%,
    rgba(255, 255, 255, 0.6) 75%,
    rgba(255, 255, 255, 0.9) 100%
  );
  z-index: 1;
}
.hero > div {
  position: relative;
  z-index: 2;
}
.hero h1 {
  font-size: 3.5rem;
  font-weight: 600;
  color: var(--text-color);
  margin-bottom: 20px;
}
.hero p {
  font-size: 1.3rem;
  color: #333;
  max-width: 800px;
  margin: 0 auto;
}
.hero-buttons {
  margin-top: 40px;
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 20px;
}
.btn.courses {
  padding: 15px 40px;
  border-radius: 6px;
  border: 2px solid var(--primary);
  background-color: transparent;
  color: var(--primary);
  font-weight: 600;
  font-size: 1.1rem;
  transition: 0.3s;
}
.btn.courses:hover {
  background-color: var(--primary);
  color: var(--back-light);
}
.hover-text {
  position: relative;
  text-decoration: none;
  color: var(--text-color);
  font-weight: 500;
  padding-bottom: 2px;
  transition: 0.2s;
  font-size: 1.1rem;
}
.hover-text::after {
  content: "";
  position: absolute;
  bottom: 0;
  left: 0;
  width: 0%;
  height: 2px;
  background-color: var(--primary);
  transition: width 0.25s ease-in-out;
}
.hover-text:hover::after {
  width: 100%;
}
.content-wrapper {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 4rem;
  max-width: 1200px;
  margin: 0 auto;
}
.text-block {
  flex: 1 1 500px;
}
.text-block h2 {
  font-size: 2.5rem;
  margin-bottom: 1rem;
  font-weight: 600;
  color: var(--text-color);
}
.text-block p {
  font-size: 1.125rem;
  line-height: 1.6;
  margin-bottom: 2rem;
  color: #333;
}
.cta-button {
  display: inline-block;
  padding: 0.75rem 1.5rem;
  border: 2px solid var(--primary);
  color: var(--primary);
  text-decoration: none;
  transition: all 0.3s ease;
}
.cta-button:hover {
  background-color: var(--primary);
  border-color: var(--primary);
  color: var(--text-color);
}
.image-block {
  flex: 1 1 500px;
}
.image-block img {
  width: 100%;
  border-radius: 10px;
  object-fit: cover;
}
.financepedia-search {
  position: relative;
  z-index: 1;
  padding: 4rem 2rem;
  text-align: center;
}
@media screen and (max-width: 500px) {
  .search-wrapper {
    margin-left: 5px;
  }
}
.search-wrapper::after {
  content: "";
  display: block;
  height: 60px; /* spacer equal to alphabet-nav height */
}
.search-wrapper,
.financepedia-search {
  overflow: visible;
}
.search-wrapper {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2rem;
}
.finance-search-input {
  width: 100%;
  max-width: 480px;
  padding: 1rem 1.2rem;
  font-size: 1rem;
  border: 1px solid var(--primary);
  border-radius: 10px;
  outline: none;
  transition: all 0.3s ease;
  background-color: #fdfdfd;
}
.finance-search-input:hover {
  box-shadow: 0 0 0 4px rgba(0, 191, 255, 0.2);
  border-color: var(--primary);
}
.alphabet-nav {
  position: sticky;
  top: 100px; /* stick nav below the 100px header */
  z-index: 999;
  padding: 1rem 0;
  border-bottom: 1px solid #e2e8f0;
}
.alphabet-nav a {
  text-decoration: none;
  font-weight: 500;
  padding: 0.6rem 0.8rem;
  color: var(--text-color);
  border-radius: 6px;
  transition:
    background-color 0.2s ease,
    color 0.2s ease;
  border: 1px solid transparent;
}
.alphabet-nav a:hover,
.alphabet-nav a.active {
  background-color: var(--primary);
  color: var(--text-color);
  border-color: var(--primary);
}
.fixed-alphabet-nav {
  position: fixed;
  top: 10vh; /* fixed just below the header */
  left: 0;
  right: 0;
  z-index: 999;
  background-color: var(--text-color);
  border-bottom: 1px solid #e2e8f0;
} /* Sticky navigation styles */
.financepedia-search {
  background-color: white;
  padding: 15px 0;
  transition: all 0.3s ease;
}
.financepedia-search.sticky-top {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  background-color: white;
  padding: 10px 0;
}
.financepedia-search.sticky-below-nav {
  position: fixed;
  top: 10vh; /* Adjust based on your navbar height */
  left: 0;
  right: 0;
  z-index: 999;
  background-color: white;
  padding: 10px 0;
}
.alphabet-nav a:hover,
.alphabet-nav a.active {
  background-color: var(--primary);
  color: white;
}
.financial-terms {
  padding: 60px 20px;
  max-width: 1300px;
  margin: 0 auto;
}
.terms-block {
  margin-bottom: 60px;
}
.terms-heading {
  font-size: 2rem;
  font-weight: 600;
  margin-bottom: 20px;
  color: var(--text-color);
  border-bottom: 2px solid var(--primary);
  display: inline-block;
  padding-bottom: 8px;
}
.terms-list {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 14px 24px;
  list-style: none;
  padding-left: 0;
  margin: 0;
}
.terms-list li a {
  display: block;
  padding: 10px 14px;
  border-radius: 8px;
  background: #f4f4f4;
  text-decoration: none;
  color: #222;
  font-size: 0.95rem;
  transition: all 0.2s ease;
  border: 1px solid transparent;
}
.terms-list li a:hover {
  background: #eaf7ff;
  color: var(--text-color);
  border-color: var(--primary);
  box-shadow: 0 1px 3px rgba(0, 168, 232, 0.15);
}
@media (max-width: 1024px) {
  .terms-list {
    grid-template-columns: repeat(2, 1fr);
  }
}
@media (max-width: 600px) {
  .terms-list {
    grid-template-columns: 1fr;
  }
}
@media (max-width: 768px) {
  .hero h1 {
    font-size: 2.2rem;
    margin-bottom: 16px;
  }
  .hero p {
    font-size: 1rem;
    padding: 0 10px;
  }
  .hero-buttons {
    flex-direction: column;
    gap: 15px;
    margin-top: 30px;
  }
  .tool-nav-shortcuts {
    flex-wrap: wrap;
    font-size: 0.95rem;
    margin: 1.5rem 0;
    padding: 0 10px;
  }
  .tool-category h3 {
    font-size: 1.4rem;
  }
  .tool-category li {
    font-size: 0.95rem;
  }
  .tools-section {
    padding: 2rem 1rem;
  }
}
@media (max-width: 1170px) {
  .alphabet-nav a {
    margin-bottom: 30px;
  }
  .alphabet-nav {
    padding-bottom: 10px;
    line-height: 50px;
  }
}
.terms-block {
  opacity: 0;
  transform: translateY(20px);
  transition:
    opacity 0.3s ease,
    transform 0.3s ease;
}
.terms-block.fade-in {
  opacity: 1;
  transform: translateY(0);
}
.search-results {
  position: absolute;
  background: white;
  border: 1px solid #ddd;
  border-radius: 4px;
  max-height: 300px;
  overflow-y: auto;
  z-index: 1000;
  width: 100%;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}
.search-result-item {
  padding: 10px 15px;
  border-bottom: 1px solid #eee;
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.search-result-item:hover {
  background-color: #f5f5f5;
}
.search-result-item:last-child {
  border-bottom: none;
}
.result-term {
  font-weight: 500;
}
.result-letter {
  background: #e9ecef;
  padding: 2px 8px;
  border-radius: 12px;
  font-size: 0.8em;
  color: #666;
}
.alphabet-nav a.active {
  background-color: #007bff;
  color: white;
}
mark {
  background-color: #fff3cd;
  padding: 0.1em 0.2em;
  border-radius: 2px;
}
#loading-indicator {
  text-align: center;
  padding: 3rem;
  color: #6c757d;
  font-style: italic;
}
.no-results {
  padding: 15px;
  text-align: center;
  color: #6c757d;
}
