/* ---------- SERVICES ---------- */
.services-section {
  background: #263A4C;
  padding: 6rem 0;
  position: relative;
}

.services-section::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: #132631;
  z-index: 1;
}

.services-content {
  position: relative;
  z-index: 2;
}

/* Заголовок с линией */
.section-header {
  display: flex;
  align-items: center;
  gap: 2rem;
  margin-bottom: 4rem;
  position: relative;
  z-index: 3;
}

.services-section .section-title {
  font-family: "Unbounded", sans-serif;
  font-weight: 700;
  font-size: 60px !important;
  color: #fff;
  margin-bottom: 0;
  white-space: nowrap;
}

.services-section .title-line {
  flex-grow: 1;
  height: 2px;
  background: #fff;
  margin-top: 0.5rem;
}

/* Общий контейнер для левой части */
.service-display-wrapper {
  height: 100%;
  min-height: 500px;
  position: relative;
}

.service-display-wrapper::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: #132631;
  border-radius: 12px;
  z-index: 1;
}

.service-display {
  height: 100%;
  background: #00000047;
  border-radius: 60px;
  padding: 2rem;
  display: flex;
  flex-direction: column;
  gap: 2rem;
  position: relative;
  z-index: 2;
}

/* Изображение */
.service-image-wrapper {
  border-radius: 51px;
  overflow: hidden;
  min-width: 250px;
  aspect-ratio: 771/488;
  background: #000;
  position: relative;
  z-index: 3;
}

.service-image {
  width: 100%;
  height: 100%;
  display: block;
  transition: all 0.4s ease;
}

/* Описание */
.service-description {
  flex-shrink: 0;
  position: relative;
  z-index: 3;
}

.service-text {
  font-family: "Akt", sans-serif;
  font-weight: 200;
  font-size: 1.1rem;
  line-height: 1.6;
  color: #fff;
  margin: 0;
  text-align: left;
}

/* Список услуг (правая часть) */
.services-list-wrapper {
  position: relative;
  height: 100%;
  min-height: 500px;
  display: block;
}

/* Кастомный селектор - скрыт на десктопе */
.services-mobile-select {
  display: none;
}

.services-list-wrapper::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: #132631;
  border-radius: 12px;
  z-index: 1;
}

.services-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
  height: 100%;
  justify-content: center;
  position: relative;
  z-index: 2;
  padding: 1.5rem;
}

.service-item {
  padding: 0.4em 0.8rem;
  background: transparent;
  border: 1px solid transparent;
  border-radius: 20px;
  cursor: pointer;
  transition: all 0.3s ease;
  position: relative;
}

.service-item:hover {
  background: rgba(255, 255, 255, 0.1);
  border-color: rgba(255, 255, 255, 0.2);
}

.service-item.active {
  background: rgba(255, 255, 255, 0.15);
  border-color: rgba(255, 255, 255, 0.3);
}

.service-name {
  font-family: "Rothek", sans-serif;
  font-weight: 250;
  font-size: 30px;
  color: #fff;
  transition: all 0.3s ease;
}

.service-item:hover .service-name {
  color: #fff;
}

.service-item.active .service-name {
  color: #fff;
  font-weight: 300;
}



/* ---------- CUSTOM SELECT DROPDOWN ---------- */
.custom-select-wrapper {
  position: relative;
  width: 100%;
  user-select: none;
}

.custom-select-trigger {
  display: flex;
  justify-content: space-between;
  align-items: center;
  width: 100%;
  padding: 1rem 1.5rem;
  background: #1a2b3a;
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 16px;
  color: #fff;
  font-family: "Rothek", sans-serif;
  font-size: 1.1rem;
  cursor: pointer;
  transition: all 0.3s ease;
}

.custom-select-trigger:hover {
  background: #1f3144;
  border-color: rgba(255, 255, 255, 0.25);
}

