/* ========================================
   Department page (new design)
   pages/portal/department-new.html
======================================== */

.dp2-page {
  --d-navy: #00344b;
  --d-navy-2: #002b3d;
  --d-mint: #00ceb7;
  --d-teal: #169c8c;
  --d-ink: #17323f;
  --d-muted: #5d717b;
  --d-line: #e3eaec;
  --d-soft: #f4f8f9;
  background: #ffffff;
  color: var(--d-ink);
}

.dp2-page [hidden] { display: none !important; }

.dp2-wrap {
  width: min(calc(100% - 72px), var(--container, 1320px));
  margin-inline: auto;
}

/* ---------- Buttons ---------- */

.dp2-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  height: 50px;
  padding: 0 24px;
  border-radius: 10px;
  font-size: 15px;
  font-weight: 700;
  text-decoration: none;
  transition: transform .15s ease, background .15s ease, box-shadow .15s ease;
}

.dp2-btn:hover { transform: translateY(-1px); }

.dp2-btn-mint {
  background: var(--d-mint);
  color: var(--d-navy-2);
  box-shadow: 0 10px 24px rgba(0, 206, 183, .28);
}

.dp2-btn-mint:hover { background: #12dcc4; }

.dp2-btn-glass {
  border: 1px solid rgba(255, 255, 255, .45);
  background: rgba(255, 255, 255, .08);
  color: #ffffff;
  backdrop-filter: blur(6px);
}

.dp2-btn-glass:hover { background: rgba(255, 255, 255, .16); }

.dp2-btn-link {
  height: 50px;
  padding: 0 6px;
  color: rgba(255, 255, 255, .85);
  font-weight: 600;
}

.dp2-btn-navy { background: var(--d-navy); color: #ffffff; }
.dp2-btn-navy:hover { background: var(--d-navy-2); }

.dp2-btn-line {
  border: 1px solid #c9d6da;
  background: #ffffff;
  color: var(--d-navy);
}

/* ---------- Hero ---------- */

.dp2-hero {
  position: relative;
  min-height: 520px;
  display: flex;
  align-items: center;
  background: var(--d-navy) url("../assets/images/public/hero.jpg") left 40% / cover no-repeat;
  overflow: hidden;
}

.dp2-hero-shade {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(to left, rgba(0, 38, 54, .96) 0%, rgba(0, 43, 61, .9) 38%, rgba(0, 52, 75, .35) 70%, rgba(0, 52, 75, .08) 100%),
    linear-gradient(to top, rgba(0, 38, 54, .45), transparent 40%);
}

.dp2-hero-inner {
  position: relative;
  z-index: 1;
  padding: 72px 0 120px;
  color: #ffffff;
}

.dp2-crumb {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 26px;
  color: rgba(255, 255, 255, .7);
  font-size: 13px;
}

.dp2-crumb a { color: rgba(255, 255, 255, .7); text-decoration: none; }
.dp2-crumb a:hover { color: #ffffff; }
.dp2-crumb span:last-child { color: var(--d-mint); }

.dp2-hero h1 {
  max-width: 640px;
  margin: 0 0 18px;
  font-size: clamp(34px, 4.2vw, 54px);
  line-height: 1.25;
  font-weight: 700;
}

.dp2-hero p {
  max-width: 520px;
  margin: 0 0 34px;
  color: rgba(255, 255, 255, .82);
  font-size: 17px;
  line-height: 1.9;
}

.dp2-hero-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
}

/* ---------- Work board ---------- */

.dp2-board {
  position: relative;
  z-index: 2;
  display: grid;
  grid-template-columns: 1.25fr 1fr 1fr;
  gap: 18px;
  margin-top: -72px;
}

.dp2-board-card {
  display: flex;
  flex-direction: column;
  gap: 10px;
  min-height: 210px;
  padding: 28px 30px;
  border: 1px solid var(--d-line);
  border-radius: 18px;
  background: #ffffff;
  box-shadow: 0 18px 44px rgba(0, 52, 75, .10);
  color: var(--d-ink);
  text-decoration: none;
  transition: transform .2s ease, box-shadow .2s ease, border-color .2s ease;
}

a.dp2-board-card:hover {
  border-color: #bfe9e2;
  box-shadow: 0 22px 50px rgba(0, 52, 75, .14);
  transform: translateY(-3px);
}

a.dp2-board-card:focus { outline: none; }
a.dp2-board-card:focus-visible { border-color: var(--d-mint); box-shadow: 0 0 0 3px rgba(0, 206, 183, .3); }

.dp2-board-new {
  position: relative;
  overflow: hidden;
  border: 0;
  background: linear-gradient(150deg, #004663 0%, var(--d-navy) 58%, var(--d-navy-2) 100%);
  color: #ffffff;
}

.dp2-board-new::after {
  content: "";
  position: absolute;
  left: -70px;
  bottom: -90px;
  width: 240px;
  height: 240px;
  border: 34px solid rgba(0, 206, 183, .12);
  border-radius: 50%;
  pointer-events: none;
}

.dp2-board-new h2 { margin: 0; color: #ffffff; font-size: 23px; }
.dp2-board-new p { margin: 0; color: rgba(255, 255, 255, .76); font-size: 14.5px; line-height: 1.85; }
.dp2-board-new .dp2-btn { position: relative; z-index: 1; align-self: flex-start; margin-top: auto; height: 46px; font-size: 14.5px; }

.dp2-board-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  color: var(--d-muted);
  font-size: 13.5px;
  font-weight: 600;
}

.dp2-board-head svg { width: 24px; height: 24px; color: var(--d-teal); }

.dp2-board-title {
  overflow: hidden;
  color: var(--d-navy);
  font-size: 20px;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.dp2-board-current:not(.is-live) .dp2-board-title { color: #9fb2b9; font-size: 17px; font-weight: 600; }

.dp2-board-bar {
  display: block;
  height: 6px;
  overflow: hidden;
  border-radius: 3px;
  background: #e6eef0;
}

.dp2-board-bar i {
  display: block;
  width: 0;
  height: 100%;
  border-radius: 3px;
  background: var(--d-mint);
  transition: width .6s ease;
}

.dp2-board-num { color: var(--d-navy); font-size: 42px; font-weight: 700; line-height: 1.1; }

.dp2-board-meta {
  overflow: hidden;
  color: var(--d-muted);
  font-size: 13.5px;
  line-height: 1.7;
  text-overflow: ellipsis;
}

.dp2-board-link {
  margin-top: auto;
  color: var(--d-teal);
  font-size: 14px;
  font-weight: 700;
}

/* ---------- Sections ---------- */

.dp2-section { padding: 88px 0 0; }

.dp2-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 34px;
}

.dp2-kicker {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 10px;
  color: var(--d-teal);
  font-size: 14px;
  font-weight: 700;
}

.dp2-kicker::before {
  content: "";
  width: 22px;
  height: 2px;
  border-radius: 2px;
  background: var(--d-mint);
}

.dp2-section h2 {
  margin: 0 0 10px;
  color: var(--d-navy);
  font-size: clamp(26px, 2.6vw, 34px);
  line-height: 1.35;
}

.dp2-section p {
  margin: 0;
  color: var(--d-muted);
  font-size: 16px;
  line-height: 1.9;
}

.dp2-more {
  color: var(--d-teal);
  font-weight: 700;
  text-decoration: none;
  white-space: nowrap;
}

/* ---------- Presentation types ---------- */

.dp2-types {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));
  gap: 16px;
}

.dp2-type {
  display: flex;
  flex-direction: column;
  gap: 10px;
  min-height: 220px;
  padding: 24px;
  border: 1px solid var(--d-line);
  border-radius: 14px;
  background: #ffffff;
  color: var(--d-ink);
  text-decoration: none;
  transition: border-color .15s ease, box-shadow .15s ease, transform .15s ease;
}

.dp2-type:hover {
  border-color: var(--d-mint);
  box-shadow: 0 16px 36px rgba(0, 52, 75, .1);
  transform: translateY(-2px);
}

.dp2-type-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.dp2-type-top strong { color: var(--d-navy); font-size: 18px; }

.dp2-type-count {
  padding: 3px 10px;
  border-radius: 999px;
  background: var(--d-soft);
  color: var(--d-muted);
  font-size: 12px;
  white-space: nowrap;
}

.dp2-type small { color: var(--d-muted); font-size: 13.5px; line-height: 1.8; }

.dp2-type-spine {
  display: flex;
  gap: 4px;
  margin-top: auto;
}

.dp2-type-spine i {
  flex: 1;
  height: 5px;
  border-radius: 3px;
  background: #d7e3e6;
}

.dp2-type:hover .dp2-type-spine i { background: var(--d-mint); }

.dp2-type-names {
  overflow: hidden;
  color: #8a9ca4;
  font-size: 12px;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.dp2-type-go {
  color: var(--d-teal);
  font-size: 14px;
  font-weight: 700;
}

/* ---------- Library ---------- */

.dp2-library { padding-top: 96px; }

.dp2-library-grid {
  display: grid;
  grid-template-columns: minmax(0, 5fr) minmax(0, 6fr);
  align-items: center;
  gap: 56px;
  padding: 56px;
  border-radius: 24px;
  background: linear-gradient(135deg, #f4f9fa 0%, #eaf6f4 100%);
}

.dp2-numbers {
  display: flex;
  gap: 36px;
  margin: 30px 0 32px;
}

.dp2-numbers div { display: flex; flex-direction: column-reverse; gap: 2px; }
.dp2-numbers dd { margin: 0; color: var(--d-navy); font-size: 36px; font-weight: 700; line-height: 1.1; }
.dp2-numbers dt { color: var(--d-muted); font-size: 13.5px; }

.dp2-library-links { display: flex; flex-wrap: wrap; gap: 12px; }

.dp2-library-visual,
.dp2-about-visual { margin: 0; }

.dp2-library-visual img {
  display: block;
  width: 100%;
  border-radius: 18px;
  mix-blend-mode: multiply;
}

/* ---------- Newest slides ---------- */

.dp2-slides {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 18px;
}

.dp2-slide {
  display: grid;
  gap: 8px;
  color: var(--d-ink);
  text-decoration: none;
}

.dp2-slide-img {
  display: block;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  border: 1px solid var(--d-line);
  border-radius: 12px;
  background: var(--d-soft);
}

.dp2-slide-img img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform .3s ease;
}

.dp2-slide:hover .dp2-slide-img img { transform: scale(1.03); }
.dp2-slide strong { color: var(--d-navy); font-size: 14.5px; }
.dp2-slide small { color: var(--d-muted); font-size: 12.5px; }

/* ---------- About ---------- */

.dp2-about { padding-bottom: 104px; }

.dp2-about-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  align-items: center;
  gap: 64px;
}

.dp2-about-visual img {
  display: block;
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  border-radius: 20px;
  box-shadow: 0 24px 60px rgba(0, 52, 75, .14);
}

.dp2-roles {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 22px 28px;
  margin: 32px 0 0;
  padding: 0;
  list-style: none;
}

.dp2-roles li { display: flex; gap: 14px; }

.dp2-roles span {
  flex: 0 0 auto;
  color: var(--d-mint);
  font-size: 15px;
  font-weight: 700;
}

.dp2-roles strong { display: block; margin-bottom: 4px; color: var(--d-navy); font-size: 15.5px; }
.dp2-roles small { color: var(--d-muted); font-size: 13.5px; line-height: 1.7; }

/* ---------- Responsive ---------- */

@media (max-width: 1000px) {
  .dp2-library-grid,
  .dp2-about-grid { grid-template-columns: 1fr; gap: 36px; padding: 36px; }
  .dp2-about-grid { padding: 0; }
  .dp2-slides { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .dp2-board { grid-template-columns: 1fr 1fr; }
  .dp2-board-new { grid-column: 1 / -1; }
}

@media (max-width: 760px) {
  .dp2-wrap { width: calc(100% - 32px); }
  .dp2-hero { min-height: 460px; }
  .dp2-hero-shade { background: linear-gradient(to top, rgba(0, 38, 54, .95) 20%, rgba(0, 52, 75, .7)); }
  .dp2-board { grid-template-columns: 1fr; }
  .dp2-roles { grid-template-columns: 1fr; }
  .dp2-numbers { gap: 22px; }
  .dp2-library-grid { padding: 24px; }
}

.dp2-about-visual img { object-position: 30% center; }

/* «إعادة تصميم عرض» link under «إنشاء عرض جديد» */
.dp2-board-alt { display: block; margin-top: 14px; color: rgba(255, 255, 255, .72); font-size: 13.5px; text-decoration: none; }
.dp2-board-alt b { color: #00ceb7; font-weight: 700; }
.dp2-board-alt:hover b { text-decoration: underline; }
