/* ============================================================
   ARIO — 14 DEPARTMENTS
   Nav dropdowns + Department list + Department detail
   Titles: navy → blue → navy · ANIMATED FLOW ✨
   ============================================================ */

body:has(.dept-list),
body:has(.dept-hero) {
  background: #ffffff !important;
  background-attachment: initial !important;
}
body:has(.dept-list)::before,
body:has(.dept-list)::after,
body:has(.dept-hero)::before,
body:has(.dept-hero)::after {
  display: none !important;
  content: none !important;
}

/* ============================================================
   NAV DROPDOWN
   ============================================================ */
.nav-dropdown {
  position: relative;
  display: inline-block;
}

.nav-link-drop {
  display: inline-flex;
  align-items: center;
  gap: .35rem;
  cursor: default;
}

button.nav-link-drop {
  font-family: var(--font-fa);
  font-size: .88rem;
  font-weight: 700;
  border: 1.5px solid rgba(232, 236, 243, .95);
  background: rgba(255, 255, 255, .5);
  appearance: none;
  -webkit-appearance: none;
  color: var(--text-soft);
  text-align: inherit;
}

button.nav-link-drop:hover {
  color: var(--blue-700);
}

.nav-caret {
  width: 11px;
  height: 11px;
  flex-shrink: 0;
  transition: transform .3s cubic-bezier(.4, 0, .2, 1);
  opacity: .8;
}

.nav-dropdown.is-open .nav-caret {
  transform: rotate(180deg);
  opacity: 1;
}

.nav-dropdown-menu {
  position: absolute;
  top: calc(100% + 10px);
  right: 50%;
  transform: translateX(50%) translateY(-8px) scale(.96);
  width: 340px;
  min-width: 340px;
  max-width: 340px;
  padding: 0;
  border-radius: 18px;
  background: #ffffff;
  border: 1.5px solid rgba(59, 130, 246, .18);
  box-shadow:
    0 30px 70px rgba(15, 23, 42, .18),
    0 8px 24px rgba(15, 23, 42, .08),
    0 0 0 1px rgba(255, 255, 255, 1) inset;
  opacity: 0;
  visibility: hidden;
  overflow: hidden;
  transform-origin: top center;
  z-index: 200;
  pointer-events: none;
  transition: none;
}

.nav-dropdown-menu-lg {
  width: 340px;
  min-width: 340px;
  max-width: 340px;
}

.nav-dropdown.is-open .nav-dropdown-menu {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  transform: translateX(50%) translateY(0) scale(1);
  transition:
    opacity .22s cubic-bezier(.4, 0, .2, 1),
    transform .35s cubic-bezier(.34, 1.3, .5, 1),
    visibility 0s;
}

.ndm-list {
  padding: .5rem;
  display: flex;
  flex-direction: column;
  gap: 2px;
  max-height: 420px;
  overflow-y: auto;
  scrollbar-width: thin;
  scrollbar-color: rgba(59, 130, 246, .35) transparent;
  border-radius: 18px;
}
.ndm-list::-webkit-scrollbar { width: 5px; }
.ndm-list::-webkit-scrollbar-track { background: transparent; }
.ndm-list::-webkit-scrollbar-thumb {
  background: rgba(59, 130, 246, .28);
  border-radius: 100px;
}
.ndm-list::-webkit-scrollbar-thumb:hover { background: rgba(59, 130, 246, .55); }

.ndm-item {
  position: relative;
  display: flex;
  align-items: center;
  gap: .75rem;
  padding: .7rem .8rem .7rem .9rem;
  border-radius: 12px;
  text-decoration: none;
  color: inherit;
  isolation: isolate;
  transition:
    background .25s cubic-bezier(.4, 0, .2, 1),
    transform .25s cubic-bezier(.4, 0, .2, 1);
}

.ndm-item::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg,
    rgba(59, 130, 246, .07),
    rgba(124, 58, 237, .05) 55%,
    transparent);
  opacity: 0;
  transition: opacity .3s;
  border-radius: inherit;
  z-index: 0;
}
.ndm-item:hover::before { opacity: 1; }
.ndm-item:hover { transform: translateX(-3px); }
.ndm-item > * { position: relative; z-index: 1; }

