*,
*:before,
*:after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: "Roboto", sans-serif;
}

img {
  max-width: 100%;
  width: 100%;
}

.container {
  max-width: 1200px;
  width: 100%;
  margin: 0 auto;
  padding: 0 10px;
}

button {
  text-align: center;
  color: #fff;
  background-color: var(--gray);
  padding: 0.8rem 2.5rem;
  border: none;
  border-radius: 100px;
  cursor: pointer;
  transition: var(--smooth);
}

button:hover {
  background-color: var(--green-l);
  transition: var(--smooth);
}

:root {
  --green: #54b192;
  --green-l: #a4cec0;
  --gray: #3f3d56;
  --smooth: all 0.3s ease-in;
}
/* === Overlay === */
#overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(0, 0, 0, 0.4);
  z-index: 4;
  display: none;
}

/* Màu ban đầu của ảnh */
.change-color-on-hover {
  filter: none;
  position: relative; /* Đảm bảo phần tử cha có position: relative */
}

/* Màu khi trỏ chuột vào */
.change-color-on-hover:hover {
  filter: grayscale(70%);
  transition: filter 0.1s ease-in-out;
}

/* Hiệu ứng chữ "MORE" */
.change-color-on-hover::after {
  content: "View more";
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  color: rgb(255, 255, 255); /* Màu sắc tùy chỉnh */
  font-weight: bold; /* Độ đậm của chữ */
  font-size: 1.2rem; /* Kích thước của chữ */
  opacity: 0; /* Ẩn chữ "MORE" ban đầu */
  /*transition: opacity 0.3s ease-in-out; /* Hiệu ứng opacity */
  z-index: 9999; /* Đảm bảo chữ "MORE" nằm trên hiệu ứng filter */
}

/* Hiển thị chữ "MORE" khi di chuột vào */
.change-color-on-hover:hover::after {
  opacity: 1; /* Hiển thị chữ "MORE" */
}



#overlay.show {
  display: initial;
}

/* === Header === */
header {
  position: absolute;
  width: 100%;
}

.navbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px 0;
}

/* logo */
.navbar__logo img {
  width: 57px;
  height: 57px;
  object-fit: cover;
}

/* menu */
.navbar__links {
  position: fixed;
  top: 0;
  left: 0;
  width: 60%;
  height: 100%;
  background-color: var(--gray);
  z-index: 5;
  transition: var(--smooth);
  transform: translateX(-100%);
  opacity: 0;
}

.navbar__links.navbar__open {
  transform: translateX(0);
  opacity: 1;
  transition: var(--smooth);
}

.navbar__link {
  list-style: none;
  margin: 55px;
}

.navbar__link a {
  text-decoration: none;
  color: #fff;
  font-weight: 300;
  transition: var(--smooth);
}

.navbar__link a:hover {
  color: var(--green);
  transition: var(--smooth);
}

.navbar__btn {
  font-size: 1rem;
  background-color: var(--green);
  margin-left: 45px;
}

/* menu button */
.navbar__icons {
  display: flex;
  justify-content: center;
  align-items: center;
  width: 80px;
  height: 80px;
  cursor: pointer;
  transition: var(--smooth);
  z-index: 6;
}

.navbar__icon {
  width: 45px;
  height: 6px;
  background-color: var(--gray);
  border-radius: 5px;
  transition: var(--smooth);
  position: relative;
}

.navbar__icon:before,
.navbar__icon:after {
  content: "";
  position: absolute;
  width: 45px;
  height: 6px;
  background-color: var(--gray);
  border-radius: 5px;
  transition: var(--smooth);
}

.navbar__icon:before {
  transform: translateY(-12px);
}

.navbar__icon:after {
  transform: translateY(12px);
}

/* button animation */
.open .navbar__icon {
  transform: translateX(-50px);
  background: transparent;
}

.open .navbar__icon:before {
  transform: rotate(45deg) translate(35px, -35px);
}
.open .navbar__icon:after {
  transform: rotate(-45deg) translate(35px, 35px);
}

@media (min-width: 62em) {
  .navbar__links {
    position: initial;
    transform: translateX(0);
    opacity: 1;
    background-color: transparent;
    display: flex;
    justify-content: flex-end;
    align-items: center;
  }
  .navbar__link a {
    color: var(--gray);
  }
  .navbar__icons {
    display: none;
  }
  .navbar__btn {
    background-color: var(--gray);
  }
}

/* Thêm một họa tiết nền màu vàng nhạt cho cả trang web */
body {
  background-image: url("/img/background_2.jpg"); /* Thay 'path_to_your_background_image.jpg' bằng đường dẫn thực đến hình ảnh nền của bạn */
  background-repeat: repeat;
  background-attachment: fixed;  /* Điều này sẽ lặp lại họa tiết nền */
}


/* === Banner === */
#banner {
  position: relative;
  height: 120vh;
  display: flex;
  align-items: center;
}

.banner__img {
  position: absolute;
  top: -7%;
  right: -10%;
  z-index: -5;
}

.banner__heading {
  max-width: 450px;
  margin: 0 auto;
  text-align: center;
  color: var(--gray);
}

