/* ============================================================
   10XStrategy — shared.css
   Dùng chung cho TẤT CẢ trang trong website.
   Include vào mỗi trang: <link rel="stylesheet" href="../shared.css">
   (hoặc "shared.css" nếu trang nằm cùng thư mục gốc)

   Brand Colors:
     Green  : #009F4D
     Blue   : #0077C8
     Red    : #E4002B
============================================================ */

/* ============================================================
   1. TOKENS
============================================================ */
:root {
  --green:       #009F4D;
  --green-light: #00C45E;
  --green-dark:  #007A3A;
  --blue:        #0077C8;
  --blue-light:  #0091F0;
  --blue-dark:   #005A96;
  --red:         #E4002B;
  --red-light:   #FF1A42;

  --navy:        #0A1628;
  --navy-mid:    #0F2040;
  --white:       #FFFFFF;
  --bg:          #F4F7FB;
  --text:        #1A2B45;
  --text-muted:  #5E7491;
  --border:      #DDE4EE;

  --shadow-sm: 0 1px 4px rgba(10,22,40,.07);
  --shadow-md: 0 4px 18px rgba(10,22,40,.10);
  --shadow-lg: 0 10px 40px rgba(10,22,40,.14);

  --r-sm:   8px;
  --r-md:   14px;
  --r-full: 9999px;
  --t:      .25s cubic-bezier(.4,0,.2,1);
}

/* ============================================================
   2. SHARED NAVBAR
============================================================ */
.sh-navbar {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 1000;
  background: rgba(10,22,40,.95);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid rgba(255,255,255,.07);
  transition: background var(--t), box-shadow var(--t);
  font-family: 'Inter', system-ui, sans-serif;
}
.sh-navbar.scrolled {
  background: rgba(10,22,40,.99);
  box-shadow: 0 2px 24px rgba(0,0,0,.3);
}

.sh-nav-inner {
  max-width: 1180px;
  margin: 0 auto;
  padding: 0 24px;
  display: flex;
  align-items: center;
  height: 64px;
}

/* Logo */
.sh-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 800;
  font-size: 1.05rem;
  color: #fff;
  text-decoration: none;
  flex: 1;
}
.sh-logo-icon {
  width: 34px; height: 34px;
  background: linear-gradient(135deg, var(--green), var(--blue));
  border-radius: 8px;
  display: flex; align-items: center; justify-content: center;
  color: #fff;
  font-size: .85rem;
  flex-shrink: 0;
}
.sh-logo span { color: var(--green-light); }

/* Desktop links — centred via equal flex on logo + right section */
.sh-nav-links {
  display: flex;
  align-items: center;
  gap: 10px;
  list-style: none;
  margin: 0; padding: 0;
  flex: none;
}
.sh-nav-links a {
  color: rgba(255,255,255,.72);
  font-size: .76rem;
  font-weight: 500;
  text-decoration: none;
  transition: color var(--t);
  white-space: nowrap;
}
.sh-nav-links a:hover,
.sh-nav-links a.active { color: var(--green-light); }

/* Right section wrapper */
.sh-nav-right {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
}

/* CTA button */
.sh-nav-cta {
  display: inline-flex;
  align-items: center;
  background: linear-gradient(135deg, var(--red), var(--red-light));
  color: #fff;
  font-weight: 700;
  font-size: .82rem;
  padding: 9px 18px;
  border-radius: var(--r-full);
  text-decoration: none;
  white-space: nowrap;
  transition: transform var(--t), box-shadow var(--t);
  box-shadow: 0 3px 12px rgba(228,0,43,.3);
}
.sh-nav-cta:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(228,0,43,.45);
  color: #fff;
}
.sh-nav-login {
  display: inline-flex;
  align-items: center;
  color: rgba(255,255,255,.85);
  font-weight: 700;
  font-size: .82rem;
  padding: 8px 16px;
  border-radius: var(--r-full);
  border: 1.5px solid rgba(255,255,255,.28);
  text-decoration: none;
  white-space: nowrap;
  transition: background var(--t), color var(--t);
}
.sh-nav-login:hover {
  background: rgba(255,255,255,.12);
  color: #fff;
}

