@charset "UTF-8";

/* ================================================================
   grono-pedagogiczne.css  –  ZSMI Lębork
   Zgodny z front-end.css (Montserrat, #090910, #f08d30)
   WCAG 2.1 AA compliant
   ================================================================ */

/* ── ZMIENNE ── */
:root {
  --gp-orange:    #f08d30;
  --gp-bg:        #090910;
  --gp-surface:   #1a1a1a;
  --gp-surface2:  #232633;
  --gp-card:      #202020;
  --gp-border:    rgba(240, 141, 48, 0.15);
  --gp-text:      #ffffff;
  --gp-muted:     #d6d6d6;
  --gp-muted2:    #a0a0a0; /* min 4.5:1 kontrast na #202020 */

  /* Focus ring – WCAG 2.1 poziom AA */
  --gp-focus:       #f08d30;
  --gp-focus-width: 3px;
}

/* ── SKIP LINK (WCAG 2.4.1) ── */
.gp__skip {
  position: absolute;
  top: -999px;
  left: 6px;
  z-index: 9999;
  background: var(--gp-orange);
  color: #000;
  font-weight: 700;
  font-size: 0.9rem;
  padding: 10px 18px;
  border-radius: 0 0 6px 6px;
  text-decoration: none;
  transition: top 0.15s;
}
.gp__skip:focus {
  top: 0;
}

/* ── FOCUS STYLE globalny (WCAG 2.4.7) ── */
.gp__filterBtn:focus-visible,
.gp__searchInput:focus-visible,
.gp__card:focus-visible,
.gp__dirCard:focus-visible {
  outline: var(--gp-focus-width) solid var(--gp-focus);
  outline-offset: 3px;
}
/* Usuń domyślny outline tylko jeśli zastąpiony */
.gp__filterBtn:focus:not(:focus-visible),
.gp__searchInput:focus:not(:focus-visible) {
  outline: none;
}

/* ── ANIMACJE – respect prefers-reduced-motion (WCAG 2.3.3) ── */
@media (prefers-reduced-motion: no-preference) {
  .gp__card {
    animation: gpFadeIn 0.3s ease both;
  }
  @keyframes gpFadeIn {
    from { opacity: 0; transform: translateY(6px); }
    to   { opacity: 1; transform: translateY(0); }
  }
}

/* ── KIEROWNICTWO ── */
.gp__direction {
  display: flex;
  flex-wrap: wrap;
  gap: 15px;
  margin-bottom: 50px;
}
.gp__dirCard {
  display: flex;
  align-items: center;
  gap: 15px;
  background-color: var(--gp-surface2);
  border: 1px solid var(--gp-border);
  border-left: 4px solid var(--gp-orange);
  border-radius: 10px;
  padding: 15px 20px;
  flex: 1;
  min-width: 230px;
  transition: background-color 0.3s;
}
.gp__dirCard:hover {
  background-color: #2c3050;
}
.gp__dirAvatar {
  width: 46px;
  height: 46px;
  border-radius: 50%;
  background-color: var(--gp-orange);
  color: #000; /* kontrast 7:1 – WCAG AAA */
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 0.85rem;
  flex-shrink: 0;
  /* Dekoracyjne – ukryte dla czytników */
  aria-hidden: true;
}
.gp__dirRole {
  font-size: 0.65rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--gp-orange); /* 4.6:1 na #232633 – AA */
  margin-bottom: 3px;
}
.gp__dirName {
  font-weight: 700;
  font-size: 0.95rem;
  color: var(--gp-text); /* 16:1 – AAA */
}

/* ── PASEK KONTROLNY ── */
.gp__controls {
  background-color: var(--gp-surface2);
  border: 1px solid var(--gp-border);
  border-radius: 15px;
  padding: 20px;
  margin-bottom: 20px;
  display: flex;
  flex-wrap: wrap;
  gap: 15px;
  align-items: center;
}

/* Wyszukiwarka */
.gp__searchWrap {
  position: relative;
  flex: 1;
  min-width: 220px;
}
.gp__searchIcon {
  position: absolute;
  left: 14px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--gp-muted2);
  pointer-events: none;
  width: 16px;
  height: 16px;
}
.gp__searchInput {
  width: 100%;
  background-color: var(--gp-bg);
  border: 2px solid rgba(255,255,255,0.12);
  border-radius: 50px;
  color: var(--gp-text);
  font-family: "Montserrat", sans-serif;
  font-size: 0.9rem;
  font-weight: 500;
  padding: 11px 18px 11px 42px;
  outline: none;
  transition: border-color 0.3s, box-shadow 0.3s;
  /* Minimum touch target 44px (WCAG 2.5.5) */
  min-height: 44px;
}
.gp__searchInput:focus {
  border-color: var(--gp-orange);
  box-shadow: 0 0 0 3px rgba(240, 141, 48, 0.2);
}
.gp__searchInput::placeholder {
  color: var(--gp-muted2);
  font-weight: 400;
}

