/* ==============================================
   БАЗОВЫЕ СТИЛИ
   ============================================== */

#main-content {
  background-color: #f0f0f0;
}

html {
  scroll-behavior: smooth;
}

/* ==============================================
   ШАПКА (логотип, название, слоган)
   ============================================== */

/* Логотип и название */
.logo-and-site-name-wrapper .logo img {
  height: 100px;
}

.logo-and-site-name-wrapper .site-slogan {
  font-size: larger;
}

/* Верхний бренд-блок в шапке */
.header-top-first #block-catalog-lite-brandingsayta .logo-and-site-name-wrapper {
  display: flex;
  align-items: center;
  gap: 16px;
  text-align: left;
}

.header-top-first #block-catalog-lite-brandingsayta .logo {
  margin: 0;
  float: none;
  flex: 0 0 auto;
}

.header-top-first #block-catalog-lite-brandingsayta .logo img {
  height: 120px;
  width: auto;
  max-width: 100%;
  display: block;
}

.header-top-first #block-catalog-lite-brandingsayta .site-name,
.header-top-first #block-catalog-lite-brandingsayta .site-slogan {
  display: block;
  margin: 0;
  line-height: 1.1;
  white-space: normal;
}

.header-top-first #block-catalog-lite-brandingsayta .site-name {
  font-size: 28px;
  font-weight: 700;
}

.header-top-first #block-catalog-lite-brandingsayta .site-slogan {
  font-size: 28px;
  font-weight: 700;
}

/* Брендинг на главной в баннере */
body.path-frontpage #banner .block-system-branding-block {
  position: absolute;
  top: 18px;
  left: 42px;
  right: auto;
  width: auto;
  z-index: 20;
}

body.path-frontpage #banner .block-system-branding-block .logo-and-site-name-wrapper {
  display: flex;
  align-items: center;
  gap: 14px;
  text-align: left;
}

body.path-frontpage #banner .block-system-branding-block .logo {
  margin: 0;
  float: none;
  flex: 0 0 auto;
}

body.path-frontpage #banner .block-system-branding-block .logo img {
  height: 120px;
  width: auto;
  max-width: 100%;
  display: block;
}

body.path-frontpage #banner .block-system-branding-block .site-name,
body.path-frontpage #banner .block-system-branding-block .site-slogan {
  display: block;
  margin: 0;
  line-height: 1.1;
  white-space: nowrap;
  color: inherit;
}

body.path-frontpage #banner .block-system-branding-block .site-name {
  font-size: 28px;
  font-weight: 800;
}

body.path-frontpage #banner .block-system-branding-block .site-slogan {
  font-size: 28px;
  font-weight: 700;
}

/* Картинка справа от названия (custom-branding) */
body.path-frontpage #banner .custom-branding {
  display: flex;
  align-items: center;
  gap: 18px;
}

body.path-frontpage #banner .custom-branding .branding-text {
  display: flex;
  flex-direction: column;
  justify-content: center;
}

body.path-frontpage #banner .custom-branding .branding-side-image img {
  display: block;
  width: 180px;
  max-width: 100%;
  height: auto;
}

/* Логотип VIGIL Journal — объём + пульсация + hover-анимация */
.site-branding__logo img {
  filter: drop-shadow(0 1px 0 rgba(255, 255, 255, 0.6))
    drop-shadow(0 -1px 0 rgba(0, 0, 0, 0.1))
    drop-shadow(0 3px 6px rgba(0, 0, 0, 0.18));
  animation: logo-heartbeat 5s ease-in-out infinite;
  transform-origin: center;
}

@keyframes logo-heartbeat {
  0% {
    transform: scale(1);
  }
  7% {
    transform: scale(1.15);
  }
  47% {
    transform: scale(1);
  }
  100% {
    transform: scale(1);
  }
}

.site-branding__logo:hover img {
  animation: none !important;
  filter: drop-shadow(0 1px 0 rgba(255, 255, 255, 0.7))
    drop-shadow(0 -1px 0 rgba(0, 0, 0, 0.12))
    drop-shadow(0 8px 16px rgba(0, 0, 0, 0.22));
  transform: scale(1.15);
  transition: transform 0.3s ease, filter 0.3s ease;
}

