/* Отдельные стили для страницы jednostki.php */

.main-nav a {
  color: #000; /* черное меню */
}

.main-nav a:hover {
  color: #1d3c55;
}

.main-nav a.active {
  font-weight: 300;
}

.units-frame {
  max-width: 1600px;
  margin: 0 auto;
  padding: 140px 40px;
  font-family: 'Poppins', sans-serif;
}

.units-main-title {
  font-size: 64px;
  font-weight: 400;
  color: #000;
  text-align: right;
}

.units-main-title span {
  color: #666;
}

.units-subtitle {
  font-size: 32px;
  font-weight: 300;
  margin: 0 30px;
  color: #000;
}

.units-wrapper {
  display: flex;
  flex-direction: column;
  gap: 40px;
}

.unit-card {
    position: relative;
    border-radius: 28px;
    overflow: hidden;
    min-height: 260px;
    display: flex;
    align-items: stretch;
    color: #fff;
    transition: all 0.3s ease;
}

.unit-video-bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    z-index: -1;
}

.unit-fallback-bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-size: cover;
    background-position: center;
    z-index: -1;
}

.unit-overlay {
  background: rgba(0, 0, 0, 0.1);
  padding: 40px 40px 80px; 
  width: 100%;
  display: flex;
  justify-content: space-between;
  gap: 60px;
  align-items: flex-start;
  position: relative;
  transition: all 0.3s ease;
  color: #ffffff;
}

/* кнопка Więcej */
.unit-more {
  position: absolute;
  right: 15px;
  bottom: 18px;
  padding: 6px 12px;
  border-radius: 20px;
  font-size: 12px;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  border: 0.5px solid #fff;
  background: rgba(255,255,255,0.1);
  color: #fff;
  text-decoration: none;
  transition: all 0.3s ease;
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  opacity:0.3;
  overflow: hidden;   /* чтобы текст скрывался */
  width: 36px;        /* по умолчанию узкая – только стрелка */
}

.unit-more .arrow {
  font-size: 16px;
  flex-shrink: 0;
}

.unit-more .text {
  white-space: nowrap;
  opacity: 0;
  transform: translateX(20px);
  transition: all 0.3s ease;
}

.unit-overlay:hover {
  background: rgba(0, 0, 0, 0.1);
  padding: 40px 40px 80px; 
  width: 100%;
  display: flex;
  justify-content: space-between;
  gap: 60px;
  align-items: flex-start;
  position: relative;
  transition: all 0.3s ease;
  color: #ffffff;
}

.unit-more:hover {
  width: 100px; /* при наведении расширяется */
  background: rgba(255,255,255,0.25);
  opacity:0.7;
}

.unit-more:hover .text {
  opacity: 1;
  transform: translateX(0);
}



.unit-card:hover {
  transform: translateY(-6px) scale(1.02);
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.25);
}

.unit-card:hover .unit-overlay {
  background: rgba(0, 0, 0, 0.65);
}

/* Левая колонка занимает всё оставшееся место */
.unit-left {
  flex: 1;
}

/* Правая колонка узкая и уходит максимально вправо */
.unit-right {
  flex: 0 0 auto;       /* фиксированная ширина */
  min-width: 260px;     /* можешь регулировать ширину под дизайн */
  text-align: right;    /* выравниваем текст вправо */
}

.unit-left h3 {
  font-size: 24px;
  margin-bottom: 20px;
  font-weight: 300;
}

.unit-left p, .unit-right p {
  font-size: 15px;
  line-height: 1.6;
  margin: 4px 0;
}

/* Сайд-меню */
.side-menu {
  position: fixed;
  top: 0;
  left: -600px;
  width: 500px;
  height: 100%;
  background: rgba(13, 66, 105, 0.5); /* полупрозрачный синий */
  backdrop-filter: blur(12px);        /* размытие позади */
  -webkit-backdrop-filter: blur(12px);
  border-right: 1px solid rgba(255,255,255,0.1); /* лёгкая линия */
  color: #fff;
  padding: 40px 20px;
  transition: left 0.4s ease;
  z-index: 1000;
  overflow-y: auto;
  box-shadow: 4px 0 20px rgba(0,0,0,0.2);
}


.side-menu.open {
  left: 0;
}

.side-menu h2 {
  font-size: 22px;
  margin-bottom: 20px;
}

.side-menu ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

.side-menu ul li {
  margin: 15px 0;
}

.side-menu ul li a {
  color: #fff;
  text-decoration: none;
  font-size: 16px;
  transition: color 0.2s ease;
}

.side-menu ul li a:hover {
  color: #c9d3dc;
}

/* Кнопка закрытия */
.close-btn {
  position: absolute;
  top: 20px;
  right: 20px;
  background: none;
  border: none;
  font-size: 32px;
  color: #fff;
  cursor: pointer;
  transition: transform 0.5s ease;
}

.close-btn.rotate {
  transform: rotate(180deg);
}

.menu-toggle {
  background: none;
  border: none;
  padding: 0;
  cursor: pointer;
}

.menu-toggle img {
  width: 21px;
  height: 21px;
  filter: invert(1);
  transition: transform 0.2s ease, filter 0.2s ease;
}

.menu-toggle img:hover {
  transform: scale(1.15);
  filter: brightness(1.2);
}

/* Overlay с размытием */
.overlay-blur {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  backdrop-filter: blur(10px);       /* размытие фона */
  -webkit-backdrop-filter: blur(10px);
  background: rgba(255, 255, 255, 0.05); /* лёгкий молочный слой */
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s ease;
  z-index: 900;
}

.overlay-blur.active {
  opacity: 1;
  visibility: visible;
}
