@font-face {
  font-family: "Avenir";
  src: url("../font/Avenir.ttc");
  font-display: swap;
}
@font-face {
  font-family: "Trebuchet";
  src: url("../font/Trebuchet\ MS.ttf");
  font-display: swap;
}
@font-face {
  font-family: "TrebuchetB";
  src: url("../font/Trebuchet\ MS\ Bold.ttf");
  font-display: swap;
}
@font-face {
  font-family: "TrebuchetBI";
  src: url("../font/Trebuchet\ MS\ Bold\ Italic.ttf");
  font-display: swap;
}
@font-face {
  font-family: "TrebuchetI";
  src: url("../font/Trebuchet\ MS\ Italic.ttf");
  font-display: swap;
}

:root {
  --color-white: #fefefe;
  --color-black: #555;
  --color-black2: #333;
  --color-orange: #ff906f;
  --color-green: #26675f;
  --color-pink: #fff1ed;
  --color-shadow: 0 5px 5px rgba(0, 0, 0, 0.2);
  --font-title: "TrebuchetB";
  --font-subtitle: "Trebuchet";
  --font-normal: "Avenir";
  --size-max-width: 1000px;
  --size-title: 4.2rem;
  --size-title2: 2.7rem;
  --size-subtitle: 2rem;
  --size-normal: 1.2rem;
}

/* MEDIUM DESKTOP */
@media screen and (max-width: 1366px) {
  .amg-about-desc:after {
    bottom: -30px;
  }
}

html {
  scroll-behavior: smooth;
}

* {
  color: var(--color-black);
  text-decoration: none;
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  transition: all 0.375s ease;
}

.amg-navbar-wrapper {
  position: fixed;
  width: 100%;
  z-index: 2;
}

.amg-navbar-container {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  border-radius: 40px;
  max-width: min(1100px, 90%);
  background-color: var(--color-white);
  margin: 15px auto;
  align-items: center;
  justify-items: center;
  padding: 10px;
  box-shadow: var(--color-shadow);
}

.amg-navbar-logo {
  height: 40px;
  width: 108px;
}

.amg-navbar-logo.mobile {
  height: 30px;
  width: 81px;
  display: none;
}

.amg-navbar-link {
  text-decoration: none;
  font-family: var(--font-title);
  color: var(--color-black2);
  opacity: 0.7;
  position: relative;
  white-space: nowrap;
}

.amg-navbar-link.active,
.amg-navbar-link:hover {
  opacity: 1;
}
.amg-navbar-link.active:after {
  content: "";
  display: block;
  position: absolute;
  width: 60%;
  background-color: var(--color-orange);
  height: 3px;
  border-radius: 2px;
  margin-top: 3px;
}

.amg-page-wrapper {
  max-width: var(--size-max-width);
  margin: 0 auto;
  z-index: 1;
  position: relative;
}

#home {
  background: url("../image/background.webp") center/cover no-repeat;
  position: relative;
  padding: 280px 0 240px;
}

#home::after {
  content: "";
  display: block;
  position: absolute;
  inset: 0;
  background-color: rgba(0, 0, 0, 0.5);
}

.amg-home-title {
  color: var(--color-white);
  font-family: var(--font-title);
  font-size: var(--size-title);
  text-align: center;
}

#about {
  background-color: #e9feff;
  background-image: url("../image/pattern-about-us.webp");
  background-repeat: repeat;
  position: relative;
}

.amg-about-bg {
  width: 100%;
}

.amg-about-square {
  position: absolute;
  background-color: #54cbd1;
  height: 100%;
  width: 40%;
  right: 0;
}

.amg-about-wrapper {
  padding: 100px 0;
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  align-items: center;
  gap: 60px;
}

.amg-about-text {
  display: grid;
  gap: 20px;
}

.amg-about-title {
  color: var(--color-green);
  font-family: var(--font-title);
  font-size: var(--size-title2);
}

.amg-about-desc {
  text-align: justify;
  font-family: var(--font-normal);
  font-size: var(--size-normal);
  position: relative;
  color: var(--color-black);
}

.amg-about-desc:after {
  content: "";
  display: block;
  position: absolute;
  width: 350px;
  background-color: var(--color-orange);
  height: 4.5px;
  border-radius: 30px;
  right: -150px;
  bottom: -50px;
  z-index: -1;
}

.amg-about-picframe {
  border-radius: 20px;
  width: 500px;
  height: 400px;
  overflow: hidden;
}

.amg-about-pic,
.amg-sub-pic {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

#sub {
  background-color: var(white);
  padding-top: 70px;
  overflow: hidden;
}

.amg-page-wrapper.sub {
  display: grid;
  grid-template-columns: 1fr;
  row-gap: 30px;
  grid-template-rows: 100px repeat(4, auto 70px);
}

.amg-sub-title {
  text-align: center;
  font-size: var(--size-title2);
  color: var(--color-green);
  font-family: var(--font-title);
}

.amg-sub-wrapper {
  grid-column: span 2;
  display: grid;
  grid-template-columns: 41% 59%;
  row-gap: 30px;
  position: relative;
}

