/* ===============================
   FIXED TOPBAR + MENU
================================= */

:root {
  --topbar-height: 150px; /* точна висота */
}
@media (max-width: 767px) {
  :root {
    --topbar-height: 95px; /* або 180px – підібрати візуально */
  }
}


.topbar-wrapper {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  z-index: 9999;
  background: var(--bg-white);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid rgba(255,255,255,0.15);
}

.topbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 6px 14px;
}

/* Навігація та Dropdown */
.menu-area {
  display: flex; justify-content: center; padding: 8px 0;
}

.menu-area ul {
  list-style: none; margin: 0; padding: 0;
  display: flex; justify-content: center; gap: 15px;
}

/* Логіка випадаючого підменю */
.menu-area li {
    position: relative; 
  display: flex;
}

.menu-area a {
  color: var(--primary);
  text-decoration: none;
  font-size: 20px; font-weight: 700;
  white-space: nowrap;
}

/* Стилі для підпунктів */
.menu-area li ul {
  display: none; 
  position: absolute;
  top: 100%; left: 0;
  background: var(--bg-white);
  box-shadow: 0 6px 16px rgba(0,0,0,0.15);
  flex-direction: column;
  width: 280px !important; 
  max-width: 280px !important;
  padding: 10px 0;
  border-radius: 8px;
  z-index: 10000;
}

.menu-area li:hover > ul {
  display: flex;
}






/* Виправляємо позиціонування підменю, щоб воно відкривалося вбік */
.menu-area li ul li {
    position: relative; /* Щоб вкладене меню знало, де його позиціонувати */
}

/* Вкладене підменю (відкривається вбік) */
.menu-area li ul li ul {
    top: 0;
    left: 100%; /* Відкривається праворуч від батьківського пункту */
    margin-top: -10px; /* Коригування висоти */
    display: none;
}

/* Показуємо вкладене меню при наведенні */
.menu-area li ul li:hover > ul {
    display: flex;
}



.menu-area li ul a {
  font-size: 16px; font-weight: 500;
  padding: 10px 20px; width: 100%;
  box-sizing: border-box;
  /* ДОЗВОЛЯЄМО ПЕРЕНЕСЕННЯ ДОВГИХ НАЗВ НА НОВИЙ РЯДОК */
  white-space: normal !important;
}



.menu-area li ul a:hover {
  background: var(--bg-light);
  color: var(--primary-dark);
}





/* =================================================================
   1. ГЛОБАЛЬНІ СТИЛІ БУРГЕРА (Поза медіа-запитами)
================================================================= */
.burger-menu {
    display: none;
    cursor: pointer;
    flex-direction: column;
    gap: 5px;
    position: relative;
    z-index: 100000;
}

