@font-face {
  font-family: "Söhne Buch";
  src: url("/fonts/Söhne/TestSöhne-Buch.otf") format("opentype");
  font-weight: normal;
  font-style: normal;
}
@import url("https://cdn.jsdelivr.net/npm/@fancyapps/ui/dist/fancybox.css");
@media (min-width: 1024px) {
  .project-intro {
    margin-left: auto !important;
    margin-right: auto !important;
    max-width: 1200px;
    width: 100%;
    box-sizing: border-box;
    display: flex !important;
    flex-direction: row !important;
    align-items: center !important;
    justify-content: center !important;
    text-align: left !important;
    gap: 32px;
  }
  .project-intro .project-title {
    margin: 0;
    padding: 0 16px 0 0;
    white-space: nowrap;
    display: inline-block;
  }
  .project-intro .project-meta {
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: row;
    gap: 24px;
    font-size: 1em;
    font-weight: normal;
  }
  .project-intro .project-meta p {
    margin: 0;
    padding: 0;
    display: inline-block;
  }
}
.project-intro,
.project-columns {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  width: 100%;
  box-sizing: border-box;
}
/** PROJECT COPY CSS **/

/* Remove Archivo import */
/* @import url("https://fonts.googleapis.com/css2?family=Archivo:wght@400;700&display=swap"); */ /* <-- Remove this line */

/* =========================
   FONT: NEUE MONTREAL REGULAR
   ========================= */
@font-face {
  font-family: "Neue Montreal";
  src: url("/fonts/PPNeueMontreal-Regular.woff2") format("woff2"),
    url("/fonts/PPNeueMontreal-Regular.woff") format("woff");
  font-weight: 400;
  font-style: normal;
}
@font-face {
  font-family: "Neue Montreal";
  src: url("/fonts/PPNeueMontreal-Light.woff2") format("woff2"),
    url("/fonts/PPNeueMontreal-Light.woff") format("woff");
  font-weight: 300;
  font-style: normal;
}

/* =========================
   GLOBAL STYLES
   ========================= */
html,
body {
  margin: 0;
  padding: 0;
  height: 100%;
  font-family: "Neue Montreal", Arial, Helvetica, sans-serif;
  font-size: 14px;
  line-height: 1.5;
  background: #f8f9fa; /* Light offwhite background */
  color: #444; /* Semi gray text color */
  overflow-x: hidden;
  display: flex;
  flex-direction: column;
}

/* =========================
   GLOBAL LINK STYLES
   ========================= */
a {
  color: #444;
  text-decoration: none;
  transition: color 0.2s;
}

a:hover {
  color: #888;
}

/* =========================
   HEADER & NAVIGATION
   ========================= */
header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 15px;
  border-bottom: 1px solid #e0e0e0;
  position: sticky;
  top: 0;
  background: #f8f9fa;
  z-index: 1000;
  font-family: inherit;
  color: inherit;
}

.logo {
  font-weight: bold;
  text-decoration: none;
  color: #b94a48; /* Muted red color - keep logo different */
  font-family: inherit;
}

.logo img {
  width: 40px;
  height: 40px;
  object-fit: contain;
  display: block;
}

nav {
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  font-family: inherit;
}

nav a {
  margin: 0 10px;
  text-decoration: none;
  color: #444;
  transition: color 0.2s;
  font-family: inherit;
  font-weight: bold;
}

nav a:hover {
  color: #888;
}

.date-container {
  text-align: right;
  font-family: inherit;
  color: inherit;
}

.line {
  border-top: 1px solid #000;
  width: 100vw;
  margin: 0;
  position: relative;
  left: 50%;
  transform: translateX(-50%);
}

/* =========================
   MAIN & FOOTER
   ========================= */
main {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 0;
  padding: 0 15px;
  font-family: inherit;
  color: inherit;
}

footer {
  border-top: 1px solid #000;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  padding: 10px 15px;
  color: #444;
  font-family: inherit;
}

/* =========================
   HERO IMAGE
   ========================= */
.hero-image {
  margin-top: 15px;
}

