/* ====================================
——— VEDENÍ A ZAMĚSTNANCI: SPOLEČNÝ VZHLED
===================================== */
.staff-page {
  --staff-color: #ea7066;
  --staff-dark: #ea7066;
  --staff-soft: #ea7066;
  --staff-primary: #f0c24b;
  color: #29333a;
  font-family: "Open Sans", Arial, sans-serif;
  font-size: 16px;
}

.staff-page--purple {
  --staff-color: #a597e7;
  --staff-dark: #714195;
  --staff-soft: #f6effb;
}

.staff-page h1,
.staff-page h2,
.staff-page h3,
.staff-page h4 {
  font-family: "Dosis", "Open Sans", Arial, sans-serif;
  line-height: 1.25;
}

/* ====================================
——— HORNÍ FOTOGRAFIE
===================================== */
.staff-hero {
  position: relative;
  overflow: hidden;
  background: #30383e;
}

.staff-hero__image,
.staff-hero__overlay {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

.staff-hero__image {
  object-fit: cover;
  object-position: center;
}

.staff-hero__overlay {
  background: linear-gradient(90deg, rgba(22, 27, 31, .68), rgba(22, 27, 31, .22));
}

.staff-hero > .container {
  position: relative;
  z-index: 1;
}

/* ====================================
——— ÚVOD A FILTRY
===================================== */
.staff-intro,
.staff-section {
  padding: 76px 0;
}

.staff-section--soft {
  background: var(--staff-soft);
}

.staff-section--alternating {
  padding: 0;
  overflow: hidden;
  background: #fff;
}

.staff-section--alternating .staff-group {
  padding: 68px 0;
}

.staff-section--alternating .staff-group:nth-of-type(odd) {
  background: var(--staff-soft);
  box-shadow: 0 0 0 100vmax var(--staff-soft);
  clip-path: inset(0 -100vmax);
}

.staff-section--alternating .staff-group + .staff-group {
  margin-top: 0;
}

.staff-lead {
  max-width: 900px;
  margin: 0 auto 44px;
  text-align: center;
}

.staff-kicker {
  margin-bottom: 10px;
  color: var(--staff-dark);
  font-weight: 800;
  letter-spacing: .1em;
  text-transform: uppercase;
}

.staff-lead h2,
.staff-section-title h2 {
  color: var(--staff-dark);
  font-weight: 800;
}

.staff-lead > p:last-child {
  font-size: 1.06rem;
  line-height: 1.85;
}

.staff-section-title {
  margin-bottom: 30px;
  text-align: center;
}

.staff-page:not(.staff-page--purple) .staff-section-title h2 {
  display: inline-block;
  margin: 0;
  padding: 10px 22px;
  border-radius: 12px;
  background: #fff;
  color: var(--staff-color);
}

.staff-filter {
  display: grid;
  grid-template-columns: minmax(240px, 1fr) auto;
  gap: 12px;
  max-width: 900px;
  margin: 0 auto 22px;
}

.staff-filter input {
  min-height: 50px;
  padding: 12px 16px;
  border: 2px solid rgba(113, 65, 149, .22);
  border-radius: 12px;
  background: #fff;
}

.staff-filter button {
  min-height: 50px;
  padding: 11px 22px;
  border: 0;
  border-radius: 12px;
  background: var(--staff-color);
  color: #fff;
  font-weight: 800;
}

.staff-filter button:hover,
.staff-filter button:focus {
  background: #f4c241;
  color: #29333a;
}

.staff-chips {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 9px;
  margin-bottom: 42px;
}

.staff-chips a {
  padding: 8px 14px;
  border: 2px solid var(--staff-color);
  border-radius: 999px;
  color: var(--staff-dark);
  font-weight: 800;
}

.staff-chips a:hover,
.staff-chips a:focus,
.staff-chips a.active {
  background: var(--staff-color);
  color: #fff;
}

/* ====================================
——— KARTY OSOB
===================================== */
.staff-group + .staff-group {
  margin-top: 58px;
}

.staff-group__heading {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 14px;
  margin-bottom: 24px;
  text-align: center;
}

.staff-group__heading span {
  display: grid;
  place-items: center;
  width: 50px;
  height: 50px;
  border-radius: 14px;
  background: var(--staff-color);
  color: #fff;
}

.staff-group__heading h2 {
  margin: 0;
  color: var(--staff-dark);
  font-weight: 800;
}

.staff-grid {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 24px;
}

.staff-grid > .staff-card {
  flex: 0 1 270px;
  width: 100%;
}

.staff-grid__row-break {
  flex-basis: 100%;
  width: 0;
  height: 0;
}

.staff-carousel__stage {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  align-items: center;
}

.staff-carousel__arrow,
.staff-carousel__counter {
  display: none;
}

/* ====================================
——— TŘÍDNÍ UČITELÉ PODLE ROČNÍKŮ
===================================== */
.class-grade + .class-grade {
  margin-top: 38px;
}

.class-grade__title {
  width: fit-content;
  margin: 0 auto 22px;
  padding: 10px 22px;
  border: 3px solid var(--staff-color);
  border-radius: 13px;
  background: #fff;
  color: var(--staff-dark);
  font-size: 1.25rem;
  font-weight: 800;
  text-align: center;
}

.class-grade__stage {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  align-items: center;
}

.class-grade__grid {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 24px;
}

.class-grade__card {
  flex: 0 1 270px;
  width: 100%;
}

.staff-card__class {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 58px;
  margin: -38px auto 13px;
  padding: 7px 12px;
  border: 4px solid #fff;
  border-radius: 999px;
  background: var(--staff-color);
  color: #fff;
  font-size: .9rem;
  font-weight: 800;
  position: relative;
}

.staff-card {
  overflow: hidden;
  border: 1px solid rgba(70, 75, 82, .12);
  border-top: 5px solid var(--staff-color);
  border-radius: 18px;
  background: #fff;
  box-shadow: 0 12px 34px rgba(45, 36, 53, .08);
  text-align: center;
  transition: transform .2s ease, box-shadow .2s ease;
}

.staff-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 18px 40px rgba(45, 36, 53, .14);
}