.burger-menu span { 
    width: 25px; 
    height: 3px; 
    background: var(--primary, #3E7CA2); 
    transition: 0.3s ease; 
}

/* =================================================================
   2. АДАПТИВ МОБІЛЬНОГО ТА ПЛАНШЕТНОГО МЕНЮ (До 1024px)
================================================================= */
@media (max-width: 1024px) {
    .burger-menu { 
        display: flex; 
    }
    
    /* Головна шторка меню */
    .menu-area {
        display: none !important; 
        position: fixed;
        top: 0; 
        left: 0;
      padding-bottom: 200px !important;
        width: 60%; 
       /* ЗАБЛОКОВАНО НА ПОВНУ ВИСОТУ (тепер границя не стрибатиме догори) */
       /* АБСОЛЮТНИЙ ФІКС ВИСОТИ ДЛЯ IPAD ТА SMARTPHONES */
        /* Використовуємо dvh (динамічну висоту), щоб обійти баги мобільного Safari */
        height: auto !important;
        min-height: 100dvh !important;
        background: #f4f7f9;
        z-index: 9999999 !important;
        flex-direction: column;
        
        align-items: flex-start !important;
        justify-content: flex-start !important;
        padding: 150px 30px 40px 30px !important; 
        box-sizing: border-box;
        
/* Скрол довгого меню */
        overflow-y: auto !important;
        max-height: 100% !important;
        -webkit-overflow-scrolling: touch !important;

      
    }
    
    .menu-area.active { 
        display: flex !important; 
    }

    /* Анімація хрестика */
    .burger-menu.active span:nth-child(1) { transform: rotate(45deg) translate(5px, 6px); }
    .burger-menu.active span:nth-child(2) { opacity: 0; }
    .burger-menu.active span:nth-child(3) { transform: rotate(-45deg) translate(5px, -6px); }

    /* Головні пункти меню (1-й рівень) */
    .menu-area ul {
        flex-direction: column !important;
        align-items: flex-start !important;
        width: 100%;
        gap: 15px; 
       flex-wrap: nowrap !important;
    }

    .menu-area a {
        font-size: 18px !important; 
        text-align: left;
        width: 100%;
        display: block;
    }

    /* Базові пункти - відносне позиціонування для прив'язки карток */
    .menu-area li {
        width: 100%;
        flex-direction: column;
        position: relative !important;
    }

    /* ЖОРСТКЕ ПЕРЕКРИТТЯ ДЛЯ ВСІХ РІВНІВ ПІДМЕНЮ (Картки зі зсувом) */
    .menu-area li ul,
    .menu-area li li ul,
    .menu-area li li li ul,
    .menu-area li li li li ul {
        position: absolute !important;
        top: 100% !important;
        
        /* Зсув вправо */
        left: 40px !important; 
        width: calc(100% - 40px) !important; 
        
        z-index: 999 !important;
        background: var(--bg-white, #ffffff) !important; 
        box-shadow: 0px 8px 20px rgba(0,0,0,0.15) !important;
        padding: 10px 15px !important;
        border-radius: 0 0 8px 8px !important;
        display: none !important; 
        transition: none !important;
        transform: none !important;
        margin: 0 !important;
    }

    /* Показуємо тільки те підменю, яке має клас js-open */
    .menu-area li.js-open > ul {
        display: block !important;
    }

    /* Стилі для тексту 2-го рівня */
    .menu-area li ul a {
        font-size: 15px !important;
        padding: 8px 0 !important;
    }

    /* Стилі для 3-го рівня */
    .menu-area li ul li ul a {
        font-size: 14px !important;
    }



    .close-menu-btn {
        position: absolute;
        top: 25px;
        right: 30px;
        width: 30px;
        height: 30px;
        cursor: pointer;
        z-index: 9999999; /* Поверх усього */
        display: flex;
        align-items: center;
        justify-content: center;
    }

    .close-menu-btn span {
        position: absolute;
        width: 25px;
        height: 3px;
        background: var(--primary, #3E7CA2);
        display: block;
    }

    .close-menu-btn span:nth-child(1) { transform: rotate(45deg); }
    .close-menu-btn span:nth-child(2) { transform: rotate(-45deg); }
}


  


/* =================================================================
   3. ДРІБНІ КОРЕКЦІЇ ДЛЯ МЕНШИХ ЕКРАНІВ
================================================================= */
@media (max-width: 992px) {
    .menu-area ul { gap: 10px; }
    .menu-area a { font-size: 16px !important; }
}

@media (max-width: 767px) {
    .menu-area ul { gap: 8px; }
  .menu-area {
        width: 95%;} 
}





/* ===============================
   FIX FOR SLIDER UNDER MENU
================================= */

/* сдвигаем весь контент вниз, включая баннер */
body > .banner-area,
body > .site-wrapper {
  margin-top: var(--topbar-height);
}



#psychophysiology,
#effects,
#services,
#news,
#aboutus,
#works,
#specialists,
#partners,
#prices,
#contacts {
  scroll-margin-top: var(--topbar-height); /* для якорей */
}





/* Background holder */
.background-holder {
  position: fixed;
  width: 100%;
  height: 100%;
  top: 0;
  left: 0;
  z-index: -1;
}







/* ============================
   LOGO + WAVES
============================ */
/* Контейнер логотипу */
.logo-container {
  display: inline-block;
  vertical-align: middle;
}

/* Посилання-обгортка (щоб уся зона була клікабельною) */
.logo-link {
  display: flex;
  align-items: center;
  text-decoration: none;
  gap: 12px; /* Відступ між картинкою та текстом */
}

/* Налаштування картинки-логотипу */
.logo-img {
  height: 100px;       /* Задайте потрібну висоту логотипу */
  width: auto;        /* Ширина підлаштується автоматично */
  object-fit: contain;
}

/* Блок з текстом підпису */
.logo-text-group {
  display: flex;
  flex-direction: column; /* Текст підпису буде під головною назвою */
  justify-content: center;
}

/* Головний текст (назва) */
.logo-title {
  font-family: 'Nunito', sans-serif;
  font-size: 20px;
  font-weight: 700;
  color: #3E7CA2; /* Колір назви */
  line-height: 1.2;
  letter-spacing: 0.5px;
  
   
}

/* Другорядний текст (підпис) */
.logo-subtitle {
  font-size: 11px;
  color: #777777; /* Світліший колір для підпису */
  text-transform: uppercase; /* Робить літери великими */
  letter-spacing: 0.5px;
  line-height: 1.2;
  margin-top: 2px;
}

/* Адаптивність для мобільних пристроїв */
@media (max-width: 576px) {
  .logo-title {
    font-size: 12px !important;
    max-width: 90px;
    line-height: 1.1 !important;
  }
  .logo-subtitle {
    display: none; /* Ховаємо дрібний підпис на телефонах, щоб не перевантажувати шапку */
  }
  .logo-img {
    height: 40px; /* Трохи зменшуємо логотип на мобільних */
  }
  .logo-container {
        margin-left: 2px !important;  /* Чітко відсуваємо емблему вправо від бургера */
    margin-right: 80px !important;
    }
}
@media (max-width: 1024px) {
.logo-container {
        margin-left: 5px; /* Чітко відсуваємо емблему вправо від бургера */
    margin-right: 280px;
    }
  .logo-title {
    font-size: 18px;
    max-width: 80px;
    line-height: 1.1 !important;
  }
}





/* ====================== ПРЕМИУМ БЛОК (ЦВЕТА САЙТА) ====================== */
.topbar-phone-social-premium {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    font-family: 'Nunito', sans-serif;
}

/* Телефон */
.topbar-phone-container-premium {
    display: flex;
    align-items: center;
    gap: 6px;
}

.topbar-phone-icon-premium {
    width: 24px;
    height: 24px;
    fill: var(--primary);
    transition: transform 0.3s ease, fill 0.3s ease;
}

.topbar-phone-icon-premium:hover {
    transform: translateY(-2px) scale(1.2);
    fill: var(--primary-dark);
}

.topbar-phone-premium {
    font-size: 18px;
    font-weight: 600;
    color: var(--primary);
    transition: color 0.3s ease, transform 0.3s ease; text-decoration: none;
}

.topbar-phone-premium:hover {
    color: var(--primary-dark);
    transform: translateY(-2px);
}

/* Соцкнопки */
.top-right-social-premium {
    display: flex;
    justify-content: center;
    gap: 10px;
}

.soc-btn-premium {
    width: 44px;
    height: 44px;
    background: var(--primary);
    color: #fff;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 6px 16px rgba(0,0,0,0.15);
    transition: transform 0.3s ease, box-shadow 0.3s ease, background 0.3s ease;
}

.soc-btn-premium:hover {
    transform: translateY(-3px) scale(1.1);
    box-shadow: 0 10px 20px rgba(0,0,0,0.25);
    background: var(--primary-dark);
}

/* ================= Адаптив ================= */
@media (max-width: 992px) { /* планшет */
    .topbar-phone-icon-premium { width: 20px; height: 20px; }
    .topbar-phone-premium { font-size: 16px; }
    .soc-btn-premium { width: 32px; height: 32px; }
}

@media (max-width: 480px) { /* телефон */
    .topbar-phone-icon-premium { width: 16px; height: 16px; }
    .topbar-phone-premium { font-size: 10px; }
    .soc-btn-premium { width: 28px; height: 28px; }
}


/* ============================
   SLIDER
============================ */
.custom-slider {
    position: relative;
    overflow: hidden;
    width: 100%;
  height: 550px; /* Чітка висота всього слайдера на ПК (було авто) */
}

.custom-slider .slides {
    display: flex;
    transition: transform 0.6s ease-in-out;
  height: 100%;
}

.custom-slider .slide {
    min-width: 100%;
  height: 100%; /* Займає всі 450px */
    position: relative;
    overflow: hidden;
    display: flex;
    justify-content: center;
    align-items: center;
}

.custom-slider .slide img {
    width: 100%;
    height: 100% !important;
  
}


/* --- СЛАЙД 1: Стиснення на 5% + Рух вгору/вниз --- */
.slide-1 img {
  object-fit: cover !important; /* Дозволяє картинці виходити за межі рамки */
    
    /* ВАЖЛИВО: Задаємо точку відліку по центру, щоб стиснення йшло рівномірно */
    transform-origin: center center !important; 
    
    /* 1. scaleY(0.85) — СТИСКАЄ картинку по висоті на 15% (залишається 85% від оригіналу).
      2. translateY(-30px) — РУХАЄ вже стиснуту картинку ВГОРУ на 30 пікселів.
      Браузер виконує ці команди строго зліва направо!
    */
    transform: scaleY(0.95) translateY(-10px) !important;
}

/* --- СЛАЙД 2: Стиснення на 8% + Рух вгору/вниз --- */
.slide-2 img {
    object-fit: fill !important; 
    
    /* 2. Точка відліку — верхній лівий кут (це критично для правильного математичного зсуву) */
    transform-origin: top left !important; 
    
    /* scaleY(0.85) — СИЛЬНО СПЛЮЩУЄ картинку по вертикалі на 15%.
       translateY(-5%) — ПЕРЕМІЩУЄ вже сплющену картинку вгору/вниз у відсотках від її нової висоти.
    */
    transform: scaleY(1) translateY(0%) !important;
}

/* --- СЛАЙД 3: Стиснення на 3% + Рух вгору/вниз --- */
.slide-3 img {
     object-fit: fill !important; 
    
    /* 2. Точка відліку — верхній лівий кут (це критично для правильного математичного зсуву) */
    transform-origin: top left !important; 
    
    /* scaleY(0.85) — СИЛЬНО СПЛЮЩУЄ картинку по вертикалі на 15%.
       translateY(-5%) — ПЕРЕМІЩУЄ вже сплющену картинку вгору/вниз у відсотках від її нової висоти.
    */
    transform: scaleY(0.97) translateY(0%) !important;
}
/* --- СЛАЙД 4: Свій варіант (наприклад, притиснути до самого верху) --- */
.slide-4 img {
    object-position: center top !important; 
}




.slide-text {
    position: absolute;
    font-family: 'Inter', sans-serif;
    color: #fff;
    text-shadow: 2px 2px 8px rgba(0,0,0,0.4);
  pointer-events: none; /* вот ключ */
}

/* =========================
   СЛАЙД 1 — новая компоновка
========================= */

/* Общий контейнер текста */
.slide1-text {
  position: absolute;
  inset: 0;              /* занимает весь слайд */
  pointer-events: none;
}

/* Заголовок — слева сверху */
.slide1-text h2 {
  position: absolute;
  top: 40px;
  left: 50px;

  font-size: 36px;
  font-weight: 600;
line-height: 1.4;

  
}

/* Текст — справа снизу */
.slide1-text p {
  position: absolute;
  right: 35px;
  bottom: 25px;

  max-width: 35%;
  text-align: center;

  font-size: 21px;
  line-height: 1.3;
  font-weight: 600;
  

  
}

/* ===============================
   СЛАЙД 2 — DESKTOP (по умолчанию)
=============================== */

.slide2-text {
  position: absolute;
  left: 0;
  right: 0;
  top: 0;      /* Змінюємо з bottom на top, щоб весь блок був зверху */
  bottom: 0;   /* Розтягуємо на всю висоту */
  padding: 6px 0px;   /* отступы от краёв на ПК */
  text-align: center;

  color: #3E7CA2;
}

/* Заголовок — первая строка */
.slide2-text h2 {
 position: absolute;
  top: 17px;   /* Відступ від верхнього краю слайда */
  left: 0;
  right: 0;
  
  font-size: 23px;
  margin: 0;
  line-height: 1.3;
  white-space: nowrap;
  font-weight: 600;
}

/* Вторая строка — на всю ширину с blur */
.slide2-text p {
  position: absolute;
  bottom: 25px; /* Відступ від нижнього краю */
  left: 0;
  right: 0;
  
  margin: 0 auto;
  padding: 6px 0;
  font-size: 20px;
  line-height: 1.25;
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  width: 100%;
  max-width: 100%;
color: #ffffff; /* Білий колір тексту */
  background: rgba(128, 128, 128, 0.4); /* менее плотная */
  backdrop-filter: blur(3px);
  -webkit-backdrop-filter: blur(3px);
   white-space: normal;       /* Дозволяє стандартне перенесення рядків */
}

/* =========================
   СЛАЙД 3 — новая компоновка как Слайд 1
========================= */

/* Общий контейнер текста */
.slide3-text {
  position: absolute;
  inset: 0;              /* занимает весь слайд */
  pointer-events: none;
}

/* Заголовок — слева сверху */
.slide3-text h2 {
  position: absolute;
  top: 40px;
  left: 50px;

  font-size: 32px;
  line-height: 1.4;
  font-weight: 600;
text-align: center;
  
}

/* Текст — справа снизу */
.slide3-text p {
  position: absolute;
  right: 35px;
  bottom: 30px;

  max-width: 30%;
  text-align: center;

  font-size: 21px;
  line-height: 1.3;
  font-weight: 600;

  
}



/* Слайд 4 */
   .slide4-text { left: 50px; top:25px; }
    .slide4-text h2 { font-size: 35px; margin-bottom: 20px; 
                 

}
    .slide4-text p { font-size: 22px; 
              font-weight: 600;   /* ← насыщеннее */       margin-top:0px; 
                   
                
   }



/* Стрілки */
.slider-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(95, 165, 209, 0.5);
    border: none;
  border-radius: 50%;
    padding: 0;
   height: 30px;       /* висота кнопки */
  width: 35px;        /* ширина кнопки */
    font-size: 15px;
    color: #fff;
    cursor: pointer;
    z-index: 9999;
  pointer-events: auto;
}

/* Hover */
.slider-btn:hover {
    background: rgba(95, 165, 209, 0.8);
}

.slider-btn.prev { left: 10px; }
.slider-btn.next { right: 10px; }

/* Точки */
.slider-dots {
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 8px;
}

.slider-dots div {
    width: 10px;
    height: 10px;
    background: #fff;
    opacity: 0.5;
    border-radius: 50%;
}

.slider-dots .active { opacity: 1; }

/* ============================
   RESPONSIVE
============================ */
@media (max-width: 996px) {
  /* Додаємо фіксацію висоти для планшетів */
.custom-slider {
      height: 350px; 
  }

  .slide1-text h2 {
    font-size: 26px;
    top: 25px; /* Підтискаємо до верху */
    left: 35px;
  }
  .slide1-text p {
    font-size: 16px;
    max-width: 25%;
    right: 20px;
    bottom: 25px;
  }



.slide2-text {
    top: 4px;
    padding: 2px 0;
  }

  .slide2-text h2 {
    font-size: 20px;
    line-height: 1.2;
     
  }
  
.slide2-text p {
    font-size: 17px;
    padding: 2px 0;
    line-height: 1.3;
margin: 3px auto 0;
     white-space: normal;       /* Дозволяє стандартне перенесення рядків */
    background: rgba(255, 255, 255, 0.35);
    backdrop-filter: blur(2px);
    -webkit-backdrop-filter: blur(2px);
  }

  
 .slide3-text h2 {
    font-size: 26px;
    top: 30px;
    left: 40px;
  }
  .slide3-text p {
    font-size: 16px;
    max-width: 30%;
    right: 30px;
    bottom: 20px;
  }

  


    .slide4-text { left: 20px; top:15px; }
    .slide4-text h2 { font-size: 25px; margin-bottom: 1px; }
    .slide4-text p { font-size: 20px; margin-top:0px; }
}

@media (max-width: 480px) {
    .logo-container { padding-left: 5px; margin-bottom: 0; }
    .logo-text { font-size: 20px; }
    .logo-wave { width: 82px; height: 20px; margin-top: -3px; }

    .custom-slider {
        height: 180px; 
    }

    .slide1-text h2 {
        font-size: 12px;
        top: 12px; /* Максимально вгору */
        left: 17px;
    }
    .slide1-text p {
        font-size:10px;
        max-width: 30%;
        right: 5px;
        bottom: 10px; /* Максимально вниз */
    }
  
  /* ===============================
   СЛАЙД 2 — MOBILE
=============================== */


  .slide2-text {
    top: 2px;
   
  }

  .slide2-text h2 {
    font-size: 10px;

top: 3px;
  }

 

.slide2-text p {
        font-size: 10px;
        padding: 2px 0px; /* Додав трохи падінгів по боках для краси */
        line-height: 1.3;
        margin: 1px auto 0;
        
        /* Дозволяємо перенесення тексту */
       
      
        white-space: normal;       /* Дозволяє стандартне перенесення рядків */
        overflow-wrap: break-word;




    background: rgba(255, 255, 255, 0.35);
    backdrop-filter: blur(2px);
    -webkit-backdrop-filter: blur(2px);
  }



    /* ========== СЛАЙД 3 — MOBILE ========== */
  .slide3-text h2 {
    
    font-size: 13px;
    top:10px;
    left: 15px;
    
  }

  .slide3-text p {
    font-size: 10px;
   max-width: 40%;

    right: 3px;
    bottom: 3px;
  }


  

   .slide4-text { left: 10px; top: 3px; }
    .slide4-text h2 { font-size: 14px; margin-bottom: 1px; }
    .slide4-text p { font-size: 11px; margin-top:0px; }

  
    .slider-btn { padding: 0; height: 22px;       /* висота кнопки */
  width: 20px;        /* ширина кнопки */ font-size: 10px; }
    .menu-area ul { gap: 15px; padding: 0 10px; overflow-x: auto; }
    .menu-area a { font-size: 12px; padding: 8px 4px; }
}







/* ========== ROOT / ПЕРЕМЕННЫЕ ========== */
:root{
  --primary: #3E7CA2;
  --primary-dark: #2a5873;
  --accent: #5FA5D1;
  
  --bg-white: #FFFFFF;
  --text: #3E7CA2;
  --muted: #4D4D4D;
  --card-shadow: 0 6px 22px rgba(0,0,0,0.08);
  --card-shadow-strong: 0 12px 30px rgba(0,0,0,0.14);
  --float-shadow: 0 20px 40px rgba(0,0,0,0.20), 0 10px 20px rgba(0,0,0,0.15);
  --radius: 12px;

  /* Типографика — основная */
  --h1: 42px;
  --h2: 32px;
  --h3: 26px;
  --lead: 18px;
  --line-height: 1.65;
  --heading-weight: 600; /* легкая/умеренная жирность для заголовков */
  --body-weight: 400;
}

/* ========== БАЗОВАЯ ТИПОГРАФИКА (не трогает topbar/menu/logo) ========== */
body { font-family: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif; color: var(--muted);
   }

.section { padding: 20px 20px; position: relative; z-index: 2; }

.section-white { background: var(--bg-white); }
.container { max-width: 1200px; margin: 0 auto; box-sizing: border-box; }

/* Типографика внутри секций — единая система */
.section h1, .section h2, .section h3, .section h4, .section h5, .section h6 {
  color: var(--primary);
  font-weight: var(--heading-weight);
  margin: 0 0 12px 0;
  line-height: 1.15;
  font-family: "Inter", sans-serif;
text-align: center;
}

/* единая сетка заголовков */
.section h1 { font-size: var(--h1); }
.section h2 { font-size: var(--h2); }
.section h3 { font-size: var(--h3); }
.section h4 { font-size: 20px; }
.section h5 { font-size: 18px; }
.section h6 { font-size: 16px; }

/* базовый текст */
.section p, .section li, .section span, .section td, .section th {
  color: var(--text);
  font-size: var(--lead);
  font-weight: var(--body-weight);
  line-height: var(--line-height);
  margin: 0 0 14px 0;
text-align: justify;
  text-justify: inter-word;
  hyphens: auto;

}

/* заголовок секции (унифицирован) */
.section-title {
  font-size: var(--h2);
  color: var(--primary);
  margin-bottom: 20px;
  text-align: center;
  font-weight: var(--heading-weight);
}





/* ========== КАРТОЧКИ / ОБЩИЕ БЛОКИ ========== */
.card {
  
  border-radius: var(--radius);
  padding: 18px;
  box-shadow: var(--card-shadow);
  color: var(--primary);
  transition: transform .28s, box-shadow .28s;
}
.card:hover { transform: translateY(-6px); box-shadow: 0 12px 36px rgba(0,0,0,0.12); }

.card-img { width:100%; height:auto; display:block; border-radius:10px; object-fit:cover; }

/* Сетки */
.grid { display:grid; gap: 28px; box-sizing: border-box; }
.grid-4 { grid-template-columns: repeat(4, 1fr); }
.grid-2 { grid-template-columns: repeat(2, 1fr); }

/* ========== ГРУППА 1 — Пресотерапія (psychophysiology) ========== */
/* Текст — просто на фоне страницы; картинка — справа (парящий card) */
#psychophysiology .section-light { background: inherit; }
#psychophysiology .container { padding: 0; box-sizing: border-box; }

/* универсальный flex wrapper — используй класс press-flex в модуле */
#psychophysiology .press-flex,
#psychophysiology .container.main-top,
#psychophysiology .container > .press-flex {
  display: flex;
  align-items: center;
  gap: 36px;
  flex-wrap: wrap;
}

