/* =========================================
   RPGI Custom Overrides
   ========================================= */

/* ------------------------------------------
   FIX: OUR INSTITUTES — logo on top, text below
   No overlap, no invisible hover text
   ------------------------------------------ */
#instr-sec .instr-card {
  display: flex;
  flex-direction: column;
  overflow: hidden;
}
#instr-sec .instr-card .instr-img {
  height: 190px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 28px;
  background: #f5f7fa !important;
  flex-shrink: 0;
}
#instr-sec .instr-card .instr-img img {
  width: auto !important;
  height: auto !important;
  max-height: 110px !important;
  max-width: 80% !important;
  object-fit: contain !important;
}
/* Remove the absolute positioning — stack content below */
#instr-sec .instr-card .box-content {
  position: static !important;
  max-width: 100% !important;
  width: 100% !important;
  margin: 0 !important;
  padding: 18px 16px 20px !important;
  background: #fff;
  border-radius: 0 0 8px 8px;
  filter: none !important;
  -webkit-filter: none !important;
}
/* Override pseudo-elements that create the shaped background */
#instr-sec .instr-card .box-content::before,
#instr-sec .instr-card .box-content::after {
  display: none !important;
}
/* Hover: keep text readable — dark colour, light bg */
#instr-sec .instr-card:hover .box-content {
  background: var(--smoke-color2);
}
#instr-sec .instr-card:hover .box-title a {
  color: var(--title-color) !important;
}
#instr-sec .instr-card:hover .instr-desig {
  color: #506172 !important;
}
/* Arrow icon: keep dark on hover */
#instr-sec .instr-card:hover .card-icon {
  background-color: var(--theme-color) !important;
  border-color: var(--theme-color) !important;
}
#instr-sec .instr-card:hover .card-icon img {
  filter: brightness(0) invert(1);
}

/* ------------------------------------------
   FIX: Follow Us — no box artefacts around links
   ------------------------------------------ */
.rpgi-social-list {
  list-style: none;
  padding: 0;
  margin: 0;
}
.rpgi-social-list li {
  margin-bottom: 13px;
}
.rpgi-social-list li:last-child {
  margin-bottom: 0;
}
.rpgi-social-list a {
  display: flex !important;
  align-items: center;
  gap: 12px;
  color: var(--body-color);
  font-size: 15px;
  text-decoration: none;
  transition: color 0.3s;
  /* Override any .th-social a width/height/border */
  width: auto !important;
  height: auto !important;
  border: none !important;
  background: none !important;
  border-radius: 0 !important;
  line-height: 1.5 !important;
  font-weight: 500;
}
.rpgi-social-list a:hover {
  color: var(--theme-color) !important;
  background: none !important;
}
.rpgi-social-list .icon {
  width: 34px;
  height: 34px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: rgba(255, 255, 255, 0.12);
  border-radius: 50%;
  font-size: 14px;
  flex-shrink: 0;
  transition: background 0.3s;
}
.rpgi-social-list a:hover .icon {
  background: var(--theme-color);
  color: #fff;
}
/* In sidemenu (light background) */
.sidemenu-wrapper .rpgi-social-list a {
  color: var(--title-color);
}
.sidemenu-wrapper .rpgi-social-list .icon {
  background: var(--smoke-color);
}
.sidemenu-wrapper .rpgi-social-list a:hover {
  color: var(--theme-color) !important;
}
