/* Страница «Документы и сертификаты» (page-documents.php). Макет iCure.
 * Все правила внутри .docs-page и .docs-lightbox, на остальные страницы не влияют. */

.docs-page,
.docs-lightbox {
	--docs-primary: #10537e;
	--docs-primary-dark: #0b3f61;
	--docs-accent: #f26b21;
	--docs-bg: #f0f9ff;
	--docs-text: #10537e;
	--docs-muted: #5b7f96;
	--docs-radius: 12px;
	--docs-gap: 16px;
	font-family: "Montserrat", system-ui, -apple-system, "Segoe UI", Arial, sans-serif;
}

.docs-page { color: var(--docs-text); padding: 0; }
.docs-page .docs { max-width: 1200px; }

.docs-top { background: var(--docs-bg); padding: 20px 0 56px; }
.docs-bottom { background: #fff; padding: 56px 0 64px; }

/* Хлебные крошки */
.docs-crumbs { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; font-size: 13px; margin-bottom: 20px; }
.docs-crumbs a { color: var(--docs-text); text-decoration: none; }
.docs-crumbs a:hover { text-decoration: underline; }
.docs-crumbs__sep { color: var(--docs-primary); font-size: 10px; }
.docs-crumbs [aria-current] { color: var(--docs-accent); }

/* Заголовок */
.docs__title { font-size: 44px; line-height: 1.15; font-weight: 700; color: var(--docs-primary); margin-bottom: 32px; max-width: 760px; }
.docs__intro { font-size: 15px; line-height: 1.6; max-width: 1040px; margin: -12px 0 32px; }

/* Разделы: на десктопе два в ряд */
.docs-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 40px 32px; }
.docs-section { min-width: 0; }
.docs-section__title { font-size: 20px; line-height: 1.3; font-weight: 700; color: var(--docs-primary); margin-bottom: 14px; }

/* Слайдер: лента со scroll-snap, на десктопе по 2 изображения */
.docs-slider { min-width: 0; }
.docs-slider__track {
	display: grid; grid-auto-flow: column; grid-auto-columns: calc((100% - var(--docs-gap)) / 2);
	gap: var(--docs-gap); overflow-x: auto; scroll-snap-type: x mandatory; scroll-behavior: smooth;
	scrollbar-width: none; overscroll-behavior-x: contain;
}
.docs-slider__track::-webkit-scrollbar { display: none; }
.docs-slider__track:focus-visible { outline: 2px solid var(--docs-accent); outline-offset: 4px; border-radius: var(--docs-radius); }

