/* ======================================================
   PREMIUM: Opportunities Category (Scoped)
   Works with wrapper: .yh-oppcat-page
====================================================== */

/* ---------- Layout / page spacing ---------- */
.yh-oppcat-page .yh-oppcat-hero{
  padding: 24px 0 18px;
}

.yh-oppcat-page .yh-oppcat-hero-card{
  padding: 18px 18px;
  border-radius: 18px;
  overflow: hidden;
}

.yh-oppcat-page .yh-oppcat-hero-top{
  display:flex;
  align-items:flex-end;
  justify-content:space-between;
  gap: 14px;
  flex-wrap: wrap;
}

.yh-oppcat-page .yh-oppcat-hero-title h2{
  margin:0;
  font-size: 26px;
  font-weight: 900;
  letter-spacing: -0.2px;
}

.yh-oppcat-page .yh-oppcat-hero-sub{
  margin-top: 6px;
  color: var(--gray);
  font-weight: 600;
}

/* ---------- Tabs: single row scroll ---------- */
.yh-oppcat-page .yh-oppcat-tabs{
  margin-top: 14px;
  display:flex;
  gap: 10px;
  overflow-x: auto;
  padding-bottom: 6px;
  -webkit-overflow-scrolling: touch;
  scroll-snap-type: x mandatory;
}

.yh-oppcat-page .yh-oppcat-tabs::-webkit-scrollbar{ height: 6px; }
.yh-oppcat-page .yh-oppcat-tabs::-webkit-scrollbar-thumb{
  background: rgba(2,6,23,.12);
  border-radius: 999px;
}

.yh-oppcat-page .yh-oppcat-tab{
  flex: 0 0 auto;
  scroll-snap-align: start;

  display:flex;
  align-items:center;
  justify-content:center;
  gap: 10px;

  padding: 11px 14px;
  border-radius: 999px;
  border: 1px solid var(--gray-light);
  background: #fff;
  color: var(--dark-color);
  text-decoration:none;
  font-weight: 800;
  line-height: 1;

  transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease;
  white-space: nowrap;
}

.yh-oppcat-page .yh-oppcat-tab i{
  color: var(--primary-color);
}

.yh-oppcat-page .yh-oppcat-tab:hover{
  transform: translateY(-2px);
  box-shadow: 0 10px 26px rgba(2,6,23,.08);
}

.yh-oppcat-page .yh-oppcat-tab.is-active{
  border-color: rgba(59,130,246,.55);
  box-shadow: 0 0 0 4px rgba(59,130,246,.12);
}

/* ---------- Filter row ---------- */
.yh-oppcat-page .yh-oppcat-filter{
  margin-top: 12px;
  display:flex;
  align-items:center;
  gap: 12px;
  flex-wrap: wrap;
}

.yh-oppcat-page .yh-oppcat-filter-label{
  display:flex;
  align-items:center;
  gap: 10px;
  font-weight: 900;
  color: var(--dark-color);
}

.yh-oppcat-page .yh-oppcat-select{
  min-width: 260px;
  max-width: 100%;

  border: 1px solid var(--gray-light);
  background: #fff;
  border-radius: 12px;
  padding: 10px 12px;

  font-weight: 700;
  color: var(--dark-color);
  outline: none;
}

.yh-oppcat-page .yh-oppcat-select:focus{
  border-color: rgba(59,130,246,.55);
  box-shadow: 0 0 0 4px rgba(59,130,246,.12);
}

/* ---------- Main / grid: single column full width ---------- */
.yh-oppcat-page .yh-oppcat-main{
  padding: 0 0 34px;
}

.yh-oppcat-page .yh-oppcat-grid{
  margin-top: 16px;

  display:grid !important;
  grid-template-columns: 1fr !important;
  gap: 16px !important;

  width: 100% !important;
  max-width: 100% !important;
}

/* ---------- Card premium look ---------- */
.yh-oppcat-page .yh-oppcard{
  width: 100% !important;
  max-width: 100% !important;
  border-radius: 18px;
  overflow: hidden;
}

/* header strip */
.yh-oppcat-page .yh-oppcard-head{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap: 12px;

  padding: 14px 14px;
  border-bottom: 1px solid rgba(2,6,23,.06);
}

/* category header color variants (light gradients) */
.yh-oppcat-page .opportunity-header.grant{
  background: linear-gradient(135deg, rgba(59,130,246,.12), rgba(59,130,246,.04));
}
.yh-oppcat-page .opportunity-header.exchange{
  background: linear-gradient(135deg, rgba(6,182,212,.12), rgba(6,182,212,.04));
}
.yh-oppcat-page .opportunity-header.internship{
  background: linear-gradient(135deg, rgba(16,185,129,.12), rgba(16,185,129,.04));
}
.yh-oppcat-page .opportunity-header.olympiad{
  background: linear-gradient(135deg, rgba(245,158,11,.14), rgba(245,158,11,.05));
}
.yh-oppcat-page .opportunity-header.volunteer{
  background: linear-gradient(135deg, rgba(239,68,68,.12), rgba(239,68,68,.04));
}
.yh-oppcat-page .opportunity-header.university{
  background: linear-gradient(135deg, rgba(139,92,246,.14), rgba(139,92,246,.05));
}

.yh-oppcat-page .yh-oppcard-type{
  display:flex;
  align-items:center;
  gap: 10px;

  font-weight: 900;
  color: var(--dark-color);
}

.yh-oppcat-page .yh-oppcard-type i{
  color: var(--primary-color);
}

/* save button */
.yh-oppcat-page .yh-oppcard-save{
  width: 42px;
  height: 42px;
  border-radius: 14px;
  border: 1px solid rgba(2,6,23,.10);
  background: rgba(255,255,255,.7);
  display:flex;
  align-items:center;
  justify-content:center;
  cursor:pointer;

  transition: transform .15s ease, box-shadow .15s ease;
}

