.wpns-section {
  position: relative;
  z-index: 1;
  width: 100%;
  box-sizing: border-box;
  opacity: 0.01;
  /* avoid initial layout flash while initializing */
}

.wpns-section.is-ready {
  opacity: 1;
  transition: opacity 150ms ease;
}

.wpns-section.is-sticky {
  position: sticky;
  top: 0;
}

.wpns-header {
  width: 100%;
  /* background: #fff;*/
  color: #fff;
}

.wpns-header-inner {
  width: 100%;
  max-width: none;
  margin: 0;
  padding: 12px 24px;
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  gap: 16px;
}

.wpns-heading {
  font-size: 40px !important;
  color: #fff !important;
  margin: 0px !important;
  margin: 0;
  /*  font-size: 22px !important;*/
  font-weight: 600 !important;
}

.wpns-year-label {
  color: #fff;
}

.wpns-inner {
  max-width: 1300px;
  margin: 0 auto;
  padding: 16px 0px;
  padding-top: 45px;
}

.wpns-controls {
  display: flex;
  gap: 12px;
  align-items: center;
  margin-bottom: 0px !important;
}

.wpns-year {
  padding: 8px 12px;
  border: 1px solid #ddd;
  border-radius: 4px;
  background: #fff;
}

.wpns-list {
  display: grid;
  gap: 45px;
  overflow: hidden;
  /* prevent horizontal scroll from extending bars */
  min-height: 320px;
  /* reserve space to reduce layout shift before items load */
  opacity: 1;
  transition: opacity 0.4s ease-in-out;
  /* Smooth fade transition */
}

.wpns-list.is-loading {
  position: relative;
}

.wpns-list.is-loading::after {
  content: "Loading...";
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  color: #666;
  background: rgba(255, 255, 255, 0.9);
  padding: 10px 14px;
  border-radius: 6px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
  z-index: 10;
}

.wpns-item {
  display: grid;
  grid-template-columns: 5fr 7fr !important;
  /* default: image(5) then text(7) */
  gap: 20px;
  align-items: start !important;
  /* align-items: stretch; */
  /* height: 300px; */
  min-height: 330px;
  background: #ffffff;
  animation: fadeInUp 0.5s ease-out;
  /* Smooth entrance animation */
}

@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Odd rows: image left (5fr), text right (7fr) */
.wpns-item:nth-child(odd) {
  grid-template-columns: 5fr 7fr;
}

.wpns-item:nth-child(odd) .wpns-image {
  order: 1;
}

.wpns-item:nth-child(odd) .wpns-content {
  order: 2;
}

/* Even rows: text left (7fr), image right (5fr) */
/* .wpns-item:nth-child(even) {
  grid-template-columns: 7fr 5fr;
} */
/* .wpns-item:nth-child(even) .wpns-image {
  order: 2;
} */
.wpns-item:nth-child(even) .wpns-content {
  order: 1;
}

.wpns-item.no-image .wpns-image.is-empty {
  background: transparent;
}

.wpns-item.no-image .wpns-image.is-empty::after {
  display: none;
}

/* .wpns-image img {
  border-radius: 8px !important;
} */

.wpns-image {
  position: relative !important;
  width: 100%;
  height: 260px;
  overflow: visible !important;
  /* allow pseudo-element to show outside */
  border-radius: 8px !important;
  background: #f3f3f3 !important;
}

/* .wpns-image::before {
  content: "";
  position: absolute;
  bottom: -12px; 
  width: 12px; 
  height: calc(100% + 24px); 
  background: #9cc24a;
  border-radius: 8px;
  z-index: 1;
} */
/* Left corner bar for odd rows (image on left) */
.wpns-item:nth-child(odd) .wpns-image::before {
  left: -12px;
  /* outside left */
}

/* Right corner bar for even rows (image on right) */
.wpns-item:nth-child(even) .wpns-image::before {
  right: -12px;
  /* outside right */
}

/* .wpns-image::after {
  content: "";
  position: absolute;
  bottom: -12px; 
  width: 100%;
  height: 12px; 
  background: #9cc24a;
  border-radius: 2px;
} */
/* Green bars should start from the near bottom corner and leave space for side bar */
.wpns-item:nth-child(odd) .wpns-image::after {
  left: -12px;
  /* extend to meet outer side bar */
  width: calc(100% + 12px);
}

.wpns-item:nth-child(even) .wpns-image::after {
  right: -12px;
  /* extend to meet outer side bar */
  width: calc(100% + 12px);
}

