* {
  margin: 0;
  padding: 0;
}

body {
  font-family: "Poppins", sans-serif;
}

html {
  scroll-behavior: smooth;
}

p {
  color: rgb(85, 85, 85);
}

/* HEADER */

h1 {
  font-size: 2.5rem;
  text-align: center;
  padding-top: 1vh;
}

h2 {
  font-size: 1rem;
  text-align: center;
  padding-top: 1vh;
  padding-bottom: 1.5vh;
  font-weight: normal;
}

/* SECTIONS */

section {
  padding-top: 4vh;
  height: 96vh;
  margin: 0 10rem;
  box-sizing: border-box;
  min-height: fit-content;
}

.section-container {
  display: flex;
}

body, html {
  width: 100%;
  height: 100%;
}

/* Gallery styles */

.gallery {
  column-count: 6;
  column-gap: 10px;
  width: 100%;
  max-width: none;
  margin: auto;
}

.gallery-item {
  width: 100%;
  margin-bottom: 10px;
  break-inside: avoid;
  display: block;
  height: auto;
  transition: opacity 0.4s ease-in;
}

.gallery-item.lazy {
  /* Placeholder while waiting to load */
  width: 100%;
  height: 250px;
  background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
  background-size: 200% 100%;
  animation: loading 1.5s infinite;
  opacity: 1;
}

.gallery-item.loading {
  /* Active loading state */
  background: linear-gradient(90deg, #e8e8e8 25%, #d0d0d0 50%, #e8e8e8 75%);
  background-size: 200% 100%;
  animation: loading 1.2s infinite;
}

.gallery-item.loaded {
  /* Fully loaded - remove placeholder styles */
  background: none;
  animation: none;
  height: auto;
  opacity: 1;
}

.gallery-item.error {
  /* Error state */
  height: 250px;
  background-color: #ffeeee;
  opacity: 0.6;
}

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

/* Hover effect */
.gallery img:hover {
  opacity: 0.8;
}

/* Style the modal */
.modal {
  display: none;
  position: fixed;
  z-index: 1;
  padding-top: 100px;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  overflow: auto;
  background-color: rgba(0,0,0,0.9);
}

/* Modal Content */
.modal-content {
  margin: auto;
  display: block;
  max-height: 80%;
  max-width: 80%;
  transition: opacity 0.3s ease-in-out;
}

.modal-content.loading {
  opacity: 0.3;
}

/* Caption text */
#caption {
  margin: auto;
  display: block;
  width: 80%;
  max-width: 700px;
  text-align: center;
  color: #ccc;
  padding: 10px 0;
  height: 150px;
}

/* The Close Button */
.close {
  position: absolute;
  top: 15px;
  right: 35px;
  color: #f1f1f1;
  font-size: 40px;
  font-weight: bold;
  transition: 0.3s;
}

/* Navigation buttons inside the modal */
.prev,
.next {
  cursor: pointer;
  position: absolute;
  top: 50%;
  width: auto;
  padding: 16px;
  margin-top: -50px;
  color: white;
  font-weight: bold;
  font-size: 20px;
  transition: 0.6s ease;
  user-select: none;
  -webkit-user-select: none;
}

.next {
  right: 0;
}

.prev {
  left: 0;
}

.prev:hover,
.next:hover {
  background-color: rgba(0,0,0,0.8);
}

.close:hover,
.close:focus {
  color: #bbb;
  text-decoration: none;
  cursor: pointer;
}

/* Adjusted Home Button */
.home-button {
    position: absolute;
    top: 10px; /* Adjust this value to move the button higher or lower */
    left: 10px; /* Adjust this value to position it horizontally */
    font-size: 24px;
    color: black;
    padding: 10px;
    border-radius: 50%;
    text-decoration: none;
    z-index: 1000;
    transition: transform 0.5s ease, color 3s ease;
}

.home-button:hover {
  color: #C41E3A;
  transform: scale(1.8);
}

footer {
  text-align: center;
}
