/* ==========================================================================
   AeVox Blog — Glass Morphism Dark Theme
   Ported from ae-vox-website/src/styles/globals.css
   ========================================================================== */

/* ---------- CSS Variables ---------- */
:root {
  --obsidian: #14161E;
  --obsidian-light: #1C1F2E;
  --obsidian-lighter: #252838;
  --cyan: #00E5FF;
  --cyan-glow: rgba(0, 229, 255, 0.5);
  --silver: #8A94A6;
  --silver-glow: rgba(138, 148, 166, 0.5);
  --glass-bg: rgba(255, 255, 255, 0.03);
  --glass-border: rgba(255, 255, 255, 0.08);
  --glass-strong-bg: rgba(255, 255, 255, 0.08);
  --glass-strong-border: rgba(255, 255, 255, 0.15);
}

/* ---------- Base ---------- */
body {
  background: var(--obsidian);
  color: #fff;
  font-family: 'Inter', system-ui, sans-serif;
  overflow-x: hidden;
  padding-top: 80px;
  min-height: 100vh;
}

/* Grid background */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background-image:
    linear-gradient(rgba(0, 229, 255, 0.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(0, 229, 255, 0.03) 1px, transparent 1px);
  background-size: 50px 50px;
}

/* ---------- Selection ---------- */
::selection {
  background: rgba(0, 229, 255, 0.3);
  color: #fff;
}

/* ---------- Focus ---------- */
*:focus-visible {
  outline: 2px solid var(--cyan);
  outline-offset: 2px;
}

/* ---------- Scrollbar ---------- */
::-webkit-scrollbar {
  width: 8px;
}
::-webkit-scrollbar-track {
  background: var(--obsidian-light);
}
::-webkit-scrollbar-thumb {
  background: linear-gradient(180deg, var(--cyan), var(--silver));
  border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
  background: var(--cyan);
}

/* Firefox scrollbar */
html {
  scrollbar-color: var(--cyan) var(--obsidian-light);
  scrollbar-width: thin;
}

/* ---------- Glass Morphism ---------- */
.glass {
  background: var(--glass-bg);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid var(--glass-border);
}
.glass-strong {
  background: var(--glass-strong-bg);
  backdrop-filter: blur(30px);
  -webkit-backdrop-filter: blur(30px);
  border: 1px solid var(--glass-strong-border);
}

/* ---------- Header ---------- */
.aevox-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 50;
  padding: 0.75rem 0;
  background: var(--glass-strong-bg);
  backdrop-filter: blur(30px);
  -webkit-backdrop-filter: blur(30px);
  border-bottom: 1px solid var(--glass-strong-border);
}
.aevox-header .wp-block-group__inner-container,
.aevox-header > .wp-block-group {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 1.5rem;
}
.aevox-header .aevox-logo-group {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  text-decoration: none;
}
.aevox-header .aevox-logo-group img {
  display: block;
}
.aevox-header .aevox-logo-group:hover img:first-child {
  filter: drop-shadow(0 0 10px rgba(0, 229, 255, 0.8));
}

/* Nav links styling */
.aevox-header .wp-block-navigation {
  gap: 0;
}
.aevox-header .wp-block-navigation a,
.aevox-header .wp-block-navigation-item a {
  color: rgba(255, 255, 255, 0.7) !important;
  font-size: 0.875rem;
  font-weight: 500;
  text-decoration: none;
  transition: color 0.2s ease;
  padding: 0.5rem 1rem;
}
.aevox-header .wp-block-navigation a:hover,
.aevox-header .wp-block-navigation-item a:hover {
  color: #fff !important;
}
/* Active blog link */
.aevox-header .wp-block-navigation-item.is-active a,
.aevox-header .wp-block-navigation-item.current-menu-item a {
  color: var(--cyan) !important;
}

