/* General Styling */
section.third {
    padding: 2.5rem;
    background-color: #F9FEFF;
    width: 100%;
    box-sizing: border-box;
  }
  
  .third h1 {
    color: #001A72;
    font-size: 3rem;
    text-align: center;
    margin-bottom: 2rem;
  }
  
  .third .services-gallery {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); /* Responsive 3 columns */
    gap: 1rem;
    padding-top: 2rem;
    max-width: calc(4* 280px); /* Maximum width for 3 columns */
    margin: 0 auto; /* Centers the grid */
  }
  
  .third .services-gallery .box {
    position: relative;
    height: 10rem;
    width: 100%;
    overflow: hidden;
    transition: transform 0.3s ease;
  }
  
  .third .services-gallery .box a {
    background-image: url('/AT&T/IMAGES/daniel-mccullough-HtBlQdxfG9k-unsplash.jpg');
    background-size: cover;
    background-position: center;
    display: block;
    height: 100%;
    width: 100%;
    transition: filter 0.5s ease;
    text-decoration: none;
    filter: brightness(90%); /* Lighten the image by default */
  }
  
  .third .services-gallery .box a::after {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.4); /* Lighter overlay */
    z-index: 1;
  }
  
  .third .services-gallery .box p {
    color: white;
    font-weight: bold;
    font-size: large;
    text-align: center;
    position: absolute;
    z-index: 2;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    opacity: 0;
    transition: opacity 0.5s ease;
    pointer-events: none;
  }
  
  .third .services-gallery .box:hover {
    transform: scale(1.05);
  }
  
  .third .services-gallery .box:hover a {
    filter: brightness(60%); /* Slightly darken the image on hover */
  }
  
  .third .services-gallery .box:hover p {
    opacity: 1;
  }
  
  /* Mobile View */
  @media (max-width: 750px) {
    .third h1 {
      font-size: 2.5rem;
    }
  
    .third .services-gallery {
      gap: 1rem;
    }
  
    .third .services-gallery .box {
      height: 8rem;
    }
  
    .third .services-gallery .box a {
      filter: brightness(70%); /* Adjust brightness for mobile view */
    }
  
    .third .services-gallery .box p {
      font-size: medium;
      opacity: 1;  /* Text is always visible on mobile */
      pointer-events: auto;  /* Ensure text is not blocked by the hover rule */
    }
  }
  
  /* Tablet View */
  @media (min-width: 751px) and (max-width: 1200px) {
    .third h1 {
      font-size: 2.75rem;
    }
  
    .third .services-gallery {
      gap: 1.5rem;
    }
  
    .third .services-gallery .box {
      height: 9rem;
    }
  
    .third .services-gallery .box p {
      font-size: large;
    }
  }
  