:root {
  --bg: #081426;
  --surface: #0f223d;
  --card: #102948;
  --text: #e9f1ff;
  --muted: #afc2df;
  --line: #24466f;
  --primary: #1f7dff;
  --accent: #ff6b57;

  /* Design tokens bổ sung cho card */
  --card-radius: 14px;
  --card-padding: 18px;
  --card-text-size: 14px;
  --card-text-line: 1.57;
}

/* ========== Reset cơ bản ========== */
* { box-sizing: border-box; }
html, body {
  margin: 0;
  padding: 0;
  font-family: "Helvetica Neue", Arial, "Noto Sans", sans-serif;
  font-size: 14px;
  line-height: 1.57;
  background: var(--bg);
  color: var(--text);
}

/* Font chuyên biệt theo ngôn ngữ để giữ độ tin cậy khi hiển thị */
html:lang(ja) body {
  font-family: "Noto Sans JP", "Noto Sans", Inter, sans-serif;
}
html:lang(en) body,
html:lang(vi) body {
  font-family: "Helvetica Neue", Arial, "Noto Sans", sans-serif;
}

/* ========== Layout dùng chung ========== */
.container { width: min(1120px, 92%); margin: 0 auto; }
.container--narrow { max-width: 820px; }
.hidden { display: none; }

