/* ============================================================
   LUNA ENGLISH V2 — LAYOUT SHELL
   Header kính mờ, thanh điều hướng, Footer,
   Nút liên hệ nổi / Mobile Bottom Bar & Chatbot 2.0
   ============================================================ */

/* ---------- Top Announcement / Trust Strip ---------- */
.top-strip {
  background-color: var(--purple-deep);
  color: var(--on-dark-muted);
  font-size: 0.84rem;
  padding: 7px 0;
  border-bottom: 1px solid rgba(253, 251, 254, 0.12);
}

.top-strip-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}

.top-strip-item {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.top-strip a {
  color: var(--mango);
  font-weight: 700;
}

.top-strip a:hover {
  text-decoration: underline;
}

@media (max-width: 760px) {
  .top-strip {
    font-size: 0.77rem;
    padding: 5px 0;
  }
  .top-strip-hide-sm {
    display: none;
  }
  .top-strip-inner {
    justify-content: center;
    text-align: center;
    gap: 6px;
  }
}

/* ---------- Sticky Header ---------- */
header.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background-color: rgba(253, 251, 254, 0.94);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--line);
  transition: box-shadow 0.2s ease;
}

header.site-header.scrolled {
  box-shadow: var(--shadow-sm);
}

.nav {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 0;
  position: relative;
}

.logo {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: var(--title);
  font-weight: 700;
  font-size: 1.3rem;
  color: var(--purple);
  flex-shrink: 0;
}

.logo-img {
  height: 44px;
  width: auto;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 2px;
  margin-left: 8px;
  flex: 1;
  flex-wrap: wrap;
}

.nav-links a {
  padding: 8px 11px;
  border-radius: 10px;
  font-weight: 600;
  font-size: 0.93rem;
  color: var(--ink-soft);
  white-space: nowrap;
  position: relative;
}

.nav-links a:hover {
  background-color: var(--purple-soft);
  color: var(--purple);
}

.nav-links a.active {
  background-color: var(--purple-soft);
  color: var(--purple);
  font-weight: 700;
}

.nav-links a.active::after {
  content: '';
  position: absolute;
  bottom: 4px;
  left: 12px;
  right: 12px;
  height: 2.5px;
  border-radius: 99px;
  background-color: var(--pink);
}

.nav-cta {
  display: flex;
  gap: 8px;
  align-items: center;
  flex-shrink: 0;
}

.nav-links .mobile-menu-actions {
  display: none;
}

.nav-mobile-right {
  display: none;
}

.hamburger {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--purple-soft);
  border: 1.5px solid var(--line-strong);
  font-size: 1.45rem;
  line-height: 0;
  color: var(--purple);
  cursor: pointer;
  padding: 8px 10px;
  border-radius: 12px;
}

@media (max-width: 1100px) {
  .nav-cta {
    display: none;
  }
  .nav-mobile-right {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin-left: auto;
  }
  .nav-mobile-cta {
    padding: 7px 13px;
    min-height: 38px;
    font-size: 0.85rem;
  }
  .logo-img {
    height: 38px;
  }
  .nav-links {
    display: none;
    position: absolute;
    top: calc(100% + 1px);
    left: -4vw;
    right: -4vw;
    background-color: var(--surface);
    border-bottom: 2px solid var(--purple);
    box-shadow: var(--shadow-lg);
    padding: 14px 4vw 18px;
    gap: 8px;
    max-height: calc(100dvh - 64px);
    overflow-y: auto;
  }
  .nav-links.open {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .nav-links a {
    padding: 11px 12px;
    font-size: 0.93rem;
    background-color: var(--surface-alt);
    border: 1px solid var(--line);
    border-radius: 12px;
    text-align: center;
  }
  .nav-links a.active {
    background-color: var(--purple);
    color: var(--on-dark);
    border-color: var(--purple);
  }
  .nav-links a.active::after {
    display: none;
  }
  .nav-links .mobile-menu-actions {
    grid-column: 1 / -1;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
    margin-top: 4px;
    padding-top: 10px;
    border-top: 1px solid var(--line);
  }
  .nav-links .mobile-menu-actions a {
    background-color: var(--mango);
    color: var(--purple-deep);
    border-color: transparent;
  }
  .nav-links .mobile-menu-actions a.btn-soft {
    background-color: var(--purple-soft);
    color: var(--purple);
    border-color: var(--purple-tint);
  }
}

/* ---------- Program Quick Subbar (cho các trang Chương trình) ---------- */
.prog-subnav {
  background-color: var(--surface);
  border-bottom: 1px solid var(--line);
  padding: 9px 0;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}

.prog-subnav::-webkit-scrollbar {
  display: none;
}

.prog-subnav-inner {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: max-content;
}

.prog-subnav a {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 14px;
  border-radius: var(--radius-pill);
  font-size: 0.86rem;
  font-weight: 700;
  color: var(--muted);
  background-color: var(--surface-alt);
  border: 1px solid var(--line);
}

.prog-subnav a:hover {
  color: var(--purple);
  border-color: var(--purple);
}

.prog-subnav a.active {
  background-color: var(--purple);
  color: var(--on-dark);
  border-color: var(--purple);
}

/* ---------- Footer ---------- */
footer.site-footer {
  background: linear-gradient(165deg, var(--purple-deep) 0%, var(--purple) 100%);
  color: var(--on-dark-muted);
  padding: 64px 0 96px;
  margin-top: 40px;
  border-top: 4px solid var(--mango);
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.35fr 0.95fr 0.95fr 1.25fr;
  gap: 32px;
}

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

@media (max-width: 580px) {
  .footer-grid {
    grid-template-columns: 1fr;
  }
  footer.site-footer {
    padding-bottom: 118px;
  }
}

.site-footer h4 {
  color: var(--on-dark);
  margin-bottom: 14px;
  font-size: 1.08rem;
}

.site-footer a:hover {
  color: var(--mango);
  text-decoration: underline;
}

.footer-links {
  list-style: none;
  padding: 0;
  display: grid;
  gap: 9px;
  font-size: 0.94rem;
}

.footer-logo-chip {
  background-color: var(--surface);
  border-radius: 14px;
  padding: 8px 14px;
  display: inline-block;
  margin-bottom: 14px;
}

.footer-logo-chip img {
  height: 40px;
}

.footer-note {
  font-size: 0.9rem;
  line-height: 1.68;
}

.footer-contact-cards {
  display: grid;
  gap: 8px;
  margin-top: 14px;
}

.footer-contact-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 14px;
  border-radius: var(--radius-sm);
  background: rgba(253, 251, 254, 0.1);
  border: 1px solid rgba(253, 251, 254, 0.18);
  color: var(--on-dark);
  font-size: 0.9rem;
  font-weight: 600;
  width: fit-content;
}

