/* 基础样式 */
:root {
    --primary: #0066CC;
    --primary-dark: #0052A3;
    --secondary: #FFD700;
    --secondary-light: #FFE44D;
    --dark: #1a1a2e;
    --light: #f5f5f5;
    --white: #ffffff;
    --gray: #666666;
    --shadow: 0 4px 20px rgba(0, 102, 204, 0.15);
}

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

body {
    font-family: 'Microsoft YaHei', 'PingFang SC', sans-serif;
    line-height: 1.6;
    color: #333;
    background-color: var(--light);
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* 头部 */
.header {
    background: var(--white);
    box-shadow: var(--shadow);
    position: fixed;
    width: 100%;
    top: 0;
    z-index: 1000;
}

.header .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 70px;
    gap: 20px;
}

.header-search {
    display: flex;
    gap: 8px;
}

.header-search input {
    padding: 8px 15px;
    border: 1px solid #ddd;
    border-radius: 20px;
    width: 150px;
    font-size: 14px;
}

.header-search input:focus {
    outline: none;
    border-color: var(--primary);
}

.header-search button {
    padding: 8px 18px;
    background: var(--primary);
    color: white;
    border: none;
    border-radius: 20px;
    cursor: pointer;
    font-size: 14px;
}

.header-search button:hover {
    background: var(--primary-dark);
}

.logo {
    display: flex;
    align-items: center;
    gap: 10px;
}

.logo-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    height: 30px;
    line-height: 1;
    font-size: 32px;
    overflow: hidden;
}

.logo-text {
    font-size: 24px;
    font-weight: bold;
    color: var(--primary);
    line-height: 1;
    display: inline-flex;
    align-items: center;
    height: 30px;
}

.nav {
    display: flex;
    align-items: center;
    gap: 20px;
}

.nav a {
    text-decoration: none;
    color: var(--dark);
    font-weight: 500;
    white-space: nowrap;
    transition: color 0.3s;
}

.nav a:hover {
    color: var(--primary);
}

.admin-link {
    color: var(--primary) !important;
    border: 2px solid var(--primary);
    padding: 5px 15px;
    border-radius: 20px;
    display: inline-block;
}

.admin-link:hover {
    background: var(--primary);
    color: var(--white) !important;
}

/* 汉堡菜单按钮：默认隐藏，仅超窄屏(≤480px)显示 */
.nav-toggle {
    display: none;
}

/* 内部系统下拉菜单 */
.nav-dropdown {
    position: relative;
    display: inline-block;
}

.nav-dropdown > .admin-link {
    border: none;
    padding: 0;
    border-radius: 0;
    font-weight: 500;
    display: inline;
}

/* 悬停桥：防止鼠标移向菜单时经过空隙导致菜单消失 */
.nav-dropdown::after {
    content: '';
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    height: 10px;
    display: none;
}

.nav-dropdown:hover::after {
    display: block;
}

.dropdown-menu {
    display: none;
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    background: var(--white);
    min-width: 140px;
    border-radius: 10px;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
    padding: 6px 0;
    z-index: 1001;
}

.nav-dropdown:hover .dropdown-menu {
    display: block;
}

.dropdown-menu a {
    display: block;
    padding: 10px 20px;
    border: none;
    border-radius: 0;
    color: var(--dark) !important;
    background: none;
}

.dropdown-menu a:hover {
    background: #f0f7ff;
    color: var(--primary) !important;
}

