/* style.css */

/* ------- BTS DRAGGABLE WINDOW ------- */
.bts-window {
  position: fixed;
  top: 50px; left: 50px;
  width: 60vw;
  max-width: 600px;
  height: 95vh;
  max-height: 95vh;
  background: #222;
  color: #eee;
  border: 1px solid #444;
  border-radius: 6px;
  box-shadow: 0 4px 12px rgba(0,0,0,0.5);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  z-index: 10005;
}

.bts-window-header {
  padding: 0.5rem;
  background: #111;
  cursor: move;
  display: flex;
  justify-content: space-between;
  align-items: center;
  user-select: none;
}

.bts-window-header span {
  font-weight: bold;
}

.bts-close {
  background: none;
  border: none;
  color: #eee;
  font-size: 1.2rem;
  cursor: pointer;
}

.bts-window-body {
  padding: 1rem;
  overflow-y: auto;
  flex: 1;
  background: #2a2a2a;
  scrollbar-width: thin;
  scrollbar-color: var(--accent-color,#888) #2a2a2a;
}

.bts-window-body::-webkit-scrollbar {
  width: 8px;
}

.bts-window-body::-webkit-scrollbar-track {
  background: #2a2a2a;
}

.bts-window-body::-webkit-scrollbar-thumb {
  background-color: var(--accent-color,#888);
  border-radius: 4px;
  border: 2px solid #2a2a2a;
}

.bts-window-body::-webkit-scrollbar-thumb:hover {
  background-color: #aaa;
}

.bts-window-header {
  padding: 0.5rem;
  background: #111;
  cursor: move;
  display: flex;
  justify-content: space-between;
  align-items: center;
  user-select: none;
}

.bts-window-header span {
  font-weight: bold;
}

.bts-close {
  background: none;
  border: none;
  color: #eee;
  font-size: 1.2rem;
  cursor: pointer;
}

.bts-window-body {
  padding: 1rem;
  overflow-y: auto;
  flex: 1;
  background: #2a2a2a;
}

#bts-content {
  max-width: 40vw; /* 👈 Tighter content area */
  margin: 3rem auto; /* More vertical spacing */
  font-family: "industry", sans-serif;
  font-size: 1rem;
  line-height: 1.9;
}

#bts-content img {
  display: block;
  max-width: 100%;
  width: 50vw; /* Makes it responsive but not gigantic */
  height: auto;

  border-radius: 0.5rem;

}


html, body {
  height: 100%;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  overscroll-behavior: none; 
  scroll-behavior: smooth; 
}

main {
  flex: 1;            /* you already have this */
  padding-top: 6rem;  /* new: clear the header height */
}

footer {
  text-align: center;
  padding: 1rem;
  background: #333;
  color: #fff;
  margin-top: auto;
}

/* General Styles */
body {
  font-family: "industry", sans-serif;
  margin: 0;
  padding: 0;
  line-height: 1.6;
  position: relative;

  overflow-x: hidden;
}

#hover-preview-wrapper {
  position: fixed;
  top: -5vh;  /* Push it above the top a bit */
  left: -5vw; /* Push it a bit left */
  width: 110vw; /* Wider than screen */
  height: 110vh; /* Taller than screen */
  background-color: #222;
  z-index: -1;
  pointer-events: none;
  overflow: hidden;
}

.zoom-modal {
  display: none; /* Hidden by default */
  position: fixed;
  z-index: 11000;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background-color: rgba(0, 0, 0, 0.9);
  justify-content: center;
  align-items: center;
}

.zoom-modal .zoomed-img {
  /* always fill the modal area */
  width: 90vw;
  height: 90vh;
  box-shadow: none !important;
  /* preserve aspect, no cropping */
  object-fit: contain;

  /* keep your nice styling */
  border-radius: 0.5rem;
  box-shadow: 0 0 25px rgba(255,255,255,0.15);
  transition: transform 0.3s ease;
}

