/* ================================
   JABFS INDEXING DATABASES SIDEBAR
   FIXED RESPONSIVE VERSION
   ================================ */

.jabfs-indexing-box {
  width: 100% !important;
  max-width: 320px !important;
  margin: 25px auto !important;
  padding: 28px 16px 34px !important;
  box-sizing: border-box !important;
  background: linear-gradient(145deg, #eeeeee 0%, #f8f8f8 45%, #e6e6e6 100%);
  border-radius: 2px;
  position: relative;
  overflow: hidden;
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,0.9),
    0 20px 42px rgba(0,0,0,0.12);
  animation: jabfsBoxReveal 0.8s ease both;
}

/* Large title inside grey box */
.jabfs-indexing-box h3 {
  margin: 0 0 28px !important;
  padding: 0 !important;
  text-align: center;
  font-family: Georgia, "Times New Roman", serif !important;
  font-size: 38px !important;
  line-height: 0.98 !important;
  font-weight: 500 !important;
  letter-spacing: 0.5px;
  color: #2f3c4a !important;
  text-transform: uppercase;
  white-space: normal !important;
  word-break: normal !important;
  animation: jabfsTitleDrop 0.8s ease both;
}

/* Two-column logo grid */
.jabfs-indexing-grid {
  width: 100% !important;
  display: grid !important;
  grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  gap: 30px 20px !important;
  align-items: center !important;
  justify-items: center !important;
  box-sizing: border-box !important;
}

/* Logo card */
.jabfs-index-card {
  width: 118px !important;
  height: 150px !important;
  max-width: 100% !important;
  box-sizing: border-box !important;
  background: #ffffff;
  border: 1px solid #9d9d9d;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  padding: 16px !important;
  text-decoration: none !important;
  position: relative;
  overflow: hidden;
  box-shadow:
    0 16px 24px rgba(0,0,0,0.18),
    0 4px 7px rgba(0,0,0,0.08);
  transform: rotate(-1deg);
  transition:
    transform 0.35s ease,
    box-shadow 0.35s ease,
    border-color 0.35s ease;
  animation: jabfsCardFade 0.75s ease both;
}

.jabfs-index-card:nth-child(even) {
  transform: rotate(0.5deg);
}

.jabfs-index-card:nth-child(3n) {
  transform: rotate(-0.4deg);
}

/* Shine animation */
.jabfs-index-card::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(
    120deg,
    transparent 0%,
    transparent 35%,
    rgba(255,255,255,0.8) 50%,
    transparent 65%,
    transparent 100%
  );
  transform: translateX(-130%);
  transition: transform 0.7s ease;
}

.jabfs-index-card:hover::before {
  transform: translateX(130%);
}

.jabfs-index-card:hover {
  transform: translateY(-8px) scale(1.04) rotate(0deg);
  border-color: #6f6f6f;
  box-shadow:
    0 24px 34px rgba(0,0,0,0.24),
    0 8px 12px rgba(0,0,0,0.10);
}

/* Logo image */
.jabfs-index-card img {
  max-width: 100% !important;
  max-height: 82px !important;
  width: auto !important;
  height: auto !important;
  object-fit: contain !important;
  display: block !important;
  transition: transform 0.35s ease, filter 0.35s ease;
}

.jabfs-index-card:hover img {
  transform: scale(1.08);
  filter: saturate(1.15) contrast(1.08);
}

/* Animation delay */
.jabfs-index-card:nth-child(1) { animation-delay: 0.05s; }
.jabfs-index-card:nth-child(2) { animation-delay: 0.10s; }
.jabfs-index-card:nth-child(3) { animation-delay: 0.15s; }
.jabfs-index-card:nth-child(4) { animation-delay: 0.20s; }
.jabfs-index-card:nth-child(5) { animation-delay: 0.25s; }
.jabfs-index-card:nth-child(6) { animation-delay: 0.30s; }
.jabfs-index-card:nth-child(7) { animation-delay: 0.35s; }
.jabfs-index-card:nth-child(8) { animation-delay: 0.40s; }
.jabfs-index-card:nth-child(9) { animation-delay: 0.45s; }
.jabfs-index-card:nth-child(10) { animation-delay: 0.50s; }
.jabfs-index-card:nth-child(11) { animation-delay: 0.55s; }
.jabfs-index-card:nth-child(12) { animation-delay: 0.60s; }
.jabfs-index-card:nth-child(13) { animation-delay: 0.65s; }
.jabfs-index-card:nth-child(14) { animation-delay: 0.70s; }

@keyframes jabfsBoxReveal {
  from {
    opacity: 0;
    transform: translateY(18px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes jabfsTitleDrop {
  from {
    opacity: 0;
    transform: translateY(-14px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes jabfsCardFade {
  from {
    opacity: 0;
    transform: translateY(20px) scale(0.96);
  }
  to {
    opacity: 1;
  }
}

/* Extra narrow sidebar fix */
@media (max-width: 420px) {
  .jabfs-indexing-box {
    max-width: 280px !important;
    padding: 24px 12px 30px !important;
  }

  .jabfs-indexing-box h3 {
    font-size: 32px !important;
  }

  .jabfs-indexing-grid {
    gap: 24px 14px !important;
  }

  .jabfs-index-card {
    width: 105px !important;
    height: 135px !important;
    padding: 12px !important;
  }

  .jabfs-index-card img {
    max-height: 70px !important;
  }
}