/* CTA button in header */
.aevox-cta-btn {
  display: inline-block;
  padding: 0.625rem 1.25rem;
  background: linear-gradient(to right, #00C4D9, #00E5FF);
  color: #14161E !important;
  font-weight: 600;
  font-size: 0.875rem;
  border-radius: 8px;
  text-decoration: none !important;
  transition: all 0.3s ease;
  white-space: nowrap;
}
.aevox-cta-btn:hover {
  box-shadow: 0 0 30px rgba(0, 229, 255, 0.4);
  transform: scale(1.05);
  color: #14161E !important;
}

/* Mobile navigation overlay */
.aevox-header .wp-block-navigation__responsive-container.is-menu-open {
  background: rgba(20, 22, 30, 0.98);
  backdrop-filter: blur(30px);
  -webkit-backdrop-filter: blur(30px);
}
.aevox-header .wp-block-navigation__responsive-container-open,
.aevox-header .wp-block-navigation__responsive-container-close {
  color: #fff;
}

/* ---------- Hero Section ---------- */
.aevox-hero {
  position: relative;
  min-height: 400px;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  border-bottom: 1px solid rgba(0, 229, 255, 0.15);
}
@media (min-width: 768px) {
  .aevox-hero {
    min-height: 480px;
  }
}
#aevox-neural-canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 0;
}
/* Allow mouse interaction on canvas for the node-repel effect */
.aevox-hero:hover #aevox-neural-canvas {
  pointer-events: auto;
}
.aevox-hero-content {
  position: relative;
  z-index: 1;
  text-align: center;
}
.aevox-hero-tag {
  display: inline-block;
  color: var(--cyan) !important;
  font-size: 0.8125rem;
  font-weight: 500;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}
