@import url('https://fonts.googleapis.com/css2?family=Montserrat:wght@400;700&family=Roboto:wght@400;500&display=swap');

html {
    overflow-y: scroll;
}

body {
    font-family: 'Roboto', sans-serif;
    line-height: 1.8;
    margin: 0;
    padding: 0;
    background: #f8f9fa;
    color: #343a40;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

.parallax-bg {
    background-image: url('https://images.unsplash.com/photo-1554147090-e1221a04a025?ixlib=rb-1.2.1&auto=format&fit=crop&w=1950&q=80');
    background-attachment: fixed;
    background-position: center;
    background-repeat: no-repeat;
    background-size: cover;
}

header {
    background: #ffffff;
    color: #343a40;
    padding: 1rem 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid #dee2e6;
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.logo img {
    height: 50px;
    margin-left: 20px;
}

nav ul {
    padding: 0;
    list-style: none;
    margin: 0;
}

nav ul li {
    display: inline;
    margin: 0 15px;
}

nav a {
    color: #343a40;
    text-decoration: none;
    font-weight: 500;
    padding: 10px 15px;
    border-radius: 5px;
    transition: background-color 0.3s ease, color 0.3s ease;
}

nav a:hover {
    background-color: #ff69b4;
    color: #fff;
}

nav a.active {
    background-color: #8a2be2;
    color: #fff;
}

main {
    padding: 40px 20px;
    flex-grow: 1;
    display: flex; /* Enable flexbox for main content */
    justify-content: center; /* Center content */
}

.container {
    max-width: 1200px; /* Consistent max-width for main content */
    width: 100%; /* Ensure it takes full width up to max-width */
    margin: 0 auto; /* Center the container */
}

section {
    background: #ffffff;
    margin: 0 auto 30px auto;
    padding: 40px;
    border-radius: 15px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
    max-width: 1200px; /* This will be overridden by .container for consistency */
    opacity: 0;
    transform: translateY(20px);
    animation: fadeInUp 0.5s forwards;
}

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

h1, h2, h3 {
    font-family: 'Montserrat', sans-serif;
}

h1 {
    color: #8a2be2;
}

#hero {
    text-align: center;
    border-bottom: none;
    box-shadow: none;
    background: none;
}

#news ul {
    list-style-type: none;
    padding: 0;
}

#news li {
    background: #e9ecef;
    margin-bottom: 10px;
    padding: 15px;
    border-radius: 5px;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

#news li:hover {
    transform: translateY(-5px);
    box-shadow: 0 6px 12px rgba(0,0,0,0.15);
}

.btn {
    display: inline-block;
    background: #8a2be2;
    color: #fff;
    padding: 10px 20px;
    text-decoration: none;
    border-radius: 5px;
    transition: background 0.3s ease;
}

.btn:hover {
    background: #ff69b4;
}

.timeline {
    position: relative;
    max-width: 900px;
    margin: 0 auto;
}

.timeline::before {
    content: '';
    position: absolute;
    left: 20px;
    top: 0;
    bottom: 0;
    width: 2px;
    background: #dee2e6;
}

.timeline-item {
    position: relative;
    margin-bottom: 50px;
}

.timeline-icon {
    position: absolute;
    left: 0;
    top: 0;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: #8a2be2;
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    transform: translateX(-50%);
    left: 20px;
}

.timeline-date {
    position: absolute;
    left: 60px;
    top: 10px;
    font-weight: 500;
    color: #8a2be2;
}

.timeline-content {
    margin-left: 60px;
    padding-top: 10px;
    position: relative;
    background: #fff;
    padding: 25px;
    border-radius: 10px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.05);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
}

.timeline-item:hover .timeline-content {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(0,0,0,0.1);
}

.timeline-content::before {
    content: '';
    position: absolute;
    left: -20px;
    top: 20px;
    width: 20px;
    height: 2px;
    background: #dee2e6;
}

.timeline-main-content {
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}

.timeline-content p {
    margin: 0;
}

.blog-post {
    display: flex;
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 4px 8px rgba(0,0,0,0.1);
    overflow: hidden;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    transform: scale(1);
}

.blog-post:hover {
    transform: scale(1.03);
    box-shadow: 0 6px 12px rgba(0,0,0,0.15);
}

.blog-post-image {
    flex: 1;
}

