@media screen and (max-width: 1200px) {
  .navbar {
    padding: 0 1.5rem;
  }

  .home-text h1 {
    font-size: 3.5rem;
  }

  .home-text h2 {
    font-size: 2rem;
  }

  .timeline-content img {
    width: 260px;
    height: 180px;
  }
  #hamburger-nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-left: 40px;
    gap: 100px;
    padding-right: 80px;
  }
  .menu-links a:hover {
    background: rgba(246, 4, 4, 0.9);
    color: #fff;
    transform: translateY(-3px) scale(1.05);
    box-shadow: 0 8px 20px rgba(246, 4, 4, 0.6);
  }
  .about-header {
    padding-left: 0.5rem;
  }
  .services-list {
    display: flex;
    flex-direction: column;
    gap: 2.5rem;
  }
  .services article {
    border-right: none;
    border-top: 4px solid #f60404;
  }
  .home,
  .about,
  .services,
  .contact-form,
  .footer {
    width: 100vw;
  }
}

@media screen and (max-width: 992px) {
  #desktop-nav {
    display: none;
  }

  .navbaritems {
    display: block;
  }
  .hamburger-icon {
    width: 30px;
    height: 22px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    cursor: pointer;
  }

  .hamburger-icon span {
    height: 3px;
    width: 100%;
    background: #111;
    border-radius: 5px;
    transition: all 0.3s ease;
  }
  .home-text h1 {
    font-size: 3rem;
  }

  .home-text h2 {
    font-size: 1.8rem;
  }

  .timeline::before {
    display: none;
  }
  .timeline-item::before {
    display: none;
  }

  .timeline-content.left {
    flex-direction: column-reverse;
    padding: 0;
    text-align: center;
  }
  .timeline-content.right {
    flex-direction: column;
    padding: 0;
    text-align: center;
  }

  .timeline-content img {
    width: 100%;
    height: auto;
  }

  .timeline::before {
    left: 20px;
  }

  .timeline-item::before {
    left: 20px;
    transform: none;
  }

  .timeline-content .text-box {
    max-width: 100%;
  }
  .services {
    padding: 5rem 2rem;
  }
  .swiper-slide {
    width: 320px !important;
  }
  .listings .swiper-button-prev {
    left: 5px;
  }

  .listings .swiper-button-next {
    right: 5px;
  }
  .section-title {
    margin-left: 0px;
  }
  .overlay {
    top: 510px;
    left: 290px;
  }
  .footer-container {
    display: none;
  }
  .mobile {
    margin: auto;
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 2rem;
    align-items: center;
    text-align: center;
  }
}

@media screen and (max-width: 768px) {
  .eric-tumu {
    font-size: 6px;
  }
  .scroll-down::before {
    content: "↓";
    position: absolute;
    top: 5px;
    left: 9px;
    font-size: 1.2rem;
    color: white;
  }

  .navbaritems {
    height: 90px;
    margin-top: -10px;
    width: 100vw;
  }
  .logo-wrapper img {
    width: 60px;
    height: auto;
  }
  .home-text {
    align-items: center;
    text-align: center;
  }

  .home-text h1 {
    font-size: 2.5rem;
  }

  .home-text h2 {
    font-size: 1.5rem;
  }

  .home-text p {
    font-size: 1rem;
  }

  .about-title {
    font-size: 2.2rem;
  }

  .timeline-content {
    gap: 1rem;
  }
  .section-title {
    text-align: left;
  }
  .feature-row,
  .feature-row.reverse {
    flex-direction: column;
    text-align: center;
  }

  .feature-text p {
    max-width: 100%;
  }
  .listings h2 {
    text-align: center;
    font-size: 30px;
    margin-right: 50px;
  }
  .listings .swiper-slide {
    width: 280px !important;
  }
  .listings .swiper-button-prev {
    display: none;
  }

  .listings .swiper-button-next {
    display: none;
  }
  .overlay {
    top: 560px;
    left: 110px;
  }
  .masonry-grid {
    columns: 2;
    column-gap: 0.3rem;
  }

  .masonry-item {
    margin-bottom: 1rem;
    border-radius: 12px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
  }
  .masonry-item:nth-child(3n + 1),
  .masonry-item:nth-child(3n + 2),
  .masonry-item:nth-child(3n + 3) {
    margin-bottom: 0.8rem;
  }

  .masonry-item img {
    width: 100%;
    height: auto;
    border-radius: 12px;
    cursor: pointer;
    transition: transform 0.3s ease;
  }

  .masonry-item img:hover {
    transform: scale(1.05);
  }
  .popup {
    max-width: 250px;
    font-size: 13px;
    padding: 10px 15px;
    top: 120px;
    right: -270px;
  }

  .popup.show {
    right: 10px;
  }
}
.mobile {
  grid-template-columns: repeat(1, 1fr);
}

@media screen and (max-width: 576px) {
  .home {
    padding: 5rem 1rem 1rem;
  }

  .home-text h1 {
    font-size: 2rem;
  }

  .home-text h2 {
    font-size: 1.2rem;
  }

  .home-text p {
    font-size: 0.9rem;
  }

  .btn {
    padding: 0.7rem 1.5rem;
    font-size: 0.9rem;
  }

  .about-title {
    font-size: 2rem;
  }

  .timeline-content img {
    width: 100%;
    height: auto;
  }
  .popup {
    max-width: 200px;
    font-size: 12px;
    padding: 8px 12px;
    line-height: 1.3;
  }
}
@media screen and (orientation: portrait) {
  .lightbox-img {
    max-width: 95%;
    max-height: 70%;
  }
}

@media screen and (orientation: landscape) {
  .lightbox-img {
    max-width: 70%;
    max-height: 95%;
  }
}
