/* 基础样式重置与通用设置 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Inter', system-ui, sans-serif;
    color: #333333;
    background-color: #f5f5f5;
}

/* 导航栏样式 */
#navbar.scrolled {
    padding-top: 0.5rem;
    padding-bottom: 0.5rem;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
}

/* 轮播图样式 */
.carousel-item {
    opacity: 0;
    transition: opacity 1s ease-in-out;
}

.carousel-item.active {
    opacity: 1;
}

/* 课程选项卡样式 */
.course-tab {
    cursor: pointer;
    transition: all 0.3s ease;
}

.course-tab.active {
    background-color: #39b54a;
    color: white;
}

.course-content {
    display: none;
}

.course-content.active {
    display: block;
}

/* 响应式调整 */
@media (max-width: 768px) {
    .grid-cols-3 {
        grid-template-columns: repeat(1, 1fr);
    }

    .md\:grid-cols-2 {
        grid-template-columns: repeat(1, 1fr);
    }

    .md\:grid-cols-4 {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 480px) {
    .text-4xl {
        font-size: 2.5rem;
    }

    .md\:grid-cols-4 {
        grid-template-columns: repeat(1, 1fr);
    }
}

/* 表单样式 */
form input,
form select,
form textarea {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid #ddd;
    border-radius: 0.5rem;
    font-family: inherit;
}

form button {
    cursor: pointer;
}

/* 动画效果 */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

.fade-in {
    animation: fadeIn 0.6s ease-out forwards;
}

/* 延迟动画 */
.delay-100 {
    animation-delay: 0.1s;
}

.delay-200 {
    animation-delay: 0.2s;
}

.delay-300 {
    animation-delay: 0.3s;
}

/* 图片悬停效果 */
.img-hover {
    transition: transform 0.3s ease;
}

.img-hover:hover {
    transform: scale(1.03);
}

/* 按钮样式 */
.btn-primary {
    background-color: #39b54a;
    color: white;
    padding: 0.75rem 1.5rem;
    border-radius: 999px;
    font-weight: 500;
    transition: all 0.3s ease;
}

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

.btn-secondary {
    background-color: transparent;
    color: white;
    border: 1px solid white;
    padding: 0.75rem 1.5rem;
    border-radius: 999px;
    font-weight: 500;
    transition: all 0.3s ease;
}

.btn-secondary:hover {
    background-color: rgba(255, 255, 255, 0.2);
}

/* 导航链接样式 */
.nav-link {
    position: relative;
    color: #333;
    transition: color 0.3s ease;
}

.nav-link:hover {
    color: #39b54a;
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 0;
    width: 0;
    height: 2px;
    background-color: #39b54a;
    transition: width 0.3s ease;
}

.nav-link:hover::after {
    width: 100%;
}

/* 卡片阴影效果 */
.card {
    transition: all 0.3s ease;
}

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