.custom-select-trigger.active {
  background: #243546;
  border-color: rgba(255, 255, 255, 0.3);
  border-bottom-left-radius: 0;
  border-bottom-right-radius: 0;
}

.select-arrow {
  transition: transform 0.3s ease;
  flex-shrink: 0;
}

.custom-select-trigger.active .select-arrow {
  transform: rotate(180deg);
}

.custom-select-dropdown {
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  background: #1a2b3a;
  border: 1px solid rgba(255, 255, 255, 0.3);
  border-top: none;
  border-bottom-left-radius: 16px;
  border-bottom-right-radius: 16px;
  max-height: 0;
  overflow: hidden;
  opacity: 0;
  transition: max-height 0.3s ease, opacity 0.3s ease;
  z-index: 100;
}

.custom-select-dropdown.show {
  max-height: 400px;
  opacity: 1;
  overflow-y: auto;
}

.select-option {
  padding: 0.9rem 1.5rem;
  color: rgba(255, 255, 255, 0.8);
  font-family: "Rothek", sans-serif;
  font-size: 1rem;
  cursor: pointer;
  transition: all 0.2s ease;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.select-option:last-child {
  border-bottom: none;
}

.select-option:hover {
  background: rgba(255, 255, 255, 0.08);
  color: #fff;
  padding-left: 1.8rem;
}

.select-option.active {
  background: rgba(255, 255, 255, 0.12);
  color: #fff;
  font-weight: 400;
}

/* Кастомный скроллбар для выпадающего списка */
.custom-select-dropdown::-webkit-scrollbar {
  width: 6px;
}

.custom-select-dropdown::-webkit-scrollbar-track {
  background: rgba(255, 255, 255, 0.05);
  border-radius: 3px;
}

.custom-select-dropdown::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.2);
  border-radius: 3px;
}

.custom-select-dropdown::-webkit-scrollbar-thumb:hover {
  background: rgba(255, 255, 255, 0.3);
}

/* ---------- SERVICES MOBILE ---------- */
@media (max-width: 768px) {
  .services-section {
    padding-bottom: 1rem !important;
  }
  
  .section-header {
    flex-direction: column;
    gap: 1rem;
    margin-bottom: 2rem;
    text-align: center;
  }
  
  .services-section .section-title {
    font-size: 2.5rem !important;
    white-space: normal;
    text-align: center;
  }
  
  .services-section .title-line {
    width: 100px;
    flex-grow: 0;
    margin-top: 0.5rem;
  }
  
  /* Меняем структуру на мобилках */
  .services-content .row.g-5 {
    flex-direction: column;
  }
  
  /* Скрываем обычный список и показываем кастомный селектор */
  .services-list-wrapper {
    display: none !important;
  }
  
  .services-mobile-select {
    display: block !important;
    width: 100%;
    margin-bottom: 2rem;
    position: relative;
    z-index: 10;
  }
  
  /* Левая часть занимает всю ширину */
  .col-md-6 {
    width: 100%;
  }
  
  .service-display-wrapper {
    min-height: auto;
    margin-bottom: 0;
  }
  
  .service-display {
    border-radius: 30px;
    padding: 1.5rem;
    gap: 1.5rem;
  }
  
  .service-image-wrapper {
    border-radius: 30px;
    min-height: 250px;
  }
  
  .service-image {
    border-radius: 10px;
  }
  .service-text {
    font-size: 1rem;
    line-height: 1.5;
    text-align: center;
  }
}

