/* Header / footer — theo TaiLieu/ThietKe_Web_TamDuc.md mục 2 & 3
   Quy định: docs/mau-chu-dao.md */
:root {
  --hps-primary: #0A5FA8;
  --hps-accent: #B84F0B;
  --hps-primary-dark: #0B2A45;
  --hps-primary-hover: #084A85;
  --hps-accent-dark: #9A4209;
  --hps-primary-soft: #EEF5FB;
  --hps-accent-soft: #F8EDE4;
  --hps-bg-muted: #F5F8FA;
  --hps-text: #13222E;
  --hps-font: 'Be Vietnam Pro', sans-serif;
}

#header.hps-header {
  position: relative;
  z-index: 999;
  background: #fff;
  color: var(--hps-text);
  font-family: var(--hps-font);
}
#header.hps-header a {
  text-decoration: none;
}
.hps-wrap {
  width: min(1200px, 100%);
  margin: 0 auto;
  padding: 0 20px;
}

/* —— Topbar —— */
#header.hps-header .hps-top {
  background: var(--hps-primary-dark);
  color: #eaf4fc;
  font-size: 13px;
}
#header.hps-header .hps-top-inner {
  display: flex;
  align-items: center;
  gap: 28px;
  min-height: 36px;
}
#header.hps-header .hps-top-item {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  white-space: nowrap;
  color: #eaf4fc;
}
#header.hps-header .hps-top-item svg {
  width: 15px;
  height: 15px;
  flex-shrink: 0;
  color: #ffd7c2;
}
#header.hps-header .hps-top-item b {
  font-weight: 700;
  color: #fff;
}
#header.hps-header .hps-emergency b {
    color: #e00a0d;
}
#header.hps-header .hps-top-address {
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 32%;
}
#header.hps-header .hps-top-address b {
  overflow: hidden;
  text-overflow: ellipsis;
}
#header.hps-header .hps-top-links {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
}
#header.hps-header .hps-top-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 28px;
  padding: 0 14px;
  border-radius: 6px;
  background: rgb(184, 79, 11);
  border: 1px solid rgb(184, 79, 11);
  color: #fff;
  font-size: 12.5px;
  font-weight: 700;
  white-space: nowrap;
  transition: background 0.15s ease, border-color 0.15s ease;
}
#header.hps-header .hps-top-btn:hover {
  background: var(--hps-accent-dark);
  border-color: var(--hps-accent-dark);
  color: #fff;
}

/* —— Main: logo + search + hotline + book —— */
#header.hps-header .hps-main {
  padding: 12px 0;
  background: #fff;
}
#header.hps-header .hps-main-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}
#header.hps-header .hps-brand {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-shrink: 0;
  min-width: 0;
  color: inherit;
}
#header.hps-header .hps-brand img {
  height: 64px;
  width: auto;
  max-width: 160px;
  object-fit: contain;
  flex-shrink: 0;
}
#header.hps-header .hps-brand-text {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: center;
  gap: 2px;
  min-width: 0;
  line-height: 1.15;
}
#header.hps-header .hps-brand-name {
  color: var(--hps-primary-dark);
  font-size: 26px;
  font-weight: 800;
  letter-spacing: 0.02em;
  line-height: 1.1;
  white-space: nowrap;
}
#header.hps-header .hps-brand-sub {
  color: var(--hps-primary);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  white-space: nowrap;
}
#header.hps-header .hps-brand:hover .hps-brand-name {
  color: var(--hps-primary);
}
#header.hps-header .hps-brand:hover .hps-brand-sub {
  color: var(--hps-primary-hover);
}

