html,
body {
  height: 100vh;
  margin: 0;
  flex-direction: column;
}

body {
  font-family: "Carrois Gothic SC";
  font-size: 18px;
}

.carrois-gothic-sc-regular {
  font-family: "Carrois Gothic SC", sans-serif;
  font-weight: 400;
  font-style: normal;
}

.sunflower-medium {
  font-family: "Sunflower", sans-serif;
  font-weight: 300;
  font-style: normal;
}

.sidebar {
  position: relative;
  top: 0;
  background-color: #ffffff;
  padding-top: 1rem;
  border-right: 1px solid #ffffff;
  padding-left: 0.5rem;
  text-transform: uppercase;
}

.sidebar .nav-link {
  color: #000000;
  background-color: white;
  font-size: 12px;
  margin: -6px;
  padding: 10px;
}

.sidebar .nav-link:hover {
  color: #ff7700;
  font-style: italic;
  border-radius: 5px;
}

.sidebar .nav-link a {
  font-size: 10px;
  display: block;
  padding: 4px 0;
  text-transform: none;
  white-space: normal;
}

.dropdown.open .sidebar {
  display: block;
}

.site-title {
  text-decoration: none;
  color: #b7b6b6;
  font-weight: bold;
  font-size: 1rem;
  text-transform: uppercase;
  font-family: "Carrois Gothic SC";
}

.site-title p {
  text-transform: uppercase;
  font-style: normal;
  font-weight: 200;
  font-size: 11px;
  color: #b7b6b6;
  margin-top: -4px;
}

.social-icons a {
  color: #555;
  font-size: 10px;
  transition: color 0.3s;
  margin-left: 0.1rem !important;
}

.social-icons a:hover {
  color: #ff7700;
}

.main-content {
  flex: 1;
  display: flex;
  flex-direction: row;
  overflow: hidden;
}

.sidebar {
  flex: 0 0 170px;
}

main {
  flex: 1;
  overflow-y: auto;
}

footer {
  text-align: center;
  padding: 0;
  font-size: 12px;
  color: #b7b6b6;
  background-color: #fff;
  border-top: 1px solid #eee;
}

footer a {
  color: #b7b6b6;
  text-decoration: none;
}

footer a:hover {
  text-decoration: none;
}

body {
  padding: 0.37em 0;
  background: #ffffff;
}

h2 { 
  display: block;
  font-size: 16px;
  margin-bottom: 0.83em;
  margin-left: 0;
  margin-right: 0;
  font-weight: bold;
  text-align: justify;
  font-family: "Sunflower", sans-serif;
}

h4 { 
  display: block;
  font-size: 14px;
  margin-bottom: 1.33em;
  margin-left: 0;
  margin-right: 0;
  text-align: justify;
  font-family: "Sunflower", sans-serif;
}

/* Styles for lightbox */
:root {
  --lightbox-bg-color: #ffffff;
  --lightbox-caption-text-color: white;
  --lightbox-controls-color: white;
  --lightbox-controls-hover-color: #bf40bf;
}

/* Styles for lightbox */
#lightbox {
  display: none;
  justify-content: center;
  align-items: center;
  position: fixed;
  top: 0;
  left: 0;
  z-index: 5;
  width: 100%;
  height: 100%;
  background: var(--lightbox-bg-color);
  opacity: 0; /* Initial opacity set to 0 */
  transition: opacity 0.5s; /* Cross-fade transition */
}

/* Container for the image and caption */
#lightbox figure {
  max-width: calc(90vw - 100px);
  max-height: calc(90vh - 100px);
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

.lightbox-image {
  width: 60vw;
  height: 100%;
  max-height: calc(100vh - 100px); /* Adjusted to accommodate the caption */
  display: block;
  margin: 0;
  opacity: 0; /* Initial opacity */
  transition: opacity 0.5s; /* Cross-fade transition */
  object-fit: contain;
  aspect-ratio: 4/3;
}

#lightbox-caption {
  color: var(--lightbox-caption-text-color);
  text-align: center;
  width: 100%;
  height: 80px; /* Fixed height for the caption */
  background: rgba(
    0,
    0,
    0,
    0
  ); /* Semi-transparent background for the caption */
  padding: 10px; /* Padding for spacing */
  box-sizing: border-box;
  padding-top: 15px;
}

