/* =========================
   TOP PAGE — PAGE-SPECIFIC
   ========================= */

/* Hero */
.hero {
  position: relative;
  width: 100%;
  overflow: hidden;
  z-index: 0;
  min-height: 520px;/* đảm bảo đủ cao cho desktop */
  padding-bottom: 160px;/* chừa chỗ cho banner nằm chồng */
  height: 100%;
}
.hero-bg {
  position: absolute;
  inset: 0;
  background-image: url('../image/画像.png');
  background-size: cover;
  background-repeat: no-repeat;
  background-position: center;
  z-index: -1;
  width: 100%;
  height: 100%;
  animation: bgZoom 40s ease-in-out infinite;
}

.overlay {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  width: 100%;
  height: 100%;
  padding: 1.8rem;
}

.hero-content { max-width: 700px; color: #fff; }

.title {
  font-size: 4.5rem;
  font-weight: 800;
  line-height: 1.4;
  color: #fff;
  text-shadow: 1px 1px 2px #000;
  font-family: system-ui;
}

.description {
  font-size: 1.3rem;
  line-height: 1.8;
  font-weight: 600;
  margin-top: 20px;
  color: #fff;
  text-shadow: 1px 1px 2px #000;
  font-family: system-ui;
}

/* Tab content container (nếu dùng tab trong TOP) */
.tab-content {
  max-width: 1440px;
  margin: 40px auto;
  padding: 20px;
  background: #f7f7f7;
}
.tab-pane { display: none; }
.tab-pane.active { display: block; animation: fadeSlideDown 0.4s ease-in-out; }

@keyframes fadeSlideDown {
  from { opacity: 0; transform: translateY(-10px); }
  to   { opacity: 1; transform: translateY(0); }
}

@keyframes bgZoom {
  0% { transform: scale(1); }
  50% { transform: scale(1.1); }
  100% { transform: scale(1); }
}

/* =========================
   NEWS
   ========================= */
.news-section { padding: 60px 20px; background: #f9f9f9; }

.news-grid {
  display: flex;
  justify-content: space-between;
  gap: 40px;
  align-items: flex-start;
}

.news-box {
  background: #717171;
  color: #fff;
  border-radius: 12px;
  flex: 2;
  padding: 20px;
  max-width: 840px;
  width: 100%;
}

.news-title {
  text-align: center;
  font-size: 3rem;
  font-weight: 700;
  margin-bottom: 20px;
  color: #fff;
}

.news-scroll-wrapper { position: relative; display: flex; align-items: center; }

.news-list {
  background: #fff; color: #111; border-radius: 8px;
  max-height: 260px; overflow: hidden; padding: 10px 40px;
  flex: 1; scroll-behavior: smooth; position: relative;
}

/* Nút scroll dọc */
.scroll-buttons { position: absolute; top: 0; bottom: 0; right: 3px; z-index: 2; }
.scroll-btn { background: none; border: none; cursor: pointer;
  width: clamp(24px, 4vw, 32px); height: clamp(20px, 3vw, 24px);
  display: flex; align-items: center; justify-content: center; padding: 0; }
.scroll-btn svg { width: 100%; height: auto; stroke: #999; stroke-width: 1.5; fill: none;
  stroke-linecap: round; stroke-linejoin: round; transition: stroke .3s; }
.scroll-btn:hover svg { stroke: #333; }
.scroll-btn.up   { position: absolute; top: 8px; right: 0; }
.scroll-btn.down { position: absolute; bottom: 8px; right: 0; }

.news-item {
  display: flex; gap: 20px; align-items: flex-start;
  border-bottom: 1px solid #ddd; padding: 12px 0;
}
.news-date   { font-weight: 700; white-space: nowrap; flex: 0 0 100px; }
.news-content{ flex: 1; line-height: 1.6; font-size: .95rem; }

.news-side {
  flex: 1; display: flex; flex-direction: column; gap: 20px;
  max-width: 600px; width: 100%; position: relative;
}

/* =========================
   RECRUIT BANNER (xếp chồng)
   ========================= */


/* =========================
   SIDE LINKS + OVERLAY TEXT
   ========================= */
.side-link {
  position: relative; display: block; overflow: visible;
  border-radius: 4px; box-shadow: 0 2px 6px rgba(0,0,0,.2);
  transition: transform .3s ease; margin-bottom: 30px;
}
.side-link img { width: 100%; display: block; border-radius: 6px; }
.side-link:hover { transform: scale(1.03); }

.overlay-box {
  position: absolute; bottom: 10px; right: 14px; color: #fff; text-align: right;
  font-weight: 700; text-shadow: 2px 2px 4px rgba(0,0,0,.7);
}
.overlay-box .line1 {
  font-size: 2rem; font-weight: 700;
  text-shadow: 0 0 2px #000, 0 0 3px #000, 0 0 4px #000;
  position: relative; bottom: 23px; z-index: 1;
}
.overlay-box .line2 {
  font-size: 1.1rem; font-weight: 500; position: absolute; bottom: -23px; right: 0;
  background: transparent;
  text-shadow: 0 0 2px #000, 0 0 3px #000, 0 0 4px #000; z-index: 2; white-space: nowrap;
}

/* Ô chữ nghiêng theo banner bên phải */
.overlay-box-side {
  position: absolute;
  right: 50px;
  bottom: 44px;
  transform: skewX(-15deg);
  text-align: right;
  color: #fff;
  text-shadow: 2px 2px 4px rgba(0,0,0,.7);
  z-index: 12;
}
.recruit-banner{
  position:absolute;
  right: 20px;                 /* bám mép phải theo viewport */
  bottom: -46px;               /* dịch xuống tỉ lệ theo viewport */
  width:min(90vw, 450px);    /* co giãn, tối đa 450px */
  aspect-ratio: 2.1 / 1;
  display:block;
  overflow:visible;
  z-index:1;
}

/* Layer images */
.layer{
  position:absolute; inset:0;
  width:100%; height:100%;
  object-fit:contain; display:block;
}
.recruit-banner .banner   { z-index:2; top:0; left:0; }
.recruit-banner .overlay-1{z-index:3;top: -8%;left:2%;opacity:1;}
.recruit-banner .line     {z-index:4;top: -6.8%;left:0;}

/* ===== Text block pinned to the right ===== */
.overlay-box-side{
  position:absolute;
  /* inset:0; */
  display:flex;
  align-items:center;
  justify-content:flex-end;
  /* padding-right: clamp(6px, 3vw, 60px); */   /* khoảng cách với mép phải */
  /* padding-top: clamp(6px, 3vw, 0px); */
  text-align:right;
  pointer-events:none; /* chỉ hiển thị, không chắn click */
  bottom: 40px;
  right: 60px;
}

.overlay-box-side > *{ display:block; transform:skewX(12deg); }

/* Font sizes co giãn theo viewport, có giới hạn min/max */
.overlay-box-side .line4{
  color:#ff2a6c;
  font-weight:800;
  font-size: clamp(12px, 3.5vw, 22px);
  line-height:1.6;
  margin:0;
}
.overlay-box-side .line5{
  color:#ff2a6c; font-weight:900;
  font-size:clamp(22px, 8.8vw, 50px);
  line-height:0.95;
  letter-spacing:.09em;
  margin:.1em 0;
}
.overlay-box-side .line6{
  font-size:clamp(10px, 3.2vw, 15px);
  line-height:1.35;
}


/* VN version */
.overlay-box-side.vi{
  position:absolute;
  /* inset:0; */
  display:flex;
  align-items:center;
  justify-content:flex-end;
  /* padding-right: clamp(6px, 3vw, 55px); */   /* khoảng cách với mép phải */
  /* padding-top: clamp(6px, 3vw, 0px); */
  text-align:right;
  pointer-events:none; /* chỉ hiển thị, không chắn click */
  bottom: 40px;
  right: 60px;
}

.overlay-box-side.vi > *{ display:block; transform:skewX(12deg); }

/* Font sizes co giãn theo viewport, có giới hạn min/max */
.overlay-box-side.vi .line4{
  color:#ff2a6c;
  font-weight:800;
  font-size: clamp(12px, 3.0vw, 14px);
  line-height: 1.6;
  margin:0;
}
.overlay-box-side.vi .line5{
  color:#ff2a6c;
  font-weight:900;
  font-size: clamp(22px, 8.8vw, 41px);
  line-height: 0.7;
  letter-spacing: .1em;
  margin:.1em 0;
}
.overlay-box-side.vi .line6{
  font-size:clamp(10px, 3.2vw, 15px);
  line-height:1.35;
}

/* =========================
   TOP PAGE LARGE MENU CARDS
   ========================= */
.top-page-menu { padding: 0 20px; background: #f9f9f9; }
.container-menu { max-width: 1280px; margin: auto; padding: 0 1.5rem; }

.top-page-menu .menu-grid {
  display: flex; width: 100%; flex-direction: column; justify-content: space-between; gap: 40px;
}

.top-page-menu .menu-grid .menu-item {
  display: flex; position: relative; border-radius: 2px;
  background-image: url('../image/元素材.png'); background-size: cover; background-repeat: no-repeat;
  flex-wrap: nowrap; overflow: visible; cursor: pointer;
  transition: transform .3s ease, box-shadow .3s ease;
}
.top-page-menu .menu-grid .menu-item:hover { transform: scale(1.03); box-shadow: 0 10px 20px rgba(0,0,0,.15); }

/* trái: ảnh */
.top-page-menu .menu-grid .menu-item .menu-left {
  flex: 0 0 40%;
  max-width: 40%;
  overflow: visible;
  padding: 1px 5px;
  position: relative;
}
.top-page-menu .menu-grid .menu-item .menu-left .about-avatar { width: 100%; height: 100%; object-fit: cover; display: block; z-index: 1; }
.top-page-menu .menu-grid .menu-item .menu-left .about-layer {
  position: absolute; top: -39px; left: -7px; width: 100%; height: 100%;
  transform: scale(1.3); transform-origin: left top; object-fit: contain; pointer-events: none; z-index: 10;
}

.top-page-menu .menu-grid .menu-item .menu-right {
  flex: 1;
  position: absolute;
  right: 0;
  bottom: -22px;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  align-items: flex-end;
  padding: 1rem 1.2rem;
  z-index: 2;
  max-width: 60%;
  text-align: right;
  overflow-wrap: break-word;   /* chữ dài sẽ tự xuống dòng */
  word-break: break-word;
}

/* Tiêu đề lớn */
.menu-title {
  font-family: system-ui;
  font-size: clamp(2rem, 5vw, 5.5rem); /* auto scale theo viewport */
  font-weight: 500;
  color: #fff;
  margin: 0;
  position: relative;
  transform: translate(10px, -6px) skew(0deg);
  text-shadow: 2px 2px 0 #006c4b, 4px 4px 0 #006c4b, 6px 6px 0 #006c4b;
  text-transform: uppercase;
  letter-spacing: 3px;
  line-height: 1.1;
  /* word-break: break-word; */
}

/* Sub-title nhỏ */
.sub-title {
  font-size: clamp(0.7rem, 1.2vw, 1rem);
  color: #fff;
  margin-bottom: .5rem;
  text-shadow: 1px 1px 2px rgba(0,0,0,.5);
}

/* =========================
   MEDIA QUERIES — PAGE-SPECIFIC
   (Không chứa rule header/nav/mobile-nav)
   ========================= */


@media (max-width: 1260px) {
  .overlay-box .line1 { font-size: 1.4rem; bottom: 12px; }
  .overlay-box .line2 { font-size: .9rem; }
  .title { font-size: 4.1rem; }
  .description { font-size: 1.1rem; }
}


@media (max-width: 1068px) {
  .top-page-menu .menu-grid .menu-item .menu-left .about-layer { top: -32px; left: -4px; }


  .overlay-box .line1 { font-size: 1.2rem; bottom: -6px; }
  .overlay-box .line2 { font-size: .7rem; }
  .title { font-size: 3.8rem; }
  .description { font-size: 1rem; }
}

@media (max-width: 992px) {

  .title { font-size: 3.6rem; }
  .description { font-size: .9rem; }
}

@media (max-width: 900px) {
  .top-page-menu .menu-grid .menu-item .menu-left .about-layer { top: -28px; left: -4px; }



}

@media (max-width: 768px) {
  /* Lưu ý: KHÔNG có rule header/nav ở đây nữa */
  .top-page-menu .menu-grid .menu-item .menu-left .about-layer { top: -24px; left: -4px; }


  .news-grid { flex-direction: column; gap: 30px; }
  .news-box, .news-side { width: 100%; }
  .side-link { width: 100%; top: 0; margin-bottom: 20px; }

  .news-side { flex: 1; display: flex; flex-direction: column; gap: 20px; max-width: 700px; width: 100%; position: relative; bottom: -33px; }


  .overlay-box .line1 { font-size: 2.1rem; bottom: 17px; }
  .overlay-box .line2 { font-size: 1.3rem; bottom: -23px; }

  .title { font-size: 3.5rem; }
  .description { font-size: .8rem; }
}

@media (max-width: 600px) {
    /* Đảm bảo khoảng trống cho banner khi nó không absolute nữa */
  .hero{
    min-height: 420px;
    padding-bottom: 190px;
  }

  /* Khối chữ: luôn nằm trong khung, căn giữa theo khung nghiêng */
  .overlay-box .line1 { font-size: 1.5rem; bottom: 12px; }
  .overlay-box .line2 { font-size: .9rem; }
  /* Font scale theo màn hình để luôn vừa khung */
  .top-page-menu .menu-grid .menu-item .menu-left .about-layer {
    top: -16px;
    left: -4px;
  }
     /* ===== Banner ===== */
  .recruit-banner{
    right: 0px;               /* bám mép phải theo viewport */
    bottom: -21px;             /* hạ xuống theo tỉ lệ */
    width: 100%;              /* luôn thu nhỏ theo màn hình */
    aspect-ratio: 2.05 / 1;   /* giữ tỉ lệ khung */
  }
  .recruit-banner .overlay-1{top: -7.5%;left: 2.5%;}
  .recruit-banner .line{top: -6.2%;left: 0;}

  /* ===== Text “dính” mép phải ===== */
  .overlay-box-side{
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: flex-end;
    text-align: right;
    padding-right: clamp(9px, 16vw, 76px);  /* khoảng cách với mép phải */
    padding-top: clamp(5px, 6.2vw, 3px);
    pointer-events: none;                   /* không chắn click */
    /* bottom: 67px; */
    /* right: 71px; */
  }

  /* Cỡ chữ co giãn mượt */
  .overlay-box-side .line4{
    color:#ff2a6c;
    font-weight:800;
    font-size: clamp(12px, 4.8vw, 26px);
    line-height: 2.5;
    margin: 0px;
  }
  .overlay-box-side .line5{
    color:#ff2a6c;
    font-weight:900;
    font-size: clamp(23px, 10.8vw, 65px);
    line-height: 1;
    letter-spacing: .09em;
    margin: .1em 0;
  }
  .overlay-box-side .line6{
    font-size: clamp(10px, 3.2vw, 15px);
    line-height: 1.35;
  }

/* VN version */
    .overlay-box-side.vi{
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: flex-end;
    text-align: right;
    padding-right: clamp(9px, 16vw, 80px);  /* khoảng cách với mép phải */
    padding-top: clamp(2px, 6.2vw, 3px);
    pointer-events: none;                   /* không chắn click */
    /* bottom: 67px; */
    /* right: 71px; */
  }

  /* Cỡ chữ co giãn mượt */
  .overlay-box-side.vi .line4{
    color:#ff2a6c;
    font-weight:800;
    font-size: clamp(8px, 2.8vw, 14px);
    line-height: 1;
    margin: 0px;
  }
  .overlay-box-side.vi .line5{
    color:#ff2a6c;
    font-weight:900;
    font-size: clamp(23px, 8.8vw, 50px);
    line-height: 1;
    letter-spacing: .09em;
    margin: .1em 0;
  }
  .overlay-box-side.vi .line6{
    font-size: clamp(10px, 3.2vw, 15px);
    line-height: 1.35;
  }
}
@media (max-width: 547px) {
  .menu-title {
    font-size: clamp(1rem, 5vw, 5.5rem);
  }
  .sub-title {
    font-size: clamp(0.5rem, 1.2vw, 1rem);
    color: #fff;
    margin-bottom: .5rem;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, .5);
  }
  .top-page-menu .menu-grid .menu-item .menu-left .about-layer {
    top: -12px;
    left: -4px;
  }
}
@media (max-width: 438px) {
.menu-title {
    font-size: clamp(1rem, 4vw, 5.5rem);
}
.sub-title {
    font-size: clamp(0.5rem, 1.2vw, 1rem);
}
}
@media (max-width: 374px) {
  .menu-title {
    font-size: clamp(0.5rem, 4vw, 5.5rem);
  }
  .top-page-menu .menu-grid .menu-item .menu-left .about-layer {
    top: -9px;
    left: -4px;
  }
}

@media (max-width: 355px) {
  .menu-title {
    font-size: clamp(0.5rem, 3.4vw, 5.5rem);
  }
  .top-page-menu .menu-grid .menu-item .menu-left .about-layer {
    top: -9px;
    left: -4px;
  }
  .sub-title {
    font-size: clamp(0.4rem, 1.2vw, 1rem);
  }
}

@media (max-width: 318px) {
  .menu-title {
    font-size: clamp(0.5rem, 3vw, 5.5rem);
    text-shadow: 1px 1px 0 #006c4b, 2px 2px 0 #006c4b, 2px 2px 0 #006c4b;
  }

}

@media (max-width: 298px) {
  .menu-title {
    font-size: clamp(0.5rem, 2.5vw, 5.5rem);
    text-shadow: 1px 1px 0 #006c4b, 2px 2px 0 #006c4b, 2px 2px 0 #006c4b;
  }

}