.zoomed-img {
  max-width: 100%;
  max-height: 100%;
  object-fit: cover;
  border-radius: 0.5rem;
  box-shadow: 0 0 25px rgba(255, 255, 255, 0.15);
  transition: transform 0.3s ease;
}

.zoom-close {
  position: absolute;
  top: 1rem;
  right: 1.5rem;
  font-size: 3rem;
  color: white;
  cursor: pointer;
  z-index: 10000;
}


.comparison-container {
  display: flex;
  justify-content: center; /* center them horizontally */
  gap: 1rem;
  margin-top: 2rem;
  flex-wrap: wrap; /* so they don't overflow on smaller screens */
}

.comparison-container > div {
  flex: 1 1 45%;
  max-width: 45%;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.comparison-container img {
  width: 100%; /* fill the parent's width (which is ~45%) */
  height: auto;
  object-fit: cover; /* this will fill the box if you give it a fixed height instead */
  border: 1px solid #ddd;
  border-radius: 0.3rem;
  transition: transform 0.3s;
}

.comparison-container img:hover {
  transform: scale(1.02);
}


.zoom-arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(0,0,0,0.6);
  color: #fff;
  border: none;
  font-size: 2rem;
  padding: 0.5rem;
  cursor: pointer;
  border-radius: 0.3rem;
  transition: background 0.3s;
  z-index: 10001;
}

#zoom-prev {
  left: 2rem;
}

#zoom-next {
  right: 2rem;
}

.zoom-arrow:hover {
  background: rgba(0,0,0,0.8);
}

.zoom-modal {
  display: none;
  opacity: 0;
  visibility: hidden;
  justify-content: center;
  align-items: center;
  transition: opacity 0.3s ease, visibility 0.3s;
}
.zoom-modal.show {
  display: flex;
  opacity: 1;
  visibility: visible;
}


.zoomed-img {
  width: 100%;
  height: 100%;
  object-fit: cover;   /* Fills the modal, cropping if necessary */
  border-radius: 0.5rem;
  box-shadow: 0 0 25px rgba(255, 255, 255, 0.15);
  opacity: 1;
  transition: opacity 0.3s ease-in-out, transform 0.3s ease-in-out;
}

.zoom-modal.show .zoomed-img {
  transform: scale(1);
}


.hover-preview-layer {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-size: cover; /* Use cover so image scales edge-to-edge */
  background-position: center;
  background-repeat: no-repeat;
  filter: blur(10px);
  opacity: 0;
  transition: opacity 0.3s ease-in-out;
  clip-path: inset(1.5% round 0.5vw); /* You can adjust or remove this if you want it fully full-screen */
}

.blurred-inner {
  width: 100%;
  height: 100%;
  background-size: 115%; /* ⬅️ slightly bigger to *guarantee* coverage */
  background-position: center;
  background-repeat: no-repeat;
  filter: blur(10px);
  clip-path: inset(1.5% round 0.5vw);
  transition: background-image 0.4s ease-in-out;
}


#hover-preview {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background-size: 110%;
  background-position: center;
  background-repeat: no-repeat;
  background-color: #222; /* fallback */
  z-index: -1;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.4s ease-in-out;
  filter: blur(8px);
  clip-path: inset(2% round 0.5vw); /* crop edges so blur doesn’t bleed */
}

header .logo-link {
  display: inline-block;
}

header {
  position: fixed;    /* was sticky */
  top: 0;             /* pin to the very top */
  left: 0;
  right: 0;
  width: 100%;
  z-index: 10000;
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  background: #333;
  color: #fff;
  padding: 1rem 2rem;
}

.logo-container {
  display: flex;
  align-items: center;
}

header .logo {
  max-height: 5.5rem;  /* Adjust this value as needed */
  width: auto;
  vertical-align: middle;
  margin: 0 1rem;
}

.logo {
  height: 5.5rem;
  width: auto;
}

.section-header {
  background-color: #333;
  color: white;
  padding: 1rem 2rem;
  border-radius: 0.5rem;
  width: fit-content;
  margin: 2rem auto 1rem auto;
  font-size: 2rem;
  font-weight: bold;
  font-family: "industry", sans-seif;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
}

