/* -----------------------------Base Styles----------------------------- */
:root {
	--primary: #0056b3;
	--secondary: #6c757d;
	--accent: #e63946;
	--light: #f8f9fa;
	--dark: #212529;
	--section-spacing: 2rem; /* changes space between descirption and contact us */
}
* {
	margin: 0;
	padding: 0;
	box-sizing: border-box;
	font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}
body {
	background-color: var(--light);
	color: var(--dark);
	line-height: 1.6;
	padding-bottom: 2rem;  /*changes space between end content and footer*/
}
body {
	margin-bottom: 0 !important;
	/* Force remove body margin */
}
img {
	max-width: 100%;
	height: auto;
	display: block;
}
/* -----------------------------Container & Layout----------------------------- */
.container {
	width: 90%;
	max-width: 1200px;
	margin: 0 auto;
	padding-top: 2rem;
}
section {
	margin-bottom: var(--section-spacing);
	padding-bottom: var(--section-spacing);
	border-bottom: 1px solid #ccc;
}
body {
	margin: 0;
	font-family: Arial, sans-serif;
}
.navbar-hero {
	position: relative;
	height: 100px;
	overflow: hidden;
	color: white;
}
.navbar-hero-bg {
	position: absolute;
	top: 0;
	left: 0;
	width: 100%;
	height: 100%;
	z-index: 0;
}
.hero-bg-image {
	width: 100%;
	height: 100%;
	object-fit: cover;
	opacity: 0.9;
}
.navbar-hero-bg::after {
	content: "";
	position: absolute;
	top: 0;
	left: 0;
	width: 100%;
	height: 100%;
	background: rgba(0, 0, 0, 0.3);
	z-index: 1;
	pointer-events: none;
}
.nav-content {
	position: relative;
	z-index: 2;
	display: flex;
	justify-content: space-between;
	align-items: center;
	height: 100%;
	padding: 0 20px;
	.nav-logo {
		display: flex;
		align-items: center;
		gap: 1rem;
	}
	.nav-logo img {
		height: 60px;
		width: auto;
	}
	
	.nav-logo .nfc-logo {
		width: 120px;
		/* adjust this to your preferred width */
		height: auto !important;
		/* override the 60px height */
		max-width: none;
		/* disables the global max-width constraint */
		margin-left: 1rem;
		/* space between UVic and NFC logos */
	}
	/* Mobile adjustment */
	@media (max-width: 768px) {
		.nav-logo .nfc-logo {
			width: 100px;
			/* Smaller on mobile */
		}
	}
	.nav-logo-text {
		text-decoration: none;
		color: white;
		font-weight: bold;
		font-size: 1.2rem;
	}
}
.nav-menu {
	display: flex;
	align-items: center;
}
.nav-menu ul {
	list-style: none;
	display: flex;
	gap: 1.5rem;
	margin: 0;
	padding: 0;
}
.nav-menu a {
	color: white;
	text-decoration: none;
	font-weight: bold;
	text-shadow: 0 1px 3px rgba(0, 0, 0, 0.5);
}
.nav-menu a:hover {
	text-decoration: underline;
}
/* -----------------------------Team Sections----------------------------- */
h2 {
	margin-bottom: 2rem;
	font-size: 2.2rem;
	color: var(--primary);
}
h3 {
	margin: 0.75rem 0;
}
/* Base team grid */
.team {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));
	gap: 2rem;
	margin-bottom: 2rem;
}
.team-member {
	text-align: center;
	background-color: white;
	padding: 1rem;
	border-radius: 6px;
	box-shadow: 0 2px 6px rgba(0, 0, 0, 0.05);
}
/* Target only faculty members' titles */
.team:first-of-type .team-member p {
	margin-top: 0.1rem;
	margin-bottom: 0;
	/* remove bottom margin */
	line-height: 1.2;
	/* tighter line spacing */
}
#postdocs-team {
	grid-template-columns: repeat(5, minmax(180px, 1fr));
	justify-content: center;
}
#postdocs-team .team-member {
	width: auto;
}
@media (max-width: 1200px) {
	#postdocs-team {
		grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
	}
}
@media (max-width: 900px) {
	#postdocs-team {
		grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
	}
}
/* Responsive adjustments */
@media (max-width: 600px) {
	.team-member img {
		width: 140px;
		height: 140px;
	}
}
@media (max-width: 600px) {
	.team {
		grid-template-columns: repeat(2, 1fr);
	}
}
@media (max-width: 400px) {
	.team {
		grid-template-columns: 1fr;
	}
}
/* -----------------------------Team Member Image Consistency----------------------------- */
.team-member img {
	width: 220px;
	/* fixed width */
	height: 220px;
	/* fixed height */
	object-fit: cover;
	/* ensures images fill the space without distortion */
	/* border-radius: 50%;  optional: makes images circular */
	margin: 0 auto;
	/* centers the image */
}
/* Adjust for smaller screens if needed */
@media (max-width: 600px) {
	.team-member img {
		width: 140px;
		height: 140px;
	}
}
.profile-container {
	display: flex;
	justify-content: space-between;
	align-items: flex-start;
	gap: 2rem;
	margin-top: 2rem;
	flex-wrap: wrap;
}
.profile-text {
	aboutflex: 1;
	min-width: 250px;
}
.profile-image {
	flex: 0 0 800px;
	/* fixed width to 500px */
}
.h2-container {
	margin-bottom: 1.5rem;
	font-size: 2.2rem;
	color: var(--primary);
}
.profile-image img {
	border-radius: 1rem;
	box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
	height: auto;
	display: block;
	max-width: 100%;
}
@media (max-width: 768px) {
	.profile-container {
		flex-direction: column;
		align-items: center;
		text-align: center;
	}
	.profile-text {
		text-align: left;
	}
}
/* -----------------------------Former Members Table----------------------------- */
.former-members {
	margin-top: 2rem;
	overflow-x: auto;
}
table {
	width: 100%;
	border-collapse: collapse;
	margin-bottom: 2rem;
}
th, td {
	padding: 0.75rem;
	text-align: left;
	border-bottom: 1px solid #ddd;
}
th {
	background-color: var(--primary);
	color: white;
	font-weight: bold;
}
tr:nth-child(even) {
	background-color: #f2f2f2;
}
tr:hover {
	background-color: #e9e9e9;
}
@media (max-width: 600px) {
	th, td {
		padding: 0.5rem;
		font-size: 0.9rem;
	}
}
/* -----------------------------About Section----------------------------- */
.simple-about {
	display: flex;
	gap: 1.5rem;
	align-items: center;
	margin: 0rem 0;
}
.about-text {
	flex: 1;
}
/* Reduce space between paragraphs in the intro */
.about-text p {
  margin-bottom: -0.5rem; /* Adjust this value as needed */
}

