* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

/* Add overscroll-behavior to prevent white background overscroll in Firefox */
html {
  background-color: #333;
}
body {
  background-color: #fff;
}
body {
  font-family: Arial, sans-serif;
  line-height: 1.6;
  font-size: 16px;
}

header {
  background-color: #333;
  color: #fff;
  padding: 1rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  position: relative;
  height: 6rem;
}

h1 {
  font-size: 1.25rem;
  margin: 0;
  text-align: center;
  white-space: nowrap;
}

.logo {
  width: 4.0rem;
  height: auto;
  object-fit: contain;
  margin-bottom: 0.0rem;
}

.bgu-logo {
  width: auto;
  max-height: 3.5rem;
  object-fit: contain;
  position: absolute;
  top: 50%;
  right: 1rem;
  transform: translateY(-50%);
}

@media (min-width: 769px) and (max-width: 1024px) {
  .bgu-logo {
    max-height: 3.0rem;
  }
}


.content {
  margin: 0 auto;
  max-width: 1200px;
  padding: 1rem;
}

.lab-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
}

nav {
  background-color: #555;
  display: flex;
  justify-content: space-around;
  padding: 1rem 0;
}

nav a {
  color: #fff;
  text-decoration: none;
}

nav a:hover {
  background-color: #333;
  color: #ffd700;
  text-decoration: underline;
}

section {
  padding: 2rem;
}

h2 {
  margin-bottom: 1rem;
}

.member {
  display: flex;
  align-items: center;
  margin-bottom: 2.0rem; /* increase the margin between member elements */
}

.member-img {
  width: 100px;
  height: 100px;
  object-fit: cover;
  border-radius: 50%;
  margin-right: 1rem;
}

footer {
  background-color: #333;
  color: #fff;
  padding: 1rem;
  text-align: center;
}

.member-info {
  display: flex;
  flex-direction: column;
  justify-content: center; /* vertically center align nested elements */
}

.member h3 {
  margin-bottom: 0.0rem; /* decrease the margin-bottom of the heading */
  font-size: 1.25rem;
}


.member p {
  margin-bottom: 0; /* remove the margin-bottom of the paragraph */
  font-size: 1rem;
  color: #555;
}

.member .social-icons {
  margin-top: 0.0rem; /* add a margin-top to separate social icons from paragraph */
}

  .member .social-icons a, .ai.ai-google-scholar-square, .ai.ai-semantic-scholar-square {
    color: #555;
    font-size: 1.25rem;
    text-decoration: none;
    display: inline-block;
    width: 1.25rem;
    height: 1.25rem;
    text-align: center;
    line-height: 1.25rem;
    margin-right: 0.5rem;
  }

.member .email {
  margin-top: 0.0rem; /* add a margin-top to separate email and social icons */
}

.member .email a {
  color: #555;
  text-decoration: none;
  display: inline-block;
  margin-right: 0.3ch;
  margin-left: 0.09rem;
}

.member .social-icons a:hover, .member .email a:hover {
  color: #333;
}

.publication-details .social-icons a {
  color: #555;
  font-size: 0.85rem;
  text-decoration: none;
  display: inline-block;
  width: 0.85rem;
  height: 0.85rem;
  vertical-align: baseline;
  line-height: 1rem;
  margin-left: 0.15rem;
}

.publication-details .publication-entry, .social-icons  img {
color: #555;
  text-decoration: none;
  display: inline-block;
  height: 0.75rem;
  text-align: center;
  margin-left: 0.15rem;
  vertical-align: baseline;
  filter: grayscale(100%);
}

.thumbnail {
  height: 12rem;
  width: auto;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1), 0 1px 3px rgba(0, 0, 0, 0.08);
  object-fit: cover;
  margin-right: 20px;
}

.thumbnail-container figure {
  padding: 0;
  margin: 0;
  display: inline-block;
  width: 12rem;
  margin-right: 20px;
}

.thumbnail-container figcaption {
  display: block;
  font-size: 10px;
  font-style: italic;
  word-wrap: break-word;
}

.publication-entry {
  display: flex;
  align-items: center;
  width: 100%;
  margin-bottom: 2.0rem;
}