/* ==============================================
   ПЕРЕКЛЮЧАТЕЛЬ ЯЗЫКА (флаги)
   ============================================== */

#block-catalog-lite-pereklyuchatelyazykatekstinterfeysa {
  padding-top: 15px;
}

#block-catalog-lite-pereklyuchatelyazykatekstinterfeysa .content,
#block-catalog-lite-pereklyuchatelyazykatekstinterfeysa ul.links,
#block-catalog-lite-pereklyuchatelyazykatekstinterfeysa ul.links li,
#block-catalog-lite-pereklyuchatelyazykatekstinterfeysa ul.links li a {
  display: flex !important;
  align-items: center !important;
  overflow: visible !important;
  height: auto !important;
}

#block-catalog-lite-pereklyuchatelyazykatekstinterfeysa ul.links {
  flex-direction: row !important;
  flex-wrap: nowrap !important;
  gap: 10px;
  list-style: none;
  padding: 0;
  margin: 0;
}

#block-catalog-lite-pereklyuchatelyazykatekstinterfeysa ul.links li {
  display: inline-flex !important;
  float: none !important;
  width: auto !important;
  margin: 0 !important;
  padding: 0 !important;
}

#block-catalog-lite-pereklyuchatelyazykatekstinterfeysa ul.links li::before {
  content: none !important;
}

#block-catalog-lite-pereklyuchatelyazykatekstinterfeysa img.language-icon {
  display: inline-block;
  vertical-align: middle;
  max-width: none;
  max-height: none;
}

/* ==============================================
   ПОИСК В ШАПКЕ
   ============================================== */

.region-header .search-block-form {
  width: 50%;
  float: right;
  margin-top: 10px;
}

/* ==============================================
   БАННЕР И СЛАЙДЕР
   ============================================== */

.page-container .banner.region--black-background:after {
  background-color: rgba(0, 0, 0, 0.35);
}

#banner .banner__container .flex-caption {
  width: auto;
}

.path-frontpage #banner .block-system-branding-block {
  position: absolute;
  z-index: 5;
  top: 5%;
  right: 5%;
  width: 240px;
}

#banner .block-system-branding-block .logo img {
  height: 80px;
}

#banner .logoforbanner {
  text-align: center;
}

#banner .container-fluid .region-banner .view-content .flexslider {
  max-width: 100%;
}

/* Слайдер на главной */
.container-fluid .banner__section {
  margin: 0 10px;
}

.path-frontpage .banner {
  background-color: #d1d1d1;
}

/* ==============================================
   СТИЛИ ДЛЯ СТРАНИЦ СТАТЕЙ И НОВОСТЕЙ (ОБЩИЕ)
   ============================================== */

.page-node-type-article .banner__section #block-catalog-lite-page-title .page-title,
.page-node-type-novosti .banner__section #block-catalog-lite-page-title .page-title {
  font-size: xx-large;
  margin-bottom: 50px;
}

/* Основной контейнер */
.page-node-type-article #main-content .container,
.page-node-type-novosti #main-content .container {
  max-width: 1600px;
}

.page-node-type-article .main-content__container,
.page-node-type-novosti .main-content__container {
  position: relative;
  padding-left: 0;
  padding-right: 0;
}

/* Двухколоночная сетка */
.page-node-type-article .row,
.page-node-type-novosti .row {
  display: flex;
  flex-wrap: nowrap;
  align-items: flex-start;
  margin-left: 0;
  margin-right: 0;
}

/* Левая колонка (sidebar) */
.page-node-type-article aside.col-lg-4,
.page-node-type-novosti aside.col-lg-4 {
  order: 1;
  flex: 0 0 220px;
  max-width: 220px;
  width: 220px;
  padding-left: 0;
  padding-right: 20px;
}

/* Центральная колонка (статья/новость) */
.page-node-type-article section.col-lg-8,
.page-node-type-novosti section.col-lg-8 {
  order: 2;
  flex: 0 0 860px;
  max-width: 860px;
  width: 860px;
  padding-left: 0;
  padding-right: 0;
}

