@import url('https://fonts.googleapis.com/css2?family=Oxanium:wght@400;500;600;700&family=Sarabun:wght@400;600&display=swap');

/* Video testimonials slider (home page) */
.vt-section {
    padding: 80px 0;
    background: linear-gradient(135deg, #f7f4f4 0%, #f1f1f3 100%);
    overflow: hidden;
}

.vt-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    gap: 24px;
    margin-bottom: 40px;
}

.vt-title {
    font-family: 'Oxanium', sans-serif;
    font-size: clamp(32px, 4.5vw, 56px);
    font-weight: 600;
    line-height: 1.05;
    color: #111;
    margin: 0;
}

.vt-title span {
    color: #E30613;
}

.vt-intro {
    font-family: 'Sarabun', sans-serif;
    font-size: 17px;
    color: #666;
    max-width: 400px;
    margin: 0;
}

.vt-track {
    display: flex;
    gap: 18px;
    align-items: stretch;
}

.vt-item {
    display: flex;
    flex: 0 0 auto;
    gap: 18px;
}

.vt-card {
    position: relative;
    width: 300px;
    height: 400px;
    border-radius: 24px;
    overflow: hidden;
    background: #111;
    cursor: pointer;
    flex: 0 0 auto;
}

.vt-card video,
.vt-card iframe {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    border: 0;
}

.vt-card::after {
    content: "";
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.45);
    transition: opacity 0.3s ease;
    pointer-events: none;
}

/* Inactive cards: the overlay catches the click so the card can be focused first */
.vt-item:not(.is-active) .vt-card::after {
    pointer-events: auto;
    z-index: 4;
}

.vt-item.is-active .vt-card::after {
    background: linear-gradient(to top, rgba(0, 0, 0, 0.75) 0%, rgba(0, 0, 0, 0) 45%);
}

.vt-play {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.9);
    color: #E30613;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    z-index: 2;
    pointer-events: none;
}

.vt-item.is-playing .vt-play {
    display: none;
}

.vt-item.is-playing .vt-card::after {
    background: linear-gradient(to top, rgba(0, 0, 0, 0.75) 0%, rgba(0, 0, 0, 0) 45%);
}

.vt-item.is-playing .vt-mute {
    display: flex;
}

.vt-mute {
    position: absolute;
    top: 16px;
    right: 16px;
    width: 38px;
    height: 38px;
    border-radius: 50%;
    border: 0;
    background: rgba(0, 0, 0, 0.55);
    color: #fff;
    font-size: 14px;
    z-index: 3;
    display: none;
    align-items: center;
    justify-content: center;
}

.vt-item.is-active .vt-mute {
    display: flex;
}

.vt-name {
    position: absolute;
    left: 24px;
    bottom: 22px;
    right: 24px;
    color: #fff;
    z-index: 2;
    display: none;
    pointer-events: none;
}

.vt-item.is-active .vt-name {
    display: block;
}

.vt-name strong {
    display: block;
    font-family: 'Oxanium', sans-serif;
    font-size: 18px;
}

.vt-name small {
    font-family: 'Sarabun', sans-serif;
    font-size: 14px;
    opacity: 0.9;
}

.vt-item {
    transition: gap 0.5s ease;
}

.vt-item:not(.is-active) {
    gap: 0;
}

.vt-text {
    width: 340px;
    display: flex;
    flex-direction: column;
    padding: 20px 0;
    overflow: hidden;
    transition: width 0.5s ease, opacity 0.4s ease;
}

.vt-item:not(.is-active) .vt-text {
    width: 0;
    opacity: 0;
}

.vt-text > * {
    min-width: 340px;
}

.vt-tag {
    font-family: 'Sarabun', sans-serif;
    font-size: 15px;
    color: #E30613;
    font-weight: 600;
    margin-bottom: 28px;
}

.vt-quote {
    font-family: 'Oxanium', sans-serif;
    font-size: 24px;
    line-height: 1.3;
    color: #111;
    margin-bottom: 24px;
}

.vt-desc {
    font-family: 'Sarabun', sans-serif;
    font-size: 16px;
    line-height: 1.6;
    color: #777;
    margin: 0;
}

.vt-nav {
    display: flex;
    justify-content: flex-end;
    align-items: center;
    gap: 18px;
    margin-top: 32px;
}

.vt-count {
    font-family: 'Oxanium', sans-serif;
    font-size: 28px;
    color: #999;
}

.vt-count b {
    font-weight: 400;
    color: #111;
}

.vt-next {
    border: 0;
    background: none;
    font-size: 22px;
    color: #111;
    padding: 4px 8px;
}

.vt-next:hover {
    color: #E30613;
}

@media (max-width: 767px) {
    .vt-section {
        padding: 56px 0;
    }

    .vt-header {
        flex-direction: column;
        align-items: flex-start;
    }

    .vt-track {
        flex-direction: column;
    }

    .vt-item {
        flex-direction: column;
        width: 100%;
    }

    .vt-item:not(.is-active) {
        display: none;
    }

    .vt-card {
        width: 100%;
        height: 480px;
    }

    .vt-text {
        width: 100%;
        padding: 0;
    }

    .vt-text > * {
        min-width: 0;
    }
}

/* Card preview: hide YouTube's own buttons and let the card take every click */
.vt-card iframe {
    position: absolute;
    left: 0;
    top: 50%;
    width: 100%;
    height: 135%;
    transform: translateY(-50%);
    pointer-events: none;
}

.vt-card::after {
    pointer-events: auto;
    z-index: 4;
}

.vt-item.is-active .vt-mute {
    z-index: 5;
}

/* Popup player */
.vt-modal {
    position: fixed;
    inset: 0;
    z-index: 2147483000;
    background: rgba(0, 0, 0, 0.75);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 16px;
}

.vt-modal[hidden] {
    display: none;
}

.vt-modal-box {
    position: relative;
    height: min(85vh, 760px);
    aspect-ratio: 9 / 16;
    max-width: 100%;
    background: #000;
    border-radius: 16px;
    overflow: hidden;
}

.vt-modal-player,
.vt-modal-player iframe {
    width: 100%;
    height: 100%;
    border: 0;
    display: block;
}

.vt-modal-close {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 2;
    width: 44px;
    height: 44px;
    border: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.15);
    color: #fff;
    font-size: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
}
