/* === SECTION === */
body.dosen-page .team {
  background: linear-gradient(180deg, #f2f4f7, #e5e8ec);
  padding-bottom: 60px;
}

/* === CARD === */
body.dosen-page .profile-card {
  position: relative;
  width: 100%;
  aspect-ratio: 3 / 4;  /* 🔹 tinggi otomatis 4:3 dari lebar */
  border-radius: 15px;
  overflow: hidden;
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  cursor: pointer;
  transition: all 0.4s ease;
  box-shadow: 0 8px 25px rgba(0,0,0,0.15);
}

body.dosen-page .profile-card:hover {
  transform: translateY(-6px) scale(1.02);
  box-shadow: 0 15px 35px rgba(0,0,0,0.25);
}

/* === OVERLAY INFO === */
body.dosen-page .overlay-info {
  position: absolute;
  bottom: 0;
  width: 100%;
  padding: 18px;
  color: #fff;
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  background: rgba(0, 0, 0, 0.35);
  text-align: center;
}

body.dosen-page .overlay-info h4 {
  font-weight: 600;
  font-size: 1.1rem;
  margin-bottom: 4px;
}

/* ✨ Garis biasa + teks glowing */
body.dosen-page .overlay-info .specialist {
  font-size: 0.9rem;
  color: #e6a417; /* warna dasar */
  font-weight: 500;
  margin-top: 8px;
  padding-top: 6px;
  border-top: 1px solid rgba(255,255,255,0.3);
  text-shadow:
    0 0 1px #e6a417,
    0 0 2px #e6a417,
    0 0 4px #e6a417;  /* efek glow di teks */
  transition: all 0.3s ease;
}

/* 🟡 Glow makin terang saat hover */
body.dosen-page .profile-card:hover .specialist {
  color: #ffd35c; /* warna sedikit lebih terang */
  text-shadow:
    0 0 2px #ffd35c,
    0 0 4px #ffd35c,
    0 0 8px #ffd35c,
    0 0 8px #ffd35c;
}

/* Pastikan parent .profile-card bisa jadi acuan posisi */
.profile-card {
  position: relative;
  overflow: hidden;
}

/* Posisikan ikon di kanan atas */
body.dosen-page .social {
  position: absolute;
  top: 10px;
  right: 10px;
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  z-index: 5; /* biar di atas background */
}

/* Styling ikon agar tetap bulat dan rapi */
body.dosen-page .social a {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.25);
  transition: all 0.3s ease;
  backdrop-filter: blur(4px); /* efek kaca lembut (opsional) */
}

body.dosen-page .social a:hover {
  background: #e6a417; /* warna hover sesuai tema */
  transform: scale(1.1);
}

body.dosen-page .social img {
  width: 20px;
  height: 20px;
  object-fit: contain;
}

/* === GRID MENGIKUTI BENTUK FULL === */
/* .row {
  display: flex;
  flex-wrap: wrap;
  gap: 20px;
} */

/* ubah jadi khusus halaman dosen */
body.dosen-page .row {
  display: flex;
  flex-wrap: wrap;
  gap: 20px;
}

body.dosen-page .team .row {
  display: flex;
  flex-wrap: wrap;
  gap: 20px;
}


body.dosen-page .col-lg-4 {
  flex: 1 1 calc(33.333% - 20px);
  display: flex;
  justify-content: center;
}

@media (max-width: 992px) {
  body.dosen-page .col-lg-4 {
    flex: 1 1 calc(50% - 20px);
  }
}
@media (max-width: 576px) {
  body.dosen-page .col-lg-4 {
    flex: 1 1 100%;
  }
}

/* === ANIMATIONS === */
@keyframes fadeBackdrop {
  from {background: rgba(0,0,0,0);}
  to {background: rgba(0,0,0,0.6);}
}