.publication-comment {
  font-size: 0.9rem;
  color: #555;
}

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

li {
  margin-bottom: 20px;
}

a {
  color: #1a0dab;
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

table {
  width: 100%;
  border-collapse: collapse;
}

tr {
  border-bottom: 1px solid #ddd;
}

.resources-section h2 {
  margin-bottom: 0.0rem;
}


.project {
  display: flex;
  align-items: center;
  margin-bottom: 20px;
}

.project-image {
  max-width: 30%;
  margin-right: 20px;
  height: auto;
}


.project-details {
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  align-self: flex-end; /* align project details to the bottom of the image */
}

.project-title {
  margin: 0 0 10px 0;
}

.project-link {
  margin: 0 0 10px 0;
}

.project-comments {
  margin: 0;
}

/* Alumni and Affiliated Students styling - with icons on the left as bullets */
/* Affiliated Students and Undergraduate Researchers as subsections of Team */
.affiliated-students-container, .undergraduate-researchers-container {
  margin-top: 2.5rem;
  margin-bottom: 0.5rem;
  border-top: 1px solid #eee;
  padding-top: 1.5rem;
  padding-left: 1rem;
}

.affiliated-students-container h3, .undergraduate-researchers-container h3 {
  font-size: 1.3rem;
  margin-bottom: 0.5rem;
  color: #444;
}

.alumni-member, .affiliated-member {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline; /* Align icon with text baseline */
  margin-bottom: 0.75rem;
  color: #555;
  line-height: 1.3;
}

.undergraduate-member {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  margin-bottom: 0.75rem;
  color: #555;
  line-height: 1.3;
}

.alumni-member strong, .affiliated-member strong, .undergraduate-member strong {
  margin-right: 0.25rem;
  margin-left: 0.15rem;
}

.alumni-member .social-icons,
.affiliated-member .social-icons {
  display: inline-flex;
  margin-right: 0.3ch; /* Match spacing to envelope/email */
  order: -1; /* Places the icons before the text */
  min-width: 1.25rem; /* Ensures consistent width for the icon column */
}

.undergraduate-member .bullet-icon {
  display: inline-flex;
  margin-right: 0.3ch; /* Match spacing to envelope/email */
  order: -1;
  min-width: 1.25rem;
  align-items: center;
}

.alumni-member .social-icons a,
.affiliated-member .social-icons a {
  color: #555;
  font-size: 1.25rem;
  text-decoration: none;
}

.undergraduate-member .bullet-icon i {
  color: #777;
  font-size: 1rem;
}

.alumni-member .social-icons a:hover,
.affiliated-member .social-icons a:hover {
  color: #333;
}

#openings {
  background-color: #ffffcc;
  padding: 2rem;
}

.comment {
  font-size: 0.9rem;
  color: #555;
}

.info-label {
  min-width: 100px; /* Replace the 'width' property with 'min-width' to ensure enough space for the strong element */
}

.contact-info {
  margin-top: 20px;
  line-height: 1.5;
}

.contact-info p {
  margin-bottom: 5px;
  display: flex; /* Add display: flex; to align the content on the same line */
}

.contact-info strong {
  display: inline-block;
  min-width: 100px; /* Use min-width instead of width to ensure enough space for the strong element */
}

.phone-info {
  display: inline; /* Add display: inline; to keep the phone number on the same line as the "Landline" text */
}


