:root {
  --home-teal: #149db3;
  --home-teal-dark: #087f92;
  --home-orange: #f47721;
  --home-slate: #243447;
  --home-muted: #6b7a8d;
}

.home-merged {
  display: flex;
  align-items: center;
  min-height: 100vh;
  padding: 118px 0 52px;
  overflow: hidden;
  background-position: center;
}

.home-merged::before {
  z-index: 0;
  background:
    linear-gradient(90deg, rgba(255, 255, 255, 0.91), rgba(255, 255, 255, 0.72) 50%, rgba(255, 255, 255, 0.91)),
    rgba(255, 255, 255, 0.68);
}

.home-merged__container {
  position: relative;
  z-index: 2;
  width: min(1760px, 100%);
  padding-inline: clamp(20px, 3vw, 58px);
}

.home-merged__grid {
  display: grid;
  grid-template-columns: minmax(270px, 0.82fr) minmax(460px, 1.35fr) minmax(270px, 0.82fr);
  grid-template-areas: "teacher center student";
  gap: clamp(18px, 2.1vw, 36px);
  align-items: center;
  direction: ltr;
}

.home-merged__center {
  grid-area: center;
  min-width: 0;
  text-align: center;
}

.home-merged__logo {
  display: block;
  width: min(440px, 82%);
  max-height: 184px;
  margin: 0 auto 10px;
  object-fit: contain;
}

.home-merged__heading h1 {
  margin: 0;
  color: var(--home-teal);
  font-family: "DavidLibre", var(--font-secondary), serif;
  font-size: clamp(31px, 2.65vw, 49px);
  font-weight: 700;
  line-height: 1.1;
  letter-spacing: -0.02em;
}

.home-merged__heading h2 {
  margin: 9px 0 0;
  color: #202733;
  font-size: clamp(18px, 1.55vw, 26px);
  font-weight: 700;
  line-height: 1.35;
}

.home-merged__heading p {
  margin: 6px 0 18px;
  color: var(--home-muted);
  font-family: Georgia, serif;
  font-size: 16px;
}

.home-video {
  position: relative;
  width: min(680px, 100%);
  margin: 0 auto;
  min-height: 58px;
  text-align: center;
}

.home-video.is-playing {
  min-height: 0;
  overflow: hidden;
  border: 1px solid rgba(36, 52, 71, 0.12);
  border-radius: 22px;
  background: #0f172a;
  box-shadow:
    0 28px 70px rgba(36, 52, 71, 0.19),
    0 0 0 7px rgba(255, 255, 255, 0.7);
  aspect-ratio: 16 / 9;
}

.home-video::after {
  position: absolute;
  z-index: 4;
  inset: 0;
  border-radius: inherit;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.28);
  content: "";
  pointer-events: none;
  opacity: 0;
}

.home-video.is-playing::after {
  opacity: 1;
}

.home-video__start {
  position: relative;
  z-index: 3;
  display: inline-flex;
  align-items: center;
  gap: 9px;
  min-height: 52px;
  padding: 11px 24px;
  border: 1px solid rgba(255, 255, 255, 0.66);
  border-radius: 8px;
  background: rgba(20, 157, 179, 0.94);
  box-shadow: 0 16px 38px rgba(15, 23, 42, 0.25);
  color: #fff;
  font-family: var(--font-secondary);
  font-size: 18px;
  font-weight: 700;
  transition: opacity 500ms ease, transform 500ms ease, background 160ms ease;
  backdrop-filter: blur(8px);
}

.home-video__start i {
  font-size: 24px;
  line-height: 1;
}

.home-video__start:hover {
  background: var(--home-teal-dark);
}

.home-video.is-loading .home-video__start {
  cursor: wait;
  opacity: 0.68;
}

.home-video.is-playing .home-video__start {
  position: absolute;
  top: 50%;
  left: 50%;
  opacity: 0;
  pointer-events: none;
  transform: translate(-50%, -50%);
}

.home-video__close {
  position: absolute;
  z-index: 6;
  top: 12px;
  right: 12px;
  display: none;
  width: 42px;
  height: 42px;
  align-items: center;
  justify-content: center;
  padding: 0;
  border: 1px solid rgba(255, 255, 255, 0.58);
  border-radius: 50%;
  background: rgba(15, 23, 42, 0.78);
  color: #fff;
  font-size: 19px;
  line-height: 1;
  box-shadow: 0 8px 24px rgba(15, 23, 42, 0.25);
  transition: background 160ms ease, transform 160ms ease;
  backdrop-filter: blur(8px);
}