@keyframes popupAppear {
  from {
    opacity: 0;
    transform: translateY(30px) scale(0.95);
    filter: blur(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
    filter: blur(0);
  }
}

/* === POPUP CONTENT === */
body.dosen-page .close-btn {
  float: right;
  font-size: 28px;
  cursor: pointer;
  color: #777;
  transition: color 0.2s ease;
}

body.dosen-page .close-btn:hover {
  color: #000;
}

body.dosen-page .modal-body {
  text-align: center;
}

body.dosen-page .modal-body img {
  width: 120px;
  height: 120px;
  border-radius: 50%;
  object-fit: cover;
  margin-bottom: 15px;
  border: 2px solid #eee;
}

body.dosen-page .modal-body h3 {
  margin-bottom: 5px;
  color: #222;
  font-weight: 600;
}

body.dosen-page .modal-body p {
  font-size: 0.9rem;
  color: #444;
  line-height: 1.5;
}

body.dosen-page .modal-body a {
  color: #ff9f43;
  text-decoration: none;
}

/* ketika popup aktif */
body.dosen-page .modal.show {
  background: rgba(0, 0, 0, 0.6);
  opacity: 1;
}

/* === POPUP === */
body.dosen-page .modal {
  display: none;
  position: fixed;
  z-index: 999;
  padding-top: 100px;
  left: 0; top: 0;
  width: 100%; height: 100%;
  background: rgba(0,0,0,0.6);
  animation: fadeBackdrop 0.3s ease;
}

body.dosen-page .white-popup {
  background: #fff;
  border-radius: 16px;
  padding: 15px;
  width: 90%;
  max-width: 800px;
  margin: auto;
  color: #333;
  box-shadow: 0 10px 40px rgba(0,0,0,0.25);
  transform: translateY(30px) scale(0.95);
  filter: blur(10px);
  opacity: 0;
  transition: all 0.4s ease;
}

body.dosen-page .modal.show .white-popup {
  opacity: 1;
  transform: translateY(5px) scale(1) !important;
  filter: blur(0);
}

/* === POPUP MODAL === */
body.dosen-page .modal {
  display: none;
  position: fixed;
  z-index: 999;
  padding-top: 80px;
  left: 0; top: 0;
  width: 100%; height: 100%;
  background: rgba(0, 0, 0, 0.6);
  opacity: 0;
  transition: opacity 0.3s ease;
  transition: background 0.3s ease, opacity 0.3s ease;
}


/* === FLEX LAYOUT FOTO KIRI / DATA KANAN === */
body.dosen-page .popup-flex {
  display: flex;
  flex-direction: column; /* default: foto di atas (untuk HP/tablet) */
  align-items: flex-start;
  gap: 20px;
  flex-direction: row;
}

/* === FOTO === */
body.dosen-page .popup-photo {
  flex: 1 1 35%;
  display: flex;
  justify-content: center;
  align-items: flex-start;
}

body.dosen-page .popup-photo img {
  width: 100%;
  height: auto;
  border-radius: 12px;
  object-fit: cover; /* menjaga rasio asli */
  border: 1px solid #ddd;
  background: #fafafa;
}

/* === DATA === */
body.dosen-page .popup-data {
  flex: 1 1 60%;
  text-align: left;
}

body.dosen-page .popup-data h3 {
  margin-bottom: 5px;
  color: #222;
  font-weight: 600;
  font-size: 1.2rem;
}

body.dosen-page .popup-data .position {
  font-weight: 600;
  color: #e6a417;
  margin-bottom: 8px;
  font-size: 1rem;
}

body.dosen-page .popup-data p {
  margin-bottom: 8px;
  font-size: 0.95rem;
  color: #333;
  line-height: 1.4;
}

body.dosen-page .popup-data a {
  color: #ff9f43;
  text-decoration: none;
}

@media (max-width: 992px) {
  body.dosen-page .popup-flex {
  display: flex;
  align-items: flex-start;
  gap: 30px;
  flex-wrap: wrap;
  width: 300px;
}

body.dosen-page .white-popup {
  background: #fff;
  border-radius: 20px;
  padding: 30px;
  width: 90%;
  max-width: 500px;
  margin: auto;
  color: #333;
  box-shadow: 0 10px 40px rgba(0,0,0,0.25);
  transform: translateY(30px) scale(0.95);
  filter: blur(10px);
  opacity: 0;
  transition: all 0.4s ease;
}

/* === FOTO === */
body.dosen-page .popup-photo {
  flex: 1 1 35%;
  display: flex;
  justify-content: center;
  align-items: flex-start;
}

body.dosen-page .popup-photo {
  flex: 1 1 50%;
  width: 75%;
  height: auto;
  border-radius: 12px;
  object-fit: contain; /* menjaga rasio asli */
  border: 1px solid #ddd;
  background: #fafafa;
}


/* === DATA === */
body.dosen-page .popup-data {
  flex: 1 1 40%;
  text-align: left;
}

body.dosen-page .popup-data h3 {
  margin-bottom: 5px;
  color: #222;
  font-weight: 400;
}

body.dosen-page .popup-data .position {
  font-style: italic;
  color: #666;
  margin-bottom: 10px;
}

body.dosen-page .popup-data p {
  margin-bottom: 8px;
  font-size: 0.95rem;
  color: #333;
  line-height: 1.4;
}

body.dosen-page .popup-data a {
  color: #ff9f43;
  text-decoration: none;
}
}

@media (max-width: 768px) {
/* === FOTO === */
body.dosen-page .popup-photo {
  flex: 1 1 35%;
  display: flex;
  justify-content: center;
  align-items: flex-start;
}

body.dosen-page .popup-photo img {
  width: 100%;
  height: auto;
  border-radius: 12px;
  object-fit: contain; /* menjaga rasio asli */
  border: 1px solid #ddd;
  background: #fafafa;
}

/* === DATA === */
body.dosen-page .popup-data {
  flex: 1 1 60%;
  text-align: left;
}

body.dosen-page .popup-data h3 {
  margin-bottom: 5px;
  color: #222;
  font-weight: 600;
}

body.dosen-page .popup-data .position {
  font-style: italic;
  color: #ff9f43;
  margin-bottom: 10px;
  font-size: 0.6rem;
}

body.dosen-page .popup-data .name {
  font-size: 0.5rem;
}

body.dosen-page .popup-data p {
  margin-bottom: 8px;
  font-size: 0.6rem;
  color: #333;
  line-height: 1.4;
}

body.dosen-page .popup-data a {
  color: #ff9f43;
  text-decoration: none;
}
}

/* === CLOSE BUTTON === */
body.dosen-page .close-btn {
  position: absolute;
  top: 12px;               /* jarak dari atas modal */
  right: 12px;             /* jarak dari kanan modal */
  width: 34px;             /* ukuran tombol */
  height: 34px;
  line-height: 34px;       /* biar tanda × pas di tengah */
  border-radius: 50%;      /* efek bulat */
  background: rgba(230, 230, 230, 0.9); /* warna dasar */
  color: #444;             /* warna icon × */
  font-size: 22px;
  font-weight: bold;
  text-align: center;
  cursor: pointer;
  transition: all 0.25s ease;
  z-index: 10;
  box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

/* 🔸 Efek hover */
body.dosen-page .close-btn:hover {
  background: #e6a417;    /* warna oranye sesuai tema kamu */
  color: #fff;
  transform: scale(1.1);  /* efek sedikit membesar */
}


/* === RESPONSIVE === */
@media (max-width: 768px) {
  body.dosen-page .popup-flex {
    flex-direction: column;
  }
  body.dosen-page .popup-photo, .popup-data {
    flex: 1 1 50%;
  }
}

/* --- top-right social icons on card (only in dosen-page) --- */
body.dosen-page .profile-card {
  position: relative;
  overflow: hidden;
}

/* container */
body.dosen-page .profile-card .top-social {
  position: absolute;
  top: 12px;
  right: 12px;
  display: flex;
  gap: 8px;
  z-index: 12; /* di atas overlay-info */
}

/* anchor wrapper */
body.dosen-page .profile-card .top-social a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  padding: 4px;
  border-radius: 8px;
  background: rgba(0,0,0,0.45);
  border: 1px solid rgba(255,255,255,0.08);
  text-decoration: none;
  transition: transform .12s ease, background .12s ease;
  box-shadow: 0 4px 10px rgba(0,0,0,0.18);
}

/* hover */
body.dosen-page .profile-card .top-social a:hover {
  transform: translateY(-3px);
  background: rgba(0,0,0,0.6);
}

/* icon (font icon) */
body.dosen-page .profile-card .top-social i {
  color: #fff;
  font-size: 18px;
  line-height: 1;
}

/* img icons (sinta/gschoolar) */
body.dosen-page .profile-card .top-social img {
  width: 18px;
  height: 18px;
  object-fit: contain;
  display: block;
  filter: brightness(1) invert(0); /* tweak jika perlu */
}

/* small accessible-only text */
body.dosen-page .profile-card .top-social .sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0,0,0,0);
  white-space: nowrap;
  border: 0;
}