/* текст — НЕ в карточке, на фоне */
#psychophysiology .press-flex .text-block,
#psychophysiology .text-block {
  background: transparent !important;
  box-shadow: none !important;
  padding: 0 !important;
  color: var(--primary);
  font-size: var(--lead);
  line-height: var(--line-height);
  flex: 1 1 55%;
}

/* img card — справа, парит над фоном */
#psychophysiology .press-flex .img-card,
#psychophysiology .press-flex > .card {
  background: #fff;
  box-shadow: var(--card-shadow-strong);
  border-radius: 14px;
  padding: 0;
  flex: 1 1 40%;
  overflow: hidden;
}

/* картинка внутри */
#psychophysiology .press-flex .img-card img,
#psychophysiology .press-flex > .card .card-img {
  width: 100%;
  display: block;
}

/* ========== ГРУППА 2 — Ефекти (effects) ========== */
#effects .container { padding: 0 15px; }
#effects .effects-grid { display: grid; grid-template-columns: repeat(4,1fr); gap: 20px; }

/* Налаштування картинок (обмежуємо їх, щоб вони були акуратними) */
#effects .card img {
  width: 100%;
  height: 160px;        /* Фіксована висота */
  object-fit: cover;    /* Картинка заповнює простір без деформації */
  border-radius: 8px;
  margin-bottom: 16px;
}