.home-video.is-loading .home-video__close,
.home-video.is-playing .home-video__close {
  display: inline-flex;
}

.home-video__close:hover,
.home-video__close:focus-visible {
  background: rgba(234, 100, 24, 0.96);
  transform: scale(1.05);
}

.home-video iframe {
  position: absolute;
  inset: 0;
  display: block;
  width: 100%;
  height: 100%;
  border: 0;
  opacity: 0;
  transition: opacity 1.6s ease;
}

.home-video.is-playing iframe {
  opacity: 1;
}

.home-news {
  position: relative;
  min-width: 0;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.86);
  border-radius: 24px;
  background: rgba(255, 255, 255, 0.84);
  box-shadow:
    0 22px 60px rgba(36, 52, 71, 0.12),
    inset 0 1px 0 rgba(255, 255, 255, 0.96);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  direction: rtl;
}

.home-news::before {
  position: absolute;
  z-index: 1;
  top: 0;
  right: 28px;
  left: 28px;
  height: 3px;
  border-radius: 0 0 999px 999px;
  background: linear-gradient(90deg, transparent, var(--home-orange), transparent);
  content: "";
}

.home-news--teacher {
  grid-area: teacher;
}

.home-news--student {
  grid-area: student;
}

.home-news__header {
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 90px;
  padding: 20px 22px 16px;
  border-bottom: 1px solid rgba(36, 52, 71, 0.08);
  text-align: right;
}

.home-news__icon {
  display: inline-flex;
  flex: 0 0 auto;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border-radius: 14px;
  background: rgba(20, 157, 179, 0.1);
  color: var(--home-teal);
  font-size: 21px;
}

.home-news__header small {
  display: block;
  margin-bottom: 2px;
  color: var(--home-muted);
  font-size: 11px;
  font-weight: 600;
}

.home-news__header h2 {
  margin: 0;
  color: var(--home-teal);
  font-family: "DavidLibre", var(--font-secondary), serif;
  font-size: 25px;
  font-weight: 700;
  line-height: 1.1;
}

.home-news__body {
  min-height: 292px;
}

.home-news__list {
  max-height: 302px;
  overflow: hidden;
}

.home-news__list.is-expanded {
  max-height: 430px;
  overflow-y: auto;
  scrollbar-color: rgba(20, 157, 179, 0.45) transparent;
  scrollbar-width: thin;
}

.home-news__item {
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr);
  grid-template-areas:
    "icon copy"
    "icon date";
  column-gap: 12px;
  min-height: 96px;
  padding: 15px 18px;
  border-bottom: 1px solid rgba(36, 52, 71, 0.08);
  color: var(--home-slate);
  text-align: right;
  text-decoration: none;
  transition: background 160ms ease, transform 160ms ease;
}

a.home-news__item:hover {
  background: rgba(20, 157, 179, 0.055);
  color: var(--home-slate);
}

a.home-news__item:focus-visible {
  outline: 3px solid rgba(20, 157, 179, 0.3);
  outline-offset: -3px;
}

.home-news__pdf {
  grid-area: icon;
  display: inline-flex;
  align-self: center;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: #e51f2a;
  box-shadow: 0 7px 16px rgba(229, 31, 42, 0.2);
  color: #fff;
  font-family: Arial, sans-serif;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: -0.02em;
}

.home-news__copy {
  grid-area: copy;
  min-width: 0;
}

