/* Area "content" — articles, blog, contacts and the other inner pages. See DESIGN.md. */

/* focus ring follows the shape of the element (base.css rounds every focused element to 4 px) */
.e-post-card:focus-visible, .e-contacts__item:focus-visible { border-radius: var(--e-radius-lg); }
.e-pager__num:focus-visible, .e-pager__step:focus-visible { border-radius: var(--e-radius-md); }
.e-article__tags .e-chip:focus-visible, .e-tags__chips .e-chip:focus-visible { border-radius: 999px; }

/* ---------- page header (template-parts/hero-inner.php) ---------- */
.e-page-head { padding: var(--e-s6) 0 var(--e-s8); background: var(--e-bg-soft); border-bottom: 1px solid var(--e-line); }
.e-page-head--plain { padding-bottom: var(--e-s6); background: transparent; border-bottom: 0; }
.e-page-head__title { margin-top: var(--e-s3); overflow-wrap: break-word; }
.e-crumbs + .e-page-head__title { margin-top: var(--e-s4); }
.e-article .e-page-head__title { font-size: clamp(28px, 4.6vw, 44px); line-height: 1.15; }
.e-page-head__lead { margin-top: var(--e-s4); }
.e-page-head__lead > * + * { margin-top: .6em; }
.e-page-head__meta { margin-top: var(--e-s4); font-size: 15px; color: var(--e-muted); }
@media (min-width: 960px) {
	.e-page-head { padding: var(--e-s8) 0 var(--e-s12); }
	.e-page-head--plain { padding-bottom: var(--e-s8); }
}