.about-image {
	flex: 1;
	margin-left: auto;
	/* pushes it to the far right */
}
.about-image img {
	width: 500px;
	max-width: 90%;
	height: auto;
	border-radius: 15px;
	box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
	transform: translateX(100px);
	/* moving it over to the right */
}
/* -----------------------------Bottom Contact Section ----------------------------- */
.bottom-contact {
	margin: 0rem 0 2rem 0;
	padding: 1rem;
	background: white;
	border-radius: 8px;
	box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
	border-top: 3px solid var(--primary);
}
.bottom-contact h2 {
	color: var(--primary);
	margin-bottom: 0.5rem;
	font-size: 2rem;
}
.contact-content p {
	margin-bottom: 1rem; /* changes space in the box */
	font-size: 1.1rem;
	line-height: 1.3;
	/* changing space between email, phone and address */
}
.contact-content strong {
	color: var(--dark);
	min-width: 80px;
	display: inline-block;
}
.simple-about {
	margin-bottom: 0rem;
	/* changing space between contact info and description */
}

.contact-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.8rem; /* adjusts the space between each email box */
  margin-bottom: 1.75rem;  /* changes space between email and address */
}

.contact-row div {
  flex: 1;
  min-width: 200px;
  background: #f8f9fa;
  padding: 0.7rem 0.7rem;
  border-radius: 6px;
  box-shadow: 0 1px 3px rgba(0,0,0,0.05);
}

.contact-row div span {
  word-break: break-all; /* allows email to break at any character */
}