.home-news__copy strong {
  display: block;
  overflow: hidden;
  color: var(--home-slate);
  font-size: 14px;
  font-weight: 750;
  line-height: 1.35;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.home-news__copy small {
  display: -webkit-box;
  margin-top: 3px;
  overflow: hidden;
  color: var(--home-muted);
  font-size: 11px;
  line-height: 1.35;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.home-news__item time {
  grid-area: date;
  align-self: end;
  margin-top: 5px;
  color: #8793a2;
  font-family: var(--font-primary);
  font-size: 11px;
  direction: ltr;
  text-align: right;
}

.home-news__more {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  width: 100%;
  min-height: 47px;
  border: 0;
  background: rgba(255, 255, 255, 0.72);
  color: var(--home-teal);
  font-size: 13px;
  font-weight: 700;
  transition: background 160ms ease, color 160ms ease;
}

.home-news__more:hover {
  background: rgba(20, 157, 179, 0.08);
  color: var(--home-teal-dark);
}

.home-news__loading,
.home-news__empty {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 292px;
  padding: 28px;
  color: var(--home-muted);
  font-size: 14px;
}

.home-merged__circuit {
  position: absolute;
  z-index: 1;
  top: 31%;
  width: 9vw;
  min-width: 105px;
  height: 92px;
  opacity: 0.52;
  pointer-events: none;
}

.home-merged__circuit::before,
.home-merged__circuit::after {
  position: absolute;
  width: 100%;
  height: 42px;
  border-top: 2px solid var(--home-orange);
  border-bottom: 1px solid var(--home-orange);
  content: "";
}

.home-merged__circuit--start {
  left: -30px;
}

.home-merged__circuit--end {
  right: -30px;
}

.home-merged__circuit--end::before,
.home-merged__circuit--end::after {
  border-color: var(--home-teal);
}

.home-merged__circuit::after {
  top: 28px;
  transform: translateX(24px);
}

@media (max-width: 1399px) {
  .home-merged__grid {
    grid-template-columns: minmax(250px, 0.8fr) minmax(410px, 1.25fr) minmax(250px, 0.8fr);
    gap: 18px;
  }

  .home-news__header {
    padding-inline: 17px;
  }

  .home-news__item {
    padding-inline: 14px;
  }
}

@media (max-width: 1199px) {
  .home-merged {
    padding-top: 108px;
  }

  .home-merged__grid {
    grid-template-columns: minmax(220px, 0.7fr) minmax(390px, 1.25fr) minmax(220px, 0.7fr);
  }

  .home-news__header small,
  .home-news__copy small {
    display: none;
  }

  .home-news__item {
    grid-template-columns: 36px minmax(0, 1fr);
    min-height: 82px;
    padding: 12px;
  }

  .home-news__pdf {
    width: 33px;
    height: 33px;
    font-size: 9px;
  }

  .home-news__body,
  .home-news__loading,
  .home-news__empty {
    min-height: 250px;
  }
}

@media (max-width: 991px) {
  .home-merged {
    min-height: auto;
    padding: 108px 0 54px;
    overflow: visible;
    background-attachment: scroll;
  }

  .home-merged__container {
    width: min(760px, 100%);
  }

  .home-merged__grid {
    grid-template-columns: minmax(0, 1fr);
    grid-template-areas:
      "center"
      "student"
      "teacher";
    gap: 24px;
  }

  .home-merged__center {
    margin-bottom: 10px;
  }

  .home-news__header small,
  .home-news__copy small {
    display: block;
  }

  .home-news__item {
    grid-template-columns: 42px minmax(0, 1fr);
    min-height: 92px;
    padding: 14px 18px;
  }

  .home-news__pdf {
    width: 38px;
    height: 38px;
    font-size: 11px;
  }

  .home-news__body,
  .home-news__loading,
  .home-news__empty {
    min-height: 0;
  }

  .home-merged__circuit {
    display: none;
  }
}

@media (max-width: 575px) {
  .home-merged {
    padding-top: 92px;
  }

  .home-merged__container {
    padding-inline: 12px;
  }

  .home-merged__logo {
    width: min(330px, 82%);
    margin-bottom: 8px;
  }

  .home-merged__heading h1 {
    font-size: 29px;
  }

  .home-merged__heading h2 {
    font-size: 17px;
  }

  .home-merged__heading p {
    margin-bottom: 14px;
    font-size: 14px;
  }

  .home-video,
  .home-news {
    border-radius: 18px;
  }

  .home-video.is-playing {
    box-shadow: 0 18px 45px rgba(36, 52, 71, 0.16);
  }

  .home-video__start {
    min-height: 46px;
    padding: 9px 18px;
    font-size: 16px;
  }

  .home-news__header {
    min-height: 78px;
    padding: 16px;
  }

  .home-news__header h2 {
    font-size: 22px;
  }

  .home-news__item {
    grid-template-columns: 36px minmax(0, 1fr);
    min-height: 82px;
    padding: 12px;
  }

  .home-news__pdf {
    width: 33px;
    height: 33px;
    font-size: 9px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .home-video__start,
  .home-video__close,
  .home-video iframe {
    transition-duration: 0.01ms;
    transition-delay: 0ms;
  }
}
