/* ============================================================
   global.css
   Dùng chung cho toàn bộ website — Vietnam Unlock
   Bao gồm: Variables · Reset · Header · Hamburger ·
            Mobile Nav · Footer · Responsive (shared)
   ============================================================ */


/* ── SECTION: CSS CUSTOM PROPERTIES (Design Tokens) ──────── */
:root {
  --olive: #3D4A2D;
  --olive-badge: #4A5240;
  --cream: #F2EDE0;
  --cream-light: #FAF7F2;
  --gold: #C8960C;
  --amber: #D4960A;
  --near-black: #1F1A14;
  --white: #ffffff;
}


/* ── SECTION: RESET & BASE BODY ──────────────────────────── */
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: 'Inter', sans-serif;
  background-color: var(--cream);
  /* Override per-page nếu cần */
  color: var(--near-black);
  line-height: 1.7;
  overflow-x: hidden;
}


/* ── SECTION: SITE HEADER (sticky — mặc định cho tất cả page trừ index) */
header#site-header {
  position: sticky;
  top: 0;
  z-index: 200;
  background: var(--olive);
  box-shadow: 0 2px 20px rgba(0, 0, 0, 0.3);
  transition: background 0.4s ease;
}

.header-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 18px 50px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  transition: padding 0.4s ease;
}

/* Logo */
.logo {
  font-family: 'Playfair Display', serif;
  font-weight: 700;
  font-size: 26px;
  color: var(--gold);
  text-decoration: none;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  display: flex;
  align-items: center;
}

/* Logo image — khi dùng Custom Logo qua WP Customizer */
.logo img,
.custom-logo-link img,
.custom-logo {
  display: block !important;
  height: 30px !important;
  width: auto !important;
  max-width: none !important;
  filter: brightness(0) invert(1);
  transition: opacity 0.2s;
}

.custom-logo-link {
  display: flex;
  align-items: center;
  line-height: 1;
}

.custom-logo-link:hover img {
  opacity: 0.8;
}

@media (max-width: 900px) {
  .logo img,
  .custom-logo-link img,
  .custom-logo {
    height: 24px !important;
  }
}

/* Desktop nav links */
nav {
  display: flex;
  gap: 15px;
  align-items: center;
}

/* Desktop nav: mỗi item bọc trong .nav-item để có relative positioning */
nav .nav-item {
  position: relative;
  display: inline-flex;
  align-items: center;
}

nav .nav-link {
  color: var(--white);
  text-decoration: none;
  font-size: 14px;
  font-weight: 400;
  transition: color 0.2s;
  opacity: 0.85;
  padding: 4px 0;
}

nav .nav-link:hover,
nav .nav-link.active {
  color: var(--gold);
  opacity: 1;
}

/* Mũi tên nhỏ cho item có dropdown */
nav .has-dropdown > .nav-link::after {
  content: ' ▾';
  font-size: 10px;
  opacity: 0.6;
  margin-left: 2px;
}

/* ── DROPDOWN BOX ── */
nav .nav-dropdown {
  position: absolute;
  top: 100%;
  left: 0;
  min-width: 180px;
  background: var(--white);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15);
  border-radius: 6px;
  padding: 12px 0;
  display: flex;
  flex-direction: column;
  opacity: 0;
  visibility: hidden;
  transform: translateY(10px);
  transition: all 0.3s ease;
  z-index: 300;
  margin-top: 10px;
}

/* Hiện khi hover */
nav .nav-item:hover .nav-dropdown {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

/* Tạo vùng đệm để hover không bị tắt khi di chuyển từ link xuống box */
nav .nav-item::after {
  content: '';
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  height: 15px;
}

nav .dropdown-link {
  color: var(--near-black);
  text-decoration: none;
  font-size: 14px;
  padding: 8px 20px;
  transition: all 0.2s;
  white-space: nowrap;
}

nav .dropdown-link:hover {
  background: var(--cream-light);
  color: var(--amber);
  padding-left: 24px;
}

/* Dấu phân cách giữa các nav link */
nav .sep {
  color: rgba(255, 255, 255, 0.4);
  font-size: 14px;
  padding: 0 4px;
  font-weight: 300;
}


/* ── SECTION: HAMBURGER BUTTON (mobile) ───────────────────── */
.hamburger {
  display: none;
  /* Ẩn trên desktop, hiện trên mobile */
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 36px;
  height: 36px;
  cursor: pointer;
  background: none;
  border: none;
  padding: 4px;
  z-index: 200;
}

.hamburger span {
  display: block;
  width: 100%;
  height: 2px;
  background: var(--white);
  border-radius: 2px;
  transition: transform 0.3s ease, opacity 0.3s ease;
  transform-origin: center;
}

/* Animation: hamburger → X khi menu mở */
.hamburger.active span:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}
.hamburger.active span:nth-child(2) {
  opacity: 0;
}
.hamburger.active span:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