/* ---------- breadcrumbs ---------- */
.e-crumbs { font-size: 14px; line-height: 1.5; color: var(--e-muted); }
.e-crumbs ol { display: flex; align-items: center; min-width: 0; overflow: hidden; white-space: nowrap; }
.e-crumbs li { display: flex; align-items: center; flex: none; min-width: 0; }
.e-crumbs li + li::before { content: "›"; content: "›" / ""; margin: 0 8px; color: #94a3b8; }
.e-crumbs li:last-child { flex: 1 1 auto; overflow: hidden; }
.e-crumbs li:last-child span { overflow: hidden; text-overflow: ellipsis; }
.e-crumbs a { display: inline-block; padding: 4px 0; color: var(--e-muted); }
.e-crumbs a:hover { color: var(--e-primary); text-decoration: underline; text-underline-offset: 2px; }
.e-crumbs [aria-current] { color: var(--e-text); }

/* ---------- editor text: classic posts and Elementor posts (.e-entry on top of .e-prose) ---------- */
.e-entry { overflow-wrap: break-word; }
.e-entry :is(iframe, video, embed, object, figure, .wp-caption, [style*="width"]) { max-width: 100%; }
.e-entry iframe { width: 100%; border: 0; }
.e-entry iframe[src*="youtube"], .e-entry iframe[src*="vimeo"] { height: auto; aspect-ratio: 16 / 9; }
.e-entry figure img, .e-entry .wp-caption img { width: 100%; }
.e-entry :is(figcaption, .wp-caption-text) { margin-top: var(--e-s2); font-size: 14px; color: var(--e-muted); }
.e-entry hr { height: 1px; margin: 2em 0; border: 0; background: var(--e-line); }
.e-entry pre { overflow-x: auto; padding: var(--e-s4); border-radius: var(--e-radius-md); background: var(--e-bg-soft); font-size: 15px; }
.e-entry .aligncenter { margin-left: auto; margin-right: auto; }
@media (min-width: 640px) {
	.e-entry .alignleft { float: left; max-width: 50%; margin: .3em var(--e-s6) var(--e-s4) 0; }
	.e-entry .alignright { float: right; max-width: 50%; margin: .3em 0 var(--e-s4) var(--e-s6); }
	.e-entry::after { content: ""; display: table; clear: both; }
}
.e-entry .table_wrap { max-width: 100%; overflow-x: auto; -webkit-overflow-scrolling: touch; border-radius: var(--e-radius-md); }
.e-entry .table_wrap:focus-visible { outline-offset: 0; }
.e-entry .table_wrap table { margin: 0; }
.e-entry tbody tr:nth-child(even) td { background: #fbfcfe; }

/* article blocks from content/ (see DESIGN.md → Articles): the short answer, questions and answers, sources */
.e-entry .e-short {
	margin: 0 0 1.75em; padding: var(--e-s5) var(--e-s6); border-radius: var(--e-radius-md);
	background: var(--e-primary-50); border-left: 4px solid var(--e-primary); color: var(--e-ink);
}
.e-entry .e-short > :first-child { margin-top: 0; }
.e-entry .e-short > :last-child { margin-bottom: 0; }
.e-entry .e-short b:first-child { color: var(--e-primary-700); }
.e-entry .emy-faq > h3 { margin-top: 1.25em; padding-top: 1.25em; border-top: 1px solid var(--e-line); font-size: 18px; }
.e-entry .emy-faq > h3:first-child { margin-top: .5em; padding-top: 0; border-top: 0; }
.e-entry .e-sources { margin-top: 2.5em; padding-top: var(--e-s6); border-top: 1px solid var(--e-line); font-size: 15px; color: var(--e-muted); }
.e-entry .e-sources h2 { margin-top: 0; font-size: 18px; color: var(--e-ink); }
.e-entry .e-sources ul { padding-left: 1.2em; }
.e-entry .e-sources li + li { margin-top: .4em; }
.e-entry .e-sources a { overflow-wrap: anywhere; }
/* «Вопрос из билета» in articles: picture, question, numbered answers and the answer behind <details> */
.e-entry .e-question { margin: 1.75em 0; padding: var(--e-s5); border: 1px solid var(--e-line); border-radius: var(--e-radius-md); background: var(--e-bg-soft); }
.e-entry .e-question > :first-child { margin-top: 0; }
.e-entry .e-question > :last-child { margin-bottom: 0; }
.e-entry .e-question figure { margin: 0 0 1em; }
.e-entry .e-question img { display: block; height: auto; border-radius: var(--e-radius-sm); }
.e-entry .e-question__q { margin: 0 0 .5em; }
.e-entry .e-question__q b:first-child { color: var(--e-primary-700); }
.e-entry .e-question__answers { margin: 0 0 1em; padding-left: 1.4em; }
.e-entry .e-question__answers li + li { margin-top: .3em; }
.e-entry .e-question details { padding-top: .75em; border-top: 1px solid var(--e-line); }
.e-entry .e-question summary { cursor: pointer; font-weight: 600; color: var(--e-primary-700); }
.e-entry .e-question summary:focus-visible { outline: 2px solid var(--e-primary); outline-offset: 2px; border-radius: 2px; }
.e-entry .e-question details > p { margin: .6em 0 0; }

/* Elementor: the posts are an image widget and a text widget in containers. Drop the container padding so the text
   lines up with the title, use our font and colours instead of the kit's Roboto/grey, and undo the inline styles
   pasted from Google Docs (11pt Arial, black, white-space: pre on list items, which made the page scroll sideways). */
.e-entry .elementor { max-width: 100%; }
.e-entry .e-con {
	--container-default-padding-top: 0px; --container-default-padding-right: 0px;
	--container-default-padding-bottom: 0px; --container-default-padding-left: 0px;
	--container-max-width: 100%;
}
.e-entry .e-con.e-parent + .e-con.e-parent { margin-top: 1.25em; }
.e-entry .elementor-widget:not(:last-child) { margin-block-end: 1.25em; }
.e-entry .elementor-widget-text-editor { font-family: inherit; font-size: inherit; font-weight: inherit; line-height: inherit; color: inherit; }
.e-entry .elementor img { border-radius: var(--e-radius-md); }
.e-entry .elementor-widget-image img { width: 100%; }
.e-entry .elementor-widget-container > * + * { margin-top: 1em; }
.e-entry .elementor-widget-container > :first-child { margin-top: 0; }
.e-entry [style*="font-family"] { font-family: inherit !important; }
.e-entry [style*="font-size"] { font-size: inherit !important; }
.e-entry [style*="line-height"] { line-height: inherit !important; }
.e-entry [style*="white-space"] { white-space: normal !important; }
.e-entry :is(span, p, li, strong, b, em, i)[style*="color"] { color: inherit !important; }
.e-entry :is(ul, ol)[style*="padding"] { padding-inline-start: 1.3em !important; }
.e-entry .elementor-widget-text-editor :is(p, h2, h3, h4, h5, ul, ol)[style*="margin"] { margin-top: 1em !important; margin-bottom: 0 !important; }
.e-entry .elementor-widget-text-editor h4[style*="margin"] { margin-top: 1.4em !important; }
.e-entry .elementor-widget-text-editor .elementor-widget-container > :first-child { margin-top: 0 !important; }
.e-entry .elementor-widget-text-editor li > p[style*="margin"] { margin: 0 !important; }
.e-entry .elementor-widget-text-editor li > :is(ul, ol)[style*="margin"] { margin-top: .4em !important; }

/* ---------- article ---------- */
.e-article__main { padding-bottom: var(--e-s12); }
.e-article__cover { margin: 0 0 var(--e-s8); }
.e-article__cover img { width: 100%; border-radius: var(--e-radius-lg); background: var(--e-bg-soft); }
.e-article__tags { display: flex; flex-wrap: wrap; align-items: center; gap: var(--e-s2); margin-top: var(--e-s10); padding-top: var(--e-s6); border-top: 1px solid var(--e-line); }
.e-article__tags-label { margin-right: var(--e-s1); font-size: 14px; font-weight: 600; color: var(--e-muted); }
.e-article__tags ul { display: flex; flex-wrap: wrap; gap: var(--e-s2); }
.e-article__tags .e-chip { min-height: 32px; transition: background-color .15s, color .15s; }
.e-article__tags .e-chip:hover { background: var(--e-primary); color: #fff; }

/* «practise before the exam» */
.e-practice {
	display: grid; grid-template-columns: minmax(0, 1fr); gap: var(--e-s4) var(--e-s5);
	margin-top: var(--e-s10); padding: var(--e-s6) var(--e-s5);
	border: 1px solid #d6e2fb; border-radius: var(--e-radius-xl);
	background: linear-gradient(135deg, var(--e-primary-50) 0%, #fff 100%);
}
.e-practice__icon { display: grid; place-items: center; width: 48px; height: 48px; border-radius: var(--e-radius-lg); background: var(--e-primary); color: #fff; box-shadow: 0 6px 16px rgba(37, 99, 235, .25); }
.e-practice__text p { margin-top: var(--e-s2); color: var(--e-text); }
.e-practice__actions { display: flex; flex-direction: column; align-items: flex-start; gap: var(--e-s4); margin-top: var(--e-s1); }
.e-practice__actions .e-btn { white-space: normal; }
@media (max-width: 639px) {
	.e-practice__actions .e-btn { width: 100%; }
}
@media (min-width: 640px) {
	.e-practice { grid-template-columns: auto minmax(0, 1fr); padding: var(--e-s8); }
	.e-practice__icon { width: 52px; height: 52px; }
	.e-practice__actions { grid-column: 2; flex-direction: row; flex-wrap: wrap; align-items: center; }
}

/* related articles, latest articles on 404 */
.e-related__head { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: var(--e-s2) var(--e-s6); margin-bottom: var(--e-s8); }
.e-related__all { display: inline-flex; align-items: center; gap: 6px; min-height: 44px; font-weight: 650; }
.e-related__all svg { transition: transform .15s; }
.e-related__all:hover svg { transform: translateX(3px); }

/* ---------- article card (template-parts/post-card.php) ---------- */
.e-post-card { display: flex; flex-direction: column; height: 100%; padding: 0; overflow: hidden; }
.e-post-card__media { position: relative; aspect-ratio: 16 / 9; overflow: hidden; background: var(--e-bg-soft); }
.e-post-card__img { width: 100%; height: 100%; object-fit: cover; transition: transform .3s; }
.e-post-card:hover .e-post-card__img { transform: scale(1.03); }
.e-post-card__media--empty { display: grid; place-items: center; color: var(--e-primary); background: linear-gradient(135deg, var(--e-primary-50) 0%, #dbe7ff 100%); }
.e-post-card__body { display: flex; flex-direction: column; align-items: flex-start; gap: var(--e-s3); padding: var(--e-s4) var(--e-s5) var(--e-s5); }
.e-post-card__tag { max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.e-post-card__title {
	display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 3; line-clamp: 3; overflow: hidden;
	margin: 0; font-size: 18px; font-weight: 700; line-height: 1.35; letter-spacing: -.01em; color: var(--e-ink); overflow-wrap: break-word;
}
.e-post-card:hover .e-post-card__title { color: var(--e-primary-700); }

/* ---------- blog, archives ---------- */
.e-blog__title { margin-bottom: var(--e-s6); }
.e-blog__empty { padding: var(--e-s8) 0; }

/* page links */
.e-pager { margin-top: var(--e-s10); }
.e-pager ul { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: var(--e-s2); }
.e-pager__num, .e-pager__step {
	display: inline-flex; align-items: center; justify-content: center; gap: 6px; min-width: 44px; min-height: 44px; padding: 0 12px;
	border: 1px solid var(--e-line); border-radius: var(--e-radius-md); background: #fff; color: var(--e-ink); font-weight: 650;
}
a.e-pager__num:hover, .e-pager__step:hover { border-color: #cbd5e1; background: var(--e-bg-soft); color: var(--e-ink); }
.e-pager__num.is-current { border-color: var(--e-primary); background: var(--e-primary); color: #fff; }
.e-pager__back { transform: rotate(180deg); }
.e-pager__gap { min-width: 24px; text-align: center; color: var(--e-muted); }
@media (max-width: 479px) {
	.e-pager__step span { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
	.e-pager__step { padding: 0; }
}

/* ---------- tags page (tags.php) ---------- */
.e-tags__intro { padding-top: var(--e-s8); }
.e-tags__chips { display: flex; flex-wrap: wrap; gap: var(--e-s2); margin-bottom: var(--e-s10); }
.e-tags__chips .e-chip { min-height: 36px; }
.e-tags__chips .e-chip:hover { background: #dbe7ff; }
.e-tags__count { display: inline-grid; place-items: center; min-width: 22px; height: 22px; padding: 0 6px; border-radius: 999px; background: #fff; font-size: 12px; }
.e-tags__group + .e-tags__group { margin-top: var(--e-s12); }
.e-tags__title { margin-bottom: var(--e-s6); }

/* ---------- 404 ---------- */
.e-404__actions { display: flex; flex-wrap: wrap; gap: var(--e-s3); margin-top: var(--e-s6); }
@media (max-width: 479px) {
	.e-404__actions .e-btn { width: 100%; }
}

/* ---------- contacts ---------- */
.e-contacts__grid { display: grid; grid-template-columns: minmax(0, 1fr); gap: var(--e-s8); align-items: start; }
.e-contacts__grid--single { max-width: var(--e-narrow); }
@media (min-width: 960px) {
	.e-contacts__grid { grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: var(--e-s12); }
	.e-contacts__grid--single { grid-template-columns: minmax(0, 1fr); }
}
.e-contacts__list { display: grid; gap: var(--e-s3); margin-top: var(--e-s5); }
.e-contacts__item {
	display: flex; align-items: center; gap: var(--e-s4); min-height: 72px; padding: var(--e-s3) var(--e-s4);
	border: 1px solid var(--e-line); border-radius: var(--e-radius-lg); background: #fff; color: var(--e-ink);
	transition: border-color .15s, box-shadow .15s;
}
.e-contacts__item:hover { border-color: #bfd0f7; box-shadow: var(--e-shadow-sm); color: var(--e-ink); }
.e-contacts__icon { display: grid; place-items: center; flex: none; width: 48px; height: 48px; border-radius: var(--e-radius-md); background: var(--e-primary-50); color: var(--e-primary); }
.e-contacts__icon--whatsapp { background: var(--e-success-50); color: #15803d; }
.e-contacts__text { display: flex; flex-direction: column; min-width: 0; }
.e-contacts__label { font-size: 14px; color: var(--e-muted); }
.e-contacts__value { font-size: 17px; font-weight: 650; line-height: 1.35; overflow-wrap: anywhere; }
.e-contacts__arrow { flex: none; margin-left: auto; color: #94a3b8; transition: transform .15s, color .15s; }
.e-contacts__item:hover .e-contacts__arrow { transform: translateX(3px); color: var(--e-primary); }

/* the form (Contact Form 7 markup from the database, fields styled by .e-form in base.css) */
.e-contacts__form { padding: var(--e-s6) var(--e-s5); box-shadow: var(--e-shadow-sm); }
@media (min-width: 640px) { .e-contacts__form { padding: var(--e-s8); } }
.e-contacts__form > .e-h3 { margin-bottom: var(--e-s5); }
.e-contacts__form .wpcf7-form { display: flex; flex-direction: column; gap: var(--e-s4); }
.e-contacts__form .wpcf7-form h4 { display: none; } /* "Write your question" repeats the heading above */
.e-contacts__form label + br { display: none; }
.e-contacts__form .wpcf7-form-control-wrap { display: block; }
.e-contacts__form .form_inline { display: grid; grid-template-columns: minmax(0, 1fr); gap: var(--e-s4); }
@media (min-width: 640px) { .e-contacts__form .form_inline { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.e-contacts__form textarea { height: 160px; }
.e-contacts__form [aria-invalid="true"] { border-color: var(--e-danger); }
.e-contacts__form .wpcf7-not-valid-tip { margin-top: 6px; }
.e-contacts__form .form_footer { display: flex; flex-direction: column; gap: var(--e-s4); }
.e-contacts__form .wpcf7-radio, .e-contacts__form .wpcf7-checkbox, .e-contacts__form .wpcf7-acceptance { display: flex; flex-direction: column; gap: 2px; }
.e-contacts__form .wpcf7-list-item { display: block; margin: 0; }
.e-contacts__form .wpcf7-list-item label {
	display: flex; align-items: flex-start; gap: 10px; min-height: 44px; margin: 0; padding: 10px 0;
	font-size: 15px; font-weight: 400; line-height: 1.45; color: var(--e-text); cursor: pointer;
}
.e-contacts__form .wpcf7-list-item input { flex: none; width: 20px; height: 20px; margin: 1px 0 0; accent-color: var(--e-primary); }
.e-contacts__form .wpcf7-list-item-label::before, .e-contacts__form .wpcf7-list-item-label::after { content: none; }
.e-contacts__form .formf_right p { position: relative; display: flex; }
.e-contacts__form input[type=submit] { flex: 1 1 auto; padding-left: 48px; padding-right: 48px; cursor: pointer; transition: background-color .15s; }
.e-contacts__form input[type=submit]:hover { background: var(--e-primary-700); }
.e-contacts__form .wpcf7-spinner { position: absolute; top: calc(50% - 12px); right: 14px; margin: 0; background-color: rgba(255, 255, 255, .35); }
@media (min-width: 640px) {
	.e-contacts__form .formf_right p { display: inline-flex; }
	.e-contacts__form input[type=submit] { min-width: 240px; }
}
