/* static/style.css */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

:root {
    --primary: #0b3b5c;
    --primary-light: #1f5a8e;
    --accent: #eab308;
    --gray-bg: #f8fafc;
    --text-dark: #1e293b;
    --text-light: #64748b;
    --white: #ffffff;
    --shadow: 0 10px 25px -5px rgba(0,0,0,0.1), 0 8px 10px -6px rgba(0,0,0,0.02);
}

body {
    background-color: var(--white);
    color: var(--text-dark);
    line-height: 1.6;
}

.container {
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 24px;
}

/* 顶部栏 */
.top-bar {
    background-color: var(--primary);
    color: rgba(255,255,255,0.9);
    font-size: 0.9rem;
    padding: 8px 0;
    border-bottom: 2px solid var(--accent);
}
.top-bar .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px;
}
.contact-info i, .social-links i {
    margin-right: 6px;
    color: var(--accent);
}
.contact-info span {
    margin-right: 20px;
}
.social-links a {
    color: white;
    margin-left: 15px;
    transition: color 0.2s;
}
.social-links a:hover {
    color: var(--accent);
}

/* 导航 */
.navbar {
    background-color: var(--white);
    box-shadow: 0 4px 6px -2px rgba(0,0,0,0.05);
    position: sticky;
    top: 0;
    z-index: 1000;
}
.navbar .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 80px;
}
.logo {
    display: flex;
    align-items: center;
    gap: 12px;
}
.logo img {
    height: 50px;
    width: auto;
    display: block;
    border-radius: 6px;
}
.logo-text {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--primary);
    text-decoration: none;
    line-height: 1.2;
}
.logo-text span {
    color: var(--accent);
    font-weight: 400;
    font-size: 1rem;
    display: block;
}
.nav-menu {
    display: flex;
    align-items: center;
    list-style: none;
    gap: 28px;
}
.nav-menu li a {
    text-decoration: none;
    font-weight: 500;
    color: var(--text-dark);
    transition: 0.2s;
    padding: 8px 0;
    border-bottom: 2px solid transparent;
}
.nav-menu li a:hover,
.nav-menu li a.active {
    color: var(--primary);
    border-bottom-color: var(--accent);
}
.dropdown {
    position: relative;
}
.dropdown-content {
    display: none;
    position: absolute;
    background-color: white;
    min-width: 200px;
    box-shadow: var(--shadow);
    border-radius: 8px;
    top: 36px;
    left: -10px;
    padding: 8px 0;
    z-index: 10;
}
.dropdown-content a {
    display: block;
    padding: 10px 20px !important;
    border: none !important;
    color: var(--text-dark) !important;
}
.dropdown-content a:hover {
    background-color: var(--gray-bg);
    color: var(--primary) !important;
}
.dropdown:hover .dropdown-content {
    display: block;
}
.menu-toggle {
    display: none;
    font-size: 1.8rem;
    color: var(--primary);
    cursor: pointer;
}

/* 轮播 */
.carousel {
    position: relative;
    overflow: hidden;
    height: 500px;
    background-color: #1e293b;
}
.carousel-slides {
    display: flex;
    transition: transform 0.5s ease-in-out;
    height: 100%;
}
.slide {
    min-width: 100%;
    height: 100%;
    position: relative;
}
.slide img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0.75;
}
.slide-content {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    color: white;
    background: rgba(0,0,0,0.3);
    padding: 20px;
}
.slide-content h2 {
    font-size: 3.2rem;
    font-weight: 700;
    margin-bottom: 1rem;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.5);
}
.slide-content p {
    font-size: 1.3rem;
    max-width: 700px;
    text-shadow: 1px 1px 2px rgba(0,0,0,0.5);
}
.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: 2rem;
    cursor: pointer;
    backdrop-filter: blur(4px);
    transition: 0.2s;
    z-index: 10;
}
.carousel-btn:hover {
    background: var(--accent);
    color: var(--primary);
}
.prev { left: 20px; }
.next { right: 20px; }
.carousel-dots {
    position: absolute;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 12px;
    z-index: 10;
}
.dot {
    width: 14px;
    height: 14px;
    background: rgba(255,255,255,0.5);
    border-radius: 50%;
    cursor: pointer;
    transition: 0.2s;
}
.dot.active {
    background: var(--accent);
    transform: scale(1.2);
}

/* 通用页面头部 */
.page-header {
    background: linear-gradient(rgba(11,59,92,0.8), rgba(11,59,92,0.8)), url('https://via.placeholder.com/1920x400') center/cover;
    color: white;
    padding: 80px 0;
    text-align: center;
    margin-bottom: 60px;
}
.page-header h1 {
    font-size: 3rem;
    margin-bottom: 16px;
}
.page-header p {
    font-size: 1.2rem;
    opacity: 0.9;
}