.banner__heading h1 {
  font-size: 2.25rem;
  padding-top: 5em;
  margin-bottom: 0.8em;
}

.banner__heading p {
  font-weight: 300;
  line-height: 2em;
  margin-bottom: 1.5em;
}

.banner__dec {
  position: absolute;
  top: 250%;
  left: 0;
  transform: translateX(-60%);
  z-index: -1;
}

.banner__btn {
  font-size: 1rem;
}

.banner__socials {
  margin-top: 3em;
  display: flex;
  justify-content: space-evenly;
  font-size: 1.5rem;
}

.banner__socials a {
  color: var(--gray);
  transition: var(--smooth);
}

.banner__socials a:hover {
  color: var(--green-l);
  transition: var(--smooth);
}

@media (min-width: 62em) {
  .banner__heading {
    text-align: initial;
    margin: 0;
    padding-top: 0;
  }
  .banner__socials {
    justify-content: flex-start;
  }
  .banner__socials a {
    margin-right: 45px;
  }
  .banner__img {
    width: 60%;
  }
}

/* === Things === */
#things {
  position: relative;
  overflow-x: hidden;
  margin-top: -5em;
}

#things h2 {
  text-align: center;
  color: var(--gray);
  margin-bottom: 2em;
}

.things__dec {
  position: absolute;
  top: 0;
  left: 0;
  transform: translateX(-60%);
  z-index: -1;
}

.things__dec:nth-child(2) {
  top: initial;
  left: initial;
  bottom: 15%;
  right: 0;
  transform: translateX(60%);
  z-index: -1;
}

.things__item {
  margin: 3em;
}

.things__item:last-child {
  margin-top: 4em; 
}

.things__item img {
  padding-bottom: 4em;
}

.things__item--heading {
  text-align: center;
  color: var(--gray);
  margin-bottom: 2em;
}

.things__item--heading p {
  font-weight: 300;
  line-height: 2em;
  max-width: 300px;
  margin: 0 auto;
  padding-top: 1em;
}

@media (min-width: 62em) {
  .things__item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin: 0;
  }
  .things__item img {
    width: 40%;
    padding-bottom: 0;
  }
  .things__item--heading {
    width: 45%;
    text-align: initial;
  }
  .things__item--heading p {
    max-width: 500px;
    margin: 0;
  }
  .things__item:nth-child(odd) img {
    order: 2;
    width: 40%;
    padding-bottom: 0;
  }
  .things__item--heading:nth-child(odd) {
    order: 1;
    width: 45%;
    text-align: initial;
  }
}

/* === Works === */
#works {
  padding-top: 10em;
  position: relative;
  overflow-x: hidden;
}

#works h2 {
  text-align: center;
  color: var(--gray);
}

.works__dec {
  position: absolute;
  top: 0;
  left: 0;
  transform: translateX(-60%);
  z-index: -1;
}
.works__dec:nth-child(2) {
  position: absolute;
  top: initial;
  left: initial;
  bottom: 15%;
  right: 0;
  transform: translateX(60%);
  z-index: -1;
}

.works__img--single {
  margin: 2em 0;
}

.works__img--single:nth-child(odd) {
  padding-top: 5em;
}

.works__img--single:nth-child(3) {
  margin-top: -5em;
}

.works__btn {
  text-align: center;
  margin-top: 8em;
}

.works__btn button {
  font-size: 1rem;
}

@media (min-width: 62em) {
  #works h2 {
    margin-bottom: 3em;
  }
  .works__img {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
  }
  .works__img--single {
    margin: 0 5em;
    width: 35%;
  }
  .works__img--single:nth-child(3) {
    margin-top: 0;
  }
}

/* Overlay */
#overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(0, 0, 0, 0.4);
  z-index: 4;
  display: none;
  justify-content: center;
  align-items: center;
}

#overlay.show {
  display: flex;
}

#overlay img {
  max-width: 80%;
  max-height: 80%;
}

#overlay p {
  color: white;
  text-align: center;
  padding: 20px;
}


/* === Footer === */
#footer {
  overflow: hidden;
  position: relative;
  height: 100vh;
  display: flex;
  align-items: center;
}

.footer__img {
  position: absolute;
  top: 0;
  right: 0;
  transform: translateX(20%);
  z-index: -1;
}

.footer__heading {
  max-width: 400px;
  margin-top: 60%;
  text-align: center;
  color: var(--gray);
}

.footer__contact {
  margin-top: 2em;
  display: flex;
  justify-content: space-evenly;
}

.footer__contact a {
  text-decoration: none;
  color: var(--gray);
}

.footer__dec {
  position: absolute;
  bottom: 0;
  left: 0;
  transform: translateX(-45%);
  z-index: -1;
}

@media (min-width: 62em) {
  .footer__img {
    top: -15%;
    right: 0;
    transform: translateX(32%);
    width: 60%;
  }
  .footer__heading {
    text-align: initial;
    margin: 0;
  }
  .footer__contact {
    display: flex;
    justify-content: space-between;
  }
}
.scroll-to-top {
  position: fixed;
  bottom: 20px;
  right: 20px;
  z-index: 999;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.scroll-to-top.show {
  opacity: 1;
}