.wpns-image img {
  width: 100%;
  height: 330px;
  object-fit: cover;
  display: block;
}

.wpns-content {
  display: flex;
  flex-direction: column;
  justify-content: center;
  border: none;
  border-radius: 8px;
  padding: 2px 15px 2px 2px;
  /* background: #fff; */
  height: 310px !important;
  min-height: 0;
}

.wpns-meta {
  font-size: 14px;
  color: #4a90e2;
  margin-bottom: 8px;
  font-weight: 500;
  line-height: 1.2;
  display: flex;
  align-items: center;
  gap: 6px;
}

.wpns-meta i {
  color: #4a90e2 !important;
}

.wpns-calendar-icon {
  font-size: 16px;
  color: #666;
}

/* .wpns-title {
  font-size: 25px !important;
  font-weight: 600 !important;
  margin: 0 0 5px 0 !important;
  line-height: 1.3;
} */

.wpns-title {
  font-size: 18px !important;
  font-weight: 600 !important;
  margin: 0 0 5px 0 !important;
  line-height: 1.3;
  /* --- ADDITIONS START HERE --- */
  position: relative;
  /* 1. Crucial for positioning the underline */
  display: block;
  /* 2. Ensures the title takes up the full width of its column */
}

.wpns-text p {
  font-size: 16px !important;
}


/* --- NEW RULE FOR THE UNDERLINE --- */
.wpns-title::after {
  content: "";
  position: absolute;
  bottom: -4px;
  /* Adjust vertical position (distance from text) */
  left: 0;

  /* Styling for the green line */
  width: 80px;
  /* Adjust length of the line */
  height: 3px;
  /* Adjust thickness of the line */
  background-color: #ffa500;
  /* Using a common orange color */
}

.wpns-text {
  position: relative;
  overflow: auto;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  flex: 1;
  min-height: 0;
  margin-top: 18px;
  max-height: 180px;
}

/* Custom scrollbar styling */
.wpns-text::-webkit-scrollbar {
  width: 4px;
}

.wpns-text::-webkit-scrollbar-track {
  background: #ffffff;
  border-radius: 2px;
}

.wpns-text::-webkit-scrollbar-thumb {
  background: #e0e0e0;
  border-radius: 2px;
}

.wpns-text::-webkit-scrollbar-thumb:hover {
  background: #d0d0d0;
}

.wpns-text::-webkit-scrollbar-button {
  display: none;
}

.wpns-section .wpns-text {
  overflow: auto !important;
}

.wpns-text p {
  margin: 0 0 10px 0;
  font-size: 16px !important;
}

.wpns-loading,
.wpns-empty {
  text-align: center;
  padding: 24px;
  color: #666;
}

/* Pagination Styles */
.wpns-pagination {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 12px;
  margin-top: 40px;
  padding: 20px 0;
  opacity: 1;
  transition: opacity 0.3s ease;
  flex-wrap: wrap;
}

.wpns-dot-btn {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  border: none;
  background: #cbd5e1;
  cursor: pointer;
  padding: 0;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  outline: none;
}

.wpns-dot-btn:hover {
  background: #94a3b8;
  transform: scale(1.2);
}

.wpns-dot-btn.active {
  width: 24px;
  height: 10px;
  border-radius: 5px;
  background: #0096d1;
  box-shadow: 0 2px 6px rgba(0, 150, 209, 0.3);
}

.wpns-dot-btn:disabled {
  cursor: not-allowed;
  opacity: 0.5;
}

@media (max-width: 768px) {

  .wpns-item,
  .wpns-item:nth-child(odd),
  .wpns-item:nth-child(even) {
    grid-template-columns: 1fr !important;
    /* collapse to single column on mobile */
    height: auto;
  }

  /* Mobile pe hamesha image pehle (top), text baad mein (bottom) */
  .wpns-image {
    order: 1 !important;
    height: auto;
    /* natural height on mobile */
    overflow: hidden;
    /* hide the extending bar on mobile */
  }

  .wpns-content {
    order: 2 !important;
    height: auto !important;
    padding-left: 10px;
    padding-bottom: 15px;
  }

  .wpns-text p {
    padding-right: 5px;
  }

  .wpns-image img {
    height: auto;
    aspect-ratio: 1000 / 600;
  }

  /* Remove the side green bar on mobile, keep only bottom bar */
  .wpns-image::before {
    display: none;
  }

  .wpns-text,
  .wpns-section .wpns-text {
    max-height: none !important;
    overflow: visible !important;
  }
}