#header.hps-header .hps-tools {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-left: auto;
  flex-shrink: 1;
  min-width: 0;
}
#header.hps-header .hps-search {
  display: flex;
  align-items: center;
  width: 420px;
  max-width: 42vw;
  height: 42px;
  background: var(--hps-bg-muted);
  border: 1px solid #d9e3ef;
  border-radius: 999px;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.8);
}
#header.hps-header .hps-search input {
  flex: 1;
  min-width: 0;
  height: 40px;
  border: 0;
  background: transparent;
  padding: 0 16px;
  font-size: 15px;
  color: var(--hps-text);
  border-radius: 999px 0 0 999px;
}
#header.hps-header .hps-search select {
  height: 40px;
  border: 0;
  border-left: 1px solid #d1d5db;
  background: transparent;
  padding: 0 8px 0 12px;
  font-size: 14px;
  color: var(--hps-text);
}
#header.hps-header .hps-search button {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  margin-right: 3px;
  flex-shrink: 0;
  border: 0;
  border-radius: 50%;
  background: var(--hps-primary);
  color: #fff;
  cursor: pointer;
}
#header.hps-header .hps-search button:hover {
  background: var(--hps-primary-hover);
}
#header.hps-header .hps-search button svg {
  width: 16px;
  height: 16px;
}

#header.hps-header .hps-hotline {
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: center;
  min-height: 42px;
  padding-left: 40px;
  line-height: 1.15;
  color: var(--hps-text);
}
#header.hps-header .hps-hotline svg {
  position: absolute;
  left: 0;
  top: 50%;
  width: 28px;
  height: 28px;
  padding: 6px;
  border-radius: 50%;
  background: var(--hps-accent-soft);
  color: var(--hps-accent);
  transform: translateY(-50%);
  box-sizing: border-box;
}
#header.hps-header .hps-hotline small {
  font-size: 13px;
}
#header.hps-header .hps-hotline strong {
  font-size: 18px;
  color: var(--hps-accent);
  font-weight: 700;
}
#header.hps-header .hps-hotline:hover strong {
  color: var(--hps-primary);
}

#header.hps-header .hps-book {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  height: 42px;
  padding: 0 18px;
  border: 0;
  border-radius: 999px;
  color: #fff;
  font-weight: 700;
  font-size: 14.5px;
  white-space: nowrap;
  background: var(--hps-accent);
  box-shadow: 0 6px 14px rgba(184, 79, 11, 0.28);
}
#header.hps-header .hps-book svg {
  width: 18px;
  height: 18px;
}
#header.hps-header .hps-book:hover {
  background: var(--hps-accent-dark);
  box-shadow: 0 6px 14px rgba(184, 79, 11, 0.32);
}
#header.hps-header .menu-icon {
  display: none;
}

/* —— Menu xanh dưới logo —— */
#header.hps-header #gnavi {
  position: sticky;
  top: 0;
  z-index: 200;
  overflow: visible;
  background: var(--hps-primary);
  box-shadow: 0 8px 18px rgba(10, 95, 168, 0.16);
}
#header.hps-header ul.gnavi {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  margin: 0 auto;
  padding: 0;
  width: min(1200px, 100%);
  background: transparent;
  list-style: none;
  overflow: visible;
}
#header.hps-header ul.gnavi > li {
  position: relative;
  margin: 0;
  z-index: 1;
}
#header.hps-header ul.gnavi > li.over:hover,
#header.hps-header ul.gnavi > li.over:focus-within {
  z-index: 50;
}
#header.hps-header ul.gnavi > li > a {
  display: flex;
  align-items: center;
  min-height: 54px;
  margin: 0;
  padding: 0 14px;
  color: #fff !important;
  font-weight: 600;
  font-size: 14.5px;
  border-radius: 8px;
  overflow: visible;
  background: transparent;
  z-index: auto;
}
#header.hps-header ul.gnavi > li > a::before {
  display: none !important;
}
#header.hps-header ul.gnavi > li:hover > a,
#header.hps-header ul.gnavi > li.over:hover > a {
  background: rgba(255, 255, 255, 0.16);
  color: #fff !important;
}
/* Submenu nổi trên nội dung — không để khoảng trống gây mouseleave */
#header.hps-header .submenu {
  position: absolute;
  top: 100%;
  left: 0;
  z-index: 300;
  width: 260px;
  margin: 0;
  padding: 8px;
  background: #fff;
  border-radius: 0 0 12px 12px;
  box-shadow: 0 16px 40px rgba(17, 24, 39, 0.18);
  transform: none !important;
  -webkit-transform: none !important;
}
#header.hps-header .submenu::before {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  top: -10px;
  height: 10px;
  background: transparent;
}
#header.hps-header .submenu li {
  list-style: none;
  margin: 0;
  padding: 0;
}
#header.hps-header .submenu a {
  display: flex;
  align-items: center;
  min-height: 38px;
  margin: 0;
  padding: 6px 12px;
  border-radius: 8px;
  background: #fff;
  color: #243028 !important;
  font-size: 14.5px;
  font-weight: 500;
  position: relative;
  z-index: 1;
  overflow: visible;
}
#header.hps-header .submenu a::before {
  display: none !important;
}
#header.hps-header .submenu a:hover {
  color: var(--hps-primary) !important;
  background: var(--hps-primary-soft);
}
#header.hps-header .gnv-ico {
  display: none;
}
@media screen and (min-width: 769px) {
  #header.hps-header .hps-nav-account {
    display: none;
  }
}