/* Styling for h2 and p in the caption */
#lightbox-caption h2 {
  font-size: 1.2em; /* Adjust as needed */
  margin: 0;
}

#lightbox-caption p {
  font-size: 0.9em; /* Adjust as needed */
  margin: 0;
}

#close,
#prev,
#next {
  cursor: pointer;
  position: fixed;
  transform: translateY(-50%);
  background: rgba(255, 255, 255, 0.5);
  border: none;
  padding: 10px;
  border-radius: 5px;
  color: #000;
}

#lightbox #close {
  top: 20px;
  right: 10px;
  font-size: 2.2em;
}

#lightbox #close:hover {
  background: var(--secondary-color);
}

#lightbox #close .close-button {
  width: 35px;
  height: 35px;
  background: var(--main-color);
  color: var(--txt-color);
  text-align: center;
  line-height: 35px;
  cursor: pointer;
  -moz-transition: all 0.4s ease;
  -o-transition: all 0.4s ease;
  -webkit-transition: all 0.4s ease;
  transition: all 0.4s ease;
  font-size: 20px;
  box-sizing: border-box;
  padding-left: 2px;
  position: fixed;
  bottom: 10px;
}

#lightbox #prev {
  bottom: 30px;
  right: 70px;
  font-size: 25px;
}

#lightbox #next {
  right: 20px;
  bottom: 30px;
  font-size: 25px;
}

#lightbox #next #prev {
  bottom: 10px;
}

#close:hover,
#prev:hover,
#next:hover {
  background: var(--secondary-color);
}

/* box */

.top-title {
  width: 70vw;
  max-width: 1200px;
  margin: 0 auto;
  padding-bottom: 0px;
  color: #555;
}

.gallery {
  width: 70vw;
  max-width: 1200px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  row-gap: 5px; /* Row gap */
  column-gap: 5px; /* Column gap */
}

.gallery img {
  width: 100%;
  height: auto;
  cursor: pointer;
  transition: transform 0.5s ease, box-shadow 0.5s ease;

  width: 100%;
  height: auto;
  aspect-ratio: 0;
  object-fit: contain;
}

.lightbox-image {
  width: 90vw;
  height: 100%;
  max-height: calc(100vh - 100px);
  display: block;
  margin: 0;
  opacity: 0;
  transition: opacity 0.5s;
  object-fit: contain;
  aspect-ratio: 4/3;
}

.gallery img:hover {
  opacity: 1;
  -webkit-animation: flash 1.5s;
  animation: flash 1.5s;
}
@-webkit-keyframes flash {
  0% {
    opacity: 0.4;
  }
  100% {
    opacity: 1;
  }
}
@keyframes flash {
  0% {
    opacity: 0.4;
  }
  100% {
    opacity: 1;
  }
}

/*  page styles */
body {
  margin: 0;
  padding-bottom: 50vh;
  color: white;
  font-size: calc(16px + 0.25vw);
}

h1 {
  margin-bottom: 1rem;
  text-transform: uppercase;
  font-size: medium;
}

@media (max-width: 980px) {
  .gallery img:hover {
    opacity: 1;
    -webkit-animation: flash 1.5s;
    animation: flash 1.5s;
  }
  @-webkit-keyframes flash {
    0% {
      opacity: 0.4;
    }
    100% {
      opacity: 1;
    }
  }
  @keyframes flash {
    0% {
      opacity: 0.4;
    }
    100% {
      opacity: 1;
    }
  }
}

@media only screen and (max-width: 600px) {
  .top-title {
    width: 90vw;
    padding-bottom: 0;
  }

  .gallery {
    width: 90vw;
    max-width: 1200px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: none;
  }

  .gallery img:hover {
    opacity: 1;
    -webkit-animation: flash 1.5s;
    animation: flash 1.5s;
  }
  @-webkit-keyframes flash {
    0% {
      opacity: 0.4;
    }
    100% {
      opacity: 1;
    }
  }
  @keyframes flash {
    0% {
      opacity: 0.4;
    }
    100% {
      opacity: 1;
    }
  }
}

@media (max-width: 768px) {
  .sidebar {
    position: static;
    width: 100%;
    border-right: none;
  }

  .main-content {
    flex-direction: column;
  }
  footer {
    text-align: center;
  }
}

.top-title p {
  font-size: 13px;
  text-align: justify;
  text-justify: inter-word;
}
