/* sdksirius (template atomic): adaptive layout.
   1240-1599px: the original fixed 1200px design; >= 1600px: header picture full width, everything else in the 1200px column;
   768-1239px: fluid width; < 768px: one column. */
.header a.logo-img { margin-left: 20px; margin-top: 20px; }
.header .adr.adr-right { margin-left: 950px; margin-top: 20px; width: max-content; }   /* was 300px wide: stuck out of the page */
.header .adr.adr-right img { width: 90px !important; }                                  /* was 30% of the old 300px block */

/* ---------- wide monitors: no white side margins ---------- */
@media (min-width: 1600px) {
  .main { width: auto; box-shadow: none; }
  .header { width: auto; box-sizing: border-box; padding: 0 calc((100% - 1200px) / 2); background-size: cover; background-position: center 60%; }
  .content { margin: 0 auto; }
  .footer { box-sizing: border-box; padding: 0 calc((100% - 1200px) / 2); }
}

@media (max-width: 1239px) {
  .header {
    width: auto; height: auto; min-height: 30.8vw; box-sizing: border-box;
    display: flex; flex-wrap: wrap; align-items: flex-start; align-content: space-between; gap: 20px 24px;
    padding: 20px 24px 0; background-size: cover; background-position: center;
  }
  .header a.logo:not(.logo-img) { display: none; }
  .header a.logo.logo-img { position: static; flex: none; width: 125px; height: auto; margin: 0; }
  .header a.logo.logo-img img { width: 100% !important; }
  .header .adr-name { position: static; order: 1; flex: 1 1 auto; width: auto; margin: 0; }
  .header .adr-name span { font-size: 22px; }
  .header .adr.adr-right { position: static; order: 2; flex: none; margin: 0 0 0 auto; }
}
@media (max-width: 767px) {
  .header { gap: 12px 16px; padding: 16px 16px 0; min-height: 0; align-items: center; }
  .header a.logo.logo-img { width: 64px; }
  .header .adr-name { flex: 1 1 200px; }
  .header .adr-name span { font-size: 17px; line-height: 1.3; display: block; }
  .header .adr.adr-right { flex: 1 1 100%; margin: 0 0 4px; }
  .header .adr.adr-right span { font-size: 13px; }
  .header .adr.adr-right img, .header .adr.adr-right span br:nth-last-of-type(-n+2) { display: none !important; }   /* CBR QR code: no use on the phone itself */
}

/* logged-in users (body.is-user, set in index.php): "Вход для Клиентов" tab is replaced by "Выход" (menu item 327, Registered, last tab).
   The login item itself stays public: its hidden child customer-login/profile is used by the publishing robot after login. */
.is-user .topmenu li.item-12 { display: none; }
/* Shared part: content, left menu, footer, tables, phones. Header rules are site-specific (top of file). */
.inner img { max-width: 100%; height: auto; }
.inner iframe, .inner video { max-width: 100%; }
/* top menu: tabs share the 780px strip, so a 7th tab (shown to logged-in users) no longer drops to a second row; 6 tabs stay 127px */
.header .topmenu ul { display: flex; gap: 2px; }
.header .topmenu ul li { float: none; flex: 0 1 127px; min-width: 0; margin-right: 0; }

/* frontend editing (logged-in editors): Joomla prints an edit link and a tooltip in every module and article.
   Cassiopeia hides the tooltips until hover; these old templates had no rules, so the texts pushed the menus out of place. */
