/* General Body Styles */
body {
    font-family: 'Kanit', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    margin: 0;
    padding: 0;
    background-color: #f0f2f5; /* Changed background color */
    color: #333;
}

/* Header and Navigation */
header {
    background-color: #fff;
    box-shadow: 0 1px 3px rgba(0,0,0,0.05); /* Softer shadow */
    padding: 1rem 2rem;
}

nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    max-width: 1200px;
    margin: 0 auto;
}

.logo .logo-container {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    text-decoration: none;
    color: inherit;
}

.logo .logo-container img {
    height: 50px;
}

.logo .logo-container span {
    font-size: 1.5rem;
    font-weight: 700;
    color: #2c3e50; /* A deep, professional blue-gray */
}

nav ul {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    gap: 1.5rem;
}

nav ul li a {
    text-decoration: none;
    color: #333;
    font-weight: 600;
    transition: color 0.3s ease;
}

nav ul li a:hover {
    color: #007bff;
}

/* Main Content */
main {
    max-width: 1200px;
    margin: 2rem auto;
    padding: 0 2rem;
}

/* Hero Section */
.hero {
    text-align: center;
    padding: 6rem 1rem; /* Increased padding for better visual */
    background-image: url('images/mainfocus.webp');
    background-size: cover;
    background-position: center;
    border-radius: 8px;
    margin-bottom: 2rem;
    color: #fff; /* Change text color to white for contrast */
}

.hero h1 {
    font-size: 3rem; /* Slightly larger font size */
    margin-bottom: 1rem;
    text-shadow: 0 2px 4px rgba(0,0,0,0.5); /* Add text shadow for readability */
}

.hero p {
    font-size: 1.2rem;
    text-shadow: 0 1px 3px rgba(0,0,0,0.5); /* Add text shadow for readability */
}

/* Courses Section & Articles Section */
.courses-container h2, .articles-container h2 {
    text-align: center;
    font-size: 2rem;
    margin-bottom: 2rem;
}

.course-list, .article-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 1.5rem;
}

.skeleton {
    background-color: #e0e0e0;
    border-radius: 8px;
    overflow: hidden;
}

.skeleton .skeleton-img {
    height: 180px;
    background-color: #c7c7c7;
}

.skeleton .skeleton-content {
    padding: 1.5rem;
}

.skeleton .skeleton-title {
    height: 1.5rem;
    margin-bottom: 1rem;
    background-color: #c7c7c7;
    border-radius: 4px;
}

.skeleton .skeleton-footer {
    height: 2.5rem;
    background-color: #c7c7c7;
    border-radius: 4px;
}

/* Add a subtle shimmer animation */
.skeleton {
    position: relative;
    overflow: hidden;
}

.skeleton::after {
    content: '';
    position: absolute;
    top: 0;
    left: -150%;
    width: 150%;
    height: 100%;
    background: linear-gradient(to right, transparent 0%, #e8e8e8 50%, transparent 100%);
    animation: shimmer 1.5s infinite;
}

@keyframes shimmer {
    100% {
        left: 150%;
    }
}

.course-card, .article-card {
    background-color: #fff;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
    overflow: hidden;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    display: flex;
    flex-direction: column;
}

.course-card:hover, .article-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.12);
}

.course-card img, .article-card img {
    width: 100%;
    height: 180px;
    object-fit: cover;
}

.course-card-content, .article-card-content {
    padding: 1.5rem;
    flex-grow: 1;
}

.course-card-content h3, .article-card-content h3 {
    margin-top: 0;
    font-size: 1.4rem;
}

.course-card-content p, .article-card-content p {
    color: #666;
    margin-bottom: 1rem;
}

.article-card-content .article-series {
    display: block;
    font-size: 0.9rem;
    font-weight: 600;
    color: #007bff;
    margin-bottom: 0.5rem;
}

.course-card-footer, .article-card-footer {
    display: flex;
    justify-content: space-around;
    align-items: center;
    padding: 0 1.5rem 1.5rem;
    gap: 1rem;
}

.article-card-footer .btn {
    width: 100%; /* Make button full width */
}

.btn {
    flex-grow: 1; /* Allow buttons to grow and fill space */
    text-align: center;
    padding: 0.6rem 1rem;
    text-decoration: none;
    border-radius: 5px;
    font-weight: 600;
    color: #fff;
    transition: opacity 0.3s ease;
}

.btn:hover {
    opacity: 0.85;
}

.youtube-btn {
    background-color: #FF0000; /* YouTube Red */
}

.facebook-btn {
    background-color: #1877F2; /* Facebook Blue */
}

/* Footer */
footer {
    text-align: center;
    padding: 2rem 0;
    margin-top: 2rem;
    background-color: #fff;
    border-top: 1px solid #eee;
}

/* Responsive Design */
@media (max-width: 768px) {
    .logo .logo-container span {
        display: none; /* Hide the text logo on small screens */
    }

    nav ul {
        gap: 1rem; /* Reduce gap between menu items */
    }

    .hero {
        padding: 4rem 1rem;
    }

    .hero h1 {
        font-size: 2.5rem;
    }
}

@media (max-width: 480px) {
    .course-list, .article-list {
        grid-template-columns: 1fr; /* Single column on very small screens */
    }

    .hero h1 {
        font-size: 2rem;
    }
}