/* ==========================================================
   CUSTOM.CSS — ОФОРМЛЕННЯ ВІДКРИТИХ НОВИН
   Joomla 6.2 + Helix Ultimate

   Підтримуються обидва варіанти розмітки:
   <p class="art">...</p>
   <p><span class="art">...</span></p>
   ========================================================== */

/* 01. Загальний відступ секції Helix (діє на весь сайт) */
#sp-main-body {
  padding: 20px 0 !important;
}

/* 02. Картка відкритої новини */
#sp-component .article-details:has(p.art, p span.art) {
  background: #ffffff;
  border: 1px solid #d9dee7;
  border-radius: 16px;
  box-shadow: 0 10px 24px rgba(15, 23, 42, 0.08);
  overflow: hidden;
  padding-bottom: 20px;
}

/* Темна шапка з жовтим акцентом */
#sp-component .article-details:has(p.art, p span.art) .article-header {
  background: #1e252b !important;
  border: none !important;
  border-bottom: 3px solid #e6bc45 !important;
  border-radius: 0 !important;
  padding: 18px 24px !important;
  margin-bottom: 14px !important;
  text-align: center !important;
}

/* Заголовок */
#sp-component .article-details:has(p.art, p span.art) .article-header h1 {
  color: #ffffff !important;
  font-size: 1.7rem !important;
  font-weight: 700 !important;
  line-height: 1.35 !important;
  text-transform: uppercase !important;
  text-align: center !important;
  margin: 0 !important;
}

/* Прибираємо попередній декоративний елемент */
#sp-component .article-details:has(p.art, p span.art) .article-header::after {
  content: none !important;
}

/* 03. Текст новини: art у p або span */
#sp-component .article-details p.art,
#sp-component .article-details p:has(span.art) {
  max-width: 98%;
  box-sizing: border-box;
  padding: 0 16px;
  margin: 0 auto 22px !important;

  font-size: 20px !important;
  line-height: 1.65 !important;
  color: #2d3748 !important;
  text-align: justify;
  text-indent: 25px !important;
}

/* Узгодження старих inline-стилів у span.art */
#sp-component .article-details p span.art {
  font-size: inherit !important;
  line-height: inherit !important;
  color: inherit !important;
}

/* 04. Фотогалерея SIGE */
#sp-component
  .article-details:has(p.art, p span.art)
  ul.sigFreeContainer.sigFreeClassic {
  margin-top: 32px !important;
  margin-bottom: 0 !important;
  padding-left: 20px !important;
  padding-right: 20px !important;
  box-sizing: border-box !important;
}

/* Приховуємо порожній абзац після SIGE */
#sp-component .article-details ul.sigFreeContainer.sigFreeClassic + p:empty {
  display: none !important;
  margin: 0 !important;
  padding: 0 !important;
}

/* 05. Facebook: горизонтальне відео */
#sp-component
  .article-details:has(p.art, p span.art)
  p
  > iframe[src*='facebook.com'] {
  display: block !important;
  float: none !important;
  margin: 24px auto !important;
  max-width: calc(100% - 24px) !important;
}

/* Facebook: група вертикальних відео */
#sp-component .article-details .facebook-video-group {
  display: flex;
  justify-content: center;
  align-items: flex-start;
  flex-wrap: wrap;
  gap: 8px;

  width: 100%;
  margin: 24px auto;
  padding: 0;
}

/* Зберігаємо розміри програвачів */
#sp-component .article-details .facebook-video-group > iframe {
  display: block;
  flex: 0 0 auto;
  max-width: 100%;
  margin: 0 !important;
  float: none !important;
  vertical-align: top;
}

/* 06. Планшети й телефони до 768px */
@media (max-width: 768px) {
  /* Контейнер */
  #sp-component .article-details:has(p.art, p span.art) {
    border-radius: 12px;
    box-shadow: 0 5px 15px rgba(15, 23, 42, 0.08);
    padding-bottom: 12px;
  }

  /* Темна шапка */
  #sp-component .article-details:has(p.art, p span.art) .article-header {
    padding: 14px 16px !important;
    margin-bottom: 14px !important;
  }

  /* Заголовок */
  #sp-component .article-details:has(p.art, p span.art) .article-header h1 {
    font-size: 1.3rem !important;
    line-height: 1.35 !important;
  }

  /* Текст у двох варіантах HTML */
  #sp-component .article-details p.art,
  #sp-component .article-details p:has(span.art) {
    max-width: 100%;
    padding: 0 14px;
    font-size: 17px !important;
    line-height: 1.65 !important;
    margin-bottom: 18px !important;
    text-indent: 20px !important;
  }

  /* Галерея SIGE */
  #sp-component
    .article-details:has(p.art, p span.art)
    ul.sigFreeContainer.sigFreeClassic {
    margin-top: 22px !important;
    margin-bottom: 0 !important;
    padding-left: 12px !important;
    padding-right: 12px !important;
  }

  /* Вертикальні Facebook-відео */
  #sp-component .article-details .facebook-video-group {
    flex-direction: column;
    align-items: center;
    gap: 16px;
    margin: 20px auto;
  }

  /* Горизонтальне Facebook-відео */
  #sp-component
    .article-details:has(p.art, p span.art)
    p
    > iframe[src*='facebook.com'] {
    aspect-ratio: 560 / 314;
    height: auto !important;
  }
}

/* 07. Невеликі телефони до 480px */
@media (max-width: 480px) {
  /* Шапка */
  #sp-component .article-details:has(p.art, p span.art) .article-header {
    padding: 12px 14px !important;
  }

  /* Заголовок */
  #sp-component .article-details:has(p.art, p span.art) .article-header h1 {
    font-size: 1.15rem !important;
  }

  /* Текст */
  #sp-component .article-details p.art,
  #sp-component .article-details p:has(span.art) {
    padding: 0 12px;
    font-size: 16px !important;
    line-height: 1.6 !important;
    text-indent: 18px !important;
  }
}

/* ==========================================================
   ГОЛОВНА СТОРІНКА — ЗАКРІПЛЕНІ МАТЕРІАЛИ
   Joomla 6 + Helix Ultimate
   ========================================================== */

/* 01. Контейнер модуля */
.home-pinned {
  width: 100%;
  margin: 24px 0 30px !important;
}

/* 02. Прибираємо маркери списку */
.home-pinned ul.mod-articles-items {
  list-style: none !important;
  padding: 0 !important;
  margin: 0 !important;
  width: 100%;
}

.home-pinned ul.mod-articles-items > li {
  list-style: none !important;
  padding: 0 !important;
  margin: 0 0 24px !important;
  width: 100%;
}

.home-pinned ul.mod-articles-items > li::marker {
  content: '' !important;
}

.home-pinned ul.mod-articles-items > li::before {
  content: none !important;
}

.home-pinned ul.mod-articles-items > li:last-child {
  margin-bottom: 0 !important;
}

/* 03. Картка закріпленої статті */
.home-pinned .mod-articles-item {
  display: block !important;
  width: 100% !important;
  padding: 0 !important;
  margin: 0 !important;

  background: #ffffff !important;
  border: 1px solid #d9dee7 !important;
  border-radius: 16px !important;
  box-shadow: 0 10px 24px rgba(15, 23, 42, 0.08) !important;
  overflow: hidden !important;
}

/* 04. Вміст картки */
.home-pinned .mod-articles-item-content {
  display: flex !important;
  flex-direction: column !important;
  width: 100% !important;
  padding: 0 !important;
  margin: 0 !important;
  gap: 0 !important;
}

/* Прибираємо відступи навколо афіші */
.home-pinned .mod-articles-item-content > p,
.home-pinned .mod-articles-item-content > figure,
.home-pinned .mod-articles-item-content > .item-image {
  display: block !important;
  width: 100% !important;
  max-width: none !important;
  padding: 0 !important;
  margin: 0 !important;
}

