@charset "utf-8";

/* ---------------------------------------------------
   FONT IMPORT
--------------------------------------------------- */
@font-face {
  font-family: 'TanNimbus';
  src: url('../fonts/TAN-NIMBUS.otf') format('opentype');
  font-weight: normal;
  font-style: normal;
}

/* ---------------------------------------------------
   BASE STYLES
--------------------------------------------------- */
body {
  background: #181a20;
  color: #ffffff;
  font-family: 'IBM Plex Mono', monospace;
  margin: 0;
  padding-top: 80px;
  overflow-x: hidden;
}

.projects-section {
  max-width: 100%;
  margin: 0 auto;
  padding: 40px 20px 200px;
  text-align: center;
}

/* ---------------------------------------------------
   MAIN TITLE
--------------------------------------------------- */
.projects-section .main-title {
  font-family: 'TanNimbus', sans-serif;
  font-size: 10rem;
  font-weight: 400;
  color: #181a20;
  -webkit-text-stroke: 2px #ffffff;
  text-transform: uppercase;
  letter-spacing: 2px;
  text-shadow: 0 0 5px #e8d0b0;
  display: block;
  max-width: 100%;
  margin: 40px auto 30px;
  padding: 0 40px;
  box-sizing: border-box;
  text-align: center;
}

/* ---------------------------------------------------
   PROJECT GROUP
--------------------------------------------------- */
.project-group {
  margin-bottom: 140px;
  text-align: center;
}

