/* ── Department pages — matches site theme ───────────────────────── */

.dept-heading {
  padding: 50px 0 18px;
  background: #fff;
}

.dept-heading__inner {
  max-width: 1250px;
  margin: 0 auto;
  text-align: center;
}

.dept-heading__eyebrow {
  display: inline-block;
  margin-bottom: 12px;
  padding: 4px 13px;
  border-radius: 999px;
  background: #d9e9f7;
  color: #000;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.dept-heading h1 {
  margin: 0;
  color: #000;
  font-family: "Roboto", sans-serif;
  font-size: clamp(1.8rem, 4vw, 2.8rem);
  font-weight: 800;
  line-height: 1.05;
}

/* ── Layout ─────────────────────────────────────────────────────── */

.dept-body {
  padding: 26px 0 68px;
  background: #fff;
}

.dept-layout {
  display: grid;
  grid-template-columns: minmax(210px, 235px) minmax(0, 1fr);
  gap: 28px;
  align-items: start;
}

/* ── Sidebar ─────────────────────────────────────────────────────── */

.dept-sidebar {
  position: sticky;
  top: 120px;
  width: 100%;
  /* Grid items default to min-width:auto, which would let the horizontal
     section nav stretch the whole page instead of scrolling inside itself. */
  min-width: 0;
}

.dept-sidebar__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 13px 16px;
  background: #000;
  color: #fff;
  font-family: "Roboto", sans-serif;
  font-size: 16px;
  font-weight: 500;
}

/* Only used on phones, where the section list collapses behind it. */
.dept-sidebar__toggle {
  display: none;
  padding: 0;
  border: 0;
  background: transparent;
  color: #fff;
  font-size: 1.5rem;
  line-height: 1;
  cursor: pointer;
}

/* ── Main panel ─────────────────────────────────────────────────── */

.dept-main {
  min-width: 0;
}

.dept-panel {
  padding: 28px 30px 32px;
  border: 1px solid #e5e7eb;
  border-radius: 22px;
  background: #fff;
  box-shadow: 0 18px 40px rgba(15, 23, 42, 0.08);
  margin-bottom: 24px;
}

.dept-panel:last-child {
  margin-bottom: 0;
}

.dept-panel__eyebrow {
  display: inline-block;
  margin-bottom: 10px;
  padding: 6px 12px;
  border-radius: 999px;
  background: #dce9f8;
  color: #1664b3;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.dept-panel h2 {
  margin: 0 0 18px;
  color: #091226;
  font-family: "Roboto", sans-serif;
  font-size: clamp(1.45rem, 2.4vw, 1.9rem);
  font-weight: 800;
  line-height: 1.1;
}

.dept-panel h4 {
  margin: 1.4rem 0 0.6rem;
  color: #081226;
  font-size: 1.05rem;
  font-weight: 700;
}

.dept-panel p,
.dept-richtext p {
  margin: 0 0 1rem;
  color: #334155;
  font-size: 15px;
  line-height: 1.85;
}

.dept-richtext ul,
.dept-richtext ol {
  margin: 0 0 1rem;
  padding-left: 1.3rem;
  color: #334155;
  font-size: 15px;
  line-height: 1.85;
}

.dept-richtext li {
  margin-bottom: 6px;
}

/* ── HOD card ───────────────────────────────────────────────────── */

