:root {
  --header-bg: #2c2c2c;
  --content-bg: #ffffff;
  --text-dark: #222222;
  --text-white: #ffffff;
  --yellow: #ffe100;
  --border-light: #e0e0e0;
  --font-sans: "Open Sans", "Segoe UI", Arial, Helvetica, sans-serif;
  --header-height: 72px;
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  padding: 0;
  width: 100%;
  height: 100%;
  overflow: hidden;
  font-family: var(--font-sans);
  background: #1a1a1a;
  color: var(--text-dark);
}

.lecture {
  position: relative;
  width: 100vw;
  height: 100vh;
  max-width: calc(100vh * 16 / 9);
  margin: 0 auto;
  overflow: hidden;
  background: var(--content-bg);
}

.slide {
  display: none;
  position: absolute;
  inset: 0;
  flex-direction: column;
  background: var(--content-bg);
}

.slide.active {
  display: flex;
}

.slide--title {
  background: var(--header-bg);
  color: var(--text-white);
  padding: 52px 58px 0;
  justify-content: flex-start;
}

.title-institute {
  margin: 0;
  font-weight: 700;
  line-height: 1.12;
  text-transform: uppercase;
  font-size: clamp(2rem, 5vw, 3.5rem);
}

.title-topic {
  margin-top: 26px;
  margin-bottom: 0;
  font-weight: 700;
  font-size: clamp(1.2rem, 2.3vw, 1.8rem);
}

.yellow-pattern {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 40%;
  background: linear-gradient(180deg,
      transparent 0%,
      transparent 24%,
      var(--yellow) 24%,
      var(--yellow) 100%);
  clip-path: polygon(0 62%,
      8% 42%,
      17% 68%,
      28% 35%,
      38% 70%,
      47% 31%,
      58% 72%,
      67% 36%,
      78% 69%,
      87% 44%,
      96% 65%,
      100% 55%,
      100% 100%,
      0 100%);
}

.slide-header {
  height: var(--header-height);
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 32px;
  background: var(--header-bg);
  color: var(--text-white);
}

.logo {
  display: flex;
  align-items: center;
  gap: 14px;
}

.logo-mti {
  font-size: 1.75rem;
  font-weight: 700;
}

.logo-divider {
  width: 1px;
  height: 36px;
  background: rgba(255, 255, 255, 0.45);
}

.logo-name {
  font-size: 0.78rem;
  line-height: 1.3;
  text-transform: uppercase;
}

.nav-discipline {
  font-size: 0.82rem;
  font-weight: 600;
  letter-spacing: 0.02em;
}

.slide-body {
  flex: 1;
  position: relative;
  overflow: auto;
  padding: 30px 54px 52px;
  background: var(--content-bg);
}

h1 {
  margin: 0 0 16px;
  font-size: clamp(22px, 2.2vw, 30px);
  line-height: 1.24;
  font-weight: 700;
}

.slide-text {
  margin: 0;
  padding-left: 1.24em;
  font-size: clamp(16px, 1.35vw, 20px);
  line-height: 1.45;
}

.slide-text li {
  margin-bottom: 0.5em;
}

.slide-body p {
  margin: 0 0 14px;
  font-size: clamp(15px, 1.25vw, 18px);
  line-height: 1.5;
}

.placeholder-wrap {
  margin-top: 18px;
  border: 2px dashed var(--border-light);
  border-radius: 10px;
  padding: 12px;
  text-align: center;
  color: #666;
  background: #fafafa;
}

.placeholder-wrap img {
  max-width: 100%;
  max-height: min(42vh, 360px);
  width: auto;
  height: auto;
  border-radius: 8px;
  display: block;
  margin: 0 auto 10px;
  cursor: zoom-in;
}

.placeholder-caption {
  margin: 0;
  font-size: 0.9rem;
}

.slide-counter {
  position: absolute;
  right: 22px;
  bottom: 14px;
  color: #989898;
  font-size: 0.8rem;
}

.slide-table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 12px;
  font-size: clamp(13px, 1.05vw, 16px);
}

.slide-table th,
.slide-table td {
  border: 1px solid #d8d8d8;
  padding: 8px 10px;
  text-align: left;
  vertical-align: top;
}

.slide-table th {
  background: #f2f2f2;
  font-weight: 700;
}

.lecture-modal {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  visibility: hidden;
  opacity: 0;
  transition: opacity 0.2s ease, visibility 0.2s ease;
  pointer-events: none;
}

.lecture-modal.lecture-modal--open {
  visibility: visible;
  opacity: 1;
  pointer-events: auto;
}

.lecture-modal__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.86);
  cursor: pointer;
}

.lecture-modal__content {
  position: relative;
  max-width: 95vw;
  max-height: 90vh;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: center;
}

.lecture-modal__img {
  max-width: 100%;
  max-height: 90vh;
  width: auto;
  height: auto;
  border-radius: 8px;
  box-shadow: 0 4px 24px rgba(0, 0, 0, 0.6);
}

.lecture-modal__close {
  position: absolute;
  top: -44px;
  right: 0;
  width: 36px;
  height: 36px;
  border: none;
  border-radius: 50%;
  background: var(--header-bg);
  color: #fff;
  font-size: 24px;
  line-height: 1;
  cursor: pointer;
}

@media (max-width: 900px) {
  .slide-body {
    padding: 22px 28px 42px;
  }
}