/* ============ TOKENS REPLACED DIRECTLY ============ */

html {
  scroll-behavior: smooth;
}

img {
  max-width: 100%;
  display: block;
}
a {
  color: inherit;
  text-decoration: none;
}
.wrap {
  max-width: 1580px;
  margin: 0 auto;
  padding: 0 28px;
}
@media (min-width: 1600px) {
  .wrap {
    max-width: 1320px;
  }
}
@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
  * {
    animation-duration: 0.001ms !important;
    transition-duration: 0.001ms !important;
  }
}
:focus-visible {
  outline: 3px solid #d9a441;
  outline-offset: 3px;
}

/* ============ HERO ============ */
.hero {
  position: relative;
  height: 56vh;
  min-height: 420px;
  max-height: 680px;
  overflow: hidden;
  display: flex;
  align-items: flex-end;
  color: #fff;
}
.hero-img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: auto;
  object-fit: cover;
  object-position: center 40%;
  animation: hero-zoom 14s cubic-bezier(0.22, 0.9, 0.32, 1) both;
}
@keyframes hero-zoom {
  from {
    transform: scale(1.08);
  }
  to {
    transform: scale(1);
  }
}
.hero-scrim {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(
      180deg,
      rgba(183, 236, 187, 0.15) 0%,
      rgba(135, 214, 140, 0.1) 40%,
      rgba(41, 95, 45, 0.85) 100% /* Đổ nền xanh lá đậm */
    ),
    linear-gradient(90deg, rgba(41, 95, 45, 0.55) 0%, rgba(41, 95, 45, 0.1) 55%);
}
.hero-content {
  position: relative;
  z-index: 2;
  padding-bottom: 56px;
  max-width: 620px;
  animation: rise 1s cubic-bezier(0.22, 0.9, 0.32, 1) both;
}
@keyframes rise {
  from {
    opacity: 0;
    transform: translateY(22px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.hero h1 {

  font-size: 20px;
  font-weight: 700;
  margin: 0 0;
  color: #d9a441; /* Chữ tiêu đề nhỏ: vàng */
  -webkit-text-stroke: 1px #d9a441;
  text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
}
.eyebrow {
  font-family: 'Praise', serif;
  font-size: clamp(1.9rem, 3.6vw, 2.7rem);
  line-height: 1.18;
  margin: 0 0 16px;
  color: #ffffff; /* Chữ trên tiêu đề: trắng */
  text-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
  font-weight: 400;
  font-size: 40px;
letter-spacing: 2px;
  font-style: italic;
}

.hero .eyebrow span {
  width: 1000px;
  display: block;
  color: #d9a441; /* Tiêu đề nhấn mạnh: vàng */
  font-style: italic;
  font-weight: 500;
}
.hero-sub {
  font-size: 17px;
  max-width: 440px;
  color: #ffffff; /* Nội dung trên nền đậm: trắng */
  margin: 0 0 28px;
  line-height: 1.6;
  text-align: justify;
}
.btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 15px 30px;
  border-radius: 100px;
  font-weight: 700;
  font-size: 0.95rem;
  letter-spacing: 0.01em;
  transition:
    transform 0.25s cubic-bezier(0.22, 0.9, 0.32, 1),
    box-shadow 0.25s cubic-bezier(0.22, 0.9, 0.32, 1),
    background 0.25s cubic-bezier(0.22, 0.9, 0.32, 1);
  border: none;
  cursor: pointer;
  white-space: nowrap;
}
.btn-primary {
  background: #d9a441; /* Màu button: vàng */
  color: #295f2d; /* Chữ trên nút: xanh lá đậm */
  box-shadow: 0 10px 26px rgba(217, 164, 65, 0.35);
}
.btn-primary:hover {
  transform: translateY(-2px);
  background: #295f2d !important; /* Màu button: xanh lá đậm */
}

@media (max-width: 640px) {
  .hero {
    height: 64vh;
    min-height: 380px;
  }
  .hero h1 {
    font-size: 20px;
  }
  .hero-img {
    height: 100%;
  }

  .hero .eyebrow span {
    width: 350px;
  }
  .eyebrow {
    font-size: 27px;
  }
}

/* ============ SECTION LABELS ============ */
.kicker {
  font-size: 0.76rem;
  font-weight: 700;
  letter-spacing: 0.2em;

  color: #7a4a28;
  margin: 0 0 12px;
}
.kicker.light {
  color: #d9a441;
}
.kicker.center {
  text-align: center;
}
.section-title {
  font-family: 'Praise', serif;
  font-size: clamp(2rem, 3.6vw, 2.9rem);
  margin: 0 0 16px;
  color: #295f2d; /* Tiêu đề: xanh lá đậm */
  letter-spacing: 2px;
}
.section-title.light {
  color: #fbf4e4;
}
.section-title.center {
  text-align: center;

}
.section-lede {
  max-width: 560px;
  margin: 0 auto 56px;
  text-align: center;
  color: #5c5340;
  font-size: 1.02rem;
  line-height: 1.6;
}

/* ============ INTRO ============ */
.intro {
  padding: 110px 0 90px;
  background: #fbf4e4; /* Nền kem dịu mắt */
}
.intro-grid {
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  gap: 70px;
  align-items: center;
}
.intro-copy h2 {
  font-family: 'Praise', serif;
  font-size: clamp(2rem, 3.4vw, 2.7rem);
  color: #295f2d;
  margin: 0 0 22px;
letter-spacing: 2px;
  line-height: 55px;
}
.intro-copy p {
  font-size: 17px;
  line-height: 1.75;
  color: #463f2c;
  margin: 0 0 18px;
  text-align: justify;
}
.intro-stats {
  display: flex;
  gap: 36px;
  margin-top: 34px;
  padding-top: 28px;
  border-top: 1px solid rgba(41, 95, 45, 0.18);
}
.intro-stats div {
  display: flex;
  flex-direction: column;
  width: 25%;
  gap: 10px;
}

.intro-stats strong {
  font-family: 'Praise', serif;
  font-size: 2rem;
  color: #295f2d;
  letter-spacing: 2px;
}
.intro-stats span {
  font-size: 17px;
  color: #7a4a28;
  max-width: 160px;
}

.intro-media {
  position: relative;
  display: flex;
  justify-content: center;
}
.intro-media img {
  border-radius: 24px;
  box-shadow: 0 30px 60px -20px rgba(41, 95, 45, 0.35);
  max-width: 480px;
}
.tag-badge {
  position: absolute;
  top: -18px;
  right: 6px;
  background: #d9a441; /* Badge màu vàng */
  color: #295f2d;
  font-family: 'Praise', serif;
  letter-spacing: 2px;
  font-size: 0.85rem;
  line-height: 1.25;
  text-align: center;
  width: 96px;
  height: 96px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 12px 26px rgba(217, 164, 65, 0.4);
  transform: rotate(9deg);
}

@media (max-width: 900px) {
  .intro-grid {
    grid-template-columns: 1fr;
    gap: 44px;
  }
  .intro-media {
    order: -1;
  }
  .intro-media img {
    max-width: 340px;
  }
}

/* ============ PROCESS (CÂN ĐỐI LẠI CHỮ VÀ ẢNH) ============ */
.process {
  padding: 100px 0 110px;
  background-image: url(../hinhmenu/nen-anh-gioi-thieu.jpg);
}
.process .section-lede {
  max-width: 720px;
}

.process-rows {
  margin-top: 60px;
  display: flex;
  flex-direction: column;
  gap: 56px; /* Thu hẹp khoảng cách giữa các bước một chút cho gọn */
}

.process-row {
  display: grid;
  /* ĐỔI THÀNH: Cột chữ rộng hơn (1.15fr), cột ảnh thu nhỏ lại (0.85fr) */
  grid-template-columns: 1.15fr 0.85fr;
  gap: 60px;
  align-items: center;
}

/* Đảo vị trí hiển thị: ảnh bên phải, chữ bên trái */
.process-row .process-row-media {
  order: 2;
}
.process-row .process-row-text {
  order: 1;
}

/* Các bước có class .reverse: đảo ngược lại (ảnh trái, chữ phải) */
.process-row.reverse .process-row-media {
  order: 1;
}
.process-row.reverse .process-row-text {
  order: 2;
}

/* Khung chứa ảnh: Thu nhỏ kích thước */
.process-row-media {
  border-radius: 16px;
  overflow: hidden;
  /* ĐỔI THÀNH: Tỷ lệ ảnh hẹp hơn (16/10 thay vì 4/3) giúp ảnh không bị quá cao và to */
  aspect-ratio: 16 / 10;
  box-shadow: 0 15px 35px -15px rgba(41, 95, 45, 0.25); /* Giảm shadow cho thanh thoát */
  width: 100%;
  max-width: 440px; /* Khống chế tuyệt đối không cho ảnh phình to quá mức trên màn hình lớn */
  justify-self: center; /* Căn giữa khối ảnh trong vùng của nó */
}

.process-row-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* Khối nội dung chữ */
.process-row-text {
  padding: 10px 0;
}

.process-row-text .step-no {
  display: inline-block;
  font-family: 'Praise', serif;
  font-size: 0.85rem;
letter-spacing: 2px;
  color: #e4633b;
  margin-bottom: 8px;
}

.process-row-text h3 {
  font-family: 'Praise', serif;
  font-size: clamp(1.4rem, 2.2vw, 1.8rem);
  color: #295f2d;
  margin: 0 0 14px;
  letter-spacing: 2px;
}

.process-row-text p {
  font-size: 0.96rem;
  line-height: 1.7;
  color: #544c39;
  margin: 0;
  max-width: 520px; /* Nới rộng độ dài dòng chữ để tương xứng với ảnh */
}

/* ============ RESPONSIVE CHO QUY TRÌNH ============ */
@media (max-width: 820px) {
  .process-row,
  .process-row.reverse {
    grid-template-columns: 1fr; /* Chuyển thành 1 cột đứng trên mobile */
    gap: 16px;
  }

  /* Trên di động: Ưu tiên ảnh nằm trên, chữ nằm dưới cho mọi bước */
  .process-row .process-row-media,
  .process-row.reverse .process-row-media {
    order: 1;
    max-width: 100%; /* Cho phép ảnh co giãn hết cỡ màn hình điện thoại */
    aspect-ratio: 16 / 9; /* Tỷ lệ ảnh chuẩn di động */
  }

  .process-row .process-row-text,
  .process-row.reverse .process-row-text {
    order: 2;
    margin-bottom: 20px;
  }
}
/* ============ PRODUCT DETAIL SECTION (HÌNH NỀN CHÌM 100% KHÔNG LỖI) ============ */
/* ============ PRODUCT DETAIL SECTION (ẢNH NỀN PHỦ SAU) ============ */
.product-detail-section {
  padding: 100px 0;
  position: relative;
  overflow: hidden;

  /* Ảnh nền phủ kín toàn bộ section */
  background-image: url('https://images.unsplash.com/photo-1537191072641-5e19cc173c6a?q=80&w=1170&auto=format&fit=crop&ixlib=rb-4.1.0&ixid=M3wxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHx8fA%3D%3D');
  background-repeat: no-repeat;
  background-position: center;
  background-size: cover;
  background-attachment: scroll;
}

/* Lớp phủ trắng mờ để chữ vẫn đọc rõ trên nền ảnh */
.product-detail-section::before {
  content: '';
  position: absolute;
  inset: 0;
  background: rgba(255, 255, 255, 0.85);
  z-index: 0;
}

/* Đưa nội dung lên trên lớp phủ */
.product-detail-section .detail-grid {
  position: relative;
  z-index: 1;
}

/* Khung lưới chứa nội dung (Tự động đè lên trên hình nền của section) */
.detail-grid {
  display: flex;
  align-items: stretch;
  gap: 60px;
  width: 100%;
  position: relative;
}

/* --- CỘT 1: HỘP THÔNG SỐ & DINH DƯỠNG --- */
.detail-specs-box {
  flex: 1;
  background: rgba(253, 250, 242, 0.95);
  padding: 40px;
  border-radius: 16px;
  border: 1px solid #f1e4c8;
  display: flex;
  flex-direction: column;
  backdrop-filter: blur(8px);
}

.detail-box-title {
  font-family: 'Praise', serif;
  font-size: 1.5rem;
  color: #295f2d;
  margin: 0 0 24px 0;
  padding-bottom: 12px;
  border-bottom: 2px solid #295f2d;
  letter-spacing: 2px;
}

/* Bảng thông số */
.specs-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.95rem;
  color: #544c39;
  flex: 1;
}

.specs-table tr {
  border-bottom: 1px solid #f1e4c8;
}

.specs-table tr:last-child {
  border-bottom: none;
}

.specs-table td {
  padding: 16px 0;
  vertical-align: top;
  line-height: 1.6;
}

.specs-table td:first-child {
  font-weight: 600;
  color: #295f2d;
  width: 30%;
  padding-right: 16px;
}

.specs-table td:last-child {
  width: 70%;
}

.specs-table small {
  color: #8c826b;
  font-size: 0.8rem;
  display: block;
  margin-top: 4px;
}

/* Lưới các chỉ số dinh dưỡng */
.nutrition-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
  background: #ffffff;
  padding: 16px;
  border-radius: 8px;
  border: 1px solid #f1e4c8;
  margin-top: 8px;
}