.blog-post-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.blog-post-content {
    flex: 2;
    padding: 30px;
}

.conference-logo {
    max-width: 150px;
    margin-top: 20px;
}

.member {
    border-bottom: 1px solid #dee2e6;
    padding-bottom: 20px;
    margin-bottom: 20px;
}

.member:last-child {
    border-bottom: none;
}

.members-container {
    display: flex;
    max-width: 1200px; /* Consistent max-width for all pages */
    margin: 0 auto;
    gap: 30px;
    align-items: flex-start; /* Align items to the top */
}

.members-nav {
    flex: 0 0 200px; /* Reduced width for navigation */
    background: #ffffff;
    padding: 25px; /* Increased padding */
    border-radius: 15px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
    position: sticky;
    top: 100px; /* Adjust based on header height */
    align-self: flex-start; /* Stick to the top of the container */
    border: 1px solid #e0e0e0; /* Subtle border */
}

.members-nav h3 {
    color: #8a2be2;
    margin-top: 0;
    border-bottom: 2px solid #8a2be2;
    padding-bottom: 10px;
    margin-bottom: 20px;
    font-size: 1.4rem; /* Larger heading */
}

.members-nav ul {
    list-style: none;
    padding: 0;
}

.members-nav li {
    margin-bottom: 12px; /* Increased spacing */
}

.members-nav a {
    text-decoration: none;
    color: #343a40;
    font-weight: 500;
    padding: 8px 10px; /* Add padding for clickable area */
    display: block; /* Make the whole area clickable */
    border-radius: 8px; /* Rounded corners for links */
    transition: background-color 0.3s ease, color 0.3s ease, transform 0.2s ease;
}

.members-nav a:hover {
    background-color: #f0f0f0; /* Light background on hover */
    color: #ff69b4;
    transform: translateX(5px); /* Slight slide effect */
}

#members-content {
    flex-grow: 1;
    background: #ffffff;
    padding: 40px;
    border-radius: 15px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
    border: 1px solid #e0e0e0; /* Subtle border */
}

.members-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr); /* Adjusted for 4 members per row */
    gap: 20px; /* Reduced gap for tighter fit */
    margin-bottom: 30px;
    align-items: stretch; /* Ensure cards in the same row have equal height */
}

.professors-grid {
    display: flex; /* Use flexbox for centering */
    justify-content: center; /* Center the items horizontally */
    flex-wrap: wrap; /* Allow items to wrap to the next line */
    gap: 20px; /* Maintain the gap between cards */
}

.member-card {
    background: #fff;
    border-radius: 15px;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.08);
    transition: transform 0.4s ease, box-shadow 0.4s ease;
    padding: 25px; /* Equal padding on all sides */
    border: 1px solid #f0f0f0;
    display: flex; /* Use flexbox for internal alignment */
    flex-direction: column; /* Stack items vertically */
    align-items: center; /* Center items horizontally within the card */
    position: relative; /* Add relative positioning for the badge */
}

.member-card:hover {
    transform: translateY(-10px) scale(1.03);
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.12);
}

.member-card img {
    width: 150px; /* Fixed width for consistency */
    height: 150px; /* Fixed height for square consistency */
    display: block; /* Ensure margin auto works */
    margin: 0 auto 15px auto; /* Center image horizontally and reduce bottom margin */
    border-radius: 15px; /* Smoothen the corners */
    object-fit: cover; /* Maintain aspect ratio and cover the area */
    border: 4px solid #fff;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
}

.professors-grid .member-card img {
    height: auto;
    aspect-ratio: 1/1; /* Make professor images square */
}

.member-info {
    padding: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center; /* Center all text content within member-info */
}

.member-info h3 {
    margin: 0 0 5px 0;
    font-size: 1.1rem; /* Slightly smaller font for names */
    text-align: center; /* Center the name text */
    width: 100%; /* Ensure the heading takes full width to center text */
}

.member-info h3 a {
    text-decoration: none;
    color: #8a2be2;
    transition: color 0.3s ease;
}

.member-info h3 a:hover {
    color: #ff69b4;
}

.member-info p {
    font-size: 0.85rem; /* Slightly smaller font for descriptions */
    color: #666;
    line-height: 1.4;
    margin-bottom: 5px;
}

.member-info p a {
    color: #2575fc;
    text-decoration: none;
    font-weight: 500;
}