.footer-contact-pill:hover {
  background: rgba(253, 251, 254, 0.18);
  text-decoration: none !important;
}

.newsletter-box {
  background: rgba(253, 251, 254, 0.08);
  border: 1px solid rgba(253, 251, 254, 0.16);
  border-radius: var(--radius);
  padding: 18px;
}

.newsletter-row {
  display: flex;
  gap: 8px;
  margin-top: 10px;
}

.newsletter-row input {
  flex: 1;
  min-width: 0;
  padding: 10px 14px;
  border-radius: var(--radius-pill);
  border: 1.5px solid transparent;
  background-color: var(--surface);
  color: var(--ink);
  font-family: var(--body);
  font-size: 0.92rem;
}

.newsletter-msg {
  font-size: 0.85rem;
  color: var(--mango);
  margin-top: 8px;
  min-height: 1.2em;
}

.footer-bottom {
  border-top: 1px solid rgba(253, 251, 254, 0.18);
  margin-top: 38px;
  padding-top: 20px;
  font-size: 0.85rem;
  color: rgba(253, 251, 254, 0.68);
  display: flex;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}

/* ---------- Floating Contact Dock & Mobile Bottom Bar ---------- */
.floating-contact {
  position: fixed;
  left: 16px;
  bottom: 16px;
  z-index: 200;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.float-btn {
  height: 50px;
  padding: 0 16px;
  border-radius: var(--radius-pill);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-family: var(--title);
  font-weight: 700;
  font-size: 0.95rem;
  color: var(--on-dark);
  box-shadow: var(--shadow);
  transition: transform 0.16s ease, box-shadow 0.2s ease;
}

.float-btn:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-lg);
}

.float-call {
  background-color: var(--green-ink);
}


.float-route {
  background-color: var(--purple);
  border: 1.5px solid var(--mango);
}

@media (max-width: 720px) {
  .floating-contact {
    left: 0;
    right: 0;
    bottom: 0;
    flex-direction: row;
    gap: 8px;
    padding: 8px 76px 8px 12px;
    padding-bottom: calc(8px + env(safe-area-inset-bottom));
    background-color: var(--surface);
    border-top: 1px solid var(--line);
    box-shadow: 0 -6px 20px rgba(62, 26, 81, 0.1);
  }
  .float-btn {
    flex: 1;
    height: 46px;
    padding: 0 10px;
    font-size: 0.92rem;
    box-shadow: none;
  }
  .float-btn:hover {
    transform: none;
  }
  .float-route {
    display: none;
  }
}

/* ---------- Chatbot Trợ lý ảo Luna 2.0 ---------- */
.chatbot-fab {
  position: fixed;
  right: 16px;
  bottom: 16px;
  z-index: 210;
  height: 58px;
  padding: 0 18px;
  border-radius: var(--radius-pill);
  border: 2px solid var(--purple);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  background-color: var(--mango);
  color: var(--purple-deep);
  font-family: var(--title);
  font-weight: 700;
  font-size: 0.96rem;
  box-shadow: var(--shadow);
  transition: transform 0.16s ease, box-shadow 0.2s ease;
}