body.dosen-page .profile-card .top-social {
  position: absolute;
  top: 12px;
  right: 12px;
  display: flex;
  gap: 8px;
  z-index: 10;
}

body.dosen-page .profile-card .top-social a {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  border-radius: 8px;
  background: rgba(0, 0, 0, 0.45);
  backdrop-filter: blur(6px);
  border: 1px solid rgba(255, 255, 255, 0.1);
  transition: all 0.25s ease;
}

body.dosen-page .profile-card .top-social a:hover {
  transform: translateY(-2px);
  background: rgba(0, 0, 0, 0.65);
}

body.dosen-page .profile-card .top-social i {
  color: #fff;
  font-size: 1.4rem;
}

body.dosen-page .profile-card .top-social img {
  width: 22px;
  height: 22px;
  object-fit: contain;
}

/* === FIX: kalau cuma 1 atau 2 card, tetap center === */
body.dosen-page .row {
  display: flex;
  flex-wrap: wrap;
  justify-content: center; /* semua card rata tengah */
  gap: 20px;
}

body.dosen-page .col-lg-4 {
  flex: 0 0 calc(33.333% - 20px); /* jangan biarkan flex: 1 1... karena bisa melebar */
  max-width: calc(33.333% - 20px);
  display: flex;
  justify-content: center;
}

