/* services.css */

/* Карточки на главной услуг */
.service-card {
    background: #fff;
    border-radius: 24px;
    box-shadow: 0 15px 40px rgba(0,0,0,0.06);
    transition: all 0.3s ease;
    border: 1px solid transparent;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    height: 100%;               /* важно: карточка занимает всю высоту колонки */
}

.service-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 25px 50px rgba(0,0,0,0.1);
    border-color: #eaeaea;
}

.service-card-img {
    width: 100%;
    height: 220px;
    object-fit: cover;
    display: block;
}

.service-card-body {
    padding: 30px;
    display: flex;
    flex-direction: column;
    flex: 1;                     /* занимает всё оставшееся место под картинкой */
}

.service-card h3 {
    font-weight: 600;
    margin-bottom: 15px;
    /* Если нужно ограничить высоту заголовка, можно добавить:
    min-height: 3.6rem;          примерно под две строки */
}

.service-desc {
    font-size: 16px;
    color: #6c757d;
    margin-bottom: 15px;
    line-height: 1.5;
}

@media (max-width: 768px) {
    .service-card-img {
        height: 180px;
    }
    .service-card-body {
        padding: 20px;
    }
}

.service-features {
    margin-bottom: 20px;
    flex: 1;                     /* занимает всё доступное пространство между описанием и кнопкой */
}

.service-features li {
    margin-bottom: 8px;
    font-size: 16px;
}

.service-card .btn {
    align-self: flex-start;      /* можно заменить на stretch, если нужна кнопка на всю ширину */
    margin-top: auto;            /* дополнительная страховка */
}

/* Детальная страница услуги */
.service-detail {
    padding-top: 40px; /* отступ под фиксированную шапку */
    padding-bottom: 60px;
}

.service-detail h1 {
    font-weight: 700;
    margin-bottom: 40px;
}

/* Этап (step) */
.step-block {
    background: #fff;
    border-radius: 28px;
    padding: 30px;
    margin-bottom: 30px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.04);
    border: 1px solid #f0f0f0;
    transition: 0.2s;
}

.step-block:hover {
    box-shadow: 0 15px 40px rgba(0,0,0,0.08);
}

.step-title {
    font-size: 24px;
    font-weight: 600;
    margin-bottom: 15px;
    color: #0d6efd;
}

.step-desc {
    font-size: 16px;
    color: #555;
    margin-bottom: 20px;
    line-height: 1.6;
}

/* ===== ВИДЕО-ПРЕВЬЮ ===== */
.video-preview {
    position: relative;
    width: 100%;               /* растягиваем на всю ширину родителя */
    height: 380px;
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 8px 20px rgba(0,0,0,0.1);
    transition: transform 0.3s ease;
    cursor: pointer;
}

.video-preview:hover {
    transform: scale(1.02);
}

.video-preview img {
    width: 100%;
    height: 100%;
    display: block;
    aspect-ratio: 16 / 9;
    object-fit: cover;
}

/* Иконка воспроизведения (всегда видна, полупрозрачная) */
.video-preview .play-icon {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 70px;
    height: 70px;
    background: rgba(13, 110, 253, 0.85);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 30px;
    transition: all 0.3s ease;
    pointer-events: none;      /* чтобы клик проходил сквозь иконку */
    opacity: 0.9;
}

/* При наведении увеличивается и становится ярче */
.video-preview:hover .play-icon {
    width: 80px;
    height: 80px;
    font-size: 40px;
    background: #0d6efd;
    opacity: 1;
}

/* Адаптация для мобильных */
@media (max-width: 768px) {
    .video-preview .play-icon {
        width: 50px;
        height: 50px;
        font-size: 24px;
        opacity: 1;             /* на мобильных точно видна */
    }
    .video-preview:hover .play-icon {
        width: 60px;
        height: 60px;
        font-size: 30px;
    }
    .step-title {
        font-size: 20px;
    }
}

/* Модальное окно с видео */
.modal-video .modal-content {
    background: transparent;
    border: none;
}

/* Кастомная кнопка закрытия с крестиком */
.modal-video .btn-close {
    position: absolute;
    top: -30px;
    right: -30px;
    background: white;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    opacity: 1;
    z-index: 10;
    display: flex;
    align-items: center;
    justify-content: center;
    border: none;
    box-shadow: 0 2px 10px rgba(0,0,0,0.2);
}

/* Добавляем крестик через псевдоэлемент */
.modal-video .btn-close::after {
    content: "✕";
    font-size: 22px;
    line-height: 1;
    color: #000;
    font-weight: bold;
}

/* Для мобильных */
@media (max-width: 768px) {
    .modal-video .btn-close {
        top: 5px;
        right: 5px;
    }
}

.modal-video iframe,
.modal-video video {
    width: 100%;
    aspect-ratio: 16 / 9;
    border-radius: 16px;
    background: #000;
}

/* HERO */
.service-hero {
    background: 
    linear-gradient(rgba(0,0,0,0.6), rgba(0,0,0,0.6)),
    url("../images/services.jpg") 25% 10%/cover no-repeat;
    padding: 120px 0 80px 0;
    color: white;
}

.service-hero h1 {
    font-size: 42px;
    font-weight: 700;
}

.service-hero p {
    font-size: 18px;
    opacity: 0.9;
}