:root {
  --primary: #2f6bff;
  --primary-600: #2a5fe5;
  --primary-700: #244fc0;
  --text: #1b2330;
  --muted: #5f6b7b;
  --bg: #ffffff;
  --card: #ffffff;
  --border: #e6e9ef;
  --chip: #f3f6ff;
  --shadow: 0 6px 20px rgba(21, 34, 66, 0.08);
  --r-md: 14px;
  --r-lg: 18px;
  --r-xl: 24px;
  --s-4: 16px;
  --s-6: 24px;
  --s-8: 32px;
  --s-10: 40px;
  --s-12: 48px;
  --s-16: 64px;
  --s-20: 80px;
  --font: Inter, ui-sans-serif, system-ui, -apple-system, Segoe UI, Roboto,
    "Helvetica Neue", Arial;
  --fs-base: 16px;
  --fs-lg: 18px;
  --fs-2xl: 28px;
  --fs-3xl: 36px;
  --fs-4xl: 44px;
  --fs-5xl: 56px;
  --container: 1180px;
}

/* Base */
* {
  box-sizing: border-box;
}
body {
  margin: 0;
  font-family: var(--font);
  color: var(--text);
  background: url(/img/bg.png) no-repeat center/cover;
  position: relative;
}

body::after {
  content: "";
  position: fixed;
  inset: 0;
  background: rgba(255, 255, 255, 0.8); /* lớp phủ trắng trong suốt */
  z-index: -1;
}

img {
  max-width: 100%;
  display: block;
}
a {
  color: inherit;
  text-decoration: none;
}
.container {
  max-width: var(--container);
  margin-inline: auto;
  padding-inline: var(--s-6);
}
.section {
  padding-block: var(--s-20);
}

/* Button, pill */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 12px 18px;
  border-radius: var(--r-lg);
  border: 1px solid transparent;
  background: var(--primary);
  color: #fff;
  font-weight: 700;
  box-shadow: var(--shadow);
  transition: transform 0.15s ease, background 0.2s ease;
}
.btn:hover {
  transform: translateY(-1px);
  background: var(--primary-600);
}
.btn-outline {
  background: #fff;
  color: var(--primary);
  border-color: var(--primary);
  box-shadow: none;
}
.pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: var(--chip);
  font-weight: 600;
}
.muted {
  color: var(--muted);
}

/* Header */
header {
  position: sticky;
  top: 0;
  z-index: 20;
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: saturate(1.2) blur(8px);
  border-bottom: 1px solid var(--border);
}
.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 0;
}
.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  font-weight: 800;
}
.brand .logo {
  width: 38px;
  height: 38px;
  border-radius: 12px;
  background: url(/img/logo.png);
  background-size: cover;
}
.menu {
  display: none;
  gap: 18px;
  color: var(--muted);
}
.menu a {
  padding: 8px 10px;
  border-radius: 10px;
}
.menu a.active,
.menu a:hover {
  color: var(--primary);
  background: rgba(47, 107, 255, 0.08);
}
.actions {
  display: flex;
  align-items: center;
  gap: 10px;
}
.hamburger {
  display: inline-flex;
  width: 40px;
  height: 40px;
  align-items: center;
  justify-content: center;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: #fff;
}
@media (min-width: 960px) {
  .menu {
    display: flex;
  }
  .hamburger {
    display: none;
  }
}

/* Hero */

.hero-grid {
  display: grid;
  gap: var(--s-8);
  grid-template-columns: 1fr;
  padding: var(--s-10) 0;
}
.hero h1 {
  font-size: clamp(var(--fs-3xl), 5.2vw, var(--fs-5xl));
  line-height: 1.31;
  margin: 0 0 var(--s-4);
}
.hero h1 .highlight {
  color: var(--primary);
}
.lead {
  font-size: var(--fs-lg);
  color: var(--muted);
}
.hero .img-hero {
  width: 100%;
  height: 360px;
  border-radius: var(--r-xl);
  overflow: hidden;
  box-shadow: var(--shadow);
}
.stats {
  display: grid;
  grid-auto-flow: column;
  gap: 12px;
  width: max-content;
  margin-top: var(--s-4);
}
.stat-card {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 20px 18px;
  box-shadow: var(--shadow);
}
.stat-card strong {
  color: var(--primary);
  font-size: 22px;
}
@media (min-width: 1020px) {
  .hero-grid {
    grid-template-columns: 1.12fr 0.88fr;
  }
  .hero .mock {
    height: 420px;
  }
}

