/* Импортируем шрифты Inter и Oswald */
@import url("https://fonts.googleapis.com/css2?family=Inter:wght@400;600;700&family=Oswald:wght@400;700&display=swap");


.navbar {
--bs-navbar-active-color: #fff;
}
.navbar-nav {
    --bs-nav-link-color: #fff;
    --bs-nav-link-hover-color: #fff;
}

body {
  padding-top: 56px;
  font-family: "Inter", sans-serif;
  color: #000000;
}

.left-aligned {
  margin-left: auto;
}
.bg-header {
  background-color: #003EA0 !important;
}
.bg-hero {
  background-color: #45b06cff;
}

/* CALLOUT */
.bd-callout {
  padding: 1.25rem;
  margin-top: 1.25rem;
  margin-bottom: 1.25rem;
  border: 1px solid #e9ecef;
  border-left-width: 0.25rem;
  border-radius: 0.25rem;
}

.bd-callout h4 {
  margin-bottom: 1.25rem;
}

.bd-callout p:last-child {
  margin-bottom: 0;
}

.bd-callout code {
  border-radius: 0.25rem;
}

.bd-callout + .bd-callout {
  margin-top: -0.25rem;
}

.bd-callout-info {
  border-left-color: #5bc0de;
}

.bd-callout-warning {
  border-left-color: #f0ad4e;
}

.bd-callout-danger {
  border-left-color: #d9534f;
}

/* footer */
footer a {
  color: white;
  font-weight: bold;
  text-decoration: none;
}

footer a:hover {
  color: white;
  text-decoration: underline;
}

/* == ОБЩИЕ НАСТРОЙКИ == */
html {
  scroll-behavior: smooth;
  scroll-padding-top: 80px;
}

/* == СТИЛИ БАННЕРОВ (Шрифт Oswald) == */
.banner-bg {
  position: absolute;
  inset: 0;
  object-fit: cover;
  width: 100%;
  height: 100%;
  z-index: 1;
}

.description-wrapper-content .logo,
.home-wrapper-content .logo {
  position: absolute;
  top: clamp(2rem, 8vw, 9rem);
  left: clamp(1rem, 5vw, 8rem);
  width: clamp(80px, 10vw, 160px);
  height: auto;
  z-index: 3;
}

.description-wrapper-content .logo svg,
.home-wrapper-content .logo svg {
  width: 100%;
  height: auto;
}

.description-wrapper-section,
.home-wrapper-section {
  position: relative;
  width: 100%;
  overflow: hidden;
}

.description-wrapper-section::before,
.home-wrapper-section::before {
  content: "";
  display: block;
  padding-top: 56.25%;
}

.description-wrapper-content,
.home-wrapper-content {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: flex-start;
  padding: 0 5vw;
  z-index: 2;
}

.home-wrapper-text {
  font-family: "Oswald", sans-serif;
  font-weight: bold;
  font-size: clamp(1.5rem, 4vw, 4.5rem);
  line-height: 1.1;
  color: #fff;
  margin: 0 0 0.5rem;
}

.home-wrapper-text-yellow {
  color: #fff200;
}

.description-wrapper-text {
  font-family: "Oswald", sans-serif;
  font-weight: bold;
  font-size: clamp(1.5rem, 4vw, 4.5rem);
  line-height: 1.1;
  color: #000;
  margin: 0 0 0.5rem;
}

.description-wrapper-guardian {
  font-family: "Oswald", sans-serif;
  font-weight: bold;
  font-size: clamp(1rem, 2.5vw, 1.5rem);
  color: #000;
  margin: 0;
}

/* == НАСТРОЙКИ HOME.HTML == */
.home-main-stats {
  font-family: "Oswald", sans-serif;
  font-weight: 700;
  font-size: 40px;
  text-transform: uppercase;
  width: 90vw;
  max-width: 1632px;
  margin: 80px auto 0;
  line-height: 1.2;
  text-align: center;
  color: #000;
  background: #fff;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 8px;
  border-radius: 10px;
  z-index: 10;
  box-sizing: border-box;
  padding: 40px 20px;
}