/* карточки эффектов — белые, с закруглением */
#effects .effects-grid .card {
  background: #f2f2f2;;
  color: var(--primary);
  padding: 18px;
  border-radius: 12px;
  box-shadow: var(--card-shadow);
}

#effects h3 {
  font-size: 18px;
}

#effects .effects-grid .card img {
  margin-bottom: 16px;  /* расстояние от картинки до текста */
}

#effects .effects-grid .card h3 {
  margin-top: 8px;
  margin-bottom: 10px;
}

#effects .effects-grid .card p {
  margin-top: 0;
}

/* СТИЛЬ ДЛЯ ПОСИЛАНЬ НА СТАТТІ */
.article-links {
  margin-top: 15px;
  border-top: 1px solid #eee;
  padding-top: 10px;
}
.article-links a {
  display: block;
  font-size: 15px;
  color: #3E7CA2;
  text-decoration: none;
  margin-bottom: 5px;
  transition: 0.3s;
}
.article-links a:hover { color: var(--primary-dark); text-decoration: underline; }


#effects .card h3 a.h3-link {
  color: #3E7CA2; /* Або вкажіть потрібний колір, наприклад #333 */
  text-decoration: none; /* Прибирає підкреслення */
  transition: color 0.3s ease;
}

#effects .card h3 a.h3-link:hover {
  color: #3E7CA2; /* Колір при наведенні */
  text-decoration: underline;
}






/* ========== ГРУППА 3 — Ефекти (effects) ========== */
/* Базовий контейнер сітки */
#services .services-grid {
  display: grid;
  /* repeat(7, 1fr) — це 7 колонок, якщо іконок 6, краще поставити repeat(6, 1fr) */
  grid-template-columns: repeat(8, 1fr); 
  gap: 15px; /* Відстань між іконками */
  padding: 30px;
  
}

/* Прибираємо оформлення карток (рамки, тіні) */
#services .services-grid .card {
  background: none;
  box-shadow: none;
  padding: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}

/* Налаштування картинки */
#services .card img {
  width: 110px;      /* Фіксована ширина для всіх */
  height: 110px;     /* Фіксована висота, якщо потрібно */
  object-fit: contain; /* Картинка не обрізається, а вписується в розмір */
  margin-bottom: 15px;
  
}

/* Текст під картинкою */
#services .services-grid .card h3 {
  font-size: 14px;
  color: #ffffff;
  margin: 0;
  line-height: 1.2;
}

/* Посилання (якщо вони окремо) */
#services .article-links {
  border: none;
  margin-top: 5px;
}
#services .article-links a {
  display: block;
  font-size: 15px;
  color: #ffffff !important;
  text-decoration: none;
  margin-bottom: 5px;
  transition: 0.3s;
}
.article-links a:hover { color: var(--primary-dark); text-decoration: underline; }


#services .card h3 a.h3-link {
  color: #ffffff; /* Або вкажіть потрібний колір, наприклад #333 */
  text-decoration: none; /* Прибирає підкреслення */
  transition: color 0.3s ease;
}

#services .card h3 a.h3-link:hover {
  color: #ffffff; /* Колір при наведенні */
  text-decoration: underline;
}



/* НОВИНИ */
.section-title {
    margin-bottom: 7px !important; /* Було, наприклад, 30px або 50px */
}
.news-container {
  display: flex;
  gap: 60px;
 
  flex-wrap: wrap; /* Для мобільних */
  align-items: flex-start;
  padding-top: 5px !important; /* Зменшуємо відступ зверху */
    margin-top: 0 !important;     /* Прибираємо зовнішній відступ, якщо він є */
}
/* Робимо колір для заголовка-посилання */
.h3-link {
    color: #3E7CA2 !important;
    text-decoration: none !important;
}

.h3-link:hover {
    color: #2c5a75 !important;
}



/* Ліва колонка (список) */
.news-list-column {
  flex: 1;
  min-width: 300px;
  height: 315px; /* Жорстко фіксуємо висоту, щоб збігалася з відео */
}



.news-links li {
  margin-bottom: 15px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.2);
  padding-bottom: 10px;
}

.news-links a {
  font-size: 18px;
  color: #3E7CA2;
  text-decoration: none;
  font-weight: 500;
  transition: 0.3s;
}

.news-links a:hover {
  text-decoration: underline;
  color: #3E7CA2;
}


/* Блок, що обмежує висоту і включає скрол */
.scrollable-news {
  height: 100%; /* Займає всю висоту колонки (315px) */
  overflow-y: auto; /* Скрол з'явиться ТІЛЬКИ тоді, коли контенту стане більше за 315px */
  padding-right: 10px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 8px;
  background: transparent !important;
  -webkit-overflow-scrolling: touch;
}

/* Кастомізація скролбару (щоб виглядав сучасно) */
.scrollable-news::-webkit-scrollbar {
  width: 8px;
}
.scrollable-news::-webkit-scrollbar-thumb {
  background-color: #3E7CA2;
  border-radius: 3px;
}

/* Налаштування списку всередині скролу */
.news-links {
  margin: 0;
  padding: 10px;
}


