/* ======= GLOBAL RESET ======= */
body {
  margin: 0;
  font-family: "Mulish", sans-serif;
  font-weight: normal;
  background: #000 url("new/bg.png") no-repeat center center / cover;
  width: 100%;
  height: 100%;
  overflow-x: hidden;
}

a {
  text-decoration: none;
  color: inherit;
}

#bg canvas {
  position: absolute;
  z-index: -1;
}

/* ======= WRAPPER ======= */
#wrap {
  width: 1100px;
  height: 100%;
  display: flex;
  flex-direction: column;
  gap: 20px;
  margin: 0 auto;
  text-align: center;
  z-index: 9999;
  position: relative;
}

/* ======= TYPING TEXT ======= */
.typing h1 {
  color: #fff;
  font-size: 22px;
  text-transform: uppercase;
  text-align: center;
  white-space: nowrap;
  overflow: hidden;
  border-right: 2px solid #fff; /* cursor effect */
  display: inline-block;
  animation: blink 0.7s infinite;
}

@keyframes blink {
  0%, 100% { border-color: transparent; }
  50% { border-color: white; }
}

/* ======= HEADER ======= */
.header {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  padding: 6px 0;
  justify-content: center;
  max-height: 200px;
}

.header .top {
  display: flex;
  flex-direction: row;
  justify-content: space-between;
  width: 100%;
  align-items: center;
}

.header .logo img {
  width: 140px;
}

.header .menu {
  display: flex;
  flex-direction: row;
}

.header .menu a {
  color: #fff;
  font-weight: 600;
  text-transform: uppercase;
  padding-left: 18px;
  font-size: 14px;
}

.header .welcome {
  width: 100%;
  text-align: center;
  display: flex;
  justify-content: center;
  align-items: center;
}

.header .welcome h1 {
  color: #fff;
  font-size: 22px;
  text-transform: uppercase;
  margin: 0;
  line-height: 1;
}

/* ======= BOX WRAP ======= */
.box_wrap {
  display: flex;
  justify-content: center;
  align-items: center;
  height: 100%;
}

/* ======= BOX GRID ======= */
.boxOne_button {
  display: flex;
  flex-direction: row;
  flex-wrap: nowrap;
  gap: 34px;
  border-radius: 22px;
  margin-bottom: 20px;
  width: 100%;
}

/* Hover үед бүх boxOne бүдэг болно */
.boxOne_button:hover .boxOne {
  filter: grayscale(100%);
  opacity: 0.3;
  transition: all 0.3s ease;
}

/* Харин hover хийсэн boxOne тод хэвээр үлдэнэ */
.boxOne_button .boxOne:hover {
  filter: none;
  opacity: 1;
  transform: scale(1.05);
  transition: transform 0.3s ease, filter 0.3s ease, opacity 0.3s ease;
}

/* ======= BOX (Flip Card) ======= */
.boxOne {
  perspective: 1000px;
  width: 25%;
  height: 100%;
  border-radius: 22px;
  background: #171019d1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: space-around;
  padding-bottom: 14px;
}

.card-inner {
  position: relative;
  width: 100%;
  height: 300px;
  transform-style: preserve-3d;
  transition: transform 0.8s;
}

.boxOne:hover .card-inner {
  transform: rotateY(180deg);
}

.card-front,
.card-back {
  position: absolute;
  width: 100%;
  height: 100%;
  backface-visibility: hidden;
  border-radius: 22px;
  top: 0;
  left: 0;
}

.card-front img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 22px;
}

.card-back {
  background: #171019;
  color: #fff;
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 10px;
  transform: rotateY(180deg);
  margin-left: -10px;
}

.card-back p {
  font-size: 16px;
  line-height: 1.4;
  text-align: center;
}

/* ======= BOX CONTENT ======= */
.boxOne h2 {
  color: #fff;
  font-weight: 400;
  font-size: 16px;
  font-family: "Mulish", sans-serif;
  height: 62px;
  display: flex;
  justify-content: center;
  align-items: center;
  margin: 0;
}

.boxOne a {
  color: #fff;
  text-transform: uppercase;
  font-size: 13px;
  border: 1px solid #fff;
  border-radius: 16px;
  padding: 4px 20px;
  display: flex;
  justify-content: center;
  align-items: center;
  width: fit-content;
}

.boxOne a:hover {
  background: #3e3335;
  border: 1px solid #424242;
}

/* ======= RESPONSIVE ======= */
@media (max-width: 980px) {
  #wrap {
    width: calc(100% - 20px);
    gap: 10px;
  }

  .boxOne_button {
    flex-wrap: wrap;
    gap: 12px;
  }

  .boxOne {
    width: calc(50% - 7px);
    height: auto;
  }

  .card-inner {
    height: 200px;
  }

  .header .top {
    flex-direction: column;
    gap: 7px;
    border-bottom: 1px solid #ffffff36;
    padding-bottom: 10px;
    margin-bottom: 8px;
  }

  .boxOne h2 {
    font-size: 14px;
    height: 80px;
    margin-bottom: 10px;
    padding: 0 10px;
  }
}
