/* styles.css */
*,
*::before,
*::after {
  box-sizing: border-box;
  
  #modalImage {
  touch-action: auto;
  max-width: 90vw;
  max-height: 90vh;
  object-fit: contain;
}
}
body {
  opacity: 0;
  transition: opacity 1s ease-in-out;
  font-family: 'Poppins', sans-serif;
  margin: 0;
  padding: 0;
  background: linear-gradient(rgba(0, 0, 0, 0.5), rgba(0, 0, 0, 0.5)), url("images/background.jpg") no-repeat center center fixed;
  background-size: cover;
  background-color: #111;
  color: #fff;
}
  body.loaded {
  opacity: 1;
}
header {
  background-color: #111;
  color: white;
  width: 100%;
  box-sizing: border-box;
  padding: 20px 0;
}

.header-content {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 20px;
}

.logo {
  width: 150px;
  height: auto;
}

h1 {
  font-size: 2rem;
  margin: 0;
}

.sub-header {
    width: 100vw; 
    background-color: #111;
    color: white;
    text-align: center;
    padding: 1rem 0;
    font-size: 1rem;
    border-top: 1px solid #444;
    border-bottom: 1px solid #444;
    margin: 0; 
    position: relative;
    left: 50%;
    right: 50%;
    transform: translateX(-50%); 
}


.site-title {
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    margin: 0;
    font-size: 2rem;
    white-space: nowrap;
}
nav {
    background-color: rgba(34, 34, 34, 0.8);
    color: white;
    text-align: center;
    padding: 0.5rem 0;
    width: 100%;
}
nav a {
    color: white;
    margin: 0 15px;
    text-decoration: none;
    font-size: 1.2rem;
}
nav a:hover, nav a.active {
    text-decoration: underline;
    font-weight: bold;
}
.contact{
    font-family: 'Poppins', sans-serif;
    background-color: #111;
    color: white;
    padding: 1rem;
    width: 100%;
    max-width: 600px; 
    margin: 0 auto;  
    border-radius: 10px;
    box-sizing: border-box; 
    margin-top: 2rem;
}

.gallery {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 24px;
  padding: 32px 16px;
  justify-items: center;
  align-items: start;
  width: 100%;
  box-sizing: border-box;
  margin: 0 auto; 
  
  
}
.gallery img {
  width: 100%;
  height: 250px;
  cursor: pointer;
  display: block;
  object-fit: cover;
  
}
.gallery-item {
    background-color: rgba(34, 34, 34, 0.9);
    border: 1px solid #444;
    border-radius: 8px;
    overflow: hidden;
    width: 100%;
    max-width: 300px;
    min-height: 380px;
    box-shadow: 0 4px 8px rgba(255, 255, 255, 0.1);
    text-align: center;
    
}

.gallery-item img {
    width: 100%;
    height: 250px;
    object-fit: cover;
    cursor: pointer;
    transition: transform 0.3s ease-in-out;
}

.gallery-item img:hover {
    transform: scale(1.05) rotate(-2deg);
}
.gallery-item .description {
    padding: 8px 16px;
}
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.8);
    justify-content: center;
    align-items: center;
}
.modal img {
    width: 50%;
    height: auto;
}
.modal.show {
    display: flex;
}
.close {
    position: absolute;
    top: 10px;
    right: 25px;
    color: white;
    font-size: 35px;
    font-weight: bold;
    cursor: pointer;
}
.before-after-wrapper {
    display: flex;
    gap: 20px;
    justify-content: center;
    align-items: flex-start;
    flex-wrap: wrap; 
    padding: 20px;
  }
  
  .before-images {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
    max-width: 620px;
  }
  
  .before-images img {
    width: 300px;
    height: 300px;
    object-fit: cover;
    border-radius: 8px;
    cursor: pointer;
  }
  
  
  .after-wrapper {
    width: auto;
    height: auto;
    display: flex;
    align-items: center;
    justify-content: center;
  }
  
  
  .after-image {
    width: 100%;
    max-width: 650px;
    border-radius: 8px;
    cursor: pointer;
  }
  .before-section,