.aevox-hero-title {
  color: #fff !important;
  font-size: 2.5rem !important;
  background: linear-gradient(135deg, #fff 0%, var(--cyan) 60%, var(--silver) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}
@media (min-width: 768px) {
  .aevox-hero-title {
    font-size: 3.5rem !important;
  }
}
.aevox-hero-subtitle {
  color: var(--silver) !important;
  font-size: 1.125rem;
  line-height: 1.7;
  max-width: 600px;
  margin-left: auto;
  margin-right: auto;
}
/* Subtle gradient overlay at bottom of hero for smooth transition */
.aevox-hero::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 120px;
  background: linear-gradient(to top, var(--obsidian), transparent);
  z-index: 1;
  pointer-events: none;
}

/* ---------- Post Cards (Blog Listing) ---------- */
.aevox-post-card {
  background: var(--glass-bg);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid var(--glass-border);
  border-radius: 16px;
  overflow: hidden;
  transition: box-shadow 0.3s ease, transform 0.3s ease, border-color 0.3s ease;
  display: flex;
  flex-direction: column;
}
.aevox-post-card:hover {
  box-shadow: 0 0 30px rgba(0, 229, 255, 0.15), 0 0 60px rgba(0, 229, 255, 0.05);
  border-color: rgba(0, 229, 255, 0.2);
  transform: translateY(-4px);
}
.aevox-post-card .wp-block-post-featured-image {
  margin: 0;
  border-radius: 0;
}
.aevox-post-card .wp-block-post-featured-image img {
  border-radius: 0;
  aspect-ratio: 16/10;
  object-fit: cover;
  width: 100%;
  min-height: 200px;
}
.aevox-post-card .aevox-card-content {
  padding: 1.75rem;
  flex: 1;
  display: flex;
  flex-direction: column;
}
.aevox-post-card .wp-block-post-title {
  margin-bottom: 0.75rem;
}
.aevox-post-card .wp-block-post-title a {
  color: #fff !important;
  text-decoration: none;
  font-size: 1.375rem;
  font-weight: 600;
  line-height: 1.4;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.aevox-post-card .wp-block-post-title a:hover {
  color: var(--cyan) !important;
}
.aevox-post-card .wp-block-post-excerpt {
  color: var(--silver);
  font-size: 0.9375rem;
  line-height: 1.7;
  margin-bottom: 1.25rem;
  flex: 1;
}
.aevox-post-card .wp-block-post-excerpt .wp-block-post-excerpt__excerpt {
  display: -webkit-box;
  -webkit-line-clamp: 4;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.aevox-post-card .wp-block-post-date {
  color: var(--silver);
  font-size: 0.8125rem;
  margin-bottom: 0.75rem;
}

/* Read More link */
.aevox-read-more {
  display: inline-block;
  color: var(--cyan) !important;
  font-size: 0.875rem;
  font-weight: 500;
  text-decoration: none;
  transition: color 0.2s ease;
}
.aevox-read-more:hover {
  color: #fff !important;
}
.aevox-read-more::after {
  content: ' \2192';
}

/* Post grid layout */
.aevox-post-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2rem;
}
@media (min-width: 768px) {
  .aevox-post-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 2.5rem;
  }
}

/* ---------- Single Post ---------- */
.aevox-single-header {
  text-align: center;
  max-width: 720px;
  margin: 0 auto 3rem;
}
.aevox-single-header .wp-block-post-title {
  font-size: 2.5rem;
  font-weight: 700;
  line-height: 1.2;
  color: #fff;
  margin-bottom: 1rem;
}
.aevox-single-header .wp-block-post-date,
.aevox-single-header .wp-block-post-terms {
  color: var(--silver);
  font-size: 0.875rem;
}
.aevox-single-header .wp-block-post-featured-image {
  margin-top: 2rem;
  border-radius: 16px;
  overflow: hidden;
}
.aevox-single-header .wp-block-post-featured-image img {
  border-radius: 16px;
  width: 100%;
}

/* Single post body typography */
.aevox-post-body {
  max-width: 720px;
  margin: 0 auto;
}
.aevox-post-body p {
  color: rgba(255, 255, 255, 0.85);
  line-height: 1.8;
  margin-bottom: 1.5rem;
}
.aevox-post-body h2 {
  color: #fff;
  margin-top: 2.5rem;
  margin-bottom: 1rem;
}
.aevox-post-body h3 {
  color: #fff;
  margin-top: 2rem;
  margin-bottom: 0.75rem;
}
.aevox-post-body a {
  color: var(--cyan);
  text-decoration: underline;
  text-underline-offset: 3px;
  text-decoration-color: rgba(0, 229, 255, 0.4);
  transition: text-decoration-color 0.2s ease;
}
.aevox-post-body a:hover {
  text-decoration-color: var(--cyan);
}
.aevox-post-body img {
  border-radius: 12px;
  transition: box-shadow 0.3s ease;
}
.aevox-post-body img:hover {
  box-shadow: 0 0 30px rgba(0, 229, 255, 0.15);
}
.aevox-post-body blockquote {
  border-left: 3px solid var(--cyan);
  padding-left: 1.5rem;
  margin: 2rem 0;
  color: rgba(255, 255, 255, 0.85);
  font-style: italic;
  background: var(--glass-bg);
  padding: 1.25rem 1.5rem;
  border-radius: 0 8px 8px 0;
}
.aevox-post-body code {
  font-family: 'JetBrains Mono', monospace;
  background: var(--obsidian-light);
  padding: 0.2em 0.4em;
  border-radius: 4px;
  font-size: 0.875em;
  color: var(--cyan);
}
.aevox-post-body pre {
  background: var(--obsidian-light);
  border-radius: 8px;
  padding: 1.25rem 1.5rem;
  overflow-x: auto;
  margin: 1.5rem 0;
  border: 1px solid rgba(255, 255, 255, 0.08);
}
.aevox-post-body pre code {
  background: none;
  padding: 0;
  font-size: 0.875rem;
  line-height: 1.6;
}
.aevox-post-body ul,
.aevox-post-body ol {
  color: rgba(255, 255, 255, 0.85);
  padding-left: 1.5rem;
  margin-bottom: 1.5rem;
}
.aevox-post-body li {
  margin-bottom: 0.5rem;
  line-height: 1.7;
}
.aevox-post-body ul li::marker {
  color: var(--cyan);
}
.aevox-post-body ol li::marker {
  color: var(--cyan);
}
.aevox-post-body figure {
  margin: 2rem 0;
}
.aevox-post-body figcaption {
  text-align: center;
  color: var(--silver);
  font-size: 0.875rem;
  margin-top: 0.75rem;
}
.aevox-post-body hr {
  border: none;
  height: 1px;
  background: linear-gradient(90deg,
    transparent 0%,
    rgba(0, 229, 255, 0.3) 20%,
    rgba(138, 148, 166, 0.3) 50%,
    rgba(0, 229, 255, 0.3) 80%,
    transparent 100%
  );
  margin: 3rem 0;
}
.aevox-post-body .wp-block-table table {
  border-collapse: collapse;
  width: 100%;
}
.aevox-post-body .wp-block-table th {
  color: #fff;
  font-weight: 600;
  text-align: left;
  border-bottom: 2px solid rgba(0, 229, 255, 0.3);
  padding: 0.75rem 1rem;
}
.aevox-post-body .wp-block-table td {
  color: rgba(255, 255, 255, 0.85);
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  padding: 0.75rem 1rem;
}

/* ---------- Post Navigation (Prev/Next) ---------- */
.aevox-post-nav {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.5rem;
  margin-top: 4rem;
  padding-top: 2rem;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}
.aevox-post-nav a {
  display: block;
  padding: 1.25rem;
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
  border-radius: 12px;
  text-decoration: none;
  transition: border-color 0.3s ease, box-shadow 0.3s ease;
}
.aevox-post-nav a:hover {
  border-color: rgba(0, 229, 255, 0.2);
  box-shadow: 0 0 20px rgba(0, 229, 255, 0.1);
}
@media (max-width: 640px) {
  .aevox-post-nav {
    grid-template-columns: 1fr;
  }
}

/* ---------- Comments ---------- */
.wp-block-comments,
.comments-area {
  max-width: 720px;
  margin: 3rem auto 0;
}
.comment {
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
  border-radius: 12px;
  padding: 1.25rem;
  margin-bottom: 1rem;
}
.comment .comment-author {
  color: #fff;
  font-weight: 600;
}
.comment .comment-meta {
  color: var(--silver);
  font-size: 0.8125rem;
}
.comment .comment-content p {
  color: rgba(255, 255, 255, 0.85);
}
.comment-respond {
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
  border-radius: 12px;
  padding: 1.5rem;
  margin-top: 2rem;
}
.comment-respond input[type="text"],
.comment-respond input[type="email"],
.comment-respond input[type="url"],
.comment-respond textarea {
  background: var(--obsidian-lighter);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 8px;
  color: #fff;
  padding: 0.625rem 0.875rem;
  width: 100%;
  font-family: 'Inter', system-ui, sans-serif;
}
.comment-respond input:focus,
.comment-respond textarea:focus {
  border-color: var(--cyan);
  outline: none;
  box-shadow: 0 0 0 2px rgba(0, 229, 255, 0.2);
}
.comment-respond .submit {
  background: linear-gradient(to right, #00C4D9, #00E5FF);
  color: #14161E;
  font-weight: 600;
  padding: 0.625rem 1.5rem;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  transition: box-shadow 0.3s ease;
}
.comment-respond .submit:hover {
  box-shadow: 0 0 30px rgba(0, 229, 255, 0.4);
}

/* ---------- Pagination ---------- */
.wp-block-query-pagination {
  margin-top: 3rem;
}
.wp-block-query-pagination a,
.wp-block-query-pagination .page-numbers {
  color: var(--silver);
  padding: 0.5rem 1rem;
  border-radius: 8px;
  transition: all 0.2s ease;
  text-decoration: none;
}
.wp-block-query-pagination a:hover {
  color: var(--cyan);
  background: rgba(0, 229, 255, 0.08);
}
.wp-block-query-pagination .current {
  color: var(--cyan);
  background: rgba(0, 229, 255, 0.1);
}

/* ---------- Search ---------- */
.wp-block-search__input {
  background: var(--obsidian-lighter) !important;
  border-color: rgba(255, 255, 255, 0.1) !important;
  color: #fff !important;
}
.wp-block-search__button {
  background: var(--cyan) !important;
  color: #14161E !important;
  font-weight: 600;
}

/* ---------- Footer ---------- */
.aevox-footer {
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  background: var(--obsidian);
  padding: 4rem 0 2rem;
}
.aevox-footer .wp-block-group__inner-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 1.5rem;
}
.aevox-footer h4,
.aevox-footer .footer-heading {
  color: #fff;
  font-weight: 600;
  margin-bottom: 1rem;
  font-size: 0.875rem;
}
.aevox-footer a {
  color: var(--silver) !important;
  text-decoration: none;
  font-size: 0.875rem;
  transition: color 0.2s ease;
}
.aevox-footer a:hover {
  color: var(--cyan) !important;
}
.aevox-footer .footer-tagline {
  color: var(--silver);
  font-size: 0.875rem;
  max-width: 20rem;
  line-height: 1.6;
}
.aevox-footer .footer-contact {
  color: var(--silver);
  font-size: 0.875rem;
}
.aevox-footer .footer-bottom {
  margin-top: 3rem;
  padding-top: 1.5rem;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
}
.aevox-footer .footer-copyright {
  color: rgba(255, 255, 255, 0.35);
  font-size: 0.8125rem;
}
.aevox-footer .footer-social a {
  color: var(--silver) !important;
  padding: 0.5rem;
  display: inline-flex;
  transition: color 0.2s ease;
}
.aevox-footer .footer-social a:hover {
  color: var(--cyan) !important;
}
.aevox-footer .footer-watermark {
  font-size: 120px;
  font-weight: 700;
  color: rgba(255, 255, 255, 0.02);
  line-height: 1;
  letter-spacing: -0.05em;
  user-select: none;
  overflow: hidden;
  margin-top: 2rem;
}
@media (min-width: 768px) {
  .aevox-footer .footer-watermark {
    font-size: 180px;
  }
}

/* ---------- 404 & Search Results ---------- */
.aevox-404,
.aevox-search-results {
  min-height: 60vh;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
}

/* ---------- Misc WP overrides ---------- */
/* Force dark bg on all WP admin bar visible pages */
.admin-bar body {
  padding-top: calc(80px + 32px);
}

/* Ensure no white flashes */
html {
  background: var(--obsidian);
}

/* Yoast breadcrumbs */
.yoast-breadcrumb {
  color: var(--silver);
  font-size: 0.8125rem;
  margin-bottom: 1.5rem;
}
.yoast-breadcrumb a {
  color: var(--silver);
  text-decoration: none;
}
.yoast-breadcrumb a:hover {
  color: var(--cyan);
}

/* WP block overrides to ensure dark mode */
.wp-block-group,
.wp-block-columns,
.wp-block-column {
  color: inherit;
}
.has-base-background-color {
  background-color: var(--obsidian) !important;
}
.has-contrast-color {
  color: #fff !important;
}
.has-accent-1-color {
  color: var(--cyan) !important;
}
.has-accent-4-color {
  color: var(--silver) !important;
}

/* ---------- Reduced Motion ---------- */
@media (prefers-reduced-motion: reduce) {
  .aevox-post-card,
  .aevox-cta-btn,
  .aevox-post-nav a {
    transition: none;
  }
  .aevox-post-card:hover {
    transform: none;
  }
  .aevox-cta-btn:hover {
    transform: none;
  }
}