.hero-image img {
  width: 100%;
  height: auto;
  display: block;
  object-fit: cover;
  margin: 0;
}

/* =========================
   PROJECT INTRO
   ========================= */
.project-intro {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  text-align: left;
  margin: 20px 0;
  padding: 0;
  color: #444;
  font-family: inherit;
}

@media (min-width: 1024px) {
  .project-intro .project-title {
    font-size: 3.5em;
    font-weight: 500;
    white-space: nowrap;
    display: inline-block;
    margin: 0;
    padding: 0 16px 0 0;
  }
  .project-info .project-title {
    font-weight: 500;
  }
}

.project-meta {
  display: flex;
  justify-content: flex-start;
  align-items: center;
  gap: 20px;
  font-family: inherit;
}

.project-meta p {
  margin: 0;
  font-size: 1rem;
  font-family: inherit;
}

/* =========================
   PROJECT COLUMNS & ROWS
   ========================= */
.project-columns {
  display: flex;
  flex-direction: column;
  gap: 20px;
  margin-top: 30px;
}

.project-row {
  display: flex;
  gap: 20px;
}

.left-column,
.right-column {
  flex: 1;
}

.left-column {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

/* =========================
   PROJECT SECTIONS
   ========================= */
.project-section {
  border: none;
  padding: 0;
  margin-top: 0;
  flex: 1;
  margin-bottom: 40px;
  background: transparent;
  color: #444;
  font-family: inherit;
}

.project-section h2 {
  margin: 40px 0 10px 0; /* Add consistent top margin for spacing */
  padding: 0;
  font-family: inherit;
  font-size: 1.5em;
  font-weight: 700;
}

.project-section h2:first-of-type {
  margin-top: 0; /* Remove top margin from first h2 */
}

.project-section p {
  margin: 0 0 15px 0;
  padding: 0;
  font-family: inherit;
}

/* =========================
   PROJECT IMAGES
   ========================= */
.project-image {
  display: grid;
  grid-template-rows: auto auto;
  justify-items: center;
  gap: 10px;
  padding-bottom: 30px;
  background: transparent;
  color: #444;
  font-family: inherit;
}

.project-image img {
  width: 100%;
  height: auto;
  max-width: 600px;
  max-height: none;
  object-fit: unset;
  border: none;
  cursor: pointer;
  transition: opacity 0.3s ease, transform 0.3s ease;
}

.project-image img:hover {
  opacity: 0.8;
  transform: scale(1.02);
}

/* =========================
   ADDITIONAL IMAGES
   ========================= */
.additional-images {
  display: flex;
  justify-content: center;
  gap: 10px;
  width: 100%;
  max-width: 600px; /* Match the max-width of project-image img */
  margin-bottom: 40px; /* Add 20px space to the bottom */
}

.additional-images img {
  max-width: 100%;
  height: auto;
  object-fit: contain;
  display: block;
  border: none;
  cursor: pointer;
  transition: opacity 0.3s ease, transform 0.3s ease;
}

.additional-images img:hover {
  opacity: 0.8;
  transform: scale(1.05);
}
.spaced-img {
  margin-bottom: 40px; /* or margin-right for horizontal spacing */
}

/* =========================
   PROJECT NAVIGATION
   ========================= */
.project-nav {
  display: flex;
  justify-content: space-between;
  width: 100%;
  padding: 10px 0 0;
  box-sizing: border-box;
  margin-bottom: 20px;
}

.project-nav button {
  background: #000;
  color: #fff;
  border: none;
  border-radius: 50%;
  width: 50px;
  height: 50px;
  font-size: 24px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0.8;
  transition: opacity 0.2s;
  font-family: inherit;
}

.project-nav button:hover {
  opacity: 1;
}

/* =========================
   DESCRIPTION & SOCIAL LINKS
   ========================= */
.description-section {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  padding: 8px 15px;
  gap: 15px;
  font-family: inherit;
}

.social-links {
  display: flex;
  gap: 10px;
  align-items: center;
}

.social-links a {
  display: inline-block;
  width: 30px;
  height: 30px;
}

.social-links svg {
  width: 100%;
  height: 100%;
}

.description {
  text-align: right;
  max-width: 300px;
  margin-left: auto;
  font-family: inherit;
}

/* =========================
   PROJECT CONTAINER (INDEX)
   ========================= */
.project-container {
  display: flex;
  flex-direction: column;
  width: 100%;
}

.project {
  display: flex;
  justify-content: flex-start;
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 15px 0;
  gap: 0;
}

.project img {
  width: 50vw;
  height: calc(50vw * 2 / 3);
  object-fit: cover;
  display: block;
  cursor: pointer;
  transition: opacity 0.3s ease, transform 0.3s ease;
}

.project img:hover {
  opacity: 0.8;
  transform: scale(1.01);
}

.project-info {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  padding-left: 15px;
  max-width: 50%;
  font-family: inherit;
}

.project-title {
  font-size: 3em;
  margin-bottom: 10px;
  font-family: inherit;
  line-height: 1.1;
}

.project-desc {
  font-size: 13px;
  margin: 0;
  font-family: inherit;
}

@media (min-width: 769px) {
  .project-desc {
    max-width: 400px; /* Limit width to 150px for tighter wrapping */
    word-wrap: break-word;
    overflow-wrap: break-word;
  }
}

/* =========================
   ABOUT PAGE
   ========================= */
.about-intro {
  display: flex;
  justify-content: flex-start;
  margin: 40px 0;
  gap: 50px;
}

.about-left {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 10px;
  flex: 0 0 auto;
}

.about-image img {
  width: 300px;
  height: auto;
  border-radius: 0;
}

.about-text,
.about-text h1,
.about-text p,
.about-text a {
  font-size: 13px;
  line-height: 1;
}

.about-text a {
  text-decoration: none;
  color: #444;
  font-weight: normal;
}

.about-text a:hover {
  color: #888;
}

.about-right {
  display: flex;
  gap: 50px;
  flex: 1;
}

.column {
  display: flex;
  flex-direction: column;
  gap: 40px;
  flex: 1;
}

.about-section h2 {
  font-size: 1.8rem;
  margin-bottom: 15px;
  font-family: inherit;
}

.about-section ul {
  list-style: none;
  padding: 0;
}

.about-section li {
  margin-bottom: 20px;
}

.about-section li h3 {
  font-size: 1rem;
  margin: 0 0 5px 0;
  font-weight: normal;
  font-family: inherit;
}

.about-section li p {
  margin: 0;
  font-size: 1rem;
  font-family: inherit;
}

/* =========================
   LIGHTBOX
   ========================= */
#lightbox {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(0, 0, 0, 0.9);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9999;
}

