/* ========================
   Базовые настройки
   ======================== */
*,
*::before,
*::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: 'Montserrat', sans-serif;
    color: #000;
    background-color: #fcfcfc;
    overflow-x: hidden;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0;
}

/* Основной контент */
.instructor-main {
    margin-top: 135px;
    padding-top: 0;
}

/* Хлебные крошки */
.breadcrumbs {
    font-size: 18px;
    font-weight: 400;
    color: #929292;
    margin-bottom: 60px;
    padding-top: 0;
}
.breadcrumbs a {
    color: #929292;
    text-decoration: none;
    transition: color 0.2s;
}
.breadcrumbs a:hover {
    color: #D90D26;
}
.breadcrumbs__sep {
    margin: 0 2px;
}
.breadcrumbs__current {
    color: #929292;
}

/* Заголовок и описание */
.instructor-hero__title {
    font-size: 50px;
    font-weight: 500;
    font-family: 'Montserrat', sans-serif;
    margin-bottom: 30px;
    color: #000;
}
.instructor-hero__desc {
    font-size: 18px;
    font-weight: 300;
    line-height: 1.5;
    max-width: 1200px;
    margin-bottom: 60px;
    color: #000;
}

/* Секции инструкторов */
.instructor-section {
    margin-bottom: 60px;
}

.instructor-section__header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
}

.instructor-section__title {
    font-size: 30px;
    font-weight: 500;
}

.section-controls {
    display: flex;
    gap: 30px;
}

