/* ==========================================================================
   home.css : hero, statistics, news ticker, welcome, platforms,
   faculties, activities carousel, international rankings
   ========================================================================== */

/* -------------------------------- hero ---------------------------------- */
.hero {
  position: relative;
  background: #e7e3e2;
  display: block;
}
.hero img {
  width: 100%;
  height: 400px;
  object-fit: cover;
  object-position: center;
}
.hero::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(to bottom, rgba(0, 0, 0, .05), rgba(0, 0, 0, .18));
  pointer-events: none;
}

/* ------------------------------ statistics ------------------------------ */
.stats {
  position: relative;
  z-index: 5;
  margin-top: -55px;
  padding-bottom: 26px;
}
.stats__grid {
  max-width: var(--container-narrow);
  margin-inline: auto;
  background: #fff;
  border-radius: 6px;
  box-shadow: 0 6px 34px rgba(0, 0, 0, .1);
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 18px;
  padding: 34px 18px;
}
.stat { text-align: center; }
.stat__icon {
  width: 94px;
  height: 94px;
  margin: 0 auto 20px;
  border-radius: 50%;
  background: var(--gold-2);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 42px;
}
.stat__num {
  font-family: var(--font-accent);
  font-size: 28px;
  font-weight: 700;
  color: #333;
  margin-bottom: 10px;
  line-height: 1;
}
.stat__label {
  font-family: var(--font-accent);
  font-size: 17px;
  color: var(--muted);
  line-height: 1.45;
}