.home-about-baruch-section {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  max-width: 1632px;
  width: 90vw;
  margin: 64px auto 0;
  gap: 48px;
}

.home-about-baruch__text {
  width: 900px;
  font-weight: 400;
  font-size: 32px;
  line-height: 41px;
}

.home-about-baruch__photo {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.home-about-baruch__photo img {
  width: 620px;
  height: 498px;
  object-fit: cover;
  border-radius: 45px;
  box-shadow: 0 4px 24px rgba(0, 0, 0, 0.06);
}

.home-engineering-section {
  max-width: 1632px;
  width: 90vw;
  margin: 70px auto 0;
}

.home-engineering-title {
  font-family: "Oswald", sans-serif;
  font-size: 40px;
  font-weight: 700;
  line-height: 45px;
  text-transform: uppercase;
  text-align: center;
  margin-bottom: 100px;
}

.home-engineering-desc {
  font-size: 36px;
  line-height: 41px;
  text-align: left;
  margin-right: 52px;
  margin-bottom: 100px;
}

.home-final-scheme {
  text-align: center;
  margin-bottom: 100px;
}

.home-final-scheme img {
  max-width: 100%;
  height: auto;
}

/* == НАСТРОЙКИ СТРАНИЦ С ТЕКСТОМ (Description, Human Practices) == */
.description-layout {
  display: flex;
  gap: 3rem;
  align-items: flex-start;
  margin-top: 3rem;
}

.description-main-text {
  flex: 1;
  min-width: 0;
  font-size: 22px;
  line-height: 1.6;
}

.description-main-text p,
.description-main-text ul {
  margin-bottom: 25px;
}

.description-main-text ul {
  padding-left: 25px;
}

.description-main-text li {
  margin-bottom: 10px;
}

.description-main-text h3 {
  margin: 50px 0 25px;
  font-size: 40px;
  line-height: 1.2;
  font-weight: 700;
}

.description-main-text h4 {
  margin: 40px 0 20px;
  font-size: 32px;
  line-height: 1.3;
  font-weight: 700;
}

.description-main-text h3:first-child {
  margin-top: 0;
}

/* == ОБЩИЕ СТИЛИ ДЛЯ БОКОВОГО МЕНЮ == */
.side-menu {
  background: #fff;
  position: sticky;
  top: 80px;
  width: 380px;
  flex-shrink: 0;
  border-left: 2px solid #e9ecef;
  padding-left: 2rem;
  height: 100%;
}

.side-menu h4 {
  font-size: 1.6rem;
  font-weight: 700;
  margin-bottom: 1.2rem;
  color: #333;
}

.side-menu ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

.side-menu li {
  margin-bottom: 1rem;
}

/* Ссылки в простом (нединамическом) меню */
.side-menu:not(.dynamic) a {
  text-decoration: none;
  color: #555;
  font-size: 1.2rem;
  transition: color 0.2s;
}
.side-menu:not(.dynamic) a:hover {
  color: #000;
}

/* == СТИЛИ ТОЛЬКО ДЛЯ ДИНАМИЧЕСКОГО МЕНЮ (.side-menu.dynamic) == */

/* Основной пункт (H3) */
.side-menu.dynamic .menu-item-h3 {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.side-menu.dynamic .menu-item-h3 a {
  text-decoration: none;
  color: #333;
  font-size: 1.2rem;
  font-weight: 600; /* Не жирный, но и не тонкий */
  transition: color 0.2s;
  flex-grow: 1;
}
.side-menu.dynamic .menu-item-h3 a:hover {
  color: #000;
}

/* Активный родительский пункт (H3) */
.side-menu.dynamic > ul > li.active-parent .menu-item-h3 a {
  color: #000;
}

/* Вложенный список (H4) */
.side-menu.dynamic .submenu {
  list-style: none;
  padding-left: 1.5rem;
  margin-top: 0.75rem;
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.4s ease-out;
}

.side-menu.dynamic .submenu li {
  margin-bottom: 0.75rem;
}

.side-menu.dynamic .submenu a {
  text-decoration: none;
  color: #555;
  font-size: 1.1rem;
  transition: color 0.2s;
  font-weight: 400;
}

.side-menu.dynamic .submenu a:hover {
  color: #000;
}

/* Активный пункт H4 (жирный) */
.side-menu.dynamic .submenu a.active {
  font-weight: 700;
  color: #000;
}

/* Показываем подменю при наведении на родителя или когда оно открыто */
.side-menu.dynamic li:hover .submenu,
.side-menu.dynamic li.open .submenu {
  max-height: 1000px; /* Достаточно большая высота для всех пунктов */
  transition: max-height 0.5s ease-in;
}

/* Кнопка-стрелка для мобильных */
.side-menu.dynamic .submenu-toggle {
  display: none; /* Скрыта на десктопе */
  cursor: pointer;
  padding: 5px;
  border: none;
  background: transparent;
  flex-shrink: 0;
}

.side-menu.dynamic .submenu-toggle svg {
  width: 12px;
  height: 12px;
  transition: transform 0.3s ease;
}

.side-menu.dynamic li.open .submenu-toggle svg {
  transform: rotate(90deg);
}

/* == ФУТЕР == */
.footer-logo {
  width: 150px;
  height: 150px;
  border-radius: 100%;
  object-fit: cover;
}

/* == АДАПТАЦИИ == */
/* Планшеты (до 1200px) */
@media (max-width: 1199.98px) {
  .description-layout {
    gap: 2rem;
  }
  .description-main-text {
    font-size: 20px;
  }
  .description-main-text h3 {
    font-size: 34px;
  }
  .description-main-text h4 {
    font-size: 28px;
  }
  .side-menu {
    width: 300px;
  }
  .side-menu a {
    font-size: 1.1rem;
  }
}

/* Маленькие планшеты и мобилки (до 991px) */
@media (max-width: 991.98px) {
  .description-layout {
    flex-direction: column-reverse; /* Меню становится сверху */
  }
  .side-menu {
    position: static;
    width: 100%;
    border-left: none;
    border-bottom: 2px solid #e9ecef;
    padding: 0 0 1.5rem 0;
    margin-bottom: 2rem;
  }
  /* Показываем стрелку на мобильных */
  .side-menu.dynamic .submenu-toggle {
    display: inline-block;
  }
  /* На тач-устройствах убираем раскрытие по hover */
  .side-menu.dynamic li:hover .submenu {
    max-height: 0;
  }
  .side-menu.dynamic li.open:hover .submenu,
  .side-menu.dynamic li.open .submenu {
    max-height: 1000px;
  }
}

/* Телефоны (до 767px) */
@media (max-width: 767.98px) {


  .description-main-text {
    font-size: 18px;
    line-height: 1.5;
    padding-left: 0;
    padding-right: 0;
  }

  .description-main-text h3 {
    font-size: 28px;
    margin: 40px 0 20px;
  }
  .description-main-text h4 {
    font-size: 24px;
  }

  /* Остальные стили для мобильных */
  .home-main-stats {
    font-size: 18px;
    gap: 15px;
    margin-top: 40px;
    padding: 20px 10px;
  }
  .home-about-baruch-section {
    flex-direction: column;
    align-items: center;
    margin-top: 30px;
    gap: 20px;
  }
  .home-about-baruch__text {
    font-size: 18px;
    width: 100%;
    text-align: center;
  }
  .home-about-baruch__photo img {
    width: 100%;
    max-width: 500px;
    height: auto;
  }
  .home-engineering-title {
    font-size: 24px;
    margin: 40px 0;
  }
  .home-engineering-desc {
    font-size: 18px;
    margin-bottom: 40px;
    text-align: center;
    margin-right: 0;
  }
  .footer .row {
    flex-direction: column;
    text-align: center;
  }
  .footer .col-lg-3 {
    margin-top: 20px;
  }
}

/* == СТИЛИ ДЛЯ СТРАНИЦЫ КОМАНДЫ (members.html) == */

.members-page-container {
  padding: 2rem 1rem;
  max-width: 1600px;
  margin: 0 auto;
}

.team-intro {
  text-align: center;
  margin-bottom: 4rem;
}

.team-intro h1 {
  font-family: "Inter", sans-serif; /* <<< UPDATED */
  font-weight: 700; /* <<< UPDATED */
  font-size: clamp(2.5rem, 5vw, 4rem);
  color: #000;
  margin-bottom: 0.5rem;
}

.team-intro p {
  font-size: clamp(1rem, 2vw, 1.25rem);
  color: #555;
  max-width: 800px;
  margin: 0 auto;
}

.team-section {
  margin-bottom: 4rem;
}

.team-section-title {
  font-family: "Inter", sans-serif; /* <<< UPDATED */
  font-weight: 700; /* <<< UPDATED */
  font-size: 2rem;
  color: #003ea0;
  text-align: center;
  margin-bottom: 2.5rem;
  position: relative;
  padding-bottom: 0.5rem;
}

.team-section-title::after {
  content: "";
  position: absolute;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 80px;
  height: 3px;
  background-color: #003ea0;
}

.team-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 2rem;
  padding: 0 1rem;
}

/* === MEMBER CARD STYLES START === */

.member-card {
  position: relative;
  transition: box-shadow 0.3s ease;
  z-index: 1;
  border-radius: 12px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.1);
}