/* Breadcrumb strip (optional, shown on sub-pages) */
.sh-breadcrumb {
  background: var(--navy);
  padding: 10px 0;
  margin-top: 64px;
  font-family: 'Inter', system-ui, sans-serif;
}
.sh-breadcrumb-inner {
  max-width: 1180px;
  margin: 0 auto;
  padding: 0 24px;
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: .78rem;
  color: rgba(255,255,255,.45);
}
.sh-breadcrumb-inner a {
  color: rgba(255,255,255,.45);
  text-decoration: none;
  transition: color var(--t);
}
.sh-breadcrumb-inner a:hover { color: var(--green-light); }
.sh-breadcrumb-inner .sep { opacity: .4; }
.sh-breadcrumb-inner .current { color: rgba(255,255,255,.75); font-weight: 600; }

/* Hamburger */
.sh-hamburger {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px;
}
.sh-hamburger span {
  display: block;
  width: 24px; height: 2px;
  background: #fff;
  border-radius: 2px;
  transition: var(--t);
}
.sh-hamburger.active span:nth-child(1) { transform: rotate(45deg) translate(5px,5px); }
.sh-hamburger.active span:nth-child(2) { opacity: 0; }
.sh-hamburger.active span:nth-child(3) { transform: rotate(-45deg) translate(5px,-5px); }

/* ============================================================
   3. MOBILE NAV
============================================================ */
.sh-mobile-nav {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 1100;
  pointer-events: none;
  font-family: 'Inter', system-ui, sans-serif;
}
.sh-mobile-nav.open { pointer-events: all; }

.sh-mobile-overlay {
  position: absolute; inset: 0;
  background: rgba(0,0,0,.6);
  opacity: 0;
  transition: opacity var(--t);
}
.sh-mobile-nav.open .sh-mobile-overlay { opacity: 1; }

.sh-mobile-drawer {
  position: absolute;
  top: 0; right: 0;
  width: min(300px,85vw);
  height: 100%;
  background: var(--navy);
  padding: 24px 20px;
  transform: translateX(100%);
  transition: transform .3s cubic-bezier(.4,0,.2,1);
  border-left: 1px solid rgba(255,255,255,.08);
  overflow-y: auto;
}
.sh-mobile-nav.open .sh-mobile-drawer { transform: translateX(0); }

.sh-mobile-close {
  background: none; border: none;
  color: rgba(255,255,255,.55);
  font-size: 1.3rem;
  display: flex; justify-content: flex-end;
  width: 100%; margin-bottom: 24px; cursor: pointer;
}

.sh-mobile-links { list-style: none; margin: 0; padding: 0; }
.sh-mobile-links li a {
  display: block;
  color: rgba(255,255,255,.75);
  font-size: .92rem;
  font-weight: 500;
  padding: 12px 0;
  border-bottom: 1px solid rgba(255,255,255,.06);
  text-decoration: none;
  transition: color var(--t);
}
.sh-mobile-links li a:hover { color: var(--green-light); }

/* ============================================================
   4. SHARED FOOTER
============================================================ */
.sh-footer {
  background: #060D1F;
  padding: 48px 0 24px;
  border-top: 1px solid rgba(255,255,255,.05);
  font-family: 'Inter', system-ui, sans-serif;
}

.sh-footer-inner {
  max-width: 1180px;
  margin: 0 auto;
  padding: 0 24px;
}

.sh-footer-top {
  display: grid;
  grid-template-columns: 1.6fr 1fr 1fr 1fr;
  gap: 36px;
  margin-bottom: 36px;
}

.sh-footer-brand-name {
  display: flex; align-items: center;
  gap: 8px; font-size: .98rem;
  font-weight: 800; color: #fff;
  margin-bottom: 10px;
}
.sh-footer-brand-icon {
  width: 28px; height: 28px;
  background: linear-gradient(135deg, var(--green), var(--blue));
  border-radius: 6px;
  display: flex; align-items: center; justify-content: center;
  color: #fff; font-size: .78rem; flex-shrink: 0;
}
.sh-footer-brand-name span { color: var(--green-light); }