#header.hps-header.fixed {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  background: #fff;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.08);
}
#header.hps-header.fixed .hps-top {
  display: none;
}
#header.hps-header.fixed .hps-main {
  padding: 6px 0;
}
#header.hps-header.fixed .hps-brand img {
  height: 48px;
}
#header.hps-header.fixed .hps-brand-name {
  font-size: 22px;
}
#header.hps-header.fixed .hps-brand-sub {
  font-size: 11px;
}

/* Ghi đè style #footer cũ trong styles.css (padding 90px / nền xám) */
#footer.hps-footer {
  background: var(--hps-primary-dark);
  color: rgba(255, 255, 255, 0.92);
  padding: 48px 0 0;
  margin-top: 28px;
}
#footer.hps-footer a {
  text-decoration: none;
}
#footer.hps-footer .hps-footer-grid {
  display: grid;
  grid-template-columns: 1.25fr 0.85fr 0.85fr 1.1fr;
  gap: 32px 28px;
  align-items: start;
  padding: 0 0 36px;
}
#footer.hps-footer .hps-footer-col {
  min-width: 0;
}
#footer.hps-footer .hps-footer-logo {
  display: inline-flex;
  margin-bottom: 14px;
  padding: 8px 12px;
  border-radius: 12px;
  background: #fff;
}
#footer.hps-footer .hps-footer-logo img {
  height: 64px;
  width: auto;
  max-width: 220px;
  object-fit: contain;
}
#footer.hps-footer .hps-footer-name {
  margin: 0 0 8px;
  font-size: 17px;
  font-weight: 800;
  line-height: 1.35;
  color: #fff;
  text-transform: uppercase;
}
#footer.hps-footer .hps-footer-license {
  margin: 0 0 14px;
  font-size: 13px;
  line-height: 1.5;
  color: rgba(255, 255, 255, 0.78);
}
#footer.hps-footer .hps-footer-contact {
  margin: 0 0 16px;
  padding: 0;
  list-style: none;
}
#footer.hps-footer .hps-footer-contact li {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin-bottom: 10px;
  font-size: 14px;
  line-height: 1.5;
  color: rgba(255, 255, 255, 0.92);
}
#footer.hps-footer .hps-footer-contact svg {
  flex-shrink: 0;
  width: 16px;
  height: 16px;
  margin-top: 3px;
  color: #fff;
}
#footer.hps-footer .hps-footer-contact a {
  color: #fff;
  font-weight: 700;
}
#footer.hps-footer .hps-footer-contact a:hover {
  color: #ffd7c2;
}
#footer.hps-footer .hps-social {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
#footer.hps-footer .hps-social a {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.16);
  color: #fff;
  transition: background 0.18s ease;
}
#footer.hps-footer .hps-social a:hover {
  background: var(--hps-accent);
}
#footer.hps-footer .hps-social svg {
  width: 18px;
  height: 18px;
  fill: currentColor;
}
#footer.hps-footer .hps-footer-title {
  margin: 0 0 16px;
  padding-bottom: 10px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.22);
  font-size: 16px;
  font-weight: 800;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  color: #fff;
}
#footer.hps-footer .hps-footer-menu {
  margin: 0;
  padding: 0;
  list-style: none;
}
#footer.hps-footer .hps-footer-menu > li {
  margin: 0 0 8px;
  list-style: none;
}
#footer.hps-footer .hps-footer-menu a {
  display: inline-block;
  color: rgba(255, 255, 255, 0.88);
  font-size: 14.5px;
  font-weight: 500;
  line-height: 1.45;
  transition: color 0.15s ease, padding-left 0.15s ease;
}
#footer.hps-footer .hps-footer-menu a:hover {
  color: #fff;
  padding-left: 4px;
}
#footer.hps-footer .hps-footer-fb {
  overflow: hidden;
  max-width: 100%;
  border-radius: 12px;
  background: #fff;
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.18);
}
#footer.hps-footer .hps-footer-fb iframe {
  display: block;
  width: 100% !important;
  max-width: 340px;
  border: 0;
}
#footer.hps-footer .hps-copy {
  margin: 0;
  padding: 16px 16px 24px;
  background: transparent;
  border-top: 1px solid rgba(255, 255, 255, 0.2);
  color: rgba(255, 255, 255, 0.9);
  text-align: center;
  font-size: 13px;
  font-weight: 500;
  line-height: 1.5;
}
#footer.hps-footer .hps-copy a {
  color: #fff;
  font-weight: 700;
}

