:root {
  --blue: #073b86;
  --blue-2: #0054b8;
  --red: #e30613;
  --light: #f3f8ff;
  --text: #17345c;
  --muted: #64748b;
  --white: #ffffff;
  --border: #d9e5f4;
  --shadow: 0 12px 35px rgba(7, 59, 134, 0.12);
  --radius: 18px;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; }

body {
  font-family: 'Be Vietnam Pro', sans-serif;
  color: var(--text);
  background: #fff;
  line-height: 1.6;
}

a { text-decoration: none; color: inherit; }
img { max-width: 100%; display: block; }

.container {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
}

/* Alert Messages */
.alert {
  padding: 12px 16px;
  border-radius: 8px;
  margin-bottom: 20px;
  font-weight: 600;
  transition: opacity 0.3s ease;
}

.alert-success {
  background: #d4edda;
  color: #155724;
  border: 1px solid #c3e6cb;
}

.alert-error {
  background: #f8d7da;
  color: #721c24;
  border: 1px solid #f5c6cb;
}

.topbar {
  background: var(--white);
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: 0 4px 18px rgba(0,0,0,0.06);
}

.nav {
  height: 82px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.logo {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-shrink: 0;
}

.logo-badge {
  width: 58px;
  height: 58px;
  border-radius: 50%;
  background: #fff;
  border: 2px solid var(--border);
  display: grid;
  place-items: center;
  color: var(--red);
  font-size: 25px;
}

.logo strong {
  display: block;
  color: var(--red);
  font-size: 25px;
  line-height: 1;
}

.logo span {
  color: var(--blue);
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
}

.menu {
  display: flex;
  align-items: center;
  gap: 28px;
  font-size: 14px;
  font-weight: 800;
  color: #0f294d;
  text-transform: uppercase;
}

.menu a:hover { color: var(--red); }

.hotline {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 13px 20px;
  background: var(--red);
  color: #fff;
  border-radius: 999px;
  font-weight: 800;
  box-shadow: 0 8px 20px rgba(227,6,19,.25);
  white-space: nowrap;
}

.mobile-toggle { display: none; font-size: 24px; color: var(--blue); cursor: pointer; }

.hero {
  overflow: hidden;
  background:
    radial-gradient(circle at 78% 32%, rgba(0,84,184,.14), transparent 34%),
    linear-gradient(90deg, #ffffff 0%, #f4f9ff 58%, #eaf5ff 100%);
  min-height: 670px;
  position: relative;
}

.hero::before {
  content: "";
  position: absolute;
  left: 0;
  bottom: 0;
  width: 42%;
  height: 260px;
  background: linear-gradient(to top, rgba(7,59,134,.16), transparent), url('https://images.unsplash.com/photo-1583417319070-4a69db38a482?auto=format&fit=crop&w=900&q=80') center/cover;
  opacity: .42;
  clip-path: polygon(0 0, 100% 30%, 80% 100%, 0 100%);
}

.hero-grid {
  position: relative;
  z-index: 2;
  display: grid;
  grid-template-columns: 1.04fr .96fr;
  gap: 36px;
  align-items: center;
  padding: 72px 0 40px;
}

.trust-badge {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  background: var(--red);
  color: #fff;
  padding: 12px 18px;
  border-radius: 10px;
  font-weight: 800;
  text-transform: uppercase;
  box-shadow: 0 10px 25px rgba(227,6,19,.18);
  margin-bottom: 26px;
}

.hero h1 {
  font-size: clamp(38px, 5vw, 72px);
  line-height: 1.05;
  color: var(--blue);
  text-transform: uppercase;
  font-weight: 900;
  letter-spacing: -1.8px;
  margin-bottom: 14px;
}

.hero h1 span { color: var(--red); display: block; }

.hero-label {
  display: inline-block;
  background: var(--blue);
  color: #fff;
  padding: 10px 18px;
  border-radius: 8px;
  font-size: 20px;
  font-weight: 800;
  text-transform: uppercase;
  margin: 10px 0 22px;
}

.hero p {
  max-width: 590px;
  color: #24466f;
  font-size: 20px;
  font-weight: 600;
  margin-bottom: 28px;
}

.hero-actions { display: flex; gap: 16px; flex-wrap: wrap; }

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 54px;
  padding: 0 24px;
  border-radius: 8px;
  font-weight: 800;
  border: 2px solid transparent;
  transition: .2s ease;
  cursor: pointer;
}

.btn-red { background: var(--red); color: #fff; box-shadow: 0 10px 25px rgba(227,6,19,.25); }
.btn-red:hover { transform: translateY(-2px); }
.btn-outline { background: #fff; color: var(--blue); border-color: var(--border); }
.btn-outline:hover { border-color: var(--blue); transform: translateY(-2px); }

.hero-visual {
  min-height: 390px;
  position: relative;
}

.permit-card {
  position: absolute;
  background: #fff;
  border-radius: 14px;
  box-shadow: var(--shadow);
  border: 1px solid var(--border);
}

.passport {
  top: 5px;
  left: 105px;
  width: 210px;
  height: 270px;
  background: linear-gradient(135deg, #062b68, #0b58c7);
  color: #fff;
  display: grid;
  place-items: center;
  transform: rotate(-8deg);
  text-align: center;
  padding: 26px;
}

.passport i { font-size: 64px; margin: 16px 0; }
.passport strong { font-size: 20px; text-transform: uppercase; }

.license-jp {
  left: 10px;
  bottom: 74px;
  width: 390px;
  padding: 18px;
  transform: rotate(2deg);
}

.license-vn {
  right: 0;
  bottom: 88px;
  width: 270px;
  padding: 16px;
  background: #ffe6b2;
  transform: rotate(-2deg);
}

.license-title {
  font-weight: 900;
  color: #111827;
  border-bottom: 2px solid rgba(0,0,0,.12);
  padding-bottom: 8px;
  margin-bottom: 10px;
  font-size: 15px;
}

.license-content { display: flex; gap: 14px; align-items: center; }
.avatar { width: 74px; height: 88px; background: #e9f0f8; border-radius: 8px; display:grid; place-items:center; color:var(--blue); font-size:36px; }
.lines { flex: 1; }
.line { height: 9px; background: #d3dce8; border-radius: 8px; margin: 8px 0; }
.line.short { width: 62%; }

.arrow {
  position: absolute;
  right: 236px;
  top: 128px;
  color: var(--blue-2);
  font-size: 80px;
  transform: rotate(8deg);
}

.features {
  position: relative;
  z-index: 5;
  background: #fff;
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}

.feature-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0;
}

.feature-item {
  text-align: center;
  padding: 28px 18px;
  border-right: 1px solid var(--border);
}
.feature-item:last-child { border-right: 0; }
.feature-icon {
  width: 62px;
  height: 62px;
  margin: 0 auto 12px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: #f1f7ff;
  color: var(--blue);
  font-size: 28px;
  border: 3px solid #fff;
  box-shadow: 0 0 0 2px var(--border);
}
.feature-item strong { display:block; color: var(--blue); }

section { padding: 66px 0; }

.section-title { text-align: center; margin-bottom: 38px; }
.section-title h2 {
  color: var(--blue);
  font-size: clamp(28px, 4vw, 38px);
  text-transform: uppercase;
  font-weight: 900;
}
.section-title::after {
  content: "";
  width: 62px;
  height: 4px;
  background: var(--red);
  border-radius: 99px;
  display: block;
  margin: 12px auto 0;
}

.services { background: #f7fbff; }

.service-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 28px;
}

.service-card {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 28px;
  text-align: center;
  box-shadow: var(--shadow);
  transition: .25s ease;
}
.service-card:hover { transform: translateY(-8px); }
.service-img {
  height: 150px;
  display: grid;
  place-items: center;
  background: linear-gradient(135deg, #f3f8ff, #ffffff);
  border-radius: 14px;
  margin-bottom: 20px;
  color: var(--blue);
  font-size: 58px;
  position: relative;
  overflow: hidden;
}
.service-img .flag {
  position: absolute;
  left: 26px;
  top: 34px;
  width: 68px;
  height: 46px;
  border-radius: 7px;
  background: #fff;
  box-shadow: 0 6px 18px rgba(0,0,0,.08);
}
.flag::after { content:""; position:absolute; width:22px; height:22px; border-radius:50%; background:#e30613; left:23px; top:12px; }
.service-card h3 { color: var(--blue); font-size: 23px; line-height: 1.25; margin-bottom: 12px; }
.service-card p { color: var(--muted); margin-bottom: 22px; }

.process { background: #fff; }
.steps {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 22px;
  position: relative;
}
.steps::before {
  content:"";
  position:absolute;
  top: 45px;
  left: 10%;
  right: 10%;
  border-top: 2px dashed #cdd9e8;
  z-index: 0;
}
.step {
  text-align: center;
  position: relative;
  z-index: 1;
}
.step-icon {
  width: 92px;
  height: 92px;
  margin: 0 auto 12px;
  border-radius: 50%;
  background: var(--blue);
  color: #fff;
  display: grid;
  place-items: center;
  font-size: 34px;
  border: 8px solid #fff;
  box-shadow: 0 0 0 3px var(--border);
}
.step-number { color: var(--red); font-weight: 900; font-size: 18px; }
.step h3 { color: var(--blue); margin: 8px 0 6px; }
.step p { color: var(--muted); font-size: 14px; }

.documents { background: #eef7ff; }
.doc-row {
  display: grid;
  grid-template-columns: 1fr repeat(4, 1fr);
  gap: 22px;
  align-items: stretch;
}
.doc-heading {
  display: flex;
  flex-direction: column;
  justify-content: center;
}
.doc-heading h2 { color: var(--blue); font-size: 34px; text-transform: uppercase; font-weight: 900; line-height: 1.2; }
.doc-heading span { width: 54px; height: 4px; background: var(--red); margin-top: 18px; }
.doc-card {
  background: #fff;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  padding: 26px 18px;
  text-align: center;
  box-shadow: 0 8px 22px rgba(7,59,134,.08);
  font-weight: 800;
  color: var(--blue);
}
.doc-card i { display:block; font-size: 46px; margin-bottom: 14px; }

.band {
  background: radial-gradient(circle at center, rgba(255,255,255,.10), transparent 38%), var(--blue);
  color: #fff;
  padding: 42px 0;
  text-align: center;
}
.band h2 { font-size: 34px; text-transform: uppercase; font-weight: 900; }
.band p { margin-bottom: 30px; font-size: 18px; }
.band-grid { display:grid; grid-template-columns: repeat(3,1fr); gap: 18px; }
.band-item { display:flex; gap:14px; align-items:center; justify-content:center; border-right:1px solid rgba(255,255,255,.25); }
.band-item:last-child { border-right:0; }
.band-item i { width:62px; height:62px; border-radius:50%; background:#fff; color:var(--blue); display:grid; place-items:center; font-size:28px; flex-shrink:0; }
.band-item strong { display:block; font-size:22px; text-transform:uppercase; }
.band-item span { opacity:.9; }

.contact-section {
  background: linear-gradient(135deg, #edf7ff, #ffffff);
  padding: 64px 0;
}
.contact-grid {
  display: grid;
  grid-template-columns: .88fr 1.12fr;
  gap: 44px;
  align-items: center;
}
.advisor {
  position: relative;
  min-height: 330px;
  display: flex;
  align-items: end;
  justify-content: center;
}
.advisor-person {
  width: 255px;
  height: 300px;
  background: linear-gradient(#fff, #dcebff);
  border-radius: 120px 120px 22px 22px;
  display: grid;
  place-items: center;
  font-size: 120px;
  color: var(--blue);
  box-shadow: var(--shadow);
}
.phone-card {
  position: absolute;
  left: 10px;
  bottom: 14px;
  background: #fff;
  border-radius: 18px;
  padding: 16px 24px;
  box-shadow: var(--shadow);
  display: flex;
  align-items: center;
  gap: 12px;
  color: var(--red);
  font-weight: 900;
  font-size: 28px;
}
.phone-card small { display:block; color:var(--blue); font-size:13px; }
.phone-card i { width:48px; height:48px; background:var(--red); color:#fff; border-radius:50%; display:grid; place-items:center; font-size:22px; }

.form-card {
  background: #fff;
  border-radius: var(--radius);
  padding: 34px;
  box-shadow: var(--shadow);
  border: 1px solid var(--border);
}
.form-card h2 { color: var(--blue); font-size: 32px; text-transform:uppercase; font-weight:900; }
.form-card p { color: var(--muted); margin-bottom: 22px; }
.form-grid { display:grid; grid-template-columns:1fr 1fr; gap:14px; }
.form-card input, .form-card select, .form-card textarea {
  width: 100%;
  height: 50px;
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 0 14px;
  font-family: inherit;
  outline: none;
  color: var(--text);
}
.form-card textarea { grid-column: 1 / -1; height: 74px; padding-top:14px; resize: vertical; }
.form-card button { width: 100%; grid-column: 1 / -1; border: 0; }

footer {
  background: #07306d;
  color: #fff;
  padding: 38px 0 28px;
}
.footer-grid { display:grid; grid-template-columns: 1.2fr 1fr .8fr; gap:30px; }
footer h3 { margin-bottom: 14px; font-size: 24px; }
footer p, footer li { opacity:.9; font-size:14px; list-style:none; margin-bottom:8px; }
.socials { display:flex; gap:12px; }
.socials a { width:42px; height:42px; border-radius:50%; background:rgba(255,255,255,.12); display:grid; place-items:center; font-size:18px; }
.copyright { text-align:center; border-top:1px solid rgba(255,255,255,.12); padding-top:18px; margin-top:28px; opacity:.85; font-size:13px; }

.floating-contact {
  position: fixed;
  right: 22px;
  bottom: 22px;
  z-index: 999;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.floating-contact a {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  color: #fff;
  box-shadow: 0 10px 25px rgba(0,0,0,.18);
  font-size: 24px;
}
.float-phone { background: var(--red); }
.float-messenger { background: #0084ff; }

@media (max-width: 980px) {
  .menu { display:none; }
  .mobile-toggle { display:block; }
  .hero-grid, .contact-grid { grid-template-columns: 1fr; }
  .hero-visual { min-height: 360px; }
  .service-grid, .band-grid { grid-template-columns: 1fr; }
  .feature-grid, .steps { grid-template-columns: repeat(2, 1fr); }
  .steps::before { display:none; }
  .doc-row { grid-template-columns: repeat(2, 1fr); }
  .doc-heading { grid-column: 1 / -1; text-align:center; align-items:center; }
  .footer-grid { grid-template-columns: 1fr; }
  .band-item { border-right:0; justify-content:flex-start; }
}

@media (max-width: 620px) {
  .nav { height: 72px; }
  .logo strong { font-size:20px; }
  .hotline { display:none; }
  .hero { min-height: auto; }
  .hero-grid { padding: 42px 0 30px; }
  .hero p { font-size: 17px; }
  .hero-label { font-size: 15px; }
  .hero-visual { display:none; }
  .feature-grid, .steps, .doc-row, .form-grid { grid-template-columns: 1fr; }
  .feature-item { border-right: 0; border-bottom: 1px solid var(--border); }
  section { padding: 48px 0; }
  .phone-card { position: static; margin-top: -20px; font-size:22px; }
  .advisor { min-height:auto; flex-direction:column; align-items:center; }
  .form-card { padding: 24px; }
  .floating-contact { right: 14px; bottom: 14px; }
  .menu {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: #fff;
    flex-direction: column;
    padding: 20px;
    box-shadow: 0 4px 18px rgba(0,0,0,0.1);
    display: none;
  }
  .menu.active { display: flex; }
}
/* Additional styles for v2.0 */

/* Form field errors */
.field-error {
  color: #e30613;
  font-size: 12px;
  margin-top: 5px;
  display: block;
}

input.error, select.error, textarea.error {
  border-color: #e30613;
  background-color: #fff5f5;
}

/* Alert close button */
.alert {
  position: relative;
}

.alert-close {
  position: absolute;
  top: 8px;
  right: 12px;
  background: none;
  border: none;
  color: inherit;
  font-size: 18px;
  cursor: pointer;
  opacity: 0.7;
  width: 24px;
  height: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.alert-close:hover {
  opacity: 1;
}

/* Service meta info */
.service-meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin: 15px 0;
  font-size: 13px;
}

.service-duration {
  color: var(--muted);
  display: flex;
  align-items: center;
  gap: 5px;
}

.service-popular {
  background: #ff6b35;
  color: white;
  padding: 3px 8px;
  border-radius: 12px;
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
}

/* Required badge for documents */
.required-badge {
  position: absolute;
  top: 8px;
  right: 8px;
  background: #e30613;
  color: white;
  font-size: 10px;
  padding: 2px 6px;
  border-radius: 8px;
  font-weight: 600;
}

.doc-card {
  position: relative;
}

/* Footer enhancements */
.footer-stats {
  display: flex;
  gap: 20px;
  margin-top: 15px;
}

.stat-item {
  text-align: center;
}

.stat-item strong {
  display: block;
  font-size: 18px;
  color: #fff;
}

.stat-item span {
  font-size: 12px;
  opacity: 0.8;
}

.contact-list {
  list-style: none;
  padding: 0;
}

.contact-list li {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 8px;
}

.contact-list a {
  color: inherit;
  text-decoration: none;
}

.contact-list a:hover {
  color: #fff;
}

.footer-services h4 {
  margin: 15px 0 8px;
  font-size: 14px;
}

.footer-services ul {
  list-style: none;
  padding: 0;
}

.footer-services li {
  margin-bottom: 5px;
}

.footer-services a {
  color: inherit;
  text-decoration: none;
  font-size: 13px;
  opacity: 0.8;
}

.footer-services a:hover {
  opacity: 1;
}

.copyright-content {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 15px;
}

.footer-links {
  display: flex;
  gap: 15px;
}

.footer-links a {
  color: inherit;
  text-decoration: none;
  font-size: 13px;
  opacity: 0.8;
}

.footer-links a:hover {
  opacity: 1;
}

.powered-by {
  text-align: center;
  font-size: 11px;
  opacity: 0.6;
  margin-top: 10px;
}

.powered-by a {
  color: inherit;
  text-decoration: none;
}

/* Floating contact enhancements */
.float-zalo {
  background: #0068ff;
}

/* Back to top button */
.back-to-top {
  position: fixed;
  bottom: 100px;
  right: 22px;
  width: 50px;
  height: 50px;
  background: var(--blue);
  color: white;
  border: none;
  border-radius: 50%;
  cursor: pointer;
  z-index: 998;
  display: none;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  box-shadow: 0 4px 12px rgba(0,0,0,0.15);
  transition: all 0.3s ease;
}

.back-to-top:hover {
  background: var(--red);
  transform: translateY(-2px);
}

/* Animation classes */
.animate-on-scroll {
  opacity: 0;
  transform: translateY(30px);
  transition: all 0.6s ease;
}

.animate-on-scroll.animate-in {
  opacity: 1;
  transform: translateY(0);
}

/* Loading states */
button:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

/* Lazy loading */
img.lazy {
  opacity: 0;
  transition: opacity 0.3s;
}

img.lazy.loaded {
  opacity: 1;
}

/* Mobile menu improvements */
@media (max-width: 980px) {
  .menu.active {
    display: flex !important;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: #fff;
    flex-direction: column;
    padding: 20px;
    box-shadow: 0 4px 18px rgba(0,0,0,0.1);
    z-index: 999;
  }
  
  .menu.active a {
    padding: 12px 0;
    border-bottom: 1px solid #eee;
  }
  
  .menu.active a:last-child {
    border-bottom: none;
  }
}

@media (max-width: 620px) {
  .copyright-content {
    flex-direction: column;
    text-align: center;
  }
  
  .footer-links {
    justify-content: center;
  }
  
  .footer-stats {
    justify-content: center;
  }
  
  .back-to-top {
    bottom: 80px;
    right: 14px;
    width: 45px;
    height: 45px;
  }
}


/* Blog Section on Homepage */
.blog-section {
  background: #f7fbff;
  padding: 66px 0;
}

.blog-home-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 28px;
}

.blog-home-card {
  background: #fff;
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid var(--border);
  box-shadow: 0 8px 22px rgba(7,59,134,.06);
  transition: all 0.3s ease;
  display: flex;
  flex-direction: column;
}

.blog-home-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 16px 40px rgba(7,59,134,.12);
}

.blog-home-image {
  display: block;
  width: 100%;
  height: 200px;
  overflow: hidden;
  background: #e9f0f8;
}

.blog-home-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.3s ease;
}

.blog-home-card:hover .blog-home-image img {
  transform: scale(1.05);
}

.blog-home-placeholder {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #94a3b8;
  font-size: 3rem;
  background: linear-gradient(135deg, #f3f8ff, #e9f0f8);
}

.blog-home-body {
  padding: 22px;
  flex: 1;
  display: flex;
  flex-direction: column;
}

.blog-home-meta {
  display: flex;
  gap: 12px;
  font-size: 12px;
  color: var(--muted);
  margin-bottom: 10px;
  align-items: center;
}

.blog-home-cat {
  background: var(--light);
  color: var(--blue);
  padding: 3px 10px;
  border-radius: 12px;
  font-weight: 600;
  font-size: 11px;
}

.blog-home-body h3 {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 10px;
  line-height: 1.4;
}

.blog-home-body h3 a {
  text-decoration: none;
  color: inherit;
  transition: color 0.2s;
}

.blog-home-body h3 a:hover {
  color: var(--blue);
}

.blog-home-body p {
  font-size: 14px;
  color: var(--muted);
  line-height: 1.6;
  flex: 1;
}

.blog-home-more {
  text-align: center;
  margin-top: 36px;
}

@media (max-width: 980px) {
  .blog-home-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 620px) {
  .blog-home-grid {
    grid-template-columns: 1fr;
  }
}