.project-group h2 {
  font-family: Brittany;
	position: relative;
  display: inline-block;
  font-size: 35px;
  color: #e60023;
  letter-spacing: 3px;
  font-weight: 700;
  margin-bottom: 50px;
  background: linear-gradient(90deg, #e60023, #e60023, #e60023);
  background-size: 300%;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  animation: gradientMove 4s infinite linear;
}

@keyframes gradientMove {
  0% { background-position: 0%; }
  100% { background-position: 100%; }
}

/* Divider */
.project-group:not(:last-child)::after {
  content: "";
  display: block;
  width: 60%;
  height: 1px;
  background: rgba(255, 255, 255, 0.1);
  margin: 100px auto 0;
}

/* ---------------------------------------------------
   CAROUSEL + IMAGES
--------------------------------------------------- */
.carousel {
  position: relative;
  display: flex;
  flex-wrap: nowrap;
  justify-content: center;
  padding: 0 80px;
  gap: 100px;
	
}

.image-card {
  flex-shrink: 0;
  width: 20%;
  border-radius: 16px;
  box-shadow: 0 8px 25px rgba(0,0,0,0.6);
  opacity: 0;
  transform: translateX(100px) scale(0.95);
  transition: all 0.8s ease;
  cursor: pointer;
}

.image-card.fly {
  opacity: 1;
  transform: translateX(0) scale(1);
}

.image-card:hover {
  transform: translateY(-15px) scale(1.05);
}

/* Landscape images */
.image-card.landscape {
  width: 35%;
}

/* Single carousel */
.carousel.single {
  justify-content: center;
}

.carousel.single .image-card {
  width: 25%;
}

/* ---------------------------------------------------
   FADE ANIMATION
--------------------------------------------------- */
.fade-section {
  opacity: 0;
  transform: translateY(40px);
  transition: all 1s ease;
}

.fade-section.visible {
  opacity: 1;
  transform: translateY(0);
}

/* ---------------------------------------------------
   POPUP (NIEUW)
--------------------------------------------------- */
/* POPUP BACKDROP */
.popup {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  min-height: 100vh;           /* full screen minimum */
  background: rgba(0,0,0,0.75);
  display: none;
  justify-content: center;      /* center horizontally */
  align-items: flex-start;          /* center vertically */
  backdrop-filter: blur(4px);
  z-index: 999999;              /* always above menu */
  overflow-y: auto;             /* allow scroll if content too tall */
  padding: 60px 20px;           /* breathing space top/bottom and sides */
  box-sizing: border-box;       /* include padding in width/height */
}


/* POPUP BOX */
.popup-content {
  background: #181a20;
  padding: 30px;
  max-width: 900px;
  width: 90%;
  border-radius: 16px;
  display: flex;
	flex-direction: column;
  gap: 30px;
  box-shadow: 0 0 20px rgba(0,0,0,0.5);
  position: relative;

 max-height: calc(100vh - 160px); /* subtract top + bottom padding */
  overflow-y: auto;    
}

/* TEXT SIDE */
.popup-left {
 width: 97%;
  text-align: left;
}

/* GALLERY SIDE */
/* POPUP GALLERY */
.popup-right {
  display: flex;
  flex-wrap: wrap;       /* allows 3rd image to go to next row */
  gap: 20px;
  padding-right: 10px;
  align-items: flex-start;
}

/* All images */
.popup-right img {
  height: 500px;    /* SAME HEIGHT → tops AND bottoms align */
  width: auto;      /* width adjusts naturally */
  object-fit: contain;  /* show whole image, no cropping */
  flex: 0 0 auto;        /* prevents weird stretching */
}



/* CLOSE BUTTON */
.popup-close {
  position: absolute;
  top: 15px;
  right: 20px;
  font-size: 32px;
  cursor: pointer;
  color: #e60023;
}

/* TEXT */
#popupText {
  color: #f0f0f0;
  font-size: 1.2rem;
  line-height: 1.6;
}
/* ============================================================
   MOBILE VERSION (max-width: 768px)
============================================================ */
@media (max-width: 768px) {

  /* -------------------------------------------
     BASE
  ------------------------------------------- */
  body {
    padding-top: 70px;
  }

  .projects-section {
    padding: 20px 10px 120px;
  }

  /* -------------------------------------------
     MAIN TITLE
  ------------------------------------------- */
  .projects-section .main-title {
    font-size: 3.2rem;
    -webkit-text-stroke: 1px #fff;
    margin: 20px 0 10px;
    padding: 0 10px;
    max-width: 100%;
    overflow-wrap: break-word;
    word-break: break-word;
  }

  /* -------------------------------------------
     PROJECT GROUP
  ------------------------------------------- */
  .project-group {
    margin-bottom: 80px;
  }

  .project-group h2 {
    font-size: 22px;
    letter-spacing: 2px;
    margin-bottom: 25px;
  }

  .project-group:not(:last-child)::after {
    width: 80%;
    margin: 60px auto 0;
  }

  /* -------------------------------------------
     CAROUSEL — FULL FIX
  ------------------------------------------- */

  /* OVERRIDE all desktop spacing */
 /* OVERRIDE desktop settings */
.carousel {
  padding-left: 0 !important;
  padding-right: 0 !important;
  justify-content: flex-start !important;
}

/* Actual mobile spacing */
.carousel {
  padding: 0 10px !important;
  gap: 20px !important;   /* ← gap restored */
  overflow-x: auto;
  overflow-y: hidden;
  scroll-snap-type: x mandatory;
  -webkit-overflow-scrolling: touch;
  scroll-padding-left: 10px;
}


  /* Prevent animation moving images outside view */
  .image-card {
    scroll-snap-align: start;
    flex-shrink: 0;
    width: 65%;
    box-sizing: border-box;
    transform: none !important;     /* <-- IMPORTANT FIX */
    opacity: 1 !important;          /* no fade delay on mobile */
  }

  /* First child MUST start at the very left */
  .carousel .image-card:first-child {
    margin-left: 0 !important;
  }

  /* Landscape images wider */
  .image-card.landscape {
    width: 85%;
  }

  /* Single image carousels */
  .carousel.single .image-card {
    width: 80%;
  }

  /* No hover zoom on mobile */
  .image-card:hover {
    transform: none;
  }

  /* -------------------------------------------
     FADE SECTION
  ------------------------------------------- */
  .fade-section {
    transform: translateY(20px);
  }

  /* -------------------------------------------
     POPUP BACKDROP
  ------------------------------------------- */
  .popup {
    padding: 30px 10px;
  }

  /* -------------------------------------------
     POPUP BOX
  ------------------------------------------- */
  .popup-content {
    width: 100%;
    max-width: 100%;
    padding: 20px;
    gap: 20px;
    max-height: calc(100vh - 120px);
  }

  /* Stack popup text + images */
  .popup-left,
  .popup-right {
    width: 100%;
    padding: 0;
    text-align: left;
  }

  /* Popup images scroll sideways on mobile */
  /* Popup images: stacked and NOT scrollable on mobile */
.popup-right {
    flex-wrap: wrap;
    overflow-x: hidden;         /* ← no horizontal scroll */
    overflow-y: visible;        /* ← don't scroll inside popup */
    justify-content: center;
}

/* Images should fit the mobile width */
.popup-right img {
    width: 100%;                /* ← take full width */
    height: auto;               /* ← keep proportions */
    max-height: 70vh;           /* ← fits inside screen */
    object-fit: contain;
}

  /* Close button */
  .popup-close {
    font-size: 26px;
    right: 15px;
    top: 10px;
  }

  #popupText {
    font-size: 1rem;
    line-height: 1.5;
  }
}

