/* ============================================================
   PUBLIC TOPNAV
============================================================ */
.va-topnav {
  background: var(--white);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 48px;
  height: var(--topnav-height);
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 200;
}

.va-topnav-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 20px;
  font-weight: 900;
  color: var(--text-primary);
  letter-spacing: -0.5px;
  text-decoration: none;
}

.va-topnav-logo .custom-logo {
  height: 36px;
  width: auto;
  border-radius: 10px;
}

.logo-mark {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  background: var(--yellow);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  font-weight: 900;
  color: var(--text-primary);
  flex-shrink: 0;
}

.logo-text {
  font-size: 20px;
  font-weight: 900;
  color: var(--text-primary);
  letter-spacing: -0.5px;
}

.va-topnav-logo .custom-logo-link {
  display: flex;
  align-items: center;
  gap: 10px;
}

/* Primary nav menu */
.va-topnav-menu ul {
  display: flex;
  gap: 32px;
  list-style: none;
  margin: 0;
  padding: 0;
}

.va-topnav-menu ul li a {
  font-size: 14px;
  font-weight: 600;
  color: var(--text-secondary);
  text-decoration: none;
  padding: 4px 0;
  border-bottom: 2px solid transparent;
  transition: color .15s, border-color .15s;
}

.va-topnav-menu ul li a:hover,
.va-topnav-menu ul li.current-menu-item a,
.va-topnav-menu ul li.current_page_item a {
  color: var(--text-primary);
  border-bottom-color: var(--coral);
}

/* Right side of topnav */
.va-topnav-right {
  display: flex;
  align-items: center;
  gap: 12px;
}

.va-btn-login {
  background: var(--coral);
  color: white;
  border: none;
  border-radius: var(--r-md);
  padding: 8px 20px;
  font-family: var(--font);
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: background .15s;
}

.va-btn-login:hover { background: var(--coral-dark); color: white; }

/* ============================================================
   HERO SECTION
============================================================ */
.va-hero {
  background: var(--yellow);
  padding: 64px 48px 0;
  display: flex;
  align-items: flex-end;
  gap: 48px;
  min-height: 340px;
  position: relative;
  overflow: hidden;
}

.va-hero-text {
  flex: 1;
  padding-bottom: 64px;
}

.va-hero-tag {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: rgba(255,255,255,0.55);
  border-radius: 20px;
  padding: 5px 14px;
  font-size: 12px;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 20px;
  backdrop-filter: blur(6px);
}

.va-hero-title {
  font-size: 52px;
  font-weight: 900;
  line-height: 1.08;
  color: var(--text-primary);
  letter-spacing: -1.5px;
  margin-bottom: 16px;
}

.va-hero-sub {
  font-size: 16px;
  font-weight: 500;
  color: rgba(26,35,64,0.65);
  line-height: 1.6;
  max-width: 380px;
  margin-bottom: 0;
}

/* Hero illustration */
.va-hero-image {
  flex-shrink: 0;
  width: 300px;
  align-self: flex-end;
  display: flex;
  justify-content: center;
}

.va-hero-blob {
  width: 260px;
  height: 260px;
  border-radius: 50%;
  background: rgba(255,255,255,0.35);
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
}

.va-hero-brain {
  width: 160px;
  height: 160px;
  background: white;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 80px;
  box-shadow: var(--shadow-md);
}

.va-hero-stat {
  position: absolute;
  background: white;
  border-radius: var(--r-lg);
  padding: 10px 16px;
  box-shadow: var(--shadow-md);
  display: flex;
  align-items: center;
  gap: 10px;
}

.va-hero-stat-1 { top: 24px; right: -16px; }
.va-hero-stat-2 { bottom: 32px; left: -28px; }

.va-hero-stat .hs-num {
  font-size: 22px;
  font-weight: 900;
  color: var(--coral);
  line-height: 1;
}

