/*
 * Self-hosted (not Google Fonts CDN) because the training portal's
 * Content-Security-Policy is "default-src 'none'; style-src 'self';
 * font-src 'self'" - it blocks external stylesheets/fonts and inline
 * <style>/<script> tags. This file and the .woff2 files next to it are
 * served from the portal's own origin via the "theme" static alias, so
 * they satisfy that policy.
 */

@font-face {
  font-family: 'Vazirmatn';
  font-style: normal;
  font-weight: 400 700;
  font-display: swap;
  src: url('/static/workshops/theme/vazirmatn-arabic.woff2') format('woff2');
  unicode-range: U+0600-06FF, U+0750-077F, U+0870-088E, U+0890-0891, U+0897-08E1, U+08E3-08FF, U+200C-200E, U+2010-2011, U+204F, U+2E41, U+FB50-FDFF, U+FE70-FE74, U+FE76-FEFC, U+102E0-102FB, U+10E60-10E7E, U+10EC2-10EC4, U+10EFC-10EFF, U+1EE00-1EE03, U+1EE05-1EE1F, U+1EE21-1EE22, U+1EE24, U+1EE27, U+1EE29-1EE32, U+1EE34-1EE37, U+1EE39, U+1EE3B, U+1EE42, U+1EE47, U+1EE49, U+1EE4B, U+1EE4D-1EE4F, U+1EE51-1EE52, U+1EE54, U+1EE57, U+1EE59, U+1EE5B, U+1EE5D, U+1EE5F, U+1EE61-1EE62, U+1EE64, U+1EE67-1EE6A, U+1EE6C-1EE72, U+1EE74-1EE77, U+1EE79-1EE7C, U+1EE7E, U+1EE80-1EE89, U+1EE8B-1EE9B, U+1EEA1-1EEA3, U+1EEA5-1EEA9, U+1EEAB-1EEBB, U+1EEF0-1EEF1;
}

@font-face {
  font-family: 'Vazirmatn';
  font-style: normal;
  font-weight: 400 700;
  font-display: swap;
  src: url('/static/workshops/theme/vazirmatn-latin.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

body,
button,
input,
select,
textarea,
.navbar,
h1, h2, h3, h4, h5, h6,
p, a, span, div, li, label {
  font-family: 'Vazirmatn', Tahoma, sans-serif;
}

/*
 * The portal lists both Persian and English workshops on the same page
 * (e.g. catalog cards' .card-title/.card-text), so direction can't be set
 * once for the whole page. unicode-bidi: plaintext + text-align: start
 * make each text block resolve its own direction from its own content -
 * the same thing dir="auto" would do on an element, but we can't add
 * that attribute since this only overrides CSS/JS, not the Django
 * templates that render these pages.
 */
h1, h2, h3, h4, h5, h6,
p, li, label, dt, dd, th, td,
.card-title, .card-text, .jumbotron {
  unicode-bidi: plaintext;
  text-align: start;
}

code, pre, kbd, samp {
  direction: ltr;
  text-align: left;
  unicode-bidi: embed;
  font-family: 'Courier New', monospace;
}

ul, ol {
  padding-inline-start: 2rem;
  padding-inline-end: 0;
}

/*
 * ---------------------------------------------------------------------
 * DockerMe branding + modern dashboard look
 * ---------------------------------------------------------------------
 * Everything below is CSS-only (see the CSP note above for why) and
 * targets the markup Educates' training-portal base template renders.
 * Selectors are kept broad/defensive (several fallbacks per element)
 * since we can't change the Django templates from a theme secret.
 */

:root {
  --dockerme-blue: #1976c9;
  --dockerme-blue-dark: #0f5fa8;
  --dockerme-gradient: linear-gradient(90deg, var(--dockerme-blue) 0%, var(--dockerme-blue-dark) 100%);
  --dockerme-bg: #eef2f7;
}

body {
  background: var(--dockerme-bg);
}

/* Navbar: swap the default graduation-cap icon for the DockerMe logo */
.navbar-brand img,
.navbar-brand svg,
.navbar .navbar-brand::before,
nav.navbar img[src*="favicon"],
nav.navbar img[src*="logo"] {
  content: url('/static/workshops/theme/dockerme-logo.png');
  height: 36px;
  width: auto;
  object-fit: contain;
}

.navbar,
nav.navbar {
  background: var(--dockerme-gradient) !important;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.15);
}

.navbar .navbar-text,
.navbar-brand {
  font-weight: 700;
  letter-spacing: 0.02em;
}

/* Workshop cards */
.card {
  border: none;
  border-top: 4px solid transparent;
  border-image: var(--dockerme-gradient);
  border-image-slice: 1;
  border-radius: 14px;
  box-shadow: 0 2px 10px rgba(37, 41, 66, 0.08);
  transition: transform 0.15s ease, box-shadow 0.15s ease;
  overflow: hidden;
}

.card:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 24px rgba(37, 41, 66, 0.18);
}

.card-title {
  font-weight: 700;
  color: #0f2942;
}

.card-text {
  color: #55606b;
}

.btn-primary,
a.btn-primary,
button[type="submit"].btn {
  background: var(--dockerme-gradient) !important;
  border: none !important;
  border-radius: 8px;
  font-weight: 600;
  padding: 0.55rem 1rem;
  transition: filter 0.15s ease;
}

.btn-primary:hover,
a.btn-primary:hover,
button[type="submit"].btn:hover {
  filter: brightness(1.1);
}

a,
.text-primary {
  color: var(--dockerme-blue);
}

a:hover {
  color: var(--dockerme-blue-dark);
}