/* Посилання навколо зображення, якщо є */
.home-pinned .mod-articles-item-content > p > a,
.home-pinned .mod-articles-item-content > figure > a {
  display: block !important;
  width: 100% !important;
}

/* 05. Афіша на всю ширину */
.home-pinned .mod-articles-item-content img {
  display: block !important;
  width: 100% !important;
  max-width: 100% !important;
  height: auto !important;
  max-height: none !important;

  object-fit: contain !important;
  padding: 0 !important;
  margin: 0 !important;
  border: none !important;
  border-radius: 0 !important;
}

/* 06. Заголовок статті під афішею */
.home-pinned .mod-articles-title {
  order: 10 !important;

  display: block !important;
  width: 100% !important;
  box-sizing: border-box !important;

  background: #1e252b !important;
  border: 0 !important;
  border-bottom: 3px solid #e6bc45 !important;
  border-radius: 0 !important;

  padding: 18px 24px !important;
  margin: 0 !important;

  font-size: 1.25rem !important;
  font-weight: 700 !important;
  line-height: 1.4 !important;
  text-transform: uppercase !important;
  text-align: center !important;
}

/* Заголовок як посилання */
.home-pinned .mod-articles-title a {
  display: block !important;
  color: #ffffff !important;
  font-weight: 700 !important;
  text-decoration: none !important;
  transition: color 0.2s ease;
}

.home-pinned .mod-articles-title a:hover,
.home-pinned .mod-articles-title a:focus {
  color: #e6bc45 !important;
  text-decoration: none !important;
}

/* 07. Планшети та телефони */
@media (max-width: 768px) {
  .home-pinned {
    margin: 20px 0 26px !important;
  }

  .home-pinned .mod-articles-item {
    border-radius: 12px !important;
    box-shadow: 0 5px 15px rgba(15, 23, 42, 0.08) !important;
  }

  .home-pinned .mod-articles-title {
    padding: 14px 16px !important;
    font-size: 1.05rem !important;
    line-height: 1.4 !important;
  }
}

/* 08. Невеликі телефони */
@media (max-width: 480px) {
  .home-pinned .mod-articles-title {
    padding: 12px 14px !important;
    font-size: 0.95rem !important;
  }
}

/* Прибираємо проміжок між афішею та заголовком */

.home-pinned .mod-articles-item-content > *:not(.mod-articles-title) {
  margin-bottom: 0 !important;
  padding-bottom: 0 !important;
}

.home-pinned .mod-articles-item-content p:has(img),
.home-pinned .mod-articles-item-content figure:has(img) {
  margin: 0 !important;
  padding: 0 !important;
  line-height: 0 !important;
}

.home-pinned .mod-articles-item-content .mod-articles-title {
  margin-top: 0 !important;
}

/* Центрування заголовка закріпленої афіші по X та Y */

.home-pinned .mod-articles-title {
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;

  min-height: 76px;
  box-sizing: border-box !important;
  padding: 12px 24px !important;
}

.home-pinned .mod-articles-title a {
  display: block !important;
  margin: 0 !important;
  padding: 0 !important;
  line-height: 1.35 !important;
  text-align: center !important;
}

/* ==========================================================
   ВІДКРИТІ ЗАКРІПЛЕНІ МАТЕРІАЛИ
   Joomla 6 + Helix Ultimate
   Оформлення за зразком відкритих новин
   ========================================================== */

/* 01. Основна картка */
#sp-component .article-details:has(p.pinned-open) {
  background: #ffffff;
  border: 1px solid #d9dee7;
  border-radius: 16px;
  box-shadow: 0 10px 24px rgba(15, 23, 42, 0.08);
  overflow: hidden;
  padding-bottom: 20px;
}

/* 02. Темна шапка */
#sp-component .article-details:has(p.pinned-open) .article-header {
  background: #1e252b !important;
  border: none !important;
  border-bottom: 3px solid #e6bc45 !important;
  border-radius: 0 !important;

  padding: 18px 24px !important;
  margin-bottom: 14px !important;
  text-align: center !important;
}

/* Заголовок */
#sp-component .article-details:has(p.pinned-open) .article-header h1 {
  color: #ffffff !important;
  font-size: 1.7rem !important;
  font-weight: 700 !important;
  line-height: 1.35 !important;
  text-transform: uppercase !important;
  text-align: center !important;
  margin: 0 !important;
}

/* Прибираємо зайвий декоративний елемент */
#sp-component .article-details:has(p.pinned-open) .article-header::after {
  content: none !important;
}

/* 03. Контейнер афіші */
#sp-component .article-details p.pinned-open {
  width: 100% !important;
  max-width: 100% !important;
  box-sizing: border-box !important;

  margin: 0 !important;
  padding: 0 20px !important;

  text-align: center !important;
  text-indent: 0 !important;
  line-height: 0 !important;
}

/* Якщо афіша містить посилання */
#sp-component .article-details p.pinned-open > a {
  display: block !important;
  width: 100%;
}

/* 04. Зображення афіші */
#sp-component .article-details p.pinned-open img {
  display: block !important;

  width: 100% !important;
  max-width: 100% !important;
  height: auto !important;
  max-height: none !important;

  object-fit: contain !important;
  margin: 0 auto !important;
  padding: 0 !important;
  border: 0 !important;
  border-radius: 0 !important;
}

/* 05. Планшети та телефони */
@media (max-width: 768px) {
  #sp-component .article-details:has(p.pinned-open) {
    border-radius: 12px;
    box-shadow: 0 5px 15px rgba(15, 23, 42, 0.08);
    padding-bottom: 12px;
  }

  #sp-component .article-details:has(p.pinned-open) .article-header {
    padding: 14px 16px !important;
    margin-bottom: 14px !important;
  }

  #sp-component .article-details:has(p.pinned-open) .article-header h1 {
    font-size: 1.3rem !important;
    line-height: 1.35 !important;
  }

  #sp-component .article-details p.pinned-open {
    padding: 0 12px !important;
  }
}

/* 06. Невеликі телефони */
@media (max-width: 480px) {
  #sp-component .article-details:has(p.pinned-open) .article-header {
    padding: 12px 14px !important;
  }

  #sp-component .article-details:has(p.pinned-open) .article-header h1 {
    font-size: 1.15rem !important;
  }
}

/* Завантаження документа у закріпленій статті */

#sp-component .article-details p.pinned-download {
  text-align: center !important;
  text-indent: 0 !important;
  margin: 24px auto 10px !important;
  padding: 0 16px !important;
}

#sp-component .article-details p.pinned-download a {
  display: inline-block;
  padding: 12px 24px;
  background: #1e252b;
  color: #ffffff !important;
  border: 1px solid #1e252b;
  border-radius: 8px;
  font-size: 17px;
  font-weight: 600;
  text-decoration: none !important;
  transition: background 0.2s ease;
}

#sp-component .article-details p.pinned-download a:hover {
  background: #35434f;
  border-color: #35434f;
  color: #e6bc45 !important;
}

/* ==========================================================
   ГОЛОВНА — ШВИДКИЙ ДОСТУП
   Варіант із темною шапкою та жовтим акцентом
   ========================================================== */

/* Сітка з трьох карток */
.home-quicklinks {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 24px;
  width: 100%;
  margin: 24px 0 30px;
}

/* Картка */
.home-quicklinks .home-quicklink {
  display: flex;
  flex-direction: column;
  width: 100%;
  min-height: 180px;
  box-sizing: border-box;

  padding: 0;
  margin: 0;

  background: #ffffff;
  border: 1px solid #d9dee7;
  border-radius: 14px;
  box-shadow: 0 8px 22px rgba(15, 23, 42, 0.09);
  overflow: hidden;

  text-align: center;
  text-decoration: none !important;

  transition:
    transform 0.2s ease,
    box-shadow 0.2s ease;
}