/* 卡片 */
.section {
    padding: 60px 0;
}
.section-title {
    font-size: 2.2rem;
    font-weight: 600;
    color: var(--primary);
    margin-bottom: 40px;
    text-align: center;
    position: relative;
}
.section-title:after {
    content: '';
    display: block;
    width: 80px;
    height: 4px;
    background: var(--accent);
    margin: 12px auto 0;
    border-radius: 2px;
}
.grid-3 {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
}
.news-card {
    background: var(--white);
    border-radius: 16px;
    overflow: hidden;
    box-shadow: var(--shadow);
    transition: transform 0.2s;
}
.news-card:hover {
    transform: translateY(-6px);
}
.news-img {
    height: 200px;
    background-color: #cbd5e1;
    background-size: cover;
    background-position: center;
}
.news-content {
    padding: 24px;
}
.news-date {
    color: var(--accent);
    font-weight: 600;
    font-size: 0.9rem;
    margin-bottom: 8px;
}
.news-title {
    font-size: 1.3rem;
    font-weight: 600;
    margin-bottom: 12px;
    color: var(--text-dark);
}
.btn-outline {
    display: inline-block;
    padding: 8px 24px;
    border: 2px solid var(--primary);
    border-radius: 40px;
    color: var(--primary);
    font-weight: 600;
    text-decoration: none;
    transition: 0.2s;
    margin-top: 16px;
}
.btn-outline:hover {
    background: var(--primary);
    color: white;
}
.btn-load {
    background: transparent;
    border: 2px solid var(--accent);
    color: var(--accent);
    padding: 12px 40px;
    border-radius: 40px;
    font-weight: 700;
    font-size: 1.1rem;
    cursor: pointer;
    transition: 0.2s;
    margin: 40px auto 0;
    display: block;
}
.btn-load:hover {
    background: var(--accent);
    color: var(--primary);
}
.btn-load:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* 校园生活卡片 */
.campus-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
}
.campus-item {
    border-radius: 20px;
    overflow: hidden;
    height: 220px;
    position: relative;
    box-shadow: var(--shadow);
}
.campus-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s;
}
.campus-item:hover img {
    transform: scale(1.1);
}
.campus-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(transparent, rgba(0,0,0,0.8));
    color: white;
    padding: 20px;
    font-size: 1.2rem;
    font-weight: 600;
}

/* 留言表单 */
.contact-form {
    background: var(--gray-bg);
    border-radius: 30px;
    padding: 40px;
    max-width: 800px;
    margin: 0 auto;
}
.form-group {
    margin-bottom: 24px;
}
input, textarea {
    width: 100%;
    padding: 16px 20px;
    border: 1px solid #e2e8f0;
    border-radius: 50px;
    font-size: 1rem;
    transition: 0.2s;
}
textarea {
    border-radius: 30px;
    resize: vertical;
}
input:focus, textarea:focus {
    outline: none;
    border-color: var(--accent);
    box-shadow: 0 0 0 3px rgba(234,179,8,0.2);
}
.btn-primary {
    background: var(--primary);
    color: white;
    border: none;
    padding: 16px 40px;
    border-radius: 50px;
    font-weight: 700;
    font-size: 1.1rem;
    cursor: pointer;
    transition: 0.2s;
    border: 2px solid transparent;
}
.btn-primary:hover {
    background: var(--accent);
    color: var(--primary);
    border-color: var(--primary);
}

/* 页脚 */
footer {
    background: var(--primary);
    color: rgba(255,255,255,0.8);
    padding: 40px 0 20px;
    margin-top: 60px;
}
.footer-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 40px;
    margin-bottom: 40px;
}
.footer-col h4 {
    color: white;
    margin-bottom: 20px;
    position: relative;
    display: inline-block;
}
.footer-col h4:after {
    content: '';
    display: block;
    width: 40px;
    height: 3px;
    background: var(--accent);
    margin-top: 8px;
}
.footer-col p, .footer-col a {
    color: rgba(255,255,255,0.7);
    text-decoration: none;
    display: block;
    margin-bottom: 8px;
}
.footer-col a:hover {
    color: var(--accent);
}
.copyright {
    text-align: center;
    padding-top: 20px;
    border-top: 1px solid rgba(255,255,255,0.2);
}

/* 响应式 */
@media (max-width: 768px) {
    .menu-toggle {
        display: block;
    }
    .nav-menu {
        position: absolute;
        top: 80px;
        left: 0;
        right: 0;
        background: white;
        flex-direction: column;
        padding: 20px;
        gap: 20px;
        box-shadow: 0 10px 15px -3px rgba(0,0,0,0.1);
        display: none;
    }
    .nav-menu.active {
        display: flex;
    }
    .dropdown-content {
        position: static;
        box-shadow: none;
        padding-left: 20px;
    }
    .campus-grid {
        grid-template-columns: 1fr;
    }
    .slide-content h2 {
        font-size: 2.2rem;
    }
}