/* ------------------------------ news ticker ----------------------------- */
.ticker-section { padding: 26px 0 0; }
.ticker {
  display: flex;
  align-items: stretch;
  height: 42px;
  background: var(--gray-ticker);
  border-radius: 4px;
  overflow: hidden;
}
.ticker__label {
  position: relative;
  flex: none;
  display: flex;
  align-items: center;
  padding: 0 20px;
  margin-inline-end: 12px;
  background: var(--gold-2);
  color: #fff;
  font-size: 14px;
  font-weight: 700;
}
.ticker__label::after {
  content: "";
  position: absolute;
  top: 0;
  inset-inline-end: -12px;
  width: 0;
  height: 0;
  border-block: 21px solid transparent;
  border-inline-start: 12px solid var(--gold-2);
}
.ticker__viewport {
  position: relative;
  flex: 1;
  overflow: hidden;
}
.ticker__item {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  padding-inline: 22px;
  font-family: var(--font-body);
  font-size: 15px;
  font-weight: 600;
  color: #000;
  opacity: 0;
  overflow: hidden;
  transform: translateY(100%);
  transition: transform .5s ease, opacity .5s ease;
}
.ticker__item a {
  display: block;
  max-width: 100%;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.ticker__item.is-active { opacity: 1; transform: none; }
.ticker__item.is-out { opacity: 0; transform: translateY(-100%); }
.ticker__item a { color: #000; }
.ticker__item a:hover { color: var(--green); }
.ticker__more {
  display: flex;
  justify-content: flex-start;
  margin-top: 14px;
}

/* ------------------------- welcome + platforms -------------------------- */
.welcome { padding: 42px 0 50px; }
.welcome__grid {
  display: grid;
  grid-template-columns: 1fr 1.08fr;
  gap: 44px;
  align-items: start;
}

/* dean / director card */
.dean {
  position: relative;
  border-radius: 6px;
  overflow: hidden;
  box-shadow: 0 6px 24px rgba(0, 0, 0, .1);
}
.dean__media { overflow: hidden; }
.dean__media img {
  width: 100%;
  height: 355px;
  object-fit: cover;
  object-position: top center;
  transition: transform .55s ease;
}
.dean:hover .dean__media img { transform: scale(1.06); }
.dean__body {
  position: absolute;
  inset-inline: 5%;
  bottom: 10px;
  height: 87px;
  overflow: hidden;
  background: var(--gold);
  color: var(--light);
  padding: 16px 20px;
  box-shadow: var(--shadow);
  transition: height .4s ease;
}
.dean:hover .dean__body { height: 190px; }
.dean__title {
  font-family: var(--font-accent);
  font-size: 20px;
  font-weight: 700;
  color: var(--light);
  margin: 0;
  line-height: 1.4;
}
.dean__text {
  font-family: var(--font-accent);
  font-size: 14px;
  color: var(--light);
  margin: 12px 0 0;
  line-height: 1.8;
}

/* platforms */
.platforms__head {
  font-family: var(--font-accent);
  font-size: 24px;
  color: var(--dark);
  margin: 0 0 22px;
  display: flex;
  align-items: center;
  gap: 12px;
}
.platforms__head::before {
  content: "";
  width: 5px;
  height: 36px;
  background: var(--green-2);
  border-radius: 2px;
  flex: none;
}
.platforms__grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
}
.pbox {
  position: relative;
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 15px 16px;
  border: 1px solid var(--border-soft);
  border-radius: var(--radius);
  background: #fff;
  overflow: hidden;
  min-height: 64px;
}
.pbox::before {
  content: "";
  position: absolute;
  inset: 0;
  background: var(--green-2);
  transform: scaleX(0);
  transform-origin: left center;
  transition: transform .35s ease;
  z-index: 0;
}
[dir="rtl"] .pbox::before { transform-origin: right center; }
.pbox:hover::before { transform: scaleX(1); }
.pbox .ico {
  font-size: 30px;
  color: var(--link-blue);
  flex: none;
  position: relative;
  z-index: 1;
  transition: color .3s ease;
}
.pbox span {
  position: relative;
  z-index: 1;
  font-size: 14px;
  font-weight: 600;
  letter-spacing: -.5px;
  color: var(--link-blue);
  line-height: 1.4;
  transition: color .3s ease;
}
.pbox:hover .ico,
.pbox:hover span { color: #fff; }

/* ------------------------------ faculties ------------------------------- */
.faculties { padding: 20px 0 54px; }
.faculties__grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 16px;
}
.fcard {
  position: relative;
  display: block;
  border-radius: 6px;
  overflow: hidden;
  box-shadow: 0 3px 14px rgba(0, 0, 0, .08);
}
.fcard img {
  width: 100%;
  height: 175px;
  object-fit: cover;
  transition: transform .5s ease;
}
.fcard:hover img { transform: scale(1.1); }
.fcard__title {
  position: absolute;
  inset-inline: 0;
  bottom: 0;
  margin: 0;
  padding: 22px 10px 12px;
  background: linear-gradient(to top, rgba(0, 0, 0, .78), rgba(0, 0, 0, 0));
  color: #fff;
  font-family: var(--font-accent);
  font-size: 16px;
  font-weight: 700;
  text-align: center;
  line-height: 1.35;
  transition: background .35s ease;
}
.fcard:hover .fcard__title {
  background: linear-gradient(to top, rgba(192, 150, 90, .95), rgba(192, 150, 90, .25));
}

/* ------------------------------ activities ------------------------------ */
.activities { padding: 20px 0 54px; }
.carousel { position: relative; }
.carousel__viewport { overflow: hidden; padding: 6px; }
.carousel__track {
  display: flex;
  gap: 24px;
  transition: transform .45s ease;
}
.acard {
  flex: 0 0 calc((100% - 48px) / 3);
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 6px;
  overflow: hidden;
  transition: box-shadow .3s ease, transform .3s ease;
}
.acard:hover { box-shadow: 0 12px 30px rgba(0, 0, 0, .1); transform: translateY(-4px); }
.acard__media { display: block; overflow: hidden; }
.acard__media img { width: 100%; height: 195px; object-fit: cover; transition: transform .5s ease; }
.acard:hover .acard__media img { transform: scale(1.08); }
.acard__body { padding: 16px 18px 20px; }
.acard__meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  font-size: 12px;
  font-weight: 700;
  color: var(--gold-dark);
  margin-bottom: 10px;
}
.acard__meta .cat { color: var(--green); }
.acard__title {
  font-family: var(--font-accent);
  font-size: 17px;
  line-height: 1.55;
  color: var(--dark);
  margin: 0 0 12px;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
  min-height: 79px;
}
.acard__more { font-size: 13px; font-weight: 700; color: var(--green); }
.acard__more:hover { color: var(--gold-dark); }