/* Темна верхня частина */
.home-quicklinks .quicklink-title {
  display: flex;
  align-items: center;
  justify-content: center;
  flex: 1 1 auto;

  width: 100%;
  box-sizing: border-box;
  min-height: 105px;
  padding: 22px 16px;

  background: #1e252b;
  border-bottom: 3px solid #e6bc45;

  color: #ffffff !important;
  font-size: 1.25rem;
  font-weight: 700;
  line-height: 1.35;
  text-transform: uppercase;
  text-align: center;

  transition: background 0.2s ease;
}

/* Біла нижня частина */
.home-quicklinks .quicklink-description {
  display: flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;

  width: 100%;
  box-sizing: border-box;
  min-height: 75px;
  padding: 18px 16px;

  background: #ffffff;
  color: #64748b !important;

  font-size: 0.95rem;
  line-height: 1.5;
  text-align: center;
}

/* Наведення */
.home-quicklinks .home-quicklink:hover {
  transform: translateY(-5px);
  box-shadow: 0 14px 28px rgba(15, 23, 42, 0.16);
  text-decoration: none !important;
}

.home-quicklinks .home-quicklink:hover .quicklink-title {
  background: #303d49;
}

/* Навігація клавіатурою */
.home-quicklinks .home-quicklink:focus-visible {
  outline: 3px solid #e6bc45;
  outline-offset: 4px;
}

/* Планшети */
@media (max-width: 991px) {
  .home-quicklinks {
    gap: 14px;
  }

  .home-quicklinks .quicklink-title {
    min-height: 95px;
    padding: 18px 12px;
    font-size: 1.05rem;
  }

  .home-quicklinks .quicklink-description {
    padding: 14px 10px;
    font-size: 0.85rem;
  }
}

/* Телефони */
@media (max-width: 768px) {
  .home-quicklinks {
    grid-template-columns: 1fr;
    gap: 12px;
    margin: 20px 0 24px;
  }

  .home-quicklinks .home-quicklink {
    min-height: 105px;
    flex-direction: row;
    border-radius: 12px;
  }

  .home-quicklinks .quicklink-title {
    flex: 0 0 43%;
    min-height: 105px;
    border-bottom: 0;
    border-right: 3px solid #e6bc45;
    padding: 16px 12px;
    font-size: 1rem;
  }

  .home-quicklinks .quicklink-description {
    flex: 1 1 auto;
    width: auto;
    min-width: 0;
    min-height: 105px;
    padding: 16px 12px;
    font-size: 0.9rem;
  }
}

/* Невеликі телефони */
@media (max-width: 480px) {
  .home-quicklinks .quicklink-title {
    font-size: 0.92rem;
  }

  .home-quicklinks .quicklink-description {
    font-size: 0.85rem;
  }
}

/* Зменшення анімацій за налаштуваннями ОС */
@media (prefers-reduced-motion: reduce) {
  .home-quicklinks .home-quicklink,
  .home-quicklinks .quicklink-title {
    transition: none;
  }

  .home-quicklinks .home-quicklink:hover {
    transform: none;
  }
}

/* ==========================================================
   ГОЛОВНА — КНОПКА «УСІ НОВИНИ»
   ========================================================== */

.home-news-more {
  display: flex;
  justify-content: center;
  margin: 28px 0 36px;
}

.home-news-more a {
  display: inline-block;
  padding: 13px 36px;

  background: #1e252b;
  color: #ffffff !important;

  border: 1px solid #1e252b;
  border-bottom: 3px solid #e6bc45;
  border-radius: 10px;

  font-size: 16px;
  font-weight: 700;
  text-transform: uppercase;
  text-decoration: none !important;

  transition: background 0.2s ease;
}

.home-news-more a:hover {
  background: #35434f;
  color: #e6bc45 !important;
}

.home-news-more a:focus-visible {
  outline: 3px solid #e6bc45;
  outline-offset: 3px;
}

@media (max-width: 768px) {
  .home-news-more {
    margin: 22px 0 28px;
  }

  .home-news-more a {
    padding: 12px 28px;
    font-size: 14px;
  }
}

/* ==========================================================
   АРХІВ НОВИН — СТАБІЛЬНА ВИСОТА КАРТОК
   Лише сторінка "Усі новини" (Itemid 190)
   ========================================================== */

@media (min-width: 769px) {
  body.itemid-190 #sp-component .blog .article {
    height: 363px !important;
    min-height: 363px !important;
    max-height: 363px !important;
  }
}

/* Закріплені матеріали — тільки на головній сторінці */

body:not(.view-featured) .home-pinned {
  display: none !important;
}

/* ==========================================================
   ХОДОРІВСЬКІ НОВИНИ — ОДНАКОВА ШИРИНА КОЛОНОК
   Не зачіпає головну та архів Itemid 190
   ========================================================== */

@media (min-width: 992px) {
  body.view-category:not(.itemid-190)
    #sp-component
    .blog
    .blog-items
    > .col-lg-4 {
    flex: 0 0 calc((100% - 40px) / 3) !important;
    width: calc((100% - 40px) / 3) !important;
    max-width: calc((100% - 40px) / 3) !important;
    min-width: 0 !important;
  }

  body.view-category:not(.itemid-190)
    #sp-component
    .blog
    .blog-items
    > .col-lg-4
    > .article {
    width: 100% !important;
    max-width: 100% !important;
    min-width: 0 !important;
  }
}

/* ==========================================================
   МЕНЮ «ПРО КОЛЕДЖ» — ДВІ КОЛОНКИ
   Joomla 6 + Helix Ultimate
   Лише комп'ютерна версія
   ========================================================== */

@media (min-width: 992px) {
  /* Ширина випадаючого меню */
  .sp-megamenu-parent > li:nth-child(2) > .sp-dropdown {
    width: 660px !important;
    max-width: calc(100vw - 30px) !important;
  }

  /* Загальний контейнер */
  .sp-megamenu-parent > li:nth-child(2) > .sp-dropdown > .sp-dropdown-inner {
    padding: 16px !important;
    background: #ffffff !important;
    border: 1px solid #d9dee7;
    border-radius: 0 0 12px 12px;
    box-shadow: 0 12px 30px rgba(15, 23, 42, 0.15);

    max-height: calc(100vh - 95px);
    overflow-y: auto;
    overflow-x: hidden;
  }

  /* Розміщення пунктів у дві колонки */
  .sp-megamenu-parent
    > li:nth-child(2)
    > .sp-dropdown
    > .sp-dropdown-inner
    > ul {
    display: grid !important;
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    gap: 4px 12px !important;

    width: 100% !important;
    margin: 0 !important;
    padding: 0 !important;
    list-style: none !important;
  }

  /* Окремий пункт меню */
  .sp-megamenu-parent
    > li:nth-child(2)
    > .sp-dropdown
    > .sp-dropdown-inner
    > ul
    > li {
    width: 100% !important;
    min-width: 0 !important;
    float: none !important;
    margin: 0 !important;
    padding: 0 !important;
  }

  /* Посилання */
  .sp-megamenu-parent
    > li:nth-child(2)
    > .sp-dropdown
    > .sp-dropdown-inner
    > ul
    > li
    > a {
    display: flex !important;
    align-items: center !important;

    width: 100% !important;
    min-height: 44px;
    box-sizing: border-box;

    padding: 10px 12px !important;
    margin: 0 !important;

    color: #1e252b !important;
    background: transparent !important;
    border-left: 3px solid transparent;
    border-radius: 6px;

    font-size: 14px !important;
    line-height: 1.4 !important;
    font-weight: 500 !important;
    text-transform: none !important;
    white-space: normal !important;

    transition:
      background 0.2s ease,
      border-color 0.2s ease;
  }

  /* Наведення курсора */
  .sp-megamenu-parent
    > li:nth-child(2)
    > .sp-dropdown
    > .sp-dropdown-inner
    > ul
    > li
    > a:hover,
  .sp-megamenu-parent
    > li:nth-child(2)
    > .sp-dropdown
    > .sp-dropdown-inner
    > ul
    > li
    > a:focus-visible {
    background: #f1f5f9 !important;
    color: #24456f !important;
    border-left-color: #e6bc45;
  }
}

