﻿/* 走马灯样式 */
.carousel {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
}

.carousel-inner {
    width: 100%;
    height: 100%;
}

.carousel-item {
    width: 100%;
    height: 100%;
    display: none;
}

.carousel-item.active {
    display: block;
}

.carousel-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    filter: brightness(0.7); /* 使图片变暗，以便文字更清晰 */
}

/* 走马灯导航按钮 */
.carousel-nav {
    position: absolute;
    bottom: 20px;
    left: 0;
    width: 100%;
    display: flex;
    justify-content: center;
    gap: 10px;
    z-index: 3; /* 确保导航按钮在最上层 */
}

.carousel-prev,
.carousel-next {
    background-color: rgba(255, 255, 255, 0.5);
    border: none;
    color: #333;
    font-size: 18px;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background-color 0.3s;
}

.carousel-prev:hover,
.carousel-next:hover {
    background-color: rgba(255, 255, 255, 0.8);
}

/* Global Styles */
body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    margin: 0;
    padding: 0;
    background-color: #f4f7f6; /* Soft grayish green */
    color: #333;
    font-size: 16px;
}

a {
    color: #007bff; /* Soft blue for links */
    text-decoration: none;
}

a:hover {
    text-decoration: underline;
}

img {
    max-width: 100%;
    height: auto;
}

/* Header & Navigation */
header {
    background-color: #e9ecef; /* Light gray */
    padding: 1rem 0;
    border-bottom: 1px solid #dee2e6;
}

