/* ===================================================
   QUANG TRUNG COLLEGE — Global Header & Footer Styles
   =================================================== */

/* ── FONT GLOBAL ── */
/* Override Flatsome Customizer (custom-css inline) đang set Roboto cho body/headings/nav */
body,
h1, h2, h3, h4, h5, h6,
.heading-font,
.header-main, .qt-top-bar,
.nav > li > a,
.mobile-sidebar-levels-2 .nav > li > ul > li > a,
.alt-font {
  font-family: 'Be Vietnam Pro', sans-serif !important;
}

/* ── HEADER ALIGNMENT ── */
/* Stretch các flex column để fill đủ chiều cao header */
.header-inner.flex-row {
  align-items: stretch !important;
}
/* Logo column — override Flatsome width:200px */
#logo, #logo.flex-col {
  width: auto !important;
  max-width: none !important;
  flex: 0 0 auto !important;
  padding-right: 0 !important;
  margin-right: 0 !important;
  display: flex !important;
  align-items: center !important;
}
#logo img.header_logo,
#logo img.header-logo {
  max-height: 52px !important;
  width: auto !important;
}
/* Left column — chứa tên trường: chỉ rộng vừa đủ nội dung, không flex-grow */
.flex-col.hide-for-medium.flex-left {
  flex: 0 0 auto !important;
  display: flex !important;
  align-items: center !important;
}
/* Right column — nav items: giữ nguyên kích thước, đẩy sát phải
   (margin-left: auto hấp thụ khoảng trống, tránh shift khi JS inject nút CTA) */
.flex-col.hide-for-medium.flex-right {
  flex: none !important;
  margin-left: auto !important;
  display: flex !important;
  align-items: center !important;
}
.flex-col.hide-for-medium.flex-right > ul.header-nav-main {
  height: 100% !important;
  display: flex !important;
  align-items: center !important;
  flex-wrap: nowrap !important;
  gap: 2px !important;
}

/* ── LOGO TEXT ── */
li.html.html_topbar_left {
  display: flex !important;
  align-items: center !important;
  padding-left: 8px !important;
  padding-right: 10px !important;
  height: 100% !important;
}
.html_topbar_left {
  display: flex !important;
  flex-direction: column !important;
  justify-content: center !important;
  white-space: nowrap !important;
  line-height: 1.3 !important;
}
.html_topbar_left strong:first-child {
  font-size: .98rem !important;
  font-weight: 800 !important;
  color: #D61C23 !important;
  font-family: 'Be Vietnam Pro', sans-serif !important;
  text-transform: uppercase !important;
  display: block !important;
  line-height: 1.25 !important;
  white-space: nowrap !important;
}
.html_topbar_left strong:last-child {
  font-size: .6rem !important;
  font-weight: 600 !important;
  color: #64748B !important;
  font-family: 'Be Vietnam Pro', sans-serif !important;
  text-transform: uppercase !important;
  letter-spacing: .5px !important;
  display: block !important;
  white-space: nowrap !important;
}

/* ── NAV ITEMS ── */
.nav-uppercase > li > a,
.header-nav-main > li > a,
.nav > li > a.nav-top-link {
  text-transform: none !important;
  font-family: 'Be Vietnam Pro', sans-serif !important;
  font-weight: 600 !important;
  font-size: .82rem !important;
  color: #1C2541 !important;
  padding: 7px 9px !important;
  white-space: nowrap !important;
  display: flex !important;
  align-items: center !important;
  height: auto !important;
  border-radius: 8px !important;
  gap: 3px !important;
  transition: background .2s, color .2s !important;
}
.nav > li > a.nav-top-link:hover,
.nav > li.active > a.nav-top-link {
  color: #D61C23 !important;
  background: #FFF0F1 !important;
}
.header-nav-main > li {
  height: 100% !important;
  display: flex !important;
  align-items: center !important;
  position: relative !important;
}
/* Dropdown arrow — transition + xoay khi hover như file HTML mẫu */
.nav > li > a .icon-angle-down {
  vertical-align: middle !important;
  margin-left: 3px !important;
  font-size: .7rem !important;
  transition: transform .2s !important;
  display: inline-block !important;
}
.header-nav-main > li.has-dropdown:hover > a .icon-angle-down {
  transform: rotate(180deg) !important;
}
/* Dropdown container */
.nav > li > .nav-dropdown {
  border-top: 3px solid #D61C23 !important;
  border-radius: 0 0 12px 12px !important;
  box-shadow: 0 12px 40px rgba(0,0,0,.12) !important;
  min-width: 260px !important;
  /* top: 100% đặt dropdown ngay dưới <li> (= dưới header bar)
     override JS của Flatsome đang tính sai vì li có height:100% */
  top: 100% !important;
  margin-top: -14px !important;
  padding: 4px 0 !important;
  overflow: hidden !important;
  background: #fff !important;
}
/* Dropdown items — default state */
#masthead .sub-menu li a,
#masthead .nav-dropdown li a,
.header-main .sub-menu li a,
.nav-dropdown li > a {
  font-family: 'Be Vietnam Pro', sans-serif !important;
  font-size: .85rem !important;
  font-weight: 500 !important;
  text-transform: none !important;
  line-height: 1.5 !important;
  display: block !important;
  padding: 11px 20px 11px 17px !important;
  color: #1E293B !important;
  border-left: 3px solid transparent !important;
  background: transparent !important;
  text-decoration: none !important;
  box-shadow: none !important;
}
/* Dropdown items — hover state */
#masthead .sub-menu li a:hover,
#masthead .nav-dropdown li a:hover,
.header-main .sub-menu li a:hover,
.nav-dropdown li > a:hover {
  background: #FFF0F1 !important;
  border-left: 3px solid #D61C23 !important;
  color: #D61C23 !important;
  text-decoration: none !important;
}

