/* ==========================================================================
   طراحان (Designers) - department-only styles ("ds-"). Loaded by Sections\Engineers\Section::extraAssets()
   on designers pages only; builds on the shared dept.css tokens (--dp-*). RTL-first.
   ========================================================================== */

/* ---------- landing: the eight disciplines ---------- */
.ds-types { display: grid; gap: 16px; grid-template-columns: repeat(4, minmax(0, 1fr)); }
.ds-type { display: flex; flex-direction: column; gap: 6px; padding: 22px 20px; border-radius: var(--dp-radius); background: #fff; border: 1px solid var(--dp-line); text-decoration: none; color: inherit; transition: transform .18s, box-shadow .18s, border-color .18s; }
.ds-type:hover { transform: translateY(-4px); box-shadow: var(--dp-shadow); border-color: color-mix(in srgb, var(--dp-accent) 45%, var(--dp-line)); }
.ds-type__ico { display: grid; place-items: center; width: 52px; height: 52px; border-radius: 16px; color: #fff; font-size: 1.25rem; background: linear-gradient(135deg, var(--dp-accent), var(--dp-accent-2)); margin-bottom: 6px; }
.ds-type b { color: var(--dp-ink); font-size: 1.02rem; line-height: 1.7; }
.ds-type small { color: var(--dp-muted); line-height: 1.8; }
.ds-type__count { margin-top: auto; padding-top: 8px; font-size: .82rem; font-weight: 700; color: var(--dp-accent); }


/* ---------- landing: every type's expertise list (collapsible, all links crawlable) ---------- */
.ds-exp { display: grid; gap: 12px; }
.ds-exp details { background: #fff; border: 1px solid var(--dp-line); border-radius: 16px; overflow: hidden; }
.ds-exp summary { display: flex; align-items: center; gap: 12px; padding: 16px 20px; cursor: pointer; list-style: none; font-weight: 800; color: var(--dp-ink); }
.ds-exp summary::-webkit-details-marker { display: none; }
.ds-exp summary > i:first-child { display: grid; place-items: center; width: 38px; height: 38px; border-radius: 12px; color: var(--dp-accent); background: color-mix(in srgb, var(--dp-accent) 10%, #fff); }
.ds-exp summary .ds-exp__n { margin-inline-start: auto; font-size: .8rem; font-weight: 700; color: var(--dp-muted); }
.ds-exp summary::after { content: "\f078"; font: 900 .8rem "Font Awesome 6 Free"; color: var(--dp-muted); transition: transform .2s; }
.ds-exp details[open] summary::after { transform: rotate(180deg); }
.ds-exp details[open] summary { border-bottom: 1px solid var(--dp-line); }
.ds-exp .dp-tags { padding: 16px 20px 20px; }
.ds-exp .dp-tags small { opacity: .7; }

/* ---------- single: licence facts, expertise by type ---------- */
.ds-licence { display: grid; gap: 14px; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); margin: 0; }
.ds-licence > div { padding: 14px 16px; border-radius: 14px; background: var(--dp-soft); }
.ds-licence dt { font-size: .78rem; font-weight: 700; color: var(--dp-muted); margin-bottom: 4px; }
.ds-licence dd { margin: 0; font-weight: 800; color: var(--dp-ink); }
.ds-licence dd.is-ltr { direction: ltr; text-align: end; font-family: ui-monospace, Menlo, Consolas, monospace; }
.ds-bytype { display: grid; gap: 18px; }
.ds-bytype h3 { display: flex; align-items: center; gap: 8px; margin: 0 0 8px; font-size: .98rem; color: var(--dp-ink); }
.ds-bytype h3 i { color: var(--dp-accent); }
.ds-projects { display: grid; gap: 10px; margin: 0; padding: 0; list-style: none; }
.ds-projects li { padding: 14px 16px; border: 1px solid var(--dp-line); border-radius: 14px; }
.ds-projects b { color: var(--dp-ink); }
.ds-projects small { display: block; margin-top: 4px; color: var(--dp-muted); line-height: 1.8; }

@media (max-width: 1000px) { .ds-types { grid-template-columns: repeat(2, minmax(0, 1fr)); } .ds-types .ds-type:last-child:nth-child(4n + 3) { grid-column: auto; } }
@media (max-width: 560px) { .ds-types { grid-template-columns: 1fr; } }
@media (prefers-reduced-motion: reduce) { .ds-type, .ds-exp summary::after { transition: none; } .ds-type:hover { transform: none; } }
