/* ─────────────────────────────────────────
 * Lvmaai Layout stylesheet (全局布局)
 *
 * 子比风格：顶部条 + 主导航 + Hero + 区块 + Footer 4列 + 移动端侧滑
 *
 * 颜色用 --wp--preset--color--primary (theme.json 注入)
 * ───────────────────────────────────────── */

/* === Top Bar === */

.lvmaai-topbar {
  font-size: 0.8125rem;
}

.lvmaai-topbar a {
  color: inherit;
  text-decoration: none;
  transition: color 0.15s ease;
}

.lvmaai-topbar a:hover {
  color: #111827;
}


/* === Main Header === */

.lvmaai-header {
  position: sticky;
  top: 0;
  z-index: 40;
  backdrop-filter: blur(8px);
  background-color: rgba(255, 255, 255, 0.95);
}

.lvmaai-logo {
  flex-shrink: 0;
}

.lvmaai-logo__mark {
  display: inline-block;
  width: 40px;
  height: 40px;
  border-radius: 8px;
  background: var(--wp--preset--color--primary, #1a73e8);
}

.lvmaai-menu {
  list-style: none;
  margin: 0;
  padding: 0;
}

.lvmaai-menu__item {
  position: relative;
}

.lvmaai-menu__link {
  display: inline-flex;
  align-items: center;
  padding: 0.5rem 0;
  color: #374151;
  font-weight: 500;
  text-decoration: none;
  transition: color 0.15s ease;
}

.lvmaai-menu__link:hover {
  color: var(--wp--preset--color--primary, #1a73e8);
}

.lvmaai-menu .sub-menu {
  position: absolute;
  top: 100%;
  left: 0;
  min-width: 200px;
  padding: 0.5rem 0;
  background: #fff;
  border-radius: 8px;
  box-shadow: 0 8px 24px -8px rgba(15, 23, 42, 0.12);
  list-style: none;
  opacity: 0;
  visibility: hidden;
  transform: translateY(4px);
  transition: opacity 0.15s ease, transform 0.15s ease;
}

.lvmaai-menu__item:hover .sub-menu {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.lvmaai-menu .sub-menu a {
  display: block;
  padding: 0.5rem 1rem;
  color: #374151;
  text-decoration: none;
  font-weight: 500;
}

.lvmaai-menu .sub-menu a:hover {
  background: rgba(15, 23, 42, 0.04);
  color: var(--wp--preset--color--primary, #1a73e8);
}


/* === Search === */

.lvmaai-search {
  position: relative;
  flex-shrink: 0;
  width: 240px;
}

.lvmaai-search__input {
  width: 100%;
  padding: 0.5rem 2.5rem 0.5rem 1rem;
  border: 1px solid #e5e7eb;
  border-radius: 999px;
  font-size: 0.875rem;
  background: #f9fafb;
  outline: none;
  transition: border-color 0.15s ease, background 0.15s ease;
}

.lvmaai-search__input:focus {
  border-color: var(--wp--preset--color--primary, #1a73e8);
  background: #fff;
}

.lvmaai-search__btn {
  position: absolute;
  right: 0.25rem;
  top: 50%;
  transform: translateY(-50%);
  width: 2rem;
  height: 2rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: transparent;
  border: 0;
  color: #6b7280;
  cursor: pointer;
  border-radius: 999px;
  transition: color 0.15s ease;
}

.lvmaai-search__btn:hover {
  color: var(--wp--preset--color--primary, #1a73e8);
}


/* === Mobile Nav Toggle === */

.lvmaai-nav-toggle {
  background: transparent;
  border: 0;
  padding: 0.5rem;
  color: #374151;
  cursor: pointer;
  border-radius: 8px;
}

.lvmaai-nav-toggle:hover {
  background: rgba(15, 23, 42, 0.04);
}


/* === Mobile Side Nav === */

.lvmaai-mobile-nav {
  position: fixed;
  top: 0;
  right: 0;
  bottom: 0;
  width: 300px;
  max-width: 85vw;
  background: #fff;
  box-shadow: -8px 0 24px -8px rgba(15, 23, 42, 0.16);
  z-index: 50;
  transform: translateX(100%);
  transition: transform 0.25s ease;
  overflow-y: auto;
}

.lvmaai-mobile-nav.is-open {
  transform: translateX(0);
}

.lvmaai-mobile-nav-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.4);
  z-index: 49;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.2s ease;
}

.lvmaai-mobile-nav-backdrop.is-open {
  opacity: 1;
  visibility: visible;
}

.lvmaai-mobile-nav__inner {
  padding: 1.5rem;
}

.lvmaai-mobile-nav__close {
  position: absolute;
  top: 1rem;
  right: 1rem;
  background: transparent;
  border: 0;
  color: #6b7280;
  cursor: pointer;
}

.lvmaai-mobile-nav__search {
  margin: 1rem 0;
}

.lvmaai-mobile-nav__list {
  list-style: none;
  padding: 0;
  margin: 1rem 0;
}

.lvmaai-mobile-nav__list li {
  margin: 0;
}

.lvmaai-mobile-nav__list a {
  display: block;
  padding: 0.75rem 0;
  color: #374151;
  font-weight: 500;
  text-decoration: none;
  border-bottom: 1px solid rgba(15, 23, 42, 0.06);
}

.lvmaai-mobile-nav__user {
  margin-top: 1rem;
  padding-top: 1rem;
  border-top: 1px solid rgba(15, 23, 42, 0.08);
}

.lvmaai-mobile-nav__user a {
  display: inline-block;
  padding: 0.5rem 1rem;
  background: var(--wp--preset--color--primary, #1a73e8);
  color: #fff !important;
  border-radius: 999px;
  text-decoration: none;
  font-weight: 500;
}


/* === Hero === */

.lvmaai-hero {
  min-height: 480px;
  display: flex;
  align-items: center;
}

.lvmaai-hero__bg img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.lvmaai-hero__title {
  text-shadow: 0 2px 12px rgba(0, 0, 0, 0.3);
}

.lvmaai-hero__desc {
  text-shadow: 0 1px 6px rgba(0, 0, 0, 0.4);
}


/* === Buttons === */

.lvmaai-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.625rem 1.25rem;
  font-weight: 600;
  border-radius: 999px;
  text-decoration: none;
  border: 1px solid transparent;
  cursor: pointer;
  transition: all 0.15s ease;
}

.lvmaai-btn--primary {
  background: var(--wp--preset--color--primary, #1a73e8);
  color: #fff !important;
}

.lvmaai-btn--primary:hover {
  transform: translateY(-1px);
  box-shadow: 0 8px 24px -4px rgba(15, 23, 42, 0.18);
}

.lvmaai-btn--ghost {
  background: rgba(255, 255, 255, 0.15);
  color: #fff !important;
  border-color: rgba(255, 255, 255, 0.4);
}

.lvmaai-btn--ghost:hover {
  background: rgba(255, 255, 255, 0.25);
}

.lvmaai-btn--lg {
  padding: 0.875rem 1.75rem;
  font-size: 1rem;
}


/* === Sections === */

.lvmaai-section__title {
  position: relative;
  padding-left: 1rem;
}

.lvmaai-section__title::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 4px;
  border-radius: 2px;
  background: var(--wp--preset--color--primary, #1a73e8);
}

.lvmaai-page-title {
  font-size: 1.75rem;
  font-weight: 700;
  margin: 0 0 1.5rem;
  color: #0f172a;
}


/* === Link === */

.lvmaai-link {
  color: var(--wp--preset--color--primary, #1a73e8);
  text-decoration: none;
  font-weight: 500;
}

.lvmaai-link:hover {
  text-decoration: underline;
}


/* === Posts grid (shared by home / archive / search) === */

.lvmaai-posts-grid {
  margin-top: 2rem;
}


/* === Breadcrumb === */

.lvmaai-breadcrumb__link {
  color: #4b5563;
  text-decoration: none;
}

.lvmaai-breadcrumb__link:hover {
  color: #111827;
  text-decoration: underline;
}

.lvmaai-breadcrumb__current {
  color: #111827;
}

.lvmaai-breadcrumb__sep {
  margin: 0 0.5rem;
}


/* === 404 === */

.lvmaai-404__code {
  font-size: clamp(6rem, 18vw, 12rem);
  font-weight: 900;
  line-height: 1;
  color: var(--wp--preset--color--primary, #1a73e8);
  opacity: 0.2;
  margin: 0;
}

.lvmaai-404__title {
  font-size: 2rem;
  font-weight: 700;
  color: #0f172a;
  margin: 1rem 0 0;
}

.lvmaai-404__search {
  display: flex;
  gap: 0.5rem;
  max-width: 400px;
  margin: 0 auto;
}

.lvmaai-404__search .lvmaai-search__input {
  flex: 1;
}


/* === Footer === */

.lvmaai-footer {
  margin-top: auto;
}

.lvmaai-footer__title {
  color: #fff;
  font-size: 0.9375rem;
  font-weight: 700;
  margin: 0 0 1rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.lvmaai-footer__list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.lvmaai-footer__list li {
  margin: 0;
  padding: 0.375rem 0;
}

.lvmaai-footer__list a {
  color: #9ca3af;
  text-decoration: none;
  font-size: 0.875rem;
  transition: color 0.15s ease;
}

.lvmaai-footer__list a:hover {
  color: #fff;
}

.lvmaai-footer__social {
  display: flex;
  gap: 0.75rem;
}

.lvmaai-social-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
  color: #9ca3af;
  transition: background 0.15s ease, color 0.15s ease;
}

.lvmaai-social-link:hover {
  background: var(--wp--preset--color--primary, #1a73e8);
  color: #fff;
}

.lvmaai-footer__desc {
  color: #6b7280;
  line-height: 1.6;
}


/* === Newsletter === */

.lvmaai-newsletter__form input[type="email"] {
  flex: 1;
}


/* === Mobile === */

@media (max-width: 768px) {
  .lvmaai-topbar__left { display: none; }
  .lvmaai-search { display: none !important; }
  .lvmaai-hero { min-height: 360px; }
  .lvmaai-hero__title { font-size: 2rem !important; }
}


/* === Utility: alert icon spacing === */

.lvmaai-card__excerpt p:last-child { margin-bottom: 0; }