/**
 * templStandart — CMS overlay (after layout.css + theme.css)
 * Joomla-specific bridges only; design tokens & components live in theme.css.
 */

:root {
  --tempcolor-dark: color-mix(in srgb, var(--tempcolor, #3d4f8f) 72%, #000);
  --tempcolor-soft: color-mix(in srgb, var(--tempcolor, #3d4f8f) 12%, #fff);
  --tempcolor-mid: color-mix(in srgb, var(--tempcolor, #3d4f8f) 22%, #fff);
  --tempaccent-soft: color-mix(in srgb, var(--tempaccentcolor, #c26d2d) 12%, #fff);
  --ts-text: #1a2a33;
  --ts-muted: #5a6b75;
  --ts-surface: #ffffff;
  --ts-surface-alt: #f4f7f9;
  --ts-border: #d8e2e8;
  --ts-radius: 6px;
  --ts-radius-sm: 4px;
  --ts-control-min-h: 2.35rem;
  --ts-control-pad-y: 0.28rem;
  --ts-control-pad-x: 0.65rem;
  --ts-control-font: 0.78rem;
  --ts-control-border: color-mix(in srgb, var(--tempcolor, #3d4f8f) 22%, #d8e2e8);
  --ts-shadow: 0 1px 2px rgba(10, 42, 58, 0.06), 0 4px 14px rgba(10, 42, 58, 0.05);
  --ts-font-ui: "Manrope", "Segoe UI", sans-serif;
  --ts-font-display: "Source Serif 4", "Times New Roman", serif;
}

body.ts-body {
  font-family: var(--ts-font-ui);
  color: var(--ts-text);
  background-color: var(--ts-surface-alt);
  -webkit-font-smoothing: antialiased;
}

a:hover {
  color: var(--tempaccentcolor, #c26d2d);
}

.error-404__btn,
.error-404__btn:hover {
  color: #fff !important;
  text-decoration: none !important;
}

/* Footer links stay light; top-bar buttons keep their own hover */
#footer a:hover {
  color: #fff !important;
}

a:focus-visible,
button:focus-visible,
input:focus-visible {
  outline: 2px solid var(--tempaccentcolor, #c26d2d);
  outline-offset: 2px;
}

/* —— Icon size caps (FA / images in template chrome only) —— */
.site-header .fa,
.site-header .fas,
.site-header .far,
.site-header .fab,
.site-header .fal,
.site-header .fad,
.site-header .fa-solid,
.site-header .fa-regular,
.site-header .fa-brands,
.site-header .fa-light,
.site-header .icon,
.site-header [class^="icon-"],
.site-header [class*=" icon-"],
.site-header svg.svg-inline--fa,
.site-footer .fa,
.site-footer .fas,
.site-footer .far,
.site-footer .fab,
.site-footer .fal,
.site-footer .fad,
.site-footer .fa-solid,
.site-footer .fa-regular,
.site-footer .fa-brands,
.site-footer .fa-light,
.site-footer .icon,
.site-footer [class^="icon-"],
.site-footer [class*=" icon-"],
.site-footer svg.svg-inline--fa,
#footer .fa,
#footer .fas,
#footer .far,
#footer .fab,
#footer .fal,
#footer .fad,
#footer .fa-solid,
#footer .fa-regular,
#footer .fa-brands,
#footer .fa-light,
#footer .icon,
#footer [class^="icon-"],
#footer [class*=" icon-"],
#footer svg.svg-inline--fa,
.imeny-section .fa,
.imeny-section .fas,
.imeny-section .far,
.imeny-section .fab,
.imeny-section .fal,
.imeny-section .fad,
.imeny-section .fa-solid,
.imeny-section .fa-regular,
.imeny-section .fa-brands,
.imeny-section .fa-light,
.imeny-section .icon,
.imeny-section [class^="icon-"],
.imeny-section [class*=" icon-"],
.imeny-section svg.svg-inline--fa,
#imeny .fa,
#imeny .fas,
#imeny .far,
#imeny .fab,
#imeny .fal,
#imeny .fad,
#imeny .fa-solid,
#imeny .fa-regular,
#imeny .fa-brands,
#imeny .fa-light,
#imeny .icon,
#imeny [class^="icon-"],
#imeny [class*=" icon-"],
#imeny svg.svg-inline--fa,
.breadcrumb-bar .fa,
.breadcrumb-bar .fas,
.breadcrumb-bar .far,
.breadcrumb-bar .fab,
.breadcrumb-bar .fal,
.breadcrumb-bar .fad,
.breadcrumb-bar .fa-solid,
.breadcrumb-bar .fa-regular,
.breadcrumb-bar .fa-brands,
.breadcrumb-bar .fa-light,
.breadcrumb-bar .icon,
.breadcrumb-bar [class^="icon-"],
.breadcrumb-bar [class*=" icon-"],
.breadcrumb-bar svg.svg-inline--fa,
.sidenav .fa,
.sidenav .fas,
.sidenav .far,
.sidenav .fab,
.sidenav .fal,
.sidenav .fad,
.sidenav .fa-solid,
.sidenav .fa-regular,
.sidenav .fa-brands,
.sidenav .fa-light,
.sidenav .icon,
.sidenav [class^="icon-"],
.sidenav [class*=" icon-"],
.sidenav svg.svg-inline--fa,
.sidebar-nav .fa,
.sidebar-nav .fas,
.sidebar-nav .far,
.sidebar-nav .fab,
.sidebar-nav .fal,
.sidebar-nav .fad,
.sidebar-nav .fa-solid,
.sidebar-nav .fa-regular,
.sidebar-nav .fa-brands,
.sidebar-nav .fa-light,
.sidebar-nav .icon,
.sidebar-nav [class^="icon-"],
.sidebar-nav [class*=" icon-"],
.sidebar-nav svg.svg-inline--fa {
  width: 1em !important;
  height: 1em !important;
  max-width: 1.35rem !important;
  max-height: 1.35rem !important;
  font-size: 1em !important;
  line-height: 1 !important;
  vertical-align: -0.125em;
}

/* Third-party editors: do not inherit template icon caps */
.nfc-editor-toolbar .fa,
.nfc-editor-toolbar .fas,
.nfc-editor-toolbar .far,
.nfc-editor-toolbar .fab,
.nfc-editor-toolbar .fal,
.nfc-editor-toolbar .fad,
.nfc-editor-toolbar .fa-solid,
.nfc-editor-toolbar .fa-regular,
.nfc-editor-toolbar .fa-brands,
.nfc-editor-toolbar .fa-light,
.nfc-editor-toolbar .icon,
.nfc-editor-toolbar [class^="icon-"],
.nfc-editor-toolbar [class*=" icon-"],
.nfc-editor-toolbar svg.svg-inline--fa,
.nfc-editor-toolbar svg:not(.svg-inline--fa),
[class*="nfc-editor"] .icon,
[class*="nfc-editor"] [class^="icon-"],
[class*="nfc-editor"] [class*=" icon-"],
[class*="nfc-editor"] svg.svg-inline--fa,
[class*="nfc-editor"] svg:not(.svg-inline--fa) {
  width: auto !important;
  height: auto !important;
  max-width: none !important;
  max-height: none !important;
  font-size: inherit !important;
  line-height: inherit !important;
  vertical-align: baseline;
}

/* FA в .top-btn: размер как в прототипе (1.35rem), без фиксированной height */
.top-btn > i,
.top-btn > .fa,
.top-btn > .fa-solid,
.top-btn > .fa-regular,
.top-header-left a.top-btn > i,
.top-header-left a.top-btn > .fa-solid {
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  align-self: stretch !important;
  width: 1.35rem !important;
  height: auto !important;
  max-width: 1.35rem !important;
  max-height: none !important;
  font-size: 1.35rem !important;
  line-height: 1 !important;
  vertical-align: middle;
}

.top-btn-icon {
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  align-self: stretch !important;
  flex: 0 0 1.55rem !important;
  width: 1.55rem !important;
  min-height: 100%;
}

.top-btn-text {
  display: flex !important;
  flex-direction: column !important;
  justify-content: center !important;
  align-self: center !important;
  line-height: 1.15 !important;
  max-width: 7.5rem;
  white-space: normal !important;
}

.top-btn img,
.top-btn-icon img,
.top-header-left a img,
.top-bar-menu img {
  width: 1.35rem !important;
  height: 1.35rem !important;
  max-width: 1.35rem !important;
  max-height: 1.35rem !important;
  object-fit: contain;
}

.layout-contacts i,
.layout-contacts .fa-solid {
  width: 1rem !important;
  height: 1rem !important;
  max-width: 1rem !important;
  max-height: 1rem !important;
  font-size: 1rem !important;
  margin-right: 0.4rem;
}

.imeny-item .imeny-icon img,
.imeny-item .imeny-icon i,
.imeny-item .imeny-icon .fa-solid {
  width: 1.75rem !important;
  height: 1.75rem !important;
  max-width: 1.75rem !important;
  max-height: 1.75rem !important;
  font-size: 1.75rem !important;
}

.site-footer i,
.site-footer .fa-solid,
.site-footer .fa-regular {
  width: 1em !important;
  height: 1em !important;
  max-width: 1.1rem !important;
  max-height: 1.1rem !important;
  font-size: 1em !important;
}

input[type="text"],
input[type="password"],
input[type="email"],
input[type="tel"],
input[type="url"],
input[type="number"],
input[type="search"],
input[type="date"],
select,
textarea,
.form-control,
.inputbox {
  box-sizing: border-box;
  min-height: var(--control-min-h, 2.35rem);
  padding: var(--control-pad-y, 0.28rem) var(--control-pad-x, 0.65rem);
  border: 1px solid var(--control-border, var(--ts-control-border));
  border-radius: var(--radius-sm, 4px);
  background: #fff;
  color: var(--tempcolor, #3d4f8f);
  font-family: var(--font-ui, var(--ts-font-ui));
  font-size: var(--control-font, 0.78rem);
  font-weight: 700;
  line-height: 1.15;
}

input::placeholder,
textarea::placeholder {
  color: color-mix(in srgb, var(--tempcolor, #3d4f8f) 45%, #fff);
  font-weight: 600;
  opacity: 1;
}

input:focus,
select:focus,
textarea:focus,
.form-control:focus,
.inputbox:focus {
  outline: none;
  border-color: var(--tempaccentcolor, #c26d2d);
  box-shadow: 0 0 0 2px var(--tempaccent-soft);
}

textarea {
  min-height: 6rem;
  font-weight: 600;
  line-height: 1.4;
  resize: vertical;
}

input[type="checkbox"],
input[type="radio"] {
  width: auto !important;
  min-height: auto !important;
  padding: 0 !important;
  border: 0 !important;
  box-shadow: none !important;
}

/* Поля форм — не слипаются */
.control-group,
.form-group,
.field-calendar,
.ts-login__field,
.ts-login__remember,
.com-contact .control-group,
.com-users .control-group,
.mod-login .mod-login__username,
.mod-login .mod-login__password,
.mod-login .mod-login__remember,
.mod-login .form-group,
#footer form > div,
#footer .moduletable form > p,
[data-position^="footer"] form .control-group {
  margin-bottom: 0.85rem;
}

.control-group .control-label,
.control-group > label,
.form-group > label,
.ts-login__field label,
.mod-login label:not(:has(input[type="checkbox"])),
.com-contact label:not(:has(input[type="checkbox"])) {
  display: block;
  margin-bottom: 0.35rem;
  font-weight: 600;
  font-size: 0.85rem;
  line-height: 1.3;
}

/* Checkbox + text in one row (Remember me, etc.) */
.ts-login__remember label,
.mod-login__remember label,
.mod-login label:has(input[type="checkbox"]),
.com-users label:has(input[type="checkbox"]),
#footer label:has(input[type="checkbox"]),
label:has(> input[type="checkbox"]) {
  display: inline-flex !important;
  flex-direction: row !important;
  align-items: center !important;
  gap: 0.45rem;
  margin-bottom: 0 !important;
  font-weight: 600;
  font-size: 0.9rem;
  line-height: 1.3;
  white-space: nowrap;
  cursor: pointer;
}

.ts-login__remember input[type="checkbox"],
.mod-login__remember input[type="checkbox"],
label:has(> input[type="checkbox"]) > input[type="checkbox"] {
  flex: 0 0 auto !important;
  width: 1.05rem !important;
  height: 1.05rem !important;
  max-width: 1.05rem !important;
  margin: 0 !important;
  accent-color: var(--tempcolor, #3d4f8f);
}

.control-group .controls,
.form-group .controls {
  margin-top: 0;
}

.ts-login__form,
.com-contact form,
.com-users form,
.mod-login form,
#footer form {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
}

.ts-login__form input[type="text"],
.ts-login__form input[type="password"],
.ts-login__form input[type="email"],
.com-contact form input:not([type="checkbox"]):not([type="radio"]):not([type="submit"]):not([type="button"]),
.com-contact form select,
.com-contact form textarea,
.com-users form input:not([type="checkbox"]):not([type="radio"]):not([type="submit"]):not([type="button"]),
.com-users form select,
.com-users form textarea,
.mod-login input:not([type="checkbox"]):not([type="radio"]):not([type="submit"]):not([type="button"]),
#footer form input:not([type="checkbox"]):not([type="radio"]):not([type="submit"]):not([type="button"]),
#footer form select,
#footer form textarea,
.module-box input:not([type="checkbox"]):not([type="radio"]):not([type="submit"]):not([type="button"]),
.module-box select,
.module-box textarea {
  width: 100%;
  max-width: 100%;
}

/* Кнопки как в прототипе — только статьи / основной компонент (.ts-main), не блоки модулей */
.ts-main :is(
  button:not(.btn-search):not(.news-slider__btn):not(.news-slider__dot),
  .btn:not(.btn-search),
  input[type="submit"],
  input[type="button"],
  input[type="reset"],
  .button
) {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.35rem;
  min-height: var(--control-min-h, 2.35rem);
  padding: var(--control-pad-y, 0.28rem) 0.85rem;
  border: 1.5px solid var(--tempcolor, #3d4f8f);
  border-radius: var(--radius-sm, 4px);
  background: var(--tempcolor-soft);
  color: var(--tempcolor, #3d4f8f);
  font-family: var(--font-ui, var(--ts-font-ui));
  font-size: var(--control-font, 0.78rem);
  font-weight: 700;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  line-height: 1.15;
  text-decoration: none;
  cursor: pointer;
  box-shadow: none;
  transition: background 0.2s ease, color 0.2s ease, border-color 0.2s ease;
}

.ts-main :is(
  .btn:not(.btn-search),
  input[type="submit"],
  input[type="button"],
  input[type="reset"],
  .button,
  button:not(.btn-search):not(.news-slider__btn):not(.news-slider__dot)
):hover {
  background: var(--tempaccent-soft);
  color: var(--tempaccentcolor, #c26d2d);
  border-color: var(--tempaccentcolor, #c26d2d);
}

/* —— NextFlexContact: do not inherit template form/button chrome —— */
.nfc-form-wrap input:not([type="checkbox"]):not([type="radio"]):not([type="hidden"]),
.nfc-form-wrap select,
.nfc-form-wrap textarea,
.nfc-form-wrap .nfc-editor {
  box-sizing: border-box;
  width: 100%;
  min-height: 42px;
  padding: 9px 10px;
  border: 1px solid #ced4da;
  border-radius: 4px;
  background: #fff;
  color: inherit;
  font: inherit;
  font-weight: inherit;
  line-height: inherit;
  box-shadow: none;
}

.nfc-form-wrap input::placeholder,
.nfc-form-wrap textarea::placeholder {
  color: inherit;
  opacity: 0.55;
  font-weight: inherit;
}

.nfc-form-wrap input:not([type="checkbox"]):not([type="radio"]):not([type="hidden"]):focus,
.nfc-form-wrap select:focus,
.nfc-form-wrap textarea:focus,
.nfc-form-wrap .nfc-editor:focus-within {
  outline: 0;
  border-color: #86b7fe;
  box-shadow: 0 0 0 0.2rem rgba(13, 110, 253, 0.15);
}

.nfc-form-wrap .nfc-editor-toolbar button,
.nfc-form-wrap .nfc-editor .nfc-editor-toolbar button {
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  width: 34px !important;
  height: 34px !important;
  min-height: 34px !important;
  max-height: none !important;
  padding: 0 !important;
  gap: 0 !important;
  border: 1px solid currentColor !important;
  border-radius: 4px !important;
  background: transparent !important;
  color: inherit !important;
  font-family: inherit !important;
  font-size: inherit !important;
  font-weight: inherit !important;
  letter-spacing: normal !important;
  text-transform: none !important;
  line-height: normal !important;
  cursor: pointer;
  box-shadow: none !important;
  transition: background 0.15s ease, color 0.15s ease, border-color 0.15s ease;
}

.nfc-form-wrap .nfc-editor-toolbar button:hover,
.nfc-form-wrap .nfc-editor-toolbar button:focus {
  background: rgba(127, 127, 127, 0.15) !important;
  color: inherit !important;
  border-color: currentColor !important;
}

.nfc-form-wrap .nfc-editor-toolbar button.is-active {
  background: #0d6efd !important;
  border-color: #0d6efd !important;
  color: #fff !important;
}

.nfc-form-wrap .nfc-editor-toolbar svg,
.nfc-form-wrap .nfc-editor .nfc-editor-toolbar svg {
  width: 18px !important;
  height: 18px !important;
  max-width: none !important;
  max-height: none !important;
  fill: currentColor;
  pointer-events: none;
}

.nfc-form-wrap .nfc-captcha-btn {
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  width: auto !important;
  min-height: auto !important;
  max-width: 100% !important;
  padding: 0 !important;
  border: 0 !important;
  border-radius: 0 !important;
  background: transparent !important;
  color: inherit !important;
  font: inherit !important;
  font-weight: inherit !important;
  letter-spacing: normal !important;
  text-transform: none !important;
  box-shadow: none !important;
}

/* Smart Search (com_finder) — input-group layout + advanced panel */
.com-finder.finder {
  background: transparent;
  border: 0;
  border-radius: 0;
  padding: 0;
  box-shadow: none;
  overflow: visible;
}

.com-finder.finder > h1:first-child {
  margin: 0 0 1.15rem !important;
  border-radius: var(--radius-sm, 4px) var(--radius-sm, 4px) 0 0 !important;
}

.com-finder fieldset {
  border: 0;
  padding: 0;
  margin: 0 0 1rem;
  min-width: 0;
  background: transparent;
  box-shadow: none;
}

.com-finder .form-inline {
  display: flex;
  flex-flow: row wrap;
  align-items: center;
  gap: 0.5rem 0.75rem;
}

.com-finder .input-group {
  display: flex;
  flex-wrap: nowrap;
  align-items: stretch;
  width: 100%;
  max-width: 42rem;
  position: relative;
}

.com-finder .input-group > .form-control {
  flex: 1 1 auto;
  width: 1% !important;
  min-width: 0;
  margin-bottom: 0 !important;
  border-top-right-radius: 0 !important;
  border-bottom-right-radius: 0 !important;
  position: relative;
  z-index: 1;
}

.com-finder .input-group > .btn {
  flex: 0 0 auto;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 0.35rem;
  margin-left: -1px !important;
  margin-bottom: 0 !important;
  border-radius: 0 !important;
  text-transform: none !important;
  letter-spacing: normal !important;
  white-space: nowrap;
  position: relative;
  z-index: 2;
}

.com-finder .input-group > .btn:last-child {
  border-top-right-radius: var(--radius-sm, 4px) !important;
  border-bottom-right-radius: var(--radius-sm, 4px) !important;
}

.com-finder .input-group > .btn .icon-search,
.com-finder .input-group > .btn .icon-search-plus,
.com-finder .input-group > .btn > i,
.com-finder .input-group > .btn > .fa-solid {
  display: inline-block !important;
  width: 1em !important;
  height: 1em !important;
  max-width: 1.1rem !important;
  max-height: 1.1rem !important;
  font-size: 1em !important;
  line-height: 1 !important;
  flex-shrink: 0;
  vertical-align: -0.125em;
}

/* Fallback: Joomla Icomoon → Font Awesome when markup is not overridden */
.com-finder .input-group > .btn .icon-search,
.com-finder .input-group > .btn .icon-search-plus {
  font-family: "Font Awesome 6 Free" !important;
  font-weight: 900 !important;
  font-style: normal;
  speak: never;
}

.com-finder .input-group > .btn .icon-search::before,
.com-finder .input-group > .btn .icon-search:before {
  content: "\f002" !important;
  font-family: "Font Awesome 6 Free" !important;
  font-weight: 900 !important;
}

.com-finder .input-group > .btn .icon-search-plus::before,
.com-finder .input-group > .btn .icon-search-plus:before {
  content: "\f00e" !important;
  font-family: "Font Awesome 6 Free" !important;
  font-weight: 900 !important;
}

.com-finder .input-group > .btn .icon-white {
  color: inherit !important;
}

.com-finder #advancedSearch.collapse:not(.show) {
  display: none !important;
}

.com-finder #advancedSearch.collapse.show {
  display: block !important;
}

.com-finder__filter-heading {
  margin: 0 0 0.85rem;
  font-size: 1.05rem;
  font-weight: 600;
  color: var(--tempcolor-dark, #2a3558);
}

.com-finder__filter-empty {
  margin: 0 0 1rem;
  padding: 0.75rem 1rem;
  border-left: 3px solid var(--tempaccentcolor, #c26d2d);
  background: var(--tempcolor-soft, #eef1f8);
  color: var(--text-muted, #4a5568);
}

.com-finder__filter .filter-branch,
.com-finder__filter ul.filter-branch {
  list-style: none;
  margin: 0 0 1rem;
  padding: 0;
  display: grid;
  gap: 0.65rem 1rem;
}

@media (min-width: 640px) {
  .com-finder__filter .filter-branch,
  .com-finder__filter ul.filter-branch {
    grid-template-columns: repeat(auto-fit, minmax(14rem, 1fr));
  }
}

.com-finder__filter .filter-branch > li,
.com-finder__filter .filter-date {
  margin: 0;
}

.com-finder__filter label {
  display: block;
  margin-bottom: 0.25rem;
  font-weight: 600;
}

.com-finder__filter select,
.com-finder__filter input[type="date"],
.com-finder__filter .form-control {
  width: 100%;
  max-width: 100%;
}

.com-finder__syntax-tips {
  margin-top: 1rem;
  border: 1px solid color-mix(in srgb, var(--tempcolor, #3d4f8f) 18%, #fff);
  border-radius: var(--radius-sm, 4px);
  background: #fff;
}

.com-finder__syntax-tips > summary {
  cursor: pointer;
  padding: 0.65rem 0.85rem;
  font-weight: 600;
  color: var(--tempcolor, #3d4f8f);
  list-style: none;
}

.com-finder__syntax-tips > summary::-webkit-details-marker {
  display: none;
}

.com-finder__syntax-tips[open] > summary {
  border-bottom: 1px solid color-mix(in srgb, var(--tempcolor, #3d4f8f) 12%, #fff);
}

.com-finder__syntax-tips .com-finder__tips {
  margin: 0;
  border: 0;
  border-radius: 0;
}

.com-finder__syntax-tips .card-body {
  padding: 0.85rem 1rem 1rem;
  font-size: 0.95rem;
  line-height: 1.55;
}

.com-finder__syntax-tips .term {
  font-weight: 600;
  color: var(--tempcolor-dark, #2a3558);
}

/* Submit — template button chrome (.ts-main only) */

.ts-main .btn-primary,
.ts-main .btn-success,
.ts-main button.btn-primary,
.ts-main input.btn-primary {
  background: var(--tempcolor, #3d4f8f) !important;
  color: #fff !important;
  border-color: var(--tempcolor, #3d4f8f) !important;
}

.ts-main .btn-primary:hover,
.ts-main .btn-success:hover,
.ts-main button.btn-primary:hover,
.ts-main input.btn-primary:hover {
  background: var(--tempaccent-soft) !important;
  color: var(--tempaccentcolor, #c26d2d) !important;
  border-color: var(--tempaccentcolor, #c26d2d) !important;
}

.ts-main .btn-light {
  background: #fff !important;
  color: var(--tempcolor, #3d4f8f) !important;
  border-color: var(--tempcolor, #3d4f8f) !important;
}

.ts-main .btn-light:hover {
  background: var(--tempaccent-soft) !important;
  color: var(--tempaccentcolor, #c26d2d) !important;
  border-color: var(--tempaccentcolor, #c26d2d) !important;
}

.ts-main .btn-ghost,
.ts-main .btn-secondary {
  background: transparent !important;
  color: var(--tempcolor, #3d4f8f) !important;
  border-color: color-mix(in srgb, var(--tempcolor, #3d4f8f) 45%, #fff) !important;
}

.ts-main .btn-ghost:hover,
.ts-main .btn-secondary:hover {
  background: var(--tempaccent-soft) !important;
  color: var(--tempaccentcolor, #c26d2d) !important;
  border-color: var(--tempaccentcolor, #c26d2d) !important;
}

/* Password show/hide — Joomla field (Icomoon → FA eye) */
.password-group,
.ts-login__field .password-group,
.control-group .password-group,
.input-group:has(.input-password-toggle) {
  display: flex !important;
  align-items: stretch;
  width: 100%;
  gap: 0;
}

.password-group > input,
.password-group > .form-control,
.ts-login__field .password-group > input {
  flex: 1 1 auto;
  min-width: 0;
  width: auto !important;
  border-top-right-radius: 0 !important;
  border-bottom-right-radius: 0 !important;
}

.password-group .btn.input-password-toggle,
.password-group button.input-password-toggle,
.password-group .btn-secondary.input-password-toggle,
.input-group:has(.input-password-toggle) .btn.input-password-toggle,
.input-group:has(.input-password-toggle) button.input-password-toggle,
.input-group:has(.input-password-toggle) .btn-secondary.input-password-toggle {
  flex: 0 0 2.6rem !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  width: 2.6rem !important;
  min-width: 2.6rem !important;
  max-width: 2.6rem !important;
  min-height: var(--control-min-h, 2.35rem) !important;
  margin: 0 !important;
  padding: 0 !important;
  background: #fff !important;
  color: var(--tempcolor, #3d4f8f) !important;
  border: 1px solid var(--control-border, var(--ts-control-border)) !important;
  border-left: 0 !important;
  border-radius: 0 var(--radius-sm, 4px) var(--radius-sm, 4px) 0 !important;
  text-transform: none !important;
  letter-spacing: normal !important;
  font-size: 1rem !important;
  line-height: 1 !important;
  box-shadow: none !important;
}

.password-group .btn.input-password-toggle:hover,
.password-group button.input-password-toggle:hover,
.input-group:has(.input-password-toggle) .btn.input-password-toggle:hover,
.input-group:has(.input-password-toggle) button.input-password-toggle:hover {
  background: var(--tempaccent-soft) !important;
  color: var(--tempaccentcolor, #c26d2d) !important;
  border-color: var(--tempaccentcolor, #c26d2d) !important;
}

.password-group .input-password-toggle .icon-eye,
.password-group .input-password-toggle .icon-eye-slash,
.password-group .input-password-toggle [class^="icon-"],
.password-group .input-password-toggle [class*=" icon-"],
.input-group:has(.input-password-toggle) .input-password-toggle .icon-eye,
.input-group:has(.input-password-toggle) .input-password-toggle .icon-eye-slash,
.input-group:has(.input-password-toggle) .input-password-toggle [class^="icon-"],
.input-group:has(.input-password-toggle) .input-password-toggle [class*=" icon-"] {
  display: inline-block !important;
  width: 1.1rem !important;
  height: 1.1rem !important;
  max-width: 1.1rem !important;
  max-height: 1.1rem !important;
  font-family: "Font Awesome 6 Free" !important;
  font-weight: 900 !important;
  font-size: 1rem !important;
  line-height: 1.1rem !important;
  speak: never;
  font-style: normal;
  font-variant: normal;
  text-rendering: auto;
  -webkit-font-smoothing: antialiased;
}

.password-group .input-password-toggle .icon-eye::before,
.password-group .input-password-toggle .icon-eye:before,
.input-group:has(.input-password-toggle) .input-password-toggle .icon-eye::before,
.input-group:has(.input-password-toggle) .input-password-toggle .icon-eye:before {
  content: "\f06e" !important;
  font-family: "Font Awesome 6 Free" !important;
  font-weight: 900 !important;
}

.password-group .input-password-toggle .icon-eye-slash::before,
.password-group .input-password-toggle .icon-eye-slash:before,
.input-group:has(.input-password-toggle) .input-password-toggle .icon-eye-slash::before,
.input-group:has(.input-password-toggle) .input-password-toggle .icon-eye-slash:before {
  content: "\f070" !important;
  font-family: "Font Awesome 6 Free" !important;
  font-weight: 900 !important;
}

.btn-row,
.ts-login__actions,
.com-contact .controls,
.mod-login__submit,
.mod-login .mod-login__submit,
form .btn-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem;
  margin-top: 0.65rem;
}

/* Sidebar / custom modules: опрос, формы — одна кнопка до 240px, несколько в строку */
.module-box .mod-body form,
.mod-custom form,
.module-box .mod-body .btn-row {
  display: flex;
  flex-wrap: wrap;
  align-items: stretch;
  gap: 0.5rem;
}

.module-box .mod-body form button:only-of-type,
.module-box .mod-body form input[type="submit"]:only-of-type,
.module-box .mod-body form input[type="button"]:only-of-type,
.module-box .mod-body form .btn:only-of-type,
.mod-custom form button:only-of-type,
.mod-custom form input[type="submit"]:only-of-type,
.mod-custom form input[type="button"]:only-of-type,
.module-box .mod-body .btn-row > *:only-child {
  width: 100%;
  max-width: 240px;
}

.module-box .mod-body form button:not(:only-of-type),
.module-box .mod-body form input[type="submit"]:not(:only-of-type),
.module-box .mod-body form input[type="button"]:not(:only-of-type),
.mod-custom form button:not(:only-of-type),
.mod-custom form input[type="submit"]:not(:only-of-type),
.mod-custom form input[type="button"]:not(:only-of-type) {
  width: auto;
  max-width: none;
  flex: 0 1 auto;
}

/* —— Top utility bar: Joomla menus → .top-btn look —— */
#top-header {
  background-color: var(--tempcolor-dark);
}

.top-header-left ul,
.top-bar-menu {
  display: flex;
  align-items: center;
  flex-wrap: nowrap;
  gap: 0.4rem;
  list-style: none;
  margin: 0;
  padding: 0;
}

.top-header-left > ul > li,
.top-bar-menu > li {
  flex: 0 0 auto;
  width: auto;
  margin: 0;
  padding: 0;
  list-style: none;
}

.top-header-left > a:not(.top-btn),
.top-header-left > ul > li > a:not(.top-btn),
.top-header-left > ul > li > .menu-item__hit:not(.top-btn),
.top-bar-menu > li > a:not(.top-btn),
.top-bar-menu > li > .menu-item__hit:not(.top-btn) {
  display: inline-flex;
  align-items: stretch;
  gap: 0.5rem;
  min-height: var(--control-min-h, 2.35rem);
  padding: 0.2rem var(--control-pad-x, 0.65rem) 0.2rem 0.4rem;
  border: 1px solid rgba(255, 255, 255, 0.65);
  border-radius: var(--radius-sm, 4px);
  background: #fff;
  color: var(--tempcolor, #3d4f8f) !important;
  font-weight: 700;
  font-size: var(--control-font, 0.78rem);
  line-height: 1.15;
  text-decoration: none !important;
  text-transform: none;
  letter-spacing: normal;
}

.top-header-left a.top-btn,
.top-header-left .menu-item__hit.top-btn,
.top-bar-menu a.top-btn,
.top-bar-menu .menu-item__hit.top-btn {
  color: var(--tempcolor, #3d4f8f) !important;
}

.top-header-left a:hover,
.top-header-left a.top-btn:hover,
.top-header-left .menu-item__hit:hover,
.top-header-left .menu-item__hit.top-btn:hover,
.top-bar-menu a:hover,
.top-bar-menu .menu-item__hit:hover {
  background: var(--tempaccent-soft) !important;
  color: var(--tempaccentcolor, #c26d2d) !important;
  border-color: #fff !important;
}

.top-header-left a:hover i,
.top-bar-menu a:hover i {
  color: var(--tempaccentcolor, #c26d2d) !important;
}

.top-header-right .btn-search,
.top-header-right .site-search--header .btn-search {
  color: var(--tempcolor, #3d4f8f);
  height: 100% !important;
  min-height: 0 !important;
  padding-block: 0 !important;
  line-height: 1 !important;
}

.top-header-right .site-search--header .btn-search > i,
.top-header-right .site-search--header .btn-search > .fa-solid,
.site-search-toggle > i,
.site-search-toggle > .fa-solid,
.site-search-close > i,
.site-search-close > .fa-solid {
  width: 1.35rem !important;
  height: 1.35rem !important;
  max-width: 1.35rem !important;
  max-height: 1.35rem !important;
  font-size: 1.35rem !important;
  vertical-align: middle !important;
  margin: 0 !important;
}

.mid-header,
#midle-header {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  background-color: var(--mid-header-bg, #f5f7fa);
}

.mid-header-grid {
  padding-block: 0.65rem 0.75rem !important;
  min-height: 0 !important;
  gap: 0.85rem 1.5rem !important;
}

.mid-header-grid.mid-header-grid--no-logo {
  min-height: 160px !important;
  align-items: center;
  align-content: center;
}

.mid-header::before,
#midle-header::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
}

.mid-header:not(.mid-header--has-image)::before,
#midle-header:not(.mid-header--has-image)::before {
  content: none;
}

.mid-header--has-image::before,
#midle-header.mid-header--has-image::before {
  background: linear-gradient(
    105deg,
    rgba(255, 255, 255, 0.88) 0%,
    rgba(255, 255, 255, 0.45) 42%,
    rgba(255, 255, 255, 0.08) 72%,
    transparent 100%
  );
}

.mid-header::after,
#midle-header::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
}

.mid-header:not(.mid-header--has-image)::after,
#midle-header:not(.mid-header--has-image)::after {
  background: linear-gradient(
    180deg,
    transparent 75%,
    color-mix(in srgb, var(--tempcolor) 4%, #ffffff) 100%
  );
}

@media (max-width: 640px) {
  .mid-header:not(.mid-header--has-image),
  #midle-header:not(.mid-header--has-image) {
    background-size: 280px auto, 280px auto, 48% 100%, auto !important;
    background-position: -32px 100%, calc(100% + 20px) 100%, 100% 0, center !important;
  }
}

.mid-header--has-image::after,
#midle-header.mid-header--has-image::after {
  background: linear-gradient(
    180deg,
    transparent 60%,
    rgba(255, 255, 255, 0.25) 100%
  );
}

.mid-header--has-image .site-slogan,
.mid-header--has-image .site-title,
.mid-header--has-image .site-title a,
.mid-header--has-image .layout-contacts .contact-link,
.mid-header--has-image .layout-contacts .contact-link span {
  text-shadow:
    0 1px 3px rgba(255, 255, 255, 0.75),
    0 0 10px rgba(255, 255, 255, 0.55);
}

.mid-header > *,
#midle-header > * {
  position: relative;
  z-index: 1;
}

.site-logo {
  display: block;
  width: 160px !important;
  height: 160px !important;
  max-width: 160px !important;
  object-fit: contain;
  filter: drop-shadow(0 2px 6px rgba(5, 60, 85, 0.15));
}

.site-slogan {
  color: var(--slogan-color, var(--tempaccentcolor, #c26d2d));
}

.site-title,
.site-title a {
  color: var(--title-color, inherit);
}

.site-title a:hover {
  color: var(--tempaccentcolor, #c26d2d) !important;
}

.layout-contacts .contact-link:hover,
.layout-contacts .contact-link:hover span {
  color: var(--tempaccentcolor, #c26d2d) !important;
}

.layout-contacts .fa-solid,
.layout-contacts i {
  color: var(--tempcolor, #3d4f8f);
}

/* Content shell */
.wrap-content {
  width: 100%;
  max-width: var(--sheet-max, 1340px);
  margin-inline: auto;
  padding-inline: var(--sheet-pad, 1rem);
  padding-bottom: 1.25rem;
}

.ts-top-row,
.ts-bottom-row {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1rem;
  margin-block: 1rem;
}

.content-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) var(--sidebar-width, 300px);
  grid-template-areas: "content sidebar";
  gap: 1.25rem;
  align-items: start;
  margin-block: 1rem;
}

.content-layout > .u-content {
  grid-area: content;
}

.content-layout > .sidebar {
  grid-area: sidebar;
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
  align-self: start;
}

.content-layout.sidebar-left {
  grid-template-columns: var(--sidebar-width, 300px) minmax(0, 1fr);
  grid-template-areas: "sidebar content";
}

.content-layout.no-sidebar {
  grid-template-columns: minmax(0, 1fr);
  grid-template-areas: "content";
}

.content-layout .sidebar,
.content-layout .u-content,
.content-layout .ts-main {
  min-width: 0;
}

.ts-main-pos {
  margin-top: 0.75rem;
}

/* —— Headings / module titles (Joomla markup variants) —— */
.module-box:not(.module-box--footer) .mod-title,
.module:not(.module-box) > h3,
.module:not(.module-box) > h2,
.moduletable > h3,
.moduletable > h2,
aside.sidebar .page-header h3,
.ts-main .page-header > h1,
.ts-main .page-header > h2,
.blog .page-header h1,
.blog .page-header h2,
.page-header > h1,
.page-header > h2,
.page-heading,
.article > h1,
.article .page-heading,
.category-blog__head h1,
.category-blog__head h2,
.category-list__head h1,
.category-list__head h2,
.ts-login__head h1,
.com-users h1,
.com-users .page-header h1 {
  display: block !important;
  visibility: visible !important;
  opacity: 1 !important;
  margin: 0 0 0.75rem;
  padding: 0.5rem 0.95rem !important;
  background: var(--tempcolor, #3d4f8f) !important;
  color: #fff !important;
  font-family: var(--font-display, var(--ts-font-display)) !important;
  font-size: clamp(1.05rem, 1.8vw, 1.25rem) !important;
  font-weight: 700 !important;
  line-height: 1.15 !important;
  border: 0 !important;
  border-radius: var(--ts-radius-sm, 4px) var(--ts-radius-sm, 4px) 0 0;
  text-transform: none !important;
  letter-spacing: normal !important;
}

.module-box:not(.module-box--footer) .mod-title {
  margin: 0 !important;
  border-radius: 0 !important;
}

.article > h1,
.article .page-heading,
.ts-component--ext > .page-heading,
.ts-login > .ts-login__head .page-heading,
.com-finder.finder > h1:first-child,
.contact > h1:first-child {
  margin: 0 -1.75rem 1.15rem !important;
  border-radius: var(--ts-radius-sm, 4px) var(--ts-radius-sm, 4px) 0 0 !important;
}

/* Menu-driven components (OSMap sitemap, etc.) */
.ts-component-body > *:first-child,
.ts-ext-body > *:first-child {
  margin-top: 0;
}

.ts-component-body ul {
  margin: 0 0 0.75rem 1.15rem;
  padding: 0;
  list-style: disc;
}

.ts-component-body li {
  margin: 0.2rem 0;
}

/* —— Article / editor content typography (Joomla body) —— */
.article-body,
.item-page .article-body,
.fr-view,
.blog-card__intro {
  color: var(--text, #1a2a33);
  font-family: var(--font-ui, var(--ts-font-ui));
  font-size: 1rem;
  line-height: 1.6;
}

.article-body > *:first-child,
.fr-view > *:first-child {
  margin-top: 0;
}

.article-body h2,
.article-body h3,
.article-body h4,
.article-body h5,
.article-body h6,
.item-page .article-body h2,
.item-page .article-body h3,
.item-page .article-body h4,
.fr-view h2,
.fr-view h3,
.fr-view h4 {
  display: block !important;
  margin: 1.25rem 0 0.55rem !important;
  padding: 0 !important;
  background: transparent !important;
  color: var(--text, #1a2a33) !important;
  border: 0 !important;
  border-radius: 0 !important;
  text-transform: none !important;
  letter-spacing: normal !important;
  font-family: var(--font-display, var(--ts-font-display)) !important;
  font-weight: 700 !important;
  line-height: 1.25 !important;
}

.article-body h2,
.fr-view h2 {
  font-size: clamp(1.2rem, 1.8vw, 1.4rem) !important;
}

.article-body h3,
.fr-view h3 {
  font-size: 1.12rem !important;
}

.article-body h4,
.article-body h5,
.article-body h6,
.fr-view h4 {
  font-family: var(--font-ui, var(--ts-font-ui)) !important;
  font-size: 1rem !important;
}

.article-body p,
.fr-view p {
  margin: 0 0 1rem;
  color: inherit;
}

.article-body ul,
.article-body ol,
.fr-view ul,
.fr-view ol {
  margin: 0 0 1rem 1.25rem !important;
  padding: 0 !important;
  color: inherit;
}

.article-body ul,
.fr-view ul {
  list-style: disc !important;
}

.article-body ol,
.fr-view ol {
  list-style: decimal !important;
}

.article-body li,
.fr-view li {
  margin-bottom: 0.35rem;
  line-height: 1.55;
}

.article-body a,
.fr-view a {
  color: var(--tempaccentcolor, #c26d2d);
  text-decoration: underline;
  text-underline-offset: 3px;
}

.article-body blockquote,
.fr-view blockquote {
  margin: 1.15rem 0;
  padding: 0.85rem 1rem 0.85rem 1.15rem;
  border-left: 4px solid var(--tempaccentcolor, #c26d2d);
  background: color-mix(in srgb, var(--tempaccent-soft, #f7ebe3) 55%, #fff);
  border-radius: 0 4px 4px 0;
}

.article-body hr,
.fr-view hr {
  margin: 1.35rem 0;
  border: 0;
  border-top: 1px solid var(--border, #d8e2e8);
}

.article-body table,
.item-page table,
.fr-view table,
.mod-body table,
.module-box .mod-body table {
  width: 100% !important;
  max-width: 100%;
  margin: 0 0 1rem !important;
  border-collapse: collapse !important;
  empty-cells: show;
  font-size: 0.9rem;
  background: #fff;
}

.article-body table th,
.article-body table td,
.item-page table th,
.item-page table td,
.fr-view table th,
.fr-view table td,
.mod-body table th,
.mod-body table td {
  padding: 0.55rem 0.75rem !important;
  text-align: left;
  vertical-align: top;
  border: 1px solid var(--border, #d8e2e8) !important;
  color: var(--text, #1a2a33) !important;
  background: transparent;
}

.article-body table th,
.item-page table th,
.fr-view table th,
.mod-body table th {
  background: var(--tempcolor-soft) !important;
  color: var(--tempcolor, #3d4f8f) !important;
  font-weight: 700 !important;
}

.article-body table tr:nth-child(even) td,
.item-page table tr:nth-child(even) td,
.fr-view table tr:nth-child(even) td {
  background: color-mix(in srgb, var(--surface-alt, #f4f7f9) 70%, #fff);
}

.category-blog__head,
.category-list__head {
  margin: 0 0 0.85rem;
}

.category-blog__head h1,
.category-blog__head h2,
.category-list__head h1,
.category-list__head h2 {
  margin: 0 !important;
}

.module-box {
  background: #fff;
  border: 1px solid var(--ts-border, #d8e2e8);
  border-radius: var(--ts-radius, 6px);
  overflow: hidden;
  box-shadow: var(--ts-shadow);
}

.module-box--footer,
#footer .module-box,
.site-footer .module-box {
  background: transparent !important;
  border: 0 !important;
  box-shadow: none !important;
  overflow: visible !important;
  margin: 0 0 1rem;
}

#footer .footer-heading,
#footer .mod-title,
#footer h3.mod-title,
#footer h3.footer-heading,
#footer .module-box .mod-title,
#footer .module-box--footer > h3,
.site-footer .footer-heading,
.site-footer .mod-title,
.site-footer .module-box .mod-title,
.site-footer .module-box--footer > h3,
.site-footer h3.mod-title,
.site-footer h3.footer-heading {
  display: block !important;
  visibility: visible !important;
  opacity: 1 !important;
  height: auto !important;
  max-height: none !important;
  overflow: visible !important;
  margin: 0 0 0.85rem !important;
  padding: 0 0 0.5rem !important;
  background: transparent !important;
  color: #fff !important;
  font-family: var(--font-ui, var(--ts-font-ui)) !important;
  font-size: 1.05rem !important;
  font-weight: 700 !important;
  line-height: 1.2 !important;
  letter-spacing: 0.02em !important;
  text-transform: uppercase !important;
  border: 0 !important;
  border-bottom: 2px solid rgba(255, 255, 255, 0.35) !important;
  border-radius: 0 !important;
  text-shadow: none !important;
}

#footer .mod-body,
.site-footer .module-box .mod-body {
  padding: 0 !important;
  color: #fff;
}

#footer .footer-links,
#footer ul.menu,
#footer .mod-menu,
#footer .nav.menu,
#footer .nav {
  list-style: none !important;
  margin: 0 !important;
  padding: 0 !important;
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
}

#footer .footer-links li,
#footer ul.menu li,
#footer .nav li {
  margin: 0;
  padding: 0;
  list-style: none;
}

#footer .footer-links a,
#footer .footer-links .menu-item__hit,
#footer ul.menu a,
#footer ul.menu .menu-item__hit,
#footer .mod-menu a,
#footer .mod-menu .menu-item__hit,
#footer .nav a,
#footer .nav .menu-item__hit {
  display: inline-flex !important;
  align-items: center;
  gap: 0.5rem;
  color: #fff !important;
  text-decoration: none !important;
  font-size: 0.95rem;
  line-height: 1.35;
  font-weight: 500;
  text-transform: none;
  letter-spacing: normal;
  background: transparent !important;
  border: 0 !important;
  min-height: 0 !important;
  padding: 0 !important;
  box-shadow: none !important;
}

#footer .footer-links a:hover,
#footer .footer-links .menu-item__hit:hover,
#footer ul.menu a:hover,
#footer ul.menu .menu-item__hit:hover,
#footer .nav a:hover,
#footer .nav .menu-item__hit:hover {
  color: #fff !important;
  opacity: 0.85;
  text-decoration: underline !important;
  text-underline-offset: 2px;
}

#footer .mod-menu a:hover,
#footer .mod-menu .menu-item__hit:hover {
  color: #fff !important;
  opacity: 0.85;
  text-decoration: underline !important;
  text-underline-offset: 2px;
}

/* Generic Joomla menu module (fallback layout) */
.nav.menu .menu-item__hit,
.nav.menu a.menu-item__hit {
  display: block;
  padding: 0.45rem 0.65rem;
  color: inherit;
  text-decoration: none;
  font-weight: 600;
  line-height: 1.35;
}

.nav.menu li.is-separator > .menu-item__hit,
.nav.menu li.divider > .menu-item__hit {
  cursor: default;
}

#footer .footer-links i,
#footer .footer-links .fa-solid,
#footer .footer-links .fa-regular,
#footer .footer-links .fa,
#footer ul.menu i,
#footer ul.menu .fa-solid,
#footer .nav i {
  width: 1.1rem !important;
  height: 1.1rem !important;
  max-width: 1.1rem !important;
  max-height: 1.1rem !important;
  font-size: 1rem !important;
  line-height: 1 !important;
  flex-shrink: 0;
  opacity: 0.95;
}

#footer .footer-links img,
#footer ul.menu img,
#footer .nav img {
  width: 1.1rem !important;
  height: 1.1rem !important;
  max-width: 1.1rem !important;
  max-height: 1.1rem !important;
  object-fit: contain;
  flex-shrink: 0;
}

#footer .footer-brand__logo img.site-logo {
  width: auto !important;
  height: auto !important;
  max-width: 100% !important;
  max-height: 200px !important;
  object-fit: contain;
  background: none !important;
  padding: 0 !important;
  border: 0 !important;
  border-radius: 0 !important;
  box-shadow: none !important;
  filter: none !important;
}

#footer .footer-brand__logo svg.site-logo {
  display: block !important;
  width: auto !important;
  height: 200px !important;
  max-width: 100% !important;
  max-height: 200px !important;
  background: none !important;
  padding: 0 !important;
  border: 0 !important;
  box-shadow: none !important;
}

#footer .footer-brand__logo svg.site-logo--default {
  filter: brightness(0) invert(1) !important;
}

/* Card grids: one frame level (.blog-card only), no outer panel */
.module-box--articles,
.module-box:has(.category-blog--module),
.category-blog.category-blog--page,
.category-blog.category-blog--featured,
.category-blog.category-blog--module {
  background: transparent;
  border: 0;
  box-shadow: none;
  overflow: visible;
  padding: 0;
}

.module-box--articles .mod-title,
.module-box:has(.category-blog--module) .mod-title {
  margin: 0 0 0.85rem !important;
  border-radius: var(--radius-sm, 4px) var(--radius-sm, 4px) 0 0 !important;
}

.module-box--articles .mod-body,
.module-box:has(.category-blog--module) .mod-body {
  padding: 0 !important;
}

.module-box .category-blog--module,
.category-blog--module {
  margin: 0;
}

.module-box .category-blog--module .category-blog__grid,
.category-blog--module .category-blog__grid {
  display: grid;
  grid-template-columns: repeat(var(--blog-cols, 2), minmax(0, 1fr));
  gap: 0.85rem;
}

.module-box .category-blog--module.category-blog--layout-vert .category-blog__grid,
.category-blog--module.category-blog--layout-vert .category-blog__grid,
.module-box .category-blog--module.category-blog--cols-1 .category-blog__grid,
.category-blog--module.category-blog--cols-1 .category-blog__grid {
  grid-template-columns: 1fr;
}

.module-box .category-blog--module.category-blog--layout-hor.category-blog--cols-2 .category-blog__grid,
.category-blog--module.category-blog--layout-hor.category-blog--cols-2 .category-blog__grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.module-box .category-blog--module.category-blog--layout-hor.category-blog--cols-3 .category-blog__grid,
.category-blog--module.category-blog--layout-hor.category-blog--cols-3 .category-blog__grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.module-box .category-blog--module.category-blog--layout-hor.category-blog--cols-4 .category-blog__grid,
.category-blog--module.category-blog--layout-hor.category-blog--cols-4 .category-blog__grid {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.module-box .category-blog--module .blog-card,
.category-blog--module .blog-card {
  height: 100%;
}

.category-blog--module .category-blog__all {
  margin: 0.9rem 0 0;
  text-align: right;
}

.category-blog--page .category-blog__grid,
.category-blog--featured .category-blog__grid {
  display: grid;
  grid-template-columns: repeat(var(--blog-cols, 1), minmax(0, 1fr));
  gap: 0.85rem;
}

.category-blog--page .category-blog__grid--down,
.category-blog--featured .category-blog__grid--down {
  display: block;
  column-count: var(--blog-cols, 1);
  column-gap: 0.85rem;
}

/* Планшет: на 1 колонку меньше, чем в настройках Joomla (адаптив только в шаблоне) */
@media (min-width: 641px) and (max-width: 991px) {
  .module-box .category-blog--module.category-blog--layout-hor.category-blog--cols-4 .category-blog__grid,
  .category-blog--module.category-blog--layout-hor.category-blog--cols-4 .category-blog__grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .module-box .category-blog--module.category-blog--layout-hor.category-blog--cols-3 .category-blog__grid,
  .category-blog--module.category-blog--layout-hor.category-blog--cols-3 .category-blog__grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .module-box .category-blog--module.category-blog--layout-hor.category-blog--cols-2 .category-blog__grid,
  .category-blog--module.category-blog--layout-hor.category-blog--cols-2 .category-blog__grid {
    grid-template-columns: 1fr;
  }

  .category-blog--cols-4 .category-blog__grid,
  .category-blog--page.category-blog--cols-4 .category-blog__grid,
  .category-blog--featured.category-blog--cols-4 .category-blog__grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .category-blog--cols-3 .category-blog__grid,
  .category-blog--page.category-blog--cols-3 .category-blog__grid,
  .category-blog--featured.category-blog--cols-3 .category-blog__grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .category-blog--cols-2 .category-blog__grid,
  .category-blog--page.category-blog--cols-2 .category-blog__grid,
  .category-blog--featured.category-blog--cols-2 .category-blog__grid {
    grid-template-columns: 1fr;
  }

  .category-blog--cols-4 .category-blog__grid--down,
  .category-blog--page.category-blog--cols-4 .category-blog__grid--down,
  .category-blog--featured.category-blog--cols-4 .category-blog__grid--down {
    column-count: 3;
  }

  .category-blog--cols-3 .category-blog__grid--down,
  .category-blog--page.category-blog--cols-3 .category-blog__grid--down,
  .category-blog--featured.category-blog--cols-3 .category-blog__grid--down {
    column-count: 2;
  }

  .category-blog--cols-2 .category-blog__grid--down,
  .category-blog--page.category-blog--cols-2 .category-blog__grid--down,
  .category-blog--featured.category-blog--cols-2 .category-blog__grid--down {
    column-count: 1;
  }
}

@media (max-width: 640px) {
  .module-box .category-blog--module:not(.has-news-slider) .category-blog__grid,
  .category-blog--module:not(.has-news-slider) .category-blog__grid,
  .category-blog--page .category-blog__grid,
  .category-blog--featured .category-blog__grid {
    grid-template-columns: 1fr;
  }

  .category-blog--page .category-blog__grid--down,
  .category-blog--featured .category-blog__grid--down {
    column-count: 1;
  }
}

/* Legacy chrome without .module-box */
.moduletable,
.module:not(.module-box) {
  background: #fff;
  border: 1px solid var(--ts-border, #d8e2e8);
  border-radius: var(--ts-radius, 6px);
  overflow: hidden;
  margin-bottom: 1rem;
  box-shadow: var(--ts-shadow);
}

.moduletable > h3 + *,
.module > h3 + * {
  padding: 1rem;
}

/* Pagination */
.ts-pagination {
  margin: 1.5rem 0 0;
}

.ts-pagination__list,
.pagination {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  list-style: none;
  margin: 0;
  padding: 0;
}

.ts-pagination__list a,
.ts-pagination__list span,
.pagination .page-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 2.25rem;
  min-height: 2.25rem;
  padding: 0.25rem 0.55rem;
  border: 1px solid var(--ts-border);
  border-radius: var(--ts-radius-sm);
  color: var(--tempcolor, #3d4f8f);
  text-decoration: none;
  background: #fff;
}

.ts-pagination__list li.active span,
.ts-pagination__list li.active a,
.pagination li.active .page-link {
  background: var(--tempcolor, #3d4f8f);
  border-color: var(--tempcolor, #3d4f8f);
  color: #fff;
}

.ts-pagination__list a:hover,
.pagination .page-link:hover {
  border-color: var(--tempaccentcolor, #c26d2d);
  color: var(--tempaccentcolor, #c26d2d);
}

/* Login */
.ts-login,
.ts-logout {
  max-width: none;
  margin: 0;
}

.ts-login__form,
.ts-logout form {
  max-width: 28rem;
}

.ts-login__field,
.ts-login__remember {
  margin-bottom: 0.85rem;
}

.ts-login__field label {
  display: block;
  margin-bottom: 0.3rem;
  font-weight: 600;
}

.ts-login__remember label {
  display: inline-flex !important;
  flex-direction: row !important;
  align-items: center !important;
  gap: 0.45rem;
  margin: 0 !important;
  white-space: nowrap;
  cursor: pointer;
}

.ts-login__remember input[type="checkbox"] {
  flex: 0 0 auto;
  width: 1.05rem !important;
  height: 1.05rem !important;
  margin: 0 !important;
}

.ts-login__field input[type="text"],
.ts-login__field input[type="password"],
.ts-login__field input[type="email"] {
  width: 100%;
}

.ts-login__links {
  list-style: none;
  margin: 1rem 0 0;
  padding: 0;
  display: grid;
  gap: 0.35rem;
}

/* Footer */
#footer {
  background: var(--tempcolor, #3d4f8f);
  color: #fff;
}

#footer a {
  color: #fff;
}

#footer .btn-ghost,
#footer .btn-secondary,
#footer button.btn-ghost {
  background: rgba(255, 255, 255, 0.12) !important;
  color: #fff !important;
  border: 1.5px solid rgba(255, 255, 255, 0.65) !important;
}

#footer .btn-ghost:hover,
#footer .btn-secondary:hover {
  background: var(--tempaccent-soft) !important;
  color: var(--tempaccentcolor, #c26d2d) !important;
  border-color: var(--tempaccentcolor, #c26d2d) !important;
}

#footer .btn:not(.btn-ghost):not(.btn-secondary),
#footer .btn-light,
#footer .btn-primary,
#footer input[type="submit"],
#footer button[type="submit"],
#footer .button {
  background: #fff !important;
  color: var(--tempcolor, #3d4f8f) !important;
  border: 1.5px solid #fff !important;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.2);
}

#footer .btn:not(.btn-ghost):not(.btn-secondary):hover,
#footer .btn-light:hover,
#footer .btn-primary:hover,
#footer input[type="submit"]:hover,
#footer button[type="submit"]:hover,
#footer .button:hover {
  background: var(--tempaccent-soft) !important;
  color: var(--tempaccentcolor, #c26d2d) !important;
  border-color: var(--tempaccentcolor, #c26d2d) !important;
}

#footer form,
#footer .mod-login,
[data-position^="footer"] form {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  width: 100%;
}

#footer form label,
[data-position^="footer"] form label {
  color: #fff;
  font-size: 0.8rem;
  font-weight: 600;
}

/* Cookie */
.cookie-banner,
#cookie-banner {
  font-family: var(--ts-font-ui);
}

.cookie-banner__logo {
  display: block;
  width: 5.75rem;
  height: 5.75rem;
  color: var(--tempcolor, #3d4f8f);
  fill: currentColor;
  flex-shrink: 0;
  object-fit: contain;
}

button.cookie-banner-button,
.cookie-banner-button {
  background: var(--tempcolor-soft);
  color: var(--tempcolor, #3d4f8f);
  border: 1.5px solid color-mix(in srgb, var(--tempcolor, #3d4f8f) 45%, var(--border, #d8e2e8));
  box-shadow: none;
}

button.cookie-banner-button:hover,
.cookie-banner-button:hover {
  background: var(--tempaccent-soft);
  color: var(--tempaccentcolor, #c26d2d);
  border-color: var(--tempaccentcolor, #c26d2d);
}

@media (max-width: 991px) {
  .cookie-banner,
  #cookie-banner,
  .cookie-banner-top,
  .cookie-banner-bottom,
  .cookie-banner-bottom-left,
  .cookie-banner-bottom-right {
    left: 0 !important;
    right: 0 !important;
    width: 100% !important;
    max-width: 100% !important;
    transform: none !important;
    margin: 0 !important;
    border-radius: 0;
    padding: 0.55rem 0.7rem 0.65rem !important;
  }

  .cookie-banner-bottom-left,
  .cookie-banner-bottom-right {
    bottom: 0 !important;
  }

  .cookie-banner__logo {
    width: 3.25rem !important;
    height: 3.25rem !important;
  }
}

@media (max-width: 359px) {
  .cookie-banner,
  #cookie-banner,
  .cookie-banner-top,
  .cookie-banner-bottom,
  .cookie-banner-bottom-left,
  .cookie-banner-bottom-right {
    left: 0 !important;
    right: 0 !important;
    width: 100% !important;
    max-width: 100% !important;
    transform: none !important;
    margin: 0 !important;
    border-radius: 0;
    padding: 0.55rem 0.7rem 0.65rem !important;
  }

  .cookie-banner-bottom-left,
  .cookie-banner-bottom-right {
    bottom: 0 !important;
  }

  .cookie-banner__logo {
    width: 2.15rem !important;
    height: 2.15rem !important;
  }
}

.error-page-details {
  max-width: 1340px;
  margin: 0 auto;
  padding: 0 1rem 2.5rem;
  text-align: center;
  box-sizing: border-box;
}

.error-page-details__code {
  margin: 0;
  font-size: 0.875rem;
  color: var(--ts-muted);
}

.error-page-details__debug {
  margin: 8px 0 0;
  font-size: 0.75rem;
  color: #8a9aa3;
  word-break: break-all;
}

/* Motion */
@keyframes ts-fade-up {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}

.imeny-item {
  animation: ts-fade-up 0.4s ease both;
}

.imeny-item:nth-child(2) { animation-delay: 0.04s; }
.imeny-item:nth-child(3) { animation-delay: 0.08s; }
.imeny-item:nth-child(4) { animation-delay: 0.12s; }
.imeny-item:nth-child(5) { animation-delay: 0.16s; }
.imeny-item:nth-child(6) { animation-delay: 0.2s; }

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation: none !important;
    transition: none !important;
  }
}

/* Mobile layout + burger hmenu */
@media (max-width: 860px) {
  .top-header .sheet-inner {
    justify-content: center;
    flex-wrap: wrap;
    align-items: center;
  }

  .top-header-left,
  .top-header-right,
  .top-header-left ul,
  .top-header-left > ul,
  .top-header-left > div,
  .top-bar-menu,
  .top-header-left > ul > li,
  .top-bar-menu > li {
    display: contents;
    flex: 0 0 auto;
    margin: 0;
    justify-content: center;
  }

  .top-header .site-search--header,
  html.ts-js .top-header .site-search--collapsible {
    margin-left: 0;
    margin-right: 0;
  }

  .content-layout,
  .content-layout.sidebar-left {
    grid-template-columns: 1fr;
    grid-template-areas:
      "sidenav"
      "content"
      "sideextra";
  }

  .content-layout > .sidebar {
    display: contents;
  }

  .content-layout .sidebar-nav {
    grid-area: sidenav;
  }

  .content-layout .sidebar-extra {
    grid-area: sideextra;
  }

  .ts-top-row,
  .ts-bottom-row {
    grid-template-columns: 1fr;
  }

  body.nav-open {
    overflow: hidden;
  }

  html.ts-js .site-search--collapsible .site-search-toggle,
  html.ts-js .site-search--collapsible.is-open .site-search-close {
    background: #fff;
    color: var(--tempcolor, #3d4f8f);
    border: 1px solid rgba(255, 255, 255, 0.65);
  }

  html.ts-js .bottom-header .sheet {
    padding-inline: 0;
  }

  html.ts-js .nav-toggle {
    display: flex !important;
    flex: 1 1 auto;
    width: 100%;
    min-height: 2.85rem;
    border: 0;
    border-radius: 0;
  }
}

@media (min-width: 861px) {
  .nav-toggle,
  .nav-close,
  .nav-backdrop,
  .hmenu-drawer-head {
    display: none !important;
  }

  .site-search-toggle,
  .site-search-close {
    display: none !important;
  }
}
