/* * 山东大学公共卫生学科100周年庆典网站 - Modern Redesign */ :root { /* 核心色盘 */ --primary-red: #7E1624; /* 更深沉的红,接近山大红 */ --primary-red-light: #9A2233; --accent-gold: #C49F60; /* 更有质感的香槟金 */ --accent-gold-bright: #E8CFA0; /* 中性色 */ --text-dark: #2D2D2D; --text-gray: #666666; --text-light: #F9F9F9; --bg-page: #FCFBF7; /* 极淡的米色背景 */ --bg-white: #FFFFFF; /* 尺寸与效果 */ --max-width: 1400px; --border-radius: 12px; --shadow-soft: 0 10px 30px rgba(0,0,0,0.05); --shadow-hover: 0 20px 40px rgba(126, 22, 36, 0.15); --transition: all 0.4s cubic-bezier(0.165, 0.84, 0.44, 1); } /* 全局重置 */ * { margin: 0; padding: 0; box-sizing: border-box; } body { font-family: "Noto Sans SC", "Microsoft YaHei", sans-serif; background-color: var(--bg-page); color: var(--text-dark); line-height: 1.7; -webkit-font-smoothing: antialiased; } h1, h2, h3, h4 { font-family: "Noto Serif SC", serif; /* 标题使用衬线体 */ font-weight: 700; } a { text-decoration: none; color: inherit; transition: var(--transition); } /* --- 导航栏 (悬浮磨砂效果) --- */ .main-nav { position: sticky; /* 滚动时吸顶 */ top: 0; width: 100%; z-index: 1000; background: rgba(255, 255, 255, 0.95); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); border-bottom: 1px solid rgba(196, 159, 96, 0.2); box-shadow: 0 4px 20px rgba(0,0,0,0.05); transition: all 0.3s ease; } .nav-container { max-width: var(--max-width); margin: 0 auto; display: flex; justify-content: center; /* 居中对齐 */ padding: 0 20px; } .nav-list { display: flex; list-style: none; } .nav-link { display: block; padding: 20px 25px; color: var(--primary-red); font-weight: 500; font-size: 1.05rem; position: relative; } .nav-link::after { content: ''; position: absolute; bottom: 0; left: 50%; width: 0; height: 3px; background: var(--accent-gold); transform: translateX(-50%); transition: var(--transition); } .nav-link:hover::after, .nav-link.active::after { width: 60%; } /* --- Banner 区域 --- */ .banner { position: relative; height: 100vh; /* 100vh 占据整个屏幕高度 */ width: 100%; overflow: hidden; margin-bottom: 0; } .banner-image { width: 100%; height: 100%; object-fit: cover; transform: scale(1.05); transition: transform 10s ease; } /* 遮罩层 - 极轻微,保留图片原始设计 */ .banner-overlay { position: absolute; inset: 0; background: linear-gradient(to bottom, rgba(0, 0, 0, 0.05), rgba(0, 0, 0, 0.15)); } .banner-text { position: absolute; top: 55%; left: 50%; transform: translate(-50%, -50%); text-align: center; color: var(--text-light); width: 90%; z-index: 2; } /* 滚动指示器 - 修改到贴近屏幕底部 */ .scroll-indicator { position: absolute; bottom: 30px; /* 关键修改:更贴近浏览器底部 */ left: 50%; transform: translateX(-50%); width: 30px; height: 50px; border: 2px solid rgba(255,255,255,0.5); border-radius: 15px; animation: fadeUp 1s ease forwards 0.5s; } .scroll-indicator span { display: block; width: 6px; height: 6px; background: #fff; border-radius: 50%; margin: 8px auto; animation: scrollDot 2s infinite; } /* --- 通用区块样式 --- */ .main-content { max-width: var(--max-width); margin: 0 auto; padding: 80px 20px; position: relative; top: 0; z-index: 10; } .section { margin-bottom: 100px; background: var(--bg-white); padding: 60px; border-radius: 20px; box-shadow: var(--shadow-soft); } .section-header { text-align: center; margin-bottom: 50px; } .section-subtitle { display: block; color: var(--accent-gold); font-size: 0.9rem; letter-spacing: 3px; font-weight: 700; text-transform: uppercase; margin-bottom: 10px; } .section-title { color: var(--primary-red); font-size: 2.5rem; margin-bottom: 15px; } .title-divider { width: 60px; height: 3px; background: var(--accent-gold); margin: 0 auto; } /* --- 通知公告 --- */ .notice-container { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr); gap: 40px; align-items: stretch; } .carousel { position: relative; border-radius: var(--border-radius); overflow: hidden; box-shadow: var(--shadow-soft); aspect-ratio: 16/10; width: 100%; } .notice-list-wrapper { width: 100%; } .carousel-item { position: absolute; inset: 0; opacity: 0; transition: opacity 0.6s ease; } .carousel-item.active { opacity: 1; } .carousel-image { width: 100%; height: 100%; object-fit: cover; } .carousel-caption { position: absolute; bottom: 0; left: 0; right: 0; padding: 30px; background: linear-gradient(transparent, rgba(0,0,0,0.85)); color: #fff; } .carousel-caption h3 { font-size: 1.4rem; margin-bottom: 5px; } .carousel-caption p { font-size: 0.95rem; opacity: 0.9; } .carousel-control { background: rgba(255,255,255,0.2); backdrop-filter: blur(5px); border: none; color: var(--accent-gold); width: 45px; height: 45px; border-radius: 50%; cursor: pointer; position: absolute; top: 50%; transform: translateY(-50%); transition: var(--transition); } .carousel-control:hover { background: var(--primary-red); color: var(--accent-gold-bright); } .carousel-control.prev { left: 20px; } .carousel-control.next { right: 20px; } /* 列表优化 */ .notice-list { display: flex; flex-direction: column; gap: 20px; } .notice-item { display: flex; gap: 20px; padding-bottom: 20px; border-bottom: 1px solid #eee; transition: var(--transition); } .notice-item:last-child { border-bottom: none; } .notice-date-box { display: flex; flex-direction: column; align-items: center; justify-content: center; min-width: 80px; height: 80px; background: #fdfdfd; border: 1px solid #eee; border-radius: 8px; color: var(--primary-red); } .notice-date-box .day { font-size: 1.8rem; font-weight: 700; line-height: 1; } .notice-date-box .month { font-size: 0.75rem; color: #999; margin-top: 4px; } .notice-content { flex: 1; } .notice-title { font-size: 1.1rem; font-weight: 700; color: var(--text-dark); display: block; margin-bottom: 6px; line-height: 1.4; } .notice-title:hover { color: var(--primary-red); } .notice-desc { font-size: 0.9rem; color: var(--text-gray); } /* --- 活动卡片 --- */ .activities-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 30px; } .activity-card { background: rgba(255, 255, 255, 0.45); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); border-radius: var(--border-radius); overflow: hidden; transition: var(--transition); border: 1px solid rgba(255, 255, 255, 0.6); box-shadow: 0 8px 32px rgba(0, 0, 0, 0.06); } .activity-card:hover { transform: translateY(-10px); box-shadow: var(--shadow-hover); } .card-image { position: relative; height: 220px; overflow: hidden; } .card-image img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.5s ease; } .activity-card:hover .card-image img { transform: scale(1.1); } .card-date { font-size: 0.85rem; color: var(--text-gray); font-weight: 500; } .card-footer { display: flex; justify-content: space-between; align-items: center; } .card-content { padding: 25px; } .card-content h3 { font-size: 1.25rem; margin-bottom: 10px; color: var(--primary-red); } .card-content p { font-size: 0.95rem; color: var(--text-gray); margin-bottom: 15px; } .read-more { font-size: 0.9rem; font-weight: 600; color: var(--accent-gold); text-transform: uppercase; } /* --- 成果展示 (全新设计) --- */ .dark-bg { background: linear-gradient(135deg, #f7f0e6 0%, #faf6ef 50%, #f5ede0 100%); color: var(--text-dark); } .dark-bg .section-subtitle { color: var(--accent-gold); } .dark-bg .section-title { color: var(--primary-red); } .dark-bg .achievement-card { background: #fff; border: 1px solid rgba(196, 159, 96, 0.15); border-top: 4px solid var(--accent-gold); } .dark-bg .achievement-card:hover { background: #fff; border-top-color: var(--primary-red); box-shadow: var(--shadow-hover); } .dark-bg .achievement-info h3 { color: var(--text-dark); } .dark-bg .achievement-info p { color: var(--text-gray); } .achievements-container { display: grid; grid-template-columns: repeat(3, 1fr); gap: 30px; } .achievement-card { display: flex; flex-direction: column; align-items: center; padding: 40px 30px; background: #fff; border-top: 4px solid var(--accent-gold); /* 顶部金色强调线 */ border-radius: 8px; text-align: center; transition: var(--transition); box-shadow: 0 4px 15px rgba(0,0,0,0.03); min-height: 180px; justify-content: center; } .achievement-card:hover { border-top-color: var(--primary-red); /* 悬停变为红色 */ box-shadow: var(--shadow-hover); transform: translateY(-8px); } .achievement-icon { color: var(--accent-gold); margin-bottom: 25px; padding: 20px; background: var(--bg-page); border-radius: 50%; /* 圆形图标底槽 */ transition: var(--transition); display: flex; align-items: center; justify-content: center; } .achievement-card:hover .achievement-icon { color: #fff; background: var(--primary-red); /* 悬停填满红色 */ } .achievement-info h3 { font-size: 1.15rem; margin-bottom: 12px; color: var(--text-dark); } .achievement-info p { font-size: 0.9rem; color: var(--text-gray); line-height: 1.6; } /* --- 底部双栏布局 --- */ .dual-section { display: flex; gap: 30px; margin-bottom: 0; } .half-section { flex: 1; padding: 60px; border-radius: 20px; display: flex; flex-direction: column; justify-content: center; color: white; } .donation-bg { background: linear-gradient(135deg, #f9f0f0, #fdf5f5); color: var(--text-dark); } .donation-bg h2 { color: var(--primary-red); } .donation-bg .intro { color: var(--text-gray); opacity: 1; } .donation-bg .feature-item { color: var(--text-dark); } .contact-bg { background: #f5f5f5; color: var(--text-dark); } .contact-bg h2 { color: var(--primary-red); } .contact-bg .contact-details li { border-bottom-color: rgba(0,0,0,0.08); } .content-box h2 { font-size: 2rem; margin-bottom: 20px; } .content-box .intro { font-size: 1.1rem; opacity: 0.9; margin-bottom: 30px; } .feature-list { margin-bottom: 30px; } .feature-item { display: flex; align-items: center; gap: 10px; margin-bottom: 10px; } .contact-details { list-style: none; margin-bottom: 30px; } .contact-details li { margin-bottom: 10px; border-bottom: 1px solid rgba(255,255,255,0.1); padding-bottom: 10px; } .btn { display: inline-block; padding: 12px 30px; border-radius: 50px; font-weight: 600; text-align: center; width: fit-content; } .btn-primary { background: var(--primary-red); color: #fff; } .btn-primary:hover { background: var(--primary-red-light); } .btn-outline { border: 2px solid var(--primary-red); color: var(--primary-red); } .btn-outline:hover { background: var(--primary-red); color: #fff; } /* 查看更多按钮 */ .section-footer { text-align: center; margin-top: 60px; animation: fadeUp 0.8s ease forwards 0.3s; } .btn-more { display: inline-flex; align-items: center; gap: 8px; padding: 14px 40px; background: linear-gradient(135deg, var(--primary-red), var(--primary-red-light)); color: #fff; font-size: 1.05rem; font-weight: 600; border-radius: 50px; text-decoration: none; border: 2px solid var(--primary-red); transition: var(--transition); position: relative; overflow: hidden; } .btn-more::before { content: ''; position: absolute; top: 0; left: -100%; width: 100%; height: 100%; background: var(--accent-gold); z-index: -1; transition: var(--transition); } .btn-more:hover { border-color: var(--accent-gold); color: #fff; } .btn-more:hover::before { left: 0; } .btn-more span { transition: transform 0.3s ease; } .btn-more:hover span { transform: translateX(5px); } /* 成果展示专用深色按钮 */ .btn-more-dark { background: linear-gradient(135deg, var(--accent-gold), var(--accent-gold-bright)); color: var(--primary-red); border-color: var(--accent-gold); } .btn-more-dark::before { background: rgba(255,255,255,0.1); } .btn-more-dark:hover { border-color: #fff; color: #fff; } /* --- Footer --- */ .footer { background: #1a1a1a; color: #888; text-align: center; padding: 40px 0; margin-top: -20px; padding-top: 80px; } .footer-links a { margin: 0 10px; color: #aaa; } .footer-links a:hover { color: #fff; } /* --- 动画类 --- */ @keyframes fadeUp { from { opacity: 0; transform: translateY(30px); } to { opacity: 1; transform: translateY(0); } } @keyframes scrollDot { 0% { transform: translateY(0); opacity: 1; } 100% { transform: translateY(20px); opacity: 0; } } .scroll-animate { opacity: 0; transform: translateY(40px); transition: opacity 0.8s ease, transform 0.8s ease; } .scroll-animate.visible { opacity: 1; transform: translateY(0); } /* --- 响应式 --- */ @media (max-width: 992px) { .notice-container, .dual-section, .achievements-container { grid-template-columns: 1fr; flex-direction: column; } .main-title { font-size: 2.5rem; } .banner { height: 60vh; } .main-content { padding: 40px 20px; } .section { padding: 40px 30px; } } @media (max-width: 768px) { .main-title { font-size: 1.8rem; letter-spacing: 4px; } .main-subtitle { font-size: 1rem; letter-spacing: 1px; } .banner { height: 50vh; } .section { padding: 30px 20px; margin-bottom: 40px; border-radius: 12px; } .section-title { font-size: 1.8rem; } .main-content { padding: 30px 15px; } /* 导航栏横向滚动 */ .nav-list { overflow-x: auto; -webkit-overflow-scrolling: touch; } .nav-link { padding: 15px 16px; font-size: 0.95rem; white-space: nowrap; } /* 通知区域 */ .notice-container { grid-template-columns: 1fr; } .carousel { aspect-ratio: 16/9; } /* 活动卡片单列 */ .activities-grid { grid-template-columns: 1fr; } /* 成果卡片双列 */ .achievements-container { grid-template-columns: repeat(2, 1fr); gap: 15px; } .achievement-card { padding: 25px 15px; } /* 底部双栏变单列 */ .dual-section { flex-direction: column; gap: 15px; } .half-section { padding: 40px 25px; border-radius: 12px; } .btn-more { padding: 12px 30px; font-size: 0.95rem; } .section-footer { margin-top: 30px; } } @media (max-width: 480px) { .main-title { font-size: 1.4rem; letter-spacing: 2px; } .main-subtitle { font-size: 0.85rem; } .section-title { font-size: 1.5rem; } .achievements-container { grid-template-columns: 1fr; } .notice-item { flex-direction: column; gap: 10px; } .notice-date-box { flex-direction: row; min-width: auto; height: auto; padding: 8px 12px; gap: 8px; } .notice-date-box .day { font-size: 1.2rem; } .notice-date-box .month { margin-top: 0; } .carousel-caption h3 { font-size: 1.1rem; } .carousel-caption p { font-size: 0.85rem; } .carousel-control { width: 36px; height: 36px; } .content-box h2 { font-size: 1.5rem; } }