/* Hero секция курса */
.courses-hero {
    position: relative;
    width: 100%;
    margin-top: -85px;
    padding-top: 85px;
    background: linear-gradient(135deg, #4942E4 0%, #8696FE 50%, #C4B0FF 100%);
    overflow: hidden;
    min-height: 100vh;
    display: flex;
    align-items: center;
    color: white;
}

.hero-background {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
    pointer-events: none;
    opacity: 0.7;
}

.courses-hero::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(to bottom,
        rgba(15, 15, 35, 0) 0%,
        rgba(15, 15, 35, 0.4) 20%,
        rgba(15, 15, 35, 0.8) 60%,
        rgba(15, 15, 35, 0.95) 100%
    );
    z-index: 0;
}

.courses-hero-inner {
    position: relative;
    width: 100%;
    max-width: 1400px;
    margin: 0 auto;
    padding: 4rem 2rem;
    z-index: 1;
}

/* Контент курса */
.course-hero-content {
    display: grid;
    grid-template-columns: 60% 40%;
    gap: 4rem;
    align-items: start;
}

.course-info-main {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.course-school {
    font-size: 1.25rem;
    color: white;
    opacity: 0.9;
}

.course-info-main h1 {
    font-size: 2rem;
    font-weight: 700;
    line-height: 1.2;
    color: white;
    margin: 0;
}

.courses-hero .courses-description {
    font-size: 1.125rem;
    line-height: 1.6;
    color: white;
    opacity: 0.9;
    margin: 0;
}

/* Изображение курса */
.course-image-container {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.course-main-image {
    position: relative;
    border-radius: 1rem;
    overflow: hidden;
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    padding: 1rem;
}

.course-main-image img {
    width: 100%;
    height: auto;
    aspect-ratio: 16/9;
    object-fit: cover;
    border-radius: 0.5rem;
    display: block;
}

.course-badges {
    position: absolute;
    top: 1rem;
    left: 1rem;
    display: flex;
    gap: 0.5rem;
    z-index: 2;
}

.badge {
    padding: 0.375rem 0.75rem;
    border-radius: 1rem;
    font-size: 0.75rem;
    font-weight: 500;
    color: white;
    backdrop-filter: blur(4px);
}

.badge-primary {
    background: rgba(73, 66, 228, 0.95);
}

.badge-secondary {
    background: rgba(255, 255, 255, 0.2);
}

.badge-success {
    background: rgba(22, 163, 74, 0.95);
}

/* Блок цены */
.course-price-block {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 1rem;
    backdrop-filter: blur(10px);
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    gap: 1rem;
    color: white;
}

.price-info {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.price-content {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.course-main-price {
    font-size: 2.5rem;
    font-weight: 600;
    color: white;
}

.old-price {
    font-size: 1.125rem;
    color: white;
    opacity: 0.7;
    text-decoration: line-through;
}

.discount {
    font-size: 0.875rem;
    font-weight: 500;
    color: #16a34a;
    background: rgba(22, 163, 74, 0.2);
    padding: 0.25rem 0.75rem;
    border-radius: 1rem;
    margin-left: 0.5rem;
    backdrop-filter: blur(4px);
}

.installment-price {
    display: block;
    margin-top: 0.7rem;
    font-size: 1rem;
    color: #ffe082;
    font-weight: 400;
    opacity: 0.92;
    line-height: 1.5;
}

.installment-price span {
    font-weight: 600;
    color: #fffde4;
}

.course-main-duration-info {
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    padding-top: 1rem;
    margin-top: 1.5rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.course-main-duration-label {
    font-size: 1rem;
    color: white;
    opacity: 0.7;
    margin-bottom: 0.2rem;
}

.course-main-duration {
    font-size: 1.3rem;
    font-weight: 700;
    color: white;
}

/* Кнопки */
.course-buttons {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
    margin-top: 1.5rem;
}

.course-buttons a {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem;
    border-radius: 0.5rem;
    font-size: 1rem;
    font-weight: 500;
    text-decoration: none;
    transition: all 0.2s ease;
}

.btn-primary {
    background: var(--primary-color);
    color: white;
    border: none;
}

.btn-primary:hover {
    background: var(--primary-hover-color);
    transform: translateY(-2px);
}

.btn-secondary {
    background: rgba(255, 255, 255, 0.1);
    color: white;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.btn-secondary:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: translateY(-2px);
}

/* Преимущества */
.course-advantages {
    margin-top: 4rem;
}

.course-advantages h2 {
    color: white;
    font-size: 1.75rem;
    font-weight: 600;
    margin-bottom: 3rem;
    text-align: center;
}

.advantages-list {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2rem;
    max-width: 1200px;
    margin: 0 auto;
}

.advantage-item {
    display: flex;
    align-items: flex-start;
    gap: 1rem;
    background: rgba(15, 23, 42, 0.5);
    backdrop-filter: blur(10px);
    padding: 2rem;
    border-radius: 1.25rem;
    min-height: 120px;
}

.advantage-icon {
    color: #FFD700;
    font-size: 1.25rem;
    line-height: 1;
    flex-shrink: 0;
}

.advantage-text {
    color: white;
    font-size: 1.125rem;
    line-height: 1.5;
    font-weight: 400;
}

/* Плавающая кнопка */
.floating-course-button {
    position: fixed;
    bottom: 2rem;
    left: 50%;
    transform: translateX(-50%);
    z-index: 1000;
}

.floating-btn {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 1rem 2rem;
    background: linear-gradient(45deg, #c53030, #e53e3e, #dc2626, #e53e3e, #c53030);
    background-size: 300% 300%;
    color: white;
    text-decoration: none;
    border-radius: 3rem;
    font-weight: 700;
    font-size: 1rem;
    transition: all 0.3s ease;
    white-space: nowrap;
    border: 2px solid rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(10px);
    animation: gradientShimmer 3s ease-in-out infinite;
}

.floating-btn:hover {
    background: linear-gradient(45deg, #991b1b, #c53030, #dc2626, #c53030, #991b1b);
    background-size: 300% 300%;
    transform: translateY(-2px);
    color: white;
    animation: gradientShimmer 1.5s ease-in-out infinite;
}

.floating-btn svg {
    stroke: currentColor;
    flex-shrink: 0;
}

@keyframes gradientShimmer {
    0% {
        background-position: 0% 50%;
    }
    50% {
        background-position: 100% 50%;
    }
    100% {
        background-position: 0% 50%;
    }
}

/* Секция похожих курсов */
.courses-section {
    margin-top: 6rem;
    padding-bottom: 4rem;
    background: white;
}

.courses-section__container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1.5rem;
}

.courses-section__header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
}

.courses-section__title {
    color: #1a1a1a;
    font-size: 1.75rem;
    font-weight: 600;
    margin: 0;
}

.courses-section__more .home-button {
    padding: 0.875rem 1.5rem;
    background: rgba(73, 66, 228, 0.1);
    color: #4942E4;
    border-radius: 0.875rem;
    font-weight: 600;
    font-size: 0.9375rem;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
    display: inline-block;
}

.courses-section__more .home-button:hover {
    background: #4942E4;
    color: white;
}

.courses-section__slider {
    position: relative;
    margin: 0 -0.5rem;
    padding: 0 0.5rem;
}

.courses-section__track {
    display: flex;
    gap: 1rem;
    overflow-x: auto;
    scroll-behavior: smooth;
    scrollbar-width: none;
    -ms-overflow-style: none;
    padding: 0.5rem 0;
}

.courses-section__track::-webkit-scrollbar {
    display: none;
}

.courses-section__slide {
    flex: 0 0 280px;
    min-width: 280px;
    max-width: 280px;
}

/* Карточка курса */
.home-course-card {
    background: white;
    border-radius: 1rem;
    overflow: hidden;
    text-decoration: none;
    color: var(--text-color);
    transition: all 0.2s ease;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    height: 100%;
    display: flex;
    flex-direction: column;
    border: 1px solid #e5e7eb;
}

.home-course-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.12);
    border-color: #4942E4;
}

.home-course-card__image {
    width: 100%;
    aspect-ratio: 16/9;
    overflow: hidden;
    background: #f3f4f6;
}

.home-course-card__image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.home-course-card__content {
    padding: 1.25rem;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    flex: 1;
}

.home-course-card__title {
    font-size: 1rem;
    font-weight: 600;
    line-height: 1.4;
    margin: 0;
    color: #1a1a1a;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    min-height: 2.8em;
}

.home-course-card__school {
    font-size: 0.8125rem;
    color: #6b7280;
    margin: 0;
    font-weight: 500;
}

.home-course-card__price-block {
    margin-top: auto;
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    gap: 0.75rem;
    padding-top: 0.5rem;
    border-top: 1px solid #f3f4f6;
}

.home-course-card__price-info {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.home-course-card__old-price {
    font-size: 0.75rem;
    color: #9ca3af;
    text-decoration: line-through;
}

.home-course-card__price {
    font-size: 1.125rem;
    font-weight: 700;
    color: #4942E4;
}

.home-course-card__duration {
    display: flex;
    align-items: center;
    gap: 0.375rem;
    font-size: 0.8125rem;
    color: #6b7280;
    white-space: nowrap;
}

.home-course-card__duration svg {
    width: 14px;
    height: 14px;
    stroke: #9ca3af;
}

/* Планшеты */
@media (max-width: 1024px) {
    .course-hero-content {
        grid-template-columns: 1fr;
        gap: 3rem;
    }

    .course-main-image {
        max-width: 600px;
        margin: 0 auto;
    }

    .advantages-list {
        grid-template-columns: repeat(2, 1fr);
    }

    .courses-section__slide {
        flex: 0 0 calc(50% - 1rem);
    }
}

/* Мобильные устройства */
@media (max-width: 768px) {
    .courses-hero {
        padding: 5rem 0 2rem;
        min-height: auto;
    }

    .course-info-main h1 {
        font-size: 2rem;
    }

    .course-price-block {
        text-align: center;
    }

    .course-main-duration-info {
        text-align: center;
    }

    .course-buttons {
        grid-template-columns: 1fr;
    }

    .course-main-price {
        font-size: 1.5rem;
    }

    .floating-course-button {
        position: fixed;
        bottom: 1rem;
        left: 1rem;
        right: 1rem;
        transform: none;
        width: auto;
    }

    .floating-btn {
        width: 100%;
        justify-content: center;
        padding: 0.875rem 1.5rem;
        font-size: 0.9rem;
        gap: 0.5rem;
    }

    .floating-btn svg:last-child {
        width: 14px;
        height: 14px;
    }

    .courses-section {
        margin-top: 4rem;
        padding-bottom: 3rem;
    }

    .courses-section__header {
        flex-direction: column;
        gap: 1rem;
        text-align: center;
    }

    .courses-section__title {
        font-size: 1.5rem;
    }

    .courses-section__slide {
        flex: 0 0 260px;
        min-width: 260px;
        max-width: 260px;
    }

    .home-course-card__content {
        padding: 1rem;
        gap: 0.625rem;
    }

    .home-course-card__title {
        font-size: 0.9375rem;
    }

    .home-course-card__price {
        font-size: 1rem;
    }
}

/* Малые мобильные */
@media (max-width: 640px) {
    .advantages-list {
        grid-template-columns: 1fr !important;
        gap: 1rem !important;
    }

    .advantage-item {
        padding: 1.5rem !important;
        min-height: auto !important;
    }

    .advantage-text {
        font-size: 0.95rem !important;
    }
}

/* Очень малые экраны */
@media (max-width: 600px) {
    .course-image-container {
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 0.5rem;
        align-items: stretch;
    }

    .course-main-image {
        padding: 0.2rem;
        border-radius: 0.5rem;
        margin-bottom: 0;
    }

    .course-main-image img {
        border-radius: 0.2rem;
    }

    .course-badges {
        top: 0.2rem;
        left: 0.2rem;
        gap: 0.1rem;
    }

    .badge {
        font-size: 0.5rem;
        padding: 0.12rem 0.3rem;
    }

    .course-price-block {
        padding: 0.4rem;
        border-radius: 0.5rem;
        font-size: 0.8rem;
        gap: 0.3rem;
    }

    .price-content,
    .price-info {
        gap: 0.15rem;
    }

    .course-main-price {
        font-size: 1rem !important;
        font-weight: 700 !important;
        line-height: 1.1;
    }

    .old-price {
        font-size: 0.5rem;
    }

    .discount {
        font-size: 0.6rem;
        padding: 0;
        margin-left: 0 !important;
    }

    .installment-price,
    .course-main-duration-info {
        font-size: 0.8rem !important;
        margin-top: 0.3rem !important;
        padding-top: 0.2rem;
    }

    .course-main-duration-label {
        font-size: 0.7rem !important;
    }

    .course-main-duration {
        font-size: 0.9rem !important;
    }

    .course-buttons {
        gap: 0.3rem;
        margin-top: 0.3rem;
    }

    .course-buttons a {
        font-size: 0.85rem;
        padding: 0.5rem;
        border-radius: 0.3rem;
    }
}