.va-hero-stat .hs-label {
  font-size: 11px;
  font-weight: 600;
  color: var(--text-secondary);
  line-height: 1.35;
}

/* ============================================================
   MAIN PUBLIC CONTENT AREA
============================================================ */
.va-main {
  padding: 48px;
  max-width: 1248px;
}

/* ============================================================
   ARTICLE GRID (homepage blog raster)
============================================================ */
.va-article-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}

.va-article-card {
  background: white;
  border-radius: var(--r-2xl);
  border: 1px solid var(--border);
  overflow: hidden;
  cursor: pointer;
  transition: box-shadow .2s, transform .15s;
  text-decoration: none;
  display: flex;
  flex-direction: column;
}

.va-article-card:hover {
  box-shadow: var(--shadow-md);
  transform: translateY(-2px);
}

.va-article-thumb {
  height: 180px;
  overflow: hidden;
  position: relative;
  background: var(--yellow-light);
  display: flex;
  align-items: center;
  justify-content: center;
}

.va-article-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.va-article-thumb-placeholder {
  font-size: 48px;
}

.va-article-thumb-cat {
  position: absolute;
  top: 14px;
  left: 14px;
}

.va-article-body {
  padding: 20px 22px 16px;
  flex: 1;
  display: flex;
  flex-direction: column;
}

.va-article-meta {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 1px;
  text-transform: uppercase;
  color: var(--text-hint);
  margin-bottom: 8px;
}

.va-article-title {
  font-size: 16px;
  font-weight: 800;
  line-height: 1.35;
  color: var(--text-primary);
  margin-bottom: 8px;
  letter-spacing: -0.2px;
}

.va-article-excerpt {
  font-size: 13px;
  font-weight: 500;
  color: var(--text-secondary);
  line-height: 1.6;
  flex: 1;
}

.va-article-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 22px;
  border-top: 1px solid var(--border);
  margin-top: 4px;
}

.va-read-link {
  font-size: 12px;
  font-weight: 700;
  color: var(--coral);
  letter-spacing: 0.3px;
}

.va-article-time {
  font-size: 11px;
  font-weight: 600;
  color: var(--text-hint);
  display: flex;
  align-items: center;
  gap: 4px;
}

/* Pagination */
.va-pagination {
  display: flex;
  justify-content: center;
  gap: 8px;
  margin-top: 40px;
  padding-top: 24px;
  border-top: 1px solid var(--border);
}

.va-pagination .page-numbers {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: var(--r-md);
  font-size: 14px;
  font-weight: 700;
  color: var(--text-secondary);
  background: white;
  border: 1px solid var(--border);
  text-decoration: none;
  transition: background .15s, color .15s;
}

.va-pagination .page-numbers:hover {
  background: var(--off-white);
  color: var(--text-primary);
}

.va-pagination .page-numbers.current {
  background: var(--coral);
  color: white;
  border-color: var(--coral);
}

/* ============================================================
   DASHBOARD LAYOUT
============================================================ */

/* When user is logged in and on a dashboard page,
   the body gets class va-dashboard-page va-logged-in */
body.va-dashboard-page {
  display: flex;
  min-height: 100vh;
  background: var(--bg);
}

/* Sidebar */
.va-sidebar {
  width: var(--nav-width);
  min-height: 100vh;
  background: var(--coral);
  display: flex;
  flex-direction: column;
  position: fixed;
  left: 0;
  top: 0;
  bottom: 0;
  z-index: 300;
  overflow: hidden;
}

.va-sidebar-logo {
  padding: 28px 24px 24px;
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  border-bottom: 1px solid rgba(255,255,255,0.15);
  margin-bottom: 8px;
}

.va-sidebar-logo .logo-mark {
  background: white;
  color: var(--coral);
}

.va-sidebar-logo .logo-text {
  color: white;
  font-size: 18px;
}

.va-sidebar-logo .custom-logo-link {
  display: flex;
  align-items: center;
  gap: 10px;
}

