*,
::before,
::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  line-height: 1.75;
}

/* Color Variables */
:root {
  --color1: #0c0c0c;
  --color2: #f2f2f2;
  --color3: #7f7f7f;
  --color4: #181a1b;
  --color5: #e08c1d;
  --color6: rgba(12, 12, 12, 0.8);
  --color7: rgba(242, 242, 242, 0.2);
  --color8: #e1d66168;
  --color9: rgba(0, 0, 0, 0.75);
  --color10: rgba(200, 200, 200, 0.9);
}

html {
  font-size: 16px;
  text-rendering: optimizeLegibility;
  font-family: "Libre Franklin", sans-serif;
  color: var(--color2);
  background-color: var(--color1);
  overflow-x: hidden; /* Prevent horizontal scrolling */
}

body {
  height: 100vh;
  /* width: 100vw; */
  margin: 0;
  user-select: none;
  -webkit-user-select: none; /* Safari */
  -moz-user-select: none; /* Firefox */
  -ms-user-select: none; /* IE */
}

/* Typography */
h1 {
  margin-bottom: -10px;
}

img {
  pointer-events: none;
  -webkit-user-drag: none;
  max-width: 100%;
  height: auto;
}

/* Lists */
ul {
  list-style: none;
  font-size: 0.8rem;
}

li {
  line-height: 1.8rem;
}

/* Main Layout */
main {
  position: relative;
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: 100vh;
}

/* Banner */
.banner {
  position: fixed;
  /* width: 10vw; */
  top: 50px;
  left: 60px;
  font-size: 0.8rem;
  z-index: 10;
  transition: opacity 0.3s ease-out;
}
.banner h1 {
  padding-bottom: 0.5rem;
}

/* Navigation Bar */
.nav-bar {
  position: fixed;
  top: 50px;
  right: 60px;
  color: var(--color2);
  text-align: right;
  z-index: 10;
  transition: opacity 0.3s ease-out;
}

/* Links */
.nav-link {
  text-decoration: none;
  color: var(--color2);
  transition: all 0.3s ease;
}

.nav-link:hover {
  color: var(--color3);
  padding: 0 5px;
  font-weight: 600;
  cursor: pointer;
}

/* Border Effects */
.border {
  position: fixed;
  top: 35px;
  left: 35px;
  right: 35px;
  bottom: 35px;
  border: 1px solid var(--color3);
  transition: opacity 0.3s ease-out, visibility 0.3s ease-out;
  pointer-events: none;

  /* Hide border completely by default */
  mask-image: radial-gradient(
    circle 0px at 50% 50%,
    var(--color2) 0%,
    var(--color1) 100%
  );
  -webkit-mask-image: radial-gradient(
    circle 0px at 50% 50%,
    var(--color2) 0%,
    var(--color1) 100%
  );
  transition: mask-image 0.5s ease-out, -webkit-mask-image 0.5s ease-out,
    opacity 0.3s ease-out;
}

/* Font Weights */
.font-light {
  font-weight: 100;
}

.font-regular {
  font-weight: 500;
}

.font-semibold {
  font-weight: 600;
}

/* Nav Selected */
.selected {
  font-weight: 600;
  text-decoration: line-through;
  /* text-decoration-style: wavy; */
  text-decoration-thickness: 0.1rem;
  display: inline-block;
}

/* Carousel */
.carousel {
  display: flex;
  justify-content: center;
  align-items: center;
  position: relative;
  width: 100vw;
  height: 100vh;
  overflow: hidden;
  touch-action: pan-y;
}

/* Center The Carousel Box */
.carousel-track {
  display: flex;
  justify-content: center;
  align-items: center;
  width: 100%;
  height: 100%;
  position: relative;
}

/* Center Each Image With Size Control */
.carousel-item {
  max-width: 80vw;
  max-height: 80vh;
  object-fit: contain;
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  opacity: 0;
  transition: opacity 0.5s ease-in-out;
}

.carousel-item.active {
  opacity: 1;
  z-index: 2;
}

/* Navigation Click Next Or Previous For Carousel */
.nav-area {
  position: absolute;
  bottom: 0;
  width: 49%;
  height: 100%;
  z-index: 5;
}

