/*
Theme Name: N-RETC Portal Theme
Author: Lương Xuân Ngọc
Description: Giao dien cong thong tin dien tu cho Trung tam Ky thuat va Cong nghe duong bo phia Bac.
Version: 1.1.0
Text Domain: n-retc-portal
*/

:root {
  --primary: #0b4f8a;
  --primary-dark: #07365f;
  --accent: #d6a12e;
  --bg: #edf3f8;
  --surface: #ffffff;
  --border: #d9e4ef;
  --text: #203346;
  --muted: #64788b;
  --shadow: 0 18px 44px rgba(7, 54, 95, 0.1);
  --radius: 22px;
  --container: 1240px;
}

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

body {
  margin: 0;
  font-family: "Segoe UI", Tahoma, sans-serif;
  color: var(--text);
  background:
    radial-gradient(circle at top left, rgba(214, 161, 46, 0.14), transparent 28%),
    linear-gradient(180deg, #f8fbfe 0%, var(--bg) 100%);
}

a {
  color: inherit;
  text-decoration: none;
}

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

.container {
  width: min(var(--container), calc(100% - 32px));
  margin: 0 auto;
}

.site-topbar {
  background: #062844;
  color: #d6e3f0;
  font-size: 14px;
}

.site-topbar__inner {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  padding: 10px 0;
  flex-wrap: wrap;
}

.site-topbar__links,
.site-topbar__meta {
  display: flex;
  gap: 18px;
  flex-wrap: wrap;
}

.topbar-sep {
  opacity: 0.4;
}



.site-header {
  position: relative;
  color: #fff;
  background:
    linear-gradient(135deg, rgba(7, 54, 95, 0.95), rgba(11, 79, 138, 0.9)),
    linear-gradient(90deg, #0b4f8a, #126bb4);
  overflow: hidden;
}

.site-header::before {
  content: "";
  position: absolute;
  inset: auto -120px -180px auto;
  width: 420px;
  height: 420px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(255, 255, 255, 0.18), transparent 65%);
}

.site-branding {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 22px;
  align-items: center;
  padding: 24px 0 26px;
}

.brand-mark {
  width: var(--logo-size, 136px);
  height: var(--logo-size, 136px);
  flex-shrink: 0;
  border-radius: 50%;
  background: #ffffff;
  border: 6px solid #f6f8fb;
  box-shadow: 0 10px 26px rgba(8, 54, 92, 0.12);
  display: grid;
  place-items: center;
}

.brand-mark img {
  width: calc(var(--logo-size, 136px) * 0.8);
  height: calc(var(--logo-size, 136px) * 0.8);
  object-fit: contain;
}

.brand-text__eyebrow {
  margin: 0 0 8px;
  font-size: 12px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: #c4dbef;
}

.brand-text__title {
  margin: 0;
  font-size: clamp(28px, 4vw, 44px);
  line-height: 1.08;
}

.brand-text__subtitle {
  margin: 8px 0 0;
  max-width: 780px;
  color: #e1eef9;
  font-size: 15px;
  line-height: 1.6;
}

.brand-motto {
  max-width: 270px;
  padding: 16px 18px;
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.14);
  font-size: 14px;
  line-height: 1.65;
  color: #e3eef8;
}

.site-nav {
  position: relative;
  z-index: 2;
  backdrop-filter: blur(14px);
  background: rgba(255, 255, 255, 0.1);
  border-top: 1px solid rgba(255, 255, 255, 0.12);
}

.site-nav__inner {
  display: flex;
  align-items: center;
  gap: 18px;
}

.menu-toggle {
  display: none;
  border: 0;
  background: transparent;
  color: #fff;
  padding: 14px 0;
  font-weight: 700;
  cursor: pointer;
}

.primary-menu,
.primary-menu ul,
.footer-menu,
.info-list {
  list-style: none;
  margin: 0;
  padding: 0;
}

.primary-menu {
  display: flex;
  flex-wrap: wrap;
}

.primary-menu > li {
  position: relative;
}

.primary-menu > li > a {
  display: block;
  padding: 15px 18px;
  color: #fff;
  font-weight: 600;
}

