.header, .nav-tabs, .tab-content {
  margin-left: 100px;
  margin-right: 30px;
}

[id^="cards-for-"]{
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 15px;
  grid-auto-rows: 1fr;
  margin-left: 12px;
  margin-right: 12px;
}

.card img {
  width: 30px; 
  height: 30px;
  object-fit: fill; /* Ajust the image */
  border-radius: 10%;
  position: absolute;
  top: 15px; 
  left: 15px;
  margin-left: 5px;
  margin-top: 15px;
}

/* Additional styles if needed */
.card-img-top {
  width: 100%;
  height: auto;
}

.card-title{
  margin-top: 50px;
  align-content: left;
}
.card-text{
  font-size: 16px;
}

.card a {
  display: inline-flex;
  align-items: center;
  font-size: 16px;
  font-weight: bold;
  color: #006aff; /* Set the default link color */
  text-decoration: none; /* Remove underline */
  transition: all 0.3s ease; /* Smooth transition for hover effects */
  margin-top: 10px; /* Add some space between the link and content above */
}

.card a:hover {
  color: #004fc1; /* Change the color on hover */
  text-decoration: none; /* Add underline on hover */
}

.card a::after {
  content: '>'; /* Arrow icon after the link */
  display: inline-block;
  margin-left: 8px; /* Spacing between text and icon */
  transition: transform 0.3s ease; /* Smooth transition for the icon */
}

.card a:hover::after {
  transform: translateX(5px); /* Move the icon slightly to the right on hover */
}

.cardscontent{
  margin:1rem 80px 0 80px ;
}

#cards-for-all{
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 15px;
  grid-auto-rows: 1fr;
}

.tab-content {
  padding: 1rem;
}

.tab-pane {
  display: none; /* Ensure all tab panes are hidden by default */
}

.tab-pane.show.active {
  display: block; /* Only the active tab pane should be visible */
}

/* Ensure each nav item takes up its space */
.nav-item {
  flex: 1; /* Allow each item to take equal space */
}

/* Tab navigation styles */
.nav-tabs .nav-link {
  white-space: nowrap;
  border-radius: .25rem; /* Rounded corners */
  margin-bottom: -1px; /* Adjust margin to align with bottom border */
  font-size: 16px;
  color: #000000; /* Tab text color */
  padding: .5rem 1rem; /* Padding for tabs */
  font-family: 'Poppins', sans-serif; /* Custom font */
  font-weight: bold; /* Bold text */
  transition: background-color 0.3s ease, color 0.3s ease; /* Smooth transition effects */
  background-color: none;
  padding-bottom: 10px; /* Create space for the line */
  text-align: center;
}

.nav-tabs .nav-item.show .nav-link, .nav-tabs .nav-link.active {
  background-color: transparent;
  border-color: transparent;
}
.nav-tabs .nav-link.active {
  position: relative;
  background: transparent;
  color: #0070fa;
  font-weight: 700;
  border: 0;
}
 
.nav-tabs .nav-link.active::after{
  content: "";
  position: absolute;
  background-color:#006aff;
  width: 100%;
  height: 4px;
  left: 0;
  bottom: 2px;
  border-radius: 20px;
}

/* Add space between tabs and cards */
#tabsContainer {
  margin-bottom: 2rem; /* Space below the tabs */
}

.nav-tabs{
  flex-wrap: nowrap;
  border: 0;
  overflow-y: hidden;
  font-family: 'Poppins', sans-serif;
}

/* When search results are active, display cards in a row */
.search-results-layout .card {
  display: inline-block;
  margin-right: 10px; /* Adjust as needed */
  overflow: hidden;
  margin-bottom: 1.5rem; /* Increase the bottom margin for more spacing */
  width: 350px; /* Adjust width as needed */
  height: 300px;
}

/* Container for the search bar and button */
.search-bar-container {
  position: fixed; /* Fixed position relative to the viewport */
  top: 20px; /* Adjust top position as needed */
  right: 20px; /* Adjust right position as needed */
  z-index: 10; /* Ensure it stays above other content */
  display: flex; /* Align items in a row */
  align-items: center; /* Vertically center items */
}

/* Button for toggling search bar visibility */
#toggle-search-btn {
  background: #f8f9fa; /* Background color */
  border: 1px solid #ced4da; /* Border color */
  border-radius: .25rem; /* Rounded corners */
  z-index: 10; /* Ensure it stays above the search bar */
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0.5rem; /* Adjust padding as needed */
  height: 40px;
  width: 40px;
}

