/* #region Root  */
*,
*::before,
*::after {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: Times New Roman, serif;
}

.layout {
  display: flex;
    min-height: 100vh; /* full viewport height */
  align-items: stretch; /* ensures children match each other's height */
}

#main-content {
  flex: 1;
  padding: 40px;
  line-height: 1.6;
  font-size: 1.1rem;
}
html, body {
  height: 100%;
}

/* #endregion Root  */


/* #region Sidebar */
/* Sidebar list styles */

#sidebar-placeholder {
  width: 20vw;
  min-width: 200px;
  max-width: 280px;
  background-color: #f4f4f4;
  padding: 20px;
  height: auto;
  overflow-y: auto;
  flex-shrink: 0;
  font-size: clamp(0.9rem, 1.5vw, 1.2rem);
  line-height: 1.5;
}
#sidebar-placeholder ul {
  list-style-type: none;
  padding: 0;
  margin: 0;
}

#sidebar-placeholder li {
  margin-bottom: 10px;
}

#sidebar-placeholder a {
  color: #333;
  text-decoration: none;
  font-weight: bold;
  padding: 0.25rem 0.5rem;
  display: inline-block;
  transition: color 0.05s ease-in-out;
}

#sidebar-placeholder a:hover {
  color: #a0a0a0;
  text-decoration: underline;
}



/* #endregion Sidebar */


/* #region Home Page */
          /* #region popup */

.index-popup-overlay {  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background-color: rgba(0, 0, 0, 0.5); /* semi-transparent dark background */
  display: none; /* hidden by default, shown in JS */
  justify-content: center;
  align-items: center;
  z-index: 9999; /* ensure it’s on top of everything */}

  .index-popup-content {
  background-color: white;
  padding: 2rem;
  border-radius: 10px;
  width: 90%;
  text-align: center;
  box-shadow: 0 0 15px rgba(0, 0, 0, 0.3);
  position: relative;
}
.x-button {
  position: absolute;
  top: 0.5rem;
  right: 0.75rem;
  font-size: 1.5rem;
  cursor: pointer;
}
.continue-button {
  display: inline-block;
  margin-top: 1rem;
  background-color: #333;
  color: white;
  padding: 0.5rem 1rem;
  border-radius: 5px;
  cursor: pointer;
}

.continue-button:hover {
  background-color: #666;
}

.smaller-text {
  font-size: 0.85em;
  color: #555;
}
/* #endregion popup */
/* #endregion Home Page */

/* #region Gallery */
.gallery-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr); /* 3 equal columns */
  gap: 1.5rem;
  padding: 2rem 0;
  justify-items: center;
  max-width: 1200px;
  margin: 0 auto;
}

.gallery-item {
  background-color: #fff;
  border: 1px solid #ddd;
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 2px 6px rgba(0,0,0,0.1);
  text-align: center;
  width: 100%; /* fill grid column */
  max-width: 400px; /* optional max width */
}

.gallery-item img {
  width: 100%;
  height: auto;
  aspect-ratio: 1 / 1;
  object-fit: cover;
  object-position: center;
  display: block;
}

.gallery-item:hover {
  transform: scale(1.03);
  transition: transform 0.2s ease-in-out;
}

.gallery-caption {
  font-size: 1em;
  padding: 0.5rem;
  color: #000;
}

.block-heading {
  font-weight: bold;
  text-decoration: underline;
  display: inline-block;
}

/* #endregion Gallery */

/* #region carousel slideshow */
.slideshow-container {
  width: 100%;
  max-width: 800px;
  margin: auto;
}

.main-image-wrapper {
  position: relative;
}

#main-image {
  width: 100%;
  display: block;
  border-radius: 8px;
   cursor: zoom-in; /* Changes the cursor */
  transition: transform 0.2s ease, filter 0.2s ease;
}


#main-image:hover {
  transform: scale(1.02);     /* Slight zoom effect */
}


.nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(255,255,255,0.7);
  border: none;
  font-size: 2rem;
  padding: 0.5rem;
  cursor: pointer;
  z-index: 1;
}

.nav.prev {
  left: 10px;
}
.nav.next {
  right: 10px;
}

.thumbnail-row {
  display: flex;
  justify-content: center;
  margin-top: 10px;
  gap: 10px;
  overflow-x: auto;
}

.thumbnail {
  width: 60px;
  height: 60px;
  object-fit: cover;
  opacity: 0.6;
  cursor: pointer;
  border-radius: 4px;
  transition: 0.3s;
}

.thumbnail.active,
.thumbnail:hover {
  opacity: 1;
  outline: 2px solid #333;
}


