* {
      box-sizing: border-box;
    }

    body {
      font-family: 'Courier New', Courier, monospace;
      margin: 0;
      background: linear-gradient(to bottom, #f2e1c1, #ae4a4a);
    }

    header {
      background-color: #bc8168;
      padding: 10px;
    }

    .menu {
      display: flex;
      align-items: center;
      justify-content: space-between;
      width: 90%;
      margin: auto;
    }

    .logo {
      width: 10%;
    }

    .logo img {
      width: 100%;
    }

    .menu-item {
      width: 20%;
      background-color: rgb(255, 198, 154);
      color: black;
      padding-top: 5px;
      padding-bottom: 5px;
      text-align: center;
      border-radius: 34px;
    }

    .menu-item:hover {
      background-color: #ff9d64;
      box-shadow: 4px 4px 10px rgba(0, 0, 0, 0.3);
    }

    .menu-item a {
      text-decoration: none;
      color: black;
    }

    .menu-item:hover a {
      color: white;
    }

    #sub-menu {
      width: 100%;
      display: none;
      position: absolute;
      top: 29px;
    }

    .sub-menu-item {
      border-bottom: solid white 1px;
      border-radius: 30px;
      width: 100%;
      background-color: #a54848;
      padding: 5px;
      text-align: center;
      color: white;

    }

    #projects {
      position: relative;
    }

    #projects:hover {
      color: white;
    }

    #projects:hover #sub-menu {
      display: block;
      z-index: +10;
    }

    h1 {
        text-align: center;
      }

      .paragraph {
        background-color: #bc8168;
    padding: 10px;
    border-radius: 12px;
    box-shadow: 0 4px 10px rgba(255, 255, 255, 0.1);
    max-width: 1000px;
    margin: auto;
    margin-bottom: 10px;
      }
      
      .paragraph p {
        font-size: 15px;
        text-align: justify;
        color: #ffffff;
    }

    footer {
        background-color: #bc8168;
        text-align: center;
        padding: 15px;
        color: rgb(68, 44, 44);
        width: 100%;
      }
    
.gallery {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 20px;
  width: 90%;
  margin: auto;
  margin-bottom: 40px;
}

.photo-item {
  flex: 1 1 22%; /* default for desktop: 4 columns */
  position: relative;
  box-sizing: border-box;
  border-radius: 8px;
  overflow: hidden;
  text-align: center;
  background-color: #ffd7c2;
  padding: 10px;
}

.photo-item img {
  width: 100%;
        height: auto;
  display: block;
  border-radius: 6px;
  transition: transform 0.7s ease;
}

    .photo-item:hover img {
        transform: scale(1.08);
        box-shadow: 0 12px 25px rgba(0, 0, 0, 0.15);
    }
    
    .caption {
      margin-top: 8px;
  font-size: 16px;
  color: #5a3c3c;
        position: absolute;
        bottom: 0;
        left: 0;
        right: 0;
        padding: 15px;
        background: linear-gradient(transparent, rgba(0, 0, 0, 0.7));
        color: white;
        opacity: 0;
        transform: translateY(20px);
        transition: all 0.4s ease;
    }
    
    .photo-item:hover .caption {
        opacity: 1;
        transform: translateY(0);
    }


    /*for large screens*/
    @media only screen and (min-width: 1280px){
        .menu {
            flex-direction: row;
            gap: 20px;
        }
    }
    
    /*for desktops*/
    @media only screen and (max-width: 1280px) and (min-width: 769px){
        .menu {
            flex-wrap: wrap;
            justify-content: center;
        }
    }
    
    /*for tablets*/
    @media only screen and (max-width: 768px) and (min-width: 481px) {
        .menu {
            flex-direction: column;
            align-items: center;
        }
    
        .menu-item,
        .current {
            width: 80%;
            margin-bottom: 10px;
        }

          .photo-item {
    flex: 1 1 48%;
    margin-bottom: 10px;
  }

    /*for mobile phones*/
    @media only screen and (max-width: 480px) {
        .menu {
            flex-direction: column;
            background-color: #bc8168;
            width: 100%;
        }
    
        .menu-item,
        .current {
            width: 100%;
            margin-bottom: 10px;
        }
    
        #sub-menu {
            top: 25px;
        }
    
        .logo img {
            width: 70px;
        }
    
        .menu-item,
        .current {
            width: 100%;
            font-size: 14px;
            margin-bottom: 5px;
        }
    
        footer {
            font-size: 12px;
            text-align: center;
            padding: 20px;
        }
.gallery {
    display: block !important;
    width: 90% !important;
    margin: 0 auto 40px auto !important;
  }

    .photo-item {
        width: 100%; /* Force photo-item to take up full width */
        flex:none;
        margin-bottom: 10px;
        max-width: 100% !important;
    }

    .caption {
        font-size: 14px;
    }
}
       
    }