/* Entrance animation for View All button */
.watlum-view-all {
  opacity: 0;
  transform: scale(0.96) translateY(18px);
  transition: box-shadow 0.5s cubic-bezier(.22,1,.36,1), transform 0.5s cubic-bezier(.22,1,.36,1), opacity 0.5s cubic-bezier(.22,1,.36,1);
}
.watlum-view-all.bounce-in-btn {
  opacity: 1;
  transform: scale(1) translateY(0);
  animation: bounceInBtn 0.7s cubic-bezier(.22,1,.36,1);
}
@keyframes bounceInBtn {
  0% {
    opacity: 0;
    transform: scale(0.96) translateY(18px);
  }
  60% {
    opacity: 1;
    transform: scale(1.08) translateY(-6px);
  }
  80% {
    transform: scale(0.98) translateY(2px);
  }
  100% {
    opacity: 1;
    transform: scale(1) translateY(0);
  }
}
/* Modern Bounce In Animation for Post Card */
.watlum-post-card {
  opacity: 0;
  transform: scale(0.96) translateY(24px);
  transition: box-shadow 0.5s cubic-bezier(.22,1,.36,1), transform 0.5s cubic-bezier(.22,1,.36,1), opacity 0.5s cubic-bezier(.22,1,.36,1);
}
.watlum-post-card.bounce-in {
  opacity: 1;
  transform: scale(1) translateY(0);
  animation: bounceInCard 0.7s cubic-bezier(.22,1,.36,1);
}
@keyframes bounceInCard {
  0% {
    opacity: 0;
    transform: scale(0.96) translateY(24px);
  }
  60% {
    opacity: 1;
    transform: scale(1.04) translateY(-8px);
  }
  80% {
    transform: scale(0.98) translateY(2px);
  }
  100% {
    opacity: 1;
    transform: scale(1) translateY(0);
  }
}
/* Fadeup utility for no-posts message or other elements */
.fadeup {
  opacity: 0;
  transform: translateY(18px);
  animation: watlumFadeUp .7s cubic-bezier(.22,1,.36,1) .15s forwards;
}
.watlum-post-layout { width: 100%; }
.watlum-post-layout.is-fullwidth {
  /* Break out of the centered container and span full viewport width */
  width: 100vw;
  margin-left: 50%;
  transform: translateX(-50%);
  padding-left: 32px;
  padding-right: 32px;
}
.watlum-carousel { position: relative; display: block; }
.watlum-carousel-viewport { overflow: hidden; display: block; width: 100%; }
.watlum-carousel-track { display: flex; gap: 28px; will-change: transform; transition: transform .35s ease; }
.watlum-carousel .watlum-post-card { flex: 0 0 auto; width: auto; }
.watlum-carousel-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  z-index: 5;
  border: none;
  background: rgba(255,255,255,0.9);
  box-shadow: 0 6px 18px rgba(0,0,0,0.12);
  width: 40px; height: 40px; border-radius: 999px; cursor: pointer;
}
.watlum-carousel-nav.prev { left: -12px; }
.watlum-carousel-nav.next { right: -12px; }
.watlum-post-layout-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 28px;
  margin: 12px 0 8px;
}
.watlum-post-card {
  box-shadow: 0 2px 12px rgba(0,0,0,0.07);
  padding: 0;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  transition: box-shadow 0.6s cubic-bezier(.4,0,.2,1), transform 0.6s cubic-bezier(.4,0,.2,1);
  border-radius: 16px;
  background: #fff;
}
.watlum-post-card:hover {
  box-shadow: 0 16px 32px rgba(0,0,0,0.16);
  transform: scale(1.06) translateY(-4px);
}
.watlum-post-card .card-img { order: -1; }
.card-img img {
  width: 100%;
  height: 160px;
  object-fit: cover;
  border-top-left-radius: inherit;
  border-top-right-radius: inherit;
  display: block;
  transition: transform .35s ease;
}
.card-img.placeholder {
  display: flex; align-items: center; justify-content: center;
  height: 160px; width: 100%;
  background: #f1f5f9; color: #94a3b8;
  border-top-left-radius: inherit; border-top-right-radius: inherit;
}
.watlum-post-card:hover .card-img img { transform: scale(1.04); }
.card-content {
  padding: 20px 18px 18px 18px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  /* Make content area grow so the button can stick to the bottom */
  
  flex: 1 1 auto;
  min-height: 140px;
}

