html, body {
    height: 100%;
}

header {
    background: #070707;
    z-index: 4;
    position: relative;
}


h1 {
    white-space: nowrap;
    z-index: 2;
    position: relative;
    margin-top: 110px;
}

.tabs {
    overflow: hidden;
    margin-top: 40px;
    padding-bottom: 40px;
    line-height: 1;
}

.tablist {
    display: flex;
    gap: 24px;
}

.tab, #tab-feedback {
    -webkit-tap-highlight-color: transparent;
    appearance: none;
    border: 0;
    background: transparent;
    color: rgba(255, 255, 255, 0.5);
    font-weight: 400;
    padding: 4px 8px;
    border-radius: 12px;
    cursor: pointer;
    transition: transform .12s ease, color .15s ease, background .15s ease, box-shadow .15s ease;
    position: relative;
    font-size: 14px;
    line-height: 1.1;
}

#tab-feedback {
    color: rgb(255, 255, 255);
    border: 1px solid #FFCC00;
    font-weight: 700;
    margin-left: auto;
    border-radius: 16px;
}

.tab.is-active {
    color: #000000;
    background: #ffffff;
}

.panel {
    display: none;

}

.panel.is-active {
    display: grid;
    padding: 64px 0 0;
}

.tabs .panels .panel#panel-video {
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
}

.tabs .panels .panel .descr {
    display: flex;
    gap: 16px;
}

.tabs .panels .panel .descr .year {
    color: #404040;
}

.video .video_container {
    width: 100%;
    height: 250px;
    transition: transform 0.5s ease;
    position: relative;
}

.video:hover .video_container {
    transform: scale(1.05);
    z-index: 3;
}

.video .video_container iframe {
    width: 100%;
    height: 100%;
    top: 0;
    left: 0;
}

.video {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.video .descr {
    font-weight: 500;
    font-size: 14px;
}

.reviews_list {
    display: grid;
    grid-template-columns: 1fr;
}

.reviews_list .review {
    display: grid;
    grid-template-columns: 2fr 3fr;
    border-bottom: 1px solid rgba(255, 255, 255, 0.16);
    padding: 24px 0;
}

.reviews_list .review:first-child {
    border-top: 1px solid rgba(255, 255, 255, 0.16);
}

.reviews_list .review:last-child {
    border-bottom: 0;
}

.reviews_list .review .review_left {
    display: flex;
    flex-direction: column;
}

.reviews_list .review .review_left .review_name {
    font-weight: 400;
    font-size: 24px;
    margin-bottom: 8px;
}

.reviews_list .review .review_left .review_name .year {
    color: #404040;
}

.reviews_list .review .review_left .review_email {
    font-size: 14px;
    color: rgba(255, 255, 255, 0.48);
    margin-bottom: 16px;
}

.reviews_list .review .review_left .review_stars {
    display: flex;
    flex-direction: row;
    flex-wrap: nowrap;
    gap: 4px;
}

.reviews_list .review .review_right .review_title {
    font-weight: 400;
    font-size: 24px;
    line-height: 32px;
    margin-bottom: 8px;
}

.reviews_list .review .review_right .review_text {
    font-size: 18px;
    line-height: 28px;
    color: rgba(255, 255, 255, 0.47);
}

.review-form {
    max-width: 100%;
    box-sizing: border-box;
}

.review-form__row--top {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
    margin-bottom: 12px;
}

.review-form__row {
    margin-bottom: 24px;
}

.form-field {
    position: relative;
    display: flex;
    flex-direction: column;
}

/* Базовые поля */
input[type="text"],
input[type="email"],
textarea {
    width: 100%;
    box-sizing: border-box;
    padding: 24px 24px 8px 24px;
    border: 1px solid rgba(255, 255, 255, 0.32);
    border-radius: 8px;
    background: transparent;
    font: inherit;
    outline: none;
    color: #ffffff;
    height: 80px;
}

/* Плавающие лейблы */
.floating-label label {
    position: absolute;
    left: 22px;
    top: 30px;
    pointer-events: none;
    transition: 0.2s ease all;
    padding: 0 4px;
    color: rgba(255, 255, 255, 0.5);
    font-size: 18px;
}

/* При фокусе или если есть текст — поднимаем лейбл */
.floating-label input:focus + label,
.floating-label input:not(:placeholder-shown) + label,
.floating-label textarea:focus + label,
.floating-label textarea:not(:placeholder-shown) + label {
    top: 18px;
    font-size: 14px;
}

/* Чтобы textarea тоже корректно работала с placeholder-shown */
textarea {
    resize: vertical;
    min-height: 160px;
    padding-top: 40px;
}

/* Хак для placeholder-shown в textarea */
textarea:placeholder-shown + label {
    top: 30px;
    font-size: 18px;
}

/* Добавляем placeholder="" чтобы :placeholder-shown работал */
input:not([placeholder])::placeholder,
textarea:not([placeholder])::placeholder {
    color: transparent;
}


/* Блок оценок */
.review-form__row--actions {
    display: flex;
    align-items: center;
    gap: 16px;
    justify-content: space-between;
}

.rating {
    border: none;
    padding: 0;
    margin: 0;
    color: #ffffff;

}

.rating legend {
    float: left;
    margin-right: 16px;
    font-size: 16px;
    opacity: 48%;
}

.rating__stars {
    display: flex;
    flex-direction: row-reverse;
    justify-content: flex-start;
    gap: 4px;
}

.rating__stars input {
    display: none;
}

.rating__stars label {
    cursor: pointer;
    font-size: 16px;
    color: #ffffff;
    user-select: none;
    transition: color 0.2s;
    opacity: 48%;
    line-height: 1;
}

.rating__stars label:hover,
.rating__stars label:hover ~ label {
    opacity: 1;
}

.rating__stars input:checked ~ label {
    opacity: 1;
}

.review-form__submit {
    margin-left: auto;
}

.review-form__submit button {
    font-weight: 700;
    font-size: 16px;
    line-height: 100%;
    text-align: center;
    padding: 8px 16px;
    color: #000000;
    background-color: #FFCC00;
    border-radius: 24px;
    border: none;
    cursor: pointer;
}

.review-popup {
    position: fixed;
    inset: 0;
    display: none;
    align-items: center;
    justify-content: center;
    background: rgba(0, 0, 0, 0.5);
    z-index: 9999;
}

.review-popup.active {
    display: flex;
    animation: fadeIn 0.3s ease;
}

.review-popup__content {
    background: #000000;
    padding: 25px 30px;
    border-radius: 12px;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.2);
    position: relative;
    max-width: 320px;
    text-align: center;
    border: 1px solid #ffffff40;
}