.nav-area.left {
  left: 0;
}

.nav-area.right {
  right: 0;
}

/* Hidden Arrows */
.arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  font-size: 3rem;
  padding: 250px 30px;
  color: var(--color3);
  opacity: 0.5;
  transition: opacity 0.3s ease-in-out;
}
.arrow:hover {
  opacity: 1;
}

.arrow.left {
  left: 5%;
  padding-right: 80%;
}

.arrow.right {
  right: 5%;
  padding-left: 80%;
}

/* Barcode Navigator */
.barcode-indicator {
  position: absolute;
  bottom: 45px;
  display: flex;
  gap: 10px;
  justify-content: center;
  width: 100%; /* Ensure it stays centered */
  z-index: 5;
}

.bar {
  width: 15px;
  height: 10px;
  background: var(--color3);
  transition: all 0.3s ease;
  cursor: pointer;
}

.bar.active {
  height: 15px;
  width: 22px;
  background: var(--color2);
}

.bar:hover {
  height: 15px;
  background: var(--color2);
}

/* Gallery */
.gallery {
  /* min-height: 100vh; */
  justify-items: center;
}

.gallery-border {
  position: fixed;
  top: 50px;
  left: 35px;
  right: 35px;
  bottom: 50px;
  overflow-y: auto;
  overflow-x: hidden;
}

::-webkit-scrollbar {
  width: 0.1em;
}
::-webkit-scrollbar-track {
  margin-block: 10em;
}
::-webkit-scrollbar-thumb {
  background: var(--color3);
  border-radius: 100vw;
}

/* Gallery Buttons Dropdown Menu */
.gallery-dropdown {
  position: fixed;
  top: 130px;
  left: 60px;
  z-index: 10;
  transition: opacity 0.3s ease-out, visibility 0.3s ease-out; /* Add visibility transition */
}

.dropdown-toggle {
  display: flex;
  align-items: center;
  background-color: var(--color4);
  border: 1px solid var(--color3);
  color: var(--color2);
  border-radius: 4px;
  cursor: pointer;
  transition: all 0.3s ease;
  font-size: 0.8rem;
}

.dropdown-toggle:hover {
  background-color: var(--color3);
  color: var(--color4);
}

.filter-icon {
  transition: transform 0.3s ease;
}

.filter-icon.active {
  color: var(--color2);
  transition: filter 0.3s ease;
}

/* Gallery Filter Buttons */
.gallery-buttons {
  position: fixed;
  top: 130px;
  left: 100px;
  margin-top: 5px;
  display: none;
  flex-direction: column;
  flex-wrap: wrap;
  z-index: 5; /* Ensure below dropdown toggle if overlapping desired */
}

.gallery-buttons .gallery-btn-clicked {
  background-color: var(--color3);
  color: var(--color4);
}

.gallery-buttons.active {
  display: flex;
}

/* Filter buttons */
.gallery-buttons button {
  margin-bottom: 1em;
  padding: 0.3em;
  font-size: 0.8em;
  text-align: left;
  background: none;
  color: var(--color2);
  border: none;
  border-radius: 0.3em;
  transition: all 0.3s ease;
  cursor: pointer;
}

.gallery-buttons button:hover {
  background-color: var(--color3);
  color: var(--color4);
}

/* Gallery Images */
.gallery-images {
  display: grid;
  padding: 150px 0;
  width: 70vw;
  grid-template-columns: repeat(3, minmax(150px, 1fr));
  grid-auto-rows: auto;
  grid-auto-flow: dense;
  gap: 15px;
  margin: auto;
}

/* Filter Transitions */
.gallery-images img {
  width: 100%; /* Make image fill its grid cell */
  height: 100%; /* Make image fill its grid cell */
  object-fit: cover; /* Cover the area, cropping if necessary */
  border-radius: 5px;

  /* Ensure base scale is 1 (though it's default) */
  transform: scale(1);

  transition: opacity 0.3s ease, transform 0.3s ease, box-shadow 0.3s ease,
    filter 0.3s ease;
  aspect-ratio: 1/1; /* Default aspect ratio */
  grid-column: span 1;
  grid-row: span 1;
  cursor: pointer;
  pointer-events: auto; /* Ensure images are clickable */
  -webkit-user-drag: none; /* Keep preventing drag */
}

