﻿/*
Theme Name: Qazpatent TISC
Theme URI:
Author: Codex
Description: Custom WordPress theme based on the Qazpatent TISC static layout.
Version: 1.0.0
Text Domain: qazpatent-tisc
*/
:root {
  --blue-900: #102b63;
  --blue-700: #1450a3;
  --blue-500: #1f74d8;
  --cyan-500: #1aa4b8;
  --gold-500: #d6a13b;
  --ink: #162033;
  --muted: #667085;
  --line: #d8e1ee;
  --surface: #ffffff;
  --soft: #f4f8fc;
  --soft-2: #eaf3fb;
  --shadow: 0 22px 70px rgba(16, 43, 99, 0.14);
  font-family: "Inter", Arial, sans-serif;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  overflow-x: clip;
}

@media (prefers-reduced-motion: no-preference) {
  .reveal {
    opacity: 0;
    transform: translate3d(0, 90px, 0) scale(0.96);
    filter: blur(8px);
    transition:
      opacity 0.95s cubic-bezier(0.16, 1, 0.3, 1),
      transform 0.95s cubic-bezier(0.16, 1, 0.3, 1),
      filter 0.95s cubic-bezier(0.16, 1, 0.3, 1);
    transition-delay: var(--reveal-delay, 0ms);
    will-change: opacity, transform, filter;
  }

  .reveal.in-view {
    opacity: 1;
    transform: translate3d(0, 0, 0) scale(1) rotateX(0);
    filter: blur(0);
  }

  .reveal.reveal-from-left {
    transform: translate3d(-130px, 28px, 0) scale(0.96);
  }

  .reveal.reveal-from-right {
    transform: translate3d(130px, 28px, 0) scale(0.96);
  }

  .reveal.reveal-from-up {
    transform: translate3d(0, 110px, 0) scale(0.96);
  }

  .reveal.reveal-zoom {
    transform: translate3d(0, 44px, 0) scale(0.88);
  }

  .reveal.reveal-from-left.in-view,
  .reveal.reveal-from-right.in-view,
  .reveal.reveal-from-up.in-view,
  .reveal.reveal-zoom.in-view {
    transform: translate3d(0, 0, 0) scale(1) rotateX(0);
  }

  .hero .reveal {
    transform: translate3d(0, 70px, 0) scale(0.96);
  }

  .hero .reveal.in-view {
    transform: translate3d(0, 0, 0) scale(1);
  }
}

.reveal {
  opacity: 0;
  transform: translate3d(0, 90px, 0) scale(0.96);
  filter: blur(8px);
  transition:
    opacity 0.95s cubic-bezier(0.16, 1, 0.3, 1),
    transform 0.95s cubic-bezier(0.16, 1, 0.3, 1),
    filter 0.95s cubic-bezier(0.16, 1, 0.3, 1);
  transition-delay: var(--reveal-delay, 0ms);
  will-change: opacity, transform, filter;
}

.reveal.in-view {
  opacity: 1;
  transform: translate3d(0, 0, 0) scale(1) rotateX(0);
  filter: blur(0);
}

.reveal.reveal-from-left {
  transform: translate3d(-130px, 28px, 0) scale(0.96);
}

.reveal.reveal-from-right {
  transform: translate3d(130px, 28px, 0) scale(0.96);
}

.reveal.reveal-from-up {
  transform: translate3d(0, 110px, 0) scale(0.96);
}

.reveal.reveal-zoom {
  transform: translate3d(0, 44px, 0) scale(0.88);
}

.reveal.reveal-from-left.in-view,
.reveal.reveal-from-right.in-view,
.reveal.reveal-from-up.in-view,
.reveal.reveal-zoom.in-view {
  transform: translate3d(0, 0, 0) scale(1) rotateX(0);
}

.hero .reveal {
  transform: translate3d(0, 70px, 0) scale(0.96);
}

.hero .reveal.in-view {
  opacity: 1;
  filter: blur(0);
  transform: translate3d(0, 0, 0) scale(1);
}

body .reveal.in-view,
body .reveal.reveal-from-left.in-view,
body .reveal.reveal-from-right.in-view,
body .reveal.reveal-from-up.in-view,
body .reveal.reveal-zoom.in-view,
body .hero .reveal.in-view {
  opacity: 1;
  filter: blur(0);
  transform: translate3d(0, 0, 0) scale(1) rotateX(0);
}

body {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  margin: 0;
  color: var(--ink);
  background: #f8fbff;
  font-family: "Inter", Arial, sans-serif;
  line-height: 1.55;
  overflow-x: clip;
}

body > main {
  flex: 1 0 auto;
}

body > .site-footer {
  flex-shrink: 0;
}

a {
  color: inherit;
  text-decoration: none;
}

.top-bar {
  color: #fff;
  background: linear-gradient(90deg, var(--blue-900), var(--blue-700));
}

.top-bar-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 18px;
  min-height: 34px;
  padding: 6px clamp(18px, 4vw, 56px);
  font-size: 12px;
  font-weight: 700;
  overflow-x: auto;
  scrollbar-width: none;
}

.top-bar-inner::-webkit-scrollbar {
  display: none;
}

.top-contacts,
.top-socials {
  display: flex;
  flex-wrap: nowrap;
  align-items: center;
  gap: 14px;
  flex: 0 0 auto;
}

.top-bar a,
.top-bar span {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  color: rgba(255, 255, 255, 0.92);
  white-space: nowrap;
}

.top-bar a:hover {
  color: #fff;
}