/* МЕНЮ «ПРО КОЛЕДЖ» — ПОРЯДОК ЗВЕРХУ ВНИЗ */

@media (min-width: 992px) {
  .sp-megamenu-parent
    > li:nth-child(2)
    > .sp-dropdown
    > .sp-dropdown-inner
    > ul {
    grid-auto-flow: column !important;
    grid-template-rows: repeat(10, auto) !important;
  }
}

/* ==========================================================
   АДАПТИВНЕ МЕНЮ HELIX ULTIMATE
   Перехід на Offcanvas при ширині 992–1199px
   ========================================================== */

/* ==========================================================
   HELIX ULTIMATE — АДАПТИВНА ШАПКА
   Компактне меню при ширині 992–1599px
   ========================================================== */

@media (min-width: 992px) and (max-width: 1599.98px) {
  /* Приховуємо горизонтальне меню */
  #sp-header .sp-megamenu-parent,
  #sp-menu .sp-megamenu-parent {
    display: none !important;
  }

  /* Залишаємо доступним Offcanvas */
  #sp-header #offcanvas-toggler,
  #sp-header #offcanvas-toggler.offcanvas,
  #sp-header #offcanvas-toggler.mega {
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
  }
}

/* ==========================================================
   HELIX — КОМПАКТНИЙ ПОШУК
   992–1599px: лупа замість поля.
   При натисканні поле розгортається поверх шапки.
   Без JavaScript.
   ========================================================== */

@media (min-width: 992px) and (max-width: 1599.98px) {
  /* Зменшуємо місце, яке займає пошук */
  #sp-header .mod-finder {
    position: relative !important;
    width: 42px !important;
    max-width: 42px !important;
    min-width: 42px !important;
    flex: 0 0 42px !important;
    z-index: 20;
  }

  /* Обгортки Joomla Smart Search */
  #sp-header .mod-finder form,
  #sp-header .mod-finder .mod-finder__search,
  #sp-header .mod-finder .awesomplete {
    width: 42px !important;
    max-width: 42px !important;
    min-width: 42px !important;
  }

  #sp-header .mod-finder .awesomplete {
    position: relative !important;
    overflow: visible !important;
  }

  /* Згорнуте поле */
  #sp-header .mod-finder input[name='q'] {
    width: 42px !important;
    max-width: none !important;
    height: 40px !important;
    padding: 0 !important;
    font-size: 0 !important;
    color: transparent !important;
    caret-color: transparent !important;
    cursor: pointer !important;
    background: #ffffff !important;
  }

  #sp-header .mod-finder input[name='q']::placeholder {
    color: transparent !important;
  }

  /* Малюємо лупу */
  #sp-header .mod-finder .awesomplete::before {
    content: '';
    position: absolute;
    top: 10px;
    left: 11px;
    width: 14px;
    height: 14px;
    border: 2px solid #64748b;
    border-radius: 50%;
    pointer-events: none;
    z-index: 2;
  }

  #sp-header .mod-finder .awesomplete::after {
    content: '';
    position: absolute;
    top: 25px;
    left: 25px;
    width: 8px;
    height: 2px;
    background: #64748b;
    transform: rotate(45deg);
    transform-origin: left center;
    pointer-events: none;
    z-index: 2;
  }

  /* При відкритті лупа зникає */
  #sp-header .mod-finder .awesomplete:focus-within::before,
  #sp-header .mod-finder .awesomplete:focus-within::after {
    display: none;
  }

  /* Розгорнуте поле пошуку */
  #sp-header .mod-finder input[name='q']:focus {
    position: absolute !important;
    top: 0 !important;
    right: 0 !important;
    width: 245px !important;
    max-width: min(245px, calc(100vw - 30px)) !important;
    height: 40px !important;
    padding: 0 14px !important;

    font-size: 14px !important;
    color: #1e252b !important;
    caret-color: auto !important;
    cursor: text !important;

    background: #ffffff !important;
    border-color: #e6bc45 !important;
    box-shadow: 0 4px 16px rgba(15, 23, 42, 0.15);
    z-index: 30;
  }

  #sp-header .mod-finder input[name='q']:focus::placeholder {
    color: #7b8794 !important;
  }

  /* Підказки Smart Search під розгорнутим полем */
  #sp-header .mod-finder .awesomplete:focus-within > ul {
    width: 245px !important;
    max-width: calc(100vw - 30px) !important;
    left: auto !important;
    right: 0 !important;
    z-index: 40;
  }
}

/* ==========================================================
   HELIX — ВИПРАВЛЕННЯ ЗМІЩЕННЯ ПОШУКУ
   ========================================================== */

@media (min-width: 992px) and (max-width: 1599.98px) {
  /* Контейнери завжди зберігають висоту */
  #sp-header .mod-finder,
  #sp-header .mod-finder form,
  #sp-header .mod-finder .mod-finder__search,
  #sp-header .mod-finder .awesomplete {
    height: 40px !important;
    min-height: 40px !important;
  }

  /* Фіксуємо точку прив'язки пошуку */
  #sp-header .mod-finder .awesomplete {
    position: relative !important;
    overflow: visible !important;
  }

  /* Поле має абсолютне позиціонування
     і в згорнутому, і в розгорнутому стані */
  #sp-header .mod-finder input[name='q'] {
    position: absolute !important;
    top: 0 !important;
    right: 0 !important;
    left: auto !important;

    width: 42px !important;
    height: 40px !important;
    margin: 0 !important;
    box-sizing: border-box !important;
  }

  /* При натисканні розгортаємо вліво,
     не змінюючи точку прив'язки */
  #sp-header .mod-finder input[name='q']:focus {
    position: absolute !important;
    top: 0 !important;
    right: 0 !important;
    left: auto !important;

    width: 145px !important;
    height: 40px !important;
    margin: 0 !important;
    z-index: 30 !important;
  }
}

/* ==========================================================
   HELIX — ГОРИЗОНТАЛЬНЕ МЕНЮ НА НОУТБУКАХ
   1360–1599px
   ========================================================== */

@media (min-width: 1300px) and (max-width: 1599.98px) {
  /* Повертаємо горизонтальне меню */
  #sp-header #sp-menu .sp-megamenu-parent,
  #sp-header .sp-megamenu-parent {
    display: flex !important;
    flex-wrap: nowrap !important;
    align-items: center !important;
  }

  /* Трохи зменшуємо відступи пунктів */
  #sp-header .sp-megamenu-parent > li > a,
  #sp-header .sp-megamenu-parent > li > span {
    padding-left: 9px !important;
    padding-right: 9px !important;
    font-size: 14px !important;
    white-space: nowrap !important;
  }

  /* Прибираємо дублюючий гамбургер */
  #sp-header #offcanvas-toggler {
    display: none !important;
  }
}

/* Зближення пошуку із соціальними мережами */

@media (min-width: 992px) and (max-width: 1599.98px) {
  #sp-header .mod-finder {
    transform: translateX(24px);
  }
}

/* ==========================================================
   HELIX — МОБІЛЬНА ШАПКА
   Пошук → Соцмережі → Гамбургер
   ========================================================== */