.gallery-images img:hover {
  box-shadow: 0 0 10px var(--color2);
  filter: brightness(0.7);
}

/* Fade out and slightly scale down hidden images */
.gallery-images img.filtered-out {
  opacity: 0;
  transform: scale(0.8);
  pointer-events: none;
}

/* Custom sizing for certain aspect ratios */
.gallery-images img[data-size="wide"] {
  grid-column: span 2;
  grid-row: span 1;
  aspect-ratio: 2/1;
}

.gallery-images img[data-size="ultra-wide"] {
  grid-column: span 3;
  grid-row: span 1;
  aspect-ratio: 3/1;
}

.gallery-images img[data-size="tall"] {
  grid-column: span 1;
  grid-row: span 2;
  aspect-ratio: 1/2;
}

.gallery-images img[data-size="ultra-tall"] {
  grid-column: span 1;
  grid-row: span 3;
  aspect-ratio: 1/3;
}

.gallery-images img[data-size="regular"] {
  grid-column: span 1;
  grid-row: span 1;
  aspect-ratio: 1/1;
}

/* 🟢 Image Modal */
.modal {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: var(--color1);
  justify-content: center;
  align-items: center;
  overflow: hidden;
  /* flex-direction: row; */
  padding: 1rem; /* Add padding around the modal content area */
  z-index: 200; /* Ensure modal is on top */
}

.modal-content {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 100%;
}

/* Container for positioning, NOT for sizing */
.modal-image-container {
  position: relative; /* Context for absolute positioning inside */
  display: flex;
  justify-content: center;
  align-items: center;
  /* Let the image define the size based on its rules */
  line-height: 0;
}
/* Show info when hovering the IMAGE CONTAINER */
.modal-image-container:hover .modal-info {
  opacity: 1;
  pointer-events: auto; /* Allow interaction with text/links inside when visible */
}
/* Restore original modal image sizing logic */
.modal img {
  display: block;
  object-fit: contain; /* Scale while preserving aspect ratio */
  margin: 0; /* Let container handle centering */
  height: 90vh;

  pointer-events: auto; /* Allow hover on image */
  -webkit-user-drag: none;
}
/* modal actions container */
.modal-actions {
  position: absolute;
  bottom: 1rem; /* Consistent padding */
  left: 1rem; /* Consistent padding */
  z-index: 15; /* Ensure it's above the image and info */
}

.modal-info {
  position: absolute;
  bottom: 4rem; /* distance from bottom */
  left: 50%;
  transform: translateX(-50%);

  display: flex;
  flex-direction: column;

  width: 90%;
  /* consider using width auto instead for title shrink */
  /* width: auto; */
  min-width: min-content;
  max-width: 600px;
  height: auto;
  /* max-height: 20vh; */
  overflow-y: auto;

  padding: 1rem 1.5rem;
  border-radius: 1rem;
  /* text-align: center; */
  z-index: 14; /* Below arrows/close/fullscreen */
  opacity: 0;
  transition: opacity 0.5s ease;
  background: var(--color9);
  pointer-events: none;
  color: var(--color2);
}

.modal-title {
  text-align: left;
  font-size: 1.2rem;
  flex-shrink: 0;
  min-width: 0;
}

.modal-description {
  margin-top: 0.5rem;
  text-align: left;
  color: var(--color10);
  font-size: 1rem;
  word-break: break-word;
  min-width: 0;
}
.modal-description:empty {
  display: none;
}

/* 🟢 Navigation & Buttons */
/* 🔹 Modal Navigation Buttons */
.modal-left,
.modal-right {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  font-size: 2.5rem;
  font-weight: bold;
  color: rgba(242, 242, 242, 0.7);
  cursor: pointer;
  padding: 1rem;
  transition: color 0.3s ease-in-out;
  z-index: 15; /* Above info */

  width: 50px;
  height: 50px;
  display: flex;
  justify-content: center;
  align-items: center;
}
.modal-left {
  left: 2rem;
}