/* ── TOP BAR ── */
.qt-top-bar {
  background: #0B132B;
  color: #fff;
  font-size: .78rem;
  padding: 8px 0;
  border-bottom: 2px solid #FFC700;
}
.qt-top-bar-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
}
.qt-top-bar a {
  color: #fff;
  text-decoration: none;
  transition: color .2s;
}
.qt-top-bar a:hover {
  color: #FFC700;
  text-decoration: underline;
}

/* ── HEADER CTA BUTTON ── */
/* Wrapper li trong nav ul */
li.qt-nav-cta-li {
  display: flex !important;
  align-items: center !important;
  margin-left: 8px !important;
  height: 100% !important;
}
.qt-nav-cta {
  flex-shrink: 0;
  padding: 11px 24px;
  border-radius: 10px;
  background: #D61C23;
  font-size: .88rem;
  font-weight: 700;
  text-decoration: none !important;
  transition: background .2s, transform .15s, box-shadow .2s;
  box-shadow: 0 4px 12px rgba(214,28,35,.2);
  white-space: nowrap;
  display: inline-block;
  line-height: 1.4;
}
/* Dùng selector cao hơn .header-nav-main > li > a để giữ màu trắng */
li.qt-nav-cta-li > a.qt-nav-cta,
li.qt-nav-cta-li > a.qt-nav-cta:hover {
  color: #fff !important;
}
.qt-nav-cta:hover {
  background: #B01218 !important;
  transform: translateY(-1px);
  box-shadow: 0 6px 16px rgba(214,28,35,.3);
  color: #fff !important;
}

/* ── FOOTER ── */
.qt-footer {
  background: #0B132B;
  color: rgba(255,255,255,.7);
  border-top: 3px solid #D61C23;
  font-family: 'Be Vietnam Pro', sans-serif;
}
.qt-footer-main {
  padding: 64px 24px 44px;
  max-width: 1200px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 48px;
}
.qt-footer-logo {
  display: flex;
  align-items: center;
  gap: 14px;
  text-decoration: none;
  margin-bottom: 20px;
}
.qt-footer-logo img {
  width: 52px;
  height: 52px;
  object-fit: contain;
}
.qt-footer-logo-text strong {
  display: block;
  font-size: 1.1rem;
  font-weight: 800;
  color: #fff;
}
.qt-footer-logo-text span {
  font-size: .75rem;
  color: rgba(255,255,255,.5);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .5px;
}
.qt-footer-brand p {
  font-size: .88rem;
  line-height: 1.7;
  color: rgba(255,255,255,.65);
  margin: 0 0 24px;
}
.qt-footer-socials {
  display: flex;
  gap: 10px;
}
.qt-social-btn {
  width: 38px;
  height: 38px;
  border-radius: 8px;
  background: rgba(255,255,255,.06);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1rem;
  color: #fff;
  text-decoration: none;
  transition: all .2s;
  border: 1px solid rgba(255,255,255,.05);
  font-weight: 700;
}
.qt-social-btn:hover {
  background: #D61C23;
  color: #fff;
  border-color: #D61C23;
  transform: translateY(-2px);
}
.qt-footer-col h4 {
  font-size: .95rem;
  font-weight: 700;
  color: #fff;
  margin-bottom: 20px;
  text-transform: uppercase;
  letter-spacing: .5px;
  position: relative;
  padding-bottom: 8px;
}
.qt-footer-col h4::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 24px;
  height: 2px;
  background: #FFC700;
}
.qt-footer-col ul {
  list-style: none;
  margin: 0;
  padding: 0;
}
.qt-footer-col ul li {
  margin-bottom: 12px;
}
.qt-footer-col ul li a {
  font-size: .88rem;
  color: rgba(255,255,255,.6);
  text-decoration: none;
  transition: color .2s;
}
.qt-footer-col ul li a:hover {
  color: #FFC700;
}
.qt-footer-contact-item {
  display: flex;
  gap: 12px;
  margin-bottom: 14px;
  font-size: .88rem;
  line-height: 1.5;
  color: rgba(255,255,255,.6);
}
.qt-footer-contact-item .icon {
  color: #FFC700;
  flex-shrink: 0;
}
.qt-footer-bottom {
  border-top: 1px solid rgba(255,255,255,.05);
  background: rgba(0,0,0,.1);
  padding: 22px 24px;
}
.qt-footer-bottom-inner {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: .8rem;
  color: rgba(255,255,255,.4);
  flex-wrap: wrap;
  gap: 8px;
}
.qt-footer-bottom a {
  color: rgba(255,255,255,.4);
  text-decoration: none;
}
.qt-footer-bottom a:hover {
  color: #FFC700;
}

/* ── RESPONSIVE ── */
@media (max-width: 1024px) {
  .qt-footer-main { grid-template-columns: 1fr 1fr; gap: 32px; }
}
@media (max-width: 768px) {
  .qt-footer-main { grid-template-columns: 1fr; }
  .qt-top-bar-inner { flex-direction: column; align-items: flex-start; gap: 4px; }
}