.card-title { 
  margin: 0;
  line-height: 1.3;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  flex: 1 1 auto;
}

.card-date { 
  color: #64748b; 
  font-size: 0.875rem; 
  margin: 0;
  flex-shrink: 0;
}

.card-btn {
  display: inline-block;
  text-align: center;
  color: #fff;
  font-weight: 600;
  font-size: 1rem;
  border-radius: 12px;
  padding: 10px 22px;
  /* Push button to the bottom of the card */
  margin-top: auto;
  box-shadow: 0 1px 0 rgba(0,0,0,0.04);
  transition: filter .18s, transform .12s ease;
  text-decoration: none;
}
.card-btn:hover {
  filter: brightness(0.96);
}
.card-btn:active { transform: translateY(1px); }
.watlum-section-heading-row .watlum-view-all:hover { filter: brightness(.96); text-decoration: none; }
.watlum-view-all {
  display: inline-block;
  background-color: #e5e7eb; /* light gray like before */
  color: #0f172a; /* dark text for readability */
  text-decoration: none;
  font-weight: 700;
  font-size: 1rem;
  line-height: 1;
  padding: 12px 18px; /* bigger */
  border-radius: 10px; /* reduce curvature more */
  transition: box-shadow 0.35s cubic-bezier(.22,1,.36,1), transform 0.35s cubic-bezier(.22,1,.36,1);
}

/* Effect on hover for View All button */
.watlum-view-all:hover,
.watlum-section-heading-row .watlum-view-all:hover {
  filter: brightness(.96);
  text-decoration: none;
  box-shadow: 0 6px 18px rgba(0,0,0,0.13);
  transform: scale(1.07) translateY(-2px);
}
.watlum-view-all:hover { filter: brightness(.96); }

/* Reveal animation states */

/* Fallback: animate existing cards shortly after load (no JS) */
@keyframes watlumFadeUp { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: translateY(0); } }
.watlum-post-layout:not(.no-auto-anim) .watlum-post-card:not(.is-hidden):not(.is-revealed) {
  animation: watlumFadeUp .6s cubic-bezier(.22,1,.36,1) .1s both;
}
/* Large image like mockup */
@media (min-width: 901px) {
  .card-img img, .card-img.placeholder { height: 180px; }
}
/* Force 3/2/1 columns across common breakpoints */
@media (min-width: 1024px) {
  .watlum-post-layout-grid { grid-template-columns: repeat(3, minmax(0, 320px)); justify-content: start; }
}
@media (min-width: 680px) and (max-width: 1023px) {
  .watlum-post-layout-grid { grid-template-columns: repeat(2, minmax(0, 320px)); justify-content: start; }
}
@media (max-width: 900px) {
  .watlum-post-layout-grid { gap: 24px; }
  .card-title { 
    font-size: 1.1rem; 
  }
  .card-img img {
    height: 140px;
  }
}
/* Responsive heading row: title and View All button */
@media (max-width: 680px) {
  .watlum-section-heading-row {
    gap: 10px !important;
    flex-direction: column !important;
    align-items: stretch !important;
  }
  .watlum-section-title {
    font-size: 22px !important;
  }
  .watlum-section-heading-row .watlum-view-all {
    align-self: flex-start;
    font-size: 0.95rem;
    padding: 10px 14px;
  }
}
@media (max-width: 400px) {
  .watlum-section-title {
    font-size: 20px !important;
  }
  .watlum-section-heading-row .watlum-view-all {
    font-size: 0.9rem;
    padding: 9px 12px;
  }
}