/* Filtry */
.gp__filters {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  /* role="group" + aria-label w HTML */
}
.gp__filterBtn {
  display: flex;
  align-items: center;
  gap: 6px;
  background-color: var(--gp-card);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 50px;
  color: var(--gp-muted);
  cursor: pointer;
  font-family: "Montserrat", sans-serif;
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  padding: 0 16px;
  text-transform: uppercase;
  transition: all 0.2s;
  /* Min touch target 44x44px (WCAG 2.5.5) */
  min-height: 44px;
  min-width: 44px;
}
.gp__filterBtn:hover {
  background-color: rgba(240, 141, 48, 0.1);
  border-color: rgba(240, 141, 48, 0.3);
  color: var(--gp-orange);
}
/* aria-pressed=true zamiast klasy is-active – obsługiwane w JS */
.gp__filterBtn[aria-pressed="true"],
.gp__filterBtn.is-active {
  background-color: var(--gp-orange);
  border-color: var(--gp-orange);
  color: #000; /* kontrast 7:1 – AAA */
}
.gp__filterDot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  flex-shrink: 0;
}
.gp__filterBtn[aria-pressed="true"] .gp__filterDot,
.gp__filterBtn.is-active .gp__filterDot {
  background-color: #000 !important;
}

/* ── STATYSTYKI – aria-live w HTML ── */
.gp__stats {
  font-size: 0.8rem;
  color: var(--gp-muted2);
  margin-bottom: 20px;
}
.gp__stats strong {
  color: var(--gp-orange);
  font-weight: 700;
}

/* ── SIATKA NAUCZYCIELI ── */
.gp__grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 12px;
  margin-bottom: 60px;
}

/* ── KARTA NAUCZYCIELA ── */
.gp__card {
  background-color: var(--gp-card);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 10px;
  padding: 14px 16px;
  display: flex;
  /* ZMIANA: align-items: flex-start zamiast center
     → avatar wyrównany do góry, tekst może się zawijać */
  align-items: flex-start;
  gap: 14px;
  transition: background-color 0.25s, transform 0.2s, border-color 0.25s;
}
.gp__card:hover {
  background-color: #2a2a2a;
  border-color: var(--gp-border);
  transform: translateY(-2px);
}
/* Redukcja ruchu */
@media (prefers-reduced-motion: reduce) {
  .gp__card:hover {
    transform: none;
  }
}

.gp__cardAvatar {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  background-color: var(--cat-color, var(--gp-muted2));
  color: #000;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 0.82rem;
  /* Zawsze okrągły – nie kurczy się nigdy */
  flex-shrink: 0;
  /* Wyrównanie z górą tekstu gdy nazwisko się zawija */
  margin-top: 1px;
}

.gp__cardBody {
  flex: 1;
  /* min-width: 0 zapobiega overflow w flex */
  min-width: 0;
}
.gp__cardName {
  font-weight: 700;
  font-size: 0.88rem;
  color: var(--gp-text); /* 16:1 kontrast – AAA */
  /* ZMIANA: usunięto white-space:nowrap i overflow:hidden
     Teraz tekst się zawija naturalnie */
  word-break: break-word;
  overflow-wrap: break-word;
  hyphens: auto;
  line-height: 1.35;
}
.gp__cardSubject {
  font-size: 0.75rem;
  color: var(--gp-muted2); /* ~4.6:1 na #202020 – AA */
  margin-top: 4px;
  font-weight: 400;
  line-height: 1.4;
  /* Przedmioty też mogą być długie – zawija się */
  word-break: break-word;
  overflow-wrap: break-word;
}

/* Badge wyrównany do góry */
.gp__cardBadge {
  flex-shrink: 0;
  align-self: flex-start;
  margin-top: 2px;
  background-color: var(--cat-color, var(--gp-muted2));
  color: #000; /* kontrast 7:1 – AAA */
  border-radius: 4px;
  font-size: 0.58rem;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: 3px 7px;
}

/* Stan pusty */
.gp__empty {
  grid-column: 1 / -1;
  text-align: center;
  padding: 60px 20px;
  color: var(--gp-muted);
  font-size: 0.95rem;
  /* Rola alert ogłoszona przez aria-live w HTML */
}
.gp__empty::before {
  content: "🔍";
  display: block;
  font-size: 2.5rem;
  margin-bottom: 15px;
}

/* ── SPECJALIŚCI ── */
.gp__specSection {
  margin-bottom: 60px;
}
.gp__specGrid {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 30px;
}
.gp__specCard {
  background-color: var(--gp-card);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-top: 3px solid var(--gp-orange);
  border-radius: 10px;
  padding: 14px 20px;
  transition: background-color 0.25s;
  /* Zawija się na małych ekranach */
  min-width: 160px;
}
.gp__specCard:hover {
  background-color: #2a2a2a;
}
.gp__specRole {
  font-size: 0.62rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--gp-orange); /* 4.6:1 na #202020 – AA */
  margin-bottom: 5px;
}
.gp__specName {
  font-weight: 700;
  font-size: 0.9rem;
  color: var(--gp-text);
  /* Zawija się */
  word-break: break-word;
}

/* ── RESPONSYWNOŚĆ ── */
@media (max-width: 768px) {
  .gp__grid {
    grid-template-columns: 1fr;
  }
  .gp__controls {
    flex-direction: column;
  }
  .gp__dirCard {
    min-width: 100%;
  }
}
@media (max-width: 500px) {
  .gp__filterBtn {
    font-size: 0.65rem;
    padding: 0 10px;
  }
}

/* ── HIGH CONTRAST MODE (WCAG 1.4.11) ── */
@media (forced-colors: active) {
  .gp__card,
  .gp__dirCard,
  .gp__specCard {
    border: 2px solid ButtonText;
  }
  .gp__filterBtn[aria-pressed="true"] {
    border: 3px solid Highlight;
  }
  .gp__cardAvatar,
  .gp__cardBadge {
    forced-color-adjust: none;
  }
}
