/*
  FILE: css/pejabat.css
  CSS untuk halaman Profil Pejabat
  Layout:
  - Kartu featured besar untuk Kepala Rutan (foto besar + bio)
  - Grid kartu kecil untuk pejabat struktural
*/

/* ══════════════════════════════════════════
   KARTU FEATURED — Kepala Rutan
   Layout: foto besar di kiri, info di kanan
   ══════════════════════════════════════════ */
.pejabat-featured {
  display: grid;
  grid-template-columns: 220px 1fr;
  gap: 2rem;
  background: var(--navy);
  border-radius: 16px;
  overflow: hidden;
  margin-bottom: 2.5rem;
  border: 1px solid rgba(201,168,76,0.3);
}

/* Kotak foto Kepala Rutan */
.featured-foto {
  position: relative;
  min-height: 280px;
  background: var(--navy-light);
  overflow: hidden;
}

.featured-foto img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: top center;
  display: block;
}

/* Fallback jika foto tidak ada */
.featured-foto-fallback {
  display: none;
  width: 100%; height: 100%;
  min-height: 280px;
  background: linear-gradient(135deg, var(--navy-light), var(--gold));
  align-items: center; justify-content: center;
  font-size: 2.5rem; font-weight: 900;
  color: var(--white);
  font-family: 'Playfair Display', serif;
}

/* Info teks di kanan */
.featured-info {
  padding: 2rem 2rem 2rem 0;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 0.4rem;
}

.featured-jabatan-label {
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 0.25rem;
}

.featured-nama {
  font-family: 'Playfair Display', serif;
  font-size: 1.75rem;
  font-weight: 900;
  color: var(--white);
  line-height: 1.2;
  margin: 0 0 0.75rem;
}

/* Baris info: label + nilai */
.featured-nip,
.featured-pangkat,
.featured-pendidikan {
  display: flex;
  gap: 0.75rem;
  align-items: baseline;
  font-size: 0.85rem;
}

.info-label {
  color: var(--gold-light);
  font-weight: 600;
  min-width: 90px;
  font-size: 0.78rem;
}

.info-val {
  color: rgba(255,255,255,0.7);
}

.featured-bio {
  margin-top: 1rem;
  font-size: 0.88rem;
  color: rgba(255,255,255,0.6);
  line-height: 1.8;
  border-top: 1px solid rgba(201,168,76,0.2);
  padding-top: 1rem;
}


/* ══════════════════════════════════════════
   JUDUL SEKSI PEJABAT STRUKTURAL
   ══════════════════════════════════════════ */
.pejabat-seksi-title {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-bottom: 1.5rem;
}

.pejabat-seksi-title h3 {
  font-family: 'Playfair Display', serif;
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--navy);
  white-space: nowrap;
  margin: 0;
}

.seksi-line {
  flex: 1;
  height: 1px;
  background: var(--border);
}


/* ══════════════════════════════════════════
   GRID KARTU PEJABAT STRUKTURAL
   ══════════════════════════════════════════ */
.pejabat-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.25rem;
}

/* Kartu pejabat */
.pejabat-card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: 14px;
  overflow: hidden;
  transition: all 0.25s;
}

.pejabat-card:hover {
  border-color: var(--gold);
  transform: translateY(-4px);
  box-shadow: 0 12px 32px rgba(201,168,76,0.15);
}

/* Foto persegi panjang di atas kartu */
.pejabat-foto-wrap {
  width: 100%;
  aspect-ratio: 3 / 4;    /* proporsi foto portrait */
  background: var(--navy-light);
  overflow: hidden;
  position: relative;
}

.pejabat-foto-wrap img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: top center;
  display: block;
  transition: transform 0.4s ease;
}

.pejabat-card:hover .pejabat-foto-wrap img {
  transform: scale(1.04);
}

/* Fallback inisial jika foto tidak ada */
.pejabat-foto-fallback {
  display: none;
  width: 100%; height: 100%;
  background: linear-gradient(135deg, var(--navy), var(--navy-light));
  align-items: center; justify-content: center;
  font-size: 2rem; font-weight: 900;
  color: var(--gold-light);
  font-family: 'Playfair Display', serif;
  min-height: 180px;
}

/* Body kartu: jabatan, nama, detail */
.pejabat-card-body {
  padding: 1.1rem 1.1rem 1.25rem;
}

/* Nama jabatan */
.pejabat-jabatan {
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 0.3rem;
}

/* Nama pejabat */
.pejabat-nama {
  font-family: 'Playfair Display', serif;
  font-size: 1rem;
  font-weight: 700;
  color: var(--navy);
  line-height: 1.3;
  margin-bottom: 0.85rem;
}

/* Tabel detail NIP, Pangkat, Pendidikan */
.pejabat-detail {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  border-top: 1px solid var(--border);
  padding-top: 0.75rem;
}

.pejabat-detail-row {
  display: flex;
  gap: 0.5rem;
  font-size: 0.78rem;
  align-items: baseline;
}

.detail-label {
  color: var(--text-light);
  min-width: 72px;
  font-weight: 600;
  font-size: 0.72rem;
}

.detail-val {
  color: var(--text-mid);
  line-height: 1.4;
}


/* ══════════════════════════════════════════
   RESPONSIVE
   ══════════════════════════════════════════ */
@media (max-width: 900px) {
  .pejabat-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 700px) {
  /* Featured: foto atas, info bawah */
  .pejabat-featured {
    grid-template-columns: 1fr;
  }

  .featured-foto {
    min-height: 220px;
  }

  .featured-info {
    padding: 1.5rem;
  }

  .featured-nama {
    font-size: 1.4rem;
  }
}

@media (max-width: 500px) {
  .pejabat-grid {
    grid-template-columns: 1fr;
  }
}