/* Responsive adjustments */
@media (max-width: 768px) {
	.simple-about {
		flex-direction: column;
	}
	.about-text, .about-image {
		width: 100%;
	}
}
/* ----------------------------- Each Profile Section ----------------------------- */
.profile-section {
	padding: 2rem 0;
}
.profile-section h1 {
	font-size: 2.2rem;
	color: var(--primary);
	margin-bottom: 0.5rem;
}
.subtitle {
	font-size: 1.1rem;
	color: var(--secondary);
	margin-bottom: 2rem;
	display: block;
}
.profile-container {
	display: flex;
	gap: 3rem;
	align-items: flex-start;
}
.profile-text {
	flex: 1;
}
.profile-text p {
	margin-bottom: 1.2rem;
	line-height: 1.6;
}
.profile-image {
	flex: 0 0 300px;
	text-align: center;
}
.profile-image img {
	width: 100%;
	max-width: 300px;
	border-radius: 4px;
}
.research-label {
	margin-top: 0.5rem;
	font-style: italic;
	color: var(--secondary);
}
@media (max-width: 768px) {
	.profile-container {
		flex-direction: column;
	}
	.profile-image {
		order: -1;
		margin: 0 auto 2rem;
	}
}
@media (max-width: 768px) {
	.profile-container {
		flex-direction: column;
	}
	.profile-image {
		order: -1;
		margin: 0 auto 2rem;
	}
}
/* -----------------------------Projects Section ----------------------------- */
.projects-list {
    padding: 0 0;
}
.projects-list h1 {
    font-size: 2.2rem;
    color: var(--primary);
    margin-bottom: 2rem;
}

/* Project Divider Styles */
.project-divider {
      height: 1px;
      background-color: #ccc;
      margin: 2rem 0;
      width: 100%;
}

/* Hide divider for first project */
.projects-list .project-item:first-child .project-divider {
      display: none;
}

/* Footer border removal */
    footer {
      border-top: none;
    }

/* Projects Section Styles */
.projects-list {
  padding: 0;
}

.projects-list h1 {
  font-size: 2.2rem;
  color: var(--primary);
  margin-bottom: 2rem;
}

/* Project Item Styles */
.project-item {
  margin-bottom: 2rem;
}

.project-header h2 {
  font-size: 1.4rem;
  color: var(--primary);
  margin-bottom: 1rem;
}

/* project divider */
.project-divider {
  height: 1px;
  background-color: #ccc;
  margin: 2rem 0;
  width: 100%;
}

/* hide divider for first project */
.projects-list .project-item:first-child .project-divider {
  display: none;
}

/* Content Layout Styles */
.project-content-wrapper {
  display: flex;
  gap: 2rem;
  align-items: flex-start;
}

/* project image Styles */
.project-image {
  width: 300px;
  flex-shrink: 0;
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 4px 8px rgba(0,0,0,0.1);
}

.project-image img {
  width: 100%;
  height: auto;
  display: block;
}

/* Image Position Variations */
.project-image.left {
  order: 1;
}

.project-image.right {
  order: 2;
}

.project-image.right + .project-description {
  order: 1;
}

/* project description styles */
.project-description {
  order: 2;
  flex: 1;
}

.project-description p {
  line-height: 1.6;
  color: var(--dark);
}

/* footer Styles */
footer {
  border-top: none;
}

/* Responsive Styles */
@media (max-width: 768px) {
  .project-content-wrapper {
    flex-direction: column;
  }
  
  .project-image.left,
  .project-image.right {
    order: 1;
    width: 100%;
    max-height: 300px;
  }
  
  .project-description {
    order: 2 !important;
  }
}


