/* 通用样式 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    color: #333;
    background-color: #f8f9fa;
}

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

a {
    text-decoration: none;
    color: inherit;
}

ul {
    list-style: none;
}

/* 按钮样式 */
.btn {
    display: inline-block;
    padding: 12px 30px;
    background-color: #1a73e8;
    color: white;
    border: none;
    border-radius: 30px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    text-align: center;
}

.btn:hover {
    background-color: #1557b0;
    transform: translateY(-3px);
    box-shadow: 0 10px 20px rgba(26, 115, 232, 0.2);
}

.btn-outline {
    background-color: transparent;
    color: #1a73e8;
    border: 2px solid #1a73e8;
}

.btn-outline:hover {
    background-color: #1a73e8;
    color: white;
}

/* 卡片样式 */
.card {
    background-color: white;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
    height: 100%;
    display: flex;
    flex-direction: column;
}

.card:hover {
    transform: translateY(-10px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.15);
}

.card-img {
    width: 100%;
    height: 200px;
    object-fit: cover;
    transition: transform 0.3s ease;
}

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

.card-img-container {
    overflow: hidden;
}

.card-body {
    padding: 25px;
    flex: 1;
}

.card-title {
    font-size: 1.5rem;
    font-weight: 600;
    color: #333;
    margin-bottom: 15px;
    line-height: 1.4;
}

.card-text {
    color: #666;
    line-height: 1.7;
    margin-bottom: 20px;
}

.card-footer {
    padding: 0 25px 25px;
}

/* 导航栏样式 - 兼容两种结构 */
.navbar, nav.navbar {
    background-color: white;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    transition: all 0.3s ease;
}

.navbar.scrolled, nav.navbar.scrolled {
    background-color: white;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.1);
}

/* 联系我们页面导航栏结构 */
.navbar .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 0;
}

.navbar .logo {
    display: flex;
    align-items: center;
}

.navbar .logo img {
    max-height: 40px;
}

.navbar .nav-links {
    display: flex;
    gap: 30px;
}

.navbar .nav-links a {
    color: #333;
    font-weight: 600;
    transition: all 0.3s ease;
    position: relative;
}

.navbar .nav-links a:hover,
.navbar .nav-links a.active {
    color: #1a73e8;
}

.navbar .nav-links a::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 0;
    height: 2px;
    background-color: #1a73e8;
    transition: width 0.3s ease;
}

.navbar .nav-links a:hover::after,
.navbar .nav-links a.active::after {
    width: 100%;
}

/* 其他页面导航栏结构 */
.nav-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 0;
}

.logo {
    font-size: 1.8rem;
    font-weight: 700;
    color: #1a73e8;
    display: flex;
    align-items: center;
    gap: 10px;
}

.nav-menu {
    display: flex;
    gap: 30px;
}

.nav-item {
    list-style: none;
}

.nav-link {
    color: #333;
    font-weight: 600;
    transition: all 0.3s ease;
    position: relative;
    text-decoration: none;
}

.nav-link:hover {
    color: #1a73e8;
}

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

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

/* 通用按钮样式 */
.contact-btn {
    display: flex;
    align-items: center;
}

.btn-primary {
    display: inline-block;
    padding: 12px 30px;
    background-color: #1a73e8;
    color: white;
    border: none;
    border-radius: 30px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    text-align: center;
    text-decoration: none;
}

.btn-primary:hover {
    background-color: #1557b0;
    transform: translateY(-3px);
    box-shadow: 0 10px 20px rgba(26, 115, 232, 0.2);
}

/* 移动端菜单按钮 */
.menu-toggle,
.hamburger {
    display: none;
    cursor: pointer;
    font-size: 1.5rem;
    color: #333;
}

.bar {
    display: block;
    width: 25px;
    height: 3px;
    margin: 5px auto;
    transition: all 0.3s ease;
    background-color: #333;
}

/* 移动端菜单样式 */
.mobile-menu {
    position: fixed;
    top: 0;
    right: -100%;
    width: 80%;
    height: 100vh;
    background-color: white;
    z-index: 1001;
    transition: right 0.3s ease;
    box-shadow: -5px 0 15px rgba(0, 0, 0, 0.1);
}

.mobile-menu.active {
    right: 0;
}

