/* =====================================================================
   Xoăn Media — GIAO DIỆN HỆ THỐNG & CHUẨN ĐỒ HỌA
   Website: xoanmedia.com
   ===================================================================== */

@import url('https://fonts.googleapis.com/css2?family=Be+Vietnam+Pro:ital,wght@0,300;0,400;0,500;0,600;0,700;0,800;1,400&family=Newsreader:ital,opsz,wght@0,6..72,400;0,6..72,500;0,6..72,600;1,6..72,400;1,6..72,500&display=swap');

:root {
  --font-sans: 'Be Vietnam Pro', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  --font-serif: 'Newsreader', Georgia, serif;
  
  --bg-page: #F7F3EC;
  --bg-card: #FFFFFF;
  --bg-dark: #0D0C0B;
  --bg-dark-card: #171614;
  
  --text-main: #1C1A18;
  --text-muted: #746F68;
  --text-light: #F7F3EC;
  --text-light-muted: #A39D94;
  
  --accent: #E07A28;
  --accent-hover: #C86718;
  --accent-light: #FDF2E8;
  --gold: #D4AF37;
  
  --border: rgba(28, 26, 24, 0.08);
  --border-dark: rgba(255, 255, 255, 0.1);
  --border-focus: rgba(224, 122, 40, 0.4);
  
  --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.04);
  --shadow-md: 0 8px 24px rgba(0, 0, 0, 0.07);
  --shadow-lg: 0 16px 40px rgba(0, 0, 0, 0.12);
  --shadow-popup: 0 24px 60px rgba(0, 0, 0, 0.2);
  
  --radius-sm: 8px;
  --radius-md: 14px;
  --radius-lg: 22px;
  --radius-full: 9999px;
  
  --header-h: 68px;
  --transition: all 0.24s cubic-bezier(0.16, 1, 0.3, 1);
}

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

html {
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  font-family: var(--font-sans);
  background-color: var(--bg-page);
  color: var(--text-main);
  line-height: 1.6;
  font-size: 15px;
  overflow-x: hidden;
}

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

button, input, select, textarea {
  font-family: inherit;
  font-size: inherit;
  color: inherit;
  border: none;
  background: none;
  outline: none;
}

button {
  cursor: pointer;
  user-select: none;
}

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

/* ================= HEADER ================= */
#siteHdr {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: var(--header-h);
  background: rgba(247, 243, 236, 0.94);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--border);
  z-index: 1000;
  display: flex;
  align-items: center;
  transition: var(--transition);
}

body.dark-hdr #siteHdr {
  background: rgba(13, 12, 11, 0.94);
  border-bottom: 1px solid var(--border-dark);
  color: var(--text-light);
}

.hdr-wrap {
  width: 100%;
  max-width: 1440px;
  margin: 0 auto;
  padding: 0 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.logo {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 20px;
  font-weight: 800;
  letter-spacing: -0.02em;
  text-decoration: none;
}

.logo-img {
  height: 38px;
  max-height: 40px;
  width: auto;
  object-fit: contain;
  display: block;
  transition: transform 0.25s ease;
}

.logo:hover .logo-img {
  transform: scale(1.04);
}

.logo span.brand-xoan {
  color: var(--text-main);
}
body.dark-hdr .logo span.brand-xoan {
  color: var(--text-light);
}

.logo span.brand-tag {
  font-family: var(--font-serif);
  font-size: 14px;
  font-weight: 400;
  font-style: italic;
  color: var(--accent);
  margin-top: 2px;
}

.hdr-nav {
  display: flex;
  align-items: center;
  gap: 28px;
}

.hdr-nav a {
  font-weight: 500;
  font-size: 14.5px;
  color: var(--text-muted);
  transition: var(--transition);
  position: relative;
  padding: 6px 0;
}

body.dark-hdr .hdr-nav a {
  color: var(--text-light-muted);
}

.hdr-nav a:hover,
.hdr-nav a.active {
  color: var(--text-main);
}

body.dark-hdr .hdr-nav a:hover,
body.dark-hdr .hdr-nav a.active {
  color: var(--text-light);
}

.hdr-nav a.active::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 2px;
  background: var(--accent);
  border-radius: 2px;
}

/* ============ SUB-MENU / DROPDOWN NAVIGATION ============ */
.hdr-dropdown {
  position: relative;
  display: inline-flex;
  align-items: center;
  height: 100%;
}

.hdr-dropdown-toggle {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-weight: 500;
  font-size: 14.5px;
  color: var(--text-muted);
  transition: var(--transition);
  position: relative;
  padding: 6px 0;
  cursor: pointer;
  text-decoration: none;
}

