@media (max-width: 980px) {
  .hero {
    position: relative;
    display: block;
    min-height: 760px;
    border-radius: 28px;
    overflow: hidden;
    background: #eef3f7;
    box-shadow: var(--shadow);
  }

  .hero::before {
    content: "";
    position: absolute;
    inset: 0;
    z-index: 1;
    background:
      linear-gradient(90deg, rgba(255,255,255,0.94) 0%, rgba(255,255,255,0.88) 36%, rgba(255,255,255,0.42) 58%, rgba(255,255,255,0.06) 78%, rgba(255,255,255,0) 100%);
    pointer-events: none;
  }

  .hero-image {
    position: absolute;
    inset: 0;
    min-height: 100%;
    background-image: url("images/maska.jpg");
    background-size: cover;
    background-position: 72% center;
    z-index: 0;
  }

  .hero-text {
    position: relative;
    z-index: 2;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    gap: 18px;
    width: min(62%, 560px);
    min-height: 100%;
    padding: 34px 28px 28px;
  }

  .hero-title {
    max-width: none;
    font-size: clamp(2.3rem, 5vw, 3.4rem);
    line-height: 0.98;
    letter-spacing: -0.04em;
    color: #0f172a;
    word-break: normal;
    overflow-wrap: normal;
    hyphens: none;
    text-wrap: balance;
  }

  .hero-p {
    max-width: 30ch;
    font-size: 1rem;
    line-height: 1.5;
    color: #66768a;
  }

  .hero-actions {
    display: flex;
    flex-direction: column;
    gap: 12px;
    width: 100%;
    max-width: 360px;
  }

  .hero-button,
  .hero-button--secondary {
    width: 100%;
    min-width: 0;
  }

  .hero-meta {
    display: grid;
    grid-template-columns: 1fr;
    gap: 10px;
    max-width: 360px;
    margin-top: 8px;
  }

  .hero-stat {
    padding: 14px 16px;
    border-radius: 18px;
    background: rgba(255, 255, 255, 0.82);
    backdrop-filter: blur(8px);
    border: 1px solid rgba(255,255,255,0.6);
    box-shadow: 0 8px 20px rgba(15, 23, 42, 0.08);
  }

  .hero-stat__value {
    font-size: 1rem;
    line-height: 1.15;
  }

  .hero-stat__label {
    font-size: 0.85rem;
    line-height: 1.35;
  }

  .section-grid {
    grid-template-columns: 1fr;
  }

  .tabs {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .articles {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 720px) {
  .page {
    padding: 14px;
  }

  .top-row {
    grid-template-columns: 44px 56px 1fr;
    gap: 10px;
    align-items: center;
    padding-bottom: 10px;
  }

  .top-row img {
    width: 56px;
    height: 56px;
    border-radius: 16px;
  }

  .site-kicker {
    display: none;
  }

  .site-title {
    font-size: 1rem;
    line-height: 1.18;
  }

  .divider {
    margin: 6px 0 18px;
  }

  .hero {
    min-height: 820px;
    border-radius: 24px;
  }

  .hero::before {
    background:
      linear-gradient(180deg, rgba(255,255,255,0.88) 0%, rgba(255,255,255,0.64) 34%, rgba(255,255,255,0.18) 60%, rgba(255,255,255,0.06) 100%),
      linear-gradient(90deg, rgba(255,255,255,0.86) 0%, rgba(255,255,255,0.56) 42%, rgba(255,255,255,0.14) 72%, rgba(255,255,255,0) 100%);
  }

  .hero-image {
    background-position: 68% center;
  }

  .hero-text {
    width: 100%;
    max-width: 100%;
    padding: 24px 18px 18px;
    gap: 16px;
  }

  .hero-title {
    font-size: clamp(2.1rem, 7.2vw, 2.9rem);
    line-height: 1;
    text-wrap: pretty;
  }

  .hero-p {
    max-width: 28ch;
    font-size: 0.98rem;
  }

  .hero-actions,
  .hero-meta {
    max-width: 100%;
  }

  .tabs {
    grid-template-columns: 1fr;
    gap: 12px;
  }

  .info-panel,
  .callout-panel,
  .article,
  .tabs-item {
    border-radius: 20px;
    padding: 18px;
  }
}

@media (max-width: 480px) {
  .page {
    padding: 10px;
  }

  .top-row {
    grid-template-columns: 42px 50px 1fr;
    gap: 8px;
  }

  .top-row img {
    width: 50px;
    height: 50px;
    border-radius: 14px;
  }

  .site-title {
    font-size: 0.95rem;
    line-height: 1.15;
  }

  .burger {
    width: 42px;
    height: 42px;
    border-radius: 12px;
  }

  .hero {
    min-height: 780px;
    border-radius: 22px;
  }

  .hero::before {
    background:
      linear-gradient(180deg, rgba(255,255,255,0.90) 0%, rgba(255,255,255,0.68) 34%, rgba(255,255,255,0.22) 58%, rgba(255,255,255,0.08) 100%),
      linear-gradient(90deg, rgba(255,255,255,0.88) 0%, rgba(255,255,255,0.62) 46%, rgba(255,255,255,0.18) 76%, rgba(255,255,255,0) 100%);
  }

  .hero-image {
    background-position: 70% center;
  }

  .hero-text {
    padding: 18px 14px 14px;
    gap: 14px;
  }

  .hero-title {
    font-size: clamp(1.9rem, 8vw, 2.35rem);
    line-height: 1.02;
    letter-spacing: -0.035em;
    word-break: normal;
    overflow-wrap: normal;
  }

  .hero-p {
    max-width: 24ch;
    font-size: 0.93rem;
    line-height: 1.45;
  }

  .hero-button,
  .hero-button--secondary {
    padding: 14px 18px;
  }

  .hero-stat {
    padding: 12px 14px;
    border-radius: 14px;
  }

  .hero-stat__value {
    font-size: 0.96rem;
  }

  .hero-stat__label {
    font-size: 0.8rem;
  }

  .info-panel,
  .callout-panel,
  .article,
  .tabs-item {
    padding: 16px;
  }

  .docs-title,
  .test-title {
    font-size: 1.35rem;
    line-height: 1.15;
  }

  .side-menu {
    width: min(86vw, 320px);
    left: calc(-1 * min(86vw, 320px));
    padding: 18px 16px;
  }
}