/* ========================
   Базовые настройки (шрифты уже подключены в main.css)
   ======================== */
*,
*::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;
}

/* ========================
   Основной контент
   ======================== */
.study-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;
}

/* ========================
   Заголовок и описание
   ======================== */
.study-hero__title {
    font-size: 50px;
    font-weight: 500;
    font-family: 'Montserrat', sans-serif;
    margin-bottom: 30px;
    color: #000;
}

.study-hero__desc {
    font-size: 18px;
    font-weight: 300;
    line-height: 1.5;
    max-width: 1200px;
    margin-bottom: 60px;
    color: #000;
}

/* ========================
   Категория обучения
   ======================== */
.study-category {
    margin-bottom: 60px;
}

.study-category__title {
    font-size: 30px;
    font-weight: 500;
    margin-bottom: 30px;
}

/* ========================
   Карточки курсов
   ======================== */
.study-cards {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.course-card {
    background-color: #f5f5f5;
    border-radius: 10px;
    padding: 0;
    display: flex;
    align-items: center;
    min-height: 150px;
    transition: box-shadow 0.3s, transform 0.2s;
    position: relative;                  
    overflow: hidden;
    gap: 0;
}

.course-card:hover {
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.15);
    transform: translateY(-1px);
}

/* Оверлей-ссылка на всю карточку */
.course-card__link-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
}

/* Увеличиваем z-index для кнопки, чтобы она была кликабельна */
.course-card__btn {
    position: relative;
    z-index: 2;
}

/* Название курса */
.course-card__name {
    width: 417px;
    max-width: 417px;
    padding-left: 30px;
    display: flex;
    align-items: center;
    flex-shrink: 0;
    position: relative;
    z-index: 2;                        
}

.course-card__name a {
    text-decoration: none;
    color: #000;
    font-size: 18px;
    font-weight: 400;
    line-height: 1.3;
    word-break: break-word;
    transition: color 0.2s;
}

.course-card__name a:hover {
    color: #D90D26;
}

/* Длительность */
.course-card__duration {
    font-size: 18px;
    font-weight: 400;
    color: #000;
    width: 120px;
    text-align: center;
    flex-shrink: 0;
    margin-left: 49px;
    position: relative;
    z-index: 2;
}

/* Блок цен */
.course-card__prices {
    display: flex;
    flex-direction: column;             
    gap: 5px;
    margin-left: 70px;
    flex-shrink: 0;
    position: relative;
    z-index: 2;
}

.price-option {
    display: flex;
    flex-direction: column;              
    align-items: flex-start;
    gap: 5px;                          
}

.price-option__label {
    font-size: 18px;
    font-weight: 400;
    color: #969696;
    white-space: nowrap;
}

.price-option__values {
    display: flex;
    align-items: center;
    gap: 10px;
    position: relative;
}

.price-current {
    font-size: 22px;
    font-weight: 400;
    color: #000;
}

.price-old {
    font-size: 18px;
    font-weight: 400;
    color: #b9b9b9;
    position: relative;
    display: inline-block;
}

/* Прямая перечёркивающая полоска */
.price-old::after {
    content: '';
    position: absolute;
    left: 0;
    top: 50%;
    width: 100%;
    height: 1px;
    background-color: #D90D26;
    transform: none;                    
}

/* Одиночный блок цен (спецтехника) */
.course-card__prices--single {
    flex-direction: row;               
    align-items: center;
    gap: 15px;
}

.course-card__prices--single .price-current {
    order: 1;
}

.course-card__prices--single .price-old {
    order: 2;
}

/* Кнопка */
.course-card__btn {
    margin-left: auto;
    margin-right: 30px;
    width: 180px;
    height: 70px;
    font-size: 20px;
    font-weight: 400;
    font-family: 'Montserrat', sans-serif;
    text-decoration: none;
    flex-shrink: 0;
}

/* Анимация кнопки при наведении */
.course-card__btn:hover {
    opacity: 0.9;
    transform: translateY(-1px);
}