@media (max-width: 991.98px) {
  /* Спільний контейнер елементів шапки */
  #sp-header #sp-menu > .sp-column {
    display: flex !important;
    align-items: center !important;
    flex-wrap: nowrap !important;
    justify-content: flex-end !important;
    gap: 8px;
  }

  /* Блок меню Helix */
  #sp-header #sp-menu > .sp-column > .menu-wrap {
    order: 0 !important;
    flex: 1 1 auto !important;
    min-width: 0 !important;
  }

  /* 1. ПОШУК */
  #sp-header #sp-menu > .sp-column > .header-modules {
    order: 1 !important;
    display: flex !important;
    align-items: center !important;
    flex: 0 0 42px !important;
    width: 42px !important;
    min-width: 42px !important;
    margin: 0 !important;
    padding: 0 !important;
    position: relative !important;
    z-index: 30;
  }

  /* 2. СОЦІАЛЬНІ МЕРЕЖІ */
  #sp-header #sp-menu > .sp-column > .social-wrap {
    order: 2 !important;
    display: flex !important;
    align-items: center !important;
    flex: 0 0 auto !important;
    margin: 0 !important;
  }

  /* 3. ГАМБУРГЕР */
  #sp-header #sp-menu > .sp-column > #offcanvas-toggler {
    order: 3 !important;
    flex: 0 0 auto !important;
    margin: 0 !important;
  }

  /* Компактний пошук */
  #sp-header .mod-finder,
  #sp-header .mod-finder form,
  #sp-header .mod-finder .mod-finder__search,
  #sp-header .mod-finder .awesomplete {
    width: 42px !important;
    max-width: 42px !important;
    min-width: 42px !important;
    height: 40px !important;
    margin: 0 !important;
    padding: 0 !important;
  }

  #sp-header .mod-finder .awesomplete {
    position: relative !important;
    overflow: visible !important;
  }

  /* Згорнуте поле */
  #sp-header .mod-finder input[name='q'] {
    position: absolute !important;
    top: 0 !important;
    right: 0 !important;
    left: auto !important;
    width: 42px !important;
    height: 40px !important;
    padding: 0 !important;
    margin: 0 !important;
    box-sizing: border-box !important;

    background: #ffffff !important;
    font-size: 0 !important;
    color: transparent !important;
    caret-color: transparent !important;
    cursor: pointer !important;
  }

  #sp-header .mod-finder input[name='q']::placeholder {
    color: transparent !important;
  }

  /* Іконка лупи */
  #sp-header .mod-finder .awesomplete::before {
    content: '';
    position: absolute;
    top: 10px;
    left: 11px;
    width: 14px;
    height: 14px;
    border: 2px solid #64748b;
    border-radius: 50%;
    pointer-events: none;
    z-index: 2;
  }

  #sp-header .mod-finder .awesomplete::after {
    content: '';
    position: absolute;
    top: 25px;
    left: 25px;
    width: 8px;
    height: 2px;
    background: #64748b;
    transform: rotate(45deg);
    transform-origin: left center;
    pointer-events: none;
    z-index: 2;
  }

  /* При натисканні лупа зникає */
  #sp-header .mod-finder .awesomplete:focus-within::before,
  #sp-header .mod-finder .awesomplete:focus-within::after {
    display: none;
  }

  /* Розгортання пошуку вліво */
  #sp-header .mod-finder input[name='q']:focus {
    width: min(245px, calc(100vw - 95px)) !important;
    max-width: none !important;
    padding: 0 14px !important;
    font-size: 14px !important;
    color: #1e252b !important;
    caret-color: auto !important;
    cursor: text !important;
    background: #ffffff !important;
    border-color: #e6bc45 !important;
    box-shadow: 0 4px 16px rgba(15, 23, 42, 0.15);
    z-index: 35 !important;
  }

  #sp-header .mod-finder input[name='q']:focus::placeholder {
    color: #7b8794 !important;
  }

  /* Підказки пошуку */
  #sp-header .mod-finder .awesomplete:focus-within > ul {
    width: min(245px, calc(100vw - 95px)) !important;
    left: auto !important;
    right: 0 !important;
    z-index: 40 !important;
  }
}

/* Компактні проміжки для вузьких телефонів */
@media (max-width: 400px) {
  #sp-header #sp-menu > .sp-column {
    gap: 4px !important;
  }

  #sp-header #sp-menu .social-wrap a {
    margin-left: 2px !important;
    margin-right: 2px !important;
  }
}

/* ==========================================================
   HELIX — ДУЖЕ ВУЗЬКІ ЕКРАНИ (МЕНШЕ 300px)
   Тільки логотип і меню-гамбургер
   ========================================================== */

@media (max-width: 299.98px) {
  /* Приховуємо пошук */
  #sp-header .header-modules,
  #sp-header .mod-finder {
    display: none !important;
  }

  /* Приховуємо соціальні мережі */
  #sp-header .social-wrap {
    display: none !important;
  }

  /* Логотип залишається видимим */
  #sp-header #sp-logo {
    display: block !important;
  }

  /* Гамбургер залишається доступним */
  #sp-header #offcanvas-toggler {
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
  }
}

/* ==========================================================
   HELIX — ПРИХОВУВАННЯ СОЦМЕРЕЖ ДО 300px
   Залишаємо тільки логотип і гамбургер
   ========================================================== */

@media (max-width: 299.98px) {
  /* Можливі контейнери соціальних мереж Helix */
  #sp-header .social-wrap,
  #sp-header .social-icons,
  #sp-header .sp-social-icons,
  #sp-header .social-links,
  #sp-header .header-social {
    display: none !important;
  }

  /* Додатково приховуємо самі соціальні посилання */
  #sp-header a[href*='facebook.com'],
  #sp-header a[href*='instagram.com'],
  #sp-header a[href*='youtube.com'],
  #sp-header a[href*='youtu.be'] {
    display: none !important;
  }
}

/* ==========================================================
   HELIX — ВИПАДАЮЧЕ МЕНЮ «СПЕЦІАЛЬНОСТІ»
   Одна колонка, оформлення як у «Про коледж»
   ========================================================== */

@media (min-width: 992px) {
  /* Ширина випадаючого списку */
  .sp-megamenu-parent > li:nth-child(3) > .sp-dropdown {
    width: 350px !important;
    max-width: calc(100vw - 30px) !important;
  }

  /* Білий контейнер */
  .sp-megamenu-parent > li:nth-child(3) > .sp-dropdown > .sp-dropdown-inner {
    padding: 12px !important;
    background: #ffffff !important;
    border: 1px solid #d9dee7 !important;
    border-radius: 0 0 12px 12px !important;
    box-shadow: 0 12px 30px rgba(15, 23, 42, 0.15) !important;
    overflow: hidden;
  }

  /* Список — одна колонка */
  .sp-megamenu-parent
    > li:nth-child(3)
    > .sp-dropdown
    > .sp-dropdown-inner
    > ul {
    display: flex !important;
    flex-direction: column !important;
    gap: 4px !important;
    margin: 0 !important;
    padding: 0 !important;
    width: 100% !important;
    list-style: none !important;
  }

  /* Пункти списку */
  .sp-megamenu-parent
    > li:nth-child(3)
    > .sp-dropdown
    > .sp-dropdown-inner
    > ul
    > li {
    width: 100% !important;
    margin: 0 !important;
    padding: 0 !important;
    float: none !important;
  }

  /* Посилання */
  .sp-megamenu-parent
    > li:nth-child(3)
    > .sp-dropdown
    > .sp-dropdown-inner
    > ul
    > li
    > a {
    display: flex !important;
    align-items: center !important;
    width: 100% !important;
    min-height: 44px;
    box-sizing: border-box !important;

    margin: 0 !important;
    padding: 10px 12px !important;

    color: #1e252b !important;
    background: transparent !important;
    border-left: 3px solid transparent;
    border-radius: 6px;

    font-size: 14px !important;
    font-weight: 500 !important;
    line-height: 1.4 !important;
    text-transform: none !important;
    white-space: normal !important;

    transition:
      background 0.2s ease,
      border-color 0.2s ease;
  }

  /* Наведення та фокус */
  .sp-megamenu-parent
    > li:nth-child(3)
    > .sp-dropdown
    > .sp-dropdown-inner
    > ul
    > li
    > a:hover,
  .sp-megamenu-parent
    > li:nth-child(3)
    > .sp-dropdown
    > .sp-dropdown-inner
    > ul
    > li
    > a:focus-visible {
    background: #f1f5f9 !important;
    color: #24456f !important;
    border-left-color: #e6bc45 !important;
  }
}