.carousel__nav {
  position: absolute;
  top: 42%;
  width: 42px;
  height: 42px;
  border-radius: 50%;
  background: #fff;
  color: var(--dark);
  box-shadow: 0 4px 16px rgba(0, 0, 0, .16);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 4;
  transition: background .25s ease, color .25s ease;
}
.carousel__nav:hover { background: var(--gold-2); color: #fff; }
.carousel__nav--prev { inset-inline-start: -12px; }
.carousel__nav--next { inset-inline-end: -12px; }
.carousel__dots {
  display: flex;
  justify-content: center;
  gap: 8px;
  margin-top: 26px;
}
.carousel__dots button {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: #d5d5d5;
  transition: background .25s ease, transform .25s ease;
}
.carousel__dots button.is-active { background: var(--gold-2); transform: scale(1.25); }

/* ------------------------------ rankings -------------------------------- */
.rankings { background: var(--gray); padding: 54px 0 60px; }
.rankings__grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 20px;
}
.rcard {
  background: none;
  border: 0;
  padding: 0;
  text-align: center;
  cursor: pointer;
}
.rcard__circle {
  width: 132px;
  height: 132px;
  margin: 0 auto 16px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 4px 18px rgba(0, 0, 0, .08);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  transition: transform .3s ease, box-shadow .3s ease;
}
.rcard__circle img { max-width: 76%; max-height: 76%; object-fit: contain; }
.rcard:hover .rcard__circle { transform: translateY(-7px); box-shadow: 0 12px 26px rgba(0, 0, 0, .15); }
.rcard__title {
  font-family: var(--font-body);
  font-size: 13px;
  font-weight: 600;
  color: var(--dark);
  line-height: 1.55;
  display: block;
}
.rcard:hover .rcard__title { color: var(--green); }

/* ranking modal body */
.ranking-modal__title {
  font-family: var(--font-accent);
  font-size: 22px;
  color: var(--dark);
  margin: 0 0 12px;
}
.ranking-modal__body { font-size: 15px; line-height: 1.9; color: var(--text); }
.ranking-modal__badge {
  width: 120px; height: 120px; border-radius: 50%; background: var(--gray);
  display: flex; align-items: center; justify-content: center; margin: 0 auto 18px;
}
.ranking-modal__badge img { max-width: 74%; max-height: 74%; object-fit: contain; }

/* ---------------- custom blocks (edited from the Customizer) ------------- */
.ue-custom { padding: 54px 0; }
.ue-custom--bg-gray { background: var(--gray); }
.ue-custom--bg-green { background: var(--green); color: var(--white); }
.ue-custom--bg-green .ue-custom__title { color: var(--white); }
.ue-custom__inner { display: flex; align-items: center; gap: 40px; }
.ue-custom--image-end .ue-custom__inner { flex-direction: row-reverse; }
.ue-custom__media { flex: 0 0 45%; max-width: 45%; }
.ue-custom__media img { display: block; width: 100%; height: auto; border-radius: var(--radius); }
.ue-custom__body { flex: 1; min-width: 0; }
.ue-custom__title {
  font-family: var(--font-accent);
  font-size: 30px;
  font-weight: 700;
  color: var(--heading);
  margin: 0 0 12px;
}
.ue-custom__text { margin: 0 0 20px; }
.ue-custom__text p { margin: 0 0 12px; }
.ue-custom--centered .ue-custom__inner { flex-direction: column; text-align: center; }
.ue-custom--centered .ue-custom__media { flex-basis: auto; max-width: 720px; }
.ue-custom--no-image .ue-custom__inner { justify-content: center; text-align: center; }
@media (max-width: 768px) {
  .ue-custom { padding: 36px 0; }
  .ue-custom__inner { flex-direction: column !important; gap: 24px; }
  .ue-custom__media { flex-basis: auto; max-width: 100%; }
  .ue-custom__title { font-size: 24px; }
}

/* statistics: icon uploaded from the media library */
.stat__icon img { width: 52px; height: 52px; object-fit: contain; }