.sh-footer-desc {
  font-size: .8rem;
  color: rgba(255,255,255,.4);
  line-height: 1.7;
  margin-bottom: 16px;
}

.sh-footer-col-title {
  font-size: .71rem;
  font-weight: 700;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: rgba(255,255,255,.36);
  margin-bottom: 14px;
}

.sh-footer-links { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 9px; }
.sh-footer-links a {
  font-size: .81rem;
  color: rgba(255,255,255,.5);
  text-decoration: none;
  transition: color var(--t);
}
.sh-footer-links a:hover { color: var(--green-light); }

.sh-footer-bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 20px;
  border-top: 1px solid rgba(255,255,255,.06);
  flex-wrap: wrap;
  gap: 10px;
}
.sh-footer-copy {
  font-size: .75rem;
  color: rgba(255,255,255,.26);
}
.sh-footer-copy a { color: var(--green-light); text-decoration: none; }

/* ============================================================
   5. BACK-TO-TOP + TOAST (shared)
============================================================ */
.sh-back-top {
  position: fixed;
  bottom: 26px; right: 26px;
  width: 42px; height: 42px;
  background: linear-gradient(135deg, var(--green), var(--blue));
  color: #fff; border: none; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 1rem; cursor: pointer;
  box-shadow: 0 4px 14px rgba(0,159,77,.35);
  opacity: 0; transform: translateY(20px);
  transition: opacity var(--t), transform var(--t);
  z-index: 900;
}
.sh-back-top.visible { opacity: 1; transform: translateY(0); }
.sh-back-top:hover { transform: translateY(-3px); }

.sh-toast {
  position: fixed;
  bottom: 26px; left: 50%;
  transform: translateX(-50%) translateY(60px);
  background: var(--navy);
  color: #fff;
  padding: 11px 22px;
  border-radius: var(--r-full);
  font-size: .83rem; font-weight: 600;
  box-shadow: var(--shadow-lg);
  border: 1px solid rgba(255,255,255,.1);
  z-index: 1100; opacity: 0;
  white-space: nowrap;
  transition: transform .38s cubic-bezier(.34,1.56,.64,1), opacity .3s ease;
  pointer-events: none;
  font-family: 'Inter', system-ui, sans-serif;
}
.sh-toast.show { transform: translateX(-50%) translateY(0); opacity: 1; }

/* ============================================================
   6. RESPONSIVE
============================================================ */
@media (max-width: 768px) {
  .sh-nav-links, .sh-nav-cta, .sh-nav-login { display: none; }
  .sh-hamburger { display: flex; }
  .sh-mobile-nav { display: block; }
  .sh-nav-right { gap: 6px; }
  .sh-footer-top { grid-template-columns: 1fr 1fr; gap: 24px; }
  .sh-footer-bottom { flex-direction: column; align-items: center; text-align: center; }
  /* User dropdown: ẩn email, chỉ hiện avatar */
  .nav-user__name, .nav-user__chevron { display: none; }
  .nav-user__trigger { padding: 4px; border-radius: 50%; }
}
@media (max-width: 480px) {
  .sh-footer-top { grid-template-columns: 1fr; }
}