.va-sidebar-logo .custom-logo {
  height: 32px;
  width: auto;
  border-radius: 8px;
}

/* Dashboard nav menu */
.va-sidebar-nav {
  flex: 1;
  padding: 12px 16px;
  overflow-y: auto;
}

.va-sidebar-nav ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.va-sidebar-nav ul li a {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 11px 14px;
  border-radius: var(--r-md);
  font-size: 14px;
  font-weight: 700;
  color: rgba(255,255,255,0.80);
  text-decoration: none;
  transition: background .15s, color .15s;
}

.va-sidebar-nav ul li a:hover {
  background: rgba(255,255,255,0.15);
  color: white;
}

.va-sidebar-nav ul li.current-menu-item a,
.va-sidebar-nav ul li.current_page_item a {
  background: rgba(255,255,255,0.20);
  color: white;
}

.va-sidebar-nav ul li a .menu-icon {
  font-size: 18px;
  flex-shrink: 0;
  opacity: 0.85;
}

/* Sidebar section label */
.va-sidebar-section-label {
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  color: rgba(255,255,255,0.45);
  padding: 14px 14px 6px;
}

/* User profile at bottom */
.va-sidebar-profile {
  padding: 16px;
  border-top: 1px solid rgba(255,255,255,0.15);
  position: relative;
}

.va-sidebar-profile-trigger {
  display: flex;
  align-items: center;
  gap: 12px;
  cursor: pointer;
  padding: 10px 12px;
  border-radius: var(--r-md);
  transition: background .15s;
  user-select: none;
}

.va-sidebar-profile-trigger:hover {
  background: rgba(255,255,255,0.15);
}

.va-sidebar-avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  overflow: hidden;
  flex-shrink: 0;
  background: white;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  font-weight: 800;
  color: var(--coral);
}

.va-sidebar-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.va-sidebar-profile-info {
  flex: 1;
  min-width: 0;
}

.va-sidebar-profile-name {
  font-size: 14px;
  font-weight: 700;
  color: white;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.va-sidebar-profile-role {
  font-size: 11px;
  font-weight: 600;
  color: rgba(255,255,255,0.60);
}

.va-sidebar-profile-chevron {
  color: rgba(255,255,255,0.60);
  font-size: 16px;
  transition: transform .2s;
}

.va-sidebar-profile.open .va-sidebar-profile-chevron {
  transform: rotate(180deg);
}

/* Profile dropdown */
.va-profile-dropdown {
  position: absolute;
  bottom: calc(100% + 4px);
  left: 16px;
  right: 16px;
  background: white;
  border-radius: var(--r-xl);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-lg);
  overflow: hidden;
  display: none;
  z-index: 400;
}

.va-sidebar-profile.open .va-profile-dropdown {
  display: block;
}

.va-profile-dropdown a {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 16px;
  font-size: 14px;
  font-weight: 700;
  color: var(--text-primary);
  text-decoration: none;
  transition: background .12s;
}

.va-profile-dropdown a:hover {
  background: var(--off-white);
}

.va-profile-dropdown a i {
  font-size: 17px;
  color: var(--text-hint);
}

.va-profile-dropdown .dropdown-divider {
  height: 1px;
  background: var(--border);
  margin: 4px 0;
}

.va-profile-dropdown .dropdown-logout {
  color: var(--coral);
}

.va-profile-dropdown .dropdown-logout i {
  color: var(--coral);
}

