/**
 * Hydrobio Theme — CSS
 * =====================
 * Кольорова палітра:
 *   --teal:       #0cb7a4  (навігація, кнопки, акценти)
 *   --blue:       #4a7eab  (блоки новин, подій, журналу)
 *   --dark-blue:  #1a3a5c  (заголовки, footer, бейджі)
 *   --link:       #1a7cc1  (посилання)
 *   --bg-light:   #eaf4f4  (фон секцій)
 *   --text:       #323232  (основний текст)
 *
 * Шрифт: PT Sans Narrow (Google Fonts), 400 та 700
 */

@import url('https://fonts.googleapis.com/css2?family=PT+Sans+Narrow:wght@400;700&display=swap');

/* ===== RESET ===== */
*, *::before, *::after { box-sizing: border-box; }
html {
  height: 100%;
}
body {
  margin: 0; padding: 0;
  font-family: 'PT Sans Narrow', Arial, sans-serif;
  font-size: 16px;
  color: #323232;
  background: #fff;
  min-height: 100%;
  display: flex;
  flex-direction: column;
}
body > footer,
body > #site-footer,
body > .site-footer {
  margin-top: auto;
}
a { color: #1a7cc1; text-decoration: none; }
a:hover { color: #0cb7a4; text-decoration: underline; }
img { max-width: 100%; height: auto; display: block; }
h1,h2,h3,h4 { margin: 0; font-weight: 700; }
ul { margin: 0; padding: 0; }

/* ===== HEADER ===== */
#site-header { background: #fff; background-image: url('/storage/app/media/h-bg.jpg');}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 15px;
  max-width: 1205px;
  margin: 0 auto;
}
.header-logo a {
  display: flex; align-items: center;
  text-decoration: none; color: #1a3a5c;
}
.header-logo img { width: 60px; height: auto; margin-right: 12px; }
.logo-text h1 { font-size: 21px; font-weight: 700; color: #fff; line-height: 1.2; }
.logo-text p  { font-size: 13px; color: #fff; margin-top: 2px; }

.header-right { display: flex; align-items: center; gap: 12px; }

/* Пошук */
.header-search {
  display: flex; align-items: center;
  border: 1px solid #ccc; border-radius: 3px; overflow: hidden;
}
.header-search input {
  border: none; outline: none;
  padding: 7px 12px; font-size: 15px; width: 260px;
  font-family: inherit; color: #555;
}
.header-search input::placeholder { color: #aaa; }
.header-search button {
  background: none; border: none;
  padding: 7px 12px; cursor: pointer; color: #555; font-size: 16px;
}
.header-search button:hover { color: #0cb7a4; }

/* Перемикач мов */
.lang-switcher { display: flex; gap: 5px; }
.lang-switcher a {
  display: inline-block; padding: 5px 12px;
  border-radius: 20px; font-size: 14px; font-weight: 700;
  color: #fff; text-decoration: none; transition: opacity .2s;
}
.lang-switcher a.active     { background: #0cb7a4; }
.lang-switcher a:not(.active) { background: #1a7cc1; }
.lang-switcher a:hover      { opacity: .85; text-decoration: none; }

/* ===== НАВІГАЦІЯ ===== */
#main-nav { background: #0cb7a4; position: relative; z-index: 100; }
.nav-inner { max-width: 1205px; margin: 0 auto; }

/* Кнопка-гамбургер (лише мобільні) */
.nav-toggle {
  display: none;
  background: none; border: none; cursor: pointer;
  padding: 12px 15px; flex-direction: column; gap: 5px;
  z-index: 201;
}
.nav-toggle span {
  display: block; width: 24px; height: 2px;
  background: #fff; border-radius: 2px;
  transition: transform .3s ease, opacity .3s ease;
}
/* Анімація гамбургера → X */
.nav-toggle.is-active span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-toggle.is-active span:nth-child(2) { opacity: 0; transform: scaleX(0); }
.nav-toggle.is-active span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }


/* Горизонтальне меню */
.nav-menu {
  display: flex; list-style: none;
  margin: 0; padding: 0; flex-wrap: nowrap;
}
.nav-menu > li { position: relative; }
.nav-menu > li > a {
  display: block;
  padding: 14px 16px;
  color: #fff; font-size: 16px; font-weight: 700;
  white-space: nowrap; text-decoration: none;
  transition: background .2s;
}
.nav-menu > li > a:hover,
.nav-menu > li:hover > a { background: #0aa496; color: #fff; text-decoration: none; }
.nav-menu > li.active > a { background: #007b6e; }

/* Dropdown 1-го рівня */
.nav-menu > li .dropdown {
  display: none;
  position: absolute; top: 100%; left: 0;
  background: #1a3a5c; min-width: 260px;
  z-index: 200; box-shadow: 0 4px 12px rgba(0,0,0,.2);
}
.nav-menu > li:hover .dropdown { display: block; }
.nav-menu > li .dropdown > ul { list-style: none; }
.nav-menu > li .dropdown > ul > li > a {
  display: block; padding: 9px 16px;
  color: #fff; font-size: 14px; text-decoration: none;
  border-bottom: 1px solid rgba(255,255,255,.1);
  transition: background .15s;
}
.nav-menu > li .dropdown > ul > li > a:hover { background: #0cb7a4; text-decoration: none; }

/* Dropdown 2-го рівня (підпідменю) */
.nav-menu .dropdown > ul > li { position: relative; }
.nav-menu .dropdown > ul > li .sub-dropdown {
  display: none;
  position: absolute; left: 100%; top: 0;
  background: #245a82; min-width: 260px;
  box-shadow: 4px 4px 12px rgba(0,0,0,.15);
  z-index: 300;
}
.nav-menu .dropdown > ul > li:hover .sub-dropdown,
.nav-menu .dropdown > ul > li.open .sub-dropdown { display: block; }
.nav-menu .sub-dropdown > ul { list-style: none; }
.nav-menu .sub-dropdown > ul > li > a {
  display: block; padding: 9px 16px;
  color: #fff; font-size: 14px; text-decoration: none;
  border-bottom: 1px solid rgba(255,255,255,.08);
}
.nav-menu .sub-dropdown > ul > li > a:hover { background: #0cb7a4; }

/* ===== HERO SLIDER ===== */
#hero-slider {
  position: relative; overflow: hidden;
  background: #e0e0e0; max-height: 484px;
}
.slider-wrap { position: relative; width: 100%; height: 484px; }

.slide {
  position: absolute; inset: 0;
  background-size: cover; background-position: center top;
  opacity: 0; transition: opacity .8s ease;
}
.slide.active { opacity: 1; }

/* Стрілки */
.slider-arrow {
  position: absolute; top: 50%; transform: translateY(-50%);
  background: rgba(0,0,0,.3); color: #fff; border: none;
  padding: 12px 16px; font-size: 20px;
  cursor: pointer; z-index: 10; transition: background .2s;
}
.slider-arrow:hover { background: rgba(0,0,0,.55); }
.slider-prev { left: 20px; }
.slider-next { right: 20px; }

/* Буллети */
.slider-bullets {
  position: absolute; bottom: 20px; left: 50%;
  transform: translateX(-50%);
  display: flex; gap: 8px; z-index: 10;
}
.slider-bullets span {
  width: 12px; height: 12px; border-radius: 50%;
  background: rgba(255,255,255,.5); cursor: pointer; display: inline-block;
  transition: background .3s;
}
.slider-bullets span.active { background: #fff; }

/* ===== СЕКЦІЯ FEATURED SLIDER + НОВИНИ ===== */
#main-content { background: #eaf4f4; padding: 30px 0; }

.content-row {
  display: flex; gap: 20px;
  max-width: 1205px; margin: 0 auto; padding: 0 15px;
}

/* Featured Slider (лівий блок) */
.featured-slider-block {
  flex: 0 0 52%;
  background: #fff; border: 1px solid #ddd;
  position: relative; overflow: hidden;
}
.featured-slider-title {
  background: #4a7eab; color: #fff;
  font-size: 15px; padding: 8px 14px; min-height: 36px;
}
.featured-slide { display: none; }
.featured-slide.active { display: block; }
.featured-slide img { width: 100%; height: 330px; object-fit: cover; }

.featured-slider-btn {
  position: absolute; bottom: 40px; right: 20px;
  background: #0cb7a4; color: #fff;
  padding: 9px 22px; font-size: 15px; font-weight: 700;
  text-decoration: none; display: inline-block;
  transition: background .2s;
}
.featured-slider-btn:hover { background: #0aa496; color: #fff; text-decoration: none; }

.featured-slider-nav {
  position: absolute; bottom: 40px; left: 14px;
  display: flex; gap: 5px;
}
.featured-slider-nav button {
  width: 30px; height: 30px;
  background: rgba(255,255,255,.85); border: 1px solid #ccc;
  cursor: pointer; font-size: 16px; color: #555;
  transition: all .2s;
}
.featured-slider-nav button:hover {
  background: #0cb7a4; color: #fff; border-color: #0cb7a4;
}

/* Блок новин (правий) */
.news-block { flex: 1; background: #4a7eab; }
.news-title-bar { padding: 14px 18px 10px; }
.news-title-bar h2 {
  font-size: 22px; font-weight: 900; color: #fff;
  letter-spacing: 1px; text-transform: uppercase;
  border-left: 5px solid #0cb7a4; padding-left: 12px;
}
.news-list { padding: 0 18px; }
.news-item { padding: 14px 0; border-bottom: 1px solid rgba(255,255,255,.2); }
.news-item:last-child { border-bottom: none; }
.news-date { font-size: 13px; color: #b3d4ec; margin-bottom: 5px; }
.news-item a {
  color: #fff; font-size: 15px; line-height: 1.45;
  text-decoration: none; display: block;
}
.news-item a:hover { color: #0cb7a4; text-decoration: none; }
.news-more-btn { text-align: right; padding: 12px 18px; }

/* Кнопки */
.btn-teal {
  display: inline-block;
  background: #0cb7a4; color: #fff;
  padding: 9px 22px; font-size: 15px; font-weight: 700;
  text-decoration: none; transition: background .2s; border: none; cursor: pointer;
}
.btn-teal:hover { background: #0aa496; color: #fff; text-decoration: none; }

/* ===== ДІЯЛЬНІСТЬ ІНСТИТУТУ ===== */
#activity-section { background: #fff; padding: 40px 0; }
.activity-inner {
  max-width: 1205px; margin: 0 auto; padding: 0 15px;
  display: flex; gap: 30px; align-items: flex-start;
}
.activity-text { flex: 1; }
.activity-text h2 { font-size: 26px; color: #1a7cc1; margin-bottom: 18px; }
.activity-text p  { line-height: 1.7; color: #323232; margin-bottom: 12px; }
.activity-text ul { margin: 0 0 18px 20px; line-height: 1.7; }
.activity-text ul li { margin-bottom: 8px; }
.activity-img { flex: 0 0 42%; }

/* ===== ПОДІЇ ===== */
#events-section {
  background: url("/storage/app/media/activity-bg.jpg") center/cover;
  padding: 40px 0; position: relative;
}
#events-section::before {
  content: ''; position: absolute; inset: 0;
  opacity: .15; pointer-events: none;
}
.events-inner {
  max-width: 1205px; margin: 0 auto;
  padding: 0 15px; position: relative; z-index: 1;
}
.events-inner h2 {
  text-align: center; color: #fff;
  font-size: 28px; margin-bottom: 6px;
}
.events-divider { text-align: center; color: #0cb7a4; font-size: 22px; margin-bottom: 22px; }

.events-grid { display: flex; gap: 18px; margin-bottom: 24px; }

.event-card { flex: 1; position: relative; overflow: hidden; min-height: 150px; }
.event-card img { width: 100%; height: 220px; object-fit: cover; }

.event-date-badge {
  position: absolute; top: 0; left: 0;
  background: #1a3a5c; color: #fff;
  padding: 6px 10px; min-width: 60px;
  font-weight: 700; line-height: 1.3; text-align: center;
}
.event-date-badge .month { display: block; font-size: 12px; color: #8eb8d8; }
.event-date-badge .day   { display: block; font-size: 15px; }
.event-date-badge .year  { display: block; font-size: 16px; color: #0cb7a4; }

.event-card-title {
  position: absolute; bottom: 0; left: 0; right: 0;
  background: rgba(26,58,92,.78); padding: 10px 14px;
}
.event-card-title a {
  color: #fff; font-size: 14px; font-weight: 700; text-decoration: none;
}
.event-card-title a:hover { color: #0cb7a4; }
.events-more { text-align: center; }

/* ===== НАУКОВІ ПОСЛУГИ / ПОСИЛАННЯ ===== */
#services-section { background: #eaf4f4; padding: 30px 0; }
.services-inner { max-width: 1205px; margin: 0 auto; padding: 0 15px; }
.services-grid  { display: flex; gap: 20px; }
.service-col    { flex: 1; }
.service-col h3 {
  font-size: 17px; font-weight: 700; color: #1a7cc1;
  margin-bottom: 10px; padding-bottom: 8px;
  border-bottom: 2px solid #0cb7a4;
}
.service-col ul { list-style: none; }
.service-col ul li { padding: 5px 0; border-bottom: 1px solid #cde; font-size: 14px; }
.service-col ul li::before { content: "› "; color: #0cb7a4; }
.service-col ul li a { color: #323232; }
.service-col ul li a:hover { color: #0cb7a4; }

/* ===== ЖУРНАЛ ===== */
#journal-section { background: #4a7eab; padding: 40px 0; }
.journal-inner {
  max-width: 1205px; margin: 0 auto; padding: 0 15px;
  display: flex; gap: 30px; align-items: flex-start;
}
.journal-text { flex: 1; }
.journal-text h2 { font-size: 26px; color: #fff; margin-bottom: 18px; }
.journal-text p  { color: #d4e8f5; line-height: 1.7; margin-bottom: 12px; font-size: 15px; }
.journal-img { flex: 0 0 35%; text-align: center; }
.journal-img img { max-width: 280px; margin: 0 auto; }

/* ===== КОНТАКТИ ===== */
#contacts-section { display: flex; min-height: 350px; }
.contacts-map { flex: 1; }
.contacts-map iframe { width: 100%; height: 100%; min-height: 350px; border: none; }
.contacts-info {
  flex: 0 0 38%; background: #0cb7a4; padding: 30px; color: #fff;
}
.contacts-info h2 { font-size: 26px; color: #fff; margin-bottom: 20px; }
.contacts-info p  {
  font-size: 15px; margin-bottom: 12px;
  display: flex; align-items: flex-start; gap: 10px; line-height: 1.5;
}
.contacts-info i { min-width: 18px; margin-top: 2px; }
.contacts-info a { color: #fff; text-decoration: underline; }
.contacts-info a:hover { color: rgba(255,255,255,.8); }

/* ===== FOOTER ===== */
#site-footer {
  background: #1a3a5c;
  color: #fff;
  font-size: 14px;
}
#site-footer p { margin: 0; }
#site-footer a { color: #0cb7a4; text-decoration: none; }
#site-footer a:hover { color: #fff; text-decoration: underline; }

/* Навігаційний блок футера */
.footer-nav {
  border-bottom: 1px solid rgba(255,255,255,.12);
  padding: 36px 20px 28px;
}
.footer-nav-inner {
  max-width: 1200px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 32px;
}
.footer-nav-heading {
  font-size: 14px;
  font-weight: 700;
  color: #fff;
  text-transform: uppercase;
  letter-spacing: .5px;
  padding-bottom: 10px;
  margin-bottom: 12px;
  border-bottom: 2px solid #0cb7a4;
}
.footer-nav-col ul {
  list-style: none;
  margin: 0; padding: 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.footer-nav-col ul li::before {
  content: '›';
  margin-right: 6px;
  color: #0cb7a4;
}
.footer-nav-col ul li a {
  color: rgba(255,255,255,.8);
  font-size: 13px;
  transition: color .15s;
}
.footer-nav-col ul li a:hover { color: #fff; text-decoration: none; }

/* Копірайт */
.footer-copy {
  text-align: center;
  padding: 14px 15px;
  font-size: 13px;
  color: rgba(255,255,255,.6);
}

/* Мобільний футер */
@media (max-width: 768px) {
  .footer-nav-inner {
    grid-template-columns: repeat(2, 1fr);
    gap: 24px;
  }
}
@media (max-width: 480px) {
  .footer-nav-inner {
    grid-template-columns: 1fr;
    gap: 20px;
  }
}

/* ===== BREADCRUMBS ===== */
.breadcrumbs { background: #e8f4f8; padding: 8px 0; font-size: 14px; }
.breadcrumbs-inner { max-width: 1205px; margin: 0 auto; padding: 0 15px; }
.breadcrumbs a { color: #1a7cc1; }
.breadcrumbs span { color: #777; }

/* ===== INNER PAGE ===== */
.page-content-wrap { max-width: 1205px; margin: 0 auto; padding: 0 15px; }
.page-content-wrap h1 {
  font-size: 28px; color: #1a7cc1;
  border-bottom: 2px solid #0cb7a4;
  padding-bottom: 10px; margin: 20px 0 24px;
}
.post-content { line-height: 1.75; }
.post-content h2,
.post-content h3 { color: #1a3a5c; margin: 20px 0 10px; }
.post-content img { max-width: 100%; margin: 12px 0; }
.post-content p   { margin-bottom: 12px; }
.post-content ul,
.post-content ol  { margin: 0 0 12px 20px; }

/* ===== RESPONSIVE ===== */
@media (max-width: 1100px) {
  .nav-menu > li > a { padding: 14px 12px; font-size: 15px; }
}

@media (max-width: 992px) {
  .content-row      { flex-direction: column; }
  .featured-slider-block { flex: none; width: 100%; }
  .activity-inner   { flex-direction: column; }
  .activity-img     { flex: none; width: 100%; }
  .journal-inner    { flex-direction: column; }
  .events-grid      { flex-wrap: wrap; }
  .event-card       { flex: 0 0 45%; }
  #contacts-section { flex-direction: column; }
  .contacts-info    { flex: none; }
  .services-grid    { flex-wrap: wrap; }
  .service-col      { flex: 0 0 45%; }
}

@media (max-width: 768px) {
  /* ── Гамбургер ──────────────────────────────────── */
  .nav-toggle { display: flex; }

  /* ── Головне меню: вертикальне, слайд-вниз ─────── */
  .nav-menu {
    display: none;
    flex-direction: column;
    position: absolute; top: 100%; left: 0; right: 0;
    background: #0cb7a4;
    z-index: 200;
    box-shadow: 0 6px 16px rgba(0,0,0,.25);
    max-height: calc(100vh - 60px);
    overflow-y: auto;
  }
  .nav-menu.open {
    display: flex;
    animation: navSlideDown .22s ease;
  }
  @keyframes navSlideDown {
    from { opacity: 0; transform: translateY(-6px); }
    to   { opacity: 1; transform: translateY(0); }
  }

  /* ── Пункти верхнього рівня ─────────────────── */
  .nav-menu > li {
    display: flex;
    flex-wrap: wrap;
    align-items: stretch;
    border-bottom: 1px solid rgba(255,255,255,.15);
  }
  .nav-menu > li > a {
    flex: 1;
    padding: 14px 15px;
    border-bottom: none;
    white-space: normal;
  }

  /* ── Стрілка на батьківських пунктах (::after) ──
     Тап по посиланню розкриває підменю, стрілка
     показує стан відкритий / закритий               */
  .nav-menu > li.has-dropdown > a,
  .nav-menu .has-sub > a {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
  }
  .nav-menu > li.has-dropdown > a::after,
  .nav-menu .has-sub > a::after {
    content: '';
    display: block;
    width: 9px; height: 9px;
    border-right: 2px solid rgba(255,255,255,.85);
    border-bottom: 2px solid rgba(255,255,255,.85);
    transform: rotate(45deg);
    flex-shrink: 0;
    margin-right: 4px;
    transition: transform .25s ease, margin-top .25s ease;
    margin-top: -3px;
  }
  .nav-menu > li.has-dropdown.open > a::after,
  .nav-menu .has-sub.open > a::after {
    transform: rotate(-135deg);
    margin-top: 3px;
  }

  /* ── Dropdown 1-го рівня ─────────────────────── */
  .nav-menu > li .dropdown {
    position: static;
    display: none;
    flex-basis: 100%;
    order: 10;
    box-shadow: none;
    background: #155074;
    min-width: 0;
  }
  .nav-menu > li.open > .dropdown { display: block; }
  .nav-menu > li .dropdown > ul > li > a {
    padding: 12px 18px 12px 22px;
    font-size: 14px;
  }

  /* ── Dropdown 2-го рівня (has-sub) ──────────── */
  .nav-menu .has-sub {
    display: flex;
    flex-wrap: wrap;
    align-items: stretch;
  }
  .nav-menu .has-sub > a { flex: 1; }
  .nav-menu .has-sub > .sub-dropdown {
    position: static;
    display: none;
    flex-basis: 100%;
    order: 10;
    box-shadow: none;
    background: #0d3552;
    min-width: 0;
  }
  .nav-menu .has-sub.open > .sub-dropdown { display: block; }
  .nav-menu .has-sub > .sub-dropdown > ul > li > a {
    padding: 10px 18px 10px 34px;
    font-size: 13px;
    border-bottom-color: rgba(255,255,255,.06);
  }

  /* ── Решта адаптивних правил ─────────────────── */
  .header-inner        { flex-wrap: wrap; gap: 10px; }
  .header-search input { width: 180px; }
  .service-col         { flex: 0 0 100%; }
  .event-card          { flex: 0 0 100%; }
  .slider-wrap         { height: 260px; }
  #hero-slider         { max-height: 260px; }
  .featured-slide img  { height: 220px; }

  /* Секція новин + featured: однакова ширина */
  .featured-slider-block,
  .news-block { width: 100%; }

  /* Журнал: зображення не надто велике */
  .journal-img img { max-width: 200px; }

  /* Контакти: повна ширина карти */
  .contacts-map iframe { min-height: 260px; }
  .contacts-info { padding: 20px 15px; }
}

@media (max-width: 480px) {
  .logo-text h1    { font-size: 17px; }
  .header-search   { display: none; }
  .events-inner h2 { font-size: 22px; }

  /* Слайдер нижче на телефоні */
  .slider-wrap  { height: 200px; }
  #hero-slider  { max-height: 200px; }

  /* Featured-слайд коротший */
  .featured-slide img { height: 180px; }

  /* Менші відступи */
  #activity-section  { padding: 24px 0; }
  #events-section    { padding: 24px 0; }
  #journal-section   { padding: 24px 0; }
  #services-section  { padding: 20px 0; }
  .activity-inner    { gap: 16px; }

  /* Журнал: картинка на весь рядок */
  .journal-img img   { max-width: 100%; }

  /* Контактна інформація */
  .contacts-info h2  { font-size: 20px; }
  .contacts-info p   { font-size: 14px; }
}

/* ===== GLOBAL FONT-SIZE BOOST (inner pages) =====
   Перевизначає дрібні розміри з інлайн-стилів усіх сторінок.
   Правила специфічніші за класи з <style> у page-файлах,
   тому спрацьовують без !important де це можливо.
 ===================================================== */

/* Основний текст у контентній зоні */
.inner-page-section:not(.structure-detail) p,
.inner-page-section:not(.structure-detail) li,
.inner-page-section:not(.structure-detail) td,
.inner-page-section:not(.structure-detail) dd,
.inner-page-section:not(.structure-detail) .post-content { font-size: 15px !important; line-height: 1.75 !important; }

/* Заголовки секцій */
.inner-page-section:not(.structure-detail) h2 { font-size: 20px !important; }
.inner-page-section:not(.structure-detail) h3 { font-size: 17px !important; }
.inner-page-section:not(.structure-detail) h4 { font-size: 16px !important; }

/* Підписи, метадані, примітки — дрібніші, але читабельні */
.inner-page-section:not(.structure-detail) .news-date,
.inner-page-section:not(.structure-detail) .breadcrumbs,
.inner-page-section:not(.structure-detail) small,
.inner-page-section:not(.structure-detail) .caption,
.inner-page-section:not(.structure-detail) figcaption,
.inner-page-section:not(.structure-detail) th { font-size: 13px !important; }

/* Таблиці заголовки трохи крупніші за тіло */
.inner-page-section:not(.structure-detail) th { font-size: 14px !important; font-weight: 700 !important; }

/* Посилання-картки (doc-link, manual-card тощо) */
.inner-page-section:not(.structure-detail) a[class*="link"],
.inner-page-section:not(.structure-detail) a[class*="card"],
.inner-page-section:not(.structure-detail) a[class*="btn"],
.inner-page-section:not(.structure-detail) .norm-link,
.inner-page-section:not(.structure-detail) .vac-doc-link,
.inner-page-section:not(.structure-detail) .pp-manual-card { font-size: 15px !important; }

/* Мітки-бейджі, патентний рядок, виноски */
.inner-page-section:not(.structure-detail) [class*="patent"],
.inner-page-section:not(.structure-detail) [class*="footnote"],
.inner-page-section:not(.structure-detail) [class*="note"],
.inner-page-section:not(.structure-detail) .docs-footnote { font-size: 13px !important; }

/* ════════════════════════════════════════════════════
   NEWS / EVENTS  — спільний макет
════════════════════════════════════════════════════ */
.posts-section {
  background: #f0f8f8;
  padding: 30px 0;
  min-height: 60vh;
}
.posts-container {
  max-width: 1205px;
  margin: 0 auto;
  padding: 0 20px;
  display: flex;
  gap: 28px;
  align-items: flex-start;
}
.posts-main {
  flex: 1;
  min-width: 0;
}
.posts-heading {
  font-size: 22px;
  color: #1a3a5c;
  border-bottom: 2px solid #0cb7a4;
  padding-bottom: 10px;
  margin: 0 0 4px;
}
.posts-total {
  font-size: 12px;
  color: #aaa;
  margin: 0 0 20px;
}
.post-item {
  border-bottom: 1px solid #dde;
  padding: 20px 0;
  display: flex;
  gap: 20px;
  align-items: flex-start;
}
.post-item:last-of-type { border-bottom: none; }
.post-item__img {
  width: 220px;
  height: 148px;
  object-fit: cover;
  border-radius: 6px;
  display: block;
  flex-shrink: 0;
}
.post-item__img-link { flex-shrink: 0; }
.post-item__body { flex: 1; min-width: 0; }
.post-item__date {
  font-size: 14px;
  color: #888;
  display: block;
  margin-bottom: 8px;
}
.post-item__date i { margin-right: 4px; color: #0cb7a4; }
.post-item__title {
  margin: 0 0 10px;
  font-size: 19px;
  font-weight: 700;
}
.post-item__title a { color: #1a3a5c; text-decoration: none; }
.post-item__title a:hover { color: #0cb7a4; }
.post-item__excerpt {
  margin: 0;
  font-size: 15px;
  color: #555;
  line-height: 1.55;
}

/* Pagination */
.posts-pagination {
  text-align: center;
  margin-top: 28px;
}
.posts-pagination__label {
  font-size: 13px;
  color: #888;
  margin-bottom: 10px;
}
.posts-pagination__links {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 6px;
}
.posts-pagination__links a {
  display: inline-block;
  padding: 7px 13px;
  border-radius: 4px;
  text-decoration: none;
  font-size: 13px;
  background: #e8f4f8;
  color: #1a7cc1;
  transition: background .15s, color .15s;
}
.posts-pagination__links a:hover  { background: #0cb7a4; color: #fff; }
.posts-pagination__links a.active { background: #0cb7a4; color: #fff; font-weight: 700; }
.posts-pagination__links a.disabled { opacity: .4; pointer-events: none; }

/* Sidebar */
.posts-sidebar {
  flex: 0 0 260px;
  background: #fff;
  border: 1px solid #d8ecea;
  border-radius: 8px;
  padding: 20px;
  position: sticky;
  top: 20px;
}
.posts-sidebar__heading {
  font-size: 17px;
  font-weight: 700;
  color: #1a3a5c;
  margin: 0 0 16px;
  padding-bottom: 10px;
  border-bottom: 2px solid #0cb7a4;
}
.posts-sidebar__year {
  font-size: 16px;
  font-weight: 700;
  color: #1a3a5c;
  display: block;
  padding: 5px 0;
  text-decoration: none;
}
.posts-sidebar__year:hover { color: #0cb7a4; }
.posts-sidebar__year.active { color: #0cb7a4; }
.posts-sidebar__months {
  list-style: none;
  margin: 0 0 14px;
  padding: 0 0 0 14px;
}
.posts-sidebar__months li { margin: 5px 0; }
.posts-sidebar__months a {
  font-size: 14px;
  color: #555;
  text-decoration: none;
}
.posts-sidebar__months a:hover { color: #0cb7a4; }
.posts-sidebar__months a.active { color: #0cb7a4; font-weight: 700; }
.posts-sidebar__count { color: #bbb; font-size: 13px; }

/* Mobile */
@media (max-width: 768px) {
  .posts-container { flex-direction: column; gap: 20px; }
  .posts-sidebar   { flex: none; width: 100%; position: static; order: 2; }
  .posts-main      { order: 1; width: 100%; }
  .post-item       { flex-direction: column; }
  .post-item__img  { width: 100%; height: auto; aspect-ratio: 16/9; }
}

/* ════════════════════════════════════════════════════
   LIGHTBOX  (глобально для .photos-grid img)
════════════════════════════════════════════════════ */
#lb-overlay {
    display: none; position: fixed; inset: 0; z-index: 9900;
    background: rgba(0,0,0,.93);
    align-items: center; justify-content: center;
}
#lb-overlay.open { display: flex; }

#lb-img {
    max-width: 90vw; max-height: 86vh;
    object-fit: contain; display: block;
    border-radius: 4px;
    box-shadow: 0 8px 48px rgba(0,0,0,.7);
    cursor: default;
    transition: opacity .18s;
}
#lb-img.loading { opacity: 0; }

#lb-close {
    position: fixed; top: 14px; right: 20px;
    font-size: 42px; line-height: 1;
    color: #fff; background: none; border: none;
    cursor: pointer; opacity: .7; padding: 2px 10px;
    transition: opacity .15s;
}
#lb-close:hover { opacity: 1; }

#lb-prev, #lb-next {
    position: fixed; top: 50%; transform: translateY(-50%);
    color: #fff; background: rgba(255,255,255,.1);
    border: none; font-size: 44px; line-height: 1;
    cursor: pointer; padding: 10px 18px;
    border-radius: 6px; transition: background .15s;
    user-select: none; -webkit-user-select: none;
}
#lb-prev { left: 10px; }
#lb-next { right: 10px; }
#lb-prev:hover, #lb-next:hover { background: rgba(255,255,255,.25); }

#lb-counter {
    position: fixed; top: 18px; left: 50%; transform: translateX(-50%);
    color: rgba(255,255,255,.55); font-size: 13px; pointer-events: none;
    letter-spacing: .5px;
}
#lb-caption {
    position: fixed; bottom: 16px; left: 50%; transform: translateX(-50%);
    color: rgba(255,255,255,.6); font-size: 13px;
    max-width: 80vw; text-align: center;
    white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
    pointer-events: none;
}

/* cursor on clickable photos */
.photos-grid img { cursor: zoom-in !important; }

@media (max-width: 600px) {
    #lb-prev { left: 4px; padding: 10px 12px; font-size: 36px; }
    #lb-next { right: 4px; padding: 10px 12px; font-size: 36px; }
}