nav {
  margin: 0 auto;
  padding-top: 1rem;
}


nav ul {
  list-style: none;
  margin: 0,

}

nav ul li {
  display: inline;
  margin: 0 2vw;
}

nav ul li a {
  color: #fff;
  text-decoration: none;
  font-size: 1.2rem; /* Scale based on viewport */
}

section {
  padding: 2vw;
  border-bottom: 1px solid #ddd;
  scroll-margin-top: 6rem;  
}

footer {
  text-align: center;
  padding: 1rem;
  background: #333;
  color: #fff;
}

#projects h2 {
  text-align: left;
  margin-left: auto;
  margin-right: auto;
  width: 70vw; /* Match the width of the grid container */
  font-size: clamp(1.5vw, 2vw, 3vw); /* Keeps the text responsive */
  font-weight: bold;
  position: relative;
  z-index: 5; /* Ensures it stays above other elements */
  transition: font-size 0.3s ease-in-out;
}

.grid-container {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1.5vw;
  padding: 2vw;

  max-width: 70vw; /* Restrict width to 3/5ths of the page */
  margin: 1rem auto; /* Centers the grid */
  justify-items: center;
}

.grid-item {
  position: relative;
  width: 100%;
  padding-top: 100%;
  transition: transform 0.3s ease-in-out;
  border-radius: 5%; /* Responsive rounded corners */
}

.grid-item:hover {
  transform: scale(1.05);
}

.grid-item-content {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: #fff;
  border: 1px solid #ddd;
  border-radius: 10%; /* Make border radius proportional */
  transition: border-radius 0.3s ease-in-out;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  transition: border-radius 0.3s ease-in-out;
}

.grid-item:hover .grid-item-content {
  border-radius: 5%; /* Shrinks when hovered */
}

.video360-container {
  position: relative;
  width: 100%;
  height: 100%;
  overflow: hidden;
}

.video360-iframe-container,
.video360-dual-iframe {
  position: relative;
  width: 100%;
  /* maintain 16:9 – adjust to 1:1 for equirectangular 360 if you prefer */
  padding-top: 56.25%;
  background: #000;
  overflow: hidden;
}

.video360-iframe-container iframe,
.video360-dual-iframe iframe {
  position: absolute;
  top: 0; left: 0;
  width: 100%; height: 100%;
  border: 0;
}

.video360-container canvas {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.slideshow-container {
  position: relative;
  width: 100%;
  height: 100%;
  overflow: hidden;
  display: flex;
  align-items: center;
}

.slideshow-track {
  display: flex;
  width: 100%;
  height: 100%;
  transition: transform 0.5s ease-in-out;
}

.slideshow-image {
  flex: 0 0 100%;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.prev-slide, .next-slide {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(0,0,0,0.5);
  color: #fff;
  border: none;
  padding: 0.5rem;
  font-size: 1.5rem;
  cursor: pointer;
  z-index: 10;
}

.prev-slide { left: 0.5rem; }
.next-slide { right: 0.5rem; }

.prev-slide:hover,
.next-slide:hover {
  background: rgba(0,0,0,0.7);
}

/* 360 Video Containers */
#video360-container-1, #video360-container-2, #video360-container-6 {
  position: relative;
  width: 100%;
  height: 100%;
  overflow: hidden;
}

#video360-canvas-1, #video360-canvas-2 {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}



#slideshow-container {
  position: relative;
  width: 100%;
  height: 100%;
  overflow: hidden;
  display: flex;
  align-items: center;
}

#slideshow-track {
  display: flex;
  width: 100%;
  transition: transform 0.5s ease-in-out;
}

.slideshow-image {
  width: 100%;
  height: 100%;
  flex: 0 0 100%;
  object-fit: cover;
}