/* Publications Section */
.publications {
	padding-top: 0;
  margin-top: 0;
}
.publications h1 {
	font-size: 2.2rem;
	/* Matching faculty-links h2 size */
	color: var(--primary);
	/* Same blue */
	text-align: left;
	/* Left-aligned */
	margin: 0 0 2rem 0;
	/* Same margin as faculty-links h2 */
	font-weight: bold;
	/* same weight (normal) */
	border-bottom: none;
}
.publications h1::after {
	display: none;
}
.publication-list {
	display: flex;
	flex-direction: column;
	gap: 2rem;
}
.publication-content {
	display: flex;
	align-items: flex-start;
	gap: 2.5rem;
	padding: 1.5rem;
	background-color: white;
	border-radius: 4px;
	border: 1px solid #eaeaea;
}
.publication-image {
	flex: 0 0 35%;
	max-width: 35%;
}
.publication-image img {
	width: 100%;
	height: auto;
	border-radius: 4px;
	border: 1px solid #f0f0f0;
}
.publication-text {
	flex: 1;
}
.publication-text h2 {
	font-size: 1.3rem;
	color: var(--dark);
	margin-bottom: 0.8rem;
	line-height: 1.4;
}
.publication-authors {
	color: var(--secondary);
	font-size: 1rem;
	margin-bottom: 0.5rem;
}
.publication-meta {
	margin-bottom: 1rem;
	font-size: 0.95rem;
	color: var(--secondary);
}
.publication-journal {
	font-style: italic;
}
.publication-link {
	display: inline-block;
	padding: 0.5rem 1rem;
	background: var(--primary);
	color: white;
	text-decoration: none;
	border-radius: 4px;
	font-size: 0.9rem;
	transition: background 0.2s ease;
}
.publication-link:hover {
	background: #004494;
}
/* alternating layout for publications */
.publication:nth-child(odd) .publication-content {
	flex-direction: row;
}
.publication:nth-child(even) .publication-content {
	flex-direction: row-reverse;
}
/* Responsive adjustments */
@media (max-width: 768px) {
	.publication-content {
		flex-direction: column !important;
		gap: 1.5rem;
	}
	.publication-image {
		flex: 1 1 100%;
		max-width: 100%;
	}
}
.publications {
	padding-bottom: 1rem;
}
.publication-list {
	gap: 1.5rem;
	margin-bottom: 0;
	padding-bottom: 0;
}
.publication:last-child {
	margin-bottom: 0;
	padding-bottom: 0;
}
.faculty-links {
	margin-top: 0.5rem;
	padding-top: 0;
	border-top: 1px solid transparent;
}
.faculty-links h2 {
	margin-top: 0;
	margin-bottom: 0rem;
}
/* faculty ADS Links Section - horizontal layout */
.faculty-links {
	margin-top: 0rem;
	/* adjusts space between "More Group Publications at the Links Below" and buttons*/
	padding-top: 0rem;
	border-top: none;
	text-align: center;
	width: 100%;
	overflow: hidden;
	/* contain the horizontal layout */
	border-top: none !important;
}
.faculty-links h2 {
	font-size: 1.8rem;
	color: var(--primary);
	margin-bottom: 2rem;
}
.faculty-buttons-container {
	display: flex;
	flex-direction: row;
	flex-wrap: nowrap;
	justify-content: center;
	align-items: center;
	gap: 1rem;
	padding: 0.5rem 0;
	width: 100%;
	overflow-x: auto;
	/* Enable horizontal scrolling if needed */
	-webkit-overflow-scrolling: touch;
}
.faculty-button {
	flex: 0 0 auto;
	/* prevent growing/shrinking */
	padding: 0.75rem 1.5rem;
	/* changes size of the button */
	background: var(--primary);
	color: white;
	text-decoration: none;
	border-radius: 3px;
	font-weight: 500;
	transition: all 0.2s ease;
	white-space: nowrap;
	display: inline-block;
	/* Additional display property */
}
.faculty-button:hover {
	background: #004494;
	transform: translateY(-2px);
}
/* ----------------------------- News Section ----------------------------- */
.news-section {
    padding: 0;
    margin-bottom: var(--section-spacing);
}

.news-section h1 {
    font-size: 2.2rem;
    color: var(--primary);
    margin: 0 0 2rem 0;
    padding-top: 0;
}

/* alternating news item layout */
.news-item {
    display: grid;
    grid-template-columns: 350px 1fr;
    gap: 2.5rem;
    align-items: flex-start;
}

.news-item.image-right {
    grid-template-columns: 1fr 350px;
}

.news-item.image-right .news-image {
    order: 2;
}