.amg-sub-wrapper:before,
.amg-sub-wrapper:after {
  content: " ";
  background: url("../image/deco1.png") no-repeat;
  background-size: 200px;
  background-position: center;
  position: absolute;
  top: -40px;
  left: calc(0px - ((100vw - var(--size-max-width)) / 2));
  width: 200px;
  height: 200px;
  z-index: -1;
}

.amg-sub-wrapper:after {
  top: auto;
  bottom: -40px;
  left: auto;
  right: calc(0px - ((100vw - var(--size-max-width)) / 2));
  transform: rotate(180deg);
}

.amg-sub-text {
  display: grid;
  gap: 10px;
}

.amg-sub-name {
  color: var(--color-green);
  font-family: var(--font-title);
  font-size: var(--size-subtitle);
  margin: 0;
}

.amg-sub-subname {
  color: var(--color-black2);
  font-family: var(--font-normal);
  font-size: var(--size-normal);
  letter-spacing: 1px;
  margin: 0;
}
.amg-sub-desc {
  font-family: var(--font-normal);
  font-size: var(--size-normal);
  text-align: justify;
  margin: 0;
  padding-left: 30px;
}

.amg-sub-wrapper2 {
  grid-column: span 2;
  position: relative;
  align-self: center;
}

.amg-sub-arrow {
  position: absolute;
  height: 30px;
  width: 30px;
  top: 75px; /* (item height - arrow height(30px))/2 */
  cursor: pointer;
}

.amg-sub-arrow.l {
  left: -5px;
}
.amg-sub-arrow.r {
  right: -5px;
}
.amg-sub-container {
  height: 200px;
}
.amg-sub-item {
  height: 180px;
  width: 180px;
  border-radius: 20px;
  position: relative;
  overflow: hidden;
  margin: 0 auto;
  box-shadow: var(--color-shadow);
}

.amg-sub-separator {
  grid-column-start: span 2;
  width: 50%;
  background-color: var(--color-orange);
  height: 3px;
  justify-self: center;
  align-self: center;
  border-radius: 1.5px;
}

#contact {
  background: url("../image/gradient.webp") no-repeat;
  background-size: cover;
  width: 100%;
  padding: 60px 0;
}

.amg-page-wrapper.contact {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 200px;
}

.amg-contact-container {
  display: grid;
  gap: 20px;
}

.amg-contact-container2 {
  display: grid;
  grid-template-rows: repeat(2, 60px);
  align-content: center;
}

.amg-contact-logo {
  height: 150px;
  width: 403px;
}

.amg-contact-icon {
  height: 40px;
  width: 40px;
}

.amg-contact-item {
  display: grid;
  grid-template-columns: 30px 1fr;
  align-items: center;
  gap: 20px;
}

.amg-contact-text {
  font-family: var(--font-normal);
  padding-left: 20px;
  position: relative;
}

.amg-contact-text:before {
  content: "";
  display: block;
  position: absolute;
  width: 4px;
  background-color: var(--color-orange);
  height: 100%;
  border-radius: 30px;
  left: 5px;
}

.amg-contact-info {
  font-family: var(--font-subtitle);
  color: var(--color-black2);
  font-weight: 700;
  letter-spacing: 1px;
}

#footer {
  background-color: var(--color-black2);
  text-align: center;
  color: var(--color-white);
  font-family: var(--font-normal);
  font-size: var(--size-normal);
  padding: 20px;
}

#footer p {
  color: var(--color-white);
}

/* SMALL DESKTOP */
@media screen and (max-width: 1184px) {
  :root {
    --size-max-width: min(900px, 85%);
  }

  .amg-about-square {
    width: 30%;
  }
  .amg-about-desc:after {
    bottom: -30px;
    width: 300px;
  }
  .amg-about-picframe {
    width: 95%;
    height: 340px;
  }
  .amg-about-wrapper {
    grid-template-columns: 57% 43%;
    gap: 30px;
  }

  .amg-sub-item {
    height: 130px;
    width: 130px;
  }
  .amg-sub-arrow {
    top: 50px; /* (item height - arrow height(30px))/2 */
  }
  .amg-sub-container {
    height: 160px;
  }

  .amg-page-wrapper.contact {
    gap: 60px;
  }
}

/* TABLET*/
@media screen and (max-width: 855px) {
  :root {
    --size-title: 2.7rem;
    --size-title2: 2.2rem;
    --size-normal: 1rem;
    --size-max-width: 690px;
  }

  .amg-page-wrapper.home {
    grid-template-columns: 60% 1fr;
  }

  .amg-about-wrapper {
    grid-template-columns: 50% 50%;
    padding: 90px 0 100px 0;
  }
  .amg-about-picframe {
    width: 320px;
    height: 300px;
  }
  .amg-about-wrapper {
    gap: 30px;
  }
  .amg-about-desc:after {
    width: 200px;
    right: -100px;
    bottom: -15px;
  }

  .amg-page-wrapper.sub {
    row-gap: 20px;
    grid-template-rows: 100px repeat(4, auto 55px);
  }

  .amg-page-wrapper.contact {
    gap: 40px;
  }
  .amg-contact-logo {
    height: 120px;
    width: 336px;
  }
}

