:root {
    --primary: #0d47a1;
    --primary-light: #5472d3;
    --primary-dark: #002171;
    --secondary: #4a148c;
    --secondary-light: #7c43bd;
    --secondary-dark: #12005e;
    --text-light: #f5f5f5;
    --text-dark: #212121;
    --background: #f8f9fa;
    --light-gray: #e0e0e0;
}

body {
    font-family: 'Lato', sans-serif;
    color: var(--text-dark);
    background-color: var(--background);
    line-height: 1.6;
}

h1, h2, h3, h4, h5, h6, .fancy-title {
    font-family: 'Playfair Display', serif;
    font-weight: 600;
}

/* Navigation */
.navbar {
    background-color: white;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    padding: 1rem 2rem;
}

.navbar-brand {
    font-family: 'Playfair Display', serif;
    font-weight: 700;
    font-size: 1.5rem;
    color: var(--primary-dark);
}

.nav-link {
    color: var(--text-dark);
    font-weight: 500;
    margin: 0 0.5rem;
    position: relative;
    transition: all 0.3s ease;
}

.nav-link:hover {
    color: var(--primary);
}

.nav-link::after {
    content: '';
    position: absolute;
    width: 0;
    height: 2px;
    bottom: 0;
    left: 0;
    background-color: var(--primary);
    transition: width 0.3s ease;
}

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

/* Hero Section */
.hero {
    background-color: white;
    padding: 4rem 0;
    margin-top: 2rem;
}

.profile-img {
    width: 100%;
    border-radius: 5px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
    transition: transform 0.3s ease;
}

.profile-img:hover {
    transform: scale(1.02);
}

.social-icons a {
    color: var(--primary);
    margin: 0 0.5rem;
    transition: all 0.3s ease;
}

.social-icons a:hover {
    color: var(--primary-dark);
    transform: translateY(-3px);
}

.position-list {
    list-style: none;
    padding-left: 0;
}

.position-list li {
    padding: 0.5rem 0;
    border-bottom: 1px solid var(--light-gray);
}

.position-list li:last-child {
    border-bottom: none;
}

/* Section Headers */
.section-header {
    position: relative;
    padding: 3rem 0;
    margin-bottom: 2rem;
    background-color: var(--primary);
    color: white;
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

.section-header::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: url('img/mri-interstitial.png');
    background-size: cover;
    background-position: center;
    opacity: 0.2;
    z-index: 0;
}

.section-title {
    position: relative;
    z-index: 1;
    font-size: 2.5rem;
    font-weight: 700;
    text-align: center;
}

/* Content Section */
.content-section {
    background-color: white;
    padding: 3rem;
    margin-bottom: 3rem;
    border-radius: 5px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
}

/* News Section */
.news-item {
    padding: 1.5rem;
    margin-bottom: 1.5rem;
    border-radius: 5px;
    transition: all 0.3s ease;
    border-left: 4px solid var(--primary);
    background-color: rgba(13, 71, 161, 0.03);
}

.news-item:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.05);
}

.news-img {
    max-width: 80px;
    max-height: 80px;
    margin-right: 1rem;
    object-fit: contain;
}

.news-date {
    color: var(--secondary);
    font-weight: 600;
}

/* Media Gallery */
.gallery {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    grid-gap: 1.5rem;
    margin-top: 2rem;
}

.gallery-item {
    position: relative;
    overflow: hidden;
    border-radius: 5px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    height: 250px;
    transition: all 0.3s ease;
}

.gallery-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.15);
}

.gallery-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.gallery-item:hover .gallery-image {
    transform: scale(1.05);
}

.gallery-caption {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.7), transparent);
    color: white;
    padding: 1rem;
    transform: translateY(100%);
    transition: transform 0.3s ease;
}

.gallery-item:hover .gallery-caption {
    transform: translateY(0);
}

/* Footer */
.footer {
    background-color: var(--primary-dark);
    color: var(--text-light);
    padding: 3rem 0;
    margin-top: 3rem;
}

.footer a {
    color: var(--light-gray);
    transition: color 0.3s ease;
}

.footer a:hover {
    color: white;
    text-decoration: none;
}

/* Animations */
.animate-in {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.6s ease, transform 0.6s ease;
}

.animate-in.visible {
    opacity: 1;
    transform: translateY(0);
}

/* Responsive adjustments */
@media (max-width: 992px) {
    .navbar {
        padding: 1rem;
    }
    
    .hero {
        padding: 2rem 0;
    }
    
    .section-header {
        padding: 2rem 0;
    }
    
    .section-title {
        font-size: 2rem;
    }
    
    .content-section {
        padding: 2rem;
    }
}

@media (max-width: 768px) {
    .profile-img {
        margin-bottom: 2rem;
    }
    
    .social-icons {
        margin-bottom: 2rem;
    }
    
    .gallery {
        grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    }
}

/* Add additional styles for the hidden news items */
        .hidden-news {
            display: none;
            transition: all 0.3s ease;
        }
        
        .hidden-news.show {
            display: block;
            animation: fadeIn 0.5s;
        }
        
        @keyframes fadeIn {
            from { opacity: 0; }
            to { opacity: 1; }
        }
        
        /* Uniform size for affiliations section */
        #news .news-item {
            margin-bottom: 1.25rem;
            padding: 1rem;
            border-radius: 0.25rem;
            border: 1px solid #f0f0f0;
            height: 100%;
            background-color: #fcfcfc;
            box-shadow: 0 1px 3px rgba(0,0,0,0.05);
        }
        
        #news .news-img {
            width: 70px;
            height: 50px;
            object-fit: contain;
            margin-right: 1rem;
        }
        
        #news h4 {
            font-size: 1.1rem;
            margin-bottom: 0.4rem;
            font-weight: 600;
        }
        
        #news p {
            font-size: 0.95rem;
            margin-bottom: 0.4rem;
            line-height: 1.4;
        }
        
        #news .news-date {
            font-size: 0.9rem;
            font-style: italic;
            color: #0d6efd;
            font-weight: 500;
        }
        
        #news .col-md-6 {
            margin-bottom: 1rem;
        }