@import url('https://fonts.googleapis.com/css2?family=Roboto:ital,wght@0,100..900;1,100..900&display=swap');

*{
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: "Roboto", sans-serif;
}

body {
      font-family: Georgia, serif;
      margin: 0;
      padding: 0;
      line-height: 1.6;
      color: #222;
      background-color: rgb(251, 251, 250);
    }

    .container {
      max-width: 920px;
      margin: 0 auto;
      padding: 0 20px;
    }

    .heading {
    margin: 0 auto;
    }

    .bar-header {
      display: flex;
      justify-content: space-between;
      align-items: center;
      margin: 40px 0 20px;
      margin-bottom: 10px;
      flex-wrap: wrap;
      gap: 10px;
    }

     .heading header{
      padding: 20px;
      background-color: white;
      border-style: solid;
      border-color: #F3F4F5;
      border-width: 1.5px;
    }

    .heading header h1 {
      font-size: 1.63rem;
      margin: 0;
      flex: 1 1 auto;
    }

    nav {
      flex: 0 0 auto;
    }

    nav ul {
      list-style: none;
      display: flex;
      flex-wrap: wrap; /* allows wrapping on small screens */
      gap: 16px;
      margin: 0;
      padding: 0;
    }

    nav a {
      text-decoration: none;
      color: #000;
      font-size: 0.95rem;
    }

    .hero {
  text-align: center;
  padding: 3rem 1rem;
  background-color: white;
      border-style: solid;
      border-color: #F3F4F5;
      border-width: 1.5px;
  margin-bottom: 2rem;
}

.hero h1 {
  font-size: 2rem;
  margin-bottom: 0.5rem;
}

.hero p {
  font-size: 1.1rem;
  color: #444;
}

.cta-btn {
  display: inline-block;
  margin-top: 1rem;
  padding: 0.75rem 1.5rem;
  background: #222;
  color: #fff;
  text-decoration: none;
  border-radius: 6px;
  transition: background 0.2s;
}
.cta-btn:hover {
  background: #444;
}

/* ---------- QUICK STATS ---------- */
.stats {
  display: flex;
  justify-content: center;
  gap: 2rem;
  padding: 1.5rem;
  background-color: white;
      border-style: solid;
      border-color: #F3F4F5;
      border-width: 1.5px;
  margin-bottom: 2rem;
}
.stats div {
  text-align: center;
  font-size: 1rem;
}
.stats b {
  font-size: 1.4rem;
  display: block;
}


    .page-bg{
      background-color: white;
      padding: 20px;
      border-style: solid;
      border-color: #F3F4F5;
      border-width: 1.5px;
    }


    .search-bar .container{
    position: absolute;
    width: 100%;
    max-width: 375px;
    left: 0px;
    margin-top: 10px;
    max-height: 0;
    opacity: 0;
    background: rgba(255, 255, 255, 0.5);
    backdrop-filter: blur(4px) saturate(180%);
    border-radius: 7px;
    border-style: solid;
    border-color: #F3F4F5;
    border-width: 1.5px;
    padding: 20px;
    overflow-y: hidden;
    padding-top: 35px;
    padding: 0; /* hidden state */
    z-index: 1000;
}

 .search-wrapper {
    position: relative;
    max-width: 1000px; /* or whatever width you want */
    width: 100%;
    margin: 0 auto;
}


#search-item:not(:placeholder-shown) ~ .container {
  opacity: 1;
  max-height: 100px;
}

 .container::-webkit-scrollbar{
    visibility: hidden;
}

  .container{
    scrollbar-width: none;
}


 .page{
    display: flex;
    align-items: center;
    padding: 20px;
    padding-top: 15px;
}

 .page img{
    width: 70px;
    height: 70px;
    object-fit: cover;
    border-radius: 5px;
}

 .page .p-details{
    padding-left: 15px;
}

 .page .p-details h2{
    font-size: 20px;
    color: #1d1d1d;
}

 .page .p-details h3{
    font-size: 10px;
    color: #999999;
}


    .search-bar {
  width: 100%;
  overflow: hidden;
}

    .search-bar input {
    width: 100%;
    padding: 12px 16px;
    font-size: 1rem;
    border: 1px solid #ccc;
    border-radius: 6px;
    box-sizing: border-box; /* ✅ prevents overflow */
    }


    main h2 {
      margin-top: 40px;
      font-size: 1.3rem;
    }

    .species-grid {
      display: grid;
      grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
      gap: 8px 20px;
      margin-top: 15px;
    }

    .species-grid div {
      font-style: italic;
    }

    .species-grid a,
    .species-grid a:visited,
    .species-grid a:hover,
    .species-grid a:active {
    text-decoration: none;
    color: inherit;
    font-style: normal;
}

    footer {
      margin: 40px 0;
      font-size: 0.85rem;
      color: #555;
    }


@media only screen and (max-width: 1000px ){
    header {
    flex-direction: column;
    align-items: center;
    gap: 12px;
  }

  header h1 {
    text-align: center;
    width: 100%;             /* prevent floating in the middle */
  }

  nav ul {
    flex-wrap: wrap;
    justify-content: center
  }

}

    