.services__hero {
    background-image: url('../../img/directions-bg/services.png');
    min-height: 100vh;
    background-position: top;
    background-repeat: no-repeat;
    background-size: cover;
    position: relative;
    padding-bottom: 200px;
    
}

.skillet-services {
    position: absolute;
    right: 0;
    max-width: 80px;
    bottom: -20%;
    z-index: 0;
}

.services__hero-wrapper {
    display: flex;
    margin-left: 126px;
    padding-top: 170px;
}

.services__hero-items {
    display: flex;
    align-items: center;
    gap: 180px;
}

.services__hero-items-title{
    position: relative;
}

.services__hero-items-title h2{
    position: relative;
    color: #FFF;
    font-size: 60.447px;
    font-style: normal;
    font-weight: 500;
    line-height: normal;
    z-index: 1;
}

.services__hero-items-title h2:nth-child(2){
    color: #4F626C;
}

.services__hero-items-wrapper{
    display: grid;
    justify-content: center;
    grid-template-columns: repeat(3, 1fr);
    gap: 50px;
    row-gap: 90px;
    max-width: max-content; /* Изменил на max-content для лучшей адаптивности */
}

.services__hero-item {
    display: flex;
    justify-content: center;
    align-items: center;
    flex-direction: column;
    max-width: 216px; /* КЛЮЧЕВОЕ ИЗМЕНЕНИЕ: фиксируем ширину контейнера */
    width: 100%; /* Позволяем контейнеру сжиматься */
    position: relative;
    cursor: pointer !important;
    z-index: 19;
    pointer-events: auto;
}

.services__hero-item img,
.services__hero-item h2,
.services__hero-item__buttons {
    position: relative;
    z-index: 22;
    cursor: pointer;
}

.global-overlay {
  position: fixed;
  inset: 0;
  mix-blend-mode: color;
  pointer-events: none;
  z-index: 20;
}