.nutrition-grid span {
  font-size: 0.9rem;
  color: #544c39;
}

.nutrition-grid b {
  color: #e4633b;
}

/* --- CỘT 2: CÂU CHUYỆN & MÔ TẢ ĐẶC SẢN --- */
.detail-text-box {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.detail-text-box .kicker {
  display: inline-block;
  font-family: 'Praise', serif;
  font-size: 0.85rem;
letter-spacing: 2px;
  color: #e4633b;
  margin-bottom: 12px;
}

.detail-main-title {
  font-family: 'Praise', serif;
  font-size: clamp(1.6rem, 2.5vw, 2.2rem);
  color: #295f2d;
  margin: 0 0 24px 0;
  line-height: 1.3;
  letter-spacing: 2px;

}

.legal-story-content p {
  font-size: 17px;
  line-height: 1.75;
  color: #544c39;
  margin: 0 0 18px 0;
  text-align: justify;
}

.legal-story-content p:last-child {
  margin-bottom: 0;
}

/* ============ RESPONSIVE CHO CHI TIẾT SẢN PHẨM ============ */
@media (max-width: 992px) {
  .detail-grid {
    flex-direction: column;
    gap: 40px;
  }

  .detail-specs-box {
    padding: 30px 24px;
  }

  .specs-table td:first-child {
    width: 35%;
  }

  .specs-table td:last-child {
    width: 65%;
  }

  /* Trên mobile thu nhỏ hình nền dừa lại hoặc dịch chuyển ra ngoài rìa để tránh rối */
  .product-detail-section {
    background-size: 260px auto;
  }
}

@media (max-width: 480px) {
  .nutrition-grid {
    grid-template-columns: 1fr;
    gap: 8px;
  }
}
/* ==========================================================================
   7. HỒ SƠ PHÁP LÝ (LEGAL SECTION)
   ========================================================================== */
/* ============ LEGAL SECTION (HỒ SƠ PHÁP LÝ CHUYÊN NGHIỆP) ============ */
.legal-section {
  background: #fbf4e4; /* Tông màu kem giấy ấm áp */
  padding: 100px 0 110px;
}

.legal-header {
  margin-bottom: 50px;
}

/* Lưới chứa 3 thẻ tài liệu: dàn ngang thanh thoát */
.legal-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr); /* 3 cột đều chằn chặn */
  gap: 30px;
  margin-bottom: 60px;
}