.dept-hod {
  display: flex;
  align-items: flex-start;
  gap: 20px;
  padding: 22px;
  border: 1px solid #dbe4ef;
  border-radius: 18px;
  background: linear-gradient(135deg, #f0f7ff 0%, #fff 100%);
  margin-bottom: 24px;
}

.dept-hod__avatar {
  width: 84px;
  height: 84px;
  flex-shrink: 0;
  border-radius: 18px;
  overflow: hidden;
  background: linear-gradient(135deg, #0f76bb, #19bfd6);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-size: 2rem;
  font-weight: 800;
  font-family: "Roboto", sans-serif;
}

.dept-hod__avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.dept-hod__label {
  display: block;
  margin-bottom: 4px;
  color: #1664b3;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.dept-hod__name {
  margin: 0 0 4px;
  color: #081226;
  font-family: "Roboto", sans-serif;
  font-size: 1.15rem;
  font-weight: 800;
}

.dept-hod__qual {
  margin: 0;
  color: #64748b;
  font-size: 13px;
  line-height: 1.5;
}

/* ── Info strip ─────────────────────────────────────────────────── */

.dept-info-strip {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
  margin-bottom: 24px;
}

.dept-info-chip {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 16px;
  border: 1px solid #dbe4ef;
  border-radius: 12px;
  background: #f7fbff;
  font-size: 13px;
  font-weight: 600;
  color: #1e293b;
}

.dept-info-chip i {
  color: var(--primary);
  font-size: 1rem;
}

/* ── Faculty grid ───────────────────────────────────────────────── */

.dept-faculty-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}

.dept-faculty-card {
  padding: 20px 16px 18px;
  border: 1px solid #dbe4ef;
  border-radius: 18px;
  background: linear-gradient(180deg, #fff 0%, #f7fbff 100%);
  text-align: center;
  transition: box-shadow 0.2s ease, transform 0.2s ease;
}

.dept-faculty-card:hover {
  box-shadow: 0 8px 24px rgba(15, 23, 42, 0.1);
  transform: translateY(-2px);
}

.dept-faculty-card__avatar {
  width: 84px;
  height: 84px;
  border-radius: 16px;
  margin: 0 auto 12px;
  overflow: hidden;
  background: linear-gradient(135deg, #0f76bb, #19bfd6);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-size: 1.4rem;
  font-weight: 700;
  font-family: "Roboto", sans-serif;
}

.dept-faculty-card__avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.dept-faculty-card__name {
  margin: 0 0 4px;
  color: #081226;
  font-size: 0.88rem;
  font-weight: 700;
  line-height: 1.3;
}

.dept-faculty-card__designation {
  display: inline-block;
  margin-bottom: 4px;
  padding: 2px 8px;
  border-radius: 999px;
  background: #dce9f8;
  color: #1664b3;
  font-size: 11px;
  font-weight: 700;
}

.dept-faculty-card__qual {
  margin: 0;
  color: #64748b;
  font-size: 11px;
  line-height: 1.4;
}

/* ── Department list page ───────────────────────────────────────── */

.dept-list-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 22px;
}

.dept-card {
  padding: 26px 22px 24px;
  border: 1px solid #dbe4ef;
  border-radius: 20px;
  background: #fff;
  box-shadow: 0 8px 28px rgba(15, 23, 42, 0.06);
  transition: box-shadow 0.2s ease, transform 0.2s ease;
  display: flex;
  flex-direction: column;
}

.dept-card:hover {
  box-shadow: 0 18px 40px rgba(15, 23, 42, 0.12);
  transform: translateY(-3px);
}

.dept-card__icon {
  width: 56px;
  height: 56px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 16px;
  border-radius: 16px;
  background: linear-gradient(135deg, #0f76bb, #19bfd6);
  color: #fff;
  font-size: 1.5rem;
}

.dept-card__name {
  margin: 0 0 10px;
  color: #081226;
  font-family: "Roboto", sans-serif;
  font-size: 1.1rem;
  font-weight: 800;
  line-height: 1.2;
}

.dept-card__hod {
  margin: 0 0 12px;
  color: #64748b;
  font-size: 12.5px;
  line-height: 1.5;
}

.dept-card__hod strong {
  color: #334155;
}

.dept-card__desc {
  margin: 0 0 18px;
  color: #64748b;
  font-size: 13.5px;
  line-height: 1.7;
  flex-grow: 1;
}

.dept-card__link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 18px;
  border-radius: 999px;
  background: var(--primary);
  color: #fff;
  font-size: 13px;
  font-weight: 700;
  text-decoration: none;
  align-self: flex-start;
  transition: background 0.2s ease;
}

.dept-card__link:hover {
  background: #0a66a1;
  color: #fff;
}

/* ── Responsive ─────────────────────────────────────────────────── */

@media (max-width: 1199.98px) {
  .dept-layout {
    grid-template-columns: 1fr;
  }

  .dept-sidebar {
    position: static;
  }

  .dept-faculty-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .dept-list-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 991.98px) {
  .dept-sidebar {
    display: none;
  }
}

@media (max-width: 767.98px) {
  .dept-heading {
    padding: 34px 0 10px;
  }

  .dept-body {
    padding-bottom: 44px;
  }

  .dept-panel {
    padding: 20px 18px 24px;
  }

  .dept-faculty-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .dept-list-grid {
    grid-template-columns: 1fr;
  }

  .dept-heading h1 {
    font-size: clamp(1.25rem, 5.4vw, 1.6rem);
  }

  .dept-page-intro h2 {
    font-size: 1.35rem;
  }

  .dept-page-intro p,
  .dept-body p {
    font-size: 13px;
    line-height: 1.65;
  }

  .dept-sidebar-head {
    font-size: 16px;
  }

  .dept-panel h3,
  .dept-richtext h3,
  .dept-gallery__title {
    font-size: 1.1rem;
  }

  .dept-data-table thead th {
    font-size: 12px;
  }

  .dept-data-table tbody td {
    font-size: 13px;
  }
}

@media (max-width: 480px) {
  .dept-faculty-grid {
    grid-template-columns: 1fr;
  }
}

/* ── Section nav (sidebar tabs) ─────────────────────────────────── */
.dept-sectionnav {
  display: flex;
  flex-direction: column;
  background: #e6e6e6;
}

.dept-sectionnav__link {
  min-height: 46px;
  display: flex;
  align-items: center;
  width: 100%;
  padding: 10px 16px;
  border: 0;
  border-bottom: 1px solid #d2d2d2;
  background: transparent;
  color: #2f3a4d;
  font-family: "Roboto", sans-serif;
  font-size: 14px;
  font-weight: 500;
  line-height: 1.35;
  text-align: left;
  cursor: pointer;
  transition: color 0.2s ease, background 0.2s ease;
}

.dept-sectionnav__link:hover {
  color: var(--primary);
  background: rgba(14, 118, 187, 0.06);
}

.dept-sectionnav__link.is-current {
  border-left: 3px solid var(--primary);
  padding-left: 13px;
  background: rgba(14, 118, 187, 0.06);
  color: var(--primary);
  font-weight: 700;
}

.dept-sectionnav__link:focus-visible {
  outline: 3px solid rgba(14, 118, 187, 0.45);
  outline-offset: -3px;
}

/* Listed so the full page structure is visible, but nothing to open yet. */
.dept-sectionnav__link.is-empty {
  color: #9aa3b0;
  cursor: default;
}

.dept-sectionnav__link.is-empty:hover {
  color: #9aa3b0;
  background: transparent;
}

.dept-panel--tab[hidden] {
  display: none;
}

/* ── Department gallery ─────────────────────────────────────────── */
.dept-gallery {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 18px;
  margin-top: 4px;
}

/* Rich text from the admin uses h3, the gallery uses its own title — keep every
   sub-heading inside a panel at one size so the page reads evenly. */
.dept-panel h3,
.dept-richtext h3,
.dept-gallery__title {
  margin: 26px 0 10px;
  color: #081226;
  font-family: "Roboto", sans-serif;
  font-size: 1.25rem;
  font-weight: 800;
  line-height: 1.3;
}

.dept-richtext > h3:first-child {
  margin-top: 0;
}

.dept-gallery__item {
  margin: 0;
  border: 1px solid #e5e7eb;
  border-radius: 16px;
  background: #f8fafc;
  overflow: hidden;
}

.dept-gallery__item img {
  display: block;
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
}

/* ── Extra faculty details ──────────────────────────────────────── */
.dept-faculty-card__edu,
.dept-faculty-card__exp {
  margin: 6px 0 0;
  color: #64748b;
  font-size: 11px;
  line-height: 1.45;
}

.dept-faculty-card__exp {
  color: #1664b3;
  font-weight: 600;
}

@media (max-width: 575.98px) {
  .dept-tabs {
    flex-wrap: nowrap;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }

  .dept-tabs__tab {
    flex: 0 0 auto;
  }
}

/* On phones the sidebar sits above the content and the section list collapses
   behind the menu button, so it does not take over the screen. */
@media (max-width: 991.98px) {
  .dept-sidebar {
    display: block;
    position: static;
    margin-bottom: 18px;
  }

  .dept-sidebar__head {
    border-radius: 14px;
    font-size: 15px;
  }

  .dept-sidebar__toggle {
    display: inline-flex;
    align-items: center;
  }

  .dept-sectionnav {
    display: none;
    max-width: 100%;
    margin-top: 6px;
    border-radius: 14px;
    overflow: hidden;
  }

  .dept-sections.is-open .dept-sectionnav,
  .dept-sidebar__block--sections.is-open .dept-sectionnav {
    display: flex;
    flex-direction: column;
  }

  .dept-sectionnav__link {
    min-height: 44px;
    font-size: 13.5px;
  }

  .dept-sectionnav__link:last-child {
    border-bottom: 0;
  }

  .dept-sectionnav__link.is-empty {
    background: #ededed;
    color: #a9b2bf;
  }
}
