/**
 * Lessons Frontend Styles
 */

/* Hero Section */
.lessons-hero-section {
    background: linear-gradient(135deg, #F5F1EE 0%, #F9F6F3 100%);
    padding: 15px 0;
    min-height: 250px;
    display: flex;
    align-items: center;
    position: relative;
    overflow: hidden;
}

.hero-content-wrapper {
    display: flex;
    align-items: center;
    gap: 40px;
}

.hero-content {
    flex: 0 0 60%;
    animation: fadeInUp 0.6s ease-out;
}

.hero-title {
    color: #323710;
    font-size: 2.5rem;
    font-weight: 600;
    margin-bottom: 15px;
    font-family: 'Aleo', serif;
}

.hero-tagline {
    color: #666;
    font-size: 1.2rem;
    margin-bottom: 15px;
    line-height: 1.5;
}

.hero-count {
    color: #666;
    font-size: 0.95rem;
    margin-bottom: 30px;
}

.hero-count strong {
    font-weight: 600;
    font-size: 1.2em;
    color: #007b98;
}

.hero-buttons {
    display: flex;
    gap: 15px;
    flex-wrap: wrap;
}

.btn {
    display: inline-block;
    padding: 12px 24px;
    border-radius: 5px;
    text-decoration: none;
    font-weight: 500;
    transition: all 0.3s ease;
}

.btn-primary {
    background: #f6b402;
    color: #323710;
    border: 2px solid #f6b402;
}

.btn-primary:hover {
    background: #e5a602;
    transform: translateY(-2px);
}

.btn-secondary {
    background: transparent;
    color: #007b98;
    border: 2px solid #007b98;
}

.btn-secondary:hover {
    background: #007b98;
    color: white;
}

.hero-image {
    flex: 0 0 40%;
    text-align: center;
    animation: fadeInUp 0.8s ease-out;
}

.hibiscus-image {
    max-width: 100%;
    height: auto;
    animation: float 3s ease-in-out infinite;
}

@keyframes float {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-10px); }
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Category Filters */
.lesson-filters-section {
    margin-bottom: 40px;
    text-align: center;
}

.lesson-filters {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    justify-content: center;
}

.filter-btn {
    padding: 8px 16px;
    background: #f0f0f0;
    border: 2px solid transparent;
    border-radius: 20px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 0.95rem;
    color: #333;
}

.filter-btn:hover {
    background: #e0e0e0;
    transform: translateY(-1px);
}

.filter-btn.active {
    background: #f6b402;
    color: #323710;
    border-color: #f6b402;
}

/* Lessons Grid */
.lessons-grid-section {
    margin-bottom: 60px;
}

.lessons-grid-section h2 {
    color: #323710;
    font-size: 2rem;
    margin-bottom: 10px;
    text-align: center;
    font-family: 'Aleo', serif;
}

.section-intro {
    text-align: center;
    color: #666;
    margin-bottom: 30px;
}

.lessons-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 30px;
}

.lesson-card {
    background: white;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    transition: all 0.3s ease;
}

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

.lesson-card.hidden {
    display: none;
}

.lesson-card-image {
    position: relative;
    height: 180px;
    background: #f0f0f0;
    overflow: hidden;
}

