:root {
  --text-main: #0f172a;
  --text-muted: #475569;
  --accent-color: #6366f1;
  --tag-bg: #f8fafc;
  --page-bg: #f1f5f9;

  --wrapper-bg: #ffffff;
  --wrapper-shadow: 0 25px 50px -12px rgba(15, 23, 42, 0.08);
  --wrapper-border: 1px solid rgba(15, 23, 42, 0.05);
}

body {
  background-color: var(--page-bg);
  -webkit-font-smoothing: antialiased;
}

.employees-page {
  font-family:
    "Inter",
    system-ui,
    -apple-system,
    sans-serif;
  color: var(--text-main);
}

.employees-hero {
  position: relative;
  margin-bottom: 56px;
  padding: clamp(2rem, 5vw, 3.5rem) clamp(1.5rem, 4vw, 3rem);
  border-radius: 32px;
  overflow: hidden;
  background: linear-gradient(
    135deg,
    rgba(255, 255, 255, 0.97) 0%,
    rgba(248, 250, 252, 0.92) 100%
  );
  border: 1px solid rgba(99, 102, 241, 0.12);
  box-shadow:
    0 24px 60px -20px rgba(99, 102, 241, 0.18),
    0 8px 24px -12px rgba(15, 23, 42, 0.06);
}

.employees-hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 0% 0%, rgba(99, 102, 241, 0.08), transparent 42%),
    radial-gradient(
      circle at 100% 100%,
      rgba(139, 92, 246, 0.07),
      transparent 40%
    );
  pointer-events: none;
}

.employees-hero-glow {
  position: absolute;
  border-radius: 50%;
  filter: blur(60px);
  opacity: 0.55;
  pointer-events: none;
}

.employees-hero-glow--left {
  width: 220px;
  height: 220px;
  top: -60px;
  left: -40px;
  background: rgba(99, 102, 241, 0.35);
}

.employees-hero-glow--right {
  width: 180px;
  height: 180px;
  bottom: -50px;
  right: 8%;
  background: rgba(167, 139, 250, 0.3);
}

.employees-hero-inner {
  position: relative;
  z-index: 1;
  max-width: 820px;
}

.employees-kicker {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin: 0 0 20px;
  padding: 8px 16px 8px 12px;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #4338ca;
  background: linear-gradient(
    135deg,
    rgba(99, 102, 241, 0.12),
    rgba(139, 92, 246, 0.08)
  );
  border: 1px solid rgba(99, 102, 241, 0.2);
  border-radius: 999px;
  backdrop-filter: blur(6px);
}

.employees-kicker-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: linear-gradient(135deg, #6366f1, #8b5cf6);
  box-shadow: 0 0 0 4px rgba(99, 102, 241, 0.18);
  flex-shrink: 0;
  animation: employees-kicker-pulse 2.4s ease-in-out infinite;
}

@keyframes employees-kicker-pulse {
  0%,
  100% {
    transform: scale(1);
    opacity: 1;
  }
  50% {
    transform: scale(1.15);
    opacity: 0.85;
  }
}

.employees-title-main {
  margin: 0 0 18px;
  font-size: clamp(2.25rem, 5vw, 3.75rem);
  font-weight: 900;
  line-height: 1.08;
  letter-spacing: -0.04em;
}

.employees-title-line {
  display: block;
  color: #0f172a;
}

.employees-title-accent {
  display: block;
  background: linear-gradient(120deg, #4f46e5 0%, #7c3aed 45%, #6366f1 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  color: transparent;
}

.employees-subtitle {
  margin: 0;
  max-width: 680px;
  font-size: clamp(1rem, 2vw, 1.2rem);
  line-height: 1.75;
  font-weight: 450;
  color: #475569;
  border-left: 3px solid rgba(99, 102, 241, 0.45);
  padding-left: 18px;
}

.employees-hero-divider {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-top: 28px;
  max-width: 420px;
}

.employees-hero-divider-line {
  flex: 1;
  height: 1px;
  background: linear-gradient(
    90deg,
    rgba(99, 102, 241, 0.5),
    rgba(99, 102, 241, 0.05)
  );
}

.employees-hero-divider-line:last-child {
  background: linear-gradient(
    90deg,
    rgba(99, 102, 241, 0.05),
    rgba(99, 102, 241, 0.5)
  );
}

.employees-hero-divider-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  font-size: 0.95rem;
  color: #6366f1;
  background: rgba(255, 255, 255, 0.85);
  border: 1px solid rgba(99, 102, 241, 0.15);
  border-radius: 12px;
  box-shadow: 0 4px 14px rgba(99, 102, 241, 0.12);
}

.employees-back-link {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 12px 24px;
  background: linear-gradient(135deg, #8c92d1 0%, #c1b3d9 100%);
  color: white !important;
  text-decoration: none;
  border-radius: 14px;
  font-weight: 600;
  margin-bottom: 40px;
  transition: 0.3s ease;
  box-shadow: 0 4px 15px rgba(140, 146, 209, 0.3);
}

.employees-back-link:hover {
  transform: translateX(-5px);
  filter: brightness(1.05);
}

.employees-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 35px;
  width: 100%;
}