.mod-menu, .mod-custom, .moduletable { position: relative; }
.jmodedit { position: absolute; top: 0; right: 0; z-index: 900; padding: 1px 6px; font-size: 12px; line-height: 18px; color: #333 !important;
  background: rgba(255,255,255,.85); border: 1px solid #58595a; border-radius: 4px; text-decoration: none; }
.jmodedit::before { content: "\270E"; }
[role="tooltip"]:not(.show) { display: none; position: absolute; z-index: 1070; top: 22px; right: 0; padding: .5em; max-width: 300px;
  font-size: 12px; line-height: 1.4; color: #000; text-align: left; background: #fff; border: 1px solid #6d757e; border-radius: 4px;
  box-shadow: 0 0 .5rem rgba(0,0,0,.5); }
:hover + [role="tooltip"], :focus + [role="tooltip"] { display: block; }

/* short pages: the content area grows, the footer stays at the bottom of the screen */
html, body { height: 100%; }
.main { display: flex; flex-direction: column; min-height: 100%; }
.main > * { flex: none; }
.main > .content { flex: 1 0 auto; }

/* ---------- narrow monitors and tablets ---------- */
@media (max-width: 1239px) {
  .main { width: auto; box-shadow: none; }
  .header .bread, .header .topsearch, .header .toplink { display: none; }
  /* top menu: a full-width row of tabs at the bottom of the header */
  .header .topmenu { position: static; order: 9; flex: 1 1 100%; width: auto; height: auto; margin: auto 0 0; }
  .header .topmenu ul { display: flex; gap: 2px; }
  .header .topmenu ul li { float: none; flex: 1 1 0; width: auto; height: 60px; margin: 0; background-size: 100% 200%; background-position: 0 100%; }
  .header .topmenu ul li:hover { background-size: 100% 200%; background-position: 0 0; }
  .topmenu ul li a { height: 60px !important; font-size: 15px; }

  .content { width: auto; padding: 30px 3%; }
  .inner { float: none; width: auto; overflow: auto; }          /* takes the space next to the left menu; wide tables scroll inside */
  .footer { height: auto; min-height: 110px; padding: 10px 16px; box-sizing: border-box; background-size: 100% 100%; }   /* footer picture is 120px tall: stretch it to the taller footer */
  .footer p { margin-left: 0 !important; display: inline-block; text-align: left; }
  /* tabs (ext_tss) assume all tab titles fit in one row; let them wrap and put the content below them */
  .inner dl.tabs { display: flex; flex-wrap: wrap; align-items: flex-end; }
  .inner dl.tabs > dt { float: none; flex: none; margin-top: 4px; }
  .inner dl.tabs > dd { float: none; order: 1; flex: 1 1 100%; width: 100%; margin: 0; }
  .inner dl.tabs > .tabs_clr { order: 2; flex: 1 1 100%; }
}

/* ---------- phones and small tablets ---------- */
@media (max-width: 767px) {
  body { font-size: 14px; }
  .header .topmenu ul { flex-wrap: wrap; }
  .header .topmenu ul li { flex: 1 1 calc(33.333% - 2px); height: 50px; }
  .topmenu ul li a { height: 50px !important; font-size: 14px; padding: 0 6px !important; line-height: 1.15; }

  .content { padding: 16px; }
  .leftmenu { float: none; width: auto; margin: 0 0 16px; border-left: 0; border-right: 0; }
  .leftmenu ul { width: auto; }
  .leftmenu ul li.parent a { width: auto; box-sizing: border-box; }
  .leftmenu ul.mod-menu > li.parent:not(.active) > ul { display: none; }   /* only the section of the current page is open (top level only) */
  .leftmenu ul li.parent ul li a { padding-top: 6px; padding-bottom: 6px; font-size: 14px; }
  .inner p, .inner li { text-align: left !important; }           /* justified text leaves wide gaps on a narrow screen */
  .inner table { table-layout: auto; }
  .inner iframe[src*="2gis"] { height: 400px; }
  h2 { font-size: 20px; }
  .footer { line-height: 18px; }
  .footer span { margin-left: 0; display: block; }
}
@media (max-width: 459px) {
  .header .topmenu ul li { flex-basis: calc(50% - 2px); }
}

/* ---------- client login page (com_users login / reset / remind): a framed card in the site style (sirius) ---------- */
.com-users-login, .com-users-reset, .com-users-remind { max-width: 460px; margin: 10px 0 30px; }
.com-users-login__form, .com-users-reset__form, .com-users-remind__form { margin: 0; padding: 28px 32px 30px; background: #fff; border: 1px solid #e3e5e8;
  border-top: 4px solid #132f5d; box-shadow: 0 8px 30px rgba(37,37,36,.06); }
.com-users-login__form fieldset, .com-users-reset__form fieldset, .com-users-remind__form fieldset { margin: 0; padding: 0; border: 0; min-width: 0; }
.com-users-login__form::before { content: "Вход для клиентов"; display: block; margin: 0 0 20px; font-size: 21px; font-weight: bold; color: #132f5d; }
.com-users-reset legend, .com-users-remind legend { margin: 0 0 18px; font-size: 14px; line-height: 1.5; color: #45484e; }
.com-users-login .control-group, .com-users-reset .control-group, .com-users-remind .control-group { margin: 0 0 16px; }
.com-users-login .control-label label, .com-users-reset .control-label label, .com-users-remind .control-label label { display: block; margin: 0 0 6px; font-size: 13px; font-weight: bold; color: #45484e; }
.com-users-login .star, .com-users-reset .star, .com-users-remind .star { color: #132f5d; }
.com-users-login .form-control, .com-users-reset .form-control, .com-users-remind .form-control { display: block; width: 100%; height: 42px; box-sizing: border-box; margin: 0;
  padding: 0 12px; font-size: 15px; color: #27272b; background: #fff; border: 1px solid #c9ced6; border-radius: 0; box-shadow: none; transition: border-color .2s, box-shadow .2s; }
.com-users-login .form-control:focus, .com-users-reset .form-control:focus, .com-users-remind .form-control:focus { outline: none; border-color: #132f5d; box-shadow: 0 0 0 3px #132f5d22; }
.com-users-login .input-group { display: flex; }
.com-users-login .input-group .form-control { flex: 1 1 auto; min-width: 0; border-right: 0; }
.com-users-login .input-password-toggle { flex: none; width: 44px; height: 42px; margin: 0; padding: 0; border: 1px solid #c9ced6; border-radius: 0; background: #f4f5f7; color: #5c5f64; cursor: pointer; }
.com-users-login .input-password-toggle:hover { color: #132f5d; }
.com-users-login .input-password-toggle .icon-eye, .com-users-login .input-password-toggle .icon-eye-slash { display: inline-block; width: 18px; height: 18px; vertical-align: middle; background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%235c5f64' stroke-width='2'%3E%3Cpath d='M1 12s4-7 11-7 11 7 11 7-4 7-11 7S1 12 1 12z'/%3E%3Ccircle cx='12' cy='12' r='3'/%3E%3C/svg%3E") center / contain no-repeat; }
.com-users-login .input-password-toggle .icon-eye::before, .com-users-login .input-password-toggle .icon-eye-slash::before { content: none; }
.com-users-login .input-password-toggle .icon-eye-slash { opacity: .45; }
.com-users-login .visually-hidden { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.com-users-login__remember { margin: 0 0 20px; }
.com-users-login__remember .form-check { display: flex; align-items: center; gap: 8px; }
.com-users-login__remember .form-check-input { width: 16px; height: 16px; margin: 0; accent-color: #132f5d; }
.com-users-login__remember .form-check-label { font-size: 14px; color: #45484e; cursor: pointer; }
.com-users-login__submit { margin: 0; }
.com-users-login__submit .btn, .com-users-reset .btn, .com-users-remind .btn { display: inline-block; min-width: 160px; padding: 12px 32px; border: 0; border-radius: 0; background: #132f5d; color: #fff; font-size: 15px; font-weight: bold; cursor: pointer; transition: .2s; }
.com-users-login__submit .btn:hover, .com-users-reset .btn:hover, .com-users-remind .btn:hover { background: #0c2046; color: #fff; }
.com-users-login__options { display: flex; flex-wrap: wrap; gap: 6px 24px; margin: 16px 0 0; padding: 0 2px; }
.com-users-login__options .list-group-item { padding: 0; border: 0; background: none; font-size: 14px; color: #132f5d; text-decoration: none; }
.com-users-login__options .list-group-item:hover { text-decoration: underline; }
@media (max-width: 767px) { .com-users-login, .com-users-reset, .com-users-remind { max-width: none; }
  .com-users-login__form, .com-users-reset__form, .com-users-remind__form { padding: 22px 18px 24px; }
  .com-users-login__submit .btn, .com-users-reset .btn, .com-users-remind .btn { width: 100%; } }


/* login / reset / remind: Joomla checks the required fields as soon as you leave them ("Пожалуйста, заполните поле" under an empty login);
   show the hints only after "Войти" is pressed (index.php marks the form .was-submitted on submit) */
.com-users-login form:not(.was-submitted) .form-control-feedback, .com-users-reset form:not(.was-submitted) .form-control-feedback,
.com-users-remind form:not(.was-submitted) .form-control-feedback { display: none; }
.com-users-login form:not(.was-submitted) .form-control.invalid, .com-users-reset form:not(.was-submitted) .form-control.invalid,
.com-users-remind form:not(.was-submitted) .form-control.invalid { border-color: #c9ced6; }
.com-users-login form:not(.was-submitted) label.invalid, .com-users-reset form:not(.was-submitted) label.invalid,
.com-users-remind form:not(.was-submitted) label.invalid { color: #45484e; }
.com-users-login .form-control-feedback, .com-users-reset .form-control-feedback, .com-users-remind .form-control-feedback {
  display: block; margin: 3px 0 0; font-size: 12px; font-weight: normal; color: #132f5d; }
.com-users-login form.was-submitted .form-control.invalid, .com-users-reset form.was-submitted .form-control.invalid,
.com-users-remind form.was-submitted .form-control.invalid { border-color: #132f5d; }

/* ---------- client login page: «Забыли пароль? / Забыли логин?» inside the same card (14.11.2026, sirius) ----------
   html/com_users/login/default_login.php: e-mail → login + code → new password ×2 → done, «← Назад ко входу» / Esc back */
.com-users-login [hidden] { display: none !important; }
.com-users-login__recover::before { content: attr(data-title); }
.com-users-login__recover-hint { margin: -4px 0 18px; font-size: 13px; line-height: 1.45; color: #6b6f76; }
.com-users-login__recover-hint.is-error { color: #cd272e; }
.com-users-login__recover-hint.is-ok { margin: 0 0 22px; font-size: 15px; color: #2e7d32; }
.com-users-login__recover[data-step="done"] { text-align: center; }
.com-users-login__recover[aria-busy="true"] .btn { opacity: .7; cursor: progress; }
.com-users-login__recover-links .com-users-login__back { font-weight: bold; }