/* Стрелки */
.section-arrow {
    width: 74px;
    height: 34px;
    border-radius: 5px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    /* активный фон */
    background: linear-gradient(-41deg, #D90D26, #E94055, #D90D26);
    border: none;
    padding: 0;
    position: relative;
    transition: background 0.2s, opacity 0.2s;
    box-sizing: border-box;   /* гарантирует фиксированные размеры */
}

/* Обводка для неактивной кнопки – внутри границ */
.section-arrow.disabled::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    border-radius: 5px;
    background: linear-gradient(-41deg, #D90D26, #E94055, #D90D26);
    -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    -webkit-mask-composite: xor;
    mask-composite: exclude;
    padding: 1px;            /* толщина обводки */
    z-index: -1;
}

/* Неактивное состояние */
.section-arrow.disabled {
    background: transparent;
    cursor: default;
    pointer-events: none;
}

/* Наведение на неактивную кнопку не меняет её вид */
.section-arrow.disabled:hover {
    background: transparent;
    opacity: 1;
}

/* Иконка внутри */
.section-arrow__icon {
    display: block;
    width: 50px;
    height: auto;
    object-fit: contain;
}

/* Отражаем иконку для левой кнопки */
.section-arrow--left .section-arrow__icon {
    transform: scaleX(-1);
}

/* ========================
   Слайдер
   ======================== */

.instructor-slider-clip {
    overflow: hidden;
    padding: 20px;     
    margin: -20px;     
}

.instructor-slider {
    overflow: visible;
}

.instructor-slider__track {
    display: flex;
    gap: 40px;
    transition: transform 0.3s ease;
}

/* Карточка инструктора */
.instructor-card {
    width: 580px;
    height: 358px;
    background-color: #fcfcfc;
    border-radius: 10px;
    padding: 30px;
    position: relative;
    overflow: hidden;
    flex-shrink: 0;
    box-shadow: 0 0 20px rgba(0, 0, 0, 0.1);
}

.instructor-card__inner {
    display: flex;
    gap: 30px;
}

.instructor-card__photo-wrapper {
    width: 177px;
    height: 226px;
    border-radius: 10px;
    background-color: #f0f0f0;
    flex-shrink: 0;
    overflow: hidden;
}

.instructor-card__photo {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.instructor-card__info {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 10px;
}

.instructor-card__name {
    font-size: 22px;
    font-weight: 400;
    width: 281px;
    height: 54px;
    line-height: 1.2;
    word-break: break-word;
}

.instructor-card__rating {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 22px;
}

.stars {
    display: flex;                  
    gap: 4px;                         
}

.star {
    display: block;
    width: 30px;
    height: 30px;
    position: relative;
}

/* Активная (полная) звезда */
.star--active::before {
    content: '★';
    font-size: 30px;
    line-height: 1;
    color: transparent;
    background: linear-gradient(-41deg, #D90D26, #E94055, #D90D26);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-stroke: 1.5px #D90D26;
}

/* Пустая звезда (обводка) */
.star:not(.star--active):not(.star--partial)::before {
    content: '★';
    font-size: 30px;
    line-height: 1;
    -webkit-text-stroke: 1.5px #D90D26;
    color: #D90D26;
    -webkit-text-fill-color: transparent;
}



/* Частично заполненная звезда */
.star--partial::before {
    content: '★';
    font-size: 30px;
    line-height: 1;
    background: linear-gradient(
        to right,
        #D90D26 0%, #E94055 var(--star-fill),
        transparent var(--star-fill), transparent 100%
    );
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    -webkit-text-stroke: 1.5px #D90D26;
    paint-order: stroke fill;
}

.rating-value {
    font-size: 18px;
    font-weight: 300;
    background: linear-gradient(-41deg, #D90D26, #E94055, #D90D26);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    color: transparent;
}

.instructor-card__details {
    margin-top: 23px;
}

.instructor-detail {
    font-size: 18px;
    font-weight: 300;
    margin-bottom: 5px;
}

.instructor-detail .value {
    font-weight: 400;
}

/* Карточка с автомобилем */
.instructor-card--with-car .instructor-card__car {
    position: absolute;
    right: 0;
    top: 128px;
    width: 299px;
    height: 207px;
    object-fit: cover;
    z-index: 0;
    border-radius: 0 10px 0 0;
}

.instructor-card--with-car .instructor-card__details {
    position: relative;
    z-index: 1;
}

/* Стили для интерактивных звёзд и голосов */
.instructor-card__rating {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
}

.rating-value {
    font-size: 18px;
    font-weight: 300;
    background: linear-gradient(-41deg, #D90D26, #E94055, #D90D26);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.votes-count {
    font-size: 14px;
    color: #7A7A7A;
    margin-left: 5px;
}

/* Интерактивные звёзды (только для авторизованных) */
.star.interactive {
    cursor: pointer;
    transition: transform 0.1s;
}
.star.interactive:hover {
    transform: scale(1.1);
}

/* ========================
   Оверлей подтверждения (для оценки инструктора)
   ======================== */
.delete-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.2);
    justify-content: center;
    align-items: center;
    z-index: 1000;
}

.delete-overlay.active {
    display: flex;
}

.delete-overlay__box {
    width: 600px;
    min-height: 300px;
    background: #fff;
    border-radius: 10px;
    padding: 50px;
    text-align: center;
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 20px;
}

.delete-overlay__text {
    font-size: 25px;
    font-weight: 500;
    margin-bottom: 40px;
    line-height: 1.3;
}

.delete-overlay__buttons {
    display: flex;
    gap: 30px;
    justify-content: center;
}

/* Кнопки оверлея */
.btn--cancel-rate {
    width: 187px;
    height: 60px;
    background: transparent;
    border: 2px solid #D90D26;
    border-radius: 10px;
    font-size: 18px;
    font-weight: 500;
    color: #D90D26;
    cursor: pointer;
    transition: opacity 0.2s;
    font-family: 'Montserrat', sans-serif;
}
.btn--cancel-rate:hover {
    opacity: 0.7;
}

.btn--confirm-rate {
    width: 193px;
    height: 60px;
    background: linear-gradient(-41deg, #D90D26, #E94055, #D90D26);
    border: none;
    border-radius: 10px;
    font-size: 18px;
    color: #fcfcfc;
    cursor: pointer;
    transition: opacity 0.2s;
    font-family: 'Montserrat', sans-serif;
}
.btn--confirm-rate:hover {
    opacity: 0.8;
}

/* ========================
   Адаптивность (мобильная версия)
   ======================== */
@media (max-width: 768px) {
    .desktop-only {
        display: none !important;
    }

    body {
        overflow-y: scroll;
        -webkit-overflow-scrolling: touch;
    }

    .container {
        max-width: 100%;
        padding: 0 16px;
        margin: 0 auto;
    }

    .instructor-main {
        margin-top: 83px;
    }

    .breadcrumbs {
        font-size: 12px;
        margin-top: 0;
        margin-bottom: 30px;
    }

    .instructor-hero__title {
        font-size: 30px;
        margin-bottom: 15px;
    }
    .instructor-hero__desc {
        font-size: 14px;
        margin-bottom: 30px;
    }
    .instructor-section__title {
        font-size: 20px;
        margin-bottom: 15px;
    }

    /* Скрываем стрелки навигации на мобильных */
    .section-controls {
        display: none;
    }

    /* Слайдер – одна карточка по центру + место для тени */
    .instructor-slider-clip {
        width: 350px;
        margin: 0 auto;
        overflow: hidden;
        padding: 10px 10px;   
        margin: -30px -10px auto;
        touch-action: pan-y pinch-zoom;
    }
    .instructor-slider__track {
        gap: 20px;
        transition: transform 0.3s ease;
    }

    /* Точки слайдера */
    .instructor-dots {
        display: flex;
        justify-content: center;
        gap: 8px;
        margin-top: 5px;
        margin-bottom: 30px;
    }
    .instructor-dot {
        width: 7px;
        height: 7px;
        border-radius: 50%;
        background: #d9d9d9;
        cursor: pointer;
    }
    .instructor-dot.active {
        background: #b5b5b5;
        transform: scale(1.2);
    }

    /* Карточка инструктора */
    .instructor-card {
        width: 328px;
        height: auto;
        min-height: auto;
        padding: 15px;
        display: flex;
        flex-direction: column;
        box-shadow: 0 0 10px rgba(0,0,0,0.1);
        background: #fcfcfc;
        border-radius: 10px;
    }
    .instructor-card__inner {
        display: flex;
        gap: 12px;
        flex-direction: row;
        margin-bottom: 10px;
    }
    .instructor-card__photo-wrapper {
        width: 141px;
        height: 180px;
        flex-shrink: 0;
    }
    .instructor-card__info {
        flex: 1;
        gap: 8px;
    }
    .instructor-card__name {
        font-size: 14px;
        font-weight: 400;
        width: auto;
        height: auto;
        line-height: 1.3;
    }
    /* Рейтинг: цифра, звёзды и голоса в одну строку */
    .instructor-card__rating {
        display: flex;
        align-items: baseline;
        gap: 6px;
        flex-wrap: nowrap;
    }
    .rating-value {
        font-size: 14px;
        line-height: 1.2;
    }
    .stars {
        display: flex;
        gap: 2px;
        flex-shrink: 0;
    }
    .star {
        width: 18px;
        height: 18px;
    }
    .star::before {
        font-size: 18px !important;
    }
    .votes-count {
        font-size: 0;
        flex-shrink: 0;
        margin-left: 0;
    }
    .votes-count::before {
        content: "| " attr(data-votes);
        font-size: 12px;
        color: #7A7A7A;
        margin-left: -2px;
        vertical-align: super;
        line-height: 1.2;
    }

    .instructor-card__details {
        margin-top: 10px;
        width: 100%;
        display: flex;
        flex-direction: column;
    }
    .instructor-detail {
        font-size: 12px;
        margin-bottom: 5px;
    }

    /* Для инструкторов по вождению – картинка машины под текстом, справа */
    .instructor-card--with-car {
        overflow: visible; 
    }
    .instructor-card--with-car .instructor-card__details {
        display: flex;
        flex-wrap: wrap;
        align-items: center;
        justify-content: space-between;
    }
    .instructor-card--with-car .instructor-detail:first-child {
        width: 100px;
        margin-bottom: 0;
        text-align: left;
        margin-left: -42px;
        margin-top: -5px;
        z-index: 10;
    }
    .instructor-card--with-car .instructor-card__car {
        width: 140px;
        height: 97px;
        margin-right: -15px;
        margin-top: -115px;
        display: block;
        object-fit: cover;  
    }

    .instructor-card--with-car .car-text {
        display: none;
    }

    /* Оверлей оценки инструктора */
    .delete-overlay__box {
        width: 328px;
        min-height: 150px;
        padding: 30px 20px;
    }
    .delete-overlay__text {
        font-size: 18px;
        margin-bottom: 20px;
    }
    .btn--cancel-rate,
    .btn--confirm-rate {
        width: 130px;
        height: 45px;
        font-size: 14px;
    }
    .delete-overlay__buttons {
        gap: 15px;
    }

    /* Нижние отступы */
    .instructor-main {
        margin-bottom: 40px;
    }
}