nav {
    width: 90%;
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

nav .logo {
    display: flex;
    align-items: center;
}

nav .logo .university-logo {
    height: 2.2rem;
    width: auto;
    margin-right: 10px;
    vertical-align: middle;
}

nav .logo a {
    font-size: 1.8rem;
    font-weight: bold;
    color: #343a40; /* Darker gray for logo */
}

nav ul {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
}

nav ul li {
    margin-left: 20px;
}

nav ul li a {
    color: #495057; /* Medium gray for nav links */
    font-weight: 500;
}

nav ul li a:hover, nav ul li a.active {
    color: #0056b3; /* Darker blue for hover/active */
}

/* 语言切换按钮样式 */
.lang-btn {
    background-color: #0056b3;
    color: white;
    border: none;
    padding: 5px 10px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
    transition: background-color 0.3s;
}

.lang-btn:hover {
    background-color: #003d7a;
}

/* Main Content Area */
main {
    width: 90%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0;
    background-color: transparent; /* 移除背景色，让走马灯可见 */
    border-radius: 8px;
}

/* Hero Section (Homepage) */
.hero {
    position: relative;
    color: #ffffff; /* 白色文字，与走马灯背景形成对比 */
    padding: 4rem 2rem;
    text-align: center;
    border-radius: 8px;
    margin-bottom: 2rem;
    overflow: hidden; /* 确保走马灯不会溢出 */
    height: 500px; /* 设置固定高度，确保走马灯有足够空间显示 */
    background-color: transparent; /* 移除背景色，让走马灯可见 */
}

.hero-content {
    position: relative;
    z-index: 2; /* 确保内容在走马灯上方 */
}

.hero h1 {
    font-size: 2.8rem;
    margin-bottom: 1rem;
    text-shadow: 1px 1px 3px rgba(0,0,0,0.5); /* 添加文字阴影增强可读性 */
}

.hero p {
    font-size: 1.2rem;
    margin-bottom: 2rem;
    text-shadow: 1px 1px 2px rgba(0,0,0,0.5); /* 添加文字阴影增强可读性 */
}

.cta-buttons .btn {
    padding: 0.8rem 1.5rem;
    margin: 0.5rem;
    border-radius: 5px;
    font-size: 1rem;
    text-transform: uppercase;
    font-weight: bold;
    transition: background-color 0.3s ease;
}

.btn-primary {
    background-color: #007bff; /* Soft blue */
    color: white;
    border: 1px solid #007bff;
}

.btn-primary:hover {
    background-color: #0056b3;
    border-color: #0056b3;
    text-decoration: none;
}

.btn-secondary {
    background-color: transparent;
    color: #ffffff;
    border: 1px solid #ffffff;
}

.btn-secondary:hover {
    background-color: rgba(255,255,255,0.2);
    color: white;
    text-decoration: none;
}

/* About Snippet (Homepage) */
.about-snippet {
    padding: 2rem;
    background-color: #f8f9fa; /* Very light gray */
    border-radius: 8px;
    margin-bottom: 2rem;
}

.about-snippet p {
    font-size: 1rem;
}

.about-snippet h2, .page-title h1, .content-section h2 {
    color: #2c5e46; /* Soft dark green for headings */
    margin-bottom: 1rem;
    border-bottom: 2px solid #a3d2ca; /* Soft teal accent */
    padding-bottom: 0.5rem;
    font-size: 2rem;
}

.about-snippet h3 {
    color: #3e8162; /* Medium green for sub-headings */
    margin-top: 1.5rem;
    font-size: 1.5rem;
}

.about-snippet ul {
    list-style: disc;
    margin-left: 20px;
    font-size: 1rem;
}

/* General Page Title Section */
.page-title {
    text-align: center;
    padding: 2rem 0;
    margin-bottom: 1.5rem;
}

.page-title h1 {
    font-size: 2.5rem;
}

.page-title p {
    font-size: 1.1rem;
    color: #6c757d; /* Muted gray for subtitle */
}

/* General Content Section */
.content-section {
    padding: 1rem;
}

.content-section h2 {
    font-size: 2rem;
}

.content-section h3 {
    font-size: 1.5rem;
    color: #3e8162; /* Medium green */
    margin-top: 1.5rem;
    margin-bottom: 0.5rem;
}

.content-section p, .content-section ul, .content-section ol {
    margin-bottom: 1rem;
    font-size: 1rem;
}

.content-section ul {
    list-style: disc;
    padding-left: 20px;
}

.content-section ul ul {
    list-style: circle;
    margin-top: 0.5rem;
}

.content-section strong {
    font-weight: 600;
    color: #333;
}

/* Gallery (Archive Page) */
.gallery {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    margin: 2rem 0;
}

.gallery figure {
    flex: 1 1 300px; /* Responsive gallery items */
    margin: 0;
    border: 1px solid #dee2e6;
    border-radius: 4px;
    overflow: hidden;
}

.gallery img {
    display: block;
    width: 100%;
    height: 200px; /* Fixed height for consistency */
    object-fit: cover;
}

.gallery figcaption {
    display: none;
}

/* Footer */
footer {
    background-color: #343a40; /* Dark gray for footer */
    color: #f8f9fa; /* Light text for footer */
    text-align: center;
    padding: 2rem 0;
    margin-top: 2rem;
}

footer p {
    margin-bottom: 1rem;
}

footer nav ul li a {
    color: #adb5bd; /* Lighter gray for footer nav links */
}

footer nav ul li a:hover {
    color: #ffffff;
}

/* Responsive Design */
@media (max-width: 768px) {
    nav {
        flex-direction: column;
    }

    nav .logo {
        margin-bottom: 1rem;
    }

    nav ul {
        flex-direction: column;
        align-items: center;
        width: 100%;
    }

    nav ul li {
        margin: 0.5rem 0;
    }

    .hero h1 {
        font-size: 2rem;
    }

    .hero p {
        font-size: 1rem;
    }

    .cta-buttons .btn {
        display: block;
        width: 80%;
        margin: 0.5rem auto;
    }

    .page-title h1 {
        font-size: 2rem;
    }

    .content-section h2 {
        font-size: 1.8rem;
    }
}

/* Accessibility */
/* Add focus styles for keyboard navigation */
a:focus, button:focus, input:focus, textarea:focus, select:focus {
    outline: 2px solid #007bff; /* Soft blue outline */
    outline-offset: 2px;
}

/* Hide elements visually but keep them accessible to screen readers */
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border-width: 0;
}