/* itlogin.ru — дополнения к общему style.css (меню с подменю, страницы-статьи, таблицы, подвал) */

/* ---------- Меню с подменю ---------- */
.nav--site { align-items: center; }
.nav__item { position: relative; display: flex; align-items: center; }
.nav__toggle { display: none; }
.nav__sub a { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.nav__ext { width: 14px; height: 14px; flex: none; opacity: .55; }

@media (min-width: 1101px) {
  .nav__item--sub > .nav__top::after { content: ""; display: inline-block; width: 7px; height: 7px; margin: 0 0 3px 7px; border-right: 2px solid currentColor; border-bottom: 2px solid currentColor; transform: rotate(45deg); opacity: .5; }
  .nav__sub { position: absolute; top: 100%; left: -8px; min-width: 280px; padding: 8px; margin-top: 6px; background: #fff; border: 1px solid var(--line); border-radius: var(--radius-sm); box-shadow: 0 16px 40px rgba(34,33,31,.12); display: grid; gap: 2px; opacity: 0; visibility: hidden; transform: translateY(4px); transition: opacity .15s, transform .15s, visibility .15s; }
  .nav__sub::before { content: ""; position: absolute; left: 0; right: 0; top: -12px; height: 12px; }
  .nav__item:hover > .nav__sub, .nav__item:focus-within > .nav__sub { opacity: 1; visibility: visible; transform: none; }
  .nav .nav__sub a { border-radius: 10px; padding: 9px 12px; font-size: 15px; white-space: normal; }
  .nav { gap: 2px; }
}
@media (max-width: 1100px) {
  .nav--site { align-items: stretch; max-height: calc(100vh - var(--header-h)); overflow-y: auto; }
  .nav__item { flex-wrap: wrap; border-bottom: 1px solid var(--line); }
  .nav .nav__item > .nav__top { flex: 1; border-bottom: 0; }
  .nav__toggle { display: grid; place-items: center; width: 48px; height: 48px; border: 0; background: none; cursor: pointer; }
  .nav__toggle::before { content: ""; width: 9px; height: 9px; border-right: 2px solid var(--ink); border-bottom: 2px solid var(--ink); transform: rotate(45deg); margin-top: -4px; transition: transform .15s; }
  .nav__item.is-open .nav__toggle::before { transform: rotate(-135deg); margin-top: 4px; }
  .nav__sub { display: none; flex-basis: 100%; padding: 0 0 10px 12px; }
  .nav__item.is-open .nav__sub { display: grid; }
  .nav .nav__sub a { border-bottom: 0; padding: 10px 4px; font-size: 16px; font-weight: 500; }
}

/* ---------- Шапка страницы ---------- */
.page-hero { padding: 40px 0 48px; background: radial-gradient(1000px 420px at 90% 0%, var(--bg-warm), transparent 60%), var(--bg); border-bottom: 1px solid var(--line); }
.page-hero .hero__title { font-size: clamp(30px, 4.4vw, 52px); max-width: 920px; }
.page-hero .hero__lead { max-width: 760px; }
.page-hero--home { padding: 64px 0 72px; }
.page-hero--home .hero__title { font-size: clamp(36px, 5.6vw, 68px); }
.page-hero .crumbs { margin-bottom: 18px; }
.page-date { margin-top: 14px; color: var(--muted); font-weight: 600; }
.crumbs { display: flex; flex-wrap: wrap; gap: 6px 8px; font-size: 14px; color: var(--muted); }
.crumbs a { color: var(--muted); text-decoration: none; }
.crumbs a:hover { color: var(--ink); text-decoration: underline; }
@media (max-width: 720px) { .page-hero { padding: 28px 0 36px; } .page-hero--home { padding: 36px 0 44px; } }

/* ---------- Текст страницы ---------- */
.prose { font-size: 17px; line-height: 1.65; color: var(--ink-2); }
.prose > * + * { margin-top: 18px; }
.prose h2 { margin-top: 56px; font-size: clamp(24px, 3vw, 34px); line-height: 1.2; letter-spacing: -0.02em; color: var(--ink); }
.prose h3 { margin-top: 32px; font-size: 21px; line-height: 1.3; color: var(--ink); }
.prose h4 { margin-top: 24px; font-size: 18px; color: var(--ink); }
.prose > h2:first-child, .prose > h3:first-child { margin-top: 0; }
.prose h2 + *, .prose h3 + *, .prose h4 + * { margin-top: 12px; }
.prose p, .prose > ul, .prose > ol { max-width: 820px; }
.prose a:not(.btn):not(.card):not(.chip) { color: var(--ink); text-decoration: underline; text-decoration-color: var(--yellow-hover); text-decoration-thickness: 2px; text-underline-offset: 3px; }
.prose a:not(.btn):not(.card):not(.chip):hover { text-decoration-color: var(--ink); }
.prose b { color: var(--ink); }
.prose ol { padding-left: 22px; list-style: decimal; display: grid; gap: 8px; }
.prose ol li::marker { font-weight: 800; color: var(--ink); }
.prose .ticks { margin-top: 18px; }
.prose h2 + .ticks, .prose h3 + .ticks { margin-top: 14px; }
.fig { margin-top: 24px; max-width: 900px; }
.fig img { display: block; max-width: 100%; height: auto; border-radius: var(--radius-sm); border: 1px solid var(--line); background: #fff; }
.fig figcaption { margin-top: 8px; font-size: 14px; color: var(--muted); }

/* карточки и шаги внутри текста */
.prose .md-cards { margin-top: 24px; }
.prose .card { font-size: 16px; line-height: 1.55; }
.prose .card__body > * + * { margin-top: 10px; }
.prose .card__body .ticks { margin-top: 10px; gap: 8px; }
.prose .card__body .ticks li { font-size: 15px; }
.prose a.card { text-decoration: none; color: inherit; }
.prose a.card .card__more { margin-top: auto; color: var(--ink); }
a.card:hover .card__more svg { transform: translateX(3px); }
.md-steps { counter-reset: mstep; display: grid; gap: 14px; margin-top: 24px; max-width: 900px; list-style: none; padding: 0; }
.md-steps > li { counter-increment: mstep; display: grid; grid-template-columns: 44px 1fr; gap: 16px; padding: 20px 22px; background: var(--bg-soft); border-radius: var(--radius-sm); }
.md-steps > li::before { content: counter(mstep); display: grid; place-items: center; width: 44px; height: 44px; border-radius: 12px; background: var(--yellow); color: var(--ink); font-weight: 800; font-size: 18px; }
.md-steps h3 { margin: 8px 0 0; font-size: 18px; }
.md-steps h3 + * { margin-top: 6px; }
.md-steps p { font-size: 16px; }
.prose .md-steps { grid-template-columns: none; }

.callout { padding: 20px 24px; border-left: 4px solid var(--yellow); background: var(--bg-warm); border-radius: 0 var(--radius-sm) var(--radius-sm) 0; max-width: 900px; }
.callout > * + * { margin-top: 10px; }

.cta-band { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 16px 32px; margin-top: 40px !important; padding: 28px 32px; border-radius: var(--radius); background: var(--dark); color: #f3f1ec; }
.cta-band__text { flex: 1 1 380px; }
.cta-band__text p { color: #e9e6df; }
.cta-band__text b, .cta-band__text h2, .cta-band__text h3 { color: #fff; }
.cta-band__text > * + * { margin-top: 8px; }
.cta-band .btn svg { width: 18px; height: 18px; }
@media (max-width: 640px) { .cta-band { padding: 22px; } .cta-band .btn { width: 100%; } }

/* ---------- Таблицы ---------- */
.tbl-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; margin-top: 20px; border: 1px solid var(--line); border-radius: var(--radius-sm); }
.tbl { width: 100%; border-collapse: collapse; font-size: 15px; line-height: 1.45; background: #fff; }
.tbl th, .tbl td { padding: 12px 16px; text-align: left; vertical-align: top; border-bottom: 1px solid var(--line); }
.tbl tr:last-child td { border-bottom: 0; }
.tbl th { background: var(--bg-soft); color: var(--ink); font-weight: 800; font-size: 14px; }
.tbl td { color: var(--ink-2); }
.tbl--price td:last-child, .tbl--price th:last-child { text-align: right; white-space: nowrap; font-weight: 700; color: var(--ink); }
@media (max-width: 640px) { .tbl { font-size: 14px; } .tbl th, .tbl td { padding: 10px 12px; } }
.price-block { margin-top: 20px; }
.price-block__note { margin-top: 12px !important; font-size: 14px; color: var(--muted); }

/* ---------- Ссылки на раздел, новости ---------- */
.related { margin-top: 56px !important; padding-top: 28px; border-top: 1px solid var(--line); }
.related__title { font-weight: 800; color: var(--ink); margin-bottom: 14px; }
.related .chip { text-decoration: none; color: var(--ink); }
.related .chip:hover { border-color: var(--ink); }
.news-item__date { font-size: 14px; color: var(--muted); font-weight: 600; }
.back { margin-top: 40px !important; }
.req { color: var(--red); }

/* ---------- Подвал ---------- */
.footer__grid--site { grid-template-columns: 1.4fr 1fr 1.1fr 1fr; }
.footer__contacts { margin-top: 16px; }
.footer__contacts a { font-weight: 700; color: var(--ink); }
@media (max-width: 1024px) { .footer__grid--site { grid-template-columns: 1fr 1fr; } }
@media (max-width: 640px) { .footer__grid--site { grid-template-columns: 1fr; } }

.footer__legal { display: inline-flex; flex-wrap: wrap; gap: 6px 20px; }
.link-btn { background: none; border: 0; padding: 0; font: inherit; color: var(--muted); text-decoration: underline; cursor: pointer; }
.link-btn:hover { color: var(--ink); }