/* Відео колонка */
.video-column {
  flex: 0 0 40%;
  min-width: 300px;
  height: 315px; /* Фіксуємо висоту для синхронізації */
}

.video-block {
  height: 100%; /* Займає 315px */
  padding-bottom: 0; /* Прибираємо паддінг, бо висота фіксована */
}

.video-block iframe {
  width: 100%;
  height: 100%;
  border-radius: 12px;
  box-shadow: 0 4px 15px rgba(0,0,0,0.3);
}

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

/* 1. Налаштування для iPad та планшетів (екран від 769px до 1024px) */
@media (max-width: 1024px) {
  .news-container {
    gap: 25px !important;    
    flex-wrap: nowrap !important; 
  }

  .news-list-column {
    flex: 1 1 55% !important; 
    height: 315px !important; /* Тримаємо висоту */
  }

  /* Форсуємо роботу скролу на планшетах */
  .scrollable-news {
    height: 315px !important;
    overflow-y: auto !important;
   display: block !important;
    -webkit-overflow-scrolling: touch !important;
  }

  .video-column {
    flex: 0 0 42% !important; 
    min-width: 290px !important;
    height: 315px !important;
  }
}

/* 2. Налаштування для мобільних телефонів (екран до 768px) */
@media (max-width: 768px) {
  .news-container {
    flex-direction: column !important; 
    align-items: center !important;
    gap: 20px !important;
  }

  .news-list-column {
    width: 100% !important;
    /* ВИПРАВЛЕНО: Замість auto ставимо чітку висоту, щоб оживити скрол */
   height: 280px !important;   /* Трохи зменшили для екранів телефонів */
    max-height: 280px !important;
  }

  /* Гарантуємо появу скролбару на смартфонах */
  .scrollable-news {
    height: 100% !important;
    overflow-y: auto !important; /* Увімкнено примусово */
    display: block !important;
  }

  .video-column {
    width: 100% !important;
    max-width: 500px !important;   
    height: auto !important;       
  }

  .video-block {
    height: auto !important;
    aspect-ratio: 16 / 9 !important; 
  }
}

/* Дрібні правки для дуже широких екранів */
@media (min-width: 1400px) {
  .container { max-width: 1300px; }
}

/* ========== ГРУППА 5 — Чому ми + слайдер (aboutus + works) ========== */

#aboutus.section-light { background: inherit; }

#aboutus .container { padding: 0; box-sizing: border-box; }





/* Зменшуємо висоту секції aboutus */

#aboutus.section-light {

  padding: 10px 10px!important;

}





/* обёртка — текст слева, слайдер справа */

#aboutus .aboutus-wrap {

  display: flex;

  align-items: center;

  gap: 30px;

  flex-wrap: wrap;

}



/* текстовая колонка — на фоне */

#aboutus .aboutus-wrap .text-block {

  flex: 1 1 48%;

  background: transparent !important;

  box-shadow: none !important;

  padding: 0 !important;

  color: var(--primary);

}



/* Зменшуємо відступи між абзацами тексту */

#aboutus .text-block p {

  margin-top: 0;

  margin-bottom: 8px;    /* Маленький акуратний відступ замість стандартного величезного */

  line-height: 1.5;      /* Оптимальна щільність строк */

}


/* Слайдер — права колонка (Фіксовані розміри для ПК) */
#aboutus #works-slider,
#aboutus #aboutus-slider {
  flex: 0 0 290px;        
  width: 290px;
  height: 410px;          /* Чітко фіксуємо висоту всього блоку */
  overflow: hidden;
  position: relative;
  border-radius: 16px;
  background: #fff;
  box-shadow: var(--float-shadow);
  transform: translateZ(0);
}



/* Стрічка слайдів: прибираємо звідси padding, який ламав висоту */
#aboutus #works-slider .slides,
#aboutus #aboutus-slider .slides {
  display: flex;
  height: 100%;
  transition: transform 0.6s ease;
}



/* Коробка самого слайда (Створюємо "безпечну зону" для кнопок знизу) */
#aboutus #works-slider .slide,
#aboutus #aboutus-slider .slide {
  min-width: 100%;
  width: 100%;
  height: 100%;
  box-sizing: border-box;
  display: flex;          
  flex-direction: column;
  justify-content: center;
  align-items: center;
  /* 50px знизу гарантують, що жодна картинка не влетить під кнопки */
  padding: 15px 15px 42px 15px; 
  position: relative;
}

/* Обгортка для посилань (забезпечує правильне центрування фото) */
#aboutus #works-slider .slide a,
#aboutus #aboutus-slider .slide a {
  display: flex;
  justify-content: center;
  align-items: center;
  width: 100%;
  height: 100%;
}

/* Сама картинка: ідеально вписується, не обрізається і центрована */
#aboutus #works-slider img,
#aboutus #aboutus-slider img { 
  max-width: 100%;          
  max-height: 100%;        
  width: auto;            
  height: auto;            
  display: block; 
  border-radius: 12px;    
  object-fit: contain;    /* Вписує фото цілком без обрізань */
  box-shadow: 0 4px 10px rgba(0,0,0,0.08);
}



/* Обгортка всередині слайда, яка тримає фото і текст */
#aboutus .slide .slide-content {
  display: flex;
  flex-direction: column; 
  align-items: center;    
  justify-content: center;
  width: 100%;
  height: 100%;
}

/* Якщо є підпис, обмежуємо висоту посилання, щоб лишилось місце для тексту */
#aboutus .slide .slide-content a {
  height: calc(100% - 28px);
}

/* Стиль самого підпису (адаптований під вузький слайдер) */
#aboutus .slide .slide-caption {
  margin-top: 2px;        
  font-size: 24px;        /* Оптимальний розмір для блоку 290px */
  color: #3E7CA2;         
  font-weight: bold;      
  text-align: center;     
  width: 100%;
  box-sizing: border-box;
}




/* ===== Стрелки для aboutus-slider ===== */

#aboutus #aboutus-slider {

  position: relative; /* важно для абсолютного позиционирования стрелок */

}


#aboutus #aboutus-slider .prev,
#aboutus #aboutus-slider .next {
  position: absolute;
  bottom: 10px;       /* Кнопки підняті над нижнім краєм */
  background: rgba(95, 165, 209, 0.5);
  border: none;
  padding: 0;
  height: 25px;       
  width: 30px;        
  font-size: 18px;
  color: #fff;
  cursor: pointer;
  border-radius: 6px;
  z-index: 10;
  pointer-events: auto;
  user-select: none;
transition: background 0.2s ease, transform 0.2s ease;
}

/* Розносимо кнопки по кутах у самому низу (для ПК) */
#aboutus #aboutus-slider .prev {
  left: 10px !important;
  bottom: 6px !important;       /* Опустили максимально низько до краю */
  top: auto !important;          /* Скидаємо центрування по висоті */
  transform: none !important;    /* Прибираємо зсув вгору, який все ламав */
}

#aboutus #aboutus-slider .next {
  right: 10px !important;
  bottom: 6px !important;      /* Опустили максимально низько до краю */
  top: auto !important;         /* Скидаємо центрування по висоті */
  transform: none !important;   /* Прибираємо зсув вгору, який все ламав */
}





@media (max-width: 1024px) {
  #aboutus .aboutus-wrap { 
    flex-direction: column !important; 
    text-align: center !important; 
    align-items: center !important; 
  }
  
  #aboutus .aboutus-wrap .text-block { 
    width: 100% !important; 
    margin-bottom: 24px !important; 
    text-align: center !important; 
  }
  
  /* Корекція розмірів слайдера для iPad та смартфонів */
  #aboutus #aboutus-slider,
  #aboutus #works-slider {
    width: 90% !important;
    max-width: 310px !important; /* Трохи розширюємо на мобільних */
    height: 430px !important;    /* Фіксована висота, щоб вертикальні ліцензії не обрізалися */
    margin: 0 auto !important;   /* Центруємо весь слайдер на екрані */
    border-radius: 12px;
    box-shadow: var(--float-shadow);
  }
  
  /* Зверніть увагу: МИ Повністю видалили зламаний код з ::before! */
}

