/* sdkgranit (template granit): adaptive layout.
   >= 1240px: the original fixed 1200px design (the logo is part of the header picture, so the picture is never stretched);
   768-1239px: fluid width; < 768px: one column. */
.header a.logo-qr { margin-left: 1020px; margin-top: 20px; }
/* wide screens: the tab group lies on the lower edge of the header picture, as on sdksirius
   (the empty strip under the tabs, left from the old breadcrumbs and search, is cut off) */
@media (min-width: 1240px) {
  .header { height: 370px; }
  .header .bread, .header .topsearch { display: none; }
}

@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 top;   /* the logo is drawn at the top of the picture: keep the top, cut the empty bottom strip */
    }
  .header a.logo:not(.logo-qr) { top: 0; left: 0; }        /* click area over the logo in the picture */
  .header a.logo.logo-qr { top: 20px; right: 20px; left: auto; width: 114px; height: auto; margin: 0; }
  .header a.logo.logo-qr img { width: 100% !important; }
  .header .adr { position: static; width: auto; margin: calc(15.3vw - 8px) 0 16px 24px; text-shadow: 0 1px 3px rgba(0,0,0,.8); }   /* below the light logo panel of the picture (183 of 1200px) */
}
@media (max-width: 767px) {
  .header { min-height: 0; padding: 160px 16px 0; background-position: left top; }   /* logo (left part of the picture) stays in view; address below the light panel with the logo; tabs on the 16px content edges, as on sdksirius */
  .header a.logo.logo-qr { display: none; }                  /* CBR QR code: no use on the phone itself */
  .header .adr { margin: 0 0 12px; font-size: 13px; }
  .header .adr span { font-size: 16px; }
}
/* 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 */
.main { display: flex; flex-direction: column; min-height: 100vh; }
.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 (granit) ---------- */
.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 #cd272e; 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: #cd272e; }
.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: #cd272e; }
.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: #cd272e; box-shadow: 0 0 0 3px #cd272e22; }
.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: #cd272e; }
.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: #cd272e; }
.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 30px; border: 0; border-radius: 0; color: #fff; font-size: 15px; cursor: pointer; background: #3a3d42 url(../img/btn.png) 0 -71px repeat-x; background-size: auto 142px; }
.com-users-login__submit .btn:hover, .com-users-reset .btn:hover, .com-users-remind .btn:hover { background-position: 0 0; 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: #cd272e; 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: #cd272e; }
.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: #cd272e; }

/* ---------- client login page: «Забыли пароль? / Забыли логин?» inside the same card (14.11.2026, granit) ----------
   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; }