/* ==========================================================
   HELIX — МИТТЄВЕ ВІДКРИТТЯ ВИПАДАЮЧИХ МЕНЮ
   Без анімації появи
   ========================================================== */

.sp-megamenu-parent > li.sp-has-child > .sp-dropdown,
.sp-megamenu-parent > li.sp-has-child:hover > .sp-dropdown {
  animation: none !important;
  transition: none !important;
}

/* ==========================================================
   СТОРІНКА «ПРО КОЛЕДЖ» — СПИСОК ПОСИЛАНЬ
   Joomla 6.2 + Helix Ultimate
   Одна колонка, без зміни HTML матеріалу
   ========================================================== */

/* Визначаємо саме сторінку з переліком розділів.
   Посилання на історію коледжу — її ознака. */

/* 01. Прибираємо старі горизонтальні лінії */
#sp-component
  .com-content-article__body:has(> p a[href*='istoriia-koledzhu'])
  > hr {
  display: none !important;
}

/* 02. Кожен пункт — окремий рядок */
#sp-component
  .com-content-article__body:has(> p a[href*='istoriia-koledzhu'])
  > p:has(a[href]) {
  display: flex !important;
  align-items: center !important;

  width: 100% !important;
  min-height: 58px;
  box-sizing: border-box !important;

  margin: 0 0 10px !important;
  padding: 0 !important;

  background: #ffffff !important;
  border: 1px solid #d9dee7 !important;
  border-left: 4px solid #e6bc45 !important;
  border-radius: 8px !important;

  text-align: left !important;
  text-indent: 0 !important;

  transition:
    background 0.2s ease,
    box-shadow 0.2s ease;
}

/* 03. Прибираємо застаріле форматування span */
#sp-component
  .com-content-article__body:has(> p a[href*='istoriia-koledzhu'])
  > p:has(a[href])
  span {
  display: block !important;
  width: 100% !important;
  box-sizing: border-box !important;

  font-family: inherit !important;
  font-size: 16px !important;
  line-height: 1.45 !important;
  text-align: left !important;
}

/* 04. Оформлення посилань */
#sp-component
  .com-content-article__body:has(> p a[href*='istoriia-koledzhu'])
  > p:has(a[href])
  a {
  display: flex !important;
  align-items: center !important;

  width: 100% !important;
  min-height: 58px;
  box-sizing: border-box !important;
  padding: 14px 20px !important;

  color: #1e252b !important;
  font-family: inherit !important;
  font-size: 16px !important;
  font-weight: 500 !important;
  line-height: 1.45 !important;
  text-decoration: none !important;
  text-transform: none !important;
}

/* 05. Ефект наведення */
#sp-component
  .com-content-article__body:has(> p a[href*='istoriia-koledzhu'])
  > p:has(a[href]):hover {
  background: #f1f5f9 !important;
  box-shadow: 0 3px 10px rgba(15, 23, 42, 0.07);
}

#sp-component
  .com-content-article__body:has(> p a[href*='istoriia-koledzhu'])
  > p:has(a[href]):hover
  a {
  color: #24456f !important;
}

/* 06. Навігація клавіатурою */
#sp-component
  .com-content-article__body:has(> p a[href*='istoriia-koledzhu'])
  > p:has(a[href]):focus-within {
  outline: 2px solid #e6bc45;
  outline-offset: 2px;
}

/* 07. Мобільна адаптація */
@media (max-width: 768px) {
  #sp-component
    .com-content-article__body:has(> p a[href*='istoriia-koledzhu'])
    > p:has(a[href]) {
    min-height: 50px;
    margin-bottom: 8px !important;
    border-radius: 6px !important;
  }

  #sp-component
    .com-content-article__body:has(> p a[href*='istoriia-koledzhu'])
    > p:has(a[href])
    a {
    min-height: 50px;
    padding: 12px 14px !important;
    font-size: 15px !important;
  }
}

/* ==========================================================
   ПРО КОЛЕДЖ — ДОДАТКОВЕ ОФОРМЛЕННЯ
   Відступи, акцент при наведенні та підзаголовок
   ========================================================== */

/* 01. Відступи карток зліва та справа */
#sp-component
  .com-content-article__body:has(> p a[href*='istoriia-koledzhu'])
  > p:has(a[href]) {
  width: calc(100% - 60px) !important;
  margin: 0 30px 10px !important;
  box-sizing: border-box !important;

  transition:
    background 0.2s ease,
    box-shadow 0.2s ease,
    border-left-color 0.2s ease !important;
}

/* 02. Жовта смуга стає синьою при наведенні */
#sp-component
  .com-content-article__body:has(> p a[href*='istoriia-koledzhu'])
  > p:has(a[href]):hover,
#sp-component
  .com-content-article__body:has(> p a[href*='istoriia-koledzhu'])
  > p:has(a[href]):focus-within {
  border-left-color: #24456f !important;
}

/* 03. Підзаголовок "Доступ до публічної інформації" */
#sp-component
  .com-content-article__body:has(> p a[href*='istoriia-koledzhu'])
  > p.art:first-child {
  display: block !important;
  width: 100% !important;
  max-width: 100% !important;

  margin: 20px 0 28px !important;
  padding: 0 20px !important;
  box-sizing: border-box !important;

  text-align: center !important;
  text-indent: 0 !important;

  font-size: 24px !important;
  font-weight: 600 !important;
  line-height: 1.4 !important;
  color: #1e252b !important;
}

/* 04. Мобільна версія */
@media (max-width: 768px) {
  /* Менші бокові відступи */
  #sp-component
    .com-content-article__body:has(> p a[href*='istoriia-koledzhu'])
    > p:has(a[href]) {
    width: calc(100% - 24px) !important;
    margin: 0 12px 8px !important;
  }

  /* Компактніший підзаголовок */
  #sp-component
    .com-content-article__body:has(> p a[href*='istoriia-koledzhu'])
    > p.art:first-child {
    font-size: 20px !important;
    margin: 16px 0 22px !important;
    padding: 0 12px !important;
  }
}

/* ==========================================================
   УНІВЕРСАЛЬНІ БЛОКИ ПОСИЛАНЬ
   Для сторінок коледжу
   ========================================================== */

/* 1. Контейнер блоку */
#sp-component .college-link-section {
  width: 100%;
  max-width: 100%;
  margin: 0 auto 30px !important;
  padding: 0 45px !important;
  box-sizing: border-box;
}

/* 2. Заголовок над посиланнями */
#sp-component .college-link-section .college-link-heading {
  margin: 20px 0 28px !important;
  padding: 0 !important;

  font-family: inherit !important;
  font-size: 24px !important;
  font-weight: 600 !important;
  line-height: 1.4 !important;

  color: #1e252b !important;
  text-align: center !important;
  text-indent: 0 !important;
}

/* 3. Список в одну колонку */
#sp-component .college-link-list {
  display: grid !important;
  grid-template-columns: minmax(0, 1fr) !important;
  gap: 10px !important;

  margin: 0 !important;
  padding: 0 !important;
}

/* 4. Оформлення карток */
#sp-component .college-link-list > a {
  display: flex !important;
  align-items: center !important;

  width: 100% !important;
  min-height: 58px;
  padding: 14px 20px !important;
  box-sizing: border-box !important;

  background: #ffffff !important;
  border: 1px solid #d9dee7 !important;
  border-left: 4px solid #e6bc45 !important;
  border-radius: 8px !important;

  color: #1e252b !important;
  font-family: inherit !important;
  font-size: 16px !important;
  font-weight: 500 !important;
  line-height: 1.45 !important;
  text-align: left !important;
  text-decoration: none !important;
  text-transform: none !important;

  transition:
    background-color 0.2s ease,
    border-left-color 0.2s ease,
    box-shadow 0.2s ease;
}

