.adBackground{
  background: url('/static/images/background.png') center center/cover no-repeat;
}

.ad-detail-container {
  display: flex;
  justify-content: center;
  padding: 5% 10% 10% 3%;
}

.ad-card-large {
  position: relative;
  display: grid;
  grid-template-columns: 300px 1fr;
  gap: 2rem;
  width: 100%;
  max-width: 1000px;
  margin: auto;
  background: #fff;
  padding: 2rem;
  border-radius: 10px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
}

.search-controls {
  display: block;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 1rem;
  margin: 2rem auto;
  padding: 1rem 1.5rem;
  background: #f9f9f9;
  border-radius: 12px;
  box-shadow: 0 2px 6px rgba(0,0,0,0.08);
  max-width: 800px;
}

.search-controls label {
  font-weight: 500;
  font-size: 0.95rem;
  color: #333;
}

.search-controls select {
  padding: 6px 10px;
  border: 1px solid #ccc;
  border-radius: 6px;
  font-size: 0.95rem;
  background-color: white;
  min-width: 140px;
  cursor: pointer;
}

.search-bar {
  display: block;
  margin: 1rem auto 2rem auto;
  padding: 10px 14px;
  width: 90%;
  max-width: 500px;
  border: 1px solid #ccc;
  border-radius: 8px;
  font-size: 1rem;
}



@media (max-width: 768px) {
  .ad-card-large {
    grid-template-columns: 1fr;
    padding: 1.2rem;
  }

}

@media (min-width: 769px) and (max-width: 1200px) {
  .ad-card-large {
    max-width: 900px;
    padding: 2rem 3rem;
  }

  .ad-card-large img {
    max-width: 100%;
    height: auto;
  }
}

@media (min-width: 1201px) {
  .ad-card-large {
    max-width: 800px;
    padding: 2.5rem 4rem;
  }
}



.ad-card img{
      width: 35%;
    max-height: 160px;
    object-fit: contain;
    border-radius: 6px;
    margin-bottom: 10px;
    align-self: anchor-center;

}
.titleImg {
  width: 100%;
  max-width: 300px;
  border-radius: 10px;
  object-fit: contain;
}

.ad-info {
  text-align: left;
  flex: 1;
  min-width: 250px;
}

.ad-info h1 {
  margin-top: 0;
  margin-bottom: 1rem;
}

.ad-info p {
  margin-bottom: 0.75rem;
  line-height: 1.5;
}

.join-link {
  display: inline-block;
  padding: 12px 20px;
  background-color: #457B9D;
  color: white;
  font-weight: bold;
  border-radius: 8px;
  text-decoration: none;
  min-width: 8rem;
  align-content: center;
}

.join-link:hover {
  background-color: #0056b3;
}


    .ads-grid {
      display: flex;
      flex-wrap: wrap;
      gap: 1.5rem;
      justify-content: center;
      padding: 2rem;
    }
    .ad-card {
      background: #fff;
      border-radius: 10px;
      padding: .5rem 1rem 1rem 1rem;
      box-shadow: 0 4px 10px rgba(0,0,0,0.1);
      width: 350px;
      display: flex;
      flex-direction: column;
      justify-content: space-between;
      min-height: 500px;

    }
    .card-buttons {
      display: flex;
      margin-top: auto;
      gap: 10px;
    }
    .join-btn {
      flex: 4;
      background-color: #28a745;
      color: white;
      padding: 8px;
      border-radius: 6px;
      text-align: center;
      text-decoration: none;
    }
    .more-btn {
      flex: 1;
      background-color: #007bff;
      color: white;
      padding: 8px;
      border-radius: 6px;
      text-align: center;
      text-decoration: none;
    }

#description {
  resize: none;
  height: auto;
  min-height: 250px;
  overflow: auto;
  width: 100%;
  padding: 12px;
  font-size: 0.95rem;
  border: 1px solid #ccc;
  border-radius: 6px;
  box-sizing: border-box;
  font-family: system-ui, sans-serif;
  background-color: #f9f9f9;
  margin-bottom: 1rem;
}


.centered-content {
  text-align: center;
  display: flex;
  justify-content: center;
}

.centered-content h1 {
  margin-bottom: 1rem;
}

.centered-content .join-link {
  display: inline-block;
  color: white;
}


.ad-info a {
    text-decoration: none;
    color: black;
}


.desc {
    overflow: scroll;
    font-size: 13px;
    overflow-wrap: break-word;
    white-space: pre-wrap;
    word-break: break-word;
    outline: none;
    text-align: left;
    text-decoration: none;
        min-height: 50px;

}


@media (max-width: 768px) {
  .ad-card-large {
    grid-template-columns: 1fr;
    padding: 2rem;
  }

    .userProfile {
      bottom: .70rem !important;
      left: 2rem !important;
  }
  .titleImg {
    max-width: 40%;
    margin: 0 auto;
  }

  #description {
    min-height: 10rem;
    font-size: 0.9rem;
  }
}



.dropdown-container {
  position: absolute;
  top: 1rem;
  right: 1rem;
  z-index: 10;
}


.dropdown-toggle {
  background: none;
  border: none;
  font-size: 1.5rem;
  cursor: pointer;
  color: #333;
}

.dropdown-menu {
  display: none;
  flex-direction: column;
  position: absolute;
  top: 36px;
  right: 0;
  background: #fff;
  border: 1px solid #ccc;
  border-radius: 8px;
  padding: 6px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.dropdown-menu button {
  background: none;
  border: none;
  padding: 8px 12px;
  text-align: left;
  cursor: pointer;
  font-size: 0.95rem;
  color: #333;
}

.dropdown-menu button:hover {
  background-color: #f0f0f0;
}

.dropdown-toggle {
  background: none;
  border: none;
  font-size: 1.6rem;
  cursor: pointer;
  color: #333;
  padding: 6px;
  border-radius: 45%;
  transition: background 0.2s ease;
}

.dropdown-toggle:hover {
  background-color: #f1f1f1;
}


.vote-button {
  background-color: #f39c12;
  color: white;
  font-weight: 600;
  font-size: 1rem;
  padding: 12px 20px;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  transition: background 0.2s ease;
  box-shadow: 0 3px 6px rgba(0, 0, 0, 0.1);
  margin-left: 10px;
}

.vote-button:hover {
  background-color: #d68910;
}


.userProfile {
    position: absolute;
    bottom: 1rem;
    left: 1rem;
    z-index: 10;
}

.notification {
  position: fixed;
  bottom: 20px;
  left: 20px;
  background: #4caf50;
  color: white;
  padding: 12px 20px;
  border-radius: 6px;
  font-size: 15px;
  box-shadow: 0 2px 6px rgba(0,0,0,0.2);
  z-index: 999;
}
.notification.hidden {
  display: none;
}
.notification .notif-link {
  color: #fff;
  font-weight: bold;
  margin-left: 10px;
}

.saveRemove{
  background-color: #ea5270 !important;
}


.new-badge {
    top: 10px !important;
    left: 10px !important;
}


.ad-info-container{
    align-self: anchor-center;
    margin-left: 3rem;
}