/* Dashboard content area */
.va-dashboard-content {
  margin-left: var(--nav-width);
  flex: 1;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.va-dashboard-topbar {
  background: white;
  border-bottom: 1px solid var(--border);
  padding: 0 40px;
  height: 64px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  position: sticky;
  top: 0;
  z-index: 100;
}

.va-dashboard-topbar-title {
  font-size: 20px;
  font-weight: 900;
  letter-spacing: -0.3px;
  color: var(--text-primary);
}

.va-dashboard-topbar-right {
  display: flex;
  align-items: center;
  gap: 12px;
}

.va-dashboard-body {
  padding: 40px;
  flex: 1;
}

/* ============================================================
   SINGLE POST / PAGE LAYOUT (public)
============================================================ */
.va-single-wrap {
  max-width: 780px;
  margin: 0 auto;
  padding: 48px 48px 80px;
}

.va-single-header {
  margin-bottom: 32px;
}

.va-single-meta {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 16px;
  flex-wrap: wrap;
}

.va-single-title {
  font-size: 36px;
  font-weight: 900;
  letter-spacing: -1px;
  line-height: 1.1;
  margin-bottom: 16px;
}

.va-single-thumbnail {
  border-radius: var(--r-2xl);
  overflow: hidden;
  margin-bottom: 32px;
}

.va-single-thumbnail img {
  width: 100%;
  height: 400px;
  object-fit: cover;
}

/* ============================================================
   404 / ARCHIVE / SEARCH
============================================================ */
.va-page-header {
  padding: 48px 48px 32px;
  border-bottom: 1px solid var(--border);
  background: white;
  margin-bottom: 40px;
}

.va-page-header-title {
  font-size: 32px;
  font-weight: 900;
  letter-spacing: -0.8px;
}

.va-page-header-sub {
  font-size: 15px;
  font-weight: 500;
  color: var(--text-secondary);
  margin-top: 8px;
}

/* ============================================================
   NO POSTS
============================================================ */
.va-no-posts {
  text-align: center;
  padding: 80px 40px;
  color: var(--text-hint);
}

.va-no-posts i {
  font-size: 48px;
  display: block;
  margin-bottom: 16px;
  color: var(--sand-mid);
}

.va-no-posts p {
  font-size: 16px;
  font-weight: 600;
}

/* ============================================================
   FOOTER (public)
============================================================ */
.va-footer {
  background: var(--navy);
  color: rgba(255,255,255,0.65);
  padding: 32px 48px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 13px;
  font-weight: 600;
  margin-top: auto;
}

.va-footer a {
  color: rgba(255,255,255,0.65);
  text-decoration: none;
}

.va-footer a:hover { color: white; }

/* ============================================================
   MOBILE TOPNAV TOGGLE (hamburger)
============================================================ */
.va-mobile-toggle {
  display: none;
  background: none;
  border: none;
  font-size: 24px;
  color: var(--text-primary);
  cursor: pointer;
  padding: 4px;
}

/* ============================================================
   RESPONSIVE
============================================================ */
@media (max-width: 1024px) {
  .va-article-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .va-hero-title { font-size: 40px; }
  .va-hero-image { width: 220px; }
  .va-hero-blob { width: 200px; height: 200px; }
  .va-hero-brain { width: 130px; height: 130px; font-size: 64px; }
}

@media (max-width: 768px) {
  .va-topnav { padding: 0 20px; }
  .va-topnav-menu { display: none; }
  .va-mobile-toggle { display: flex; }

  .va-hero { flex-direction: column; padding: 40px 20px 0; min-height: auto; }
  .va-hero-image { align-self: center; margin-bottom: 32px; }
  .va-hero-text { padding-bottom: 0; }
  .va-hero-title { font-size: 32px; }

  .va-main { padding: 24px 20px; }
  .va-article-grid { grid-template-columns: 1fr; }

  /* Dashboard mobile */
  .va-sidebar {
    transform: translateX(-100%);
    transition: transform .25s ease;
  }
  .va-sidebar.open { transform: translateX(0); }
  .va-dashboard-content { margin-left: 0; }
  .va-dashboard-topbar { padding: 0 20px; }
  .va-dashboard-body { padding: 24px 20px; }

  .va-footer { flex-direction: column; gap: 8px; text-align: center; }

  .va-single-wrap { padding: 24px 20px 60px; }
  .va-single-title { font-size: 26px; }
}
