/* ==========================================================================
   Our Team / Board of Officers / Departments
   Shared by frontend/BOS.html, BOS_Department.html and add_staff.html
   ========================================================================== */

:root {
  --team-ink: #15182a;
  --team-muted: #6b7280;
  --team-line: #e6e8f0;
  --team-accent: #e74c3c;
  --team-accent-dark: #c0392b;
  --team-radius: 16px;
}

/* ---------- Page hero ---------- */
.team-hero {
  position: relative;
  min-height: 260px;
  display: flex;
  align-items: center;
  background-size: cover;
  background-position: center;
  background-color: #15182a;
}

.team-hero::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(
    180deg,
    rgba(10, 12, 22, 0.72) 0%,
    rgba(10, 12, 22, 0.55) 100%
  );
}

.team-hero > .container {
  position: relative;
  z-index: 1;
}

.team-hero-card {
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  padding: 26px 34px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: var(--team-radius);
  background: rgba(0, 0, 0, 0.35);
  -webkit-backdrop-filter: blur(14px);
  backdrop-filter: blur(14px);
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.25);
}

.team-hero-card h1 {
  margin: 0;
  color: #fff;
  font-weight: 600;
  letter-spacing: -0.5px;
  text-shadow: 0 2px 10px rgba(0, 0, 0, 0.45);
}

.team-hero-card .team-hero-kicker {
  margin: 0;
  color: rgba(255, 255, 255, 0.78);
  font-size: 0.9rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

/* ---------- Section headings ---------- */
.team-section {
  padding: 58px 0;
}

.team-section.is-tinted {
  background: #f7f8fc;
}

.team-section-head {
  max-width: 720px;
  margin: 0 auto 32px;
  text-align: center;
}

.team-section-head .eyebrow {
  display: inline-block;
  margin-bottom: 10px;
  padding: 5px 14px;
  border-radius: 999px;
  background: rgba(231, 76, 60, 0.1);
  color: var(--team-accent-dark);
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.team-section-head h2 {
  margin: 0 0 12px;
  color: var(--team-ink);
  font-weight: 700;
  letter-spacing: -0.5px;
}

.team-section-head p {
  margin: 0;
  color: var(--team-muted);
  line-height: 1.7;
}

/* ---------- Staff cards ---------- */
.staff-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));
  gap: 24px;
}

.staff-card {
  display: block;
  overflow: hidden;
  border: 1px solid var(--team-line);
  border-radius: var(--team-radius);
  background: #fff;
  text-align: center;
  text-decoration: none;
  box-shadow: 0 2px 10px rgba(21, 24, 42, 0.05);
  transition: transform 0.28s ease, box-shadow 0.28s ease,
    border-color 0.28s ease;
}

.staff-card:hover {
  transform: translateY(-6px);
  border-color: rgba(231, 76, 60, 0.35);
  box-shadow: 0 18px 34px rgba(21, 24, 42, 0.12);
}

.staff-image-wrapper {
  position: relative;
  aspect-ratio: 1 / 1;
  overflow: hidden;
  background: #eef0f6;
}

.staff-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.4s ease;
}

.staff-card:hover .staff-image {
  transform: scale(1.05);
}

.staff-info {
  padding: 16px 14px 18px;
}

.staff-name {
  margin: 0 0 4px;
  color: var(--team-ink);
  font-size: 1.05rem;
  font-weight: 600;
}

.staff-position {
  margin: 0;
  color: var(--team-muted);
  font-size: 0.88rem;
}

/* ---------- Department cards ---------- */
.dept-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 22px;
}

.dept-card {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 26px 24px;
  overflow: hidden;
  border: 1px solid var(--team-line);
  border-radius: var(--team-radius);
  background: #fff;
  text-decoration: none;
  box-shadow: 0 2px 10px rgba(21, 24, 42, 0.05);
  transition: transform 0.28s ease, box-shadow 0.28s ease,
    border-color 0.28s ease;
}

.dept-card::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 3px;
  background: linear-gradient(
    90deg,
    var(--team-accent),
    var(--team-accent-dark)
  );
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.3s ease;
}

