@charset "UTF-8";
/*
 * Inter — default typeface for SRPA 2026 (local files from templates/Inter,
 * converted to WOFF2). Loaded unconditionally, independent of the template's
 * "Font Scheme" admin option.
 */
@font-face {
  font-family: "Inter";
  src: url("../fonts/inter/Inter-Regular.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Inter";
  src: url("../fonts/inter/Inter-Italic.woff2") format("woff2");
  font-weight: 400;
  font-style: italic;
  font-display: swap;
}

@font-face {
  font-family: "Inter";
  src: url("../fonts/inter/Inter-Medium.woff2") format("woff2");
  font-weight: 500;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Inter";
  src: url("../fonts/inter/Inter-SemiBold.woff2") format("woff2");
  font-weight: 600;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Inter";
  src: url("../fonts/inter/Inter-SemiBoldItalic.woff2") format("woff2");
  font-weight: 600;
  font-style: italic;
  font-display: swap;
}

@font-face {
  font-family: "Inter";
  src: url("../fonts/inter/Inter-Bold.woff2") format("woff2");
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Inter";
  src: url("../fonts/inter/Inter-BoldItalic.woff2") format("woff2");
  font-weight: 700;
  font-style: italic;
  font-display: swap;
}

/*
 * SRPA 2026 — colour theme overrides on top of the Cassiopeia base template.
 *
 * Palette sampled with pixel precision from the site mockup
 * (templates/teplate.jpg, via Pillow: median/mode over clean background
 * patches, darkest-percentile average over text regions):
 *
 *   --srpa-sage    #B0C8B4  DEFAULT page/body background — header, hero and
 *                           the sidebar+content band are all this colour in
 *                           the mockup; cream only appears as the footer and
 *                           in one plain-content band ("О Нас")
 *   --srpa-cream   #FCFCF4  footer background; opt-in via .srpa-band-cream
 *   --srpa-mint    #D0DCD4  secondary panel (e.g. the calendar widget card)
 *   --srpa-accent  #5E8A6E  buttons, links, active-menu accent
 *   --srpa-accent-dark #4C7359  hover state
 *   --srpa-ink     #24231F  headings, logo, nav text, body text (near-black)
 *   --srpa-text    #444643  unused by default (kept for optional lighter text
 *                           inside .srpa-band-cream sections)
 *   --srpa-muted   #555752  footer / caption text
 *
 * Button/link colour is driven by css/global/custom_srpa2026.css (the
 * template's selectable colour scheme file); this file covers everything
 * else: making sage the default background (with white cards for boxed
 * content), and the header/footer treatment.
 */

:root {
  --srpa-sage: #B0C8B4;
  --srpa-cream: #FDFCF5;
  --srpa-mint: #D0DCD4;
  --srpa-accent: #5E8A6E;
  --srpa-accent-dark: #4C7359;
  --srpa-ink: #24231F;
  --srpa-text: #444643;
  --srpa-muted: #555752;
  --srpa-border: #DCE3DA;

  --cassiopeia-font-family-body: "Inter", Roboto, "Helvetica Neue", "Arial Nova", "Nimbus Sans", Arial, sans-serif;
  --cassiopeia-font-family-headings: "Inter", Roboto, "Helvetica Neue", "Arial Nova", "Nimbus Sans", Arial, sans-serif;
  --cassiopeia-font-weight-normal: 400;
  --cassiopeia-font-weight-headings: 600;

  /* Sage is the default page/body background in the mockup (header, hero
     and the sidebar+content band are all this colour) — cream is the
     exception, used only for the footer and for content explicitly
     wrapped in .srpa-band-cream (e.g. an "О Нас"-style section). */
  /* 2026-11-07: фон страницы сделан светлее sage (тёмное на тёмном тяжело
     читать). Шапка остаётся sage — она задана отдельно в .container-header.
     Чтобы подобрать оттенок, меняйте только --srpa-page и --body-bg-rgb. */
  --srpa-page: #EEF3EF;
  --body-bg: var(--srpa-page);
  --body-bg-rgb: 238, 243, 239;
  --body-color: var(--srpa-ink);
  --body-color-rgb: 36, 35, 31;
  --heading-color: var(--srpa-ink);
  --border-color: var(--srpa-border);

  /* Сайт только светлый: запрещает браузерам на Chromium (Opera «Force dark
     pages», Chrome/Edge Auto Dark Mode) принудительно затемнять страницу —
     иначе тёмный текст перекрашивается в белый поверх светлого фона. */
  color-scheme: only light;
}

body {
  background-color: var(--body-bg);
}

h1, h2, h3, h4, h5, h6,
.h1, .h2, .h3, .h4, .h5, .h6 {
  color: var(--heading-color);
}

/* Module boxes / cards: white panels with a light border, as in the mockup. */
.card {
  --card-bg: #ffffff;
  --card-border-color: var(--srpa-border);
  --card-cap-bg: #ffffff;
}

/* Sidebar widgets (e.g. "Семинары и конференции" / the calendar widget) get
   the mockup's light mint-green instead of white — a step lighter than the
   sage page background, not a plain white box. */
.container-sidebar-left .card,
.container-sidebar-right .card {
  --card-bg: var(--srpa-mint);
  --card-cap-bg: var(--srpa-mint);
}

.card-title,
.mod-title {
  color: var(--heading-color);
}

/* Utility classes for the few spots that deviate from the sage default.
   Apply via a module's "Module Class" field or a custom HTML wrapper:
   - .srpa-band-cream: opt a section OUT of sage into cream (e.g. an
                        "О Нас"-style plain-content block, as in the mockup)
   - .srpa-panel-mint : secondary panel background (e.g. a calendar widget) */
.srpa-band-cream {
  background-color: var(--srpa-cream);
  color: var(--srpa-ink);
}

.srpa-panel-mint {
  background-color: var(--srpa-mint);
  color: var(--srpa-ink);
}

/* .btn-secondary is Cassiopeia's plain-grey button — used site-wide for
   "Подробнее" (readmore) links and the article prev/next nav ("Назад" /
   "Вперед"). Recolour it to match the accent green used on .btn-primary
   (the search button etc.) so every button reads consistently. */
.btn-secondary {
  --btn-color: #fff;
  --btn-bg: var(--srpa-accent);
  --btn-border-color: var(--srpa-accent);
  --btn-hover-color: #fff;
  --btn-hover-bg: var(--srpa-accent-dark);
  --btn-hover-border-color: var(--srpa-accent-dark);
  --btn-active-color: #fff;
  --btn-active-bg: var(--srpa-accent-dark);
  --btn-active-border-color: var(--srpa-accent-dark);
  --btn-disabled-color: #fff;
  --btn-disabled-bg: var(--srpa-accent);
  --btn-disabled-border-color: var(--srpa-accent);
}

/* Header: the mockup's header uses the same sage green as the section
   bands, with dark logo/nav text — not Cassiopeia's default solid-colour
   header with white text.
   2026-11-07: шапка посветлела до mint (как карточка «Новости»), нижняя
   линия — sage, чтобы шапка не сливалась со светлым фоном страницы. */
.container-header {
  background-image: none;
  background-color: var(--srpa-mint);
  box-shadow: inset 0 -1px 0 var(--srpa-sage);
}

/* Logo + menu on one row (desktop only), as in the mockup. .container-header-row
   is a .grid-child (same max-width:1320px + centering as the content below,
   e.g. the sidebar) with "below-top" (logo), the brand block and "menu"/
   "search" as its flex children — so the logo's left edge lines up with the
   page content, instead of hugging the browser edge.
   Below 992px each child keeps its own full-width row (the usual mobile
   pattern: logo on top, collapsed/hamburger menu below). */
.container-header-row {
  flex-wrap: wrap;
}

.container-header-row > * {
  flex: 1 0 100%;
}

@media (width >= 992px) {
  .container-header-row {
    align-items: flex-end;
  }

  .container-header-row > * {
    flex: 0 0 auto;
  }
}

/* "topbar" position: unused by default in Cassiopeia, repurposed here as a
   mobile-only logo bar at the very top of the page (a Custom HTML module
   with the logo image, position "topbar"). It's rendered with style="none"
   (see index.php), which Joomla's core none.php chrome outputs with NO
   wrapper at all — so a module's own "Module Class" field (e.g.
   "hide-desktop") never makes it into the HTML for this position. Instead,
   hide the whole position directly at desktop widths — safe here since
   "topbar" is dedicated to this one mobile-only logo module. */
.container-topbar {
  padding: .5em 1em 0;
  color: var(--srpa-ink);
}

.container-topbar img {
  max-height: 100px !important;
  height: auto !important;
  width: auto;
}

/* Tighten the gap between the topbar logo and the menu row below it
   (Cassiopeia's default spacing assumes the logo sits inline with the
   menu, not stacked above it on mobile). */
@media (width < 768px) {
  .container-header .grid-child.container-header-row {
    padding-top: 0;
  }

  .container-header nav {
    margin-top: 0;
  }
}

@media (min-width: 768px) {
  .container-topbar {
    display: none;
  }
}

/* Mobile: hamburger button in the top-left corner, level with the top of
   the topbar logo, instead of on its own row below the logo. The button is
   taken out of the flow and positioned against .container-header (already
   position:relative in Cassiopeia); .navbar loses its own position:relative
   so it doesn't become the containing block. The collapsed menu itself
   stays in place and opens full-width below the logo.
   With the button gone from the flow, the menu row is empty when closed —
   its paddings (and the logo paragraph's bottom margin) are zeroed so the
   header's bottom line sits right under the logo. */
@media (width < 768px) {
  .container-header .navbar {
    position: static;
  }

  .container-header .navbar-toggler {
    position: absolute;
    top: .5em;
    left: 1em;
    z-index: 2;
  }

  .container-topbar {
    padding-bottom: .5em;
  }

  .container-topbar p {
    margin: 0;
  }

  /* block, not inline: removes the text-line gap under the image */
  .container-topbar img {
    display: block;
    margin-inline: auto;
  }

  .container-header .grid-child.container-header-row,
  .container-header .container-nav {
    padding-top: 0;
    padding-bottom: 0;
  }
}

/* Desktop dropdown submenu panel — mint instead of Cassiopeia's default white. */
.container-header .mod-menu :where(.mod-menu__sub:not(.mod-menu__sub *)) {
  background-color: var(--srpa-mint);
}

/* Шапка тоже mint — выпадающее подменю (десктоп) отделяем рамкой и тенью,
   иначе оно сливается с шапкой. На мобильном (<992px) подменю раскрывается
   внутри бургер-меню, там рамка не нужна. */
@media (min-width: 992px) {
  .container-header .mod-menu :where(.mod-menu__sub:not(.mod-menu__sub *)) {
    border: 1px solid var(--srpa-sage);
    box-shadow: 0 .25rem .75rem rgba(36, 35, 31, .12);
  }
}

/* Submenu links: Cassiopeia colours them #fff (meant for its dark-blue
   header) — on the mint panel that's white-on-light, visible in the
   mobile burger menu. */
.container-header .mod-menu .mod-menu__sub a,
.container-header .mod-menu .mod-menu__sub span {
  color: var(--srpa-ink);
}

.container-header .mod-menu .mod-menu__sub a:hover,
.container-header .mod-menu .mod-menu__sub a:focus,
.container-header .mod-menu .mod-menu__sub li.active > a {
  color: var(--srpa-accent-dark);
}

.container-header .site-description,
.container-header .navbar-brand,
.container-header .navbar-brand a,
.container-header .mod-menu,
.container-header .navbar-toggler,
.container-header .mod-finder,
.container-header .mod-finder a:not(.jmodedit) {
  color: var(--srpa-ink);
}

.container-header .navbar-brand:hover,
.container-header .navbar-brand:focus,
.container-header .mod-finder a:not(.jmodedit):hover,
.container-header .mod-finder a:not(.jmodedit):focus {
  color: var(--srpa-accent);
}

.container-header .navbar-toggler {
  border-color: var(--srpa-ink);
}

.container-header .mod-menu > li.active:after,
.container-header .mod-menu > li:hover:after,
.container-header .metismenu > li > a:hover:after,
.container-header .metismenu > li > button:hover:before,
.container-header .metismenu > li.active > a:after,
.container-header .metismenu > li.active > button:before {
  background: var(--srpa-accent);
}

.container-header .mod-menu > li.active > a,
.container-header .mod-menu > li.active > span {
  color: var(--srpa-accent-dark);
}

/* Footer: cream, same as the page background, with muted grey text. */
.footer {
  background-image: none;
  background-color: var(--srpa-cream);
  color: var(--srpa-muted);
  box-shadow: inset 0 1px 0 var(--srpa-border);
}

.footer a:not(.btn),
.footer .btn-link {
  color: var(--srpa-muted);
}

.footer a:not(.btn):hover,
.footer a:not(.btn):focus,
.footer .btn-link:hover,
.footer .btn-link:focus {
  color: var(--srpa-accent);
}

.footer .metismenu.mod-menu .mm-collapse {
  background: var(--srpa-cream);
}

/* Breadcrumbs read better with a soft tint on a cream page. */
.breadcrumb {
  background-color: var(--srpa-mint);
  border: 1px solid var(--srpa-border);
}

/* Responsive show/hide utilities carried over from the previous template
   (cassiopeia/user.css) — apply via a module's "Module Class" field.
   Kept here (not in user.css) so they survive future user.css resets. */
@media (max-width: 767.98px) {
  .hide-mobile,
  .hide-mobile * {
    display: none !important;
  }
}

@media (min-width: 768px) {
  .hide-desktop,
  .hide-desktop * {
    display: none !important;
  }
}

/* Banner slider (Slider CK, position "banner"): the position itself is
   full-width, and Swiper always stretches a slide to its container — so
   cap the slider at the banner images' own width to show them at native
   size, centred (narrower screens still scale it down). Banner files are
   ~1125x400; if new banners have a different size, change
   --srpa-banner-max-width to their width (content width is 1320px). */
.container-banner .baner-slaider {
  --srpa-banner-max-width: 1125px;
  max-width: var(--srpa-banner-max-width);
  margin-top: 1.5rem; /* gap below the header's bottom border line */
  margin-left: auto;
  margin-right: auto;
  /* Soft drop shadow, like the "cube" effect's own shadow — the sage-toned
     banners otherwise blend into the sage page background. */
  box-shadow:
    0 14px 24px -10px rgba(36, 35, 31, .45),
    0 2px 6px rgba(36, 35, 31, .12);
}

/* Mobile: smaller gap between the header line and the banner. */
@media (width < 768px) {
  .container-banner .baner-slaider {
    margin-top: .5rem;
  }
}

/* Hide the banner slider on article/category pages — also carried over
   from cassiopeia/user.css. */
body[class*="article"] .baner-slaider {
  display: none !important;
}

body[class*="category"] .baner-slaider {
  display: none !important;
}

/* Reusable "member cards" look for multi-column blog listings (a name in the
   "page-header" h2 stacked above a photo). Turn it on for any menu item:
   Menus -> the menu item -> "Page Display" tab -> "Page Class": srpa-cards
   (Joomla adds it to <body>, so it's scoped to that page only).
   (body.itemid-126 is kept as a fallback so "Члены СКПА" keeps working until
   its Page Class is set — remove that selector afterwards.)

   1. Each item (name + photo) is its own mint card, like the sidebar
      widgets, so it's clear which name belongs to which photo. All widths.
      The grid already stretches cards in a row to the same height, and
      .blog-item has overflow:hidden, so the floated photo stays inside.
   2. Desktop only (>=992px, where the layout is actually multi-column):
      smaller heading font, and height reserved for 3 lines on every title
      so photos start at the same offset across a row regardless of name
      length (on mobile names just wrap naturally). */
body.srpa-cards .blog-items .blog-item,
body.itemid-126 .blog-items .blog-item {
  background-color: var(--srpa-mint);
  border: 1px solid var(--srpa-border);
  border-radius: .25rem;
  padding: .75em 1em;
}

@media (min-width: 992px) {
  body.srpa-cards .blog-items .blog-item .page-header h2,
  body.itemid-126 .blog-items .blog-item .page-header h2 {
    font-size: 1.35rem;
    line-height: 1.4em;
    min-height: 4.2em;
  }
}

/* "Найти психолога" filter (mod_jlcontentfieldsfilter): the module's own CSS
   puts a 30px gap above every section, which looks like an empty line after
   each dropdown. Tighten it (srpa-theme.css loads after the module's CSS).
   Note: don't select via .jlcontentfieldsfilter — the module appends its
   "Module Class" straight onto that class name with no space (e.g.
   "jlcontentfieldsfilterhide-mobile"), so the plain class may not exist. */
[class^="jlcontentfieldsfilter"] .jlmf-section {
  margin-top: .9rem;
}

[class^="jlcontentfieldsfilter"] .jlmf-section:first-child {
  margin-top: 0;
}

/* Article view, category 22 ("Члены СКПА") only: gap between a left/right-
   floated article image (the "Full article image" / "Intro image" fields,
   rendered as <figure class="left|right item-image">) and the text wrapping
   around it. Cassiopeia's default is tiny, so text hugged the photo.
   body.catid-N is added by index.php (article's category / category view id),
   so this can be reused for other categories by adding their selector. */
body.catid-22 .com-content-article .item-image.left {
  margin-right: 30px;
}

body.catid-22 .com-content-article .item-image.right {
  margin-left: 30px;
}

body.catid-39 .com-content-article .item-image.left {
  margin-right: 30px;
}

body.catid-39 .com-content-article .item-image.right {
  margin-left: 30px;
}

/* Узкие телефоны (большинство Android, ~360px): фото 200px + отступ 30px
   оставляли тексту справа меньше 100px — длинное первое слово
   («Наблюдательный») не влезало, и весь текст уезжал под фото. На iPhone
   (~430px) места хватало. Здесь фото — 45% ширины, отступ 1rem, так что
   справа остаётся ~55% под текст на любом телефоне. */
@media (max-width: 575.98px) {
  body.catid-22 .com-content-article .item-image.left,
  body.catid-22 .com-content-article .item-image.right,
  body.catid-39 .com-content-article .item-image.left,
  body.catid-39 .com-content-article .item-image.right {
    width: 45%;
    max-width: 200px;
  }

  body.catid-22 .com-content-article .item-image img,
  body.catid-39 .com-content-article .item-image img {
    width: 100%;
    height: auto;
  }

  body.catid-22 .com-content-article .item-image.left,
  body.catid-39 .com-content-article .item-image.left {
    margin-right: 1rem;
  }

  body.catid-22 .com-content-article .item-image.right,
  body.catid-39 .com-content-article .item-image.right {
    margin-left: 1rem;
  }
}

/* Typography spec (дизайн-токены, шрифт Inter — уже подключён выше).
 * Проверено попиксельно по присланному reference-скрину:
 *   Основной цвет B0C8B4 — совпадает с --srpa-sage.
 *   Фон FDFCF5 — совпадает с --srpa-cream (уточнил значение выше).
 *   Кнопка (заливка) ~#5F8C6D — совпадает с --srpa-accent, менять не нужно.
 * Из шрифтовых размеров/начертаний спеки (H1 38px, H2 35px, H3 16px и т.д.)
 * решили НЕ применять — на десктопе заголовки модулей (h3: «Найти
 * психолога», «Семинары и конференции» и т.п.) от 16px становились мелкими.
 * Оставлены только цвета заголовков: */
h1, .h1 {
  color: #2D2D2D;
}

h2, .h2 {
  color: #2D2D2D;
}

h3, .h3 {
  color: #2C3A47;
}

/* "Члены СКПА" на мобильном (одна колонка): фото прижато влево, потому что
   в тексте материала у самой картинки задан инлайн-стиль float:left/right
   (его выставляет редактор, не шаблон) — перебить инлайн-стиль можно
   только через !important. На десктопе (сетка в несколько колонок) не
   трогаем — там фото и так стоят ровно. */
@media (max-width: 991.98px) {
  body.srpa-cards .blog-items .blog-item img,
  body.itemid-126 .blog-items .blog-item img {
    float: none !important;
    display: block !important;
    margin-left: auto !important;
    margin-right: auto !important;
  }

  body.srpa-cards .blog-items .blog-item .page-header,
  body.itemid-126 .blog-items .blog-item .page-header {
    text-align: center;
  }
}

/* Таблицы с границами ячеек: редактор добавляет таблице класс custom-table
   (перенесено из старого cassiopeia/css/user.css, цвета — из палитры).
   listing — класс таблиц расписаний групп-аналитического клуба. */
.custom-table,
table.listing {
  border-collapse: collapse !important;
  border-spacing: 0 !important;
}

.custom-table td,
.custom-table th,
table.listing td,
table.listing th {
  border: 1px solid var(--srpa-accent-dark, #4C7359) !important;
  padding: 6px 8px;
}

/* Заголовки материалов (2026-11-07), по всему сайту, моб. и десктоп:
   чёрные вместо зелёного цвета ссылок, мельче и с меньшим межстрочным
   интервалом. В блоге/на главной заголовок — ссылка (.page-header h2 a),
   на главной (featured) — .blog-item .item-title a,
   в самом материале — .com-content-article .page-header h1/h2.
   «Члены СКПА» (body.srpa-cards) на десктопе сохраняют свой размер 1.35rem
   из правила выше — там селектор специфичнее. */
.blog-item .page-header h2,
.blog-item .item-title,
.com-content-article .page-header h1,
.com-content-article .page-header h2 {
  color: var(--srpa-ink);
  line-height: 1.25;
}

.blog-item .page-header h2,
.blog-item .item-title {
  font-size: 1.375rem;
}

.com-content-article .page-header h1,
.com-content-article .page-header h2 {
  font-size: 1.625rem;
}

.blog-item .page-header h2 a,
.blog-item .item-title a {
  color: inherit;
  text-decoration: none;
}

.blog-item .page-header h2 a:hover,
.blog-item .page-header h2 a:focus,
.blog-item .item-title a:hover,
.blog-item .item-title a:focus {
  color: var(--srpa-accent-dark);
  text-decoration: underline;
}

@media (max-width: 767.98px) {
  .blog-item .page-header h2,
  .blog-item .item-title {
    font-size: 1.25rem;
  }

  .com-content-article .page-header h1,
  .com-content-article .page-header h2 {
    font-size: 1.4rem;
  }
}

/* Описание категории (текст над материалами, например в «ОС» и «Святочных
   встречах») — в светлой рамке, чтобы отделить его от списка материалов. */
.category-desc {
  background-color: var(--srpa-cream);
  border: 1px solid var(--srpa-sage);
  border-radius: .375rem;
  padding: 1rem 1.25rem;
  margin-bottom: 1.5rem;
}

.category-desc > :last-child,
.category-desc > .clearfix:last-child {
  margin-bottom: 0;
}

/* Логотипы EFPP и EGATIN (модуль «Свой HTML» mod-custom113 в левой колонке):
   у картинок непрозрачный белый фон, на мятной карточке он виден белым
   прямоугольником. multiply «растворяет» белое в цвете подложки, тёмный
   рисунок остаётся. Работает на любом фоне, где бы картинки ни стояли. */
img[src*="efpp.png"],
img[src*="logo-egatin.png"] {
  mix-blend-mode: multiply;
}