.mobile-menu-content {
    height: 100%;
    display: flex;
    flex-direction: column;
}

.mobile-menu-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px;
    border-bottom: 1px solid #e9ecef;
}

.close-menu {
    cursor: pointer;
    font-size: 1.5rem;
    color: #333;
}

.mobile-nav-links {
    flex: 1;
    padding: 20px;
}

.mobile-nav-links a {
    display: block;
    padding: 15px 0;
    color: #333;
    font-size: 1.1rem;
    font-weight: 600;
    border-bottom: 1px solid #f1f3f5;
    transition: color 0.3s ease;
    text-decoration: none;
}

.mobile-nav-links a:hover,
.mobile-nav-links a.active {
    color: #1a73e8;
}

.mobile-contact-btn {
    padding: 20px;
    border-top: 1px solid #e9ecef;
}

/* 页脚样式 */
.footer {
    background-color: #333;
    color: white;
    padding: 80px 0 30px;
}

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

.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 40px;
    margin-bottom: 50px;
}

.footer-logo {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.footer-logo img {
    max-height: 50px;
}

.footer-logo p {
    color: #ccc;
    line-height: 1.7;
}

.footer-links h3,
.footer-programs h3,
.footer-contact h3 {
    font-size: 1.3rem;
    margin-bottom: 20px;
    color: white;
}

.footer-links ul,
.footer-programs ul,
.footer-contact ul {
    list-style: none;
}

.footer-links ul li,
.footer-programs ul li,
.footer-contact ul li {
    margin-bottom: 10px;
}

.footer-links ul li a,
.footer-programs ul li a {
    color: #ccc;
    transition: color 0.3s ease;
}

.footer-links ul li a:hover,
.footer-programs ul li a:hover {
    color: white;
}

.footer-contact ul li {
    color: #ccc;
    display: flex;
    align-items: flex-start;
    gap: 10px;
}

.footer-contact ul li i {
    color: #1a73e8;
    margin-top: 5px;
}

.footer-social {
    display: flex;
    gap: 15px;
    margin-top: 20px;
}

.footer-social a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    background-color: rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    color: white;
    transition: all 0.3s ease;
}

.footer-social a:hover {
    background-color: #1a73e8;
    transform: translateY(-3px);
}

.footer-bottom {
    text-align: center;
    padding-top: 30px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    color: #ccc;
}

/* 动画效果 */
.fade-in {
    opacity: 0;
    transform: translateY(30px);
    animation: fadeIn 1s ease forwards;
}

@keyframes fadeIn {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* 响应式设计 */
@media (max-width: 768px) {
    .hamburger {
        display: block;
    }
    
    .hamburger.active .bar:nth-child(2) {
        opacity: 0;
    }
    
    .hamburger.active .bar:nth-child(1) {
        transform: translateY(8px) rotate(45deg);
    }
    
    .hamburger.active .bar:nth-child(3) {
        transform: translateY(-8px) rotate(-45deg);
    }
    
    .nav-menu {
        position: fixed;
        left: -100%;
        top: 70px;
        gap: 0;
        flex-direction: column;
        background-color: white;
        width: 100%;
        text-align: center;
        transition: 0.3s;
        box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1);
    }
    
    .nav-menu.active {
        left: 0;
    }
    
    .nav-item {
        margin: 16px 0;
    }
    
    .card-title {
        font-size: 1.3rem;
    }
    
    .btn {
        padding: 10px 25px;
        font-size: 14px;
    }
}

/* 滚动条样式 */
::-webkit-scrollbar {
    width: 10px;
}

::-webkit-scrollbar-track {
    background: #f1f1f1;
}

::-webkit-scrollbar-thumb {
    background: #1a73e8;
    border-radius: 5px;
}

::-webkit-scrollbar-thumb:hover {
    background: #1557b0;
}

/* 表单样式 */
.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: #333;
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 12px;
    border: 2px solid #e1e5e9;
    border-radius: 8px;
    font-size: 16px;
    transition: border-color 0.3s ease;
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: #1a73e8;
}

