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

.image-grid {
  display: grid;
  grid-template-columns: repeat(
    auto-fill,
    minmax(150px, 1fr)
  ); /* Auto-fit columns */
  gap: 15px;
  justify-items: center; /* Center-align items horizontally */
  align-items: center; /* Center-align items vertically */
  padding: 20px;
}

/* Styling for individual images */
.image-grid img {
  width: 100%; /* Makes the images responsive */
  height: auto; /* Maintains aspect ratio */
  border-radius: 8px; /* Optional, to give rounded corners */
}

body {
  font-family: Arial, sans-serif;
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

.offer-container {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
  padding: 20px;
  max-width: 1200px;
  margin: 0 auto;
}

.offer-card {
  background-color: #fff;
  border: 1px solid #ddd;
  border-radius: 8px;
  overflow: hidden;
  text-align: center;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.offer-image {
  width: 100%;
  height: auto;
}

.offer-title {
  font-size: 1.25rem;
  margin: 15px 0;
  color: #333;
}

.offer-description {
  font-size: 1rem;
  color: #666;
  padding: 0 10px 15px;
}

/* Styles for lightbox */
#lightbox {
  display: none;
  justify-content: center;
  position: fixed;
  padding: 10px;
  top: 30px;
  z-index: 5;
  width: 100%;
  height: 100%;
  background: #0000008a;
  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: 100px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

.lightbox-image {
  width: 60vw;
  height: 70vh;
  padding-top: 20px;
  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: absolute;
  top: 40vh;
  transform: translateY(-50%);
  background: rgba(255, 255, 255, 0.5);
  border: none;
  padding: 10px;
  border-radius: 5px;
  color: var(--lightbox-controls-color);
}

#lightbox #close {
  top: 35px;
  right: 20px;
  width: 35px;
  height: 35px;
}

#lightbox #close:hover {
  background: rgba(178, 34, 52, 0.95);
}
#lightbox #close {
  text-indent: -9999px;
  cursor: pointer;
}
#lightbox #close:after,
#lightbox #close:before {
  content: "" "";
  width: 55%;
  height: 2px;
  background: #fafafa;
  position: absolute;
  top: 48%;
  left: 22%;
  transform: rotate(-45deg);
  transition: 0.3s ease-out;
}
#lightbox #close:after {
  transform: rotate(45deg);
  transition: 0.3s ease-out;
}
#lightbox #close:hover:after,
#lightbox #close:hover:before {
  transform: rotate(180deg);
}

#lightbox #prev {
  left: 20px;
}

#lightbox #next {
  right: 20px;
}

#close:hover,
#prev:hover,
#next:hover {
  color: var(--lightbox-controls-hover-color);
  transition: all 0.5s ease-in-out;
}

/* Demo styles */

.top-title {
  width: 90vw;
  max-width: 1200px;
  margin: 0 auto;
  padding-bottom: 30px;
  text-align: center;
  text-transform: uppercase;
}

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

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

  width: 100%;
  height: auto;
  aspect-ratio: 4/3;
  object-fit: cover;
}

.gallery img:hover {
  transform: scale(1.05) translateY(-5px);
}
@media (max-width: 980px) {
  .gallery img:hover {
    transform: none;
  }
}

/* Demo page styles */
body {
  margin: 0;
  background-image: url(img/bg-img.jpg);
  color: white;
  line-height: 1.25;
}

h2 {
  margin: 0;
  text-transform: uppercase;
  letter-spacing: 2px;
}
article {
  width: 90vw;
  max-width: 1200px;
  margin: 0 auto;
  text-align: center;
  padding-top: 50px;
}

article a {
  color: white;
  text-decoratin: none;
  text-decoration: none;
  font-size: 150%;
}

article a:hover {
  color: red;
}
article a span {
  font-size: 150%;
  padding-right: 10px;
}

.code-container {
  position: relative;
  background: #292929;

  padding: 0px;
  border-radius: 5px;
}
.code-container pre {
  white-space: pre-wrap;
  word-wrap: break-word;
  background: #111;
  padding: 20px;
}
.copy-button {
  position: absolute;
  top: 10px;
  right: 10px;
  background: #007bff;
  color: white;
  border: none;
  padding: 5px 10px;
  cursor: pointer;
  border-radius: 5px;
}
article li {
  margin-top: 15px;
}