.global-overlay::before {
  content: "";
  position: absolute;
  inset: 0;
  background: var(--overlay-color, #000);
  opacity: 0;
  transition: opacity .3s ease;
}
.global-overlay.active::before {
  opacity: 1;
}

.services__hero-item img {
    width: 100%;
    max-width: 216px;
    min-width: 80px; /* Уменьшил min-width, чтобы позволить уменьшаться ниже 200px */
    object-fit: contain; /* КЛЮЧЕВОЕ: сохраняет пропорции, предотвращает искажения */
    transition: all .3s ease;
}

.services__hero-item h2 {
    color: var(--White, #FFF);
    text-align: center;
    text-overflow: ellipsis;
    font-size: clamp(16px, 4vw, 32px);
    font-style: normal;
    font-weight: 500;
    line-height: normal;
    transition: transform 0.3s ease, opacity 0.3s ease;
}



.services__hero-item__button-brief svg,
.services__hero-item__button-brief p {
    cursor: pointer;
}

.services__hero-item__buttons a {
    cursor: pointer !important;
}

.services__hero-item__buttons {
    display: flex;
    flex-direction: column;
    gap: 10px;
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translate(-50%, 10px);
    opacity: 0;
    transition: transform 0.3s ease, opacity 0.3s ease;
    z-index: 2;
    cursor: pointer !important;
}



.services__hero-item__button-order {
    position: relative;
    display: flex;
    flex-direction: column;
    width: 100%;
    max-width: 210.6px;
    padding: 12.6px 28.8px;
    justify-content: center;
    align-items: center;
    gap: 5.158px;
    border-radius: 3.6px;
    background: var(--Red3, #E63D20);
    border: 0.9px solid var(--Red3, #E63D20);
    color: #FFF;
    font-size: 22px;
    font-style: normal;
    font-weight: 500;
    line-height: normal;
    text-transform: uppercase;
    overflow: hidden;
    transition: background .3s linear;
}


.services__hero-item__button-order-bottom, .services__hero-item__button-brief-bottom{
    position: absolute;
    transform: translateY(200%);
}

.services__hero-item__button-order-top, .services__hero-item__button-order-bottom{
    transition: transform .3s linear;
    cursor: pointer;
}

.services__hero-item__button-order:hover{
    background: #0f0f10;
}

.services__hero-item__button-order:hover > .services__hero-item__button-order-top{
    transform: translateY(-200%);
}

.services__hero-item__button-order:hover > .services__hero-item__button-order-bottom{
    transform: translateY(0%);
}


.services__hero-item__button-brief {
    position: relative;
    display: flex;
    max-width: 210.6px;
    padding: 12.6px 28.8px;
    justify-content: center;
    align-items: center;
    gap: 5.158px;
    border-radius: 3.6px;
    border: 0.9px solid var(--Red3, #E63D20);
    background: rgba(1, 1, 1, 0.50);
    color: #FFF;
    overflow: hidden;
    transition: background .4s linear;
}

.services__hero-item__button-brief-top, .services__hero-item__button-brief-bottom{
    display: flex;
    align-items: center;
    gap: 5.158px;
    cursor: pointer;
    transition: transform .4s linear;
}


.services__hero-item__button-brief:hover > .services__hero-item__button-brief-top{
    transform: translateY(-200%);
}

.services__hero-item__button-brief:hover > .services__hero-item__button-brief-bottom{
    transform: translateY(0%);
}

.services__hero-item__button-brief:hover{
    background: var(--Red3, #E63D20);
    
}

.header {
    z-index: 16;
}

.brief {
    position: fixed;
    right: 0;
    z-index: 25;
    top: 0;
    width: 100%;
    max-width: 1120px;
    padding-left: 140px;
    border: 1px solid #000;
    background: rgba(15, 15, 16, 0.90);
    backdrop-filter: blur(15px);
    height: 100%;
    padding-top: 100px;
    overflow-y: scroll;
    padding-bottom: 100px;
    padding-right: 200px;
    transition: all .3s ease;
    transform: translateX(500%);
    
}

.brief__section {
    border-radius: 20px;
    background: #181818;
    padding: 40px;
    margin-bottom: 18px;
}

.brief__overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: #00000031;
    z-index: 24;
    transition: all .3s ease;
    backdrop-filter: blur(15px);
    transform: translateX(500%);
}

.brief__close-btn {
    border-radius: 4px;
    border: 0.9px solid #000;
    background: rgba(30, 30, 31, 0.90);
    padding: 14px;
    cursor: pointer;
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 26; /* Выше всего */
    max-width: fit-content;
    transition: transform .3s ease;
    transform: translateX(200%);
}

.brief__close-btn.active{
    transform: translateX(0%);
}

.brief__overlay.active {
    transform: translateX(0);
}

.brief.active {
    transform: translateX(0);
}

.brief__version {
    color: #9194AA;
    font-family: Inter;
    font-size: 12px;
    font-style: normal;
    font-weight: 400;
    line-height: normal;
    letter-spacing: -0.06px;
    text-transform: uppercase;
    margin-bottom: 20px;
}

.brief__title {
    color: #FFF;
    font-size: 100px;
    font-style: normal;
    font-weight: 500;
    line-height: normal;
    margin-bottom: 20px;
}

.brief__inform {
    display: flex;
    gap: 5px;
    margin-bottom: 80px;
}

.brief__inform p {
    color: #C9CACF;
    font-family: Inter;
    font-size: 16px;
    font-style: normal;
    font-weight: 400;
    line-height: 22px;
    letter-spacing: -0.08px;
    width: 100%;
    max-width: 698px;
}

.brief__topic-title {
    color: #FFF;
    font-family: Inter;
    font-size: 22px;
    font-style: normal;
    font-weight: 700;
    line-height: 22px;
    letter-spacing: -0.295px;
    margin-bottom: 25px;
}

.brief__label {
    display: block;
    color: #B6B9C8;
    font-family: Inter;
    font-size: 16px;
    font-style: normal;
    font-weight: 700;
    line-height: 19px;
    letter-spacing: -0.295px;
    margin-bottom: 12px;
    width: 100%;
}

.brief__sublabel {
    color: #9C9FAD;
    font-family: Inter;
    font-size: 12px;
    font-style: normal;
    font-weight: 300;
    line-height: 14px;
    letter-spacing: -0.06px;
    margin-bottom: 4px;
}

.brief__input {
    width: 100%;
    display: block;
    padding: 12px 10px;
    border-radius: 4px;
    background: rgba(1, 1, 1, 0.80);
    outline: none;
    border: none;
    font-family: Inter;
    color: #383F4B;
    cursor: pointer;
    margin-bottom: 8px;
    resize: none;
    font-size: 14px;
    overflow: hidden;
}

.brief__textarea {
    width: 100%;
    display: block;
    padding: 12px 10px;
    border-radius: 4px;
    background: rgba(1, 1, 1, 0.80);
    outline: none;
    border: none;
    font-size: 14px;
    font-family: Inter;
    color: #ffffff;
    height: 92px;
    resize: none;
    cursor: pointer;
}

.brief__textarea::placeholder{
    color: #383F4B;
}


.checkbox-group {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-top: 10px;
    width: 100%;
}

.checkbox-item {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    color: #fff;
    font-family: Inter, sans-serif;
    font-size: 16px;
    cursor: pointer;
    width: 100%;
    min-height: 22px;
}

.checkbox-item input[type="checkbox"]{
    width: 20px;
    height: 20px;
}

.checkbox-item input[type="radio"]{
    width: 22px;
    height: 22px;
}

.checkbox-item input[type="checkbox"],
.checkbox-item input[type="radio"] {

    background: transparent;
    border: 1.4px solid #ccc;
    cursor: pointer;
    -webkit-appearance: none;
    appearance: none;
    border-radius: 4px;
    position: relative;
    transition: all 0.2s ease;
    flex-shrink: 0;
}

.checkbox-item input[type="radio"] {
    border-radius: 50%;
}

.checkbox-item span {
    flex: 1;
    max-width: calc(100% - 30px);
    word-wrap: break-word;
    overflow-wrap: break-word;
    line-height: 1.4;
    font-family: Inter, sans-serif;
    font-size: 14px;
}

.checkbox-item input[type="checkbox"]:hover,
.checkbox-item input[type="radio"]:hover {
    border-color: #3B82F6;
}

.checkbox-item input[type="checkbox"]:checked,
.checkbox-item input[type="radio"]:checked {
    background: #3B82F6;
    border-color: #3B82F6;
}

.checkbox-item input[type="checkbox"]:checked::after,
.checkbox-item input[type="radio"]:checked::after {
    content: "✔";
    position: absolute;
    color: #fff;
    font-size: 12px;
    font-weight: bold;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
}

.checkbox-item input[type="radio"]:checked::after {
    color: rgba(30, 30, 31, 0.90);
}

.brief__input:focus,
.brief__textarea:focus {
    border: 1px solid #3B82F6;
    transition: all .1s ease-in;
}

.brief__input--small {
    width: 100%;
    max-width: 318px;
    cursor: pointer;
}

.brief__group {
    margin-bottom: 25px;
}

:root {
    --slider-width-desktop: 250px; /* ширина трека по умолчанию */
    --label-width-desktop: 180px;  /* ширина подписей по умолчанию */
    --gap-desktop: 5px;
}

.range-group {
    display: flex;
    flex-direction: column;
    gap: 15px;
    margin-top: 10px;
    color: #fff;
    font-family: Inter, sans-serif;
    font-size: 16px;
}

.range-group label {
    display: grid;
    grid-template-columns: minmax(80px, var(--label-width-desktop)) 1fr minmax(80px, var(--label-width-desktop));
    align-items: center;
    gap: var(--gap-desktop);
    width: 100%;
    max-width: 800px;
}

.popup_directions_image img{
    display: block;
    width: 100%;
}


/* Левый текст */
.range-group .label-left {
    text-align: left;
    font-family: Inter, sans-serif;
    line-height: 1.4;
    font-size: 14px;
}

/* Правый текст */
.range-group .label-right {
    text-align: right;
    font-family: Inter, sans-serif;
    line-height: 1.4;
    font-size: 14px;
}

.range-group input[type="range"] {
    width: clamp(100px, 100%, 250px);
    height: 4px; /* Высота трека */
    -webkit-appearance: none;
    appearance: none;
    border-radius: 2px;
    outline: none;
    cursor: pointer;
    position: relative;
    margin: 0;
    background: #4A4A4E; /* Серый цвет для трека */
}

/* Для WebKit-браузеров (Chrome, Safari) */
.range-group input[type="range"]::-webkit-slider-runnable-track {
    width: 100%;
    height: 4px;
    background: #4A4A4E; /* Серый цвет трека */
    border-radius: 2px;
}

/* Для Firefox */
.range-group input[type="range"]::-moz-range-track {
    width: 100%;
    height: 4px;
    background: #4A4A4E; /* Серый цвет трека */
    border-radius: 2px;
}

/* Стили для ползунка (thumb) */
.range-group input[type="range"]::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 14px;
    height: 14px;
    border-radius: 50%;
    background: #3B82F6;
    cursor: pointer;
    position: relative;
    margin-top: -5px; /* центрируем по линии */
    z-index: 1;
}


.range-group input[type="range"]::-moz-range-thumb {
    width: 14px;
    height: 14px;
    border-radius: 50%;
    background: #3B82F6;
    cursor: pointer;
    margin-top: 0; /* FF сам правильно центрирует */
    z-index: 1;
}


/* Средняя метка */
.range-group input[type="range"]::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 2px;
    height: 12px;
    background: #fff; /* Белая метка в центре */
    z-index: 1;
}

.file-upload-group {
    display: flex;
    gap: 6px;
    margin-top: 12px;
    width: 100%;
    max-width: 540px;
}

.file-upload-item {
    width: 53px;
    height: 60px;
    border-radius: 3px;
    background: rgba(1, 1, 1, 0.8);
    display: flex;
    justify-content: center;
    align-items: center;
    cursor: pointer;
}

.file-upload-item img {
    width: 24px;
    height: 24px;
    opacity: 0.5;
}

.file-upload-item.filled img {
  width: 100%;
  height: 100%;
  object-fit: cover; /* картинка заполняет весь слот */
  border-radius: 3px; /* если нужно скругление */
  opacity: 0.5; /* по умолчанию тусклая (плейсхолдер) */
}


.file-upload-add {
    width: 82px;
    height: 60px;
    border-radius: 3px;
    background: #007bff;
    color: #fff;
    font-size: 32px;
    display: flex;
    justify-content: center;
    align-items: center;
    cursor: pointer;
    margin-left: 2px;
}

.brief__textarea-small {
    width: 100%;
    max-width: 540px;
    min-height: 80px;
    padding: 12px 10px;
    border-radius: 4px;
    background: rgba(1, 1, 1, 0.80);
    outline: none;
    border: none;
    font-family: Inter, sans-serif;
    font-size: 14px;
    line-height: 20px;
    color: #ffffff;
    resize: none;
}

.brief__textarea-small::placeholder{
    color: #383F4B;
}

.brief__contacts {
    margin-top: 25px;
}

.brief__contacts-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    margin-bottom: 20px;
}

.brief__contacts-item {
    display: flex;
    flex-direction: column;
}

.star {
    color: red;
    margin-left: 4px;
}

.brief__input {
    width: 100%;
    padding: 12px 10px;
    border-radius: 4px;
    background: rgba(1, 1, 1, 0.8);
    border: none;
    outline: none;
    font-family: Inter, sans-serif;
    font-size: 14px;
    color: rgb(255, 255, 255);
}

.brief__input::placeholder {
    color: #383F4B;
}

.brief__submit {
    margin-top: 20px;
    padding: 14px 32px;
    border: none;
    border-radius: 3.6px;
    background: var(--Red_new, #E62C27);
    cursor: pointer;
    text-transform: uppercase;
    transition: background 0.3s ease;
    color: #FFF;
    font-size: 22px;
    font-style: normal;
    font-weight: 500;
    line-height: normal;
    text-transform: uppercase;
}

.brief__submit:hover {
    background: #c93018;
}

.brief__topic-line {
    width: 100%;
    height: 0.5px;
    background-color: rgba(201, 202, 207, 0.521);
    margin-top: 35px;
    margin-bottom: 35px;
}

.brief__section-wrapper {
    display: flex;
    gap: 40px;
}

.brief__section-left,
.brief__section-right {
    width: 100%;
}

.brief__section {
  position: relative;
}

.brief__checkmark {
  position: absolute;
  top: 20px;
  right: 20px;
  width: 20px;   /* размер контейнера */
  height: 20px;
  display: flex;
  align-items: center;  /* центр по вертикали */
  justify-content: center; /* центр по горизонтали */
  border-radius: 2px;
  background: #16FF9A;
  opacity: 0;
  transition: opacity 0.3s ease; /* плавное появление/скрытие */
}

.brief__section.completed .brief__checkmark {
  opacity: 1; /* показываем галочку */
}

.popup_directions_image{
    position: relative;
}

.popup_directions_image h2{
    position: absolute;
    bottom: 40px;
    left: 50%;
    transform: translateX(-50%);
    margin-bottom: 0;
    display: none;
}


@media screen and (min-width: 1024px) {
    .services__hero-item:hover > .services__hero-item__title {
        transform: translateY(-100%);
        opacity: 0;
    }

    .services__hero-item:hover > .services__hero-item__buttons {
        transform: translate(-50%, -30px);
        opacity: 1;
    }

    .services__hero-item:hover > img {
        transform: translateY(-15px);
    }
}


@media screen and (max-width: 768px) {
    .popup_directions_image h2{
        display: block;

    }

    .popup_directions__content__title{
        display: none;
    }
}