/* MOBILE PHONE*/
@media screen and (max-width: 540px) {
  :root {
    --size-title2: 2rem;
    --size-subtitle: 1.7rem;
    --size-max-width: 450px;
  }

  .amg-navbar-logo.pc {
    display: none;
  }
  .amg-navbar-logo.mobile {
    cursor: pointer;
    display: flex;
  }
  .amg-navbar-container.pc {
    display: grid;
    position: absolute;
    grid-template-columns: 1fr;
    border-radius: 40px;
    width: 145px;
    background-color: var(--color-white);
    margin: 15px;
    align-items: center;
    justify-items: flex-start;
    padding: 15px 30px;
    box-shadow: var(--color-shadow);
    gap: 30px;
  }
  .amg-navbar-link.inactive {
    display: none;
  }
  .amg-navbar-container.pc.expanded {
    width: 200px;
    justify-items: flex-start;
    padding: 15px 30px 30px;
  }

  #home {
    padding: 150px 0;
  }
  .amg-page-wrapper.home {
    grid-template-columns: 1fr;
  }
  .amg-home-title {
    text-align: center;
  }

  .amg-about-text {
    gap: 40px;
  }
  .amg-about-title {
    text-align: center;
  }
  .amg-about-desc:after {
    display: none;
  }
  .amg-about-wrapper {
    padding: 50px 0;
    grid-template-columns: 1fr;
    align-items: center;
    gap: 40px;
  }
  .amg-about-square {
    display: none;
  }
  .amg-about-picframe {
    width: 100%;
    height: 200px;
  }

  #sub {
    padding-top: 55px;
  }
  .amg-page-wrapper.sub {
    row-gap: 10px;
    grid-template-rows: 100px repeat(4, auto 45px);
  }
  .amg-sub-text {
    grid-column-start: span 2;
  }
  .amg-sub-name {
    font-size: var(--size-subtitle);
    text-align: center;
  }
  .amg-sub-subname {
    text-align: center;
  }
  .amg-sub-desc {
    grid-column-start: span 2;
    padding-left: 0;
  }
  .amg-sub-wrapper {
    row-gap: 25px;
    grid-template-columns: 50% 50%;
  }
  .amg-sub-container {
    height: 140px;
  }
  .amg-sub-wrapper:before,
  .amg-sub-wrapper:after {
    background-size: 150px;
    width: 150px;
    height: 150px;
    top: 0px;
  }
  .amg-sub-wrapper:after {
    top: auto;
    bottom: 0px;
  }

  #contact {
    padding: 40px 0;
  }
  .amg-contact-container {
    gap: 40px;
  }
  .amg-page-wrapper.contact {
    display: grid;
    grid-template-columns: 1fr;
    gap: 30px;
  }
  .amg-contact-logo {
    height: 90px;
    width: 242px;
  }
  .amg-contact-text {
    text-align: justify;
    padding: 0 20px;
  }
}

@media screen and (max-width: 430px) {
  :root {
    --size-max-width: 350px;
  }
}

/* MOBILE PHONE*/
@media screen and (max-width: 390px) {
  :root {
    --size-max-width: 300px;
  }
}

@media screen and (max-width: 280px) {
  :root {
    --size-title: 2.5rem;
    --size-title2: 1.7rem;
    --size-subtitle: 1.5rem;
    --size-normal: 0.8rem;
    --size-max-width: 240px;
  }

  .amg-navbar-logo.mobile {
    height: 25px;
    width: 67.2px;
  }

  .amg-navbar-container.pc {
    width: 75px;
    margin: 15px;
    padding: 10px 20px;
    box-shadow: var(--color-shadow);
    gap: 30px;
  }
  .amg-navbar-container.pc.expanded {
    width: 150px;
    justify-items: flex-start;
    padding: 10px 20px 20px;
    border-radius: 30px;
  }
  .amg-navbar-link {
    font-size: var(--size-normal);
  }

  .amg-about-text {
    gap: 30px;
  }

  #sub {
    padding-top: 45px;
  }
  .amg-page-wrapper.sub {
    grid-template-rows: 70px repeat(4, auto 45px);
  }
  .amg-sub-wrapper:before,
  .amg-sub-wrapper:after {
    background-size: 130px;
    width: 130px;
    height: 130px;
  }
  .amg-contact-container {
    gap: 30px;
  }
  .amg-contact-logo {
    height: 80px;
    width: 215px;
    margin: 0 auto;
  }
  .amg-contact-text {
    font-size: 0.8rem;
  }
  .amg-contact-icon {
    height: 25px;
    width: 25px;
  }
  .amg-contact-info {
    font-size: 0.8rem;
  }
  .amg-contact-item {
    gap: 8px;
  }
  .amg-contact-container2 {
    display: grid;
    grid-template-rows: repeat(3, 1fr);
    align-content: center;
    gap: 8px;
  }
  .amg-page-wrapper.contact {
    gap: 15px;
  }
}