.primary-menu li:hover > ul,
.primary-menu li:focus-within > ul {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.primary-menu ul {
  position: absolute;
  top: 100%;
  left: 0;
  min-width: 240px;
  border-radius: 18px;
  background: #fff;
  box-shadow: var(--shadow);
  opacity: 0;
  visibility: hidden;
  transform: translateY(10px);
  transition: 0.22s ease;
  z-index: 20;
}

.primary-menu ul a {
  display: block;
  padding: 13px 16px;
  color: var(--text);
  border-bottom: 1px solid var(--border);
}

.primary-menu ul li:last-child a {
  border-bottom: 0;
}

.hero {
  padding: 26px 0 18px;
}

.hero__grid {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 24px;
}

.hero-banner,
.panel,
.footer-panel,
.stats {
  background: var(--surface);
  border: 1px solid rgba(11, 79, 138, 0.08);
  box-shadow: var(--shadow);
}

.hero-banner {
  position: relative;
  overflow: hidden;
  min-height: 450px;
  border-radius: 30px;
  color: #fff;
  background:
    linear-gradient(180deg, rgba(0, 0, 0, 0.08), rgba(7, 54, 95, 0.92)),
    linear-gradient(135deg, rgba(255, 255, 255, 0.06), rgba(214, 161, 46, 0.15)),
    url("assets/grid.svg") center/cover no-repeat,
    linear-gradient(140deg, #0c4f8a, #0b365f);
}

.hero-banner__content {
  position: absolute;
  inset: auto 0 0 0;
  padding: 34px;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 14px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.12);
  font-size: 13px;
  font-weight: 700;
}

.hero-title {
  margin: 18px 0 14px;
  font-size: clamp(30px, 4vw, 46px);
  line-height: 1.1;
  max-width: 760px;
}

.hero-text {
  margin: 0 0 20px;
  max-width: 720px;
  color: #d5e7f8;
  line-height: 1.7;
}

.hero-points {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

.hero-points span,
.pill {
  padding: 10px 14px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.14);
  font-size: 14px;
}

.sidebar-stack,
.content-stack {
  display: grid;
  gap: 24px;
}

.panel {
  border-radius: var(--radius);
  padding: 24px;
}

.panel__eyebrow {
  display: inline-block;
  margin-bottom: 8px;
  padding: 6px 11px;
  border-radius: 999px;
  background: #edf4fb;
  color: var(--primary);
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
}

.panel__title {
  margin: 0 0 16px;
  color: var(--primary-dark);
  font-size: 24px;
}

.highlight-list {
  display: grid;
  gap: 14px;
}

.highlight-item {
  padding-bottom: 14px;
  border-bottom: 1px solid var(--border);
}

.highlight-item:last-child {
  padding-bottom: 0;
  border-bottom: 0;
}

.meta {
  color: var(--muted);
  font-size: 13px;
}

.quick-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.quick-grid a {
  padding: 14px;
  border-radius: 16px;
  background: linear-gradient(180deg, #f8fbfe, #eff4fa);
  border: 1px solid var(--border);
  font-weight: 600;
  color: var(--primary-dark);
  text-align: center;
}

.stats {
  border-radius: var(--radius);
  padding: 18px 24px;
  margin-top: 18px;
}

.stats__grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
}

.stat-value {
  display: block;
  font-size: 31px;
  font-weight: 800;
  color: var(--primary-dark);
}

.layout {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 24px;
  margin: 28px auto 42px;
}

.news-grid {
  display: grid;
  grid-template-columns: 1.15fr 1fr;
  gap: 18px;
}

.news-feature {
  border-radius: 22px;
  overflow: hidden;
  border: 1px solid var(--border);
  background: linear-gradient(180deg, #f7fbfe, #edf4fa);
}

.news-feature__media {
  aspect-ratio: 16 / 9;
  background:
    linear-gradient(135deg, rgba(11, 79, 138, 0.18), rgba(214, 161, 46, 0.15)),
    url("assets/grid.svg") center/cover no-repeat;
}

.news-feature__body {
  padding: 20px;
}

.news-feature__body h3 {
  margin: 10px 0 12px;
  font-size: 24px;
  line-height: 1.3;
}

.list-simple li,
.document-list li,
.footer-menu li,
.info-list li {
  padding-bottom: 14px;
  border-bottom: 1px solid var(--border);
}

.list-simple li:last-child,
.document-list li:last-child,
.footer-menu li:last-child,
.info-list li:last-child {
  padding-bottom: 0;
  border-bottom: 0;
}

.list-title {
  margin: 6px 0 0;
  font-size: 17px;
  line-height: 1.45;
}

.notice-list li {
  display: grid;
  grid-template-columns: 62px 1fr;
  gap: 14px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--border);
}

.notice-list li:last-child {
  padding-bottom: 0;
  border-bottom: 0;
}

.notice-date {
  display: grid;
  align-content: center;
  justify-items: center;
  min-height: 72px;
  border-radius: 18px;
  color: #fff;
  background: linear-gradient(180deg, #0f5f9f, #0b4f8a);
}

.notice-date strong {
  font-size: 24px;
  line-height: 1;
}

.footer {
  padding-bottom: 28px;
}

.footer__grid {
  display: grid;
  grid-template-columns: 1.3fr 1fr 1fr;
  gap: 24px;
}

.footer-panel {
  border-radius: var(--radius);
  padding: 24px;
}

.footer-panel h2 {
  margin: 0 0 16px;
  color: var(--primary-dark);
  font-size: 22px;
}

.footer-bottom {
  padding-top: 18px;
  color: var(--muted);
  font-size: 14px;
}

.screen-reader-text {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  border: 0;
}

@media (max-width: 1080px) {
  .site-branding,
  .hero__grid,
  .layout,
  .footer__grid {
    grid-template-columns: 1fr;
  }

  .stats__grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 820px) {
  .menu-toggle {
    display: inline-flex;
  }

  .primary-navigation {
    width: 100%;
    padding-bottom: 14px;
  }

  .primary-navigation:not(.is-open) {
    /* handled by max-height in mobile section below */
  }

  .primary-menu,
  .news-grid,
  .quick-grid,
  .stats__grid {
    display: block;
  }

  .primary-menu > li > a {
    padding: 14px 0;
  }

  .primary-menu ul {
    position: static;
    opacity: 1;
    visibility: visible;
    transform: none;
    box-shadow: none;
    margin-left: 14px;
  }

  .brand-motto {
    max-width: none;
  }

  .hero-banner__content,
  .panel,
  .footer-panel {
    padding: 20px;
  }
}

/* Portal-style overrides inspired by road authority sites */
.site-header {
  background: linear-gradient(180deg, #fff7e8 0 72%, #ea7625 72% 100%);
  border-bottom: 1px solid #e7d4b2;
}

.header-pattern {
  position: absolute;
  inset: 0 0 auto 0;
  height: 150px;
  background:
    linear-gradient(90deg, rgba(234, 118, 37, 0.08), rgba(255, 214, 153, 0.18)),
    url("assets/grid.svg") center top / cover no-repeat;
  opacity: 0.18;
  pointer-events: none;
}

.site-branding {
  position: relative;
  z-index: 1;
  grid-template-columns: 1fr 300px;
  gap: 24px;
  padding: 22px 0 18px;
}

.brand-main {
  display: flex;
  gap: 22px;
  align-items: center;
}

.brand-mark {
  width: var(--logo-size, 136px);
  height: var(--logo-size, 136px);
  flex-shrink: 0;
  border-radius: 50%;
  background: #ffffff;
  border: 2px solid #e8eef4;
  box-shadow: 0 10px 26px rgba(8, 54, 92, 0.12);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.brand-mark img,
.brand-mark .custom-logo {
  width: 92%;
  height: 92%;
  object-fit: contain;
}

.brand-mark .custom-logo-link {
  display: inline-flex;
}

.brand-text__eyebrow {
  color: #b85b15;
}

.brand-text__title {
  color: #07365f;
  font-size: clamp(24px, 3.5vw, 38px);
}

.brand-text__subtitle {
  color: #23435f;
}

.brand-motto {
  align-self: stretch;
  background: linear-gradient(180deg, #fffdf8, #fff3df);
  border: 1px solid #f0d6ab;
  color: #5e421d;
}

.brand-motto__label {
  margin: 0 0 4px;
  color: #c06c1b;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.site-nav {
  background: linear-gradient(180deg, #ed7b28, #de6f22);
}

.site-nav__inner {
  justify-content: center;
  gap: 18px;
}

.primary-menu > li > a {
  padding: 14px 18px;
  border-right: 1px solid rgba(255, 255, 255, 0.1);
}

.primary-menu > li:first-child > a {
  border-left: 1px solid rgba(255, 255, 255, 0.1);
}

.primary-menu > li.menu-item-has-children > a::after,
.primary-menu > li > a[href="#gioi-thieu"]::after,
.primary-menu > li > a[href="#tin-tuc"]::after,
.primary-menu > li > a[href="#van-ban"]::after {
  content: " ▾";
  font-size: 12px;
}

.nav-tools {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-left: auto;
}

.nav-tools a {
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  color: #fff;
  font-weight: 700;
  background: rgba(255, 255, 255, 0.12);
}

.header-banner {
  position: relative;
}

.header-banner::after {
  content: "";
  position: absolute;
  top: 0;
  right: 0;
  width: 32%;
  height: 100%;
  background:
    linear-gradient(135deg, rgba(11, 79, 138, 0.85), rgba(7, 54, 95, 0.7)),
    linear-gradient(180deg, transparent, transparent);
  clip-path: polygon(28% 0, 100% 0, 100% 100%, 0 100%);
  opacity: 0.86;
}

.portal-home {
  padding: 18px 0 0;
}

.portal-top {
  margin-bottom: 18px;
  display: grid;
  gap: 14px;
}

@keyframes pulse {
  0% { box-shadow: 0 0 0 0 rgba(255, 94, 94, 0.7); }
  70% { box-shadow: 0 0 0 8px rgba(255, 94, 94, 0); }
  100% { box-shadow: 0 0 0 0 rgba(255, 94, 94, 0); }
}

.portal-marquee {
  display: grid;
  grid-template-columns: 180px 1fr;
  align-items: center;
  background: #ffffff;
  border: 1px solid #e0e7ee;
  border-radius: 40px;
  box-shadow: 0 4px 15px rgba(0,0,0,0.03);
  color: #213446;
  overflow: hidden;
}

.portal-marquee span {
  padding: 12px 18px;
  background: linear-gradient(135deg, #1d5f9d, #0d3b66);
  color: #ffffff;
  font-weight: 700;
  text-transform: uppercase;
  white-space: nowrap;
  display: flex;
  align-items: center;
  justify-content: center;
}

.portal-marquee span::before {
  content: "";
  display: inline-block;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: #ff5e5e;
  margin-right: 12px;
  position: relative;
  top: -1px;
  animation: pulse 2s infinite;
}

.portal-marquee__viewport {
  position: relative;
  height: 7.8em;
  overflow: hidden;
}

.portal-marquee__track {
  display: grid;
  gap: 0;
  transition: transform 0.45s ease;
}

.portal-marquee__item {
  display: flex;
  align-items: center;
  min-height: 2.6em;
  padding: 0 18px;
  color: #1d5f9d;
  font-weight: 700;
  line-height: 1.3;
}

.portal-links {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
}

.portal-links a {
  padding: 18px 16px;
  background: linear-gradient(180deg, #f79334, #ee7c25);
  color: #fff;
  font-weight: 700;
  text-align: center;
  border-radius: 10px;
  box-shadow: var(--shadow);
}

.portal-grid {
  display: grid;
  grid-template-columns: 300px minmax(0, 1fr) 300px;
  gap: 20px;
  align-items: start;
}

.portal-panel,
.portal-feature,
.portal-box {
  background: #fff;
  border: 1px solid #edf1f5;
  box-shadow: 0 4px 18px rgba(0,0,0,0.04);
}

.portal-panel {
  border-radius: 12px;
  overflow: hidden;
}

.portal-panel__title,
.portal-box__header h2 {
  margin: 0;
  padding: 16px 20px;
  background: #ffffff;
  color: #0d3b66;
  font-size: 18px;
  text-transform: uppercase;
  border-bottom: 2px solid #edf1f5;
  border-left: 6px solid #e87624;
}

.portal-list-text {
  list-style: none;
  margin: 0;
  padding: 12px 18px 16px;
}

.portal-list-text li {
  position: relative;
  margin-bottom: 12px;
  padding-bottom: 12px;
  border-bottom: 1px dashed var(--border);
}

.portal-list-text--featured li {
  display: flex;
  gap: 8px;
  align-items: flex-start;
  padding-left: 0;
}

.portal-list-text--featured li::before {
  content: "❖";
  position: relative;
  top: 0;
  left: 0;
  color: #ea7724;
  font-size: 14px;
  line-height: 1.55;
  flex-shrink: 0;
  padding-top: 1px;
}

.portal-list-text li:last-child {
  margin-bottom: 0;
  padding-bottom: 0;
  border-bottom: 0;
}

.portal-list-text a {
  color: #24384c;
  line-height: 1.55;
}

.portal-list-text--compact a {
  font-size: 15px;
}

.portal-panel--media {
  padding-bottom: 14px;
}

.portal-tabs {
  display: flex;
  border-bottom: 2px solid #edf1f5;
  padding: 0 8px;
  background: #fbfdff;
}

.portal-tabs button {
  flex: 1;
  border: 0;
  background: transparent;
  color: #506679;
  padding: 16px 12px;
  font-weight: 700;
  text-transform: uppercase;
  cursor: pointer;
  border-bottom: 3px solid transparent;
  margin-bottom: -2px;
  transition: all 0.2s ease;
}

.portal-tabs button.is-active {
  background: transparent;
  color: #e87624;
  border-bottom-color: #e87624;
}

.portal-media-card {
  padding: 16px;
}

.portal-media-card__screen {
  position: relative;
  aspect-ratio: 16 / 9;
  border-radius: 8px;
  background:
    linear-gradient(135deg, rgba(11, 79, 138, 0.2), rgba(0, 0, 0, 0.28)),
    url("assets/grid.svg") center/cover no-repeat;
}

.portal-media-card__play {
  position: absolute;
  inset: 50% auto auto 50%;
  transform: translate(-50%, -50%);
  width: 56px;
  height: 56px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: rgba(255, 255, 255, 0.9);
  color: #d06013;
  font-size: 20px;
}

.portal-media-card h3 {
  margin: 14px 0 10px;
  font-size: 20px;
  line-height: 1.35;
  color: #1f3347;
}

.portal-media-card p {
  margin: 0;
  color: #506679;
  line-height: 1.65;
}

.portal-feature {
  border-radius: 10px;
  overflow: hidden;
  padding-bottom: 18px;
}

.portal-feature__image {
  height: 280px;
  background-color: var(--border);
}

.portal-feature__content {
  padding: 24px;
}

.portal-feature__title {
  margin: 0 0 10px;
  font-size: 22px;
  line-height: 1.4;
}

.portal-feature__meta {
  color: var(--muted);
  font-size: 13px;
  margin: 0 0 14px;
}

.portal-feature__excerpt {
  color: var(--text-light);
  line-height: 1.6;
  margin: 0;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* Slider additions */
.portal-news-slider {
  position: relative;
  margin-bottom: 24px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
  overflow: hidden;
}

.portal-news-slider__track {
  display: flex;
  transition: transform 0.5s ease-in-out;
  width: 100%;
}

.portal-news-slider__track .slide {
  flex: 0 0 100%;
  width: 100%;
  border: none;
  margin-bottom: 0;
  border-radius: 0;
}

.portal-news-slider__controls {
  position: absolute;
  top: 120px;
  left: 0;
  right: 0;
  display: flex;
  justify-content: space-between;
  padding: 0 15px;
  pointer-events: none;
}

.slider-btn {
  background: rgba(255, 255, 255, 0.85);
  border: none;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  box-shadow: 0 2px 5px rgba(0,0,0,0.2);
  color: #0d3b66;
  font-size: 18px;
  transition: background 0.2s;
  pointer-events: auto;
}

.slider-btn:hover {
  background: #0b4f8a;
  color: #fff;
}

.portal-menu-list {
  list-style: none;
  margin: 0;
  padding: 0;
}

.portal-menu-list li {
  border-bottom: 1px solid #d4e4f5;
}

.portal-menu-list a {
  display: block;
  padding: 14px 18px;
  background: linear-gradient(180deg, #f7fbff, #eef5fc);
  color: #07365f;
  font-weight: 700;
  text-decoration: none;
}

.portal-sections {
  display: grid;
  gap: 20px;
  margin-top: 20px;
}

.portal-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 300px;
  gap: 20px;
  margin-top: 20px;
}

.portal-box {
  border-radius: 10px;
  overflow: hidden;
}

.portal-news-grid {
  display: grid;
  gap: 18px;
  padding: 18px;
}

.portal-two-col {
  display: grid;
  gap: 20px;
  padding: 0;
  margin-top: 20px;
}

.portal-news-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.portal-two-col {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.portal-box__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: linear-gradient(180deg, #f08a2f, #e87624);
}

.portal-box__header a {
  padding-right: 18px;
  color: #fff7e8;
  font-weight: 700;
}

.portal-box__body {
  padding: 18px;
  color: #455d72;
  line-height: 1.75;
}

.portal-reference-list {
  display: grid;
  gap: 0;
}

.portal-reference-item {
  padding: 16px 18px;
  border-top: 1px solid #e7edf3;
  background: linear-gradient(180deg, #fbfdff, #f6f9fc);
}

.portal-reference-item:first-child {
  border-top: 0;
}

.portal-reference-item h3 {
  margin: 0 0 8px;
  font-size: 18px;
  line-height: 1.4;
}

.portal-reference-item h3 a {
  color: #1f3347;
}

.portal-reference-item p {
  margin: 0;
  color: #5c7184;
  line-height: 1.6;
  font-size: 14px;
}

.portal-units {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  padding: 16px;
}

.portal-unit-card {
  display: grid;
  grid-template-columns: 70px 1fr;
  gap: 14px;
  align-items: center;
  padding: 14px;
  border: 1px solid #dfe7ef;
  border-radius: 4px;
  background:
    linear-gradient(135deg, rgba(229, 240, 250, 0.95), rgba(255, 255, 255, 0.98)),
    url("assets/grid.svg") center/cover no-repeat;
  min-height: 92px;
}

.portal-unit-card:hover {
  border-color: #e87624;
}

.portal-unit-card__logo {
  width: 58px;
  height: 58px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: #ffffff;
  border: 3px solid #dce9f6;
  color: #1d5f9d;
  font-weight: 800;
}

.portal-unit-card__text strong {
  display: block;
  color: #c85f13;
  font-size: 18px;
  line-height: 1.3;
}

.portal-unit-card__text small {
  display: block;
  margin-top: 4px;
  color: #5e7388;
  font-size: 13px;
}

.portal-news-card {
  display: grid;
  grid-template-columns: 160px 1fr;
  gap: 16px;
  align-items: start;
}

.portal-news-card__thumb {
  height: 110px;
  border-radius: 8px;
  background:
    linear-gradient(135deg, rgba(11, 79, 138, 0.16), rgba(234, 118, 37, 0.14)),
    url("assets/grid.svg") center/cover no-repeat;
}

.portal-news-card__thumb--alt {
  background:
    linear-gradient(135deg, rgba(200, 146, 45, 0.18), rgba(11, 79, 138, 0.14)),
    url("assets/grid.svg") center/cover no-repeat;
}

.portal-news-card h3 {
  margin: 0 0 10px;
  color: #1f3347;
  font-size: 20px;
  line-height: 1.4;
}

.portal-news-card p,
.portal-bullet-list li {
  color: #445c70;
  line-height: 1.7;
}

.portal-bullet-list {
  list-style: square;
  margin: 0;
  padding: 18px 36px 22px;
}

.portal-bullet-list li {
  margin-bottom: 10px;
}

.portal-org-chart {
  padding: 4px 0 2px;
}

.portal-org-chart__top {
  display: flex;
  justify-content: center;
  margin-bottom: 18px;
  position: relative;
}

.portal-org-chart__top::after {
  content: "";
  position: absolute;
  top: 100%;
  left: 50%;
  width: 2px;
  height: 14px;
  background: #b9cddd;
  transform: translateX(-50%);
}

.portal-org-chart__leadership {
  display: flex;
  justify-content: center;
  margin-bottom: 28px;
  position: relative;
}

.portal-org-chart__leadership::before {
  content: "";
  position: absolute;
  bottom: 100%;
  left: 50%;
  width: 2px;
  height: 12px;
  background: #b9cddd;
  transform: translateX(-50%);
}

.portal-org-chart__leadership::after {
  content: "";
  position: absolute;
  top: 100%;
  left: 50%;
  width: 2px;
  height: 18px;
  background: #b9cddd;
  transform: translateX(-50%);
}

.portal-org-chart__branches {
  position: relative;
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 10px;
  padding-top: 18px;
}

.portal-org-chart__branches::before {
  content: "";
  position: absolute;
  top: 0;
  left: 7.6%;
  right: 7.6%;
  height: 2px;
  background: #b9cddd;
}

.portal-org-node {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 58px;
  padding: 10px 8px;
  background: linear-gradient(180deg, #f8fbfe 0%, #edf5fb 100%);
  border: 1px solid #d9e4ef;
  border-radius: 6px;
  color: #0d3b66;
  font-weight: 700;
  line-height: 1.3;
  font-size: 13px;
  text-align: center;
  box-shadow: 0 2px 8px rgba(13, 59, 102, 0.06);
}

.portal-org-chart__branches .portal-org-node::before {
  content: "";
  position: absolute;
  bottom: calc(100% - 1px);
  left: 50%;
  width: 2px;
  height: 18px;
  background: #b9cddd;
  transform: translateX(-50%);
}

.portal-org-node--top {
  min-width: 180px;
  min-height: 44px;
  background: linear-gradient(180deg, #0d3b66 0%, #155487 100%);
  border-color: #0d3b66;
  color: #ffffff;
  font-size: 15px;
}

.portal-org-node--mid {
  min-width: 170px;
  min-height: 42px;
  background: linear-gradient(180deg, #eaf3fb 0%, #dceaf7 100%);
  color: #0d3b66;
  font-size: 14px;
}

.portal-bullet-links {
  list-style: none;
  margin: 0;
  padding: 0 18px 18px;
}

.portal-duty-summary {
  color: #445c70;
}

.portal-duty-summary p {
  margin: 0 0 12px;
  line-height: 1.7;
}

.portal-duty-summary p:last-child {
  margin-bottom: 0;
}

.portal-legal-toggle {
  margin-top: 16px;
  border: 1px solid #d9e4ef;
  border-radius: 8px;
  background: #f8fbfe;
  overflow: hidden;
}

.portal-legal-toggle summary {
  cursor: pointer;
  list-style: none;
  padding: 12px 16px;
  font-weight: 700;
  color: #0d3b66;
  background: #eef5fb;
}

.portal-legal-toggle summary::-webkit-details-marker {
  display: none;
}

.portal-legal-toggle summary::after {
  content: "+";
  float: right;
  font-size: 18px;
  line-height: 1;
}

.portal-legal-toggle[open] summary::after {
  content: "-";
}

.portal-legal-content {
  padding: 14px 16px 16px;
  color: #445c70;
  max-height: 360px;
  overflow: auto;
}

.portal-legal-content p,
.portal-legal-content li {
  line-height: 1.6;
}

.portal-legal-content > ol,
.portal-legal-content ol ol {
  margin: 8px 0 0;
  padding-left: 22px;
}

.portal-legal-content > ol > li {
  margin-bottom: 10px;
}

.portal-legal-subitems {
  list-style: none;
  margin: 6px 0 0;
  padding-left: 0;
}

.portal-legal-subitems li {
  margin: 4px 0;
}

.portal-bullet-links li {
  padding: 12px 0;
  border-top: 1px solid #ebeff3;
}

.portal-bullet-links a {
  color: #24384c;
  line-height: 1.55;
}

.portal-panel--right {
  align-self: start;
}

.footer {
  background: linear-gradient(180deg, #fff8ec, #f4e0c0);
  border-top: 3px solid #e87624;
  margin-top: 28px;
  padding-top: 24px;
}

.footer-panel {
  background: linear-gradient(180deg, #fffdf9, #fff4e5);
  border: 1px solid #efd9b7;
}

.footer-panel h2 {
  color: #bf5d10;
  text-transform: uppercase;
}

.footer-bottom {
  border-top: 1px solid #ead6b5;
  margin-top: 18px;
  padding-top: 18px;
}

@media (max-width: 1180px) {
  .portal-grid,
  .portal-row,
  .portal-links,
  .portal-news-grid,
  .portal-two-col,
  .site-branding {
    grid-template-columns: 1fr;
  }

  .brand-main {
    flex-direction: column;
    align-items: flex-start;
  }
}

@media (max-width: 820px) {
  .brand-main,
  .portal-news-card,
  .portal-marquee {
    grid-template-columns: 1fr;
  }

  .site-nav__inner {
    justify-content: flex-start;
  }

  .primary-menu > li > a,
  .primary-menu > li:first-child > a {
    border-left: 0;
  }

  .nav-tools {
    padding: 10px 0 14px;
    margin-left: 0;
  }
}

/* Refinement pass: cleaner proportions and less noisy header */
.site-topbar {
  font-size: 12px;
}

.header-banner {
  position: relative;
}

.header-banner__inner {
  display: grid;
  grid-template-columns: 1fr;
  gap: 12px;
  align-items: center;
  padding: 14px 0 12px;
}

.brand-main {
  align-items: center;
  gap: 16px;
}

.brand-mark {
  --logo-size: 110px !important;
  border-width: 2px;
  box-shadow: 0 6px 16px rgba(8, 54, 92, 0.08);
}

.brand-mark img,
.brand-mark .custom-logo {
  width: 96%;
  height: 96%;
  object-fit: contain;
}

.brand-text__eyebrow {
  margin-bottom: 6px;
  font-size: 11px;
}

.brand-text__title {
  max-width: 780px;
  font-size: clamp(22px, 3vw, 30px);
  text-transform: uppercase;
  line-height: 1.25;
  text-wrap: balance;
}

.brand-text__subtitle {
  margin-top: 8px;
  max-width: 860px;
  font-size: 13px;
  line-height: 1.58;
}

.brand-meta {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  padding-left: 0;
  margin-top: 10px;
  color: #6a5230;
  font-size: 13px;
}

.site-nav {
  box-shadow: none;
}

.site-nav__inner {
  min-height: 52px;
}

.primary-menu > li > a {
  padding: 13px 18px;
  font-size: 15px;
}

.nav-tools a {
  width: 32px;
  height: 32px;
  font-size: 13px;
}

.nav-tools__button {
  width: 32px;
  height: 32px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  border: 0;
  background: rgba(255, 255, 255, 0.12);
  color: #fff;
  font-weight: 700;
  cursor: pointer;
}

.site-search-panel {
  background: #fff3df;
  border-top: 1px solid rgba(255, 255, 255, 0.12);
  border-bottom: 1px solid #efcf9c;
}

.site-search-panel__inner {
  padding: 12px 0;
}

.site-search-panel .search-form {
  display: flex;
  gap: 10px;
  align-items: center;
}

.site-search-panel .search-form input {
  flex: 1;
  min-width: 0;
  border: 1px solid #e2c38d;
  background: #fff;
  border-radius: 4px;
  padding: 10px 12px;
}

.site-search-panel .search-form button {
  border: 0;
  background: #ea7724;
  color: #fff;
  border-radius: 4px;
  padding: 10px 16px;
  font-weight: 700;
}

.portal-home {
  padding-top: 14px;
}

.portal-marquee {
  min-height: 52px;
  border-radius: 4px;
  overflow: hidden;
  grid-template-columns: 180px 1fr;
}

.portal-marquee span {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 52px;
  white-space: nowrap;
  font-size: 15px;
}

.portal-grid {
  gap: 18px;
}

.portal-panel,
.portal-feature,
.portal-box {
  border-radius: 4px;
}

.portal-panel__title,
.portal-box__header h2 {
  padding: 12px 16px;
  font-size: 17px;
  letter-spacing: 0.01em;
}

.portal-list-text {
  padding: 10px 16px 14px;
}

.portal-list-text li {
  padding: 11px 0;
}

.portal-list-text a {
  font-size: 15px;
}

.portal-list-text li small {
  display: block;
  margin-top: 6px;
  font-size: 12px;
  color: #6f8396;
}

.portal-two-col {
  align-items: stretch;
}

.portal-two-col > .portal-box {
  display: flex;
  flex-direction: column;
  min-height: 100%;
}

.portal-two-col > .portal-box .portal-list-text,
.portal-two-col > .portal-box .portal-bullet-list,
.portal-two-col > .portal-box .portal-box__body {
  flex: 1;
}

.portal-feature {
  padding-bottom: 14px;
  box-shadow: none;
}

.portal-feature__title {
  margin: 14px 16px 8px;
  font-size: 22px;
}

.portal-feature__meta,
.portal-feature__excerpt {
  margin-left: 16px;
  margin-right: 16px;
}

.portal-tabs button {
  padding: 12px 8px;
  font-size: 13px;
}

.portal-media-card {
  padding: 14px;
}

.portal-media-card h3 {
  font-size: 18px;
}

.portal-media-card:not(.is-active) {
  display: none;
}

.portal-media-card__screen--image {
  background:
    linear-gradient(135deg, rgba(200, 146, 45, 0.2), rgba(11, 79, 138, 0.2)),
    url("assets/grid.svg") center/cover no-repeat;
}

.portal-quickbar {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
  margin-top: 20px;
}

.portal-quickbar a {
  padding: 20px 16px;
  text-align: center;
  background: #ffffff;
  color: #1d5f9d;
  font-weight: 700;
  border: 1px solid #edf1f5;
  border-radius: 12px;
  font-size: 14px;
  line-height: 1.4;
  transition: all 0.3s ease;
  box-shadow: 0 4px 15px rgba(0,0,0,0.03);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

.portal-quickbar a::before {
  content: "";
  display: block;
  width: 32px;
  height: 32px;
  margin-bottom: 12px;
  margin-right: 0;
  background: linear-gradient(135deg, #f08a2f, #e87624);
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='currentColor' viewBox='0 0 24 24'%3E%3Cpath d='M12 2L2 12h3v8h6v-6h2v6h6v-8h3L12 2z'/%3E%3C/svg%3E") center/contain no-repeat;
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='currentColor' viewBox='0 0 24 24'%3E%3Cpath d='M12 2L2 12h3v8h6v-6h2v6h6v-8h3L12 2z'/%3E%3C/svg%3E") center/contain no-repeat;
}

.portal-quickbar a:nth-child(2)::before {
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='currentColor' viewBox='0 0 24 24'%3E%3Cpath d='M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm1 15h-2v-6h2v6zm0-8h-2V7h2v2z'/%3E%3C/svg%3E") center/contain no-repeat;
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='currentColor' viewBox='0 0 24 24'%3E%3Cpath d='M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm1 15h-2v-6h2v6zm0-8h-2V7h2v2z'/%3E%3C/svg%3E") center/contain no-repeat;
}

.portal-quickbar a:nth-child(3)::before {
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='currentColor' viewBox='0 0 24 24'%3E%3Cpath d='M16 11c1.66 0 2.99-1.34 2.99-3S17.66 5 16 5c-1.66 0-3 1.34-3 3s1.34 3 3 3zm-8 0c1.66 0 2.99-1.34 2.99-3S9.66 5 8 5C6.34 5 5 6.34 5 8s1.34 3 3 3zm0 2c-2.33 0-7 1.17-7 3.5V19h14v-2.5c0-2.33-4.67-3.5-7-3.5zm8 0c-.29 0-.62.02-.97.05 1.16.84 1.97 1.97 1.97 3.45V19h6v-2.5c0-2.33-4.67-3.5-7-3.5z'/%3E%3C/svg%3E") center/contain no-repeat;
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='currentColor' viewBox='0 0 24 24'%3E%3Cpath d='M16 11c1.66 0 2.99-1.34 2.99-3S17.66 5 16 5c-1.66 0-3 1.34-3 3s1.34 3 3 3zm-8 0c1.66 0 2.99-1.34 2.99-3S9.66 5 8 5C6.34 5 5 6.34 5 8s1.34 3 3 3zm0 2c-2.33 0-7 1.17-7 3.5V19h14v-2.5c0-2.33-4.67-3.5-7-3.5zm8 0c-.29 0-.62.02-.97.05 1.16.84 1.97 1.97 1.97 3.45V19h6v-2.5c0-2.33-4.67-3.5-7-3.5z'/%3E%3C/svg%3E") center/contain no-repeat;
}

.portal-quickbar a:nth-child(4)::before {
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='currentColor' viewBox='0 0 24 24'%3E%3Cpath d='M20 4H4c-1.1 0-1.99.9-1.99 2L2 18c0 1.1.9 2 2 2h16c1.1 0 2-.9 2-2V6c0-1.1-.9-2-2-2zm0 4l-8 5-8-5V6l8 5 8-5v2z'/%3E%3C/svg%3E") center/contain no-repeat;
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='currentColor' viewBox='0 0 24 24'%3E%3Cpath d='M20 4H4c-1.1 0-1.99.9-1.99 2L2 18c0 1.1.9 2 2 2h16c1.1 0 2-.9 2-2V6c0-1.1-.9-2-2-2zm0 4l-8 5-8-5V6l8 5 8-5v2z'/%3E%3C/svg%3E") center/contain no-repeat;
}

.portal-quickbar a:hover {
  background: #ffffff;
  color: #0b4f8a;
  transform: translateY(-4px);
  box-shadow: 0 8px 25px rgba(0,0,0,0.06);
}

.portal-row,
.portal-sections {
  margin-top: 18px;
}

.portal-news-grid {
  padding: 16px;
}

.portal-two-col {
  padding: 0;
  margin-top: 16px;
}

.portal-news-card {
  grid-template-columns: 140px 1fr;
  gap: 14px;
}

.portal-news-card__thumb {
  height: 96px;
}

.portal-news-card h3 {
  font-size: 18px;
}

.portal-bullet-links,
.portal-bullet-list {
  font-size: 15px;
}

.portal-menu-list a {
  padding: 13px 16px;
  font-size: 15px;
}

.footer {
  margin-top: 24px;
  padding-top: 20px;
}

.footer__grid {
  gap: 18px;
}

.footer-panel {
  border-radius: 8px;
  padding: 18px;
}

.footer-panel h2 {
  margin-bottom: 14px;
  font-size: 18px;
}

@media (max-width: 1180px) {
  .portal-quickbar {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 820px) {
  .brand-main {
    grid-template-columns: 1fr;
    text-align: center;
  }

  .brand-text__subtitle {
    max-width: none;
  }

  .brand-meta {
    padding-left: 0;
    justify-content: center;
  }

  .portal-quickbar {
    grid-template-columns: 1fr;
  }

  .portal-units {
    grid-template-columns: 1fr;
  }
}

/* ====== MOBILE COMPACT HEADER (≤ 820px) ====== */

/* -------------------------------------
   Dự Án Tiêu Biểu Grid 
------------------------------------- */
.portal-box--du-an .portal-box__body {
  padding: 24px;
}

.project-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 24px;
}

.project-card {
  border-radius: 12px;
  overflow: hidden;
  border: 1px solid var(--border);
  background: var(--surface);
  transition: box-shadow 0.3s;
}

.project-card:hover {
  box-shadow: var(--shadow);
}

.project-card__img {
  display: block;
  width: 100%;
  aspect-ratio: 16/9;
  background-color: var(--surface);
  transition: transform 0.4s ease;
}

.project-card:hover .project-card__img {
  transform: scale(1.03);
}

.project-card__img-wrapper {
  overflow: hidden;
}

.project-card__info {
  padding: 18px;
  position: relative;
  z-index: 2;
  background: var(--surface);
}

.project-card__title {
  margin: 0 0 10px;
  font-size: 17px;
  line-height: 1.4;
}

.project-card__title a {
  color: var(--primary-dark);
  text-decoration: none;
  transition: color 0.2s;
}

.project-card__title a:hover {
  color: #ea7625;
}

.project-card__action a {
  display: inline-block;
  font-size: 13px;
  font-weight: bold;
  color: #0b4f8a;
  text-decoration: none;
  background: rgba(11, 79, 138, 0.08);
  padding: 6px 14px;
  border-radius: 999px;
  transition: background 0.2s, color 0.2s;
}

.project-card__action a:hover {
  background: #0b4f8a;
  color: #fff;
}

@media (max-width: 1080px) {
  .project-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 680px) {
  .project-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 820px) {
  .brand-mark {
    width: 68px;
    height: 68px;
  }

  .brand-mark img,
  .brand-mark .custom-logo {
    width: 54px;
    height: 54px;
  }

  .brand-text__title {
    font-size: 18px;
    color: #07365f;
  }

  .brand-text__subtitle {
    display: block;
    font-size: 12px;
    color: #5a7a94;
    margin-top: 4px;
  }

  .brand-meta {
    font-size: 12px;
    gap: 10px;
  }

  .header-banner__inner {
    padding: 10px 0 8px;
  }

  /* Hide decorative clip-path overlay on mobile */
  .header-banner::after {
    display: none;
  }


  .site-topbar__inner {
    justify-content: center;
    font-size: 12px;
  }

  /* Hamburger menu button */
  .menu-toggle {
    display: flex;
    align-items: center;
    gap: 6px;
    background: rgba(255, 255, 255, 0.15);
    border: 1px solid rgba(255, 255, 255, 0.25);
    color: #fff;
    border-radius: 6px;
    padding: 8px 14px;
    font-weight: 700;
    font-size: 14px;
    cursor: pointer;
    transition: background 0.2s;
  }

  .menu-toggle:hover,
  .menu-toggle[aria-expanded="true"] {
    background: rgba(255, 255, 255, 0.25);
  }

  .menu-toggle svg {
    flex-shrink: 0;
  }

  /* Nav tools on separate row */
  .site-nav__inner {
    flex-wrap: wrap;
  }

  .nav-tools {
    order: -1;
    width: 100%;
    display: flex;
    justify-content: flex-end;
    padding: 6px 0 0;
    margin-left: 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    padding-bottom: 8px;
    margin-bottom: 4px;
  }

  /* Smooth menu animation */
  .primary-navigation {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.35s ease;
  }

  .primary-navigation.is-open {
    max-height: 400px;
  }

  .primary-menu {
    flex-direction: column;
  }

  .primary-menu > li > a {
    padding: 12px 16px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  }

  /* Marquee fix */
  .portal-marquee {
    grid-template-columns: 1fr;
    text-align: center;
  }

  .portal-marquee span:first-child {
    padding: 8px;
    font-size: 13px;
    font-weight: 700;
  }
}

/* ====== HOVER EFFECTS ====== */
.portal-list-text a,
.portal-bullet-links a,
.portal-reference-item h3 a,
.portal-news-card h3 a,
.portal-feature__title a {
  transition: color 0.2s ease;
}

.portal-list-text a:hover,
.portal-bullet-links a:hover,
.portal-reference-item h3 a:hover,
.portal-news-card h3 a:hover,
.portal-feature__title a:hover {
  color: #0b4f8a;
  text-decoration: underline;
}

.portal-menu-list a {
  transition: background 0.2s, color 0.2s;
}

.portal-menu-list a:hover {
  background: linear-gradient(180deg, #eef5fc, #d6e8f9);
  color: #07365f;
}

.portal-box__header a {
  transition: opacity 0.2s;
}

.portal-box__header a:hover {
  opacity: 0.8;
}

/* ====== BACK TO TOP BUTTON ====== */
.back-to-top {
  position: fixed;
  bottom: 24px;
  right: 24px;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: linear-gradient(135deg, #1d5f9d, #0d3b66);
  color: #fff;
  border: none;
  font-size: 20px;
  cursor: pointer;
  box-shadow: 0 4px 12px rgba(13, 59, 102, 0.35);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 999;
  transition: transform 0.2s, opacity 0.2s;
}

.back-to-top.is-visible {
  display: flex;
}

.back-to-top:hover {
  transform: translateY(-3px);
}

/* ====== FLOATING ZALO ====== */
.floating-zalo {
  position: fixed;
  bottom: 24px;
  left: 24px;
  width: 50px;
  height: 50px;
  border-radius: 50%;
  background: #0068ff;
  color: #fff !important;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  font-weight: 700;
  text-decoration: none;
  box-shadow: 0 4px 12px rgba(0, 104, 255, 0.35);
  z-index: 999;
  transition: transform 0.2s, box-shadow 0.2s;
}

.floating-zalo:hover {
  transform: translateY(-4px);
  box-shadow: 0 6px 16px rgba(0, 104, 255, 0.5);
}

/* ====== GLOBAL IMAGE ASPECT RATIO FIX ====== */
/* Prevent scraped article images from being stretched/squished */
.entry-content img,
.portal-feature__image img,
.portal-news-card img,
.portal-reference-item img,
.single-post .post-content img {
  width: 100%;
  height: auto;
  object-fit: cover;
  aspect-ratio: auto;
  max-height: 600px;
}

/* Featured image thumbnails in lists — fixed aspect ratio */
.portal-news-card .portal-news-card__image,
.portal-reference-item .portal-reference-item__image {
  aspect-ratio: 16 / 9;
  overflow: hidden;
}

.portal-news-card .portal-news-card__image img,
.portal-reference-item .portal-reference-item__image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* Slider featured image — consistent aspect ratio */
.portal-feature__image {
  min-height: 200px;
}

/* Single post body text should match source newspaper-style justification. */
.single-post .entry-content p,
.single-post .entry-content li {
  text-align: justify !important;
  text-justify: inter-word;
}

.single-post .entry-content p:has(> img:only-child) {
  text-align: center !important;
}

/* ====== MOBILE RESPONSIVE FIXES ====== */
@media (max-width: 820px) {
  /* --- Marquee / Tin chạy: stack vertically, prevent overflow --- */
  .portal-marquee {
    grid-template-columns: 1fr !important;
    border-radius: 12px;
    width: 100%;
    max-width: 100%;
  }

  .portal-marquee span {
    padding: 10px 14px;
    font-size: 13px;
    border-radius: 12px 12px 0 0;
    justify-content: center;
  }

  .portal-marquee__viewport {
    height: auto;
    max-height: 7.8em;
    width: 100%;
  }

  .portal-marquee__item {
    padding: 6px 14px;
    font-size: 14px;
  }

  .portal-org-chart__branches {
    grid-template-columns: 1fr !important;
    gap: 12px;
    padding-top: 0;
  }

  .portal-org-chart__branches::before,
  .portal-org-chart__branches .portal-org-node::before,
  .portal-org-chart__leadership::before,
  .portal-org-chart__leadership::after {
    display: none;
  }

  .portal-org-chart__top {
    margin-bottom: 16px;
  }

  .portal-org-chart__leadership {
    margin-bottom: 16px;
  }

  .portal-org-chart__top::after {
    display: none;
  }

  /* --- Portal highlight (tin nổi bật): prevent width overflow --- */
  .portal-panel--highlight {
    width: 100%;
    max-width: 100%;
    overflow: hidden;
  }

  .portal-panel--highlight .portal-list-text {
    padding: 10px 14px;
  }

  .portal-list-text--featured li {
    word-break: break-word;
    overflow-wrap: break-word;
  }

  .portal-list-text--featured li a {
    word-break: break-word;
    display: block;
  }

  /* --- Slider: adjust image height for mobile --- */
  .portal-feature__image {
    min-height: 160px;
    max-height: 240px;
  }

  .portal-feature__content {
    padding: 14px;
  }

  .portal-feature__title {
    font-size: 17px;
    line-height: 1.35;
  }

  /* --- Prevent ANY horizontal overflow on mobile --- */
  .portal-home,
  .portal-grid,
  .portal-main,
  .portal-sidebar,
  .portal-row,
  .portal-two-col {
    max-width: 100%;
    overflow-x: hidden;
  }

  /* --- Single post scraped images: fit within viewport --- */
  .entry-content img,
  .single-post .post-content img {
    max-width: 100%;
    height: auto !important;
    object-fit: contain;
  }

  /* --- Reference/news cards on mobile --- */
  .portal-reference-item,
  .portal-news-grid {
    grid-template-columns: 1fr !important;
  }
}

@media (max-width: 480px) {
  /* Extra small screens */
  .portal-marquee span {
    font-size: 12px;
    padding: 8px 10px;
  }

  .portal-marquee__item {
    font-size: 13px;
    padding: 5px 10px;
  }

  .portal-feature__image {
    min-height: 140px;
    max-height: 200px;
  }

  .portal-feature__title {
    font-size: 15px;
  }

  .portal-feature__content {
    padding: 10px;
  }

  .portal-panel__title,
  .portal-box__header h2 {
    font-size: 15px;
    padding: 12px 14px;
  }
}