/* 英雄区 */
.hero {
    background: linear-gradient(135deg, var(--primary) 0%, #004999 100%);
    color: var(--white);
    padding: 140px 0 80px;
    text-align: center;
}

.hero h1 {
    font-size: 48px;
    margin-bottom: 20px;
}

.hero .highlight {
    color: var(--secondary);
}

.hero p {
    font-size: 20px;
    margin-bottom: 40px;
    opacity: 0.9;
}

.hero-buttons {
    display: flex;
    gap: 20px;
    justify-content: center;
}

.btn {
    padding: 15px 40px;
    border-radius: 30px;
    text-decoration: none;
    font-weight: bold;
    font-size: 16px;
    transition: all 0.3s;
}

.btn-primary {
    background: var(--secondary);
    color: var(--dark);
}

.btn-primary:hover {
    background: var(--secondary-light);
    transform: translateY(-3px);
}

.btn-secondary {
    background: transparent;
    color: var(--white);
    border: 2px solid var(--white);
}

.btn-secondary:hover {
    background: var(--white);
    color: var(--primary);
}

/* 通用区块 */
section {
    padding: 32px 0;
}

.section-title {
    text-align: center;
    font-size: 28px;
    color: var(--dark);
    margin-bottom: 24px;
    position: relative;
}

.section-title::after {
    content: '';
    display: block;
    width: 48px;
    height: 3px;
    background: var(--secondary);
    margin: 10px auto 0;
}

/* 特色优势 */
.features {
    background: var(--white);
}

.feature-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 18px;
}

.feature-card {
    text-align: center;
    padding: 26px 22px;
    border-radius: 12px;
    background: var(--light);
    transition: all 0.3s;
}

.feature-card:hover {
    transform: translateY(-10px);
    box-shadow: var(--shadow);
}

.feature-card .icon {
    font-size: 50px;
    margin-bottom: 20px;
    display: block;
}

.feature-card h3 {
    color: var(--primary);
    margin-bottom: 15px;
    font-size: 20px;
}

/* 课程 */
.courses {
    background: linear-gradient(180deg, var(--light) 0%, var(--white) 100%);
}

.course-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 30px;
}

.course-card {
    background: var(--white);
    border-radius: 15px;
    overflow: hidden;
    box-shadow: var(--shadow);
    transition: all 0.3s;
}

.course-card:hover {
    transform: translateY(-10px);
}

.course-image {
    width: 100%;
    height: 160px;
    overflow: hidden;
}

.course-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.course-header {
    background: var(--primary);
    color: var(--white);
    padding: 20px;
    text-align: center;
}