.docs-slide { margin: 0; scroll-snap-align: start; min-width: 0; }
.docs-slide__link { display: block; border-radius: 10px; overflow: hidden; background: #fff; cursor: zoom-in; position: relative; }
.docs-slide__link::after {
	content: ""; position: absolute; inset: 0; background: rgba(16, 83, 126, .08); opacity: 0; transition: opacity .2s;
}
.docs-slide__link:hover::after { opacity: 1; }
.docs-slide__link:focus-visible { outline: 2px solid var(--docs-accent); outline-offset: 2px; }
.docs-slide__img { display: block; width: 100%; height: auto; aspect-ratio: 210 / 297; object-fit: cover; background: #dbdbdb; }
.docs-slide__caption { margin-top: 10px; padding-left: 8px; border-left: 2px solid var(--docs-primary); font-size: 12px; line-height: 1.4; color: var(--docs-muted); }

/* Навигация слайдера */
.docs-slider__nav { display: flex; align-items: center; justify-content: space-between; margin-top: 14px; }
.docs-slider__nav[hidden] { display: none; }
.docs-slider__dots { display: flex; gap: 6px; }
.docs-dot { width: 6px; height: 6px; padding: 0; border: 0; border-radius: 50%; background: #c3d4df; cursor: pointer; }
.docs-dot.is-active { background: var(--docs-primary); }
.docs-dot:focus-visible { outline: 2px solid var(--docs-accent); outline-offset: 2px; }
.docs-slider__arrows { display: flex; gap: 6px; }

.docs-arrow {
	position: relative; flex: 0 0 auto; width: 28px; height: 28px; padding: 0; border: 0; border-radius: 50%;
	background: var(--docs-primary); cursor: pointer; transition: background .2s, opacity .2s;
}
.docs-arrow:hover { background: var(--docs-primary-dark); }
.docs-arrow:disabled { opacity: .35; cursor: default; }
.docs-arrow::before {
	content: ""; position: absolute; top: 50%; left: 50%; width: 7px; height: 7px; margin: -4px 0 0 -6px;
	border: solid #fff; border-width: 0 2px 2px 0; transform: rotate(-45deg);
}
.docs-arrow--prev::before { margin-left: -2px; transform: rotate(135deg); }
.docs-arrow:focus-visible { outline: 2px solid var(--docs-accent); outline-offset: 2px; }

/* SEO-текст */
.docs__seo { font-size: 14px; line-height: 1.6; color: var(--docs-text); }
.docs__seo > * + * { margin-top: 12px; }
.docs__seo h2 { font-size: 32px; line-height: 1.2; font-weight: 700; color: var(--docs-primary); margin-bottom: 24px; }
.docs__seo h3 { font-size: 20px; line-height: 1.3; font-weight: 700; margin-top: 24px; }
.docs__seo strong, .docs__seo b { font-weight: 700; }
.docs__seo a { color: var(--docs-primary); text-decoration: underline; text-underline-offset: 2px; }
.docs__seo a:hover { color: var(--docs-accent); }

/* Лайтбокс */
.docs-lightbox {
	width: 100vw; height: 100vh; max-width: none; max-height: none; margin: 0; padding: 0; border: 0;
	background: rgba(8, 30, 46, .92); color: #fff;
}
.docs-lightbox::backdrop { background: rgba(8, 30, 46, .6); }
.docs-lightbox__inner { position: relative; display: flex; align-items: center; justify-content: center; width: 100%; height: 100%; padding: 56px 72px; box-sizing: border-box; }
.docs-lightbox__figure { margin: 0; display: flex; flex-direction: column; align-items: center; max-width: 100%; max-height: 100%; }
.docs-lightbox__img { display: block; max-width: 100%; max-height: calc(100vh - 150px); width: auto; height: auto; border-radius: 6px; background: #fff; }
.docs-lightbox__caption { margin-top: 12px; font-size: 14px; line-height: 1.4; text-align: center; }
.docs-lightbox__caption:empty { display: none; }
.docs-lightbox__prev, .docs-lightbox__next { position: absolute; top: 50%; width: 44px; height: 44px; margin-top: -22px; background: rgba(255, 255, 255, .15); }
.docs-lightbox__prev:hover, .docs-lightbox__next:hover { background: rgba(255, 255, 255, .3); }
.docs-lightbox__prev { left: 16px; }
.docs-lightbox__next { right: 16px; }
.docs-lightbox__prev[hidden], .docs-lightbox__next[hidden] { display: none; }
.docs-lightbox__close {
	position: absolute; top: 12px; right: 12px; width: 44px; height: 44px; padding: 0; border: 0; border-radius: 50%;
	background: rgba(255, 255, 255, .15); cursor: pointer;
}
.docs-lightbox__close:hover { background: rgba(255, 255, 255, .3); }
.docs-lightbox__close::before, .docs-lightbox__close::after {
	content: ""; position: absolute; top: 50%; left: 50%; width: 18px; height: 2px; margin: -1px 0 0 -9px; background: #fff; border-radius: 1px;
}
.docs-lightbox__close::before { transform: rotate(45deg); }
.docs-lightbox__close::after { transform: rotate(-45deg); }
.docs-lightbox__close:focus-visible { outline: 2px solid var(--docs-accent); outline-offset: 2px; }
.docs-lightbox__counter { position: absolute; top: 24px; left: 24px; font-size: 13px; opacity: .8; }
html.docs-lb-open { overflow: hidden; }

/* Адаптив */
@media (max-width: 900px) {
	.docs__title { font-size: 34px; }
	.docs-grid { gap: 32px 24px; }
	.docs__seo h2 { font-size: 28px; }
}
@media (max-width: 640px) {
	.docs-top { padding: 16px 0 40px; }
	.docs-bottom { padding: 40px 0 48px; }
	.docs__title { font-size: 26px; margin-bottom: 24px; }
	.docs-grid { grid-template-columns: minmax(0, 1fr); gap: 32px; }
	.docs-slider__track { grid-auto-columns: 100%; }
	.docs-section__title { font-size: 18px; }
	.docs__seo h2 { font-size: 24px; margin-bottom: 16px; }
	.docs-lightbox__inner { padding: 56px 8px 72px; }
	.docs-lightbox__img { max-height: calc(100vh - 160px); }
	.docs-lightbox__prev, .docs-lightbox__next { top: auto; bottom: 16px; margin-top: 0; }
	.docs-lightbox__prev { left: calc(50% - 56px); }
	.docs-lightbox__next { right: calc(50% - 56px); }
}