.member-info p a:hover {
    text-decoration: underline;
}

.member-info p small {
    font-size: 0.8rem;
    color: #999;
    display: block;
    margin-top: 10px;
}

.research-interests {
    font-size: 0.9rem;
    color: #555;
    margin: 5px 0 10px 0;
    text-align: center;
}

.member-links {
    margin-top: 10px;
    display: flex;
    gap: 10px;
    justify-content: center; /* Center the icons horizontally */
    align-items: center; /* Vertically align icons if they have different heights */
}

.member-links a {
    color: #8a2be2;
    font-size: 1.2em;
    transition: color 0.3s ease;
}

.member-links a:hover {
    color: #ff69b4;
}

.webmaster-badge {
    position: absolute;
    top: 10px;
    right: 10px;
    background-color: #28a745;
    color: #fff;
    padding: 5px 10px;
    border-radius: 5px;
    font-size: 0.8rem;
    font-weight: bold;
    z-index: 1;
}

.logo-designer-badge {
    position: absolute;
    top: 10px;
    right: 10px;
    background-color: #8a2be2;
    color: #fff;
    padding: 5px 10px;
    border-radius: 5px;
    font-size: 0.8rem;
    font-weight: bold;
    z-index: 1;
}

.lab-manager-badge {
    position: absolute;
    top: 10px;
    left: 10px;
    background-color: gold;
    color: #000;
    padding: 5px 10px;
    border-radius: 5px;
    font-size: 0.8rem;
    font-weight: bold;
    z-index: 1;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.member-card.has-badge:hover .lab-manager-badge {
    opacity: 1;
}

.member-actions {
    text-align: right;
    margin-top: 15px;
}

.btn-modify, .btn-add-member {
    background-color: #8a2be2;
    color: #fff;
    border: none;
    padding: 8px 12px;
    border-radius: 5px;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

.btn-modify:hover, .btn-add-member:hover {
    background-color: #ff69b4;
}

.add-member-action {
    text-align: center;
    margin-top: 20px;
}

.publication-category {
    margin-bottom: 30px;
}

.publication-category h3 {
    border-bottom: 2px solid #8a2be2;
    padding-bottom: 10px;
    margin-bottom: 20px;
    color: #8a2be2;
}

.publication-category .timeline {
    margin-top: 30px;
}

.publication-logo {
    flex-shrink: 0;
    margin-left: 20px;
}

.publication-logo img {
    max-width: 100px;
    max-height: 50px;
}

.publication-links {
    display: flex;
    align-items: center;
    gap: 20px;
    margin-top: 10px;
}

.icon-link {
    color: #8a2be2;
    text-decoration: none;
    font-weight: 500;
    transition: color 0.3s ease;
}

.icon-link:hover {
    color: #ff69b4;
}

.icon-link i {
    margin-right: 5px;
}

.citation-count {
    color: #6c757d;
    font-size: 0.9em;
}

.citation-count i {
    margin-right: 5px;
}

footer {
    background: #fff;
    padding: 20px 20px;
}

.footer-logo img {
    height: 40px;
    margin: 0 10px;
}

.footer-links a {
    margin: 0 15px;
    color: #343a40;
    text-decoration: none;
    font-weight: 500;
}

.social-media a {
    margin: 0 10px;
    color: #343a40;
    font-size: 20px;
}

.footer-main {
    display: flex;
    justify-content: space-between;
    align-items: center;
    max-width: 1200px;
    margin: 0 auto;
    padding-top: 10px;
    /* border-top: 1px solid #dee2e6; */
    font-size: 14px;
    color: #6c757d;
}

.contact-content {
    display: flex;
    flex-wrap: wrap;
    gap: 30px;
    justify-content: center;
    align-items: flex-start;
}

.contact-content > div {
    flex: 1;
    min-width: 300px; /* Adjust as needed for responsiveness */
}

.map-container {
    height: 400px; /* Fixed height for the map */
    overflow: hidden;
    border-radius: 15px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
}

#charts {
    display: flex;
    gap: 10px;
    margin-bottom: 20px;
}

.chart-container {
    flex: 1;
    background: #ffffff;
    padding: 10px;
    border-radius: 15px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.05);
    height: 350px;
    display: flex;
    align-items: center;
    justify-content: center;
}

#pieChart {
    max-height: 300px;
}