body.dosen-page .profile-card {
  width: 100%;
  max-width: 350px; /* biar tidak terlalu lebar kalau cuma 1 card */
}

/* responsive */
@media (max-width: 992px) {
  body.dosen-page .col-lg-4 {
    flex: 0 0 calc(50% - 20px);
    max-width: calc(50% - 20px);
  }
}
@media (max-width: 576px) {
  body.dosen-page .col-lg-4 {
    flex: 0 0 100%;
    max-width: 100%;
  }
}

body.dosen-page .row {
  display: flex !important;
  flex-wrap: wrap !important;
  justify-content: center !important;
  gap: 20px !important;
}

body.dosen-page .col-lg-4 {
  flex: 0 0 calc(33.333% - 20px) !important;
  max-width: calc(33.333% - 20px) !important;
  display: flex !important;
  justify-content: center !important;
}

body.dosen-page .profile-card {
  width: 100% !important;
  max-width: 340px !important;
  margin: 0 auto !important;
}

body.dosen-page .section-title {
  color: #000;
  text-align: center;
}

/* === CARD UTAMA === */
body.dosen-page .profile-card {
  position: relative;
  width: 100%;
  aspect-ratio: 3 / 4; /* Desktop dan tablet tetap proporsional */
  border-radius: 15px;
  overflow: hidden;
  background-size: cover;
  background-position: top center;
  background-repeat: no-repeat;
  transition: all 0.4s ease;
  box-shadow: 0 8px 25px rgba(0,0,0,0.15);
}

/* === ICON SOSIAL === */
body.dosen-page .social {
  position: absolute;
  top: 10px;
  right: 10px;
  display: flex;
  gap: 6px;
  z-index: 10;
}

body.dosen-page .social a img {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: rgba(255,255,255,0.25);
  padding: 4px;
  transition: all 0.3s ease;
}

body.dosen-page .social a:hover img {
  background: #e6a417;
  transform: scale(1.1);
}

/* === OVERLAY TEKS === */
body.dosen-page .overlay-info {
  position: absolute;
  bottom: 0;
  width: 100%;
  padding: 16px 18px;
  background: linear-gradient(to top, rgba(0,0,0,0.75), transparent);
  color: #fff;
  text-align: left;
  z-index: 5;
}

body.dosen-page .overlay-info h4 {
  margin: 0 0 5px;
  font-size: 0.9rem;
  font-weight: 600;
}

body.dosen-page .overlay-info .position {
  font-size: 0.8rem;
  margin-bottom: 6px;
  opacity: 0.9;
  margin-top: 5px;
  margin-bottom: 5px;
}

/* Spesialis dengan efek glow */
body.dosen-page .overlay-info .specialist {
  font-size: 0.8rem;
  color: #e6a417;
  border-top: 1px solid rgba(255,255,255,0.3);
  padding-top: 6px;
  text-shadow: 0 0 6px #e6a417, 0 0 10px #e6a417;
  margin-top: 5px;
  margin-bottom: 5px;
}

