:root {
  --bg: #f4f5fb;
  --bg-soft: #ffffff;
  --text: #121826;
  --muted: #647089;
  --border: #dde3f0;
  --brand: #0f6acb;
  --brand-soft: #e5f0ff;
  --radius-lg: 20px;
  --radius-md: 14px;
  --shadow-lg: 0 18px 38px rgba(15, 35, 80, 0.18);
  --shadow-md: 0 10px 24px rgba(20, 40, 80, 0.14);
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html, body {
  margin: 0;
  padding: 0;
  height: 100%;
}

body {
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  background: radial-gradient(circle at top left, #e1ebff 0, #f4f5fb 42%, #f4f5fb 100%);
  color: var(--text);
  line-height: 1.6;
}

/* PAGE SHELL */

.page {
  max-width: 1140px;
  margin: 0 auto;
  padding: 1rem 1rem 1.4rem;
}

/* HEADER / NAV */

.site-header {
  background: rgba(255, 255, 255, 0.96);
  backdrop-filter: blur(14px);
  border-radius: 24px;
  box-shadow: var(--shadow-md);
  padding: 0.65rem 0.85rem;
  margin-bottom: 1rem;
}

.header-inner {
  display: flex;
  align-items: center;
  gap: 0.9rem;
}

/* BRAND BLOCK: logo, name, registered line (dọc) */

.brand-block {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  flex: 1;
}

.brand-logo {
  width: 52px;
  height: 52px;
  border-radius: 16px;
  object-fit: contain;
  background: #f3f5fb;
  padding: 4px;
}

.brand-text {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
}

.brand-name {
  font-size: 1.02rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.1em;
}

.brand-meta {
  font-size: 0.78rem;
  color: var(--muted);
}

/* NAV LINKS */

.nav-toggle {
  border: 0;
  background: #eef2ff;
  border-radius: 12px;
  width: 34px;
  height: 34px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 1.3rem;
  cursor: pointer;
}

.nav {
  display: none;
  flex-wrap: wrap;
  gap: 0.25rem;
}

.nav a {
  font-size: 0.86rem;
  padding: 0.45rem 0.75rem;
  border-radius: 999px;
  color: var(--muted);
  text-decoration: none;
}

.nav a.is-active {
  background: var(--brand-soft);
  color: var(--text);
  font-weight: 600;
}

.nav a:hover {
  background: #edf1ff;
}

/* MAIN LAYOUT */

.main {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 1rem;
}

/* GENERIC CARD */

.card {
  background: var(--bg-soft);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  padding: 1.45rem 1.35rem 1.4rem;
}

.card-soft {
  background: linear-gradient(135deg, #ffffff, #eef4ff);
}

/* HERO SECTION */

.hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 1.2rem;
  align-items: center;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.28rem 0.8rem;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.9);
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--muted);
}

.hero-title {
  margin: 0.5rem 0 0.2rem;
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--muted);
}

.hero-title span {
  display: block;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-size: 2rem;
  color: var(--text);
  font-weight: 800;
  margin-bottom: 0.2rem;
}

.hero-text {
  font-size: 0.92rem;
  color: var(--muted);
  margin: 0.25rem 0;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
  margin-top: 0.7rem;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.7rem 1.15rem;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: #ffffff;
  font-size: 0.9rem;
  cursor: pointer;
  text-decoration: none;
  color: var(--text);
}

.btn-primary {
  background: var(--brand);
  border-color: var(--brand);
  color: #ffffff;
}

.btn-outline {
  background: transparent;
}

.btn:hover {
  box-shadow: var(--shadow-md);
  text-decoration: none;
}

.hero-media {
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-lg);
}

.hero-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* SECTION TITLES */

.section-title {
  font-size: 1.12rem;
  font-weight: 700;
  margin: 0 0 0.2rem;
}

.section-sub {
  font-size: 0.9rem;
  color: var(--muted);
  margin: 0 0 0.8rem;
}

/* INFO GRID */

.info-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 0.6rem;
  font-size: 0.9rem;
}

.info-label {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.info-value {
  margin-top: 0.12rem;
}

/* FEATURE LIST */

.feature-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 0.4rem;
  font-size: 0.9rem;
}