.yh-oppcat-page .yh-oppcard-save:hover{
  transform: translateY(-1px);
  box-shadow: 0 10px 18px rgba(2,6,23,.10);
}

.yh-oppcat-page .yh-oppcard-save i{
  color: #ef4444;
  font-size: 18px;
}

/* body */
.yh-oppcat-page .yh-oppcard-body{
  padding: 16px 16px 12px;
}

.yh-oppcat-page .yh-oppcard-title{
  margin: 0 0 8px;
  font-size: 18px;
  font-weight: 950;
  letter-spacing: -0.2px;
  color: var(--dark-color);
}

.yh-oppcat-page .yh-oppcard-desc{
  margin: 0 0 12px;
  color: var(--gray);
  line-height: 1.55;

  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* meta grid (4 items) */
.yh-oppcat-page .yh-oppcard-meta{
  display:grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px 12px;
  padding-top: 4px;
}

.yh-oppcat-page .yh-oppcard-meta .detail{
  display:flex;
  align-items:flex-start;
  gap: 10px;
  color: var(--dark-color);
  font-weight: 700;
  min-width: 0;
}

.yh-oppcat-page .yh-oppcard-meta .detail i{
  color: var(--primary-color);
  margin-top: 2px;
  width: 18px;
  text-align:center;
}

.yh-oppcat-page .yh-oppcard-meta .detail span{
  color: rgba(15,23,42,.88);
  font-weight: 700;
  overflow:hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* tags */
.yh-oppcat-page .yh-oppcard-tags{
  margin-top: 12px;
  display:flex;
  gap: 8px;
  flex-wrap: wrap;
}

.yh-oppcat-page .yh-oppcard-tags .tag{
  display:inline-flex;
  align-items:center;
  padding: 6px 10px;
  border-radius: 999px;

  background: rgba(2,6,23,.04);
  border: 1px solid rgba(2,6,23,.08);
  color: rgba(15,23,42,.88);

  font-weight: 800;
  font-size: 12px;
}

/* footer */
.yh-oppcat-page .yh-oppcard-foot{
  padding: 12px 16px 16px;
  border-top: 1px solid rgba(2,6,23,.06);

  display:flex;
  align-items:center;
  justify-content:space-between;
  gap: 12px;
  flex-wrap: wrap;
}

.yh-oppcat-page .yh-oppcard-match{
  display:flex;
  align-items:center;
  gap: 8px;
  font-weight: 900;
  color: rgba(15,23,42,.90);
}

.yh-oppcat-page .yh-oppcard-match i{
  color: #f59e0b;
}

/* CTAs */
.yh-oppcat-page .yh-oppcard-ctas{
  display:flex;
  gap: 10px;
  flex-wrap: wrap;
  justify-content:flex-end;
}

.yh-oppcat-page .yh-oppcard-details{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  gap: 8px;

  padding: 10px 14px;
  border-radius: 12px;
  border: 1px solid rgba(2,6,23,.10);
  background: #fff;

  font-weight: 900;
  color: var(--dark-color);
  text-decoration:none;
}

.yh-oppcat-page .yh-oppcard-details:hover{
  background: rgba(2,6,23,.03);
}

.yh-oppcat-page .yh-oppcard-apply{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  gap: 8px;

  padding: 10px 16px;
  border-radius: 12px;
  border: none;
  background: var(--primary-color);
  color: #fff;

  font-weight: 950;
  cursor:pointer;
}

.yh-oppcat-page .yh-oppcard-apply:hover{
  background: var(--primary-dark);
}

/* empty */
.yh-oppcat-page .yh-oppcat-empty{
  padding: 16px;
  color: var(--gray);
  font-weight: 800;
}

/* load more */
.yh-oppcat-page .yh-oppcat-more{
  margin-top: 18px;
  display:flex;
  flex-direction:column;
  align-items:center;
  gap: 10px;
}

.yh-oppcat-page .yh-oppcat-more .btn-load-more{
  text-decoration:none;
  display:inline-flex;
  align-items:center;
  gap: 10px;

  padding: 12px 18px;
  border-radius: 999px;
  border: 2px solid rgba(59,130,246,.55);
  background: #fff;
  color: var(--primary-color);
  font-weight: 950;
}

.yh-oppcat-page .yh-oppcat-more .btn-load-more:hover{
  background: var(--primary-color);
  color: #fff;
}

/* ---------- Responsive ---------- */
@media (max-width: 768px){
  .yh-oppcat-page .yh-oppcat-hero-card{
    padding: 16px 14px;
    border-radius: 16px;
  }

  .yh-oppcat-page .yh-oppcat-hero-title h2{
    font-size: 22px;
  }

  .yh-oppcat-page .yh-oppcat-select{
    width: 100%;
    min-width: 0;
  }

  .yh-oppcat-page .yh-oppcard-meta{
    grid-template-columns: 1fr;
  }

  .yh-oppcat-page .yh-oppcard-ctas{
    width: 100%;
    justify-content: stretch;
  }

  .yh-oppcat-page .yh-oppcard-details,
  .yh-oppcat-page .yh-oppcard-apply{
    flex: 1 1 auto;
  }
}

/* ======================================================
   FALLBACK OVERRIDE (if old layout leaks)
   Keep it at the end
====================================================== */

#oppsGrid{
  width: 100% !important;
  max-width: 100% !important;
}

#oppsGrid.opportunities-grid-view,
#oppsGrid.opportunities-grid-view.yh-list-2col{
  display: grid !important;
  grid-template-columns: 1fr !important;
}