.staff-card__photo {
  display: block;
  aspect-ratio: 1 / 1;
  overflow: hidden;
  background: var(--staff-soft);
}

.staff-card__photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.staff-card__body {
  padding: 22px 18px 24px;
}

.staff-card h3 {
  margin: 0 0 7px;
  font-size: 1.25rem;
}

.staff-card h3 a {
  color: var(--staff-dark);
  font-weight: 800;
}

.staff-card__role {
  margin: 0;
  color: #657178;
  font-size: .93rem;
  line-height: 1.5;
}

.staff-card__subjects {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  margin-top: 13px;
  padding: 6px 10px;
  border-radius: 999px;
  background: var(--staff-soft);
  color: var(--staff-dark);
  font-size: .82rem;
  font-weight: 700;
}

.staff-empty {
  padding: 38px;
  border-radius: 18px;
  background: #fff;
  text-align: center;
}

/* ====================================
——— KARTY VEDENÍ
===================================== */
.leadership-grid {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 28px;
}

.leadership-card {
  display: grid;
  grid-template-columns: 210px minmax(0, 1fr);
  flex: 0 1 calc(50% - 14px);
  overflow: hidden;
  border: 1px solid rgba(234, 112, 102, .22);
  border-radius: 20px;
  background: #fff;
  box-shadow: 0 14px 38px rgba(78, 35, 35, .09);
}

.leadership-card__photo {
  display: block;
  min-height: 290px;
  background: var(--staff-soft);
}

.leadership-card__photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.leadership-card__body {
  padding: 28px;
}

.leadership-card__title {
  color: #4d5358;
  font-size: .85rem;
  font-weight: 800;
  letter-spacing: .08em;
  text-transform: uppercase;
}

.leadership-card h3 {
  margin: 10px 0 12px;
  font-size: 1.55rem;
}

.leadership-card h3 a {
  color: var(--staff-color);
  font-weight: 800;
}

.leadership-card p {
  line-height: 1.7;
}

.staff-contact-links {
  display: grid;
  gap: 7px;
  margin-top: 18px;
}

.staff-contact-links a {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--staff-dark);
  font-weight: 700;
}

.staff-contact-links a:hover,
.staff-contact-links a:focus {
  color: var(--staff-primary);
  text-decoration: underline;
}

/* ====================================
——— SDÍLENÝ MEDAILONEK
===================================== */
.profile-page {
  padding: 72px 0;
  background: #f7f8f9;
}

