/* ========================================= */
/* LEARNING RESOURCES PAGE STYLES */
/* ========================================= */

/* Font Fix for Hero Title */
.hero-header .display-4 {
    font-family: 'Kanit', sans-serif !important;
    font-weight: 700 !important;
    line-height: 1.2 !important;
    letter-spacing: -0.5px;
}

.hero-header .display-4 .text-warning {
    font-weight: 800 !important;
}

.hero-header h1,
.hero-header .display-4,
.hero-header .display-6 {
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
}

.leaning-resources-header {
    background: linear-gradient(135deg, #8B4513 0%, #CD853F 30%, #A0522D 70%, #654321 100%);
    position: relative;
    overflow: hidden;
    min-height: 60vh;
    display: flex;
    align-items: center;
}

/* Additional font fixes for all headings */
.ebook-title,
.video-title,
h1,
h2,
h3,
h4,
h5,
h6 {
    font-family: 'Kanit', sans-serif !important;
}

/* Smooth scrolling for anchor links */
.smooth-scroll {
    scroll-behavior: smooth;
}

/* E-Book Cards */
.ebook-card {
    background: white;
    border-radius: 20px;
    box-shadow: 0 10px 30px rgba(139, 69, 19, 0.1);
    overflow: hidden;
    transition: all 0.3s ease;
    border: 1px solid rgba(139, 69, 19, 0.05);
}

.ebook-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 20px 40px rgba(139, 69, 19, 0.15);
}

.ebook-header {
    background: linear-gradient(135deg, var(--primary) 0%, var(--earth-brown) 100%);
    padding: 20px;
    text-align: center;
    position: relative;
}

.chapter-number {
    color: white;
    font-size: 0.9rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    font-family: 'Kanit', sans-serif !important;
}

.ebook-icon {
    color: var(--warning);
    font-size: 2.5rem;
    margin-top: 10px;
}

.ebook-body {
    padding: 25px 20px;
}

.ebook-title {
    color: var(--primary);
    font-weight: 600;
    margin-bottom: 15px;
    line-height: 1.4;
    font-family: 'Kanit', sans-serif !important;
}

.ebook-description {
    color: #666;
    font-size: 0.9rem;
    line-height: 1.6;
    margin-bottom: 0;
    font-family: 'Kanit', sans-serif !important;
}

.ebook-footer {
    padding: 0 20px 20px;
}

/* Video Cards */
.video-card {
    background: white;
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(139, 69, 19, 0.1);
    transition: all 0.3s ease;
}

.video-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 20px 40px rgba(139, 69, 19, 0.15);
}

.video-thumbnail {
    position: relative;
    overflow: hidden;
    height: 200px;
}

.video-thumbnail img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.video-card:hover .video-thumbnail img {
    transform: scale(1.05);
}

.play-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.4);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.video-card:hover .play-overlay {
    opacity: 1;
}

.play-button {
    width: 60px;
    height: 60px;
    background: var(--warning);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--dark);
    font-size: 1.5rem;
    transition: all 0.3s ease;
}

.play-button:hover {
    transform: scale(1.1);
    background: white;
}

.video-duration {
    position: absolute;
    bottom: 10px;
    right: 10px;
    background: rgba(0, 0, 0, 0.8);
    color: white;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 0.8rem;
    font-weight: 500;
    font-family: 'Kanit', sans-serif !important;
}

.video-content {
    padding: 20px;
}

.chapter-badge {
    display: inline-block;
    background: linear-gradient(135deg, var(--warning) 0%, #f39c12 100%);
    color: var(--dark);
    padding: 4px 12px;
    border-radius: 15px;
    font-size: 0.8rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 10px;
    font-family: 'Kanit', sans-serif !important;
}

.video-title {
    color: var(--primary);
    font-weight: 600;
    margin-bottom: 10px;
    line-height: 1.4;
    font-family: 'Kanit', sans-serif !important;
}

.video-description {
    color: #666;
    font-size: 0.9rem;
    line-height: 1.6;
    margin-bottom: 15px;
    font-family: 'Kanit', sans-serif !important;
}

.video-meta {
    display: flex;
    justify-content: space-between;
    color: #999;
    font-size: 0.8rem;
    margin-bottom: 15px;
    font-family: 'Kanit', sans-serif !important;
}

/* Call to Action Box */
.cta-box {
    background: linear-gradient(135deg, var(--soft-cream) 0%, var(--deer-cream) 100%);
    padding: 40px;
    border-radius: 20px;
    border: 2px solid var(--deer-cream);
}

.cta-box h3 {
    color: var(--primary);
    font-weight: 700;
    font-family: 'Kanit', sans-serif !important;
}

.cta-box p {
    color: var(--dark);
    font-size: 1.1rem;
    font-family: 'Kanit', sans-serif !important;
}

/* Section Spacing */
#ebook-section {
    scroll-margin-top: 100px;
}

#video-section {
    scroll-margin-top: 100px;
}

/* Enhanced Buttons */
.enhanced {
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
    font-family: 'Kanit', sans-serif !important;
    font-weight: 500 !important;
}

.enhanced::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: left 0.6s ease;
}

.enhanced:hover::before {
    left: 100%;
}

.enhanced:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(139, 69, 19, 0.3);
}

/* Mobile Responsiveness */
@media (max-width: 768px) {
    .hero-header .display-4 {
        font-size: 2.2rem !important;
        line-height: 1.1 !important;
    }

    .ebook-header,
    .video-content,
    .ebook-body {
        padding: 15px;
    }

    .ebook-footer {
        padding: 0 15px 15px;
    }

    .video-thumbnail {
        height: 180px;
    }

    .cta-box {
        padding: 30px 20px;
    }

    .gap-3 {
        gap: 10px !important;
    }
}

@media (max-width: 576px) {
    .hero-header .display-4 {
        font-size: 1.8rem !important;
    }

    .display-6 {
        font-size: 1.6rem !important;
    }

    .btn-lg {
        padding: 12px 25px;
        font-size: 1rem;
    }

    .d-flex.flex-wrap.gap-3 .btn {
        width: 100%;
        margin-bottom: 10px;
    }
}

/* Loading Animation */
.show-on-load {
    opacity: 0;
    transform: translateY(30px);
    animation: fadeInUp 0.8s ease forwards;
}

.show-on-load:nth-child(1) {
    animation-delay: 0.1s;
}

.show-on-load:nth-child(2) {
    animation-delay: 0.3s;
}

.show-on-load:nth-child(3) {
    animation-delay: 0.5s;
}

.show-on-load:nth-child(4) {
    animation-delay: 0.7s;
}

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