

/* Keep box-sizing consistent without redefining html/body twice */
*, *::before, *::after { box-sizing: border-box; }

/* RTL base — DO NOT turn bootstrap container into flex */
.container { direction: rtl; }

/* Headings color (grouped) */
h3, h4 { color: #00254e !important; }
h5 { color: #000 !important; }

/* =========================================================
   1) Shared layout helpers
   ========================================================= */

.about-div { display: none; }

.about-p,
.about-p p,
.about-p ul,
.about-p li {
  direction: rtl;
  text-align: right;
  unicode-bidi: plaintext;
}

.about-p {
  padding-right: 2em !important;
  padding-left: 2em !important;
}

.about-p ul {
  padding-right: 1.5rem;
  padding-left: 0;
}

/* =========================================================
   2) Accordion (old one — if you still use it)
   ========================================================= */

.accordion a {
  display: flex;
  flex-direction: column;
  width: 100%;
  padding: 1rem 3rem 1rem 1rem;
  color: #7288a2;
  border-bottom: 1px solid #e5e5e5;
  position: relative;
}

.accordion a:hover,
.accordion a:hover::after {
  cursor: pointer;
  color: #364996;
}

.accordion a:hover::after { border-color: #364996; }

.accordion a.active {
  color: #364996;
  border-bottom-color: #364996;
}

.accordion a::after {
  content: "\25BD";
  position: absolute;
  right: 1rem;
  top: 50%;
  transform: translateY(-50%);
  color: #7288a2;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  border: 1px solid #7288a2;
  text-align: center;
  line-height: 28px;
}

.accordion a.active::after {
  content: "\25C0";
  color: #364996;
  border-color: #364996;
}

.accordion .content {
  opacity: 0;
  padding: 0 1rem;
  max-height: 0;
  border-bottom: 1px solid #e5e5e5;
  overflow: hidden;
  transition: all 0.2s ease 0.15s;
}

.accordion .content.active {
  opacity: 1;
  padding: 1rem;
  max-height: 100%;
  transition: all 0.35s ease 0.15s;
}

/* =========================================================
   3) Title pill (h1.text-divider)
   ========================================================= */

h1.text-divider {
  margin: 28px 0 35px;
  line-height: 1.6;
  text-align: right;
  color: #00254e !important;
  font-size: 3.5vh; /* keep once */
}

h1.text-divider::before { content: none; }
h1.text-divider.shown { border: none; }

h1.text-divider span {
  display: inline-block;
  padding: 14px 34px;
  background: #00254e;
  color: #fff !important;
  border-radius: 999px;
  font-size: 1.7rem;
  font-weight: 800;
  position: relative;
  box-shadow: 0 6px 20px rgba(0, 37, 78, 0.20);
  letter-spacing: 0.5px;
}

h1.text-divider span::before {
  content: "";
  position: absolute;
  inset: -7px;
  border-radius: 999px;
  border: 2px solid rgba(212, 160, 23, 0.6);
  pointer-events: none;
}

/* h2 divider (keep if still used anywhere) */
h2.text-divider {
  color: #000 !important;
  text-align: right;
  font-size: 3vh;
  word-break: break-word;
}

h2.text-divider::before {
  content: "";
  display: block;
  border-top: 1px solid #000;
  border-bottom: 1px solid #000;
}

/* =========================================================
   4) Tabs (same as departments)
   ========================================================= */

.tab { direction: rtl; width: 100%; margin-top: 12px; }

.tab .nav-tabs {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-start;
  border-bottom: 1px solid #e3e6ec;
  padding-bottom: 6px;
  margin-bottom: 10px;
}

.tab .nav-tabs li { float: none; margin: 0 0 6px 6px; }

.tab .nav-tabs li a {
  display: flex;
  flex-direction: row-reverse;
  align-items: center;
  gap: 8px;
  background: #fafbff;
  padding: 10px 18px;
  font-size: 14px;
  font-weight: 600;
  color: #3e4a63;
  border-radius: 8px;
  border: 1px solid #e3e6ec;
  transition: all 0.2s ease;
  position: relative;
}

.tab .nav-tabs li a span {
  width: 28px;
  height: 28px;
  border-radius: 6px;
  background: #eef1f6;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #00254e;
  font-size: 14px;
}

.tab .nav-tabs li a:hover {
  background: #f0f3f9;
  border-color: #c9ccd6;
  color: #00254e;
}

.tab .nav-tabs li.active a {
  background: #00254e;
  color: #fff;
  border-color: #00254e;
  box-shadow: 0 4px 12px rgba(0, 37, 78, 0.20);
}

.tab .nav-tabs li.active a span {
  background: #d4a017;
  color: #00254e;
}

.tab .nav-tabs li.active a::after {
  content: "";
  position: absolute;
  bottom: -6px;
  right: 10px;
  left: 10px;
  height: 3px;
  background: #d4a017;
  border-radius: 2px;
}

.tab .tab-content {
  padding: 15px 5px 5px;
  margin-top: 8px;
  font-size: 15px;
  color: #000;
  line-height: 1.8;
}

/* keep all tabs in one row on desktop */
@media (min-width: 992px) {
  .tab .nav-tabs { flex-wrap: nowrap; }
  .tab .nav-tabs li a { padding: 8px 14px; font-size: 13px; }
}

/* =========================================================
   5) Sidebar (Gold bar nav) — CLEAN + no duplicate blocks
   ========================================================= */

#sidebar {
  z-index: 1;
  width: 100%;
  max-width: 260px;
  margin-top: 25px;
}

#sidebar, #sidebar .side, #sidebar .list-group-item {
  direction: rtl;
  text-align: right;
}

#sidebar .side {
  background: #fff;
  border: 1px solid #e3e6ec;
  border-radius: 10px;
  padding: 10px 0;
  box-shadow: 0 4px 14px rgba(0, 37, 78, 0.06);
  position: sticky;
  top: 120px;
}

