/* our impact css code-----*/

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

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

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

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

.oi-year-label {
  color: #fff !important;
}

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

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

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

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

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

.oi-list {
  display: grid;
  gap: 30px;
  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 */
}

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

.oi-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;
}

.oi-item {
  display: grid;
  grid-template-columns: 5fr 7fr !important;
  /* default: image(5) then text(7) */
  gap: 20px;
  align-items: center !important;
  /* center with fixed heights */
  height: 330px;
  /* min-height: 0; */
  background: #fff;
  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) */
.oi-item:nth-child(odd) {
  grid-template-columns: 5fr 7fr;
}

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

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

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

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

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

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

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

/* .oi-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) */
.oi-item:nth-child(odd) .oi-image::before {
  left: -12px;
  /* outside left */
}

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

/* .oi-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 */
.oi-item:nth-child(odd) .oi-image::after {
  left: -12px;
  /* extend to meet outer side bar */
  width: calc(100% + 12px);
}

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

.oi-image img {
  width: 100%;
  height: 330px;
  /* keep image minimal height within 200-300px */
  object-fit: cover;
  display: block;
}

.oi-content {
  display: flex;
  flex-direction: column;
  border: none;
  /* remove border from right text */
  border-radius: 8px;
  padding: 5px;
  background: #ffffff;
  /* light gray background only behind text */
  height: 280px;
  /* fixed height to match image */
  min-height: 0;
  margin-top: -15px;
}

.oi-meta {
  font-size: 14px;
  color: #000;
  /* color: #0096d1; */
  display: inline-flex;
  align-items: center;
  gap: 6px;
  display: none;
}

.oi-meta i {
  display: none;
  font-size: 12px;
  color: #0099cd;
  margin-right: 4px;
}

.oi-country {
  font-size: 14px;
  color: #0088c3;
  font-weight: 500;
}

.oi-submeta {
  display: flex;
  justify-content: start;
  /* country left, date right */
  align-items: center;
  gap: 12px;
  margin: 0px 0 0px 0;
}

.oi-title {
  font-size: 22px !important;
  font-weight: 600 !important;
  margin: 0 0 15px 0 !important;
  position: relative;
  padding-bottom: 8px;
}

.oi-title::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: 0;
  width: 80px;
  height: 4px;
  background-color: #ffa600;
  /* border-radius: 2px; */
}

/* ===== SCROLLBAR STYLES - SIMPLIFIED (Based on working wpns-text) ===== */
.oi-text {
  position: relative;
  overflow: auto;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  flex: 1;
  min-height: 200px;
  padding-right: 15px !important;
  text-align: justify !important;
  margin-top: 5px;
}

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

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

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

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

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

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

/* ===== END OF SCROLLBAR STYLES ===== */

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

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

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

.oi-pagination-dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  border: none;
  background-color: #cbd5e0;
  /* light gray default */
  cursor: pointer;
  padding: 0;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
  outline: none;
}

.oi-pagination-dot::after {
  content: attr(aria-label);
  position: absolute;
  bottom: 100%;
  left: 50%;
  transform: translateX(-50%) translateY(-8px);
  background: #333;
  color: #fff;
  padding: 4px 8px;
  border-radius: 4px;
  font-size: 11px;
  white-space: nowrap;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease, transform 0.2s ease;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.15);
  z-index: 10;
}

.oi-pagination-dot:hover::after {
  opacity: 1;
  transform: translateX(-50%) translateY(-12px);
}

.oi-pagination-dot:hover {
  background-color: #a0aec0;
  transform: scale(1.2);
}

.oi-pagination-dot.is-active {
  background-color: #0096d1;
  /* active theme color */
  width: 28px;
  /* pill shape for the active dot */
  border-radius: 6px;
  cursor: default;
  transform: scale(1);
}

.oi-pagination-dot:disabled:not(.is-active) {
  opacity: 0.5;
  cursor: not-allowed;
}

@media (max-width: 768px) {

  .oi-item,
  .oi-item:nth-child(odd),
  .oi-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) */
  .oi-image {
    order: 1 !important;
    height: auto;
    /* natural height on mobile */
    overflow: hidden;
    /* hide the extending bar on mobile */
  }

  .oi-image img {
    width: 100% !important;
    height: auto !important;
    object-fit: cover !important;
  }

  .oi-list {
    gap: 40px;
  }

  .oi-content {
    order: 2 !important;
    margin-top: 0;
    height: auto !important;
    padding-left: 10px;
  }

  .oi-header-inner {
    padding: 12px 5px;
  }

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

  .oi-text {
    max-height: none !important;
    overflow: visible !important;
    overflow-y: visible !important;
    min-height: 0 !important;
    padding-right: 0 !important;
  }
}