/* Chừa chỗ cho thanh CTA cố định — không tạo dải xanh thừa trong footer */

@media screen and (max-width: 1200px) {
  #header.hps-header .hps-top-inner {
    gap: 16px;
  }
  #header.hps-header .hps-top-address {
    max-width: 22%;
  }
}

@media screen and (max-width: 1100px) {
  #header.hps-header .hps-brand img {
    height: 56px;
    max-width: 140px;
  }
  #header.hps-header .hps-brand-name {
    font-size: 22px;
  }
  #header.hps-header .hps-brand-sub {
    font-size: 11px;
  }
  #header.hps-header .hps-search {
    width: 300px;
    max-width: 36vw;
  }
  #header.hps-header .hps-search select {
    display: none;
  }
  #header.hps-header .hps-main-inner,
  #header.hps-header .hps-tools {
    gap: 12px;
  }
}

@media screen and (max-width: 1000px) {
  #header.hps-header .hps-top-hours {
    display: none;
  }
}

@media screen and (max-width: 768px) {
  #header.hps-header .hps-top-inner {
    flex-wrap: wrap;
    gap: 8px;
    min-height: 0;
    padding-top: 8px;
    padding-bottom: 8px;
  }
  #header.hps-header .hps-top-hours {
    display: none;
  }
  #header.hps-header .hps-top-address {
    display: none;
  }
  #header.hps-header .hps-top-links {
    margin-left: auto;
  }
  #header.hps-header .hps-top-btn {
    height: 26px;
    padding: 0 10px;
    font-size: 12px;
  }
  #header.hps-header .hps-hotline,
  #header.hps-header .hps-book {
    display: none;
  }
  #header.hps-header .hps-main {
    padding: 10px 0;
  }
  #header.hps-header .hps-main-inner {
    flex-wrap: wrap;
    gap: 10px;
  }
  #header.hps-header .hps-brand {
    gap: 8px;
    flex: 1;
    min-width: 0;
  }
  #header.hps-header .hps-brand img {
    height: 48px;
    max-width: 110px;
  }
  #header.hps-header .hps-brand-name {
    font-size: 18px;
  }
  #header.hps-header .hps-brand-sub {
    font-size: 10px;
    white-space: normal;
    max-width: 14em;
  }
  #header.hps-header .hps-tools {
    order: 3;
    width: 100%;
    margin-left: 0;
  }
  #header.hps-header .hps-search {
    width: 100%;
    max-width: none;
  }
  #header.hps-header .menu-icon {
    display: block;
    margin-left: auto;
    background: var(--hps-primary);
  }
  #header.hps-header #gnavi {
    display: none;
    position: absolute;
    left: 0;
    right: 0;
    background: #fff;
    box-shadow: 0 12px 24px rgba(0, 0, 0, 0.12);
  }
  #header.hps-header #gnavi.menu_mobile {
    display: block;
  }
  #header.hps-header #gnavi.menu_mobile ul.gnavi {
    display: block;
    width: 100%;
    background: #fff;
  }
  #header.hps-header #gnavi.menu_mobile ul.gnavi > li > a {
    color: #222 !important;
    border-bottom: 1px solid #eee;
    padding: 12px 18px;
    min-height: 0;
  }
  #header.hps-header #gnavi.menu_mobile ul.gnavi > li:hover > a {
    background: #f6f6f6;
    color: var(--hps-primary) !important;
  }
  #header.hps-header #gnavi.menu_mobile .submenu {
    position: static;
    width: 100%;
    box-shadow: none;
    padding: 0;
  }
  #header.hps-header #gnavi.menu_mobile .submenu a {
    padding-left: 32px;
    border-bottom: 1px solid #eee;
  }
  #header.hps-header #gnavi.menu_mobile .gnv-ico {
    display: block;
  }
  #header.hps-header.fixed .hps-top {
    display: block;
  }
  #footer.hps-footer {
    padding-top: 36px;
  }
  #footer.hps-footer .hps-footer-grid {
    grid-template-columns: 1fr;
    gap: 28px;
  }
  #footer.hps-footer .hps-footer-fb iframe {
    max-width: 100%;
  }
}

