/* ==========================================================
   TACA TECH – stylesheet dùng chung cho mọi trang
   Muốn đổi màu chủ đạo: sửa các biến trong :root
   ========================================================== */
:root {
  --ink: #0D2B4E;        /* xanh đậm cùng tông logo – nền đậm, chữ tiêu đề */
  --ink-2: #1A4778;
  --signal: #3D87D9;     /* xanh logo TACA – nút chính, điểm nhấn */
  --signal-dark: #2B6DBA;
  --sky: #8FC0F2;        /* xanh nhạt – chấm, nhãn trên nền đậm */
  --paper: #F5F7FA;      /* nền section xen kẽ */
  --white: #FFFFFF;
  --text: #22313F;
  --slate: #5A6B7D;      /* chữ phụ */
  --line: #DAE1E9;
  --ok: #1F8A57;
  --busy: #B4531A;

  --font: "Be Vietnam Pro", system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
  --wrap: 1160px;
  --r-sm: 6px;
  --r-lg: 14px;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 84px; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  margin: 0;
  font-family: var(--font);
  font-size: 1rem;
  line-height: 1.65;
  color: var(--text);
  background: var(--white);
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--ink-2); }
a:hover { color: var(--ink); }
:focus-visible { outline: 3px solid var(--signal); outline-offset: 2px; border-radius: 3px; }

h1, h2, h3, h4 { color: var(--ink); line-height: 1.2; margin: 0 0 .6em; font-weight: 700; letter-spacing: -.01em; }
h1 { font-size: clamp(2rem, 4.2vw, 3.1rem); letter-spacing: -.025em; }
h2 { font-size: clamp(1.6rem, 2.8vw, 2.2rem); }
h3 { font-size: 1.25rem; }
h4 { font-size: 1.05rem; }
p { margin: 0 0 1em; max-width: 68ch; }

.wrap { width: min(var(--wrap), 100% - 40px); margin-inline: auto; }
.section { padding: 84px 0; }
.section--paper { background: var(--paper); }
.section--ink { background: var(--ink); color: #D6E0EA; }
.section--ink h2, .section--ink h3 { color: var(--white); }
.lead { font-size: 1.15rem; color: var(--slate); }
.section-head { margin-bottom: 40px; max-width: 720px; }
.section-head p { color: var(--slate); }
.skip { position: absolute; left: -9999px; }
.skip:focus { left: 12px; top: 12px; z-index: 100; background: var(--white); padding: 8px 14px; }

/* ---------- Nút ---------- */
.btn {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 13px 22px; border-radius: var(--r-sm);
  font: 600 1rem/1 var(--font); text-decoration: none;
  background: var(--signal); color: var(--white); border: 2px solid var(--signal);
  cursor: pointer; transition: background .15s, border-color .15s;
}
.btn:hover { background: var(--signal-dark); border-color: var(--signal-dark); color: var(--white); }
.btn--ghost { background: transparent; color: var(--ink); border-color: var(--ink); }
.btn--ghost:hover { background: var(--ink); color: var(--white); border-color: var(--ink); }
.section--ink .btn--ghost, .hero .btn--ghost { color: var(--white); border-color: rgba(255,255,255,.55); }
.section--ink .btn--ghost:hover, .hero .btn--ghost:hover { background: var(--white); color: var(--ink); }
.btn--sm { padding: 9px 16px; font-size: .95rem; }
.actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 28px; }

