/* SVRI Professional Academic Website Styles */
:root {
    --primary-color: #1e3a5f;
    --secondary-color: #2c5aa0;
    --accent-color: #8b0000;
    --success-color: #0f5132;
    --warning-color: #b45309;
    --light-bg: #fbfcfd;
    --dark-bg: #1e3a5f;
    --text-color: #212529;
    --light-text: #495057;
    --border-color: #dee2e6;
    --shadow: 0 2px 15px rgba(0,0,0,0.08);
    --border-radius: 4px;
    --academic-blue: #003366;
    --research-gray: #f8f9fa;
    --professional-border: #adb5bd;
}

/* Base Reset */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Georgia', 'Times New Roman', serif;
    line-height: 1.7;
    color: var(--text-color);
    background: var(--light-bg);
    font-weight: 400;
    letter-spacing: 0.02em;
}

/* Layout Container */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Grid System */
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 2rem; align-items: center; }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 2rem; }
.grid-4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 2rem; }
.grid-6 { 
    display: grid; 
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); 
    gap: 2.5rem; 
    margin: 3rem 0;
    padding: 1rem 0;
}

/* Research Portfolio Section Enhancement */
.home-page .section[style*="background: var(--research-gray)"] {
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%) !important;
    position: relative;
    overflow: hidden;
}

.home-page .section[style*="background: var(--research-gray)"]::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: 
        radial-gradient(circle at 20% 80%, rgba(44,93,160,0.03) 0%, transparent 50%),
        radial-gradient(circle at 80% 20%, rgba(139,0,0,0.03) 0%, transparent 50%);
    pointer-events: none;
}

.home-page .section[style*="background: var(--research-gray)"] .container {
    position: relative;
    z-index: 1;
}

@media (max-width: 768px) {
    .grid-2, .grid-3, .grid-4, .grid-6 { 
        grid-template-columns: 1fr; 
        gap: 1rem; 
    }
    
    .small-card {
        padding: 2rem 1.5rem;
    }
    
    .resource-link {
        padding: 0.6rem 1.2rem;
        font-size: 0.8rem;
    }
}

/* =================
   Professional Academic Header System
   ================= */
header {
    background: white;
    color: var(--text-color);
    padding: 0;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    position: sticky;
    top: 0;
    z-index: 1000;
    border-bottom: 1px solid var(--border-color);
}

/* Force header consistency across ALL pages */
body header,
.home-page header,
.about-page header,
.research-page header,
.contact-page header,
.events-page header,
.global-initiatives-page header,
.resources-page header,
.training-page header,
.policy-page header {
    background: white !important;
    color: var(--text-color) !important;
}

/* Two-Tier Header Structure */
.header-content {
    display: flex;
    flex-direction: column;
    position: relative;
}

/* Top Header Bar - Contact/Quick Links */
.top-header {
    background: var(--primary-color);
    color: white;
    padding: 0.6rem 0;
    font-size: 0.8rem;
    border-bottom: 1px solid var(--accent-color);
}

.top-header .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.top-header-left, .top-header-right {
    display: flex;
    gap: 1.5rem;
}

.top-header a {
    color: white;
    text-decoration: none;
    transition: opacity 0.3s ease;
    font-size: 0.8rem;
}

.top-header a:hover {
    opacity: 0.8;
    text-decoration: underline;
}

/* Main Header - Logo and Navigation */
.main-header {
    background: white;
    padding: 1rem 0;
}

.main-header .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.logo img {
    height: 45px;
}

.logo h1 {
    font-size: 1.3rem;
    font-weight: 500;
    margin: 0;
    color: var(--primary-color);
    font-family: 'Georgia', serif;
    letter-spacing: 0.3px;
}

.logo p {
    font-size: 0.75rem;
    margin: 0;
    color: var(--light-text);
    font-style: italic;
    font-family: 'Georgia', serif;
}

/* Navigation Menu - Cleaned */

/* Professional Navigation Menu */
.main-nav {
    position: relative;
}

.main-nav ul {
    display: flex;
    gap: 0;
    margin: 0;
    padding: 0;
    list-style: none;
}

.main-nav li {
    position: relative;
}

