.card {
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
  border-radius: 12px;
  border-color: transparent;
  background-color: white;
  padding: 0.9rem;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  position: static;
  overflow: visible;
  border-width: 0px !important;
  z-index: 1 !important;
  position: relative;
}

.card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.15);
    z-index: 1 !important;  
}

.card-body {
  padding: 0.4rem;
  position: relative;
  z-index: 0 !important;
  opacity: 0;
  animation: fadeIn 1s ease-out forwards;
}

.card-body h5,
.card-body .post-title {
  font-size: 1.125rem;
  font-weight: 600;
  margin-bottom: 0.25rem;
}

.card-body .post-meta,
.card-footer .text-muted,
.card-body small {
  font-size: 0.875rem;
  color: #6c757d;
}

.card-header {
  position: relative;
  z-index: 2;
  background: none;
}

#post-list .card{
    border-bottom-color: #686868 !important;
    border-bottom-width: 4px !important;
}

.follow-button {
  transition: all 0.2s ease;
  font-size: 22px;
}

.card .btn:hover,
.follow-button:hover {
  transform: scale(1.05);
}

.follow-button,
.follow-count {
  background-color: transparent;
  border: none;
  color: grey;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  cursor: pointer;
  padding: 6px 10px;
  border-radius: 6px;
  font-size: 1rem;
  line-height: 1.5rem;
}

.follow-count {
  padding: 0;
  font-size: 1rem;
  line-height: 1.5rem;
  color: black;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.banner {
  position: absolute;
  top: 2px;
  left: -20px;
  background-color: #5cb85c;
  color: white;
  padding: 5px 0;
  width: 80px;
  text-align: center;
  font-weight: bold;
  transform: rotate(-45deg);
  transform-origin: center;
  box-shadow: 0 2px 4px rgba(0,0,0,0.2);
  z-index: 100;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.card:hover .banner {
  transform: rotate(-45deg) translateY(4px);
}

.card.loading {
  animation: cardPulse 1.5s ease-in-out infinite;
}

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes cardPulse {
  0% { opacity: 1; }
  50% { opacity: 0.7; }
  100% { opacity: 1; }
}

/* Reveal Animation */
.post-card-container {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

.post-card-container.animate-visible {
  opacity: 1;
  transform: translateY(0);
}

/* Share Menu */
.share-container {
  position: relative;
  display: inline-block;
}

.share-menu {
  position: absolute;
  top: auto;
  bottom: 75%;
  right: 0px;
  left: 10px;
  background-color: white;
  border: 1px solid #ddd;
  border-radius: 5px;
  box-shadow: 0 2px 5px rgba(0,0,0,0.2);
  padding: 10px;
  z-index: 100;
  min-width: 250px;
  display: none;
  transition: opacity 0.3s ease;
}

.share-container:hover .share-menu {
  display: block;
}

.copy-link-button {
  background-color: #0d6efd !important;
  color: white !important;

}

.highlighted-card-red {
    padding-top: 12px;
    border: 2px solid #e25a5a !important;
    background: linear-gradient(to bottom, #e25a5a -5%, #fff 6%, #fff 85%,#e25a5a 120%);
    box-shadow: 0 0px 20px rgba(255, 131, 6, 0.9) !important;
    z-index: 1; 
}

.highlighted-card-green{
    padding-top: 12px;
    border: 1px solid #00ff6a !important;
    background: linear-gradient(to bottom, #aae6a3 -5%, #fff 6%, #fff 85%,#aae6a3 120%);
    box-shadow: 0 0px 20px rgba(41, 234, 14, 1) !important;
    z-index: 1; 
}

.highlighted-card-blue{
    padding-top: 12px;
    border: 1px solid #4559cb !important;
    background: linear-gradient(to bottom, #a3a5e6 -5%, #fff 6%, #fff 85%,#a9a3e6 120%);
    box-shadow: 0 0px 20px rgba(14, 14, 234, 0.9) !important;
    z-index: 1; 
}

.post-card-title {
  font-size: 1.125rem;
  line-height: 1.5rem;
  margin-bottom: .5rem;
}
.post-card-text {
  font-size: .875rem;
  line-height: 1.25rem;
}

/* Non-interactions row (top) */
.post-noninteractions {
  display: flex;
  justify-content: flex-start;
  align-items: left;
  gap: 1.5rem;
  margin-bottom: .5rem;
  color: #000000;
  font-size: .875rem;
}
.post-noninteractions span {
  display: flex;
  align-items: center;
  gap: .25rem;
}

/* Interactions row (bottom) */
.post-interactions {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1.5rem;
  margin-top: .5rem;
}
.post-interactions button,
.post-interactions .share-container {
  background: none;
  border: none;
}
.post-interactions .like-button,
.post-interactions .follow-button {
  display: flex;
  align-items: center;
  gap: .25rem;
}

/* Make all SVG icons and response/views icons the same size */
.post-interactions svg,
.post-noninteractions svg,
.share-container .bi,
.follow-button .bi,
.like-button svg {
  width: 22px;
  height: 22px;
  vertical-align: middle;
  display: inline-block;
}


/* Make the heart icon red when liked */
.like-button.active .like-icon svg {
  color: #e74c3c;
  fill: #e74c3c;
}
.like-icon svg {
  color: #000000;
  fill: #000000;
  transition: color 0.2s, fill 0.2s;
}
.like-button:hover .like-icon svg {
  color: #e74c3c;
  fill: #e74c3c;
}

/* Make bell and share icons consistent color */
.follow-button .bi,
.share-container .bi {
  color: #000000;
  font-size: 22px;
  width: 22px;
  height: 22px;
  vertical-align: middle;
}
.follow-button.active .bi {
  color: #0d6efd;
}

/* Make the whole card clickable except for interactive elements */
.card.clickable {
  cursor: pointer;
}
.card.clickable * {
  pointer-events: auto;
}
.card.clickable .post-card-link {
  display: block;
  color: inherit;
  text-decoration: none;
}
.card.clickable .post-interactions,
.card.clickable .post-interactions *,
.card.clickable .share-container,
.card.clickable .share-container *,
.card.clickable button,
.card.clickable input,
.card.clickable select,
.card.clickable textarea {
  pointer-events: auto;
}