.news-item.image-right .news-content {
    order: 1;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .news-item,
    .news-item.image-right {
        grid-template-columns: 1fr;
    }
    
    .news-image,
    .news-item.image-right .news-image {
        order: 1;
    }
    
    .news-content,
    .news-item.image-right .news-content {
        order: 2;
    }
}

.news-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 0; /* remove gap since we're handling spacing with dividers */
}

.news-item {
    display: grid;
    grid-template-columns: 350px 1fr;
    gap: 2.5rem;
    align-items: flex-start;
    padding: 2rem 0; /* Add padding to top/bottom of each news item */
}

/* News Divider */
.news-divider {
    height: 1px;
    background-color: #eee;
    margin: 0; /* Remove top/bottom margin */
    width: 100%;
    grid-column: 1 / -1; /* Make divider span full width */
}

.news-image {
    height: 280px; /* Taller image area */
    width: 100%; /* Full width of grid column */
    overflow: hidden;
    border-radius: 8px; /* Slightly more rounded */
    box-shadow: 0 2px 8px rgba(0,0,0,0.1); /* Subtle shadow */
    transition: transform 0.3s ease;
}

.news-image:hover {
    transform: scale(1.02); /* Subtle hover effect */
}

.news-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
}

.news-content {
    padding: 0.25rem 0;
}

.news-date {
    color: var(--secondary);
    font-size: 0.95rem;
    margin-bottom: 0.75rem;
    font-weight: 500;
}

.news-item h2 {
    font-size: 1.5rem; /* Slightly larger */
    color: var(--primary);
    margin: 0 0 1.25rem 0;
    line-height: 1.4;
}

.news-item p {
    line-height: 1.7; 
    color: var(--dark);
    margin-bottom: 1rem;
}

/* Responsive adjustments */
@media (max-width: 900px) {
    .news-item {
        grid-template-columns: 300px 1fr; 
        gap: 2rem;
    }
    
    .news-image {
        height: 250px;
    }
}

@media (max-width: 768px) {
    .news-item {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
    
    .news-image {
        height: 300px; /* Taller on mobile */
        width: 100%;
    }
    
    .news-grid {
        gap: 3rem;
    }
}

@media (max-width: 480px) {
    .news-image {
        height: 250px;
    }
    
    .news-item h2 {
        font-size: 1.4rem;
    }
}
@media (max-width: 800px) {
	.news-item {
		grid-template-columns: 1fr;
	}
	.news-image {
		height: 200px;
	}
}
.back-link {
	display: inline-block;
	margin-top: 1rem;
	color: var(--primary);
	text-decoration: none;
}
.back-link:hover {
	text-decoration: underline;
}
/* make journal names italic */
.publication-journal {
	font-style: italic;
}
.former-members {
	overflow-x: auto;
}
/* Print styles */
@media print {
	.navbar, .footer {
		display: none;
	}
	body {
		font-size: 12pt;
		line-height: 1.5;
	}
}
/* -----------------------------Footer----------------------------- */
footer {
	background: white;
	border-top: 1px solid rgba(0,0,0,0.1);
	/* mo padding here, we'll control it in content */
	overflow: hidden;
	/* prevents margin collapse issues */
}
.footer-content {
	display: flex;
	align-items: center;
	justify-content: space-between;
	max-width: 1200px;
	margin: 0 auto;
	padding: 12px 1rem;
	/* Tight 12px vertical padding */
	box-sizing: border-box;
}
.footer-nfc-logo {
	width: 150px;
	height: auto;
	display: block;
	/* Fixes any inline spacing issues */
	margin: 0;  /* Remove all margins */
}
.footer-content p {
	margin: 0;
	padding: 0;
	line-height: 1;
}
@media (max-width: 768px) {
	.footer-content {
		flex-direction: column;
		padding: 10px 1rem;
		gap: 8px;
	}
}
/* smaller ADS Link */
.ads-link-small {
	display: inline-block;
	padding: 0.5rem 1rem;
	background: var(--primary);
	color: white;
	text-decoration: none;
	border-radius: 4px;
	font-size: 0.9rem;
	transition: background 0.2s;
	margin: 1rem 0;
}
.ads-link-small:hover {
	background: #004494;
}
section > h2:first-of-type {
	color: var(--primary) !important;
	font-size: 2.2rem;
}
