/* 基本重置 */
*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: 'Noto Sans SC', sans-serif; /* 使用 Google Fonts 或您选择的字体 */
    line-height: 1.6;
    color: #333;
    background-color: #f4f7f6;
    scroll-behavior: smooth; /* 平滑滚动 */
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* 链接基础样式 */
a {
    color: #007bff;
    text-decoration: none;
}

a:hover {
    text-decoration: underline;
}

/* 按钮样式 */
.btn {
    display: inline-block;
    background-color: #007bff;
    color: #fff;
    padding: 10px 20px;
    border-radius: 5px;
    transition: background-color 0.3s ease;
}

.btn:hover {
    background-color: #0056b3;
    text-decoration: none;
}

/* --- Header & Navigation --- */
.header {
    background-color: #fff;
    padding: 15px 0;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
    position: sticky;
    top: 0;
    z-index: 1000;
}

.header .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    display: flex;
    align-items: center;
}

.logo img {
    height: 40px; /* Adjust as needed */
    margin-right: 10px;
}

.logo h1 {
    font-size: 24px;
    color: #333;
    margin: 0;
}

.main-nav ul {
    list-style: none;
    display: flex;
}

.main-nav ul li {
    margin-left: 30px;
}

.main-nav ul li a {
    color: #555;
    font-weight: bold;
    font-size: 17px;
    transition: color 0.3s ease;
}

.main-nav ul li a:hover {
    color: #007bff;
    text-decoration: none;
}

/* Mobile Menu Toggle (Hamburger) */
.menu-toggle {
    display: none; /* Hidden on desktop */
    background: none;
    border: none;
    cursor: pointer;
    padding: 10px;
    position: relative;
    z-index: 1001;
}

.menu-toggle span {
    display: block;
    width: 25px;
    height: 3px;
    background-color: #333;
    margin: 5px 0;
    transition: all 0.3s ease;
}

/* Toggle animation */
.menu-toggle.active span:nth-child(1) {
    transform: translateY(8px) rotate(45deg);
}
.menu-toggle.active span:nth-child(2) {
    opacity: 0;
}
.menu-toggle.active span:nth-child(3) {
    transform: translateY(-8px) rotate(-45deg);
}

/* --- Hero Section --- */
.hero {
    background: url('../images/hero-bg.jpg') no-repeat center center/cover; /* 替换为您的背景图 */
    color: #fff;
    text-align: center;
    padding: 100px 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 60vh; /* Make it taller */
}

.hero-content h1 {
    font-size: 3.5em; /* Larger for desktop */
    margin-bottom: 20px;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.5);
}

.hero-content p {
    font-size: 1.5em;
    margin-bottom: 30px;
    text-shadow: 1px 1px 3px rgba(0,0,0,0.5);
}

/* --- Sections --- */
.section {
    padding: 60px 0;
    text-align: center;
}

.section:nth-child(odd) {
    background-color: #eef3f2; /* Light background for alternating sections */
}

.section h2 {
    font-size: 2.8em;
    color: #007bff;
    margin-bottom: 40px;
    position: relative;
    display: inline-block;
}

.section h2::after {
    content: '';
    position: absolute;
    left: 50%;
    bottom: -10px;
    transform: translateX(-50%);
    width: 60px;
    height: 4px;
    background-color: #007bff;
    border-radius: 2px;
}

/* --- About Us Section --- */
.about-us .about-content {
    display: flex;
    flex-direction: column; /* Stack on mobile */
    align-items: center;
    gap: 30px;
    text-align: left;
    max-width: 900px;
    margin: 0 auto;
}

.about-us p {
    font-size: 1.1em;
    line-height: 1.8;
    margin-bottom: 15px;
}

.about-us .about-image img {
    max-width: 100%;
    height: auto;
    border-radius: 8px;
    box-shadow: 0 4px 10px rgba(0,0,0,0.1);
}

/* --- Departments Section --- */
.departments .department-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); /* Responsive grid */
    gap: 30px;
    margin-top: 40px;
}

.department-card {
    background-color: #fff;
    padding: 30px;
    border-radius: 8px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.08);
    text-align: left;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.department-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 6px 20px rgba(0,0,0,0.15);
}

.department-card h3 {
    color: #007bff;
    font-size: 1.8em;
    margin-bottom: 15px;
    position: relative;
}

.department-card h3::after {
    content: '';
    position: absolute;
    left: 0;
    bottom: -5px;
    width: 40px;
    height: 3px;
    background-color: #007bff;
    border-radius: 2px;
}

.department-card p {
    font-size: 1em;
    line-height: 1.7;
    color: #555;
}