.modal-right {
  right: 2rem;
}

.modal-left:hover,
.modal-right:hover {
  color: var(--color3);
}

.modal-close {
  position: absolute;
  top: 1rem; /* Consistent padding */
  right: 1rem; /* Consistent padding */
  font-size: 2.5rem;
  cursor: pointer;
  color: rgba(242, 242, 242, 0.7); /* Slightly transparent */
  transition: color 0.2s ease;
  line-height: 1;
  z-index: 15; /* Ensure above everything */
  padding: 0.5rem; /* Click area */
}
.modal-close:hover {
  color: var(--color5);
}

/* fullscreen-btn styles */
.fullscreen-btn {
  background-color: transparent;
  transition: color 0.2s ease;
  position: static;
  font-size: 1.5rem;
  cursor: pointer;
  color: var(--color2);
  border: none;
  line-height: 1;
  background: var(--color9);
  padding: 0.5rem;
  border-radius: 0.8rem;
  opacity: 0.5;
  transition: opacity 0.5s ease;
}
.fullscreen-btn:hover {
  color: var(--color5);
  opacity: 1;
}

/* Modal Swipe */
.modal-swipe-area {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 1; /* Lower z-index to ensure buttons are clickable */
}

/* Ensure buttons are above the swipe area */
.modal-close,
.fullscreen-btn,
.modal-left,
.modal-right {
  z-index: 10;
}

/* Scroll Top */
.scroll-top-btn {
  position: fixed;
  bottom: 60px;
  right: 60px;
  background-color: var(--color4);
  color: var(--color2);
  border: 2px solid var(--color3);
  width: 40px;
  height: 40px;
  border-radius: 50%;
  display: flex;
  justify-content: center;
  align-items: center;
  cursor: pointer;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s ease, transform 0.3s ease;
  transform: translateY(20px);
  z-index: 9;
}

.scroll-top-btn:hover {
  background-color: var(--color3);
  color: var(--color4);
}

.scroll-top-btn.visible {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

/* 🟡 Business Card Modal Styles 🟡 */
.business-card-modal {
  display: none;
  position: fixed;
  z-index: 100;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  overflow: hidden;
  opacity: 0;
  transition: opacity 0.3s ease-in;
}

.business-card-modal.active {
  display: flex;
  justify-content: center;
  align-items: center;
  opacity: 1;
}

/* Overlay for background blur */
.modal-overlay {
  position: absolute;
  width: 100%;
  height: 100%;
  background-color: var(--color6);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}

/* Card Content */
.business-card-content {
  position: relative;
  width: 500px;
  height: 300px;
  background-color: var(--color4);
  border: 2px solid var(--color3);
  border-radius: 1vw;
  box-shadow: 0 0 20px var(--color7);
  z-index: 20;
  animation: modalAppear 0.3s ease-out;
}

/* Modal Header with Window Controls */
.modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0 15px;
  background-color: var(--color5);
  border-bottom: 2px solid var(--color3);
  border-radius: 1vw 1vw 0 0;
  flex-shrink: 0;
}

.window-controls {
  display: flex;
  gap: 8px;
}

.control {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background-color: var(--color4);
  border: 1px solid var(--color2);
}

.window-title {
  flex-grow: 1;
  text-align: center;
  font-size: 0.9rem;
  color: var(--color4);
  letter-spacing: 1px;
}

.close-btn {
  font-size: 1.5rem;
  cursor: pointer;
  color: var(--color4);
  transition: color 0.2s;
  line-height: 1.5;
  padding: 0 5px;
}

.close-btn:hover {
  color: var(--color2);
}

/* Card Body */
.card-body {
  display: flex;
  padding: 25px;
  gap: 20px;
  /* height: 90%; */
  height: calc(100% - 38px); /* Adjust height based on header height */
  overflow-y: auto; /* Enable scroll if content overflows */
}

/* Logo Space */
.logo-space {
  width: 100px;
  height: 100px;
  flex-shrink: 0;

  display: flex;
  align-items: center;
  justify-content: center;
}