/* ---------- Header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(255,255,255,.96); backdrop-filter: blur(6px);
  border-bottom: 1px solid var(--line);
}
.nav-row { display: flex; align-items: center; justify-content: space-between; height: 72px; }
.site-nav > ul { list-style: none; display: flex; align-items: center; gap: 4px; margin: 0; padding: 0; }
.site-nav a, .sub-toggle {
  display: block; padding: 10px 14px; text-decoration: none;
  color: var(--text); font: 500 .98rem var(--font);
  background: none; border: 0; cursor: pointer; border-radius: var(--r-sm);
}
.site-nav a:hover, .sub-toggle:hover { color: var(--ink); background: var(--paper); }
.site-nav a[aria-current="page"] { color: var(--ink); font-weight: 700; }
.sub-toggle::after { content: ""; display: inline-block; margin-left: 7px; border: 5px solid transparent; border-top-color: currentColor; transform: translateY(3px); }
.has-sub { position: relative; }
.sub {
  list-style: none; margin: 0; padding: 8px; min-width: 290px;
  position: absolute; top: calc(100% + 6px); left: 0;
  background: var(--white); border: 1px solid var(--line); border-radius: var(--r-lg);
  box-shadow: 0 14px 34px rgba(15,39,64,.14); display: none;
}
.has-sub.open .sub { display: block; }
@media (hover: hover) and (min-width: 961px) { .has-sub:hover .sub { display: block; } }
.sub a { padding: 10px 12px; }
.sub small { display: block; color: var(--slate); font-weight: 400; font-size: .85rem; }
.site-nav .btn { color: var(--white); margin-left: 10px; }
.nav-toggle { display: none; }

@media (max-width: 960px) {
  .nav-toggle {
    display: inline-flex; align-items: center; gap: 8px; padding: 9px 14px;
    background: var(--white); border: 1px solid var(--line); border-radius: var(--r-sm);
    font: 600 .95rem var(--font); color: var(--ink); cursor: pointer;
  }
  .site-nav {
    position: absolute; top: 72px; left: 0; right: 0; display: none;
    background: var(--white); border-bottom: 1px solid var(--line);
    max-height: calc(100vh - 72px); overflow-y: auto;
  }
  .site-nav.open { display: block; }
  .site-nav > ul { flex-direction: column; align-items: stretch; padding: 10px 20px 20px; }
  .sub { position: static; box-shadow: none; border: 0; padding: 0 0 0 12px; min-width: 0; }
  .site-nav .btn { margin: 10px 0 0; justify-content: center; }
}

/* ---------- Hero trang chủ ---------- */
.hero { background: linear-gradient(160deg, #0D2B4E 0%, #12396A 100%); color: #CFDAE6; padding: 88px 0 96px; overflow: hidden; }
.hero h1 { color: var(--white); max-width: 15ch; }
.hero .lead { color: #B9C8D8; }
.hero-grid { display: grid; grid-template-columns: 1.05fr .95fr; gap: 56px; align-items: center; }
.hero-facts { display: flex; flex-wrap: wrap; gap: 8px 22px; margin: 26px 0 0; padding: 0; list-style: none; font-size: .95rem; }
.hero-facts li::before { content: ""; display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: var(--sky); margin-right: 8px; }
@media (max-width: 960px) { .hero-grid { grid-template-columns: 1fr; } }

/* Bảng điều khiển chiến dịch (điểm nhấn của trang chủ) */
.console {
  background: #0A2340; border: 1px solid #2A5689; border-radius: var(--r-lg);
  box-shadow: 0 30px 60px rgba(0,0,0,.35); overflow: hidden; font-size: .92rem;
}
.console-top { display: flex; justify-content: space-between; align-items: center; padding: 14px 18px; border-bottom: 1px solid #1F3E60; color: var(--white); }
.console-top strong { font-weight: 600; }
.live { white-space: nowrap; display: inline-flex; align-items: center; gap: 6px; color: #8FE3B8; font-size: .85rem; }
.live::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: #3DDC84; animation: pulse 1.6s infinite; }
@keyframes pulse { 50% { opacity: .3; } }
.console-stats { display: grid; grid-template-columns: repeat(3, 1fr); border-bottom: 1px solid #1F3E60; }
.console-stats div { padding: 12px 18px; border-right: 1px solid #1F3E60; }
.console-stats div:last-child { border-right: 0; }
.console-stats b { display: block; color: var(--white); font-size: 1.35rem; font-variant-numeric: tabular-nums; }
.console-stats span { color: #8AA2BB; font-size: .8rem; }
.call-list { list-style: none; margin: 0; padding: 6px 0; height: 262px; overflow: hidden; }
.call-list li { display: grid; grid-template-columns: 1fr auto; gap: 2px 12px; padding: 9px 18px; border-bottom: 1px solid rgba(255,255,255,.05); }
.call-list .num { color: var(--white); font-variant-numeric: tabular-nums; }
.call-list .say { grid-column: 1 / -1; color: #8AA2BB; font-size: .82rem; }
.tag { font-size: .78rem; padding: 2px 9px; border-radius: 99px; align-self: center; white-space: nowrap; }
.tag--ok { background: rgba(61,220,132,.14); color: #8FE3B8; }
.tag--key { background: rgba(143,192,242,.18); color: #B9DAFB; }
.tag--busy { background: rgba(255,140,90,.14); color: #FFB08A; }
.tag--ring { background: rgba(140,180,255,.14); color: #A9C6FF; }
.call-list li.enter { animation: slideIn .4s ease-out; }
@keyframes slideIn { from { opacity: 0; transform: translateY(-10px); } }
@media (prefers-reduced-motion: reduce) { .call-list li.enter, .live::before { animation: none; } }

/* ---------- Banner trang con ---------- */
.page-hero { background: var(--ink); color: #C6D3E1; padding: 56px 0 60px; }
.page-hero h1 { color: var(--white); margin-bottom: .35em; }
.page-hero p { color: #B9C8D8; font-size: 1.1rem; }
.crumbs { list-style: none; display: flex; gap: 8px; padding: 0; margin: 0 0 18px; font-size: .9rem; }
.crumbs a { color: #9FB4CA; }
.crumbs li + li::before { content: "/"; margin-right: 8px; color: #5F7A96; }
.crumbs [aria-current] { color: var(--white); }

/* ---------- Danh sách sản phẩm (trang chủ) ---------- */
.products { border-top: 1px solid var(--line); }
.product-row {
  display: grid; grid-template-columns: 260px 1fr auto; gap: 24px; align-items: center;
  padding: 26px 0; border-bottom: 1px solid var(--line); text-decoration: none; color: var(--text);
}
.product-row h3 { margin: 0; }
.product-row p { margin: 0; color: var(--slate); }
.product-row .go { font-weight: 600; color: var(--ink-2); white-space: nowrap; }
a.product-row:hover h3, a.product-row:hover .go { color: var(--signal-dark); }
.product-row .price-hint { display: block; font-size: .88rem; color: var(--slate); margin-top: 4px; font-weight: 400; }
@media (max-width: 760px) { .product-row { grid-template-columns: 1fr; gap: 6px; } }

/* ---------- Bố cục 2 cột ---------- */
.split { display: grid; grid-template-columns: 1fr 1fr; gap: 56px; align-items: center; }
.split--top { align-items: start; }
.split + .split { margin-top: 72px; }
.split.flip > :first-child { order: 2; }
@media (max-width: 860px) { .split { grid-template-columns: 1fr; gap: 28px; } .split.flip > :first-child { order: 0; } }
.figure { background: var(--paper); border-radius: var(--r-lg); padding: 24px; }
.section--paper .figure { background: var(--white); }

.ticks { list-style: none; padding: 0; margin: 0 0 1em; }
.ticks li { position: relative; padding-left: 30px; margin-bottom: 10px; }
.ticks li::before {
  content: ""; position: absolute; left: 4px; top: 8px; width: 12px; height: 7px;
  border-left: 2.5px solid var(--ok); border-bottom: 2.5px solid var(--ok); transform: rotate(-45deg);
}
.cons li::before { border: 0; width: 12px; height: 2.5px; top: 12px; background: var(--busy); transform: none; }

/* ---------- Lưới lý do / tính năng ---------- */
.points { display: grid; grid-template-columns: repeat(3, 1fr); gap: 40px; }
.points--2 { grid-template-columns: repeat(2, 1fr); }
.point { border-top: 3px solid var(--signal); padding-top: 18px; }
.point p { color: var(--slate); margin: 0; }
.section--ink .point p { color: #B9C8D8; }
@media (max-width: 860px) { .points, .points--2 { grid-template-columns: 1fr; gap: 28px; } }

/* ---------- Các bước (chỉ dùng cho quy trình có thứ tự) ---------- */
.steps { list-style: none; counter-reset: s; display: grid; grid-template-columns: repeat(4, 1fr); gap: 0; padding: 0; margin: 0; }
.steps li { counter-increment: s; position: relative; padding: 0 24px 0 0; }
.steps li::before {
  content: counter(s); display: grid; place-items: center; width: 40px; height: 40px; border-radius: 50%;
  background: var(--signal); color: var(--white); font-weight: 700; margin-bottom: 16px; position: relative; z-index: 1;
}
.steps li::after { content: ""; position: absolute; top: 20px; left: 40px; right: 0; height: 2px; background: var(--line); }
.steps li:last-child::after { display: none; }
.steps p { color: var(--slate); font-size: .96rem; }
.steps .quote { font-style: italic; color: var(--ink-2); }
.steps--3 { grid-template-columns: repeat(3, 1fr); }
@media (max-width: 860px) {
  .steps, .steps--3 { grid-template-columns: 1fr; gap: 26px; }
  .steps li { padding: 0 0 0 58px; } .steps li::before { position: absolute; left: 0; top: -4px; } .steps li::after { display: none; }
}

/* ---------- API ---------- */
.api-list { display: grid; grid-template-columns: repeat(2, 1fr); gap: 0 48px; margin: 0; }
.api-list > div { padding: 20px 0; border-bottom: 1px solid var(--line); }
.api-list dt { font-weight: 700; color: var(--ink); margin-bottom: 4px; }
.api-list dd { margin: 0; color: var(--slate); }
.api-list code { background: var(--paper); padding: 1px 6px; border-radius: 4px; font-size: .9em; color: var(--ink-2); }
@media (max-width: 760px) { .api-list { grid-template-columns: 1fr; } }

/* ---------- Bảng giá ---------- */
.table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: var(--r-lg); background: var(--white); }
.price-table { width: 100%; border-collapse: collapse; min-width: 620px; font-variant-numeric: tabular-nums; }
.price-table th, .price-table td { padding: 15px 20px; text-align: left; border-bottom: 1px solid var(--line); vertical-align: top; }
.price-table thead th { background: var(--paper); color: var(--ink); font-size: 1.05rem; }
.price-table thead th.featured { background: var(--ink); color: var(--white); }
.price-table tbody th { font-weight: 600; color: var(--slate); width: 220px; }
.price-table tr:last-child td, .price-table tr:last-child th { border-bottom: 0; }
.price-table .amount { font-size: 1.5rem; font-weight: 700; color: var(--ink); line-height: 1.2; }
.price-table .unit { font-size: .9rem; color: var(--slate); font-weight: 400; }
.price-table td.featured { background: #EDF4FC; }
.yes { color: var(--ok); font-weight: 600; }
.no { color: #9AA8B6; }
.note { font-size: .9rem; color: var(--slate); margin-top: 14px; }

/* ---------- Logo đối tác / khách hàng ---------- */
.logos { display: grid; grid-template-columns: repeat(6, 1fr); gap: 14px; list-style: none; padding: 0; margin: 0; }
.logos li { background: var(--white); border: 1px solid var(--line); border-radius: var(--r-sm); padding: 14px; display: grid; place-items: center; height: 96px; }
.logos img { max-height: 64px; width: auto; object-fit: contain; }
@media (max-width: 860px) { .logos { grid-template-columns: repeat(3, 1fr); } }
@media (max-width: 480px) { .logos { grid-template-columns: repeat(2, 1fr); } }

/* ---------- Ảnh giao diện ---------- */
.shots { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.shots a { display: block; border: 1px solid var(--line); border-radius: var(--r-sm); overflow: hidden; background: var(--white); text-decoration: none; color: var(--slate); }
.shots img { aspect-ratio: 16 / 10; object-fit: cover; object-position: top left; width: 100%; }
.shots span { display: block; padding: 10px 14px; font-size: .9rem; }
.shots a:hover span { color: var(--ink); }
@media (max-width: 860px) { .shots { grid-template-columns: 1fr 1fr; } }
@media (max-width: 520px) { .shots { grid-template-columns: 1fr; } }

/* ---------- Dải kêu gọi liên hệ ---------- */
.cta { background: var(--signal); color: var(--white); padding: 56px 0; }
.cta h2 { color: var(--white); }
.cta-row { display: flex; justify-content: space-between; align-items: center; gap: 24px; flex-wrap: wrap; }
.cta h2 { margin: 0 0 .25em; }
.cta p { margin: 0; color: #E6F0FB; }
.cta .btn { background: var(--ink); border-color: var(--ink); color: var(--white); }
.cta .btn:hover { background: var(--ink-2); border-color: var(--ink-2); }
.cta .btn--ghost { background: transparent; color: var(--white); border-color: var(--white); }
.cta .btn--ghost:hover { background: var(--white); color: var(--signal-dark); }

/* ---------- Liên hệ ---------- */
.contact-grid { display: grid; grid-template-columns: .85fr 1.15fr; gap: 56px; align-items: start; }
@media (max-width: 860px) { .contact-grid { grid-template-columns: 1fr; } }
.contact-item { padding: 20px 0; border-bottom: 1px solid var(--line); }
.contact-item h3 { font-size: .95rem; color: var(--slate); font-weight: 600; margin-bottom: 4px; }
.contact-item a, .contact-item p { font-size: 1.2rem; font-weight: 600; color: var(--ink); text-decoration: none; margin: 0; }
.form { background: var(--paper); border-radius: var(--r-lg); padding: 32px; }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.form-grid .full { grid-column: 1 / -1; }
@media (max-width: 560px) { .form-grid { grid-template-columns: 1fr; } }
.field label { display: block; font-weight: 600; font-size: .92rem; margin-bottom: 6px; color: var(--ink); }
.field input, .field select, .field textarea {
  width: 100%; padding: 12px 14px; font: 1rem var(--font); color: var(--text);
  background: var(--white); border: 1px solid #C5D0DB; border-radius: var(--r-sm);
}
.field textarea { min-height: 120px; resize: vertical; }
.field input:focus, .field select:focus, .field textarea:focus { outline: 3px solid rgba(61,135,217,.35); border-color: var(--signal-dark); }
.form-msg { margin-top: 14px; font-size: .95rem; }
.form-msg.err { color: #B42318; }
.form-msg.ok { color: var(--ok); }

/* ---------- Kỹ năng (trang giới thiệu) ---------- */
.stack { display: flex; flex-wrap: wrap; gap: 10px; list-style: none; padding: 0; margin: 0; }
.stack li { border: 1px solid var(--line); border-radius: 99px; padding: 8px 16px; background: var(--white); }
.stack b { color: var(--ink); }
.stack span { color: var(--slate); font-size: .9rem; }

/* ---------- Footer ---------- */
.site-footer { background: #0A2340; color: #9FB4CA; padding: 60px 0 28px; font-size: .95rem; }
.footer-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: 40px; }
@media (max-width: 760px) { .footer-grid { grid-template-columns: 1fr; gap: 28px; } }
.site-footer h4 { color: var(--white); font-size: 1rem; }
.site-footer ul { list-style: none; padding: 0; margin: 0; }
.site-footer li { margin-bottom: 8px; }
.site-footer a { color: #C6D3E1; text-decoration: none; }
.site-footer a:hover { color: var(--sky); }
.footer-bottom { border-top: 1px solid #1F3E60; margin-top: 44px; padding-top: 20px; font-size: .88rem; }

/* Bảng giá trên mobile: cột tiêu đề hẹp và cố định khi cuộn ngang */
.price-table .btn { white-space: nowrap; }
@media (max-width: 760px) {
  .price-table th, .price-table td { padding: 12px 14px; }
  .price-table tbody th, .price-table thead th:first-child {
    width: 120px; position: sticky; left: 0; z-index: 1;
    background: var(--white); box-shadow: 1px 0 0 var(--line);
  }
  .price-table thead th:first-child { background: var(--paper); }
  .price-table .amount { font-size: 1.25rem; }
}

/* Tên đối tác / khách hàng dạng chữ */
.logos li { font-weight: 600; color: var(--ink); text-align: center; font-size: 1rem; line-height: 1.3; height: 76px; }
/* Ảnh minh họa SVG đã có nền riêng */
.figure { padding: 0; background: none !important; }
.figure img { width: 100%; border-radius: var(--r-lg); }
.brand img { height: 40px; width: auto; }

.brand img { height: 44px; width: auto; }
.footer-logo { height: 40px; width: auto; margin-bottom: 14px; }
.site-nav a.btn { background: var(--signal); color: var(--white); padding: 10px 18px; }
.site-nav a.btn:hover { background: var(--signal-dark); color: var(--white); }