/* About */
.about-grid {
  display: grid;
  gap: var(--s-8);
  grid-template-columns: 1fr;
}
@media (min-width: 1000px) {
  .about-grid {
    grid-template-columns: 1.1fr 0.9fr;
  }
}
.bullets {
  display: grid;
  gap: 10px;
  margin: var(--s-4) 0;
}
.bullets .line {
  display: flex;
  gap: 10px;
  align-items: flex-start;
}
.bullets .line i {
  color: var(--primary);
  margin-top: 3px;
}
.about-cards {
  display: grid;
  gap: var(--s-6);
}
@media (min-width: 760px) {
  .about-cards {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}
.card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 18px;
  padding: var(--s-6);
  box-shadow: var(--shadow);
}

/* Services */
/* Services */
.services .cards {
  display: grid;
  gap: var(--s-6);
}
@media (min-width: 640px) {
  .services .cards {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}
@media (min-width: 960px) {
  .services .cards {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

/* Link Tư vấn gói này thẳng hàng */
.services .card .ask {
  margin-top: auto; /* đẩy link xuống đáy */
  display: inline-block;
  color: var(--primary);
  font-weight: 600;
  text-decoration: none;
  transition: color 0.2s ease;
}
.services .card .ask:hover {
  color: var(--primary-600);
}
.services .card {
  display: flex;
  flex-direction: column;
  height: 230px;
  width: 370px;
}
.services .card ul {
  margin: 10px 0 0 0;
  padding-left: 18px;
}
.services .card .ask {
  margin-top: auto; /* đẩy link xuống cuối thẻ card */
  color: var(--primary);
  font-weight: 600;
  text-decoration: none;
}

/* Why */
.why {
  display: grid;
  gap: var(--s-8);
  grid-template-columns: 1fr;
}
@media (min-width: 980px) {
  .why {
    grid-template-columns: 1.1fr 0.9fr;
  }
}
.why .img-kq {
  max-width: 100%;
  border-radius: 26px;
  overflow: hidden;
  border: 1px solid #091b40; /* viền xám nhạt */
}
.img-kq {
  max-width: 100%;
  height: 100%;
  display: block;
}
/* Contact */
/* ===== CONTACT SECTION (exact match) ===== */
#contact.section {
  /* giữ khoảng cách trên/dưới nếu cần */
  padding-block: var(--s-20, 80px);
}

.contact {
  display: grid;
  gap: var(--s-8, 32px);
  grid-template-columns: 1fr;
}
@media (min-width: 980px) {
  .contact {
    grid-template-columns: 1.1fr 0.9fr;
    align-items: start;
  }
}

/* dòng thông tin bên trái với icon */
.info-line {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--text, #1b2330);
  margin: 6px 0;
  font-size: var(--fs-base, 16px);
}
.info-line i {
  color: var(--primary, #2f6bff);
  width: 18px;
  text-align: center;
}

/* khối giờ làm việc / khu vực */
.meta {
  margin-top: var(--s-4, 16px);
  padding: var(--s-4, 16px);
  border: 1px solid var(--border, #e6e9ef);
  border-radius: 12px;
  box-shadow: var(--shadow, 0 6px 20px rgba(21, 34, 66, 0.08));
  background: var(--card, #fff);
  color: #465469;
  line-height: 1.55;
  display: inline-block; /* giống thẻ nhỏ như trong ảnh */
}

/* form bên phải */
form.contact-form {
  background: var(--card, #ffffff);
  border: 1px solid var(--border, #e6e9ef);
  border-radius: 20px;
  box-shadow: var(--shadow, 0 6px 20px rgba(21, 34, 66, 0.08));
  padding: var(--s-6, 24px);
  display: grid;
  gap: var(--s-4, 16px);
}

/* nhãn + input */
form.contact-form label {
  display: block;
  font-weight: 600;
  color: #3a475b;
  margin-bottom: 6px;
}

form.contact-form input,
form.contact-form textarea {
  width: 100%;
  padding: 12px 14px;
  border-radius: 14px;
  border: 1px solid var(--border, #e6e9ef);
  background: #fff;
  outline: none;
  font-size: var(--fs-base, 16px);
  transition: box-shadow 0.15s ease, border-color 0.15s ease;
}

/* hiệu ứng focus giống mock: viền xanh + đổ bóng nhạt */
form.contact-form input:focus,
form.contact-form textarea:focus {
  border-color: var(--primary, #2f6bff);
  box-shadow: 0 0 0 3px rgba(47, 107, 255, 0.15);
}

form.contact-form textarea {
  min-height: 120px;
  resize: vertical;
}

/* 2 ô Email / SĐT trên cùng một hàng desktop */
.row-2 {
  display: grid;
  gap: 12px;
}
@media (min-width: 640px) {
  .row-2 {
    grid-template-columns: 1fr 1fr;
  }
}

/* nút gửi full-width như hình */
form.contact-form .btn {
  width: 100%;
  padding: 14px 20px;
  border-radius: 12px;
  background: var(--primary, #2f6bff);
  color: #fff;
  font-weight: 700;
  border: 0;
  cursor: pointer;
  transition: background 0.2s ease;
}
form.contact-form .btn:hover {
  background: var(--primary-600, #2a5fe5);
}

/* Footer */
footer {
  background: #2f6bff;
  color: #eaf1ff;
  margin-top: var(--s-20);
}
.foot {
  display: grid;
  gap: var(--s-8);
  grid-template-columns: 1fr;
}
@media (min-width: 980px) {
  .foot {
    grid-template-columns: 2fr 1.2fr 1fr;
  }
}
.foot h4 {
  margin: 0 0 10px;
  color: #fff;
}
.foot a {
  color: #eaf1ff;
}
.copyright {
  border-top: 1px solid rgba(255, 255, 255, 0.15);
  padding-block: var(--s-6);
  color: #d7e6ff;
  font-size: 14px;
}
/* ===== Responsive Fixes (append at end) ===== */

/* Nhỏ hơn tablet */
@media (max-width: 959px) {
  /* Container thoáng hơn một chút */
  .container {
    padding-inline: 16px;
  }

  /* Hero */
  .hero .img-hero {
    /* co giãn theo viewport, tránh quá cao ở mobile */
    height: clamp(220px, 50vw, 360px);
  }
  .lead {
    font-size: 16px; /* dễ đọc hơn trên mobile */
  }

  /* Stats: xếp dọc, full width để không tràn ngang */
  .stats {
    grid-auto-flow: row;
    width: 100%;
  }
  .stat-card {
    padding: 16px;
  }
  .stat-card strong {
    font-size: 20px;
  }

  /* Services: bỏ fixed width/height để thẻ tự giãn */
  .services .card {
    width: auto;
    min-height: 220px; /* giữ chiều cao tối thiểu đẹp */
    height: auto; /* cho nội dung cao hơn nếu cần */
  }

  /* About cards: tăng khoảng cách nhẹ */
  .about-cards {
    gap: 18px;
  }

  /* Why image: đảm bảo không vượt quá chiều rộng, bo góc giữ nguyên */
  .why .img-kq {
    border-radius: 20px;
  }

  /* Contact form: khoảng cách nhẹ */
  form.contact-form {
    padding: 20px;
    gap: 12px;
  }
}

/* Điện thoại nhỏ */
@media (max-width: 640px) {
  /* Giảm padding section cho gọn */
  .section {
    padding-block: 48px;
  }

  /* H2/H3 nhỏ lại 1 nhịp để headline không “đè” */
  h2 {
    font-size: 22px;
  }
  h3 {
    font-size: 18px;
  }

  /* Nút: tăng click area nhưng gọn */
  .btn {
    padding: 10px 14px;
  }

  /* Services grid: 1 cột ở màn rất nhỏ (đã có rules 2-3 cột ở breakpoint cao hơn) */
  .services .cards {
    grid-template-columns: 1fr;
    gap: 16px;
  }
  .testimonial-avatar {
    width: 40px;
    height: 40px;
    object-fit: cover; /* giữ tỉ lệ, cắt vừa khung */
    border-radius: 50%;
  }

  /* Nếu có avatar/icon tròn 40px, cho nhỏ lại một chút để căn đều dòng */

  .brand .logo {
    width: 38px !important;
    height: 38px !important;
  }

  /* Footer: xếp dọc gọn */
  .foot {
    gap: 18px;
  }
}

/* Mobile menu mở/đóng (nếu bạn có toggle .is-open bằng JS) */
@media (max-width: 959px) {
  .menu {
    display: none;
    flex-direction: column;
    gap: 8px;
    padding: 10px 0;
  }
  .menu.is-open {
    display: flex;
  }
  .menu a {
    padding: 10px 12px;
    border-radius: 10px;
    background: rgba(47, 107, 255, 0.06);
  }
}
@media (max-width: 959px) {
  .brand .logo {
    width: 52px;
    height: 34px;
  }
}
@media (max-width: 640px) {
  .brand .logo {
    width: 72px !important;
    height: 40px !important;
  }
  .testimonial-avatar {
    width: 40px;
    height: 40px;
    border-radius: 999px;
    object-fit: cover; /* ảnh không bị méo */
  }
}