.logo-placeholder {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border: 2px dashed var(--color3);
  /* border-radius: 100vw; */
  color: var(--color3);
  font-size: 0.8rem;
}

/* Card Information */
.card-info {
  flex-grow: 1;
  min-width: 0;
}

.name {
  font-size: 1.2rem;
  color: var(--color2);
  letter-spacing: 1px;
}

.job-title {
  font-size: 0.8rem;
  color: var(--color3);
  border-bottom: 2px dashed var(--color3);
  padding-bottom: 10px;
  margin-bottom: 10px;
}

.tagline {
  font-size: 1.2rem;
  color: var(--color5);
}

/* Contact Details */
.contact-details {
  margin-bottom: 10px;
}

.email-container {
  display: flex;
  align-items: center;
  gap: 10px;
}

.email-icon {
  font-size: 1.2rem;
  color: var(--color5);
}

.email {
  color: var(--color2);
  text-decoration: none;
  transition: color 0.2s;
}

.email:hover {
  color: var(--color5);
  text-decoration: underline;
}

.name,
.tagline,
.job-title,
.email {
  overflow: hidden;
  text-overflow: ellipsis;
  overflow-wrap: break-word;
  word-break: break-word;
}

/* Social Links */
.social-links {
  display: flex;
  flex-wrap: wrap;
  gap: 15px;
}

.social-icon {
  position: relative;
  display: inline-flex;
  justify-content: center;
  align-items: center;
  width: 36px;
  height: 36px;
  background-color: var(--color1);
  border: 1px solid var(--color3);
  border-radius: 6px;
  transition: all 0.2s ease;
}

.social-icon:hover {
  background-color: var(--color3);
  transform: translateY(-3px);
  z-index: 1;
}

/* Tooltip on hover */
.social-icon:hover::after {
  content: attr(data-tooltip);
  position: absolute;
  bottom: -25px;
  left: 50%;
  transform: translateX(-50%);
  background-color: var(--color5);
  color: var(--color1);
  padding: 2px 8px;
  border-radius: 4px;
  font-size: 0.8rem;
  white-space: nowrap;
  opacity: 1;
  transition: opacity 0.2s ease;
}

/* SVG icon inside the social link */
.icon {
  width: 20px;
  height: 20px;
  fill: var(--color2);
  transition: fill 0.2s ease;
}

.social-icon:hover .icon {
  fill: var(--color1);
}
/* 🟡 End Business Card Modal Styles 🟡 */

/* Footer */
.footer-bottom p {
  position: fixed;
  left: 40px;
  bottom: 40px;
  font-size: 0.75em;
  word-spacing: 2px;
  color: var(--color2);
  z-index: 5;
  transition: opacity 0.3s ease-out, visibility 0.3s ease-out; /* Add transition for fade */
}

.footer-bottom p span {
  color: var(--color3);
  font-size: 0.9em;
  text-decoration: none;
}

.footer-small {
  display: none;
}

.modal-info.modal-info-hidden-fullscreen {
  opacity: 0 !important;
  pointer-events: none !important;
}

/* Animation */
@keyframes modalAppear {
  0% {
    transform: scale(0.8);
    opacity: 0;
  }
  100% {
    transform: scale(1);
    opacity: 1;
  }
}