@media screen and (max-width: 1100px) and (min-width: 769px) {
  #footer.hps-footer .hps-footer-grid {
    grid-template-columns: 1fr 1fr;
  }
}

@media screen and (max-width: 480px) {
  #header.hps-header .hps-brand img {
    height: 42px;
    max-width: 88px;
  }
  #header.hps-header .hps-brand-sub {
    font-size: 9px;
    white-space: normal;
    max-width: 11em;
  }
  #header.hps-header .hps-brand-name {
    font-size: 16px;
  }
  #header.hps-header .hps-emergency {
    font-size: 12px;
  }
}

/* Ẩn cụm icon cũ nếu còn sót markup */
.f_btn {
  display: none !important;
}

/* Nút lên đầu trang — cam như Đặt lịch khám */
#footer.hps-footer #totop {
  bottom: 24px;
  right: 18px;
  z-index: 999;
  width: 46px;
  height: 46px;
  margin: 0;
}
#footer.hps-footer #totop a {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 46px;
  height: 46px;
  border-radius: 50%;
  background: rgb(184, 79, 11);
  color: #fff;
  box-shadow: 0 6px 16px rgba(184, 79, 11, 0.35);
  text-decoration: none;
  transition: background 0.18s ease, transform 0.18s ease;
  -webkit-animation: none;
  animation: none;
}
#footer.hps-footer #totop a::before {
  content: "";
  width: 12px;
  height: 12px;
  border-left: 2.5px solid #fff;
  border-top: 2.5px solid #fff;
  transform: translateY(2px) rotate(45deg);
}
#footer.hps-footer #totop a:hover {
  background: var(--hps-accent-dark);
  opacity: 1;
  transform: translateY(-2px);
}

/* Float liên hệ nhanh — hiện mọi trang (trong footer) */
.td-float {
  position: fixed;
  right: 18px;
  top: 34%;
  display: grid;
  gap: 8px;
  z-index: 1000;
}
.td-float a {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  background: var(--hps-primary);
  color: #fff !important;
  display: grid;
  place-items: center;
  font-weight: 700;
  font-size: 16px;
  text-decoration: none !important;
  box-shadow: 0 3px 10px rgba(0, 0, 0, 0.14);
}
.td-float a:first-child {
  background: rgb(184, 79, 11);
}
.td-float a:nth-child(2) {
  font-size: 10px;
}
@media screen and (max-width: 768px) {
  .td-float {
    right: 9px;
  }
  .td-float a {
    width: 36px;
    height: 36px;
  }
}

/* Ẩn sticky CTA cũ trên mọi trang — đã dùng .td-float */
.hps-sticky-cta {
  display: none !important;
}
