/* ===========================================================
   NGÔI SAO SÁNG LOGISTICS (NSS) — style.css
   Palette: Xanh (navy) + Vàng + Đen. Font: Be Vietnam Pro.
   =========================================================== */

:root {
  --brand-blue: #1C86C9;  /* xanh logo */
  --navy: #0d2a52;        /* xanh đậm — màu chủ đạo header/nền */
  --navy-dark: #08203f;
  --navy-light: #16447f;
  --yellow: #FDC81F;      /* vàng logo — màu nhấn (CTA, ngôi sao) */
  --yellow-dark: #e0a800;
  --black: #14161a;       /* chữ chính */
  --gray: #6E6F71;        /* xám logo (LOGISTICS) */
  --gray-light: #eef1f5;
  --white: #ffffff;
  --maxw: 1160px;
  --radius: 10px;
  --shadow: 0 6px 24px rgba(13, 42, 82, 0.10);
  --font: 'Be Vietnam Pro', -apple-system, Segoe UI, Roboto, sans-serif;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  font-family: var(--font);
  color: var(--black);
  line-height: 1.65;
  background: var(--white);
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; display: block; }

a { color: var(--navy); text-decoration: none; }

.container { width: 100%; max-width: var(--maxw); margin: 0 auto; padding: 0 20px; }

h1, h2, h3 { color: var(--navy); line-height: 1.25; font-weight: 700; }
h1 { font-size: clamp(1.9rem, 4vw, 3rem); }
h2 { font-size: clamp(1.5rem, 3vw, 2.1rem); }
h3 { font-size: 1.2rem; }

section { padding: 72px 0; }
.section-head { text-align: center; max-width: 720px; margin: 0 auto 48px; }
.section-head p { color: var(--gray); margin-top: 12px; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-block;
  background: var(--yellow);
  color: var(--black);
  font-weight: 600;
  padding: 13px 28px;
  border-radius: var(--radius);
  transition: transform .15s ease, background .15s ease;
  border: none;
  cursor: pointer;
}
.btn:hover { background: var(--yellow-dark); transform: translateY(-2px); }
.btn-outline {
  background: transparent;
  color: var(--white);
  border: 2px solid var(--yellow);
}
.btn-outline:hover { background: var(--yellow); color: var(--black); }

