@import url("https://fonts.googleapis.com/css2?family=Caudex:ital,wght@0,400;0,700;1,400;1,700&family=DM+Serif+Text:ital@0;1&display=swap");

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  list-style: none;
  text-decoration: none;
  scroll-behavior: smooth;
}

html,
body {
  font-family: "Caudex", serif;
  height: 100%;
  background-color: #fdfdfd;
}

/* HEADER SEACTION  */

.navigation {
  position: absolute;
  top: 0;
  left: 0;
  z-index: 10;
  width: 100%;
  display: flex;
  justify-content: space-between;
  align-items: center;
  transition: all 0.2s ease-in-out;
  padding: 20px 7%;
  max-width: 100%;
}

.logo img {
  max-width: 250px;
}

nav {
  display: flex;
}

nav ul {
  display: flex;
}

.nav-links li {
  margin-right: 25px;
  font-weight: 500;
}

.nav-links a {
  color: #fff;
  text-transform: uppercase;
  font-weight: 900;
}

#menu-icon {
  font-size: 1.875rem;
  color: #fff;
  margin-left: 10px;
  z-index: 10001;
  cursor: pointer;
  display: none;
}

@media screen and (max-width: 800px) {
  /* HEADER SECTION TABLET */

  #menu-icon {
    display: initial;
  }

  .nav-links {
    position: absolute;
    top: -1000px;
    left: 0;
    right: 0;
    display: flex;
    flex-direction: column;
    text-align: left;
    background: #545454;
    transition: all 0.5s ease;
  }

  .nav-links a {
    display: block;
    padding: 0.5rem;
    margin: 1rem;
    color: #f1f1f1;
    font-weight: 500;
    border-left: 3px solid #f1f1f1;
  }

  .nav-links.open {
    top: 0;
  }
}

@media screen and (max-width: 430px) {
  /* HEADER SECTION MOBILE */

  .nav-icons i {
    font-size: 1rem;
  }

  .logo img {
    max-width: 150px;
  }
}

.box {
  padding: 8% 0;
  width: 100%;
  height: 40vh;
  display: flex;
  justify-content: center;
  align-items: center;
  background-image: url(/images/portfolio-bg2.jpg);
  background-position: center;
  background-size: cover;
}

.projects {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 30px;
  justify-content: center; /* 🔹 Center the grid horizontally */
  max-width: 1280px; /* 🔹 Optional: control max width for 3 columns */
  margin: 80px auto; /* 🔹 Center the whole block with auto margins */
}

.project-detail {
  position: relative;
  overflow: hidden;
  cursor: pointer;
  transition: transform 0.3s ease-in-out;
}

.project-detail:hover {
  transform: scale(1.01);
}

.projects a {
  display: block;
  max-width: 355px;
  margin: 0 auto;
}

.image-box {
  width: 100%;
  height: auto;
  object-fit: cover;
  display: block;
  transition: 0.4s ease;
}

.project-title {
  text-align: center;
  font-size: 1.2rem;
  margin-top: 10px;
  color: #545454;
}

/* FOOTER SECTION */

.footer {
  width: 100%;
  background: #f1f1f1;
  text-align: center;
  padding: 30px 10%;
  bottom: 0;
  height: auto;
}

.footer-contact {
  text-align: left;
}

.footer img {
  max-width: 300px;
}

.footer p {
  font-size: 13px;
  color: #545454;
  line-height: 25px;
  text-align: center;
  cursor: pointer;
  margin-bottom: 20px;
}

.footer h2 {
  text-transform: uppercase;
  color: #000;
  margin-bottom: 20px;
}

.footer button {
  padding: 7px 15px;
  background: transparent;
  border-radius: 50px;
  color: #000;
  text-transform: uppercase;
  border: 1px solid #000;
  transition: all 0.5s;
  cursor: pointer;
  font-family: "Caudex", serif;
}

.footer button:hover {
  background: #000;
  color: #f1f1f1;
}

.footer a {
  color: inherit;
}

.policy {
  display: flex;
  justify-content: center;
  font-size: 12px;
  background: #f1f1f1;
}

.policy a {
  margin: 15px 30px;
  color: #545454 !important;
}

.policy a:hover {
  color: #000 !important;
  transition: all 0.4s ease;
}

.copyright {
  background: #545454;
  display: flex;
  justify-content: center;
  align-items: center;
  font-size: 12px;
  color: #f1f1f1;
  padding: 3px 0;
}

@media screen and (max-width: 768px) {
  .box {
    height: 30vh;
  }
  .projects {
    gap: 20px;
  }

  .footer {
    padding: 20px 5%;
  }
  .footer img {
    max-width: 200px;
  }

  .footer p {
    font-size: 12px;
    line-height: 20px;
  }

  .footer h2 {
    font-size: 16px;
  }

  .footer button {
    padding: 6px 12px;
  }

  .policy {
    font-size: 10px;
  }

  .policy a {
    margin: 10px 15px;
  }

  .copyright {
    font-size: 10px;
    padding: 3px 0;
  }
}