.member-card:hover {
  box-shadow: 0 12px 32px rgba(0, 62, 160, 0.2);
  z-index: 10;
}

.member-card-visible {
  position: relative;
  aspect-ratio: 4 / 5;
  border-radius: 12px 12px 0 0;
  overflow: hidden;
  z-index: 2;
}

.member-photo {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.4s ease;
}

.member-card:hover .member-photo {
  transform: scale(1.05);
}

.member-overlay {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  background: linear-gradient(
    to top,
    rgba(0, 41, 107, 0.98) 30%,
    rgba(0, 41, 107, 0.9) 70%,
    transparent 100%
  );
  color: white;
  padding: 1.5rem;
}

.member-name {
  font-family: "Inter", sans-serif; /* <<< UPDATED */
  font-weight: 700; /* <<< UPDATED */
  font-size: 1.75rem;
  margin: 0 0 0.25rem 0;
  line-height: 1.2;
}

.member-role {
  font-size: 0.9rem;
  margin: 0;
  opacity: 0.8;
  min-height: 1.2em;
}

.member-card-expanded {
  background-color: #ffffff;
  color: #333;
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  max-height: 0;
  opacity: 0;
  overflow: hidden;
  border-bottom-left-radius: 12px;
  border-bottom-right-radius: 12px;
  padding: 0 1.5rem;
  z-index: 1;
  transition: max-height 0.3s ease-in-out, opacity 0.15s ease-in-out, padding 0.3s ease-in-out;
  box-sizing: border-box;
  border-left: 1px solid #e9ecef;
  border-right: 1px solid #e9ecef;
  border-bottom: 1px solid #e9ecef;
}