.feature-list li {
  padding-left: 1.1rem;
  position: relative;
  color: var(--muted);
}

.feature-list li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.55rem;
  width: 7px;
  height: 7px;
  border-radius: 999px;
  background: var(--brand);
}

/* TILE GRID (SERVICES PREVIEW) */

.tile-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 0.8rem;
}

.tile {
  background: #ffffff;
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-md);
  overflow: hidden;
}

.tile img {
  width: 100%;
  height: 170px;
  object-fit: cover;
  display: block;
}

.tile-body {
  padding: 0.8rem 0.9rem 1rem;
}

.tile-body h3 {
  font-size: 0.98rem;
  margin: 0 0 0.25rem;
}

.tile-body p {
  font-size: 0.88rem;
  margin: 0;
  color: var(--muted);
}

/* SPLIT LAYOUT (ABOUT, SERVICES, GOVERNANCE, CONTACT) */

.split {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 1rem;
}

/* Large illustration images – keep inside card, không phóng quá */

.split-figure {
  border-radius: 20px;
  overflow: hidden;
  box-shadow: var(--shadow-md);
}

.split-figure img {
  width: 100%;
  height: auto;
  max-height: 320px;
  object-fit: cover;
}

/* GALLERY */

.gallery {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.6rem;
}

.gallery img {
  width: 100%;
  height: 135px;
  object-fit: cover;
  border-radius: 16px;
}

/* TIMELINE (GOVERNANCE) */

.timeline {
  list-style: none;
  margin: 0;
  padding: 0;
  border-left: 2px solid var(--border);
}

.timeline-item {
  position: relative;
  padding: 0.45rem 0 0.7rem 0.95rem;
}

.timeline-item::before {
  content: "";
  position: absolute;
  left: -6px;
  top: 0.65rem;
  width: 11px;
  height: 11px;
  border-radius: 999px;
  background: var(--brand);
}

.timeline-title {
  font-size: 0.95rem;
  font-weight: 600;
}

.timeline-body {
  font-size: 0.88rem;
  color: var(--muted);
}

/* CONTACT */

.contact-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 1rem;
}

.form-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 0.75rem;
}

label {
  display: grid;
  gap: 0.3rem;
  font-size: 0.85rem;
  font-weight: 600;
}

input,
textarea {
  font: inherit;
  border-radius: 12px;
  border: 1px solid var(--border);
  padding: 0.75rem 0.85rem;
  background: #f8f9ff;
  outline: 0;
}

textarea {
  min-height: 130px;
  resize: vertical;
}

input:focus,
textarea:focus {
  border-color: var(--brand);
  box-shadow: 0 0 0 1px rgba(15, 106, 203, 0.3);
}

/* Map cao tương đương form */

.map-frame iframe {
  width: 100%;
  border: 0;
  border-radius: 18px;
  box-shadow: var(--shadow-lg);
  aspect-ratio: 4/3;
  min-height: 360px;
}

/* FOOTER */

.site-footer {
  margin-top: 1rem;
  font-size: 0.8rem;
  color: var(--muted);
  text-align: center;
}

/* ===== THEME VARIANTS (cho script .py) ===== */

body.theme-1 {
  --brand: #0f6acb;
  --brand-soft: #e5f0ff;
}

body.theme-2 {
  --brand: #0f7a4b;
  --brand-soft: #e3f5eb;
}

body.theme-3 {
  --brand: #b04816;
  --brand-soft: #ffe8d8;
}

body.theme-4 {
  --brand: #6c3fb2;
  --brand-soft: #efe5ff;
}

body.theme-5 {
  --brand: #c0365b;
  --brand-soft: #ffe3ec;
}

/* ===== RESPONSIVE ===== */

@media (min-width: 768px) {
  .header-inner {
    gap: 1.2rem;
  }
  .nav-toggle {
    display: none;
  }
  .nav {
    display: flex !important;
  }
  .hero-grid {
    grid-template-columns: minmax(0, 1.4fr) minmax(260px, 1fr);
  }
  .info-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .tile-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
  .split {
    grid-template-columns: minmax(0, 1.1fr) minmax(260px, 1fr);
  }
  .gallery {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
  .contact-grid {
    grid-template-columns: minmax(0, 1.1fr) minmax(260px, 1fr);
  }
}
