body {
  font-family: Condensed, sans-serif;
  margin: 0;
  /*background: #f0f4f1;*/
  background: #dad7d1;
  color: #333;
}

.navbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: #2d4739;
  color: white;
  padding: 1rem 2rem;
}

.navbar a {
  color: white;
  text-decoration: none;
  font-weight: bold;
}

.logo {
  font-size: 2.5rem;
  font-weight: bold;
  font-family: 'Homenaje', sans-serif;
}

.container {
  max-width: 960px;
  margin: 2rem auto;
  padding: 0 1rem;
}

.grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 1rem;
}

.card h3 {
  font-family: 'Homenaje', sans-serif;
  margin-top: 0.5rem;
  font-size: 1.5rem;
}

.card {
  background: white;
  border-radius: 10px;
  box-shadow: 0 2px 6px rgba(0,0,0,0.1);
  text-align: center;
  padding: 1rem;
  text-decoration: none;
  color: inherit;
  transition: transform 0.2s;
}

.card:hover {
  transform: translateY(-4px);
}

.card img {
  width: 100%;
  height: 300px;
  object-fit: cover;
  border-radius: 8px;
  position: center;
}

.profile-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1.5rem;
  margin-bottom: 2rem;
}

.profile-header h2 {
  margin: 0;
  font-size: 3rem;
  font-family: 'Homenaje', sans-serif;
}

.profile-header img {
  width: 200px;
  border-radius: 12px;
  object-fit: cover;
}

.battle-cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1rem;
  margin: 2rem 0;
}

.battle-cards .card {
  background: #fff;
  border-radius: 12px;
  padding: 1rem;
  box-shadow: 0 2px 6px rgba(0,0,0,0.1);
}

.full-width {
  width: 100%;
}

ul {
  display: inline-block;   /* shrink ul to fit its content */
  text-align: left;        /* keep text alignment normal */
  padding:0%;               /* remove default padding */
  list-style-position: inside;
  margin: 0 auto;          /* center ul in parent div */
  list-style-type: square;
}


.how-to-gallery {
  display: flex;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 1rem;
  object-fit: cover;
  flex-wrap: wrap;
  margin: 1rem 0;
}

.how-to-gallery img {
  width: 450px;
  border-radius: 8px;
  box-shadow: 0 1px 4px rgba(68, 43, 43, 0.2);
}

.gallery {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
  gap: 0.5rem;
  margin-top: 1rem;
}

.gallery img {
  width: 100%;
  border-radius: 6px;
  object-fit: cover;
}

.tags-container {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 5px;
    margin-top: 10px;
}

.tag {
    background: #e6e6e6;
    color: #2d4739;
    padding: 4px 8px;
    border-radius: 20px;
    font-size: 0.8rem;
}
/* Styling for the search container to center the input */
.search-container {
  display: flex;
  justify-content: center;
  align-items: center;
  flex-direction: column;
  margin: 20px 0;
}

/* Style the search input field */
#plant-search {
  width: 100%;
  max-width: 500px;
  padding: 12px 20px;
  border: 2px solid #ddd;
  border-radius: 25px;
  font-size: 16px;
  outline: none;
  transition: border-color 0.3s ease-in-out;
}

#plant-search:focus {
  border-color: #5cb85c;
}

/* Styles for the popular tags container */
.popular-tags {
  margin-top: 15px;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px;
}

/* Individual tag style */
.popular-tags .tag {
  cursor: pointer;
  background-color: #e9e9e9;
  color: #555;
  border-radius: 20px;
  padding: 8px 15px;
  font-size: 14px;
  transition: background-color 0.3s ease-in-out, transform 0.2s ease-in-out;
}

.popular-tags .tag:hover {
  background-color: #ddd;
  transform: translateY(-2px);
}

@media (max-width: 768px) {
  /* Adjustments for the Navbar */
  .navbar {
    flex-direction: column;
    padding: 1rem;
    text-align: center;
  }

  .navbar nav {
    margin-top: 1rem;
  }

  /* Adjustments for the Main Container */
  .container {
    padding: 0 1rem;
    margin: 1rem auto;
  }

  /* Adjustments for the Profile Header */
  .profile-header {
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 1rem;
    margin-bottom: 1.5rem;
  }

  .profile-header h2 {
    font-size: 2.5rem;
  }

  .profile-header img {
    width: 80%; /* Makes the image more fluid on small screens */
    height: auto;
  }

  /* Adjustments for the Battle Cards */
  .battle-cards {
    grid-template-columns: 1fr; /* Stacks cards on top of each other */
    gap: 1rem;
  }

  /* Adjustments for the in-depth sections */
  .full-width {
    padding: 1rem;
    margin: 1rem 0;
  }

  .care-section .how-to-gallery {
    flex-direction: column;
    align-items: center;
  }
  
  .care-section .how-to-gallery img {
    width: 90%; /* Makes how-to images larger on mobile */
  }

  .gallery {
    grid-template-columns: repeat(auto-fit, minmax(100px, 1fr));
  }
}
.gallery figure {
  margin: 0;
  display: flex;
  flex-direction: column;
}

.gallery figcaption {
  font-size: 0.8rem;
  color: #666;
  text-align: center;
  padding: 5px 0;
}