body { 
    /* padding-top: 56px;  */
  }
p {font-size: 18px;}
html {
    scroll-behavior: smooth;
  }
:target {
    scroll-margin-top: 56px; /* 56px - стандартная высота навбара Bootstrap */
  }
  
  /* Для всех заголовков глав */
.chapter h3 {
    scroll-margin-top: 56px;
  }
  .navbar .dropdown-item:focus, 
  .navbar .dropdown-item:hover {
    background-color: #343a40;
    color: white;
  }
.container {
    max-width: 960px;
}
.uppertitle{
    text-transform: uppercase;
}
.navbar-link img {
    transition: transform 0.2s;
  }
  
  .navbar-link:hover img {
    transform: scale(1.1);
  }
.bo-side-menu {z-index: 15;}

  .project-title-section {
    position: relative;
    height: 600px;
    width: 100%;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
}

.title-background {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

.title-bg-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.4); /* Полупрозрачный черный оверлей */
}

.title-content {
    position: relative;
    text-align: center;
    z-index: 2;
    color: white;
    max-width: 800px;
    padding: 0 20px 25px;
    display: flex;
    flex-wrap: wrap;
    flex-direction: row-reverse;
    align-content: flex-end;
    height: 100%;
}

.title-content h1 {
    font-size: 4rem;
    font-weight: bold;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.7);
    margin: 0 0 20px 0;
    line-height: 1.2;
}

.title-content .subtitle {
    font-size: 1.5rem;
    text-shadow: 1px 1px 3px rgba(0, 0, 0, 0.7);
    margin: 0;
    font-weight: 300;
    letter-spacing: 1px;
}

/* Адаптивность для мобильных устройств */
@media (max-width: 768px) {
    .project-title-section {
        height: 300px;
    }
    
    .title-content h1 {
        font-size: 2.5rem;
        margin-bottom: 15px;
    }
    
    .title-content .subtitle {
        font-size: 1.2rem;
    }
}

@media (max-width: 480px) {
    .project-title-section {
        height: 300px;
    }
    
    .title-content h1 {
        font-size: 2rem;
        margin-bottom: 10px;
    }
    
    .title-content .subtitle {
        font-size: 1rem;
    }
}

/* 🔥 НИЖНЯЯ ПАНЕЛЬ */
.bo-bottom-panel {
  position: fixed;
  bottom: 0;
  left: 0;
  width: 100%;
  background: #212529;
  /* box-shadow: 0 -2px 20px rgba(0, 0, 0, 0.1); */
  /* border-top: 1px solid #e9ecef; */
  z-index: 1000;
  padding: 5px 0;
}

.bo-panel-content {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 20px;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
}

/* КНОПКА "ПОДДЕРЖАТЬ" */
.btn-support-panel {
  padding: 9px 32px;
  /* background: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%);
  background: linear-gradient(135deg, #dedede 0%, #dedede 100%); */
  background: #2c3e50;
  color: rgb(176, 176, 176);
  text-decoration: none;
  border-radius: 8px;
  font-weight: 600;
  font-size: 16px;
  /*box-shadow: 0 2px 10px rgba(79, 172, 254, 0.3);*/
  transition: all 0.3s ease;
  border: none;
  cursor: pointer;
  min-width: 140px;
  text-align: center;
}

.btn-support-panel:hover {
  transform: translateY(-2px);
  /*box-shadow: 0 4px 15px rgba(79, 172, 254, 0.4);*/
  /* color: rgb(30, 30, 30); */
  text-decoration: none;
}

/* КНОПКА "ВВЕРХ" */
.btn-scroll-top-panel {
  width: 42px;
  height: 42px;
  background: #2c3e50;
  border: none;
  border-radius: 8px;
  color: white;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  /* box-shadow: 0 2px 10px rgba(44, 62, 80, 0.3); */
  transition: all 0.3s ease;
}

.btn-scroll-top-panel:hover {
  background: #34495e;
  transform: translateY(-2px);
  /* box-shadow: 0 4px 15px rgba(44, 62, 80, 0.4); */
}

/* АДАПТИВНОСТЬ */
@media (max-width: 768px) {
  .bo-bottom-panel {
    padding: 3px 0;
  }
  
  .bo-panel-content {
    gap: 15px;
    padding: 0 15px;
  }
  
  .btn-support-panel {
    padding: 10px 24px;
    font-size: 14px;
    min-width: 120px;
  }
  
  .btn-scroll-top-panel {
    width: 40px;
    height: 40px;
  }
}

@media (max-width: 480px) {
  .bo-panel-content {
    gap: 12px;
  }
  
  .btn-support-panel {
    padding: 8px 20px;
    font-size: 13px;
    min-width: 100px;
  }
}

.mainnavbar .container{
  /* min-width: 1320px; */
}

.bonavbar {
    transition: all 0.3s ease-in-out; 
    z-index: 1029;
}

/* Фиксированное состояние, которое добавляется JS */
.bonavbar.fixed-top {
    z-index: 1030; 
    /* При желании можно добавить box-shadow для эффекта "подъема" */
    /* box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2); */
}

/* Элемент-заполнитель, который создается JavaScript. 
   Он занимает место bonavbar, когда тот становится fixed. */
.bonavbar-placeholder {
    /* Transition для плавного появления/исчезновения, если бы мы использовали opacity/height, но 
       для display: none он не работает. display: none - это "без рывка" для возврата. */
    display: none; /* Управляется JavaScript */
}


#navbarNavBO {
    top: 100%; /* Располагается сразу под навбаром */
    left: 0;
    background: #212529; 
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
}

#navbarNavBO.show {
    display: block;
}

/* Для десктопной версии - возвращаем обычное поведение */
@media (min-width: 992px) {
    #navbarNavBO {
        position: static !important;
        background: transparent;
        box-shadow: none;
        display: flex !important;
        width: auto !important;
    }
}



/* Адаптивные точки Bootstrap */
@media (min-width: 576px) { .mainnavbar .container { max-width: 540px; } }
@media (min-width: 768px) { .mainnavbar .container { max-width: 720px; } }
@media (min-width: 992px) { .mainnavbar .container { max-width: 960px; } }
@media (min-width: 1200px) { .mainnavbar .container { max-width: 1140px; } }
@media (min-width: 1320px) { .mainnavbar .container { max-width: 1320px; } }

/* Мобильная версия */
@media (max-width: 575.98px) {
    .mainnavbar .container {
        min-width: auto;
        max-width: 100%;
    }
}

/* Кастомная иконка для тогглера меню BO */
.navbar-toggler-icon-custom {
    transition: transform 0.3s ease;
}

/* Анимация при нажатии */
.navbar-toggler[aria-expanded="true"] .navbar-toggler-icon-custom {
    transform: scale(1.3);
}

/* Убираем стандартный бургер */
.bonavbar .navbar-toggler {
    border: none;
    padding: 0.25rem 0.5rem;
}

.bonavbar .navbar-toggler:focus {
    box-shadow: none;
}

/* Цвет иконки */
.bonavbar .navbar-toggler-icon-custom {
    color: rgba(255, 255, 255, 0.75);
}

.bonavbar .navbar-toggler:hover .navbar-toggler-icon-custom {
    color: rgba(255, 255, 255, 1);
}