/* Search bar styling */
.search-bar {
  display: flex;
  align-items: center; /* Center the input vertically */
  position: absolute;
  right: 0; /* Align with the right side of the container */
  top: 0; /* Align with the top of the button */
  transition: transform 0.3s ease-in-out; /* Smooth transition */
  transform: translateX(110%); /* Start slightly off-screen to the right */
  white-space: nowrap; /* Prevent input from wrapping */
}

/* Search bar when active */
.search-bar.active {
  transform: translateX(0); /* Slide into view, shifted to the left */
}

/* Input styling */
#cardSearchInput {
  width: 250px; /* Adjust width as needed */
  height: 40px; /* Adjust height as needed */
  padding: 0.5rem; /* Padding for the input */
  border: 1px solid #ced4da; /* Border color */
  border-radius: .25rem; /* Rounded corners */
  margin-left: 0.5rem; /* Spacing between input and button */
}

/* Info icon and tooltip */
.card {
  position: relative;
}

/* Style for the icon */
.card-info {
  position: absolute;
  top: 5px;
  right: 15px;
  color: #0070fa; /* Icon color */
  cursor: pointer;
}

/* Tooltip */
.card-tags-tooltip {
  display: none;
  position: absolute;
  top: 25px; 
  right: 0;
  background-color: rgba(0, 0, 0, 0.75);
  color: #fff;
  padding: 5px 8px;
  border-radius: 4px;
  font-size: 12px;
  white-space: nowrap;
  z-index: 10;
}

/* Show the tooltip */
.card-info:hover .card-tags-tooltip {
  display: block;
}

/* Favorite button styles */
.favorite-btn {
  position: absolute;
  bottom: 10px;
  right: 10px;
  background: transparent;
  border: none;
  font-size: 24px;
  cursor: pointer;
  color: #ccc;
  z-index: 5;
}

.favorite-btn.favorited {
  color: gold;
}

/* ---------------------------------------- */
/* NEW STYLE FOR CONTAINER TAGS  */
/* ---------------------------------------- */

/* Selected Container Tags */
.selected-tags-container {
  position: relative;
  /* Align with same cards margin */
  margin: 1rem 100px 0 100px;
  padding: 0; /* Remove padding */
  background-color: transparent; /* Remove grey bar */
  border-bottom: none; /* Remove border */
  display: flex;
  align-items: center;
  gap: 8px; /* spacement between chips */
  z-index: 10; 
}


body.landing-active .selected-tags-container {
  display: none !important;
}

/* Each chip style */
.tag-chip {
  display: inline-flex;
  align-items: center;
  background-color: #007bff;
  color: #fff;
  border-radius: 16px;
  padding: 4px 8px;
  font-size: 0.9rem;
  cursor: default;
}

/* Button “X” inside chip */
.tag-chip .remove-tag {
  margin-left: 8px;
  cursor: pointer;
  font-weight: bold;
}


@media only screen and (max-width: 1450px) {
  #cards-for-all{
    grid-template-columns: repeat(4,1fr) !important;
    gap: 20px;
  }
  [id^="cards-for-"]{
    grid-template-columns: repeat(4,1fr) !important;
    gap: 20px;
  }
}

@media only screen and (max-width: 1100px) {
  .header, .nav-tabs, .tab-content{
    margin-left: 100px;
    margin-right: 30px;
  }

  #cards-for-all{
    grid-template-columns: repeat(2,1fr) !important;
  }
  [id^="cards-for-"]{
    grid-template-columns: repeat(2,1fr) !important;
  }
}

@media only screen and (max-width: 600px) {
  .header, .nav-tabs, .tab-content{
    margin-left: 20px;
    margin-right: 30px;
  }

  #cards-for-all {
    display: flex !important;
    flex-direction: column;
    width: 95% !important; /* Increase width to occupy more screen space */
    max-width: 350px !important; /* Ensures a controlled size */
    margin-left: auto;
    margin-right: auto;
  }

  [id^="cards-for-"] {
    display: flex !important;
    flex-direction: column;
    margin-left: auto;
    margin-right: auto;
    width: 95% !important; /* Expands cards closer to the edges */
    max-width: 350px !important; /* Keeps a uniform width */
  }

  .cardscontent {
    margin: 1rem 20px 0 20px !important; 
  }

  /* Container Margin */
  .selected-tags-container {
    margin: 1rem 20px 0 20px !important;
  }
}