.chatbot-fab:hover {
  transform: translateY(-2px) scale(1.03);
  box-shadow: var(--shadow-lg);
}

.chatbot-fab .fab-label {
  display: inline;
}

.chatbot-panel {
  position: fixed;
  right: 16px;
  bottom: 84px;
  z-index: 215;
  width: min(400px, calc(100% - 32px));
  height: min(560px, calc(100vh - 110px));
  height: min(560px, calc(100dvh - 110px));
  background-color: var(--surface);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  display: none;
  flex-direction: column;
  overflow: hidden;
  border: 1.5px solid var(--line-strong);
}

.chatbot-panel.open {
  display: flex;
}

@media (max-width: 720px) {
  .chatbot-fab {
    width: 52px;
    height: 48px;
    padding: 0;
    border-radius: 50%;
    bottom: calc(7px + env(safe-area-inset-bottom));
    right: 12px;
  }
  .chatbot-fab .fab-label {
    display: none;
  }
  .chatbot-panel {
    right: 8px;
    bottom: 72px;
    width: calc(100% - 16px);
  }
}

.chatbot-head {
  background: linear-gradient(135deg, var(--purple-deep), var(--purple-2));
  color: var(--on-dark);
  padding: 14px 18px;
  display: flex;
  align-items: center;
  gap: 10px;
}

.chatbot-head .bot-avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background-color: var(--mango);
  color: var(--purple-deep);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
  flex-shrink: 0;
}

.chatbot-head h4 {
  color: var(--on-dark);
  font-size: 1.02rem;
  margin: 0;
}

.chatbot-head small {
  color: var(--on-dark-muted);
  font-size: 0.78rem;
  display: block;
}

.chatbot-close {
  margin-left: auto;
  background: rgba(253, 251, 254, 0.14);
  border: none;
  color: var(--on-dark);
  font-size: 1.2rem;
  line-height: 0;
  cursor: pointer;
  padding: 8px;
  border-radius: 10px;
}

.chatbot-close:hover {
  background: rgba(253, 251, 254, 0.26);
}

.chatbot-body {
  flex: 1;
  overflow-y: auto;
  padding: 14px;
  background-color: var(--surface-alt);
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.chat-msg {
  max-width: 88%;
  padding: 11px 14px;
  border-radius: 16px;
  font-size: 0.92rem;
  line-height: 1.56;
  white-space: pre-line;
}

.chat-msg.bot {
  background-color: var(--surface);
  border: 1px solid var(--line);
  border-bottom-left-radius: 4px;
  align-self: flex-start;
  box-shadow: var(--shadow-xs);
}

.chat-msg.user {
  background-color: var(--purple);
  color: var(--on-dark);
  border-bottom-right-radius: 4px;
  align-self: flex-end;
}

.chat-msg a {
  color: var(--blue-ink);
  font-weight: 700;
  text-decoration: underline;
}

.chat-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  align-self: flex-start;
}

.chat-chips button {
  background-color: var(--surface);
  color: var(--purple);
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-pill);
  padding: 6px 12px;
  font-size: 0.81rem;
  font-family: var(--body);
  font-weight: 700;
  cursor: pointer;
  transition: background-color 0.15s ease, border-color 0.15s ease;
}

.chat-chips button:hover {
  background-color: var(--mango-soft);
  border-color: var(--mango-ink);
}

.chatbot-quick-actions {
  display: flex;
  gap: 6px;
  padding: 8px 12px;
  background-color: var(--purple-soft);
  border-top: 1px solid var(--line);
  overflow-x: auto;
}

.chatbot-quick-actions a {
  font-size: 0.78rem;
  font-weight: 700;
  padding: 5px 10px;
  border-radius: var(--radius-pill);
  background-color: var(--surface);
  color: var(--purple);
  border: 1px solid var(--line);
  white-space: nowrap;
}

.chatbot-quick-actions a:hover {
  background-color: var(--purple);
  color: var(--on-dark);
}

.chatbot-input {
  display: flex;
  gap: 8px;
  padding: 10px;
  border-top: 1px solid var(--line);
  background-color: var(--surface);
}

.chatbot-input input {
  flex: 1;
  min-width: 0;
  border: 1.5px solid var(--field-edge);
  border-radius: var(--radius-pill);
  padding: 10px 16px;
  font-family: var(--body);
  font-size: 0.92rem;
  background-color: var(--surface);
}

.chatbot-input button {
  background-color: var(--purple);
  color: var(--on-dark);
  border: none;
  border-radius: 50%;
  width: 42px;
  height: 42px;
  cursor: pointer;
  font-size: 1rem;
  display: flex;
  align-items: center;
  justify-content: center;
  flex: none;
}

.chatbot-input button:hover {
  background-color: var(--purple-2);
}