body.dark-hdr .hdr-dropdown-toggle {
  color: var(--text-light-muted);
}

.hdr-dropdown:hover .hdr-dropdown-toggle,
.hdr-dropdown.active .hdr-dropdown-toggle {
  color: var(--text-main);
}

body.dark-hdr .hdr-dropdown:hover .hdr-dropdown-toggle,
body.dark-hdr .hdr-dropdown.active .hdr-dropdown-toggle {
  color: var(--text-light);
}

.hdr-dropdown.active .hdr-dropdown-toggle::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 2px;
  background: var(--accent);
  border-radius: 2px;
}

.hdr-dropdown-toggle .chevron-icon {
  transition: transform 0.25s ease;
  opacity: 0.7;
}

.hdr-dropdown:hover .hdr-dropdown-toggle .chevron-icon {
  transform: rotate(180deg);
  opacity: 1;
}

.hdr-dropdown-menu {
  position: absolute;
  top: 100%;
  left: 50%;
  transform: translateX(-50%) translateY(10px);
  min-width: 290px;
  background: #FFFFFF;
  border: 1px solid rgba(232, 226, 213, 0.95);
  border-radius: 14px;
  padding: 8px;
  box-shadow: 0 16px 40px rgba(29, 24, 21, 0.12), 0 2px 8px rgba(0, 0, 0, 0.04);
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: all 0.22s cubic-bezier(0.16, 1, 0.3, 1);
  z-index: 1050;
}

/* Pseudo element bridging hover gap */
.hdr-dropdown-menu::before {
  content: '';
  position: absolute;
  top: -12px;
  left: 0;
  width: 100%;
  height: 12px;
}

.hdr-dropdown:hover .hdr-dropdown-menu,
.hdr-dropdown:focus-within .hdr-dropdown-menu {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  transform: translateX(-50%) translateY(2px);
}

.hdr-dropdown-item {
  display: flex !important;
  flex-direction: column;
  padding: 10px 14px !important;
  border-radius: 10px;
  text-decoration: none;
  transition: background 0.2s ease;
  margin-bottom: 3px;
  position: relative;
}
.hdr-dropdown-item:last-child {
  margin-bottom: 0;
}

.hdr-dropdown-item::after {
  display: none !important;
}

.hdr-dropdown-item:hover {
  background: rgba(194, 139, 56, 0.08);
}

.hdr-dropdown-title {
  font-size: 13.8px;
  font-weight: 700;
  color: var(--text-main);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.hdr-dropdown-item:hover .hdr-dropdown-title {
  color: var(--accent);
}

.hdr-dropdown-desc {
  font-size: 12px;
  color: var(--text-muted);
  margin-top: 3px;
  line-height: 1.4;
  font-weight: 400;
}

.hdr-badge-hot {
  font-size: 10px;
  font-weight: 800;
  padding: 2px 6px;
  border-radius: 4px;
  background: #E07A28;
  color: #fff;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  margin-left: 6px;
}

/* Mobile sublinks */
.mob-menu-parent {
  display: flex;
  flex-direction: column;
}

.mob-sublinks {
  padding-left: 14px;
  margin: 8px 0 4px;
  border-left: 2px solid rgba(194, 139, 56, 0.4);
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.mob-sublinks a {
  font-size: 14.5px !important;
  font-weight: 500 !important;
  padding: 6px 10px !important;
  color: var(--text-muted) !important;
  border-radius: 6px;
  transition: background 0.2s ease;
}

.mob-sublinks a:hover,
.mob-sublinks a.active {
  color: var(--accent) !important;
  background: rgba(194, 139, 56, 0.08) !important;
}

.mob-badge-new {
  font-size: 9.5px;
  font-weight: 800;
  padding: 1px 5px;
  border-radius: 3px;
  background: #E07A28;
  color: #fff;
  margin-left: 6px;
}

.hdr-actions {
  display: flex;
  align-items: center;
  gap: 14px;
}

.btn-primary {
  background: var(--text-main);
  color: var(--bg-card);
  padding: 9px 20px;
  border-radius: var(--radius-full);
  font-weight: 600;
  font-size: 14px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: var(--transition);
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.1);
}

.btn-primary:hover {
  background: var(--accent);
  color: #fff;
  transform: translateY(-1px);
  box-shadow: 0 6px 18px rgba(224, 122, 40, 0.3);
}

body.dark-hdr .btn-primary {
  background: var(--accent);
  color: #fff;
}
body.dark-hdr .btn-primary:hover {
  background: #fff;
  color: var(--bg-dark);
}

.menu-toggle {
  display: none;
  width: 42px;
  height: 42px;
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.04);
  align-items: center;
  justify-content: center;
  cursor: pointer;
}