/* === RESPONSIVE KHUSUS HP (iPhone 14, dsb) === */
@media (max-width: 576px) {
  body.dosen-page .profile-card {
    aspect-ratio: auto;   /* nonaktifkan rasio */
    height: auto;         /* biar tinggi mengikuti isi */
    min-height: 420px;    /* kasih batas agar foto tidak gepeng */
    background-position: center top;
  }

  body.dosen-page .overlay-info {
    padding: 14px 14px 18px 14px;
  }

  body.dosen-page .overlay-info h4 {
    font-size: 0.5rem;
    line-height: 1.2rem;
  }

  body.dosen-page .overlay-info .position {
    font-size: 0.5rem !important;
    margin-bottom: 4px;
  }

  body.dosen-page .overlay-info .specialist {
    font-size: 0.3rem;
    padding-top: 4px;
  }

  body.dosen-page .social {
    top: 8px;
    right: 10px;
    gap: 4px;
  }

  body.dosen-page .social {
    position: absolute;
    top: 10px;
    right: -5px;
    display: flex;
    gap: 6px;
}

  body.dosen-page .social a img {
    width: 22px;
    height: 22px;
  }
}

@media (max-width: 992px) {
body.dosen-page .white-popup {
  background: #fff;
  border-radius: 20px;
  padding: 20px;
  width: 75%;
  max-width: 200 !important;
  margin: auto;
  color: #333;
  box-shadow: 0 10px 40px rgba(0,0,0,0.25);
  transform: translateY(30px) scale(0.95);
  filter: blur(10px);
  opacity: 0;
  transition: all 0.4s ease;
  }

  body.dosen-page #popupName {
  font-size: 1.2rem !important;
  font-weight: 800;
}
  body.dosen-page .position {
  font-size: 0.6rem !important;
}
}

/* === KHUSUS UNTUK POPUP MODAL DOSEN === */
body.dosen-page .white-popup .popup-flex {
  display: flex;
  flex-direction: row;
  align-items: flex-start;
  gap: 25px;
}

/* FOTO DI KIRI */
body.dosen-page .white-popup .popup-photo {
  flex: 0 0 auto; /* biar tidak memaksa lebar */
  display: flex;
  justify-content: center;
  align-items: flex-start;
}

/* ✅ FOTO AGAR TIDAK TERLALU BESAR */
body.dosen-page .white-popup .popup-photo img {
  width: auto;               /* lebar otomatis */
  max-width: 220px;          /* batas lebar maksimal */
  max-height: 60%;          /* tinggi tidak lebih dari konten kanan */
  height: auto;              /* tetap proporsional */
  object-fit: contain;       /* tampil utuh tanpa crop */
  border-radius: 10px;
  background: #fafafa;
  border: 1px solid #ddd;
}

/* DATA DI KANAN */
body.dosen-page .white-popup .popup-data {
  flex: 1;
  text-align: left;
  color: #333;
  font-size: 0.95rem;
  line-height: 1.5;
}

/* === RESPONSIVE UNTUK HP / TABLET === */
@media (max-width: 992px) {
  body.dosen-page .white-popup .popup-flex {
    flex-direction: column;
    align-items: center;
  }

  body.dosen-page .white-popup .popup-photo img {
    width: 100%;
    max-width: 100%;
    height: auto;
    object-fit: contain;
  }

  body.dosen-page .white-popup .popup-data {
    width: 100%;
  }
}

/* === Popup utama (lebih kecil kanan kiri) === */
body.dosen-page .white-popup {
  box-sizing: border-box;
  padding: 20px 40px;        /* kanan kiri agak kecil */
  width: 85%;                /* dulu 90%, sekarang agak sempit */
  max-width: 850px;          /* batasi biar tidak terlalu lebar di layar besar */
  margin: 0 auto;
  position: relative;
  border-radius: 16px;
  transition: all 0.3s ease;
}

/* Isi popup tetap center */
body.dosen-page .popup-flex {
  display: flex;
  justify-content: center;
  align-items: flex-start;
  gap: 20px;
  width: 100%;
  margin: 0 auto;
  padding: 10px 15px;        /* kanan kiri lebih kecil */
  box-sizing: border-box;
}

/* Foto tetap proporsional */
body.dosen-page .popup-photo {
  flex: 0 0 250px;           /* sedikit lebih kecil */
  display: flex;
  justify-content: center;
  align-items: center;
}

body.dosen-page .popup-photo img {
  width: 100%;
  height: auto;
  border-radius: 12px;
  object-fit: contain;
}

/* Konten di kanan */
body.dosen-page .popup-data {
  flex: 1;
  text-align: left;
}

/* === Versi responsif untuk layar kecil (HP) === */
@media (max-width: 768px) {
  body.dosen-page .white-popup {
    width: 90%;
    padding: 15px 20px;
  }

  body.dosen-page .popup-flex {
    flex-direction: column;
    align-items: center;
    padding: 10px;
  }

  body.dosen-page .popup-photo {
    width: 100%;
    max-width: 280px;
  }
}