/* Animation: hamburger → back arrow (ghi đè X) */
.hamburger.active.is-back span:nth-child(1) {
  transform-origin: left center;
  transform: translateY(7px) rotate(-45deg) scaleX(0.6);
}
.hamburger.active.is-back span:nth-child(2) {
  opacity: 1;
  transform: scaleX(1);
}
.hamburger.active.is-back span:nth-child(3) {
  transform-origin: left center;
  transform: translateY(-7px) rotate(45deg) scaleX(0.6);
}


/* ── SECTION: MOBILE NAV DRAWER (full-screen overlay) ─────── */
.mobile-nav {
  display: none;
  /* Chỉ hiện khi JS thêm class .open */
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: var(--olive);
  z-index: 150;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 32px;
  opacity: 0;
  transform: translateY(-12px);
  transition: opacity 0.3s ease, transform 0.3s ease;
  pointer-events: none;
}

.mobile-nav.open {
  opacity: 1;
  transform: translateY(0);
  pointer-events: all;
}

/* Reset structure cho mobile */
.mobile-nav .nav-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  width: 100%; /* Đảm bảo item chiếm hết chiều ngang để dropdown bám theo chuẩn */
  position: relative;
}

.mobile-nav .nav-link,
.mobile-nav a {
  color: var(--cream);
  text-decoration: none;
  font-family: 'Playfair Display', serif;
  font-size: 28px;
  font-weight: 700;
  transition: color 0.2s;
  text-align: center;
}

.mobile-nav .nav-link:hover,
.mobile-nav a:hover {
  color: var(--gold);
}

/* Ẩn dấu phân cách trên mobile */
.mobile-nav .sep {
  display: none;
}

/* Dropdown trên mobile: biến thành một "tab" mới trượt đè lên menu chính */
.mobile-nav .nav-dropdown {
  position: absolute;
  top: 0;
  left: 100%; /* Giấu bên phải */
  width: 100%;
  height: 100vh; /* Theo toàn bộ viewport để che menu chính */
  min-height: 100%; 
  background: var(--olive);
  opacity: 1;
  visibility: visible;
  max-height: none;
  overflow-y: auto;
  box-shadow: none;
  padding: 100px 40px 40px; /* Chừa chỗ cho nút Back (hamburger icon) */
  display: flex;
  flex-direction: column;
  gap: 20px;
  margin-top: 0;
  align-items: center;
  transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  z-index: 10;
}

/* Khi con menu được kích hoạt (Drill-down) */
.mobile-nav .nav-item.is-active .nav-dropdown {
  transform: translateX(-100%); /* Trượt vào tâm */
}

/* Nút quay lại dành riêng cho mobile drill-down */
.mobile-back-btn {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--gold);
  font-family: 'Playfair Display', serif;
  font-size: 20px;
  font-weight: 700;
  cursor: pointer;
  margin-bottom: 40px;
  width: 100%;
  justify-content: center;
  border: none;
  background: none;
  padding: 10px;
}

.mobile-back-btn::before {
  content: '←';
  font-size: 24px;
}

.mobile-nav .dropdown-link {
  font-family: 'Playfair Display', serif;
  font-size: 20px;
  color: rgba(242, 237, 224, 0.7);
  font-weight: 400;
  padding: 10px 0;
  text-transform: none;
  letter-spacing: normal;
  transition: all 0.2s;
  text-align: center;
  width: 100%;
}

.mobile-nav .dropdown-link:hover {
  color: var(--gold);
}

/* Chỉ báo mũi tên cho mobile nav */
.mobile-nav .has-dropdown > .nav-link::after {
  content: ' \203A'; /* Chevron icon */
  display: inline-block;
  margin-left: 8px;
  font-size: 18px;
  transition: transform 0.3s ease;
}

.mobile-nav .nav-item.is-open > .nav-link::after {
  transform: rotate(90deg);
  color: var(--gold);
}

nav .nav-item {
  position: relative;
  display: inline-flex;
  align-items: center;
  height: 100%;
  /* Đảm bảo hover vùng rộng hơn */
}