/* ✅ PROJECT INFO (Title, Island, BTS Button) */
.project-info {
  position: absolute;
  bottom: -10%; /* Adjust dynamically */
  left: 50%;
  transform: translateX(-50%);
  text-align: center;
  transition: transform 0.4s ease-in-out;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.project-info-island {
  width: 75%; /* Relative width */
  max-width: 18vw; /* Ensure scaling is based on viewport width */
  min-width: 10vw; /* Avoid shrinking too much */
  height: 1.5vw; /* Makes height scale with viewport */
  padding: 0.4vw 1.5vw; /* Makes padding scale */
  background: rgba(255, 255, 255, 0.9);
  border: 2px solid #ccc;
  border-radius: 0.8vw; /* Scales dynamically */
  display: flex;
  opacity: 75%;
  align-items: center;
  justify-content: center;
  transform-origin: center bottom;
  transition: height 0.3s ease-in-out, border-radius 0.3s ease-in-out, transform 0.3s ease-in-out;
}

.thumbnail-container img {
  width: 100%;
  height: 100%;
  object-fit: contain; /* Ensures the whole image is visible without cropping */
}

.grid-item:hover .project-info-island {
  height: 3vw; /* Scales proportionately */
  border-radius: 1vw;
  transform: translateY(-5%);
}

.project-title {
  font-size: clamp(0.7vw, 1vw, 1.2vw); /* Keeps the font size dynamic */
  white-space: nowrap; /* Ensures text stays on one line when possible */
  overflow-wrap: break-word; /* Allows breaking only when necessary */
  word-break: keep-all; /* Prevents unnecessary early breaks */
  text-align: center; /* Keeps it centered */
  max-width: 100%; /* Uses the full island width */
  padding: 0 5%; /* Ensures text doesn’t touch the edges */
  transition: transform 0.3s ease-in-out, font-size 0.3s ease-in-out;
}

.view-bts-btn {
  transform: translateY(-10px);
  display: block;
  margin-top: 1vh;
  padding: 0.4vw 1vw;
  font-size: 0.6vw; /* Dynamic scaling */
  background: rgba(0, 0, 0, 0.7);
  color: #fff;
  border: none;
  cursor: pointer;
  border-radius: .5vw;
  opacity: 0;
  transition: opacity 0.3s ease-in-out, transform 0.3s ease-in-out;
}

.grid-item:hover .project-title {
  transform: translateY(-60%);
}

.grid-item:hover .view-bts-btn {
  opacity: 1;
  transform: translateY(-175%);
}

.flipbook-track {
  display: flex;
  transition: transform 0.6s ease-in-out;
  width: 100%; /* or 100% if you loop differently */
  height: 100%;  /* critical */
}

.flipbook-image {
  flex: 0 0 100%;
  width: 100%;
  height: 100%;
  object-fit: cover; /* fills the space */
  object-position: center;
  display: block;
}

.image-grid {
  display: grid;
  gap: 1rem;
  margin: 2rem auto;
  max-width: 60vw;
}

.image-grid.cols-2 {
  grid-template-columns: repeat(2, 1fr);
}

.image-grid.cols-3 {
  grid-template-columns: repeat(3, 1fr);
}

.image-grid img {
  width: 100%;
  height: auto;
  border-radius: 0.5rem;
  cursor: pointer;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.15);
  transition: transform 0.2s ease-in-out;
}

.image-grid img:hover {
  transform: scale(1.02);
}


.flipbook-track,
.flipbook-image {
  padding: 0;
  margin: 0;
  line-height: 0;
  border: none;
}


.flipbook-caption {
  position: absolute;
  bottom: 0.5rem;
  left: 50%;
  transform: translateX(-25%);
  background: rgba(0, 0, 0, 0.6);
  color: white;
  padding: 0.3rem 1rem;
  border-radius: 0.4rem;
  font-size: 0.9rem;
  font-weight: 500;
  z-index: 5;
}

.flipbook-controls {
  position: absolute;
  top: 50%;
  left: 0; right: 0;
  display: flex;
  justify-content: space-between;
  pointer-events: auto;
  transform: translateY(-50%);
  z-index: 2;
}