.dept-card:hover {
  transform: translateY(-6px);
  border-color: rgba(231, 76, 60, 0.35);
  box-shadow: 0 18px 34px rgba(21, 24, 42, 0.12);
}

.dept-card:hover::before {
  transform: scaleX(1);
}

.dept-card-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.dept-icon {
  width: 52px;
  height: 52px;
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 14px;
  background: linear-gradient(135deg, #fdecea, #fbd9d5);
  color: var(--team-accent-dark);
  font-size: 1.25rem;
}

.dept-thumb {
  width: 52px;
  height: 52px;
  flex: 0 0 auto;
  border-radius: 14px;
  object-fit: cover;
}

.dept-count {
  padding: 5px 12px;
  border-radius: 999px;
  background: #f1f3f9;
  color: var(--team-muted);
  font-size: 0.75rem;
  font-weight: 600;
  white-space: nowrap;
}

.dept-name {
  margin: 0;
  color: var(--team-ink);
  font-size: 1.15rem;
  font-weight: 600;
}

.dept-desc {
  flex: 1 1 auto;
  margin: 0;
  color: var(--team-muted);
  font-size: 0.9rem;
  line-height: 1.6;
}

.dept-more {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  color: var(--team-accent-dark);
  font-size: 0.85rem;
  font-weight: 600;
}

.dept-more i {
  transition: transform 0.25s ease;
}

.dept-card:hover .dept-more i {
  transform: translateX(4px);
}

/* ---------- Breadcrumb ---------- */
.team-crumbs {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin-bottom: 18px;
  color: var(--team-muted);
  font-size: 0.85rem;
}

.team-crumbs a {
  color: var(--team-muted);
  text-decoration: none;
}

.team-crumbs a:hover {
  color: var(--team-accent-dark);
}

.team-crumbs .sep {
  opacity: 0.45;
}

.team-crumbs .current {
  color: var(--team-ink);
  font-weight: 600;
}

/* ---------- Empty state ---------- */
.team-empty {
  padding: 56px 24px;
  border: 1px dashed var(--team-line);
  border-radius: var(--team-radius);
  background: #fff;
  color: var(--team-muted);
  text-align: center;
}

.team-empty i {
  display: block;
  margin-bottom: 14px;
  color: #c7cbd9;
  font-size: 2.4rem;
}

/* ---------- Trusted-IP "Add Staff" control ---------- */
.staff-add-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 26px;
  padding: 18px 22px;
  border: 1px solid #d8e5d4;
  border-radius: var(--team-radius);
  background: linear-gradient(135deg, #f1f9ee, #e8f5e4);
}

.staff-add-bar .bar-text {
  margin: 0;
  color: #2f5d2a;
  font-size: 0.9rem;
}

.staff-add-bar .bar-text strong {
  display: block;
  margin-bottom: 2px;
  font-size: 1rem;
}

.btn-add-staff {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  padding: 12px 22px;
  border: none;
  border-radius: 999px;
  background: linear-gradient(135deg, #2e9e4f, #21803d);
  color: #fff;
  font-size: 0.92rem;
  font-weight: 600;
  text-decoration: none;
  white-space: nowrap;
  box-shadow: 0 10px 22px rgba(33, 128, 61, 0.26);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.btn-add-staff:hover {
  color: #fff;
  transform: translateY(-2px);
  box-shadow: 0 14px 28px rgba(33, 128, 61, 0.34);
}

/* ---------- Add-staff form ---------- */
.staff-form-card {
  max-width: 760px;
  margin: 0 auto;
  padding: 32px;
  border: 1px solid var(--team-line);
  border-radius: var(--team-radius);
  background: #fff;
  box-shadow: 0 10px 30px rgba(21, 24, 42, 0.07);
}

.staff-form-card .form-label {
  margin-bottom: 6px;
  color: var(--team-ink);
  font-size: 0.88rem;
  font-weight: 600;
}

.staff-form-card .form-control,
.staff-form-card .form-select {
  padding: 11px 14px;
  border: 1px solid var(--team-line);
  border-radius: 10px;
  color: var(--team-ink);
  font-size: 0.95rem;
  background-color: #fff;
}

.staff-form-card .form-control:focus,
.staff-form-card .form-select:focus {
  border-color: var(--team-accent);
  box-shadow: 0 0 0 3px rgba(231, 76, 60, 0.12);
}

.staff-form-card .field-error {
  margin: 6px 0 0;
  color: #c0392b;
  font-size: 0.82rem;
}

.staff-form-card .form-hint {
  margin: 6px 0 0;
  color: var(--team-muted);
  font-size: 0.8rem;
}

.staff-form-notice {
  display: flex;
  gap: 12px;
  margin-bottom: 26px;
  padding: 16px 18px;
  border: 1px solid #ffe2b8;
  border-radius: 12px;
  background: #fff8ec;
  color: #8a5a10;
  font-size: 0.88rem;
  line-height: 1.6;
}

.staff-form-notice i {
  flex: 0 0 auto;
  margin-top: 2px;
  font-size: 1.05rem;
}

.staff-form-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 28px;
  padding-top: 22px;
  border-top: 1px solid var(--team-line);
}

.btn-team-primary,
.btn-team-ghost {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  padding: 12px 24px;
  border-radius: 999px;
  font-size: 0.92rem;
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.btn-team-primary {
  border: none;
  background: linear-gradient(135deg, var(--team-accent), var(--team-accent-dark));
  color: #fff;
  box-shadow: 0 10px 22px rgba(231, 76, 60, 0.26);
}

.btn-team-primary:hover {
  color: #fff;
  transform: translateY(-2px);
  box-shadow: 0 14px 28px rgba(231, 76, 60, 0.34);
}

.btn-team-ghost {
  border: 1px solid var(--team-line);
  background: #fff;
  color: var(--team-ink);
}

.btn-team-ghost:hover {
  background: #f6f7fb;
  color: var(--team-ink);
}

.image-drop {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  padding: 26px;
  border: 2px dashed var(--team-line);
  border-radius: 12px;
  background: #fafbfe;
  color: var(--team-muted);
  text-align: center;
  cursor: pointer;
  transition: border-color 0.2s ease, background 0.2s ease;
}

.image-drop:hover {
  border-color: var(--team-accent);
  background: #fff;
}

.image-drop input[type="file"] {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
  cursor: pointer;
}

.image-drop .drop-preview {
  display: none;
  width: 110px;
  height: 110px;
  border-radius: 12px;
  object-fit: cover;
}

.image-drop.has-file .drop-preview {
  display: block;
}

.image-drop.has-file .drop-prompt {
  display: none;
}

.image-drop i {
  font-size: 1.7rem;
  color: #c7cbd9;
}

/* ---------- Access denied ---------- */
.team-denied {
  max-width: 560px;
  margin: 0 auto;
  padding: 44px 32px;
  border: 1px solid var(--team-line);
  border-radius: var(--team-radius);
  background: #fff;
  text-align: center;
  box-shadow: 0 10px 30px rgba(21, 24, 42, 0.07);
}

.team-denied i {
  display: block;
  margin-bottom: 18px;
  color: var(--team-accent);
  font-size: 2.6rem;
}

.team-denied h1 {
  margin: 0 0 12px;
  color: var(--team-ink);
  font-size: 1.5rem;
  font-weight: 700;
}

.team-denied p {
  margin: 0 0 8px;
  color: var(--team-muted);
  line-height: 1.7;
}

.team-denied code {
  padding: 2px 8px;
  border-radius: 6px;
  background: #f1f3f9;
  color: var(--team-ink);
}

/* ---------- Mobile ---------- */
@media (max-width: 767px) {
  html,
  body {
    overflow-x: hidden;
  }

  .team-section {
    padding: 36px 0;
  }

  .team-hero {
    min-height: 200px;
  }

  .team-hero-card {
    width: 100%;
    padding: 20px 18px;
  }

  .team-hero-card h1 {
    font-size: 1.6rem;
  }

  .staff-grid {
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 14px;
  }

  .dept-grid {
    grid-template-columns: 1fr;
  }

  .staff-form-card {
    padding: 22px 18px;
  }

  .staff-add-bar {
    flex-direction: column;
    align-items: flex-start;
  }

  .btn-add-staff {
    width: 100%;
    justify-content: center;
  }
}
