/* Videos Page Specific Styles */
.videos-page-container {
    max-width: 1200px;
    margin: 40px auto;
    padding: 0 20px;
    min-height: calc(100vh - 300px); /* Ensure footer doesn't jump up on load */
}

.page-header {
    text-align: center;
    margin-bottom: 40px;
}

.page-header h1 {
    font-size: 2.5rem;
    color: var(--dark-bg);
    position: relative;
    display: inline-block;
    padding-bottom: 15px;
    font-weight: 700;
}

.page-header h1::after {
    content: "";
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 60px;
    height: 4px;
    background-color: var(--primary);
    border-radius: 2px;
}

.video-content-wrapper {
    display: grid;
    grid-template-columns: 2.5fr 1fr; /* More space for the player */
    gap: 30px;
    align-items: start;
}

/* Main Video Display */
.main-video-display {
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.08); /* softer shadow */
    overflow: hidden;
    transition: transform 0.3s ease;
    border: 1px solid #eee;
}

.video-responsive {
    overflow: hidden;
    padding-bottom: 56.25%; /* 16:9 Aspect Ratio */
    position: relative;
    height: 0;
    background-color: #000;
}

.video-responsive iframe {
    left: 0;
    top: 0;
    height: 100%;
    width: 100%;
    position: absolute;
    border: none;
}

.video-text-content {
    padding: 25px;
}

#current-video-title {
    margin: 0 0 10px 0;
    font-size: 1.5rem;
    color: var(--dark-bg);
    line-height: 1.3;
    font-weight: 600;
}

#current-video-description {
    color: var(--text-grey);
    font-size: 1rem;
    line-height: 1.6;
    margin: 0;
}

/* Playlist */
.video-playlist {
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.08);
    height: fit-content;
    max-height: 600px; /* Restrict height */
    overflow-y: hidden; /* Hide main scroll */
    display: flex;
    flex-direction: column;
    border: 1px solid #eee;
}

.video-playlist-header {
    background-color: #f9f9f9;
    padding: 15px 20px;
    border-bottom: 1px solid #eee;
}

.video-playlist h3 {
    margin: 0;
    color: var(--dark-bg);
    font-size: 1.1rem;
    font-weight: 600;
}

.playlist-items {
    padding: 10px;
    display: flex;
    flex-direction: column;
    gap: 10px;
    overflow-y: auto;
    max-height: 540px;
}

/* Custom Scrollbar for Playlist Items */
.playlist-items::-webkit-scrollbar {
    width: 6px;
}
.playlist-items::-webkit-scrollbar-track {
    background: transparent;
}
.playlist-items::-webkit-scrollbar-thumb {
    background-color: #ddd;
    border-radius: 3px;
}
.playlist-items::-webkit-scrollbar-thumb:hover {
    background-color: #ccc;
}

.playlist-item {
    display: flex;
    gap: 12px;
    padding: 10px;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s ease;
    background-color: #fff;
    border: 1px solid transparent;
}

.playlist-item:hover {
    background-color: #f8f9fa;
    transform: translateY(-2px);
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
}

.playlist-item.active {
    background-color: #eefbf9; /* very light teal */
    border-color: var(--primary);
}

.playlist-item .thumbnail {
    width: 120px;
    height: 68px; /* 16:9 roughly */
    position: relative;
    flex-shrink: 0;
    overflow: hidden;
    border-radius: 6px;
    background-color: #eee;
}

.playlist-item .thumbnail img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0.9;
    transition: opacity 0.3s;
}

.playlist-item:hover .thumbnail img,
.playlist-item.active .thumbnail img {
    opacity: 1;
}

.playlist-item .play-icon {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: white;
    font-size: 1.2rem;
    opacity: 0;
    transition: opacity 0.2s;
    text-shadow: 0 1px 3px rgba(0,0,0,0.6);
}

.playlist-item:hover .play-icon,
.playlist-item.active .play-icon {
    opacity: 1;
}

.playlist-item .video-info {
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.playlist-item .video-info h4 {
    margin: 0;
    font-size: 0.9rem;
    color: var(--dark-bg);
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    font-weight: 600;
}

.playlist-item.active .video-info h4 {
    color: var(--primary);
}

/* Responsive Styles */
@media (max-width: 900px) {
    .video-content-wrapper {
        grid-template-columns: 1fr; /* Stack vertically on smaller screens */
    }

    .video-playlist {
        max-height: 400px;
    }
}