.member-card:hover .member-card-expanded {
  max-height: 800px;
  opacity: 1;
  padding: 1.5rem;
  transition: max-height 0.35s ease-in-out, opacity 0.2s 0.1s ease-in-out, padding 0.35s ease-in-out;
}

.member-bio {
  font-size: 0.95rem;
  line-height: 1.5;
  margin: 0;
}

.member-bio:empty {
  display: none;
}
/* === MEMBER CARD STYLES END === */


/* Адаптация для мобильных устройств */
@media (max-width: 767.98px) {
  .team-grid {
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 1.5rem;
  }
}

/* == СТИЛИ ДЛЯ КАРУСЕЛИ (members.html) == */
.carousel-container {
  position: relative;
  max-width: 1200px;
  width: 90%;
  margin: 0 auto;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.1);
  aspect-ratio: 16 / 9; /* Задает пропорции 16:9, можно поменять при необходимости */
}

.carousel-slides {
  display: flex;
  height: 100%;
  transition: transform 0.5s ease-in-out;
}

.carousel-slide {
  flex: 0 0 100%;
  height: 100%;
}

.carousel-slide img {
  margin: 0 auto;
  height: 100%;
  object-fit: cover;
  display: block;
}

.carousel-button {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background-color: rgba(0, 41, 107, 0.6);
  color: white;
  border: none;
  padding: 8px;
  cursor: pointer;
  z-index: 10;
  transition: background-color 0.2s;
  border-radius: 8px;
}

