/* ---------- Base ---------- */
:root {
  --brand: #0ea5e9;
  --brand-600: #0284c7;
  --accent: #d32f2f;
  --text: #0f172a;
  --muted: #475569;
  --bg: #f8fafc;
  --card: #ffffff;
  --ring: rgba(2,132,199,.25);
}
* { box-sizing: border-box }
html, body { margin:0; padding:0 }
body { font-family: Inter, system-ui, Arial, sans-serif; background: var(--bg); color: var(--text) }
img { max-width: 100%; display: block }

.container { width: min(1200px, 92%); margin-inline: auto }
.text-gradient{ background: linear-gradient(90deg, var(--brand), #38bdf8, var(--accent)); -webkit-background-clip:text; background-clip:text; color:transparent }

/* Progress bar */
#progress{ position:fixed; top:0; left:0; height:3px; width:0; z-index:60;
  background: linear-gradient(90deg, var(--brand), var(--accent));
  box-shadow: 0 0 16px rgba(2,132,199,.6);
}

/* ---------- Header ---------- */
.header{ backdrop-filter: saturate(140%) blur(10px); background: rgba(255,255,255,.7); border-bottom: 1px solid rgba(148,163,184,.25) }
.dark .header{ background: rgba(2,6,23,.7); border-color: rgba(30,41,59,.6) }

.topbar{ font-size: 13px; border-bottom: 1px solid rgba(148,163,184,.25) }
.topbar .container{ display:flex; align-items:center; justify-content:space-between; padding:.5rem 0 }
.topbar .item{ display:inline-flex; align-items:center; gap:.4rem; color: var(--muted); margin-right:1rem }
.topbar .social, .theme-btn{ display:inline-flex; align-items:center; justify-content:center; width:34px; height:34px; border-radius:10px; border:1px solid rgba(148,163,184,.35); background:#fff }
.theme-btn{ margin-left:.4rem }
.topbar .social:hover, .theme-btn:hover{ box-shadow: 0 6px 16px rgba(2,132,199,.2) }

.navbar{ display:flex; align-items:center; justify-content:space-between; gap:1rem; padding:.75rem 0 }
.brand{ display:flex; align-items:center; gap:.6rem; text-decoration:none; color:inherit }
.logo{ width:40px; height:40px; border-radius:10px; box-shadow: 0 2px 6px rgba(0,0,0,.08) }
.brand-name{ font-weight:800; letter-spacing:.3px }

.hamburger{ display:none; align-items:center; justify-content:center; width:40px; height:40px; border-radius:12px; border:1px solid rgba(148,163,184,.4); background:#fff }
.hamburger:hover{ box-shadow:0 8px 18px rgba(2,132,199,.2) }

.nav{ position:relative; display:flex; align-items:center; gap:.5rem; list-style:none; margin:0; padding:0 }
.nav a{ position:relative; display:flex; align-items:center; gap:.5rem; padding:.55rem .85rem; border-radius:999px; text-decoration:none; color: var(--muted); font-weight:600 }
.nav a:hover{ color:#0f172a; background: rgba(2,132,199,.08) }
.nav .active-pill{ position:absolute; height:36px; border-radius:999px; background:linear-gradient(90deg, rgba(2,132,199,.15), rgba(211,47,47,.15));
  border:1px solid rgba(148,163,184,.3); box-shadow:0 10px 24px rgba(2,132,199,.15); transition: all .25s
}

.header-wave{ width:100%; height:64px; display:block }
.header-wave path{ fill:linear-gradient(90deg, var(--brand), var(--accent)) }
.header-wave path{ fill:url(#g) }
.header-wave{ position:relative }
.header-wave:before{ content:""; position:absolute; inset:0; background: linear-gradient(90deg, var(--brand), var(--accent)); -webkit-mask: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox=\'0 0 1440 80\' preserveAspectRatio=\'none\'><path d=\'M0,64 C240,0 420,0 720,48 C1080,104 1200,64 1440,16 L1440,80 L0,80 Z\' fill=\'%23000\'/></svg>') center/cover no-repeat; mask: same-as-border;
}

/* Sticky shrink */
.is-scrolled .navbar{ padding:.35rem 0 }
.is-scrolled .header{ background: rgba(255,255,255,.9) }
.is-scrolled .header, .is-scrolled .topbar{ border-color: rgba(148,163,184,.35) }

/* ---------- Hero ---------- */
.hero{ position:relative; min-height:90vh; display:grid; place-items:center; isolation:isolate }
.hero-bg{ position:absolute; inset:0; width:100%; height:100%; object-fit:cover; transform:scale(1.05) }
.hero-overlay{ position:absolute; inset:0; background: linear-gradient(180deg, rgba(255,255,255,.85), rgba(255,255,255,.35) 50%, rgba(255,255,255,.95));
  mix-blend:normal }
.hero-content{ position:relative; text-align:center; padding:6rem 1rem }
.badge{ display:inline-flex; align-items:center; gap:.5rem; padding:.4rem .6rem; font-size:12px; border-radius:999px;
  background:#fff; border:1px solid rgba(148,163,184,.35) }
.hero h1{ font-size: clamp(32px, 5vw, 56px); margin:.6rem 0; font-weight:800 }
.hero p{ color: var(--muted); font-size: clamp(14px, 2vw, 18px); max-width: 780px; margin: 0 auto }
.hero-actions{ display:flex; gap:.6rem; justify-content:center; margin-top:1rem; flex-wrap:wrap }
.btn{ display:inline-flex; align-items:center; gap:.5rem; padding:.75rem 1rem; border-radius:14px; font-weight:700; border:1px solid transparent; text-decoration:none }
.btn-primary{ background: linear-gradient(90deg, var(--brand), var(--brand-600)); color:#fff; box-shadow: 0 12px 30px var(--ring) }
.btn-primary:hover{ filter: brightness(1.05) }
.btn-ghost{ background:#fff; color:#0f172a; border-color: rgba(148,163,184,.5) }
.btn-ghost:hover{ background: #f8fafc }

.typewriter-wrap{ margin-top: 1rem; color: var(--muted); font-size:14px }
.typewriter{ margin-left:.4rem; border-right:2px solid currentColor; white-space:nowrap; overflow:hidden }

/* ---------- Sections ---------- */
.section{ padding: 80px 0 }
.section.alt{ background: linear-gradient(180deg, #fff, #f5fbff) }
.section .section-title{ font-size: clamp(24px, 3vw, 32px); font-weight:800 }
.section .center{ text-align:center }
.section .mt{ margin-top: .75rem }

.grid-2{ display:grid; grid-template-columns: 1.1fr .9fr; gap: 40px }
.grid-3{ display:grid; grid-template-columns: repeat(3, 1fr); gap: 24px }
.grid-4{ display:grid; grid-template-columns: repeat(4, 1fr); gap: 24px }
@media (max-width: 900px){
  .grid-2{ grid-template-columns: 1fr }
  .grid-3{ grid-template-columns: 1fr }
  .grid-4{ grid-template-columns: 1fr 1fr }
  .hamburger{ display:inline-flex }
  .nav{ position:absolute; top:100%; right:0; background:#fff; border:1px solid rgba(148,163,184,.35); border-radius:16px; padding:8px; display:none; flex-direction:column; width:min(92vw, 420px) }
  .nav.open{ display:flex }
  .nav a{ justify-content:flex-start }
}

.card-img{ border-radius:20px; box-shadow:0 12px 40px rgba(0,0,0,.12) }

.stats{ display:grid; grid-template-columns: repeat(3, 1fr); gap:16px; margin-top: 1rem }
.stat{ text-align:center; background:#fff; border:1px solid rgba(148,163,184,.3); border-radius:16px; padding:16px }
.stat .number{ font-size:28px; font-weight:800; color: var(--brand-600) }
.stat .label{ font-size:12px; text-transform:uppercase; color: var(--muted) }

/* Recruitment */
.section .filters{ display:flex; gap:.5rem; align-items:center }
.section .filters input, .section .filters select{ padding:.6rem .8rem; border-radius:12px; border:1px solid rgba(148,163,184,.5); background:#fff }
.job-card{ display:flex; flex-direction:column; justify-content:space-between; background:#fff; border:1px solid rgba(148,163,184,.3); border-radius:16px; padding:18px; box-shadow:0 6px 18px rgba(2,132,199,.12) }
.job-card h3{ margin:8px 0 6px; font-size:18px }
.job-card .meta{ font-size:13px; color: var(--muted) }
.job-card .actions{ display:flex; gap:.5rem; margin-top:10px }
.job-card .actions a, .job-card .actions button{ flex:1 }

/* Accordion */
.accordion .item{ border:1px solid rgba(148,163,184,.35); border-radius:14px; overflow:hidden }
.accordion .item + .item{ margin-top:8px }
.accordion .head{ width:100%; display:flex; align-items:center; justify-content:space-between; padding:12px 14px; background:#fff }
.accordion .body{ padding:12px 14px; color:var(--muted); display:none; background:#fff }
.accordion .item.open .body{ display:block }

/* Slider */
.slider{ position:relative; overflow:hidden; border-radius:20px; border:1px solid rgba(148,163,184,.3); background:#fff }
.slides{ display:flex; transition: transform .5s ease-in-out }
.slides img{ width:100%; height:420px; object-fit:cover; flex-shrink:0 }
.dots{ position:absolute; left:50%; bottom:12px; transform:translateX(-50%); display:flex; gap:6px }
.dot{ width:9px; height:9px; border-radius:999px; background: rgba(255,255,255,.7); border:1px solid rgba(148,163,184,.5) }
.slider-btn{ position:absolute; top:50%; transform:translateY(-50%); background:rgba(255,255,255,.85); border:1px solid rgba(148,163,184,.5); width:42px; height:42px; border-radius:12px; display:grid; place-items:center }
.slider-btn.prev{ left:10px } .slider-btn.next{ right:10px }
.slider-btn:hover{ box-shadow:0 8px 18px rgba(2,132,199,.2) }

/* Footer */
.footer{ background:#0b1220; color:#cbd5e1; padding-top:50px }
.footer h3{ color:#fff; margin:0 0 8px }
.footer h4{ color:#fff; margin:0 0 8px }
.footer .links{ list-style:none; margin:0; padding:0 }
.footer .links li + li{ margin-top:6px }
.footer .links a{ color:#cbd5e1; text-decoration:none }
.footer .links a:hover{ color:#fff; text-decoration:underline }
.footer .socials{ display:flex; gap:10px; font-size:0 }
.footer .socials a{ display:grid; place-items:center; width:36px; height:36px; border:1px solid rgba(148,163,184,.4); border-radius:10px; background:#0f172a }
.footer .motto{ font-style:italic; font-size:12px; margin-top:8px }
.footer .subscribe{ display:flex }
.footer .subscribe input{ flex:1; padding:.6rem .8rem; border:none; border-radius:10px 0 0 10px }
.footer .subscribe button{ border-radius:0 10px 10px 0 }
.footer .copyright{ text-align:center; font-size:12px; padding:16px; margin-top:20px; border-top:1px solid rgba(148,163,184,.25) }

/* Floating actions */
.fab-right{ position:fixed; right:18px; bottom:18px; z-index:60; width:44px; height:44px; border-radius:999px; border:1px solid rgba(148,163,184,.35); background:#fff; display:grid; place-items:center }
.fab-left{ position:fixed; left:18px; bottom:18px; z-index:60; display:inline-flex; align-items:center; gap:.4rem; padding:.6rem .8rem; border-radius:999px; background:linear-gradient(90deg, var(--brand), var(--brand-600)); color:#fff; text-decoration:none; box-shadow:0 12px 30px var(--ring) }

/* Reveal animation */
.reveal{ opacity:0; transform:translateY(16px); transition: all .7s cubic-bezier(.2,.6,.2,1) }
.reveal.show{ opacity:1; transform:none }

/* Reduced motion */
@media (prefers-reduced-motion: reduce){
  .reveal{ transition:none }
}


/* Scroll anchor offset for sticky header */
.hero, .section, .footer { scroll-margin-top: 84px }

/* Muted text helper */
.muted{ color: var(--muted) }
.tiny{ font-size: 12px }

/* Apply form */
.apply-form{ margin-top: 12px; display:block; background:#fff; border:1px solid rgba(148,163,184,.35); border-radius:16px; padding:16px; box-shadow:0 8px 20px rgba(2,132,199,.08) }
.apply-form .field{ display:flex; flex-direction:column; gap:6px; margin-bottom:12px }
.apply-form label{ font-weight:600; font-size:13px }
.apply-form input, .apply-form select{ padding:.7rem .8rem; border:1px solid rgba(148,163,184,.5); border-radius:12px; outline:none }
.apply-form input:focus, .apply-form select:focus{ box-shadow: 0 0 0 4px var(--ring) }
.apply-form .actions{ display:flex; gap:.6rem; flex-wrap:wrap; margin-top:4px }

/* Consent widget container */
.consent-wrap{ margin-top: 14px; display:flex; justify-content:center }

/* Mobile tweaks */
@media (max-width: 900px){
  .topbar{ display:none } /* giảm chiếm chỗ trên mobile */
  .navbar{ padding:.55rem 0 }
  .hero{ min-height: 78vh }
  .slides img{ height: 300px }
  .section{ padding: 56px 0 }
  .fab-left{ left:12px; bottom:12px; padding:.55rem .7rem }
  .fab-right{ right:12px; bottom:12px; width:42px; height:42px }
  .apply-form{ padding:12px }
  .nav a{ padding:.65rem .9rem; font-size: 15px }
  .hamburger{ width:42px; height:42px }
}

/* ===== NEWS V3 – Magazine + Masonry + Drawer ===== */
.newsv3-tools{ display:flex; gap:10px; align-items:center; flex-wrap: wrap; margin: 1.5rem 0; }
.newsv3-tools .tool{
  display:flex; gap:8px; align-items:center;
  border:1px solid rgba(148,163,184,.4); border-radius:12px; padding:8px 10px; background:#fff;
  box-shadow: 0 4px 12px rgba(0,0,0,.04);
}
.newsv3-tools input{ border:none; outline:none; min-width:220px }
.newsv3-tools select{ border:none; background:transparent; outline:none; -webkit-appearance: none; appearance: none; }

#newsMosaic.is-carousel{
  position: relative;
  height: clamp(280px, 40vw, 450px);
  border-radius:18px;
  overflow:hidden;
  background:#0b1220;
  margin-bottom: 2rem;
}
#newsMosaic.is-carousel .carousel-slide{
  position:absolute; inset:0;
  transition: transform .45s ease;
  cursor: pointer;
}
#newsMosaic.is-carousel .carousel-slide img{
  position:absolute; inset:0; width:100%; height:100%; object-fit:cover;
  transition: transform .3s ease;
}
#newsMosaic.is-carousel .carousel-slide:hover img { transform: scale(1.03); }

#newsMosaic.is-carousel .overlay{
  position:absolute; inset:0;
  background:linear-gradient(0deg, rgba(2,6,23,.75), rgba(2,6,23,.15));
}
#newsMosaic.is-carousel .inner{
  position:absolute; left:18px; right:18px; bottom:18px; color:#fff;
  transform: translateY(8px);
  transition: transform .3s ease;
}
#newsMosaic.is-carousel .carousel-slide:hover .inner { transform: translateY(0); }
#newsMosaic.is-carousel .inner .meta{ font-size:12px; opacity:.9 }
#newsMosaic.is-carousel .inner h3{ margin:4px 0 2px; font-size: clamp(18px, 2.2vw, 24px); font-weight:800; line-height:1.25 }
#newsMosaic.is-carousel .inner p{ margin:0; color:#e2e8f0; display:-webkit-box; -webkit-box-orient:vertical; -webkit-line-clamp:2; overflow:hidden }

.newsv3-grid{
  column-count: 3;
  column-gap: 16px;
}
@media (max-width: 1100px){ .newsv3-grid{ column-count: 2 } }
@media (max-width: 640px){ .newsv3-grid{ column-count: 1 } }

.card{
  display:inline-block; width:100%;
  border:1px solid rgba(148,163,184,.35); border-radius:14px; overflow:hidden; margin:0 0 16px;
  background:#fff; cursor:pointer;
  box-shadow:0 6px 16px rgba(2,132,199,.08);
  transition: transform .2s ease, box-shadow .2s ease;
}
.card:hover{ transform: translateY(-3px); box-shadow:0 10px 22px rgba(2,132,199,.14) }
.card .img-container { overflow: hidden; }
.card img{ width:100%; height:auto; aspect-ratio: 16 / 10; object-fit:cover; transition: transform .3s ease; }
.card:hover img { transform: scale(1.03); }
.card .body{ padding:12px }
.card .meta{ font-size:12px; color:var(--muted) }
.card h4{ font-size:16px; font-weight:800; margin:4px 0; line-height: 1.3; }
.card p{ font-size:14px; color:var(--muted); display:-webkit-box; -webkit-box-orient:vertical; -webkit-line-clamp:2; overflow:hidden; margin-top: 6px; }

.newsv3-footer{ display:flex; gap:12px; align-items:center; justify-content:center; margin-top:24px }
.newsv3-footer .tiny{ color:var(--muted) }

/* Drawer */
.drawer{ position:fixed; inset:0; z-index:80; visibility: hidden; }
.drawer.show{ visibility: visible; }
.drawer-backdrop{ position:absolute; inset:0; background:rgba(2,6,23,.6); backdrop-filter: blur(2px); opacity: 0; transition: opacity .25s ease; }
.drawer.show .drawer-backdrop { opacity: 1; }
.drawer-panel{
  position:absolute; top:0; right:0; height:100%; width:min(760px, 96vw);
  background:#fff; box-shadow: -20px 0 60px rgba(2,132,199,.25); overflow-y:auto;
  transform: translateX(100%); transition: transform .3s cubic-bezier(.4, 0, .2, 1);
}
.drawer.show .drawer-panel{ transform: translateX(0) }
/* Popup close button: đặt bên trong panel */
.drawer-close{
  position:absolute;
  top:10px;
  right:10px;   /* thêm dòng này */
  left:auto;     /* thay vì left:-50px */
  width:40px;
  height:40px;
  border-radius:999px;
  border:none;
  background:rgba(255,255,255,.9);
  color:#333;
  display:grid;
  place-items:center;
  z-index: 2;
}

.drawer-media{
  position:relative; margin:0; border-bottom:1px solid rgba(148,163,184,.3);
  display:grid; place-items:center;
}
.drawer-media img{ width:100%; height:min(420px, 55vh); object-fit:cover }
.gbtn{ position:absolute; top:50%; transform:translateY(-50%); width:42px; height:42px; border-radius:12px; border:1px solid rgba(148,163,184,.5); background:rgba(255,255,255,.9); display:grid; place-items:center }
.gbtn.prev{ left:10px } .gbtn.next{ right:10px }
.thumbs{ display:flex; gap:8px; overflow:auto; padding:8px 16px; background: #f8fafc; }
.thumbs img{ width:84px; height:56px; object-fit:cover; border-radius:8px; border:2px solid transparent; cursor:pointer; }
.thumbs img.active{ border-color: var(--brand-600); box-shadow: 0 0 0 2px #fff; }
.drawer-body{ padding:16px 24px 32px }
.drawer-body h3{ margin:.2rem 0 .1rem; font-size:24px; font-weight:800; line-height: 1.2; }
.drawer-body .meta{ font-size:13px; color:var(--muted); margin-bottom:12px }
.drawer-content{ color:#0f172a; line-height:1.7; font-size: 16px; }

/* Blur-up for images */
.img-blur{ filter: blur(12px); transform: scale(1.02); transition: filter .35s ease, transform .35s ease !important; }
.img-blur.is-loaded{ filter:none; transform:none }

/* Performance */
.newsv3-grid{ content-visibility:auto; contain-intrinsic-size: 800px }
.newsv3-grid:empty::before { content: 'Không tìm thấy bản tin nào phù hợp.'; color: var(--muted); text-align: center; display: block; padding: 2rem; }
/* ===== NEWS V4 - Carousel Only CSS ===== */
#newsMosaic.is-carousel {
  position: relative;
  height: clamp(300px, 40vw, 480px); /* Adjusted height */
  border-radius: 20px;
  overflow: hidden;
  background: #0b1220;
  box-shadow: 0 15px 40px rgba(2,132,199,.2);
}

#newsMosaic.is-carousel .carousel-slide {
  position: absolute;
  inset: 0;
  transition: transform .5s cubic-bezier(.4, 0, .2, 1);
  cursor: pointer;
}

#newsMosaic.is-carousel .carousel-slide img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform .4s ease;
}

#newsMosaic.is-carousel .carousel-slide:hover img {
  transform: scale(1.03);
}

#newsMosaic.is-carousel .overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(0deg, rgba(2, 6, 23, .8) 10%, rgba(2, 6, 23, .2) 60%);
}

#newsMosaic.is-carousel .inner {
  position: absolute;
  left: 24px;
  right: 24px;
  bottom: 24px;
  color: #fff;
  transform: translateY(8px);
  transition: transform .4s ease;
}

#newsMosaic.is-carousel .carousel-slide:hover .inner {
  transform: translateY(0);
}

#newsMosaic.is-carousel .inner .meta {
  font-size: 13px;
  opacity: .9;
}

#newsMosaic.is-carousel .inner h3 {
  margin: 6px 0 4px;
  font-size: clamp(20px, 2.5vw, 28px);
  font-weight: 800;
  line-height: 1.25;
}

#newsMosaic.is-carousel .inner p {
  margin: 0;
  color: #e2e8f0;
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  overflow: hidden;
}

/* Navigation Buttons for Carousel */
.news-nav-btn {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  z-index: 10;
  width: 44px;
  height: 44px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, .4);
  background: rgba(255, 255, 255, .15);
  backdrop-filter: blur(5px);
  color: white;
  display: grid;
  place-items: center;
  cursor: pointer;
  transition: background .2s ease, transform .2s ease;
}

.news-nav-btn:hover {
  background: rgba(255, 255, 255, .25);
  transform: translateY(-50%) scale(1.05);
}

.news-nav-btn.prev {
  left: 16px;
}

.news-nav-btn.next {
  right: 16px;
}

@media (max-width: 640px) {
  .news-nav-btn {
    width: 38px;
    height: 38px;
  }
  .news-nav-btn.prev { left: 10px; }
  .news-nav-btn.next { right: 10px; }
  #newsMosaic.is-carousel .inner { left: 16px; right: 16px; bottom: 16px; }
}

/* --- Patch: Fix hero background overflow & overlay coverage --- */
.hero{ overflow:hidden; }
.hero-bg{ z-index:0; }
.hero-overlay{ z-index:1; pointer-events:none; border-radius:inherit; }
.hero-content{ position:relative; z-index:2; }


/* --- Patch: Center Benefits cards --- */
#benefits .grid-3 { align-items: stretch; }
#benefits .card{
  display:flex;
  flex-direction:column;
  align-items:center;
  justify-content:center;
  text-align:center;
  gap:8px;
  padding:18px;
  border-radius:18px;
  min-height: 120px;
}
#benefits .card i, 
#benefits .card svg{
  width:32px;
  height:32px;
  opacity:.95;
}
#benefits .card h3{ margin:4px 0 0 0; font-size:18px; }
#benefits .card p{ margin:0; }