/* Корекція кнопок для смартфонів (розкидуємо по боках знизу) */
@media (max-width: 767px) {
  #aboutus #aboutus-slider .prev {
    left: 15px !important;
    transform: none !important;
    bottom: 12px !important;
  }
  #aboutus #aboutus-slider .next {
    right: 15px !important;
    transform: none !important;
    bottom: 12px !important;
  }

  #aboutus .slide .slide-caption {
      
  font-size: 16px;
}
 }
/* Дрібні правки для дуже широких екранів */
@media (min-width: 1400px) {
  .container { max-width: 1300px; }
}






/* ========== ГРУППА Спеціалісти ========== */
#specialists .container { padding: 0 20px; }
#specialists .specialists-grid { display: grid; grid-template-columns: repeat(3,1fr); gap: 70px; }

/* Налаштування картинок (обмежуємо їх, щоб вони були акуратними) */
#specialists .card img {
 display: block;        /* Дозволяє центрувати через margin */
  margin: 0 auto 16px;   /* Центруємо горизонтально і додаємо відступ знизу */
  width: 70%;
  height: 260px;        /* Фіксована висота */
  object-fit: contain;    /* Картинка заповнює простір без деформації */
  border-radius: 8px;
  
}


/* карточки эффектов — белые, с закруглением */
#specialists .specialists-grid .card {
  background:  #f2f2f2;
  color: #FFFFFF;
  padding: 10px;
  border-radius: 12px;
  box-shadow: var(--card-shadow);
  text-align: center;    /* Центруємо текст */
}

#specialists h3 {
 
  font-size: 18px;
}

#specialists .specialists-grid .card img {
  margin-bottom: 16px;  /* расстояние от картинки до текста */
}

#specialists .specialists-grid .card h3 {
  margin-top: 8px;
  margin-bottom: 5px;
  font-size: 18px;
  
}

#specialists .specialists-grid .card p {
  margin-top: 0;
  font-size: 15px;
  margin-bottom: 8px; /* зменшено відступ під абзацом */
  line-height: 1.3;    /* зменшено міжрядковий інтервал */
 
}
/* 2. Налаштовуємо кнопку "Читати більше" */
#specialists .specialists-grid .card .read-more-btn {
  
  margin-top: 5px;    /* зменшено відстань від тексту до кнопки */}



/* ========== ГРУППА 3 — Наші партнери (partners) ========== */

/* Використовуємо ID секції, яку ви створили в HTML */
#partners-section.section-white { 
    background: #ffffff; 
    padding: 30px 0; /* Додано відступи зверху/знизу для краси */
}

/* Налаштування контейнера */
#partners-section .container { 
    max-width: 95%; 
    margin: 0 auto;
    padding: 0 20px; 
}

/* Центрування блоку */
.partners-section-wrapper {
    width: 100%;
    text-align: center;
}

/* Змінюємо фон на світло-сірий */
.partners-card {
    background-color: #f2f2f2; /* Світло-сірий фон */
    border: 1px solid #e0e0e0; /* Легка сіра рамка */
    padding: 30px; /* Збільшив відступи для солідності */
    border-radius: 16px;
    text-align: center !important;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05); /* Легка сіра тінь */
    margin: 10px 0;
}

.partners-main-title {
    font-size: 30px !important;
    color: #3E7CA2 !important; /* Змінив колір на темно-сірий для гармонії */
    margin-bottom: 10px !important;
}

.partners-intro-text {
    font-size: 18px;
    text-align: center !important;
    color: #555555 !important;
    margin-bottom: 10px !important;
}

/* Змінюємо кнопку на світло-сірий фон */
.partners-article-link {
    display: block; /* Зробили block, щоб кнопка розтягнулася на ширину контенту/блоку */
    width: 100%;    /* Кнопка на всю ширину картки */
   max-width: 800px;
    margin: 0 auto;   /* Центруємо кнопку */
    padding: 15px 15px; 
    background-color: #3E7CA2; /* Світло-сірий фон кнопки */
    color: #ffffff !important; /* Темний текст на світлому фоні */
    border-radius: 8px;
    text-decoration: none !important;
    font-weight: 600;
    transition: background 0.3s ease;
}

.partners-article-link:hover {
    background-color: #2c5a75; /* Трохи темніший сірий при наведенні */
}






/* ========== ГРУППА 6 — ЦІНИ (prices) ========== */
#prices.section-white { background: var(--bg-white); }
#prices .container { padding: 0; box-sizing: border-box; }

/* 1. Блок-обгортка зі скролом (як у новинах) */
.scrollable-prices {
    height: 400px; /* Жорстка висота для комп'ютерів. Можете змінити на 350px або 450px */
    overflow-y: auto; /* Вертикальний скрол */
    overflow-x: auto; /* Горизонтальний скрол (рятує на мобільних, якщо таблиця заширока) */
    margin-top: 25px;
  margin-bottom: 40px;
    border-radius: 12px;
    box-shadow: var(--card-shadow);
    background: #fff;
    border: 1px solid #eee;
    -webkit-overflow-scrolling: touch; /* Плавний скрол на iOS */
}

.prices-table {
  width: 100%;
  border-collapse: collapse;
 
  background: #fff;
}

.prices-table th, .prices-table td {
  padding: 14px;
  text-align: center;
  border-bottom: 1px solid #eee;
  color: var(--text);
  font-size: var(--lead);
}

.prices-table th {
  background: var(--primary);
    color: #fff;
    font-weight: 600;
    position: sticky; /*  Заголовок таблиці "заліпає" вгорі при скролі (дуже зручно!) */
    top: 0;
    z-index: 2;
}

#prices .prices-table tr:nth-child(odd) td { background: #f2f2f2; }
#prices .prices-table tr:nth-child(even) td { background: #FFFFFF; }

/* 3. Кастомізація скролбару цін під ваш бренд-колір */
.scrollable-prices::-webkit-scrollbar {
    width: 8px;
    height: 8px; /* Висота горизонтального повзунка */
}
.scrollable-prices::-webkit-scrollbar-thumb {
    background-color: #3E7CA2;
    border-radius: 4px;
}
.scrollable-prices::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 4px;
}

/* ========== ГРУППА 7 — Контакти ========== */
#contacts.section-light { background: inherit; }

#contacts .section-block {
  background: #fff;
  padding: 20px;
  border-radius: 12px;
  box-shadow: 0 6px 20px rgba(0,0,0,0.06);
  text-align: center; /* центрируем все элементы внутри блока */
}

/* Телефон */
.contact-link {
  color: var(--primary);
  text-decoration: none;
  font-weight: 600;
  font-size: 24px;
  transition: color 0.3s ease, transform 0.3s ease;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

/* Иконка трубки перед номером */
.contact-link::before {
  content: "\260E"; /* Unicode для телефона ☎ */
  font-size: 1.1em;
  display: inline-block;
  transition: transform 0.6s ease;
}

/* Пульсация при наведении */
.contact-link:hover::before {
  transform: scale(1.3);
  color: var(--primary-dark);
}

.contact-link:hover { color: var(--primary-dark); }

/* Часы работы */
.contact-hours {
  color: var(--muted);
  font-size: 18px;
  margin: 4px 0 12px;
}

/* Адрес */
#contacts p { font-size: 18px; line-height: 1.6; color: #3E7CA2; }

/* Соцкнопки */
#contacts .socials {
  display: flex;
  justify-content: center;
  gap: 8px;
  margin-top: 15px;
}

.soc-btn {
  width: 44px;
  height: 44px;
  background: var(--primary);
  color: #fff;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  transition: transform 0.3s ease, background 0.3s ease;
  animation: pulse 2s infinite alternate;
}

.soc-btn:hover {
  background: var(--primary-dark);
  transform: scale(1.2);
}

/* Анимация пульса */
@keyframes pulse {
  0% { transform: scale(1); }
  50% { transform: scale(1.1); }
  100% { transform: scale(1); }
}

/* Контактная карта адаптив */
#contacts .map-block iframe { width: 100%; height: 320px; border-radius: 8px; border: 0; }

/* ========== Адаптив ========== */
@media (max-width: 768px) {
  .contact-link { font-size: 18px; }
  .contact-hours { font-size: 16px; }
  .soc-btn { width: 36px; height: 36px; }
  #contacts .map-block iframe { height: 240px; }
}

