/* FunlishLand custom styles */

/* Make lesson, quiz, and worksheet cards clickable and fun */
.card {
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    cursor: pointer;
}

.card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.15);
}

/* Sticky search bar */
.search-sticky-bar {
    position: sticky;
    top: 70px;
    /* adjust if your navbar is taller */
    z-index: 1000;
    background: #fff;
    padding: 10px 20px;
    border-bottom: 2px solid #eee;
}

/* Make lesson, quiz, and worksheet images smaller */
.card .card-img-top {
    max-height: 180px !important;
    width: 100%;
    object-fit: contain;
}

/* ==============================
   🎬 Custom Video Player Styling
   ============================== */
.custom-video-container {
    position: relative;
    display: flex;
    justify-content: center;
    align-items: center;
    margin: 2rem auto;
    width: 100%;
    max-width: 800px;
    /* keeps it centered and not too wide */
    background-color: #fdfdfd;
    border-radius: 16px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
    padding: 1rem;
}

/* 🎞️ Responsive video sizing */
.custom-video-container video,
.custom-video-container iframe {
    width: 100%;
    height: auto;
    border-radius: 12px;
    outline: none;
}

/* 🖼️ Poster or thumbnail */
.custom-video-container video::poster {
    object-fit: cover;
    border-radius: 12px;
}

/* 🎚️ Optional: subtle hover animation */
.custom-video-container video:hover,
.custom-video-container iframe:hover {
    transform: scale(1.01);
    transition: transform 0.3s ease-in-out;
}

/* 📱 Responsive layout for smaller screens */
@media (max-width: 768px) {
    .custom-video-container {
        padding: 0.5rem;
    }

    .custom-video-container iframe {
        height: 250px;
    }
}

.quiz-link {
    color: #2e7d32;
    font-weight: bold;
    text-decoration: none;
}

.quiz-link:hover {
    color: #1b5e20;
    text-decoration: underline;
}

li:hover {
    background-color: #f1f8e9;
    border-radius: 10px;
    transition: 0.2s;
}

/* ======================================
   📚 LESSON DETAIL PAGE (VIDEO FIRST)
====================================== */

.lesson-page {
    background: #eaf8fa;
    min-height: 100vh;
    padding: 160px 14px 36px;
}

.lesson-card {
    max-width: 1100px;
    margin: 0 auto;
    background: #fff;
    padding: 20px;
    border-radius: 16px;
    box-shadow: 0 6px 18px rgba(0, 0, 0, 0.08);
}

/* Big 16:9 video */
.video-wrap {
    position: relative;
    width: 100%;
    max-width: 980px;
    margin: 20px auto;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.15);
    background: #000;
    aspect-ratio: 16/9;
}

#lessonVideo {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: contain;
    background: #000;
}

/* Lesson parts */
.lesson-parts {
    max-width: 980px;
    margin: 15px auto 0;
}

.parts-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 10px;
}

.block-btn {
    background: #f8f8fb;
    border: 1px solid #ddd;
    padding: 8px 14px;
    border-radius: 10px;
    font-weight: 700;
    cursor: pointer;
}

.block-btn:hover {
    background: #eef7ff;
}

.block-btn.active {
    background: #dff3e2;
    border-color: #4CAF50;
}

/* Description below video */
.lesson-description {
    max-width: 980px;
    margin: 25px auto 0;
    padding: 18px;
    background: #f7fbff;
    border-radius: 14px;
    border: 1px solid #dce6f7;
    line-height: 1.6;
}

/* Mobile adjustments */
@media (max-width:768px) {
    .lesson-page {
        padding-top: 140px;
    }

    .lesson-card {
        padding: 15px;
    }

    .video-wrap,
    .lesson-description {
        max-width: 100%;
    }
}