/* ---------- IPHONE 14 PRO / 15 PRO ---------- */
@media (max-width: 430px) {
  .services-section {
    padding: 2rem 0;
  }
  
  .services-section .section-title {
    font-size: 2rem !important;
  }
  
  .service-display {
    padding: 1.2rem;
    gap: 1.2rem;
    border-radius: 20px;
  }
  
  .service-image-wrapper {
    border-radius: 20px;
    min-height: 200px;
  }
  
  .service-text {
    font-size: 0.95rem;
  }
  
  .custom-select-trigger {
    padding: 0.9rem 1.2rem;
    font-size: 1rem;
    border-radius: 12px;
  }
  
  .custom-select-trigger.active {
    border-bottom-left-radius: 0;
    border-bottom-right-radius: 0;
  }
  
  .custom-select-dropdown {
    border-bottom-left-radius: 12px;
    border-bottom-right-radius: 12px;
  }
  
  .select-option {
    padding: 0.8rem 1.2rem;
    font-size: 0.95rem;
  }
  
  .select-option:hover {
    padding-left: 1.5rem;
  }
}

/* ---------- IPHONE 12 PRO / 13 PRO ---------- */
@media (max-width: 390px) {
  .services-section {
    padding: 2rem 0;
  }
  
  .services-section .section-title {
    font-size: 1.8rem !important;
  }
  
  .section-header {
    margin-bottom: 1.5rem;
  }
  
  .service-display {
    padding: 1rem;
    gap: 1rem;
    border-radius: 15px;
  }
  
  .service-image-wrapper {
    border-radius: 15px;
    min-height: 180px;
  }
  
  .service-text {
    font-size: 0.9rem;
    line-height: 1.4;
  }
  
  .custom-select-trigger {
    padding: 0.8rem 1rem;
    font-size: 0.9rem;
    border-radius: 10px;
  }
  
  .select-option {
    padding: 0.7rem 1rem;
    font-size: 0.9rem;
  }
}

/* ---------- IPHONE SE / MINI ---------- */
@media (max-width: 375px) {
  .services-section {
    padding: 1.5rem 0;
  }
  
  .services-section .section-title {
    font-size: 1.6rem !important;
  }
  
  .service-display {
    padding: 0.8rem;
    gap: 0.8rem;
    border-radius: 12px;
  }
  
  .service-image-wrapper {
    min-height: 160px;
    border-radius: 12px;
  }
  
  .service-text {
    font-size: 0.85rem;
  }
  
  .custom-select-trigger {
    padding: 0.7rem 0.9rem;
    font-size: 0.85rem;
  }
  
  .select-option {
    padding: 0.6rem 0.9rem;
    font-size: 0.85rem;
  }
}

/* ---------- VERY SMALL SCREENS ---------- */
@media (max-width: 320px) {
  .services-section .section-title {
    font-size: 1.4rem !important;
  }
  
  .service-image-wrapper {
    min-height: 140px;
  }
  
  .service-text {
    font-size: 0.8rem;
  }
  
  .custom-select-trigger {
    padding: 0.6rem 0.8rem;
    font-size: 0.8rem;
  }
  
  .select-option {
    padding: 0.5rem 0.8rem;
    font-size: 0.8rem;
  }
}

/* ---------- LANDSCAPE MODE ---------- */
@media (max-width: 768px) and (orientation: landscape) {
  .services-section {
    padding: 2rem 0;
  }
  
  .service-image-wrapper {
    min-height: 200px;
  }
  
  .service-display {
    padding: 1rem;
    gap: 1rem;
  }
  
  .custom-select-dropdown.show {
    max-height: 250px;
  }
}

/* === FIX ROUNDING GAP ON MOBILE === */
.service-display-wrapper,
.service-display,
.service-image-wrapper {
  border-radius: 60px;
  overflow: hidden;
}

@media (max-width: 768px) {
  .service-display-wrapper,
  .service-display,
  .service-image-wrapper {
    border-radius: 30px;
  }
}

@media (max-width: 430px) {
  .service-display-wrapper,
  .service-display,
  .service-image-wrapper {
    border-radius: 20px;
  }
}

@media (max-width: 390px) {
  .service-display-wrapper,
  .service-display,
  .service-image-wrapper {
    border-radius: 15px;
  }
}

@media (max-width: 375px) {
  .service-display-wrapper,
  .service-display,
  .service-image-wrapper {
    border-radius: 12px;
  }
}