@media (max-width: 480px) {
  .contact-link { font-size: 18px; }
  .contact-hours { font-size: 13px; }
  .soc-btn { width: 32px; height: 32px; }
  #contacts .map-block iframe { height: 200px; }
}

/* ========== УТИЛИТЫ ========== */
.clear { clear: both; }
.text-center { text-align: center; }



/* ========== АДАПТИВ — ВСЕ МЕДИА ВНИЗЕ ========== */

/* Планшет: iPad landscape / portrait breakpoint (768 - 991px) */
@media (min-width: 768px) and (max-width: 991px) {
  /* psychophysiology и aboutus 50/50 на планшете */
  #psychophysiology .press-flex,
  #aboutus .aboutus-wrap { 
    flex-direction: row; 
  }

  #psychophysiology .press-flex .text-block,
  #psychophysiology .press-flex .img-card,
  #aboutus .text-block,
  #aboutus #aboutus-slider { 
    flex: 1 1 48%; 
    max-width: none; 
  }

  


/* partners: картинка - текст - картинка (по центру) */
  #partners .partners-flex { 
    flex-wrap: nowrap; 
  }
  #partners .partners-flex .card { 
    flex: 0 0 28%; 
  }


/* Змінюємо кнопку на світло-сірий фон */
#partners .partners-article-link {
    
   max-width: 600px; }


/* Змінюємо кнопку на світло-сірий фон */
#prices .partners-article-link {
    
   max-width: 600px ; }

 #prices  .scrollable-prices {
    height: 280px !important; /* Робимо компактною на телефонах */
}

#prices .prices-table th, .prices-table td {
    padding: 10px 8px !important; /* Зменшуємо внутрішні відступи в таблиці, щоб влазило більше тексту */
    font-size: 14px !important;    /* Зменшуємо шрифт */
}
 #prices .scrollable-prices {
        height: 280px !important; 
        margin-bottom: 25px !important; /* ДОДАЙТЕ СЮДИ (щоб на телефонах відступ був акуратним) */
    }
  
/* Effects grid -> 2 в ряд на планшете */
  #effects .effects-grid { 
    grid-template-columns: repeat(2, 1fr); 
    gap: 20px; 
  }


/* Effects grid -> 2 в ряд на планшете */
  #specialists .specialists-grid { 
    grid-template-columns: repeat(3, 1fr); 
    gap: 20px; 
  }
  
  
  /* Effects grid -> 2 в ряд на планшете */
  #services .services-grid { 
    grid-template-columns: repeat(2, 1fr); 
    gap: 20px; 
  }
}



/* Мобильная адаптация (телефон) — делаем блоки колонками, слайдер full-width квадрат */
@media (max-width: 767px) {
  /* Общие поправки */
  .section { padding: 28px 14px; }

  /* psychophysiology — вертикально */
  #psychophysiology .press-flex { 
    flex-direction: column; 
    gap: 18px; 
  }
  #psychophysiology .press-flex .text-block { 
    order: 1; 
    width: 100%; 
    text-align: left; 
  }
  #psychophysiology .press-flex .img-card { 
    order: 2; 
    width: 100%; 
    max-width: 100%; 
  }

  /* Effects — 1 в ряд */
  #effects .effects-grid { 
    grid-template-columns: 1fr; 
    gap: 16px; 
  }

 /* Effects — 1 в ряд */
  #specialists .specialists-grid { 
    grid-template-columns: 1fr; 
    gap: 16px; 
  }

  
/* Effects — 1 в ряд */
  #services .services-grid { 
    grid-template-columns: 1fr; 
    gap: 16px; 
  }
  
  
/* partners — вертикально */
  #partners .partners-flex { 
    flex-direction: column; 
    gap: 18px; 
  }
  #partners .partners-flex .card { 
    width: 100%; 
    flex: 1 1 100%; 
  }
  #partners .partners-flex .text-block { 
    width: 100%; 
    text-align: left; 
  }

/* Змінюємо кнопку на світло-сірий фон */
#partners .partners-article-link {
    
   max-width: 200px; }


/* Змінюємо кнопку на світло-сірий фон */
#prices .partners-article-link {
    
   max-width: 200px; }

 #prices  .scrollable-prices {
    height: 280px !important; /* Робимо компактною на телефонах */
}

#prices .prices-table th, .prices-table td {
    padding: 10px 8px !important; /* Зменшуємо внутрішні відступи в таблиці, щоб влазило більше тексту */
    font-size: 14px !important;    /* Зменшуємо шрифт */
}

  #prices .scrollable-prices {
        height: 280px !important; 
        margin-bottom: 25px !important; /*  ДОДАЙТЕ СЮДИ (щоб на телефонах відступ був акуратним) */
    }
  
  /* group-4 — 1 в ряд */
  .group-4 .effects-grid { 
    flex-direction: column; 
    gap: 16px; 
    width: 100%; 
  }
  .group-4 .effect-card { 
    width: 100%; 
  }


/* Змінюємо кнопку на світло-сірий фон */
#contacts  .partners-article-link {
    
   max-width: 200px; }

 } 


/* ============================================
   Універсальна система "Читати більше"
   Працює для ВСІХ модулів
   Але КОЖНИЙ модуль має свою max-height (варіант 2)
============================================ */

.more-wrapper, main .more-wrapper {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.45s ease;
}

.more-wrapper.open, main .more-wrapper.open {
    max-height: 2000px;
}

.btn-more, main .btn-more {
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    margin-top: 12px;
    user-select: none;
    color: #3E7CA2;
    font-weight: 500;
    text-decoration: none;
}

.btn-more .arrow, main .btn-more .arrow {
    margin-left: 6px;
    transition: transform 0.3s ease;
}

.btn-more.open .arrow, main .btn-more.open .arrow {
    transform: rotate(180deg);
}


/* Весь футер — на всю ширину */
footer {
  width: 100%;
}

/* Внутрішній SEO-блок */
.footer-seo {
  display: flex;
  align-items: center;
  gap: 16px;

  max-width: 1000px;        /* ширина контенту */
  margin: 16px auto 8px;   /* центруємо блок */
  padding: 0 24px;         /* відступи від країв екрану */

  text-align: center;
  font-size: 16px;
  color: #3E7CA2;
}

/* Текст тягнеться до правого краю КОНТЕНТУ */
.footer-seo p {
  margin: 0;
  line-height: 1.4;
  flex: 1;
}

/* Логотип */
.footer-logo {
  max-width: 70px;
  height: auto;
  border-radius: 6px;
  opacity: 0.9;
  flex-shrink: 0;
}


@media (max-width: 767px) {
  .footer-seo {
    flex-direction: column;
    align-items: center;
    text-align: center;

    padding: 8px 14px;
    margin: 10px auto 6px;
  }

  .footer-logo {
    max-width: 70px;
  }

  .footer-seo p {
    font-size: 13px;
    line-height: 1.45;
  }
}



/* ==========================================================
   1. ГЛОБАЛЬНЕ ОЧИЩЕННЯ ЗОВНІШНІХ КОНТЕЙНЕРІВ ТА ЦЕНТРУВАННЯ
   ========================================================== */

/* ОДНАКОВИЙ ВІДСТУП ВІД ЛИПКОГО МЕНЮ ДЛЯ ВСІХ ТИПІВ СТОРІНОК */
.article-container, 
main .com-content-featured, 
main .com-content-category-blog, 
main .blog-featured, 
main .blog,
main .com-content-article,   
main .item-page {
    margin-top: 190px; /*  ТУТ регулюється чистий відступ від меню для ВСІХ сторінок (100px-120px) */
    margin-bottom: 40px;
    box-sizing: border-box;
}

/* РОЗУМНИЙ ФІКС ПОДВІЙНОЇ ПІДЛОЖКИ:
   Якщо всередині статті Є блок .article-container, то зовнішню обгортку Joomla 
   ми робимо абсолютно прозорою, щоб прибрати білий зазор і «прилипання» */
main .com-content-article:has(.article-container),
main .item-page:has(.article-container) {
    background: transparent !important;
    box-shadow: none !important;
    padding: 0 !important;
}