/* --- Location Section --- */
.location-content {
    display: flex;
    flex-direction: column; /* Stack on mobile */
    gap: 40px;
    text-align: left;
    max-width: 1000px;
    margin: 0 auto;
}

.address-info {
    flex: 1;
}

.address-info h3 {
    color: #007bff;
    font-size: 1.6em;
    margin-bottom: 15px;
}

.address-info p, .address-info li {
    font-size: 1.1em;
    margin-bottom: 10px;
}

.address-info ul {
    list-style: none;
    padding-left: 0;
}

.address-info ul li strong {
    color: #333;
}

.map-embed {
    flex: 1;
    min-height: 300px; /* Ensures map has some height on mobile */
    background-color: #e0e0e0; /* Placeholder background */
    display: flex;
    justify-content: center;
    align-items: center;
    border-radius: 8px;
    overflow: hidden;
    position: relative; /* For placeholder text */
}

.map-embed iframe {
    width: 100%;
    height: 100%;
    border: none;
    display: block;
}

.map-placeholder-text {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: #666;
    font-style: italic;
    font-size: 0.9em;
    text-align: center;
    max-width: 90%;
}

/* --- Footer --- */
.footer {
    background-color: #333;
    color: #fff;
    padding: 30px 0;
    text-align: center;
    font-size: 0.9em;
}

.footer .container {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 15px;
}

.footer-links a {
    color: #fff;
    margin: 0 15px;
    transition: color 0.3s ease;
}

.footer-links a:hover {
    color: #007bff;
    text-decoration: none;
}

/* --- Responsive Design (Media Queries) --- */

/* Tablets and larger (min-width: 768px) */
@media (min-width: 768px) {
    .hero-content h1 {
        font-size: 4.5em;
    }

    .hero-content p {
        font-size: 1.8em;
    }

    .about-us .about-content {
        flex-direction: row; /* Side-by-side on larger screens */
        text-align: left;
    }

    .about-us .about-content > *:first-child { /* Text part */
        flex: 2;
        padding-right: 30px;
    }
    .about-us .about-image { /* Image part */
        flex: 1;
        min-width: 300px; /* Prevent image from getting too small */
    }

    .departments .department-grid {
        grid-template-columns: repeat(2, 1fr); /* Two columns */
    }

    .location-content {
        flex-direction: row; /* Side-by-side on larger screens */
    }

    .map-embed {
        min-height: 450px; /* Make map larger on desktop */
    }

    .footer .container {
        flex-direction: row;
        justify-content: space-between;
    }
}

/* Desktops and larger (min-width: 1024px) */
@media (min-width: 1024px) {
    .header .logo h1 {
        font-size: 28px;
    }

    .hero-content h1 {
        font-size: 5.5em;
    }

    .hero-content p {
        font-size: 2em;
    }

    .section h2 {
        font-size: 3.2em;
    }

    .departments .department-grid {
        grid-template-columns: repeat(3, 1fr); /* Three columns */
    }

    .department-card h3 {
        font-size: 2em;
    }
}

/* Mobile specific overrides (max-width: 767px) */
@media (max-width: 767px) {
    .logo h1 {
        font-size: 20px;
    }

    .main-nav {
        display: none; /* Hide main nav by default on mobile */
        flex-direction: column;
        width: 100%;
        background-color: #fff;
        position: absolute;
        top: 70px; /* Below header */
        left: 0;
        box-shadow: 0 5px 10px rgba(0,0,0,0.1);
        padding-bottom: 10px;
    }

    .main-nav.active {
        display: flex; /* Show when active */
    }

    .main-nav ul {
        flex-direction: column;
        width: 100%;
    }

    .main-nav ul li {
        margin: 0;
        width: 100%;
        text-align: center;
        border-bottom: 1px solid #eee;
    }

    .main-nav ul li:last-child {
        border-bottom: none;
    }

    .main-nav ul li a {
        display: block;
        padding: 15px 20px;
        font-size: 1.1em;
    }

    .menu-toggle {
        display: block; /* Show hamburger on mobile */
    }

    .hero {
        padding: 80px 20px;
        min-height: 50vh;
    }

    .hero-content h1 {
        font-size: 2.5em;
    }

    .hero-content p {
        font-size: 1.2em;
    }

    .section {
        padding: 40px 0;
    }

    .section h2 {
        font-size: 2.2em;
        margin-bottom: 30px;
    }

    .about-us p, .address-info p, .department-card p {
        font-size: 0.95em;
    }

    .department-card {
        padding: 25px;
    }

    .department-card h3 {
        font-size: 1.5em;
    }

    .address-info h3 {
        font-size: 1.4em;
    }
}