/* 📱 Responsive Design 📱 */
@media only screen and (max-width: 1400px) {
  main {
    margin-bottom: 4rem;
  }

  .banner {
    top: 30px;
    left: 40px;
  }

  .nav-bar {
    top: 30px;
    right: 40px;
  }

  .gallery-images {
    grid-template-columns: repeat(2, 1fr); /* 2 columns on smaller screens */
    width: 85vw; /* Wider gallery on smaller screens */
    padding: 160px 0; /* Adjust top padding */
  }

  .gallery-buttons {
    flex-direction: row;
    flex-wrap: wrap;
    max-width: 300px;
  }

  .border {
    display: none;
  }

  /* Make carousel elements more compact */
  .carousel-item {
    max-width: 90vw;
    max-height: 75vh;
  }

  /* Reduce indicator size */
  .barcode-indicator {
    bottom: 100px;
  }

  .bar {
    width: 32px;
    height: 12px;
  }

  .bar.active {
    height: 12px;
    width: 18px;
  }

  /* Reduce arrow size and placement */
  .arrow {
    font-size: 2.5rem;
    padding: 200px 20px;
    cursor: pointer;
  }

  .footer-big {
    display: none;
  }

  .footer-small {
    width: 100%;
    display: flex;
    justify-content: center;
    font-size: 1rem;
    transition: opacity 0.3s ease-out, visibility 0.3s ease-out;
  }
  .footer-small p {
    bottom: 0.8rem;
    left: auto;
    right: auto;
    max-width: 90%;
    text-align: center;
  }

  /* Modal adjustments */
  /* .modal-image-container {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
  } */
  .modal img {
    max-height: 85vh;
    /* height: auto;
    width: auto;
    max-width: calc(100vw - 2rem);
    max-height: calc(100vh - 8rem); */
  }
  .modal-info {
    bottom: 0.5rem;
    opacity: 1;
    width: auto;
  }
  .modal-title {
    margin: auto;
    font-size: 0.9rem;
  }

  .modal-description {
    visibility: hidden;
    display: none;
  }

  .gallery-images img[data-size="wide"],
  .gallery-images img[data-size="ultra-wide"] {
    grid-column: span 2;
    grid-row: span 1;
    aspect-ratio: 2/1;
  }

  .gallery-images img[data-size="tall"],
  .gallery-images img[data-size="ultra-tall"] {
    grid-column: span 1;
    grid-row: span 2;
    aspect-ratio: 1/2;
  }

  .gallery-buttons button {
    margin-right: 0.5em;
    font-size: 0.7em;
    padding: 0.2em 0.4em;
  }

  .barcode-indicator {
    bottom: 50px;
    gap: 10px;
  }

  .nav-bar {
    top: 30px;
    right: 30px;
  }

  .gallery-images {
    grid-template-columns: repeat(2, 1fr);
    width: 85vw;
    padding: 160px 0;
  }

  .gallery-dropdown {
    top: 130px;
    left: 40px;
  }

  .gallery-buttons {
    flex-direction: row;
    flex-wrap: wrap;
    max-width: 300px;
    left: 80px;
  }
  .border {
    display: none;
  }

  .footer-big {
    display: none;
  }
}

/* Small screens and mobile devices */
@media only screen and (max-width: 768px) {
  .banner {
    left: 30px;
    top: 30px;
    width: auto;
  }
  .banner h1 {
    font-size: 1.3rem;
  }
  .banner h5 {
    font-size: 0.8rem;
  }

  .nav-bar {
    top: 30px;
    right: 30px;
  }
  .nav-bar ul {
    font-size: 0.8rem;
  }

  .border {
    /* top: 25px;
    left: 25px;
    right: 25px;
    bottom: 25px; */
    display: none;
  }

  .footer-big {
    display: none;
  }

  .footer-small {
    width: 100%;
    display: flex;
    font-size: 0.8em;
  }
  .footer-small p {
    bottom: 5px;
    text-align: center;
    left: 30px;
    right: 30px;
  }

  .barcode-indicator {
    bottom: 50px;
    gap: 8px;
  }

  /* Gallery Adjustments */
  .gallery-border {
    top: 30px;
    left: 15px;
    right: 15px;
    bottom: 30px;
    overflow-y: scroll;
    -webkit-overflow-scrolling: touch;
  }
  ::-webkit-scrollbar {
    width: 0;
    background: transparent;
  }

  .gallery-dropdown {
    top: 110px;
    left: 30px;
  }

  .gallery-buttons {
    top: 150px; /* Position below the dropdown button */
    left: 20px;
    max-width: calc(100vw - 40px);
    flex-direction: row;
    z-index: 5;
    column-gap: 8px;
  }

  .gallery-buttons button {
    border: 1px solid var(--color3);
    background-color: var(--color7);
    box-shadow: 0.5px 1px 1px 1px var(--color4);
    /* comment below elements to make filter buttons fit */
    padding: 0.4em 0.8em;
    font-size: 0.7rem;
  }

  .gallery-border {
    overflow-x: hidden;
    overflow-y: auto;
  }

  ::-webkit-scrollbar {
    width: 0;
  }

  .gallery-images {
    grid-template-columns: repeat(2, 1fr); /* 2 column on mobile */
    padding-top: 180px; /* More space for filter buttons */
    gap: 10px;
    width: 80vw;
    grid-auto-flow: dense;
  }

  .modal img {
    max-height: 80vh;
  }
  .modal-image-container {
    height: calc(100vh - 2rem);
    width: calc(100vw - 4rem);
  }
  .modal-info {
    padding: 0;
    width: auto;
    max-height: 25vh;
    /* max-width: calc(100% - 2rem); */
  }
  .modal-title {
    font-size: 0.9rem;
    background: transparent;
  }

  .modal-left,
  .modal-right {
    font-size: 2rem;
    padding: 15px;
  }

  .modal-close {
    font-size: 2.5rem;
    top: 5px;
    right: 15px;
  }

  .fullscreen-btn {
    display: none;
  }

  .modal-close,
  .fullscreen-btn,
  .modal-left,
  .modal-right {
    padding: 15px;
    z-index: 10;
  }

  /* Fix for touch screen swipe area */
  .modal-swipe-area {
    position: absolute;
    width: 100%;
    height: 100%;
    z-index: 5;
  }

  .scroll-top-btn {
    bottom: 40px;
    right: 40px;
    width: 36px;
    height: 36px;
  }
}