#sidebar .list-group { margin-bottom: 0; }

#sidebar .list-group-item {
  position: relative;
  border: none !important;
  background: transparent;
  border-radius: 0;
  padding: 10px 18px 10px 10px;
  margin: 2px 0;
  font-size: 14px;
  color: #3e4a63;
  transition: background 0.15s ease, padding-right 0.15s ease, color 0.15s ease;
}

#sidebar .list-group-item::before {
  content: "";
  position: absolute;
  right: 0;
  top: 0;
  width: 3px;
  height: 100%;
  background: #d4a017;
  opacity: 0;
  transition: opacity 0.2s ease;
}

#sidebar .list-group-item:hover::before { opacity: 0.3; }
#sidebar .list-group-item.active::before { opacity: 1; }

#sidebar .list-group-item:hover,
#sidebar .list-group-item.active,
#sidebar .list-group-item.active:hover {
  background: #f5f7fb !important;
  color: #00254e !important;
  padding-right: 22px !important;
}

#sidebar .list-group-item.active { border-color: transparent !important; }

#sidebar .list-group-item.list-sub {
  padding-right: 30px;
  font-size: 13px;
  background: rgba(134, 185, 243, 0.08);
}

/* kill Bootstrap "active background navy" conflict (optional) */
.list-group-item.active { background-color: #f5f7fb !important; }

/* =========================================================
   6) Sonar (contact pulse)
   ========================================================= */

.sonar-wrapper { position: relative; overflow: visible !important; padding: 3rem 0 2rem 0; }

.sonar-emitter {
  position: relative;
  width: 27px;
  height: 27px;
  border-radius: 9999px;
  background-color: hsl(228, 38%, 26%);
}

.sonar-wave {
  position: absolute;
  inset: 0;
  border-radius: 9999px;
  background-color: hsl(228, 38%, 26%);
  opacity: 0;
  z-index: -1;
  animation: sonarWave 2s linear infinite;
}

@keyframes sonarWave {
  from { opacity: 0.4; }
  to { transform: scale(3); opacity: 0; }
}

/* =========================================================
   7) Profile Boxes (base)
   ========================================================= */

.box9 { text-align: center; position: relative; width: 250px; height: 250px; }
.box9 img { width: 250px; height: 250px; }

@media (max-width: 990px) { .box9 { margin-bottom: 20px; } }

/* =========================================================
   8) Teachers / Cards
   ========================================================= */

.teachers-wrapper { direction: rtl; text-align: right; }

.teacher-card {
  background: #fff;
  border-radius: 18px;
  border: 1px solid #dde2ec;
  box-shadow: 0 10px 28px rgba(0, 37, 78, 0.08);
  padding: 18px 18px 14px;
  margin-bottom: 24px;
  display: flex;
  flex-direction: column;
  transition: transform 0.22s ease, box-shadow 0.22s ease, border-color 0.22s ease, background-color 0.22s ease;
  height: 500px;
}

.teacher-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 18px 40px rgba(0, 37, 78, 0.18);
  border-color: #d4a017;
  background: #fbfbff;
}

.teachers-wrapper .box9 {
  width: 100% !important;
  height: 240px !important;
  margin: 0 auto 14px;
}

.teachers-wrapper .box9 img {
  width: 100% !important;
  height: 100% !important;
  object-fit: contain !important;
  border-radius: 14px;
  background: #f4f6fb;
  padding: 8px;
  display: block;
}

.teacher-body { padding-top: 8px; display: flex; flex-direction: column; height: 100%; }

.teacher-name { font-size: 1.25rem; font-weight: 800; color: #00254e; margin-bottom: 4px; }
.teacher-degree { font-size: 0.98rem; color: #555; margin-bottom: 4px; }
.teacher-meta { font-size: 0.95rem; color: #666; margin-bottom: 8px; }

.teacher-email {
  margin-bottom: 10px;
  font-size: 0.9rem;
  min-height: 22px;
  display: flex;
  align-items: center;
}

.teacher-actions { margin-top: auto; padding-top: 6px; display: flex; gap: 6px; }
.teacher-actions li { display: inline-block; margin: 0; }
.teacher-cv-slot { min-width: 110px; text-align: right; }
.teacher-profile-btn { min-width: 135px; border-radius: 999px; padding: 4px 10px; font-size: 0.9rem; }

@media (max-width: 768px) {
  .teacher-card { height: auto; padding: 14px 14px 10px; }
  .teachers-wrapper .box9 { height: 200px !important; }
  .teacher-name { font-size: 1.1rem; }
  .teacher-degree, .teacher-meta { font-size: 0.9rem; }
}

/* =========================================================
   9) Responsive (grouped — no repetition)
   ========================================================= */

@media (max-width: 768px) {
  #sidebar { max-width: 100%; }
  #sidebar .side { position: static; top: auto; }
  h1.text-divider { text-align: center; margin: 20px 0 25px; font-size: 2.5vh; }
  h1.text-divider span { font-size: 1.35rem; padding: 10px 26px; }
  h2.text-divider { font-size: 2.5vh; }
}

.sidebar-offcanvas.active{
  display: block;
  position: fixed;
  z-index: 99999 !important;
}

/* Small phones */
@media (max-width: 480px) {
  h1.text-divider { font-size: 2.5vh; }
  h2.text-divider { font-size: 2.5vh; }
}