.video-page {
  --catalog-bg: #fff;
  --catalog-ink: #10382f;
  --catalog-muted: #4e635a;
  --catalog-line: #d0dfd7;
  --video-green: #0e493b;
  background: white;
}

.video-page .catalog-header {
  position: relative;
  top: auto;
  width: min(92%, 66rem);
  margin-block: 1rem 0;
  border: 1px solid #d8e3dc;
  border-radius: 16px;
  background: white;
  box-shadow: 0 3px 13px #19382e09;
}

.video-page .catalog-header .catalog-nav a[aria-current],
.video-page .catalog-header .catalog-nav a:hover { background: #f0f7f3; }
.video-page .catalog-header .catalog-nav a[aria-current]::after { background: var(--video-green); }

.video-shell {
  width: min(92%, 76rem);
  margin-inline: auto;
  padding-block: clamp(1.3rem, 3vw, 2.1rem) clamp(3rem, 7vw, 5.6rem);
}

.video-heading { margin-block-end: clamp(1.15rem, 3vw, 1.85rem); }
.video-heading h1,
.video-feature h2,
.video-library h2,
.video-card h3,
.video-dialog h2 { margin: 0; }
.video-heading h1 {
  margin-block-start: .45rem;
  font-size: clamp(1.95rem, 5vw, 3.65rem);
  font-weight: 850;
  line-height: 1.25;
  letter-spacing: -.035em;
}
.video-heading p {
  margin: .45rem 0 0;
  font-size: clamp(.98rem, 1.55vw, 1.18rem);
  color: var(--catalog-muted);
}

.video-feature {
  display: grid;
  grid-template-columns: 2.05fr 1fr;
  min-block-size: clamp(18rem, 30vw, 22rem);
  overflow: hidden;
  border-radius: 16px;
  background: var(--video-green);
  color: white;
}
.video-feature-image,
.video-card-image { display: grid; position: relative; place-items: center; isolation: isolate; overflow: hidden; }
.video-feature-image::after,
.video-card-image::after { content: ""; position: absolute; inset: 0; background: #092d2229; }
.video-feature-image { min-inline-size: 0; background: #214e40; }
.video-feature-image img,
.video-card-image img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.video-feature-image:focus-visible { outline-offset: -5px; }
.video-feature-copy {
  padding: clamp(1.35rem, 3.5vw, 3rem);
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: flex-start;
  position: relative;
  isolation: isolate;
  background: linear-gradient(135deg,#105342,#0a3930 85%);
  overflow: hidden;
}
.video-feature-copy::before {
  content: "";
  position: absolute;
  z-index: -1;
  inset: auto auto -2rem -2rem;
  width: 12rem;
  height: 10rem;
  opacity: .15;
  background: url("../assets/icons/video-leaves.svg") bottom left / contain no-repeat;
  pointer-events: none;
}
.video-feature-copy h2 { font-size: clamp(1.65rem, 3.3vw, 2.65rem); font-weight: 800; line-height: 1.35; }
.video-feature-action {
  display: inline-flex;
  align-items: center;
  margin-block-start: 1.4rem;
  padding: .58rem 1.05rem;
  border: 1px solid #f6faf0bd;
  border-radius: .55rem;
  font-weight: 650;
}
.video-feature-action:hover { background: #ffffff15; }
.video-play {
  position: relative;
  z-index: 1;
  display: grid;
  width: clamp(3.2rem, 6vw, 4.45rem);
  aspect-ratio: 1;
  place-items: center;
  border-radius: 50%;
  background: #fffdf4;
  color: var(--catalog-ink);
  box-shadow: 0 5px 20px #0a2a224f;
  transition: transform .18s ease, background-color .18s ease;
}
.video-play::before { content: ""; margin-left: 10%; border: .45rem solid transparent; border-left: .67rem solid currentColor; border-right: 0; }
.video-feature-image:hover .video-play,
.video-card-link:hover .video-play { transform: scale(1.08); background: white; }

.video-library { margin-block-start: clamp(1.3rem, 3.2vw, 2.05rem); }
.video-library-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: .65rem 1rem;
  border-block-end: 1px solid #a9c1b5;
  padding-block-end: .62rem;
  margin-block-end: 1.15rem;
}
.video-library h2 { font-size: clamp(1.35rem, 2.4vw, 1.75rem); font-weight: 800; }
.video-filters { display: flex; gap: .35rem; overflow-x: auto; max-inline-size: 100%; padding: .23rem .3rem; margin-inline: -.3rem; }
.video-filters button {
  border: 0;
  background: transparent;
  font-weight: 650;
  border-radius: 7px;
  white-space: nowrap;
  padding: .42rem .65rem;
  min-block-size: 2.6rem;
  font-size: .9rem;
}
.video-filters button:hover { background: #edf5f0; }
.video-filters button[aria-pressed="true"] { background: var(--video-green); color: white; }

.video-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: clamp(.85rem, 2.1vw, 1.45rem); }
.video-card { min-inline-size: 0; border: 1px solid var(--catalog-line); border-radius: 13px; background: #fff; overflow: hidden; }
.video-card-link { display: grid; grid-template-rows: auto 1fr; height: 100%; }
.video-card-link:focus-visible { outline-offset: -4px; }
.video-card-image { aspect-ratio: 16 / 9; background: #214e40; }
.video-card-image .video-play { width: 2.75rem; }
.video-card-image .video-play::before { border-block-width: .36rem; border-left-width: .54rem; }
.video-card h3 { padding: .78rem .88rem .95rem; font-size: clamp(.95rem, 1.5vw, 1.13rem); line-height: 1.55; }
.video-empty { color: var(--catalog-muted); padding-block: .7rem; }

.video-dialog {
  width: min(92vw, 58rem);
  max-height: 91dvh;
  border: 1px solid #88a79a;
  padding: .85rem;
  border-radius: 15px;
  background: #0d352c;
  color: white;
}
.video-dialog::backdrop { background: #071814d9; }
.video-dialog-heading { display: flex; justify-content: space-between; align-items: center; gap: 1rem; margin-block-end: .65rem; }
.video-dialog h2 { font-size: clamp(.98rem, 2vw, 1.27rem); }
.video-close { width: 2.65rem; height: 2.65rem; font-size: 1.55rem; line-height: 1; border-radius: .6rem; background: transparent; border: 1px solid #9db8ac; }
.video-dialog video { width: 100%; max-height: 70dvh; display: block; border-radius: .5rem; background: #071814; }
.video-player-error a { text-decoration: underline; }

@media (max-width: 700px) {
  .video-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .video-feature { grid-template-columns: minmax(0, 1fr); min-block-size: auto; }
  .video-feature-image { aspect-ratio: 16 / 9; }
  .video-feature-copy { padding: 1.05rem 1.2rem 1.2rem; }
  .video-feature-action { margin-block-start: .75rem; }
}
@media (max-width: 430px) {
  .video-grid { grid-template-columns: minmax(0, 1fr); }
}
@media (prefers-reduced-motion: reduce) {
  .video-play { transition: none; }
}

.video-dialog .aparat-player { max-height:65dvh; }
.video-aparat-link { margin-block:.55rem 0; }
.video-aparat-link a { text-decoration:underline; }
