body, html {
  height: 100%;
  margin: 0;
  font-size: 16px;
  font-family: "Lato", sans-serif;
  font-weight: 400;
  line-height: 1.8em;
  color: #666;
}

.pimg0, .pimg1, .pimg2, .pimg3, .pimg4, .pimg5 {
  position: relative;
  opacity: 0.70;
  background-position: center;
  background-size: cover;
  background-repeat: no-repeat;
  background-attachment: fixed;
  max-height: 300px; /* Set max height for larger screens */
}

.pimg0 {
  background-image: url('../images/about.jpg');
  min-height: 250px;
  max-height: 300px; /* Set max height*/
}

.pimg1 {
  background-image: url('../images/about.jpg');
  min-height: 250px;
  max-height: 300px; /* Set max height */
}

.pimg2 {
  background-image: url('../images/whatwedo.jpg');
  min-height: 250px;
  max-height: 300px; /* Set max height */
}

.pimg3 {
  background-image: url('../images/services.jpg');
  min-height: 2500px;
  max-height: 300px; /* Set max height */
}

.pimg4 {
  background-image: url('../images/team.jpg');
  min-height: 100px;
 /* max-height: 300px; /* Set max height */
}

.pimg5 {
  background-image: url('../images/contact.jpg');
  min-height: 100px;
  max-height: 300px; /* Set max height */
}

.justify {
  text-align: justify;
  padding: 20px 50px;
}

.section {
  text-align: center;
  padding: 20px 50px;
}

.section-home {
  background-color: #100f0f;
  color: #ddd;
}

.section-about {
  background-color: #100f0f;
  color: #ddd;
}

.section-aim {
  background-color: #100f0f;
  color: #ddd;
}

.section-values {
  background-color: #100f0f;
  color: #ddd;
}

.section-team {
  background-color: #100f0f;
  color: #ddd;
}

.section-contact {
  background-color: #100f0f;
  color: #ddd;
}

.ptext {
  position: absolute;
  top: 50%;
  width: 100%;
  text-align: center;
  color: #000;
  font-size: 27px;
  letter-spacing: 8px;
  text-transform: uppercase;
  transform: translateY(-50%);
}

.ptext .border {
  background-color: #111;
  color: #fff;
  padding: 20px;
}

.ptext .border.trans {
  background-color: transparent;
}

a, a:link, a:hover {
  text-decoration: none;
  color: rgb(251, 241, 241);
}

@media (max-width: 768px) {
  .pimg1, .pimg2, .pimg3, .pimg4, .pimg5 {
    background-attachment: scroll;
    min-height: 300px; /* Adjusted for better mobile experience */
    max-height: 400px; /* Set max height for smaller screens */
  }

  .justify, .section {
    padding: 20px 40px;
  }

  .ptext {
    font-size: 20px;
    letter-spacing: 4px;
  }
}

@media (max-width: 568px) {
  .pimg1, .pimg2, .pimg3, .pimg4, .pimg5 {
    min-height: 200px; /* Further adjustment for smaller screens */
    max-height: 300px; /* Set max height for smaller screens */
  }

  .justify, .section {
    padding: 15px 20px;
  }

  .ptext {
    font-size: 18px;
    letter-spacing: 3px;
  }
}

/* Additional CSS for Boxes */
.container {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
  width: 100%;
  max-width: 1400px;
  margin: auto;
}

.box {
  background-color: hsla(54, 98%, 61%, 0.944); /* Yellow color */
  border: 1px solid #ccc;
  border-radius: 8px;
  padding: 20px;
  text-align: center;
  font-size: 1.2em;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
  transition: transform 0.2s, box-shadow 0.2s;
}

.box:hover {
  transform: translateY(-5px);
  box-shadow: 0 8px 16px rgba(0, 0, 0, 0.2);
}

.name {
  font-size: 0.7em;
  color: #494848;
  font-weight: bold;
}

.job-title {
  font-size: .6em;
  color: #494848;
  margin-top: 10px;
}

@media (max-width: 768px) {
  .container {
    grid-template-columns: repeat(3, 1fr);
    gap: 5px;
    width: 100%;
    max-width: 1000px;
    margin: auto;
  }
}

@media (max-width: 480px) {
  .container {
    grid-template-columns: 1fr;
  }
}

/* CSS for Social Media Links */
.social-media {
  text-align: center;
  margin: 20px 0;
}

.social-icon {
  margin: 0 10px;
  font-size: 2em;
  color: #666;
  transition: color 0.3s;
}

.social-icon:hover {
  color: #333;
}

/* CSS for Image Alignment */
img.a {
  vertical-align: baseline;
}

img.b {
  vertical-align: text-top;
}

img.c {
  vertical-align: text-bottom;
}

img.d {
  vertical-align: sub;
}

img.e {
  vertical-align: super;
}

/* Base styles for video */
.video-container video {
  width: 100%;
  height: auto;
}

/* Styles for medium-sized screens (tablets) */
@media (max-width: 768px) {
  .video-container video {
    width: 100%;
    height: auto;
  }
}

/* Styles for small screens (phones) */
@media (max-width: 480px) {
  .video-container video {
    width: 100%;
    height: auto;
  }
}


/* CSS for Video Overlay */
.overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.8);
  display: none;
  justify-content: center;
  align-items: center;
}

.overlay-content {
  position: relative;
  width: 80%;
  max-width: 700px;
  background: #fff;
  padding: 20px;
  text-align: center;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}

.overlay-content video {
  width: 100%;
  height: auto;
}

.close-btn {
  position: absolute;
  top: 10px;
  right: 10px;
  font-size: 30px;
  color: #333;
  cursor: pointer;
}