@media screen and (max-width: 600px) {
  .banner {
    top: 25px;
    left: 25px;
  }
  .banner h1 {
    font-size: 1.4rem;
  }
  .banner h5 {
    font-size: 0.6rem;
  }
  .nav-bar {
    top: 25px;
    right: 25px;
  }
  .nav-bar ul {
    font-size: 0.7rem;
  }

  .border {
    top: 20px;
    left: 20px;
    right: 20px;
    bottom: 20px;
    /* Might still hide on very small screens if needed */
    /* display: none; */
  }

  .arrow {
    display: none;
  }

  .gallery-images {
    grid-template-columns: repeat(2, 1fr); /* 2 columns on smaller screens */
    width: auto; /* Wider gallery on smaller screens */
    padding: 160px 0; /* Adjust top padding */
  }

  .gallery-dropdown {
    top: 110px;
    left: 20px;
  }

  .gallery-buttons {
    top: 150px; /* Position below the dropdown button */
    left: 10px;
    max-width: calc(100vw - 40px);
    flex-direction: row;
    z-index: 5;
    column-gap: 8px;
  }

  .gallery-buttons {
    font-size: 0.8rem;
  }

  .modal-header {
    margin: 0;
    height: 5vh;
    padding: 8px 12px;
  }

  .logo-space {
    padding-top: 10px;
  }

  .business-card-content {
    width: 80%;
    max-width: 400px;
    height: auto;
  }

  .card-body {
    flex-direction: column;
    align-items: center;
    padding: 15px;
  }

  .logo-space {
    width: 80px;
    height: 80px;
    margin-top: 15px;
  }

  .card-info {
    text-align: center;
  }

  .social-links {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    grid-auto-rows: auto;
    justify-items: center;
    padding-top: 2.5vh;
    /* justify-content: center;
    flex-direction: column;
    align-items: center;
    gap: 10px; */
  }

  .social-icon {
    width: 3rem;
    height: 3rem;
  }

  .icon {
    width: 2rem;
    height: 2rem;
  }

  .name {
    font-size: 1.1rem;
  }

  .tagline {
    font-size: 0.9rem;
  }

  .job-title {
    font-size: 0.75rem;
  }

  .modal-right,
  .modal-left {
    display: none;
  }

  .modal img {
    max-width: calc(100vw - 2rem);
    max-height: 90vh;
  }

  .modal-title {
    font-size: 1rem;
  }

  .modal-close {
    font-size: 2rem;
    top: 5px;
    right: 10px;
    padding: 5px;
  }

  .fullscreen-btn {
    display: none;
  }
}