body.dark-hdr .menu-toggle {
  background: rgba(255, 255, 255, 0.1);
  color: #fff;
}

.menu-toggle svg {
  width: 22px;
  height: 22px;
}

/* ================= MOBILE MENU DRAWER ================= */
.mob-menu {
  position: fixed;
  inset: 0;
  background: rgba(13, 12, 11, 0.6);
  backdrop-filter: blur(6px);
  z-index: 2000;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
}

.mob-menu.open {
  opacity: 1;
  pointer-events: auto;
}

.mob-menu-inner {
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  width: 85%;
  max-width: 380px;
  background: var(--bg-page);
  padding: 30px 24px;
  display: flex;
  flex-direction: column;
  transform: translateX(100%);
  transition: transform 0.34s cubic-bezier(0.16, 1, 0.3, 1);
  box-shadow: var(--shadow-popup);
}

.mob-menu.open .mob-menu-inner {
  transform: translateX(0);
}

.mob-menu-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 32px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--border);
}

.mob-menu-close {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.05);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
}

.mob-menu-links {
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.mob-menu-links a {
  font-size: 18px;
  font-weight: 600;
  color: var(--text-main);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.mob-menu-links a.active {
  color: var(--accent);
}

.mob-menu-bottom {
  margin-top: auto;
  padding-top: 24px;
  border-top: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  gap: 14px;
}

/* ================= TOAST NOTIFICATION ================= */
#siteToast {
  position: fixed;
  bottom: 30px;
  left: 50%;
  transform: translateX(-50%) translateY(100px);
  background: #1A1816;
  color: #fff;
  padding: 12px 24px;
  border-radius: var(--radius-full);
  font-size: 14px;
  font-weight: 500;
  box-shadow: var(--shadow-lg);
  z-index: 9999;
  opacity: 0;
  pointer-events: none;
  transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.3s ease;
  display: flex;
  align-items: center;
  gap: 8px;
}

#siteToast.show {
  transform: translateX(-50%) translateY(0);
  opacity: 1;
}

/* ================= FOOTER ================= */
#siteFtr {
  background: #11100F;
  color: #DDD8D0;
  padding: 70px 24px 30px;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
}

.ftr-wrap {
  max-width: 1320px;
  margin: 0 auto;
}

.ftr-grid {
  display: grid;
  grid-template-columns: 1.6fr 1fr 1fr 1fr;
  gap: 48px;
  margin-bottom: 50px;
}

.ftr-brand p.claim {
  font-size: 14px;
  color: #9E988F;
  margin-top: 14px;
  line-height: 1.7;
  max-width: 320px;
}

.ftr-contact-list {
  margin-top: 18px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  font-size: 13.5px;
  color: #B5AFA6;
}

.ftr-contact-list a:hover {
  color: var(--accent);
}

.ftr-col h4 {
  font-size: 14px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: #FFFFFF;
  margin-bottom: 20px;
}

.ftr-links {
  display: flex;
  flex-direction: column;
  gap: 12px;
  font-size: 14px;
  color: #9E988F;
}

.ftr-links a {
  transition: var(--transition);
}

.ftr-links a:hover {
  color: var(--accent);
  padding-left: 4px;
}

.ftr-bottom {
  padding-top: 28px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 13px;
  color: #7A746B;
}

.ftr-bottom a {
  color: #A39D94;
}
.ftr-bottom a:hover {
  color: var(--accent);
}

/* ================= MOBILE BOTTOM CTA ================= */
.mcta {
  display: none;
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  padding: 12px 16px;
  background: rgba(247, 243, 236, 0.95);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-top: 1px solid var(--border);
  z-index: 900;
  box-shadow: 0 -4px 16px rgba(0, 0, 0, 0.05);
}

.mcta .btn-primary {
  width: 100%;
  justify-content: center;
  padding: 13px 20px;
  font-size: 15px;
}

@media (max-width: 992px) {
  .hdr-nav {
    display: none;
  }
  .menu-toggle {
    display: flex;
  }
  .ftr-grid {
    grid-template-columns: 1fr 1fr;
    gap: 36px;
  }
}

@media (max-width: 640px) {
  :root {
    --header-h: 60px;
  }
  .logo-img {
    height: 32px;
  }
  .ftr-grid {
    grid-template-columns: 1fr;
    gap: 32px;
  }
  .ftr-bottom {
    flex-direction: column;
    gap: 12px;
    text-align: center;
  }
  .mcta {
    display: block;
  }
  body[data-page="thu-vien"] {
    padding-bottom: 74px;
  }
}