#lightbox-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: transparent;
  cursor: pointer;
}

#lightbox-content {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 90%;
  max-width: 800px;
}

#lightbox-img {
  max-width: 80vw;
  max-height: 80vh;
  background: #fff;
  border-radius: 4px;
}

#lightbox-close {
  position: absolute;
  top: -40px;
  right: 0;
  background: none;
  color: #fff;
  border: none;
  font-size: 2rem;
  cursor: pointer;
}

#lightbox-prev,
#lightbox-next {
  background: none;
  color: #fff;
  border: none;
  font-size: 2rem;
  cursor: pointer;
  margin: 0 20px;
  opacity: 0.8;
  transition: opacity 0.2s;
}
#lightbox-prev:hover,
#lightbox-next:hover {
  opacity: 1;
}

/* =========================
   WIDOW PREVENTION
   ========================= */

/* Apply to all text elements */
p,
h1,
h2,
h3,
h4,
h5,
h6,
li {
  orphans: 2;
  widows: 2;
  word-wrap: break-word;
  overflow-wrap: break-word;
}

/* Mobile-specific widow prevention */
@media (max-width: 768px) {
  p,
  h1,
  h2,
  h3,
  h4,
  h5,
  h6,
  li {
    orphans: 3; /* More aggressive on mobile */
    widows: 3;
    word-wrap: break-word;
    overflow-wrap: break-word;
  }

  /* Specific to your project sections */
  .project-section p,
  .project-section h2,
  .project-meta p,
  .project-title,
  .project-desc {
    orphans: 3;
    widows: 3;
    word-wrap: break-word;
    overflow-wrap: break-word;
  }
}

