/* ============================================================
   INSTITUTE COLLABORATIONS — Big Rectangle Card Redesign
   ============================================================ */
.institute-collaborations {
  position: relative;
  overflow: hidden;
  margin-top: 2.75rem;
  padding: 1.75rem;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 26px;
  background: #061325;
  box-shadow: 0 25px 60px rgba(4, 11, 24, 0.65);
  isolation: isolate;
}

.institute-collaborations.dark {
  border: 1px solid rgba(255, 255, 255, 0.2);
  background: #040d1a;
  box-shadow: 0 30px 70px -15px rgba(2, 8, 18, 0.75), inset 0 1px 0 rgba(255, 255, 255, 0.18);
}

/* Background Animated Slider Layer */
.institute-collaborations__bg-slider {
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  overflow: hidden;
  border-radius: 26px;
}

.institute-bg-slide {
  position: absolute;
  inset: -15px;
  background-size: cover;
  background-position: center;
  opacity: 0;
  transform: scale(1.02);
  transition: opacity 1s cubic-bezier(0.4, 0, 0.2, 1), transform 6s cubic-bezier(0.2, 0.8, 0.2, 1);
  will-change: opacity, transform;
  filter: brightness(0.92) contrast(1.05);
}

.institute-bg-slide.active {
  opacity: 0.85;
  transform: scale(1.08);
}

.institute-bg-overlay {
  position: absolute;
  inset: 0;
  z-index: 2;
  background: linear-gradient(180deg, rgba(6, 17, 34, 0.45) 0%, rgba(4, 12, 24, 0.78) 100%),
              radial-gradient(ellipse at center, rgba(8, 22, 44, 0.3) 0%, rgba(4, 12, 24, 0.7) 100%);
  pointer-events: none;
}

/* Section Heading */
.institute-collaborations__heading {
  position: relative;
  z-index: 3;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.25rem;
  margin-bottom: 1.5rem;
  padding-bottom: 0.75rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.12);
}

.institute-collaborations__heading .inst-badge {
  display: inline-block;
  color: #ffd572;
  font-size: 0.75rem;
  font-weight: 900;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.6);
  margin-bottom: 0.25rem;
}

.institute-collaborations .institute-collaborations__heading h2 {
  margin: 0;
  color: #ffffff;
  font-size: 1.25rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  text-shadow: 0 2px 6px rgba(0, 0, 0, 0.6);
}

.inst-trust-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.4rem 0.9rem;
  border: 1px solid rgba(255, 213, 114, 0.35);
  border-radius: 999px;
  background: rgba(255, 213, 114, 0.12);
  color: #ffd572;
  font-size: 0.76rem;
  font-weight: 800;
  backdrop-filter: blur(6px);
}

/* Cards Grid */
.institute-collaborations__grid {
  position: relative;
  z-index: 3;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1rem;
}

.partner-showcase .institute-collaborations {
  margin-top: 0;
  padding: 1.6rem;
  box-shadow:
    0 50px 100px -20px rgba(6, 15, 30, 0.75),
    0 30px 60px -30px rgba(6, 15, 30, 0.55),
    0 0 0 1px rgba(255, 255, 255, 0.2);
}

.partner-showcase .institute-collaborations__grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem;
}

/* Big Rectangle Logo Cards */
.institute-logo-card {
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  min-height: 185px;
  padding: 1.15rem;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 18px;
  background: linear-gradient(150deg, rgba(14, 32, 60, 0.82) 0%, rgba(8, 20, 40, 0.92) 100%);
  color: #ffffff;
  text-decoration: none;
  backdrop-filter: blur(12px);
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.3), inset 0 1px 0 rgba(255, 255, 255, 0.12);
  transition: transform 0.35s cubic-bezier(0.2, 0.8, 0.2, 1),
              border-color 0.35s ease,
              box-shadow 0.35s ease,
              background 0.35s ease;
  overflow: hidden;
}

.institute-logo-card::before {
  content: "";
  position: absolute;
  top: 0;
  left: -100%;
  width: 60%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.1), transparent);
  transition: left 0.6s ease;
  pointer-events: none;
}

.institute-logo-card:hover::before {
  left: 150%;
}

.institute-logo-card:hover,
.institute-logo-card:focus-visible {
  transform: translateY(-6px) scale(1.02);
  border-color: rgba(245, 166, 35, 0.85);
  background: linear-gradient(150deg, rgba(18, 42, 78, 0.9) 0%, rgba(10, 26, 52, 0.96) 100%);
  box-shadow: 0 22px 45px rgba(0, 0, 0, 0.45), 0 0 25px rgba(245, 166, 35, 0.3);
}

.institute-logo-card:focus-visible {
  outline: 3px solid rgba(18, 199, 171, 0.5);
  outline-offset: 2px;
}

/* Card Top Tag */
.institute-card-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 0.75rem;
}

.inst-card-tag {
  display: inline-block;
  padding: 0.25rem 0.6rem;
  border-radius: 6px;
  background: rgba(255, 213, 114, 0.14);
  border: 1px solid rgba(255, 213, 114, 0.28);
  color: #ffd572;
  font-size: 0.64rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

/* Card Logo Stage */
.institute-logo-card__image {
  display: flex;
  width: 100%;
  height: 56px;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  padding: 0.4rem 0.75rem;
  border-radius: 12px;
  background: #ffffff;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
  margin-bottom: 0.85rem;
}

.institute-logo-card__image--dark {
  background: linear-gradient(135deg, #07172e, #12355f);
  border: 1px solid rgba(255, 255, 255, 0.12);
}

.institute-logo-card__image img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
}

/* Card Text Info */
.institute-card-info {
  margin-bottom: 0.75rem;
}

.institute-logo-card strong {
  display: block;
  color: #ffffff;
  font-size: 0.95rem;
  font-weight: 800;
  line-height: 1.25;
  margin-bottom: 0.25rem;
}

.institute-card-info small {
  display: block;
  color: rgba(255, 255, 255, 0.7);
  font-size: 0.72rem;
  font-weight: 600;
  line-height: 1.3;
}

/* Card Footer */
.institute-card-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 0.6rem;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  color: #5ef0e0;
  font-size: 0.72rem;
  font-weight: 700;
}

.institute-card-footer .arrow {
  transition: transform 0.25s ease;
}

.institute-logo-card:hover .institute-card-footer .arrow {
  transform: translateX(4px);
  color: #ffd572;
}

/* Responsive Grid */
@media (max-width: 1200px) {
  .partner-showcase .institute-collaborations__grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 900px) {
  .institute-collaborations__grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 580px) {
  .institute-collaborations {
    margin-top: 2rem;
    padding: 1.1rem;
    border-radius: 20px;
  }

  .institute-collaborations__heading {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.5rem;
  }

  .institute-collaborations__grid,
  .partner-showcase .institute-collaborations__grid {
    grid-template-columns: 1fr;
    gap: 0.85rem;
  }

  .institute-logo-card {
    min-height: 165px;
  }
}
