/* Import fonts to match main site */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&family=Lato:wght@900&display=swap');

/* Reset and base styles */
* {
  box-sizing: border-box;
}

body {
  font-family: Inter, system-ui, sans-serif;
  background: #ffffff;
  color: rgb(24 24 27);
  margin: 0;
  padding: 0;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* Header */
.navbar {
  background: #ffffff;
  border-bottom: 1px solid rgb(228 228 231);
  padding: 1rem 0;
}

.navbar .navbar-inner {
  background: transparent;
  border: none;
  padding: 0 2rem;
}

.navbar .brand img {
  max-height: 60px;
  width: auto;
}

.navbar .nav li a {
  color: rgb(82 82 91);
  font-weight: 500;
  padding: 0.75rem 1.5rem;
  text-decoration: none;
  border-radius: 0.5rem;
  transition: all 0.15s cubic-bezier(0.4, 0, 0.2, 1);
}

.navbar .nav li a:hover {
  color: rgb(24 24 27);
  background: rgb(244 244 245);
}

/* Search section */
#docsSearch {
  background: linear-gradient(to bottom, #1a1a1a, #000000);
  padding: 5rem 2rem;
  text-align: center;
}

#docsSearch h1 {
  font-family: Lato, sans-serif;
  font-weight: 900;
  color: #ffffff;
  font-size: 3rem;
  line-height: 1;
  margin-bottom: 2rem;
  letter-spacing: -0.025em;
}

/* Search form */
#searchBar {
  max-width: 600px;
  margin: 0 auto;
  display: flex;
  background: #ffffff;
  border-radius: 0.5rem;
  box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -4px rgba(0, 0, 0, 0.1);
  overflow: hidden;
}

#searchBar input.search-query {
  flex: 1;
  border: none;
  padding: 1rem 1.5rem;
  font-size: 1rem;
  outline: none;
  background: #ffffff;
  color: rgb(24 24 27);
}

#searchBar input.search-query::placeholder {
  color: rgb(161 161 170);
}

#searchBar button {
  background: rgb(54 81 212);
  border: none;
  padding: 1rem 2rem;
  color: #ffffff;
  font-weight: 600;
  cursor: pointer;
  transition: background-color 0.15s cubic-bezier(0.4, 0, 0.2, 1);
}

#searchBar button:hover {
  background: rgb(42 65 179);
}

#searchBar button:focus {
  outline: 2px solid rgb(54 81 212);
  outline-offset: 2px;
}

/* Search dropdown */
#serp-dd {
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  background: #ffffff;
  border-radius: 0 0 0.5rem 0.5rem;
  box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -4px rgba(0, 0, 0, 0.1);
  z-index: 50;
}

#serp-dd .result {
  list-style: none;
  margin: 0;
  padding: 0;
}

#serp-dd .result li {
  border-bottom: 1px solid rgb(244 244 245);
}

#serp-dd .result a {
  display: block;
  padding: 1rem 1.5rem;
  color: rgb(24 24 27);
  text-decoration: none;
  transition: background-color 0.15s cubic-bezier(0.4, 0, 0.2, 1);
}

#serp-dd .result a:hover {
  background: rgb(239 246 255);
  color: rgb(54 81 212);
}

/* Content area */
#contentArea {
  max-width: 80rem;
  margin: 0 auto;
  padding: 3rem 2rem;
}

/* Most popular articles */
.most-pop-articles {
  background: #ffffff;
  border-radius: 0.75rem;
  padding: 2.5rem;
  margin-bottom: 2rem;
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -2px rgba(0, 0, 0, 0.1);
}

.most-pop-articles h2 {
  font-family: Lato, sans-serif;
  font-weight: 900;
  color: rgb(24 24 27);
  font-size: 1.875rem;
  line-height: 2.25rem;
  margin-bottom: 2rem;
  text-align: center;
  letter-spacing: -0.025em;
}

.most-pop-articles .popArticles {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 2rem;
}

.most-pop-articles .popArticles li {
  margin: 0;
}

.most-pop-articles .popArticles a {
  display: flex;
  align-items: center;
  padding: 1.5rem;
  background: rgb(244 244 245);
  border: 1px solid rgb(228 228 231);
  border-radius: 0.5rem;
  text-decoration: none;
  color: rgb(82 82 91);
  transition: all 0.15s cubic-bezier(0.4, 0, 0.2, 1);
  height: 100%;
  margin-bottom: 1rem;
}

.most-pop-articles .popArticles a:hover {
  background: #ffffff;
  border-color: rgb(54 81 212);
  color: rgb(54 81 212);
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -2px rgba(0, 0, 0, 0.1);
  transform: translateY(-0.125rem);
}

.most-pop-articles .popArticles i {
  margin-right: 0.75rem;
  font-size: 1.25rem;
  color: inherit;
}

.most-pop-articles .popArticles span {
  font-weight: 600;
  color: rgb(24 24 27);
}

.most-pop-articles .popArticles a:hover span {
  color: rgb(54 81 212);
}

/* Footer */
footer {
  text-align: center;
  padding: 2rem;
  background: #ffffff;
  border-top: 1px solid rgb(228 228 231);
  margin-top: 3rem;
}

footer p {
  color: rgb(82 82 91);
  font-size: 0.875rem;
  margin: 0;
}

footer a {
  color: rgb(54 81 212);
  text-decoration: none;
}

footer a:hover {
  text-decoration: underline;
}

/* Mobile responsiveness */
@media (max-width: 768px) {
  .navbar .navbar-inner {
    padding: 0 1rem;
  }
  
  #docsSearch {
    padding: 3rem 1rem;
  }
  
  #docsSearch h1 {
    font-size: 2.25rem;
  }
  
  #contentArea {
    padding: 2rem 1rem;
  }
  
  .most-pop-articles {
    padding: 1.5rem;
  }
  
  .most-pop-articles .popArticles {
    grid-template-columns: 1fr;
  }
  
  #searchBar {
    flex-direction: column;
  }
}

/* Article content styling */
.contentWrapper {
  background: #ffffff;
  border-radius: 0.75rem;
  padding: 2.5rem;
  margin-bottom: 2rem;
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -2px rgba(0, 0, 0, 0.1);
}

.contentWrapper h1,
.contentWrapper h2,
.contentWrapper h3 {
  font-family: Lato, sans-serif;
  font-weight: 900;
  color: rgb(24 24 27);
  letter-spacing: -0.025em;
}

.contentWrapper a {
  color: rgb(54 81 212);
  text-decoration: none;
}

.contentWrapper a:hover {
  text-decoration: underline;
}

#fullArticle {
  line-height: 1.625;
}

#fullArticle p,
#fullArticle ul,
#fullArticle ol,
#fullArticle li,
#fullArticle div {
  color: rgb(24 24 27);
}

#fullArticle h1,
#fullArticle h2,
#fullArticle h3,
#fullArticle h4,
#fullArticle h5,
#fullArticle h6 {
  font-family: Lato, sans-serif;
  font-weight: 900;
  color: rgb(24 24 27);
  margin-top: 2rem;
  margin-bottom: 1rem;
  letter-spacing: -0.025em;
}

#fullArticle code {
  background: rgb(244 244 245);
  padding: 0.125rem 0.25rem;
  border-radius: 0.25rem;
  font-size: 0.875em;
}

#fullArticle pre {
  background: rgb(244 244 245);
  padding: 1rem;
  border-radius: 0.5rem;
  overflow-x: auto;
}

/* Focus states */
*:focus {
  outline: 2px solid rgb(54 81 212);
  outline-offset: 2px;
}