/* 5. Наведення */
#sp-component .college-link-list > a:hover {
  background: #f1f5f9 !important;
  border-left-color: #24456f !important;
  color: #24456f !important;

  box-shadow: 0 3px 10px rgba(15, 23, 42, 0.07);
}

/* 6. Навігація клавіатурою */
#sp-component .college-link-list > a:focus-visible {
  border-left-color: #24456f !important;
  outline: 2px solid #24456f;
  outline-offset: 2px;
}

/* 7. Мобільна адаптація */
@media (max-width: 768px) {
  #sp-component .college-link-section {
    padding: 0 12px !important;
  }

  #sp-component .college-link-section .college-link-heading {
    font-size: 20px !important;
    margin: 16px 0 22px !important;
  }

  #sp-component .college-link-list {
    gap: 8px !important;
  }

  #sp-component .college-link-list > a {
    min-height: 50px;
    padding: 12px 14px !important;
    font-size: 15px !important;
    border-radius: 6px !important;
  }
}

/* ==========================================================
   ЗАГОЛОВКИ СТОРІНОК ІЗ БЛОКАМИ ПОСИЛАНЬ
   ========================================================== */

#sp-component:has(.college-link-section, .college-page-content)
  h1[itemprop='headline'] {
  display: block !important;
  width: 100% !important;
  box-sizing: border-box !important;

  margin: 20px 0 26px !important;
  padding: 20px 25px !important;

  background: #1e252b !important;
  color: #ffffff !important;

  border-bottom: 3px solid #e6bc45 !important;
  border-radius: 12px 12px 0 0 !important;

  font-size: 28px !important;
  font-weight: 700 !important;
  line-height: 1.3 !important;
  text-align: center !important;
  text-transform: uppercase !important;
}

/* ==========================================================
   УНІВЕРСАЛЬНИЙ КОНТЕЙНЕР СТОРІНОК ІЗ ПОСИЛАННЯМИ
   Рамка, тінь, заокруглення
   ========================================================== */

/* Контейнер заголовка та вмісту */
#sp-component
  .article-details:has(.college-link-section, .college-page-content) {
  background: #ffffff !important;

  border: 1px solid #d9dee7 !important;
  border-radius: 12px !important;

  box-shadow: 0 6px 24px rgba(15, 23, 42, 0.1) !important;

  overflow: hidden !important;
  padding-bottom: 30px !important;
}

/* Заголовок прилягає до верхнього краю контейнера */
#sp-component
  .article-details:has(.college-link-section, .college-page-content)
  h1[itemprop='headline'] {
  margin: 0 0 26px !important;
  border-radius: 0 !important;
}

/* ==========================================================
   УНІВЕРСАЛЬНИЙ ВМІСТ СТОРІНОК
   Галереї, текст, зображення, таблиці
   ========================================================== */

#sp-component .college-page-content {
  padding: 0 45px !important;
  box-sizing: border-box;
  display: flow-root;
}

/* Мобільна версія */
@media (max-width: 768px) {
  #sp-component .college-page-content {
    padding: 0 12px !important;
  }
}

/* ==========================================================
   УНІВЕРСАЛЬНА ГРУПА ПОСИЛАНЬ В ОДНІЙ КАРТЦІ
   ========================================================== */

/* Загальна картка */
#sp-component .college-link-list > .college-link-group {
  background: #ffffff;
  border: 1px solid #d9dee7;
  border-left: 4px solid #e6bc45;
  border-radius: 8px;
  overflow: hidden;

  transition: border-left-color 0.2s ease;
}

/* Окремі посилання всередині картки */
#sp-component .college-link-group > a {
  display: block;
  padding: 14px 20px;

  color: #1e252b !important;
  font-family: inherit !important;
  font-size: 16px !important;
  font-weight: 500;
  line-height: 1.45;
  text-decoration: none !important;

  border-bottom: 1px solid #e6e9ef;
  transition: background 0.2s ease;
}

/* Без нижньої лінії в останнього посилання */
#sp-component .college-link-group > a:last-child {
  border-bottom: none;
}

/* Наведення на окреме посилання */
#sp-component .college-link-group > a:hover,
#sp-component .college-link-group > a:focus-visible {
  background: #f1f5f9;
  color: #24456f !important;
}

/* Жовта смуга стає синьою */
#sp-component .college-link-group:hover,
#sp-component .college-link-group:focus-within {
  border-left-color: #24456f;
}

/* Адаптивність */
@media (max-width: 768px) {
  #sp-component .college-link-group > a {
    padding: 12px 14px;
    font-size: 15px !important;
  }
}

/* ==========================================================
   УНІВЕРСАЛЬНА ТИПОГРАФІКА МАТЕРІАЛІВ КОЛЕДЖУ
   Текст, підзаголовки, списки
   ========================================================== */

/* Основний текст */
#sp-component .college-prose p {
  margin: 0 0 20px !important;

  font-family: inherit !important;
  font-size: 18px !important;
  font-weight: 400 !important;
  line-height: 1.7 !important;

  color: #293442 !important;
  text-align: justify !important;
  text-indent: 24px !important;
}

/* Останній абзац */
#sp-component .college-prose p:last-child {
  margin-bottom: 0 !important;
}

/* Підзаголовки */
#sp-component .college-prose h2 {
  margin: 30px 0 20px !important;

  font-size: 24px !important;
  font-weight: 600 !important;
  line-height: 1.4 !important;

  color: #1e252b !important;
  text-align: center !important;
}

/* Заголовки третього рівня */
#sp-component .college-prose h3 {
  margin: 24px 0 16px !important;

  font-size: 20px !important;
  font-weight: 600 !important;

  color: #24456f !important;
}

/* Звичайні списки */
#sp-component .college-prose ul,
#sp-component .college-prose ol {
  margin: 0 0 20px !important;
  padding-left: 28px !important;

  font-size: 18px !important;
  line-height: 1.7 !important;
  color: #293442 !important;
}

/* Виділення важливого */
#sp-component .college-prose strong {
  font-weight: 700 !important;
  color: #1e252b !important;
}

/* Посилання всередині тексту */

/* Посилання у звичайних текстових матеріалах */
#sp-component .college-prose a {
  color: #24456f !important;
  text-decoration: none !important;
  font-weight: 500 !important;
  transition: color 0.2s ease;
}

/* Наведення на посилання */
#sp-component .college-prose a:hover {
  color: #d19b17 !important;
  text-decoration: none !important;
}

/* Виділення при навігації клавіатурою */
#sp-component .college-prose a:focus-visible {
  outline: 2px solid #24456f;
  outline-offset: 3px;
}

#sp-component .college-prose a:hover {
  color: #d19b17 !important;
}

/* Мобільна версія */
@media (max-width: 768px) {
  #sp-component .college-prose p,
  #sp-component .college-prose ul,
  #sp-component .college-prose ol {
    font-size: 16px !important;
    line-height: 1.65 !important;
  }

  #sp-component .college-prose p {
    text-align: left !important;
    text-indent: 0 !important;
  }

  #sp-component .college-prose h2 {
    font-size: 21px !important;
  }

  #sp-component .college-prose h3 {
    font-size: 18px !important;
  }
}

/* ==========================================================
   УНІВЕРСАЛЬНІ ФОТОГРАФІЇ В МАТЕРІАЛАХ КОЛЕДЖУ
   ========================================================== */

#sp-component .college-prose .college-media {
  margin: 16px 0 24px !important;
  padding: 0 !important;
  text-align: center !important;
}

/* Фотографії на всю ширину текстового блоку */
#sp-component .college-prose .college-media img {
  display: block;
  width: 100% !important;
  max-width: 100%;
  height: auto !important;
  margin: 0 auto;
}

/* Вужчі зображення, якщо це потрібно */
#sp-component .college-prose .college-media--narrow img {
  width: 80% !important;
}