.main-nav a {
    display: block;
    color: var(--text-color) !important;
    text-decoration: none;
    padding: 1rem 1.5rem;
    transition: all 0.3s ease;
    font-weight: 400;
    font-size: 0.9rem;
    background: transparent;
    white-space: nowrap;
    font-family: 'Georgia', serif;
    border-bottom: 3px solid transparent;
}

.main-nav a:hover {
    background: var(--light-bg) !important;
    color: var(--primary-color) !important;
    border-bottom-color: var(--secondary-color);
}

.main-nav a.active {
    background: var(--light-bg) !important;
    color: var(--primary-color) !important;
    border-bottom-color: var(--accent-color);
    font-weight: 500;
}

/* Dropdown Menus */
.main-nav .dropdown {
    position: relative;
}

.main-nav .dropdown-menu {
    position: absolute;
    top: 100%;
    left: 0;
    background: white;
    min-width: 220px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
    border: 1px solid var(--border-color);
    border-top: 2px solid var(--secondary-color);
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all 0.3s ease;
    z-index: 1000;
}

.main-nav .dropdown:hover .dropdown-menu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.main-nav .dropdown-menu a {
    padding: 0.8rem 1.2rem;
    border-bottom: none;
    border-left: 3px solid transparent;
    font-size: 0.85rem;
}

.main-nav .dropdown-menu a:hover {
    background: var(--light-bg);
    border-left-color: var(--secondary-color);
}

/* Mobile menu toggle */
.mobile-menu-toggle {
    display: none;
    flex-direction: column;
    cursor: pointer;
    gap: 4px;
    padding: 0.5rem;
    position: absolute;
    right: 0;
    top: 50%;
    transform: translateY(-50%);
    z-index: 1001;
}

.mobile-menu-toggle span {
    width: 25px;
    height: 3px;
    background: var(--primary-color);
    transition: 0.3s;
    border-radius: 2px;
}

/* Mobile responsive design */
@media (max-width: 1024px) {
    .main-nav ul {
        gap: 0.2rem;
    }
    
    .main-nav a {
        padding: 0.5rem 0.8rem;
        font-size: 0.85rem;
    }
}

@media (max-width: 768px) {
    .header-content {
        position: relative;
    }
    
    .main-nav ul {
        display: none;
        position: absolute;
        top: calc(100% + 20px);
        right: 0;
        background: #2c3e50;
        flex-direction: column;
        padding: 1rem;
        box-shadow: 0 5px 15px rgba(0,0,0,0.3);
        border-radius: 8px;
        min-width: 220px;
        border: 1px solid #34495e;
        z-index: 1000;
    }
    
    .main-nav ul.show {
        display: flex !important;
    }
    
    .main-nav li {
        width: 100%;
    }
    
    .main-nav a {
        padding: 0.8rem 1rem;
        border-radius: 4px;
        text-align: left;
        width: 100%;
        display: block;
    }
    
    .mobile-menu-toggle {
        display: flex;
    }
    
    .logo h1 {
        font-size: 1.2rem;
    }
    
    .logo p {
        font-size: 0.8rem;
    }
}

/* =================
   首页专用样式
   ================= */
.home-page .hero {
    background: linear-gradient(135deg, var(--academic-blue) 0%, var(--primary-color) 100%);
    color: white;
    padding: 5rem 0;
    position: relative;
    overflow: hidden;
    border-bottom: 4px solid var(--accent-color);
}

.home-page .hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('picture/Banner.jpg') center/cover;
    opacity: 0.15;
    z-index: 1;
}

.home-page .hero .container {
    position: relative;
    z-index: 2;
}

.home-page .hero h1 {
    font-size: 2.8rem;
    margin-bottom: 1.5rem;
    font-weight: 500;
    font-family: 'Georgia', serif;
    letter-spacing: 0.5px;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.3);
}

.home-page .hero .lead {
    font-size: 1.2rem;
    margin-bottom: 2rem;
    opacity: 0.95;
}

/* =================
   关于页面专用样式
   ================= */
.about-page .hero {
    background: linear-gradient(45deg, #8e44ad, #3498db);
    color: white;
    padding: 3rem 0;
}

.about-page .section {
    position: relative;
}

.about-page .section::before {
    content: '';
    position: absolute;
    left: 0;
    top: 50%;
    width: 4px;
    height: 80%;
    background: linear-gradient(to bottom, var(--secondary-color), var(--accent-color));
    transform: translateY(-50%);
}

.about-page .timeline {
    position: relative;
    padding-left: 3rem;
}

.about-page .timeline-item {
    position: relative;
    margin-bottom: 2rem;
    padding: 1.5rem;
    background: white;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow);
}