.after-section {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.before-section h3,
.after-section h3 {
  color: #fff;
  margin-bottom: 10px;
  font-size: 1.5rem;
  text-transform: uppercase;
  letter-spacing: 1px;
  border-bottom: 2px solid #555;
  padding-bottom: 5px;
}

.about-section {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    padding: 16px;
    background-color: rgba(0, 0, 0, 0.8);
    border: 1px solid #444;
    border-radius: 8px;
    box-shadow: 0 4px 8px rgba(255, 255, 255, 0.1);
}
.about-section img {
    border-radius: 50%;
    width: 200px;
    height: 200px;
    object-fit: cover;
    margin-bottom: 16px;
    border: 4px solid #444;
    transition: transform 0.3s ease-in-out;
}
.about-section img:hover {
    transform: scale(1.05);
}
.custom-info {
    margin-top: 2rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    padding: 16px;
    margin-bottom: 20px;
    background-color: rgba(0, 0, 0, 0.8);
    border: 1px solid #444;
    border-radius: 8px;
    box-shadow: 0 4px 8px rgba(255, 255, 255, 0.1);
}
main p {
    font-size: 1rem;
    line-height: 1.6;
}
.birdhouse-section {
  font-family: 'Poppins', sans-serif;
  margin-top: 2rem;
  padding: 2rem 1rem;
  background-color: #1a1a1a;
  color: white;
  text-align: center;
}

.birdhouse-banner img {
  width: 100%;
  height: auto;
  border-radius: 8px;
  margin-bottom: 2rem;
}

.birdhouse-gallery {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
  gap: 1rem;
  padding: 1rem;
  max-width: 1000px;
  margin: auto;
  box-sizing: border-box;
}

.birdhouse-gallery img {
  width: 100%;
  height: 200px;
  object-fit: cover;
  border-radius: 8px;
  transition: transform 0.3s ease;
  aspect-ratio: 1 / 1;
  object-fit: cover;
}

.birdhouse-gallery img:hover {
  transform: scale(1.05) rotate(-1deg);
}

.birdhouse-description {
  font-size: 1rem;
  max-width: 800px;
  margin: 0 auto;
  background-color: rgba(0, 0, 0, 0.8);
  text-align: center;
  padding: 1.5rem 2rem; /* Added vertical and horizontal padding */
  border-radius: 8px;
  box-shadow: 0 4px 10px rgba(255, 255, 255, 0.1);
}

.birdhouse-description h2 {
  margin-bottom: 1rem;
}
footer {
  width: 100%;
  text-align: center;
  padding: 1rem 0;
  color: white;
  box-sizing: border-box;
}

/* Sold */
.gallery-item.sold {
  position: relative;
  overflow: hidden;
  opacity: 0.8;
}

.gallery-item.sold::before {
  content: "Myyty";
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  background: rgba(0, 0, 0, 0.7);
  color: #fff;
  font-size: 1rem;
  font-weight: bold;
  padding: 10px 20px;
  border-radius: 8px;
  text-transform: uppercase;
  z-index: 2;
  /* pointer-events: none; */
}

.gallery-item.sold img {
  filter: grayscale(100%) brightness(70%);
 /* pointer-events: none; */
}


@media (max-width: 1024px) and (min-width: 601px) {
  .gallery {
    grid-template-columns: repeat(2, 1fr);
    padding: 12px;
    justify-content: center;
  }
}
@media (max-width: 768px) {
    body {
      padding: 10px;
    }
  
    header {
      flex-direction: column;
      align-items: center;
      text-align: center;
      padding: 10px 0;
    }
    .header-content {
      flex-direction: column;
      gap: 10px;
    }
  
    .logo {
      width: 120px;
    }
  
    h1 {
      font-size: 1.5rem;
      text-align: center;
    }
  
  
    nav {
      flex-direction: column;
      padding: 1rem 0;
    }
  
    nav a {
      display: block;
      margin: 10px 0;
      font-size: 1.1rem;
    }
  
    .gallery {
      flex-direction: column;
      align-items: center;
      gap: 10px;
    }
  
    .before-images {
       display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 10px;
    margin-top: 1rem;
    }
  
     .before-images img {
    width: 40%; 
    max-width: 160px;
    height: auto;
  }
   .after-image {
    width: 80%;
    max-width: 300px;
    height: auto;
    
  }
    
.gallery-item img {
    width: 100%;
    height: auto;
    max-width: 100%;
    display: block;
    margin: 0 auto;
    border-radius: 6px;
}
  
    .gallery-item {
      max-width: 100%;
    }
  
    .about-section img {
      width: 150px;
      height: 150px;
    }
  
    main p {
      font-size: 1rem;
      padding: 0 10px;
    }
  
    .modal img {
      width: 90%;
      height: auto;
    }
    .birdhouse-gallery {
      grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
      gap: 0.75rem;
    }
  
    .birdhouse-description {
      padding: 1.5rem 1rem;
      justify-content: center;
    }
  

  .before-after-wrapper,
  .after-section,
  .before-section {
    padding: 0;
    margin: 0;
  }

  .after-section h3 {
    margin-top: 0;
    margin-bottom: 0.5rem;
  }

  .after-wrapper {
    margin: 0;
    padding: 0;
    width: 100%;
    height: auto;
  }
    .after-wrapper img {
      margin: 0;
      padding: 0;
      max-width: 80%;
    max-height: 300px;
    display: block;
  }

  .after-image {
    width: 80%;
    max-width: 300px;
    height: auto;
    margin: 0 auto;
    display: block;
  }
  }
  
  @media (max-width: 600px) {
    
    .gallery {
      grid-template-columns: 1fr;
      padding: 8px;
    }
  
    .gallery-item {
      max-width: 100%;
      margin: 0 auto;
    }
  
    .gallery-item img {
      width: 100%;
      height: auto;
    }
    .after-section {
  padding: 0;
  margin: 0;
}

.after-wrapper {
  padding: 0;
  margin: 0;
  display: flex;
  justify-content: center;
}

.after-wrapper img {
  max-width: 80%;
  height: auto;
  display: block;
  margin: 0 auto;
}
  }
  @media (max-width: 480px) {
    .before-after-wrapper {
      flex-direction: column;
      align-items: center;
      padding: 10px;
    }
  
    .birdhouse-gallery {
      grid-template-columns: 1fr;
      gap: 0.5rem;
    }
  
    .birdhouse-gallery img {
      height: auto;
      max-height: 250px;
    }
  
    .birdhouse-description {
      padding: 1rem;
    }
  
    .header-content,
    nav {
      flex-direction: column;
    }
    .birdhouse-section {
      padding: 1rem 0.5rem;
    }
  
    .birdhouse-gallery {
      grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
      gap: 0.5rem;
      padding: 0.5rem;
    }
  
    .birdhouse-gallery img {
      height: auto;
      max-height: 220px;
    }

  }