.course-header.advanced {
    background: linear-gradient(135deg, var(--primary) 0%, #003366 100%);
}

.course-header.scratch {
    background: linear-gradient(135deg, #FF6B6B 0%, #EE5A5A 100%);
}

.course-header.python {
    background: linear-gradient(135deg, #4ECDC4 0%, #44B3AB 100%);
}

.course-header h3 {
    font-size: 22px;
}

.course-header p {
    font-size: 14px;
    opacity: 0.9;
    margin-top: 5px;
}

.course-body {
    padding: 25px;
}

.course-body ul {
    list-style: none;
}

.course-body li {
    padding: 10px 0;
    border-bottom: 1px solid #eee;
    display: flex;
    align-items: center;
    gap: 10px;
}

.course-body li::before {
    content: '✓';
    color: var(--primary);
    font-weight: bold;
}

/* 师资 */
.teachers {
    background: var(--white);
}

.teacher-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 30px;
}

.teacher-card {
    background: var(--light);
    border-radius: 15px;
    padding: 30px;
    text-align: center;
    transition: all 0.3s;
}

.teacher-card:hover {
    transform: translateY(-10px);
    box-shadow: var(--shadow);
}

.teacher-avatar {
    width: 100px;
    height: 100px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
    margin: 0 auto 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 40px;
    color: var(--white);
}

.teacher-card h3 {
    color: var(--dark);
    margin-bottom: 5px;
}

.teacher-card .title {
    color: var(--primary);
    font-size: 14px;
    margin-bottom: 15px;
}

.teacher-card .desc {
    color: var(--gray);
    font-size: 14px;
    line-height: 1.8;
}

/* 资讯轮播区域 */
.news-carousel-section {
    padding: 50px 0;
    background: var(--light);
}

.news-carousel-section .section-title {
    margin-bottom: 30px;
}

/* 资讯轮播 */
.news-carousel {
    position: relative;
    height: 0;
    padding-bottom: 30%; /* 更小的比例 */
    overflow: hidden;
    background: var(--dark);
    max-width: 1200px;
    margin: 0 auto;
    border-radius: 20px;
}

.carousel-container {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    transition: transform 0.5s ease;
}

.carousel-slide {
    min-width: 100%;
    height: 100%;
    position: relative;
    cursor: pointer;
    /* 竖版/尺寸不合适的图片用 contain 完整显示，底色填充两侧空白 */
    background: linear-gradient(135deg, #06203f 0%, #0066CC 100%);
}

.carousel-slide img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.carousel-content {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 30px 40px 50px;
    background: linear-gradient(transparent, rgba(0,0,0,0.8));
    color: white;
}

.carousel-content h3 {
    font-size: 28px;
    margin-bottom: 10px;
}

.carousel-content p {
    font-size: 16px;
    opacity: 0.9;
}

.carousel-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(255,255,255,0.2);
    color: white;
    border: none;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    font-size: 20px;
    cursor: pointer;
    transition: all 0.3s;
}

.carousel-btn:hover {
    background: rgba(255,255,255,0.4);
}

.carousel-prev { left: 20px; }
.carousel-next { right: 20px; }

.carousel-dots {
    position: absolute;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 10px;
}

.carousel-dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: rgba(255,255,255,0.4);
    cursor: pointer;
    transition: all 0.3s;
}

.carousel-dot.active {
    background: var(--secondary);
}

.news-content {
    padding: 25px;
}

.news-content h3 {
    color: var(--dark);
    margin-bottom: 10px;
    font-size: 18px;
}

.news-content .meta {
    color: var(--gray);
    font-size: 13px;
    margin-bottom: 15px;
}

.news-content p {
    color: var(--gray);
    font-size: 14px;
    line-height: 1.8;
}

/* 联系我们 */
.contact {
    background: var(--white);
}

.contact-content {
    max-width: 1000px;
    margin: 0 auto;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 40px;
}

.contact-wrapper {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 40px;
}

.contact-left {
    flex: 0 0 auto;
}

.contact-right {
    display: flex;
    flex-direction: row;
    gap: 16px;
}

.contact-qrcodes {
    display: flex;
    flex-direction: row;
    gap: 18px;
    align-items: center;
}

.qrcode-item {
    text-align: center;
    background: var(--light);
    padding: 12px;
    border-radius: 10px;
    transition: transform 0.3s;
}

.qrcode-item:hover {
    transform: translateY(-3px);
}

.qrcode-img {
    width: 100px;
    height: 100px;
    background: white;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    border: 2px solid var(--primary);
}

.qrcode-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.qrcode-item p {
    margin-top: 8px;
    color: var(--dark);
    font-size: 14px;
    font-weight: 500;
}

.contact-info .contact-info-list {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.contact-info .contact-item {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 14px 18px;
    background: var(--light);
    border-radius: 10px;
}

/* 联系信息文字：允许换行（后台地址可填多行/多个校区，按行显示） */
.contact-info .contact-item span:last-child {
    flex: 1;
    min-width: 0;
    line-height: 1.7;
    word-break: break-word;
    overflow-wrap: anywhere;
    white-space: pre-line;
}

.contact-info .contact-item .icon {
    font-size: 24px;
    flex: 0 0 auto;
}

@media (max-width: 768px) {
    /* 头部 */
    .header {
        position: relative;
    }
    
    .header .container {
        flex-direction: row;
        height: auto;
        padding: 10px 15px;
        gap: 10px;
    }
    
    .logo {
        flex-shrink: 0;
    }
    
    .logo-text {
        font-size: 18px;
    }
    
    .logo-icon {
        font-size: 24px;
    }
    
    /* 手机端隐藏搜索框，把空间让给导航 */
    .header-search {
        display: none;
    }
    
    .nav {
        flex: 1;
        justify-content: flex-end;
        gap: 2px;
        flex-wrap: nowrap;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: none;
    }
    
    .nav::-webkit-scrollbar { display: none; }
    
    .nav a {
        font-size: 13px;
        padding: 6px 9px;
        white-space: nowrap;
    }
    
    /* 手机端「内部系统」保留入口，但去掉边框按钮样式 */
    .nav-dropdown > .admin-link {
        border: none;
        color: var(--primary) !important;
        padding: 6px 9px;
    }
    
    /* 手机端点按展开（桌面仍是 hover） */
    .nav-dropdown.open .dropdown-menu { display: block; }
    
    .dropdown-menu {
        top: calc(100% + 6px);
        right: 0;
        min-width: 130px;
    }
    
    .dropdown-menu a {
        padding: 12px 18px;
        font-size: 14px;
    }
    
    /* Hero */
    .hero {
        padding: 60px 15px 40px;
    }
    
    .hero h1 {
        font-size: 24px;
    }
    
    .hero p {
        font-size: 14px;
    }
    
    .hero-buttons {
        flex-direction: column;
        gap: 10px;
    }
    
    .btn {
        padding: 10px 25px;
        font-size: 14px;
    }
    
    /* Section */
    section {
        padding: 40px 15px;
    }
    
    .section-title {
        font-size: 22px;
        margin-bottom: 25px;
    }
    
    /* 特色优势 */
    .feature-grid {
        grid-template-columns: 1fr;
        gap: 15px;
    }
    
    .feature-card {
        padding: 20px;
    }
    
    .feature-card .icon {
        font-size: 36px;
    }
    
    /* 轮播 */
    .news-carousel {
        padding-bottom: 56%;
    }
    
    .carousel-content {
        padding: 15px;
    }
    
    .carousel-content h3 {
        font-size: 16px;
        margin-bottom: 5px;
    }
    
    .carousel-content p {
        font-size: 12px;
        display: -webkit-box;
        -webkit-line-clamp: 2;
        -webkit-box-orient: vertical;
        overflow: hidden;
    }
    
    .carousel-btn {
        width: 35px;
        height: 35px;
        font-size: 16px;
    }
    
    .carousel-prev { left: 10px; }
    .carousel-next { right: 10px; }
    
    .carousel-dots {
        bottom: 15px;
        gap: 8px;
    }
    
    .carousel-dot {
        width: 8px;
        height: 8px;
    }
    
    /* 课程卡片 */
    .course-grid {
        grid-template-columns: 1fr;
        gap: 15px;
    }
    
    .course-header {
        padding: 15px;
    }
    
    .course-header h3 {
        font-size: 18px;
    }
    
    .course-body {
        padding: 15px;
    }
    
    /* 师资 */
    .teacher-grid {
        grid-template-columns: 1fr;
        gap: 15px;
    }
    
    .teacher-card {
        padding: 20px;
    }
    
    .teacher-avatar {
        width: 80px;
        height: 80px;
        font-size: 36px;
    }
    
    .teacher-card h3 {
        font-size: 18px;
    }
    
    /* 联系我们 */
    .contact-wrapper {
        flex-direction: column;
        align-items: center;
        gap: 25px;
    }
    
    .contact-left {
        width: 100%;
    }
    
    .contact-info {
        width: 100%;
    }
    
    .contact-item {
        padding: 12px 15px;
        gap: 12px;
    }
    
    .contact-item .icon {
        font-size: 22px;
    }
    
    .contact-item span:last-child {
        font-size: 14px;
    }
    
    .contact-right {
        flex-direction: row;
        gap: 15px;
    }
    
    .qrcode-item {
        padding: 10px;
    }
    
    .qrcode-img {
        width: 90px;
        height: 90px;
    }
    
    .qrcode-item p {
        font-size: 13px;
        margin-top: 6px;
    }
    
    /* 页脚 */
    .footer {
        padding: 15px;
        font-size: 12px;
    }
}

/* 超小屏幕 */
@media (max-width: 480px) {
    .nav a {
        font-size: 11px;
        padding: 5px 6px;
    }
    
    .hero h1 {
        font-size: 20px;
    }
    
    .section-title {
        font-size: 18px;
    }
    
    .carousel-content h3 {
        font-size: 14px;
    }

    .carousel-content p {
        display: none;
    }

    /* 压缩 section 留白，避免手机端松散 */
    section { padding: 12px 0; }
    .news-carousel-section .section-title { margin-bottom: 10px; }
    .section-title { font-size: 17px; margin-bottom: 12px; }
    .section-title::after { width: 36px; height: 3px; margin-top: 6px; }

    /* 资讯中心轮播图：放高一点，避免被压成窄条 */
    .news-carousel { padding-bottom: 50%; }
    .news-carousel .carousel-content { padding: 10px 12px; }
    .news-carousel .carousel-content h3 { font-size: 11px; line-height: 1.3; margin-bottom: 0; }

    /* 联系我们：上下间距太大，收紧（用 .contact-info 提升特异度） */
    .contact-info .contact-info-list { gap: 6px; }
    .contact-info .contact-item { padding: 6px 12px; gap: 8px; border-radius: 8px; }
    .contact-info .contact-item .icon { font-size: 16px; }
    .contact-info .contact-item span:last-child { font-size: 12px; }

    /* 特色卡片：一行 3 列，避免太长 */
    .feature-grid { grid-template-columns: repeat(3, 1fr); gap: 8px; }
    .feature-card { padding: 14px 8px; border-radius: 10px; }
    .feature-card .icon { font-size: 28px; margin-bottom: 6px; }
    .feature-card h3 { font-size: 13px; margin-bottom: 4px; }
    .feature-card p { font-size: 11px; line-height: 1.4; }

    /* 特色课程：一行 2 列，紧凑 */
    .course-grid { grid-template-columns: repeat(2, 1fr); gap: 10px; }
    .course-card { border-radius: 10px; }
    .course-image { height: auto; aspect-ratio: 1 / 1; }
    .course-header { padding: 10px 6px; }
    .course-header h3 { font-size: 14px; }
    .course-header p { font-size: 10px; margin-top: 2px; }
    .course-body { padding: 10px 12px; }
    .course-body p { font-size: 12px; line-height: 1.5; margin-bottom: 8px !important; }
    .course-body p:last-child { margin-bottom: 0 !important; }

    /* 联系我们：与全局字号协调 */
    .contact-item { padding: 11px 14px; gap: 10px; }
    .contact-item .icon { font-size: 20px; }
    .contact-item span:last-child { font-size: 13px; }
    .qrcode-img { width: 72px; height: 72px; }
    .qrcode-item { padding: 8px; }
    .qrcode-item p { font-size: 12px; margin-top: 4px; }
}

.contact-item .icon {
    font-size: 30px;
}

/* 页脚 */
.footer {
    background: var(--dark);
    color: var(--white);
    padding: 20px 0;
    text-align: center;
}

.footer p {
    opacity: 0.8;
}

.footer .view-count {
    margin-top: 10px;
    font-size: 13px;
    opacity: 0.6;
}

/* 搜索弹窗 */
.search-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.6);
    z-index: 10000;
    display: flex;
    align-items: flex-start;
    justify-content: center;
    padding-top: 100px;
}