.carousel-button:hover {
  background-color: rgba(0, 41, 107, 0.9);
}

.carousel-button.prev {
  left: 15px;
}

.carousel-button.next {
  right: 15px;
}

.carousel-dots {
  position: absolute;
  bottom: 15px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 10px;
  z-index: 10;
}

.carousel-dot {
  width: 16px;
  height: 16px;
  border-radius: 50%;
  border: 2px solid white;
  background-color: transparent;
  cursor: pointer;
  transition: background-color 0.3s;
}

.carousel-dot.active,
.carousel-dot:hover {
  background-color: white;
}

/* Адаптация карусели для мобильных */
@media (max-width: 767.98px) {
  .carousel-button {
    padding: 8px;
  }
  .carousel-dots {
      bottom: 10px;
  }
  .carousel-dot {
      width: 16px;
      height: 16px;
  }
}



.hero {
    position: relative;
    height: calc(100vh - 56px);
    overflow: hidden;
}

    .hero img {
      position: absolute;
      top: 50%;
      left: 50%;
      height: 100%;
      width: 100%;
      transform: translate(-50%, -50%);
      object-fit: cover;
    }

    .hero-content {
      position: relative;
      z-index: 2;
      color: white;
      text-align: center;
    }
@media (max-width: 767.98px) {
  .hero {
    height: 248px;
  }
}


.accordion-button {
    border-radius: 12px !important;
    background:  #003EA0;
    color: #fff;
    font-size: 20px;
    font-weight: 600;
}


.horizontal-scroll-wrapper {
  position: absolute;
  display: block;
  top: 0;
  left: 0;
  width: 900px;
  max-height: 800px;
  margin: 0;
  background: #fff;
  overflow-y: auto;
  overflow-x: hidden;
  transform: rotate(-90deg) translateY(-900px);
  transform-origin: right top;
}

.horizontal-scroll-wrapper > div {
  display: block;
  padding: 0px;
  background: #fff;
  transform:rotate(90deg);
  transform-origin: right top;
}

.squares{
  padding: 900px 0 0 0;
}

.squares > div{
  width: 900px;
  height: 800px;
  margin-bottom: 200px;
}

.squares > div:last-child {
  margin-bottom: -800px; /* removes the gap at the end */
}

@media (max-width: 1440px) {

.horizontal-scroll-wrapper {
  position: absolute;
  display: block;
  top: 0;
  left: 0;
  width: 700px;
  max-height: 700px;
  margin: 0;
  background: #fff;
  overflow-y: auto;
  overflow-x: hidden;
  transform: rotate(-90deg) translateY(-700px);
  transform-origin: right top;
}

.horizontal-scroll-wrapper > div {
  display: block;
  padding: 0px;
  background: #fff;
  transform:rotate(90deg);
  transform-origin: right top;
}

.squares{
  padding: 700px 0 0 0;
}

.squares > div{
  width: 700px;
  height: 700px;
}

.squares > div:last-child {
  margin-bottom: -700px; /* removes the gap at the end */
}
}

@media (max-width: 1200px) {

.horizontal-scroll-wrapper {
  position: absolute;
  display: block;
  top: 0;
  left: 0;
  width: 688px;
  max-height: 688px;
  margin: 0;
  background: #fff;
  overflow-y: auto;
  overflow-x: hidden;
  transform: rotate(-90deg) translateY(-688px);
  transform-origin: right top;
}

.horizontal-scroll-wrapper > div {
  display: block;
  padding: 0px;
  background: #fff;
  transform:rotate(90deg);
  transform-origin: right top;
}

.squares{
  padding: 688px 0 0 0;
}

.squares > div{
  width: 688px;
  height: 688px;
}

.squares > div:last-child {
  margin-bottom: -688px; /* removes the gap at the end */
}
}