/* Стили для левого виджета */
.page-node-type-article #block-catalog-lite-vigilsidewidget,
.page-node-type-novosti #block-catalog-lite-vigilsidewidget {
  width: 220px;
  max-width: 220px;
  margin: 0 0 20px 0;
}

/* Стили для изображений в новостях */
.page-node-type-novosti section.col-lg-8 .images-container,
.page-node-type-novosti section.col-lg-8 .image-preview,
.page-node-type-novosti section.col-lg-8 .image-wrapper,
.page-node-type-novosti section.col-lg-8 .image-style-max-650x650 {
  max-width: 100%;
  width: 100%;
}

.page-node-type-novosti section.col-lg-8 .images-container img,
.page-node-type-novosti section.col-lg-8 .image-style-max-650x650 {
  display: block;
  max-width: 100%;
  width: 100%;
  height: auto;
}

/* ==============================================
   ЭЛЕМЕНТЫ ВНУТРИ СТАТЕЙ / НОВОСТЕЙ
   ============================================== */

.node__main-content-section .field--name-field-article-author,
.node__main-content-section .field--name-field-simplenews-term,
.node__main-content-section .field--name-created {
  display: inline-block;
  padding-right: 30px;
}

.node__main-content-section .field--entity-reference-target-type-taxonomy-term:before,
.node__main-content-section .field--entity-reference-target-type-taxonomy-term.field__item:before {
  content: "|";
}

/* ==============================================
   БЛОК "ПОХОЖИЕ МАТЕРИАЛЫ" (ВНИЗУ СТАТЬИ)
   ============================================== */

.view-articles-similar .views-row {
  background: transparent;
  border-radius: 8px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
  overflow: hidden;
  cursor: pointer;
  transition: transform 0.2s, box-shadow 0.2s;
}

.view-articles-similar .views-row:hover {
  transform: translateY(-4px);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.15);
}

.view-articles-similar .views-field-title {
  padding: 0 10px;
}

.view-articles-similar .views-field-field-image {
  margin-bottom: 5px;
}

/* ==============================================
   ВИДЖЕТ "ВРЕМЯ ЧТЕНИЯ / СОЦСЕТИ"
   ============================================== */

/* #block-catalog-lite-vigilsidewidget { position: absolute; right: 0; } */

/* ==============================================
   ГЛАВНАЯ СТРАНИЦА
   ============================================== */

/* Блоки новостей на главной */
.frontpage-news-sections .view-content {
  border-bottom: 3px dotted #e7e1e1;
  padding-bottom: 20px;
}

.frontpage-news-sections .frontpage-news-headers {
  display: inline-block;
  margin: 0 20px 20px 0;
  max-width: 325px;
}

.frontpage-news-sections .attachment {
  border-bottom: 2px inset grey;
}

.frontpage-news-sections .frontpage-news-headers .views-field-title a {
  background: transparent;
  padding: 20px 5px;
  white-space: nowrap;
  overflow: hidden;
  position: absolute;
  z-index: 20;
  width: 325px;
  height: 250px;
  color: white;
  font-size: 1.4em;
  text-decoration: none;
}

.frontpage-news-sections .frontpage-news-headers .views-field-title a:hover {
  background-color: rgba(0, 0, 0, 0.62);
  white-space: normal;
  font-size: x-large;
  text-decoration: none;
}

/* Дайджест новостей */
.frontpage-digest-sections .newsdigest-front {
  display: inline-block;
  max-width: 45%;
  padding: 0 10px;
  vertical-align: top;
}

.frontpage-digest-sections span {
  color: white;
  padding: 4px 8px;
  font-size: large;
  font-weight: 600;
}

.frontpage-digest-sections .uno {
  background: blue;
}

.frontpage-digest-sections .dos {
  background: red;
}

/* Двухколоночный блок на главной (Front page slideshow) */
.block-views-blockfront-page-slideshow-block-2 {
  margin: 0 40px -60px;
}

.view-front-page-slideshow .view-content {
  display: block;
  font-size: 0;
}