.profile-layout {
  display: grid;
  grid-template-columns: minmax(280px, .7fr) minmax(0, 1.3fr);
  gap: 46px;
  align-items: start;
}

.profile-photo {
  overflow: hidden;
  border: 8px solid #fff;
  border-radius: 22px;
  background: #fff;
  box-shadow: 0 18px 45px rgba(35, 41, 45, .13);
}

.profile-photo img {
  width: 100%;
  aspect-ratio: 1 / 1;
  object-fit: cover;
}

.profile-content {
  padding: 10px 0;
}

.profile-content h1 {
  margin: 6px 0 8px;
  color: var(--staff-color);
  font-size: 2.6rem;
  font-weight: 800;
}

.profile-role {
  margin-bottom: 22px;
  color: #4d5358;
  font-size: 1.08rem;
  font-weight: 700;
}

.profile-roles {
  display: grid;
  gap: 5px;
  margin: 0 0 22px;
}

.profile-roles span {
  display: block;
  color: var(--staff-color);
  font-size: 1.04rem;
  font-weight: 800;
  line-height: 1.45;
  overflow-wrap: anywhere;
}

.profile-facts {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin: 24px 0;
}

.profile-fact {
  padding: 16px 18px;
  border-radius: 13px;
  background: #fff;
}

.profile-fact small {
  display: block;
  color: #7b858a;
  font-weight: 700;
}

.profile-fact strong,
.profile-fact a {
  color: var(--staff-color);
}

.profile-fact a:hover,
.profile-fact a:focus {
  color: var(--staff-primary);
  text-decoration: underline;
}

.profile-bio {
  font-size: 1.03rem;
  line-height: 1.85;
}

.profile-extra {
  margin-top: 24px;
  padding: 22px;
  border-left: 5px solid var(--staff-color);
  border-radius: 12px;
  background: var(--staff-soft);
}

.profile-back {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  margin-bottom: 22px;
  color: var(--staff-color);
  font-weight: 800;
}

.staff-page:not(.staff-page--purple) .profile-extra {
  background: #fff;
  color: #29333a;
}

@media (max-width: 1199px) {
  .staff-grid > .staff-card { flex-basis: 235px; }
  .class-grade__grid { gap: 18px; }
  .class-grade__card { flex-basis: 235px; }
  .leadership-card { grid-template-columns: 175px minmax(0, 1fr); }
}

@media (max-width: 991px) {
  .leadership-card { flex-basis: 100%; }
}

@media (max-width: 767px) {
  .staff-intro,
  .staff-section { padding: 54px 0; }
  .staff-filter,
  .profile-layout { grid-template-columns: 1fr; }
  .class-grade + .class-grade { margin-top: 44px; }
  .class-grade__title { width: 100%; margin-bottom: 18px; }
  .staff-carousel__stage { grid-template-columns: 46px minmax(0, 1fr) 46px; gap: 10px; }
  .staff-carousel__slides { display: block; min-width: 0; }
  .staff-grid__row-break { display: none; }
  .staff-carousel__slide { display: none; width: 100%; }
  .staff-carousel__slide.is-active { display: block; }
  .staff-carousel__arrow {
    display: grid;
    place-items: center;
    width: 46px;
    height: 46px;
    padding: 0;
    border: 2px solid var(--staff-color);
    border-radius: 50%;
    background: #fff;
    color: var(--staff-dark);
    cursor: pointer;
  }
  .staff-carousel__arrow:hover,
  .staff-carousel__arrow:focus { background: var(--staff-color); color: #fff; }
  .staff-carousel__arrow[hidden] { visibility: hidden; }
  .staff-carousel__counter { display: block; min-height: 1.4em; margin: 10px 0 0; color: var(--staff-dark); font-size: .84rem; font-weight: 700; text-align: center; }
  .leadership-card { grid-template-columns: 130px minmax(0, 1fr); }
  .leadership-card__photo { min-height: 250px; }
  .profile-content h1 { font-size: 2rem; }
  .profile-roles span { font-size: .98rem; }
}

@media (max-width: 575px) {
  .profile-facts { grid-template-columns: 1fr; }
  .staff-grid > .staff-card { flex-basis: 100%; }
  .leadership-card { grid-template-columns: 1fr; }
  .leadership-card__photo { min-height: auto; aspect-ratio: 1 / 1; }
}