.about-page .timeline-item::before {
    content: '';
    position: absolute;
    left: -1.5rem;
    top: 50%;
    width: 15px;
    height: 15px;
    background: var(--secondary-color);
    border-radius: 50%;
    transform: translateY(-50%);
}

/* =================
   研究页面专用样式
   ================= */
.research-page .hero {
    background: linear-gradient(135deg, #27ae60, #2ecc71);
    color: white;
    padding: 3rem 0;
}

.research-page .research-filters {
    background: var(--light-bg);
    padding: 2rem 0;
    border-bottom: 1px solid var(--border-color);
}

.research-page .filter-tabs {
    display: flex;
    gap: 1rem;
    margin-bottom: 2rem;
    flex-wrap: wrap;
}

.research-page .filter-tab {
    padding: 0.75rem 1.5rem;
    background: white;
    border: 2px solid var(--border-color);
    border-radius: 25px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-weight: 500;
}

.research-page .filter-tab.active,
.research-page .filter-tab:hover {
    background: var(--secondary-color);
    color: white;
    border-color: var(--secondary-color);
    transform: translateY(-2px);
}

.research-page .research-card {
    background: white;
    border-radius: var(--border-radius);
    padding: 2rem;
    box-shadow: var(--shadow);
    transition: all 0.3s ease;
    border-left: 4px solid var(--secondary-color);
}

.research-page .research-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 5px 20px rgba(0,0,0,0.15);
}

/* =================
   通用组件样式
   ================= */
.section {
    padding: 4rem 0;
}

.section h2 {
    font-size: 2.2rem;
    margin-bottom: 1.5rem;
    color: var(--primary-color);
    text-align: center;
    font-family: 'Georgia', serif;
    font-weight: 500;
    letter-spacing: 0.5px;
    border-bottom: 2px solid var(--accent-color);
    padding-bottom: 0.5rem;
    display: inline-block;
    margin-left: 50%;
    transform: translateX(-50%);
}

.section .lead {
    font-size: 1.1rem;
    color: var(--light-text);
    text-align: center;
    margin-bottom: 3rem;
    max-width: 900px;
    margin-left: auto;
    margin-right: auto;
    font-style: italic;
    line-height: 1.8;
}

/* Professional Academic Cards */
.card {
    background: white;
    border-radius: var(--border-radius);
    padding: 2.5rem;
    box-shadow: var(--shadow);
    transition: all 0.3s ease;
    height: 100%;
    border: 1px solid var(--border-color);
    border-top: 4px solid var(--secondary-color);
}

.card:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(0,0,0,0.12);
    border-top-color: var(--accent-color);
}

.card h3 {
    color: var(--primary-color);
    margin-bottom: 1.2rem;
    font-size: 1.3rem;
    font-family: 'Georgia', serif;
    font-weight: 500;
    letter-spacing: 0.3px;
}

.card p {
    color: var(--light-text);
    margin-bottom: 1.2rem;
    line-height: 1.7;
    text-align: justify;
}

/* Modern Research Cards */
.small-card {
    background: linear-gradient(135deg, #ffffff 0%, #f8f9fa 100%);
    border-radius: 12px;
    padding: 2.5rem 2rem;
    box-shadow: 0 4px 20px rgba(0,0,0,0.08);
    text-align: left;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    border: 1px solid rgba(255,255,255,0.8);
    position: relative;
    height: 100%;
    overflow: hidden;
}

.small-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, var(--secondary-color), var(--accent-color), var(--primary-color));
    border-radius: 12px 12px 0 0;
}

.small-card::after {
    content: '';
    position: absolute;
    top: -50%;
    right: -50%;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle, rgba(44,93,160,0.05) 0%, transparent 70%);
    transform: scale(0);
    transition: transform 0.5s ease;
    pointer-events: none;
}

.small-card:hover {
    transform: translateY(-8px) scale(1.02);
    box-shadow: 0 15px 40px rgba(0,0,0,0.12);
    border-color: rgba(44,93,160,0.2);
}