.top-bar svg {
  width: 15px;
  height: 15px;
  flex: 0 0 auto;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.top-socials svg {
  width: 16px;
  height: 16px;
}

.top-socials a:first-child svg circle,
.top-socials a:first-child svg rect {
  fill: none;
}

.top-socials a:last-child svg {
  fill: currentColor;
  stroke: none;
}

.top-bar .lang-switch {
  flex: 0 0 auto;
  padding: 2px;
  background: rgba(255, 255, 255, 0.12);
  border-color: rgba(255, 255, 255, 0.24);
}

.top-bar .lang-switch a,
.top-bar .lang-switch button {
  min-width: 32px;
  padding: 5px 7px;
  color: rgba(255, 255, 255, 0.86);
}

.top-bar .lang-switch a.active,
.top-bar .lang-switch button.active {
  color: var(--blue-900);
  background: #fff;
  border-color: rgba(255, 255, 255, 0.7);
}

button,
input,
select,
textarea {
  font: inherit;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  display: grid;
  grid-template-columns: auto 1fr;
  align-items: center;
  gap: 22px;
  min-height: 76px;
  padding: 14px clamp(18px, 4vw, 56px);
  background: rgba(255, 255, 255, 0.92);
  border-bottom: 1px solid rgba(216, 225, 238, 0.8);
  backdrop-filter: blur(18px);
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 310px;
}

.brand-logo {
  display: block;
  width: clamp(150px, 14vw, 230px);
  height: auto;
  flex: 0 0 auto;
  object-fit: contain;
}

.center-logo {
  display: none;
  place-items: center;
  width: 48px;
  height: 48px;
  color: #fff;
  background: linear-gradient(135deg, var(--blue-900), var(--blue-500));
  border-radius: 8px;
  font-weight: 800;
  box-shadow: 0 10px 28px rgba(20, 80, 163, 0.2);
}

.brand strong {
  display: block;
  color: var(--blue-900);
  font-size: 15px;
}

.brand small {
  display: block;
  max-width: 220px;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.25;
}

.main-nav {
  display: flex;
  justify-content: center;
  gap: 4px;
}

.main-nav ul {
  margin: 0;
  padding: 0;
  list-style: none;
}

.main-nav-list {
  display: flex;
  align-items: center;
  gap: 4px;
}

.main-nav li {
  position: relative;
  list-style: none;
}

.main-nav .menu-item-has-children::after {
  content: "";
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  height: 12px;
}

.main-nav a,
.lang-switch a,
.lang-switch button {
  border: 1px solid transparent;
  border-radius: 8px;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
  transition: 0.2s ease;
}

.main-nav a {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 10px 12px;
  font-size: 14px;
  font-weight: 600;
  line-height: 1.25;
  text-decoration: none;
}

.main-nav a:hover,
.main-nav a.active,
.lang-switch a.active,
.lang-switch button.active {
  color: var(--blue-900);
  background: var(--soft-2);
  border-color: #c6d9ee;
}

.main-nav .menu-item-has-children > a::after {
  content: "";
  width: 6px;
  height: 6px;
  margin-top: -3px;
  border-right: 2px solid currentColor;
  border-bottom: 2px solid currentColor;
  transform: rotate(45deg);
  opacity: 0.65;
}

.main-nav .sub-menu {
  position: absolute;
  top: calc(100% + 8px);
  left: 0;
  z-index: 60;
  display: grid;
  gap: 4px;
  min-width: 230px;
  padding: 8px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: var(--shadow);
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transform: translateY(-6px);
  transition:
    opacity 0.18s ease 0.12s,
    transform 0.18s ease 0.12s,
    visibility 0s linear 0.3s;
}

.main-nav .sub-menu .sub-menu {
  top: 0;
  left: calc(100% - 1px);
}

.main-nav li:hover > .sub-menu,
.main-nav li:focus-within > .sub-menu {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  transform: translateY(0);
  transition-delay: 0s;
}

.main-nav .sub-menu a {
  width: 100%;
  color: var(--blue-900);
  font-size: 13px;
  white-space: normal;
}

.lang-switch {
  display: flex;
  padding: 4px;
  background: var(--soft);
  border: 1px solid var(--line);
  border-radius: 10px;
}

.lang-switch a,
.lang-switch button {
  min-width: 38px;
  padding: 7px 8px;
  font-size: 12px;
  font-weight: 700;
}

.nav-toggle {
  display: none;
  width: 42px;
  height: 42px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.nav-toggle span {
  display: block;
  width: 20px;
  height: 2px;
  margin: 4px auto;
  background: var(--blue-900);
}

.section-band,
.section-block,
.metrics,
.site-footer {
  padding-inline: clamp(18px, 4vw, 56px);
}

.hero {
  display: grid;
  grid-template-columns: 1fr;
  place-items: center;
  min-height: min(720px, calc(100vh - 76px));
  padding-top: clamp(76px, 10vw, 128px);
  padding-bottom: clamp(76px, 10vw, 128px);
  background:
    linear-gradient(90deg, rgba(16, 43, 99, 0.68), rgba(20, 80, 163, 0.35)),
    url("assets/kazakhstan-tisc-banner.webp") center / cover no-repeat;
  color: #fff;
  text-align: center;
}

.hero-content {
  display: grid;
  justify-items: center;
  width: 100%;
  max-width: 1180px;
}

.hero-logo-grid {
  order: 2;
  display: grid;
  grid-template-columns: repeat(2, minmax(180px, 240px));
  justify-content: center;
  gap: clamp(18px, 4vw, 38px);
  width: min(100%, 560px);
  margin-top: 28px;
}

.hero-logo-tile {
  display: grid;
  place-items: center;
  aspect-ratio: 1;
  padding: clamp(22px, 4vw, 34px);
  background: rgba(254, 254, 254, 1);
  border: 1px solid rgba(255, 255, 255, 0.72);
  border-radius: 24px;
  box-shadow: 0 28px 80px rgba(5, 24, 64, 0.28);
  backdrop-filter: blur(10px);
  color: inherit;
  text-decoration: none;
  animation: hero-tile-bounce 3.6s ease-in-out infinite;
  transition: box-shadow 180ms ease, transform 180ms ease;
}

.hero-logo-tile:nth-child(2) {
  animation-delay: 0.45s;
}

.hero-logo-tile:hover {
  box-shadow: 0 34px 90px rgba(5, 24, 64, 0.34);
  transform: translateY(-8px);
}

@keyframes hero-tile-bounce {
  0%,
  100% {
    transform: translateY(0);
  }

  50% {
    transform: translateY(-10px);
  }
}

.hero-logo-tile img {
  display: block;
  max-width: 92%;
  max-height: 92%;
  object-fit: contain;
}

@media (prefers-reduced-motion: reduce) {
  .hero-logo-tile {
    animation: none;
  }
}

.hero .eyebrow,
.hero .hero-lead,
.hero .hero-actions {
  display: none;
}

.eyebrow {
  margin: 0 0 10px;
  color: var(--gold-500);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0;
  text-transform: uppercase;
}

#about .eyebrow,
#news .eyebrow,
#network .eyebrow,
#documents .eyebrow,
.partner-section .eyebrow,
.aspi-card .eyebrow {
  font-size: 16px;
}

.hero h1,
.section-block h2 {
  margin: 0;
  line-height: 1.06;
}

.hero h1 {
  order: 1;
  max-width: 1180px;
  font-size: clamp(38px, 4.8vw, 64px);
}

.hero-lead {
  max-width: 760px;
  margin: 24px 0 0;
  color: rgba(255, 255, 255, 0.9);
  font-size: clamp(17px, 2vw, 21px);
}

.hero-actions,
.inline-links {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 28px;
}

.hero-actions {
  justify-content: center;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  padding: 12px 18px;
  color: var(--blue-900);
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 8px;
  font-weight: 800;
  cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 28px rgba(16, 43, 99, 0.18);
}

.btn.primary {
  color: #fff;
  background: var(--gold-500);
  border-color: var(--gold-500);
}

.btn.ghost {
  color: #fff;
  background: rgba(255, 255, 255, 0.12);
  border-color: rgba(255, 255, 255, 0.34);
}

.btn.compact {
  min-height: 40px;
  padding: 9px 14px;
  color: var(--blue-900);
  background: var(--soft-2);
}

.section-heading,
.center-meta,
.doc-list article {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.resource-list a,
.news-card,
.center-card,
.calendar-grid article {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
}

.resource-list a,
.news-card,
.center-card,
.calendar-grid article,
.doc-list article {
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}

.resource-list a:hover,
.news-card:hover,
.center-card:hover,
.calendar-grid article:hover,
.doc-list article:hover {
  transform: translateY(-3px);
  border-color: rgba(31, 116, 216, 0.35);
  box-shadow: 0 18px 44px rgba(16, 43, 99, 0.12);
}

.metrics {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1px;
  width: 100%;
  padding-inline: 0;
  background: #dbe6f2;
}

.metrics article {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  padding: 28px 18px;
  background: #fff;
}

.metric-icon {
  display: inline-grid;
  place-items: center;
  width: 56px;
  height: 56px;
  color: #fff;
  background: linear-gradient(135deg, var(--blue-900), var(--blue-500));
  border-radius: 8px;
  box-shadow: 0 12px 28px rgba(20, 80, 163, 0.18);
}

.metric-icon svg {
  width: 28px;
  height: 28px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.metrics span {
  display: block;
  color: var(--blue-700);
  font-size: clamp(28px, 4vw, 42px);
  font-weight: 800;
  line-height: 1;
}

.metrics span.counting {
  animation: number-pop 0.45s ease both;
}

.metrics p,
.doc-list p,
.news-card p,
.calendar-grid p,
.about-section p {
  margin: 6px 0 0;
  color: var(--muted);
}

.section-block {
  max-width: 1320px;
  margin: 0 auto;
  padding-top: 84px;
  padding-bottom: 84px;
}

.section-block h2 {
  color: var(--blue-900);
  font-size: clamp(30px, 4vw, 48px);
}

.intro-grid,
.about-section {
  display: grid;
  grid-template-columns: minmax(0, 0.95fr) minmax(340px, 1.05fr);
  gap: clamp(28px, 5vw, 64px);
  align-items: start;
}

.intro-grid p,
.about-section p {
  max-width: 720px;
}

.about-section {
  grid-template-columns: minmax(0, 1fr) minmax(260px, 340px);
  position: relative;
  overflow: hidden;
  padding-block: clamp(48px, 7vw, 68px);
  isolation: isolate;
}

.about-section::before,
.about-section::after {
  content: "";
  position: absolute;
  z-index: -1;
  pointer-events: none;
}

.about-section::before {
  inset: 34px clamp(18px, 4vw, 56px);
  border-top: 1px solid rgba(20, 80, 163, 0.14);
  border-bottom: 1px solid rgba(20, 80, 163, 0.1);
  background:
    linear-gradient(90deg, transparent 0, rgba(31, 116, 216, 0.1) 50%, transparent 100%) top / 100% 1px no-repeat,
    repeating-linear-gradient(90deg, rgba(20, 80, 163, 0.08) 0 1px, transparent 1px 88px);
  opacity: 0.75;
}

.about-section::after {
  top: 50px;
  right: clamp(24px, 7vw, 110px);
  width: min(360px, 34vw);
  height: min(180px, 20vw);
  border-top: 2px solid rgba(214, 161, 59, 0.45);
  border-right: 2px solid rgba(31, 116, 216, 0.18);
  border-radius: 8px;
}

.about-section > div {
  position: relative;
}

.about-copy {
  max-width: 820px;
}

.about-copy::before {
  content: "";
  position: absolute;
  top: -24px;
  left: 0;
  width: 120px;
  height: 3px;
  background: linear-gradient(90deg, var(--gold-500), rgba(31, 116, 216, 0.18));
  border-radius: 999px;
}

.about-section p {
  max-width: 780px;
}

.about-section h2 {
  max-width: 760px;
  font-size: clamp(26px, 3vw, 38px);
  line-height: 1.12;
}

.about-downloads {
  display: grid;
  align-content: center;
  gap: 12px;
  width: 100%;
}

.download-link {
  display: grid;
  grid-template-columns: 22px 1fr;
  align-items: center;
  gap: 10px;
  min-height: 52px;
  padding: 12px 14px;
  color: var(--blue-900);
  background: #fff;
  border: 1px solid rgba(20, 80, 163, 0.18);
  border-radius: 8px;
  box-shadow: 0 14px 32px rgba(16, 43, 99, 0.08);
  font-weight: 800;
  transition: transform 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}

.download-link:hover {
  border-color: rgba(214, 161, 59, 0.7);
  box-shadow: 0 18px 38px rgba(16, 43, 99, 0.14);
  transform: translateY(-2px);
}

.download-link svg {
  width: 22px;
  height: 22px;
  color: var(--blue-700);
  fill: none;
  stroke: currentColor;
  stroke-width: 2.2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.inline-links a {
  color: var(--blue-700);
  font-weight: 800;
}

.resource-list {
  display: grid;
  gap: 14px;
}

.resource-list a {
  display: grid;
  gap: 5px;
  padding: 20px;
  box-shadow: 0 14px 32px rgba(16, 43, 99, 0.08);
}

.resource-list strong {
  color: var(--blue-900);
  font-size: 18px;
}

.resource-list span {
  color: var(--muted);
}

.section-heading {
  margin-bottom: 26px;
}

.section-heading-action {
  flex: 0 0 auto;
  white-space: nowrap;
}

.filters {
  display: grid;
  grid-template-columns: minmax(260px, 1fr) minmax(150px, auto) minmax(200px, 0.65fr);
  align-items: stretch;
  gap: 14px;
  margin-bottom: 20px;
}

.filters label {
  display: block;
}

.filters .filter-label {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

.filters input,
.filters select,
.registry-reset-button {
  height: 46px;
  min-height: 46px;
}

.registry-reset-button {
  width: 100%;
  white-space: nowrap;
}

label {
  display: grid;
  gap: 7px;
  color: var(--blue-900);
  font-size: 13px;
  font-weight: 800;
}

input,
select,
textarea {
  width: 100%;
  min-height: 46px;
  padding: 12px 14px;
  color: var(--ink);
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 8px;
  outline: none;
}

textarea {
  resize: vertical;
}

input:focus,
select:focus,
textarea:focus {
  border-color: var(--blue-500);
  box-shadow: 0 0 0 4px rgba(31, 116, 216, 0.12);
}

.network-layout {
  display: grid;
  grid-template-columns: 1fr;
  gap: 20px;
}

.center-list,
.news-grid,
.calendar-grid {
  display: grid;
  gap: 16px;
}

.center-list {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  align-items: stretch;
}

.center-card {
  display: grid;
  grid-template-columns: 1fr;
  gap: 16px;
  padding: 18px;
}

.center-card h3,
.news-card h3,
.doc-list h3,
.calendar-grid h3 {
  margin: 0;
  color: var(--blue-900);
  font-size: 18px;
}

.center-card p {
  margin: 4px 0 10px;
  color: var(--muted);
}

.center-title-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  margin-bottom: 8px;
}

.center-number,
.center-region {
  display: inline-grid;
  place-items: center;
  min-height: 28px;
  padding: 4px 9px;
  border-radius: 8px;
  font-size: 12px;
  font-weight: 800;
}

.center-number {
  color: #fff;
  background: var(--blue-700);
}

.center-region {
  color: var(--blue-900);
  background: var(--soft-2);
}

.center-card ul {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.center-card li {
  padding: 5px 8px;
  color: var(--blue-900);
  background: var(--soft-2);
  border-radius: 8px;
  font-size: 12px;
  font-weight: 700;
}

.center-card li,
.center-card li a {
  max-width: 100%;
  overflow-wrap: anywhere;
}

.center-meta {
  flex-wrap: wrap;
  margin-top: 14px;
  color: var(--muted);
  font-size: 13px;
}

.center-meta a {
  color: var(--blue-700);
  font-weight: 800;
}

.levels-parallax {
  position: relative;
  overflow: hidden;
  width: auto;
  max-width: none;
  margin-left: 0;
  margin-right: 0;
  margin-top: clamp(28px, 5vw, 56px);
  margin-bottom: clamp(28px, 5vw, 56px);
  padding-inline: clamp(18px, 4vw, 56px);
  padding-top: clamp(44px, 7vw, 82px);
  padding-bottom: clamp(44px, 7vw, 82px);
  background:
    linear-gradient(90deg, rgba(5, 24, 58, 0.84), rgba(5, 24, 58, 0.36)),
    url("assets/tisc-levels-parallax.png") center / cover fixed;
  color: #fff;
}

.levels-layout {
  display: grid;
  grid-template-columns: minmax(220px, 0.3fr) minmax(0, 0.7fr);
  gap: clamp(22px, 4vw, 48px);
  align-items: start;
  max-width: 1440px;
  margin: 0 auto;
}

.levels-heading {
  position: sticky;
  top: 112px;
  display: grid;
  gap: 12px;
}

.levels-heading .eyebrow {
  color: rgba(255, 255, 255, 0.78);
}

.levels-heading h2 {
  margin: 0;
  color: #fff;
  font-size: clamp(28px, 4vw, 46px);
  line-height: 1.08;
}

.levels-accordion {
  display: grid;
  gap: 12px;
}

.level-item {
  overflow: hidden;
  background: rgba(255, 255, 255, 0.96);
  border: 1px solid rgba(255, 255, 255, 0.36);
  border-radius: 8px;
  box-shadow: 0 18px 42px rgba(0, 0, 0, 0.18);
}

.level-item summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: 58px;
  padding: 16px 20px;
  color: var(--blue-900);
  cursor: pointer;
  font-size: 18px;
  font-weight: 800;
  list-style: none;
}

.level-item summary::-webkit-details-marker {
  display: none;
}

.level-item summary::after {
  content: "";
  flex: 0 0 auto;
  width: 10px;
  height: 10px;
  border-right: 2px solid currentColor;
  border-bottom: 2px solid currentColor;
  transform: rotate(45deg);
  transition: transform 0.2s ease;
}

.level-item[open] summary {
  color: #fff;
  background: linear-gradient(135deg, var(--blue-900), var(--blue-500));
}

.level-item[open] summary::after {
  transform: rotate(225deg);
}

.level-content {
  padding: 18px 22px 22px;
  color: #253858;
  background: #fff;
  line-height: 1.62;
}

.level-content h3 {
  margin: 0 0 12px;
  color: var(--blue-900);
  font-size: 17px;
  line-height: 1.35;
}

.level-content ol {
  display: grid;
  gap: 8px;
  margin: 0;
  padding-left: 1.3em;
}

.level-content li::marker {
  color: var(--gold-500);
  font-weight: 800;
}

.calendar-grid article {
  padding: 20px;
}

.news-card span,
.doc-list span {
  color: var(--gold-500);
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
}

.news-grid {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.news-card {
  display: grid;
  height: 100%;
  gap: 12px;
  min-height: 0;
  padding: 0;
  box-shadow: 0 14px 36px rgba(16, 43, 99, 0.08);
}

.news-card-body {
  display: grid;
  grid-template-rows: 34px minmax(78px, 1fr) 40px;
  gap: 12px;
  height: 100%;
  min-height: 190px;
  padding: 18px;
}

.news-card time,
.post-list-card time {
  box-sizing: border-box;
  display: inline-flex;
  align-items: center;
  justify-self: start;
  height: 34px;
  padding: 5px 10px;
  color: var(--gold-500);
  background: rgba(214, 161, 59, 0.08);
  border: 1px solid rgba(214, 161, 59, 0.28);
  border-radius: 8px;
  font-size: 14px;
  font-weight: 800;
  line-height: 1;
  text-transform: uppercase;
  white-space: nowrap;
}

.news-card h3 {
  margin: 0;
  font-size: 16px;
  line-height: 1.28;
  overflow-wrap: anywhere;
}

.news-card h3 a {
  overflow-wrap: anywhere;
}

.news-read-more {
  justify-self: start;
  align-self: end;
  min-width: 122px;
  height: 40px;
  min-height: 40px;
  margin-top: 0;
}

.news-card.pinned {
  border-color: rgba(214, 161, 59, 0.55);
  background: #fffaf0;
}

.doc-list time {
  color: var(--muted);
  font-size: 13px;
}

.doc-search {
  min-width: 280px;
}

.wipo-resource-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}

.wipo-resource-card,
.aspi-card {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 14px 36px rgba(16, 43, 99, 0.08);
}

.wipo-resource-card {
  display: grid;
  grid-template-columns: 64px 1fr;
  gap: 14px;
  align-items: start;
  padding: 18px;
}

.wipo-resource-card > span,
.aspi-card-head > span {
  display: inline-grid;
  place-items: center;
  min-height: 48px;
  color: #fff;
  background: linear-gradient(135deg, var(--blue-900), var(--blue-500));
  border-radius: 8px;
  font-size: 13px;
  font-weight: 800;
}

.wipo-resource-card h3,
.aspi-card h3 {
  margin: 0;
  color: var(--blue-900);
}

.wipo-resource-card p,
.aspi-card p {
  margin: 6px 0 0;
  color: var(--muted);
}

.wipo-resource-card a {
  grid-column: 2;
  color: var(--blue-700);
  font-weight: 800;
}

.aspi-card {
  grid-column: 1 / -1;
  display: grid;
  gap: 16px;
  padding: clamp(20px, 3vw, 30px);
  background:
    linear-gradient(135deg, rgba(244, 248, 252, 0.96), rgba(255, 255, 255, 0.98)),
    linear-gradient(90deg, rgba(214, 161, 59, 0.22), transparent);
}

.aspi-card-head {
  display: grid;
  grid-template-columns: 76px 1fr;
  gap: 16px;
  align-items: center;
}

.aspi-card-head > span {
  min-height: 64px;
  background: linear-gradient(135deg, var(--gold-500), #b98221);
}

.aspi-partners {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.aspi-partners span {
  display: inline-flex;
  align-items: center;
  min-height: 32px;
  padding: 6px 10px;
  color: var(--blue-900);
  background: var(--soft-2);
  border: 1px solid #c6d9ee;
  border-radius: 8px;
  font-size: 12px;
  font-weight: 800;
}

.partner-section {
  padding-top: 72px;
}

.partner-carousel {
  overflow-x: auto;
  scrollbar-width: none;
}

.partner-carousel::-webkit-scrollbar {
  display: none;
}

.partner-track {
  display: flex;
  gap: 16px;
}

.partner-card {
  display: grid;
  grid-template-rows: 92px 1fr;
  gap: 18px;
  flex: 0 0 calc((100% - 48px) / 4);
  min-width: 0;
  padding: 22px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: 0 14px 36px rgba(16, 43, 99, 0.08);
}

.partner-card img {
  align-self: center;
  justify-self: center;
  max-width: 100%;
  max-height: 86px;
  object-fit: contain;
}

.partner-card p {
  margin: 0;
  color: #344054;
  font-size: 15px;
  line-height: 1.6;
  text-align: center;
}

.doc-list {
  display: grid;
  gap: 10px;
}

.doc-list article {
  padding: 16px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 8px;
}

.content-shell {
  width: min(1120px, calc(100% - 36px));
  margin: 0 auto;
  padding: clamp(12px, 2vw, 24px) 0;
}

.content-hero {
  display: grid;
  gap: 8px;
  margin-bottom: clamp(8px, 1.4vw, 14px);
  padding: clamp(16px, 2.2vw, 22px);
  background:
    linear-gradient(135deg, rgba(244, 248, 252, 0.98), rgba(255, 255, 255, 0.98)),
    linear-gradient(90deg, rgba(214, 161, 59, 0.18), transparent);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: 0 14px 36px rgba(16, 43, 99, 0.08);
}

.content-hero h1 {
  max-width: 900px;
  margin: 0;
  color: var(--blue-900);
  font-size: clamp(30px, 4vw, 48px);
  line-height: 1.08;
}

.article-hero h1 {
  font-size: clamp(22px, 2.3vw, 30px);
  line-height: 1.22;
}

.content-hero time,
.content-hero-text {
  color: var(--muted);
  font-size: 14px;
}

.content-back {
  justify-self: start;
  display: inline-flex;
  align-items: center;
  min-height: 36px;
  padding: 8px 12px;
  color: var(--blue-700);
  background: #fff;
  border: 1px solid #c6d9ee;
  border-radius: 8px;
  font-weight: 800;
}

.article-page {
  display: grid;
  gap: clamp(8px, 1.4vw, 14px);
}

.article-cover {
  margin: 0;
  overflow: hidden;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: 0 14px 36px rgba(16, 43, 99, 0.08);
}

.article-cover img {
  display: block;
  width: 100%;
  max-height: 520px;
  object-fit: cover;
}

.article-panel {
  padding: clamp(18px, 3vw, 32px);
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: 0 14px 36px rgba(16, 43, 99, 0.08);
}

.entry-content {
  color: #253858;
  font-size: 17px;
  line-height: 1.78;
}

.entry-content > *:first-child {
  margin-top: 0;
}

.entry-content > *:last-child {
  margin-bottom: 0;
}

.entry-content h2,
.entry-content h3,
.entry-content h4 {
  color: var(--blue-900);
  line-height: 1.2;
}

.entry-content h2 {
  margin-top: 34px;
  font-size: 28px;
}

.entry-content h3 {
  margin-top: 28px;
  font-size: 22px;
}

.entry-content p,
.entry-content ul,
.entry-content ol,
.entry-content table,
.entry-content blockquote,
.entry-content figure {
  margin: 0 0 18px;
}

.entry-content ul,
.entry-content ol {
  padding-left: 1.35em;
}

.entry-content li + li {
  margin-top: 6px;
}

.entry-content a {
  color: var(--blue-700);
  font-weight: 700;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.entry-content img {
  max-width: 100%;
  height: auto;
  border-radius: 8px;
}

.entry-content figure {
  max-width: 100%;
}

.entry-content figcaption {
  margin-top: 8px;
  color: var(--muted);
  font-size: 14px;
}

.entry-content blockquote {
  padding: 16px 18px;
  color: var(--blue-900);
  background: var(--soft);
  border-left: 4px solid var(--gold-500);
  border-radius: 8px;
}

.entry-content table {
  width: 100%;
  border-collapse: collapse;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
}

.entry-content th,
.entry-content td {
  padding: 12px 14px;
  border: 1px solid var(--line);
  vertical-align: top;
}

.entry-content th {
  color: var(--blue-900);
  background: var(--soft);
}

.post-list {
  display: grid;
  gap: 18px;
}

.post-list-card {
  display: grid;
  grid-template-columns: 1fr;
  gap: 22px;
  align-items: stretch;
  padding: 18px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: 0 14px 36px rgba(16, 43, 99, 0.08);
}

.post-list-body {
  display: grid;
  grid-template-rows: 34px minmax(48px, 1fr) 40px;
  align-content: stretch;
  gap: 12px;
  min-height: 138px;
}

.post-list-body h2 {
  margin: 0;
  color: var(--blue-900);
  font-size: clamp(22px, 3vw, 30px);
  line-height: 1.18;
  overflow-wrap: anywhere;
}

.post-list-body h2 a {
  color: inherit;
  overflow-wrap: anywhere;
}

.post-list-excerpt {
  color: var(--muted);
  line-height: 1.65;
}

.post-list-excerpt p {
  margin: 0;
}

.content-pagination {
  margin-top: 28px;
}

.content-pagination .nav-links,
.page-links {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.content-pagination a,
.content-pagination span,
.page-links a,
.page-links span {
  display: inline-grid;
  place-items: center;
  min-width: 38px;
  min-height: 38px;
  padding: 8px 12px;
  color: var(--blue-900);
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 8px;
  font-weight: 800;
}

.content-pagination .current,
.page-links .current {
  color: #fff;
  background: var(--blue-700);
  border-color: var(--blue-700);
}

.doc-list article > span {
  display: inline-grid;
  place-items: center;
  width: 54px;
  min-height: 42px;
  color: var(--blue-900);
  background: var(--soft-2);
  border-radius: 8px;
}

.doc-list a {
  color: var(--blue-700);
  font-weight: 800;
}

.doc-list .wipo-resource-card {
  display: grid;
  grid-template-columns: 64px 1fr;
  gap: 14px;
  padding: 18px;
}

.doc-list .wipo-resource-card > span,
.doc-list .aspi-card-head > span {
  width: auto;
  color: #fff;
  background: linear-gradient(135deg, var(--blue-900), var(--blue-500));
}

.doc-list .wipo-resource-card a {
  grid-column: 2;
}

.doc-list .aspi-card {
  display: grid;
  gap: 16px;
  padding: clamp(20px, 3vw, 30px);
}

.doc-list .aspi-card .btn {
  justify-self: start;
}

.doc-list .aspi-card-head > span {
  background: linear-gradient(135deg, var(--gold-500), #b98221);
}

.calendar-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.calendar-grid time {
  display: inline-grid;
  place-items: center;
  min-width: 76px;
  min-height: 44px;
  margin-bottom: 14px;
  color: #fff;
  background: var(--blue-700);
  border-radius: 8px;
  font-weight: 800;
}

.site-footer {
  display: grid;
  grid-template-columns: minmax(220px, 0.85fr) minmax(280px, 1.25fr) minmax(250px, 1fr);
  align-items: start;
  gap: 24px;
  padding-top: 40px;
  padding-bottom: 40px;
  color: rgba(255, 255, 255, 0.8);
  background: var(--blue-900);
}

.site-footer strong {
  color: #fff;
}

.site-footer p,
.site-footer a {
  margin: 4px 0 0;
}

.site-footer a {
  display: inline-flex;
  color: rgba(255, 255, 255, 0.9);
}

.site-footer a:hover {
  color: #fff;
}

.site-footer .footer-join-button {
  justify-self: start;
  margin-top: 14px;
  color: var(--blue-900);
  background: var(--gold-500);
  border-color: var(--gold-500);
  cursor: pointer;
}

.site-footer .footer-join-button:hover {
  color: var(--blue-900);
}

.footer-title {
  margin-top: 0;
  color: #fff;
  font-weight: 800;
}

.footer-hours,
.footer-coordinators {
  display: grid;
  gap: 6px;
}

body.join-modal-open {
  overflow: hidden;
}

.join-modal {
  position: fixed !important;
  inset: 0 !important;
  z-index: 9999;
  display: none;
  align-items: center;
  justify-content: center;
  width: 100vw;
  min-height: 100vh;
  min-height: 100dvh;
  padding: 24px;
  isolation: isolate;
}

.join-modal[hidden]:not(.is-open) {
  display: none !important;
}

.join-modal.is-open {
  display: flex !important;
}

.join-modal__backdrop {
  position: fixed;
  inset: 0;
  background: rgba(6, 22, 52, 0.62);
  backdrop-filter: blur(5px);
}

.join-modal__dialog {
  position: relative;
  z-index: 1;
  width: min(640px, calc(100vw - 48px));
  max-height: calc(100vh - 48px);
  max-height: calc(100dvh - 48px);
  margin: auto;
  padding: clamp(24px, 4vw, 36px);
  overflow: auto;
  color: var(--ink);
  background: #fff;
  border: 1px solid rgba(198, 217, 238, 0.9);
  border-top: 5px solid var(--gold-500);
  border-radius: 8px;
  box-shadow: 0 30px 80px rgba(6, 22, 52, 0.32);
  opacity: 0;
  transform: translateY(12px) scale(0.98);
  transition: opacity 0.18s ease, transform 0.18s ease;
}

.join-modal.is-open .join-modal__dialog {
  opacity: 1;
  transform: translateY(0) scale(1);
}

.join-modal__close {
  position: absolute;
  top: 14px;
  right: 14px;
  display: inline-grid;
  place-items: center;
  width: 38px;
  height: 38px;
  color: var(--blue-900);
  background: var(--soft-2);
  border: 1px solid var(--line);
  border-radius: 8px;
  cursor: pointer;
}

.join-modal__close span {
  font-size: 26px;
  line-height: 1;
}

.join-modal__header {
  padding-right: 42px;
}

.join-modal__header h2 {
  margin: 0;
  color: var(--blue-900);
  font-size: clamp(24px, 3vw, 32px);
  line-height: 1.15;
}

.join-modal__header p {
  margin: 10px 0 0;
  color: var(--muted);
}

.join-form {
  display: grid;
  gap: 16px;
  margin-top: 22px;
}

.join-form__grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.join-form label {
  font-weight: 700;
}

.join-form small {
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.join-form textarea {
  min-height: 112px;
}

.join-form__hp {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

.join-form__status {
  min-height: 22px;
  margin: 0;
  color: var(--muted);
  font-weight: 700;
}

.join-form__status.is-success {
  color: #157347;
}

.join-form__status.is-error {
  color: #b42318;
}

.join-form__submit {
  justify-self: start;
  min-width: 170px;
  cursor: pointer;
}

.join-form__submit:disabled {
  cursor: wait;
  opacity: 0.72;
  transform: none;
}

.back-to-top {
  position: fixed;
  right: clamp(18px, 3vw, 34px);
  bottom: clamp(18px, 3vw, 34px);
  z-index: 30;
  display: inline-grid;
  place-items: center;
  width: 46px;
  height: 46px;
  color: #fff;
  background: linear-gradient(135deg, var(--blue-900), var(--blue-500));
  border: 1px solid rgba(255, 255, 255, 0.35);
  border-radius: 8px;
  box-shadow: 0 16px 34px rgba(16, 43, 99, 0.24);
  cursor: pointer;
  opacity: 0;
  pointer-events: none;
  transform: translateY(10px);
  transition: opacity 0.2s ease, transform 0.2s ease, box-shadow 0.2s ease;
}

.back-to-top.is-visible {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0);
}

.back-to-top:hover {
  box-shadow: 0 20px 42px rgba(16, 43, 99, 0.3);
  transform: translateY(-2px);
}

.back-to-top svg {
  width: 24px;
  height: 24px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2.4;
  stroke-linecap: round;
  stroke-linejoin: round;
}

@keyframes panel-shine {
  from {
    transform: translateX(-120%);
  }

  to {
    transform: translateX(120%);
  }
}

@keyframes number-pop {
  0% {
    transform: scale(0.9);
  }

  70% {
    transform: scale(1.08);
  }

  100% {
    transform: scale(1);
  }
}

.is-hidden {
  display: none;
}

@media (max-width: 1280px) {
  .site-header {
    grid-template-columns: auto auto;
  }

  .nav-toggle {
    display: block;
    justify-self: end;
  }

  .main-nav {
    position: absolute;
    top: 76px;
    left: 18px;
    right: 18px;
    display: none;
    flex-direction: column;
    padding: 12px;
    background: #fff;
    border: 1px solid var(--line);
    border-radius: 8px;
    box-shadow: var(--shadow);
  }

  .main-nav.open {
    display: flex;
  }

  .main-nav-list {
    flex-direction: column;
    align-items: stretch;
    width: 100%;
  }

  .main-nav li {
    width: 100%;
  }

  .main-nav .menu-item-has-children::after {
    display: none;
  }

  .main-nav a {
    width: 100%;
    justify-content: space-between;
  }

  .main-nav .sub-menu,
  .main-nav .sub-menu .sub-menu {
    position: static;
    display: grid;
    min-width: 0;
    margin: 4px 0 4px 12px;
    padding: 6px;
    background: var(--soft);
    box-shadow: none;
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
    transform: none;
  }

  .main-nav .sub-menu a {
    font-size: 13px;
  }

  .hero,
  .intro-grid,
  .about-section,
  .levels-layout,
  .network-layout {
    grid-template-columns: 1fr;
  }

  .levels-parallax {
    background-attachment: scroll;
  }

  .levels-heading {
    position: static;
  }

  .metrics {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .site-footer {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .news-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .wipo-resource-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .partner-card {
    flex-basis: calc((100% - 32px) / 3);
  }
}

@media (max-width: 980px) {
  .partner-card {
    flex-basis: calc((100% - 16px) / 2);
  }
}

@media (max-width: 760px) {
  .top-bar-inner {
    justify-content: flex-start;
    gap: 14px;
  }

  .top-contacts,
  .top-socials {
    justify-content: flex-start;
    gap: 12px;
  }

  .site-header {
    grid-template-columns: 1fr auto;
    gap: 12px;
    min-height: 70px;
  }

  .brand {
    min-width: 0;
  }

  .brand-logo {
    width: 150px;
  }

  .brand small {
    display: none;
  }

  .main-nav {
    top: 70px;
  }

  .hero {
    min-height: auto;
    padding-top: 38px;
  }

  .hero-logo-grid {
    grid-template-columns: repeat(2, minmax(130px, 180px));
    gap: 14px;
    width: 100%;
    margin-top: 22px;
  }

  .hero h1 {
    font-size: 38px;
  }

  .filters,
  .news-grid,
  .wipo-resource-grid,
  .calendar-grid,
  .join-form__grid {
    grid-template-columns: 1fr;
  }

  .join-modal {
    padding: 14px;
  }

  .join-modal__dialog {
    width: calc(100vw - 28px);
    max-height: calc(100vh - 28px);
    max-height: calc(100dvh - 28px);
    padding: 22px 18px;
  }

  .join-modal__header {
    padding-right: 34px;
  }

  .join-modal__header h2 {
    font-size: 24px;
  }

  .metrics {
    grid-template-columns: 1fr;
  }

  .section-heading,
  .doc-list article,
  .site-footer {
    align-items: flex-start;
    grid-template-columns: 1fr;
  }

  .content-shell {
    width: min(100% - 28px, 1120px);
    padding-top: 10px;
  }

  .content-hero,
  .article-panel {
    padding: 14px;
  }

  .post-list-card {
    grid-template-columns: 1fr;
    padding: 14px;
  }

  .section-heading {
    display: flex;
  }

  .doc-search {
    width: 100%;
    min-width: 0;
  }

  .center-card {
    grid-template-columns: 1fr;
    align-items: flex-start;
  }

  .center-list {
    grid-template-columns: 1fr;
  }

  .partner-card {
    flex-basis: 100%;
  }
}