.ndm-body {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.ndm-name {
  font-family: var(--font-fa);
  font-size: .84rem;
  font-weight: 800;
  color: var(--text-soft);
  line-height: 1.35;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  transition: color .25s cubic-bezier(.4, 0, .2, 1);
}
.ndm-item:hover .ndm-name { color: var(--blue-600); }

.ndm-desc {
  font-family: var(--font-fa);
  font-size: .71rem;
  font-weight: 500;
  color: var(--text-soft);
  line-height: 1.35;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.ndm-arrow {
  flex-shrink: 0;
  display: grid;
  place-items: center;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  color: var(--blue-600);
  background: rgba(59, 130, 246, 0);
  opacity: 0;
  transform: translateX(6px);
  transition:
    opacity .25s,
    transform .3s cubic-bezier(.34, 1.3, .5, 1),
    background .25s;
}
.ndm-arrow svg { width: 13px; height: 13px; display: block; }

.ndm-item:hover .ndm-arrow {
  opacity: 1;
  transform: translateX(0);
  background: rgba(59, 130, 246, .1);
}

@media (max-width: 1080px) {
  .nav-dropdown-menu,
  .nav-dropdown-menu-lg {
    width: 320px;
    min-width: 320px;
    max-width: 320px;
  }
  .ndm-name { font-size: .8rem; }
  .ndm-desc { font-size: .68rem; }
}

@media (max-width: 860px) {
  .nav-dropdown-menu,
  .nav-dropdown-menu-lg {
    position: static;
    transform: none;
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
    box-shadow: none;
    background: rgba(255, 255, 255, .6);
    border-color: rgba(59, 130, 246, .14);
    margin-top: .4rem;
    display: none;
    border-radius: 14px;
    overflow: visible;
    width: 100%;
    min-width: 100%;
    max-width: 100%;
  }
  .nav-dropdown.is-open .nav-dropdown-menu {
    display: block;
    transform: none;
  }
  .ndm-list { max-height: none; border-radius: 14px; }
}

/* ============================================================
   ✅ keyframe مشترک — افکت «From Origin to Impact»
   ============================================================ */
@keyframes arioTitleFlow {
  0%, 100% { background-position:   0% center; }
  50%      { background-position: 100% center; }
}

/* ============================================================
   DEPARTMENTS LIST PAGE
   ============================================================ */
.dept-list {
  padding: 4rem 2rem 5rem;
  max-width: 1280px;
  margin-inline: auto;
  background: #ffffff;
  min-height: calc(100vh - 96px);
  display: flex;
  align-items: center;
  justify-content: center;
}

.dept-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 1.3rem;
  width: 100%;
}

.dept-card {
  --d1: #3b82f6;
  --d2: #1d4ed8;
  --dr: 59, 130, 246;
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: .9rem;
  padding: 2.4rem 1.5rem 2rem;
  border-radius: 22px;
  background: #ffffff;
  border: 1.5px solid rgba(var(--dr), .15);
  box-shadow:
    0 8px 24px rgba(15, 23, 42, .05),
    inset 0 1px 0 rgba(255, 255, 255, 1);
  text-decoration: none;
  color: inherit;
  overflow: hidden;
  isolation: isolate;
  transition: transform .4s cubic-bezier(.4,0,.2,1), box-shadow .4s, border-color .4s;
}
.dept-card:hover {
  transform: translateY(-8px);
  border-color: rgba(var(--dr), .5);
  box-shadow:
    0 24px 55px rgba(var(--dr), .18),
    0 0 0 3px rgba(var(--dr), .08);
}
.dept-card-shine {
  position: absolute;
  top: 0; left: -110%;
  width: 55%; height: 100%;
  background: linear-gradient(120deg, transparent, rgba(255,255,255,.7), transparent);
  transform: skewX(-20deg);
  transition: left .85s cubic-bezier(.4,0,.2,1);
  pointer-events: none;
  z-index: 5;
}
.dept-card:hover .dept-card-shine { left: 160%; }

.dept-blue   { --d1: #3b82f6; --d2: #1d4ed8; --dr: 59, 130, 246; }
.dept-violet { --d1: #8b5cf6; --d2: #6d28d9; --dr: 139, 92, 246; }
.dept-cyan   { --d1: #06b6d4; --d2: #0891b2; --dr: 6, 182, 212; }
.dept-pink   { --d1: #ec4899; --d2: #be185d; --dr: 236, 72, 153; }

.dept-card-icon-wrap {
  position: relative;
  width: 92px;
  height: 92px;
  display: grid;
  place-items: center;
  isolation: isolate;
}

.dept-card-icon {
  position: relative;
  z-index: 3;
  display: grid;
  place-items: center;
  width: 100%;
  height: 100%;
  border-radius: 26px;
  color: var(--d1);

  background:
    linear-gradient(135deg,
      rgba(255, 255, 255, .85) 0%,
      rgba(255, 255, 255, .5) 45%,
      rgba(255, 255, 255, .3) 100%);
  border: 1.5px solid rgba(255, 255, 255, .95);
  backdrop-filter: blur(14px) saturate(180%);
  -webkit-backdrop-filter: blur(14px) saturate(180%);
  box-shadow:
    0 8px 22px rgba(15, 23, 42, .08),
    0 2px 6px rgba(15, 23, 42, .04),
    inset 0 1px 0 rgba(255, 255, 255, 1),
    inset 0 -1px 0 rgba(255, 255, 255, .5);

  transition: transform .4s cubic-bezier(.34, 1.3, .5, 1),
              box-shadow .4s,
              background .4s,
              border-color .4s;
}

.dept-card-icon::before {
  content: '';
  position: absolute;
  top: -50%;
  left: -60%;
  width: 60%;
  height: 200%;
  background: linear-gradient(120deg,
    transparent 0%,
    rgba(255, 255, 255, .9) 50%,
    transparent 100%);
  transform: rotate(20deg);
  pointer-events: none;
  z-index: 1;
  transition: left .8s cubic-bezier(.4, 0, .2, 1);
}

.dept-card-icon::after {
  content: '';
  position: absolute;
  top: 10px;
  left: 12px;
  width: 16px;
  height: 9px;
  border-radius: 50%;
  background: radial-gradient(ellipse at center,
    rgba(255, 255, 255, 1) 0%,
    rgba(255, 255, 255, .4) 50%,
    transparent 100%);
  filter: blur(1.5px);
  pointer-events: none;
  z-index: 1;
}

.dept-card:hover .dept-card-icon {
  transform: translateY(-4px) scale(1.08) rotate(-4deg);
  background:
    linear-gradient(135deg,
      rgba(255, 255, 255, .95) 0%,
      rgba(255, 255, 255, .7) 45%,
      rgba(255, 255, 255, .45) 100%);
  border-color: rgba(255, 255, 255, 1);
  box-shadow:
    0 14px 32px rgba(var(--dr), .18),
    0 4px 10px rgba(15, 23, 42, .06),
    0 0 0 4px rgba(255, 255, 255, .35),
    inset 0 1px 0 rgba(255, 255, 255, 1),
    inset 0 -1px 0 rgba(255, 255, 255, .6);
}
.dept-card:hover .dept-card-icon::before {
  left: 130%;
}

.dept-card-svg {
  position: relative;
  z-index: 2;
  width: 48px;
  height: 48px;
  color: var(--d1);
  filter: drop-shadow(0 2px 4px rgba(0, 0, 0, .12));
  transition: transform .4s cubic-bezier(.34, 1.3, .5, 1);
  transform-origin: 50% 55%;
}

.dept-card:hover .dept-card-svg {
  transform: scale(1.15) rotate(-6deg);
}

.dept-card-icon-ring {
  position: absolute;
  inset: -8px;
  border-radius: 32px;
  border: 2px dashed rgba(var(--dr), .3);
  animation: ringSpin 24s linear infinite;
  z-index: 1;
  pointer-events: none;
}

/* ✅ Department card name — animated gradient flow */
.dept-card-name {
  font-family: var(--font-fa);
  font-size: 1.2rem;
  font-weight: 900;
  letter-spacing: -.015em;
  margin: 0;
  line-height: 1.4;
  background: linear-gradient(90deg,
    #1e3a8a 0%,
    #1e40af 20%,
    #1d4ed8 35%,
    #2563eb 45%,
    #3b82f6 50%,
    #2563eb 55%,
    #1d4ed8 65%,
    #1e40af 80%,
    #1e3a8a 100%);
  background-size: 200% auto;
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  -webkit-text-fill-color: transparent;
  animation: arioTitleFlow 6s ease-in-out infinite;
  transition: filter .25s;
}

.dept-card:hover .dept-card-name {
  filter: brightness(1.15) saturate(1.15)
          drop-shadow(0 0 12px rgba(59, 130, 246, .35));
}

@media (max-width: 1100px) {
  .dept-grid {
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  }
}

@media (max-width: 640px) {
  .dept-list {
    padding: 2.5rem 1rem 3rem;
    min-height: auto;
  }
  .dept-grid {
    grid-template-columns: 1fr;
    gap: 1.1rem;
  }
  .dept-card {
    padding: 2rem 1.4rem 1.7rem;
  }
  .dept-card-icon-wrap { width: 82px; height: 82px; }
  .dept-card-svg { width: 42px; height: 42px; }
  .dept-card-name { font-size: 1.1rem; }
}

/* ============================================================
   DEPARTMENT HERO — text right · visual left
   ============================================================ */
.dept-hero {
  position: relative;
  padding: 4rem 2rem 3rem;
  background: #ffffff;
}

.dept-hero-inner {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.05fr);
  align-items: center;
  gap: 2.5rem;
  max-width: 1100px;
  margin-inline: auto;
  text-align: right;
}

/* ────────── TEXT (right) ────────── */
.dept-hero-text {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: .35rem;
  min-width: 0;
}

/* ────────── VISUAL (left) ────────── */
.dept-hero-visual {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  min-width: 0;
}

.dept-hero-img {
  display: block;
  width: 100%;
  max-width: 520px;
  height: auto;
  object-fit: contain;
  filter: drop-shadow(0 24px 48px rgba(15, 23, 42, .12));
  transition: transform .55s cubic-bezier(.4, 0, .2, 1);
}

.dept-hero-visual:hover .dept-hero-img {
  transform: translateY(-6px) scale(1.02);
}

/* ────────── Sticker (fallback for depts without image) ────────── */
.dept-sticker-wrap {
  position: relative;
  width: 160px;
  height: 160px;
  display: grid;
  place-items: center;
  isolation: isolate;
}

.dept-sticker-ring {
  position: absolute;
  inset: -10px;
  border-radius: 50%;
  border: 2px dashed rgba(59, 130, 246, .35);
  animation: ringSpin 22s linear infinite;
  z-index: 1;
  pointer-events: none;
}

.dept-sticker {
  position: relative;
  z-index: 2;
  display: grid;
  place-items: center;
  width: 100%;
  height: 100%;
  border-radius: 36px;
  color: var(--blue-600);

  background:
    linear-gradient(135deg,
      rgba(255, 255, 255, .9) 0%,
      rgba(255, 255, 255, .55) 45%,
      rgba(255, 255, 255, .35) 100%);
  border: 2px solid rgba(255, 255, 255, 1);
  backdrop-filter: blur(16px) saturate(180%);
  -webkit-backdrop-filter: blur(16px) saturate(180%);
  box-shadow:
    0 14px 34px rgba(15, 23, 42, .12),
    0 4px 12px rgba(15, 23, 42, .06),
    0 0 0 1px rgba(59, 130, 246, .08),
    inset 0 2px 0 rgba(255, 255, 255, 1),
    inset 0 -2px 0 rgba(255, 255, 255, .6);

  animation: deptStickerFloat 3.4s ease-in-out infinite;
  transition: transform .4s cubic-bezier(.34, 1.3, .5, 1);
}

.dept-sticker::before {
  content: '';
  position: absolute;
  top: -50%;
  left: -60%;
  width: 60%;
  height: 200%;
  background: linear-gradient(120deg,
    transparent 0%,
    rgba(255, 255, 255, 1) 50%,
    transparent 100%);
  transform: rotate(20deg);
  animation: deptStickerShine 4s ease-in-out infinite;
  pointer-events: none;
  z-index: 1;
  border-radius: inherit;
}

.dept-sticker-svg {
  position: relative;
  z-index: 3;
  width: 64px;
  height: 64px;
  color: var(--blue-600);
  filter: drop-shadow(0 2px 4px rgba(59, 130, 246, .2));
  transition: transform .4s cubic-bezier(.34, 1.3, .5, 1);
}

.dept-sticker-wrap:hover .dept-sticker-svg {
  transform: scale(1.15) rotate(-8deg);
}

@keyframes deptStickerFloat {
  0%, 100% { transform: translateY(0)     rotate(-2deg); }
  50%      { transform: translateY(-8px)  rotate(2deg);  }
}
@keyframes deptStickerShine {
  0%        { left: -60%; }
  55%, 100% { left: 160%; }
}

/* ────────── Tag + Title + Tagline ────────── */
.dept-tag {
  display: inline-block;
  font-family: var(--font-fa);
  font-size: .8rem;
  font-weight: 800;
  letter-spacing: 0;
  color: var(--blue-500);
  margin-bottom: .6rem;
}

/* ✅ Department title — animated gradient flow */
.dept-title {
  font-family: var(--font-fa);
  font-size: clamp(2rem, 4.5vw, 3rem);
  font-weight: 900;
  line-height: 1.3;
  letter-spacing: -.02em;
  margin: 0 0 1rem;
  background: linear-gradient(90deg,
    #1e3a8a 0%,
    #1e40af 20%,
    #1d4ed8 35%,
    #2563eb 45%,
    #3b82f6 50%,
    #2563eb 55%,
    #1d4ed8 65%,
    #1e40af 80%,
    #1e3a8a 100%);
  background-size: 200% auto;
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  -webkit-text-fill-color: transparent;
  animation: arioTitleFlow 6s ease-in-out infinite;
}

.dept-tagline {
  font-family: var(--font-fa);
  font-size: 1.15rem;
  line-height: 1.9;
  color: var(--blue-700);
  font-weight: 700;
  margin: 0;
  letter-spacing: -.005em;
}

/* ────────── Responsive ────────── */
@media (max-width: 900px) {
  .dept-hero-inner {
    grid-template-columns: 1fr;
    gap: 2rem;
    text-align: center;
  }
  .dept-hero-text {
    align-items: center;
    order: 1;
  }
  .dept-hero-visual {
    order: 2;
  }
  .dept-hero-img { max-width: 400px; }
}

@media (max-width: 640px) {
  .dept-hero { padding: 3rem 1rem 2.5rem; }
  .dept-hero-img { max-width: 320px; }
  .dept-sticker-wrap { width: 120px; height: 120px; }
  .dept-sticker { border-radius: 28px; }
  .dept-sticker-svg { width: 48px; height: 48px; }
  .dept-title { font-size: 1.75rem; }
  .dept-tagline { font-size: 1rem; }
}

/* ============================================================
   DEPARTMENT DETAIL BODY
   ============================================================ */
.dept-detail-body {
  padding: 3rem 2rem 5rem;
  max-width: 1280px;
  margin-inline: auto;
  background: #ffffff;
}
.dept-detail-grid-2 {
  display: grid;
  grid-template-columns: 1fr 380px;
  gap: 2rem;
  align-items: start;
}

.dept-detail-main {
  padding: 2rem;
  background: #ffffff;
  border: 1.5px solid rgba(59, 130, 246, .12);
  border-radius: 22px;
  box-shadow: 0 8px 24px rgba(15, 23, 42, .05);
}

.dept-detail-side {
  padding: 1.8rem 1.5rem;
  background: #ffffff;
  border: 1.5px solid rgba(59, 130, 246, .12);
  border-radius: 22px;
  box-shadow: 0 8px 24px rgba(15, 23, 42, .05);
  position: sticky;
  top: 110px;
}

.dept-intro {
  position: relative;
  display: flex;
  align-items: flex-start;
  gap: .95rem;
  padding: 1.15rem 1.3rem;
  margin-bottom: 1.8rem;
  border-radius: 16px;
  background: linear-gradient(135deg,
    rgba(59, 130, 246, .06),
    rgba(124, 58, 237, .04) 60%,
    transparent);
  border: 1.5px solid rgba(59, 130, 246, .18);
  overflow: hidden;
}
.dept-intro::before {
  content: '';
  position: absolute;
  top: 0; bottom: 0; right: 0;
  width: 3px;
  background: linear-gradient(180deg, #3b82f6, #7c3aed, #ec4899);
  border-radius: 100px;
}
.dept-intro-icon {
  flex-shrink: 0;
  width: 34px;
  height: 34px;
  border-radius: 10px;
  display: grid;
  place-items: center;
  background: linear-gradient(135deg, #3b82f6, #7c3aed);
  color: #fff;
  box-shadow:
    0 6px 16px rgba(59, 130, 246, .35),
    inset 0 1px 0 rgba(255, 255, 255, .3);
}
.dept-intro-icon svg { width: 16px; height: 16px; display: block; }
.dept-intro-text {
  flex: 1;
  font-family: var(--font-fa);
  font-size: .92rem;
  line-height: 2.05;
  color: #334155;
  font-weight: 500;
  margin: 0;
  text-align: justify;
}

.dept-detail-section-title {
  display: flex;
  align-items: center;
  gap: .6rem;
  font-family: var(--font-fa);
  font-size: 1.1rem;
  font-weight: 900;
  color: var(--ink-900);
  margin: 0 0 1.1rem;
  padding-bottom: .8rem;
  border-bottom: 1.5px dashed rgba(59, 130, 246, .2);
}
.dept-detail-section-title:not(:first-child) { margin-top: 2rem; }
.dept-detail-section-title svg { color: var(--blue-500); flex-shrink: 0; }

.dept-detail-desc {
  font-family: var(--font-fa);
  font-size: .96rem;
  line-height: 2.15;
  color: #475569;
  font-weight: 500;
  text-align: justify;
}

.dept-highlights {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  gap: .7rem;
}
.dept-highlights li {
  display: flex;
  align-items: center;
  gap: .7rem;
  padding: .85rem 1rem;
  border-radius: 12px;
  background: rgba(59, 130, 246, .04);
  border: 1px solid rgba(59, 130, 246, .12);
  font-family: var(--font-fa);
  font-size: .9rem;
  font-weight: 700;
  color: var(--ink-800);
}
.dept-highlight-check {
  flex-shrink: 0;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: linear-gradient(135deg, #10b981, #059669);
  color: #fff;
  box-shadow: 0 4px 10px rgba(16, 185, 129, .3);
}

/* ============================================================
   DEPARTMENT COURSES — clickable cards
   ============================================================ */
.dept-courses {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: .9rem;
}

.dept-courses-vertical {
  display: flex;
  flex-direction: column;
  gap: .7rem;
  grid-template-columns: none;
}

.dept-course-card {
  position: relative;
  padding: 1rem 1.1rem;
  border-radius: 14px;
  background: rgba(59, 130, 246, .04);
  border: 1.5px solid rgba(59, 130, 246, .15);
  transition: all .3s;
  text-decoration: none;
  color: inherit;
  display: block;
}

.dept-course-card-link {
  cursor: pointer;
}
.dept-course-card-link:hover {
  transform: translateX(-3px);
  border-color: rgba(59, 130, 246, .5);
  box-shadow: 0 10px 24px rgba(59, 130, 246, .15);
  background: rgba(59, 130, 246, .07);
}
.dept-course-card-link::after {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: inherit;
  z-index: 0;
  cursor: pointer;
}
.dept-course-card-link > * { position: relative; z-index: 1; }

.dept-course-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: .5rem;
  margin-bottom: .5rem;
}
.dept-course-name {
  font-family: var(--font-fa);
  font-size: .92rem;
  font-weight: 900;
  color: var(--ink-900);
  margin: 0;
  display: inline-flex;
  align-items: center;
  gap: .4rem;
}
.dept-course-icon {
  font-size: 1.1rem;
  line-height: 1;
}
.dept-course-level {
  font-family: var(--font-fa);
  font-size: .68rem;
  font-weight: 800;
  padding: .18rem .55rem;
  border-radius: 100px;
  background: rgba(59, 130, 246, .1);
  color: var(--blue-700);
  border: 1px solid rgba(59, 130, 246, .2);
  flex-shrink: 0;
}
.dept-course-meta {
  display: flex;
  align-items: center;
  gap: .9rem;
  font-family: var(--font-fa);
  font-size: .74rem;
  font-weight: 700;
  color: var(--text-soft);
}
.dept-course-meta span {
  display: inline-flex;
  align-items: center;
  gap: .3rem;
}
.dept-course-meta svg { color: var(--blue-500); flex-shrink: 0; }
.dept-course-arrow {
  margin-inline-start: auto;
  color: var(--blue-600);
  opacity: 0;
  transition: opacity .25s, transform .25s;
}
.dept-course-card-link:hover .dept-course-arrow {
  opacity: 1;
  transform: translateX(-3px);
}

/* ============================================================
   COMING SOON STATE — department with no courses yet
   ============================================================ */
.dept-courses-soon {
  text-align: center;
  padding: 2rem 1rem;
  border-radius: 16px;
  background: linear-gradient(135deg, rgba(251, 191, 36, .06), rgba(236, 72, 153, .04));
  border: 1.5px dashed rgba(251, 191, 36, .4);
}
.dept-courses-soon-icon {
  font-size: 2rem;
  margin-bottom: .5rem;
  display: inline-block;
  animation: soonBounce 2.4s ease-in-out infinite;
}
@keyframes soonBounce {
  0%, 100% { transform: translateY(0) rotate(-6deg); }
  50%      { transform: translateY(-6px) rotate(6deg); }
}
.dept-courses-soon-title {
  font-family: var(--font-fa);
  font-size: 1rem;
  font-weight: 900;
  color: #b45309;
  margin: 0 0 .35rem;
}
.dept-courses-soon-text {
  font-family: var(--font-fa);
  font-size: .84rem;
  line-height: 1.8;
  color: var(--text-soft);
  margin: 0;
  font-weight: 600;
}

/* ============================================================
   CTA — support card
   ============================================================ */
.dept-detail-cta {
  display: flex;
  align-items: center;
  gap: .85rem;
  padding: 1rem 1.1rem;
  margin-top: 1.4rem;
  border-radius: 14px;
  background: linear-gradient(135deg, rgba(16, 185, 129, .08), rgba(6, 182, 212, .05));
  border: 1.5px solid rgba(16, 185, 129, .25);
  text-decoration: none;
  color: inherit;
  transition: all .3s;
}
.dept-detail-cta:hover {
  transform: translateY(-2px);
  border-color: rgba(16, 185, 129, .6);
  box-shadow: 0 12px 28px rgba(16, 185, 129, .22);
}
.dept-detail-cta-icon {
  flex-shrink: 0;
  width: 42px;
  height: 42px;
  border-radius: 12px;
  display: grid;
  place-items: center;
  font-size: 1.3rem;
  background: linear-gradient(135deg, #10b981, #06b6d4);
  box-shadow: 0 8px 20px rgba(16, 185, 129, .3);
}
.dept-detail-cta-body { display: flex; flex-direction: column; gap: .1rem; }
.dept-detail-cta-title {
  font-family: var(--font-fa);
  font-size: .92rem;
  font-weight: 900;
  color: #047857;
}
.dept-detail-cta-desc {
  font-family: var(--font-fa);
  font-size: .78rem;
  font-weight: 600;
  color: var(--text-soft);
}

/* ============================================================
   RESPONSIVE — detail
   ============================================================ */
@media (max-width: 1024px) {
  .dept-detail-grid-2 { grid-template-columns: 1fr; }
  .dept-detail-side { position: static; }
}

@media (max-width: 640px) {
  .dept-detail-body { padding: 2rem 1rem 3rem; }
  .dept-detail-main,
  .dept-detail-side { padding: 1.4rem 1.2rem; border-radius: 18px; }
  .dept-intro { padding: 1rem; gap: .7rem; }
  .dept-intro-icon { width: 30px; height: 30px; border-radius: 9px; }
  .dept-intro-text { font-size: .86rem; line-height: 1.95; }
}

/* ============================================================
   Reduced motion
   ============================================================ */
@media (prefers-reduced-motion: reduce) {
  .dept-card-name,
  .dept-title {
    animation: none !important;
    background-position: 50% center !important;
  }
}