/*#region popup nav*/
.popup-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  font-size: 2rem;
  background: rgba(0, 0, 0, 0.3);
  border: none;
  color: white;
  padding: 10px;
  cursor: pointer;
  z-index: 10;
}

.popup-nav.prev {
  left: 20px;
}

.popup-nav.next {
  right: 20px;
}

.popup-nav:hover {
  background: rgba(0, 0, 0, 0.6);
}
/*#endregion popup nav*/


/* Responsive image scaling */
img {
  max-width: 100%;
  height: auto;
  display: block;
}


/* Overlay for zoomed image */
.image-popup-overlay {
  display: none;
  position: fixed;
  z-index: 9999;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background-color: rgba(0,0,0,0.85);
  justify-content: center;
  align-items: center;
  cursor: zoom-out;
}
.image-popup-overlay.active {
  display: flex;
}


/* Zoomed image styling */
 .popup-img {
  width: auto;
  height: auto;
  box-shadow: 0 0 20px rgba(255, 255, 255, 0.2);
  border-radius: 6px;
  max-width: none;   /* Let JS handle max size */
  max-height: none;  /* Let JS handle max size */
}


/* #region zoomed image close button */

.close-btn {
  position: absolute;
  top: 1rem;
  right: 1rem;
  background: rgba(0,0,0,0.6);
  border: none;
  color: white;
  font-size: 2rem;
  font-weight: bold;
  line-height: 1;
  padding: 0 0.5rem;
  cursor: pointer;
  border-radius: 4px;
  user-select: none;
  z-index: 10000; /* above the image */
  transition: background-color 0.3s ease;
}

.close-btn:hover {
  background: rgba(0,0,0,0.8);
}

/* #endregion carousel slideshow */


/* #region project pages */

.project-photo {
  width: 40vw; /* 60% of viewport width */
  max-width: 100%; /* never overflow container */
  height: auto; /* keep aspect ratio */
  display: block;
  margin-inline: 1vw auto;
  box-shadow: 0 0 10px rgba(0,0,0,0.1); /* optional: soft shadow */
   cursor: pointer;
  transition: transform 0.3s ease;
}

.project-photo:hover {
  transform: scale(1.03);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.image-text-container {
  display: flex;
  flex-direction: row;
  align-items: flex-start;
  gap: 2rem; /* space between image and text */
  flex-wrap: wrap; /* allow stacking on small screens */
  margin-bottom: 2rem;
}

.text-block-wrapper {
  flex: 1; /* take up remaining space */
  max-width: 50vw;
}




/* #endregion zoomed image close button */

/* #endregion project pages */



/* #region breakpoint: 1300px */

@media (max-width: 1300px) {
  
  .close-btn {
    font-size: 10rem;  /* Bigger X */
    padding: 0 1rem;    /* More tappable area */
  }

  .gallery-grid {
    grid-template-columns: 1fr !important; /* force 1 column */
    padding: 1rem 0 !important;
  }

  .gallery-item {
    max-width: 100% !important;
  }
/*#region sidebar*/
  .image-text-container {
    flex-direction: column;
  }

  .text-block-wrapper {
    max-width: 100%;
  }

  .project-photo {
    width: 100%;
  }
/*#endregion sidebar*/


  #sidebar-placeholder {
    width: 25% !important;
    min-width: 15% !important;
    max-width: 30% !important;
    height: auto !important;
    padding: 20px !important;
    font-size: 3.2rem !important;
  }

  #sidebar-placeholder a {
    padding: 0.75rem 1rem !important; /* Bigger tap targets */
    display: block !important;
    width: 100% !important;
  }

  #sidebar-placeholder ul {
    width: 100% !important;
  }

  #sidebar-placeholder li {
  margin-bottom: 0.5rem;
  }

  #main-content {
    padding: 20px !important;
    font-size: 4rem !important;
  }


/*#region project page expenaded image popup*/
          .index-popup-content {
              width: 95%;       /* allows it to expand more freely */
              max-width: none;
              height: 40%;
              font-size: 3em; 
              padding: 25px;    
            }
            .popup-nav.prev,
            .popup-nav.next {
              padding: 16px 20px;   /* bigger clickable area */
              font-size: 5rem;    /* bigger icon/text */
            }

/*#endregion project page expenaded image popup*/
/*#region carousel thumbnail*/


            .nav.prev,
            .nav.next {
              padding: 16px 20px;   /* bigger clickable area */
              font-size: 5rem;    /* bigger icon/text */
            }
/*#endregion carousel thumbnail*/
/* #region Root  */


/* #endregion Root  */





}
/* #endregion breakpoint: 1300px */