/* Custom styles for the Glottos project */

:root {
    --header-bg: #f3f4f6; /* A light grey for the header */
    --card-bg: #ffffff;
    --card-border: #e5e7eb;
    --panel-bg: #fafafa;
}

[data-theme="dark"] {
    --header-bg: #1f2937;
    --card-bg: #374151;
    --card-border: #4b5563;
    --panel-bg: #111827;
}

/* Add some breathing room to the main container */
body > .container {
    padding-top: 2rem;
    padding-bottom: 2rem;
}

/* --- Header --- */
header {
    background-color: var(--header-bg);
    padding: 1rem 0;
    border-bottom: 1px solid var(--card-border);
    margin-bottom: 2rem;
}

/* --- Homepage Filters --- */
#language-filter-form {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
    margin-bottom: 2rem;
}

/* --- Course Card Grid --- */
.course-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 1.5rem;
    list-style-type: none;
    padding-left: 0;
}

.course-card {
    background-color: var(--card-bg);
    border: 1px solid var(--card-border);
    border-radius: var(--border-radius);
    transition: transform 0.2s ease-in-out, box-shadow 0.2s ease-in-out;
    /* Remove padding from the card itself, it will be on the link */
    padding: 0;
}

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

.course-card a {
    display: block; /* Make the link fill the card */
    padding: 1.5rem; /* Add the padding here */
    text-decoration: none;
    color: inherit;
}

.course-card h3 {
    margin-top: 0;
    color: var(--primary);
}

.course-card p {
    margin-bottom: 0;
}


/* Course Page Layout styles moved to course_page.html template to avoid conflicts */

.course-nav h2 {
    margin-top: 0;
}

.course-nav ul {
    list-style-type: none;
    padding-left: 0;
}

.course-nav details[open] > summary .lesson-count {
    display: none;
}

.course-nav .topic {
    font-weight: bold;
    margin-top: 1.5rem;
    margin-bottom: 0.5rem;
    color: var(--h3-color);
}

/* --- Mobile Responsive Styles --- */
@media (max-width: 768px) {
    .course-container {
        flex-direction: column;
    }
    .course-nav, .course-content-display {
        width: 100%;
    }
    .course-content-display {
        height: auto; /* Ensure container can grow */
        overflow: visible; /* Prevent container from scrolling */
    }
    .course-content-display iframe {
        height: auto; /* Reset height for mobile, will be set by JS */
        border: none; /* Optional: remove border on mobile */
    }
}