.lesson-card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.placeholder-image {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 100%;
    background: linear-gradient(135deg, #f0f0f0 0%, #e0e0e0 100%);
}

.video-badge {
    position: absolute;
    top: 10px;
    right: 10px;
    background: rgba(0,0,0,0.7);
    color: white;
    padding: 5px 10px;
    border-radius: 5px;
    font-size: 0.85rem;
    display: flex;
    align-items: center;
    gap: 5px;
}

.lesson-card-content {
    padding: 20px;
}

.lesson-title {
    font-size: 1.1rem;
    margin-bottom: 10px;
    font-family: 'Aleo', serif;
}

.lesson-title a {
    color: #323710;
    text-decoration: none;
    transition: color 0.3s ease;
}

.lesson-title a:hover {
    color: #007b98;
}

.lesson-excerpt {
    color: #666;
    font-size: 0.95rem;
    margin-bottom: 15px;
    line-height: 1.5;
}

.lesson-meta {
    display: flex;
    gap: 10px;
    align-items: center;
    flex-wrap: wrap;
}

.time-badge {
    background: #f0f0f0;
    padding: 4px 10px;
    border-radius: 15px;
    font-size: 0.85rem;
    color: #666;
    display: inline-flex;
    align-items: center;
    gap: 5px;
}

.category-tag {
    background: #007b98;
    color: white;
    padding: 4px 10px;
    border-radius: 15px;
    font-size: 0.85rem;
}

/* Learning Path Section */
.learning-path-section {
    background: linear-gradient(135deg, #F9F6F3 0%, #F5F1EE 100%);
    padding: 40px 20px;
    border-radius: 10px;
    margin-bottom: 60px;
}

.learning-path-section h2 {
    color: #323710;
    font-size: 2rem;
    margin-bottom: 10px;
    text-align: center;
    font-family: 'Aleo', serif;
}

.learning-path-section p {
    text-align: center;
    color: #666;
    margin-bottom: 30px;
}

.path-container {
    display: flex;
    gap: 30px;
    overflow-x: auto;
    padding-bottom: 20px;
}

.path-lesson {
    flex: 0 0 200px;
    text-align: center;
}

.path-number {
    width: 40px;
    height: 40px;
    background: #f6b402;
    color: #323710;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    font-size: 1.2rem;
    margin: 0 auto 15px;
    position: relative;
}

.path-lesson:not(:last-child) .path-number::after {
    content: '';
    position: absolute;
    left: 100%;
    top: 50%;
    transform: translateY(-50%);
    width: 30px;
    height: 2px;
    background: #ddd;
}

.path-card {
    background: white;
    border-radius: 10px;
    padding: 10px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    transition: transform 0.3s ease;
}

.path-card:hover {
    transform: translateY(-3px);
}

.path-card img {
    width: 100%;
    height: 100px;
    object-fit: cover;
    border-radius: 5px;
    margin-bottom: 10px;
}

.path-card-content h4 {
    font-size: 0.95rem;
    margin-bottom: 5px;
}

.path-card-content h4 a {
    color: #323710;
    text-decoration: none;
}

.path-card-content h4 a:hover {
    color: #007b98;
}

.time-mini {
    font-size: 0.8rem;
    color: #666;
}

/* YouTube Gallery */
.youtube-gallery-section {
    margin-bottom: 60px;
}

.youtube-gallery-section h2 {
    color: #323710;
    font-size: 2rem;
    margin-bottom: 10px;
    text-align: center;
    font-family: 'Aleo', serif;
}

.youtube-gallery-section p {
    text-align: center;
    color: #666;
    margin-bottom: 30px;
}

.youtube-gallery {
    background: #f9f9f9;
    padding: 20px;
    border-radius: 10px;
}

.video-thumbnails-scroll {
    display: flex;
    gap: 20px;
    overflow-x: auto;
    padding-bottom: 10px;
}

.video-thumbnails-scroll::-webkit-scrollbar {
    height: 8px;
}

.video-thumbnails-scroll::-webkit-scrollbar-track {
    background: #f0f0f0;
    border-radius: 10px;
}

.video-thumbnails-scroll::-webkit-scrollbar-thumb {
    background: #007b98;
    border-radius: 10px;
}

.video-thumbnail-item {
    flex: 0 0 200px;
    text-align: center;
}

.video-thumbnail-item a {
    position: relative;
    display: block;
    margin-bottom: 10px;
}

.video-thumbnail-item img {
    width: 100%;
    height: 120px;
    object-fit: cover;
    border-radius: 5px;
}

.video-overlay {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: rgba(0,0,0,0.7);
    border-radius: 50%;
    width: 50px;
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.3s ease;
}

.video-thumbnail-item a:hover .video-overlay {
    background: rgba(0,123,152,0.9);
}

.video-thumbnail-item h5 {
    font-size: 0.9rem;
    color: #333;
    margin: 0;
}

/* Single Lesson Styles */
.single-lesson {
    padding: 40px 0;
}

.lesson-header {
    margin-bottom: 30px;
}

.lesson-title {
    color: #323710;
    font-size: 2rem;
    margin-bottom: 15px;
    font-family: 'Aleo', serif;
}

.lesson-meta-badges {
    display: flex;
    gap: 15px;
    flex-wrap: wrap;
}

.category-badge {
    background: #007b98;
    color: white;
    padding: 5px 12px;
    border-radius: 20px;
    font-size: 0.9rem;
}

/* YouTube Embed */
.lesson-video-section {
    margin-bottom: 40px;
}

.youtube-embed-wrapper {
    position: relative;
    padding-bottom: 56.25%; /* 16:9 aspect ratio */
    height: 0;
    overflow: hidden;
    border-radius: 10px;
}

.youtube-embed-wrapper iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

/* Content Layout */
.lesson-content-wrapper {
    display: flex;
    gap: 40px;
}

.lesson-sidebar {
    flex: 0 0 300px;
    position: relative;
}

.lesson-sidebar.sticky {
    position: sticky;
    top: 100px;
}

.lesson-main-content {
    flex: 1;
    min-width: 0;
}

/* Table of Contents */
.toc-container {
    background: white;
    border: 1px solid #e0e0e0;
    border-radius: 10px;
    padding: 20px;
    margin-bottom: 30px;
}

.toc-container h3 {
    color: #323710;
    font-size: 1.1rem;
    margin-bottom: 15px;
    font-family: 'Aleo', serif;
}

.table-of-contents ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.table-of-contents li {
    margin-bottom: 10px;
}

.table-of-contents li.toc-h3 {
    margin-left: 20px;
}

.table-of-contents a {
    color: #666;
    text-decoration: none;
    transition: color 0.3s ease;
}

.table-of-contents a:hover {
    color: #007b98;
}

/* Related Grammar Box */
.related-grammar-box {
    background: #f9f9f9;
    border-radius: 10px;
    padding: 20px;
    margin-bottom: 30px;
}

.related-grammar-box h3 {
    color: #323710;
    font-size: 1.1rem;
    margin-bottom: 15px;
    font-family: 'Aleo', serif;
}

.related-grammar-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.related-grammar-list li {
    margin-bottom: 10px;
}

.related-grammar-list a {
    color: #007b98;
    text-decoration: none;
    transition: color 0.3s ease;
}

.related-grammar-list a:hover {
    color: #005a72;
    text-decoration: underline;
}

/* Share Buttons */
.share-buttons-box {
    background: white;
    border: 1px solid #e0e0e0;
    border-radius: 10px;
    padding: 20px;
    margin-bottom: 30px;
}

.share-buttons-box h4 {
    color: #323710;
    font-size: 1rem;
    margin-bottom: 15px;
}

.share-buttons {
    display: flex;
    gap: 10px;
}

.share-btn {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    color: white;
    text-decoration: none;
    transition: transform 0.3s ease;
}

.share-btn:hover {
    transform: scale(1.1);
}

.share-btn.facebook { background: #3b5998; }
.share-btn.twitter { background: #1da1f2; }
.share-btn.linkedin { background: #0077b5; }
.share-btn.email { background: #666; }

/* Lesson Content */
.lesson-content {
    font-size: 1.1rem;
    line-height: 1.8;
    color: #333;
    margin-bottom: 40px;
}

.lesson-content h2 {
    color: #323710;
    font-size: 1.6rem;
    margin: 30px 0 15px;
    font-family: 'Aleo', serif;
}

.lesson-content h3 {
    color: #007b98;
    font-size: 1.3rem;
    margin: 25px 0 10px;
}

.lesson-content p {
    margin-bottom: 15px;
}

.lesson-content ul, .lesson-content ol {
    margin-bottom: 20px;
    padding-left: 30px;
}

.lesson-content li {
    margin-bottom: 8px;
}

/* Quiz Placeholder */
.lesson-quiz-placeholder {
    background: #fff9e6;
    border: 2px dashed #f6b402;
    border-radius: 10px;
    padding: 30px;
    text-align: center;
    margin-bottom: 40px;
}

.lesson-quiz-placeholder h3 {
    color: #323710;
    font-size: 1.4rem;
    margin-bottom: 15px;
    font-family: 'Aleo', serif;
}

.lesson-quiz-placeholder p {
    color: #666;
    margin-bottom: 20px;
}

.lesson-quiz-placeholder ul {
    list-style: none;
    padding: 0;
    margin: 0;
    text-align: left;
    max-width: 400px;
    margin: 0 auto;
}

.lesson-quiz-placeholder li {
    padding: 8px 0 8px 30px;
    position: relative;
    color: #666;
}

.lesson-quiz-placeholder li::before {
    content: '✓';
    position: absolute;
    left: 0;
    color: #4CAF50;
    font-weight: bold;
}

/* Lesson Navigation */
.lesson-navigation {
    display: flex;
    justify-content: space-between;
    margin-bottom: 40px;
    gap: 20px;
}

.nav-prev, .nav-next {
    flex: 1;
    background: white;
    border: 1px solid #e0e0e0;
    border-radius: 10px;
    padding: 20px;
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 15px;
    transition: all 0.3s ease;
}

.nav-prev:hover, .nav-next:hover {
    border-color: #007b98;
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
}

.nav-arrow {
    font-size: 1.5rem;
    color: #007b98;
}

.nav-text {
    flex: 1;
}

.nav-label {
    display: block;
    font-size: 0.85rem;
    color: #666;
    margin-bottom: 5px;
}

.nav-title {
    display: block;
    color: #323710;
    font-weight: 500;
}

.nav-next {
    text-align: right;
}

.nav-placeholder {
    flex: 1;
}

/* Related Lessons */
.related-lessons {
    margin-bottom: 40px;
}

.related-lessons h3 {
    color: #323710;
    font-size: 1.6rem;
    margin-bottom: 20px;
    font-family: 'Aleo', serif;
}

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

.related-lesson-card {
    background: white;
    border: 1px solid #e0e0e0;
    border-radius: 10px;
    overflow: hidden;
    display: flex;
    gap: 15px;
    padding: 15px;
    transition: all 0.3s ease;
}

.related-lesson-card:hover {
    border-color: #007b98;
    box-shadow: 0 3px 10px rgba(0,0,0,0.1);
}

.related-lesson-image {
    flex: 0 0 80px;
}

.related-lesson-image img {
    width: 100%;
    height: 60px;
    object-fit: cover;
    border-radius: 5px;
}

.placeholder-thumb {
    width: 80px;
    height: 60px;
    background: #f0f0f0;
    border-radius: 5px;
}

.related-lesson-content {
    flex: 1;
}

.related-lesson-content h4 {
    font-size: 1rem;
    margin-bottom: 5px;
}

.related-lesson-content h4 a {
    color: #323710;
    text-decoration: none;
}

.related-lesson-content h4 a:hover {
    color: #007b98;
}

/* No Lessons Message */
.no-lessons {
    text-align: center;
    padding: 60px 20px;
    color: #666;
    font-size: 1.1rem;
}

/* Single Lesson Layout */
.single-lesson .single-post-layout {
    display: grid;
    grid-template-columns: 1fr 350px;
    gap: 60px;
    align-items: start;
}

.single-lesson .blog-sidebar {
    position: sticky;
    top: 100px;
}

.single-lesson .single-post-title {
    font-size: 2.5rem;
    line-height: 1.2;
    margin-bottom: 20px;
}

/* Centered Lesson Header */
.lesson-header-centered {
    text-align: center;
}

.lesson-meta-compact {
    font-size: 0.9rem;
    color: #666;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 30px;
}

.lesson-meta-compact .meta-separator {
    color: #999;
    margin: 0 4px;
}

.lesson-meta-compact .meta-date,
.lesson-meta-compact .meta-time {
    display: inline-flex;
    align-items: center;
    gap: 5px;
}

.lesson-meta-compact .meta-category {
    font-size: 0.85rem;
    background: var(--color-secondary);
    color: white;
    padding: 2px 8px;
    border-radius: 12px;
    text-decoration: none;
    transition: background 0.3s ease;
}

.lesson-meta-compact .meta-category:hover {
    background: var(--color-primary);
}

.lesson-meta-compact .category-separator {
    color: #999;
}

/* Single Lesson Specific Styles */
.lesson-featured-image {
    margin: 30px 0;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
}

.featured-image-lesson {
    width: 100%;
    height: auto;
    display: block;
    transition: transform 0.3s ease;
}

.lesson-featured-image:hover .featured-image-lesson {
    transform: scale(1.02);
}

/* Lesson Meta Time Badge */
.meta-time {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    color: #007b98;
    font-weight: 500;
}

/* Related Lessons Grid - Use Blog Style Cards */
.related-lessons .blog-entries-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
    margin-top: 20px;
}

.related-lessons .blog-entry-card {
    background: white;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.08);
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
    padding: 12px;
}

.related-lessons .blog-entry-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15);
}

/* Mobile Responsive */
@media (max-width: 1200px) {
    .single-lesson .single-post-layout {
        grid-template-columns: 1fr;
        gap: 40px;
    }
    
    .single-lesson .blog-sidebar {
        position: static;
        display: grid;
        grid-template-columns: repeat(2, 1fr);
        gap: 30px;
    }
}

@media (max-width: 768px) {
    .hero-content-wrapper {
        flex-direction: column;
    }
    
    .hero-content,
    .hero-image {
        flex: 1 1 100%;
    }
    
    .hero-title {
        font-size: 2rem;
    }
    
    .single-lesson .single-post-title {
        font-size: 2rem;
    }
    
    .lessons-grid {
        grid-template-columns: 1fr;
    }
    
    .path-container {
        justify-content: flex-start;
    }
    
    .lesson-content-wrapper {
        flex-direction: column;
    }
    
    .lesson-sidebar {
        flex: 1 1 100%;
        position: static;
    }
    
    .lesson-sidebar.sticky {
        position: static;
    }
    
    .single-lesson .blog-sidebar {
        grid-template-columns: 1fr;
    }
    
    .lesson-navigation {
        flex-direction: column;
    }
    
    .video-thumbnails-scroll {
        flex-direction: column;
    }
    
    .video-thumbnail-item {
        flex: 1 1 100%;
    }
}