/* ========== Header ========== */
.header {
  position: sticky;
  top: 0;
  z-index: 20;
  border-bottom: 1px solid var(--line);
  background: rgba(8, 20, 38, 0.85);
  backdrop-filter: blur(10px);
}
.header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 0;
}
.brand { display: flex; align-items: center; gap: 10px; color: #fff; text-decoration: none; font-weight: 800; }
.brand__logo { width: 42px; height: 42px; object-fit: contain; }

.nav { display: flex; gap: 8px; align-items: center; }
.nav__item { position: relative; }
.nav__link {
  color: var(--muted);
  text-decoration: none;
  margin: 0 8px;
  padding: 6px 0;
  border-bottom: 2px solid transparent;
  transition: color .2s ease, border-color .2s ease;
}
.nav__link:hover,
.nav__item:hover > .nav__link {
  color: #fff;
  border-bottom-color: #ff3b30;
}

.submenu {
  position: absolute;
  top: calc(100% + 8px);
  left: 0;
  min-width: 270px;
  background: #fff;
  border-radius: 10px;
  box-shadow: 0 14px 34px rgba(0,0,0,.2);
  border: 1px solid #ececec;
  padding: 8px;
  opacity: 0;
  visibility: hidden;
  transform: translateY(6px);
  transition: all .2s ease;
  z-index: 30;
}
.nav__item--dropdown:hover .submenu,
.nav__item--dropdown.open .submenu,
.nav__item--dropdown:focus-within .submenu {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}
.submenu__link {
  display: block;
  color: #111;
  text-decoration: none;
  font-size: 14px;
  line-height: 1.4;
  padding: 8px 10px;
  border-radius: 8px;
}
.submenu__link:hover { background: #f5f5f5; }

.header__actions { display: flex; gap: 6px; align-items: center; }
.icon-btn {
  width: 34px;
  height: 34px;
  border-radius: 10px;
  border: 1px solid #3a618f;
  background: #0a1f39;
  color: #fff;
  font-size: 14px;
  line-height: 1;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0;
}
.icon-btn:hover { background: #12345a; }
/* Header search icon: bỏ khung viền ngoài theo yêu cầu UI */
#searchBtn.icon-btn {
  border: none;
  background: transparent;
  box-shadow: none;
}
#searchBtn.icon-btn:hover { background: transparent; opacity: .88; }
.lang-switcher { font-size: 16px; font-weight: 500; color: var(--muted); line-height: 1; white-space: nowrap; }
.lang-switcher--icon { display: inline-flex; align-items: center; justify-content: center; width: 18px; font-size: 15px; }
.lang-select {
  appearance: none;
  -webkit-appearance: none;
  -moz-appearance: none;
  background: #0a1f39;
  color: #fff;
  border: 1px solid #3a618f;
  border-radius: 8px;
  padding: 3px 20px 3px 8px;
  font-size: 12px;
  font-weight: 600;
  width: 76px;
  min-width: 76px;
  height: 30px;
  background-image: linear-gradient(45deg, transparent 50%, #cfe0ff 50%), linear-gradient(135deg, #cfe0ff 50%, transparent 50%);
  background-position: calc(100% - 12px) 12px, calc(100% - 8px) 12px;
  background-size: 4px 4px, 4px 4px;
  background-repeat: no-repeat;
}

/* ========== Button / Action ========== */
.btn {
  border: 1px solid #3a618f;
  background: transparent;
  color: #fff;
  padding: 10px 14px;
  border-radius: 10px;
  cursor: pointer;
  text-decoration: none;
}
.btn--primary { background: var(--primary); border-color: var(--primary); }
.btn--ghost { background: transparent; }
.btn--back { border: 1px solid #3f5e87; background: #12345a; color: #fff; font-size: 14px; padding: 8px 12px; border-radius: 8px; }
.btn--back::before { content: '← '; }

/* Link action kiểu FPT "Xem thêm" */
.link-action {
  margin-top: 6px;
  padding: 8px 0;
  border: none;
  border-radius: 0;
  background: transparent;
  color: var(--accent);
  font-weight: 700;
  letter-spacing: .2px;
  font-size: 16px;
  line-height: 1.2;
  font-family: inherit;
  text-decoration: none;
  cursor: pointer;
}
.link-action::after { content: ' →'; }
.link-action:hover { color: #ff8b7c; }

/* ========== Hero ========== */
.hero { position: relative; min-height: 72vh; display: flex; align-items: center; }
.hero__bg { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.hero__overlay { position: absolute; inset: 0; background: linear-gradient(100deg, rgba(5, 13, 25, .86), rgba(5, 13, 25, .45)); }
.hero__content { position: relative; z-index: 2; padding: 70px 0; }
.hero__tag { display: inline-block; border: 1px solid #3d5f89; background: #163157; padding: 6px 11px; border-radius: 999px; }
.hero__title { font-size: clamp(26px, 4.2vw, 46px); margin: 12px 0 14px; line-height: 1.15; }
.hero__desc { max-width: 760px; color: #c4d4eb; }

/* ========== Section chung ========== */
.section { padding: 62px 0; border-top: 1px solid var(--line); }
.section--alt { background: rgba(16, 41, 72, .45); }
.section--detail { background: rgba(10, 33, 60, .65); }
.section__title { margin-top: 0; font-size: 34px; }
.section__subtitle { margin: 0 0 10px; font-size: clamp(22px, 3vw, 28px); font-weight: 800; line-height: 1.25; }
.section__subtitle--spaced { margin-top: 22px; }
.section-divider { border: none; border-top: 1px solid var(--line); margin: 28px 0 16px; }
.section__desc { color: var(--muted); }
.bim-intro-highlight {
  color: #d9e7f8;
  font-weight: 400;
  line-height: 1.8;
  background: rgba(24, 56, 95, 0.35);
  border: 1px solid #33557d;
  border-left: 4px solid #69a6ff;
  padding: 14px 16px;
  border-radius: 10px;
  margin-top: 10px;
}

/* ========== Grid / Card ========== */
.grid { display: grid; gap: 16px; }
.grid--2 { grid-template-columns: repeat(2, 1fr); }
.grid--3 { grid-template-columns: repeat(3, 1fr); }

.card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--card-radius);
  padding: var(--card-padding);
}
.card__image { width: 100%; height: clamp(170px, 26vw, 200px); object-fit: cover; border-radius: 10px; border: 1px solid #35567d; margin-bottom: 12px; }
.card__title { margin: 0 0 8px; font-size: 20px; }
.card__text { color: var(--muted); margin: 0; font-size: var(--card-text-size); line-height: var(--card-text-line); }

/* Fix đồng bộ cỡ chữ riêng cho EDU card 3 (Partnership) */
.card__title--edu3 { font-size: 20px; line-height: 1.35; }
.card__text--edu3 { font-size: 16px; line-height: 1.6; }

.project-showcase { margin-top: 28px; }
.project-showcase--separated {
  margin-top: 44px;
  padding-top: 26px;
  border-top: 1px solid var(--line);
}
.project-showcase .card { padding: 10px; }
.project-showcase .card__image { height: 190px; }

.contact p { color: #d3e0f4; }

/* ========== Footer ========== */
.footer { border-top: 1px solid var(--line); }
.footer__inner { padding: 16px 0; color: var(--muted); }
.footer__inner--stack { display: flex; flex-direction: column; gap: 10px; }
.footer__nav { display: flex; flex-wrap: wrap; gap: 14px; }
.footer__link { color: var(--muted); text-decoration: none; font-size: 15px; border-bottom: 2px solid transparent; padding-bottom: 3px; }
.footer__link:hover { color: #fff; border-bottom-color: #ff3b30; }
.footer__login-link { color: var(--muted); text-decoration: none; }
.footer__login-link:hover { color: #fff; }

/* ========== Admin ========== */
.admin-panel { padding: 22px 0 30px; border-top: 1px solid var(--line); background: #091a30; }
.panel-head { display: flex; justify-content: space-between; align-items: center; }
.admin-box {
  display: grid;
  gap: 10px;
  min-width: min(420px, 88vw);
  background: #0b203a;
  border: 1px solid #2a4b73;
  border-radius: 12px;
  padding: 18px;
}
input, textarea, select {
  width: 100%;
  margin: 8px 0;
  padding: 10px;
  border-radius: 8px;
  border: 1px solid #35567d;
  background: #0a1f39;
  color: #fff;
}
textarea { min-height: 96px; }
.row { display: flex; gap: 8px; }
.hint { color: #9ab0cf; }

/* ========== Responsive ========== */
@media (max-width: 900px) {
  .grid--2, .grid--3 { grid-template-columns: 1fr; }

  /* Hiển thị thanh menu trên mobile (không ẩn nữa) */
  .header__inner {
    flex-wrap: wrap;
    row-gap: 10px;
    align-items: center;
  }
  .brand { gap: 8px; flex: 1 1 auto; min-width: 0; }
  .header__actions { margin-left: auto; flex: 0 0 auto; }

  .nav {
    display: flex;
    align-items: center;
    justify-content: space-between;
    order: 3;
    width: 100%;
    overflow: visible;
    white-space: normal;
    padding-bottom: 2px;
    gap: 0;
  }
  .nav__item { display: inline-flex; align-items: center; }
  .nav__link {
    display: inline-flex;
    align-items: center;
    margin: 0 6px 0 0;
    font-size: clamp(12px, 3.2vw, 13px);
    line-height: 1.2;
    min-height: 28px;
    white-space: nowrap;
  }
  .nav__item:last-child .nav__link { margin-right: 0; }
  .nav__item--dropdown .submenu {
    position: fixed;
    left: 12px;
    right: 12px;
    min-width: unset;
    max-height: 60vh;
    overflow-y: auto;
  }

  .hero { min-height: 62vh; }
  .brand__logo { width: 34px; height: 34px; }
  .brand__text {
    display: inline-block;
    font-size: 12px;
    line-height: 1.1;
    letter-spacing: 0.2px;
    white-space: nowrap;
  }
}


/* ========== Carousel posts (vuốt trái/phải) ========== */
.carousel-wrap { display: grid; grid-template-columns: 40px 1fr 40px; gap: 10px; align-items: center; }
.carousel { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(260px, 38%); gap: 14px; overflow-x: auto; scroll-snap-type: x mandatory; padding-bottom: 8px; }
.carousel > .card { scroll-snap-align: start; }
.carousel-btn { height: 40px; border-radius: 999px; border: 1px solid #3a618f; background: #0f2a49; color: #fff; cursor: pointer; }
@media (max-width: 900px) {
  .carousel-wrap { grid-template-columns: 1fr; }
  .carousel-btn { display: none; }
  .carousel { grid-auto-columns: 88%; }
}

.card__image--post { height: 150px; object-fit: cover; margin-bottom: 10px; }

/* ========== Partner Contact (global) ========== */
.partner-contact { border-top: 1px solid var(--line); }
.partner-contact__box { padding: 8px 0 4px; }
.partner-contact__title {
  margin: 0 0 10px;
  font-size: clamp(24px, 2.6vw, 34px);
  line-height: 1.25;
  letter-spacing: .2px;
}
.partner-contact__item {
  margin: 0 0 6px;
  font-size: 18px;
  line-height: 1.5;
  color: var(--text);
}
.partner-contact__item strong {
  font-weight: 800;
  font-size: 20px;
}
.partner-contact__phone {
  font-family: "Inter", "Noto Sans", system-ui, -apple-system, sans-serif;
  font-size: 18px;
  font-weight: 400;
  letter-spacing: .2px;
  color: #d9e8ff;
}
/* Chặn iOS tự đổi màu số điện thoại sang xanh mặc định */
.partner-contact__phone a,
.partner-contact a[x-apple-data-detectors],
.partner-contact a[x-apple-data-detectors-type="telephone"] {
  color: inherit !important;
  text-decoration: none !important;
}
.partner-contact__call {
  margin-top: 10px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 16px;
  font-weight: 700;
  color: #eaf3ff;
  background: linear-gradient(180deg, #3d8ee0 0%, #2d78c8 100%);
  border: 1px solid #5a9ee1;
  box-shadow: 0 8px 20px rgba(24, 78, 146, 0.35);
  transition: transform .18s ease, box-shadow .18s ease, filter .18s ease;
  animation: callPulse 2.2s ease-in-out infinite;
}
.partner-contact__call:hover {
  transform: translateY(-1px);
  filter: brightness(1.04);
  box-shadow: 0 12px 24px rgba(24, 78, 146, 0.42);
}
.partner-contact__icon { font-size: 18px; }
@keyframes callPulse {
  0%, 100% { box-shadow: 0 8px 20px rgba(24, 78, 146, 0.35); }
  50% { box-shadow: 0 10px 26px rgba(44, 113, 196, 0.48); }
}

/* ========== Global AI Chat Widget ========== */
.oc-chat{position:fixed;right:14px;bottom:20px;z-index:80}
.oc-chat__open{border:none;background:#1f7dff;color:#fff;border-radius:999px;padding:10px 14px;cursor:pointer;box-shadow:0 10px 24px rgba(15,55,110,.34)}
.oc-chat.open .oc-chat__open{opacity:0;visibility:hidden;pointer-events:none}
.oc-chat__panel{display:none;position:absolute;right:0;bottom:0;width:min(300px,78vw);height:min(420px,56vh);background:#fff;border:1px solid #d8e4f2;border-radius:12px;box-shadow:0 16px 30px rgba(10,34,66,.22);overflow:hidden;transform-origin:right bottom}
.oc-chat__panel.open{display:flex;flex-direction:column}
.oc-chat__head{display:flex;justify-content:space-between;align-items:center;padding:10px 12px;background:#eaf3ff;color:#12385f;border-bottom:1px solid #c8ddf6}
.oc-chat__head h4{margin:0;font-size:14px;color:#12385f}
.oc-chat__close{border:none;background:transparent;color:#12385f;font-size:18px;cursor:pointer}
.oc-chat__feed{flex:1;overflow:auto;padding:10px;background:#f6f9ff}
.oc-chat-msg{padding:8px 10px;border-radius:10px;margin-bottom:8px;font-size:13px;line-height:1.5}
.oc-chat-msg--bot{background:#eaf2ff;color:#183657}
.oc-chat-msg--user{background:#1f7dff;color:#fff;margin-left:22px}
.oc-chat__hint{padding:0 10px 8px;color:#60748f;font-size:12px}
.oc-chat__input{display:flex;gap:8px;padding:10px;border-top:1px solid #d8e4f2}
.oc-chat__input input{margin:0;background:#fff;color:#17314f;border:1px solid #c9d8ea;font-size:13px;line-height:1.5}
.oc-chat__input input:focus{outline:none;border-color:#9fc3ea;box-shadow:0 0 0 2px rgba(64,138,224,.16)}
.oc-chat__input button{border:none;border-radius:8px;padding:8px 12px;background:#1f7dff;color:#fff;cursor:pointer}
@media (max-width:768px){.oc-chat__input input{font-size:16px}.oc-chat__panel{width:min(300px,77.5vw);height:min(388px,50vh)}}

/* ========== About sub-pages quick navigation ========== */
.about-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.about-nav--mid { margin-top: 18px; }
.about-nav--end {
  margin-top: 22px;
  padding-top: 14px;
  border-top: 1px solid var(--line);
}
.about-nav__btn {
  padding: 7px 12px;
  border-radius: 999px;
  font-size: 14px;
  font-weight: 500;
  border-color: #2f5587;
  color: #dbe8ff;
  background: rgba(20, 52, 92, 0.35);
  white-space: nowrap;
}
.about-nav__btn:hover {
  border-color: #4d83c6;
  color: #fff;
  background: rgba(31, 85, 153, 0.35);
}
@media (max-width: 900px) {
  .about-nav { gap: 6px; }
  .about-nav__btn {
    padding: 6px 10px;
    font-size: 13px;
  }

  .partner-contact__title { font-size: 24px; }
  .partner-contact__item { font-size: 16px; }
  .partner-contact__item strong { font-size: 17px; }
  .partner-contact__phone { font-size: 16px; color: #ffffff !important; }
  .partner-contact__phone a,
  .partner-contact a[x-apple-data-detectors],
  .partner-contact a[x-apple-data-detectors-type="telephone"] {
    color: #ffffff !important;
    text-decoration: none !important;
  }
  .partner-contact__call {
    font-size: 14px;
    background: linear-gradient(180deg, #4f9ceb 0%, #3f86d6 100%);
    border-color: #76afea;
  }
}