/* 加载动画 */
.loading {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    border-top-color: white;
    animation: spin 1s ease-in-out infinite;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

/* 错误和成功消息 */
.message {
    padding: 15px;
    border-radius: 8px;
    margin-bottom: 20px;
}

.message.success {
    background-color: #e8f5e9;
    color: #34a853;
    border: 1px solid #c8e6c9;
}

.message.error {
    background-color: #ffebee;
    color: #e53935;
    border: 1px solid #ffcdd2;
}

/* 图片画廊 */
.gallery {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
}

.gallery-item {
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease;
}

.gallery-item:hover {
    transform: translateY(-5px);
}

.gallery-item img {
    width: 100%;
    height: 200px;
    object-fit: cover;
}

/* 表格样式 */
.table {
    width: 100%;
    border-collapse: collapse;
    margin: 20px 0;
}

.table th,
.table td {
    padding: 12px 15px;
    text-align: left;
    border-bottom: 1px solid #e1e5e9;
}

.table th {
    background-color: #f8f9fa;
    font-weight: 600;
    color: #333;
}

.table tr:hover {
    background-color: #f8f9fa;
}

/* 标签样式 */
.tag {
    display: inline-block;
    padding: 5px 12px;
    background-color: #e3f2fd;
    color: #1a73e8;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 500;
    margin-right: 8px;
    margin-bottom: 8px;
}

/* 徽章样式 */
.badge {
    display: inline-block;
    padding: 5px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
}

.badge-primary {
    background-color: #e3f2fd;
    color: #1a73e8;
}

.badge-success {
    background-color: #e8f5e9;
    color: #34a853;
}

.badge-warning {
    background-color: #fff3e0;
    color: #f57c00;
}

.badge-danger {
    background-color: #ffebee;
    color: #e53935;
}

/* 引用样式 */
blockquote {
    border-left: 5px solid #1a73e8;
    padding-left: 20px;
    margin: 20px 0;
    color: #666;
    font-style: italic;
}

/* 代码块样式 */
pre {
    background-color: #f8f9fa;
    padding: 20px;
    border-radius: 8px;
    overflow-x: auto;
    margin: 20px 0;
}

code {
    font-family: 'Courier New', Courier, monospace;
    background-color: #f8f9fa;
    padding: 2px 5px;
    border-radius: 4px;
    font-size: 0.9em;
}

/* 响应式网格 */
.grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
}

/* 文本对齐 */
.text-center {
    text-align: center;
}

.text-left {
    text-align: left;
}

.text-right {
    text-align: right;
}

/* 边距 */
.mt-1 {
    margin-top: 0.25rem;
}

.mt-2 {
    margin-top: 0.5rem;
}

.mt-3 {
    margin-top: 1rem;
}

.mt-4 {
    margin-top: 1.5rem;
}

.mt-5 {
    margin-top: 2rem;
}

.mb-1 {
    margin-bottom: 0.25rem;
}

.mb-2 {
    margin-bottom: 0.5rem;
}

.mb-3 {
    margin-bottom: 1rem;
}

.mb-4 {
    margin-bottom: 1.5rem;
}

.mb-5 {
    margin-bottom: 2rem;
}

/* 联系我们页面样式 */
.page-header {
    background-color: #f8f9fa;
    padding: 100px 0 50px;
    text-align: center;
}

.page-header h1 {
    font-size: 2.5rem;
    font-weight: 700;
    color: #333;
    margin-bottom: 15px;
}

.page-header p {
    font-size: 1.1rem;
    color: #666;
}

.contact-section {
    padding: 80px 0;
}

.contact-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 60px;
    align-items: start;
}

.contact-info {
    background-color: white;
    padding: 40px;
    border-radius: 12px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
}

.contact-info h2 {
    font-size: 1.8rem;
    font-weight: 700;
    color: #333;
    margin-bottom: 30px;
}

.contact-item {
    display: flex;
    align-items: flex-start;
    gap: 20px;
    margin-bottom: 30px;
}

.contact-item i {
    font-size: 1.5rem;
    color: #1a73e8;
    margin-top: 5px;
}

.contact-item h3 {
    font-size: 1.1rem;
    font-weight: 600;
    color: #333;
    margin-bottom: 5px;
}

.contact-item p {
    color: #666;
    line-height: 1.6;
}

.social-links {
    display: flex;
    gap: 15px;
    margin-top: 40px;
}