/* Từng thẻ tài liệu: Thiết kế giống bìa hồ sơ tối giản */
.legal-card {
  background: #ffffff;
  padding: 32px 24px;
  border-radius: 12px;
  border: 1px solid #f1e4c8;
  box-shadow: 0 10px 25px -12px rgba(84, 76, 57, 0.12);
  text-align: center;
  transition: all 0.3s ease;
}

/* Hiệu ứng nhấc nhẹ thẻ khi di chuột */
.legal-card:hover {
  transform: translateY(-5px);
  border-color: #295f2d; /* Đổi sang màu xanh thương hiệu khi hover */
  box-shadow: 0 15px 30px -10px rgba(41, 95, 45, 0.15);
}

/* Icon sinh động */
.legal-icon {
  font-size: 2rem;
  margin-bottom: 16px;
  display: inline-block;
  line-height: 1;
}

.legal-card h4 {
  font-family: 'Praise', serif;
  font-size: 1.2rem;
  color: #295f2d;
  margin: 0 0 12px 0;
    letter-spacing: 2px;
}

.legal-card p {
  font-size: 0.92rem;
  line-height: 1.6;
  color: #544c39;
  margin: 0;
}

.legal-card strong {
  color: #e4633b; /* Làm nổi bật số hiệu quyết định/chứng nhận */
}