.view-front-page-slideshow .views-row {
  display: inline-block;
  vertical-align: top;
  width: calc(50% - 12px);
  margin: 0 24px 24px 0;
  position: relative;
  overflow: hidden;
  font-size: 16px;
}

.view-front-page-slideshow .views-row:nth-child(2n) {
  margin-right: 0;
}

.view-front-page-slideshow .overlay-container,
.view-front-page-slideshow .views-row img {
  display: block;
  width: 100%;
  max-width: 100%;
  height: auto;
}

.view-front-page-slideshow .slidetitle {
  position: absolute;
  left: 0;
  right: 0;
  top: 0;
  bottom: auto;
  width: 100%;
  max-width: 100%;
  margin: 0;
  box-sizing: border-box;
  background: rgb(0 0 0 / 64%);
  padding: 20px;
  font-size: x-large;
  font-weight: 500;
  z-index: 10;
}

.view-front-page-slideshow .slidetitle a,
.view-articles .slidetitle a {
  font-size: 18px;
  color: #fff;
  text-shadow: 0 0 3px rgba(0, 0, 0, 1);
}

/* ==============================================
   БЛОК "ФОТО АВТОРА" НА ГЛАВНОЙ
   ============================================== */

#block-catalog-lite-fotoavtoramazhgirevichnaglavnoy {
  float: right;
  width: 360px;
}

.content #miguelfoto {
  display: inline-block;
  margin-right: 30px;
  vertical-align: top;
}

.content #migueltext {
  display: inline-block;
  max-width: 700px;
  text-align: justify;
}

.content #miguelfoto img {
  border-radius: 100%;
  max-width: 300px;
}

/* ==============================================
   МЕДИА-ИКОНКИ / КНОПКИ
   ============================================== */

.mediaicon a img {
  width: 30px;
  filter: gray;
  -webkit-filter: grayscale(1);
  filter: grayscale(1);
}

.mediaicon a img:hover {
  -webkit-filter: grayscale(0);
  filter: none;
}

.mediaiconbig {
  display: flex;
  justify-content: center;
}

.mediaiconbig a {
  display: inline-block;
  font-size: x-large;
  text-transform: uppercase;
  font-weight: bold;
  margin-right: 20px;
  filter: gray;
  -webkit-filter: grayscale(1);
  filter: grayscale(1);
  width: 150px;
}

.mediaiconbig a:hover {
  -webkit-filter: grayscale(0);
  filter: none;
}

/* ==============================================
   СПЕЦИАЛЬНЫЕ ВСТАВКИ В ТЕЛО СТАТЬИ
   ============================================== */

.field--name-body .body-inject {
  position: relative;
    border-top: 1px solid #9b9b9b;
    border-bottom: 1px solid #9b9b9b;
 
    color: #000;
}


.field--name-body .body-inject .views-row .views-field-field-image {float:left; margin-right:20px;}
.field--name-body .body-inject .views-row .views-field-title {display:block;}
.field--name-body .body-inject .view-content .overlay-container {margin-top: -50px;}

/* ==============================================
   ПАРТНЁРЫ (ЛОГОТИПЫ)
   ============================================== */

#block-catalog-lite-nashipartnerykartinkiilogotipynastranicepartnerov img {
  margin: 0 10px 15px 0;
}

/* ==============================================
   НИЖНИЙ КОЛОНТИТУЛ (SUBFOTER)
   ============================================== */

#subfooter {
  background-color: #303030;
  color: white;
}

#subfooter .title,
#subfooter a {
  color: #c7c7c7;
}

/* ==============================================
   БАННЕРЫ / ИЗОБРАЖЕНИЯ ВНЕ КОНТЕНТА
   ============================================== */

.page-container .mamediabanner img,
#mishabanner img {
  width: 100%;
}

/* ==============================================
   ПРОЧИЕ ЭЛЕМЕНТЫ (QUICKTABS и т.д.)
   ============================================== */

.block-quicktabs-blockarticles .quicktabs-tabs li {
  display: inline-block;
  margin-right: 10px;
  background: #e5e5e5;
  padding: 2px 5px;
}