/* ============================================================
   NAV USER DROPDOWN (dùng chung cho shared-nav.js)
============================================================ */
.nav-user { position: relative; }
.nav-user__trigger {
  display: flex; align-items: center; gap: 8px;
  background: rgba(255,255,255,.1); border: 1px solid rgba(255,255,255,.18);
  border-radius: 9999px; padding: 6px 14px 6px 6px;
  cursor: pointer; color: #fff; font-size: .84rem; font-weight: 600;
  transition: background .25s, border-color .25s;
}
.nav-user__trigger:hover { background: rgba(255,255,255,.18); border-color: rgba(255,255,255,.32); }
.nav-user__avatar {
  width: 30px; height: 30px; border-radius: 50%;
  background: linear-gradient(135deg, #009F4D, #00C45E);
  color: #fff; font-size: .8rem; font-weight: 800;
  display: flex; align-items: center; justify-content: center; flex-shrink: 0;
}
.nav-user__name { max-width: 140px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.nav-user__chevron { flex-shrink: 0; opacity: .7; transition: transform .25s; }
.nav-user__trigger[aria-expanded="true"] .nav-user__chevron { transform: rotate(180deg); }
.nav-user__dropdown {
  position: absolute; top: calc(100% + 10px); right: 0;
  background: #fff; border: 1px solid #DDE4EE; border-radius: 14px;
  box-shadow: 0 10px 40px rgba(10,22,40,.14); min-width: 200px; overflow: hidden;
  opacity: 0; visibility: hidden; transform: translateY(-8px);
  transition: opacity .25s, visibility .25s, transform .25s; z-index: 1100;
}
.nav-user__dropdown.open { opacity: 1; visibility: visible; transform: translateY(0); }
.nav-user__dd-item {
  display: flex; align-items: center; gap: 8px; padding: 12px 18px;
  color: #1A2B45; font-size: .88rem; font-weight: 500;
  width: 100%; text-align: left; background: none; border: none;
  cursor: pointer; transition: background .25s; text-decoration: none;
}
.nav-user__dd-item:hover { background: #F4F7FB; }
.nav-user__dd-item + .nav-user__dd-item { border-top: 1px solid #DDE4EE; }
.nav-user__signout { color: #E4002B; }
.nav-user__signout:hover { background: #FFF0F3; }

/* ============================================================
   7. HOMEPAGE-STYLE FOOTER (shared across library pages)
============================================================ */
.footer {
  background: #060D1F;
  padding: 52px 0 28px;
  border-top: 1px solid rgba(255,255,255,.05);
}
.footer .container {
  max-width: 1180px;
  margin: 0 auto;
  padding: 0 24px;
}
.footer__top {
  display: grid;
  grid-template-columns: 1.6fr 1fr 1fr 1fr;
  gap: 40px;
  margin-bottom: 44px;
}
.footer__brand-name {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 1rem;
  font-weight: 800;
  color: #fff;
  margin-bottom: 12px;
}
.footer__brand-icon {
  width: 30px; height: 30px;
  background: linear-gradient(135deg, var(--green), var(--blue));
  border-radius: 6px;
  display: flex; align-items: center; justify-content: center;
  color: #fff;
  flex-shrink: 0;
}
.footer__brand-name span { color: var(--green-light); }
.footer__brand-desc {
  font-size: .81rem;
  color: rgba(255,255,255,.42);
  line-height: 1.7;
  margin-bottom: 18px;
}
.footer__social { display: flex; gap: 8px; }
.footer__social-link {
  width: 34px; height: 34px;
  border-radius: 8px;
  background: rgba(255,255,255,.06);
  border: 1px solid rgba(255,255,255,.1);
  display: flex; align-items: center; justify-content: center;
  color: rgba(255,255,255,.5);
  transition: background var(--t), color var(--t), border-color var(--t);
  text-decoration: none;
}
.footer__social-link:hover {
  background: var(--green);
  color: #fff;
  border-color: var(--green);
}
.footer__col-title {
  font-size: .73rem;
  font-weight: 700;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: rgba(255,255,255,.38);
  margin-bottom: 16px;
}
.footer__links { display: flex; flex-direction: column; gap: 10px; list-style: none; padding: 0; margin: 0; }
.footer__links a {
  font-size: .82rem;
  color: rgba(255,255,255,.85);
  transition: color var(--t);
  text-decoration: none;
}
.footer__links a:hover { color: var(--green-light); }
.footer__bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 24px;
  border-top: 1px solid rgba(255,255,255,.06);
  flex-wrap: wrap;
  gap: 12px;
}
.footer__copy { font-size: .77rem; color: rgba(255,255,255,.28); }
.footer__copy a { color: var(--green-light); transition: opacity var(--t); }
.footer__copy a:hover { opacity: .7; }
.footer__bottom-links { display: flex; gap: 18px; }
.footer__bottom-links a {
  font-size: .74rem;
  color: rgba(255,255,255,.28);
  transition: color var(--t);
  text-decoration: none;
}
.footer__bottom-links a:hover { color: rgba(255,255,255,.55); }
@media (max-width: 860px) {
  .footer__top { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 520px) {
  .footer__top { grid-template-columns: 1fr; }
}