/* =========================
   RESPONSIVE MEDIA QUERIES
   ========================= */
@media (max-width: 1024px) {
  .about-intro {
    flex-direction: column;
    gap: 20px;
  }
  .about-right {
    flex-direction: column;
    gap: 40px;
  }
  .column {
    gap: 40px;
  }
}

@media (max-width: 768px) {
  nav {
    position: static;
    transform: none;
    margin: 10px 0;
  }
  .slider-container,
  .project-intro {
    max-width: 100%;
    margin: 20px 0;
  }
  .project-sections {
    grid-template-columns: 1fr;
    gap: 30px;
    margin-top: 15px;
  }
  .project-section {
    margin-bottom: 0;
  }
  .project-section h2 {
    margin-bottom: 5px;
  }
  .project-section p {
    margin-bottom: 5px;
  }
  .project-meta {
    display: block;
    text-align: left;
    gap: 0;
  }
  .project-meta p {
    margin-bottom: 10px;
    font-size: 0.9rem;
  }
  .project-row {
    flex-direction: column;
    gap: 20px;
  }
  .project-section {
    order: -1;
  }
  .project-image {
    grid-template-rows: auto auto;
    justify-items: center;
    gap: 10px;
  }
  .additional-images {
    display: flex;
    justify-content: center;
    gap: 10px;
    width: 100%;
  }
  .additional-images img {
    width: 24%;
    min-width: 0;
    height: 100px;
    object-fit: cover;
    display: block;
    border: none;
  }

  .project {
    flex-direction: column;
    width: 100%;
    gap: 10px;
  }
  .project img {
    width: 100%;
    height: 60vw; /* Fixed height based on viewport width */
    object-fit: cover;
  }
  .project-info {
    padding-left: 0;
    padding-top: 10px;
    max-width: 100%;
  }
  .description-section {
    flex-direction: row-reverse;
    justify-content: space-between;
    align-items: center;
  }
  .social-links a {
    width: 28px;
    height: 28px;
  }
  .social-links svg {
    width: 100%;
    height: 100%;
  }
  .description {
    text-align: left;
    margin-left: 0;
  }
  .about-image img {
    width: 100%;
    max-width: 300px;
  }
  .project-title {
    font-size: 1.8em;
  }
}

@media (min-width: 769px) {
  .additional-images img {
    flex: 1;
    min-width: 0;
    height: 150px; /* Increased from 100px to 200px (100px taller) */
    object-fit: cover;
    display: block;
    border: none;
    cursor: pointer;
    transition: opacity 0.3s ease, transform 0.3s ease;
  }

  .project-section {
    width: 300px;
    max-width: 300px;
    flex: 0 0 300px; /* Fixed width, no grow/shrink */
    word-wrap: break-word; /* Break long words if needed */
    overflow-wrap: break-word; /* Modern browsers */
  }
  .project-image {
    flex: 1; /* Allow project-image to take remaining space */
  }
  .project-meta {
    display: flex;
    justify-content: flex-start;
    gap: 20px;
  }
  .project-meta p {
    margin: 0;
    font-size: 1rem;
  }
  .project-section p,
  .project-section h2 {
    word-wrap: break-word;
    overflow-wrap: break-word;
    orphans: 2; /* Prevent single words on new lines */
    widows: 2; /* Prevent single words on last lines */
  }
}

@media (max-width: 768px) {
  .hero-image {
    margin-top: 15px;
  }
  .project-info > .project-title,
  .project-intro > .project-title {
    font-weight: 600;
  }

  .hero-image img {
    width: 100%;
    height: calc(100vw * 2 / 3 + 50px); /* Current height plus 100px */
    object-fit: cover; /* Keep image contained and not distorted */
    margin: 0;
  }
}