.block-quicktabs-blockarticles .quicktabs-tabs li[aria-selected="true"] {
  background: #939393;
}

.block-quicktabs-blockarticles .quicktabs-tabs li[aria-selected="true"] a {
  color: white;
}

/* ==============================================
   СТИЛИ ДЛЯ ТИЗЕРОВ СТАТЕЙ (VIEW-MODE TEASER)
   ============================================== */

.node--view-mode-teaser .node__title {
  font-weight: bold;
}

/* ==============================================
   УСТАРЕВШИЕ / ЗАКОММЕНТИРОВАННЫЕ БЛОКИ
   ============================================== */

/*
#block-catalog-lite-taxonomymenuarticlescategory .toolbar-button__label {
  clip: unset;
  opacity: unset;
  clip-path: unset;
  width: auto;
  height: auto;
}
#block-catalog-lite-taxonomymenuarticlescategory [class*="toolbar-button--icon"]::before {
  background-image: none;
}
[class*="toolbar-button--icon"]::before  {display: none;}
[class*="toolbar-button--icon"]::marker  {content: "\f105";}
.node--view-mode-teaser .node--type-article .images-container {
  margin-bottom: 20px;
  float: left;
  margin-right: 20px;
}
*/

/* ==============================================
   ВСЕ МЕДИАЗАПРОСЫ
   ============================================== */

/* От 600 до 767px (планшеты и маленькие устройства) */
@media (max-width: 600px) {
  .block-views-blockarticles-similar-block-similar-tags .views-row,
  .block-views-blockrelated-articles-block .views-row {
    flex-direction: column;
    align-items: flex-start;
  }
  .block-views-blockarticles-similar-block-similar-tags .views-row img,
  .block-views-blockrelated-articles-block .views-row img {
    width: 100%;
    flex: 0 0 auto;
  }
  .field--name-body .body-inject .view-content .views-field {
    display: inline;
    font-size: small;
  }
  .field--name-body .body-inject .view-content .views-field img {
    width: 100%;
  }
}