.employee-card {
  background: #ffffff;
  border-radius: 32px;
  padding: 24px;
  box-shadow: 0 15px 35px rgba(15, 23, 42, 0.04);
  border: 1px solid rgba(15, 23, 42, 0.04);
  transition:
    transform 0.3s cubic-bezier(0.165, 0.84, 0.44, 1),
    box-shadow 0.3s ease;
  height: 100%;
}

.employee-card:hover {
  transform: translateY(-8px);
  box-shadow: 0 25px 45px rgba(99, 102, 241, 0.1);
}

.employee-card-link {
  text-decoration: none !important;
  display: flex;
  flex-direction: column;
  height: 100%;
  gap: 20px;
}

.employee-card .employee-photo-wrap {
  width: 100%;
  aspect-ratio: 1 / 1;
  border-radius: 24px;
  overflow: hidden;
  background: var(--tag-bg);
}

.employee-card .employee-photo {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.employee-card .employee-body {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 12px;
  flex-grow: 1;
}

.employee-card .employee-name {
  margin: 0;
  line-height: 1.2;
  width: 100%;
}

.employee-card .last-name {
  display: block;
  font-size: 1.8rem;
  font-weight: 850;
  color: #0f172a;
  margin-bottom: 4px;
}

.employee-card .first-patronymic {
  display: block;
  font-size: 1.25rem;
  font-weight: 600;
  color: var(--text-muted);
}

.employee-card .employee-meta {
  margin-top: auto;
  background: #f3f4f6;
  color: #4f46e5;
  padding: 8px 16px;
  border-radius: 12px;
  font-size: 0.9rem;
  font-weight: 700;
  display: inline-block;
}

.employees-main-wrapper {
  background: var(--wrapper-bg);
  border-radius: 40px;
  padding: 50px;
  box-shadow: var(--wrapper-shadow);
  border: var(--wrapper-border);
  display: block;
  height: auto;
}

.employees-details-layout {
  display: flex;
  gap: 50px;
  align-items: flex-start;
}

.sticky-sidebar-wrapper {
  flex: 0 0 540px;
}

.employees-left-sticky-panel {
  position: -webkit-sticky;
  position: sticky;
  top: 40px;
  display: grid;
  grid-template-columns: 180px 1fr;
  gap: 25px;
  background: var(--tag-bg);
  padding: 24px;
  border-radius: 32px;
  border: 1px solid rgba(15, 23, 42, 0.02);
  align-items: flex-start;
}

.employees-details-photo-wrap {
  width: 100%;
  aspect-ratio: 1 / 1;
  border-radius: 24px;
  overflow: hidden;
  box-shadow: 0 10px 25px rgba(15, 23, 42, 0.05);
  background: #ffffff;
}

.employees-details-photo {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.employees-details-intro-box {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding-top: 5px;
}

.employees-details-intro-box .last-name {
  display: block;
  font-size: 2.2rem;
  font-weight: 850;
  color: var(--text-main);
  letter-spacing: -0.02em;
}

.employees-details-intro-box .first-patronymic {
  display: block;
  font-size: 1.4rem;
  font-weight: 600;
  color: var(--text-muted);
  margin-top: 4px;
}

.employees-details-intro-box .employee-meta {
  display: inline-flex;
  align-self: start;
  background: #ffffff;
  color: var(--accent-color);
  padding: 6px 14px;
  border-radius: 10px;
  font-size: 0.85rem;
  font-weight: 700;
  border: 1px solid rgba(99, 102, 241, 0.15);
}

.employee-card-contact-box {
  margin-top: 5px;
  padding-top: 10px;
  border-top: 1px solid rgba(15, 23, 42, 0.08);
}

.contact-label {
  display: block;
  font-size: 0.7rem;
  text-transform: uppercase;
  color: var(--text-muted);
  font-weight: 700;
  letter-spacing: 0.03em;
  margin-bottom: 2px;
}

.employee-contact-link {
  font-size: 1rem;
  color: var(--accent-color);
  text-decoration: none;
  font-weight: 600;
}

.employees-right-scroll-content {
  flex: 1;
  height: auto;
  min-height: min-content;
  padding-top: 5px;
}

.employees-section-title {
  font-size: 1.4rem;
  font-weight: 800;
  margin: 0 0 16px 0;
  color: var(--text-main);
  display: flex;
  align-items: center;
  gap: 10px;
}

.title-icon {
  font-size: 1.3rem;
}

.info-text-block,
.bio-text {
  font-size: 1.1rem;
  line-height: 1.75;
  color: #334155;
}

.bio-text p {
  margin-bottom: 12px;
}

.employees-divider {
  height: 1px;
  background: rgba(15, 23, 42, 0.08);
  margin: 30px 0;
}

.employee-detail-hero {
  display: grid;
  grid-template-columns: minmax(180px, 240px) minmax(0, 1fr);
  align-items: center;
  gap: 28px;
  margin-bottom: 0;
}

.employee-detail-hero-inner {
  width: 100%;
  max-width: none;
}

.employee-detail-hero-content {
  width: 100%;
}

.employee-detail-title {
  margin-bottom: 10px;
}

.employee-detail-subtitle {
  max-width: min(100%, 680px);
}

.employee-profile-photo-wrap {
  width: 100%;
  aspect-ratio: 1 / 1;
  border-radius: 20px;
  overflow: hidden;
  border: 1px solid #f0f0f0;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
}
.employee-detail-photo-wrap {
  width: min(240px, 100%);
  justify-self: start;
}

.employee-profile-photo {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.certificates-section {
  text-align: center;
}

.certificates-section .employees-section-title {
  justify-content: center;
}

.certificates-slider-wrap {
  width: 100%;
  max-width: none;
  margin: 0 auto;
}

.certificates-mask-wrapper {
  width: 100%;
  overflow: hidden;
  padding: 10px 0;
  mask-image: linear-gradient(
    to right,
    transparent,
    black 4%,
    black 96%,
    transparent
  );
  -webkit-mask-image: linear-gradient(
    to right,
    transparent,
    black 4%,
    black 96%,
    transparent
  );
}

.certificates-track {
  display: flex;
  gap: 24px;
  width: max-content;
  animation: scroll-certificates 26s linear infinite;
}

.certificates-track:hover {
  animation-play-state: paused;
}

@keyframes scroll-certificates {
  0% {
    transform: translateX(0);
  }
  100% {
    transform: translateX(-50%);
  }
}

.certificate-card {
  width: min(360px, 42vw);
  height: 240px;
  background: #fff;
  border-radius: 15px;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
  border: 1px solid #f0f0f0;
  padding: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: all 0.3s ease;
  text-decoration: none;
}

.certificate-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 10px 25px rgba(93, 100, 173, 0.2);
  border-color: #5d64ad;
}

.certificate-card-image {
  width: 100%;
  height: 100%;
  object-fit: contain;
  border-radius: 10px;
}

.certificate-card--pdf {
  background: linear-gradient(145deg, #fff 0%, #fef2f2 100%);
}

.certificate-card-pdf {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 100%;
  gap: 0.5rem;
}

.certificate-card-image--pdf-thumb {
  max-height: 70%;
  object-fit: contain;
}

.certificate-card-pdf-fallback {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 72px;
  height: 88px;
  border-radius: 10px;
  background: #dc2626;
  color: #fff;
  font-weight: 800;
  font-size: 1.25rem;
  letter-spacing: 0.05em;
}

.certificate-card-pdf-label {
  font-size: 0.75rem;
  color: var(--text-muted);
  text-align: center;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  padding: 0 0.25rem;
}

.drive-cert-pdf-preview {
  position: relative;
  min-height: 100px;
}

.drive-cert-pdf-badge {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 100px;
  border-radius: 8px;
  background: #dc2626;
  color: #fff;
  font-weight: 700;
  font-size: 1.1rem;
}

@media (max-width: 1200px) {
  .employees-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 25px;
  }
  .employees-details-layout {
    flex-direction: column;
    gap: 35px;
  }
  .sticky-sidebar-wrapper {
    flex: none;
    width: 100%;
  }
  .employees-left-sticky-panel {
    position: relative;
    top: 0;
  }
  .employee-detail-hero {
    grid-template-columns: minmax(160px, 200px) minmax(0, 1fr);
  }
  .employee-detail-photo-wrap {
    width: min(200px, 100%);
  }
  .certificate-card {
    width: min(320px, 45vw);
    height: 210px;
  }
}

@media (max-width: 768px) {
  .employees-grid {
    grid-template-columns: 1fr;
  }
  .employees-hero {
    padding: 1.75rem 1.25rem;
    border-radius: 24px;
    margin-bottom: 40px;
  }

  .employees-kicker {
    font-size: 0.7rem;
    padding: 7px 12px 7px 10px;
    letter-spacing: 0.04em;
  }

  .employees-subtitle {
    padding-left: 14px;
    line-height: 1.65;
  }

  .employees-hero-divider {
    margin-top: 22px;
  }
  .employees-main-wrapper {
    padding: 25px;
    border-radius: 24px;
  }
  .employees-left-sticky-panel {
    grid-template-columns: 1fr;
    text-align: center;
    padding: 20px;
    align-items: center;
  }
  .employees-details-photo-wrap {
    max-width: 180px;
    margin: 0 auto;
  }
  .employees-details-intro-box .employee-meta {
    align-self: center;
  }
  .employee-detail-hero {
    grid-template-columns: 1fr;
    gap: 18px;
  }
  .employee-detail-photo-wrap {
    justify-self: center;
    width: min(210px, 100%);
  }
  .employee-detail-hero-content {
    text-align: center;
  }
  .employee-card-contact-box {
    border-top: none;
    padding-top: 0;
  }
  .certificate-card {
    width: 220px;
    height: 150px;
  }
}