.review-popup__message {
    font-size: 24px;
    color: #ffffff;
    margin-bottom: 10px;
    line-height: 1.4;
    font-weight: bold;
}

.review-popup__close {
    position: absolute;
    top: -40px;
    right: -40px;
    border: none;
    background: none;
    font-size: 43px;
    line-height: 1;
    cursor: pointer;
    color: #666;
}

.review-popup__close:hover {
    color: #ffffff;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

/* Ошибка поля */
.errorinput[type="text"], .errorinput[type="email"], .errortextarea{
    border: 1px solid #e63946; /* красная обводка */
}

/* Подпись под ошибочным полем */
.error-message {
    color: #e63946;
    font-size: 13px;
    margin-top: 4px;
    line-height: 1.3;
    display: block;
    position: absolute;
    bottom: -20px;
}

.rating .error-message {
    bottom: -20px;
    width: 200px;
    left: 0;
}


@media (max-width: 960px) {
    html, body {
        overflow: auto;
    }

    header {
        padding-bottom: 0;
    }

    h1 {
        position: relative;
        font-size: 40px;
        top: 0;
        order: 2;
        margin-top: 50px;
    }

    .tab {
        font-size: 14px;
        white-space: nowrap;
        padding: 0px 8px;
        border-radius: 20px;
    }

    #tab-feedback {
        font-size: 14px;
    }

    .tablist {
        overflow: auto;
        padding-bottom: 20px;
        gap: 12px;
    }

    .tabs .panels .panel#panel-video {
        grid-template-columns: 1fr;
    }

    .reviews_list .review {
        grid-template-columns: 1fr;
        gap: 16px;
    }

    .review-form__row {
        margin-bottom: 16px;
    }

    .reviews_list .review .review_left .review_name {
        font-size: 18px;
    }

    .reviews_list .review .review_right .review_title {
        font-size: 16px;
    }

    .reviews_list .review .review_right .review_text {
        font-size: 16px;
    }

}

@media (max-width: 700px) {

    .tabs .panels .panel .descr {
        margin-top: 16px;
    }

    .video .video_container {
        height: 193px;
    }

    .video:hover .video_container {
        transform: none;
        z-index: 3;
    }

    .panel.is-active {
        padding: 32px 0 0;
    }
    .review-form__row--top {
        grid-template-columns: 1fr;
        gap: 16px;
    }

    .review-form__row--actions {
        flex-direction: column;
        align-items: stretch;
    }

    .review-form__submit {
        margin-left: 0;
        margin-top: 32px;
        display: flex;
        justify-content: center;
    }

    .review-form__submit button {
        width: 100%;
    }

    .rating__stars {
        justify-content: flex-end;
    }

}