/* ==========================================================
   2. СТИЛІ ДЛЯ СТОРІНКИ ОКРЕМОЇ СТАТТІ ТА ТАБЛИЦЬ
   ========================================================== */

/* КРАСИВИЙ БІЛИЙ БОКС:
   Застосовується до .article-container АБО до статті з меню (якщо в ній немає контейнера) */
.article-container,
main .com-content-article:not(:has(.article-container)),
main .item-page:not(:has(.article-container)) {
    background: #ffffff;      
    max-width: 1000px;         
    width: 100%;
    margin-left: auto !important;   
    margin-right: auto !important;  
    padding: 40px 50px;       
    border-radius: 12px;
    box-shadow: 0 4px 24px rgba(0, 0, 0, 0.06);
    box-sizing: border-box;
}

.article-container h1, main .com-content-article h1, main .item-page h1 {
    font-size: 32px;
    color: #3E7CA2; 
    margin-top: 0;  
    margin-bottom: 24px;
    line-height: 1.3;
}

.article-container p, main .com-content-article p, main .item-page p {
    font-size: 18px;          
    line-height: 1.6;         
    color: #444444;           
    margin-bottom: 16px;      
}

/* [Решта стилів картинок та таблиць з Розділу 2 залишаються без змін] */
.article-img-box { float: left; margin-right: 25px; margin-bottom: 15px; margin-top: 5px; }
.article-img-box img { width: 8cm; height: 6cm; object-fit: cover; border-radius: 10px; box-shadow: 0 5px 20px rgba(0, 0, 0, 0.05); display: block; }
.table-responsive { width: 100%; overflow-x: auto; margin-top: 30px; margin-bottom: 30px; border-radius: 8px; border: 1px solid #eef2f5; -webkit-overflow-scrolling: touch; }
.article-container table, main .blog-item table, main .com-content-article table { width: 100%; border-collapse: collapse; margin: 0; padding: 0; background: #ffffff; }
.article-container table tr, main .blog-item table tr, main .com-content-article table tr { border-bottom: 1px solid #eef2f5; transition: background-color 0.2s ease; }
.article-container table tr:hover, main .com-content-article table tr:hover { background-color: #fdfefe; }
.article-container table thead tr, .article-container table tr.table-head, main .com-content-article table thead tr { background-color: #f8fafc !important; }
.article-container table th, main .blog-item table th, main .com-content-article table th, .article-container table tr.table-head td, main .blog-item table tr.table-head td { color: #3E7CA2 !important; font-weight: 600 !important; padding: 14px 18px; }
.article-container table td, main .blog-item table td, main .com-content-article table td { padding: 14px 18px; font-size: 16px; line-height: 1.5; color: #444444; vertical-align: middle; }
.article-container table td a { color: #3E7CA2; text-decoration: none; font-weight: 500; }
.article-container table td a:hover { text-decoration: underline; }
.article-container table:not(.partners-table) td:first-child { width: 50px; text-align: center; font-weight: 600; color: #3E7CA2; border-right: 1px solid #eef2f5; }
.partners-table td:last-child, .partners-table th:last-child { text-align: center !important; font-weight: 600; }
.article-container .badge-disabled { display: inline-block !important; background: #fff5f5 !important; color: #e53e3e !important; padding: 2px 10px !important; border-radius: 20px !important; font-size: 12px !important; font-weight: 600 !important; border: 1px solid #fed7d7 !important; margin-left: 6px; vertical-align: middle; }

/* ==========================================================
   3. СТИЛІ ДЛЯ СТОРІНКИ БЛОГУ (СПИСОК КАРТОК)
   ========================================================== */

main .com-content-featured, 
main .com-content-category-blog, 
main .blog-featured, 
main .blog {
    padding: 0 20px;
    margin-left: auto;
    margin-right: auto;
    max-width: 1050px; 
}

/* СТИЛЬ ЄДИНОЇ КАРТКИ В БЛОЗІ */
main .blog-item {
    background: #ffffff;
    max-width: 1050px;         
    width: 100%;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    border: 1px solid #eef2f5;
    margin: 0 auto 30px auto; /* ВИПРАВЛЕНО: Замість чистих 0 дали центрування та відступ знизу */
    padding: 30px 30px; 
    box-sizing: border-box;
}

main .blog-item:hover {
    transform: translateY(-7px);
    box-shadow: 0 12px 25px rgba(62, 124, 162, 0.15);
}

.blog-title {
    display: block;
    width: 100%;           
    font-size: 22px;
    color: #3E7CA2;
    margin-bottom: 15px;   
    font-weight: 700;
}

.blog-post::after {
    content: "";
    display: table;
    clear: both;
}

.img-container {
    width: 250px;           
    height: 250px;          
    float: left;            
    margin-right: 15px;     
    margin-bottom: 10px;    
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: #f4f4f4; 
    border-radius: 6px;
    overflow: hidden;
}

img.blog-thumb {
    max-width: 100%;
    max-height: 100%;
    width: auto;            
    height: auto;           
    object-fit: contain;    
    display: block;
}

.more-text::after {
    content: "";
    display: table;
    clear: both;
}

.blog-thumb:hover {
    transform: scale(1.05); 
}

main .blog-item h3, main h3 {
    font-size: 24px; 
    font-weight: 600;
    margin: 0;       
    line-height: 1.3;
    color: #3E7CA2;
}

main .blog-item p, main p {
    font-size: 16px;
    line-height: 1.6;
    margin-top: 0;
    margin-bottom: 12px;
    color: #666666;
}

.blog-video-column {
    float: left;
    width: 350px;         
    margin-right: 20px;   
    margin-bottom: 15px;
}

.blog-video-block {
    position: relative;
    padding-bottom: 56.25%; 
    height: 0;
    overflow: hidden;
    border-radius: 6px;     
}

.blog-video-block iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

.blog-textt {
    flex: 1;
    min-width: 300px;
    height: 200px;
}

@media (max-width: 600px) {
    .blog-video-column {
        float: none;
        width: 100%;
        margin-right: 0;
    }
}

/* ==========================================================
   4. АДАПТИВНІСТЬ (ПЛАНШЕТИ ТА МОБІЛЬНІ)
   ========================================================== */

@media (max-width: 992px) {
    .article-container, 
    main .com-content-featured, 
    main .com-content-category-blog,
   main .blog-featured,
    main .blog,
    main .com-content-article,   
    main .item-page {             
        margin-top: 50px !important; /* Менший відступ на планшетах */
    }
    
    main .com-content-featured__items, 
    main .com-content-category-blog__items, 
    main .blog .items-row {
        grid-template-columns: repeat(2, 1fr); 
        gap: 20px;
    }
}

@media (max-width: 767px) {
    .article-container, 
    main .com-content-featured, 
    main .com-content-category-blog,
  main .blog-featured,
    main .blog,
    main .com-content-article,
    main .item-page { 
        margin-top: 30px !important; /* Менший відступ на телефонах */
    }

    /* Адаптуємо тільки активну білу підложку на мобільних */
    .article-container,
    main .com-content-article:not(:has(.article-container)),
    main .item-page:not(:has(.article-container)) {
        width: calc(100% - 20px) !important; 
        padding: 25px 20px !important;   
        border-radius: 8px !important;   
    }

    .article-container h1, main .com-content-article h1, main .item-page h1 { font-size: 24px; margin-bottom: 16px; }
    .article-container p, main .com-content-article p, main .item-page p { font-size: 16px; line-height: 1.5; }

    main .com-content-featured__items, 
    main .com-content-category-blog__items, 
    main .blog .items-row { 
        grid-template-columns: 1fr; 
    }
    
    main .blog-item { padding: 20px; }
    main .blog-item h3 { font-size: 22px; }
    main .blog-item p { font-size: 15px; }

    .article-img-box { margin-top: 15px; margin-bottom: 20px; float: none; }
    .article-img-box img { width: 100%; height: auto; border-radius: 6px; }
    .article-container table td { padding: 10px 12px; font-size: 15px; }
    .article-container table td:first-child { width: 40px; }
    .img-container { float: none; width: 100%; margin-right: 0; margin-bottom: 15px; }
}