/* Ẩn dropdown mặc định */
.nav-dropdown {
  position: absolute;
  top: 100%;
  /* Xuất hiện ngay bên dưới link chính */
  left: 0;
  background: var(--olive);
  min-width: 200px;
  display: flex;
  flex-direction: column;
  padding: 10px 0;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.25);

  /* Hiệu ứng ẩn/hiện mượt mà */
  opacity: 0;
  visibility: hidden;
  transform: translateY(10px);
  transition: all 0.3s ease;
  z-index: 100;
}

/* Hiện dropdown khi hover vào nav-item */
.nav-item:hover .nav-dropdown {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

/* Style cho các link con bên trong dropdown */
.dropdown-link {
  color: var(--white);
  text-decoration: none;
  padding: 10px 20px;
  font-size: 14px;
  transition: background 0.2s, color 0.2s;
  display: block;
  white-space: nowrap;
  /* Không cho chữ xuống dòng */
}

.dropdown-link:hover {
  background: rgba(255, 255, 255, 0.05);
  color: var(--gold);
}



/* ── SECTION: FOOTER ──────────────────────────────────────── */
footer {
  background: var(--olive);
  color: var(--white);
  padding: 80px 50px 60px;
  position: relative;
  overflow: hidden;
}

/* 3-column grid cho footer links */
.footer-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 32px;
  max-width: 1200px;
  margin: 0 auto;
  padding-bottom: 40px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.12);
}

.footer-col h4 {
  font-family: 'Playfair Display', serif;
  font-size: 20px;
  color: var(--cream);
  margin-bottom: 20px;
  font-weight: 700;
}

.footer-col ul {
  list-style: none;
}

.footer-col ul li {
  margin-bottom: 12px;
}

.footer-col ul li a {
  color: #CCBB88;
  /* Vàng nhạt cho footer links */
  text-decoration: none;
  font-size: 15px;
  transition: color 0.2s;
}

.footer-col ul li a:hover {
  color: var(--white);
}

/* Footer social links */
.footer-social-link {
  display: flex;
  align-items: center;
  gap: 8px;
}
.footer-social-icon {
  font-size: 14px;
  opacity: 0.7;
}

/* Copyright bar */
.footer-bottom {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
  padding-top: 28px;
  max-width: 1200px;
  margin: 0 auto;
  font-size: 13px;
  color: rgba(255, 255, 255, 0.4);
}

.footer-legal {
  display: flex;
  align-items: center;
  gap: 8px;
}
.footer-legal a {
  color: rgba(255, 255, 255, 0.4);
  text-decoration: none;
  transition: color 0.2s;
}
.footer-legal a:hover {
  color: var(--gold);
}

.footer-tagline {
  font-family: 'Playfair Display', serif;
  font-style: italic;
  color: rgba(255, 255, 255, 0.5);
  font-size: 15px;
}

@media (max-width: 600px) {
  .footer-bottom {
    flex-direction: column;
    text-align: center;
    gap: 8px;
  }
}



/* ── SECTION: BREADCRUMB (dùng chung toàn site) ───────────────
   Áp dụng cho: single.php, page-destinations.php, category.php.
   Nguồn duy nhất — không duplicate trong page-specific CSS.
   ─────────────────────────────────────────────────────────── */
.breadcrumb {
  padding: 14px 0;
  font-size: 13px;
  background: transparent;
  border-bottom: 1px solid rgba(61, 74, 45, 0.05);
  color: rgba(31, 26, 20, 0.5);
}

.breadcrumb a {
  color: var(--amber);
  text-decoration: none;
}

.breadcrumb a:hover {
  text-decoration: underline;
}

.breadcrumb span {
  color: rgba(31, 26, 20, 0.5);
}


/* ── SECTION: LAYOUT CONTAINERS ──────────────────────────── */
.vu-container,
.container {
  max-width: 1200px;
  margin-left: auto;
  margin-right: auto;
  padding-left: 48px;
  padding-right: 48px;
}

.vu-container-narrow {
  max-width: 1000px;
  margin-left: auto;
  margin-right: auto;
  padding-left: 48px;
  padding-right: 48px;
}

@media (max-width: 640px) {
  .vu-container,
  .vu-container-narrow,
  .container {
    padding-left: 20px;
    padding-right: 20px;
  }
}

/* ── SECTION: RESPONSIVE — Breakpoints dùng chung ──────────
   Chỉ chứa rules cho các thành phần GLOBAL (header, nav,
   hamburger, mobile-nav, footer). Breakpoints page-specific
   nằm trong từng file css riêng.
   ─────────────────────────────────────────────────────────── */
