/* Card hover effects */
.card {
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  overflow: hidden;
}

.card:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.1), 0 0 1px rgba(0, 0, 0, 0.1);
}

/* Don't lift sidebar widgets or comment card */
.column-right .card:hover,
#comments:hover {
  transform: none;
}

/* Card image zoom on hover */
.card .card-image img {
  transition: transform 0.3s ease;
}

.card:hover .card-image img {
  transform: scale(1.03);
}

/* Fix profile stats centering */
.card.widget .level .level-item {
  flex-basis: 0;
  flex-grow: 1;
  text-align: center;
  justify-content: center;
}

.card.widget .level .level-item .heading,
.card.widget .level .level-item .title {
  text-align: center;
}

/* ===== Comment Section Enhancement ===== */

/* Comment card container */
#comments {
  border-radius: 12px;
  overflow: hidden;
  border: 1px solid #e8e8e8;
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.04);
  transition: box-shadow 0.2s ease;
}

#comments:hover {
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
}

/* Comment header - hide redundant title (Giscus shows its own) */
#comments .card-content {
  padding: 1rem 1.5rem;
}

#comments .title.is-5 {
  display: none;
}

/* Giscus iframe container */
#comments .giscus {
  border-radius: 8px;
}

#comments .giscus-frame {
  border-radius: 8px;
}

/* Smooth transition for post navigation before comments */
.post-navigation {
  margin-bottom: 1.5rem;
  padding: 0.75rem 0;
  border-top: 1px solid #f0f0f0;
  border-bottom: 1px solid #f0f0f0;
}

.post-navigation a {
  transition: color 0.15s ease;
}

.post-navigation a:hover {
  color: #3273dc;
}

/* Article licensing section spacing */
.article-licensing {
  margin-top: 2rem;
  padding-top: 1.5rem;
  border-top: 1px solid #f0f0f0;
}

/* Tag pills in article */
.article-tags .tag {
  border-radius: 6px;
  transition: background-color 0.15s ease, color 0.15s ease;
  cursor: pointer;
}

.article-tags .tag:hover {
  background-color: #3273dc;
  color: #fff;
}

/* ===== Tag Cloud Collapse ===== */
.card[data-type="tags"] .is-grouped-multiline {
  max-height: 140px;
  overflow: hidden;
  position: relative;
  transition: max-height 0.4s ease;
}

.card[data-type="tags"] .is-grouped-multiline.is-expanded {
  max-height: 2000px;
}

.card[data-type="tags"] .card-content {
  position: relative;
}

.card[data-type="tags"] .card-content::after {
  content: '';
  position: absolute;
  bottom: 40px;
  left: 0;
  right: 0;
  height: 60px;
  background: linear-gradient(rgba(255,255,255,0), #fff);
  pointer-events: none;
  transition: opacity 0.3s ease;
  z-index: 1;
}

.card[data-type="tags"] .card-content.is-expanded::after {
  opacity: 0;
}

.tag-toggle-btn {
  display: block;
  width: 100%;
  padding: 8px 0;
  margin-top: 4px;
  background: #fff;
  border: 1px solid #e8e8e8;
  border-radius: 6px;
  color: #57606a;
  font-size: 0.85em;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
  position: relative;
  z-index: 2;
}

.tag-toggle-btn:hover {
  background: #f6f8fa;
  border-color: #d0d7de;
}

/* Tags page: show all tags without collapse */
body.is-tags-page .card[data-type="tags"] .is-grouped-multiline {
  max-height: none;
}

body.is-tags-page .card[data-type="tags"] .card-content::after {
  display: none;
}

body.is-tags-page .tag-toggle-btn {
  display: none;
}


/* ===== Footer Layout ===== */
.footer .level-start {
  flex-direction: column;
  align-items: flex-start;
}

.footer .footer-logo {
  margin-bottom: 0.25rem !important;
}

.footer .level-start p.is-size-7 {
  margin: 0;
  line-height: 1.6;
}

