/* Styles for the work section only. This folder owns everything it needs
   (page, stylesheet, QHSE logo); nothing is loaded from outside it.
   Kept in its own file, not inline, so the Content-Security-Policy in
   _headers can forbid inline styles and scripts outright. */

:root {
  --bg: #f6f5f2;
  --surface: #ffffff;
  --text: #1c1c1c;
  --muted: #5f6363;
  --border: #e2e0da;
  --accent: #0f5f5c;
  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #121414;
    --surface: #1b1e1e;
    --text: #ececec;
    --muted: #a0a6a6;
    --border: #2c3131;
    --accent: #4fb8b2;
    color-scheme: dark;
  }
}

*,
*::before,
*::after { box-sizing: border-box; }

body {
  margin: 0 auto;
  max-width: 760px;
  padding: 32px 16px;
  background: var(--bg);
  color: var(--text);
  /* Segoe UI carries Arabic on Windows; the rest cover other systems. */
  font-family: system-ui, "Segoe UI", Tahoma, "Noto Sans Arabic", sans-serif;
  font-size: 16px;
  line-height: 1.6;
}

.crumbs {
  display: flex;
  gap: 8px;
  margin-bottom: 32px;
  color: var(--muted);
  font-size: 0.9rem;
}

.crumbs a {
  color: var(--accent);
  text-decoration: none;
}

.crumbs a:hover { text-decoration: underline; }

.dept {
  display: flex;
  align-items: center;
  gap: 20px;
  margin-bottom: 40px;
}

/* The logo file carries its own dark background, so the tile reads the same
   in light and dark mode. */
.dept-logo {
  flex: none;
  border-radius: 24px;
}

h1 {
  margin: 0;
  font-size: 1.75rem;
  line-height: 1.2;
}

.dept-desc {
  margin: 6px 0 0;
  color: var(--muted);
}

.dept-en {
  display: block;
  font-size: 0.9rem;
}

section { margin-bottom: 40px; }

/* No letter-spacing anywhere: it breaks the joins between Arabic letters. */
h2 {
  margin: 0 0 12px;
  color: var(--muted);
  font-size: 1rem;
  font-weight: 600;
}

.cards {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 12px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.card {
  display: flex;
  flex-direction: column;
  gap: 6px;
  height: 100%;
  padding: 20px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: var(--surface);
  color: inherit;
  text-decoration: none;
  transition: border-color 0.15s ease;
}

.card:hover { border-color: var(--accent); }

.card:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

.card-title {
  font-size: 1.15rem;
  font-weight: 700;
}

.card-desc { color: var(--muted); }

.card-host {
  margin-top: auto;
  padding-top: 8px;
  color: var(--accent);
  font-size: 0.9rem;
  /* Keeps the address on the start side of the card in right-to-left text. */
  align-self: flex-start;
}

.empty {
  margin: 0;
  padding: 20px;
  border: 1px dashed var(--border);
  border-radius: 12px;
  color: var(--muted);
}

.footer {
  padding-top: 24px;
  border-top: 1px solid var(--border);
  color: var(--muted);
  font-size: 0.85rem;
}

@media (max-width: 480px) {
  .dept {
    flex-direction: column;
    align-items: flex-start;
  }
}