@media (max-width: 900px) {

  /* Header */
  .header-inner {
    padding: 15px 20px !important;
  }

  /* Ẩn desktop nav, hiện hamburger + mobile drawer */
  nav {
    display: none;
  }

  .hamburger {
    display: flex;
  }

  .mobile-nav {
    display: flex;
  }

  /* Footer: stack thành 1 cột */
  .footer-grid {
    grid-template-columns: 1fr;
    gap: 30px;
  }

  footer {
    padding: 60px 24px 40px;
  }

  /* Breadcrumb: giảm padding trên mobile */
  .breadcrumb {
    padding: 14px 20px;
  }
}


/* ════════════════════════════════════════════════════════════
   READING PROGRESS BAR
   ════════════════════════════════════════════════════════════ */
#reading-progress {
  position: fixed;
  top: 0;
  left: 0;
  height: 3px;
  width: 0%;
  background: linear-gradient(90deg, var(--gold), var(--amber));
  z-index: 9999;
  transition: width 0.1s linear;
  pointer-events: none;
}


/* (dark mode removed) */


/* ════════════════════════════════════════════════════════════
   HEADER ACTIONS (search btn + hamburger group)
   ════════════════════════════════════════════════════════════ */
.header-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}

/* Search icon button in header */
.vu-search-btn {
  background: none;
  border: none;
  cursor: pointer;
  color: rgba(255, 255, 255, 0.85);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 6px;
  border-radius: 50%;
  transition: color 0.2s, background 0.2s;
}
.vu-search-btn:hover {
  color: var(--gold);
  background: rgba(255, 255, 255, 0.1);
}
/* On desktop, hamburger stays hidden via existing rule — just show search btn */
@media (min-width: 901px) {
  .header-actions .hamburger {
    display: none;
  }
}


/* ════════════════════════════════════════════════════════════
   SEARCH OVERLAY
   ════════════════════════════════════════════════════════════ */
.vu-search-overlay {
  position: fixed;
  inset: 0;
  background: rgba(10, 16, 10, 0.96);
  z-index: 9000;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.25s ease, visibility 0.25s ease;
}
.vu-search-overlay.is-open {
  opacity: 1;
  visibility: visible;
}

.vu-search-close {
  position: absolute;
  top: 24px;
  right: 28px;
  background: none;
  border: none;
  color: rgba(255, 255, 255, 0.6);
  font-size: 36px;
  line-height: 1;
  cursor: pointer;
  transition: color 0.2s;
}
.vu-search-close:hover {
  color: var(--gold);
}

.vu-search-inner {
  width: 100%;
  max-width: 640px;
  padding: 0 24px;
  text-align: center;
}

.vu-search-hint {
  color: rgba(255, 255, 255, 0.45);
  font-size: 13px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin-bottom: 20px;
}

.vu-search-field {
  display: flex;
  align-items: center;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 50px;
  padding: 6px 6px 6px 24px;
  transition: border-color 0.2s;
}
.vu-search-field:focus-within {
  border-color: var(--gold);
}

.vu-search-field input[type="search"] {
  flex: 1;
  background: none;
  border: none;
  outline: none;
  color: var(--white);
  font-size: 20px;
  font-family: inherit;
  padding: 8px 12px 8px 0;
  min-width: 0;
}
.vu-search-field input[type="search"]::placeholder {
  color: rgba(255, 255, 255, 0.3);
}
.vu-search-field input[type="search"]::-webkit-search-cancel-button {
  display: none;
}

.vu-search-field button[type="submit"] {
  background: var(--gold);
  border: none;
  border-radius: 50px;
  color: var(--near-black);
  cursor: pointer;
  width: 44px;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: background 0.2s;
}
.vu-search-field button[type="submit"]:hover {
  background: var(--amber);
}

.vu-search-quick {
  margin-top: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 8px;
}
.vu-search-quick span {
  color: rgba(255, 255, 255, 0.35);
  font-size: 13px;
}
.vu-search-quick a {
  color: rgba(255, 255, 255, 0.55);
  font-size: 13px;
  text-decoration: none;
  background: rgba(255, 255, 255, 0.07);
  border: 1px solid rgba(255, 255, 255, 0.12);
  padding: 4px 12px;
  border-radius: 20px;
  transition: all 0.2s;
}
.vu-search-quick a:hover {
  color: var(--gold);
  border-color: var(--gold);
  background: rgba(212, 160, 23, 0.1);
}

@media (max-width: 600px) {
  .vu-search-field input[type="search"] {
    font-size: 16px;
  }
}