/* До 767px (мобильные) */
@media (max-width: 767px) {
  /* Шапка */
  .header-top-first #block-catalog-lite-brandingsayta .logo-and-site-name-wrapper,
  body.path-frontpage #banner .block-system-branding-block .logo-and-site-name-wrapper {
    gap: 10px;
  }
  .header-top-first #block-catalog-lite-brandingsayta .logo img,
  body.path-frontpage #banner .block-system-branding-block .logo img {
    height: 70px;
  }
  .header-top-first #block-catalog-lite-brandingsayta .site-name,
  .header-top-first #block-catalog-lite-brandingsayta .site-slogan,
  body.path-frontpage #banner .block-system-branding-block .site-name,
  body.path-frontpage #banner .block-system-branding-block .site-slogan {
    font-size: 18px;
    white-space: normal;
  }
  body.path-frontpage #banner .custom-branding .branding-side-image img {
    width: 90px;
  }

  /* Скрываем поиск и переключатель языка в мобильной версии */
  .header-second,
  .header-third {
    display: none;
  }

  /* Центрируем блок флагов под логотипом (если они видны) */
  .header-container .col-lg-1.order-md-2,
  .header-container .region-header-third {
    width: 100% !important;
    flex: 0 0 100% !important;
    max-width: 100% !important;
    justify-content: center !important;
    margin: 10px 0;
  }
  
  .slideout__section .block-language ul li {display:inline-block;}
  .slideout__section .block-language ul li:before {display:none;}
  
  
  #block-catalog-lite-pereklyuchatelyazykatekstinterfeysa {
    width: 100%;
    justify-content: center !important;
  }
  #block-catalog-lite-pereklyuchatelyazykatekstinterfeysa .content,
  #block-catalog-lite-pereklyuchatelyazykatekstinterfeysa ul.links {
    justify-content: center !important;
    width: 100%;
    margin-left: -15px;
  }

  /* Баннер */
  .path-frontpage #banner .block-system-branding-block {
    position: absolute;
    z-index: 5;
    top: 5%;
    left: 5%;
    width: 120px;
  }
  #banner .block-system-branding-block .logo img {
    height: 50px;
  }
  #banner .block-system-branding-block .site-name a {
    font-size: small;
  }
  #banner .block-system-branding-block .site-slogan {
    font-size: small;
    display: none;
  }
  .page-container .banner,
  .path-frontpage .banner {
    background-image: url(../../images/background-image-banner-mobile.jpg);
    background-position: 50%;
  }
  #banner .banner__container .flex-caption {
    width: auto;
    margin: 0;
  }
  #banner .view-front-page-slideshow .views-field-title {
    background-color: #00000054;
    padding: 5px 20px;
    position: absolute;
    bottom: 0;
    z-index: 10;
    width: 360px;
  }
  #banner .view-front-page-slideshow .flex-pauseplay {
    display: none;
  }
  #banner .container-fluid {
    padding: 0;
  }

  /* Слайдер */
  .view-front-page-slideshow .views-row {
    width: 100%;
    margin: 10px;
    box-sizing: border-box;
    display: inline-block;
  }
  .block-views-blockfront-page-slideshow-block-2 {
    margin: 0px;
  }
  .view-front-page-slideshow .slidetitle {
    background: none;
    position: relative;
    margin: 0;
    width: 100%;
    padding: 5px;
    z-index: 1;
    font-size: larger;
    font-weight: 200;
  }
  .view-frontpage .view-header h3 {
    font-size: x-large;
  }
  .frontpage-news-sections .frontpage-news-headers .views-field-title a {
    max-width: 90%;
  }

  /* Дайджест */
  .newsdigest-front {
    display: block;
    max-width: 100%;
    padding: 0 10px;
  }
  .frontpage-digest-sections .newsdigest-front {
    min-width: 90%;
    padding-right: 10px;
  }

  /* Типизеры статей */
  .node--view-mode-teaser.node--type-article .images-container {
    float: none;
  }

  /* Медиа-иконки */
  .mediaiconbig a {
    display: grid;
    place-items: center;
    align-content: space-between;
    grid-auto-flow: row;
  }

  /* Подвал */
  #subfooter .logo-and-site-name-wrapper {
    display: inline-block;
  }

  /* Блоки сайдбара (для страниц статей и новостей) */
  .page-node-type-article .row,
  .page-node-type-novosti .row {
    display: block;
  }
  .page-node-type-article aside.col-lg-4,
  .page-node-type-novosti aside.col-lg-4,
  .page-node-type-article section.col-lg-8,
  .page-node-type-novosti section.col-lg-8 {
    width: 100%;
    max-width: 100%;
    flex: none;
    padding-left: 0;
    padding-right: 0;
  }
  .page-node-type-article #block-catalog-lite-vigilsidewidget,
  .page-node-type-novosti #block-catalog-lite-vigilsidewidget {
    width: 100%;
    max-width: 100%;
  }

  .page-node-type-article .banner__section #block-catalog-lite-page-title .page-title,
  .page-node-type-novosti .banner__section #block-catalog-lite-page-title .page-title {
    font-size: x-large;
  }
}

/* От 768 до 991px (планшеты) */
@media (max-width: 991px) {
  .page-node-type-article .row,
  .page-node-type-novosti .row {
    display: block;
  }
  .page-node-type-article aside.col-lg-4,
  .page-node-type-novosti aside.col-lg-4,
  .page-node-type-article section.col-lg-8,
  .page-node-type-novosti section.col-lg-8 {
    width: 100%;
    max-width: 100%;
    flex: none;
    padding-left: 0;
    padding-right: 0;
  }
  .page-node-type-article #block-catalog-lite-vigilsidewidget,
  .page-node-type-novosti #block-catalog-lite-vigilsidewidget {
    width: 100%;
    max-width: 100%;
  }
}

/* От 1200px и выше (широкие экраны) */
@media (max-width: 1399px) {
  .page-node-type-article #block-catalog-lite-telegramfeed,
  .page-node-type-article #block-catalog-lite-kategoriyaobzora {
    position: static;
    width: 100%;
    max-width: 100%;
    margin-top: 20px;
  }
}