/* --- KHU VỰC THƯ VIỆN ẢNH CHỨNG NHẬN --- */
.legal-gallery {
  display: flex;
  justify-content: center;
  width: 100%;
}

/* Khung bọc tấm ảnh: Biến thành khung tranh trang trọng */
.legal-image-container {
  width: 100%;
  max-width: 500px; /* Khống chế độ rộng vừa tầm mắt, không bị phình to quá đà */
  background: #ffffff;
  padding: 16px; /* Tạo viền trắng xung quanh như khung tranh bọc bằng khen */
  border-radius: 12px;
  border: 1px solid #f1e4c8;
  box-shadow: 0 20px 45px -20px rgba(84, 76, 57, 0.2);
  text-align: center;
}

.legal-image-container img {
  width: 100%;
  height: auto;
  display: block;
  border-radius: 6px;
  border: 1px solid #eaeaea; /* Viền trong bao quanh ảnh gốc */
  margin-bottom: 14px;
}

/* Dòng chữ chú thích dưới ảnh */
.image-caption {
  font-size: 0.88rem;
  font-style: italic;
  color: #8c826b;
  margin: 0;
  line-height: 1.4;
}

/* ============ RESPONSIVE (MÁY TÍNH BẢNG & DI ĐỘNG) ============ */
@media (max-width: 992px) {
  .legal-grid {
    grid-template-columns: 1fr; /* Trên điện thoại/tablet: 3 thẻ xếp chồng dọc xuống */
    gap: 20px;
  }

  .legal-card {
    padding: 24px;
  }

  .legal-image-container {
    max-width: 100%; /* Trên mobile cho phép bung rộng theo màn hình */
  }
}

