* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --orange-color: #d55a0e;
    --white-color:#f0f0f0;
    --black-color: #000;

}

body {
    font-family: Open Sans, sans-serif;
    margin: 0;
    padding: 0;
    background-color: var(--white-color);
}

header {
    text-align: left;
    padding: 2rem 2rem 0.5rem 2rem;
}

h1 {
    font-size: 2rem;
}

h2 {
    font-size: 1rem;
    font-weight: 400;
    padding-bottom: 2rem;
}

.nav {
    display: flex;
    flex-wrap: wrap;
    list-style-type: none;
    gap: 1rem;
    margin-top: 1rem;
    padding: 0;
}

.nav a {
    color: #000;
    font-size: 1.2rem;
    /* Set text color */
    text-decoration: none;
    /* Remove underline */
}

.nav a:hover {
    color: var(--orange-color);
    /* Optional: Change color on hover */
    text-decoration: underline;
}

.nav a.selected, .nav a.current {
    color: var(--orange-color);
    /* Optional: Change color on hover */
    text-decoration: underline;
}


main {
    padding: 2rem;
}

#course-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 2rem;
    justify-content: center;
}

#techcourse-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 2rem;
    justify-content: center;
}

.course-card {
    background-color: white;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    height: 400px; /* 固定高度 */
}

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

.course-card-content {
    padding: 1rem;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}

.course-card-content h2 {
    margin-top: 0;
    font-size: 1.2rem;
}

.course-card-content p {
    font-size: 0.9rem;
    line-height: 1.4;
    /* flex-grow: 1; */
    overflow: hidden;
}

.course-card-content a {
    display: inline-block;
    background-color: var(--orange-color);
    color: white;
    text-decoration: none;
    padding: 0.5rem 1rem;
    border-radius: 4px;
    text-align: center;
    margin-top: auto;
}

.image-container {
    position: relative;
    display: inline-block;
}
.image-container p {
    font-size: 0.5rem;
}

.image-container img {
    width: 100%;
    /* Adjust this based on your layout */
    height: 200px;
}

.credit {
    position: absolute;
    bottom: 5px;
    right: 5px;
    margin: 0;
    padding: 5px;
    /* background-color: rgba(0, 0, 0, 0.5); */
    /* Semi-transparent background for readability */
    color: gray;
    font-family: Arial, sans-serif;
    font-size: 8px;
    text-decoration: none;
    text-transform: capitalize;
    font-size: 0.5rem;
}