/* Скрываем мобильные блоки на десктопе */
.duration-mobile,
.price-label-mobile {
    display: none;
}

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

    body {
        overflow-y: scroll;
        -webkit-overflow-scrolling: touch;
    }
    
    .price-option__label {
        display: none;
    }

    .duration-mobile,
    .price-label-mobile {
        display: block;
    }

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

    main { margin-top: 83px; }

    /* Хлебные крошки */
    .breadcrumbs {
        font-size: 12px;
        font-weight: 400;
        margin-top: -45px;
        margin-bottom: 30px;
    }

    /* Карточка курса — сетка */
    .course-card {
        display: grid;
        grid-template-columns: 1fr auto;
        grid-template-areas:
            "name name"
            "prices duration"
            "prices btn";
        gap: 15px;
        width: 328px;
        background: #f5f5f5;
        border-radius: 10px;
        padding: 15px;
        margin-bottom: 10px;
        box-shadow: none;
        min-height: auto;
    }
    .course-card:hover {
        transform: none;
        box-shadow: none;
    }

    /* Название курса */
    .course-card__name {
        grid-area: name;
        width: auto;
        padding: 0;
        margin: 0;
    }
    .course-card__name a {
        font-size: 14px;
        font-weight: 500;
        line-height: 1.3;
    }

    /* Блок длительности */
    .duration-mobile {
        grid-area: duration;
        text-align: right;
        font-size: 12px;
        font-weight: 400;
        color: #000;
        align-self: start;
        margin-top: 0;
    }
    .duration-label-mobile {
        color: #969696;
        display: block;
        font-size: 12px;
        margin-bottom: 4px;
        line-height: 1.2;
    }
    .duration-value-mobile {
        display: block;
        font-size: 14px;
        font-weight: 400;
        text-align: right;
        line-height: 1.2;
    }

    /* Блок цен */
    .course-card__prices {
        grid-area: prices;
        margin: 0;
        display: flex;
        flex-direction: column;
        gap: 15px;
        width: 100%;
        align-self: start;   
    }
    .price-option {
        display: flex;
        justify-content: space-between;
        align-items: baseline;
        width: 100%;
        gap: 4px;
        flex-wrap: wrap;
        margin: 0;
        padding: 0;
        align-self: start;   
    }
    .price-label-mobile {
        font-size: 12px;
        color: #969696;
        font-weight: 400;
        white-space: nowrap;
        line-height: 1.2;
    }
    .price-option__values {
        display: flex;
        gap: 10px;
        align-items: baseline;
        flex-wrap: wrap;
        justify-content: flex-end;
    }
    .price-current {
        font-size: 14px;
        font-weight: 400;
        color: #000;
        line-height: 1.2;
    }
    .price-old {
        font-size: 12px;
        color: #b9b9b9;
        position: relative;
        font-weight: 400;
        line-height: 1.2;
    }
    .price-old::after {
        content: '';
        position: absolute;
        left: 0;
        top: 50%;
        width: 100%;
        height: 1px;
        background-color: #D90D26;
    }

    /* Кнопка */
    .course-card__btn {
        grid-area: btn;
        width: 111px;
        height: 39px;
        font-size: 12px;
        font-weight: 400;
        margin: 0;
        background: linear-gradient(-41deg, #D90D26, #E94055, #D90D26);
        border: none;
        border-radius: 10px;
        color: #fcfcfc;
        cursor: pointer;
        display: flex;
        align-items: center;
        justify-content: center;
        text-decoration: none;
        justify-self: end;
        align-self: end;
    }
    .course-card__btn:hover {
        opacity: 0.9;
        transform: none;
    }

    .course-card__prices--single {
        flex-direction: row;
        justify-content: space-between;
        align-items: baseline;
    }
    .course-card__prices--single .price-current {
        order: 1;
    }
    .course-card__prices--single .price-old {
        order: 2;
    }

    /* Заголовки и отступы */
    .study-category__title {
        font-size: 20px;
        font-weight: 500;
        margin-bottom: 15px;
    }
    .study-hero__title {
        font-size: 30px;
        font-weight: 500;
        margin-bottom: 15px;
    }
    .study-hero__desc {
        font-size: 14px;
        font-weight: 300;
        margin-bottom: 30px;
    }
    .study-category {
        margin-bottom: 30px;
    }
    .study-main {
        margin-bottom: 40px;
    }

    .course-card__duration {
        display: none;
    }

    /* Отключаем hover-эффекты для мобильной версии */
    .course-card:hover {
        box-shadow: none;
        transform: none;
    }
    .course-card__name a:hover {
        color: inherit;
    }
    .course-card__btn:hover {
        transform: none;
        opacity: 1;
    }
}