/* Підпис або назва підрозділу по центру */
#sp-component .college-prose .college-center-text {
  text-align: center !important;
  text-indent: 0 !important;
  font-weight: 600 !important;
}

/* Мобільна адаптація */
@media (max-width: 768px) {
  #sp-component .college-prose .college-media {
    margin: 12px 0 20px !important;
  }

  #sp-component .college-prose .college-media--narrow img {
    width: 100% !important;
  }
}

/* ==========================================================
   УНІВЕРСАЛЬНЕ ВИРІВНЮВАННЯ ТЕКСТУ
   ========================================================== */

/* Звичайний текст — по ширині */
#sp-component .college-prose p {
  text-align: justify !important;
  text-indent: 24px !important;
}

/* Текст по центру */
#sp-component .college-prose p.college-align-center {
  text-align: center !important;
  text-indent: 0 !important;
}

/* Текст по центру, напівжирний */
#sp-component .college-prose p.college-center-text {
  text-align: center !important;
  text-indent: 0 !important;
  font-weight: 600 !important;
}

/* На телефоні звичайний текст вирівнюємо ліворуч */
@media (max-width: 768px) {
  #sp-component
    .college-prose
    p:not(.college-align-center, .college-center-text) {
    text-align: left !important;
    text-indent: 0 !important;
  }
}

/* Правильне відображення тексту в списках посилань */
.college-link-section .college-link-list > a {
  display: block;
}

/* Жирне виділення частини тексту */
.college-link-list strong {
  font-weight: 700;
}

/* ==========================================================
   УНІВЕРСАЛЬНА СТОРІНКА З БАНЕРАМИ ТА КНОПКАМИ
   ========================================================== */

/* Контейнер без бокових відступів */
#sp-component .college-page-content.college-page-content--full {
  width: 100% !important;
  padding: 0 !important;
}

/* Банери */
#sp-component .college-banner-stack img {
  display: block;
  width: 100% !important;
  max-width: 100%;
  height: auto !important;
  margin: 0;
}

#sp-component .college-banner-stack img + img {
  margin-top: 12px;
}

/* Сітка кнопок */
#sp-component .college-action-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 240px), 1fr));
  gap: 18px;
  margin: 24px 0 0;
}

/* Універсальна кнопка */
#sp-component .college-action-grid > a {
  display: flex !important;
  align-items: center;
  justify-content: center;

  min-height: 68px;
  padding: 15px 20px;
  box-sizing: border-box;

  background: #24456f !important;
  color: #ffffff !important;

  border: 1px solid #24456f;
  border-bottom: 3px solid #e6bc45;
  border-radius: 10px;

  font-family: inherit !important;
  font-size: 16px !important;
  font-weight: 600 !important;
  line-height: 1.4;
  text-align: center;
  text-decoration: none !important;

  transition:
    background-color 0.2s ease,
    transform 0.2s ease,
    box-shadow 0.2s ease;
}

/* Наведення */
#sp-component .college-action-grid > a:hover {
  background: #1e252b !important;
  color: #ffffff !important;
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(15, 23, 42, 0.16);
}

/* Навігація клавіатурою */
#sp-component .college-action-grid > a:focus-visible {
  outline: 2px solid #e6bc45;
  outline-offset: 3px;
}

/* Мобільна адаптація */
@media (max-width: 600px) {
  #sp-component .college-action-grid {
    grid-template-columns: 1fr;
    gap: 12px;
    margin-top: 16px;
  }

  #sp-component .college-action-grid > a {
    min-height: 54px;
    padding: 12px 15px;
    font-size: 15px !important;
  }
}

/* ==========================================================
   УНІВЕРСАЛЬНІ КОНТАКТНІ БЛОКИ КОЛЕДЖУ
   Сучасне компактне оформлення
   ========================================================== */

/* Загальна сторінка */
#sp-component .college-contact-page {
  padding-top: 18px !important;
}

/* Окремий корпус */
#sp-component .college-contact-section {
  margin-bottom: 40px;
}

/* Розділення корпусів */
#sp-component .college-contact-section + .college-contact-section {
  border-top: 1px solid #e5e9ef;
  padding-top: 32px;
}

#sp-component .college-contact-section:last-child {
  margin-bottom: 0;
}

/* Заголовок корпусу */
#sp-component .college-contact-heading {
  margin: 0 0 12px !important;
  padding: 0 !important;

  font-family: inherit !important;
  font-size: 25px !important;
  font-weight: 700 !important;
  line-height: 1.4 !important;
  color: #24456f !important;

  text-align: center !important;
  text-indent: 0 !important;
  border: none !important;
}

/* Коротка жовта лінія під заголовком */
#sp-component .college-contact-heading::after {
  content: '';
  display: block;
  width: 65px;
  height: 3px;
  margin: 12px auto 0;
  background: #e6bc45;
  border-radius: 3px;
}

/* Відділення */
#sp-component .college-contact-subtitle {
  margin: 0 0 24px !important;

  font-size: 17px !important;
  font-weight: 400;
  line-height: 1.65 !important;
  color: #526174 !important;
  text-align: center !important;
  text-indent: 0 !important;
}

/* Карта — 35%, контакти — решта */
#sp-component .college-contact-layout {
  display: grid;
  grid-template-columns: minmax(0, 35%) minmax(0, 1fr);
  gap: 24px;
  align-items: start;
}

/* Компактна інтерактивна карта */
#sp-component .college-contact-map iframe {
  display: block;
  width: 100% !important;
  height: 245px !important;

  border: 0 !important;
  border-radius: 10px;
}

/* Блок контактної інформації */
#sp-component .college-contact-info {
  min-width: 0;
  padding: 20px 24px;

  background: #f8fafc;
  border: 1px solid #e5e9ef;
  border-left: 4px solid #e6bc45;
  border-radius: 10px;

  font-family: inherit !important;
  font-size: 19px !important;
  line-height: 1.7 !important;
  color: #293442 !important;

  overflow-wrap: anywhere;
}

/* Текст контактів */
#sp-component .college-contact-info p {
  margin: 0 !important;
  padding: 0 !important;

  font-family: inherit !important;
  font-size: inherit !important;
  line-height: inherit !important;

  text-align: left !important;
  text-indent: 0 !important;
}

/* Гіперпосилання */
#sp-component .college-contact-info a {
  color: #24456f !important;
  text-decoration: none !important;
  transition: color 0.2s ease;
}

#sp-component .college-contact-info a:hover {
  color: #d19b17 !important;
}

#sp-component .college-contact-info a:focus-visible {
  outline: 2px solid #24456f;
  outline-offset: 3px;
}

/* Іконки соцмереж */
#sp-component .college-contact-info .img-contact {
  display: inline-block !important;
  width: 22px !important;
  height: 22px !important;
  object-fit: contain;
  vertical-align: middle;
  margin-right: 5px;
}

/* Планшети й телефони */
@media (max-width: 900px) {
  #sp-component .college-contact-layout {
    grid-template-columns: minmax(0, 1fr);
    gap: 16px;
  }

  /* Контакти вище, карта нижче */
  #sp-component .college-contact-info {
    order: -1;
    font-size: 18px !important;
  }

  #sp-component .college-contact-map iframe {
    height: 220px !important;
  }
}

/* Малі екрани */
@media (max-width: 600px) {
  #sp-component .college-contact-heading {
    font-size: 22px !important;
  }

  #sp-component .college-contact-subtitle {
    font-size: 16px !important;
  }

  #sp-component .college-contact-info {
    padding: 16px;
    font-size: 17px !important;
  }

  #sp-component .college-contact-map iframe {
    height: 200px !important;
  }
}

/* Сумісність зі старими матеріалами:
   фотографії із шириною у відсотках */

#sp-component .article-details p > img[width$='%'] {
  display: inline-block !important;
  vertical-align: top;
}
