/*
Theme Name:   Plant3 Child [Template]
Theme URI:    https://www.longdii.com/themes/plant3/
Description:  Plant3 child theme for TM site cloning
Author:       LeeLaDee Co., Ltd.
Author URI:   https://www.longdii.com/
Template:     plant3
Version:      1.0.2
Text Domain:  plant3child
*/

/* หน้า video หลัก */
.ld-video-page {
    max-width: 1080px;
    margin: 0 auto;
    padding: 1.5rem 1rem 2rem;
    box-sizing: border-box;
}

.ld-video-page__title {
    font-size: 1.7rem;
    margin: 0;
}
.ld-video-page__short-title,
.ld-video-page__code {
    margin: 0.25rem 0 0;
    color: #777;
}

/* Layout สองคอลบน desktop */
.ld-video-page__layout {
    display: flex;
    flex-wrap: wrap;
    gap: 1.5rem;
}

.ld-video-page__player-col {
    flex: 2 1 60%;
    min-width: 280px;
}

.ld-video-page__meta-col {
    flex: 1 1 35%;
    min-width: 220px;
}

.ld-video-meta p {
    margin: 0 0 0.5rem;
}

/* Video Player base */
.ld-video-player {
    width: 100%;
}

/* ใช้ aspect-ratio เพื่อให้ video responsive */
.ld-video-player__inner {
    position: relative;
    width: 100%;
    aspect-ratio: 16 / 9;
    background: #000;
    overflow: hidden;
}

@supports not (aspect-ratio: 16 / 9) {
    .ld-video-player__inner {
        padding-top: 56.25%; /* fallback 16:9 */
    }
    .ld-video-player__video {
        position: absolute;
        top: 0;
        left: 0;
    }
}

.ld-video-player__video {
    width: 100%;
    height: 100%;
    display: block;
    object-fit: contain;
}

/* Mobile: คอลัมน์เรียงลง */
@media (max-width: 768px) {
    .ld-video-page__layout {
        flex-direction: column;
    }
}

/* Container หลัก */
.actor-profile {
    max-width: 1000px;
    margin: 0 auto;
    padding: 20px;
    background-color: #1a1a1a; /* พื้นหลังสีเข้มแบบ AVBase */
    color: #ffffff;
    font-family: 'Helvetica Neue', Arial, sans-serif;
}

/* ส่วนหัว: รูปและข้อมูลพื้นฐาน */
.actor-header {
    display: flex;
    flex-wrap: wrap;
    gap: 30px;
    background: #252525;
    padding: 30px;
    border-radius: 15px;
    align-items: center;
    box-shadow: 0 4px 15px rgba(0,0,0,0.3);
}

.actor-photo img {
    width: 180px;
    height: 180px;
    object-fit: cover;
    border: 4px solid #ff4757; /* เส้นขอบสีแดงเน้นจุดเด่น */
    border-radius: 50%;
    box-shadow: 0 0 20px rgba(255, 71, 87, 0.2);
}

.actor-info h1 {
    font-size: 2.5rem;
    margin-bottom: 5px;
    color: #ffffff;
}

.actor-info small {
    font-size: 1.1rem;
    color: #aaa;
    display: block;
    margin-bottom: 20px;
}

/* ตารางข้อมูล Profile */
.profile-table {
    width: 100%;
    border-collapse: collapse;
}

.profile-table td {
    padding: 8px 0;
    border-bottom: 1px solid #333;
}

.profile-table td:first-child {
    color: #888;
    width: 140px;
    font-weight: bold;
}

/* ส่วนรายการผลงาน (Filmography) */
.actor-works {
    margin-top: 50px;
}

.actor-works h2 {
    border-left: 5px solid #ff4757;
    padding-left: 15px;
    margin-bottom: 25px;
    font-size: 1.8rem;
}

.work-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 20px;
}

/* Card วิดีโอแต่ละเรื่อง */
.video-item {
    background: #252525;
    border-radius: 10px;
    overflow: hidden;
    transition: transform 0.3s ease;
}

.video-item:hover {
    transform: translateY(-5px);
}

.video-item a {
    text-decoration: none;
    color: #fff;
}

.video-item img {
    width: 100%;
    aspect-ratio: 3/4;
    object-fit: cover;
}

.video-details {
    padding: 12px;
}

.video-id {
    display: inline-block;
    background: #ff4757;
    color: #fff;
    padding: 2px 8px;
    border-radius: 4px;
    font-size: 0.8rem;
    font-weight: bold;
    margin-bottom: 5px;
}

.video-title {
    font-size: 0.9rem;
    line-height: 1.4;
    height: 2.8em; /* ล็อคความสูงไว้ 2 บรรทัด */
    overflow: hidden;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

/* Responsive สำหรับมือถือ */
@media (max-width: 600px) {
    .actor-header {
        flex-direction: column;
        text-align: center;
    }
    
    .actor-info h1 {
        font-size: 1.8rem;
    }
    
    .work-grid {
        grid-template-columns: repeat(2, 1fr); /* มือถือโชว์แถวละ 2 รูป */
        gap: 10px;
    }
}
