body {
  font-family: 'Arial', sans-serif;
  background-color: white;
  color: black;
  font-size: 14px;
  padding-top: 25px;
  padding-left: 25px;
  padding-right: 25px;
  margin: 0;
}

.floating-index-link {
  position: fixed;
  top: 25px;
  left: 25px;
  font-size: 14px;
  color: grey;
  text-decoration: none;
  z-index: 999;
  background: none;
  border: none;
  font-family: inherit;
  cursor: pointer;
}

.floating-index-link:hover {
  text-decoration: underline;
}

.floating-home-link {
  position: fixed;
  top: 25px;
  left: 50%;
  transform: translateX(-50%);
  font-size: 14px;
  color: grey;
  text-decoration: none;
  z-index: 999;
  background: none;
  border: none;
  font-family: inherit;
  cursor: pointer;
}

.floating-home-link:hover {
  text-decoration: underline;
}

.floating-next-link {
  position: fixed;
  top: 25px;
  right: 25px;
  font-size: 14px;
  color: grey;
  text-decoration: none;
  z-index: 999;
  background: none;
  border: none;
  font-family: inherit;
  cursor: pointer;
  display: block;
}

.floating-next-link:hover {
  text-decoration: underline;
}

a {
  color: grey;
  text-decoration: none;
}

a:visited {
  color: grey;
}

a:hover {
  text-decoration: underline; /* Optional */
}

a:active {
  color: grey;
}

.container {
  max-width: 100vw;
  margin: 0 0;
  padding: 1 0rem;
  box-sizing: border-box;
}

.content-container {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 2rem; /* Optional: space between text and image */
}

.left-text {
  width: 50vw;
}

.left-text i div {
  font-style: italic;
}

.right-image {
  width: 30vw;
}

.right-image img {
  width: 100%;
  height: auto;
  display: block;
}

.index-container {
  clear: both;
  max-width: 100vw;
  padding: 0;
  margin: 50px 0 0 0;
  box-sizing: border-box;
  width: 100%; /* Match content-container total width */
}

.main-wrapper {
  position: relative;
  margin-bottom: 50px; /* adds spacing to ensure index appears after image */
  min-height: calc(100px + (30vw * 0.75)); /* approx. height of image + top offset */
}

.index-line {
  display: grid;
  grid-template-columns: 15% 45% 25% 15%; /* Your requested percentages */
  padding: 0.25rem 0;
  gap: 0; /* Remove gap to control spacing manually */
  width: 100%;
}

.index-line span {
  text-align: left;
  padding-right: 1rem; /* Add some spacing between columns */
}

.project-index-header {
  text-decoration: underline;
}

.left {
  /* no flex-basis needed */ }
.center-left {
  font-style: italic; }
.center-right {
  text-align: left; /* Optional: override if you want right or center */ }

.index-line .right {
  text-align: right;
  padding-right: 0; /* Remove right padding on last column */
}

.project-page {
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 100%;
}

.project-content {
  width: 40%;
  text-align: center;
}

.project-title {
  font-size: 18px;
  text-align: left;
  margin-top: 0.75rem;
  margin-bottom: 0.75rem;
}

.project-title .title-main {
  font-size: 18px;
  font-style: normal;
}

.project-title .title-sub {
  font-size: 18px;
  font-style: italic;
  margin-top: 0.5rem;
  margin-bottom: 0.5rem;
}

.project-text {
  font-size: 14px;
  text-align: left;
  margin-bottom: 30px;
}

.project-text p {
  margin-bottom: 1.5em;
}

.project-text i div {
  margin: 0.25rem 0; /* ⬅️ vertical spacing: top and bottom */
  font-style: italic;
}

.project-image {
  width: 100%;
  display: block;
  padding: 0;  /* remove top and bottom padding */
  margin: 0 auto;
}

.project-image img {
  width: 100%;
  height: auto;
  display: block;
  margin: 0;
  padding: 1rem 0 0 0; /* Top padding only, no bottom padding */
  box-sizing: border-box;
}

/* Add top spacing for the first project image on desktop only */
@media screen and (min-width: 769px) {
  .project-content > .project-image:first-of-type {
    margin-top: 30px;
  }
}

/* New image caption styling */
.image-caption {
  font-family: 'Arial', sans-serif;
  font-size: 10px !important;
  color: grey !important;
  style: italic !important;
  text-align: left;
  margin-top: 0.5rem;
  margin-bottom: 1rem;
  line-height: 1.5;
}

.back-link-container {
  text-align: left;
  margin-top: 30px;
  margin-bottom: 3rem;
}

.back-link {
  all: unset;
  color: grey;
  font-size: 14px;
  cursor: pointer;
  text-decoration: none;
  font-family: inherit;
}

.back-link:hover {
  text-decoration: underline;
}

.pdf-container {
  margin: 20px 0;
  width: 100%;
  max-width: 100%;
}

.pdf-container embed,
.pdf-container object,
.pdf-container iframe {
  border: 1px solid #ddd;
  border-radius: 4px;
}

/* Image Gallery Styles */
.image-gallery {
    position: relative;
    width: 100%;
    margin: 30px 0;
}

.gallery-container {
    position: relative;
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.gallery-image {
    width: 100%;
    height: auto;
    display: block;
    max-width: 100%;
}

.gallery-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    font-size: 24px;
    color: grey;
    cursor: pointer;
    padding: 10px;
    z-index: 10;
    user-select: none;
}

.gallery-nav:hover {
    color: black;
}

.gallery-nav:focus {
    outline: none;
}

.gallery-nav.prev {
    left: 10px;
}

.gallery-nav.next {
    right: 10px;
}

.gallery-counter {
    text-align: center;
    font-size: 12px;
    color: grey;
    margin-top: 10px;
}

@media screen and (max-width: 768px) {
  .project-content {
    width: 100%;
    padding: 3rem 1rem;
  }

  .content-container {
    flex-direction: column-reverse !important;
  }

  .left-text,
  .right-image {
    width: 100% !important;
    padding: 3rem 0;
    box-sizing: border-box;
  }

  /* Mobile index layout: fixed positioning for consistent alignment */
  .index-line {
    display: grid;
    grid-template-columns: 26% 1fr auto; /* Left column takes 24%, center-left takes remaining, right takes minimal space */
    padding: 0.25rem 0;
    gap: 0; /* Remove gap to control spacing manually */
    width: 100%;
  }
  /* Hide the center-right column on mobile */
  .index-line .center-right {
    display: none;
  }
  /* Adjust column alignment for mobile */
  .index-line .left {
    text-align: left;
    padding-right: 1rem;
  }
  .index-line .center-left {
    text-align: left;
    padding-right: 1rem;
  }
  .index-line .right {
    text-align: right;
    padding-right: 0;
  }
  
}