.small-card:hover::after {
    transform: scale(1);
}

.small-card h4 {
    color: var(--primary-color);
    margin-bottom: 1.2rem;
    font-size: 1.15rem;
    font-family: 'Georgia', serif;
    font-weight: 600;
    letter-spacing: 0.3px;
    position: relative;
    display: flex;
    align-items: center;
    gap: 0.8rem;
}

.small-card h4::before {
    content: '';
    width: 12px;
    height: 12px;
    background: linear-gradient(45deg, var(--secondary-color), var(--accent-color));
    border-radius: 50%;
    box-shadow: 0 2px 8px rgba(44,93,160,0.3);
    transition: all 0.3s ease;
}

.small-card:hover h4::before {
    transform: scale(1.2);
    box-shadow: 0 4px 12px rgba(44,93,160,0.4);
}

.small-card p {
    color: var(--light-text);
    margin-bottom: 1.5rem;
    font-size: 0.9rem;
    line-height: 1.7;
    text-align: justify;
    position: relative;
}

/* Research Category Icons */
.small-card:nth-child(1) h4::before {
    background: linear-gradient(45deg, #e74c3c, #c0392b);
}

.small-card:nth-child(2) h4::before {
    background: linear-gradient(45deg, #f39c12, #e67e22);
}

.small-card:nth-child(3) h4::before {
    background: linear-gradient(45deg, #9b59b6, #8e44ad);
}

.small-card:nth-child(4) h4::before {
    background: linear-gradient(45deg, #27ae60, #229954);
}

.small-card:nth-child(5) h4::before {
    background: linear-gradient(45deg, #3498db, #2980b9);
}

.small-card:nth-child(6) h4::before {
    background: linear-gradient(45deg, #e67e22, #d35400);
}

/* 统计数字样式 */
.stats-grid {
    margin: 3rem 0;
}

.stat-item {
    text-align: center;
    padding: 2.5rem 1.5rem;
    background: white;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow);
    transition: all 0.3s ease;
    border: 1px solid var(--border-color);
    border-left: 4px solid var(--secondary-color);
}

.stat-item:hover {
    transform: translateY(-1px);
    box-shadow: 0 6px 20px rgba(0,0,0,0.1);
    border-left-color: var(--accent-color);
}

.stat-number {
    font-size: 2.8rem;
    font-weight: 600;
    color: var(--primary-color);
    margin-bottom: 0.5rem;
    font-family: 'Georgia', serif;
}

.stat-label {
    font-size: 1.1rem;
    font-weight: 500;
    color: var(--secondary-color);
    margin-bottom: 0.5rem;
    font-family: 'Georgia', serif;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.stat-item small {
    color: var(--light-text);
    font-size: 0.85rem;
    font-style: italic;
}

/* 按钮样式 */
.btn {
    display: inline-block;
    padding: 0.9rem 2.5rem;
    background: var(--secondary-color);
    color: white;
    text-decoration: none;
    border-radius: var(--border-radius);
    font-weight: 500;
    transition: all 0.3s ease;
    border: none;
    cursor: pointer;
    font-family: 'Georgia', serif;
    font-size: 0.95rem;
    letter-spacing: 0.5px;
    text-transform: uppercase;
}

.btn:hover {
    background: var(--primary-color);
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}

.btn-outline {
    background: transparent;
    color: var(--secondary-color);
    border: 2px solid var(--secondary-color);
}

.btn-outline:hover {
    background: var(--secondary-color);
    color: white;
    border-color: var(--secondary-color);
}

/* 高亮框样式 */
.highlight-box {
    background: linear-gradient(135deg, #f8f9fa, #e9ecef);
    border-left: 4px solid var(--secondary-color);
    padding: 1.5rem;
    border-radius: var(--border-radius);
    margin: 1.5rem 0;
}

.highlight-box h4 {
    color: var(--primary-color);
    margin-bottom: 1rem;
}

.highlight-box ul {
    margin-left: 1rem;
}

.highlight-box li {
    margin-bottom: 0.5rem;
    color: var(--text-color);
}

/* Modern Resource Links */
.resource-link {
    color: white;
    text-decoration: none;
    font-weight: 500;
    font-size: 0.85rem;
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    display: inline-flex;
    align-items: center;
    gap: 0.6rem;
    background: linear-gradient(45deg, var(--secondary-color), var(--primary-color));
    padding: 0.7rem 1.5rem;
    border-radius: 25px;
    box-shadow: 0 4px 15px rgba(44,93,160,0.3);
    position: relative;
    overflow: hidden;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    font-family: 'Georgia', serif;
}

.resource-link::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(45deg, rgba(255,255,255,0.1), transparent);
    transform: translateX(-100%);
    transition: transform 0.5s ease;
}

.resource-link::after {
    content: '→';
    font-size: 1rem;
    transition: all 0.3s ease;
    font-weight: bold;
}

.resource-link:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(44,93,160,0.4);
    color: white;
}

.resource-link:hover::before {
    transform: translateX(100%);
}

.resource-link:hover::after {
    transform: translateX(4px);
}

/* Category-specific link colors */
.small-card:nth-child(1) .resource-link {
    background: linear-gradient(45deg, #e74c3c, #c0392b);
    box-shadow: 0 4px 15px rgba(231, 76, 60, 0.3);
}

.small-card:nth-child(2) .resource-link {
    background: linear-gradient(45deg, #f39c12, #e67e22);
    box-shadow: 0 4px 15px rgba(243, 156, 18, 0.3);
}

.small-card:nth-child(3) .resource-link {
    background: linear-gradient(45deg, #9b59b6, #8e44ad);
    box-shadow: 0 4px 15px rgba(155, 89, 182, 0.3);
}

.small-card:nth-child(4) .resource-link {
    background: linear-gradient(45deg, #27ae60, #229954);
    box-shadow: 0 4px 15px rgba(39, 174, 96, 0.3);
}

.small-card:nth-child(5) .resource-link {
    background: linear-gradient(45deg, #3498db, #2980b9);
    box-shadow: 0 4px 15px rgba(52, 152, 219, 0.3);
}

.small-card:nth-child(6) .resource-link {
    background: linear-gradient(45deg, #e67e22, #d35400);
    box-shadow: 0 4px 15px rgba(230, 126, 34, 0.3);
}

/* Staggered Animation for Research Cards */
.small-card {
    opacity: 1;
    transform: translateY(0);
    animation: slideInUp 0.6s ease forwards;
}

.small-card:nth-child(1) { animation-delay: 0.1s; }
.small-card:nth-child(2) { animation-delay: 0.2s; }
.small-card:nth-child(3) { animation-delay: 0.3s; }
.small-card:nth-child(4) { animation-delay: 0.4s; }
.small-card:nth-child(5) { animation-delay: 0.5s; }
.small-card:nth-child(6) { animation-delay: 0.6s; }

@keyframes slideInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Pulse animation for card icons */
@keyframes iconPulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.1); }
}

.small-card h4::before {
    animation: iconPulse 3s ease-in-out infinite;
}

/* =================
   Professional Academic Footer
   ================= */
footer {
    background: linear-gradient(180deg, var(--primary-color) 0%, var(--academic-blue) 100%);
    color: white;
    padding: 4rem 0 1.5rem;
    margin-top: 5rem;
    border-top: 3px solid var(--accent-color);
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 3rem;
    margin-bottom: 2.5rem;
}

.footer-section h4 {
    margin-bottom: 1.5rem;
    color: #e9ecef;
    font-family: 'Georgia', serif;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    border-bottom: 1px solid var(--accent-color);
    padding-bottom: 0.5rem;
    font-size: 1rem;
}

.footer-section ul {
    list-style: none;
}

.footer-section ul li {
    margin-bottom: 0.8rem;
}

.footer-section a {
    color: #ced4da;
    text-decoration: none;
    transition: color 0.3s ease;
    font-size: 0.9rem;
}

.footer-section a:hover {
    color: white;
    text-decoration: underline;
}

.footer-section p {
    color: #ced4da;
    line-height: 1.7;
    font-size: 0.9rem;
}

.footer-bottom {
    text-align: center;
    padding-top: 1.5rem;
    border-top: 1px solid rgba(255,255,255,0.2);
    color: #adb5bd;
    font-style: italic;
}

@media (max-width: 768px) {
    .footer-content {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
}

/* =================
   特殊页面样式
   ================= */

/* 联系页面 */
.contact-page .hero {
    background: linear-gradient(135deg, #e74c3c, #c0392b);
    color: white;
    padding: 3rem 0;
}

.contact-form {
    background: white;
    padding: 3rem;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow);
    max-width: 600px;
    margin: 0 auto;
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 600;
    color: var(--primary-color);
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 0.75rem;
    border: 2px solid var(--border-color);
    border-radius: var(--border-radius);
    font-size: 1rem;
    transition: border-color 0.3s ease;
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--secondary-color);
}

/* 事件页面 */
.events-page .hero {
    background: linear-gradient(135deg, #9b59b6, #8e44ad);
    color: white;
    padding: 3rem 0;
}

.event-card {
    background: white;
    border-radius: var(--border-radius);
    padding: 2rem;
    box-shadow: var(--shadow);
    border-left: 4px solid var(--warning-color);
    margin-bottom: 2rem;
    transition: all 0.3s ease;
}

.event-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 5px 20px rgba(0,0,0,0.15);
}

.event-date {
    background: var(--warning-color);
    color: white;
    padding: 0.5rem 1rem;
    border-radius: var(--border-radius);
    font-weight: 600;
    display: inline-block;
    margin-bottom: 1rem;
}

/* 响应式设计增强 */
@media (max-width: 768px) {
    .hero h1 {
        font-size: 2rem !important;
    }
    
    .hero .lead {
        font-size: 1.1rem !important;
    }
    
    .section {
        padding: 2rem 0;
    }
    
    .section h2 {
        font-size: 2rem;
    }
    
    .card {
        padding: 1.5rem;
    }
    
    .stat-number {
        font-size: 2.5rem;
    }
}

/* 动画效果 */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.fade-in-up {
    animation: fadeInUp 0.6s ease-out;
}

/* 加载动画 */
.loading {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid var(--border-color);
    border-top: 3px solid var(--secondary-color);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* 工具提示 */
.tooltip {
    position: relative;
    display: inline-block;
}

.tooltip::after {
    content: attr(data-tooltip);
    position: absolute;
    bottom: 125%;
    left: 50%;
    transform: translateX(-50%);
    background: var(--dark-bg);
    color: white;
    padding: 0.5rem;
    border-radius: var(--border-radius);
    font-size: 0.8rem;
    white-space: nowrap;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
}

.tooltip:hover::after {
    opacity: 1;
}

/* 滚动指示器 */
.scroll-indicator {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 4px;
    background: var(--light-bg);
    z-index: 9999;
}

.scroll-progress {
    height: 100%;
    background: linear-gradient(90deg, var(--secondary-color), var(--accent-color));
    transition: width 0.1s ease;
} 

/* =================
   图片质量修复 - 替换模糊和不合适的图片
   ================= */

/* 隐藏质量差的图片，显示专业的替代内容 */
img[src*="global2.jpg"],
img[src*="mrc2.jpg"],
img[src*="wits.jpg"] {
    display: none !important;
}

/* Resources页面 - Hero section 图片替换 */
.resources-page .hero .grid-2 > div:last-child {
    background: linear-gradient(135deg, #3498db, #2980b9);
    border-radius: 8px;
    padding: 3rem;
    color: white;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    min-height: 300px;
    position: relative;
    overflow: hidden;
}

.resources-page .hero .grid-2 > div:last-child::before {
    content: "";
    width: 60px;
    height: 60px;
    background: rgba(255,255,255,0.2);
    border: 2px solid rgba(255,255,255,0.4);
    border-radius: 50%;
    margin: 0 auto 1.5rem;
    display: block;
}

.resources-page .hero .grid-2 > div:last-child::after {
    content: "SVRI Research Database\A6,000+ Studies • 160+ Countries\A25 Years of Evidence Building\AWorldwide Research Network";
    white-space: pre-line;
    font-size: 1.1rem;
    font-weight: 500;
    line-height: 1.8;
    text-shadow: 0 1px 3px rgba(0,0,0,0.3);
}

/* About页面 - Timeline 图片替换 */
.about-page .timeline-item .grid-2 > div:has(img[src*="wits.jpg"]) {
    background: linear-gradient(135deg, #8e44ad, #9b59b6);
    border-radius: 8px;
    padding: 2rem;
    color: white;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    min-height: 250px;
}

.about-page .timeline-item:first-child .grid-2 > div:has(img[src*="wits.jpg"])::before {
    content: "";
    width: 50px;
    height: 50px;
    background: var(--secondary-color);
    border-radius: 4px;
    margin: 0 auto 1rem;
    display: block;
}

.about-page .timeline-item:first-child .grid-2 > div:has(img[src*="wits.jpg"])::after {
    content: "South African Medical Research Council\AEstablished 1999\AGlobal Leader in Violence Research\AInstitutional Excellence";
    white-space: pre-line;
    font-size: 1rem;
    font-weight: 500;
    line-height: 1.6;
    text-shadow: 0 1px 2px rgba(0,0,0,0.3);
}

/* 为其他时间轴项目添加合适的图标 */
.about-page .timeline-item:nth-child(3) .grid-2 > div:last-child {
    background: linear-gradient(135deg, #27ae60, #2ecc71);
    border-radius: 8px;
    padding: 2rem;
    color: white;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    min-height: 250px;
}

.about-page .timeline-item:nth-child(3) .grid-2 > div:last-child::before {
    content: "";
    width: 50px;
    height: 50px;
    background: var(--accent-color);
    border-radius: 50%;
    margin: 0 auto 1rem;
    display: block;
}

.about-page .timeline-item:nth-child(3) .grid-2 > div:last-child::after {
    content: "Global Partnership Network\A8,000+ Members Worldwide\AMulti-Sectoral Collaboration\AEvidence-Based Impact";
    white-space: pre-line;
    font-size: 1rem;
    font-weight: 500;
    line-height: 1.6;
    text-shadow: 0 1px 2px rgba(0,0,0,0.3);
}

.about-page .timeline-item:nth-child(4) .grid-2 > div:last-child {
    background: linear-gradient(135deg, #e74c3c, #c0392b);
    border-radius: 8px;
    padding: 2rem;
    color: white;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    min-height: 250px;
}

.about-page .timeline-item:nth-child(4) .grid-2 > div:last-child::before {
    content: "";
    width: 50px;
    height: 50px;
    background: linear-gradient(45deg, var(--secondary-color), var(--primary-color));
    border-radius: 4px;
    margin: 0 auto 1rem;
    display: block;
}

.about-page .timeline-item:nth-child(4) .grid-2 > div:last-child::after {
    content: "Future Innovation\ADigital Transformation\AClimate & Violence Research\AGlobal Scale Impact";
    white-space: pre-line;
    font-size: 1rem;
    font-weight: 500;
    line-height: 1.6;
    text-shadow: 0 1px 2px rgba(0,0,0,0.3);
}

/* 通用图片质量改进 */
img {
    image-rendering: -webkit-optimize-contrast;
    image-rendering: crisp-edges;
}

/* 为低质量图片添加滤镜改善 */
img[src*=".jpg"]:not([src*="logo"]):not([src*="Logo"]) {
    filter: contrast(1.1) brightness(1.05) saturate(1.1);
    transition: filter 0.3s ease;
}

img[src*=".jpg"]:not([src*="logo"]):not([src*="Logo"]):hover {
    filter: contrast(1.2) brightness(1.1) saturate(1.2);
}

/* Research页面图片优化 */
.research-page .hero img[src*="prevention2.jpg"] {
    filter: contrast(1.2) brightness(1.1) saturate(1.2) !important;
    border: 3px solid rgba(255,255,255,0.3);
}

/* 首页图片优化 */
.home-page .hero img {
    filter: contrast(1.1) brightness(1.05) saturate(1.1);
    border-radius: 12px !important;
    box-shadow: 0 8px 25px rgba(0,0,0,0.15);
}

/* Contact页面图片优化 */
.contact-page .hero img {
    filter: contrast(1.15) brightness(1.08) saturate(1.15);
}

/* 响应式调整 */
@media (max-width: 768px) {
    .resources-page .hero .grid-2 > div:last-child::before,
    .about-page .timeline-item .grid-2 > div::before {
        font-size: 3rem;
    }
    
    .resources-page .hero .grid-2 > div:last-child::after,
    .about-page .timeline-item .grid-2 > div::after {
        font-size: 0.9rem;
    }
} 