.social-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 45px;
    height: 45px;
    background-color: #f8f9fa;
    border-radius: 50%;
    color: #333;
    font-size: 1.2rem;
    transition: all 0.3s ease;
}

.social-link:hover {
    background-color: #1a73e8;
    color: white;
    transform: translateY(-3px);
}

.contact-form {
    background-color: white;
    padding: 40px;
    border-radius: 12px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
}

.contact-form h2 {
    font-size: 1.8rem;
    font-weight: 700;
    color: #333;
    margin-bottom: 30px;
}

.form-group {
    margin-bottom: 25px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: #333;
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 15px;
    border: 2px solid #e1e5e9;
    border-radius: 8px;
    font-size: 16px;
    transition: border-color 0.3s ease;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: #1a73e8;
}

.form-group textarea {
    resize: vertical;
    min-height: 150px;
}

.map-section {
    padding: 80px 0;
    background-color: #f8f9fa;
}

.map-container {
    height: 500px;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
}

.map-placeholder {
    width: 100%;
    height: 100%;
    background-color: #e9ecef;
    display: flex;
    align-items: center;
    justify-content: center;
}

.faq-section {
    padding: 80px 0;
}

.section-title {
    font-size: 2.2rem;
    font-weight: 700;
    color: #333;
    text-align: center;
    margin-bottom: 50px;
}

.faq-list {
    max-width: 800px;
    margin: 0 auto;
}

.faq-item {
    margin-bottom: 20px;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
}

.faq-question {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 25px;
    background-color: white;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

.faq-question:hover {
    background-color: #f8f9fa;
}

.faq-question h3 {
    font-size: 1.1rem;
    font-weight: 600;
    color: #333;
}

.faq-question i {
    font-size: 1.2rem;
    color: #1a73e8;
    transition: transform 0.3s ease;
}

.faq-answer {
    padding: 0 25px;
    background-color: white;
    max-height: 0;
    overflow: hidden;
    transition: all 0.3s ease;
}

.faq-answer.active {
    padding: 25px;
    max-height: 200px;
}

.faq-answer p {
    color: #666;
    line-height: 1.7;
}

.partners-section {
    padding: 80px 0;
    background-color: #f8f9fa;
}

.partners-list {
    display: flex;
    justify-content: center;
    align-items: center;
    flex-wrap: wrap;
    gap: 40px;
}

.partner-item {
    width: 150px;
    height: 80px;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: white;
    border-radius: 8px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
    transition: transform 0.3s ease;
}

.partner-item:hover {
    transform: translateY(-5px);
}

.partner-item img {
    max-width: 120px;
    max-height: 60px;
    object-fit: contain;
}

/* 响应式调整 */
@media (max-width: 992px) {
    .contact-content {
        grid-template-columns: 1fr;
        gap: 40px;
    }
    
    .page-header h1 {
        font-size: 2.2rem;
    }
    
    .section-title {
        font-size: 2rem;
    }
}

@media (max-width: 768px) {
    .page-header {
        padding: 80px 0 40px;
    }
    
    .page-header h1 {
        font-size: 2rem;
    }
    
    .contact-section,
    .map-section,
    .faq-section,
    .partners-section {
        padding: 60px 0;
    }
    
    .contact-info,
    .contact-form {
        padding: 30px;
    }
    
    .contact-info h2,
    .contact-form h2 {
        font-size: 1.6rem;
    }
    
    .section-title {
        font-size: 1.8rem;
        margin-bottom: 40px;
    }
    
    .map-container {
        height: 400px;
    }
    
    .partners-list {
        gap: 30px;
    }
    
    .partner-item {
        width: 130px;
        height: 70px;
    }
}

@media (max-width: 576px) {
    .container {
        padding: 0 15px;
    }
    
    .page-header h1 {
        font-size: 1.8rem;
    }
    
    .contact-info,
    .contact-form {
        padding: 25px;
    }
    
    .contact-item {
        flex-direction: column;
        gap: 10px;
    }
    
    .contact-item i {
        margin-top: 0;
    }
    
    .map-container {
        height: 300px;
    }
    
    .partners-list {
        gap: 20px;
    }
    
    .partner-item {
        width: 120px;
        height: 60px;
    }
    
    .partner-item img {
        max-width: 100px;
        max-height: 50px;
    }
}