/* ============ CERTIFICATES (PHÓNG TO ẢNH TỐI ĐA) ============ */
.certificates {
  background: #fbf4e4;
  padding: 100px 0 110px;
}

.certificates .section-lede {
  max-width: 720px;
  margin: 0 auto 50px auto;
  text-align: center;
}

/* Lưới 3 cột sát nhau hơn để nhường khoảng trống cho ảnh phình to */
.cert-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px; /* Giảm gap xuống để tăng diện tích chiều ngang cho ảnh */
  align-items: start;
  width: 100%;
}

.cert-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}

/* Khung bọc ảnh: Ép mở rộng 100% không giới hạn max-width */
.cert-image {
  width: 100%; /* Đảm bảo khung to bằng chiều rộng tối đa của cột */
  max-width: 100%; /* 🌟 Bỏ giới hạn cũ để ảnh bung to hết cỡ */
  background: #ffffff;
  padding: 10px; /* Thu nhỏ viền trắng tối đa để nhường chỗ cho ảnh béo ra */
  border-radius: 8px;
  box-shadow: 0 12px 30px -10px rgba(84, 76, 57, 0.18);
  transition:
    transform 0.3s ease,
    box-shadow 0.3s ease;
  margin-bottom: 16px;
  box-sizing: border-box; /* Giữ padding không làm phình khung */
}

.cert-image:hover {
  transform: translateY(-6px);
  box-shadow: 0 18px 40px -10px rgba(41, 95, 45, 0.25);
}

/* Ảnh bên trong chiếm trọn 100% khung */
.cert-image img {
  width: 100%;
  height: auto;
  display: block;
  object-fit: contain; /* Đảm bảo ảnh hiển thị nguyên vẹn, không bị mất góc */
  border: 1px solid #eaeaea;
}

/* Phần chữ mô tả (Thu gọn lại để tôn ảnh lên) */
.cert-info h3 {
  font-family: 'Praise', serif;
  font-size: 1.25rem;
  color: #295f2d;
  letter-spacing: 2px;
  margin: 0 0 6px;
}

.cert-info p {
  font-size: 0.9rem;
  line-height: 1.4;
  color: #8c826b; /* Làm mờ chữ đi một chút để người dùng tập trung nhìn vào ảnh */
  max-width: 100%;
  margin: 0;
}

/* ============ RESPONSIVE (MÁY TÍNH BẢNG & DI ĐỘNG) ============ */
@media (max-width: 992px) {
  /* Trên màn hình vừa: Chuyển về 2 cột để ảnh không bị bóp nghẹt */
  .cert-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 30px;
  }
}

@media (max-width: 600px) {
  /* Trên điện thoại: Xếp thành 1 cột đứng, ảnh sẽ tự phóng to tràn màn hình rất dễ đọc */
  .cert-grid {
    grid-template-columns: 1fr;
    gap: 35px;
  }

  .cert-image {
    max-width: 340px; /* Cân đối vừa vặn với chiều ngang tay cầm điện thoại */
  }
}
/* ===== 1. KHU VỰC ĐỊNH NGHĨA HIỆU ỨNG CỦA SCROLL REVEAL ===== */
.reveal-init {
  opacity: 0;
  transform: translateY(40px);
  transition:
    opacity 0.8s cubic-bezier(0.22, 0.9, 0.32, 1),
    transform 0.8s cubic-bezier(0.22, 0.9, 0.32, 1);
  will-change: opacity, transform;
}

/* Biến thể bay từ bên trái vào */
.reveal-left {
  transform: translateX(-50px) translateY(0);
}

/* Biến thể bay từ bên phải vào */
.reveal-right {
  transform: translateX(50px) translateY(0);
}

/* Trạng thái sau khi cuộn tới: Hiện rõ & trở về vị trí chuẩn */
.revealed {
  opacity: 1 !important;
  transform: translate(0, 0) !important;
}

/* Tắt hiệu ứng nếu người dùng bật chế độ giảm chuyển động trên thiết bị */
@media (prefers-reduced-motion: reduce) {
  .reveal-init,
  .reveal-left,
  .reveal-right {
    opacity: 1 !important;
    transform: none !important;
    transition: none !important;
  }
}