/* ---------- Header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 100;
  background: var(--white);
  border-bottom: 1px solid var(--gray-light);
  box-shadow: 0 2px 10px rgba(13,42,82,.06);
}
.nav {
  display: flex; align-items: center; justify-content: space-between;
  height: 76px;
}
.brand { display: flex; align-items: center; }
.brand-logo { height: 52px; width: auto; display: block; }

.nav-links { display: flex; align-items: center; gap: 4px; list-style: none; }
.nav-links a {
  color: var(--navy); padding: 8px 14px; border-radius: 6px;
  font-size: .95rem; font-weight: 600; transition: background .15s, color .15s;
}
.nav-links a:hover { background: var(--gray-light); }
.nav-links a.active { color: var(--brand-blue); }

.lang-switch {
  margin-left: 10px; display: inline-flex; border: 1px solid #cdd6e2; border-radius: 6px; overflow: hidden;
}
.lang-switch button {
  background: transparent; color: var(--gray); border: none; padding: 6px 12px;
  font-family: var(--font); font-weight: 700; font-size: .8rem; cursor: pointer;
}
.lang-switch button.active { background: var(--yellow); color: var(--black); }

.nav-toggle {
  display: none; background: transparent; border: none; cursor: pointer; padding: 6px;
}
.nav-toggle span { display: block; width: 26px; height: 3px; background: var(--navy); margin: 5px 0; border-radius: 2px; transition: .3s; }

/* ---------- Hero ---------- */
.hero {
  background: url("../images/banner.jpg") center/cover no-repeat;
  color: var(--white);
  aspect-ratio: 16 / 9;        /* banner tỉ lệ 16:9 */
  position: relative; overflow: hidden;
}
/* Ẩn H1 để giữ SEO nhưng không hiển thị chữ trên banner */
.hero .visually-hidden {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}
.hero h1 { color: var(--white); max-width: 760px; }
.hero .lead { color: #d4e0f0; font-size: 1.2rem; max-width: 640px; margin: 20px 0 32px; }
.hero .btn-group { display: flex; gap: 14px; flex-wrap: wrap; }

/* ---------- Page banner (inner pages) ---------- */
.page-banner {
  background: linear-gradient(135deg, var(--navy-dark), var(--navy));
  color: var(--white); padding: 64px 0; text-align: center;
}
.page-banner h1 { color: var(--white); }
.page-banner p { color: #c8d6ea; margin-top: 10px; }

/* ---------- About hero card ---------- */
.about-hero {
  background: linear-gradient(135deg, var(--navy-dark), var(--navy));
  color: var(--white); border-radius: 14px; padding: 56px 40px;
  text-align: center; box-shadow: var(--shadow); position: relative; overflow: hidden;
}
.about-hero::after {
  content: "★"; position: absolute; right: -10px; bottom: -50px;
  font-size: 14rem; color: rgba(245,184,0,.06); pointer-events: none;
}
.pill {
  display: inline-block; background: var(--yellow); color: var(--black);
  font-weight: 700; padding: 8px 22px; border-radius: 30px;
  font-size: .82rem; letter-spacing: 1.5px; text-transform: uppercase;
}
.about-hero h1 { color: var(--white); margin: 20px 0 16px; }
.about-hero p { color: #cdd9ec; max-width: 780px; margin: 0 auto; font-size: 1.08rem; }

/* ---------- Check list (yellow bullets) ---------- */
.check-list { list-style: none; margin-top: 8px; }
.check-list li {
  position: relative; padding-left: 22px; margin-bottom: 14px; color: var(--gray);
}
.check-list li::before {
  content: "●"; color: var(--yellow); position: absolute; left: 0; top: 1px; font-size: .7rem;
}
.check-list strong { color: var(--navy); }

/* ---------- Services intro card (banner) ---------- */
.svc-intro {
  display: flex; align-items: center; gap: 28px;
  background: linear-gradient(135deg, var(--navy-dark), var(--navy));
  color: var(--white); border-radius: 14px; padding: 36px 40px; box-shadow: var(--shadow);
}
.svc-intro .svc-icon { font-size: 3.4rem; color: var(--yellow); line-height: 1; }
.svc-intro h2 { color: var(--yellow); margin-bottom: 8px; }
.svc-intro p { color: #cdd9ec; }

/* ---------- Accordion ---------- */
.accordion { margin-top: 28px; display: grid; gap: 16px; }
.acc-item {
  background: var(--white); border: 1px solid var(--gray-light);
  border-radius: var(--radius); box-shadow: var(--shadow); overflow: hidden;
}
.acc-head {
  display: flex; align-items: center; gap: 16px; width: 100%;
  padding: 20px 24px; background: none; border: none; cursor: pointer;
  font-family: var(--font); text-align: left;
}
.acc-head .acc-ic {
  width: 46px; height: 46px; flex: none; border-radius: 10px; display: grid; place-items: center;
  background: var(--navy); color: var(--yellow); font-size: 1.3rem;
}
.acc-head .acc-title { flex: 1; font-size: 1.12rem; font-weight: 700; color: var(--navy); }
.acc-head .acc-arrow { color: var(--gray); transition: transform .25s ease; font-size: 1.1rem; }
.acc-item.open .acc-arrow { transform: rotate(180deg); }
.acc-body { max-height: 0; overflow: hidden; transition: max-height .3s ease; }
.acc-body-inner { padding: 0 24px 22px 86px; }
.acc-body-inner > p { color: var(--navy); font-weight: 600; margin-bottom: 12px; }

@media (max-width: 600px) {
  .svc-intro { flex-direction: column; text-align: center; padding: 28px 22px; }
  .acc-body-inner { padding-left: 24px; }

  /* Banner mobile: giữ đúng tỉ lệ 16:9 (banner chỉ còn ảnh, không chữ) */
  .hero { aspect-ratio: 16 / 9; }
}

/* ---------- Service / feature cards ---------- */
.grid { display: grid; gap: 24px; }
.grid-2 { grid-template-columns: repeat(2, 1fr); }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-4 { grid-template-columns: repeat(4, 1fr); }

.card {
  background: var(--white); border: 1px solid var(--gray-light);
  border-radius: var(--radius); padding: 30px 26px; box-shadow: var(--shadow);
  transition: transform .18s ease, box-shadow .18s ease;
}
.card:hover { transform: translateY(-4px); box-shadow: 0 12px 32px rgba(13,42,82,.16); }
.card .icon {
  width: 56px; height: 56px; border-radius: 12px; display: grid; place-items: center;
  background: var(--navy); color: var(--yellow); font-size: 1.6rem; margin-bottom: 18px;
}
.card h3 { margin-bottom: 10px; }
.card p { color: var(--gray); font-size: .96rem; }

/* numbered service list */
.service-num { font-size: 2rem; font-weight: 800; color: var(--yellow); line-height: 1; }

/* ---------- Strengths band ---------- */
.band { background: var(--gray-light); }
.strength-item { display: flex; gap: 16px; align-items: flex-start; }
.strength-item .dot { color: var(--yellow); font-size: 1.5rem; line-height: 1.2; }

/* ---------- Partners ---------- */
.partners { text-align: center; }
.partner-logos {
  display: flex; gap: 40px; justify-content: center; align-items: center;
  flex-wrap: wrap; margin-top: 32px;
}
.partner-chip {
  display: flex; align-items: center; justify-content: center;
  padding: 22px 40px; border: 1px solid var(--gray-light); border-radius: var(--radius);
  background: var(--white); box-shadow: var(--shadow);
}
.partner-chip img {
  height: 58px; width: auto; object-fit: contain;
}

/* ---------- Contact ---------- */
.contact-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 40px; align-items: start; }
.contact-item { display: flex; gap: 14px; margin-bottom: 22px; }
.contact-item .ci-icon { color: var(--yellow); font-size: 1.3rem; min-width: 26px; }
.contact-item a { color: var(--navy); font-weight: 600; }
.map-embed iframe { width: 100%; height: 360px; border: 0; border-radius: var(--radius); }

/* ---------- CTA strip ---------- */
.cta {
  background: var(--yellow); text-align: center; padding: 32px 0;
}
.cta h2 { color: var(--black); font-size: clamp(1.3rem, 2.4vw, 1.7rem); }
.cta p { color: #4a3f00; margin: 8px 0 18px; }
.cta .btn { background: var(--navy); color: var(--white); }
.cta .btn:hover { background: var(--navy-dark); }

/* ---------- Footer ---------- */
.site-footer { background: var(--navy-dark); color: #c2cee0; padding: 56px 0 24px; }
.footer-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: 36px; }
.site-footer h4 { color: var(--white); margin-bottom: 14px; font-size: 1rem; }
.site-footer a { color: #c2cee0; }
.site-footer a:hover { color: var(--yellow); }
.site-footer ul { list-style: none; }
.site-footer li { margin-bottom: 8px; }
.footer-brand .star { color: var(--yellow); }
.footer-bottom {
  border-top: 1px solid #1c3a64; margin-top: 36px; padding-top: 20px;
  text-align: center; font-size: .85rem; color: #8da3c2;
}

/* ---------- News / Blog ---------- */
.news-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 26px; }
.news-card {
  display: flex; flex-direction: column; background: var(--white);
  border: 1px solid var(--gray-light); border-radius: var(--radius);
  overflow: hidden; box-shadow: var(--shadow); transition: transform .18s ease, box-shadow .18s ease;
}
.news-card:hover { transform: translateY(-4px); box-shadow: 0 12px 32px rgba(13,42,82,.16); }
.news-thumb { aspect-ratio: 4/3; overflow: hidden; }
.news-thumb img { width: 100%; height: 100%; object-fit: cover; }
.news-body { padding: 22px 22px 24px; display: flex; flex-direction: column; flex: 1; }
.news-date { font-size: .82rem; color: var(--gray); font-weight: 600; }
.news-card h3 { margin: 8px 0 10px; font-size: 1.12rem; }
.news-card h3 a { color: var(--navy); }
.news-card h3 a:hover { color: var(--brand-blue); }
.news-card p { color: var(--gray); font-size: .95rem; flex: 1; }
.news-more { margin-top: 16px; font-weight: 700; color: var(--brand-blue); }
.news-more::after { content: " →"; }

/* article detail */
.article { max-width: 820px; margin: 0 auto; }
.article .news-date { display: block; margin-bottom: 18px; }
.article-hero { width: 100%; aspect-ratio: 16/8; object-fit: cover; border-radius: var(--radius); margin: 8px 0 28px; }
.article h2 { margin: 30px 0 12px; }
.article p { margin-bottom: 16px; color: #2c3543; }
.article ul.check-list { margin: 4px 0 18px; }
.back-link { display: inline-block; margin-top: 10px; font-weight: 600; color: var(--brand-blue); }

@media (max-width: 900px) { .news-grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 600px) { .news-grid { grid-template-columns: 1fr; } }

/* ---------- Gallery ---------- */
.gallery {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; margin-top: 8px;
}
.g-item {
  position: relative; overflow: hidden; border-radius: 10px; cursor: pointer;
  aspect-ratio: 4/3; box-shadow: var(--shadow);
}
.g-item img {
  width: 100%; height: 100%; object-fit: cover; display: block;
  transition: transform .5s ease;
}
.g-item::after {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(to top, rgba(8,32,63,.78), rgba(8,32,63,0) 55%);
  opacity: 0; transition: opacity .3s ease;
}
.g-cap {
  position: absolute; left: 12px; right: 12px; bottom: 10px; z-index: 2;
  color: #fff; font-weight: 600; font-size: .9rem;
  transform: translateY(8px); opacity: 0; transition: .3s ease;
}
.g-item:hover img { transform: scale(1.25); }
.g-item:hover::after { opacity: 1; }
.g-item:hover .g-cap { opacity: 1; transform: translateY(0); }

/* lightbox */
.lightbox {
  position: fixed; inset: 0; z-index: 2000; display: none;
  align-items: center; justify-content: center; background: rgba(8,16,30,.92);
  padding: 24px;
}
.lightbox.open { display: flex; }
.lightbox img { max-width: 92vw; max-height: 86vh; border-radius: 8px; box-shadow: 0 10px 40px rgba(0,0,0,.5); }
.lightbox .lb-close {
  position: absolute; top: 18px; right: 24px; color: #fff; font-size: 2.2rem;
  background: none; border: none; cursor: pointer; line-height: 1;
}

@media (max-width: 760px) { .gallery { grid-template-columns: repeat(2, 1fr); } }

/* ---------- Carousel lướt ngang trên mobile (Tin tức & Thư viện ảnh) ---------- */
@media (max-width: 760px) {
  .news-grid, .gallery {
    display: flex; grid-template-columns: none;
    overflow-x: auto; scroll-snap-type: x mandatory;
    gap: 12px; padding: 12px 5% 16px; margin-top: 0;
    -webkit-overflow-scrolling: touch; scroll-behavior: smooth;
    scrollbar-width: none;
  }
  .news-grid::-webkit-scrollbar, .gallery::-webkit-scrollbar { display: none; }
  .news-grid > *, .gallery > * {
    flex: 0 0 88%; scroll-snap-align: center;
    transform: scale(.95); opacity: .72;
    transition: transform .35s ease, opacity .35s ease, box-shadow .35s ease;
  }
  .news-grid > .is-active, .gallery > .is-active {
    transform: scale(1); opacity: 1;
    box-shadow: 0 16px 38px rgba(13,42,82,.24);
  }
  /* ảnh tin tức thấp lại cho card bớt dài */
  .news-card .news-thumb { aspect-ratio: 16/9; }
  .news-card p { display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
  /* ảnh thư viện cao vừa phải */
  .gallery .g-item { aspect-ratio: 16/10; }
  /* trên mobile hiện luôn lớp phủ + caption cho ảnh đang chọn */
  .gallery > .is-active::after { opacity: 1; }
  .gallery > .is-active .g-cap { opacity: 1; transform: translateY(0); }
}

/* ---------- i18n visibility ---------- */
[data-lang-en] { display: none; }
html[lang="en"] [data-lang-vi] { display: none; }
html[lang="en"] [data-lang-en] { display: revert; }

/* ---------- Responsive ---------- */
@media (max-width: 900px) {
  .grid-4 { grid-template-columns: repeat(2, 1fr); }
  .grid-3 { grid-template-columns: repeat(2, 1fr); }
  .footer-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 760px) {
  .nav-toggle { display: block; }
  .nav-links {
    position: fixed; top: 76px; left: 0; right: 0; bottom: 0;
    background: var(--white); flex-direction: column; align-items: stretch;
    gap: 2px; padding: 14px 18px 24px; display: none;
    overflow-y: auto; z-index: 300;
    border-top: 1px solid var(--gray-light);
    box-shadow: 0 10px 24px rgba(13,42,82,.16);
  }
  .nav-links.open { display: flex; }
  .nav-links li { width: 100%; }
  .nav-links a {
    display: block; padding: 16px 12px; font-size: 1.18rem; border-radius: 8px;
    border-bottom: 1px solid var(--gray-light);
  }
  .nav-links a:hover { background: var(--gray-light); }
  .nav-links a.active { color: var(--white); background: var(--brand-blue); border-bottom-color: transparent; }
  .lang-switch { margin: 14px 0 0; align-self: flex-start; }
  .lang-switch button { font-size: 1rem; padding: 9px 18px; }
  .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; }
  .contact-grid { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr; }
  section { padding: 52px 0; }
}