.search-results {
    background: white;
    width: 90%;
    max-width: 600px;
    max-height: 70vh;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0,0,0,0.2);
}

.search-header {
    padding: 15px 20px;
    background: var(--primary);
    color: white;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.search-header h3 {
    margin: 0;
    font-size: 16px;
}

.search-header button {
    background: none;
    border: none;
    color: white;
    font-size: 14px;
    cursor: pointer;
}

.search-list {
    max-height: 400px;
    overflow-y: auto;
}

.search-item {
    padding: 15px 20px;
    border-bottom: 1px solid #eee;
    cursor: pointer;
    display: flex;
    gap: 15px;
    align-items: center;
}

.search-item:hover {
    background: #f5f5f5;
}

.search-type {
    background: var(--primary);
    color: white;
    padding: 2px 8px;
    border-radius: 3px;
    font-size: 12px;
}

.search-title {
    flex: 1;
    color: #333;
}

.search-date {
    color: #999;
    font-size: 13px;
}

.search-result-item .type {
    font-size: 12px;
    color: var(--primary);
    margin-bottom: 5px;
}

.search-result-item .title {
    font-size: 16px;
    color: var(--dark);
    margin-bottom: 5px;
}

.search-result-item .desc {
    font-size: 13px;
    color: var(--gray);
}

/* 轮播 */
.news-carousel-section {
    background: var(--white);
    padding: 0;
}

.news-carousel {
    position: relative;
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    overflow: hidden;
    padding-bottom: 35%;
}

.news-carousel .container {
    max-width: 1200px;
    margin: 0 auto;
}

.carousel-container {
    display: flex;
    transition: transform 0.5s ease;
    height: 100%;
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

.carousel-slide {
    min-width: 100%;
    height: 100%;
    position: relative;
    background: linear-gradient(135deg, #06203f 0%, #0066CC 100%);
}

.carousel-slide img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.carousel-content {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 30px;
    background: linear-gradient(transparent, rgba(0,0,0,0.8));
    color: white;
}

.carousel-content h3 {
    font-size: 20px;
    margin-bottom: 8px;
}

.carousel-content p {
    font-size: 14px;
    opacity: 0.9;
}

.carousel-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(255,255,255,0.9);
    border: none;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    cursor: pointer;
    font-size: 18px;
    transition: all 0.3s;
    z-index: 10;
}

.carousel-prev { left: 20px; }
.carousel-next { right: 20px; }

.carousel-btn:hover {
    background: var(--primary);
    color: white;
}

.carousel-dots {
    position: absolute;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 10px;
}

.carousel-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: rgba(255,255,255,0.5);
    cursor: pointer;
}

.carousel-dot.active {
    background: var(--primary);
}

/* 轮播右侧半透明资讯列表 */
.news-carousel .carousel-sidebar {
    position: absolute;
    top: 0;
    right: 0;
    width: 260px;
    max-width: 36%;
    height: 100%;
    background: rgba(12, 24, 45, 0.45);
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
    color: #fff;
    padding: 18px 14px;
    overflow-y: auto;
    z-index: 8;
}

.carousel-sidebar h4 {
    font-size: 15px;
    font-weight: 600;
    margin-bottom: 12px;
    padding-bottom: 10px;
    border-bottom: 1px solid rgba(255,255,255,0.25);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.carousel-sidebar h4 a {
    color: #FFD700;
    font-size: 13px;
    text-decoration: none;
    white-space: nowrap;
}

.carousel-sidebar ul { list-style: none; }

.carousel-sidebar li {
    padding: 10px 12px;
    margin-bottom: 6px;
    border-radius: 8px;
    border-left: 3px solid transparent;
    cursor: pointer;
    transition: background 0.25s;
}

.carousel-sidebar li:hover { background: rgba(255,255,255,0.15); }

.carousel-sidebar li.active {
    background: rgba(255,255,255,0.22);
    border-left-color: #FFD700;
}

.carousel-sidebar li .t {
    font-size: 14px;
    line-height: 1.5;
    margin-bottom: 4px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.carousel-sidebar li .d { font-size: 12px; opacity: 0.75; }

/* 有侧栏时，右翻页按钮与指示点左移避让 */
@media (min-width: 769px) {
    .news-carousel .carousel-next { right: 280px; }
    .news-carousel .carousel-dots { left: calc(50% - 130px); }
}

@media (max-width: 768px) {
    .news-carousel .carousel-sidebar { display: none; }
}

/* 招贤纳士 */
.jobs {
    background: var(--light);
}

.job-list {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.job-card {
    background: var(--white);
    border-radius: 12px;
    padding: 25px 30px;
    box-shadow: var(--shadow);
    cursor: pointer;
    transition: all 0.3s;
}

.job-card:hover {
    transform: translateX(5px);
    box-shadow: 0 5px 20px rgba(0,0,0,0.1);
}

.job-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
}

.job-header h3 {
    color: var(--dark);
    font-size: 18px;
}

.job-salary {
    color: #ff6600;
    font-size: 18px;
    font-weight: bold;
}

.job-meta {
    display: flex;
    gap: 20px;
    color: var(--gray);
    font-size: 14px;
    margin-bottom: 15px;
}

.job-summary {
    color: #666;
    font-size: 14px;
    line-height: 1.6;
}

.job-more {
    display: inline-block;
    margin-top: 15px;
    color: var(--primary);
    font-size: 14px;
}

/* 响应式 */
@media (max-width: 768px) {
    .header .container {
        flex-direction: column;
        height: auto;
        padding: 15px;
    }
    
    .nav {
        flex-wrap: wrap;
        justify-content: center;
        gap: 15px;
    }
    
    .hero h1 {
        font-size: 36px;
    }
    
    .hero-buttons {
        flex-direction: column;
    }
}

/* 手机端下拉菜单修复：
   前面 .nav 设了 overflow-x:auto，会把绝对定位的下拉菜单裁掉。
   这里改为换行展示，并放开裁剪，保证「内部系统」点按能正常展开。 */
@media (max-width: 768px) {
    .nav {
        flex-wrap: wrap;
        justify-content: center;
        gap: 0 14px;
        overflow-x: visible;
        overflow-y: visible;
    }

    .nav-dropdown.open .dropdown-menu {
        display: block;
    }
}

/* 超窄屏（手机竖屏）：汉堡菜单 */
@media (max-width: 480px) {
    /* 顶栏：logo 与汉堡按钮同一行 */
    .header .container {
        flex-direction: row;
        justify-content: space-between;
        align-items: center;
        height: auto;
        padding: 10px 15px;
    }

    .logo-icon { font-size: 24px; }
    .logo-text { font-size: 18px; }

    .nav-toggle {
        display: block;
        width: 42px;
        height: 42px;
        border: none;
        background: none;
        border-radius: 8px;
        font-size: 24px;
        line-height: 1;
        color: var(--primary);
        cursor: pointer;
        transition: background 0.2s;
    }
    .nav-toggle:hover,
    .nav-toggle.active { background: rgba(0, 102, 204, 0.08); }

    /* 导航变成全屏抽屉菜单，默认收起 */
    .nav {
        display: none;
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        flex-direction: column;
        /* 必须显式 nowrap：上面 768px 断点把 .nav 设成了 flex-wrap: wrap，
           抽屉是固定高度（top/bottom:0），内容超高时会横向换列，
           导致「内部系统」被挤到右边单独一列。nowrap + overflow-y:auto 才是单列滚动。 */
        flex-wrap: nowrap;
        align-items: stretch;
        justify-content: flex-start;
        gap: 0;
        margin: 0;
        background: var(--white);
        z-index: 2000;
        padding: 70px 24px 40px;
        overflow-y: auto;
        -webkit-overflow-scrolling: touch;
    }

    .nav.open { display: flex; }

    body.nav-locked { overflow: hidden; }

    .nav > a,
    .nav .nav-dropdown {
        display: block;
        border-bottom: 1px solid #f0f3f7;
    }

    .nav > a:first-child { border-top: 1px solid #f0f3f7; }

    .nav a {
        padding: 13px 6px;
        font-size: 17px;
        text-align: center;
        white-space: nowrap;
        color: var(--dark);
    }

    /* 「内部系统」在抽屉里直接平铺三个子链接 */
    .nav .nav-dropdown > .admin-link { display: none; }

    .nav .dropdown-menu {
        position: static;
        display: block;
        min-width: 0;
        background: none;
        box-shadow: none;
        padding: 0 0 14px;
        border-bottom: 1px solid #f0f3f7;
    }

    .nav .dropdown-menu::before {
        content: attr(data-title);
        display: block;
        text-align: center;
        font-size: 12px;
        letter-spacing: 6px;
        color: #98a2b3;
        padding: 12px 0 8px;
    }

    .nav .dropdown-menu a {
        width: 70%;
        margin: 5px auto;
        padding: 11px 6px;
        font-size: 15px;
        color: var(--primary) !important;
        background: #f2f7fd;
        border: none;
        border-radius: 22px;
    }
}

/* 手机端轮播加高，让封面图更大
   注意：首页轮播样式在文件中部(约1117行后)定义，位置比我前面的媒体查询靠后，
   必须放在文件最末尾才能覆盖它。 */
@media (max-width: 480px) {
    .news-carousel { padding-bottom: 62%; }
    .news-carousel .carousel-content { padding: 10px 14px; }
    .news-carousel .carousel-content h3 { font-size: 15px; line-height: 1.35; margin-bottom: 0; }
    .news-carousel .carousel-content p { font-size: 12px; }
    /* 收紧「轮播区 -> 为什么学编程」之间的空白：按钮行底部不留白 + 下一 section 顶距 6px + 标题顶 margin 归零 */
    .news-carousel-section > div[style*="text-align:center"] { padding: 0 20px 0 !important; }
    .news-carousel-section + .features { padding-top: 6px; }
    .news-carousel-section + .features .section-title { margin-top: 0; }
}