/* This is the media query for the mobile version of the website. */
@media screen and (max-width: 768px) {
  /* Stack header elements vertically */

  header {
    flex-direction: column;
    height: auto;
    padding: 1rem 0;
  }

  /* Move the university logo above the lab logo */
  .bgu-logo {
    order: -1;
  }

  .lab-container {
    position: static;
    transform: none;
  }

  .bgu-logo {
    position: static;
    max-height: 3rem;
    margin: 1rem auto;
    transform: none;
  }

  /* Improve nav bar */
  nav {
    flex-direction: column;
    padding: 0;
  }

  nav a {
    padding: 0.5rem 1rem;
    display: block;
    border-bottom: 1px solid #777;
  }

  /* Adjust the last nav item's border */
  nav a:last-child {
    border-bottom: none;
  }

  /* Adjust team members display */
  .member {
    flex-direction: column;
    align-items: center;
    margin-bottom: 1.5rem;
    text-align: center;
  }

  .member-img {
    margin-right: 0;
    margin-bottom: 1rem;
    margin-left: auto;
    margin-right: auto;
    display: block;
  }
  
  .member-info {
    align-items: center;
    width: 100%;
    text-align: center;
  }

  .publication-entry {
    flex-direction: column;
  }

  /* Adjust project display */
  /* Project section */
.project {
  display: flex;
  align-items: center;
  margin-bottom: 20px;
  padding: 10px;
  }

  .project-image {
  max-width: 30%;
  margin-right: 20px;
  height: auto;
  }

  .project-details {
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  align-self: flex-end; /* align project details to the bottom of the image */
  }

  .project-title {
  margin: 0 0 10px 0;
  }

  .project-link {
  margin: 0 0 10px 0;
  }

  .project-comments {
  margin: 0;
  }
}

@media screen and (max-width: 768px) {
  /* Increase font size for better readability */
  body {
    font-size: 16px;
  }

  /* Adjust headings font size */
  h1 {
    font-size: 2rem;
  }

  h2 {
    font-size: 1.5rem;
  }

  h3 {
    font-size: 1.25rem;
  }

  /* Adjust form elements */
  input[type="text"],
  input[type="email"],
  textarea,
  select {
    font-size: 1rem;
  }
}

@media screen and (max-width: 768px) {
  /* Add some padding to the content container */
  .content {
    max-width: 100%; /* Set max-width to 100% for mobile devices */
    padding-left: 2vw; /* Use viewport units for padding */
    padding-right: 2vw;
  }

  section {
    padding: 0.5rem;
  }

  /* Center align elements */
  .text-center {
    text-align: center;
  }

  /* Adjust grid layouts for columns */
  .grid-2,
  .grid-3 {
    display: grid;
    grid-template-columns: 1fr;
    grid-gap: 1.5rem;
  }

  /* Adjust the footer layout */
  footer {
    flex-direction: column;
    align-items: center;
  }

  footer a {
    display: block;
    margin-bottom: 0.5rem;
  }
}

@media screen and (max-width: 768px) {
  /* Make images responsive */
  img {
    max-width: 100%;
    height: auto;
  }

  /* Adjust video and iframe elements */
  video,
  iframe {
    max-width: 100%;
  }
}

@media screen and (max-width: 768px) {
  /* Increase spacing between paragraphs and other block elements */
  p,
  ul,
  ol,
  blockquote,
  pre,
  figure {
    margin-bottom: 1.5rem;
  }
}

@media screen and (max-width: 768px) {
  /* Update the line-height for improved readability */
  body {
    line-height: 1.8;
  }

  /* Increase font size for small text */
  small {
    font-size: 0.9rem;
  }
}


@media screen and (max-width: 768px) {
  /* Narrow screens */
  .main-title {
    font-size: 1.5rem;
  }
}

@media screen and (max-width: 480px) {
  /* Narrow screens */
  .main-title {
    font-size: 1.25rem;
  }
}

@media screen and (max-width: 768px) {
  .thumbnail {
    width: 100%;
    max-height: 75vh;
    margin-right: 0;
    margin-top: 1.0rem;
    object-fit: contain; /* ensures the image is not cropped */
  }
}

@media screen and (max-width: 768px) {
  /* Adjust project display for narrow screens */
  .project {
    flex-direction: column;
  }

  .project-image {
    max-width: 100%;
    margin-right: 0;
    margin-bottom: 20px;
    max-height: 80vh;
  }

  .project-details {
    align-self: auto;
  }
  
  /* Mobile alumni, affiliated members, and undergrad layout - maintain icon on left */
  .alumni-member, .affiliated-member, .undergraduate-member {
    gap: 0.25rem;
    justify-content: flex-start;
    text-align: left;
  }
  
  /* Subsection containers mobile styling */
  .affiliated-students-container, .undergraduate-researchers-container {
    padding-left: 0.5rem;
    margin-top: 2rem;
  }
}