.flipbook-controls button {
  background: rgba(0,0,0,0.6);
  color: #fff;
  border: none;
  padding: 0.5rem 1rem;
  font-size: 1.5rem;
  cursor: pointer;
  border-radius: 0.3rem;
}

/* Flipbook arrow-style buttons (like homepage) */
#flip-prev, #flip-next {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(0, 0, 0, 0.5);
  color: white;
  border: none;
  padding: 0.8vw;
  cursor: pointer;
  font-size: 2vw;
  opacity: 0.7;
  z-index: 10;
  border-radius: 0.3vw;
  transition: opacity 0.3s;
}

#flip-prev:hover, #flip-next:hover {
  opacity: 1;
}

#flip-prev {
  left: 0.5vw;
}

#flip-next {
  right: 0.5vw;
}

.flipbook-wrapper {
  position: relative;
  max-width: 45vw;
  aspect-ratio: 1 / 1;
  /* ⬇ Zero out the margin */
  margin: 0 auto;
  display: flex;
  flex-direction:column;
  align-items: center;
  justify-content: center;
  overflow:hidden;
  background: none;
  box-shadow: none;
  border-radius: 0;
  padding: 0; /* Just to be safe */
}


#bts-flipbook {
  width: 100%;
  aspect-ratio: 1 / 1;

  /* 🧼 REMOVE any “visual” decoration */
  overflow: hidden;
  border-radius: 0;
  box-shadow: none;

  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
}

.flipbook-btn {
  background: #333;
  color: #fff;
  border: none;
  padding: 0.4rem 1rem;
  font-size: 0.9rem;
  cursor: pointer;
  border-radius: 0.3rem;
  transition: background 0.3s;
}

.flipbook-btn:hover {
  background: #555;
}

.flipbook-wipe {
  clip-path: inset(0 100% 0 0); /* Start from full right */
  transition: clip-path 0.6s ease-in-out;
  z-index: 3;
}



/* Slideshow Navigation */
#prev-slide, #next-slide {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(0, 0, 0, 0.5);
  color: white;
  border: none;
  padding: 1vw;
  cursor: pointer;
  font-size: 1.5vw;
  opacity: 0.7;
  transition: opacity 0.3s;
}

#prev-slide:hover, #next-slide:hover {
  opacity: 1;
}

#prev-slide {
  left: 10px;
}

#next-slide {
  right: 10px;
}

.bts-img, .bts-video {
  display: block;
  max-width: 100%;
  width: 50vw;
  margin: 2rem auto;
  border-radius: 0.5rem;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.bts-video {
  height: auto;
}


/* Ensures header and footer do NOT feel claustrophobic */
header, footer {
  width: 100vw;
  background-color: #333; /* Ensure consistent color */
  z-index: 10000;
}

/* Forces footer to stick to the bottom, covering overscroll */
footer {
  bottom: 0;
}

:root {
  --accent-color: #ffffff; /* fallback */
}

.section-header,
.view-bts-btn {
  border-color: var(--accent-color);
  color: var(--accent-color);
}

.view-bts-btn {
  background-color: transparent;
  border: 1px solid var(--accent-color);
}

.view-bts-btn:hover {
  background-color: var(--accent-color);
  color: #000;
}

section#about,
section#contact {
  border-bottom: none;
}

.about-container a,
.contact-container a {
  color: var(--accent-color, #fff);
  text-decoration: underline;
}

.about-container,
.contact-container {
  max-width: 70vw;                      /* same width as your grid */
  margin: 2rem auto;                    /* vertical spacing + center */
  padding: 2rem;                        /* inner breathing room */
  background: #333;                     /* dark box color */
  color: #fff;                          /* white text */
  border-radius: 0.5rem;                /* match your section headers */
  box-shadow: 0 4px 10px rgba(0,0,0,0.2);
  text-align: center;
  font-size: clamp(1rem, 1.1vw, 1.4rem);
  line-height: 1.6;
}